@jonit-dev/night-watch-cli 1.8.14-beta.1 → 1.8.14-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +2212 -582
- package/dist/cli.js.map +1 -1
- package/dist/commands/dashboard/tab-config.js +2 -2
- package/dist/commands/dashboard/tab-config.js.map +1 -1
- package/dist/commands/dashboard/tab-schedules.d.ts +1 -1
- package/dist/commands/dashboard/tab-schedules.d.ts.map +1 -1
- package/dist/commands/dashboard/tab-schedules.js +15 -6
- package/dist/commands/dashboard/tab-schedules.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +5 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.d.ts +8 -0
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +50 -3
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/logs.d.ts.map +1 -1
- package/dist/commands/logs.js +24 -4
- package/dist/commands/logs.js.map +1 -1
- package/dist/commands/manager.d.ts +23 -0
- package/dist/commands/manager.d.ts.map +1 -0
- package/dist/commands/manager.js +220 -0
- package/dist/commands/manager.js.map +1 -0
- package/dist/commands/plan.js +1 -1
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/prd.d.ts.map +1 -1
- package/dist/commands/prd.js +6 -4
- package/dist/commands/prd.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +15 -7
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +2 -1
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/serve.d.ts +1 -0
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/serve.js +10 -4
- package/dist/commands/serve.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +24 -0
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +2 -0
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/ux.d.ts +14 -0
- package/dist/commands/ux.d.ts.map +1 -0
- package/dist/commands/ux.js +169 -0
- package/dist/commands/ux.js.map +1 -0
- package/dist/scripts/night-watch-audit-cron.sh +3 -3
- package/dist/scripts/night-watch-cron.sh +8 -7
- package/dist/scripts/night-watch-helpers.sh +23 -0
- package/dist/scripts/night-watch-manager-cron.sh +61 -0
- package/dist/scripts/night-watch-merger-cron.sh +149 -23
- package/dist/scripts/night-watch-plan-cron.sh +3 -3
- package/dist/scripts/night-watch-pr-resolver-cron.sh +8 -11
- package/dist/scripts/night-watch-pr-reviewer-cron.sh +51 -21
- package/dist/scripts/night-watch-qa-cron.sh +3 -3
- package/dist/scripts/night-watch-slicer-cron.sh +3 -3
- package/dist/templates/night-watch.config.json +14 -0
- package/dist/web/assets/index-BbiKFOgi.css +1 -0
- package/dist/web/assets/index-BheLL2O2.css +1 -0
- package/dist/web/assets/index-BsTuwxzi.js +447 -0
- package/dist/web/assets/index-DatF4suf.css +1 -0
- package/dist/web/assets/index-Q3IYCcdZ.js +447 -0
- package/dist/web/assets/index-uBao8iYf.js +447 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
var Ty=Object.defineProperty;var jg=n=>{throw TypeError(n)};var My=(n,r,u)=>r in n?Ty(n,r,{enumerable:!0,configurable:!0,writable:!0,value:u}):n[r]=u;var Ng=(n,r,u)=>My(n,typeof r!="symbol"?r+"":r,u),Tf=(n,r,u)=>r.has(n)||jg("Cannot "+u);var ee=(n,r,u)=>(Tf(n,r,"read from private field"),u?u.call(n):r.get(n)),at=(n,r,u)=>r.has(n)?jg("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,u),Oe=(n,r,u,o)=>(Tf(n,r,"write to private field"),o?o.call(n,u):r.set(n,u),u),Te=(n,r,u)=>(Tf(n,r,"access private method"),u);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))o(h);new MutationObserver(h=>{for(const f of h)if(f.type==="childList")for(const j of f.addedNodes)j.tagName==="LINK"&&j.rel==="modulepreload"&&o(j)}).observe(document,{childList:!0,subtree:!0});function u(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 o(h){if(h.ep)return;h.ep=!0;const f=u(h);fetch(h.href,f)}})();function nh(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Oy(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var r=n.default;if(typeof r=="function"){var u=function o(){return this instanceof o?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};u.prototype=r.prototype}else u={};return Object.defineProperty(u,"__esModule",{value:!0}),Object.keys(n).forEach(function(o){var h=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(u,o,h.get?h:{enumerable:!0,get:function(){return n[o]}})}),u}var Mf={exports:{}},ec={};/**
|
|
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 wg;function Ry(){if(wg)return ec;wg=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function u(o,h,f){var j=null;if(f!==void 0&&(j=""+f),h.key!==void 0&&(j=""+h.key),"key"in h){f={};for(var b in h)b!=="key"&&(f[b]=h[b])}else f=h;return h=f.ref,{$$typeof:n,type:o,key:j,ref:h!==void 0?h:null,props:f}}return ec.Fragment=r,ec.jsx=u,ec.jsxs=u,ec}var Sg;function Dy(){return Sg||(Sg=1,Mf.exports=Ry()),Mf.exports}var s=Dy(),Of={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 Eg;function ky(){if(Eg)return He;Eg=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),j=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),D=Symbol.iterator;function _(H){return H===null||typeof H!="object"?null:(H=D&&H[D]||H["@@iterator"],typeof H=="function"?H:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,R={};function I(H,se,he){this.props=H,this.context=se,this.refs=R,this.updater=he||N}I.prototype.isReactComponent={},I.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")},I.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function U(){}U.prototype=I.prototype;function J(H,se,he){this.props=H,this.context=se,this.refs=R,this.updater=he||N}var k=J.prototype=new U;k.constructor=J,O(k,I.prototype),k.isPureReactComponent=!0;var w=Array.isArray;function q(){}var G={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function le(H,se,he){var ye=he.ref;return{$$typeof:n,type:H,key:se,ref:ye!==void 0?ye:null,props:he}}function S(H,se){return le(H.type,se,H.props)}function te(H){return typeof H=="object"&&H!==null&&H.$$typeof===n}function ae(H){var se={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(he){return se[he]})}var ie=/\/+/g;function ge(H,se){return typeof H=="object"&&H!==null&&H.key!=null?ae(""+H.key):se.toString(36)}function pe(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(q,q):(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 $(H,se,he,ye,Re){var xe=typeof H;(xe==="undefined"||xe==="boolean")&&(H=null);var Se=!1;if(H===null)Se=!0;else switch(xe){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(H.$$typeof){case n:case r:Se=!0;break;case E:return Se=H._init,$(Se(H._payload),se,he,ye,Re)}}if(Se)return Re=Re(H),Se=ye===""?"."+ge(H,0):ye,w(Re)?(he="",Se!=null&&(he=Se.replace(ie,"$&/")+"/"),$(Re,se,he,"",function(wt){return wt})):Re!=null&&(te(Re)&&(Re=S(Re,he+(Re.key==null||H&&H.key===Re.key?"":(""+Re.key).replace(ie,"$&/")+"/")+Se)),se.push(Re)),1;Se=0;var lt=ye===""?".":ye+":";if(w(H))for(var Ye=0;Ye<H.length;Ye++)ye=H[Ye],xe=lt+ge(ye,Ye),Se+=$(ye,se,he,xe,Re);else if(Ye=_(H),typeof Ye=="function")for(H=Ye.call(H),Ye=0;!(ye=H.next()).done;)ye=ye.value,xe=lt+ge(ye,Ye++),Se+=$(ye,se,he,xe,Re);else if(xe==="object"){if(typeof H.then=="function")return $(pe(H),se,he,ye,Re);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 Se}function K(H,se,he){if(H==null)return H;var ye=[],Re=0;return $(H,ye,"","",function(xe){return se.call(he,xe,Re++)}),ye}function fe(H){if(H._status===-1){var se=H._result;se=se(),se.then(function(he){(H._status===0||H._status===-1)&&(H._status=1,H._result=he)},function(he){(H._status===0||H._status===-1)&&(H._status=2,H._result=he)}),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)},be={map:K,forEach:function(H,se,he){K(H,function(){se.apply(this,arguments)},he)},count:function(H){var se=0;return K(H,function(){se++}),se},toArray:function(H){return K(H,function(se){return se})||[]},only:function(H){if(!te(H))throw Error("React.Children.only expected to receive a single React element child.");return H}};return He.Activity=M,He.Children=be,He.Component=I,He.Fragment=u,He.Profiler=h,He.PureComponent=J,He.StrictMode=o,He.Suspense=y,He.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,He.__COMPILER_RUNTIME={__proto__:null,c:function(H){return G.H.useMemoCache(H)}},He.cache=function(H){return function(){return H.apply(null,arguments)}},He.cacheSignal=function(){return null},He.cloneElement=function(H,se,he){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var ye=O({},H.props),Re=H.key;if(se!=null)for(xe in se.key!==void 0&&(Re=""+se.key),se)!Z.call(se,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&se.ref===void 0||(ye[xe]=se[xe]);var xe=arguments.length-2;if(xe===1)ye.children=he;else if(1<xe){for(var Se=Array(xe),lt=0;lt<xe;lt++)Se[lt]=arguments[lt+2];ye.children=Se}return le(H.type,Re,ye)},He.createContext=function(H){return H={$$typeof:j,_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,he){var ye,Re={},xe=null;if(se!=null)for(ye in se.key!==void 0&&(xe=""+se.key),se)Z.call(se,ye)&&ye!=="key"&&ye!=="__self"&&ye!=="__source"&&(Re[ye]=se[ye]);var Se=arguments.length-2;if(Se===1)Re.children=he;else if(1<Se){for(var lt=Array(Se),Ye=0;Ye<Se;Ye++)lt[Ye]=arguments[Ye+2];Re.children=lt}if(H&&H.defaultProps)for(ye in Se=H.defaultProps,Se)Re[ye]===void 0&&(Re[ye]=Se[ye]);return le(H,xe,Re)},He.createRef=function(){return{current:null}},He.forwardRef=function(H){return{$$typeof:b,render:H}},He.isValidElement=te,He.lazy=function(H){return{$$typeof:E,_payload:{_status:-1,_result:H},_init:fe}},He.memo=function(H,se){return{$$typeof:x,type:H,compare:se===void 0?null:se}},He.startTransition=function(H){var se=G.T,he={};G.T=he;try{var ye=H(),Re=G.S;Re!==null&&Re(he,ye),typeof ye=="object"&&ye!==null&&typeof ye.then=="function"&&ye.then(q,me)}catch(xe){me(xe)}finally{se!==null&&he.types!==null&&(se.types=he.types),G.T=se}},He.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},He.use=function(H){return G.H.use(H)},He.useActionState=function(H,se,he){return G.H.useActionState(H,se,he)},He.useCallback=function(H,se){return G.H.useCallback(H,se)},He.useContext=function(H){return G.H.useContext(H)},He.useDebugValue=function(){},He.useDeferredValue=function(H,se){return G.H.useDeferredValue(H,se)},He.useEffect=function(H,se){return G.H.useEffect(H,se)},He.useEffectEvent=function(H){return G.H.useEffectEvent(H)},He.useId=function(){return G.H.useId()},He.useImperativeHandle=function(H,se,he){return G.H.useImperativeHandle(H,se,he)},He.useInsertionEffect=function(H,se){return G.H.useInsertionEffect(H,se)},He.useLayoutEffect=function(H,se){return G.H.useLayoutEffect(H,se)},He.useMemo=function(H,se){return G.H.useMemo(H,se)},He.useOptimistic=function(H,se){return G.H.useOptimistic(H,se)},He.useReducer=function(H,se,he){return G.H.useReducer(H,se,he)},He.useRef=function(H){return G.H.useRef(H)},He.useState=function(H){return G.H.useState(H)},He.useSyncExternalStore=function(H,se,he){return G.H.useSyncExternalStore(H,se,he)},He.useTransition=function(){return G.H.useTransition()},He.version="19.2.4",He}var Cg;function lh(){return Cg||(Cg=1,Of.exports=ky()),Of.exports}var L=lh();const ze=nh(L);var Rf={exports:{}},tc={},Df={exports:{}},kf={};/**
|
|
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 Tg;function Ay(){return Tg||(Tg=1,(function(n){function r($,K){var fe=$.length;$.push(K);e:for(;0<fe;){var me=fe-1>>>1,be=$[me];if(0<h(be,K))$[me]=K,$[fe]=be,fe=me;else break e}}function u($){return $.length===0?null:$[0]}function o($){if($.length===0)return null;var K=$[0],fe=$.pop();if(fe!==K){$[0]=fe;e:for(var me=0,be=$.length,H=be>>>1;me<H;){var se=2*(me+1)-1,he=$[se],ye=se+1,Re=$[ye];if(0>h(he,fe))ye<be&&0>h(Re,he)?($[me]=Re,$[ye]=fe,me=ye):($[me]=he,$[se]=fe,me=se);else if(ye<be&&0>h(Re,fe))$[me]=Re,$[ye]=fe,me=ye;else break e}}return K}function h($,K){var fe=$.sortIndex-K.sortIndex;return fe!==0?fe:$.id-K.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 j=Date,b=j.now();n.unstable_now=function(){return j.now()-b}}var y=[],x=[],E=1,M=null,D=3,_=!1,N=!1,O=!1,R=!1,I=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,J=typeof setImmediate<"u"?setImmediate:null;function k($){for(var K=u(x);K!==null;){if(K.callback===null)o(x);else if(K.startTime<=$)o(x),K.sortIndex=K.expirationTime,r(y,K);else break;K=u(x)}}function w($){if(O=!1,k($),!N)if(u(y)!==null)N=!0,q||(q=!0,ae());else{var K=u(x);K!==null&&pe(w,K.startTime-$)}}var q=!1,G=-1,Z=5,le=-1;function S(){return R?!0:!(n.unstable_now()-le<Z)}function te(){if(R=!1,q){var $=n.unstable_now();le=$;var K=!0;try{e:{N=!1,O&&(O=!1,U(G),G=-1),_=!0;var fe=D;try{t:{for(k($),M=u(y);M!==null&&!(M.expirationTime>$&&S());){var me=M.callback;if(typeof me=="function"){M.callback=null,D=M.priorityLevel;var be=me(M.expirationTime<=$);if($=n.unstable_now(),typeof be=="function"){M.callback=be,k($),K=!0;break t}M===u(y)&&o(y),k($)}else o(y);M=u(y)}if(M!==null)K=!0;else{var H=u(x);H!==null&&pe(w,H.startTime-$),K=!1}}break e}finally{M=null,D=fe,_=!1}K=void 0}}finally{K?ae():q=!1}}}var ae;if(typeof J=="function")ae=function(){J(te)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,ge=ie.port2;ie.port1.onmessage=te,ae=function(){ge.postMessage(null)}}else ae=function(){I(te,0)};function pe($,K){G=I(function(){$(n.unstable_now())},K)}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($){$.callback=null},n.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<$?Math.floor(1e3/$):5},n.unstable_getCurrentPriorityLevel=function(){return D},n.unstable_next=function($){switch(D){case 1:case 2:case 3:var K=3;break;default:K=D}var fe=D;D=K;try{return $()}finally{D=fe}},n.unstable_requestPaint=function(){R=!0},n.unstable_runWithPriority=function($,K){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var fe=D;D=$;try{return K()}finally{D=fe}},n.unstable_scheduleCallback=function($,K,fe){var me=n.unstable_now();switch(typeof fe=="object"&&fe!==null?(fe=fe.delay,fe=typeof fe=="number"&&0<fe?me+fe:me):fe=me,$){case 1:var be=-1;break;case 2:be=250;break;case 5:be=1073741823;break;case 4:be=1e4;break;default:be=5e3}return be=fe+be,$={id:E++,callback:K,priorityLevel:$,startTime:fe,expirationTime:be,sortIndex:-1},fe>me?($.sortIndex=fe,r(x,$),u(y)===null&&$===u(x)&&(O?(U(G),G=-1):O=!0,pe(w,fe-me))):($.sortIndex=be,r(y,$),N||_||(N=!0,q||(q=!0,ae()))),$},n.unstable_shouldYield=S,n.unstable_wrapCallback=function($){var K=D;return function(){var fe=D;D=K;try{return $.apply(this,arguments)}finally{D=fe}}}})(kf)),kf}var Mg;function _y(){return Mg||(Mg=1,Df.exports=Ay()),Df.exports}var Af={exports:{}},ua={};/**
|
|
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 Og;function zy(){if(Og)return ua;Og=1;var n=lh();function r(y){var x="https://react.dev/errors/"+y;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var E=2;E<arguments.length;E++)x+="&args[]="+encodeURIComponent(arguments[E])}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 u(){}var o={d:{f:u,r:function(){throw Error(r(522))},D:u,C:u,L:u,m:u,X:u,S:u,M:u},p:0,findDOMNode:null},h=Symbol.for("react.portal");function f(y,x,E){var M=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:M==null?null:""+M,children:y,containerInfo:x,implementation:E}}var j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function b(y,x){if(y==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return ua.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,ua.createPortal=function(y,x){var E=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,E)},ua.flushSync=function(y){var x=j.T,E=o.p;try{if(j.T=null,o.p=2,y)return y()}finally{j.T=x,o.p=E,o.d.f()}},ua.preconnect=function(y,x){typeof y=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,o.d.C(y,x))},ua.prefetchDNS=function(y){typeof y=="string"&&o.d.D(y)},ua.preinit=function(y,x){if(typeof y=="string"&&x&&typeof x.as=="string"){var E=x.as,M=b(E,x.crossOrigin),D=typeof x.integrity=="string"?x.integrity:void 0,_=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;E==="style"?o.d.S(y,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:M,integrity:D,fetchPriority:_}):E==="script"&&o.d.X(y,{crossOrigin:M,integrity:D,fetchPriority:_,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},ua.preinitModule=function(y,x){if(typeof y=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var E=b(x.as,x.crossOrigin);o.d.M(y,{crossOrigin:E,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&o.d.M(y)},ua.preload=function(y,x){if(typeof y=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var E=x.as,M=b(E,x.crossOrigin);o.d.L(y,E,{crossOrigin:M,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})}},ua.preloadModule=function(y,x){if(typeof y=="string")if(x){var E=b(x.as,x.crossOrigin);o.d.m(y,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:E,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else o.d.m(y)},ua.requestFormReset=function(y){o.d.r(y)},ua.unstable_batchedUpdates=function(y,x){return y(x)},ua.useFormState=function(y,x,E){return j.H.useFormState(y,x,E)},ua.useFormStatus=function(){return j.H.useHostTransitionStatus()},ua.version="19.2.4",ua}var Rg;function Yx(){if(Rg)return Af.exports;Rg=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(),Af.exports=zy(),Af.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 Dg;function Ly(){if(Dg)return tc;Dg=1;var n=_y(),r=lh(),u=Yx();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function 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 j(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 b(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(o(188))}function x(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,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(o(188))}if(a.return!==l.return)a=c,l=d;else{for(var p=!1,T=c.child;T;){if(T===a){p=!0,a=c,l=d;break}if(T===l){p=!0,l=c,a=d;break}T=T.sibling}if(!p){for(T=d.child;T;){if(T===a){p=!0,a=d,l=c;break}if(T===l){p=!0,l=d,a=c;break}T=T.sibling}if(!p)throw Error(o(189))}}if(a.alternate!==l)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function E(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=E(e),t!==null)return t;e=e.sibling}return null}var M=Object.assign,D=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),J=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),le=Symbol.for("react.activity"),S=Symbol.for("react.memo_cache_sentinel"),te=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=te&&e[te]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Symbol.for("react.client.reference");function ge(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case I:return"Profiler";case R:return"StrictMode";case w:return"Suspense";case q:return"SuspenseList";case le:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case J:return e.displayName||"Context";case U:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:ge(e.type)||"Memo";case Z:t=e._payload,e=e._init;try{return ge(e(t))}catch{}}return null}var pe=Array.isArray,$=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},me=[],be=-1;function H(e){return{current:e}}function se(e){0>be||(e.current=me[be],me[be]=null,be--)}function he(e,t){be++,me[be]=e.current,e.current=t}var ye=H(null),Re=H(null),xe=H(null),Se=H(null);function lt(e,t){switch(he(xe,t),he(Re,e),he(ye,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Y0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Y0(t),e=G0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}se(ye),he(ye,e)}function Ye(){se(ye),se(Re),se(xe)}function wt(e){e.memoizedState!==null&&he(Se,e);var t=ye.current,a=G0(t,e.type);t!==a&&(he(Re,e),he(ye,a))}function oa(e){Re.current===e&&(se(ye),se(Re)),Se.current===e&&(se(Se),Qi._currentValue=fe)}var Ta,Va;function da(e){if(Ta===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ta=t&&t[1]||"",Va=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Ta+e+Va}var ma=!1;function bn(e,t){if(!e||ma)return"";ma=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(ne){var X=ne}Reflect.construct(e,[],oe)}else{try{oe.call()}catch(ne){X=ne}e.call(oe.prototype)}}else{try{throw Error()}catch(ne){X=ne}(oe=e())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(ne){if(ne&&X&&typeof ne.stack=="string")return[ne.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],T=d[1];if(p&&T){var z=p.split(`
|
|
44
|
+
`),Q=T.split(`
|
|
45
|
+
`);for(c=l=0;l<z.length&&!z[l].includes("DetermineComponentFrameRoot");)l++;for(;c<Q.length&&!Q[c].includes("DetermineComponentFrameRoot");)c++;if(l===z.length||c===Q.length)for(l=z.length-1,c=Q.length-1;1<=l&&0<=c&&z[l]!==Q[c];)c--;for(;1<=l&&0<=c;l--,c--)if(z[l]!==Q[c]){if(l!==1||c!==1)do if(l--,c--,0>c||z[l]!==Q[c]){var re=`
|
|
46
|
+
`+z[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{ma=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?da(a):""}function jn(e,t){switch(e.tag){case 26:case 27:case 5:return da(e.type);case 16:return da("Lazy");case 13:return e.child!==t&&t!==null?da("Suspense Fallback"):da("Suspense");case 19:return da("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 da("Activity");default:return""}}function Nn(e){try{var t="",a=null;do t+=jn(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
|
+
Error generating stack: `+l.message+`
|
|
48
|
+
`+l.stack}}var Ba=Object.prototype.hasOwnProperty,Pa=n.unstable_scheduleCallback,It=n.unstable_cancelCallback,$a=n.unstable_shouldYield,ts=n.unstable_requestPaint,vt=n.unstable_now,Jt=n.unstable_getCurrentPriorityLevel,qn=n.unstable_ImmediatePriority,Qs=n.unstable_UserBlockingPriority,as=n.unstable_NormalPriority,Kr=n.unstable_LowPriority,hl=n.unstable_IdlePriority,Qe=n.log,ml=n.unstable_setDisableYieldValue,gt=null,$t=null;function _t(e){if(typeof Qe=="function"&&ml(e),$t&&typeof $t.setStrictMode=="function")try{$t.setStrictMode(gt,e)}catch{}}var zt=Math.clz32?Math.clz32:Js,ns=Math.log,Xs=Math.LN2;function Js(e){return e>>>=0,e===0?32:31-(ns(e)/Xs|0)|0}var nn=256,ue=262144,ve=4194304;function Be(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 St(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 T=l&134217727;return T!==0?(l=T&~d,l!==0?c=Be(l):(p&=T,p!==0?c=Be(p):a||(a=T&~e,a!==0&&(c=Be(a))))):(T=l&~d,T!==0?c=Be(T):p!==0?c=Be(p):a||(a=l&~e,a!==0&&(c=Be(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 ht(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function wn(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 ls(){var e=ve;return ve<<=1,(ve&62914560)===0&&(ve=4194304),e}function Ks(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function gl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ec(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 T=e.entanglements,z=e.expirationTimes,Q=e.hiddenUpdates;for(a=p&~a;0<a;){var re=31-zt(a),oe=1<<re;T[re]=0,z[re]=-1;var X=Q[re];if(X!==null)for(Q[re]=null,re=0;re<X.length;re++){var ne=X[re];ne!==null&&(ne.lane&=-536870913)}a&=~oe}l!==0&&mt(e,l,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(p&~t))}function mt(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-zt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function ga(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-zt(a),c=1<<l;c&t|e[l]&t&&(e[l]|=t),a&=~c}}function ei(e,t){var a=t&-t;return a=(a&42)!==0?1:er(a),(a&(e.suspendedLanes|t))!==0?0:a}function er(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 ra(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function tr(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:mg(e.type))}function ti(e,t){var a=K.p;try{return K.p=e,t()}finally{K.p=a}}var ln=Math.random().toString(36).slice(2),Mt="__reactFiber$"+ln,Yt="__reactProps$"+ln,Vn="__reactContainer$"+ln,ss="__reactEvents$"+ln,Cc="__reactListeners$"+ln,Tc="__reactHandles$"+ln,Mc="__reactResources$"+ln,rs="__reactMarker$"+ln;function ar(e){delete e[Mt],delete e[Yt],delete e[ss],delete e[Cc],delete e[Tc]}function Bn(e){var t=e[Mt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Vn]||a[Mt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=J0(e);e!==null;){if(a=e[Mt])return a;e=J0(e)}return t}e=a,a=e.parentNode}return null}function ke(e){if(e=e[Mt]||e[Vn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function xa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function sn(e){var t=e[Mc];return t||(t=e[Mc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Lt(e){e[rs]=!0}var Oc=new Set,ai={};function Sn(e,t){xl(e,t),xl(e+"Capture",t)}function xl(e,t){for(ai[e]=t,e=0;e<t.length;e++)Oc.add(t[e])}var Rc=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]*$"),Dc={},Pn={};function ni(e){return Ba.call(Pn,e)?!0:Ba.call(Dc,e)?!1:Rc.test(e)?Pn[e]=!0:(Dc[e]=!0,!1)}function Kt(e,t,a){if(ni(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 nr(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 st(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 Ot(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function En(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function li(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 is(e){if(!e._valueTracker){var t=En(e)?"checked":"value";e._valueTracker=li(e,t,""+e[t])}}function pl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=En(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 lr=/[\n"\\]/g;function ea(e){return e.replace(lr,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function sr(e,t,a,l,c,d,p,T){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=""+Ot(t)):e.value!==""+Ot(t)&&(e.value=""+Ot(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?cs(e,p,Ot(t)):a!=null?cs(e,p,Ot(a)):l!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?e.name=""+Ot(T):e.removeAttribute("name")}function vl(e,t,a,l,c,d,p,T){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)){is(e);return}a=a!=null?""+Ot(a):"",t=t!=null?""+Ot(t):a,T||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=T?e.checked:!!l,e.defaultChecked=!!l,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),is(e)}function cs(e,t,a){t==="number"&&rn(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function $n(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=""+Ot(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 us(e,t,a){if(t!=null&&(t=""+Ot(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ot(a):""}function si(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(o(92));if(pe(l)){if(1<l.length)throw Error(o(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Ot(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),is(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 os=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 ds(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||os.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function kc(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(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&&ds(e,c,l)}else for(var d in t)t.hasOwnProperty(d)&&ds(e,d,t[d])}function rr(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 So=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"]]),Ac=/^[\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 fs(e){return Ac.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ya(){}var ri=null;function ir(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yn=null,yl=null;function _c(e){var t=ke(e);if(t&&(e=t.stateNode)){var a=e[Yt]||null;e:switch(e=t.stateNode,t.type){case"input":if(sr(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="'+ea(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var c=l[Yt]||null;if(!c)throw Error(o(90));sr(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&&pl(l)}break e;case"textarea":us(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&$n(e,!!a.multiple,t,!1)}}}var ii=!1;function ci(e,t,a){if(ii)return e(t,a);ii=!0;try{var l=e(t);return l}finally{if(ii=!1,(Yn!==null||yl!==null)&&(Mu(),Yn&&(t=Yn,e=yl,yl=Yn=null,_c(t),e)))for(t=0;t<e.length;t++)_c(e[t])}}function hs(e,t){var a=e.stateNode;if(a===null)return null;var l=a[Yt]||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(o(231,t,typeof a));return a}var un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ui=!1;if(un)try{var ms={};Object.defineProperty(ms,"passive",{get:function(){ui=!0}}),window.addEventListener("test",ms,ms),window.removeEventListener("test",ms,ms)}catch{ui=!1}var Cn=null,cr=null,ur=null;function Gt(){if(ur)return ur;var e,t=cr,a=t.length,l,c="value"in Cn?Cn.value:Cn.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 ur=c.slice(e,1<l?1-l:void 0)}function gs(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function on(){return!0}function Gn(){return!1}function Rt(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 T in e)e.hasOwnProperty(T)&&(a=e[T],this[T]=a?a(d):d[T]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?on:Gn,this.isPropagationStopped=Gn,this}return M(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=on)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=on)},persist:function(){},isPersistent:on}),t}var Tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xs=Rt(Tn),ps=M({},Tn,{view:0,detail:0}),oi=Rt(ps),or,vs,ys,dr=M({},ps,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:js,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!==ys&&(ys&&e.type==="mousemove"?(or=e.screenX-ys.screenX,vs=e.screenY-ys.screenY):vs=or=0,ys=e),or)},movementY:function(e){return"movementY"in e?e.movementY:vs}}),zc=Rt(dr),Eo=M({},dr,{dataTransfer:0}),Co=Rt(Eo),To=M({},ps,{relatedTarget:0}),fr=Rt(To),Mo=M({},Tn,{animationName:0,elapsedTime:0,pseudoElement:0}),bl=Rt(Mo),Oo=M({},Tn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),jl=Rt(Oo),bs=M({},Tn,{data:0}),Nl=Rt(bs),Ro={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Do={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"},ko={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ao(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ko[e])?!!t[e]:!1}function js(){return Ao}var _o=M({},ps,{key:function(e){if(e.key){var t=Ro[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=gs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Do[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:js,charCode:function(e){return e.type==="keypress"?gs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?gs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),zo=Rt(_o),Lo=M({},dr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lc=Rt(Lo),Uo=M({},ps,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:js}),Ho=Rt(Uo),Uc=M({},Tn,{propertyName:0,elapsedTime:0,pseudoElement:0}),qo=Rt(Uc),Vo=M({},dr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Bo=Rt(Vo),Po=M({},Tn,{newState:0,oldState:0}),$o=Rt(Po),Hc=[9,13,27,32],di=un&&"CompositionEvent"in window,Ns=null;un&&"documentMode"in document&&(Ns=document.documentMode);var Yo=un&&"TextEvent"in window&&!Ns,qc=un&&(!di||Ns&&8<Ns&&11>=Ns),Vc=" ",Bc=!1;function Pc(e,t){switch(e){case"keyup":return Hc.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $c(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wl=!1;function Go(e,t){switch(e){case"compositionend":return $c(t);case"keypress":return t.which!==32?null:(Bc=!0,Vc);case"textInput":return e=t.data,e===Vc&&Bc?null:e;default:return null}}function Fo(e,t){if(wl)return e==="compositionend"||!di&&Pc(e,t)?(e=Gt(),ur=cr=Cn=null,wl=!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 qc&&t.locale!=="ko"?null:t.data;default:return null}}var Zo={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 Yc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Zo[e.type]:t==="textarea"}function fi(e,t,a,l){Yn?yl?yl.push(l):yl=[l]:Yn=l,t=zu(t,"onChange"),0<t.length&&(a=new xs("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Sl=null,ws=null;function pa(e){H0(e,0)}function dn(e){var t=xa(e);if(pl(t))return e}function Gc(e,t){if(e==="change")return t}var Mn=!1;if(un){var hi;if(un){var Ma="oninput"in document;if(!Ma){var mi=document.createElement("div");mi.setAttribute("oninput","return;"),Ma=typeof mi.oninput=="function"}hi=Ma}else hi=!1;Mn=hi&&(!document.documentMode||9<document.documentMode)}function gi(){Sl&&(Sl.detachEvent("onpropertychange",xi),ws=Sl=null)}function xi(e){if(e.propertyName==="value"&&dn(ws)){var t=[];fi(t,ws,e,ir(e)),ci(pa,t)}}function Ge(e,t,a){e==="focusin"?(gi(),Sl=t,ws=a,Sl.attachEvent("onpropertychange",xi)):e==="focusout"&&gi()}function El(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return dn(ws)}function Io(e,t){if(e==="click")return dn(t)}function xt(e,t){if(e==="input"||e==="change")return dn(t)}function Ss(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ia=typeof Object.is=="function"?Object.is:Ss;function Es(e,t){if(ia(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(!Ba.call(t,c)||!ia(e[c],t[c]))return!1}return!0}function Fc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Zc(e,t){var a=Fc(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=Fc(a)}}function Xe(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xe(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Wo(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 hr(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 Ic=un&&"documentMode"in document&&11>=document.documentMode,Cl=null,mr=null,ta=null,gr=!1;function Cs(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;gr||Cl==null||Cl!==rn(l)||(l=Cl,"selectionStart"in l&&hr(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}),ta&&Es(ta,l)||(ta=l,l=zu(mr,"onSelect"),0<l.length&&(t=new xs("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Cl)))}function Fn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Tl={animationend:Fn("Animation","AnimationEnd"),animationiteration:Fn("Animation","AnimationIteration"),animationstart:Fn("Animation","AnimationStart"),transitionrun:Fn("Transition","TransitionRun"),transitionstart:Fn("Transition","TransitionStart"),transitioncancel:Fn("Transition","TransitionCancel"),transitionend:Fn("Transition","TransitionEnd")},pi={},Wc={};un&&(Wc=document.createElement("div").style,"AnimationEvent"in window||(delete Tl.animationend.animation,delete Tl.animationiteration.animation,delete Tl.animationstart.animation),"TransitionEvent"in window||delete Tl.transitionend.transition);function Zn(e){if(pi[e])return pi[e];if(!Tl[e])return e;var t=Tl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Wc)return pi[e]=t[a];return e}var Qc=Zn("animationend"),Xc=Zn("animationiteration"),xr=Zn("animationstart"),Qo=Zn("transitionrun"),Xo=Zn("transitionstart"),Jc=Zn("transitioncancel"),vi=Zn("transitionend"),yi=new Map,bi="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(" ");bi.push("scrollEnd");function va(e,t){yi.set(e,t),Sn(t,[e])}var Ml=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)},fa=[],Ga=0,Ts=0;function Ol(){for(var e=Ga,t=Ts=Ga=0;t<e;){var a=fa[t];fa[t++]=null;var l=fa[t];fa[t++]=null;var c=fa[t];fa[t++]=null;var d=fa[t];if(fa[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&&Ms(a,c,d)}}function Fa(e,t,a,l){fa[Ga++]=e,fa[Ga++]=t,fa[Ga++]=a,fa[Ga++]=l,Ts|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function pr(e,t,a,l){return Fa(e,t,a,l),Os(e)}function Za(e,t){return Fa(e,null,null,t),Os(e)}function Ms(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-zt(a),e=d.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=a|536870912),d):null}function Os(e){if(50<$i)throw $i=0,Qd=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Oa={};function vr(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 aa(e,t,a,l){return new vr(e,t,a,l)}function yr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ia(e,t){var a=e.alternate;return a===null?(a=aa(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 Kc(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 br(e,t,a,l,c,d){var p=0;if(l=e,typeof e=="function")yr(e)&&(p=1);else if(typeof e=="string")p=gy(e,a,ye.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case le:return e=aa(31,a,t,c),e.elementType=le,e.lanes=d,e;case O:return Wa(a.children,c,d,t);case R:p=8,c|=24;break;case I:return e=aa(12,a,t,c|2),e.elementType=I,e.lanes=d,e;case w:return e=aa(13,a,t,c),e.elementType=w,e.lanes=d,e;case q:return e=aa(19,a,t,c),e.elementType=q,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case J:p=10;break e;case U:p=9;break e;case k:p=11;break e;case G:p=14;break e;case Z:p=16,l=null;break e}p=29,a=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=aa(p,a,t,c),t.elementType=e,t.type=l,t.lanes=d,t}function Wa(e,t,a,l){return e=aa(7,e,l,t),e.lanes=a,e}function ji(e,t,a){return e=aa(6,e,null,t),e.lanes=a,e}function eu(e){var t=aa(18,null,null,0);return t.stateNode=e,t}function Rl(e,t,a){return t=aa(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ni=new WeakMap;function ya(e,t){if(typeof e=="object"&&e!==null){var a=Ni.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Nn(t)},Ni.set(e,t),t)}return{value:e,source:t,stack:Nn(t)}}var In=[],Wn=0,Rs=null,fn=0,ca=[],Me=0,ba=null,Qa=1,g="";function i(e,t){In[Wn++]=fn,In[Wn++]=Rs,Rs=e,fn=t}function m(e,t,a){ca[Me++]=Qa,ca[Me++]=g,ca[Me++]=ba,ba=e;var l=Qa;e=g;var c=32-zt(l)-1;l&=~(1<<c),a+=1;var d=32-zt(t)+c;if(30<d){var p=c-c%5;d=(l&(1<<p)-1).toString(32),l>>=p,c-=p,Qa=1<<32-zt(t)+c|a<<c|l,g=d+e}else Qa=1<<d|a<<c|l,g=e}function v(e){e.return!==null&&(i(e,1),m(e,1,0))}function C(e){for(;e===Rs;)Rs=In[--Wn],In[Wn]=null,fn=In[--Wn],In[Wn]=null;for(;e===ba;)ba=ca[--Me],ca[Me]=null,g=ca[--Me],ca[Me]=null,Qa=ca[--Me],ca[Me]=null}function A(e,t){ca[Me++]=Qa,ca[Me++]=g,ca[Me++]=ba,Qa=t.id,g=t.overflow,ba=e}var V=null,B=null,Y=!1,de=null,Ne=!1,Ue=Error(o(519));function Fe(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hn(ya(t,e)),Ue}function Ae(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[Mt]=e,t[Yt]=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<Gi.length;a++)$e(Gi[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),vl(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),si(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||P0(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=Ya),t=!0):t=!1,t||Fe(e,!0)}function Nt(e){for(V=e.return;V;)switch(V.tag){case 5:case 31:case 13:Ne=!1;return;case 27:case 3:Ne=!0;return;default:V=V.return}}function Wt(e){if(e!==V)return!1;if(!Y)return Nt(e),Y=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||ff(e.type,e.memoizedProps)),a=!a),a&&B&&Fe(e),Nt(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));B=X0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));B=X0(e)}else t===27?(t=B,$l(e.type)?(e=pf,pf=null,B=e):B=t):B=V?en(e.stateNode.nextSibling):null;return!0}function Qt(){B=V=null,Y=!1}function On(){var e=de;return e!==null&&(Sa===null?Sa=e:Sa.push.apply(Sa,e),de=null),e}function hn(e){de===null?de=[e]:de.push(e)}var jr=H(null),Qn=null,Xa=null;function Rn(e,t,a){he(jr,t._currentValue),t._currentValue=a}function mn(e){e._currentValue=jr.current,se(jr)}function wi(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 Xn(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 T=d;d=c;for(var z=0;z<t.length;z++)if(T.context===t[z]){d.lanes|=a,T=d.alternate,T!==null&&(T.lanes|=a),wi(d.return,a,e),l||(p=null);break e}d=T.next}}else if(c.tag===18){if(p=c.return,p===null)throw Error(o(341));p.lanes|=a,d=p.alternate,d!==null&&(d.lanes|=a),wi(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 Ja(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(o(387));if(p=p.memoizedProps,p!==null){var T=c.type;ia(c.pendingProps.value,p.value)||(e!==null?e.push(T):e=[T])}}else if(c===Se.current){if(p=c.alternate,p===null)throw Error(o(387));p.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Qi):e=[Qi])}c=c.return}e!==null&&Xn(t,e,a,l),t.flags|=262144}function Nr(e){for(e=e.firstContext;e!==null;){if(!ia(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ds(e){Qn=e,Xa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function na(e){return Th(Qn,e)}function tu(e,t){return Qn===null&&Ds(e),Th(e,t)}function Th(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Xa===null){if(e===null)throw Error(o(308));Xa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Xa=Xa.next=t;return a}var dv=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()})}},fv=n.unstable_scheduleCallback,hv=n.unstable_NormalPriority,Ut={$$typeof:J,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Jo(){return{controller:new dv,data:new Map,refCount:0}}function Si(e){e.refCount--,e.refCount===0&&fv(hv,function(){e.controller.abort()})}var Ei=null,Ko=0,wr=0,Sr=null;function mv(e,t){if(Ei===null){var a=Ei=[];Ko=0,wr=af(),Sr={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Ko++,t.then(Mh,Mh),t}function Mh(){if(--Ko===0&&Ei!==null){Sr!==null&&(Sr.status="fulfilled");var e=Ei;Ei=null,wr=0,Sr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function gv(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 Oh=$.S;$.S=function(e,t){f0=vt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&mv(e,t),Oh!==null&&Oh(e,t)};var ks=H(null);function ed(){var e=ks.current;return e!==null?e:ft.pooledCache}function au(e,t){t===null?he(ks,ks.current):he(ks,t.pool)}function Rh(){var e=ed();return e===null?null:{parent:Ut._currentValue,pool:e}}var Er=Error(o(460)),td=Error(o(474)),nu=Error(o(542)),lu={then:function(){}};function Dh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function kh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ya,Ya),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,_h(e),e;default:if(typeof t.status=="string")t.then(Ya,Ya);else{if(e=ft,e!==null&&100<e.shellSuspendCounter)throw Error(o(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,_h(e),e}throw _s=t,Er}}function As(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(_s=a,Er):a}}var _s=null;function Ah(){if(_s===null)throw Error(o(459));var e=_s;return _s=null,e}function _h(e){if(e===Er||e===nu)throw Error(o(483))}var Cr=null,Ci=0;function su(e){var t=Ci;return Ci+=1,Cr===null&&(Cr=[]),kh(Cr,e,t)}function Ti(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ru(e,t){throw t.$$typeof===D?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function zh(e){function t(F,P){if(e){var W=F.deletions;W===null?(F.deletions=[P],F.flags|=16):W.push(P)}}function a(F,P){if(!e)return null;for(;P!==null;)t(F,P),P=P.sibling;return null}function l(F){for(var P=new Map;F!==null;)F.key!==null?P.set(F.key,F):P.set(F.index,F),F=F.sibling;return P}function c(F,P){return F=Ia(F,P),F.index=0,F.sibling=null,F}function d(F,P,W){return F.index=W,e?(W=F.alternate,W!==null?(W=W.index,W<P?(F.flags|=67108866,P):W):(F.flags|=67108866,P)):(F.flags|=1048576,P)}function p(F){return e&&F.alternate===null&&(F.flags|=67108866),F}function T(F,P,W,ce){return P===null||P.tag!==6?(P=ji(W,F.mode,ce),P.return=F,P):(P=c(P,W),P.return=F,P)}function z(F,P,W,ce){var De=W.type;return De===O?re(F,P,W.props.children,ce,W.key):P!==null&&(P.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Z&&As(De)===P.type)?(P=c(P,W.props),Ti(P,W),P.return=F,P):(P=br(W.type,W.key,W.props,null,F.mode,ce),Ti(P,W),P.return=F,P)}function Q(F,P,W,ce){return P===null||P.tag!==4||P.stateNode.containerInfo!==W.containerInfo||P.stateNode.implementation!==W.implementation?(P=Rl(W,F.mode,ce),P.return=F,P):(P=c(P,W.children||[]),P.return=F,P)}function re(F,P,W,ce,De){return P===null||P.tag!==7?(P=Wa(W,F.mode,ce,De),P.return=F,P):(P=c(P,W),P.return=F,P)}function oe(F,P,W){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return P=ji(""+P,F.mode,W),P.return=F,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case _:return W=br(P.type,P.key,P.props,null,F.mode,W),Ti(W,P),W.return=F,W;case N:return P=Rl(P,F.mode,W),P.return=F,P;case Z:return P=As(P),oe(F,P,W)}if(pe(P)||ae(P))return P=Wa(P,F.mode,W,null),P.return=F,P;if(typeof P.then=="function")return oe(F,su(P),W);if(P.$$typeof===J)return oe(F,tu(F,P),W);ru(F,P)}return null}function X(F,P,W,ce){var De=P!==null?P.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return De!==null?null:T(F,P,""+W,ce);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case _:return W.key===De?z(F,P,W,ce):null;case N:return W.key===De?Q(F,P,W,ce):null;case Z:return W=As(W),X(F,P,W,ce)}if(pe(W)||ae(W))return De!==null?null:re(F,P,W,ce,null);if(typeof W.then=="function")return X(F,P,su(W),ce);if(W.$$typeof===J)return X(F,P,tu(F,W),ce);ru(F,W)}return null}function ne(F,P,W,ce,De){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return F=F.get(W)||null,T(P,F,""+ce,De);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case _:return F=F.get(ce.key===null?W:ce.key)||null,z(P,F,ce,De);case N:return F=F.get(ce.key===null?W:ce.key)||null,Q(P,F,ce,De);case Z:return ce=As(ce),ne(F,P,W,ce,De)}if(pe(ce)||ae(ce))return F=F.get(W)||null,re(P,F,ce,De,null);if(typeof ce.then=="function")return ne(F,P,W,su(ce),De);if(ce.$$typeof===J)return ne(F,P,W,tu(P,ce),De);ru(P,ce)}return null}function we(F,P,W,ce){for(var De=null,Je=null,Ee=P,Ve=P=0,Ie=null;Ee!==null&&Ve<W.length;Ve++){Ee.index>Ve?(Ie=Ee,Ee=null):Ie=Ee.sibling;var Ke=X(F,Ee,W[Ve],ce);if(Ke===null){Ee===null&&(Ee=Ie);break}e&&Ee&&Ke.alternate===null&&t(F,Ee),P=d(Ke,P,Ve),Je===null?De=Ke:Je.sibling=Ke,Je=Ke,Ee=Ie}if(Ve===W.length)return a(F,Ee),Y&&i(F,Ve),De;if(Ee===null){for(;Ve<W.length;Ve++)Ee=oe(F,W[Ve],ce),Ee!==null&&(P=d(Ee,P,Ve),Je===null?De=Ee:Je.sibling=Ee,Je=Ee);return Y&&i(F,Ve),De}for(Ee=l(Ee);Ve<W.length;Ve++)Ie=ne(Ee,F,Ve,W[Ve],ce),Ie!==null&&(e&&Ie.alternate!==null&&Ee.delete(Ie.key===null?Ve:Ie.key),P=d(Ie,P,Ve),Je===null?De=Ie:Je.sibling=Ie,Je=Ie);return e&&Ee.forEach(function(Il){return t(F,Il)}),Y&&i(F,Ve),De}function _e(F,P,W,ce){if(W==null)throw Error(o(151));for(var De=null,Je=null,Ee=P,Ve=P=0,Ie=null,Ke=W.next();Ee!==null&&!Ke.done;Ve++,Ke=W.next()){Ee.index>Ve?(Ie=Ee,Ee=null):Ie=Ee.sibling;var Il=X(F,Ee,Ke.value,ce);if(Il===null){Ee===null&&(Ee=Ie);break}e&&Ee&&Il.alternate===null&&t(F,Ee),P=d(Il,P,Ve),Je===null?De=Il:Je.sibling=Il,Je=Il,Ee=Ie}if(Ke.done)return a(F,Ee),Y&&i(F,Ve),De;if(Ee===null){for(;!Ke.done;Ve++,Ke=W.next())Ke=oe(F,Ke.value,ce),Ke!==null&&(P=d(Ke,P,Ve),Je===null?De=Ke:Je.sibling=Ke,Je=Ke);return Y&&i(F,Ve),De}for(Ee=l(Ee);!Ke.done;Ve++,Ke=W.next())Ke=ne(Ee,F,Ve,Ke.value,ce),Ke!==null&&(e&&Ke.alternate!==null&&Ee.delete(Ke.key===null?Ve:Ke.key),P=d(Ke,P,Ve),Je===null?De=Ke:Je.sibling=Ke,Je=Ke);return e&&Ee.forEach(function(Cy){return t(F,Cy)}),Y&&i(F,Ve),De}function dt(F,P,W,ce){if(typeof W=="object"&&W!==null&&W.type===O&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case _:e:{for(var De=W.key;P!==null;){if(P.key===De){if(De=W.type,De===O){if(P.tag===7){a(F,P.sibling),ce=c(P,W.props.children),ce.return=F,F=ce;break e}}else if(P.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Z&&As(De)===P.type){a(F,P.sibling),ce=c(P,W.props),Ti(ce,W),ce.return=F,F=ce;break e}a(F,P);break}else t(F,P);P=P.sibling}W.type===O?(ce=Wa(W.props.children,F.mode,ce,W.key),ce.return=F,F=ce):(ce=br(W.type,W.key,W.props,null,F.mode,ce),Ti(ce,W),ce.return=F,F=ce)}return p(F);case N:e:{for(De=W.key;P!==null;){if(P.key===De)if(P.tag===4&&P.stateNode.containerInfo===W.containerInfo&&P.stateNode.implementation===W.implementation){a(F,P.sibling),ce=c(P,W.children||[]),ce.return=F,F=ce;break e}else{a(F,P);break}else t(F,P);P=P.sibling}ce=Rl(W,F.mode,ce),ce.return=F,F=ce}return p(F);case Z:return W=As(W),dt(F,P,W,ce)}if(pe(W))return we(F,P,W,ce);if(ae(W)){if(De=ae(W),typeof De!="function")throw Error(o(150));return W=De.call(W),_e(F,P,W,ce)}if(typeof W.then=="function")return dt(F,P,su(W),ce);if(W.$$typeof===J)return dt(F,P,tu(F,W),ce);ru(F,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,P!==null&&P.tag===6?(a(F,P.sibling),ce=c(P,W),ce.return=F,F=ce):(a(F,P),ce=ji(W,F.mode,ce),ce.return=F,F=ce),p(F)):a(F,P)}return function(F,P,W,ce){try{Ci=0;var De=dt(F,P,W,ce);return Cr=null,De}catch(Ee){if(Ee===Er||Ee===nu)throw Ee;var Je=aa(29,Ee,null,F.mode);return Je.lanes=ce,Je.return=F,Je}finally{}}}var zs=zh(!0),Lh=zh(!1),Dl=!1;function ad(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function kl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Al(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(tt&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=Os(e),Ms(e,null,a),t}return Fa(e,l,t,a),Os(e)}function Mi(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,ga(e,a)}}function ld(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 sd=!1;function Oi(){if(sd){var e=Sr;if(e!==null)throw e}}function Ri(e,t,a,l){sd=!1;var c=e.updateQueue;Dl=!1;var d=c.firstBaseUpdate,p=c.lastBaseUpdate,T=c.shared.pending;if(T!==null){c.shared.pending=null;var z=T,Q=z.next;z.next=null,p===null?d=Q:p.next=Q,p=z;var re=e.alternate;re!==null&&(re=re.updateQueue,T=re.lastBaseUpdate,T!==p&&(T===null?re.firstBaseUpdate=Q:T.next=Q,re.lastBaseUpdate=z))}if(d!==null){var oe=c.baseState;p=0,re=Q=z=null,T=d;do{var X=T.lane&-536870913,ne=X!==T.lane;if(ne?(Ze&X)===X:(l&X)===X){X!==0&&X===wr&&(sd=!0),re!==null&&(re=re.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var we=e,_e=T;X=t;var dt=a;switch(_e.tag){case 1:if(we=_e.payload,typeof we=="function"){oe=we.call(dt,oe,X);break e}oe=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=_e.payload,X=typeof we=="function"?we.call(dt,oe,X):we,X==null)break e;oe=M({},oe,X);break e;case 2:Dl=!0}}X=T.callback,X!==null&&(e.flags|=64,ne&&(e.flags|=8192),ne=c.callbacks,ne===null?c.callbacks=[X]:ne.push(X))}else ne={lane:X,tag:T.tag,payload:T.payload,callback:T.callback,next:null},re===null?(Q=re=ne,z=oe):re=re.next=ne,p|=X;if(T=T.next,T===null){if(T=c.shared.pending,T===null)break;ne=T,T=ne.next,ne.next=null,c.lastBaseUpdate=ne,c.shared.pending=null}}while(!0);re===null&&(z=oe),c.baseState=z,c.firstBaseUpdate=Q,c.lastBaseUpdate=re,d===null&&(c.shared.lanes=0),Hl|=p,e.lanes=p,e.memoizedState=oe}}function Uh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Hh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Uh(a[e],t)}var Tr=H(null),iu=H(0);function qh(e,t){e=rl,he(iu,e),he(Tr,t),rl=e|t.baseLanes}function rd(){he(iu,rl),he(Tr,Tr.current)}function id(){rl=iu.current,se(Tr),se(iu)}var Ra=H(null),Ka=null;function _l(e){var t=e.alternate;he(Dt,Dt.current&1),he(Ra,e),Ka===null&&(t===null||Tr.current!==null||t.memoizedState!==null)&&(Ka=e)}function cd(e){he(Dt,Dt.current),he(Ra,e),Ka===null&&(Ka=e)}function Vh(e){e.tag===22?(he(Dt,Dt.current),he(Ra,e),Ka===null&&(Ka=e)):zl()}function zl(){he(Dt,Dt.current),he(Ra,Ra.current)}function Da(e){se(Ra),Ka===e&&(Ka=null),se(Dt)}var Dt=H(0);function cu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||gf(a)||xf(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 Jn=0,qe=null,ut=null,Ht=null,uu=!1,Mr=!1,Ls=!1,ou=0,Di=0,Or=null,xv=0;function Et(){throw Error(o(321))}function ud(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!ia(e[a],t[a]))return!1;return!0}function od(e,t,a,l,c,d){return Jn=d,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$.H=e===null||e.memoizedState===null?wm:Ed,Ls=!1,d=a(l,c),Ls=!1,Mr&&(d=Ph(t,a,l,c)),Bh(e),d}function Bh(e){$.H=_i;var t=ut!==null&&ut.next!==null;if(Jn=0,Ht=ut=qe=null,uu=!1,Di=0,Or=null,t)throw Error(o(300));e===null||qt||(e=e.dependencies,e!==null&&Nr(e)&&(qt=!0))}function Ph(e,t,a,l){qe=e;var c=0;do{if(Mr&&(Or=null),Di=0,Mr=!1,25<=c)throw Error(o(301));if(c+=1,Ht=ut=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}$.H=Sm,d=t(a,l)}while(Mr);return d}function pv(){var e=$.H,t=e.useState()[0];return t=typeof t.then=="function"?ki(t):t,e=e.useState()[0],(ut!==null?ut.memoizedState:null)!==e&&(qe.flags|=1024),t}function dd(){var e=ou!==0;return ou=0,e}function fd(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function hd(e){if(uu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}uu=!1}Jn=0,Ht=ut=qe=null,Mr=!1,Di=ou=0,Or=null}function ha(){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 kt(){if(ut===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=ut.next;var t=Ht===null?qe.memoizedState:Ht.next;if(t!==null)Ht=t,ut=e;else{if(e===null)throw qe.alternate===null?Error(o(467)):Error(o(310));ut=e,e={memoizedState:ut.memoizedState,baseState:ut.baseState,baseQueue:ut.baseQueue,queue:ut.queue,next:null},Ht===null?qe.memoizedState=Ht=e:Ht=Ht.next=e}return Ht}function du(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ki(e){var t=Di;return Di+=1,Or===null&&(Or=[]),e=kh(Or,e,t),t=qe,(Ht===null?t.memoizedState:Ht.next)===null&&(t=t.alternate,$.H=t===null||t.memoizedState===null?wm:Ed),e}function fu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ki(e);if(e.$$typeof===J)return na(e)}throw Error(o(438,String(e)))}function md(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=du(),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]=S;return t.index++,a}function Kn(e,t){return typeof t=="function"?t(e):t}function hu(e){var t=kt();return gd(t,ut,e)}function gd(e,t,a){var l=e.queue;if(l===null)throw Error(o(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 T=p=null,z=null,Q=t,re=!1;do{var oe=Q.lane&-536870913;if(oe!==Q.lane?(Ze&oe)===oe:(Jn&oe)===oe){var X=Q.revertLane;if(X===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),oe===wr&&(re=!0);else if((Jn&X)===X){Q=Q.next,X===wr&&(re=!0);continue}else oe={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},z===null?(T=z=oe,p=d):z=z.next=oe,qe.lanes|=X,Hl|=X;oe=Q.action,Ls&&a(d,oe),d=Q.hasEagerState?Q.eagerState:a(d,oe)}else X={lane:oe,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},z===null?(T=z=X,p=d):z=z.next=X,qe.lanes|=oe,Hl|=oe;Q=Q.next}while(Q!==null&&Q!==t);if(z===null?p=d:z.next=T,!ia(d,e.memoizedState)&&(qt=!0,re&&(a=Sr,a!==null)))throw a;e.memoizedState=d,e.baseState=p,e.baseQueue=z,l.lastRenderedState=d}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function xd(e){var t=kt(),a=t.queue;if(a===null)throw Error(o(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);ia(d,t.memoizedState)||(qt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),a.lastRenderedState=d}return[d,l]}function $h(e,t,a){var l=qe,c=kt(),d=Y;if(d){if(a===void 0)throw Error(o(407));a=a()}else a=t();var p=!ia((ut||c).memoizedState,a);if(p&&(c.memoizedState=a,qt=!0),c=c.queue,yd(Fh.bind(null,l,c,e),[e]),c.getSnapshot!==t||p||Ht!==null&&Ht.memoizedState.tag&1){if(l.flags|=2048,Rr(9,{destroy:void 0},Gh.bind(null,l,c,a,t),null),ft===null)throw Error(o(349));d||(Jn&127)!==0||Yh(l,t,a)}return a}function Yh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=qe.updateQueue,t===null?(t=du(),qe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Gh(e,t,a,l){t.value=a,t.getSnapshot=l,Zh(t)&&Ih(e)}function Fh(e,t,a){return a(function(){Zh(t)&&Ih(e)})}function Zh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!ia(e,a)}catch{return!0}}function Ih(e){var t=Za(e,2);t!==null&&Ea(t,e,2)}function pd(e){var t=ha();if(typeof e=="function"){var a=e;if(e=a(),Ls){_t(!0);try{a()}finally{_t(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:e},t}function Wh(e,t,a,l){return e.baseState=a,gd(e,ut,typeof l=="function"?l:Kn)}function vv(e,t,a,l,c){if(xu(e))throw Error(o(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)}};$.T!==null?a(!0):d.isTransition=!1,l(d),a=t.pending,a===null?(d.next=t.pending=d,Qh(t,d)):(d.next=a.next,t.pending=a.next=d)}}function Qh(e,t){var a=t.action,l=t.payload,c=e.state;if(t.isTransition){var d=$.T,p={};$.T=p;try{var T=a(c,l),z=$.S;z!==null&&z(p,T),Xh(e,t,T)}catch(Q){vd(e,t,Q)}finally{d!==null&&p.types!==null&&(d.types=p.types),$.T=d}}else try{d=a(c,l),Xh(e,t,d)}catch(Q){vd(e,t,Q)}}function Xh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Jh(e,t,l)},function(l){return vd(e,t,l)}):Jh(e,t,a)}function Jh(e,t,a){t.status="fulfilled",t.value=a,Kh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Qh(e,a)))}function vd(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Kh(t),t=t.next;while(t!==l)}e.action=null}function Kh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function em(e,t){return t}function tm(e,t){if(Y){var a=ft.formState;if(a!==null){e:{var l=qe;if(Y){if(B){t:{for(var c=B,d=Ne;c.nodeType!==8;){if(!d){c=null;break t}if(c=en(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){B=en(c.nextSibling),l=c.data==="F!";break e}}Fe(l)}l=!1}l&&(t=a[0])}}return a=ha(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:em,lastRenderedState:t},a.queue=l,a=bm.bind(null,qe,l),l.dispatch=a,l=pd(!1),d=Sd.bind(null,qe,!1,l.queue),l=ha(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,a=vv.bind(null,qe,c,d,a),c.dispatch=a,l.memoizedState=e,[t,a,!1]}function am(e){var t=kt();return nm(t,ut,e)}function nm(e,t,a){if(t=gd(e,t,em)[0],e=hu(Kn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=ki(t)}catch(p){throw p===Er?nu:p}else l=t;t=kt();var c=t.queue,d=c.dispatch;return a!==t.memoizedState&&(qe.flags|=2048,Rr(9,{destroy:void 0},yv.bind(null,c,a),null)),[l,d,e]}function yv(e,t){e.action=t}function lm(e){var t=kt(),a=ut;if(a!==null)return nm(t,a,e);kt(),t=t.memoizedState,a=kt();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Rr(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=qe.updateQueue,t===null&&(t=du(),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 sm(){return kt().memoizedState}function mu(e,t,a,l){var c=ha();qe.flags|=e,c.memoizedState=Rr(1|t,{destroy:void 0},a,l===void 0?null:l)}function gu(e,t,a,l){var c=kt();l=l===void 0?null:l;var d=c.memoizedState.inst;ut!==null&&l!==null&&ud(l,ut.memoizedState.deps)?c.memoizedState=Rr(t,d,a,l):(qe.flags|=e,c.memoizedState=Rr(1|t,d,a,l))}function rm(e,t){mu(8390656,8,e,t)}function yd(e,t){gu(2048,8,e,t)}function bv(e){qe.flags|=4;var t=qe.updateQueue;if(t===null)t=du(),qe.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function im(e){var t=kt().memoizedState;return bv({ref:t,nextImpl:e}),function(){if((tt&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function cm(e,t){return gu(4,2,e,t)}function um(e,t){return gu(4,4,e,t)}function om(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 dm(e,t,a){a=a!=null?a.concat([e]):null,gu(4,4,om.bind(null,t,e),a)}function bd(){}function fm(e,t){var a=kt();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&ud(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function hm(e,t){var a=kt();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&ud(t,l[1]))return l[0];if(l=e(),Ls){_t(!0);try{e()}finally{_t(!1)}}return a.memoizedState=[l,t],l}function jd(e,t,a){return a===void 0||(Jn&1073741824)!==0&&(Ze&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=m0(),qe.lanes|=e,Hl|=e,a)}function mm(e,t,a,l){return ia(a,t)?a:Tr.current!==null?(e=jd(e,a,l),ia(e,t)||(qt=!0),e):(Jn&42)===0||(Jn&1073741824)!==0&&(Ze&261930)===0?(qt=!0,e.memoizedState=a):(e=m0(),qe.lanes|=e,Hl|=e,t)}function gm(e,t,a,l,c){var d=K.p;K.p=d!==0&&8>d?d:8;var p=$.T,T={};$.T=T,Sd(e,!1,t,a);try{var z=c(),Q=$.S;if(Q!==null&&Q(T,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var re=gv(z,l);Ai(e,t,re,_a(e))}else Ai(e,t,l,_a(e))}catch(oe){Ai(e,t,{then:function(){},status:"rejected",reason:oe},_a())}finally{K.p=d,p!==null&&T.types!==null&&(p.types=T.types),$.T=p}}function jv(){}function Nd(e,t,a,l){if(e.tag!==5)throw Error(o(476));var c=xm(e).queue;gm(e,c,t,fe,a===null?jv:function(){return pm(e),a(l)})}function xm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:fe},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function pm(e){var t=xm(e);t.next===null&&(t=e.alternate.memoizedState),Ai(e,t.next.queue,{},_a())}function wd(){return na(Qi)}function vm(){return kt().memoizedState}function ym(){return kt().memoizedState}function Nv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=_a();e=kl(a);var l=Al(t,e,a);l!==null&&(Ea(l,t,a),Mi(l,t,a)),t={cache:Jo()},e.payload=t;return}t=t.return}}function wv(e,t,a){var l=_a();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},xu(e)?jm(t,a):(a=pr(e,t,a,l),a!==null&&(Ea(a,e,l),Nm(a,t,l)))}function bm(e,t,a){var l=_a();Ai(e,t,a,l)}function Ai(e,t,a,l){var c={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(xu(e))jm(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,T=d(p,a);if(c.hasEagerState=!0,c.eagerState=T,ia(T,p))return Fa(e,t,c,0),ft===null&&Ol(),!1}catch{}finally{}if(a=pr(e,t,c,l),a!==null)return Ea(a,e,l),Nm(a,t,l),!0}return!1}function Sd(e,t,a,l){if(l={lane:2,revertLane:af(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},xu(e)){if(t)throw Error(o(479))}else t=pr(e,a,l,2),t!==null&&Ea(t,e,2)}function xu(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function jm(e,t){Mr=uu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Nm(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,ga(e,a)}}var _i={readContext:na,use:fu,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useLayoutEffect:Et,useInsertionEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useSyncExternalStore:Et,useId:Et,useHostTransitionStatus:Et,useFormState:Et,useActionState:Et,useOptimistic:Et,useMemoCache:Et,useCacheRefresh:Et};_i.useEffectEvent=Et;var wm={readContext:na,use:fu,useCallback:function(e,t){return ha().memoizedState=[e,t===void 0?null:t],e},useContext:na,useEffect:rm,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,mu(4194308,4,om.bind(null,t,e),a)},useLayoutEffect:function(e,t){return mu(4194308,4,e,t)},useInsertionEffect:function(e,t){mu(4,2,e,t)},useMemo:function(e,t){var a=ha();t=t===void 0?null:t;var l=e();if(Ls){_t(!0);try{e()}finally{_t(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=ha();if(a!==void 0){var c=a(t);if(Ls){_t(!0);try{a(t)}finally{_t(!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=wv.bind(null,qe,e),[l.memoizedState,e]},useRef:function(e){var t=ha();return e={current:e},t.memoizedState=e},useState:function(e){e=pd(e);var t=e.queue,a=bm.bind(null,qe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:bd,useDeferredValue:function(e,t){var a=ha();return jd(a,e,t)},useTransition:function(){var e=pd(!1);return e=gm.bind(null,qe,e.queue,!0,!1),ha().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=qe,c=ha();if(Y){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),ft===null)throw Error(o(349));(Ze&127)!==0||Yh(l,t,a)}c.memoizedState=a;var d={value:a,getSnapshot:t};return c.queue=d,rm(Fh.bind(null,l,d,e),[e]),l.flags|=2048,Rr(9,{destroy:void 0},Gh.bind(null,l,d,a,t),null),a},useId:function(){var e=ha(),t=ft.identifierPrefix;if(Y){var a=g,l=Qa;a=(l&~(1<<32-zt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=ou++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=xv++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:wd,useFormState:tm,useActionState:tm,useOptimistic:function(e){var t=ha();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Sd.bind(null,qe,!0,a),a.dispatch=t,[e,t]},useMemoCache:md,useCacheRefresh:function(){return ha().memoizedState=Nv.bind(null,qe)},useEffectEvent:function(e){var t=ha(),a={impl:e};return t.memoizedState=a,function(){if((tt&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},Ed={readContext:na,use:fu,useCallback:fm,useContext:na,useEffect:yd,useImperativeHandle:dm,useInsertionEffect:cm,useLayoutEffect:um,useMemo:hm,useReducer:hu,useRef:sm,useState:function(){return hu(Kn)},useDebugValue:bd,useDeferredValue:function(e,t){var a=kt();return mm(a,ut.memoizedState,e,t)},useTransition:function(){var e=hu(Kn)[0],t=kt().memoizedState;return[typeof e=="boolean"?e:ki(e),t]},useSyncExternalStore:$h,useId:vm,useHostTransitionStatus:wd,useFormState:am,useActionState:am,useOptimistic:function(e,t){var a=kt();return Wh(a,ut,e,t)},useMemoCache:md,useCacheRefresh:ym};Ed.useEffectEvent=im;var Sm={readContext:na,use:fu,useCallback:fm,useContext:na,useEffect:yd,useImperativeHandle:dm,useInsertionEffect:cm,useLayoutEffect:um,useMemo:hm,useReducer:xd,useRef:sm,useState:function(){return xd(Kn)},useDebugValue:bd,useDeferredValue:function(e,t){var a=kt();return ut===null?jd(a,e,t):mm(a,ut.memoizedState,e,t)},useTransition:function(){var e=xd(Kn)[0],t=kt().memoizedState;return[typeof e=="boolean"?e:ki(e),t]},useSyncExternalStore:$h,useId:vm,useHostTransitionStatus:wd,useFormState:lm,useActionState:lm,useOptimistic:function(e,t){var a=kt();return ut!==null?Wh(a,ut,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:md,useCacheRefresh:ym};Sm.useEffectEvent=im;function Cd(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:M({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Td={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=_a(),c=kl(l);c.payload=t,a!=null&&(c.callback=a),t=Al(e,c,l),t!==null&&(Ea(t,e,l),Mi(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=_a(),c=kl(l);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=Al(e,c,l),t!==null&&(Ea(t,e,l),Mi(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=_a(),l=kl(a);l.tag=2,t!=null&&(l.callback=t),t=Al(e,l,a),t!==null&&(Ea(t,e,a),Mi(t,e,a))}};function Em(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?!Es(a,l)||!Es(c,d):!0}function Cm(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&&Td.enqueueReplaceState(t,t.state,null)}function Us(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=M({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function Tm(e){Ml(e)}function Mm(e){console.error(e)}function Om(e){Ml(e)}function pu(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Rm(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 Md(e,t,a){return a=kl(a),a.tag=3,a.payload={element:null},a.callback=function(){pu(e,t)},a}function Dm(e){return e=kl(e),e.tag=3,e}function km(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(){Rm(t,a,l)}}var p=a.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){Rm(t,a,l),typeof c!="function"&&(ql===null?ql=new Set([this]):ql.add(this));var T=l.stack;this.componentDidCatch(l.value,{componentStack:T!==null?T:""})})}function Sv(e,t,a,l,c){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Ja(t,a,c,!0),a=Ra.current,a!==null){switch(a.tag){case 31:case 13:return Ka===null?Ou():a.alternate===null&&Ct===0&&(Ct=3),a.flags&=-257,a.flags|=65536,a.lanes=c,l===lu?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Kd(e,l,c)),!1;case 22:return a.flags|=65536,l===lu?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)),Kd(e,l,c)),!1}throw Error(o(435,a.tag))}return Kd(e,l,c),Ou(),!1}if(Y)return t=Ra.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==Ue&&(e=Error(o(422),{cause:l}),hn(ya(e,a)))):(l!==Ue&&(t=Error(o(423),{cause:l}),hn(ya(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=ya(l,a),c=Md(e.stateNode,l,c),ld(e,c),Ct!==4&&(Ct=2)),!1;var d=Error(o(520),{cause:l});if(d=ya(d,a),Pi===null?Pi=[d]:Pi.push(d),Ct!==4&&(Ct=2),t===null)return!0;l=ya(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Md(a.stateNode,l,e),ld(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"&&(ql===null||!ql.has(d))))return a.flags|=65536,c&=-c,a.lanes|=c,c=Dm(c),km(c,e,a,l),ld(a,c),!1}a=a.return}while(a!==null);return!1}var Od=Error(o(461)),qt=!1;function la(e,t,a,l){t.child=e===null?Lh(t,null,a,l):zs(t,e.child,a,l)}function Am(e,t,a,l,c){a=a.render;var d=t.ref;if("ref"in l){var p={};for(var T in l)T!=="ref"&&(p[T]=l[T])}else p=l;return Ds(t),l=od(e,t,a,p,d,c),T=dd(),e!==null&&!qt?(fd(e,t,c),el(e,t,c)):(Y&&T&&v(t),t.flags|=1,la(e,t,l,c),t.child)}function _m(e,t,a,l,c){if(e===null){var d=a.type;return typeof d=="function"&&!yr(d)&&d.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=d,zm(e,t,d,l,c)):(e=br(a.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Ud(e,c)){var p=d.memoizedProps;if(a=a.compare,a=a!==null?a:Es,a(p,l)&&e.ref===t.ref)return el(e,t,c)}return t.flags|=1,e=Ia(d,l),e.ref=t.ref,e.return=t,t.child=e}function zm(e,t,a,l,c){if(e!==null){var d=e.memoizedProps;if(Es(d,l)&&e.ref===t.ref)if(qt=!1,t.pendingProps=l=d,Ud(e,c))(e.flags&131072)!==0&&(qt=!0);else return t.lanes=e.lanes,el(e,t,c)}return Rd(e,t,a,l,c)}function Lm(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 Um(e,t,d,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&au(t,d!==null?d.cachePool:null),d!==null?qh(t,d):rd(),Vh(t);else return l=t.lanes=536870912,Um(e,t,d!==null?d.baseLanes|a:a,a,l)}else d!==null?(au(t,d.cachePool),qh(t,d),zl(),t.memoizedState=null):(e!==null&&au(t,null),rd(),zl());return la(e,t,c,a),t.child}function zi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Um(e,t,a,l,c){var d=ed();return d=d===null?null:{parent:Ut._currentValue,pool:d},t.memoizedState={baseLanes:a,cachePool:d},e!==null&&au(t,null),rd(),Vh(t),e!==null&&Ja(e,t,l,!0),t.childLanes=c,null}function vu(e,t){return t=bu({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hm(e,t,a){return zs(t,e.child,null,a),e=vu(t,t.pendingProps),e.flags|=2,Da(t),t.memoizedState=null,e}function Ev(e,t,a){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Y){if(l.mode==="hidden")return e=vu(t,l),t.lanes=536870912,zi(null,e);if(cd(t),(e=B)?(e=Q0(e,Ne),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ba!==null?{id:Qa,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=eu(e),a.return=t,t.child=a,V=t,B=null)):e=null,e===null)throw Fe(t);return t.lanes=536870912,null}return vu(t,l)}var d=e.memoizedState;if(d!==null){var p=d.dehydrated;if(cd(t),c)if(t.flags&256)t.flags&=-257,t=Hm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(qt||Ja(e,t,a,!1),c=(a&e.childLanes)!==0,qt||c){if(l=ft,l!==null&&(p=ei(l,a),p!==0&&p!==d.retryLane))throw d.retryLane=p,Za(e,p),Ea(l,e,p),Od;Ou(),t=Hm(e,t,a)}else e=d.treeContext,B=en(p.nextSibling),V=t,Y=!0,de=null,Ne=!1,e!==null&&A(t,e),t=vu(t,l),t.flags|=4096;return t}return e=Ia(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function yu(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Rd(e,t,a,l,c){return Ds(t),a=od(e,t,a,l,void 0,c),l=dd(),e!==null&&!qt?(fd(e,t,c),el(e,t,c)):(Y&&l&&v(t),t.flags|=1,la(e,t,a,c),t.child)}function qm(e,t,a,l,c,d){return Ds(t),t.updateQueue=null,a=Ph(t,l,a,c),Bh(e),l=dd(),e!==null&&!qt?(fd(e,t,d),el(e,t,d)):(Y&&l&&v(t),t.flags|=1,la(e,t,a,d),t.child)}function Vm(e,t,a,l,c){if(Ds(t),t.stateNode===null){var d=Oa,p=a.contextType;typeof p=="object"&&p!==null&&(d=na(p)),d=new a(l,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Td,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=l,d.state=t.memoizedState,d.refs={},ad(t),p=a.contextType,d.context=typeof p=="object"&&p!==null?na(p):Oa,d.state=t.memoizedState,p=a.getDerivedStateFromProps,typeof p=="function"&&(Cd(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&&Td.enqueueReplaceState(d,d.state,null),Ri(t,l,d,c),Oi(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){d=t.stateNode;var T=t.memoizedProps,z=Us(a,T);d.props=z;var Q=d.context,re=a.contextType;p=Oa,typeof re=="object"&&re!==null&&(p=na(re));var oe=a.getDerivedStateFromProps;re=typeof oe=="function"||typeof d.getSnapshotBeforeUpdate=="function",T=t.pendingProps!==T,re||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(T||Q!==p)&&Cm(t,d,l,p),Dl=!1;var X=t.memoizedState;d.state=X,Ri(t,l,d,c),Oi(),Q=t.memoizedState,T||X!==Q||Dl?(typeof oe=="function"&&(Cd(t,a,oe,l),Q=t.memoizedState),(z=Dl||Em(t,a,z,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=z):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{d=t.stateNode,nd(e,t),p=t.memoizedProps,re=Us(a,p),d.props=re,oe=t.pendingProps,X=d.context,Q=a.contextType,z=Oa,typeof Q=="object"&&Q!==null&&(z=na(Q)),T=a.getDerivedStateFromProps,(Q=typeof T=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(p!==oe||X!==z)&&Cm(t,d,l,z),Dl=!1,X=t.memoizedState,d.state=X,Ri(t,l,d,c),Oi();var ne=t.memoizedState;p!==oe||X!==ne||Dl||e!==null&&e.dependencies!==null&&Nr(e.dependencies)?(typeof T=="function"&&(Cd(t,a,T,l),ne=t.memoizedState),(re=Dl||Em(t,a,re,l,X,ne,z)||e!==null&&e.dependencies!==null&&Nr(e.dependencies))?(Q||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(l,ne,z),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(l,ne,z)),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=ne),d.props=l,d.state=ne,d.context=z,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,yu(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=zs(t,e.child,null,c),t.child=zs(t,null,a,c)):la(e,t,a,c),t.memoizedState=d.state,e=t.child):e=el(e,t,c),e}function Bm(e,t,a,l){return Qt(),t.flags|=256,la(e,t,a,l),t.child}var Dd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kd(e){return{baseLanes:e,cachePool:Rh()}}function Ad(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Aa),e}function Pm(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:(Dt.current&2)!==0),p&&(c=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Y){if(c?_l(t):zl(),(e=B)?(e=Q0(e,Ne),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ba!==null?{id:Qa,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=eu(e),a.return=t,t.child=a,V=t,B=null)):e=null,e===null)throw Fe(t);return xf(e)?t.lanes=32:t.lanes=536870912,null}var T=l.children;return l=l.fallback,c?(zl(),c=t.mode,T=bu({mode:"hidden",children:T},c),l=Wa(l,c,a,null),T.return=t,l.return=t,T.sibling=l,t.child=T,l=t.child,l.memoizedState=kd(a),l.childLanes=Ad(e,p,a),t.memoizedState=Dd,zi(null,l)):(_l(t),_d(t,T))}var z=e.memoizedState;if(z!==null&&(T=z.dehydrated,T!==null)){if(d)t.flags&256?(_l(t),t.flags&=-257,t=zd(e,t,a)):t.memoizedState!==null?(zl(),t.child=e.child,t.flags|=128,t=null):(zl(),T=l.fallback,c=t.mode,l=bu({mode:"visible",children:l.children},c),T=Wa(T,c,a,null),T.flags|=2,l.return=t,T.return=t,l.sibling=T,t.child=l,zs(t,e.child,null,a),l=t.child,l.memoizedState=kd(a),l.childLanes=Ad(e,p,a),t.memoizedState=Dd,t=zi(null,l));else if(_l(t),xf(T)){if(p=T.nextSibling&&T.nextSibling.dataset,p)var Q=p.dgst;p=Q,l=Error(o(419)),l.stack="",l.digest=p,hn({value:l,source:null,stack:null}),t=zd(e,t,a)}else if(qt||Ja(e,t,a,!1),p=(a&e.childLanes)!==0,qt||p){if(p=ft,p!==null&&(l=ei(p,a),l!==0&&l!==z.retryLane))throw z.retryLane=l,Za(e,l),Ea(p,e,l),Od;gf(T)||Ou(),t=zd(e,t,a)}else gf(T)?(t.flags|=192,t.child=e.child,t=null):(e=z.treeContext,B=en(T.nextSibling),V=t,Y=!0,de=null,Ne=!1,e!==null&&A(t,e),t=_d(t,l.children),t.flags|=4096);return t}return c?(zl(),T=l.fallback,c=t.mode,z=e.child,Q=z.sibling,l=Ia(z,{mode:"hidden",children:l.children}),l.subtreeFlags=z.subtreeFlags&65011712,Q!==null?T=Ia(Q,T):(T=Wa(T,c,a,null),T.flags|=2),T.return=t,l.return=t,l.sibling=T,t.child=l,zi(null,l),l=t.child,T=e.child.memoizedState,T===null?T=kd(a):(c=T.cachePool,c!==null?(z=Ut._currentValue,c=c.parent!==z?{parent:z,pool:z}:c):c=Rh(),T={baseLanes:T.baseLanes|a,cachePool:c}),l.memoizedState=T,l.childLanes=Ad(e,p,a),t.memoizedState=Dd,zi(e.child,l)):(_l(t),a=e.child,e=a.sibling,a=Ia(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 _d(e,t){return t=bu({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function bu(e,t){return e=aa(22,e,null,t),e.lanes=0,e}function zd(e,t,a){return zs(t,e.child,null,a),e=_d(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $m(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),wi(e.return,t,a)}function Ld(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 Ym(e,t,a){var l=t.pendingProps,c=l.revealOrder,d=l.tail;l=l.children;var p=Dt.current,T=(p&2)!==0;if(T?(p=p&1|2,t.flags|=128):p&=1,he(Dt,p),la(e,t,l,a),l=Y?fn:0,!T&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$m(e,a,t);else if(e.tag===19)$m(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&&cu(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),Ld(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&&cu(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}Ld(t,!0,a,null,d,l);break;case"together":Ld(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function el(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Hl|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ja(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=Ia(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Ia(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Ud(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Nr(e)))}function Cv(e,t,a){switch(t.tag){case 3:lt(t,t.stateNode.containerInfo),Rn(t,Ut,e.memoizedState.cache),Qt();break;case 27:case 5:wt(t);break;case 4:lt(t,t.stateNode.containerInfo);break;case 10:Rn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,cd(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(_l(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Pm(e,t,a):(_l(t),e=el(e,t,a),e!==null?e.sibling:null);_l(t);break;case 19:var c=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Ja(e,t,a,!1),l=(a&t.childLanes)!==0),c){if(l)return Ym(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),he(Dt,Dt.current),l)break;return null;case 22:return t.lanes=0,Lm(e,t,a,t.pendingProps);case 24:Rn(t,Ut,e.memoizedState.cache)}return el(e,t,a)}function Gm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)qt=!0;else{if(!Ud(e,a)&&(t.flags&128)===0)return qt=!1,Cv(e,t,a);qt=(e.flags&131072)!==0}else qt=!1,Y&&(t.flags&1048576)!==0&&m(t,fn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=As(t.elementType),t.type=e,typeof e=="function")yr(e)?(l=Us(e,l),t.tag=1,t=Vm(null,t,e,l,a)):(t.tag=0,t=Rd(null,t,e,l,a));else{if(e!=null){var c=e.$$typeof;if(c===k){t.tag=11,t=Am(null,t,e,l,a);break e}else if(c===G){t.tag=14,t=_m(null,t,e,l,a);break e}}throw t=ge(e)||e,Error(o(306,t,""))}}return t;case 0:return Rd(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,c=Us(l,t.pendingProps),Vm(e,t,l,c,a);case 3:e:{if(lt(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var d=t.memoizedState;c=d.element,nd(e,t),Ri(t,l,null,a);var p=t.memoizedState;if(l=p.cache,Rn(t,Ut,l),l!==d.cache&&Xn(t,[Ut],a,!0),Oi(),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=Bm(e,t,l,a);break e}else if(l!==c){c=ya(Error(o(424)),t),hn(c),t=Bm(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=en(e.firstChild),V=t,Y=!0,de=null,Ne=!0,a=Lh(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Qt(),l===c){t=el(e,t,a);break e}la(e,t,l,a)}t=t.child}return t;case 26:return yu(e,t),e===null?(a=ag(t.type,null,t.pendingProps,null))?t.memoizedState=a:Y||(a=t.type,e=t.pendingProps,l=Lu(xe.current).createElement(a),l[Mt]=t,l[Yt]=e,sa(l,a,e),Lt(l),t.stateNode=l):t.memoizedState=ag(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return wt(t),e===null&&Y&&(l=t.stateNode=K0(t.type,t.pendingProps,xe.current),V=t,Ne=!0,c=B,$l(t.type)?(pf=c,B=en(l.firstChild)):B=c),la(e,t,t.pendingProps.children,a),yu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Y&&((c=l=B)&&(l=ay(l,t.type,t.pendingProps,Ne),l!==null?(t.stateNode=l,V=t,B=en(l.firstChild),Ne=!1,c=!0):c=!1),c||Fe(t)),wt(t),c=t.type,d=t.pendingProps,p=e!==null?e.memoizedProps:null,l=d.children,ff(c,d)?l=null:p!==null&&ff(c,p)&&(t.flags|=32),t.memoizedState!==null&&(c=od(e,t,pv,null,null,a),Qi._currentValue=c),yu(e,t),la(e,t,l,a),t.child;case 6:return e===null&&Y&&((e=a=B)&&(a=ny(a,t.pendingProps,Ne),a!==null?(t.stateNode=a,V=t,B=null,e=!0):e=!1),e||Fe(t)),null;case 13:return Pm(e,t,a);case 4:return lt(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=zs(t,null,l,a):la(e,t,l,a),t.child;case 11:return Am(e,t,t.type,t.pendingProps,a);case 7:return la(e,t,t.pendingProps,a),t.child;case 8:return la(e,t,t.pendingProps.children,a),t.child;case 12:return la(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,Rn(t,t.type,l.value),la(e,t,l.children,a),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,Ds(t),c=na(c),l=l(c),t.flags|=1,la(e,t,l,a),t.child;case 14:return _m(e,t,t.type,t.pendingProps,a);case 15:return zm(e,t,t.type,t.pendingProps,a);case 19:return Ym(e,t,a);case 31:return Ev(e,t,a);case 22:return Lm(e,t,a,t.pendingProps);case 24:return Ds(t),l=na(Ut),e===null?(c=ed(),c===null&&(c=ft,d=Jo(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=a),c=d),t.memoizedState={parent:l,cache:c},ad(t),Rn(t,Ut,c)):((e.lanes&a)!==0&&(nd(e,t),Ri(t,null,null,a),Oi()),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),Rn(t,Ut,l)):(l=d.cache,Rn(t,Ut,l),l!==c.cache&&Xn(t,[Ut],a,!0))),la(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function tl(e){e.flags|=4}function Hd(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(v0())e.flags|=8192;else throw _s=lu,td}else e.flags&=-16777217}function Fm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ig(t))if(v0())e.flags|=8192;else throw _s=lu,td}function ju(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ls():536870912,e.lanes|=t,_r|=t)}function Li(e,t){if(!Y)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 pt(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 Tv(e,t,a){var l=t.pendingProps;switch(C(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pt(t),null;case 1:return pt(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),mn(Ut),Ye(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Wt(t)?tl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,On())),pt(t),null;case 26:var c=t.type,d=t.memoizedState;return e===null?(tl(t),d!==null?(pt(t),Fm(t,d)):(pt(t),Hd(t,c,null,l,a))):d?d!==e.memoizedState?(tl(t),pt(t),Fm(t,d)):(pt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&tl(t),pt(t),Hd(t,c,e,l,a)),null;case 27:if(oa(t),a=xe.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&tl(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return pt(t),null}e=ye.current,Wt(t)?Ae(t):(e=K0(c,l,a),t.stateNode=e,tl(t))}return pt(t),null;case 5:if(oa(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&tl(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return pt(t),null}if(d=ye.current,Wt(t))Ae(t);else{var p=Lu(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[Mt]=t,d[Yt]=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(sa(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&&tl(t)}}return pt(t),Hd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&tl(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=xe.current,Wt(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,c=V,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[Mt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||P0(e.nodeValue,a)),e||Fe(t,!0)}else e=Lu(e).createTextNode(l),e[Mt]=t,t.stateNode=e}return pt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Wt(t),a!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Mt]=t}else Qt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;pt(t),e=!1}else a=On(),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(o(558))}return pt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Wt(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(o(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[Mt]=t}else Qt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;pt(t),c=!1}else c=On(),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),ju(t,t.updateQueue),pt(t),null);case 4:return Ye(),e===null&&rf(t.stateNode.containerInfo),pt(t),null;case 10:return mn(t.type),pt(t),null;case 19:if(se(Dt),l=t.memoizedState,l===null)return pt(t),null;if(c=(t.flags&128)!==0,d=l.rendering,d===null)if(c)Li(l,!1);else{if(Ct!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=cu(e),d!==null){for(t.flags|=128,Li(l,!1),e=d.updateQueue,t.updateQueue=e,ju(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Kc(a,e),a=a.sibling;return he(Dt,Dt.current&1|2),Y&&i(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&vt()>Cu&&(t.flags|=128,c=!0,Li(l,!1),t.lanes=4194304)}else{if(!c)if(e=cu(d),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,ju(t,e),Li(l,!0),l.tail===null&&l.tailMode==="hidden"&&!d.alternate&&!Y)return pt(t),null}else 2*vt()-l.renderingStartTime>Cu&&a!==536870912&&(t.flags|=128,c=!0,Li(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=vt(),e.sibling=null,a=Dt.current,he(Dt,c?a&1|2:a&1),Y&&i(t,l.treeForkCount),e):(pt(t),null);case 22:case 23:return Da(t),id(),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&&(pt(t),t.subtreeFlags&6&&(t.flags|=8192)):pt(t),a=t.updateQueue,a!==null&&ju(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(ks),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),mn(Ut),pt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Mv(e,t){switch(C(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return mn(Ut),Ye(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return oa(t),null;case 31:if(t.memoizedState!==null){if(Da(t),t.alternate===null)throw Error(o(340));Qt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Da(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Qt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(Dt),null;case 4:return Ye(),null;case 10:return mn(t.type),null;case 22:case 23:return Da(t),id(),e!==null&&se(ks),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return mn(Ut),null;case 25:return null;default:return null}}function Zm(e,t){switch(C(t),t.tag){case 3:mn(Ut),Ye();break;case 26:case 27:case 5:oa(t);break;case 4:Ye();break;case 31:t.memoizedState!==null&&Da(t);break;case 13:Da(t);break;case 19:se(Dt);break;case 10:mn(t.type);break;case 22:case 23:Da(t),id(),e!==null&&se(ks);break;case 24:mn(Ut)}}function Ui(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(T){it(t,t.return,T)}}function Ll(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,T=p.destroy;if(T!==void 0){p.destroy=void 0,c=t;var z=a,Q=T;try{Q()}catch(re){it(c,z,re)}}}l=l.next}while(l!==d)}}catch(re){it(t,t.return,re)}}function Im(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Hh(t,a)}catch(l){it(e,e.return,l)}}}function Wm(e,t,a){a.props=Us(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){it(e,t,l)}}function Hi(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){it(e,t,c)}}function Dn(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(c){it(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){it(e,t,c)}else a.current=null}function Qm(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){it(e,e.return,c)}}function qd(e,t,a){try{var l=e.stateNode;Qv(l,e.type,a,t),l[Yt]=t}catch(c){it(e,e.return,c)}}function Xm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$l(e.type)||e.tag===4}function Vd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Xm(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&&$l(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Bd(e,t,a){var 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=Ya));else if(l!==4&&(l===27&&$l(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Bd(e,t,a),e=e.sibling;e!==null;)Bd(e,t,a),e=e.sibling}function Nu(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&&$l(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Nu(e,t,a),e=e.sibling;e!==null;)Nu(e,t,a),e=e.sibling}function Jm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);sa(t,l,a),t[Mt]=e,t[Yt]=a}catch(d){it(e,e.return,d)}}var al=!1,Vt=!1,Pd=!1,Km=typeof WeakSet=="function"?WeakSet:Set,Xt=null;function Ov(e,t){if(e=e.containerInfo,of=$u,e=Wo(e),hr(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,T=-1,z=-1,Q=0,re=0,oe=e,X=null;t:for(;;){for(var ne;oe!==a||c!==0&&oe.nodeType!==3||(T=p+c),oe!==d||l!==0&&oe.nodeType!==3||(z=p+l),oe.nodeType===3&&(p+=oe.nodeValue.length),(ne=oe.firstChild)!==null;)X=oe,oe=ne;for(;;){if(oe===e)break t;if(X===a&&++Q===c&&(T=p),X===d&&++re===l&&(z=p),(ne=oe.nextSibling)!==null)break;oe=X,X=oe.parentNode}oe=ne}a=T===-1||z===-1?null:{start:T,end:z}}else a=null}a=a||{start:0,end:0}}else a=null;for(df={focusedElem:e,selectionRange:a},$u=!1,Xt=t;Xt!==null;)if(t=Xt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Xt=e;else for(;Xt!==null;){switch(t=Xt,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 we=Us(a.type,c);e=l.getSnapshotBeforeUpdate(we,d),l.__reactInternalSnapshotBeforeUpdate=e}catch(_e){it(a,a.return,_e)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)mf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":mf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Xt=e;break}Xt=t.return}}function e0(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:ll(e,a),l&4&&Ui(5,a);break;case 1:if(ll(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(p){it(a,a.return,p)}else{var c=Us(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){it(a,a.return,p)}}l&64&&Im(a),l&512&&Hi(a,a.return);break;case 3:if(ll(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{Hh(e,t)}catch(p){it(a,a.return,p)}}break;case 27:t===null&&l&4&&Jm(a);case 26:case 5:ll(e,a),t===null&&l&4&&Qm(a),l&512&&Hi(a,a.return);break;case 12:ll(e,a);break;case 31:ll(e,a),l&4&&n0(e,a);break;case 13:ll(e,a),l&4&&l0(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Hv.bind(null,a),ly(e,a))));break;case 22:if(l=a.memoizedState!==null||al,!l){t=t!==null&&t.memoizedState!==null||Vt,c=al;var d=Vt;al=l,(Vt=t)&&!d?sl(e,a,(a.subtreeFlags&8772)!==0):ll(e,a),al=c,Vt=d}break;case 30:break;default:ll(e,a)}}function t0(e){var t=e.alternate;t!==null&&(e.alternate=null,t0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ar(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 yt=null,ja=!1;function nl(e,t,a){for(a=a.child;a!==null;)a0(e,t,a),a=a.sibling}function a0(e,t,a){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(gt,a)}catch{}switch(a.tag){case 26:Vt||Dn(a,t),nl(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Vt||Dn(a,t);var l=yt,c=ja;$l(a.type)&&(yt=a.stateNode,ja=!1),nl(e,t,a),Zi(a.stateNode),yt=l,ja=c;break;case 5:Vt||Dn(a,t);case 6:if(l=yt,c=ja,yt=null,nl(e,t,a),yt=l,ja=c,yt!==null)if(ja)try{(yt.nodeType===9?yt.body:yt.nodeName==="HTML"?yt.ownerDocument.body:yt).removeChild(a.stateNode)}catch(d){it(a,t,d)}else try{yt.removeChild(a.stateNode)}catch(d){it(a,t,d)}break;case 18:yt!==null&&(ja?(e=yt,I0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Pr(e)):I0(yt,a.stateNode));break;case 4:l=yt,c=ja,yt=a.stateNode.containerInfo,ja=!0,nl(e,t,a),yt=l,ja=c;break;case 0:case 11:case 14:case 15:Ll(2,a,t),Vt||Ll(4,a,t),nl(e,t,a);break;case 1:Vt||(Dn(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Wm(a,t,l)),nl(e,t,a);break;case 21:nl(e,t,a);break;case 22:Vt=(l=Vt)||a.memoizedState!==null,nl(e,t,a),Vt=l;break;default:nl(e,t,a)}}function n0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Pr(e)}catch(a){it(t,t.return,a)}}}function l0(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Pr(e)}catch(a){it(t,t.return,a)}}function Rv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Km),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Km),t;default:throw Error(o(435,e.tag))}}function wu(e,t){var a=Rv(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var c=qv.bind(null,e,l);l.then(c,c)}})}function Na(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,T=p;e:for(;T!==null;){switch(T.tag){case 27:if($l(T.type)){yt=T.stateNode,ja=!1;break e}break;case 5:yt=T.stateNode,ja=!1;break e;case 3:case 4:yt=T.stateNode.containerInfo,ja=!0;break e}T=T.return}if(yt===null)throw Error(o(160));a0(d,p,c),yt=null,ja=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)s0(t,e),t=t.sibling}var gn=null;function s0(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Na(t,e),wa(e),l&4&&(Ll(3,e,e.return),Ui(3,e),Ll(5,e,e.return));break;case 1:Na(t,e),wa(e),l&512&&(Vt||a===null||Dn(a,a.return)),l&64&&al&&(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(Na(t,e),wa(e),l&512&&(Vt||a===null||Dn(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[rs]||d[Mt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(l),c.head.insertBefore(d,c.querySelector("head > title"))),sa(d,l,a),d[Mt]=e,Lt(d),l=d;break e;case"link":var p=sg("link","href",c).get(l+(a.href||""));if(p){for(var T=0;T<p.length;T++)if(d=p[T],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(T,1);break t}}d=c.createElement(l),sa(d,l,a),c.head.appendChild(d);break;case"meta":if(p=sg("meta","content",c).get(l+(a.content||""))){for(T=0;T<p.length;T++)if(d=p[T],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(T,1);break t}}d=c.createElement(l),sa(d,l,a),c.head.appendChild(d);break;default:throw Error(o(468,l))}d[Mt]=e,Lt(d),l=d}e.stateNode=l}else rg(c,e.type,e.stateNode);else e.stateNode=lg(c,l,e.memoizedProps);else d!==l?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,l===null?rg(c,e.type,e.stateNode):lg(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&qd(e,e.memoizedProps,a.memoizedProps)}break;case 27:Na(t,e),wa(e),l&512&&(Vt||a===null||Dn(a,a.return)),a!==null&&l&4&&qd(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Na(t,e),wa(e),l&512&&(Vt||a===null||Dn(a,a.return)),e.flags&32){c=e.stateNode;try{cn(c,"")}catch(we){it(e,e.return,we)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,qd(e,c,a!==null?a.memoizedProps:c)),l&1024&&(Pd=!0);break;case 6:if(Na(t,e),wa(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(we){it(e,e.return,we)}}break;case 3:if(qu=null,c=gn,gn=Uu(t.containerInfo),Na(t,e),gn=c,wa(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Pr(t.containerInfo)}catch(we){it(e,e.return,we)}Pd&&(Pd=!1,r0(e));break;case 4:l=gn,gn=Uu(e.stateNode.containerInfo),Na(t,e),wa(e),gn=l;break;case 12:Na(t,e),wa(e);break;case 31:Na(t,e),wa(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,wu(e,l)));break;case 13:Na(t,e),wa(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Eu=vt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,wu(e,l)));break;case 22:c=e.memoizedState!==null;var z=a!==null&&a.memoizedState!==null,Q=al,re=Vt;if(al=Q||c,Vt=re||z,Na(t,e),Vt=re,al=Q,wa(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||z||al||Vt||Hs(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){z=a=t;try{if(d=z.stateNode,c)p=d.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{T=z.stateNode;var oe=z.memoizedProps.style,X=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;T.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(we){it(z,z.return,we)}}}else if(t.tag===6){if(a===null){z=t;try{z.stateNode.nodeValue=c?"":z.memoizedProps}catch(we){it(z,z.return,we)}}}else if(t.tag===18){if(a===null){z=t;try{var ne=z.stateNode;c?W0(ne,!0):W0(z.stateNode,!1)}catch(we){it(z,z.return,we)}}}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,wu(e,a))));break;case 19:Na(t,e),wa(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,wu(e,l)));break;case 30:break;case 21:break;default:Na(t,e),wa(e)}}function wa(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Xm(l)){a=l;break}l=l.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var c=a.stateNode,d=Vd(e);Nu(e,d,c);break;case 5:var p=a.stateNode;a.flags&32&&(cn(p,""),a.flags&=-33);var T=Vd(e);Nu(e,T,p);break;case 3:case 4:var z=a.stateNode.containerInfo,Q=Vd(e);Bd(e,Q,z);break;default:throw Error(o(161))}}catch(re){it(e,e.return,re)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function r0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;r0(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ll(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)e0(e,t.alternate,t),t=t.sibling}function Hs(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ll(4,t,t.return),Hs(t);break;case 1:Dn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Wm(t,t.return,a),Hs(t);break;case 27:Zi(t.stateNode);case 26:case 5:Dn(t,t.return),Hs(t);break;case 22:t.memoizedState===null&&Hs(t);break;case 30:Hs(t);break;default:Hs(t)}e=e.sibling}}function sl(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:sl(c,d,a),Ui(4,d);break;case 1:if(sl(c,d,a),l=d,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(Q){it(l,l.return,Q)}if(l=d,c=l.updateQueue,c!==null){var T=l.stateNode;try{var z=c.shared.hiddenCallbacks;if(z!==null)for(c.shared.hiddenCallbacks=null,c=0;c<z.length;c++)Uh(z[c],T)}catch(Q){it(l,l.return,Q)}}a&&p&64&&Im(d),Hi(d,d.return);break;case 27:Jm(d);case 26:case 5:sl(c,d,a),a&&l===null&&p&4&&Qm(d),Hi(d,d.return);break;case 12:sl(c,d,a);break;case 31:sl(c,d,a),a&&p&4&&n0(c,d);break;case 13:sl(c,d,a),a&&p&4&&l0(c,d);break;case 22:d.memoizedState===null&&sl(c,d,a),Hi(d,d.return);break;case 30:break;default:sl(c,d,a)}t=t.sibling}}function $d(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&&Si(a))}function Yd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Si(e))}function xn(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)i0(e,t,a,l),t=t.sibling}function i0(e,t,a,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:xn(e,t,a,l),c&2048&&Ui(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&&Si(e)));break;case 12:if(c&2048){xn(e,t,a,l),e=t.stateNode;try{var d=t.memoizedProps,p=d.id,T=d.onPostCommit;typeof T=="function"&&T(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(z){it(t,t.return,z)}}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):qi(e,t):d._visibility&2?xn(e,t,a,l):(d._visibility|=2,Dr(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),c&2048&&$d(p,t);break;case 24:xn(e,t,a,l),c&2048&&Yd(t.alternate,t);break;default:xn(e,t,a,l)}}function Dr(e,t,a,l,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,p=t,T=a,z=l,Q=p.flags;switch(p.tag){case 0:case 11:case 15:Dr(d,p,T,z,c),Ui(8,p);break;case 23:break;case 22:var re=p.stateNode;p.memoizedState!==null?re._visibility&2?Dr(d,p,T,z,c):qi(d,p):(re._visibility|=2,Dr(d,p,T,z,c)),c&&Q&2048&&$d(p.alternate,p);break;case 24:Dr(d,p,T,z,c),c&&Q&2048&&Yd(p.alternate,p);break;default:Dr(d,p,T,z,c)}t=t.sibling}}function qi(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:qi(a,l),c&2048&&$d(l.alternate,l);break;case 24:qi(a,l),c&2048&&Yd(l.alternate,l);break;default:qi(a,l)}t=t.sibling}}var Vi=8192;function kr(e,t,a){if(e.subtreeFlags&Vi)for(e=e.child;e!==null;)c0(e,t,a),e=e.sibling}function c0(e,t,a){switch(e.tag){case 26:kr(e,t,a),e.flags&Vi&&e.memoizedState!==null&&xy(a,gn,e.memoizedState,e.memoizedProps);break;case 5:kr(e,t,a);break;case 3:case 4:var l=gn;gn=Uu(e.stateNode.containerInfo),kr(e,t,a),gn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Vi,Vi=16777216,kr(e,t,a),Vi=l):kr(e,t,a));break;default:kr(e,t,a)}}function u0(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 Bi(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];Xt=l,d0(l,e)}u0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)o0(e),e=e.sibling}function o0(e){switch(e.tag){case 0:case 11:case 15:Bi(e),e.flags&2048&&Ll(9,e,e.return);break;case 3:Bi(e);break;case 12:Bi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Su(e)):Bi(e);break;default:Bi(e)}}function Su(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];Xt=l,d0(l,e)}u0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ll(8,t,t.return),Su(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Su(t));break;default:Su(t)}e=e.sibling}}function d0(e,t){for(;Xt!==null;){var a=Xt;switch(a.tag){case 0:case 11:case 15:Ll(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:Si(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,Xt=l;else e:for(a=e;Xt!==null;){l=Xt;var c=l.sibling,d=l.return;if(t0(l),l===a){Xt=null;break e}if(c!==null){c.return=d,Xt=c;break e}Xt=d}}}var Dv={getCacheForType:function(e){var t=na(Ut),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return na(Ut).controller.signal}},kv=typeof WeakMap=="function"?WeakMap:Map,tt=0,ft=null,Pe=null,Ze=0,rt=0,ka=null,Ul=!1,Ar=!1,Gd=!1,rl=0,Ct=0,Hl=0,qs=0,Fd=0,Aa=0,_r=0,Pi=null,Sa=null,Zd=!1,Eu=0,f0=0,Cu=1/0,Tu=null,ql=null,Ft=0,Vl=null,zr=null,il=0,Id=0,Wd=null,h0=null,$i=0,Qd=null;function _a(){return(tt&2)!==0&&Ze!==0?Ze&-Ze:$.T!==null?af():tr()}function m0(){if(Aa===0)if((Ze&536870912)===0||Y){var e=ue;ue<<=1,(ue&3932160)===0&&(ue=262144),Aa=e}else Aa=536870912;return e=Ra.current,e!==null&&(e.flags|=32),Aa}function Ea(e,t,a){(e===ft&&(rt===2||rt===9)||e.cancelPendingCommit!==null)&&(Lr(e,0),Bl(e,Ze,Aa,!1)),gl(e,a),((tt&2)===0||e!==ft)&&(e===ft&&((tt&2)===0&&(qs|=a),Ct===4&&Bl(e,Ze,Aa,!1)),kn(e))}function g0(e,t,a){if((tt&6)!==0)throw Error(o(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||ht(e,t),c=l?zv(e,t):Jd(e,t,!0),d=l;do{if(c===0){Ar&&!l&&Bl(e,t,0,!1);break}else{if(a=e.current.alternate,d&&!Av(a)){c=Jd(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 T=e;c=Pi;var z=T.current.memoizedState.isDehydrated;if(z&&(Lr(T,p).flags|=256),p=Jd(T,p,!1),p!==2){if(Gd&&!z){T.errorRecoveryDisabledLanes|=d,qs|=d,c=4;break e}d=Sa,Sa=c,d!==null&&(Sa===null?Sa=d:Sa.push.apply(Sa,d))}c=p}if(d=!1,c!==2)continue}}if(c===1){Lr(e,0),Bl(e,t,0,!0);break}e:{switch(l=e,d=c,d){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Bl(l,t,Aa,!Ul);break e;case 2:Sa=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=Eu+300-vt(),10<c)){if(Bl(l,t,Aa,!Ul),St(l,0,!0)!==0)break e;il=t,l.timeoutHandle=F0(x0.bind(null,l,a,Sa,Tu,Zd,t,Aa,qs,_r,Ul,d,"Throttled",-0,0),c);break e}x0(l,a,Sa,Tu,Zd,t,Aa,qs,_r,Ul,d,null,-0,0)}}break}while(!0);kn(e)}function x0(e,t,a,l,c,d,p,T,z,Q,re,oe,X,ne){if(e.timeoutHandle=-1,oe=t.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ya},c0(t,d,oe);var we=(d&62914560)===d?Eu-vt():(d&4194048)===d?f0-vt():0;if(we=py(oe,we),we!==null){il=d,e.cancelPendingCommit=we(S0.bind(null,e,t,d,a,l,c,p,T,z,re,oe,null,X,ne)),Bl(e,d,p,!Q);return}}S0(e,t,d,a,l,c,p,T,z)}function Av(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(!ia(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 Bl(e,t,a,l){t&=~Fd,t&=~qs,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var d=31-zt(c),p=1<<d;l[d]=-1,c&=~p}a!==0&&mt(e,a,t)}function Mu(){return(tt&6)===0?(Yi(0),!1):!0}function Xd(){if(Pe!==null){if(rt===0)var e=Pe.return;else e=Pe,Xa=Qn=null,hd(e),Cr=null,Ci=0,e=Pe;for(;e!==null;)Zm(e.alternate,e),e=e.return;Pe=null}}function Lr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Kv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),il=0,Xd(),ft=e,Pe=a=Ia(e.current,null),Ze=t,rt=0,ka=null,Ul=!1,Ar=ht(e,t),Gd=!1,_r=Aa=Fd=qs=Hl=Ct=0,Sa=Pi=null,Zd=!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-zt(l),d=1<<c;t|=e[c],l&=~d}return rl=t,Ol(),a}function p0(e,t){qe=null,$.H=_i,t===Er||t===nu?(t=Ah(),rt=3):t===td?(t=Ah(),rt=4):rt=t===Od?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ka=t,Pe===null&&(Ct=1,pu(e,ya(t,e.current)))}function v0(){var e=Ra.current;return e===null?!0:(Ze&4194048)===Ze?Ka===null:(Ze&62914560)===Ze||(Ze&536870912)!==0?e===Ka:!1}function y0(){var e=$.H;return $.H=_i,e===null?_i:e}function b0(){var e=$.A;return $.A=Dv,e}function Ou(){Ct=4,Ul||(Ze&4194048)!==Ze&&Ra.current!==null||(Ar=!0),(Hl&134217727)===0&&(qs&134217727)===0||ft===null||Bl(ft,Ze,Aa,!1)}function Jd(e,t,a){var l=tt;tt|=2;var c=y0(),d=b0();(ft!==e||Ze!==t)&&(Tu=null,Lr(e,t)),t=!1;var p=Ct;e:do try{if(rt!==0&&Pe!==null){var T=Pe,z=ka;switch(rt){case 8:Xd(),p=6;break e;case 3:case 2:case 9:case 6:Ra.current===null&&(t=!0);var Q=rt;if(rt=0,ka=null,Ur(e,T,z,Q),a&&Ar){p=0;break e}break;default:Q=rt,rt=0,ka=null,Ur(e,T,z,Q)}}_v(),p=Ct;break}catch(re){p0(e,re)}while(!0);return t&&e.shellSuspendCounter++,Xa=Qn=null,tt=l,$.H=c,$.A=d,Pe===null&&(ft=null,Ze=0,Ol()),p}function _v(){for(;Pe!==null;)j0(Pe)}function zv(e,t){var a=tt;tt|=2;var l=y0(),c=b0();ft!==e||Ze!==t?(Tu=null,Cu=vt()+500,Lr(e,t)):Ar=ht(e,t);e:do try{if(rt!==0&&Pe!==null){t=Pe;var d=ka;t:switch(rt){case 1:rt=0,ka=null,Ur(e,t,d,1);break;case 2:case 9:if(Dh(d)){rt=0,ka=null,N0(t);break}t=function(){rt!==2&&rt!==9||ft!==e||(rt=7),kn(e)},d.then(t,t);break e;case 3:rt=7;break e;case 4:rt=5;break e;case 7:Dh(d)?(rt=0,ka=null,N0(t)):(rt=0,ka=null,Ur(e,t,d,7));break;case 5:var p=null;switch(Pe.tag){case 26:p=Pe.memoizedState;case 5:case 27:var T=Pe;if(p?ig(p):T.stateNode.complete){rt=0,ka=null;var z=T.sibling;if(z!==null)Pe=z;else{var Q=T.return;Q!==null?(Pe=Q,Ru(Q)):Pe=null}break t}}rt=0,ka=null,Ur(e,t,d,5);break;case 6:rt=0,ka=null,Ur(e,t,d,6);break;case 8:Xd(),Ct=6;break e;default:throw Error(o(462))}}Lv();break}catch(re){p0(e,re)}while(!0);return Xa=Qn=null,$.H=l,$.A=c,tt=a,Pe!==null?0:(ft=null,Ze=0,Ol(),Ct)}function Lv(){for(;Pe!==null&&!$a();)j0(Pe)}function j0(e){var t=Gm(e.alternate,e,rl);e.memoizedProps=e.pendingProps,t===null?Ru(e):Pe=t}function N0(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=qm(a,t,t.pendingProps,t.type,void 0,Ze);break;case 11:t=qm(a,t,t.pendingProps,t.type.render,t.ref,Ze);break;case 5:hd(t);default:Zm(a,t),t=Pe=Kc(t,rl),t=Gm(a,t,rl)}e.memoizedProps=e.pendingProps,t===null?Ru(e):Pe=t}function Ur(e,t,a,l){Xa=Qn=null,hd(t),Cr=null,Ci=0;var c=t.return;try{if(Sv(e,c,t,a,Ze)){Ct=1,pu(e,ya(a,e.current)),Pe=null;return}}catch(d){if(c!==null)throw Pe=c,d;Ct=1,pu(e,ya(a,e.current)),Pe=null;return}t.flags&32768?(Y||l===1?e=!0:Ar||(Ze&536870912)!==0?e=!1:(Ul=e=!0,(l===2||l===9||l===3||l===6)&&(l=Ra.current,l!==null&&l.tag===13&&(l.flags|=16384))),w0(t,e)):Ru(t)}function Ru(e){var t=e;do{if((t.flags&32768)!==0){w0(t,Ul);return}e=t.return;var a=Tv(t.alternate,t,rl);if(a!==null){Pe=a;return}if(t=t.sibling,t!==null){Pe=t;return}Pe=t=e}while(t!==null);Ct===0&&(Ct=5)}function w0(e,t){do{var a=Mv(e.alternate,e);if(a!==null){a.flags&=32767,Pe=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Pe=e;return}Pe=e=a}while(e!==null);Ct=6,Pe=null}function S0(e,t,a,l,c,d,p,T,z){e.cancelPendingCommit=null;do Du();while(Ft!==0);if((tt&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(d=t.lanes|t.childLanes,d|=Ts,Ec(e,a,d,p,T,z),e===ft&&(Pe=ft=null,Ze=0),zr=t,Vl=e,il=a,Id=d,Wd=c,h0=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Vv(as,function(){return O0(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=$.T,$.T=null,c=K.p,K.p=2,p=tt,tt|=4;try{Ov(e,t,a)}finally{tt=p,K.p=c,$.T=l}}Ft=1,E0(),C0(),T0()}}function E0(){if(Ft===1){Ft=0;var e=Vl,t=zr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=$.T,$.T=null;var l=K.p;K.p=2;var c=tt;tt|=4;try{s0(t,e);var d=df,p=Wo(e.containerInfo),T=d.focusedElem,z=d.selectionRange;if(p!==T&&T&&T.ownerDocument&&Xe(T.ownerDocument.documentElement,T)){if(z!==null&&hr(T)){var Q=z.start,re=z.end;if(re===void 0&&(re=Q),"selectionStart"in T)T.selectionStart=Q,T.selectionEnd=Math.min(re,T.value.length);else{var oe=T.ownerDocument||document,X=oe&&oe.defaultView||window;if(X.getSelection){var ne=X.getSelection(),we=T.textContent.length,_e=Math.min(z.start,we),dt=z.end===void 0?_e:Math.min(z.end,we);!ne.extend&&_e>dt&&(p=dt,dt=_e,_e=p);var F=Zc(T,_e),P=Zc(T,dt);if(F&&P&&(ne.rangeCount!==1||ne.anchorNode!==F.node||ne.anchorOffset!==F.offset||ne.focusNode!==P.node||ne.focusOffset!==P.offset)){var W=oe.createRange();W.setStart(F.node,F.offset),ne.removeAllRanges(),_e>dt?(ne.addRange(W),ne.extend(P.node,P.offset)):(W.setEnd(P.node,P.offset),ne.addRange(W))}}}}for(oe=[],ne=T;ne=ne.parentNode;)ne.nodeType===1&&oe.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<oe.length;T++){var ce=oe[T];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}$u=!!of,df=of=null}finally{tt=c,K.p=l,$.T=a}}e.current=t,Ft=2}}function C0(){if(Ft===2){Ft=0;var e=Vl,t=zr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=$.T,$.T=null;var l=K.p;K.p=2;var c=tt;tt|=4;try{e0(e,t.alternate,t)}finally{tt=c,K.p=l,$.T=a}}Ft=3}}function T0(){if(Ft===4||Ft===3){Ft=0,ts();var e=Vl,t=zr,a=il,l=h0;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ft=5:(Ft=0,zr=Vl=null,M0(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(ql=null),ra(a),t=t.stateNode,$t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(gt,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=$.T,c=K.p,K.p=2,$.T=null;try{for(var d=e.onRecoverableError,p=0;p<l.length;p++){var T=l[p];d(T.value,{componentStack:T.stack})}}finally{$.T=t,K.p=c}}(il&3)!==0&&Du(),kn(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===Qd?$i++:($i=0,Qd=e):$i=0,Yi(0)}}function M0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Si(t)))}function Du(){return E0(),C0(),T0(),O0()}function O0(){if(Ft!==5)return!1;var e=Vl,t=Id;Id=0;var a=ra(il),l=$.T,c=K.p;try{K.p=32>a?32:a,$.T=null,a=Wd,Wd=null;var d=Vl,p=il;if(Ft=0,zr=Vl=null,il=0,(tt&6)!==0)throw Error(o(331));var T=tt;if(tt|=4,o0(d.current),i0(d,d.current,p,a),tt=T,Yi(0,!1),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(gt,d)}catch{}return!0}finally{K.p=c,$.T=l,M0(e,t)}}function R0(e,t,a){t=ya(a,t),t=Md(e.stateNode,t,2),e=Al(e,t,2),e!==null&&(gl(e,2),kn(e))}function it(e,t,a){if(e.tag===3)R0(e,e,a);else for(;t!==null;){if(t.tag===3){R0(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ql===null||!ql.has(l))){e=ya(a,e),a=Dm(2),l=Al(t,a,2),l!==null&&(km(a,l,t,e),gl(l,2),kn(l));break}}t=t.return}}function Kd(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new kv;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)||(Gd=!0,c.add(a),e=Uv.bind(null,e,t,a),t.then(e,e))}function Uv(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ft===e&&(Ze&a)===a&&(Ct===4||Ct===3&&(Ze&62914560)===Ze&&300>vt()-Eu?(tt&2)===0&&Lr(e,0):Fd|=a,_r===Ze&&(_r=0)),kn(e)}function D0(e,t){t===0&&(t=ls()),e=Za(e,t),e!==null&&(gl(e,t),kn(e))}function Hv(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),D0(e,a)}function qv(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(o(314))}l!==null&&l.delete(t),D0(e,a)}function Vv(e,t){return Pa(e,t)}var ku=null,Hr=null,ef=!1,Au=!1,tf=!1,Pl=0;function kn(e){e!==Hr&&e.next===null&&(Hr===null?ku=Hr=e:Hr=Hr.next=e),Au=!0,ef||(ef=!0,Pv())}function Yi(e,t){if(!tf&&Au){tf=!0;do for(var a=!1,l=ku;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var d=0;else{var p=l.suspendedLanes,T=l.pingedLanes;d=(1<<31-zt(42|e)+1)-1,d&=c&~(p&~T),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,z0(l,d))}else d=Ze,d=St(l,l===ft?d:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(d&3)===0||ht(l,d)||(a=!0,z0(l,d));l=l.next}while(a);tf=!1}}function Bv(){k0()}function k0(){Au=ef=!1;var e=0;Pl!==0&&Jv()&&(e=Pl);for(var t=vt(),a=null,l=ku;l!==null;){var c=l.next,d=A0(l,t);d===0?(l.next=null,a===null?ku=c:a.next=c,c===null&&(Hr=a)):(a=l,(e!==0||(d&3)!==0)&&(Au=!0)),l=c}Ft!==0&&Ft!==5||Yi(e),Pl!==0&&(Pl=0)}function A0(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var p=31-zt(d),T=1<<p,z=c[p];z===-1?((T&a)===0||(T&l)!==0)&&(c[p]=wn(T,t)):z<=t&&(e.expiredLanes|=T),d&=~T}if(t=ft,a=Ze,a=St(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(rt===2||rt===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&It(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ht(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&It(l),ra(a)){case 2:case 8:a=Qs;break;case 32:a=as;break;case 268435456:a=hl;break;default:a=as}return l=_0.bind(null,e),a=Pa(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&It(l),e.callbackPriority=2,e.callbackNode=null,2}function _0(e,t){if(Ft!==0&&Ft!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Du()&&e.callbackNode!==a)return null;var l=Ze;return l=St(e,e===ft?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(g0(e,l,t),A0(e,vt()),e.callbackNode!=null&&e.callbackNode===a?_0.bind(null,e):null)}function z0(e,t){if(Du())return null;g0(e,t,!0)}function Pv(){ey(function(){(tt&6)!==0?Pa(qn,Bv):k0()})}function af(){if(Pl===0){var e=wr;e===0&&(e=nn,nn<<=1,(nn&261888)===0&&(nn=256)),Pl=e}return Pl}function L0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:fs(""+e)}function U0(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=L0((c[Yt]||null).action),p=l.submitter;p&&(t=(t=p[Yt]||null)?L0(t.formAction):p.getAttribute("formAction"),t!==null&&(d=t,p=null));var T=new xs("action","action",null,l,c);e.push({event:T,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Pl!==0){var z=p?U0(c,p):new FormData(c);Nd(a,{pending:!0,data:z,method:c.method,action:d},null,z)}}else typeof d=="function"&&(T.preventDefault(),z=p?U0(c,p):new FormData(c),Nd(a,{pending:!0,data:z,method:c.method,action:d},d,z))},currentTarget:c}]})}}for(var nf=0;nf<bi.length;nf++){var lf=bi[nf],Yv=lf.toLowerCase(),Gv=lf[0].toUpperCase()+lf.slice(1);va(Yv,"on"+Gv)}va(Qc,"onAnimationEnd"),va(Xc,"onAnimationIteration"),va(xr,"onAnimationStart"),va("dblclick","onDoubleClick"),va("focusin","onFocus"),va("focusout","onBlur"),va(Qo,"onTransitionRun"),va(Xo,"onTransitionStart"),va(Jc,"onTransitionCancel"),va(vi,"onTransitionEnd"),xl("onMouseEnter",["mouseout","mouseover"]),xl("onMouseLeave",["mouseout","mouseover"]),xl("onPointerEnter",["pointerout","pointerover"]),xl("onPointerLeave",["pointerout","pointerover"]),Sn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Sn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Sn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Sn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Sn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Sn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gi="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(" "),Fv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Gi));function H0(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 T=l[p],z=T.instance,Q=T.currentTarget;if(T=T.listener,z!==d&&c.isPropagationStopped())break e;d=T,c.currentTarget=Q;try{d(c)}catch(re){Ml(re)}c.currentTarget=null,d=z}else for(p=0;p<l.length;p++){if(T=l[p],z=T.instance,Q=T.currentTarget,T=T.listener,z!==d&&c.isPropagationStopped())break e;d=T,c.currentTarget=Q;try{d(c)}catch(re){Ml(re)}c.currentTarget=null,d=z}}}}function $e(e,t){var a=t[ss];a===void 0&&(a=t[ss]=new Set);var l=e+"__bubble";a.has(l)||(q0(t,e,2,!1),a.add(l))}function sf(e,t,a){var l=0;t&&(l|=4),q0(a,e,l,t)}var _u="_reactListening"+Math.random().toString(36).slice(2);function rf(e){if(!e[_u]){e[_u]=!0,Oc.forEach(function(a){a!=="selectionchange"&&(Fv.has(a)||sf(a,!1,e),sf(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_u]||(t[_u]=!0,sf("selectionchange",!1,t))}}function q0(e,t,a,l){switch(mg(t)){case 2:var c=by;break;case 8:c=jy;break;default:c=Nf}a=c.bind(null,t,a,e),c=void 0,!ui||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 cf(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 T=l.stateNode.containerInfo;if(T===c)break;if(p===4)for(p=l.return;p!==null;){var z=p.tag;if((z===3||z===4)&&p.stateNode.containerInfo===c)return;p=p.return}for(;T!==null;){if(p=Bn(T),p===null)return;if(z=p.tag,z===5||z===6||z===26||z===27){l=d=p;continue e}T=T.parentNode}}l=l.return}ci(function(){var Q=d,re=ir(a),oe=[];e:{var X=yi.get(e);if(X!==void 0){var ne=xs,we=e;switch(e){case"keypress":if(gs(a)===0)break e;case"keydown":case"keyup":ne=zo;break;case"focusin":we="focus",ne=fr;break;case"focusout":we="blur",ne=fr;break;case"beforeblur":case"afterblur":ne=fr;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":ne=zc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=Co;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=Ho;break;case Qc:case Xc:case xr:ne=bl;break;case vi:ne=qo;break;case"scroll":case"scrollend":ne=oi;break;case"wheel":ne=Bo;break;case"copy":case"cut":case"paste":ne=jl;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=Lc;break;case"toggle":case"beforetoggle":ne=$o}var _e=(t&4)!==0,dt=!_e&&(e==="scroll"||e==="scrollend"),F=_e?X!==null?X+"Capture":null:X;_e=[];for(var P=Q,W;P!==null;){var ce=P;if(W=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||W===null||F===null||(ce=hs(P,F),ce!=null&&_e.push(Fi(P,ce,W))),dt)break;P=P.return}0<_e.length&&(X=new ne(X,we,null,a,re),oe.push({event:X,listeners:_e}))}}if((t&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",ne=e==="mouseout"||e==="pointerout",X&&a!==ri&&(we=a.relatedTarget||a.fromElement)&&(Bn(we)||we[Vn]))break e;if((ne||X)&&(X=re.window===re?re:(X=re.ownerDocument)?X.defaultView||X.parentWindow:window,ne?(we=a.relatedTarget||a.toElement,ne=Q,we=we?Bn(we):null,we!==null&&(dt=f(we),_e=we.tag,we!==dt||_e!==5&&_e!==27&&_e!==6)&&(we=null)):(ne=null,we=Q),ne!==we)){if(_e=zc,ce="onMouseLeave",F="onMouseEnter",P="mouse",(e==="pointerout"||e==="pointerover")&&(_e=Lc,ce="onPointerLeave",F="onPointerEnter",P="pointer"),dt=ne==null?X:xa(ne),W=we==null?X:xa(we),X=new _e(ce,P+"leave",ne,a,re),X.target=dt,X.relatedTarget=W,ce=null,Bn(re)===Q&&(_e=new _e(F,P+"enter",we,a,re),_e.target=W,_e.relatedTarget=dt,ce=_e),dt=ce,ne&&we)t:{for(_e=Zv,F=ne,P=we,W=0,ce=F;ce;ce=_e(ce))W++;ce=0;for(var De=P;De;De=_e(De))ce++;for(;0<W-ce;)F=_e(F),W--;for(;0<ce-W;)P=_e(P),ce--;for(;W--;){if(F===P||P!==null&&F===P.alternate){_e=F;break t}F=_e(F),P=_e(P)}_e=null}else _e=null;ne!==null&&V0(oe,X,ne,_e,!1),we!==null&&dt!==null&&V0(oe,dt,we,_e,!0)}}e:{if(X=Q?xa(Q):window,ne=X.nodeName&&X.nodeName.toLowerCase(),ne==="select"||ne==="input"&&X.type==="file")var Je=Gc;else if(Yc(X))if(Mn)Je=xt;else{Je=El;var Ee=Ge}else ne=X.nodeName,!ne||ne.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Q&&rr(Q.elementType)&&(Je=Gc):Je=Io;if(Je&&(Je=Je(e,Q))){fi(oe,Je,a,re);break e}Ee&&Ee(e,X,Q),e==="focusout"&&Q&&X.type==="number"&&Q.memoizedProps.value!=null&&cs(X,"number",X.value)}switch(Ee=Q?xa(Q):window,e){case"focusin":(Yc(Ee)||Ee.contentEditable==="true")&&(Cl=Ee,mr=Q,ta=null);break;case"focusout":ta=mr=Cl=null;break;case"mousedown":gr=!0;break;case"contextmenu":case"mouseup":case"dragend":gr=!1,Cs(oe,a,re);break;case"selectionchange":if(Ic)break;case"keydown":case"keyup":Cs(oe,a,re)}var Ve;if(di)e:{switch(e){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else wl?Pc(e,a)&&(Ie="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ie="onCompositionStart");Ie&&(qc&&a.locale!=="ko"&&(wl||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&wl&&(Ve=Gt()):(Cn=re,cr="value"in Cn?Cn.value:Cn.textContent,wl=!0)),Ee=zu(Q,Ie),0<Ee.length&&(Ie=new Nl(Ie,e,null,a,re),oe.push({event:Ie,listeners:Ee}),Ve?Ie.data=Ve:(Ve=$c(a),Ve!==null&&(Ie.data=Ve)))),(Ve=Yo?Go(e,a):Fo(e,a))&&(Ie=zu(Q,"onBeforeInput"),0<Ie.length&&(Ee=new Nl("onBeforeInput","beforeinput",null,a,re),oe.push({event:Ee,listeners:Ie}),Ee.data=Ve)),$v(oe,e,Q,a,re)}H0(oe,t)})}function Fi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function zu(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=hs(e,a),c!=null&&l.unshift(Fi(e,c,d)),c=hs(e,t),c!=null&&l.push(Fi(e,c,d))),e.tag===3)return l;e=e.return}return[]}function Zv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function V0(e,t,a,l,c){for(var d=t._reactName,p=[];a!==null&&a!==l;){var T=a,z=T.alternate,Q=T.stateNode;if(T=T.tag,z!==null&&z===l)break;T!==5&&T!==26&&T!==27||Q===null||(z=Q,c?(Q=hs(a,d),Q!=null&&p.unshift(Fi(a,Q,z))):c||(Q=hs(a,d),Q!=null&&p.push(Fi(a,Q,z)))),a=a.return}p.length!==0&&e.push({event:t,listeners:p})}var Iv=/\r\n?/g,Wv=/\u0000|\uFFFD/g;function B0(e){return(typeof e=="string"?e:""+e).replace(Iv,`
|
|
49
|
+
`).replace(Wv,"")}function P0(e,t){return t=B0(t),B0(e)===t}function ot(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":nr(e,"class",l);break;case"tabIndex":nr(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":nr(e,a,l);break;case"style":kc(e,l,d);break;case"data":if(t!=="object"){nr(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=fs(""+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"&&ot(e,t,"name",c.name,c,null),ot(e,t,"formEncType",c.formEncType,c,null),ot(e,t,"formMethod",c.formMethod,c,null),ot(e,t,"formTarget",c.formTarget,c,null)):(ot(e,t,"encType",c.encType,c,null),ot(e,t,"method",c.method,c,null),ot(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=fs(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Ya);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(o(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(o(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=fs(""+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),Kt(e,"popover",l);break;case"xlinkActuate":st(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":st(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":st(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":st(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":st(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":st(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":st(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":st(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":st(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Kt(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=So.get(a)||a,Kt(e,a,l))}}function uf(e,t,a,l,c,d){switch(a){case"style":kc(e,l,d);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(o(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=Ya);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ai.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[Yt]||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,""):Kt(e,a,l)}}}function sa(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(o(137,t));default:ot(e,t,d,p,a,null)}}c&&ot(e,t,"srcSet",a.srcSet,a,null),l&&ot(e,t,"src",a.src,a,null);return;case"input":$e("invalid",e);var T=d=p=c=null,z=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":z=re;break;case"defaultChecked":Q=re;break;case"value":d=re;break;case"defaultValue":T=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(o(137,t));break;default:ot(e,t,l,re,a,null)}}vl(e,d,T,z,Q,p,c,!1);return;case"select":$e("invalid",e),l=p=d=null;for(c in a)if(a.hasOwnProperty(c)&&(T=a[c],T!=null))switch(c){case"value":d=T;break;case"defaultValue":p=T;break;case"multiple":l=T;default:ot(e,t,c,T,a,null)}t=d,a=p,e.multiple=!!l,t!=null?$n(e,!!l,t,!1):a!=null&&$n(e,!!l,a,!0);return;case"textarea":$e("invalid",e),d=c=l=null;for(p in a)if(a.hasOwnProperty(p)&&(T=a[p],T!=null))switch(p){case"value":l=T;break;case"defaultValue":c=T;break;case"children":d=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(o(91));break;default:ot(e,t,p,T,a,null)}si(e,l,c,d);return;case"option":for(z in a)if(a.hasOwnProperty(z)&&(l=a[z],l!=null))switch(z){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:ot(e,t,z,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<Gi.length;l++)$e(Gi[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(o(137,t));default:ot(e,t,Q,l,a,null)}return;default:if(rr(t)){for(re in a)a.hasOwnProperty(re)&&(l=a[re],l!==void 0&&uf(e,t,re,l,a,void 0));return}}for(T in a)a.hasOwnProperty(T)&&(l=a[T],l!=null&&ot(e,t,T,l,a,null))}function Qv(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,T=null,z=null,Q=null,re=null;for(ne in a){var oe=a[ne];if(a.hasOwnProperty(ne)&&oe!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":z=oe;default:l.hasOwnProperty(ne)||ot(e,t,ne,null,l,oe)}}for(var X in l){var ne=l[X];if(oe=a[X],l.hasOwnProperty(X)&&(ne!=null||oe!=null))switch(X){case"type":d=ne;break;case"name":c=ne;break;case"checked":Q=ne;break;case"defaultChecked":re=ne;break;case"value":p=ne;break;case"defaultValue":T=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(o(137,t));break;default:ne!==oe&&ot(e,t,X,ne,l,oe)}}sr(e,p,T,z,Q,re,d,c);return;case"select":ne=p=T=X=null;for(d in a)if(z=a[d],a.hasOwnProperty(d)&&z!=null)switch(d){case"value":break;case"multiple":ne=z;default:l.hasOwnProperty(d)||ot(e,t,d,null,l,z)}for(c in l)if(d=l[c],z=a[c],l.hasOwnProperty(c)&&(d!=null||z!=null))switch(c){case"value":X=d;break;case"defaultValue":T=d;break;case"multiple":p=d;default:d!==z&&ot(e,t,c,d,l,z)}t=T,a=p,l=ne,X!=null?$n(e,!!a,X,!1):!!l!=!!a&&(t!=null?$n(e,!!a,t,!0):$n(e,!!a,a?[]:"",!1));return;case"textarea":ne=X=null;for(T in a)if(c=a[T],a.hasOwnProperty(T)&&c!=null&&!l.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:ot(e,t,T,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":ne=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==d&&ot(e,t,p,c,l,d)}us(e,X,ne);return;case"option":for(var we in a)if(X=a[we],a.hasOwnProperty(we)&&X!=null&&!l.hasOwnProperty(we))switch(we){case"selected":e.selected=!1;break;default:ot(e,t,we,null,l,X)}for(z in l)if(X=l[z],ne=a[z],l.hasOwnProperty(z)&&X!==ne&&(X!=null||ne!=null))switch(z){case"selected":e.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:ot(e,t,z,X,l,ne)}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 _e in a)X=a[_e],a.hasOwnProperty(_e)&&X!=null&&!l.hasOwnProperty(_e)&&ot(e,t,_e,null,l,X);for(Q in l)if(X=l[Q],ne=a[Q],l.hasOwnProperty(Q)&&X!==ne&&(X!=null||ne!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(o(137,t));break;default:ot(e,t,Q,X,l,ne)}return;default:if(rr(t)){for(var dt in a)X=a[dt],a.hasOwnProperty(dt)&&X!==void 0&&!l.hasOwnProperty(dt)&&uf(e,t,dt,void 0,l,X);for(re in l)X=l[re],ne=a[re],!l.hasOwnProperty(re)||X===ne||X===void 0&&ne===void 0||uf(e,t,re,X,l,ne);return}}for(var F in a)X=a[F],a.hasOwnProperty(F)&&X!=null&&!l.hasOwnProperty(F)&&ot(e,t,F,null,l,X);for(oe in l)X=l[oe],ne=a[oe],!l.hasOwnProperty(oe)||X===ne||X==null&&ne==null||ot(e,t,oe,X,l,ne)}function $0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Xv(){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,T=c.duration;if(d&&T&&$0(p)){for(p=0,T=c.responseEnd,l+=1;l<a.length;l++){var z=a[l],Q=z.startTime;if(Q>T)break;var re=z.transferSize,oe=z.initiatorType;re&&$0(oe)&&(z=z.responseEnd,p+=re*(z<T?1:(T-Q)/(z-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 of=null,df=null;function Lu(e){return e.nodeType===9?e:e.ownerDocument}function Y0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function G0(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 ff(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 hf=null;function Jv(){var e=window.event;return e&&e.type==="popstate"?e===hf?!1:(hf=e,!0):(hf=null,!1)}var F0=typeof setTimeout=="function"?setTimeout:void 0,Kv=typeof clearTimeout=="function"?clearTimeout:void 0,Z0=typeof Promise=="function"?Promise:void 0,ey=typeof queueMicrotask=="function"?queueMicrotask:typeof Z0<"u"?function(e){return Z0.resolve(null).then(e).catch(ty)}:F0;function ty(e){setTimeout(function(){throw e})}function $l(e){return e==="head"}function I0(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),Pr(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Zi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Zi(a);for(var d=a.firstChild;d;){var p=d.nextSibling,T=d.nodeName;d[rs]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=p}}else a==="body"&&Zi(e.ownerDocument.body);a=c}while(a);Pr(t)}function W0(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 mf(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":mf(a),ar(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function ay(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[rs])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=en(e.nextSibling),e===null)break}return null}function ny(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=en(e.nextSibling),e===null))return null;return e}function Q0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=en(e.nextSibling),e===null))return null;return e}function gf(e){return e.data==="$?"||e.data==="$~"}function xf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ly(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 en(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 pf=null;function X0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return en(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function J0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function K0(e,t,a){switch(t=Lu(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Zi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ar(e)}var tn=new Map,eg=new Set;function Uu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var cl=K.d;K.d={f:sy,r:ry,D:iy,C:cy,L:uy,m:oy,X:fy,S:dy,M:hy};function sy(){var e=cl.f(),t=Mu();return e||t}function ry(e){var t=ke(e);t!==null&&t.tag===5&&t.type==="form"?pm(t):cl.r(e)}var qr=typeof document>"u"?null:document;function tg(e,t,a){var l=qr;if(l&&typeof t=="string"&&t){var c=ea(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),eg.has(c)||(eg.add(c),e={rel:e,crossOrigin:a,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),sa(t,"link",e),Lt(t),l.head.appendChild(t)))}}function iy(e){cl.D(e),tg("dns-prefetch",e,null)}function cy(e,t){cl.C(e,t),tg("preconnect",e,t)}function uy(e,t,a){cl.L(e,t,a);var l=qr;if(l&&e&&t){var c='link[rel="preload"][as="'+ea(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+ea(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+ea(a.imageSizes)+'"]')):c+='[href="'+ea(e)+'"]';var d=c;switch(t){case"style":d=Vr(e);break;case"script":d=Br(e)}tn.has(d)||(e=M({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),tn.set(d,e),l.querySelector(c)!==null||t==="style"&&l.querySelector(Ii(d))||t==="script"&&l.querySelector(Wi(d))||(t=l.createElement("link"),sa(t,"link",e),Lt(t),l.head.appendChild(t)))}}function oy(e,t){cl.m(e,t);var a=qr;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+ea(l)+'"][href="'+ea(e)+'"]',d=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Br(e)}if(!tn.has(d)&&(e=M({rel:"modulepreload",href:e},t),tn.set(d,e),a.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Wi(d)))return}l=a.createElement("link"),sa(l,"link",e),Lt(l),a.head.appendChild(l)}}}function dy(e,t,a){cl.S(e,t,a);var l=qr;if(l&&e){var c=sn(l).hoistableStyles,d=Vr(e);t=t||"default";var p=c.get(d);if(!p){var T={loading:0,preload:null};if(p=l.querySelector(Ii(d)))T.loading=5;else{e=M({rel:"stylesheet",href:e,"data-precedence":t},a),(a=tn.get(d))&&vf(e,a);var z=p=l.createElement("link");Lt(z),sa(z,"link",e),z._p=new Promise(function(Q,re){z.onload=Q,z.onerror=re}),z.addEventListener("load",function(){T.loading|=1}),z.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Hu(p,t,l)}p={type:"stylesheet",instance:p,count:1,state:T},c.set(d,p)}}}function fy(e,t){cl.X(e,t);var a=qr;if(a&&e){var l=sn(a).hoistableScripts,c=Br(e),d=l.get(c);d||(d=a.querySelector(Wi(c)),d||(e=M({src:e,async:!0},t),(t=tn.get(c))&&yf(e,t),d=a.createElement("script"),Lt(d),sa(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(c,d))}}function hy(e,t){cl.M(e,t);var a=qr;if(a&&e){var l=sn(a).hoistableScripts,c=Br(e),d=l.get(c);d||(d=a.querySelector(Wi(c)),d||(e=M({src:e,async:!0,type:"module"},t),(t=tn.get(c))&&yf(e,t),d=a.createElement("script"),Lt(d),sa(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(c,d))}}function ag(e,t,a,l){var c=(c=xe.current)?Uu(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Vr(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=Vr(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(Ii(e)))&&!d._p&&(p.instance=d,p.state.loading=5),tn.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},tn.set(e,a),d||my(c,e,a,p.state))),t&&l===null)throw Error(o(528,""));return p}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Br(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(o(444,e))}}function Vr(e){return'href="'+ea(e)+'"'}function Ii(e){return'link[rel="stylesheet"]['+e+"]"}function ng(e){return M({},e,{"data-precedence":e.precedence,precedence:null})}function my(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}),sa(t,"link",a),Lt(t),e.head.appendChild(t))}function Br(e){return'[src="'+ea(e)+'"]'}function Wi(e){return"script[async]"+e}function lg(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+ea(a.href)+'"]');if(l)return t.instance=l,Lt(l),l;var c=M({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Lt(l),sa(l,"style",c),Hu(l,a.precedence,e),t.instance=l;case"stylesheet":c=Vr(a.href);var d=e.querySelector(Ii(c));if(d)return t.state.loading|=4,t.instance=d,Lt(d),d;l=ng(a),(c=tn.get(c))&&vf(l,c),d=(e.ownerDocument||e).createElement("link"),Lt(d);var p=d;return p._p=new Promise(function(T,z){p.onload=T,p.onerror=z}),sa(d,"link",l),t.state.loading|=4,Hu(d,a.precedence,e),t.instance=d;case"script":return d=Br(a.src),(c=e.querySelector(Wi(d)))?(t.instance=c,Lt(c),c):(l=a,(c=tn.get(d))&&(l=M({},a),yf(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),Lt(c),sa(c,"link",l),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Hu(l,a.precedence,e));return t.instance}function Hu(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 T=l[p];if(T.dataset.precedence===t)d=T;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 vf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function yf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var qu=null;function sg(e,t,a){if(qu===null){var l=new Map,c=qu=new Map;c.set(a,l)}else c=qu,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[rs]||d[Mt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var p=d.getAttribute(t)||"";p=e+p;var T=l.get(p);T?T.push(d):l.set(p,[d])}}return l}function rg(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function gy(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 ig(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function xy(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=Vr(l.href),d=t.querySelector(Ii(c));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Vu.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=d,Lt(d);return}d=t.ownerDocument||t,l=ng(l),(c=tn.get(c))&&vf(l,c),d=d.createElement("link"),Lt(d);var p=d;p._p=new Promise(function(T,z){p.onload=T,p.onerror=z}),sa(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=Vu.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var bf=0;function py(e,t){return e.stylesheets&&e.count===0&&Pu(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Pu(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&bf===0&&(bf=62500*Xv());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Pu(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>bf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function Vu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Pu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Bu=null;function Pu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Bu=new Map,t.forEach(vy,e),Bu=null,Vu.call(e))}function vy(e,t){if(!(t.state.loading&4)){var a=Bu.get(e);if(a)var l=a.get(null);else{a=new Map,Bu.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=Vu.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 Qi={$$typeof:J,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function yy(e,t,a,l,c,d,p,T,z){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=Ks(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ks(0),this.hiddenUpdates=Ks(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function cg(e,t,a,l,c,d,p,T,z,Q,re,oe){return e=new yy(e,t,a,p,z,Q,re,oe,T),t=1,d===!0&&(t|=24),d=aa(3,null,null,t),e.current=d,d.stateNode=e,t=Jo(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:l,isDehydrated:a,cache:t},ad(d),e}function ug(e){return e?(e=Oa,e):Oa}function og(e,t,a,l,c,d){c=ug(c),l.context===null?l.context=c:l.pendingContext=c,l=kl(t),l.payload={element:a},d=d===void 0?null:d,d!==null&&(l.callback=d),a=Al(e,l,t),a!==null&&(Ea(a,e,t),Mi(a,e,t))}function dg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function jf(e,t){dg(e,t),(e=e.alternate)&&dg(e,t)}function fg(e){if(e.tag===13||e.tag===31){var t=Za(e,67108864);t!==null&&Ea(t,e,67108864),jf(e,67108864)}}function hg(e){if(e.tag===13||e.tag===31){var t=_a();t=er(t);var a=Za(e,t);a!==null&&Ea(a,e,t),jf(e,t)}}var $u=!0;function by(e,t,a,l){var c=$.T;$.T=null;var d=K.p;try{K.p=2,Nf(e,t,a,l)}finally{K.p=d,$.T=c}}function jy(e,t,a,l){var c=$.T;$.T=null;var d=K.p;try{K.p=8,Nf(e,t,a,l)}finally{K.p=d,$.T=c}}function Nf(e,t,a,l){if($u){var c=wf(l);if(c===null)cf(e,t,l,Yu,a),gg(e,l);else if(wy(c,e,t,a,l))l.stopPropagation();else if(gg(e,l),t&4&&-1<Ny.indexOf(e)){for(;c!==null;){var d=ke(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var p=Be(d.pendingLanes);if(p!==0){var T=d;for(T.pendingLanes|=2,T.entangledLanes|=2;p;){var z=1<<31-zt(p);T.entanglements[1]|=z,p&=~z}kn(d),(tt&6)===0&&(Cu=vt()+500,Yi(0))}}break;case 31:case 13:T=Za(d,2),T!==null&&Ea(T,d,2),Mu(),jf(d,2)}if(d=wf(l),d===null&&cf(e,t,l,Yu,a),d===c)break;c=d}c!==null&&l.stopPropagation()}else cf(e,t,l,null,a)}}function wf(e){return e=ir(e),Sf(e)}var Yu=null;function Sf(e){if(Yu=null,e=Bn(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=j(t),e!==null)return e;e=null}else if(a===31){if(e=b(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 Yu=e,null}function mg(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(Jt()){case qn:return 2;case Qs:return 8;case as:case Kr:return 32;case hl:return 268435456;default:return 32}default:return 32}}var Ef=!1,Yl=null,Gl=null,Fl=null,Xi=new Map,Ji=new Map,Zl=[],Ny="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 gg(e,t){switch(e){case"focusin":case"focusout":Yl=null;break;case"dragenter":case"dragleave":Gl=null;break;case"mouseover":case"mouseout":Fl=null;break;case"pointerover":case"pointerout":Xi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ji.delete(t.pointerId)}}function Ki(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=ke(t),t!==null&&fg(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function wy(e,t,a,l,c){switch(t){case"focusin":return Yl=Ki(Yl,e,t,a,l,c),!0;case"dragenter":return Gl=Ki(Gl,e,t,a,l,c),!0;case"mouseover":return Fl=Ki(Fl,e,t,a,l,c),!0;case"pointerover":var d=c.pointerId;return Xi.set(d,Ki(Xi.get(d)||null,e,t,a,l,c)),!0;case"gotpointercapture":return d=c.pointerId,Ji.set(d,Ki(Ji.get(d)||null,e,t,a,l,c)),!0}return!1}function xg(e){var t=Bn(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=j(a),t!==null){e.blockedOn=t,ti(e.priority,function(){hg(a)});return}}else if(t===31){if(t=b(a),t!==null){e.blockedOn=t,ti(e.priority,function(){hg(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 Gu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=wf(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);ri=l,a.target.dispatchEvent(l),ri=null}else return t=ke(a),t!==null&&fg(t),e.blockedOn=a,!1;t.shift()}return!0}function pg(e,t,a){Gu(e)&&a.delete(t)}function Sy(){Ef=!1,Yl!==null&&Gu(Yl)&&(Yl=null),Gl!==null&&Gu(Gl)&&(Gl=null),Fl!==null&&Gu(Fl)&&(Fl=null),Xi.forEach(pg),Ji.forEach(pg)}function Fu(e,t){e.blockedOn===t&&(e.blockedOn=null,Ef||(Ef=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Sy)))}var Zu=null;function vg(e){Zu!==e&&(Zu=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Zu===e&&(Zu=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(Sf(l||a)===null)continue;break}var d=ke(a);d!==null&&(e.splice(t,3),t-=3,Nd(d,{pending:!0,data:c,method:a.method,action:l},l,c))}}))}function Pr(e){function t(z){return Fu(z,e)}Yl!==null&&Fu(Yl,e),Gl!==null&&Fu(Gl,e),Fl!==null&&Fu(Fl,e),Xi.forEach(t),Ji.forEach(t);for(var a=0;a<Zl.length;a++){var l=Zl[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Zl.length&&(a=Zl[0],a.blockedOn===null);)xg(a),a.blockedOn===null&&Zl.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[Yt]||null;if(typeof d=="function")p||vg(a);else if(p){var T=null;if(d&&d.hasAttribute("formAction")){if(c=d,p=d[Yt]||null)T=p.formAction;else if(Sf(c)!==null)continue}else T=p.action;typeof T=="function"?a[l+1]=T:(a.splice(l,3),l-=3),vg(a)}}}function yg(){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 Cf(e){this._internalRoot=e}Iu.prototype.render=Cf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,l=_a();og(a,l,e,t,null,null)},Iu.prototype.unmount=Cf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;og(e.current,2,null,e,null,null),Mu(),t[Vn]=null}};function Iu(e){this._internalRoot=e}Iu.prototype.unstable_scheduleHydration=function(e){if(e){var t=tr();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Zl.length&&t!==0&&t<Zl[a].priority;a++);Zl.splice(a,0,e),a===0&&xg(e)}};var bg=r.version;if(bg!=="19.2.4")throw Error(o(527,bg,"19.2.4"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=x(t),e=e!==null?E(e):null,e=e===null?null:e.stateNode,e};var Ey={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Wu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wu.isDisabled&&Wu.supportsFiber)try{gt=Wu.inject(Ey),$t=Wu}catch{}}return tc.createRoot=function(e,t){if(!h(e))throw Error(o(299));var a=!1,l="",c=Tm,d=Mm,p=Om;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=cg(e,1,!1,null,null,a,l,null,c,d,p,yg),e[Vn]=t.current,rf(e),new Cf(t)},tc.hydrateRoot=function(e,t,a){if(!h(e))throw Error(o(299));var l=!1,c="",d=Tm,p=Mm,T=Om,z=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&&(T=a.onRecoverableError),a.formState!==void 0&&(z=a.formState)),t=cg(e,1,!0,t,a??null,l,c,z,d,p,T,yg),t.context=ug(null),a=t.current,l=_a(),l=er(l),c=kl(l),c.callback=null,Al(a,c,l),a=l,t.current.lanes=a,gl(t,a),kn(t),e[Vn]=t.current,rf(e),new Iu(t)},tc.version="19.2.4",tc}var kg;function Uy(){if(kg)return Rf.exports;kg=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(),Rf.exports=Ly(),Rf.exports}var Hy=Uy();const qy=nh(Hy);/**
|
|
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 Ag="popstate";function Vy(n={}){function r(h,f){let{pathname:j="/",search:b="",hash:y=""}=Zs(h.location.hash.substring(1));return!j.startsWith("/")&&!j.startsWith(".")&&(j="/"+j),Gf("",{pathname:j,search:b,hash:y},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function u(h,f){let j=h.document.querySelector("base"),b="";if(j&&j.getAttribute("href")){let y=h.location.href,x=y.indexOf("#");b=x===-1?y:y.slice(0,x)}return b+"#"+(typeof f=="string"?f:xc(f))}function o(h,f){an(h.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return Py(r,u,o,n)}function bt(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function an(n,r){if(!n){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function By(){return Math.random().toString(36).substring(2,10)}function _g(n,r){return{usr:n.state,key:n.key,idx:r}}function Gf(n,r,u=null,o){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof r=="string"?Zs(r):r,state:u,key:r&&r.key||o||By()}}function xc({pathname:n="/",search:r="",hash:u=""}){return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),u&&u!=="#"&&(n+=u.charAt(0)==="#"?u:"#"+u),n}function Zs(n){let r={};if(n){let u=n.indexOf("#");u>=0&&(r.hash=n.substring(u),n=n.substring(0,u));let o=n.indexOf("?");o>=0&&(r.search=n.substring(o),n=n.substring(0,o)),n&&(r.pathname=n)}return r}function Py(n,r,u,o={}){let{window:h=document.defaultView,v5Compat:f=!1}=o,j=h.history,b="POP",y=null,x=E();x==null&&(x=0,j.replaceState({...j.state,idx:x},""));function E(){return(j.state||{idx:null}).idx}function M(){b="POP";let R=E(),I=R==null?null:R-x;x=R,y&&y({action:b,location:O.location,delta:I})}function D(R,I){b="PUSH";let U=Gf(O.location,R,I);u&&u(U,R),x=E()+1;let J=_g(U,x),k=O.createHref(U);try{j.pushState(J,"",k)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;h.location.assign(k)}f&&y&&y({action:b,location:O.location,delta:1})}function _(R,I){b="REPLACE";let U=Gf(O.location,R,I);u&&u(U,R),x=E();let J=_g(U,x),k=O.createHref(U);j.replaceState(J,"",k),f&&y&&y({action:b,location:O.location,delta:0})}function N(R){return $y(R)}let O={get action(){return b},get location(){return n(h,j)},listen(R){if(y)throw new Error("A history only accepts one active listener");return h.addEventListener(Ag,M),y=R,()=>{h.removeEventListener(Ag,M),y=null}},createHref(R){return r(h,R)},createURL:N,encodeLocation(R){let I=N(R);return{pathname:I.pathname,search:I.search,hash:I.hash}},push:D,replace:_,go(R){return j.go(R)}};return O}function $y(n,r=!1){let u="http://localhost";typeof window<"u"&&(u=window.location.origin!=="null"?window.location.origin:window.location.href),bt(u,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:xc(n);return o=o.replace(/ $/,"%20"),!r&&o.startsWith("//")&&(o=u+o),new URL(o,u)}function Gx(n,r,u="/"){return Yy(n,r,u,!1)}function Yy(n,r,u,o){let h=typeof r=="string"?Zs(r):r,f=fl(h.pathname||"/",u);if(f==null)return null;let j=Fx(n);Gy(j);let b=null;for(let y=0;b==null&&y<j.length;++y){let x=ab(f);b=eb(j[y],x,o)}return b}function Fx(n,r=[],u=[],o="",h=!1){let f=(j,b,y=h,x)=>{let E={relativePath:x===void 0?j.path||"":x,caseSensitive:j.caseSensitive===!0,childrenIndex:b,route:j};if(E.relativePath.startsWith("/")){if(!E.relativePath.startsWith(o)&&y)return;bt(E.relativePath.startsWith(o),`Absolute route path "${E.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),E.relativePath=E.relativePath.slice(o.length)}let M=dl([o,E.relativePath]),D=u.concat(E);j.children&&j.children.length>0&&(bt(j.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${M}".`),Fx(j.children,r,D,M,y)),!(j.path==null&&!j.index)&&r.push({path:M,score:Jy(M,j.index),routesMeta:D})};return n.forEach((j,b)=>{var y;if(j.path===""||!((y=j.path)!=null&&y.includes("?")))f(j,b);else for(let x of Zx(j.path))f(j,b,!0,x)}),r}function Zx(n){let r=n.split("/");if(r.length===0)return[];let[u,...o]=r,h=u.endsWith("?"),f=u.replace(/\?$/,"");if(o.length===0)return h?[f,""]:[f];let j=Zx(o.join("/")),b=[];return b.push(...j.map(y=>y===""?f:[f,y].join("/"))),h&&b.push(...j),b.map(y=>n.startsWith("/")&&y===""?"/":y)}function Gy(n){n.sort((r,u)=>r.score!==u.score?u.score-r.score:Ky(r.routesMeta.map(o=>o.childrenIndex),u.routesMeta.map(o=>o.childrenIndex)))}var Fy=/^:[\w-]+$/,Zy=3,Iy=2,Wy=1,Qy=10,Xy=-2,zg=n=>n==="*";function Jy(n,r){let u=n.split("/"),o=u.length;return u.some(zg)&&(o+=Xy),r&&(o+=Iy),u.filter(h=>!zg(h)).reduce((h,f)=>h+(Fy.test(f)?Zy:f===""?Wy:Qy),o)}function Ky(n,r){return n.length===r.length&&n.slice(0,-1).every((o,h)=>o===r[h])?n[n.length-1]-r[r.length-1]:0}function eb(n,r,u=!1){let{routesMeta:o}=n,h={},f="/",j=[];for(let b=0;b<o.length;++b){let y=o[b],x=b===o.length-1,E=f==="/"?r:r.slice(f.length)||"/",M=co({path:y.relativePath,caseSensitive:y.caseSensitive,end:x},E),D=y.route;if(!M&&x&&u&&!o[o.length-1].route.index&&(M=co({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},E)),!M)return null;Object.assign(h,M.params),j.push({params:h,pathname:dl([f,M.pathname]),pathnameBase:rb(dl([f,M.pathnameBase])),route:D}),M.pathnameBase!=="/"&&(f=dl([f,M.pathnameBase]))}return j}function co(n,r){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[u,o]=tb(n.path,n.caseSensitive,n.end),h=r.match(u);if(!h)return null;let f=h[0],j=f.replace(/(.)\/+$/,"$1"),b=h.slice(1);return{params:o.reduce((x,{paramName:E,isOptional:M},D)=>{if(E==="*"){let N=b[D]||"";j=f.slice(0,f.length-N.length).replace(/(.)\/+$/,"$1")}const _=b[D];return M&&!_?x[E]=void 0:x[E]=(_||"").replace(/%2F/g,"/"),x},{}),pathname:f,pathnameBase:j,pattern:n}}function tb(n,r=!1,u=!0){an(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 o=[],h="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(j,b,y)=>(o.push({paramName:b,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),h+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):u?h+="\\/*$":n!==""&&n!=="/"&&(h+="(?:(?=\\/|$))"),[new RegExp(h,r?void 0:"i"),o]}function ab(n){try{return n.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return an(!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 fl(n,r){if(r==="/")return n;if(!n.toLowerCase().startsWith(r.toLowerCase()))return null;let u=r.endsWith("/")?r.length-1:r.length,o=n.charAt(u);return o&&o!=="/"?null:n.slice(u)||"/"}var nb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function lb(n,r="/"){let{pathname:u,search:o="",hash:h=""}=typeof n=="string"?Zs(n):n,f;return u?(u=u.replace(/\/\/+/g,"/"),u.startsWith("/")?f=Lg(u.substring(1),"/"):f=Lg(u,r)):f=r,{pathname:f,search:ib(o),hash:cb(h)}}function Lg(n,r){let u=r.replace(/\/+$/,"").split("/");return n.split("/").forEach(h=>{h===".."?u.length>1&&u.pop():h!=="."&&u.push(h)}),u.length>1?u.join("/"):"/"}function _f(n,r,u,o){return`Cannot include a '${n}' character in a manually specified \`to.${r}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${u}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function sb(n){return n.filter((r,u)=>u===0||r.route.path&&r.route.path.length>0)}function sh(n){let r=sb(n);return r.map((u,o)=>o===r.length-1?u.pathname:u.pathnameBase)}function rh(n,r,u,o=!1){let h;typeof n=="string"?h=Zs(n):(h={...n},bt(!h.pathname||!h.pathname.includes("?"),_f("?","pathname","search",h)),bt(!h.pathname||!h.pathname.includes("#"),_f("#","pathname","hash",h)),bt(!h.search||!h.search.includes("#"),_f("#","search","hash",h)));let f=n===""||h.pathname==="",j=f?"/":h.pathname,b;if(j==null)b=u;else{let M=r.length-1;if(!o&&j.startsWith("..")){let D=j.split("/");for(;D[0]==="..";)D.shift(),M-=1;h.pathname=D.join("/")}b=M>=0?r[M]:"/"}let y=lb(h,b),x=j&&j!=="/"&&j.endsWith("/"),E=(f||j===".")&&u.endsWith("/");return!y.pathname.endsWith("/")&&(x||E)&&(y.pathname+="/"),y}var dl=n=>n.join("/").replace(/\/\/+/g,"/"),rb=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),ib=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,cb=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,ub=class{constructor(n,r,u,o=!1){this.status=n,this.statusText=r||"",this.internal=o,u instanceof Error?(this.data=u.toString(),this.error=u):this.data=u}};function ob(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function db(n){return n.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ix=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Wx(n,r){let u=n;if(typeof u!="string"||!nb.test(u))return{absoluteURL:void 0,isExternal:!1,to:u};let o=u,h=!1;if(Ix)try{let f=new URL(window.location.href),j=u.startsWith("//")?new URL(f.protocol+u):new URL(u),b=fl(j.pathname,r);j.origin===f.origin&&b!=null?u=b+j.search+j.hash:h=!0}catch{an(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:h,to:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Qx=["POST","PUT","PATCH","DELETE"];new Set(Qx);var fb=["GET",...Qx];new Set(fb);var Wr=L.createContext(null);Wr.displayName="DataRouter";var xo=L.createContext(null);xo.displayName="DataRouterState";var hb=L.createContext(!1),Xx=L.createContext({isTransitioning:!1});Xx.displayName="ViewTransition";var mb=L.createContext(new Map);mb.displayName="Fetchers";var gb=L.createContext(null);gb.displayName="Await";var qa=L.createContext(null);qa.displayName="Navigation";var Nc=L.createContext(null);Nc.displayName="Location";var Un=L.createContext({outlet:null,matches:[],isDataRoute:!1});Un.displayName="Route";var ih=L.createContext(null);ih.displayName="RouteError";var Jx="REACT_ROUTER_ERROR",xb="REDIRECT",pb="ROUTE_ERROR_RESPONSE";function vb(n){if(n.startsWith(`${Jx}:${xb}:{`))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 yb(n){if(n.startsWith(`${Jx}:${pb}:{`))try{let r=JSON.parse(n.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new ub(r.status,r.statusText,r.data)}catch{}}function bb(n,{relative:r}={}){bt(Qr(),"useHref() may be used only in the context of a <Router> component.");let{basename:u,navigator:o}=L.useContext(qa),{hash:h,pathname:f,search:j}=wc(n,{relative:r}),b=f;return u!=="/"&&(b=f==="/"?u:dl([u,f])),o.createHref({pathname:b,search:j,hash:h})}function Qr(){return L.useContext(Nc)!=null}function Hn(){return bt(Qr(),"useLocation() may be used only in the context of a <Router> component."),L.useContext(Nc).location}var Kx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ep(n){L.useContext(qa).static||L.useLayoutEffect(n)}function po(){let{isDataRoute:n}=L.useContext(Un);return n?Ab():jb()}function jb(){bt(Qr(),"useNavigate() may be used only in the context of a <Router> component.");let n=L.useContext(Wr),{basename:r,navigator:u}=L.useContext(qa),{matches:o}=L.useContext(Un),{pathname:h}=Hn(),f=JSON.stringify(sh(o)),j=L.useRef(!1);return ep(()=>{j.current=!0}),L.useCallback((y,x={})=>{if(an(j.current,Kx),!j.current)return;if(typeof y=="number"){u.go(y);return}let E=rh(y,JSON.parse(f),h,x.relative==="path");n==null&&r!=="/"&&(E.pathname=E.pathname==="/"?r:dl([r,E.pathname])),(x.replace?u.replace:u.push)(E,x.state,x)},[r,u,f,h,n])}L.createContext(null);function wc(n,{relative:r}={}){let{matches:u}=L.useContext(Un),{pathname:o}=Hn(),h=JSON.stringify(sh(u));return L.useMemo(()=>rh(n,JSON.parse(h),o,r==="path"),[n,h,o,r])}function Nb(n,r){return tp(n,r)}function tp(n,r,u,o,h){var U;bt(Qr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=L.useContext(qa),{matches:j}=L.useContext(Un),b=j[j.length-1],y=b?b.params:{},x=b?b.pathname:"/",E=b?b.pathnameBase:"/",M=b&&b.route;{let J=M&&M.path||"";np(x,!M||J.endsWith("*")||J.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${x}" (under <Route path="${J}">) 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="${J}"> to <Route path="${J==="/"?"*":`${J}/*`}">.`)}let D=Hn(),_;if(r){let J=typeof r=="string"?Zs(r):r;bt(E==="/"||((U=J.pathname)==null?void 0:U.startsWith(E)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${E}" but pathname "${J.pathname}" was given in the \`location\` prop.`),_=J}else _=D;let N=_.pathname||"/",O=N;if(E!=="/"){let J=E.replace(/^\//,"").split("/");O="/"+N.replace(/^\//,"").split("/").slice(J.length).join("/")}let R=Gx(n,{pathname:O});an(M||R!=null,`No routes matched location "${_.pathname}${_.search}${_.hash}" `),an(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${_.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 I=Tb(R&&R.map(J=>Object.assign({},J,{params:Object.assign({},y,J.params),pathname:dl([E,f.encodeLocation?f.encodeLocation(J.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:J.pathname]),pathnameBase:J.pathnameBase==="/"?E:dl([E,f.encodeLocation?f.encodeLocation(J.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:J.pathnameBase])})),j,u,o,h);return r&&I?L.createElement(Nc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",..._},navigationType:"POP"}},I):I}function wb(){let n=kb(),r=ob(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),u=n instanceof Error?n.stack:null,o="rgba(200,200,200, 0.5)",h={padding:"0.5rem",backgroundColor:o},f={padding:"2px 4px",backgroundColor:o},j=null;return console.error("Error handled by React Router default ErrorBoundary:",n),j=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),u?L.createElement("pre",{style:h},u):null,j)}var Sb=L.createElement(wb,null),ap=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 u=yb(n.digest);u&&(n=u)}let r=n!==void 0?L.createElement(Un.Provider,{value:this.props.routeContext},L.createElement(ih.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?L.createElement(Eb,{error:n},r):r}};ap.contextType=hb;var zf=new WeakMap;function Eb({children:n,error:r}){let{basename:u}=L.useContext(qa);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let o=vb(r.digest);if(o){let h=zf.get(r);if(h)throw h;let f=Wx(o.location,u);if(Ix&&!zf.get(r))if(f.isExternal||o.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const j=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:o.replace}));throw zf.set(r,j),j}return L.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return n}function Cb({routeContext:n,match:r,children:u}){let o=L.useContext(Wr);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),L.createElement(Un.Provider,{value:n},u)}function Tb(n,r=[],u=null,o=null,h=null){if(n==null){if(!u)return null;if(u.errors)n=u.matches;else if(r.length===0&&!u.initialized&&u.matches.length>0)n=u.matches;else return null}let f=n,j=u==null?void 0:u.errors;if(j!=null){let E=f.findIndex(M=>M.route.id&&(j==null?void 0:j[M.route.id])!==void 0);bt(E>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(j).join(",")}`),f=f.slice(0,Math.min(f.length,E+1))}let b=!1,y=-1;if(u)for(let E=0;E<f.length;E++){let M=f[E];if((M.route.HydrateFallback||M.route.hydrateFallbackElement)&&(y=E),M.route.id){let{loaderData:D,errors:_}=u,N=M.route.loader&&!D.hasOwnProperty(M.route.id)&&(!_||_[M.route.id]===void 0);if(M.route.lazy||N){b=!0,y>=0?f=f.slice(0,y+1):f=[f[0]];break}}}let x=u&&o?(E,M)=>{var D,_;o(E,{location:u.location,params:((_=(D=u.matches)==null?void 0:D[0])==null?void 0:_.params)??{},unstable_pattern:db(u.matches),errorInfo:M})}:void 0;return f.reduceRight((E,M,D)=>{let _,N=!1,O=null,R=null;u&&(_=j&&M.route.id?j[M.route.id]:void 0,O=M.route.errorElement||Sb,b&&(y<0&&D===0?(np("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,R=null):y===D&&(N=!0,R=M.route.hydrateFallbackElement||null)));let I=r.concat(f.slice(0,D+1)),U=()=>{let J;return _?J=O:N?J=R:M.route.Component?J=L.createElement(M.route.Component,null):M.route.element?J=M.route.element:J=E,L.createElement(Cb,{match:M,routeContext:{outlet:E,matches:I,isDataRoute:u!=null},children:J})};return u&&(M.route.ErrorBoundary||M.route.errorElement||D===0)?L.createElement(ap,{location:u.location,revalidation:u.revalidation,component:O,error:_,children:U(),routeContext:{outlet:null,matches:I,isDataRoute:!0},onError:x}):U()},null)}function ch(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Mb(n){let r=L.useContext(Wr);return bt(r,ch(n)),r}function Ob(n){let r=L.useContext(xo);return bt(r,ch(n)),r}function Rb(n){let r=L.useContext(Un);return bt(r,ch(n)),r}function uh(n){let r=Rb(n),u=r.matches[r.matches.length-1];return bt(u.route.id,`${n} can only be used on routes that contain a unique "id"`),u.route.id}function Db(){return uh("useRouteId")}function kb(){var o;let n=L.useContext(ih),r=Ob("useRouteError"),u=uh("useRouteError");return n!==void 0?n:(o=r.errors)==null?void 0:o[u]}function Ab(){let{router:n}=Mb("useNavigate"),r=uh("useNavigate"),u=L.useRef(!1);return ep(()=>{u.current=!0}),L.useCallback(async(h,f={})=>{an(u.current,Kx),u.current&&(typeof h=="number"?await n.navigate(h):await n.navigate(h,{fromRouteId:r,...f}))},[n,r])}var Ug={};function np(n,r,u){!r&&!Ug[n]&&(Ug[n]=!0,an(!1,u))}L.memo(_b);function _b({routes:n,future:r,state:u,onError:o}){return tp(n,void 0,u,o,r)}function zb({to:n,replace:r,state:u,relative:o}){bt(Qr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:h}=L.useContext(qa);an(!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(Un),{pathname:j}=Hn(),b=po(),y=rh(n,sh(f),j,o==="path"),x=JSON.stringify(y);return L.useEffect(()=>{b(JSON.parse(x),{replace:r,state:u,relative:o})},[b,x,o,r,u]),null}function Ln(n){bt(!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 Lb({basename:n="/",children:r=null,location:u,navigationType:o="POP",navigator:h,static:f=!1,unstable_useTransitions:j}){bt(!Qr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let b=n.replace(/^\/*/,"/"),y=L.useMemo(()=>({basename:b,navigator:h,static:f,unstable_useTransitions:j,future:{}}),[b,h,f,j]);typeof u=="string"&&(u=Zs(u));let{pathname:x="/",search:E="",hash:M="",state:D=null,key:_="default"}=u,N=L.useMemo(()=>{let O=fl(x,b);return O==null?null:{location:{pathname:O,search:E,hash:M,state:D,key:_},navigationType:o}},[b,x,E,M,D,_,o]);return an(N!=null,`<Router basename="${b}"> is not able to match the URL "${x}${E}${M}" because it does not start with the basename, so the <Router> won't render anything.`),N==null?null:L.createElement(qa.Provider,{value:y},L.createElement(Nc.Provider,{children:r,value:N}))}function Ub({children:n,location:r}){return Nb(Ff(n),r)}function Ff(n,r=[]){let u=[];return L.Children.forEach(n,(o,h)=>{if(!L.isValidElement(o))return;let f=[...r,h];if(o.type===L.Fragment){u.push.apply(u,Ff(o.props.children,f));return}bt(o.type===Ln,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),bt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let j={id:o.props.id||f.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(j.children=Ff(o.props.children,f)),u.push(j)}),u}var so="get",ro="application/x-www-form-urlencoded";function vo(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Hb(n){return vo(n)&&n.tagName.toLowerCase()==="button"}function qb(n){return vo(n)&&n.tagName.toLowerCase()==="form"}function Vb(n){return vo(n)&&n.tagName.toLowerCase()==="input"}function Bb(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Pb(n,r){return n.button===0&&(!r||r==="_self")&&!Bb(n)}var Qu=null;function $b(){if(Qu===null)try{new FormData(document.createElement("form"),0),Qu=!1}catch{Qu=!0}return Qu}var Yb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Lf(n){return n!=null&&!Yb.has(n)?(an(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ro}"`),null):n}function Gb(n,r){let u,o,h,f,j;if(qb(n)){let b=n.getAttribute("action");o=b?fl(b,r):null,u=n.getAttribute("method")||so,h=Lf(n.getAttribute("enctype"))||ro,f=new FormData(n)}else if(Hb(n)||Vb(n)&&(n.type==="submit"||n.type==="image")){let b=n.form;if(b==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=n.getAttribute("formaction")||b.getAttribute("action");if(o=y?fl(y,r):null,u=n.getAttribute("formmethod")||b.getAttribute("method")||so,h=Lf(n.getAttribute("formenctype"))||Lf(b.getAttribute("enctype"))||ro,f=new FormData(b,n),!$b()){let{name:x,type:E,value:M}=n;if(E==="image"){let D=x?`${x}.`:"";f.append(`${D}x`,"0"),f.append(`${D}y`,"0")}else x&&f.append(x,M)}}else{if(vo(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');u=so,o=null,h=ro,j=n}return f&&h==="text/plain"&&(j=f,f=void 0),{action:o,method:u.toLowerCase(),encType:h,formData:f,body:j}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function oh(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function Fb(n,r,u,o){let h=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return u?h.pathname.endsWith("/")?h.pathname=`${h.pathname}_.${o}`:h.pathname=`${h.pathname}.${o}`:h.pathname==="/"?h.pathname=`_root.${o}`:r&&fl(h.pathname,r)==="/"?h.pathname=`${r.replace(/\/$/,"")}/_root.${o}`:h.pathname=`${h.pathname.replace(/\/$/,"")}.${o}`,h}async function Zb(n,r){if(n.id in r)return r[n.id];try{let u=await import(n.module);return r[n.id]=u,u}catch(u){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(u),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ib(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 Wb(n,r,u){let o=await Promise.all(n.map(async h=>{let f=r.routes[h.route.id];if(f){let j=await Zb(f,u);return j.links?j.links():[]}return[]}));return Kb(o.flat(1).filter(Ib).filter(h=>h.rel==="stylesheet"||h.rel==="preload").map(h=>h.rel==="stylesheet"?{...h,rel:"prefetch",as:"style"}:{...h,rel:"prefetch"}))}function Hg(n,r,u,o,h,f){let j=(y,x)=>u[x]?y.route.id!==u[x].route.id:!0,b=(y,x)=>{var E;return u[x].pathname!==y.pathname||((E=u[x].route.path)==null?void 0:E.endsWith("*"))&&u[x].params["*"]!==y.params["*"]};return f==="assets"?r.filter((y,x)=>j(y,x)||b(y,x)):f==="data"?r.filter((y,x)=>{var M;let E=o.routes[y.route.id];if(!E||!E.hasLoader)return!1;if(j(y,x)||b(y,x))return!0;if(y.route.shouldRevalidate){let D=y.route.shouldRevalidate({currentUrl:new URL(h.pathname+h.search+h.hash,window.origin),currentParams:((M=u[0])==null?void 0:M.params)||{},nextUrl:new URL(n,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof D=="boolean")return D}return!0}):[]}function Qb(n,r,{includeHydrateFallback:u}={}){return Xb(n.map(o=>{let h=r.routes[o.route.id];if(!h)return[];let f=[h.module];return h.clientActionModule&&(f=f.concat(h.clientActionModule)),h.clientLoaderModule&&(f=f.concat(h.clientLoaderModule)),u&&h.hydrateFallbackModule&&(f=f.concat(h.hydrateFallbackModule)),h.imports&&(f=f.concat(h.imports)),f}).flat(1))}function Xb(n){return[...new Set(n)]}function Jb(n){let r={},u=Object.keys(n).sort();for(let o of u)r[o]=n[o];return r}function Kb(n,r){let u=new Set;return new Set(r),n.reduce((o,h)=>{let f=JSON.stringify(Jb(h));return u.has(f)||(u.add(f),o.push({key:f,link:h})),o},[])}function lp(){let n=L.useContext(Wr);return oh(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function e1(){let n=L.useContext(xo);return oh(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var dh=L.createContext(void 0);dh.displayName="FrameworkContext";function sp(){let n=L.useContext(dh);return oh(n,"You must render this element inside a <HydratedRouter> element"),n}function t1(n,r){let u=L.useContext(dh),[o,h]=L.useState(!1),[f,j]=L.useState(!1),{onFocus:b,onBlur:y,onMouseEnter:x,onMouseLeave:E,onTouchStart:M}=r,D=L.useRef(null);L.useEffect(()=>{if(n==="render"&&j(!0),n==="viewport"){let O=I=>{I.forEach(U=>{j(U.isIntersecting)})},R=new IntersectionObserver(O,{threshold:.5});return D.current&&R.observe(D.current),()=>{R.disconnect()}}},[n]),L.useEffect(()=>{if(o){let O=setTimeout(()=>{j(!0)},100);return()=>{clearTimeout(O)}}},[o]);let _=()=>{h(!0)},N=()=>{h(!1),j(!1)};return u?n!=="intent"?[f,D,{}]:[f,D,{onFocus:ac(b,_),onBlur:ac(y,N),onMouseEnter:ac(x,_),onMouseLeave:ac(E,N),onTouchStart:ac(M,_)}]:[!1,D,{}]}function ac(n,r){return u=>{n&&n(u),u.defaultPrevented||r(u)}}function a1({page:n,...r}){let{router:u}=lp(),o=L.useMemo(()=>Gx(u.routes,n,u.basename),[u.routes,n,u.basename]);return o?L.createElement(l1,{page:n,matches:o,...r}):null}function n1(n){let{manifest:r,routeModules:u}=sp(),[o,h]=L.useState([]);return L.useEffect(()=>{let f=!1;return Wb(n,r,u).then(j=>{f||h(j)}),()=>{f=!0}},[n,r,u]),o}function l1({page:n,matches:r,...u}){let o=Hn(),{future:h,manifest:f,routeModules:j}=sp(),{basename:b}=lp(),{loaderData:y,matches:x}=e1(),E=L.useMemo(()=>Hg(n,r,x,f,o,"data"),[n,r,x,f,o]),M=L.useMemo(()=>Hg(n,r,x,f,o,"assets"),[n,r,x,f,o]),D=L.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let O=new Set,R=!1;if(r.forEach(U=>{var k;let J=f.routes[U.route.id];!J||!J.hasLoader||(!E.some(w=>w.route.id===U.route.id)&&U.route.id in y&&((k=j[U.route.id])!=null&&k.shouldRevalidate)||J.hasClientLoader?R=!0:O.add(U.route.id))}),O.size===0)return[];let I=Fb(n,b,h.unstable_trailingSlashAwareDataRequests,"data");return R&&O.size>0&&I.searchParams.set("_routes",r.filter(U=>O.has(U.route.id)).map(U=>U.route.id).join(",")),[I.pathname+I.search]},[b,h.unstable_trailingSlashAwareDataRequests,y,o,f,E,r,n,j]),_=L.useMemo(()=>Qb(M,f),[M,f]),N=n1(M);return L.createElement(L.Fragment,null,D.map(O=>L.createElement("link",{key:O,rel:"prefetch",as:"fetch",href:O,...u})),_.map(O=>L.createElement("link",{key:O,rel:"modulepreload",href:O,...u})),N.map(({key:O,link:R})=>L.createElement("link",{key:O,nonce:u.nonce,...R,crossOrigin:R.crossOrigin??u.crossOrigin})))}function s1(...n){return r=>{n.forEach(u=>{typeof u=="function"?u(r):u!=null&&(u.current=r)})}}var r1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{r1&&(window.__reactRouterVersion="7.13.0")}catch{}function i1({basename:n,children:r,unstable_useTransitions:u,window:o}){let h=L.useRef();h.current==null&&(h.current=Vy({window:o,v5Compat:!0}));let f=h.current,[j,b]=L.useState({action:f.action,location:f.location}),y=L.useCallback(x=>{u===!1?b(x):L.startTransition(()=>b(x))},[u]);return L.useLayoutEffect(()=>f.listen(y),[f,y]),L.createElement(Lb,{basename:n,children:r,location:j.location,navigationType:j.action,navigator:f,unstable_useTransitions:u})}var rp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ip=L.forwardRef(function({onClick:r,discover:u="render",prefetch:o="none",relative:h,reloadDocument:f,replace:j,state:b,target:y,to:x,preventScrollReset:E,viewTransition:M,unstable_defaultShouldRevalidate:D,..._},N){let{basename:O,unstable_useTransitions:R}=L.useContext(qa),I=typeof x=="string"&&rp.test(x),U=Wx(x,O);x=U.to;let J=bb(x,{relative:h}),[k,w,q]=t1(o,_),G=o1(x,{replace:j,state:b,target:y,preventScrollReset:E,relative:h,viewTransition:M,unstable_defaultShouldRevalidate:D,unstable_useTransitions:R});function Z(S){r&&r(S),S.defaultPrevented||G(S)}let le=L.createElement("a",{..._,...q,href:U.absoluteURL||J,onClick:U.isExternal||f?r:Z,ref:s1(N,w),target:y,"data-discover":!I&&u==="render"?"true":void 0});return k&&!I?L.createElement(L.Fragment,null,le,L.createElement(a1,{page:J})):le});ip.displayName="Link";var cp=L.forwardRef(function({"aria-current":r="page",caseSensitive:u=!1,className:o="",end:h=!1,style:f,to:j,viewTransition:b,children:y,...x},E){let M=wc(j,{relative:x.relative}),D=Hn(),_=L.useContext(xo),{navigator:N,basename:O}=L.useContext(qa),R=_!=null&&g1(M)&&b===!0,I=N.encodeLocation?N.encodeLocation(M).pathname:M.pathname,U=D.pathname,J=_&&_.navigation&&_.navigation.location?_.navigation.location.pathname:null;u||(U=U.toLowerCase(),J=J?J.toLowerCase():null,I=I.toLowerCase()),J&&O&&(J=fl(J,O)||J);const k=I!=="/"&&I.endsWith("/")?I.length-1:I.length;let w=U===I||!h&&U.startsWith(I)&&U.charAt(k)==="/",q=J!=null&&(J===I||!h&&J.startsWith(I)&&J.charAt(I.length)==="/"),G={isActive:w,isPending:q,isTransitioning:R},Z=w?r:void 0,le;typeof o=="function"?le=o(G):le=[o,w?"active":null,q?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let S=typeof f=="function"?f(G):f;return L.createElement(ip,{...x,"aria-current":Z,className:le,ref:E,style:S,to:j,viewTransition:b},typeof y=="function"?y(G):y)});cp.displayName="NavLink";var c1=L.forwardRef(({discover:n="render",fetcherKey:r,navigate:u,reloadDocument:o,replace:h,state:f,method:j=so,action:b,onSubmit:y,relative:x,preventScrollReset:E,viewTransition:M,unstable_defaultShouldRevalidate:D,..._},N)=>{let{unstable_useTransitions:O}=L.useContext(qa),R=h1(),I=m1(b,{relative:x}),U=j.toLowerCase()==="get"?"get":"post",J=typeof b=="string"&&rp.test(b),k=w=>{if(y&&y(w),w.defaultPrevented)return;w.preventDefault();let q=w.nativeEvent.submitter,G=(q==null?void 0:q.getAttribute("formmethod"))||j,Z=()=>R(q||w.currentTarget,{fetcherKey:r,method:G,navigate:u,replace:h,state:f,relative:x,preventScrollReset:E,viewTransition:M,unstable_defaultShouldRevalidate:D});O&&u!==!1?L.startTransition(()=>Z()):Z()};return L.createElement("form",{ref:N,method:U,action:I,onSubmit:o?y:k,..._,"data-discover":!J&&n==="render"?"true":void 0})});c1.displayName="Form";function u1(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function up(n){let r=L.useContext(Wr);return bt(r,u1(n)),r}function o1(n,{target:r,replace:u,state:o,preventScrollReset:h,relative:f,viewTransition:j,unstable_defaultShouldRevalidate:b,unstable_useTransitions:y}={}){let x=po(),E=Hn(),M=wc(n,{relative:f});return L.useCallback(D=>{if(Pb(D,r)){D.preventDefault();let _=u!==void 0?u:xc(E)===xc(M),N=()=>x(n,{replace:_,state:o,preventScrollReset:h,relative:f,viewTransition:j,unstable_defaultShouldRevalidate:b});y?L.startTransition(()=>N()):N()}},[E,x,M,u,o,r,n,h,f,j,b,y])}var d1=0,f1=()=>`__${String(++d1)}__`;function h1(){let{router:n}=up("useSubmit"),{basename:r}=L.useContext(qa),u=Db(),o=n.fetch,h=n.navigate;return L.useCallback(async(f,j={})=>{let{action:b,method:y,encType:x,formData:E,body:M}=Gb(f,r);if(j.navigate===!1){let D=j.fetcherKey||f1();await o(D,u,j.action||b,{unstable_defaultShouldRevalidate:j.unstable_defaultShouldRevalidate,preventScrollReset:j.preventScrollReset,formData:E,body:M,formMethod:j.method||y,formEncType:j.encType||x,flushSync:j.flushSync})}else await h(j.action||b,{unstable_defaultShouldRevalidate:j.unstable_defaultShouldRevalidate,preventScrollReset:j.preventScrollReset,formData:E,body:M,formMethod:j.method||y,formEncType:j.encType||x,replace:j.replace,state:j.state,fromRouteId:u,flushSync:j.flushSync,viewTransition:j.viewTransition})},[o,h,r,u])}function m1(n,{relative:r}={}){let{basename:u}=L.useContext(qa),o=L.useContext(Un);bt(o,"useFormAction must be used inside a RouteContext");let[h]=o.matches.slice(-1),f={...wc(n||".",{relative:r})},j=Hn();if(n==null){f.search=j.search;let b=new URLSearchParams(f.search),y=b.getAll("index");if(y.some(E=>E==="")){b.delete("index"),y.filter(M=>M).forEach(M=>b.append("index",M));let E=b.toString();f.search=E?`?${E}`:""}}return(!n||n===".")&&h.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),u!=="/"&&(f.pathname=f.pathname==="/"?u:dl([u,f.pathname])),xc(f)}function g1(n,{relative:r}={}){let u=L.useContext(Xx);bt(u!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=up("useViewTransitionState"),h=wc(n,{relative:r});if(!u.isTransitioning)return!1;let f=fl(u.currentLocation.pathname,o)||u.currentLocation.pathname,j=fl(u.nextLocation.pathname,o)||u.nextLocation.pathname;return co(h.pathname,j)!=null||co(h.pathname,f)!=null}var x1=Yx();const p1=nh(x1);/**
|
|
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 op=(...n)=>n.filter((r,u,o)=>!!r&&r.trim()!==""&&o.indexOf(r)===u).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 v1=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 y1=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,u,o)=>o?o.toUpperCase():u.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 qg=n=>{const r=y1(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 b1={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 j1=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 N1=L.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:u=2,absoluteStrokeWidth:o,className:h="",children:f,iconNode:j,...b},y)=>L.createElement("svg",{ref:y,...b1,width:r,height:r,stroke:n,strokeWidth:o?Number(u)*24/Number(r):u,className:op("lucide",h),...!f&&!j1(b)&&{"aria-hidden":"true"},...b},[...j.map(([x,E])=>L.createElement(x,E)),...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 Ce=(n,r)=>{const u=L.forwardRef(({className:o,...h},f)=>L.createElement(N1,{ref:f,iconNode:r,className:op(`lucide-${v1(qg(n))}`,`lucide-${n}`,o),...h}));return u.displayName=qg(n),u};/**
|
|
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 w1=[["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"}]],dp=Ce("activity",w1);/**
|
|
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 S1=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],E1=Ce("arrow-down",S1);/**
|
|
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 C1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Zf=Ce("arrow-right",C1);/**
|
|
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 T1=[["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"}]],M1=Ce("arrow-up-down",T1);/**
|
|
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 O1=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],R1=Ce("arrow-up",O1);/**
|
|
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 D1=[["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"}]],k1=Ce("bell",D1);/**
|
|
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 A1=[["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"}]],Vg=Ce("briefcase",A1);/**
|
|
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 _1=[["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"}]],fp=Ce("calendar",_1);/**
|
|
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 z1=[["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"}]],yo=Ce("chart-column",z1);/**
|
|
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 L1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],U1=Ce("check",L1);/**
|
|
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 H1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],fh=Ce("chevron-down",H1);/**
|
|
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 q1=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],V1=Ce("chevron-left",q1);/**
|
|
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 B1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],P1=Ce("chevron-right",B1);/**
|
|
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"}]],Y1=Ce("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 G1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],F1=Ce("chevrons-up-down",G1);/**
|
|
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 Z1=[["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=Ce("circle-alert",Z1);/**
|
|
181
|
+
* @license lucide-react v0.564.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const I1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"m8 12 4 4 4-4",key:"k98ssh"}]],Bg=Ce("circle-arrow-down",I1);/**
|
|
186
|
+
* @license lucide-react v0.564.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const W1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],hp=Ce("circle-check",W1);/**
|
|
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 Q1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Sc=Ce("circle-check-big",Q1);/**
|
|
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 X1=[["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"}]],J1=Ce("circle-pause",X1);/**
|
|
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 K1=[["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"}]],ej=Ce("circle-x",K1);/**
|
|
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 tj=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],hh=Ce("clipboard-list",tj);/**
|
|
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 aj=[["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"}]],Pg=Ce("clipboard",aj);/**
|
|
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 nj=[["path",{d:"M12 6v6h4",key:"135r8i"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],lj=Ce("clock-3",nj);/**
|
|
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 sj=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],mp=Ce("clock",sj);/**
|
|
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 rj=[["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"}]],gp=Ce("external-link",rj);/**
|
|
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 ij=[["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"}]],cj=Ce("eye-off",ij);/**
|
|
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 uj=[["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"}]],pc=Ce("eye",uj);/**
|
|
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 oj=[["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"}]],If=Ce("file-text",oj);/**
|
|
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 dj=[["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"}]],mh=Ce("git-merge",dj);/**
|
|
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 fj=[["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"}]],bo=Ce("git-pull-request",fj);/**
|
|
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 hj=[["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"}]],mj=Ce("globe",hj);/**
|
|
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 gj=[["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"}]],xj=Ce("house",gj);/**
|
|
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 pj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],vj=Ce("info",pj);/**
|
|
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 yj=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],bj=Ce("kanban",yj);/**
|
|
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 jj=[["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"}]],$g=Ce("list-restart",jj);/**
|
|
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 Nj=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],gh=Ce("loader-circle",Nj);/**
|
|
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 wj=[["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"}]],xp=Ce("map",wj);/**
|
|
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 Sj=[["path",{d:"M5 12h14",key:"1ays0h"}]],Ej=Ce("minus",Sj);/**
|
|
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 Cj=[["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"}]],xh=Ce("panels-top-left",Cj);/**
|
|
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 Tj=[["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"}]],uo=Ce("pause",Tj);/**
|
|
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 Mj=[["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"}]],jo=Ce("pen",Mj);/**
|
|
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 Oj=[["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=Ce("play",Oj);/**
|
|
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 Rj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],es=Ce("plus",Rj);/**
|
|
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 Dj=[["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"}]],vc=Ce("refresh-cw",Dj);/**
|
|
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 kj=[["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"}]],ph=Ce("rotate-ccw",kj);/**
|
|
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 Aj=[["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"}]],pp=Ce("save",Aj);/**
|
|
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 _j=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Xr=Ce("search",_j);/**
|
|
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 zj=[["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"}]],Yg=Ce("settings-2",zj);/**
|
|
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 Lj=[["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"}]],Uj=Ce("settings",Lj);/**
|
|
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 Hj=[["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"}]],qj=Ce("sparkles",Hj);/**
|
|
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 Vj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Gg=Ce("square",Vj);/**
|
|
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 Bj=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Pj=Ce("terminal",Bj);/**
|
|
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 $j=[["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"}]],Yj=Ce("timer-off",$j);/**
|
|
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 Gj=[["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"}]],Is=Ce("trash-2",Gj);/**
|
|
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 Fj=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],Zj=Ce("trending-down",Fj);/**
|
|
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 Ij=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Wj=Ce("trending-up",Ij);/**
|
|
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 Qj=[["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"}]],Fs=Ce("triangle-alert",Qj);/**
|
|
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 Xj=[["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"}]],Jj=Ce("wifi",Xj);/**
|
|
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 Kj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Jr=Ce("x",Kj);/**
|
|
401
|
+
* @license lucide-react v0.564.0 - ISC
|
|
402
|
+
*
|
|
403
|
+
* This source code is licensed under the ISC license.
|
|
404
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
405
|
+
*/const eN=[["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"}]],Fg=Ce("zap",eN),vp=[{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:"ux",label:"UX",processName:"ux",color:{bg:"bg-lime-500",border:"border-lime-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"}},{id:"manager",label:"Manager",processName:"manager",color:{bg:"bg-indigo-500",border:"border-indigo-500/60"}}],yp=[{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)??!1},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:"ux",label:"UX",processName:"ux",color:{bg:"bg-lime-500",border:"border-lime-500/60"},triggerEndpoint:"/api/actions/ux",scheduleTemplateKey:"ux",getEnabled:n=>{var r;return((r=n.ux)==null?void 0:r.enabled)??!1},getSchedule:n=>{var r;return((r=n.ux)==null?void 0:r.schedule)??"0 7 * * 1"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({ux:{...r.ux??{},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}})},{id:"manager",label:"Manager",processName:"manager",color:{bg:"bg-indigo-500",border:"border-indigo-500/60"},triggerEndpoint:"/api/actions/manager",scheduleTemplateKey:"manager",getEnabled:n=>{var r;return((r=n.manager)==null?void 0:r.enabled)??!0},getSchedule:n=>{var r;return((r=n.manager)==null?void 0:r.schedule)??"15 7 * * *"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({manager:{...r.manager??{},enabled:n}})}];function tN(n){return yp.find(r=>r.id===n)}const vh="";let yh=!1,oo=null;function aN(n){yh=n}function Zg(n){oo=n}function nN(){return yh}function bh(n){return encodeURIComponent(n.replace(/\//g,"~"))}function jt(n){return yh&&oo?n.replace("/api/",`/api/projects/${bh(oo)}/`):n}function lN(){return nt("/api/mode")}function bp(){return nt("/api/projects")}function sN(n){const r=bh(n);return nt(`/api/projects/${r}`,{method:"DELETE"})}async function nt(n,r){const u=`${vh}${n}`,o=await fetch(u,{headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r});if(!o.ok){const h=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(h.error||`HTTP ${o.status}: ${o.statusText}`)}return o.json()}function Uf(){return nt(jt("/api/status"))}function rN(){return nt(jt("/api/feedback/summary"))}function iN(){return nt(jt("/api/feedback/patterns"))}function cN(n,r){return nt(jt(`/api/feedback/augmentations/${n}`),{method:"PATCH",body:JSON.stringify(r)})}function jp(){return nt(jt("/api/prs"))}function uN(n,r){const u=`?lines=${encodeURIComponent(r)}`;return nt(jt(`/api/logs/${encodeURIComponent(n)}${u}`))}function jh(){return nt(jt("/api/config"))}async function oN(){if(nN()){const r=(await bp()).filter(o=>o.valid);return(await Promise.all(r.map(async o=>{try{const h=await nt(`/api/projects/${bh(o.name)}/config`);return{projectId:o.name,config:h}}catch(h){return console.error(`Failed to fetch config for project ${o.name}`,h),null}}))).filter(o=>o!==null)}else{const n=await jh();return[{projectId:oo||"current",config:n}]}}function fo(n){return nt(jt("/api/config"),{method:"PUT",body:JSON.stringify(n)})}function dN(){return nt(jt("/api/doctor"))}function Np(){return nt(jt("/api/schedule-info"))}function fN(){return nt(jt("/api/actions/review"),{method:"POST"})}function wp(n){const r=tN(n);return r?nt(jt(r.triggerEndpoint),{method:"POST"}):Promise.reject(new Error(`Unknown job ID: ${n}`))}function gc(){return nt(jt("/api/actions/install-cron"),{method:"POST"})}function Sp(){return nt(jt("/api/actions/uninstall-cron"),{method:"POST"})}function hN(n="all"){return nt(jt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:n})})}const Kl=["Draft","Ready","In Progress","Review","Done"];function Ep(){return nt(jt("/api/board/status"))}function mN(n){return nt(jt("/api/board/issues"),{method:"POST",body:JSON.stringify(n)})}function Cp(n,r){return nt(jt(`/api/board/issues/${n}/move`),{method:"PATCH",body:JSON.stringify({column:r})})}async function gN(n){const r=`${vh}${jt(`/api/board/issues/${n}`)}`,u=await fetch(r,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!u.ok){const o=await u.json().catch(()=>({error:"Unknown error"}));throw new Error(o.error||`HTTP ${u.status}: ${u.statusText}`)}}function xN(){return nt(jt("/api/actions/clear-lock"),{method:"POST"})}function pN(n,r=[],u){const o=(u==null?void 0:u.enabled)??!0,h=L.useRef(n);h.current=n,L.useEffect(()=>{if(!o)return;const f=`${vh}${jt("/api/status/events")}`,j=new EventSource(f);return j.addEventListener("status_changed",b=>{try{const y=JSON.parse(b.data);h.current(y)}catch{}}),()=>{j.close()}},[o,...r])}function Ig(){return nt("/api/queue/status")}function vN(n){const r=`?window=${encodeURIComponent(n)}`;return nt(`/api/queue/analytics${r}`)}function yN(n){return nt("/api/queue/clear",{method:"POST",body:JSON.stringify({force:!1})})}function bN(){return nt("/api/global-notifications")}function Wg(n){return nt("/api/global-notifications",{method:"PUT",body:JSON.stringify(n)})}function jN(){return nt(jt("/api/roadmap"))}function NN(){return nt(jt("/api/roadmap/scan"),{method:"POST"})}function Tp(n){return nt(jt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:n})})}function Ua(n,r=[],u){const o=(u==null?void 0:u.enabled)??!0,[h,f]=L.useState(null),[j,b]=L.useState(!0),[y,x]=L.useState(null),E=L.useRef(n);E.current=n;const M=L.useRef(()=>{(async()=>{x(null);try{const _=await E.current();f(_)}catch(_){x(_ instanceof Error?_:new Error("Unknown error"))}})()});return L.useEffect(()=>{if(!o)return;let D=!1;return b(!0),x(null),(async()=>{try{const N=await E.current();D||f(N)}catch(N){D||x(N instanceof Error?N:new Error("Unknown error"))}finally{D||b(!1)}})(),()=>{D=!0}},[...r,o]),{data:h,loading:j,error:y,refetch:M.current}}const Qg=n=>{let r;const u=new Set,o=(x,E)=>{const M=typeof x=="function"?x(r):x;if(!Object.is(M,r)){const D=r;r=E??(typeof M!="object"||M===null)?M:Object.assign({},r,M),u.forEach(_=>_(r,D))}},h=()=>r,b={setState:o,getState:h,getInitialState:()=>y,subscribe:x=>(u.add(x),()=>u.delete(x))},y=r=n(o,h,b);return b},wN=n=>n?Qg(n):Qg,SN=n=>n;function EN(n,r=SN){const u=ze.useSyncExternalStore(n.subscribe,()=>r(n.getState()),()=>r(n.getInitialState()));return ze.useDebugValue(u),u}const Xg=n=>{const r=wN(n),u=o=>EN(r,o);return Object.assign(u,r),u},CN=n=>n?Xg(n):Xg,TN=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,Zt=CN((n,r)=>({projectName:"Night Watch",setProjectName:u=>n({projectName:u}),toasts:[],addToast:u=>{const o=Math.random().toString(36).substring(7);n(h=>({toasts:[...h.toasts,{...u,id:o}]})),setTimeout(()=>{n(h=>({toasts:h.toasts.filter(f=>f.id!==o)}))},5e3)},removeToast:u=>n(o=>({toasts:o.toasts.filter(h=>h.id!==u)})),status:null,setStatus:u=>n(o=>u?!o.status||new Date(u.timestamp)>new Date(o.status.timestamp)?{status:u}:o:{status:null}),globalModeLoading:!0,setGlobalModeLoading:u=>n({globalModeLoading:u}),isGlobalMode:!1,setGlobalMode:u=>{aN(u),n({isGlobalMode:u})},projects:[],setProjects:u=>n({projects:u}),selectedProjectId:TN,selectProject:u=>{Zg(u),u?localStorage.setItem("nw-selected-project",u):localStorage.removeItem("nw-selected-project"),n(o=>{const h=o.projects.find(f=>f.name===u);return{selectedProjectId:u,...h?{projectName:h.name}:{}}})},removeProjectFromList:u=>{n(o=>{var b;const h=o.projects.filter(y=>y.name!==u),f=o.selectedProjectId===u,j=f?((b=h[0])==null?void 0:b.name)??null:o.selectedProjectId;return f&&(Zg(j),j?localStorage.setItem("nw-selected-project",j):localStorage.removeItem("nw-selected-project")),{projects:h,selectedProjectId:j,...f&&h[0]?{projectName:h[0].name}:{}}})},getJobStates:()=>{const{status:u}=r(),o=u==null?void 0:u.config;return yp.map(h=>({id:h.id,label:h.label,processName:h.processName,color:h.color,enabled:o?h.getEnabled(o):!0,schedule:o?h.getSchedule(o):"",triggerEndpoint:h.triggerEndpoint}))}})),MN=()=>{const[n,r]=L.useState(!1),{projectName:u,isGlobalMode:o,projects:h,selectedProjectId:f,selectProject:j,globalModeLoading:b}=Zt(),{data:y}=Ua(jp,[f],{enabled:!b}),x=(y==null?void 0:y.length)??0,E=L.useMemo(()=>[{icon:xj,label:"Dashboard",path:"/",section:"Overview"},{icon:yo,label:"Analytics",path:"/analytics"},{icon:Pj,label:"Logs",path:"/logs"},{icon:bj,label:"Board",path:"/board",section:"Work"},{icon:bo,label:"Pull Requests",path:"/prs",badge:x},{icon:xp,label:"Roadmap",path:"/roadmap"},{icon:fp,label:"Automation",path:"/scheduling",section:"Automation"},{icon:Uj,label:"Settings",path:"/settings",section:"Config"}],[x]);return s.jsxs("aside",{className:`
|
|
406
|
+
relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
|
|
407
|
+
${n?"w-20":"w-72"} h-screen flex-shrink-0 z-50
|
|
408
|
+
bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
|
|
409
|
+
`,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:o?"Projects":"Workspace"}),o?s.jsxs("div",{className:"relative",children:[s.jsx(Vg,{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:M=>j(M.target.value),className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 pl-10 pr-8 text-sm font-medium shadow-sm appearance-none cursor-pointer hover:border-white/20 transition-colors focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20",children:h.filter(M=>M.valid).map(M=>s.jsx("option",{value:M.name,children:M.name},M.name))}),s.jsx(F1,{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(Vg,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:u})]})]})}),s.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:s.jsx("ul",{className:"space-y-1.5 px-4",children:E.map(M=>s.jsxs(ze.Fragment,{children:[M.section&&!n&&s.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:M.section}),s.jsx("li",{children:s.jsx(cp,{to:M.path,className:({isActive:D})=>`
|
|
410
|
+
flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
|
|
411
|
+
${D?"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"}
|
|
412
|
+
${n?"justify-center":""}
|
|
413
|
+
`,children:({isActive:D})=>s.jsxs(s.Fragment,{children:[s.jsx(M.icon,{className:`h-5 w-5 transition-colors ${D?"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:M.label}),M.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 ${D?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:M.badge})),D&&!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:M.label})]})})})]},M.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(P1,{className:"h-5 w-5"}):s.jsx(V1,{className:"h-5 w-5"})})})]})},ON=()=>{const{projectName:n}=Zt();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(Jj,{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(Xr,{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(k1,{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"})]})]})},RN=({toast:n,onDismiss:r})=>{const u={success:s.jsx(Sc,{className:"h-5 w-5 text-green-400"}),error:s.jsx(yn,{className:"h-5 w-5 text-red-400"}),info:s.jsx(vj,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(Fs,{className:"h-5 w-5 text-amber-400"})},o={success:"border-l-green-500",error:"border-l-red-500",info:"border-l-blue-500",warning:"border-l-amber-500"};return s.jsx("div",{className:`
|
|
414
|
+
pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
|
|
415
|
+
bg-slate-900 border border-slate-800 border-l-4 ${o[n.type]}
|
|
416
|
+
shadow-lg ring-1 ring-black ring-opacity-5 transition-all
|
|
417
|
+
animate-in slide-in-from-right-full fade-in duration-300
|
|
418
|
+
`,children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:u[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(Jr,{className:"h-5 w-5"})]})})]})})})},DN=()=>{const{toasts:n,removeToast:r}=Zt();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(u=>s.jsx(RN,{toast:u,onDismiss:r},u.id))})};function kN(){const{setGlobalMode:n,setGlobalModeLoading:r,setProjects:u,selectProject:o,selectedProjectId:h}=Zt();L.useEffect(()=>{r(!0),lN().then(async({globalMode:f})=>{if(n(f),!f)return;const j=await bp();u(j);const b=j.filter(y=>y.valid);h&&b.some(y=>y.name===h)?o(h):b.length>0&&o(b[0].name)}).catch(()=>{n(!1)}).finally(()=>{r(!1)})},[])}function Jg(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 Xu(n,r){return n?r?Jg(n)>=Jg(r)?n:r:n:r}function AN(){const{setStatus:n,setProjectName:r,selectedProjectId:u,globalModeLoading:o,status:h}=Zt(),f=L.useRef(null);f.current=Zt.getState().status,pN(j=>{Xu(j,f.current)===j&&n(j)},[u,o],{enabled:!o}),L.useEffect(()=>{if(o)return;n(null),f.current=null,Uf().then(b=>{Xu(b,f.current)===b&&n(b)}).catch(()=>{});const j=setInterval(()=>{Uf().then(b=>{Xu(b,f.current)===b&&n(b)}).catch(()=>{})},3e4);return()=>clearInterval(j)},[u,o,n]),L.useEffect(()=>{const j=()=>{Uf().then(b=>{Xu(b,f.current)===b&&n(b)}).catch(()=>{})};return window.addEventListener("focus",j),()=>window.removeEventListener("focus",j)},[u,n]),L.useEffect(()=>{h!=null&&h.projectName&&r(h.projectName)},[h==null?void 0:h.projectName,r])}const Tt=({children:n,variant:r="default",className:u=""})=>{const o={default:"bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20",success:"bg-emerald-500/10 text-emerald-400 ring-1 ring-inset ring-emerald-500/20",warning:"bg-amber-500/10 text-amber-400 ring-1 ring-inset ring-amber-500/20",error:"bg-red-500/10 text-red-400 ring-1 ring-inset ring-red-500/20",neutral:"bg-slate-500/10 text-slate-400 ring-1 ring-inset ring-slate-500/20",info:"bg-blue-500/10 text-blue-400 ring-1 ring-inset ring-blue-500/20"};return s.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${o[r]} ${u}`,children:n})},Le=({children:n,variant:r="primary",size:u="md",loading:o=!1,className:h="",disabled:f,...j})=>{const b="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:`${b} ${y[r]} ${x[u]} ${h}`,disabled:f||o,...j,children:[o&&s.jsx(gh,{className:"mr-2 h-4 w-4 animate-spin"}),n]})},et=({children:n,className:r="",onClick:u})=>s.jsxs("div",{className:`
|
|
419
|
+
relative bg-[#0b101b] rounded-xl border border-white/5
|
|
420
|
+
shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
|
|
421
|
+
transition-all duration-300
|
|
422
|
+
${u?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
|
|
423
|
+
${r}
|
|
424
|
+
`,onClick:u,children:[u&&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})]}),_N=({rows:n})=>s.jsx("div",{className:"mt-6 w-full max-w-xl space-y-3","aria-hidden":"true",children:Array.from({length:n}).map((r,u)=>s.jsx("div",{className:"h-3 overflow-hidden rounded-full bg-slate-900/80 ring-1 ring-white/5",children:s.jsx("div",{className:"h-full w-1/2 animate-pulse rounded-full bg-gradient-to-r from-slate-800 via-indigo-500/30 to-slate-800",style:{animationDelay:`${u*120}ms`}})},u))}),Kg=({message:n,detail:r,rows:u})=>s.jsxs("div",{className:"flex flex-col items-center justify-center text-center",children:[s.jsx("div",{className:"relative mb-4 flex h-12 w-12 items-center justify-center rounded-xl border border-indigo-400/20 bg-indigo-500/10 text-indigo-300 shadow-[0_0_30px_-12px_rgba(99,102,241,0.9)]",children:s.jsx(gh,{className:"h-5 w-5 animate-spin"})}),s.jsx("div",{className:"text-sm font-medium text-slate-200",children:n}),r?s.jsx("div",{className:"mt-1 max-w-md text-xs text-slate-500",children:r}):null,u>0?s.jsx(_N,{rows:u}):null]}),La=({message:n="Loading...",detail:r,variant:u="page",rows:o=3})=>{const h=s.jsx(Kg,{message:n,detail:r,rows:o});return u==="inline"?s.jsx("div",{className:"flex min-h-24 items-center justify-center py-6",children:s.jsx(Kg,{message:n,detail:r,rows:0})}):u==="card"?s.jsx(et,{className:"p-8",children:h}):s.jsx("div",{className:"flex min-h-[420px] items-center justify-center",children:s.jsx(et,{className:"w-full max-w-2xl p-10",children:h})})};function zN(n){return`${Math.round(n*100)}%`}function ex(n){return new Date(n).toLocaleDateString([],{month:"short",day:"numeric"})}function tx(n){return(n==null?void 0:n.replace(/_/g," "))||"uncategorized"}const LN=({activePatterns:n,augmentations:r,topFailurePatterns:u,updatingAugmentationId:o=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(Tt,{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(Tt,{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:tx(f.category)}),s.jsxs("span",{children:[f.sampleCount," samples"]}),s.jsxs("span",{children:[zN(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(Tt,{variant:"neutral",children:u.length})]}),u.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:u.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||tx(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(Tt,{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(lj,{className:"h-3 w-3"}),s.jsxs("span",{children:["Last seen ",ex(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(Tt,{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 j=o===f.id,b=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(Tt,{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 · ",b]}),s.jsx("td",{className:"px-4 py-3 text-right text-xs text-slate-500",children:f.expiresAt?ex(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:j,onClick:()=>h(f.id,"disable"),children:[s.jsx(J1,{className:"mr-1.5 h-3.5 w-3.5"}),"Disable"]}),s.jsxs(Le,{variant:"ghost",size:"sm",disabled:j,onClick:()=>h(f.id,"expire"),className:"text-slate-500 hover:text-amber-300",children:[s.jsx(Yj,{className:"mr-1.5 h-3.5 w-3.5"}),"Expire"]})]})})]},f.id)})})]})})]})]});function Yr(n){return n===null?"—":`${Math.round(n*100)}%`}function ax(n){return n===null?"—":n<60?`${Math.round(n)}s`:`${Math.floor(n/60)}m ${Math.round(n%60)}s`}function UN(n,r){return Object.entries(n).sort(([,u],[,o])=>o-u).slice(0,r)}function Ju(n){return Object.entries(n).sort(([,r],[,u])=>u.totalCount-r.totalCount).slice(0,5).map(([r,u])=>[r,`${Yr(u.successRate)} · ${u.totalCount} runs`])}function nx(n,r){if(n===null||r===null)return"Waiting for comparable data";const u=Math.round((n-r)*100);return u===0?"Flat vs 30 days":`${u>0?"+":""}${u} pts vs 30 days`}function HN(n,r){return n===null||r===null?"neutral":n>=r?"success":"warning"}const Wl=({label:n,value:r,detail:u})=>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:u})]}),Mp=({variant:n="full",onViewDetails:r})=>{const{addToast:u,selectedProjectId:o,globalModeLoading:h}=Zt(),[f,j]=ze.useState(null),b=n==="compact",{data:y,loading:x,error:E,refetch:M}=Ua(rN,[o],{enabled:!h}),{data:D,loading:_,error:N,refetch:O}=Ua(iN,[o],{enabled:!h&&!b}),R=()=>{M(),b||O()},I=async(ie,ge)=>{j(ie);try{await cN(ie,{action:ge}),u({title:ge==="expire"?"Augmentation Expired":"Augmentation Disabled",message:"Prompt augmentation state was updated.",type:"success"}),R()}catch(pe){u({title:"Update Failed",message:pe instanceof Error?pe.message:"Failed to update augmentation",type:"error"})}finally{j(null)}},U=x||!b&&_,J=E||(b?null:N),k=(y==null?void 0:y.windows.last7Days)??null,w=(y==null?void 0:y.windows.last30Days)??null,q=((D==null?void 0:D.patterns)??[]).filter(ie=>ie.status==="active").sort((ie,ge)=>ge.confidence-ie.confidence||ge.sampleCount-ie.sampleCount).slice(0,5),G=(D==null?void 0:D.topFailurePatterns.slice(0,5))??[],Z=UN((w==null?void 0:w.byFailureCategory)??{},5),le=Math.max(...Z.map(([,ie])=>ie),1),S=((w==null?void 0:w.totalCount)??0)>0||((k==null?void 0:k.totalCount)??0)>0,te=HN((k==null?void 0:k.successRate)??null,(w==null?void 0:w.successRate)??null),ae=te==="success"?s.jsx(Wj,{className:"h-4 w-4"}):te==="warning"?s.jsx(Zj,{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:b?"Basic Analytics":"Analytics"}),s.jsx("p",{className:"mt-1 text-sm text-slate-500",children:b?"High-level job health. Full breakdowns live in Analytics.":"Outcome trends, repeated failures, provider breakdowns, and prompt augmentations."})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[b&&r?s.jsxs(Le,{variant:"outline",size:"sm",onClick:r,children:["View analytics",s.jsx(Zf,{className:"ml-1.5 h-4 w-4"})]}):null,s.jsxs(Le,{variant:"outline",size:"sm",onClick:R,disabled:U,children:[s.jsx(vc,{className:`mr-1.5 h-4 w-4 ${U?"animate-spin":""}`}),"Refresh"]})]})]}),s.jsx(et,{className:"p-5",children:U?s.jsx(La,{variant:"inline",message:"Loading analytics",detail:b?void 0:"Preparing trends, failure patterns, and provider breakdowns."}):J?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:J.message})]}):!y||!S?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."})]}):b?s.jsxs("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-4",children:[s.jsx(Wl,{label:"7 Day Success",value:Yr((k==null?void 0:k.successRate)??null),detail:`${(k==null?void 0:k.successCount)??0} of ${(k==null?void 0:k.totalCount)??0} completed`}),s.jsx(Wl,{label:"30 Day Success",value:Yr((w==null?void 0:w.successRate)??null),detail:nx((k==null?void 0:k.successRate)??null,(w==null?void 0:w.successRate)??null)}),s.jsx(Wl,{label:"Failures",value:String(((w==null?void 0:w.failureCount)??0)+((w==null?void 0:w.timeoutCount)??0)),detail:"Last 30 days"}),s.jsx(Wl,{label:"Avg Duration",value:ax((w==null?void 0:w.averageDurationSeconds)??null),detail:"Last 30 days"})]}):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(Wl,{label:"7 Day Success",value:Yr((k==null?void 0:k.successRate)??null),detail:`${(k==null?void 0:k.successCount)??0} of ${(k==null?void 0:k.totalCount)??0} completed`}),s.jsx(Wl,{label:"30 Day Success",value:Yr((w==null?void 0:w.successRate)??null),detail:`${(w==null?void 0:w.successCount)??0} of ${(w==null?void 0:w.totalCount)??0} completed`}),s.jsx(Wl,{label:"Failure Load",value:String(((w==null?void 0:w.failureCount)??0)+((w==null?void 0:w.timeoutCount)??0)),detail:`${(w==null?void 0:w.rateLimitedCount)??0} rate limited`}),s.jsx(Wl,{label:"Avg Duration",value:ax((w==null?void 0:w.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(Tt,{variant:te,className:"gap-1",children:[ae,nx((k==null?void 0:k.successRate)??null,(w==null?void 0:w.successRate)??null)]})]}),s.jsx("div",{className:"space-y-3",children:[{label:"Last 7 days",value:(k==null?void 0:k.successRate)??0},{label:"Last 30 days",value:(w==null?void 0:w.successRate)??0}].map(ie=>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:ie.label}),s.jsx("span",{className:"font-mono text-slate-300",children:Yr(ie.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(ie.value*100))}%`}})})]},ie.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(Tt,{variant:"neutral",children:Z.length})]}),Z.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:Z.map(([ie,ge])=>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:ie.replace(/_/g," ")}),s.jsx("span",{className:"font-mono text-slate-300",children:ge})]}),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(ge/le*100))}%`}})})]},ie))})]})]}),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(Tt,{variant:"neutral",children:Object.keys((w==null?void 0:w.byJobType)??{}).length})]}),Ju((w==null?void 0:w.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:Ju((w==null?void 0:w.byJobType)??{}).map(([ie,ge])=>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:ie}),s.jsx("span",{className:"text-xs text-slate-500",children:ge})]},ie))})]}),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(Tt,{variant:"neutral",children:Object.keys((w==null?void 0:w.byProvider)??{}).length})]}),Ju((w==null?void 0:w.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:Ju((w==null?void 0:w.byProvider)??{}).map(([ie,ge])=>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:ie}),s.jsx("span",{className:"text-xs text-slate-500",children:ge})]},ie))})]})]})]})}),b?null:s.jsx(et,{className:"p-5",children:s.jsx(LN,{activePatterns:q,augmentations:(y==null?void 0:y.activeAugmentations)??[],topFailurePatterns:G,updatingAugmentationId:f,onAugmentationAction:I})})]})},qN=()=>s.jsx(Mp,{variant:"full"}),Op={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"}},VN=({defaultColumn:n,onClose:r,onCreated:u})=>{const[o,h]=L.useState(""),[f,j]=L.useState(""),[b,y]=L.useState(n),[x,E]=L.useState(!1),[M,D]=L.useState(null),{addToast:_}=Zt(),N=async O=>{if(O.preventDefault(),!!o.trim()){E(!0),D(null);try{await mN({title:o.trim(),body:f,column:b}),_({title:"Issue created",message:`"${o.trim()}" added to ${b}`,type:"success"}),u(),r()}catch(R){D(R instanceof Error?R.message:"Failed to create issue")}finally{E(!1)}}};return s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick: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(Jr,{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:o,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:b,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:Kl.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=>j(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"})]}),M&&s.jsx("p",{className:"text-sm text-red-400",children:M}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(Le,{variant:"ghost",type:"button",onClick:r,children:"Cancel"}),s.jsx(Le,{type:"submit",disabled:x||!o.trim(),children:x?"Creating...":"Create Issue"})]})]})]})]})},BN=({issue:n,onClose:r,onMoved:u,onClosed:o})=>{const[h,f]=L.useState(!1),[j,b]=L.useState(!1),[y,x]=L.useState(!1),{addToast:E}=Zt(),M=async N=>{if(N!==n.column){f(!0);try{await Cp(n.number,N),E({title:"Issue moved",message:`#${n.number} moved to ${N}`,type:"success"}),u(),r()}catch(O){E({title:"Move failed",message:O instanceof Error?O.message:"Failed to move issue",type:"error"})}finally{f(!1)}}},D=async()=>{x(!1),b(!0);try{await gN(n.number),E({title:"Issue closed",message:`#${n.number} closed on GitHub`,type:"success"}),o(),r()}catch(N){E({title:"Close failed",message:N instanceof Error?N.message:"Failed to close issue",type:"error"})}finally{b(!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(Tt,{variant:Op[_].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(Jr,{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:"}),Kl.filter(N=>N!==n.column).map(N=>s.jsx("button",{onClick:()=>M(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(gp,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:()=>x(!0),disabled:j,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:j?"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:D,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."})})]})]})},PN=({issue:n,onClick:r,onDragStart:u})=>{const[o,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),u(n)},onDragEnd:()=>h(!1),children:s.jsxs(et,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${o?"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(", ")})]})})},$N=({name:n,issues:r,draggingIssue:u,onIssueClick:o,onNewIssue:h,onMoveIssue:f,onDragStart:j})=>{const b=Op[n],[y,x]=L.useState(!1),E=u!==null&&u.column!==n;return s.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${y&&E?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:M=>{E&&(M.preventDefault(),M.dataTransfer.dropEffect="move",x(!0))},onDragLeave:()=>x(!1),onDrop:M=>{M.preventDefault(),x(!1),u&&u.column!==n&&f(u,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 ${b.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(es,{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&&E?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:y&&E?"Drop here":"No issues"})}):r.map(M=>s.jsx(PN,{issue:M,onClick:()=>o(M),onDragStart:j},M.id))})]})},YN=()=>{const[n,r]=L.useState(null),[u,o]=L.useState(null),[h,f]=L.useState(null),[j,b]=L.useState(null),y=L.useRef(!1),{addToast:x,selectedProjectId:E,globalModeLoading:M}=Zt(),{data:D,loading:_,error:N,refetch:O}=Ua(Ep,[E],{enabled:!M});L.useEffect(()=>{const U=setInterval(()=>{y.current||O()},3e4);return()=>clearInterval(U)},[O]);const R=L.useCallback(async(U,J)=>{f(null);const k=j??(D==null?void 0:D.columns);if(!k)return;const w=k,q={};for(const Z of Kl)q[Z]=(k[Z]??[]).filter(le=>le.number!==U.number);const G={...U,column:J};q[J]=[...q[J]??[],G],b(q),r(Z=>(Z==null?void 0:Z.number)===U.number?G:Z),y.current=!0;try{await Cp(U.number,J),O(),setTimeout(()=>{b(null),y.current=!1},800)}catch(Z){b(w),r(le=>(le==null?void 0:le.number)===U.number?U:le),y.current=!1,x({title:"Move failed",message:Z instanceof Error?Z.message:"Failed to move issue",type:"error"})}},[x,O,j,D]);if(M||_)return s.jsx(La,{message:"Loading board",detail:"Fetching columns and issue cards."});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(!D)return null;const I=j??D.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:[Kl.reduce((U,J)=>{var k;return U+(((k=I[J])==null?void 0:k.length)??0)},0)," issues across ",Kl.length," columns"]})]}),s.jsxs(Le,{onClick:()=>o("Ready"),children:[s.jsx(es,{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:`${Kl.length*236}px`},children:Kl.map(U=>s.jsx($N,{name:U,issues:I[U]??[],draggingIssue:h,onIssueClick:r,onNewIssue:o,onMoveIssue:R,onDragStart:f},U))})}),n&&s.jsx(BN,{issue:n,onClose:()=>r(null),onMoved:()=>O(),onClosed:()=>O()}),u&&s.jsx(VN,{defaultColumn:u,onClose:()=>o(null),onCreated:()=>O()})]})},GN=[{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:"ux",displayName:"UX",processName:"ux",triggerId:"ux",runningLabel:"Inspecting",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"},{name:"manager",displayName:"Manager",processName:"manager",triggerId:"manager",runningLabel:"Monitoring",idleLabel:"Idle"}],FN=({processes:n,activePrd:r,onCancelProcess:u,onForceClear:o,onViewLog:h,cancellingProcess:f,clearingLock:j,onTriggerJob:b,triggeringJob:y})=>{const x=M=>n.find(D=>D.name===M),E=(M,D)=>M.length<=D?M:M.slice(0,D-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-9 gap-3",children:GN.map(M=>{const D=x(M.processName),_=(D==null?void 0:D.running)??!1,N=D==null?void 0:D.pid,O=f===M.cancelType,R=_&&M.cancelType,I=!_&&M.name==="executor"&&r,U=_?N?`PID: ${N}`:M.runningLabel:M.idleLabel,J=_&&M.name==="executor"&&r?E(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:M.displayName}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:J?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(If,{className:"h-3 w-3 flex-shrink-0"}),J]}):U})]}),s.jsxs("div",{className:"flex-shrink-0",children:[R&&s.jsx("button",{onClick:()=>M.cancelType&&u(M.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(Gg,{className:"h-3.5 w-3.5"})}),I&&s.jsx("button",{onClick:o,disabled:j,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(Gg,{className:"h-3.5 w-3.5"})}),!R&&!I&&_&&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(If,{className:"h-3.5 w-3.5"})}),!_&&!I&&s.jsx("button",{onClick:()=>b(M.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 ${M.displayName}`,children:y===M.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"})})]})]},M.name)})})},ZN={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"},IN=()=>{var ge,pe;const n=po(),[r,u]=L.useState(null),[o,h]=L.useState(!1),[f,j]=L.useState(null),[b,y]=L.useState(!1),{setProjectName:x,addToast:E,selectedProjectId:M,globalModeLoading:D,status:_}=Zt(),{data:N,loading:O}=Ua(Np,[M],{enabled:!D}),{data:R,loading:I}=Ua(()=>Ep().catch(()=>null),[M],{enabled:!D}),U=_;if(ze.useEffect(()=>{U!=null&&U.projectName&&x(U.projectName)},[U,x]),D||!U||O||I)return s.jsx(La,{message:"Loading dashboard",detail:"Collecting status, schedule, board, and analytics data."});const J=U.prs.length,k=U.prs.filter($=>$.reviewScore!==null&&$.reviewScore<70).length,w=((ge=R==null?void 0:R.columns.Ready)==null?void 0:ge.length)??0,q=((pe=R==null?void 0:R.columns["In Progress"])==null?void 0:pe.length)??0,G=async $=>{u($);try{const K=await hN($),fe=K.results.every(me=>me.success);E({title:fe?"Process Cancelled":"Cancel Failed",message:K.results.map(me=>me.message).join("; "),type:fe?"success":"error"})}catch(K){E({title:"Cancel Failed",message:K instanceof Error?K.message:"Failed to cancel process",type:"error"})}finally{u(null)}},Z=async()=>{h(!0);try{await xN(),E({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch($){E({title:"Clear Failed",message:$ instanceof Error?$.message:"Failed to clear lock",type:"error"})}finally{h(!1)}},le=async $=>{j($);try{await wp($==="planner"?"slicer":$),E({title:"Job Triggered",message:`${$[0].toUpperCase()+$.slice(1)} job has been queued.`,type:"success"})}catch(K){E({title:"Trigger Failed",message:K instanceof Error?K.message:`Failed to trigger ${$}`,type:"error"})}finally{j(null)}},S=async()=>{if(N){y(!0);try{N.paused?(await gc(),E({title:"Schedule Resumed",message:"Cron schedules are active.",type:"success"})):(await Sp(),E({title:"Schedule Paused",message:"Cron schedules are deactivated.",type:"info"}))}catch($){E({title:"Action Failed",message:$ instanceof Error?$.message:"Toggle failed",type:"error"})}finally{y(!1)}}},te=$=>{if(!$)return"Not scheduled";try{const K=new Date($),fe=new Date,me=K.getTime()-fe.getTime(),be=Math.floor(me/6e4);return be<0?"Running now...":be<60?`in ${be} min`:be<1440?`in ${Math.floor(be/60)} hr${be>=120?"s":""}`:`in ${Math.floor(be/1440)} day${be>=2880?"s":""}`}catch{return"Unknown"}},ie=(()=>{var fe,me,be,H,se,he,ye;if(N!=null&&N.paused)return null;const $=[{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:((fe=N==null?void 0:N.qa)==null?void 0:fe.nextRun)??null},{agent:"Auditor",nextRun:((me=N==null?void 0:N.audit)==null?void 0:me.nextRun)??null},{agent:"Planner",nextRun:((be=N==null?void 0:N.planner)==null?void 0:be.nextRun)??null},{agent:"Analytics",nextRun:((H=N==null?void 0:N.analytics)==null?void 0:H.nextRun)??null},{agent:"PR Resolver",nextRun:((se=N==null?void 0:N.prResolver)==null?void 0:se.nextRun)??null},{agent:"Merger",nextRun:((he=N==null?void 0:N.merger)==null?void 0:he.nextRun)??null},{agent:"Manager",nextRun:((ye=N==null?void 0:N.manager)==null?void 0:ye.nextRun)??null}];let K=null;for(const Re of $)Re.nextRun&&(!K||new Date(Re.nextRun)<new Date(K.nextRun))&&(K=Re);return K?{agent:K.agent,time:te(K.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(et,{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:w})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(Sc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(et,{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:q})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(dp,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(et,{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:J})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(mp,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${k>0?"text-red-400 font-medium":"text-slate-500"}`,children:k>0?`${k} need work`:"All passing"})]}),s.jsxs(et,{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":U.crontab.installed?"Active":"Inactive"})]}),s.jsx("button",{onClick:S,disabled:b||!N||!U.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":U.crontab.installed?"bg-indigo-500/10 text-indigo-400 hover:bg-indigo-500/20":"bg-slate-700/50 text-slate-500"}`,children:b?s.jsx(vc,{className:"h-5 w-5 animate-spin"}):N!=null&&N.paused?s.jsx(vn,{className:"h-5 w-5 fill-current"}):U.crontab.installed?s.jsx(uo,{className:"h-5 w-5"}):s.jsx(fp,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:N!=null&&N.paused?"All schedules paused":U.crontab.installed?`${U.crontab.entries.length} entr${U.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(et,{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(FN,{processes:U.processes,activePrd:U.activePrd,onCancelProcess:G,onForceClear:Z,onViewLog:()=>n("/logs"),cancellingProcess:r,clearingLock:o,onTriggerJob:le,triggeringJob:f})]}),ie?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:ie.agent}),s.jsx("span",{children:ie.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(Zf,{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(uo,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"Automation is paused"})]}),s.jsxs("button",{onClick:S,disabled:b,className:"text-sm text-emerald-400 hover:text-emerald-300 flex items-center transition-colors disabled:opacity-50",children:[b?s.jsx(vc,{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(Mp,{variant:"compact",onViewDetails:()=>n("/analytics")}),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(Zf,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(et,{className:"p-4",children:I?s.jsx(La,{variant:"inline",message:"Loading board"}):R?s.jsx("div",{className:"flex flex-wrap gap-3",children:Kl.map($=>{var fe;const K=((fe=R.columns[$])==null?void 0:fe.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 ${ZN[$]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:$}),s.jsx("span",{className:"text-xs font-bold",children:K})]},$)})}):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."]})})]})]})},WN=()=>{const[n,r]=L.useState(!0),[u,o]=L.useState(""),[h,f]=L.useState("executor"),j=L.useRef(null),{selectedProjectId:b,globalModeLoading:y}=Zt(),x=Zt(U=>U.status),{data:E,loading:M,error:D,refetch:_}=Ua(()=>uN(h,500),[h,b],{enabled:!y}),N=(E==null?void 0:E.lines)||[];L.useEffect(()=>{n&&j.current&&(j.current.scrollTop=j.current.scrollHeight)},[N,n]),L.useEffect(()=>{if(!n)return;const U=window.setInterval(()=>{_()},3e3);return()=>window.clearInterval(U)},[n,h,_]);const O=N.filter(U=>U.toLowerCase().includes(u.toLowerCase())),R=U=>{f(U),o("")},I=U=>{if(!(x!=null&&x.processes))return!1;const J=x.processes.find(k=>k.name===U);return(J==null?void 0:J.running)??!1};return D?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:D.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:u,onChange:U=>o(U.target.value)}),s.jsx(Xr,{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:vp.map(({processName:U,label:J})=>s.jsx("button",{onClick:()=>R(U),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${h===U?"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:J}),I(U)&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})},U))})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(Le,{size:"sm",variant:"ghost",onClick:()=>_(),children:[s.jsx(Bg,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Le,{size:"sm",variant:"ghost",onClick:()=>r(!n),children:[n?s.jsx(uo,{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:j,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[M?s.jsx(La,{variant:"inline",message:"Loading logs"}):O.length===0?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:u?"No logs match your filter":"No logs yet — logs will appear after the first run"}):O.map((U,J)=>{const k=U.includes("[ERROR]"),w=U.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${k?"text-red-400":w?"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:J+1}),U]},J)}),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(Bg,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},QN=()=>{const[n,r]=L.useState(null),[u,o]=L.useState(!1),[h,f]=L.useState("all"),[j,b]=L.useState("number"),[y,x]=L.useState("desc"),{addToast:E,selectedProjectId:M,globalModeLoading:D}=Zt(),{data:_,loading:N,error:O,refetch:R}=Ua(jp,[M],{enabled:!D}),I=_??[],U=S=>{switch(S){case"pass":return s.jsx(Sc,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(ej,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(gh,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(yn,{className:"h-4 w-4 text-slate-500"})}},J=S=>{switch(S){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"}},k=S=>S===null?"No review decision yet":S===100?"PR has been approved":S===0?"Changes have been requested":`Review score: ${S}`,w=L.useMemo(()=>I.filter(S=>{switch(h){case"needs-work":return S.ciStatus==="fail"||S.reviewScore===0;case"pending":return S.ciStatus==="pending"||S.ciStatus==="unknown"||S.reviewScore===null;case"passed":return S.ciStatus==="pass"&&S.reviewScore===100;case"all":default:return!0}}),[I,h]),q=L.useMemo(()=>[...w].sort((te,ae)=>{let ie=0;switch(j){case"number":ie=te.number-ae.number;break;case"title":ie=te.title.localeCompare(ae.title);break;case"branch":ie=te.branch.localeCompare(ae.branch);break;case"ciStatus":{const ge={fail:0,pending:1,unknown:2,pass:3};ie=(ge[te.ciStatus]??2)-(ge[ae.ciStatus]??2);break}case"reviewScore":{const ge=te.reviewScore??-1,pe=ae.reviewScore??-1;ie=ge-pe;break}}return y==="asc"?ie:-ie}),[w,j,y]),G=S=>{j===S?x(y==="asc"?"desc":"asc"):(b(S),x("desc"))},Z=S=>j!==S?s.jsx(M1,{className:"h-3 w-3 text-slate-600"}):y==="asc"?s.jsx(R1,{className:"h-3 w-3 text-indigo-400"}):s.jsx(E1,{className:"h-3 w-3 text-indigo-400"});if(N)return s.jsx(La,{message:"Loading pull requests",detail:"Fetching review status and CI results."});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:()=>R(),children:"Retry"})]});const le=async()=>{o(!0);try{const S=await fN();E({title:"Reviewer Started",message:S.pid?`Started with PID ${S.pid}`:"Reviewer started",type:"success"})}catch(S){E({title:"Reviewer Failed",message:S instanceof Error?S.message:"Failed to start reviewer",type:"error"})}finally{o(!1)}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("button",{onClick:()=>f("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${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:le,disabled:u,children:[s.jsx(Xr,{className:"h-4 w-4 mr-2"}),u?"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:()=>G("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),Z("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:()=>G("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),Z("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:()=>G("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),Z("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:()=>G("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),Z("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:[q.map(S=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>r(n===S.number?null:S.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:["#",S.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:S.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:S.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:J(S.ciStatus),children:[U(S.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:S.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:S.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:k(S.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${S.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${S.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${S.reviewScore>=70?"text-green-500":"text-red-500"}`,children:S.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:S.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:te=>te.stopPropagation(),children:s.jsx(gp,{className:"h-4 w-4"})})})]},S.number)),q.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:I.length===0?"No open PRs found.":`No PRs match the "${h}" filter.`})})]})]})}),n&&s.jsx(et,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const S=I.find(te=>te.number===n);return S?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:S.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:S.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:J(S.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:[U(S.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:S.ciStatus})]})]}),S.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:k(S.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${S.reviewScore>=70?"text-green-500":"text-red-500"}`,children:S.reviewScore})]})]})]}):null})()})]})},Pt=ze.forwardRef(({className:n="",label:r,checked:u,onChange:o,...h},f)=>{const j=b=>{o&&o(b.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:u,onChange:j,...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})]})});Pt.displayName="Switch";const XN=()=>{const{addToast:n,selectedProjectId:r,globalModeLoading:u}=Zt(),[o,h]=L.useState(!1),[f,j]=L.useState(!1),{data:b,loading:y,error:x,refetch:E}=Ua(jN,[r],{enabled:!u});L.useEffect(()=>{if(!(b!=null&&b.enabled))return;const U=setInterval(()=>{E()},1e4);return()=>clearInterval(U)},[b==null?void 0:b.enabled,E]);const M=async U=>{j(!0);try{await Tp(U),n({title:U?"Scanner Enabled":"Scanner Disabled",message:U?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:U?"success":"info"}),E()}catch(J){n({title:"Toggle Failed",message:J instanceof Error?J.message:"Failed to toggle scanner",type:"error"})}finally{j(!1)}},D=async()=>{h(!0);try{const U=await NN();U.created.length>0?n({title:"Scan Complete",message:`Created ${U.created.length} PRD(s): ${U.created.join(", ")}`,type:"success"}):n({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),U.errors.length>0&&n({title:"Scan Errors",message:U.errors.join("; "),type:"warning"}),E()}catch(U){n({title:"Scan Failed",message:U instanceof Error?U.message:"Failed to scan roadmap",type:"error"})}finally{h(!1)}};if(y)return s.jsx(La,{message:"Loading roadmap scanner",detail:"Checking scanner status and roadmap items."});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:()=>E(),children:"Retry"})]});if(!b)return null;if(b.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(et,{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(xp,{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 _=b.totalItems>0?Math.round(b.processedItems/b.totalItems*100):0,N=KN(b.status),O=e2(b.items),R=b.lastScan?t2(b.lastScan):"Never",I=b.autoScanInterval?Math.round(b.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(Pt,{label:b.enabled?"Enabled":"Disabled",checked:b.enabled,onChange:M,disabled:f}),s.jsxs(Le,{onClick:D,loading:o,disabled:!b.enabled||b.status==="complete",children:[s.jsx(vn,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(et,{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:R})]}),b.enabled&&b.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",I," min"]})]}),b.enabled&&b.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(et,{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:[b.processedItems," / ",b.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(([U,J])=>s.jsxs(et,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:U}),s.jsx("div",{className:"space-y-2",children:J.map(k=>s.jsx(JN,{item:k},k.hash))})]},U))]})};function JN({item:n}){const r=n.checked,u=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":u?"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(Ej,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):u?s.jsx(Sc,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(If,{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(Tt,{variant:"neutral",children:"Skipped"}):u?s.jsx(Tt,{variant:"success",children:n.prdFile||"Processed"}):s.jsx(Tt,{variant:"warning",children:"Pending"})})]})}function KN(n){switch(n){case"complete":return{label:"Complete",icon:Sc,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:mp,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 e2(n){const r={};for(const u of n){const o=u.section||"General";r[o]||(r[o]=[]),r[o].push(u)}return r}function t2(n){try{const r=new Date(n),o=new Date().getTime()-r.getTime(),h=Math.floor(o/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 We=ze.forwardRef(({className:n="",label:r,error:u,helperText:o,options:h,value:f,onChange:j,children:b,...y},x)=>{const E=ze.useId(),M=y.id??E,D=u?`${M}-error`:void 0,_=!u&&o?`${M}-help`:void 0,N=[D,_].filter(Boolean).join(" ")||void 0,O=R=>{j&&j(R.target.value)};return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:M,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:M,"aria-describedby":N,"aria-invalid":u?!0:y["aria-invalid"],className:`
|
|
425
|
+
w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
|
|
426
|
+
px-3 py-2 pr-10 text-sm text-slate-200
|
|
427
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
428
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
429
|
+
transition-all duration-200
|
|
430
|
+
${u?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
431
|
+
${n}
|
|
432
|
+
`,value:f,onChange:O,...y,children:h?h.map(R=>s.jsx("option",{value:R.value,children:R.label},R.value)):b}),s.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:s.jsx(fh,{className:"h-4 w-4"})})]}),u?s.jsx("p",{id:D,className:"mt-1.5 text-xs text-red-400",children:u}):o?s.jsx("p",{id:_,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});We.displayName="Select";const je=ze.forwardRef(({className:n="",label:r,error:u,helperText:o,rightIcon:h,...f},j)=>{const b=ze.useId(),y=f.id??b,x=u?`${y}-error`:void 0,E=!u&&o?`${y}-help`:void 0,M=[x,E].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:j,id:y,"aria-describedby":M,"aria-invalid":u?!0:f["aria-invalid"],className:`
|
|
433
|
+
w-full rounded-lg bg-slate-950 border border-slate-800
|
|
434
|
+
px-3 py-2 text-sm text-slate-200
|
|
435
|
+
placeholder:text-slate-600
|
|
436
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
437
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
438
|
+
transition-all duration-200
|
|
439
|
+
${u?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
440
|
+
${h?"pr-10":""}
|
|
441
|
+
${n}
|
|
442
|
+
`,...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})]}),u?s.jsx("p",{id:x,className:"mt-1.5 text-xs text-red-400",children:u}):o?s.jsx("p",{id:E,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});je.displayName="Input";const Rp=({tabs:n,activeTab:r,onChange:u,className:o=""})=>{var y,x;const[h,f]=ze.useState((y=n[0])==null?void 0:y.id),j=r||h,b=E=>{u?u(E):f(E)};return s.jsxs("div",{className:`flex flex-col ${o}`,children:[s.jsx("div",{className:"border-b border-slate-800 mb-6",children:s.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:n.map(E=>s.jsx("button",{onClick:()=>b(E.id),className:`
|
|
443
|
+
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
444
|
+
${j===E.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
445
|
+
`,children:E.label},E.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(x=n.find(E=>E.id===j))==null?void 0:x.content})]})};var Vs={},za={},nc={},Bs={},Hf={},lx;function a2(){return lx||(lx=1,Object.defineProperty(Hf,"__esModule",{value:!0})),Hf}var lc={},sc={},sx;function Ws(){var r,u,o,h,f,Dp,b;if(sx)return sc;sx=1,Object.defineProperty(sc,"__esModule",{value:!0}),sc.CronField=void 0;let n=(b=class{constructor(x,E={rawValue:""}){at(this,f);at(this,r,!1);at(this,u,!1);at(this,o,!1);at(this,h,[]);Ng(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={...E,rawValue:E.rawValue??""},Oe(this,h,x.sort(b.sorter)),Oe(this,o,this.options.wildcard!==void 0?this.options.wildcard:Te(this,f,Dp).call(this)),Oe(this,r,this.options.rawValue.includes("L")||x.includes("L")),Oe(this,u,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,u)}get isWildcard(){return ee(this,o)}get values(){return ee(this,h)}static sorter(x,E){const M=typeof x=="number",D=typeof E=="number";return M&&D?x-E:!M&&!D?x.localeCompare(E):M?-1:1}static findNearestValueInList(x,E,M=!1){if(M){for(let D=x.length-1;D>=0;D--)if(x[D]<E)return x[D];return null}for(let D=0;D<x.length;D++)if(x[D]>E)return x[D];return null}findNearestValue(x,E=!1){return this.constructor.findNearestValueInList(this.values,x,E)}serialize(){return{wildcard:ee(this,o),values:ee(this,h)}}validate(){let x;const E=this.chars.length>0?` or chars ${this.chars.join("")}`:"",M=O=>R=>new RegExp(`^\\d{0,2}${R}$`).test(O),D=O=>(x=O,typeof O=="number"?O>=this.min&&O<=this.max:this.chars.some(M(O)));if(!ee(this,h).every(D))throw new Error(`${this.constructor.name} Validation error, got value ${x} expected range ${this.min}-${this.max}${E}`);const N=ee(this,h).find((O,R)=>ee(this,h).indexOf(O)!==R);if(N)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${N}`)}},r=new WeakMap,u=new WeakMap,o=new WeakMap,h=new WeakMap,f=new WeakSet,Dp=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(x,E)=>E+this.min).every(x=>ee(this,h).includes(x))},b);return sc.CronField=n,sc}var rx;function n2(){if(rx)return lc;rx=1,Object.defineProperty(lc,"__esModule",{value:!0}),lc.CronDayOfMonth=void 0;const n=Ws(),r=1,u=31,o=Object.freeze(["L"]);let h=class extends n.CronField{static get min(){return r}static get max(){return u}static get chars(){return o}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(j,b){super(j,b),this.validate()}get values(){return super.values}};return lc.CronDayOfMonth=h,lc}var rc={},ix;function l2(){if(ix)return rc;ix=1,Object.defineProperty(rc,"__esModule",{value:!0}),rc.CronDayOfWeek=void 0;const n=Ws(),r=0,u=7,o=Object.freeze(["L"]);let h=class extends n.CronField{static get min(){return r}static get max(){return u}static get chars(){return o}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(j,b){super(j,b),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return rc.CronDayOfWeek=h,rc}var ic={},cx;function s2(){if(cx)return ic;cx=1,Object.defineProperty(ic,"__esModule",{value:!0}),ic.CronHour=void 0;const n=Ws(),r=0,u=23,o=Object.freeze([]);let h=class extends n.CronField{static get min(){return r}static get max(){return u}static get chars(){return o}constructor(j,b){super(j,b),this.validate()}get values(){return super.values}};return ic.CronHour=h,ic}var cc={},ux;function r2(){if(ux)return cc;ux=1,Object.defineProperty(cc,"__esModule",{value:!0}),cc.CronMinute=void 0;const n=Ws(),r=0,u=59,o=Object.freeze([]);let h=class extends n.CronField{static get min(){return r}static get max(){return u}static get chars(){return o}constructor(j,b){super(j,b),this.validate()}get values(){return super.values}};return cc.CronMinute=h,cc}var uc={},qf={},Ca={},ox;function i2(){if(ox)return Ca;ox=1,Object.defineProperty(Ca,"__esModule",{value:!0});class n extends Error{}class r extends n{constructor(i){super(`Invalid DateTime: ${i.toMessage()}`)}}class u extends n{constructor(i){super(`Invalid Interval: ${i.toMessage()}`)}}class o extends n{constructor(i){super(`Invalid Duration: ${i.toMessage()}`)}}class h extends n{}class f extends n{constructor(i){super(`Invalid unit ${i}`)}}class j extends n{}class b extends n{constructor(){super("Zone is an abstract class")}}const y="numeric",x="short",E="long",M={year:y,month:y,day:y},D={year:y,month:x,day:y},_={year:y,month:x,day:y,weekday:x},N={year:y,month:E,day:y},O={year:y,month:E,day:y,weekday:E},R={hour:y,minute:y},I={hour:y,minute:y,second:y},U={hour:y,minute:y,second:y,timeZoneName:x},J={hour:y,minute:y,second:y,timeZoneName:E},k={hour:y,minute:y,hourCycle:"h23"},w={hour:y,minute:y,second:y,hourCycle:"h23"},q={hour:y,minute:y,second:y,hourCycle:"h23",timeZoneName:x},G={hour:y,minute:y,second:y,hourCycle:"h23",timeZoneName:E},Z={year:y,month:y,day:y,hour:y,minute:y},le={year:y,month:y,day:y,hour:y,minute:y,second:y},S={year:y,month:x,day:y,hour:y,minute:y},te={year:y,month:x,day:y,hour:y,minute:y,second:y},ae={year:y,month:x,day:y,weekday:x,hour:y,minute:y},ie={year:y,month:E,day:y,hour:y,minute:y,timeZoneName:x},ge={year:y,month:E,day:y,hour:y,minute:y,second:y,timeZoneName:x},pe={year:y,month:E,day:y,weekday:E,hour:y,minute:y,timeZoneName:E},$={year:y,month:E,day:y,weekday:E,hour:y,minute:y,second:y,timeZoneName:E};class K{get type(){throw new b}get name(){throw new b}get ianaName(){return this.name}get isUniversal(){throw new b}offsetName(i,m){throw new b}formatOffset(i,m){throw new b}offset(i){throw new b}equals(i){throw new b}get isValid(){throw new b}}let fe=null;class me extends K{static get instance(){return fe===null&&(fe=new me),fe}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(i,{format:m,locale:v}){return $n(i,m,v)}formatOffset(i,m){return os(this.offset(i),m)}offset(i){return-new Date(i).getTimezoneOffset()}equals(i){return i.type==="system"}get isValid(){return!0}}const be=new Map;function H(g){let i=be.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"}),be.set(g,i)),i}const se={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function he(g,i){const m=g.format(i).replace(/\u200E/g,""),v=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(m),[,C,A,V,B,Y,de,Ne]=v;return[V,C,A,B,Y,de,Ne]}function ye(g,i){const m=g.formatToParts(i),v=[];for(let C=0;C<m.length;C++){const{type:A,value:V}=m[C],B=se[A];A==="era"?v[B]=V:ke(B)||(v[B]=parseInt(V,10))}return v}const Re=new Map;class xe extends K{static create(i){let m=Re.get(i);return m===void 0&&Re.set(i,m=new xe(i)),m}static resetCache(){Re.clear(),be.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 $n(i,m,v,this.name)}formatOffset(i,m){return os(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[C,A,V,B,Y,de,Ne]=v.formatToParts?ye(v,m):he(v,m);B==="BC"&&(C=-Math.abs(C)+1);const Fe=ea({year:C,month:A,day:V,hour:Y===24?0:Y,minute:de,second:Ne,millisecond:0});let Ae=+m;const Nt=Ae%1e3;return Ae-=Nt>=0?Nt:1e3+Nt,(Fe-Ae)/(60*1e3)}equals(i){return i.type==="iana"&&i.name===this.name}get isValid(){return this.valid}}let Se={};function lt(g,i={}){const m=JSON.stringify([g,i]);let v=Se[m];return v||(v=new Intl.ListFormat(g,i),Se[m]=v),v}const Ye=new Map;function wt(g,i={}){const m=JSON.stringify([g,i]);let v=Ye.get(m);return v===void 0&&(v=new Intl.DateTimeFormat(g,i),Ye.set(m,v)),v}const oa=new Map;function Ta(g,i={}){const m=JSON.stringify([g,i]);let v=oa.get(m);return v===void 0&&(v=new Intl.NumberFormat(g,i),oa.set(m,v)),v}const Va=new Map;function da(g,i={}){const{base:m,...v}=i,C=JSON.stringify([g,v]);let A=Va.get(C);return A===void 0&&(A=new Intl.RelativeTimeFormat(g,i),Va.set(C,A)),A}let ma=null;function bn(){return ma||(ma=new Intl.DateTimeFormat().resolvedOptions().locale,ma)}const jn=new Map;function Nn(g){let i=jn.get(g);return i===void 0&&(i=new Intl.DateTimeFormat(g).resolvedOptions(),jn.set(g,i)),i}const Ba=new Map;function Pa(g){let i=Ba.get(g);if(!i){const m=new Intl.Locale(g);i="getWeekInfo"in m?m.getWeekInfo():m.weekInfo,"minimalDays"in i||(i={...hl,...i}),Ba.set(g,i)}return i}function It(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,C;try{v=wt(g).resolvedOptions(),C=g}catch{const Y=g.substring(0,m);v=wt(Y).resolvedOptions(),C=Y}const{numberingSystem:A,calendar:V}=v;return[C,A,V]}}function $a(g,i,m){return(m||i)&&(g.includes("-u-")||(g+="-u"),m&&(g+=`-ca-${m}`),i&&(g+=`-nu-${i}`)),g}function ts(g){const i=[];for(let m=1;m<=12;m++){const v=Me.utc(2009,m,1);i.push(g(v))}return i}function vt(g){const i=[];for(let m=1;m<=7;m++){const v=Me.utc(2016,11,13+m);i.push(g(v))}return i}function Jt(g,i,m,v){const C=g.listingMode();return C==="error"?null:C==="en"?m(i):v(i)}function qn(g){return g.numberingSystem&&g.numberingSystem!=="latn"?!1:g.numberingSystem==="latn"||!g.locale||g.locale.startsWith("en")||Nn(g.locale).numberingSystem==="latn"}class Qs{constructor(i,m,v){this.padTo=v.padTo||0,this.floor=v.floor||!1;const{padTo:C,floor:A,...V}=v;if(!m||Object.keys(V).length>0){const B={useGrouping:!1,...v};v.padTo>0&&(B.minimumIntegerDigits=v.padTo),this.inf=Ta(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):is(i,3);return st(m,this.padTo)}}}class as{constructor(i,m,v){this.opts=v,this.originalZone=void 0;let C;if(this.opts.timeZone)this.dt=i;else if(i.zone.type==="fixed"){const V=-1*(i.offset/60),B=V>=0?`Etc/GMT+${V}`:`Etc/GMT${V}`;i.offset!==0&&xe.create(B).valid?(C=B,this.dt=i):(C="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,C=i.zone.name):(C="UTC",this.dt=i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone);const A={...this.opts};A.timeZone=A.timeZone||C,this.dtf=wt(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 Kr{constructor(i,m,v){this.opts={style:"long",...v},!m&&ai()&&(this.rtf=da(i,v))}format(i,m){return this.rtf?this.rtf.format(i,m):Cn(m,i,this.opts.numeric,this.opts.style!=="long")}formatToParts(i,m){return this.rtf?this.rtf.formatToParts(i,m):[]}}const hl={firstDay:1,minimalDays:4,weekend:[6,7]};class Qe{static fromOpts(i){return Qe.create(i.locale,i.numberingSystem,i.outputCalendar,i.weekSettings,i.defaultToEN)}static create(i,m,v,C,A=!1){const V=i||mt.defaultLocale,B=V||(A?"en-US":bn()),Y=m||mt.defaultNumberingSystem,de=v||mt.defaultOutputCalendar,Ne=ni(C)||mt.defaultWeekSettings;return new Qe(B,Y,de,Ne,V)}static resetCache(){ma=null,Ye.clear(),oa.clear(),Va.clear(),jn.clear(),Ba.clear()}static fromObject({locale:i,numberingSystem:m,outputCalendar:v,weekSettings:C}={}){return Qe.create(i,m,v,C)}constructor(i,m,v,C,A){const[V,B,Y]=It(i);this.locale=V,this.numberingSystem=m||B||null,this.outputCalendar=v||Y||null,this.weekSettings=C,this.intl=$a(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=qn(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:Qe.create(i.locale||this.specifiedLocale,i.numberingSystem||this.numberingSystem,i.outputCalendar||this.outputCalendar,ni(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 Jt(this,i,Ac,()=>{const v=this.intl==="ja"||this.intl.startsWith("ja-");m&=!v;const C=m?{month:i,day:"numeric"}:{month:i},A=m?"format":"standalone";if(!this.monthsCache[A][i]){const V=v?B=>this.dtFormatter(B,C).format():B=>this.extract(B,C,"month");this.monthsCache[A][i]=ts(V)}return this.monthsCache[A][i]})}weekdays(i,m=!1){return Jt(this,i,ir,()=>{const v=m?{weekday:i,year:"numeric",month:"long",day:"numeric"}:{weekday:i},C=m?"format":"standalone";return this.weekdaysCache[C][i]||(this.weekdaysCache[C][i]=vt(A=>this.extract(A,v,"weekday"))),this.weekdaysCache[C][i]})}meridiems(){return Jt(this,void 0,()=>Yn,()=>{if(!this.meridiemCache){const i={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Me.utc(2016,11,13,9),Me.utc(2016,11,13,19)].map(m=>this.extract(m,i,"dayperiod"))}return this.meridiemCache})}eras(i){return Jt(this,i,ci,()=>{const m={era:i};return this.eraCache[i]||(this.eraCache[i]=[Me.utc(-40,1,1),Me.utc(2017,1,1)].map(v=>this.extract(v,m,"era"))),this.eraCache[i]})}extract(i,m,v){const C=this.dtFormatter(i,m),A=C.formatToParts(),V=A.find(B=>B.type.toLowerCase()===v);return V?V.value:null}numberFormatter(i={}){return new Qs(this.intl,i.forceSimple||this.fastNumbers,i)}dtFormatter(i,m={}){return new as(i,this.intl,m)}relFormatter(i={}){return new Kr(this.intl,this.isEnglish(),i)}listFormatter(i={}){return lt(this.intl,i)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Nn(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Sn()?Pa(this.locale):hl}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 ml=null;class gt extends K{static get utcInstance(){return ml===null&&(ml=new gt(0)),ml}static instance(i){return i===0?gt.utcInstance:new gt(i)}static parseSpecifier(i){if(i){const m=i.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(m)return new gt(us(m[1],m[2]))}return null}constructor(i){super(),this.fixed=i}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${os(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${os(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(i,m){return os(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 $t extends K{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 _t(g,i){if(ke(g)||g===null)return i;if(g instanceof K)return g;if(Lt(g)){const m=g.toLowerCase();return m==="default"?i:m==="local"||m==="system"?me.instance:m==="utc"||m==="gmt"?gt.utcInstance:gt.parseSpecifier(m)||xe.create(g)}else return xa(g)?gt.instance(g):typeof g=="object"&&"offset"in g&&typeof g.offset=="function"?g:new $t(g)}const zt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},ns={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]},Xs=zt.hanidec.replace(/[\[|\]]/g,"").split("");function Js(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(zt.hanidec)!==-1)i+=Xs.indexOf(g[m]);else for(const C in ns){const[A,V]=ns[C];v>=A&&v<=V&&(i+=v-A)}}return parseInt(i,10)}else return i}const nn=new Map;function ue(){nn.clear()}function ve({numberingSystem:g},i=""){const m=g||"latn";let v=nn.get(m);v===void 0&&(v=new Map,nn.set(m,v));let C=v.get(i);return C===void 0&&(C=new RegExp(`${zt[m]}${i}`),v.set(i,C)),C}let Be=()=>Date.now(),St="system",ht=null,wn=null,ls=null,Ks=60,gl,Ec=null;class mt{static get now(){return Be}static set now(i){Be=i}static set defaultZone(i){St=i}static get defaultZone(){return _t(St,me.instance)}static get defaultLocale(){return ht}static set defaultLocale(i){ht=i}static get defaultNumberingSystem(){return wn}static set defaultNumberingSystem(i){wn=i}static get defaultOutputCalendar(){return ls}static set defaultOutputCalendar(i){ls=i}static get defaultWeekSettings(){return Ec}static set defaultWeekSettings(i){Ec=ni(i)}static get twoDigitCutoffYear(){return Ks}static set twoDigitCutoffYear(i){Ks=i%100}static get throwOnInvalid(){return gl}static set throwOnInvalid(i){gl=i}static resetCaches(){Qe.resetCache(),xe.resetCache(),Me.resetCache(),ue()}}class ga{constructor(i,m){this.reason=i,this.explanation=m}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const ei=[0,31,59,90,120,151,181,212,243,273,304,334],er=[0,31,60,91,121,152,182,213,244,274,305,335];function ra(g,i){return new ga("unit out of range",`you specified ${i} (of type ${typeof i}) as a ${g}, which is invalid`)}function tr(g,i,m){const v=new Date(Date.UTC(g,i-1,m));g<100&&g>=0&&v.setUTCFullYear(v.getUTCFullYear()-1900);const C=v.getUTCDay();return C===0?7:C}function ti(g,i,m){return m+(pl(g)?er:ei)[i-1]}function ln(g,i){const m=pl(g)?er:ei,v=m.findIndex(A=>A<i),C=i-m[v];return{month:v+1,day:C}}function Mt(g,i){return(g-i+7)%7+1}function Yt(g,i=4,m=1){const{year:v,month:C,day:A}=g,V=ti(v,C,A),B=Mt(tr(v,C,A),m);let Y=Math.floor((V-B+14-i)/7),de;return Y<1?(de=v-1,Y=vl(de,i,m)):Y>vl(v,i,m)?(de=v+1,Y=1):de=v,{weekYear:de,weekNumber:Y,weekday:B,...ds(g)}}function Vn(g,i=4,m=1){const{weekYear:v,weekNumber:C,weekday:A}=g,V=Mt(tr(v,1,i),m),B=rn(v);let Y=C*7+A-V-7+i,de;Y<1?(de=v-1,Y+=rn(de)):Y>B?(de=v+1,Y-=rn(v)):de=v;const{month:Ne,day:Ue}=ln(de,Y);return{year:de,month:Ne,day:Ue,...ds(g)}}function ss(g){const{year:i,month:m,day:v}=g,C=ti(i,m,v);return{year:i,ordinal:C,...ds(g)}}function Cc(g){const{year:i,ordinal:m}=g,{month:v,day:C}=ln(i,m);return{year:i,month:v,day:C,...ds(g)}}function Tc(g,i){if(!ke(g.localWeekday)||!ke(g.localWeekNumber)||!ke(g.localWeekYear)){if(!ke(g.weekday)||!ke(g.weekNumber)||!ke(g.weekYear))throw new h("Cannot mix locale-based week fields with ISO-based week fields");return ke(g.localWeekday)||(g.weekday=g.localWeekday),ke(g.localWeekNumber)||(g.weekNumber=g.localWeekNumber),ke(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 Mc(g,i=4,m=1){const v=sn(g.weekYear),C=Kt(g.weekNumber,1,vl(g.weekYear,i,m)),A=Kt(g.weekday,1,7);return v?C?A?!1:ra("weekday",g.weekday):ra("week",g.weekNumber):ra("weekYear",g.weekYear)}function rs(g){const i=sn(g.year),m=Kt(g.ordinal,1,rn(g.year));return i?m?!1:ra("ordinal",g.ordinal):ra("year",g.year)}function ar(g){const i=sn(g.year),m=Kt(g.month,1,12),v=Kt(g.day,1,lr(g.year,g.month));return i?m?v?!1:ra("day",g.day):ra("month",g.month):ra("year",g.year)}function Bn(g){const{hour:i,minute:m,second:v,millisecond:C}=g,A=Kt(i,0,23)||i===24&&m===0&&v===0&&C===0,V=Kt(m,0,59),B=Kt(v,0,59),Y=Kt(C,0,999);return A?V?B?Y?!1:ra("millisecond",C):ra("second",v):ra("minute",m):ra("hour",i)}function ke(g){return typeof g>"u"}function xa(g){return typeof g=="number"}function sn(g){return typeof g=="number"&&g%1===0}function Lt(g){return typeof g=="string"}function Oc(g){return Object.prototype.toString.call(g)==="[object Date]"}function ai(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Sn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function xl(g){return Array.isArray(g)?g:[g]}function Rc(g,i,m){if(g.length!==0)return g.reduce((v,C)=>{const A=[i(C),C];return v&&m(v[0],A[0])===v[0]?v:A},null)[1]}function Dc(g,i){return i.reduce((m,v)=>(m[v]=g[v],m),{})}function Pn(g,i){return Object.prototype.hasOwnProperty.call(g,i)}function ni(g){if(g==null)return null;if(typeof g!="object")throw new j("Week settings must be an object");if(!Kt(g.firstDay,1,7)||!Kt(g.minimalDays,1,7)||!Array.isArray(g.weekend)||g.weekend.some(i=>!Kt(i,1,7)))throw new j("Invalid week settings");return{firstDay:g.firstDay,minimalDays:g.minimalDays,weekend:Array.from(g.weekend)}}function Kt(g,i,m){return sn(g)&&g>=i&&g<=m}function nr(g,i){return g-i*Math.floor(g/i)}function st(g,i=2){const m=g<0;let v;return m?v="-"+(""+-g).padStart(i,"0"):v=(""+g).padStart(i,"0"),v}function Ot(g){if(!(ke(g)||g===null||g===""))return parseInt(g,10)}function En(g){if(!(ke(g)||g===null||g===""))return parseFloat(g)}function li(g){if(!(ke(g)||g===null||g==="")){const i=parseFloat("0."+g)*1e3;return Math.floor(i)}}function is(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 pl(g){return g%4===0&&(g%100!==0||g%400===0)}function rn(g){return pl(g)?366:365}function lr(g,i){const m=nr(i-1,12)+1,v=g+(i-m)/12;return m===2?pl(v)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][m-1]}function ea(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 sr(g,i,m){return-Mt(tr(g,1,i),m)+i-1}function vl(g,i=4,m=1){const v=sr(g,i,m),C=sr(g+1,i,m);return(rn(g)-v+C)/7}function cs(g){return g>99?g:g>mt.twoDigitCutoffYear?1900+g:2e3+g}function $n(g,i,m,v=null){const C=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 V={timeZoneName:i,...A},B=new Intl.DateTimeFormat(m,V).formatToParts(C).find(Y=>Y.type.toLowerCase()==="timezonename");return B?B.value:null}function us(g,i){let m=parseInt(g,10);Number.isNaN(m)&&(m=0);const v=parseInt(i,10)||0,C=m<0||Object.is(m,-0)?-v:v;return m*60+C}function si(g){const i=Number(g);if(typeof g=="boolean"||g===""||!Number.isFinite(i))throw new j(`Invalid unit value ${g}`);return i}function cn(g,i){const m={};for(const v in g)if(Pn(g,v)){const C=g[v];if(C==null)continue;m[i(v)]=si(C)}return m}function os(g,i){const m=Math.trunc(Math.abs(g/60)),v=Math.trunc(Math.abs(g%60)),C=g>=0?"+":"-";switch(i){case"short":return`${C}${st(m,2)}:${st(v,2)}`;case"narrow":return`${C}${m}${v>0?`:${v}`:""}`;case"techie":return`${C}${st(m,2)}${st(v,2)}`;default:throw new RangeError(`Value format ${i} is out of range for property format`)}}function ds(g){return Dc(g,["hour","minute","second","millisecond"])}const kc=["January","February","March","April","May","June","July","August","September","October","November","December"],rr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],So=["J","F","M","A","M","J","J","A","S","O","N","D"];function Ac(g){switch(g){case"narrow":return[...So];case"short":return[...rr];case"long":return[...kc];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 fs=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ya=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ri=["M","T","W","T","F","S","S"];function ir(g){switch(g){case"narrow":return[...ri];case"short":return[...Ya];case"long":return[...fs];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Yn=["AM","PM"],yl=["Before Christ","Anno Domini"],_c=["BC","AD"],ii=["B","A"];function ci(g){switch(g){case"narrow":return[...ii];case"short":return[..._c];case"long":return[...yl];default:return null}}function hs(g){return Yn[g.hour<12?0:1]}function un(g,i){return ir(i)[g.weekday-1]}function ui(g,i){return Ac(i)[g.month-1]}function ms(g,i){return ci(i)[g.year<0?0:1]}function Cn(g,i,m="always",v=!1){const C={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 ${C[g][0]}`;case-1:return Ue?"yesterday":`last ${C[g][0]}`;case 0:return Ue?"today":`this ${C[g][0]}`}}const V=Object.is(i,-0)||i<0,B=Math.abs(i),Y=B===1,de=C[g],Ne=v?Y?de[1]:de[2]||de[1]:Y?C[g][0]:g;return V?`${B} ${Ne} ago`:`in ${B} ${Ne}`}function cr(g,i){let m="";for(const v of g)v.literal?m+=v.val:m+=i(v.val);return m}const ur={D:M,DD:D,DDD:N,DDDD:O,t:R,tt:I,ttt:U,tttt:J,T:k,TT:w,TTT:q,TTTT:G,f:Z,ff:S,fff:ie,ffff:pe,F:le,FF:te,FFF:ge,FFFF:$};class Gt{static create(i,m={}){return new Gt(i,m)}static parseFormat(i){let m=null,v="",C=!1;const A=[];for(let V=0;V<i.length;V++){const B=i.charAt(V);B==="'"?((v.length>0||C)&&A.push({literal:C||/^\s+$/.test(v),val:v===""?"'":v}),m=null,v="",C=!C):C||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:C||/^\s+$/.test(v),val:v}),A}static macroTokenToFormatOpts(i){return ur[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 st(i,m);const C={...this.opts};return m>0&&(C.padTo=m),v&&(C.signDisplay=v),this.loc.numberFormatter(C).format(i)}formatDateTimeFromString(i,m){const v=this.loc.listingMode()==="en",C=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",A=(Ae,Nt)=>this.loc.extract(i,Ae,Nt),V=Ae=>i.isOffsetFixed&&i.offset===0&&Ae.allowZ?"Z":i.isValid?i.zone.formatOffset(i.ts,Ae.format):"",B=()=>v?hs(i):A({hour:"numeric",hourCycle:"h12"},"dayperiod"),Y=(Ae,Nt)=>v?ui(i,Ae):A(Nt?{month:Ae}:{month:Ae,day:"numeric"},"month"),de=(Ae,Nt)=>v?un(i,Ae):A(Nt?{weekday:Ae}:{weekday:Ae,month:"long",day:"numeric"},"weekday"),Ne=Ae=>{const Nt=Gt.macroTokenToFormatOpts(Ae);return Nt?this.formatWithSystemDefault(i,Nt):Ae},Ue=Ae=>v?ms(i,Ae):A({era:Ae},"era"),Fe=Ae=>{switch(Ae){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 V({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return V({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return V({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 C?A({day:"numeric"},"day"):this.num(i.day);case"dd":return C?A({day:"2-digit"},"day"):this.num(i.day,2);case"c":return this.num(i.weekday);case"ccc":return de("short",!0);case"cccc":return de("long",!0);case"ccccc":return de("narrow",!0);case"E":return this.num(i.weekday);case"EEE":return de("short",!1);case"EEEE":return de("long",!1);case"EEEEE":return de("narrow",!1);case"L":return C?A({month:"numeric",day:"numeric"},"month"):this.num(i.month);case"LL":return C?A({month:"2-digit",day:"numeric"},"month"):this.num(i.month,2);case"LLL":return Y("short",!0);case"LLLL":return Y("long",!0);case"LLLLL":return Y("narrow",!0);case"M":return C?A({month:"numeric"},"month"):this.num(i.month);case"MM":return C?A({month:"2-digit"},"month"):this.num(i.month,2);case"MMM":return Y("short",!1);case"MMMM":return Y("long",!1);case"MMMMM":return Y("narrow",!1);case"y":return C?A({year:"numeric"},"year"):this.num(i.year);case"yy":return C?A({year:"2-digit"},"year"):this.num(i.year.toString().slice(-2),2);case"yyyy":return C?A({year:"numeric"},"year"):this.num(i.year,4);case"yyyyyy":return C?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 Ne(Ae)}};return cr(Gt.parseFormat(m),Fe)}formatDurationFromString(i,m){const v=this.opts.signMode==="negativeLargestOnly"?-1:1,C=Ne=>{switch(Ne[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=(Ne,Ue)=>Fe=>{const Ae=C(Fe);if(Ae){const Nt=Ue.isNegativeDuration&&Ae!==Ue.largestUnit?v:1;let Wt;return this.opts.signMode==="negativeLargestOnly"&&Ae!==Ue.largestUnit?Wt="never":this.opts.signMode==="all"?Wt="always":Wt="auto",this.num(Ne.get(Ae)*Nt,Fe.length,Wt)}else return Fe},V=Gt.parseFormat(m),B=V.reduce((Ne,{literal:Ue,val:Fe})=>Ue?Ne:Ne.concat(Fe),[]),Y=i.shiftTo(...B.map(C).filter(Ne=>Ne)),de={isNegativeDuration:Y<0,largestUnit:Object.keys(Y.values)[0]};return cr(V,A(Y,de))}}const gs=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function on(...g){const i=g.reduce((m,v)=>m+v.source,"");return RegExp(`^${i}$`)}function Gn(...g){return i=>g.reduce(([m,v,C],A)=>{const[V,B,Y]=A(i,C);return[{...m,...V},B||v,Y]},[{},null,1]).slice(0,2)}function Rt(g,...i){if(g==null)return[null,null];for(const[m,v]of i){const C=m.exec(g);if(C)return v(C)}return[null,null]}function Tn(...g){return(i,m)=>{const v={};let C;for(C=0;C<g.length;C++)v[g[C]]=Ot(i[m+C]);return[v,null,m+C]}}const xs=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,ps=`(?:${xs.source}?(?:\\[(${gs.source})\\])?)?`,oi=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,or=RegExp(`${oi.source}${ps}`),vs=RegExp(`(?:[Tt]${or.source})?`),ys=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,dr=/(\d{4})-?W(\d\d)(?:-?(\d))?/,zc=/(\d{4})-?(\d{3})/,Eo=Tn("weekYear","weekNumber","weekDay"),Co=Tn("year","ordinal"),To=/(\d{4})-(\d\d)-(\d\d)/,fr=RegExp(`${oi.source} ?(?:${xs.source}|(${gs.source}))?`),Mo=RegExp(`(?: ${fr.source})?`);function bl(g,i,m){const v=g[i];return ke(v)?m:Ot(v)}function Oo(g,i){return[{year:bl(g,i),month:bl(g,i+1,1),day:bl(g,i+2,1)},null,i+3]}function jl(g,i){return[{hours:bl(g,i,0),minutes:bl(g,i+1,0),seconds:bl(g,i+2,0),milliseconds:li(g[i+3])},null,i+4]}function bs(g,i){const m=!g[i]&&!g[i+1],v=us(g[i+1],g[i+2]),C=m?null:gt.instance(v);return[{},C,i+3]}function Nl(g,i){const m=g[i]?xe.create(g[i]):null;return[{},m,i+1]}const Ro=RegExp(`^T?${oi.source}$`),Do=/^-?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 ko(g){const[i,m,v,C,A,V,B,Y,de]=g,Ne=i[0]==="-",Ue=Y&&Y[0]==="-",Fe=(Ae,Nt=!1)=>Ae!==void 0&&(Nt||Ae&&Ne)?-Ae:Ae;return[{years:Fe(En(m)),months:Fe(En(v)),weeks:Fe(En(C)),days:Fe(En(A)),hours:Fe(En(V)),minutes:Fe(En(B)),seconds:Fe(En(Y),Y==="-0"),milliseconds:Fe(li(de),Ue)}]}const Ao={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function js(g,i,m,v,C,A,V){const B={year:i.length===2?cs(Ot(i)):Ot(i),month:rr.indexOf(m)+1,day:Ot(v),hour:Ot(C),minute:Ot(A)};return V&&(B.second=Ot(V)),g&&(B.weekday=g.length>3?fs.indexOf(g)+1:Ya.indexOf(g)+1),B}const _o=/^(?:(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 zo(g){const[,i,m,v,C,A,V,B,Y,de,Ne,Ue]=g,Fe=js(i,C,v,m,A,V,B);let Ae;return Y?Ae=Ao[Y]:de?Ae=0:Ae=us(Ne,Ue),[Fe,new gt(Ae)]}function Lo(g){return g.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Lc=/^(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$/,Uo=/^(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$/,Ho=/^(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 Uc(g){const[,i,m,v,C,A,V,B]=g;return[js(i,C,v,m,A,V,B),gt.utcInstance]}function qo(g){const[,i,m,v,C,A,V,B]=g;return[js(i,B,m,v,C,A,V),gt.utcInstance]}const Vo=on(ys,vs),Bo=on(dr,vs),Po=on(zc,vs),$o=on(or),Hc=Gn(Oo,jl,bs,Nl),di=Gn(Eo,jl,bs,Nl),Ns=Gn(Co,jl,bs,Nl),Yo=Gn(jl,bs,Nl);function qc(g){return Rt(g,[Vo,Hc],[Bo,di],[Po,Ns],[$o,Yo])}function Vc(g){return Rt(Lo(g),[_o,zo])}function Bc(g){return Rt(g,[Lc,Uc],[Uo,Uc],[Ho,qo])}function Pc(g){return Rt(g,[Do,ko])}const $c=Gn(jl);function wl(g){return Rt(g,[Ro,$c])}const Go=on(To,Mo),Fo=on(fr),Zo=Gn(jl,bs,Nl);function Yc(g){return Rt(g,[Go,Hc],[Fo,Zo])}const fi="Invalid Duration",Sl={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}},ws={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},...Sl},pa=146097/400,dn=146097/4800,Gc={years:{quarters:4,months:12,weeks:pa/7,days:pa,hours:pa*24,minutes:pa*24*60,seconds:pa*24*60*60,milliseconds:pa*24*60*60*1e3},quarters:{months:3,weeks:pa/28,days:pa/4,hours:pa*24/4,minutes:pa*24*60/4,seconds:pa*24*60*60/4,milliseconds:pa*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},...Sl},Mn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],hi=Mn.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 Ge(v)}function mi(g,i){var m;let v=(m=i.milliseconds)!=null?m:0;for(const C of hi.slice(1))i[C]&&(v+=i[C]*g[C].milliseconds);return v}function gi(g,i){const m=mi(g,i)<0?-1:1;Mn.reduceRight((v,C)=>{if(ke(i[C]))return v;if(v){const A=i[v]*m,V=g[C][v],B=Math.floor(A/V);i[C]+=B*m,i[v]-=B*V*m}return C},null),Mn.reduce((v,C)=>{if(ke(i[C]))return v;if(v){const A=i[v]%1;i[v]-=A,i[C]+=A*g[v][C]}return C},null)}function xi(g){const i={};for(const[m,v]of Object.entries(g))v!==0&&(i[m]=v);return i}class Ge{constructor(i){const m=i.conversionAccuracy==="longterm"||!1;let v=m?Gc:ws;i.matrix&&(v=i.matrix),this.values=i.values,this.loc=i.loc||Qe.create(),this.conversionAccuracy=m?"longterm":"casual",this.invalid=i.invalid||null,this.matrix=v,this.isLuxonDuration=!0}static fromMillis(i,m){return Ge.fromObject({milliseconds:i},m)}static fromObject(i,m={}){if(i==null||typeof i!="object")throw new j(`Duration.fromObject: argument expected to be an object, got ${i===null?"null":typeof i}`);return new Ge({values:cn(i,Ge.normalizeUnit),loc:Qe.fromObject(m),conversionAccuracy:m.conversionAccuracy,matrix:m.matrix})}static fromDurationLike(i){if(xa(i))return Ge.fromMillis(i);if(Ge.isDuration(i))return i;if(typeof i=="object")return Ge.fromObject(i);throw new j(`Unknown duration argument ${i} of type ${typeof i}`)}static fromISO(i,m){const[v]=Pc(i);return v?Ge.fromObject(v,m):Ge.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static fromISOTime(i,m){const[v]=wl(i);return v?Ge.fromObject(v,m):Ge.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static invalid(i,m=null){if(!i)throw new j("need to specify a reason the Duration is invalid");const v=i instanceof ga?i:new ga(i,m);if(mt.throwOnInvalid)throw new o(v);return new Ge({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?Gt.create(this.loc,v).formatDurationFromString(this,i):fi}toHuman(i={}){if(!this.isValid)return fi;const m=i.showZeros!==!1,v=Mn.map(C=>{const A=this.values[C];return ke(A)||A===0&&!m?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...i,unit:C.slice(0,-1)}).format(A)}).filter(C=>C);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+=is(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},Me.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?mi(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(i){if(!this.isValid)return this;const m=Ge.fromDurationLike(i),v={};for(const C of Mn)(Pn(m.values,C)||Pn(this.values,C))&&(v[C]=m.get(C)+this.get(C));return Ma(this,{values:v},!0)}minus(i){if(!this.isValid)return this;const m=Ge.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]=si(i(this.values[v],v));return Ma(this,{values:m},!0)}get(i){return this[Ge.normalizeUnit(i)]}set(i){if(!this.isValid)return this;const m={...this.values,...cn(i,Ge.normalizeUnit)};return Ma(this,{values:m})}reconfigure({locale:i,numberingSystem:m,conversionAccuracy:v,matrix:C}={}){const V={loc:this.loc.clone({locale:i,numberingSystem:m}),matrix:C,conversionAccuracy:v};return Ma(this,V)}as(i){return this.isValid?this.shiftTo(i).get(i):NaN}normalize(){if(!this.isValid)return this;const i=this.toObject();return gi(this.matrix,i),Ma(this,{values:i},!0)}rescale(){if(!this.isValid)return this;const i=xi(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(V=>Ge.normalizeUnit(V));const m={},v={},C=this.toObject();let A;for(const V of Mn)if(i.indexOf(V)>=0){A=V;let B=0;for(const de in v)B+=this.matrix[de][V]*v[de],v[de]=0;xa(C[V])&&(B+=C[V]);const Y=Math.trunc(B);m[V]=Y,v[V]=(B*1e3-Y*1e3)/1e3}else xa(C[V])&&(v[V]=C[V]);for(const V in v)v[V]!==0&&(m[A]+=V===A?v[V]:v[V]/this.matrix[A][V]);return gi(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=xi(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,C){return v===void 0||v===0?C===void 0||C===0:v===C}for(const v of Mn)if(!m(this.values[v],i.values[v]))return!1;return!0}}const El="Invalid Interval";function Io(g,i){return!g||!g.isValid?xt.invalid("missing or invalid start"):!i||!i.isValid?xt.invalid("missing or invalid end"):i<g?xt.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 xt{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 j("need to specify a reason the Interval is invalid");const v=i instanceof ga?i:new ga(i,m);if(mt.throwOnInvalid)throw new u(v);return new xt({invalid:v})}static fromDateTimes(i,m){const v=ba(i),C=ba(m),A=Io(v,C);return A??new xt({start:v,end:C})}static after(i,m){const v=Ge.fromDurationLike(m),C=ba(i);return xt.fromDateTimes(C,C.plus(v))}static before(i,m){const v=Ge.fromDurationLike(m),C=ba(i);return xt.fromDateTimes(C.minus(v),C)}static fromISO(i,m){const[v,C]=(i||"").split("/",2);if(v&&C){let A,V;try{A=Me.fromISO(v,m),V=A.isValid}catch{V=!1}let B,Y;try{B=Me.fromISO(C,m),Y=B.isValid}catch{Y=!1}if(V&&Y)return xt.fromDateTimes(A,B);if(V){const de=Ge.fromISO(C,m);if(de.isValid)return xt.after(A,de)}else if(Y){const de=Ge.fromISO(v,m);if(de.isValid)return xt.before(B,de)}}return xt.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 C;return m!=null&&m.useLocaleWeeks?C=this.end.reconfigure({locale:v.locale}):C=this.end,C=C.startOf(i,m),Math.floor(C.diff(v,i).get(i))+(C.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?xt.fromDateTimes(i||this.s,m||this.e):this}splitAt(...i){if(!this.isValid)return[];const m=i.map(ba).filter(V=>this.contains(V)).sort((V,B)=>V.toMillis()-B.toMillis()),v=[];let{s:C}=this,A=0;for(;C<this.e;){const V=m[A]||this.e,B=+V>+this.e?this.e:V;v.push(xt.fromDateTimes(C,B)),C=B,A+=1}return v}splitBy(i){const m=Ge.fromDurationLike(i);if(!this.isValid||!m.isValid||m.as("milliseconds")===0)return[];let{s:v}=this,C=1,A;const V=[];for(;v<this.e;){const B=this.start.plus(m.mapUnits(Y=>Y*C));A=+B>+this.e?this.e:B,V.push(xt.fromDateTimes(v,A)),v=A,C+=1}return V}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:xt.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 xt.fromDateTimes(m,v)}static merge(i){const[m,v]=i.sort((C,A)=>C.s-A.s).reduce(([C,A],V)=>A?A.overlaps(V)||A.abutsStart(V)?[C,A.union(V)]:[C.concat([A]),V]:[C,V],[[],null]);return v&&m.push(v),m}static xor(i){let m=null,v=0;const C=[],A=i.map(Y=>[{time:Y.s,type:"s"},{time:Y.e,type:"e"}]),V=Array.prototype.concat(...A),B=V.sort((Y,de)=>Y.time-de.time);for(const Y of B)v+=Y.type==="s"?1:-1,v===1?m=Y.time:(m&&+m!=+Y.time&&C.push(xt.fromDateTimes(m,Y.time)),m=null);return xt.merge(C)}difference(...i){return xt.xor([this].concat(i)).map(m=>this.intersection(m)).filter(m=>m&&!m.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:El}[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=M,m={}){return this.isValid?Gt.create(this.s.loc.clone(m),i).formatInterval(this):El}toISO(i){return this.isValid?`${this.s.toISO(i)}/${this.e.toISO(i)}`:El}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:El}toISOTime(i){return this.isValid?`${this.s.toISOTime(i)}/${this.e.toISOTime(i)}`:El}toFormat(i,{separator:m=" – "}={}){return this.isValid?`${this.s.toFormat(i)}${m}${this.e.toFormat(i)}`:El}toDuration(i,m){return this.isValid?this.e.diff(this.s,i,m):Ge.invalid(this.invalidReason)}mapEndpoints(i){return xt.fromDateTimes(i(this.s),i(this.e))}}class Ss{static hasDST(i=mt.defaultZone){const m=Me.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 _t(i,mt.defaultZone)}static getStartOfWeek({locale:i=null,locObj:m=null}={}){return(m||Qe.create(i)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:i=null,locObj:m=null}={}){return(m||Qe.create(i)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:i=null,locObj:m=null}={}){return(m||Qe.create(i)).getWeekendDays().slice()}static months(i="long",{locale:m=null,numberingSystem:v=null,locObj:C=null,outputCalendar:A="gregory"}={}){return(C||Qe.create(m,v,A)).months(i)}static monthsFormat(i="long",{locale:m=null,numberingSystem:v=null,locObj:C=null,outputCalendar:A="gregory"}={}){return(C||Qe.create(m,v,A)).months(i,!0)}static weekdays(i="long",{locale:m=null,numberingSystem:v=null,locObj:C=null}={}){return(C||Qe.create(m,v,null)).weekdays(i)}static weekdaysFormat(i="long",{locale:m=null,numberingSystem:v=null,locObj:C=null}={}){return(C||Qe.create(m,v,null)).weekdays(i,!0)}static meridiems({locale:i=null}={}){return Qe.create(i).meridiems()}static eras(i="short",{locale:m=null}={}){return Qe.create(m,null,"gregory").eras(i)}static features(){return{relative:ai(),localeWeek:Sn()}}}function ia(g,i){const m=C=>C.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),v=m(i)-m(g);return Math.floor(Ge.fromMillis(v).as("days"))}function Es(g,i,m){const v=[["years",(Y,de)=>de.year-Y.year],["quarters",(Y,de)=>de.quarter-Y.quarter+(de.year-Y.year)*4],["months",(Y,de)=>de.month-Y.month+(de.year-Y.year)*12],["weeks",(Y,de)=>{const Ne=ia(Y,de);return(Ne-Ne%7)/7}],["days",ia]],C={},A=g;let V,B;for(const[Y,de]of v)m.indexOf(Y)>=0&&(V=Y,C[Y]=de(g,i),B=A.plus(C),B>i?(C[Y]--,g=A.plus(C),g>i&&(B=g,C[Y]--,g=A.plus(C))):g=B);return[g,C,B,V]}function Fc(g,i,m,v){let[C,A,V,B]=Es(g,i,m);const Y=i-C,de=m.filter(Ue=>["hours","minutes","seconds","milliseconds"].indexOf(Ue)>=0);de.length===0&&(V<i&&(V=C.plus({[B]:1})),V!==C&&(A[B]=(A[B]||0)+Y/(V-C)));const Ne=Ge.fromObject(A,v);return de.length>0?Ge.fromMillis(Y,v).shiftTo(...de).plus(Ne):Ne}const Zc="missing Intl.DateTimeFormat.formatToParts support";function Xe(g,i=m=>m){return{regex:g,deser:([m])=>i(Js(m))}}const hr="[ ]",Ic=new RegExp(hr,"g");function Cl(g){return g.replace(/\./g,"\\.?").replace(Ic,hr)}function mr(g){return g.replace(/\./g,"").replace(Ic," ").toLowerCase()}function ta(g,i){return g===null?null:{regex:RegExp(g.map(Cl).join("|")),deser:([m])=>g.findIndex(v=>mr(m)===mr(v))+i}}function gr(g,i){return{regex:g,deser:([,m,v])=>us(m,v),groups:i}}function Cs(g){return{regex:g,deser:([i])=>i}}function Fn(g){return g.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Tl(g,i){const m=ve(i),v=ve(i,"{2}"),C=ve(i,"{3}"),A=ve(i,"{4}"),V=ve(i,"{6}"),B=ve(i,"{1,2}"),Y=ve(i,"{1,3}"),de=ve(i,"{1,6}"),Ne=ve(i,"{1,9}"),Ue=ve(i,"{2,4}"),Fe=ve(i,"{4,6}"),Ae=Qt=>({regex:RegExp(Fn(Qt.val)),deser:([On])=>On,literal:!0}),Wt=(Qt=>{if(g.literal)return Ae(Qt);switch(Qt.val){case"G":return ta(i.eras("short"),0);case"GG":return ta(i.eras("long"),0);case"y":return Xe(de);case"yy":return Xe(Ue,cs);case"yyyy":return Xe(A);case"yyyyy":return Xe(Fe);case"yyyyyy":return Xe(V);case"M":return Xe(B);case"MM":return Xe(v);case"MMM":return ta(i.months("short",!0),1);case"MMMM":return ta(i.months("long",!0),1);case"L":return Xe(B);case"LL":return Xe(v);case"LLL":return ta(i.months("short",!1),1);case"LLLL":return ta(i.months("long",!1),1);case"d":return Xe(B);case"dd":return Xe(v);case"o":return Xe(Y);case"ooo":return Xe(C);case"HH":return Xe(v);case"H":return Xe(B);case"hh":return Xe(v);case"h":return Xe(B);case"mm":return Xe(v);case"m":return Xe(B);case"q":return Xe(B);case"qq":return Xe(v);case"s":return Xe(B);case"ss":return Xe(v);case"S":return Xe(Y);case"SSS":return Xe(C);case"u":return Cs(Ne);case"uu":return Cs(B);case"uuu":return Xe(m);case"a":return ta(i.meridiems(),0);case"kkkk":return Xe(A);case"kk":return Xe(Ue,cs);case"W":return Xe(B);case"WW":return Xe(v);case"E":case"c":return Xe(m);case"EEE":return ta(i.weekdays("short",!1),1);case"EEEE":return ta(i.weekdays("long",!1),1);case"ccc":return ta(i.weekdays("short",!0),1);case"cccc":return ta(i.weekdays("long",!0),1);case"Z":case"ZZ":return gr(new RegExp(`([+-]${B.source})(?::(${v.source}))?`),2);case"ZZZ":return gr(new RegExp(`([+-]${B.source})(${v.source})?`),2);case"z":return Cs(/[a-z_+-/]{1,256}?/i);case" ":return Cs(/[^\S\n\r]/);default:return Ae(Qt)}})(g)||{invalidReason:Zc};return Wt.token=g,Wt}const pi={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 Wc(g,i,m){const{type:v,value:C}=g;if(v==="literal"){const Y=/^\s+$/.test(C);return{literal:!Y,val:Y?" ":C}}const A=i[v];let V=v;v==="hour"&&(i.hour12!=null?V=i.hour12?"hour12":"hour24":i.hourCycle!=null?i.hourCycle==="h11"||i.hourCycle==="h12"?V="hour12":V="hour24":V=m.hour12?"hour12":"hour24");let B=pi[V];if(typeof B=="object"&&(B=B[A]),B)return{literal:!1,val:B}}function Zn(g){return[`^${g.map(m=>m.regex).reduce((m,v)=>`${m}(${v.source})`,"")}$`,g]}function Qc(g,i,m){const v=g.match(i);if(v){const C={};let A=1;for(const V in m)if(Pn(m,V)){const B=m[V],Y=B.groups?B.groups+1:1;!B.literal&&B.token&&(C[B.token.val[0]]=B.deser(v.slice(A,A+Y))),A+=Y}return[v,C]}else return[v,{}]}function Xc(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 ke(g.z)||(m=xe.create(g.z)),ke(g.Z)||(m||(m=new gt(g.Z)),v=g.Z),ke(g.q)||(g.M=(g.q-1)*3+1),ke(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),ke(g.u)||(g.S=li(g.u)),[Object.keys(g).reduce((A,V)=>{const B=i(V);return B&&(A[B]=g[V]),A},{}),m,v]}let xr=null;function Qo(){return xr||(xr=Me.fromMillis(1555555555555)),xr}function Xo(g,i){if(g.literal)return g;const m=Gt.macroTokenToFormatOpts(g.val),v=va(m,i);return v==null||v.includes(void 0)?g:v}function Jc(g,i){return Array.prototype.concat(...g.map(m=>Xo(m,i)))}class vi{constructor(i,m){if(this.locale=i,this.format=m,this.tokens=Jc(Gt.parseFormat(m),i),this.units=this.tokens.map(v=>Tl(v,i)),this.disqualifyingUnit=this.units.find(v=>v.invalidReason),!this.disqualifyingUnit){const[v,C]=Zn(this.units);this.regex=RegExp(v,"i"),this.handlers=C}}explainFromTokens(i){if(this.isValid){const[m,v]=Qc(i,this.regex,this.handlers),[C,A,V]=v?Xc(v):[null,null,void 0];if(Pn(v,"a")&&Pn(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:C,zone:A,specificOffset:V}}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 yi(g,i,m){return new vi(g,m).explainFromTokens(i)}function bi(g,i,m){const{result:v,zone:C,specificOffset:A,invalidReason:V}=yi(g,i,m);return[v,C,A,V]}function va(g,i){if(!g)return null;const v=Gt.create(i,g).dtFormatter(Qo()),C=v.formatToParts(),A=v.resolvedOptions();return C.map(V=>Wc(V,g,A))}const Ml="Invalid DateTime",fa=864e13;function Ga(g){return new ga("unsupported zone",`the zone "${g.name}" is not supported`)}function Ts(g){return g.weekData===null&&(g.weekData=Yt(g.c)),g.weekData}function Ol(g){return g.localWeekData===null&&(g.localWeekData=Yt(g.c,g.loc.getMinDaysInFirstWeek(),g.loc.getStartOfWeek())),g.localWeekData}function Fa(g,i){const m={ts:g.ts,zone:g.zone,c:g.c,o:g.o,loc:g.loc,invalid:g.invalid};return new Me({...m,...i,old:m})}function pr(g,i,m){let v=g-i*60*1e3;const C=m.offset(v);if(i===C)return[v,i];v-=(C-i)*60*1e3;const A=m.offset(v);return C===A?[v,C]:[g-Math.min(C,A)*60*1e3,Math.max(C,A)]}function Za(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 Ms(g,i,m){return pr(ea(g),i,m)}function Os(g,i){const m=g.o,v=g.c.year+Math.trunc(i.years),C=g.c.month+Math.trunc(i.months)+Math.trunc(i.quarters)*3,A={...g.c,year:v,month:C,day:Math.min(g.c.day,lr(v,C))+Math.trunc(i.days)+Math.trunc(i.weeks)*7},V=Ge.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=ea(A);let[Y,de]=pr(B,m,g.zone);return V!==0&&(Y+=V,de=g.zone.offset(Y)),{ts:Y,o:de}}function Oa(g,i,m,v,C,A){const{setZone:V,zone:B}=m;if(g&&Object.keys(g).length!==0||i){const Y=i||B,de=Me.fromObject(g,{...m,zone:Y,specificOffset:A});return V?de:de.setZone(B)}else return Me.invalid(new ga("unparsable",`the input "${C}" can't be parsed as ${v}`))}function vr(g,i,m=!0){return g.isValid?Gt.create(Qe.create("en-US"),{allowZ:m,forceSimple:!0}).formatDateTimeFromString(g,i):null}function aa(g,i,m){const v=g.c.year>9999||g.c.year<0;let C="";if(v&&g.c.year>=0&&(C+="+"),C+=st(g.c.year,v?6:4),m==="year")return C;if(i){if(C+="-",C+=st(g.c.month),m==="month")return C;C+="-"}else if(C+=st(g.c.month),m==="month")return C;return C+=st(g.c.day),C}function yr(g,i,m,v,C,A,V){let B=!m||g.c.millisecond!==0||g.c.second!==0,Y="";switch(V){case"day":case"month":case"year":break;default:if(Y+=st(g.c.hour),V==="hour")break;if(i){if(Y+=":",Y+=st(g.c.minute),V==="minute")break;B&&(Y+=":",Y+=st(g.c.second))}else{if(Y+=st(g.c.minute),V==="minute")break;B&&(Y+=st(g.c.second))}if(V==="second")break;B&&(!v||g.c.millisecond!==0)&&(Y+=".",Y+=st(g.c.millisecond,3))}return C&&(g.isOffsetFixed&&g.offset===0&&!A?Y+="Z":g.o<0?(Y+="-",Y+=st(Math.trunc(-g.o/60)),Y+=":",Y+=st(Math.trunc(-g.o%60))):(Y+="+",Y+=st(Math.trunc(g.o/60)),Y+=":",Y+=st(Math.trunc(g.o%60)))),A&&(Y+="["+g.zone.ianaName+"]"),Y}const Ia={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Kc={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},br={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Wa=["year","month","day","hour","minute","second","millisecond"],ji=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],eu=["year","ordinal","hour","minute","second","millisecond"];function Rl(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 Ni(g){switch(g.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Rl(g)}}function ya(g){if(fn===void 0&&(fn=mt.now()),g.type!=="iana")return g.offset(fn);const i=g.name;let m=ca.get(i);return m===void 0&&(m=g.offset(fn),ca.set(i,m)),m}function In(g,i){const m=_t(i.zone,mt.defaultZone);if(!m.isValid)return Me.invalid(Ga(m));const v=Qe.fromObject(i);let C,A;if(ke(g.year))C=mt.now();else{for(const Y of Wa)ke(g[Y])&&(g[Y]=Ia[Y]);const V=ar(g)||Bn(g);if(V)return Me.invalid(V);const B=ya(m);[C,A]=Ms(g,B,m)}return new Me({ts:C,zone:m,loc:v,o:A})}function Wn(g,i,m){const v=ke(m.round)?!0:m.round,C=ke(m.rounding)?"trunc":m.rounding,A=(B,Y)=>(B=is(B,v||m.calendary?0:2,m.calendary?"round":C),i.loc.clone(m).relFormatter(m).format(B,Y)),V=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(V(m.unit),m.unit);for(const B of m.units){const Y=V(B);if(Math.abs(Y)>=1)return A(Y,B)}return A(g>i?-0:0,m.units[m.units.length-1])}function Rs(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 ca=new Map;class Me{constructor(i){const m=i.zone||mt.defaultZone;let v=i.invalid||(Number.isNaN(i.ts)?new ga("invalid input"):null)||(m.isValid?null:Ga(m));this.ts=ke(i.ts)?mt.now():i.ts;let C=null,A=null;if(!v)if(i.old&&i.old.ts===this.ts&&i.old.zone.equals(m))[C,A]=[i.old.c,i.old.o];else{const B=xa(i.o)&&!i.old?i.o:m.offset(this.ts);C=Za(this.ts,B),v=Number.isNaN(C.year)?new ga("invalid input"):null,C=v?null:C,A=v?null:B}this._zone=m,this.loc=i.loc||Qe.create(),this.invalid=v,this.weekData=null,this.localWeekData=null,this.c=C,this.o=A,this.isLuxonDateTime=!0}static now(){return new Me({})}static local(){const[i,m]=Rs(arguments),[v,C,A,V,B,Y,de]=m;return In({year:v,month:C,day:A,hour:V,minute:B,second:Y,millisecond:de},i)}static utc(){const[i,m]=Rs(arguments),[v,C,A,V,B,Y,de]=m;return i.zone=gt.utcInstance,In({year:v,month:C,day:A,hour:V,minute:B,second:Y,millisecond:de},i)}static fromJSDate(i,m={}){const v=Oc(i)?i.valueOf():NaN;if(Number.isNaN(v))return Me.invalid("invalid input");const C=_t(m.zone,mt.defaultZone);return C.isValid?new Me({ts:v,zone:C,loc:Qe.fromObject(m)}):Me.invalid(Ga(C))}static fromMillis(i,m={}){if(xa(i))return i<-fa||i>fa?Me.invalid("Timestamp out of range"):new Me({ts:i,zone:_t(m.zone,mt.defaultZone),loc:Qe.fromObject(m)});throw new j(`fromMillis requires a numerical input, but received a ${typeof i} with value ${i}`)}static fromSeconds(i,m={}){if(xa(i))return new Me({ts:i*1e3,zone:_t(m.zone,mt.defaultZone),loc:Qe.fromObject(m)});throw new j("fromSeconds requires a numerical input")}static fromObject(i,m={}){i=i||{};const v=_t(m.zone,mt.defaultZone);if(!v.isValid)return Me.invalid(Ga(v));const C=Qe.fromObject(m),A=cn(i,Ni),{minDaysInFirstWeek:V,startOfWeek:B}=Tc(A,C),Y=mt.now(),de=ke(m.specificOffset)?v.offset(Y):m.specificOffset,Ne=!ke(A.ordinal),Ue=!ke(A.year),Fe=!ke(A.month)||!ke(A.day),Ae=Ue||Fe,Nt=A.weekYear||A.weekNumber;if((Ae||Ne)&&Nt)throw new h("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Fe&&Ne)throw new h("Can't mix ordinal dates with month/day");const Wt=Nt||A.weekday&&!Ae;let Qt,On,hn=Za(Y,de);Wt?(Qt=ji,On=Kc,hn=Yt(hn,V,B)):Ne?(Qt=eu,On=br,hn=ss(hn)):(Qt=Wa,On=Ia);let jr=!1;for(const Ja of Qt){const Nr=A[Ja];ke(Nr)?jr?A[Ja]=On[Ja]:A[Ja]=hn[Ja]:jr=!0}const Qn=Wt?Mc(A,V,B):Ne?rs(A):ar(A),Xa=Qn||Bn(A);if(Xa)return Me.invalid(Xa);const Rn=Wt?Vn(A,V,B):Ne?Cc(A):A,[mn,wi]=Ms(Rn,de,v),Xn=new Me({ts:mn,zone:v,o:wi,loc:C});return A.weekday&&Ae&&i.weekday!==Xn.weekday?Me.invalid("mismatched weekday",`you can't specify both a weekday of ${A.weekday} and a date of ${Xn.toISO()}`):Xn.isValid?Xn:Me.invalid(Xn.invalid)}static fromISO(i,m={}){const[v,C]=qc(i);return Oa(v,C,m,"ISO 8601",i)}static fromRFC2822(i,m={}){const[v,C]=Vc(i);return Oa(v,C,m,"RFC 2822",i)}static fromHTTP(i,m={}){const[v,C]=Bc(i);return Oa(v,C,m,"HTTP",m)}static fromFormat(i,m,v={}){if(ke(i)||ke(m))throw new j("fromFormat requires an input string and a format");const{locale:C=null,numberingSystem:A=null}=v,V=Qe.fromOpts({locale:C,numberingSystem:A,defaultToEN:!0}),[B,Y,de,Ne]=bi(V,i,m);return Ne?Me.invalid(Ne):Oa(B,Y,v,`format ${m}`,i,de)}static fromString(i,m,v={}){return Me.fromFormat(i,m,v)}static fromSQL(i,m={}){const[v,C]=Yc(i);return Oa(v,C,m,"SQL",i)}static invalid(i,m=null){if(!i)throw new j("need to specify a reason the DateTime is invalid");const v=i instanceof ga?i:new ga(i,m);if(mt.throwOnInvalid)throw new r(v);return new Me({invalid:v})}static isDateTime(i){return i&&i.isLuxonDateTime||!1}static parseFormatForOpts(i,m={}){const v=va(i,Qe.fromObject(m));return v?v.map(C=>C?C.val:null).join(""):null}static expandFormat(i,m={}){return Jc(Gt.parseFormat(i),Qe.fromObject(m)).map(C=>C.val).join("")}static resetCache(){fn=void 0,ca.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?Ts(this).weekYear:NaN}get weekNumber(){return this.isValid?Ts(this).weekNumber:NaN}get weekday(){return this.isValid?Ts(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Ol(this).weekday:NaN}get localWeekNumber(){return this.isValid?Ol(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Ol(this).weekYear:NaN}get ordinal(){return this.isValid?ss(this.c).ordinal:NaN}get monthShort(){return this.isValid?Ss.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Ss.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Ss.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Ss.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=ea(this.c),C=this.zone.offset(v-i),A=this.zone.offset(v+i),V=this.zone.offset(v-C*m),B=this.zone.offset(v-A*m);if(V===B)return[this];const Y=v-V*m,de=v-B*m,Ne=Za(Y,V),Ue=Za(de,B);return Ne.hour===Ue.hour&&Ne.minute===Ue.minute&&Ne.second===Ue.second&&Ne.millisecond===Ue.millisecond?[Fa(this,{ts:Y}),Fa(this,{ts:de})]:[this]}get isInLeapYear(){return pl(this.year)}get daysInMonth(){return lr(this.year,this.month)}get daysInYear(){return this.isValid?rn(this.year):NaN}get weeksInWeekYear(){return this.isValid?vl(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?vl(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(i={}){const{locale:m,numberingSystem:v,calendar:C}=Gt.create(this.loc.clone(i),i).resolvedOptions(this);return{locale:m,numberingSystem:v,outputCalendar:C}}toUTC(i=0,m={}){return this.setZone(gt.instance(i),m)}toLocal(){return this.setZone(mt.defaultZone)}setZone(i,{keepLocalTime:m=!1,keepCalendarTime:v=!1}={}){if(i=_t(i,mt.defaultZone),i.equals(this.zone))return this;if(i.isValid){let C=this.ts;if(m||v){const A=i.offset(this.ts),V=this.toObject();[C]=Ms(V,A,i)}return Fa(this,{ts:C,zone:i})}else return Me.invalid(Ga(i))}reconfigure({locale:i,numberingSystem:m,outputCalendar:v}={}){const C=this.loc.clone({locale:i,numberingSystem:m,outputCalendar:v});return Fa(this,{loc:C})}setLocale(i){return this.reconfigure({locale:i})}set(i){if(!this.isValid)return this;const m=cn(i,Ni),{minDaysInFirstWeek:v,startOfWeek:C}=Tc(m,this.loc),A=!ke(m.weekYear)||!ke(m.weekNumber)||!ke(m.weekday),V=!ke(m.ordinal),B=!ke(m.year),Y=!ke(m.month)||!ke(m.day),de=B||Y,Ne=m.weekYear||m.weekNumber;if((de||V)&&Ne)throw new h("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Y&&V)throw new h("Can't mix ordinal dates with month/day");let Ue;A?Ue=Vn({...Yt(this.c,v,C),...m},v,C):ke(m.ordinal)?(Ue={...this.toObject(),...m},ke(m.day)&&(Ue.day=Math.min(lr(Ue.year,Ue.month),Ue.day))):Ue=Cc({...ss(this.c),...m});const[Fe,Ae]=Ms(Ue,this.o,this.zone);return Fa(this,{ts:Fe,o:Ae})}plus(i){if(!this.isValid)return this;const m=Ge.fromDurationLike(i);return Fa(this,Os(this,m))}minus(i){if(!this.isValid)return this;const m=Ge.fromDurationLike(i).negate();return Fa(this,Os(this,m))}startOf(i,{useLocaleWeeks:m=!1}={}){if(!this.isValid)return this;const v={},C=Ge.normalizeUnit(i);switch(C){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(C==="weeks")if(m){const A=this.loc.getStartOfWeek(),{weekday:V}=this;V<A&&(v.weekNumber=this.weekNumber-1),v.weekday=A}else v.weekday=1;if(C==="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?Gt.create(this.loc.redefaultToEN(m)).formatDateTimeFromString(this,i):Ml}toLocaleString(i=M,m={}){return this.isValid?Gt.create(this.loc.clone(m),i).formatDateTime(this):Ml}toLocaleParts(i={}){return this.isValid?Gt.create(this.loc.clone(i),i).formatDateTimeParts(this):[]}toISO({format:i="extended",suppressSeconds:m=!1,suppressMilliseconds:v=!1,includeOffset:C=!0,extendedZone:A=!1,precision:V="milliseconds"}={}){if(!this.isValid)return null;V=Rl(V);const B=i==="extended";let Y=aa(this,B,V);return Wa.indexOf(V)>=3&&(Y+="T"),Y+=yr(this,B,m,v,C,A,V),Y}toISODate({format:i="extended",precision:m="day"}={}){return this.isValid?aa(this,i==="extended",Rl(m)):null}toISOWeekDate(){return vr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:i=!1,suppressSeconds:m=!1,includeOffset:v=!0,includePrefix:C=!1,extendedZone:A=!1,format:V="extended",precision:B="milliseconds"}={}){return this.isValid?(B=Rl(B),(C&&Wa.indexOf(B)>=3?"T":"")+yr(this,V==="extended",m,i,v,A,B)):null}toRFC2822(){return vr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return vr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?aa(this,!0):null}toSQLTime({includeOffset:i=!0,includeZone:m=!1,includeOffsetSpace:v=!0}={}){let C="HH:mm:ss.SSS";return(m||i)&&(v&&(C+=" "),m?C+="z":i&&(C+="ZZ")),vr(this,C,!0)}toSQL(i={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(i)}`:null}toString(){return this.isValid?this.toISO():Ml}[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 Ge.invalid("created by diffing an invalid DateTime");const C={locale:this.locale,numberingSystem:this.numberingSystem,...v},A=xl(m).map(Ge.normalizeUnit),V=i.valueOf()>this.valueOf(),B=V?this:i,Y=V?i:this,de=Fc(B,Y,A,C);return V?de.negate():de}diffNow(i="milliseconds",m={}){return this.diff(Me.now(),i,m)}until(i){return this.isValid?xt.fromDateTimes(this,i):this}hasSame(i,m,v){if(!this.isValid)return!1;const C=i.valueOf(),A=this.setZone(i.zone,{keepLocalTime:!0});return A.startOf(m,v)<=C&&C<=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||Me.fromObject({},{zone:this.zone}),v=i.padding?this<m?-i.padding:i.padding:0;let C=["years","months","days","hours","minutes","seconds"],A=i.unit;return Array.isArray(i.unit)&&(C=i.unit,A=void 0),Wn(m,this.plus(v),{...i,numeric:"always",units:C,unit:A})}toRelativeCalendar(i={}){return this.isValid?Wn(i.base||Me.fromObject({},{zone:this.zone}),this,{...i,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...i){if(!i.every(Me.isDateTime))throw new j("min requires all arguments be DateTimes");return Rc(i,m=>m.valueOf(),Math.min)}static max(...i){if(!i.every(Me.isDateTime))throw new j("max requires all arguments be DateTimes");return Rc(i,m=>m.valueOf(),Math.max)}static fromFormatExplain(i,m,v={}){const{locale:C=null,numberingSystem:A=null}=v,V=Qe.fromOpts({locale:C,numberingSystem:A,defaultToEN:!0});return yi(V,i,m)}static fromStringExplain(i,m,v={}){return Me.fromFormatExplain(i,m,v)}static buildFormatParser(i,m={}){const{locale:v=null,numberingSystem:C=null}=m,A=Qe.fromOpts({locale:v,numberingSystem:C,defaultToEN:!0});return new vi(A,i)}static fromFormatParser(i,m,v={}){if(ke(i)||ke(m))throw new j("fromFormatParser requires an input string and a format parser");const{locale:C=null,numberingSystem:A=null}=v,V=Qe.fromOpts({locale:C,numberingSystem:A,defaultToEN:!0});if(!V.equals(m.locale))throw new j(`fromFormatParser called with a locale of ${V}, but the format parser was created for ${m.locale}`);const{result:B,zone:Y,specificOffset:de,invalidReason:Ne}=m.explainFromTokens(i);return Ne?Me.invalid(Ne):Oa(B,Y,v,`format ${m.format}`,i,de)}static get DATE_SHORT(){return M}static get DATE_MED(){return D}static get DATE_MED_WITH_WEEKDAY(){return _}static get DATE_FULL(){return N}static get DATE_HUGE(){return O}static get TIME_SIMPLE(){return R}static get TIME_WITH_SECONDS(){return I}static get TIME_WITH_SHORT_OFFSET(){return U}static get TIME_WITH_LONG_OFFSET(){return J}static get TIME_24_SIMPLE(){return k}static get TIME_24_WITH_SECONDS(){return w}static get TIME_24_WITH_SHORT_OFFSET(){return q}static get TIME_24_WITH_LONG_OFFSET(){return G}static get DATETIME_SHORT(){return Z}static get DATETIME_SHORT_WITH_SECONDS(){return le}static get DATETIME_MED(){return S}static get DATETIME_MED_WITH_SECONDS(){return te}static get DATETIME_MED_WITH_WEEKDAY(){return ae}static get DATETIME_FULL(){return ie}static get DATETIME_FULL_WITH_SECONDS(){return ge}static get DATETIME_HUGE(){return pe}static get DATETIME_HUGE_WITH_SECONDS(){return $}}function ba(g){if(Me.isDateTime(g))return g;if(g&&g.valueOf&&xa(g.valueOf()))return Me.fromJSDate(g);if(g&&typeof g=="object")return Me.fromObject(g);throw new j(`Unknown datetime argument: ${g}, of type ${typeof g}`)}const Qa="3.7.2";return Ca.DateTime=Me,Ca.Duration=Ge,Ca.FixedOffsetZone=gt,Ca.IANAZone=xe,Ca.Info=Ss,Ca.Interval=xt,Ca.InvalidZone=$t,Ca.Settings=mt,Ca.SystemZone=me,Ca.VERSION=Qa,Ca.Zone=K,Ca}var dx;function Nh(){return dx||(dx=1,(function(n){var f,j,b,y,x,Wf,M,Xl;Object.defineProperty(n,"__esModule",{value:!0}),n.CronDate=n.DAYS_IN_MONTH=n.DateMathOp=n.TimeUnit=void 0;const r=i2();var u;(function(N){N.Second="Second",N.Minute="Minute",N.Hour="Hour",N.Day="Day",N.Month="Month",N.Year="Year"})(u||(n.TimeUnit=u={}));var o;(function(N){N.Add="Add",N.Subtract="Subtract"})(o||(n.DateMathOp=o={})),n.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);const _=class _{constructor(O,R){at(this,M);at(this,f);at(this,j,null);at(this,b,null);at(this,y,{add:{[u.Year]:this.addYear.bind(this),[u.Month]:this.addMonth.bind(this),[u.Day]:this.addDay.bind(this),[u.Hour]:this.addHour.bind(this),[u.Minute]:this.addMinute.bind(this),[u.Second]:this.addSecond.bind(this)},subtract:{[u.Year]:this.subtractYear.bind(this),[u.Month]:this.subtractMonth.bind(this),[u.Day]:this.subtractDay.bind(this),[u.Hour]:this.subtractHour.bind(this),[u.Minute]:this.subtractMinute.bind(this),[u.Second]:this.subtractSecond.bind(this)}});const I={zone:R};if(O?O instanceof _?(Oe(this,f,ee(O,f)),Oe(this,j,ee(O,j)),Oe(this,b,ee(O,b))):O instanceof Date?Oe(this,f,r.DateTime.fromJSDate(O,I)):typeof O=="number"?Oe(this,f,r.DateTime.fromMillis(O,I)):(Oe(this,f,r.DateTime.fromISO(O,I)),ee(this,f).isValid||Oe(this,f,r.DateTime.fromRFC2822(O,I)),ee(this,f).isValid||Oe(this,f,r.DateTime.fromSQL(O,I)),ee(this,f).isValid||Oe(this,f,r.DateTime.fromFormat(O,"EEE, d MMM yyyy HH:mm:ss",I))):Oe(this,f,r.DateTime.local()),!ee(this,f).isValid)throw new Error(`CronDate: unhandled timestamp: ${O}`);R&&R!==ee(this,f).zoneName&&Oe(this,f,ee(this,f).setZone(R))}get dstStart(){return ee(this,j)}set dstStart(O){Oe(this,j,O)}get dstEnd(){return ee(this,b)}set dstEnd(O){Oe(this,b,O)}addYear(){Oe(this,f,ee(this,f).plus({years:1}))}addMonth(){Oe(this,f,ee(this,f).plus({months:1}).startOf("month"))}addDay(){Oe(this,f,ee(this,f).plus({days:1}).startOf("day"))}addHour(){Oe(this,f,ee(this,f).plus({hours:1}).startOf("hour"))}addMinute(){Oe(this,f,ee(this,f).plus({minutes:1}).startOf("minute"))}addSecond(){Oe(this,f,ee(this,f).plus({seconds:1}))}subtractYear(){Oe(this,f,ee(this,f).minus({years:1}))}subtractMonth(){Oe(this,f,ee(this,f).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Oe(this,f,ee(this,f).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Oe(this,f,ee(this,f).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Oe(this,f,ee(this,f).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Oe(this,f,ee(this,f).minus({seconds:1}))}addUnit(O){ee(this,y).add[O]()}subtractUnit(O){ee(this,y).subtract[O]()}invokeDateOperation(O,R){if(O===o.Add){this.addUnit(R);return}if(O===o.Subtract){this.subtractUnit(R);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(){Oe(this,f,ee(this,f).startOf("day"))}setEndOfDay(){Oe(this,f,ee(this,f).endOf("day"))}getTime(){return ee(this,f).valueOf()}getUTCDate(){return Te(this,M,Xl).call(this).day}getUTCFullYear(){return Te(this,M,Xl).call(this).year}getUTCDay(){const O=Te(this,M,Xl).call(this).weekday;return O===7?0:O}getUTCMonth(){return Te(this,M,Xl).call(this).month-1}getUTCHours(){return Te(this,M,Xl).call(this).hour}getUTCMinutes(){return Te(this,M,Xl).call(this).minute}getUTCSeconds(){return Te(this,M,Xl).call(this).second}toISOString(){return ee(this,f).toUTC().toISO()}toJSON(){return ee(this,f).toJSON()}setDate(O){Oe(this,f,ee(this,f).set({day:O}))}setFullYear(O){Oe(this,f,ee(this,f).set({year:O}))}setDay(O){Oe(this,f,ee(this,f).set({weekday:O}))}setMonth(O){Oe(this,f,ee(this,f).set({month:O+1}))}setHours(O){Oe(this,f,ee(this,f).set({hour:O}))}setMinutes(O){Oe(this,f,ee(this,f).set({minute:O}))}setSeconds(O){Oe(this,f,ee(this,f).set({second:O}))}setMilliseconds(O){Oe(this,f,ee(this,f).set({millisecond:O}))}toString(){return this.toDate().toString()}toDate(){return ee(this,f).toJSDate()}isLastDayOfMonth(){var I;const{day:O,month:R}=ee(this,f);if(R===2){const U=Te(I=_,x,Wf).call(I,ee(this,f).year);return O===n.DAYS_IN_MONTH[R-1]-(U?0:1)}return O===n.DAYS_IN_MONTH[R-1]}isLastWeekdayOfMonth(){var U;const{day:O,month:R}=ee(this,f);let I;return R===2?I=n.DAYS_IN_MONTH[R-1]-(Te(U=_,x,Wf).call(U,ee(this,f).year)?0:1):I=n.DAYS_IN_MONTH[R-1],O>I-7}applyDateOperation(O,R,I){if(R===u.Month||R===u.Day){this.invokeDateOperation(O,R);return}const U=this.getHours();this.invokeDateOperation(O,R);const J=this.getHours(),k=J-U;k===2?I!==24&&(this.dstStart=J):k===0&&this.getMinutes()===0&&this.getSeconds()===0&&I!==24&&(this.dstEnd=J)}};f=new WeakMap,j=new WeakMap,b=new WeakMap,y=new WeakMap,x=new WeakSet,Wf=function(O){return O%4===0&&O%100!==0||O%400===0},M=new WeakSet,Xl=function(){return ee(this,f).toUTC()},at(_,x);let h=_;n.CronDate=h,n.default=h})(qf)),qf}var fx;function c2(){if(fx)return uc;fx=1,Object.defineProperty(uc,"__esModule",{value:!0}),uc.CronMonth=void 0;const n=Nh(),r=Ws(),u=1,o=12,h=Object.freeze([]);let f=class extends r.CronField{static get min(){return u}static get max(){return o}static get chars(){return h}static get daysInMonth(){return n.DAYS_IN_MONTH}constructor(b,y){super(b,y),this.validate()}get values(){return super.values}};return uc.CronMonth=f,uc}var oc={},hx;function u2(){if(hx)return oc;hx=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.CronSecond=void 0;const n=Ws(),r=0,u=59,o=Object.freeze([]);let h=class extends n.CronField{static get min(){return r}static get max(){return u}static get chars(){return o}constructor(j,b){super(j,b),this.validate()}get values(){return super.values}};return oc.CronSecond=h,oc}var mx;function wh(){return mx||(mx=1,(function(n){var r=Bs&&Bs.__createBinding||(Object.create?(function(o,h,f,j){j===void 0&&(j=f);var b=Object.getOwnPropertyDescriptor(h,f);(!b||("get"in b?!h.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:function(){return h[f]}}),Object.defineProperty(o,j,b)}):(function(o,h,f,j){j===void 0&&(j=f),o[j]=h[f]})),u=Bs&&Bs.__exportStar||function(o,h){for(var f in o)f!=="default"&&!Object.prototype.hasOwnProperty.call(h,f)&&r(h,o,f)};Object.defineProperty(n,"__esModule",{value:!0}),u(a2(),n),u(n2(),n),u(l2(),n),u(Ws(),n),u(s2(),n),u(r2(),n),u(c2(),n),u(u2(),n)})(Bs)),Bs}var gx;function _p(){var u,o,h,f,j,b,y,x,kp,Ap;if(gx)return nc;gx=1,Object.defineProperty(nc,"__esModule",{value:!0}),nc.CronFieldCollection=void 0;const n=wh();let r=(x=class{constructor({second:_,minute:N,hour:O,dayOfMonth:R,month:I,dayOfWeek:U}){at(this,u);at(this,o);at(this,h);at(this,f);at(this,j);at(this,b);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(!R)throw new Error("Validation error, Field dayOfMonth is missing");if(!I)throw new Error("Validation error, Field month is missing");if(!U)throw new Error("Validation error, Field dayOfWeek is missing");if(I.values.length===1&&!R.hasLastChar&&!(parseInt(R.values[0],10)<=n.CronMonth.daysInMonth[I.values[0]-1]))throw new Error("Invalid explicit day of month definition");Oe(this,u,_),Oe(this,o,N),Oe(this,h,O),Oe(this,j,I),Oe(this,b,U),Oe(this,f,R)}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,u)}get minute(){return ee(this,o)}get hour(){return ee(this,h)}get dayOfMonth(){return ee(this,f)}get month(){return ee(this,j)}get dayOfWeek(){return ee(this,b)}static compactField(_){if(_.length===0)return[];const N=[];let O;return _.forEach((R,I,U)=>{if(O===void 0){O={start:R,count:1};return}const J=U[I-1]||O.start,k=U[I+1];if(R==="L"||R==="W"){N.push(O),N.push({start:R,count:1}),O=void 0;return}if(O.step===void 0&&k!==void 0){const w=R-J,q=k-R;if(w<=q){O={...O,count:2,end:R,step:w};return}O.step=1}R-(O.end??0)===O.step?(O.count++,O.end=R):(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??J,count:1})):N.push(O),O={start:R,count:1})}),O&&N.push(O),N}stringifyField(_){var I;let N=_.max,O=_.values;if(_ instanceof n.CronDayOfWeek){N=6;const U=ee(this,b).values;O=U[U.length-1]===7?U.slice(0,-1):U}_ instanceof n.CronDayOfMonth&&(N=ee(this,j).values.length===1?n.CronMonth.daysInMonth[ee(this,j).values[0]-1]:_.max);const R=x.compactField(O);if(R.length===1){const U=Te(I=x,y,kp).call(I,_,R[0],N);if(U)return U}return R.map(U=>{var k;const J=U.count===1?U.start.toString():Te(k=x,y,Ap).call(k,U,N);return _ instanceof n.CronDayOfWeek&&_.nthDay>0?`${J}#${_.nthDay}`:J}).join(",")}stringify(_=!1){const N=[];return _&&N.push(this.stringifyField(ee(this,u))),N.push(this.stringifyField(ee(this,o)),this.stringifyField(ee(this,h)),this.stringifyField(ee(this,f)),this.stringifyField(ee(this,j)),this.stringifyField(ee(this,b))),N.join(" ")}serialize(){return{second:ee(this,u).serialize(),minute:ee(this,o).serialize(),hour:ee(this,h).serialize(),dayOfMonth:ee(this,f).serialize(),month:ee(this,j).serialize(),dayOfWeek:ee(this,b).serialize()}}},u=new WeakMap,o=new WeakMap,h=new WeakMap,f=new WeakMap,j=new WeakMap,b=new WeakMap,y=new WeakSet,kp=function(_,N,O){const R=N.step;return R?R===1&&N.start===_.min&&N.end&&N.end>=O?_.hasQuestionMarkChar?"?":"*":R!==1&&N.start===_.min&&N.end&&N.end>=O-R+1?`*/${R}`:null:null},Ap=function(_,N){const O=_.step;if(O===1)return`${_.start}-${_.end}`;const R=_.start===0?_.count-1:_.count;if(!O)throw new Error("Unexpected range step");if(!_.end)throw new Error("Unexpected range end");if(O*R>_.end){const I=(J,k)=>{if(typeof _.start!="number")throw new Error("Unexpected range start");return k%O===0?_.start+k:null};if(typeof _.start!="number")throw new Error("Unexpected range start");const U={length:_.end-_.start+1};return Array.from(U,I).filter(J=>J!==null).join(",")}return _.end===N-O+1?`${_.start}/${O}`:`${_.start}-${_.end}/${O}`},at(x,y),x);return nc.CronFieldCollection=r,nc}var Vf={},xx;function Bp(){return xx||(xx=1,(function(n){var h,f,j,b,y,x,E,M,D,Jl,N,$s,zp,Lp,Up,Hp,Qf,qp,Vp,Gr;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=Nh();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 u=1e4,Z=class Z{constructor(S,te){at(this,N);at(this,h);at(this,f);at(this,j);at(this,b);at(this,y);at(this,x);at(this,E,null);at(this,M,!1);Oe(this,h,te),Oe(this,f,te.tz),Oe(this,b,te.startDate?new r.CronDate(te.startDate,ee(this,f)):null),Oe(this,y,te.endDate?new r.CronDate(te.endDate,ee(this,f)):null);let ae=te.currentDate??te.startDate;if(ae){const ie=new r.CronDate(ae,ee(this,f));ee(this,b)&&ie.getTime()<ee(this,b).getTime()?ae=ee(this,b):ee(this,y)&&ie.getTime()>ee(this,y).getTime()&&(ae=ee(this,y))}Oe(this,j,new r.CronDate(ae,ee(this,f))),Oe(this,x,S)}get fields(){return ee(this,x)}static fieldsToExpression(S,te){return new Z(S,te||{})}next(){return Te(this,N,Gr).call(this)}prev(){return Te(this,N,Gr).call(this,!0)}hasNext(){const S=ee(this,j);try{return Te(this,N,Gr).call(this),!0}catch{return!1}finally{Oe(this,j,S)}}hasPrev(){const S=ee(this,j);try{return Te(this,N,Gr).call(this,!0),!0}catch{return!1}finally{Oe(this,j,S)}}take(S){const te=[];if(S>=0)for(let ae=0;ae<S;ae++)try{te.push(this.next())}catch{return te}else for(let ae=0;ae>S;ae--)try{te.push(this.prev())}catch{return te}return te}reset(S){Oe(this,j,new r.CronDate(S||ee(this,h).currentDate))}stringify(S=!1){return ee(this,x).stringify(S)}includesDate(S){const{second:te,minute:ae,hour:ie,month:ge}=ee(this,x),pe=new r.CronDate(S,ee(this,f));return!(!te.values.includes(pe.getSeconds())||!ae.values.includes(pe.getMinutes())||!ie.values.includes(pe.getHours())||!ge.values.includes(pe.getMonth()+1)||!Te(this,N,Qf).call(this,pe)||ee(this,x).dayOfWeek.nthDay>0&&Math.ceil(pe.getDate()/7)!==ee(this,x).dayOfWeek.nthDay)}toString(){return ee(this,h).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Te(this,N,Gr).call(this),done:!this.hasNext()})}}};h=new WeakMap,f=new WeakMap,j=new WeakMap,b=new WeakMap,y=new WeakMap,x=new WeakMap,E=new WeakMap,M=new WeakMap,D=new WeakSet,Jl=function(S,te){return te.some(ae=>ae===S)},N=new WeakSet,$s=function(S,te){return S[te?S.length-1:0]},zp=function(S){const te=`${S.getFullYear()}-${S.getMonth()+1}-${S.getDate()}`;if(ee(this,E)===te)return ee(this,M);const ae=new r.CronDate(S);ae.setStartOfDay();const ie=new r.CronDate(S);return ie.setEndOfDay(),Oe(this,E,te),Oe(this,M,ae.getUTCOffset()!==ie.getUTCOffset()),ee(this,M)},Lp=function(S,te,ae){const ie=ee(this,x).second.values,ge=S.getSeconds(),pe=ee(this,x).second.findNearestValue(ge,ae);if(pe!==null){S.setSeconds(pe);return}S.applyDateOperation(te,r.TimeUnit.Minute,ee(this,x).hour.values.length),S.setSeconds(Te(this,N,$s).call(this,ie,ae))},Up=function(S,te,ae){const ie=ee(this,x).minute.values,ge=ee(this,x).second.values,pe=S.getMinutes(),$=ee(this,x).minute.findNearestValue(pe,ae);if($!==null){S.setMinutes($),S.setSeconds(Te(this,N,$s).call(this,ge,ae));return}S.applyDateOperation(te,r.TimeUnit.Hour,ee(this,x).hour.values.length),S.setMinutes(Te(this,N,$s).call(this,ie,ae)),S.setSeconds(Te(this,N,$s).call(this,ge,ae))},Hp=function(S,te){const ae=te.isLastWeekdayOfMonth();return S.some(ie=>{const ge=parseInt(ie.toString().charAt(0),10)%7;if(Number.isNaN(ge))throw new Error(`Invalid last weekday of the month expression: ${ie}`);return te.getDay()===ge&&ae})},Qf=function(S){var K,fe,me;const te=ee(this,x).dayOfMonth.isWildcard,ae=!te,ie=ee(this,x).dayOfWeek.isWildcard,ge=!ie,pe=Te(K=Z,D,Jl).call(K,S.getDate(),ee(this,x).dayOfMonth.values)||ee(this,x).dayOfMonth.hasLastChar&&S.isLastDayOfMonth(),$=Te(fe=Z,D,Jl).call(fe,S.getDay(),ee(this,x).dayOfWeek.values)||ee(this,x).dayOfWeek.hasLastChar&&Te(me=Z,D,Hp).call(me,ee(this,x).dayOfWeek.values,S);return!!(ae&&ge&&(pe||$)||pe&&!ge||te&&!ie&&$)},qp=function(S,te,ae){var be,H;const ie=ee(this,x).hour.values,ge=ie,pe=S.getHours(),$=Te(be=Z,D,Jl).call(be,pe,ie),K=S.dstStart===pe,fe=S.dstEnd===pe;if(K)return Te(H=Z,D,Jl).call(H,pe-1,ie)?!0:(S.invokeDateOperation(te,r.TimeUnit.Hour),!1);if(fe&&!ae)return S.dstEnd=null,S.applyDateOperation(r.DateMathOp.Add,r.TimeUnit.Hour,ge.length),!1;if($)return!0;S.dstStart=null;const me=ee(this,x).hour.findNearestValue(pe,ae);if(me===null)return S.applyDateOperation(te,r.TimeUnit.Day,ge.length),!1;if(Te(this,N,zp).call(this,S)){const se=ae?pe-me:me-pe;for(let he=0;he<se;he++)S.applyDateOperation(te,r.TimeUnit.Hour,ge.length)}else S.setHours(me);return S.setMinutes(Te(this,N,$s).call(this,ee(this,x).minute.values,ae)),S.setSeconds(Te(this,N,$s).call(this,ee(this,x).second.values,ae)),!1},Vp=function(S){if(!ee(this,b)&&!ee(this,y))return;const te=S.getTime();if(ee(this,b)&&te<ee(this,b).getTime())throw new Error(n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(ee(this,y)&&te>ee(this,y).getTime())throw new Error(n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},Gr=function(S=!1){var pe,$,K;const te=S?r.DateMathOp.Subtract:r.DateMathOp.Add,ae=new r.CronDate(ee(this,j)),ie=ae.getTime();let ge=0;for(;++ge<u;){if(Te(this,N,Vp).call(this,ae),!Te(this,N,Qf).call(this,ae)){ae.applyDateOperation(te,r.TimeUnit.Day,ee(this,x).hour.values.length);continue}if(!(ee(this,x).dayOfWeek.nthDay<=0||Math.ceil(ae.getDate()/7)===ee(this,x).dayOfWeek.nthDay)){ae.applyDateOperation(te,r.TimeUnit.Day,ee(this,x).hour.values.length);continue}if(!Te(pe=Z,D,Jl).call(pe,ae.getMonth()+1,ee(this,x).month.values)){ae.applyDateOperation(te,r.TimeUnit.Month,ee(this,x).hour.values.length);continue}if(Te(this,N,qp).call(this,ae,te,S)){if(!Te($=Z,D,Jl).call($,ae.getMinutes(),ee(this,x).minute.values)){Te(this,N,Up).call(this,ae,te,S);continue}if(!Te(K=Z,D,Jl).call(K,ae.getSeconds(),ee(this,x).second.values)){Te(this,N,Lp).call(this,ae,te,S);continue}if(ie===ae.getTime()){(te==="Add"||ae.getMilliseconds()===0)&&ae.applyDateOperation(te,r.TimeUnit.Second,ee(this,x).hour.values.length);continue}break}}if(ge>u)throw new Error(n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return ae.getMilliseconds()!==0&&ae.setMilliseconds(0),Oe(this,j,ae),ae},at(Z,D);let o=Z;n.CronExpression=o,n.default=o})(Vf)),Vf}var Ku={},px;function o2(){if(px)return Ku;px=1,Object.defineProperty(Ku,"__esModule",{value:!0}),Ku.seededRandom=u;function n(o){let h=2166136261;for(let f=0;f<o.length;f++)h^=o.charCodeAt(f),h=Math.imul(h,16777619);return()=>h>>>0}function r(o){return()=>{let h=o+=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 u(o){const h=o?n(o)():Math.floor(Math.random()*1e10);return r(h)}return Ku}var vx;function Jf(){var x,E,Pp,Ys,$p,Yp,Gp,Fp,Zp,Ip,Wp,Xf,Qp,Xp;if(vx)return za;vx=1,Object.defineProperty(za,"__esModule",{value:!0}),za.CronExpressionParser=za.DayOfWeek=za.Months=za.CronUnit=za.PredefinedExpressions=void 0;const n=_p(),r=Bp(),u=o2(),o=wh();var h;(function(G){G["@yearly"]="0 0 0 1 1 *",G["@annually"]="0 0 0 1 1 *",G["@monthly"]="0 0 0 1 * *",G["@weekly"]="0 0 0 * * 0",G["@daily"]="0 0 0 * * *",G["@hourly"]="0 0 * * * *",G["@minutely"]="0 * * * * *",G["@secondly"]="* * * * * *",G["@weekdays"]="0 0 0 * * 1-5",G["@weekends"]="0 0 0 * * 0,6"})(h||(za.PredefinedExpressions=h={}));var f;(function(G){G.Second="Second",G.Minute="Minute",G.Hour="Hour",G.DayOfMonth="DayOfMonth",G.Month="Month",G.DayOfWeek="DayOfWeek"})(f||(za.CronUnit=f={}));var j;(function(G){G[G.jan=1]="jan",G[G.feb=2]="feb",G[G.mar=3]="mar",G[G.apr=4]="apr",G[G.may=5]="may",G[G.jun=6]="jun",G[G.jul=7]="jul",G[G.aug=8]="aug",G[G.sep=9]="sep",G[G.oct=10]="oct",G[G.nov=11]="nov",G[G.dec=12]="dec"})(j||(za.Months=j={}));var b;(function(G){G[G.sun=0]="sun",G[G.mon=1]="mon",G[G.tue=2]="tue",G[G.wed=3]="wed",G[G.thu=4]="thu",G[G.fri=5]="fri",G[G.sat=6]="sat"})(b||(za.DayOfWeek=b={}));let y=(E=class{static parse(Z,le={}){var he,ye,Re,xe,Se,lt,Ye,wt;const{strict:S=!1,hashSeed:te}=le,ae=(0,u.seededRandom)(te);Z=h[Z]||Z;const ie=Te(he=E,x,Pp).call(he,Z,S);if(!(ie.dayOfMonth==="*"||ie.dayOfWeek==="*"||!S))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const ge=Te(ye=E,x,Ys).call(ye,f.Second,ie.second,o.CronSecond.constraints,ae),pe=Te(Re=E,x,Ys).call(Re,f.Minute,ie.minute,o.CronMinute.constraints,ae),$=Te(xe=E,x,Ys).call(xe,f.Hour,ie.hour,o.CronHour.constraints,ae),K=Te(Se=E,x,Ys).call(Se,f.Month,ie.month,o.CronMonth.constraints,ae),fe=Te(lt=E,x,Ys).call(lt,f.DayOfMonth,ie.dayOfMonth,o.CronDayOfMonth.constraints,ae),{dayOfWeek:me,nthDayOfWeek:be}=Te(Ye=E,x,Qp).call(Ye,ie.dayOfWeek),H=Te(wt=E,x,Ys).call(wt,f.DayOfWeek,me,o.CronDayOfWeek.constraints,ae),se=new n.CronFieldCollection({second:new o.CronSecond(ge,{rawValue:ie.second}),minute:new o.CronMinute(pe,{rawValue:ie.minute}),hour:new o.CronHour($,{rawValue:ie.hour}),dayOfMonth:new o.CronDayOfMonth(fe,{rawValue:ie.dayOfMonth}),month:new o.CronMonth(K,{rawValue:ie.month}),dayOfWeek:new o.CronDayOfWeek(H,{rawValue:ie.dayOfWeek,nthDayOfWeek:be})});return new r.CronExpression(se,{...le,expression:Z})}},x=new WeakSet,Pp=function(Z,le){if(le&&!Z.length)throw new Error("Invalid cron expression");Z=Z||"0 * * * * *";const S=Z.trim().split(/\s+/);if(le&&S.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(S.length>6)throw new Error("Invalid cron expression, too many fields");const te=["*","*","*","*","*","0"];S.length<te.length&&S.unshift(...te.slice(S.length));const[ae,ie,ge,pe,$,K]=S;return{second:ae,minute:ie,hour:ge,dayOfMonth:pe,month:$,dayOfWeek:K}},Ys=function(Z,le,S,te){if((Z===f.Month||Z===f.DayOfWeek)&&(le=le.replace(/[a-z]{3}/gi,ae=>{ae=ae.toLowerCase();const ie=j[ae]||b[ae];if(ie===void 0)throw new Error(`Validation error, cannot resolve alias "${ae}"`);return ie.toString()})),!S.validChars.test(le))throw new Error(`Invalid characters, got value: ${le}`);return le=Te(this,x,$p).call(this,le,S),le=Te(this,x,Yp).call(this,le,S,te),Te(this,x,Gp).call(this,Z,le,S)},$p=function(Z,le){return Z.replace(/[*?]/g,le.min+"-"+le.max)},Yp=function(Z,le,S){const te=S();return Z.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(ae,ie,ge,pe)=>{if(ie&&ge&&pe){const $=parseInt(ie,10),K=parseInt(ge,10),fe=parseInt(pe,10);if($>K)throw new Error(`Invalid range: ${$}-${K}, min > max`);if(fe<=0)throw new Error(`Invalid step: ${fe}, must be positive`);const me=Math.max($,le.min),be=Math.floor(te*fe),H=[];for(let se=Math.floor(me/fe)*fe+be;se<=K;se+=fe)se>=me&&H.push(se);return H.join(",")}else if(ie&&ge){const $=parseInt(ie,10),K=parseInt(ge,10);if($>K)throw new Error(`Invalid range: ${$}-${K}, min > max`);return String(Math.floor(te*(K-$+1))+$)}else if(pe){const $=parseInt(pe,10);if($<=0)throw new Error(`Invalid step: ${$}, must be positive`);const K=Math.floor(te*$),fe=[];for(let me=Math.floor(le.min/$)*$+K;me<=le.max;me+=$)me>=le.min&&fe.push(me);return fe.join(",")}else return String(Math.floor(te*(le.max-le.min+1)+le.min))})},Gp=function(Z,le,S){const te=[];function ae(ge,pe){var $;if(Array.isArray(ge))te.push(...ge);else if(Te($=E,x,Xp).call($,pe,ge))te.push(ge);else{const K=parseInt(ge.toString(),10);if(!(K>=pe.min&&K<=pe.max))throw new Error(`Constraint error, got value ${ge} expected range ${pe.min}-${pe.max}`);te.push(Z===f.DayOfWeek?K%7:ge)}}return le.split(",").forEach(ge=>{var pe;if(!(ge.length>0))throw new Error("Invalid list value format");ae(Te(pe=E,x,Fp).call(pe,Z,ge,S),S)}),te},Fp=function(Z,le,S){var ae,ie;const te=le.split("/");if(te.length>2)throw new Error(`Invalid repeat: ${le}`);return te.length===2?(isNaN(parseInt(te[0],10))||(te[0]=`${te[0]}-${S.max}`),Te(ae=E,x,Xf).call(ae,Z,te[0],parseInt(te[1],10),S)):Te(ie=E,x,Xf).call(ie,Z,le,1,S)},Zp=function(Z,le,S){if(!(!isNaN(Z)&&!isNaN(le)&&Z>=S.min&&le<=S.max))throw new Error(`Constraint error, got range ${Z}-${le} expected range ${S.min}-${S.max}`);if(Z>le)throw new Error(`Invalid range: ${Z}-${le}, min(${Z}) > max(${le})`)},Ip=function(Z){if(!(!isNaN(Z)&&Z>0))throw new Error(`Constraint error, cannot repeat at every ${Z} time.`)},Wp=function(Z,le,S,te){const ae=[];Z===f.DayOfWeek&&S%7===0&&ae.push(0);for(let ie=le;ie<=S;ie+=te)ae.indexOf(ie)===-1&&ae.push(ie);return ae},Xf=function(Z,le,S,te){const ae=le.split("-");if(ae.length<=1)return isNaN(+le)?le:+le;const[ie,ge]=ae.map(pe=>parseInt(pe,10));return Te(this,x,Zp).call(this,ie,ge,te),Te(this,x,Ip).call(this,S),Te(this,x,Wp).call(this,Z,ie,ge,S)},Qp=function(Z){const le=Z.split("#");if(le.length<=1)return{dayOfWeek:le[0]};const S=+le[le.length-1],te=Z.match(/([,-/])/);if(te!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${te==null?void 0:te[0]}\` special characters are incompatible`);if(!(le.length<=2&&!isNaN(S)&&S>=1&&S<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:le[0],nthDayOfWeek:S}},Xp=function(Z,le){return Z.chars.some(S=>le.toString().includes(S))},at(E,x),E);return za.CronExpressionParser=y,za}var pn={};const d2={},f2=Object.freeze(Object.defineProperty({__proto__:null,default:d2},Symbol.toStringTag,{value:"Module"})),yx=Oy(f2);var bx;function h2(){var f,j,Kf,Jp;if(bx)return pn;bx=1;var n=pn&&pn.__createBinding||(Object.create?(function(x,E,M,D){D===void 0&&(D=M);var _=Object.getOwnPropertyDescriptor(E,M);(!_||("get"in _?!E.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return E[M]}}),Object.defineProperty(x,D,_)}):(function(x,E,M,D){D===void 0&&(D=M),x[D]=E[M]})),r=pn&&pn.__setModuleDefault||(Object.create?(function(x,E){Object.defineProperty(x,"default",{enumerable:!0,value:E})}):function(x,E){x.default=E}),u=pn&&pn.__importStar||(function(){var x=function(E){return x=Object.getOwnPropertyNames||function(M){var D=[];for(var _ in M)Object.prototype.hasOwnProperty.call(M,_)&&(D[D.length]=_);return D},x(E)};return function(E){if(E&&E.__esModule)return E;var M={};if(E!=null)for(var D=x(E),_=0;_<D.length;_++)D[_]!=="default"&&n(M,E,D[_]);return r(M,E),M}})();Object.defineProperty(pn,"__esModule",{value:!0}),pn.CronFileParser=void 0;const o=Jf();let h=(j=class{static async parseFile(E){var _;const{readFile:M}=await Promise.resolve().then(()=>u(yx)),D=await M(E,"utf8");return Te(_=j,f,Kf).call(_,D)}static parseFileSync(E){var _;const{readFileSync:M}=yx,D=M(E,"utf8");return Te(_=j,f,Kf).call(_,D)}},f=new WeakSet,Kf=function(E){var _;const M=E.split(`
|
|
446
|
+
`),D={variables:{},expressions:[],errors:{}};for(const N of M){const O=N.trim();if(O.length===0||O.startsWith("#"))continue;const R=O.match(/^(.*)=(.*)$/);if(R){const[,I,U]=R;D.variables[I]=U.replace(/["']/g,"");continue}try{const I=Te(_=j,f,Jp).call(_,O);D.expressions.push(I.interval)}catch(I){D.errors[O]=I}}return D},Jp=function(E){const M=E.split(" ");return{interval:o.CronExpressionParser.parse(M.slice(0,5).join(" ")),command:M.slice(5,M.length)}},at(j,f),j);return pn.CronFileParser=h,pn}var jx;function m2(){return jx||(jx=1,(function(n){var r=Vs&&Vs.__createBinding||(Object.create?(function(x,E,M,D){D===void 0&&(D=M);var _=Object.getOwnPropertyDescriptor(E,M);(!_||("get"in _?!E.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return E[M]}}),Object.defineProperty(x,D,_)}):(function(x,E,M,D){D===void 0&&(D=M),x[D]=E[M]})),u=Vs&&Vs.__exportStar||function(x,E){for(var M in x)M!=="default"&&!Object.prototype.hasOwnProperty.call(E,M)&&r(E,x,M)};Object.defineProperty(n,"__esModule",{value:!0}),n.CronFileParser=n.CronExpressionParser=n.CronExpression=n.CronFieldCollection=n.CronDate=void 0;const o=Jf();var h=Nh();Object.defineProperty(n,"CronDate",{enumerable:!0,get:function(){return h.CronDate}});var f=_p();Object.defineProperty(n,"CronFieldCollection",{enumerable:!0,get:function(){return f.CronFieldCollection}});var j=Bp();Object.defineProperty(n,"CronExpression",{enumerable:!0,get:function(){return j.CronExpression}});var b=Jf();Object.defineProperty(n,"CronExpressionParser",{enumerable:!0,get:function(){return b.CronExpressionParser}});var y=h2();Object.defineProperty(n,"CronFileParser",{enumerable:!0,get:function(){return y.CronFileParser}}),u(wh(),n),n.default=o.CronExpressionParser})(Vs)),Vs}var g2=m2();const Kp=6048e5,x2=864e5,p2=6e4,v2=36e5,Nx=Symbol.for("constructDateFrom");function Ha(n,r){return typeof n=="function"?n(r):n&&typeof n=="object"&&Nx in n?n[Nx](r):n instanceof Date?new n.constructor(r):new Date(r)}function At(n,r){return Ha(r||n,n)}function y2(n,r,u){return Ha(n,+At(n)+r)}function eo(n,r,u){return y2(n,r*v2)}let b2={};function No(){return b2}function yc(n,r){var b,y,x,E;const u=No(),o=(r==null?void 0:r.weekStartsOn)??((y=(b=r==null?void 0:r.locale)==null?void 0:b.options)==null?void 0:y.weekStartsOn)??u.weekStartsOn??((E=(x=u.locale)==null?void 0:x.options)==null?void 0:E.weekStartsOn)??0,h=At(n,r==null?void 0:r.in),f=h.getDay(),j=(f<o?7:0)+f-o;return h.setDate(h.getDate()-j),h.setHours(0,0,0,0),h}function ho(n,r){return yc(n,{...r,weekStartsOn:1})}function ev(n,r){const u=At(n,r==null?void 0:r.in),o=u.getFullYear(),h=Ha(u,0);h.setFullYear(o+1,0,4),h.setHours(0,0,0,0);const f=ho(h),j=Ha(u,0);j.setFullYear(o,0,4),j.setHours(0,0,0,0);const b=ho(j);return u.getTime()>=f.getTime()?o+1:u.getTime()>=b.getTime()?o:o-1}function wx(n){const r=At(n),u=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return u.setUTCFullYear(r.getFullYear()),+n-+u}function j2(n,...r){const u=Ha.bind(null,r.find(o=>typeof o=="object"));return r.map(u)}function Sx(n,r){const u=At(n,r==null?void 0:r.in);return u.setHours(0,0,0,0),u}function N2(n,r,u){const[o,h]=j2(u==null?void 0:u.in,n,r),f=Sx(o),j=Sx(h),b=+f-wx(f),y=+j-wx(j);return Math.round((b-y)/x2)}function w2(n,r){const u=ev(n,r),o=Ha(n,0);return o.setFullYear(u,0,4),o.setHours(0,0,0,0),ho(o)}function S2(n,r){let u,o=r==null?void 0:r.in;return n.forEach(h=>{!o&&typeof h=="object"&&(o=Ha.bind(null,h));const f=At(h,o);(!u||u<f||isNaN(+f))&&(u=f)}),Ha(o,u||NaN)}function E2(n,r){let u,o=r==null?void 0:r.in;return n.forEach(h=>{!o&&typeof h=="object"&&(o=Ha.bind(null,h));const f=At(h,o);(!u||u>f||isNaN(+f))&&(u=f)}),Ha(o,u||NaN)}function C2(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function T2(n){return!(!C2(n)&&typeof n!="number"||isNaN(+At(n)))}function M2(n){return r=>{const o=(n?Math[n]:Math.trunc)(r);return o===0?0:o}}function O2(n,r){return+At(n)-+At(r)}function Ex(n,r,u){const o=O2(n,r)/p2;return M2(u==null?void 0:u.roundingMethod)(o)}function R2(n,r){const u=At(n,r==null?void 0:r.in);return u.setFullYear(u.getFullYear(),0,1),u.setHours(0,0,0,0),u}const D2={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"}},k2=(n,r,u)=>{let o;const h=D2[n];return typeof h=="string"?o=h:r===1?o=h.one:o=h.other.replace("{{count}}",r.toString()),u!=null&&u.addSuffix?u.comparison&&u.comparison>0?"in "+o:o+" ago":o};function Bf(n){return(r={})=>{const u=r.width?String(r.width):n.defaultWidth;return n.formats[u]||n.formats[n.defaultWidth]}}const A2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},_2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},z2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},L2={date:Bf({formats:A2,defaultWidth:"full"}),time:Bf({formats:_2,defaultWidth:"full"}),dateTime:Bf({formats:z2,defaultWidth:"full"})},U2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},H2=(n,r,u,o)=>U2[n];function dc(n){return(r,u)=>{const o=u!=null&&u.context?String(u.context):"standalone";let h;if(o==="formatting"&&n.formattingValues){const j=n.defaultFormattingWidth||n.defaultWidth,b=u!=null&&u.width?String(u.width):j;h=n.formattingValues[b]||n.formattingValues[j]}else{const j=n.defaultWidth,b=u!=null&&u.width?String(u.width):n.defaultWidth;h=n.values[b]||n.values[j]}const f=n.argumentCallback?n.argumentCallback(r):r;return h[f]}}const q2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},V2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},B2={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"]},P2={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"}},Y2={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"}},G2=(n,r)=>{const u=Number(n),o=u%100;if(o>20||o<10)switch(o%10){case 1:return u+"st";case 2:return u+"nd";case 3:return u+"rd"}return u+"th"},F2={ordinalNumber:G2,era:dc({values:q2,defaultWidth:"wide"}),quarter:dc({values:V2,defaultWidth:"wide",argumentCallback:n=>n-1}),month:dc({values:B2,defaultWidth:"wide"}),day:dc({values:P2,defaultWidth:"wide"}),dayPeriod:dc({values:$2,defaultWidth:"wide",formattingValues:Y2,defaultFormattingWidth:"wide"})};function fc(n){return(r,u={})=>{const o=u.width,h=o&&n.matchPatterns[o]||n.matchPatterns[n.defaultMatchWidth],f=r.match(h);if(!f)return null;const j=f[0],b=o&&n.parsePatterns[o]||n.parsePatterns[n.defaultParseWidth],y=Array.isArray(b)?I2(b,M=>M.test(j)):Z2(b,M=>M.test(j));let x;x=n.valueCallback?n.valueCallback(y):y,x=u.valueCallback?u.valueCallback(x):x;const E=r.slice(j.length);return{value:x,rest:E}}}function Z2(n,r){for(const u in n)if(Object.prototype.hasOwnProperty.call(n,u)&&r(n[u]))return u}function I2(n,r){for(let u=0;u<n.length;u++)if(r(n[u]))return u}function W2(n){return(r,u={})=>{const o=r.match(n.matchPattern);if(!o)return null;const h=o[0],f=r.match(n.parsePattern);if(!f)return null;let j=n.valueCallback?n.valueCallback(f[0]):f[0];j=u.valueCallback?u.valueCallback(j):j;const b=r.slice(h.length);return{value:j,rest:b}}}const Q2=/^(\d+)(th|st|nd|rd)?/i,X2=/\d+/i,J2={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},K2={any:[/^b/i,/^(a|c)/i]},ew={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},tw={any:[/1/i,/2/i,/3/i,/4/i]},aw={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},nw={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]},lw={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},sw={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]},rw={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},iw={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}},cw={ordinalNumber:W2({matchPattern:Q2,parsePattern:X2,valueCallback:n=>parseInt(n,10)}),era:fc({matchPatterns:J2,defaultMatchWidth:"wide",parsePatterns:K2,defaultParseWidth:"any"}),quarter:fc({matchPatterns:ew,defaultMatchWidth:"wide",parsePatterns:tw,defaultParseWidth:"any",valueCallback:n=>n+1}),month:fc({matchPatterns:aw,defaultMatchWidth:"wide",parsePatterns:nw,defaultParseWidth:"any"}),day:fc({matchPatterns:lw,defaultMatchWidth:"wide",parsePatterns:sw,defaultParseWidth:"any"}),dayPeriod:fc({matchPatterns:rw,defaultMatchWidth:"any",parsePatterns:iw,defaultParseWidth:"any"})},uw={code:"en-US",formatDistance:k2,formatLong:L2,formatRelative:H2,localize:F2,match:cw,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ow(n,r){const u=At(n,r==null?void 0:r.in);return N2(u,R2(u))+1}function dw(n,r){const u=At(n,r==null?void 0:r.in),o=+ho(u)-+w2(u);return Math.round(o/Kp)+1}function tv(n,r){var E,M,D,_;const u=At(n,r==null?void 0:r.in),o=u.getFullYear(),h=No(),f=(r==null?void 0:r.firstWeekContainsDate)??((M=(E=r==null?void 0:r.locale)==null?void 0:E.options)==null?void 0:M.firstWeekContainsDate)??h.firstWeekContainsDate??((_=(D=h.locale)==null?void 0:D.options)==null?void 0:_.firstWeekContainsDate)??1,j=Ha((r==null?void 0:r.in)||n,0);j.setFullYear(o+1,0,f),j.setHours(0,0,0,0);const b=yc(j,r),y=Ha((r==null?void 0:r.in)||n,0);y.setFullYear(o,0,f),y.setHours(0,0,0,0);const x=yc(y,r);return+u>=+b?o+1:+u>=+x?o:o-1}function fw(n,r){var b,y,x,E;const u=No(),o=(r==null?void 0:r.firstWeekContainsDate)??((y=(b=r==null?void 0:r.locale)==null?void 0:b.options)==null?void 0:y.firstWeekContainsDate)??u.firstWeekContainsDate??((E=(x=u.locale)==null?void 0:x.options)==null?void 0:E.firstWeekContainsDate)??1,h=tv(n,r),f=Ha((r==null?void 0:r.in)||n,0);return f.setFullYear(h,0,o),f.setHours(0,0,0,0),yc(f,r)}function hw(n,r){const u=At(n,r==null?void 0:r.in),o=+yc(u,r)-+fw(u,r);return Math.round(o/Kp)+1}function ct(n,r){const u=n<0?"-":"",o=Math.abs(n).toString().padStart(r,"0");return u+o}const Ql={y(n,r){const u=n.getFullYear(),o=u>0?u:1-u;return ct(r==="yy"?o%100:o,r.length)},M(n,r){const u=n.getMonth();return r==="M"?String(u+1):ct(u+1,2)},d(n,r){return ct(n.getDate(),r.length)},a(n,r){const u=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return u.toUpperCase();case"aaa":return u;case"aaaaa":return u[0];case"aaaa":default:return u==="am"?"a.m.":"p.m."}},h(n,r){return ct(n.getHours()%12||12,r.length)},H(n,r){return ct(n.getHours(),r.length)},m(n,r){return ct(n.getMinutes(),r.length)},s(n,r){return ct(n.getSeconds(),r.length)},S(n,r){const u=r.length,o=n.getMilliseconds(),h=Math.trunc(o*Math.pow(10,u-3));return ct(h,r.length)}},$r={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Cx={G:function(n,r,u){const o=n.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return u.era(o,{width:"abbreviated"});case"GGGGG":return u.era(o,{width:"narrow"});case"GGGG":default:return u.era(o,{width:"wide"})}},y:function(n,r,u){if(r==="yo"){const o=n.getFullYear(),h=o>0?o:1-o;return u.ordinalNumber(h,{unit:"year"})}return Ql.y(n,r)},Y:function(n,r,u,o){const h=tv(n,o),f=h>0?h:1-h;if(r==="YY"){const j=f%100;return ct(j,2)}return r==="Yo"?u.ordinalNumber(f,{unit:"year"}):ct(f,r.length)},R:function(n,r){const u=ev(n);return ct(u,r.length)},u:function(n,r){const u=n.getFullYear();return ct(u,r.length)},Q:function(n,r,u){const o=Math.ceil((n.getMonth()+1)/3);switch(r){case"Q":return String(o);case"QQ":return ct(o,2);case"Qo":return u.ordinalNumber(o,{unit:"quarter"});case"QQQ":return u.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return u.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return u.quarter(o,{width:"wide",context:"formatting"})}},q:function(n,r,u){const o=Math.ceil((n.getMonth()+1)/3);switch(r){case"q":return String(o);case"qq":return ct(o,2);case"qo":return u.ordinalNumber(o,{unit:"quarter"});case"qqq":return u.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return u.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return u.quarter(o,{width:"wide",context:"standalone"})}},M:function(n,r,u){const o=n.getMonth();switch(r){case"M":case"MM":return Ql.M(n,r);case"Mo":return u.ordinalNumber(o+1,{unit:"month"});case"MMM":return u.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return u.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return u.month(o,{width:"wide",context:"formatting"})}},L:function(n,r,u){const o=n.getMonth();switch(r){case"L":return String(o+1);case"LL":return ct(o+1,2);case"Lo":return u.ordinalNumber(o+1,{unit:"month"});case"LLL":return u.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return u.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return u.month(o,{width:"wide",context:"standalone"})}},w:function(n,r,u,o){const h=hw(n,o);return r==="wo"?u.ordinalNumber(h,{unit:"week"}):ct(h,r.length)},I:function(n,r,u){const o=dw(n);return r==="Io"?u.ordinalNumber(o,{unit:"week"}):ct(o,r.length)},d:function(n,r,u){return r==="do"?u.ordinalNumber(n.getDate(),{unit:"date"}):Ql.d(n,r)},D:function(n,r,u){const o=ow(n);return r==="Do"?u.ordinalNumber(o,{unit:"dayOfYear"}):ct(o,r.length)},E:function(n,r,u){const o=n.getDay();switch(r){case"E":case"EE":case"EEE":return u.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return u.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return u.day(o,{width:"short",context:"formatting"});case"EEEE":default:return u.day(o,{width:"wide",context:"formatting"})}},e:function(n,r,u,o){const h=n.getDay(),f=(h-o.weekStartsOn+8)%7||7;switch(r){case"e":return String(f);case"ee":return ct(f,2);case"eo":return u.ordinalNumber(f,{unit:"day"});case"eee":return u.day(h,{width:"abbreviated",context:"formatting"});case"eeeee":return u.day(h,{width:"narrow",context:"formatting"});case"eeeeee":return u.day(h,{width:"short",context:"formatting"});case"eeee":default:return u.day(h,{width:"wide",context:"formatting"})}},c:function(n,r,u,o){const h=n.getDay(),f=(h-o.weekStartsOn+8)%7||7;switch(r){case"c":return String(f);case"cc":return ct(f,r.length);case"co":return u.ordinalNumber(f,{unit:"day"});case"ccc":return u.day(h,{width:"abbreviated",context:"standalone"});case"ccccc":return u.day(h,{width:"narrow",context:"standalone"});case"cccccc":return u.day(h,{width:"short",context:"standalone"});case"cccc":default:return u.day(h,{width:"wide",context:"standalone"})}},i:function(n,r,u){const o=n.getDay(),h=o===0?7:o;switch(r){case"i":return String(h);case"ii":return ct(h,r.length);case"io":return u.ordinalNumber(h,{unit:"day"});case"iii":return u.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return u.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return u.day(o,{width:"short",context:"formatting"});case"iiii":default:return u.day(o,{width:"wide",context:"formatting"})}},a:function(n,r,u){const h=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return u.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"aaa":return u.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return u.dayPeriod(h,{width:"narrow",context:"formatting"});case"aaaa":default:return u.dayPeriod(h,{width:"wide",context:"formatting"})}},b:function(n,r,u){const o=n.getHours();let h;switch(o===12?h=$r.noon:o===0?h=$r.midnight:h=o/12>=1?"pm":"am",r){case"b":case"bb":return u.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"bbb":return u.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return u.dayPeriod(h,{width:"narrow",context:"formatting"});case"bbbb":default:return u.dayPeriod(h,{width:"wide",context:"formatting"})}},B:function(n,r,u){const o=n.getHours();let h;switch(o>=17?h=$r.evening:o>=12?h=$r.afternoon:o>=4?h=$r.morning:h=$r.night,r){case"B":case"BB":case"BBB":return u.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"BBBBB":return u.dayPeriod(h,{width:"narrow",context:"formatting"});case"BBBB":default:return u.dayPeriod(h,{width:"wide",context:"formatting"})}},h:function(n,r,u){if(r==="ho"){let o=n.getHours()%12;return o===0&&(o=12),u.ordinalNumber(o,{unit:"hour"})}return Ql.h(n,r)},H:function(n,r,u){return r==="Ho"?u.ordinalNumber(n.getHours(),{unit:"hour"}):Ql.H(n,r)},K:function(n,r,u){const o=n.getHours()%12;return r==="Ko"?u.ordinalNumber(o,{unit:"hour"}):ct(o,r.length)},k:function(n,r,u){let o=n.getHours();return o===0&&(o=24),r==="ko"?u.ordinalNumber(o,{unit:"hour"}):ct(o,r.length)},m:function(n,r,u){return r==="mo"?u.ordinalNumber(n.getMinutes(),{unit:"minute"}):Ql.m(n,r)},s:function(n,r,u){return r==="so"?u.ordinalNumber(n.getSeconds(),{unit:"second"}):Ql.s(n,r)},S:function(n,r){return Ql.S(n,r)},X:function(n,r,u){const o=n.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return Mx(o);case"XXXX":case"XX":return Gs(o);case"XXXXX":case"XXX":default:return Gs(o,":")}},x:function(n,r,u){const o=n.getTimezoneOffset();switch(r){case"x":return Mx(o);case"xxxx":case"xx":return Gs(o);case"xxxxx":case"xxx":default:return Gs(o,":")}},O:function(n,r,u){const o=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Tx(o,":");case"OOOO":default:return"GMT"+Gs(o,":")}},z:function(n,r,u){const o=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Tx(o,":");case"zzzz":default:return"GMT"+Gs(o,":")}},t:function(n,r,u){const o=Math.trunc(+n/1e3);return ct(o,r.length)},T:function(n,r,u){return ct(+n,r.length)}};function Tx(n,r=""){const u=n>0?"-":"+",o=Math.abs(n),h=Math.trunc(o/60),f=o%60;return f===0?u+String(h):u+String(h)+r+ct(f,2)}function Mx(n,r){return n%60===0?(n>0?"-":"+")+ct(Math.abs(n)/60,2):Gs(n,r)}function Gs(n,r=""){const u=n>0?"-":"+",o=Math.abs(n),h=ct(Math.trunc(o/60),2),f=ct(o%60,2);return u+h+r+f}const Ox=(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"})}},av=(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"})}},mw=(n,r)=>{const u=n.match(/(P+)(p+)?/)||[],o=u[1],h=u[2];if(!h)return Ox(n,r);let f;switch(o){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}}",Ox(o,r)).replace("{{time}}",av(h,r))},gw={p:av,P:mw},xw=/^D+$/,pw=/^Y+$/,vw=["D","DD","YY","YYYY"];function yw(n){return xw.test(n)}function bw(n){return pw.test(n)}function jw(n,r,u){const o=Nw(n,r,u);if(console.warn(o),vw.includes(n))throw new RangeError(o)}function Nw(n,r,u){const o=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${r}\`) for formatting ${o} to the input \`${u}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ww=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Sw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ew=/^'([^]*?)'?$/,Cw=/''/g,Tw=/[a-zA-Z]/;function Ps(n,r,u){var E,M,D,_;const o=No(),h=o.locale??uw,f=o.firstWeekContainsDate??((M=(E=o.locale)==null?void 0:E.options)==null?void 0:M.firstWeekContainsDate)??1,j=o.weekStartsOn??((_=(D=o.locale)==null?void 0:D.options)==null?void 0:_.weekStartsOn)??0,b=At(n,u==null?void 0:u.in);if(!T2(b))throw new RangeError("Invalid time value");let y=r.match(Sw).map(N=>{const O=N[0];if(O==="p"||O==="P"){const R=gw[O];return R(N,h.formatLong)}return N}).join("").match(ww).map(N=>{if(N==="''")return{isToken:!1,value:"'"};const O=N[0];if(O==="'")return{isToken:!1,value:Mw(N)};if(Cx[O])return{isToken:!0,value:N};if(O.match(Tw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");return{isToken:!1,value:N}});h.localize.preprocessor&&(y=h.localize.preprocessor(b,y));const x={firstWeekContainsDate:f,weekStartsOn:j,locale:h};return y.map(N=>{if(!N.isToken)return N.value;const O=N.value;(bw(O)||yw(O))&&jw(O,r,String(n));const R=Cx[O[0]];return R(b,O,h.localize,x)}).join("")}function Mw(n){const r=n.match(Ew);return r?r[1].replace(Cw,"'"):n}function Ow(n,r){return+At(n)>+At(r)}function Rw(n,r){return+At(n)<+At(r)}function Dw(n,r){const u=At(n,r==null?void 0:r.in);return u.setMinutes(0,0,0),u}const Pf=vp,to=[{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"}],ul=160,ao=14,kw=10,Aw=7,Rx=4,_w=({configs:n,currentProjectId:r,onEditJob:u,queueStatus:o,queueAnalytics:h})=>{const f=L.useMemo(()=>Dw(new Date),[]),j=L.useMemo(()=>eo(f,24),[f]),b=L.useMemo(()=>eo(f,-24),[f]),y=j,x=L.useMemo(()=>{const k=[];for(let w=0;w<=24;w++)k.push(eo(f,w));return k},[f]),E=L.useMemo(()=>{const k=[];return n.forEach(({projectId:w,config:q})=>{var le,S,te,ae,ie,ge,pe;const G={executor:q.executorEnabled!==!1?q.cronSchedule:null,reviewer:q.reviewerEnabled?q.reviewerSchedule:null,qa:q.qa.enabled?q.qa.schedule:null,audit:q.audit.enabled?q.audit.schedule:null,ux:(le=q.ux)!=null&&le.enabled?q.ux.schedule:null,slicer:q.roadmapScanner.enabled?q.roadmapScanner.slicerSchedule:null,analytics:(S=q.analytics)!=null&&S.enabled?(te=q.analytics)==null?void 0:te.schedule:null,"pr-resolver":(ae=q.prResolver)!=null&&ae.enabled?q.prResolver.schedule:null,merger:(ie=q.merger)!=null&&ie.enabled?(ge=q.merger)==null?void 0:ge.schedule:null,manager:(pe=q.manager)!=null&&pe.enabled?q.manager.schedule:null},Z=q.cronScheduleOffset||0;Object.entries(G).forEach(([$,K])=>{if(K)try{const fe=g2.CronExpressionParser.parse(K,{currentDate:f,endDate:j});for(;fe.hasNext();){const me=fe.next(),be=new Date(me.getTime());be.setMinutes(be.getMinutes()+Z),Ow(be,f)&&Rw(be,j)&&k.push({projectId:w,jobType:$,time:be})}}catch(fe){console.error(`Failed to parse cron "${K}" for ${w}/${$}`,fe)}})}),k},[n,f,j]),M=L.useMemo(()=>{const k=new Set;return n.length===0||(n.every(w=>w.config.executorEnabled===!1)&&k.add("executor"),n.every(w=>!w.config.reviewerEnabled)&&k.add("reviewer"),n.every(w=>!w.config.qa.enabled)&&k.add("qa"),n.every(w=>!w.config.audit.enabled)&&k.add("audit"),n.every(w=>!w.config.roadmapScanner.enabled)&&k.add("slicer"),n.every(w=>{var q;return!((q=w.config.analytics)!=null&&q.enabled)})&&k.add("analytics"),n.every(w=>{var q;return!((q=w.config.prResolver)!=null&&q.enabled)})&&k.add("pr-resolver"),n.every(w=>{var q;return!((q=w.config.merger)!=null&&q.enabled)})&&k.add("merger"),n.every(w=>{var q;return!((q=w.config.manager)!=null&&q.enabled)})&&k.add("manager")),k},[n]),D=L.useMemo(()=>{const k=new Map;let w=0;return n.forEach(q=>{q.projectId===r||(k.set(q.projectId,w%to.length),w++)}),k},[n,r]),_=k=>Ex(k,f),N=L.useMemo(()=>{const k=[];for(let w=0;w<=24;w++)k.push(eo(b,w));return k},[b]),O=k=>{const w=E2([S2([k,b]),y]);return Ex(w,b)},R=L.useMemo(()=>{const k=(h==null?void 0:h.recentRuns)??[],w=new Map;for(const q of k){const G=q.providerKey||"default",Z=new Date(q.startedAt*1e3),le=q.finishedAt?new Date(q.finishedAt*1e3):new Date;le<b||Z>y||(w.has(G)||w.set(G,[]),w.get(G).push({id:q.id,jobType:q.jobType,status:q.status,projectPath:q.projectPath,startedAt:Z,finishedAt:le,throttledCount:q.throttledCount}))}if(o!=null&&o.running){const q=o.running.providerKey??"default";w.has(q)||w.set(q,[]),w.get(q).push({id:o.running.id,jobType:o.running.jobType,status:"running",projectPath:o.running.projectPath,startedAt:new Date((o.running.dispatchedAt??o.running.enqueuedAt)*1e3),finishedAt:new Date,throttledCount:0})}return Array.from(w.entries()).sort(([q],[G])=>q.localeCompare(G)).map(([q,G])=>({providerKey:q,runs:G.sort((Z,le)=>Z.startedAt.getTime()-le.startedAt.getTime())}))},[y,b,h,o]),I=k=>k.split(/[-_]/).map(w=>w.charAt(0).toUpperCase()+w.slice(1)).join(" "),U=n.length>1,J=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:x.map((k,w)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},w))});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."})]}),U&&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(k=>k.projectId!==r).slice(0,5).map(k=>{const w=D.get(k.projectId)??0,q=to[w],G=(k.projectId.split("/").pop()??k.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 ${q.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:k.projectId,children:G})]},k.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+ul},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:ul},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:x.map((k,w)=>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:w*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Ps(k,"HH:mm")})},w))})]}),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."})}),Pf.map(k=>{const w=M.has(k.id),q=E.filter(Z=>Z.jobType===k.id);if(!U)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${w?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:ul},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 ${k.color.bg} shrink-0`}),s.jsx("span",{className:"text-xs font-semibold text-slate-300",children:k.label})]}),s.jsxs("div",{className:"flex-1 relative h-10",children:[J,q.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:w?"Disabled":"No runs in this window"})}):q.map((Z,le)=>s.jsx("button",{type:"button",onClick:()=>u==null?void 0:u(Z.projectId,Z.jobType),style:{left:_(Z.time)-3},className:`absolute top-1/2 -translate-y-1/2 h-4 w-6 rounded border ${k.color.bg} ${k.color.border} opacity-90 hover:opacity-100 hover:scale-110 transition-all cursor-pointer shadow-lg group`,title:`${k.label} at ${Ps(Z.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:Ps(Z.time,"HH:mm")})},le))]})]},k.id);const G=n.length*ao+Rx*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${w?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:ul,height:G},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 ${k.color.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:k.label})]}),n.map(Z=>{const le=Z.projectId===r,S=(Z.projectId.split("/").pop()??Z.projectId).slice(0,14),te=D.get(Z.projectId)??0,ae=le?k.color.bg:to[te].bg;return s.jsxs("div",{style:{height:ao},className:"flex items-center gap-1 overflow-hidden",children:[s.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${ae}`}),s.jsx("span",{className:`text-[9px] truncate ${le?"text-slate-200 font-semibold":"text-slate-600"}`,title:Z.projectId,children:le?`${S} ★`:S})]},Z.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:G},children:[J,n.map((Z,le)=>{const S=Z.projectId===r,te=q.filter(K=>K.projectId===Z.projectId),ae=Rx+le*ao,ie=S?kw:Aw,ge=Math.floor((ao-ie)/2),pe=D.get(Z.projectId)??0,$=S?{bg:k.color.bg,border:k.color.border}:to[pe];return s.jsxs(ze.Fragment,{children:[le>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:ae}}),te.map((K,fe)=>s.jsx("button",{type:"button",onClick:()=>u==null?void 0:u(Z.projectId,K.jobType),style:{left:_(K.time)-3,top:ae+ge,height:ie},className:`absolute w-6 rounded border ${$.bg} ${$.border} ${S?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${Z.projectId} · ${k.label} @ ${Ps(K.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:Ps(K.time,"HH:mm")})},fe))]},Z.projectId)}),q.length===0&&!w&&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"})})]})]},k.id)})]}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:ul+_(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"})]}),U&&s.jsx("div",{className:"flex items-center gap-1.5",children:s.jsx("span",{children:"★ = current project · blocks in same column = scheduling overlap"})})]}),R.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+ul},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:ul},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:N.map((k,w)=>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:w*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Ps(k,"HH:mm")})},w))})]}),s.jsx("div",{className:"relative",children:R.map(({providerKey:k,runs:w})=>s.jsxs("div",{className:"flex border-b border-slate-800/30 min-h-14","data-testid":`provider-execution-lane-${k}`,children:[s.jsxs("div",{style:{width:ul},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:k,children:I(k)}),s.jsx("span",{className:"text-[10px] text-slate-500 font-mono truncate",children:k})]}),s.jsxs("div",{className:"flex-1 relative h-14",children:[s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:N.map((q,G)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},G))}),w.map(q=>{const G=Pf.find(pe=>pe.id===q.jobType)??Pf[0],Z=O(q.startedAt),le=O(q.finishedAt),S=Math.max(le-Z,8),te=q.status==="running",ae=q.status==="error"||q.status==="failed"||q.status==="errored",ie=te?"bg-green-500":ae?"bg-red-500":G.color.bg,ge=te?"border-green-400/60":ae?"border-red-400/60":G.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${ie} ${ge} opacity-85 shadow-lg ${te?"animate-pulse":""}`,style:{left:Z,width:S},title:`${k} • ${G.label} • ${Ps(q.startedAt,"MMM d HH:mm")} • ${q.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:G.label}),s.jsx("span",{className:"text-white/70",children:q.status}),q.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",q.throttledCount,"x"]})]})},`${k}-${q.id}-${q.startedAt.getTime()}`)})]})]},k))}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:ul+O(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},mo=[{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"}],Sh=[{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",ux:"0 7 * * 1",slicer:"35 19,7 * * *",prResolver:"15 9,15,21 * * *",merger:"55 */4 * * *",manager:"15 7 * * *"},hints:{executor:"8pm–6am every 2h (6 runs)",reviewer:"8:25am, 2:25pm, 8:25pm",qa:"10:45pm & 10:45am",audit:"Mon 4:50am",ux:"Mon 7:00am",slicer:"7:35pm & 7:35am",prResolver:"9:15am, 3:15pm, 9:15pm",merger:"Every 4h at :55",manager:"Daily at 7:15am"}},{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",ux:"0 7 * * 1",slicer:"35 */6 * * *",prResolver:"15 6,14,22 * * *",merger:"55 */4 * * *",manager:"15 7 * * *"},hints:{executor:"Every hour at :05",reviewer:"Every 3h at :25",qa:"2:45am, 10:45am & 6:45pm",audit:"Mon 3:50am",ux:"Mon 7:00am",slicer:"Every 6h at :35",prResolver:"6:15am, 2:15pm & 10:15pm",merger:"Every 4h at :55",manager:"Daily at 7:15am"}},{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",ux:"0 10 * * 1",slicer:"35 7 * * 1",prResolver:"15 8,12,16 * * 1-5",merger:"55 */4 * * 1-5",manager:"15 7 * * 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",ux:"Mon 10:00am",slicer:"Mon 7:35am",prResolver:"8:15am, 12:15pm & 4:15pm weekdays",merger:"Every 4h at :55 weekdays",manager:"Weekdays at 7:15am"}},{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",ux:"0 7 * * 1",slicer:"35 1 * * 1",prResolver:"15 8 * * 1,4",merger:"55 */8 * * *",manager:"15 7 * * 1"},hints:{executor:"2:05am & 2:05pm",reviewer:"8:25am & 8:25pm",qa:"Sun 3:45am",audit:"Sun 4:50am",ux:"Mon 7:00am",slicer:"Mon 1:35am",prResolver:"Mon & Thu at 8:15am",merger:"Every 8h at :55",manager:"Mon 7:15am"}}];function Zr(n){return n?n.trim().replace(/\s+/g," "):""}function ol(n,r){return Zr(n)===Zr(r)}function eh(n){if(n)return Sh.find(r=>r.id===n)}function nv(n,r,u,o,h,f,j,b,y,x){return ol(n.schedules.executor,r)&&ol(n.schedules.reviewer,u)&&ol(n.schedules.qa,o)&&ol(n.schedules.audit,h)&&ol(n.schedules.ux,f)&&ol(n.schedules.slicer,j)&&ol(n.schedules.prResolver,b)&&ol(n.schedules.merger,y)&&ol(n.schedules.manager,x)}function zw(n,r,u,o,h,f,j,b,y){return Sh.find(x=>nv(x,n,r,u,o,h,f,j,b,y))}function Lw(n,r,u,o,h,f,j,b,y,x){const E=eh(n);return E&&nv(E,r,u,o,h,f,j,b,y,x)?E:zw(r,u,o,h,f,j,b,y,x)}function Bt(n){const r=Zr(n),u=r.split(/\s+/);if(u.length!==5)return r;const[o,h,f,j,b]=u,y=/^\d+$/.test(o),x=mo.find(E=>Zr(E.value)===r);if(x)return x.label;if(o==="*/30"&&h==="*")return"Every 30 minutes";if(o==="0"&&h==="*")return"Every hour";if(o.startsWith("*/"))return`Every ${parseInt(o.replace("*/",""),10)} minutes`;if(y&&h.startsWith("*/")&&f==="*"&&j==="*"&&b==="*"){const E=parseInt(h.replace("*/",""),10);return o==="0"?`Every ${E} hours`:`Every ${E} hours at :${o.padStart(2,"0")}`}if(o==="0"&&h.startsWith("*/"))return`Every ${parseInt(h.replace("*/",""),10)} hours`;if(o==="0"&&h.includes("-")){const[E,M]=h.split("-");return`Every hour from ${hc(E)} to ${hc(M)}`}if(y&&h.includes("-")&&f==="*"&&j==="*"&&b==="*"){const[E,M]=h.split("-");return`Every hour from ${mc(E,o)} to ${mc(M,o)}`}if(o==="0"&&h.includes(",")){const E=h.split(",").map(hc);return E.length<=3?`At ${E.join(" and ")}`:`At ${E.slice(0,-1).join(", ")}, and ${E[E.length-1]}`}if(y&&h.includes(",")&&f==="*"&&j==="*"&&(b==="*"||b==="1-5")){const E=h.split(",").map(D=>mc(D,o)),M=b==="1-5"?"Weekdays at ":"At ";return E.length<=3?`${M}${E.join(" and ")}`:`${M}${E.slice(0,-1).join(", ")}, and ${E[E.length-1]}`}return o==="0"&&h!=="*"&&f==="*"&&j==="*"&&b==="*"?`Daily at ${hc(h)}`:y&&h!=="*"&&f==="*"&&j==="*"&&b==="*"?`Daily at ${mc(h,o)}`:o==="0"&&h!=="*"&&f==="*"&&j==="*"&&b==="1-5"?`Weekdays at ${hc(h)}`:y&&h!=="*"&&f==="*"&&j==="*"&&b==="1-5"?`Weekdays at ${mc(h,o)}`:r}function hc(n){const r=parseInt(n,10);return r===0?"12 AM":r<12?`${r} AM`:r===12?"12 PM":`${r-12} PM`}function mc(n,r){const u=r.padStart(2,"0"),o=parseInt(n,10);return Number.isNaN(o)?`${n}:${u}`:o===0?`12:${u} AM`:o<12?`${o}:${u} AM`:o===12?`12:${u} PM`:`${o-12}:${u} PM`}function Uw(n){const r=Zr(n),u=mo.find(o=>Zr(o.value)===r);return(u==null?void 0:u.value)??"__custom__"}function Dx(n){const r=new Date,u=n.getTime()-r.getTime(),o=Math.floor(u/6e4),h=Math.floor(o/60),f=Math.floor(h/24);return o<1?"less than a minute":o<60?`in ${o} minute${o>1?"s":""}`:h<24?`in ${h} hour${h>1?"s":""}`:`in ${f} day${f>1?"s":""}`}const Hw=({label:n,value:r,onChange:u,helperText:o,placeholder:h="5 */3 * * *"})=>{const f=Uw(r),j=f==="__custom__",b=E=>{E!=="__custom__"&&u(E)},y=E=>{u(E.target.value)},x=mo.find(E=>E.value===f);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(We,{label:n,value:f,onChange:b,options:mo.map(E=>({label:E.label,value:E.value})),helperText:j?void 0:(x==null?void 0:x.description)||o}),j&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(je,{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)"]})]})]})},An=({id:n,icon:r,title:u,description:o,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:u}),s.jsx("div",{className:"text-xs text-slate-500 mt-0.5",children:o})]})]}),s.jsx(Hw,{label:"",value:h,onChange:f})]}),qw=({form:n,scheduleMode:r,selectedTemplateId:u,onFieldChange:o,onSwitchToTemplate:h,onSwitchToCustom:f,onApplyTemplate:j})=>s.jsxs(et,{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:Sh.map(b=>{const y=u===b.id;return s.jsxs("button",{type:"button",onClick:()=>j(b),className:`text-left p-4 rounded-lg border transition-colors ${y?"border-indigo-500 bg-indigo-950/40":"border-slate-700 bg-slate-800/30 hover:border-slate-600"}`,children:[s.jsx("div",{className:"font-medium text-slate-200 mb-1",children:b.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:b.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",b.hints.executor],["Reviewer",b.hints.reviewer],["QA",b.hints.qa],["Audit",b.hints.audit],["UX",b.hints.ux],["Planner",b.hints.slicer],["PR Resolver",b.hints.prResolver],["Merger",b.hints.merger],["Manager",b.hints.manager]].map(([x,E])=>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:E})]},x))})]},b.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(An,{id:"job-schedule-executor",icon:vn,title:"PRD Executor",description:"Executes PRDs to generate code and create PRs",value:n.cronSchedule,onChange:b=>o("cronSchedule",b)}),s.jsx(An,{id:"job-schedule-reviewer",icon:pc,title:"PR Reviewer",description:"Reviews PRs and provides feedback or automated fixes",value:n.reviewerSchedule,onChange:b=>o("reviewerSchedule",b)}),s.jsx(An,{id:"job-schedule-qa",icon:hp,title:"Quality Assurance",description:"Automated UI testing using Playwright",value:n.qa.schedule,onChange:b=>o("qa",{...n.qa,schedule:b})}),s.jsx(An,{id:"job-schedule-audit",icon:Xr,title:"Code Audit",description:"Automated code quality and security audits",value:n.audit.schedule,onChange:b=>o("audit",{...n.audit,schedule:b})}),n.ux&&s.jsx(An,{id:"job-schedule-ux",icon:pc,title:"UX",description:"Inspect product flows with browser automation",value:n.ux.schedule,onChange:b=>o("ux",{...n.ux,schedule:b})}),s.jsx(An,{id:"job-schedule-slicer",icon:xh,title:"Planner",description:"Generate PRDs from ROADMAP.md or audit findings",value:n.roadmapScanner.slicerSchedule,onChange:b=>o("roadmapScanner",{...n.roadmapScanner,slicerSchedule:b})}),n.analytics&&s.jsx(An,{id:"job-schedule-analytics",icon:yo,title:"Analytics",description:"Fetch Amplitude data, analyze with AI, and create issues",value:n.analytics.schedule,onChange:b=>o("analytics",{...n.analytics,schedule:b})}),n.prResolver&&s.jsx(An,{id:"job-schedule-pr-resolver",icon:mh,title:"PR Resolver",description:"Rebases PRs and applies review feedback",value:n.prResolver.schedule,onChange:b=>o("prResolver",{...n.prResolver,schedule:b})}),n.merger&&s.jsx(An,{id:"job-schedule-merger",icon:bo,title:"Merge Orchestrator",description:"Scans, rebases, and merges approved PRs",value:n.merger.schedule,onChange:b=>o("merger",{...n.merger,schedule:b})}),n.manager&&s.jsx(An,{id:"job-schedule-manager",icon:hh,title:"Manager",description:"Monitors roadmap, PRDs, docs, and system health",value:n.manager.schedule,onChange:b=>o("manager",{...n.manager,schedule:b})})]})]}),Fr=({label:n,value:r=[],onChange:u,placeholder:o,helpText:h})=>{const[f,j]=ze.useState(""),b=()=>{f.trim()&&!r.includes(f.trim())&&(u([...r,f.trim()]),j(""))},y=E=>{u(r.filter(M=>M!==E))},x=E=>{E.key==="Enter"&&(E.preventDefault(),b())};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(E=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[E,s.jsx("button",{type:"button",onClick:()=>y(E),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${E}`,title:`Remove ${E}`,children:s.jsx(Jr,{className:"h-3 w-3"})})]},E))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:f,onChange:E=>j(E.target.value),onKeyDown:x,placeholder:o,className:"flex-1 bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"}),s.jsx(Le,{onClick:b,disabled:!f.trim(),"aria-label":`Add ${n.toLowerCase()} value`,children:s.jsx(es,{className:"h-4 w-4"})})]}),h&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:h})]})},_n=({title:n,icon:r,description:u,enabled:o,onToggle:h,expanded:f,onExpandChange:j,scheduleSummary:b,providerLabel:y,children:x,id:E})=>s.jsxs("div",{id:E,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:()=>j(!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:u})]})]}),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:[b&&s.jsx(Tt,{variant:"neutral",className:"bg-slate-800/50 text-[10px]",children:b}),y&&s.jsx(Tt,{variant:"info",className:"bg-blue-500/5 text-[10px]",children:y})]}),s.jsx("div",{onClick:M=>M.stopPropagation(),children:s.jsx(Pt,{checked:o,onChange:h})}),s.jsx(fh,{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})})})})]}),zn=({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"})]}),Vw=({form:n,updateField:r,handleRoadmapToggle:u,presetOptions:o,expandedJob:h,onExpandedJobChange:f,onOpenSchedule:j})=>{var x,E,M,D,_,N,O,R,I,U,J,k;const b=(w,q)=>{const G={...n.jobProviders};q===""?delete G[w]:G[w]=q,r("jobProviders",G)},y=[{label:"Use Global (default)",value:""},...o];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(qj,{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(Pt,{checked:n.feedback.enabled,onChange:w=>r("feedback",{...n.feedback,enabled:w})})]}),s.jsx(je,{label:"Activation Threshold",type:"number",min:"0",max:"1",step:"0.05",value:String(n.feedback.confidenceThreshold),onChange:w=>r("feedback",{...n.feedback,confidenceThreshold:Math.max(0,Math.min(1,Number(w.target.value||0)))}),helperText:"Minimum confidence required before a snippet can activate."}),s.jsx(je,{label:"TTL",type:"number",min:"1",value:String(n.feedback.augmentationTtlDays),onChange:w=>r("feedback",{...n.feedback,augmentationTtlDays:Math.max(1,Number(w.target.value||1))}),rightIcon:s.jsx("span",{className:"text-xs",children:"days"}),helperText:"How long an augmentation remains active before expiry."}),s.jsx(je,{label:"Max Snippets Per Job",type:"number",min:"0",value:String(n.feedback.maxActiveAugmentations),onChange:w=>r("feedback",{...n.feedback,maxActiveAugmentations:Math.max(0,Number(w.target.value||0))}),helperText:"Maximum active augmentation snippets applied to each job prompt."}),s.jsx(je,{label:"Success Streak Expiry",type:"number",min:"0",value:String(n.feedback.successStreakToExpire),onChange:w=>r("feedback",{...n.feedback,successStreakToExpire:Math.max(0,Number(w.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:"9 total jobs"})]}),s.jsx(_n,{id:"job-section-executor",title:"PRD Executor",icon:vn,description:"Executes PRDs to generate code and create PRs",enabled:n.executorEnabled,onToggle:w=>r("executorEnabled",w),expanded:h==="executor",onExpandChange:w=>f(w?"executor":null),scheduleSummary:Bt(n.cronSchedule),providerLabel:n.jobProviders.executor?(x=o.find(w=>w.value===n.jobProviders.executor))==null?void 0:x.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(zn,{summary:Bt(n.cronSchedule),onOpen:()=>j("executor")}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsx(We,{label:"Provider",value:n.jobProviders.executor??"",onChange:w=>b("executor",w),options:y}),s.jsx(je,{label:"Max Runtime",type:"number",value:String(n.maxRuntime),onChange:w=>r("maxRuntime",Number(w.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for executor tasks"})]})]})}),s.jsx(_n,{id:"job-section-reviewer",title:"PR Reviewer",icon:pc,description:"Reviews PRs and provides feedback or automated fixes",enabled:n.reviewerEnabled,onToggle:w=>r("reviewerEnabled",w),expanded:h==="reviewer",onExpandChange:w=>f(w?"reviewer":null),scheduleSummary:Bt(n.reviewerSchedule),providerLabel:n.jobProviders.reviewer?(E=o.find(w=>w.value===n.jobProviders.reviewer))==null?void 0:E.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(zn,{summary:Bt(n.reviewerSchedule),onOpen:()=>j("reviewer")}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsx(We,{label:"Provider",value:n.jobProviders.reviewer??"",onChange:w=>b("reviewer",w),options:y}),s.jsx(je,{label:"Max Runtime",type:"number",value:String(n.reviewerMaxRuntime),onChange:w=>r("reviewerMaxRuntime",Number(w.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(je,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(n.minReviewScore),onChange:w=>r("minReviewScore",Number(w.target.value||0)),helperText:"PRs below this score will be marked as 'Needs Work'"}),s.jsx(je,{label:"Max Retries",type:"number",value:String(n.reviewerMaxRetries),onChange:w=>r("reviewerMaxRetries",Number(w.target.value||0)),helperText:"Fix attempts after initial review"}),s.jsx(je,{label:"Retry Delay",type:"number",value:String(n.reviewerRetryDelay),onChange:w=>r("reviewerRetryDelay",Number(w.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(je,{label:"Max PRs Per Run",type:"number",value:String(n.reviewerMaxPrsPerRun),onChange:w=>r("reviewerMaxPrsPerRun",Number(w.target.value||0)),helperText:"Hard cap on PRs processed per run (0 = unlimited)"})})]})]})}),s.jsx(_n,{id:"job-section-qa",title:"Quality Assurance",icon:hp,description:"Automated UI testing using Playwright",enabled:n.qa.enabled,onToggle:w=>r("qa",{...n.qa,enabled:w}),expanded:h==="qa",onExpandChange:w=>f(w?"qa":null),scheduleSummary:Bt(n.qa.schedule),providerLabel:n.jobProviders.qa?(M=o.find(w=>w.value===n.jobProviders.qa))==null?void 0:M.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(zn,{summary:Bt(n.qa.schedule),onOpen:()=>j("qa")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(We,{label:"Provider",value:n.jobProviders.qa??"",onChange:w=>b("qa",w),options:y}),s.jsx(je,{label:"Max Runtime",type:"number",value:String(n.qa.maxRuntime),onChange:w=>r("qa",{...n.qa,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(We,{label:"Artifacts",value:n.qa.artifacts,onChange:w=>r("qa",{...n.qa,artifacts:w}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}]}),s.jsx(je,{label:"Skip Label",value:n.qa.skipLabel,onChange:w=>r("qa",{...n.qa,skipLabel:w.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(Pt,{checked:n.qa.autoInstallPlaywright,onChange:w=>r("qa",{...n.qa,autoInstallPlaywright:w})})]})]}),s.jsx(Fr,{label:"QA Branch Patterns",value:n.qa.branchPatterns,onChange:w=>r("qa",{...n.qa,branchPatterns:w}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA"})]})}),s.jsx(_n,{id:"job-section-audit",title:"Code Audit",icon:Xr,description:"Automated code quality and security audits",enabled:n.audit.enabled,onToggle:w=>r("audit",{...n.audit,enabled:w}),expanded:h==="audit",onExpandChange:w=>f(w?"audit":null),scheduleSummary:Bt(n.audit.schedule),providerLabel:n.jobProviders.audit?(D=o.find(w=>w.value===n.jobProviders.audit))==null?void 0:D.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(zn,{summary:Bt(n.audit.schedule),onOpen:()=>j("audit")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(We,{label:"Provider",value:n.jobProviders.audit??"",onChange:w=>b("audit",w),options:y}),s.jsx(je,{label:"Max Runtime",type:"number",value:String(n.audit.maxRuntime),onChange:w=>r("audit",{...n.audit,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Pt,{label:"Create Board Issues",checked:n.audit.createIssues,onChange:w=>r("audit",{...n.audit,createIssues:w}),className:"self-end pb-2"}),s.jsx(We,{label:"Target Column",value:n.audit.targetColumn,disabled:!n.audit.createIssues,onChange:w=>r("audit",{...n.audit,targetColumn:w}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]})]})]})}),s.jsx(_n,{id:"job-section-ux",title:"UX",icon:pc,description:"Inspect product flows with Playwright and draft prioritized UX reports",enabled:n.ux.enabled,onToggle:w=>r("ux",{...n.ux,enabled:w}),expanded:h==="ux",onExpandChange:w=>f(w?"ux":null),scheduleSummary:Bt(n.ux.schedule),providerLabel:n.jobProviders.ux?(_=o.find(w=>w.value===n.jobProviders.ux))==null?void 0:_.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(zn,{summary:Bt(n.ux.schedule),onOpen:()=>j("ux")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(We,{label:"Provider",value:n.jobProviders.ux??"",onChange:w=>b("ux",w),options:y}),s.jsx(je,{label:"Max Runtime",type:"number",value:String(n.ux.maxRuntime),onChange:w=>r("ux",{...n.ux,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(je,{label:"Base URL",value:n.ux.baseUrl,onChange:w=>r("ux",{...n.ux,baseUrl:w.target.value}),placeholder:"https://app.example.com"}),s.jsx(je,{label:"Start URL",value:n.ux.startUrl,onChange:w=>r("ux",{...n.ux,startUrl:w.target.value}),placeholder:"/dashboard"}),s.jsx(je,{label:"Max Issues",type:"number",value:String(n.ux.maxIssues),onChange:w=>r("ux",{...n.ux,maxIssues:Math.max(1,Number(w.target.value||10))})}),s.jsx(We,{label:"Target Column",value:n.ux.targetColumn,onChange:w=>r("ux",{...n.ux,targetColumn:w}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]}),s.jsx(Pt,{label:"Auto-install Playwright",checked:n.ux.autoInstallPlaywright,onChange:w=>r("ux",{...n.ux,autoInstallPlaywright:w}),className:"self-end pb-2"})]}),s.jsx(Fr,{label:"Flows",values:n.ux.flows,onChange:w=>r("ux",{...n.ux,flows:w}),placeholder:"e.g., Sign in, Create project",helpText:"Key flows for the UX agent to inspect."}),s.jsx(je,{label:"Report Prompt",value:n.ux.reportPrompt,onChange:w=>r("ux",{...n.ux,reportPrompt:w.target.value}),placeholder:"Optional custom UX instructions"})]})}),s.jsx(_n,{id:"job-section-slicer",title:"Planner",icon:xh,description:"Generate one PRD per run using ROADMAP.md or audit findings",enabled:n.roadmapScanner.enabled,onToggle:u,expanded:h==="slicer",onExpandChange:w=>f(w?"slicer":null),scheduleSummary:Bt(n.roadmapScanner.slicerSchedule),providerLabel:n.jobProviders.slicer?(N=o.find(w=>w.value===n.jobProviders.slicer))==null?void 0:N.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(zn,{summary:Bt(n.roadmapScanner.slicerSchedule),onOpen:()=>j("slicer")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(We,{label:"Provider",value:n.jobProviders.slicer??"",onChange:w=>b("slicer",w),options:y}),s.jsx(je,{label:"Roadmap File Path",value:n.roadmapScanner.roadmapPath,onChange:w=>r("roadmapScanner",{...n.roadmapScanner,roadmapPath:w.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(je,{label:"Max Runtime",type:"number",value:String(n.roadmapScanner.slicerMaxRuntime||""),onChange:w=>r("roadmapScanner",{...n.roadmapScanner,slicerMaxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(We,{label:"Priority Mode",value:n.roadmapScanner.priorityMode||"roadmap-first",onChange:w=>r("roadmapScanner",{...n.roadmapScanner,priorityMode:w==="audit-first"?"audit-first":"roadmap-first"}),options:[{label:"Roadmap first (recommended)",value:"roadmap-first"},{label:"Audit first",value:"audit-first"}]}),s.jsx(We,{label:"Issue Column",value:n.roadmapScanner.issueColumn||"Ready",onChange:w=>r("roadmapScanner",{...n.roadmapScanner,issueColumn:w==="Draft"?"Draft":"Ready"}),options:[{label:"Ready (default)",value:"Ready"},{label:"Draft",value:"Draft"}]})]})]})}),s.jsx(_n,{id:"job-section-analytics",title:"Analytics (Amplitude)",icon:yo,description:"Fetch Amplitude data, analyze with AI, and create board issues",enabled:n.analytics.enabled,onToggle:w=>r("analytics",{...n.analytics,enabled:w}),expanded:h==="analytics",onExpandChange:w=>f(w?"analytics":null),scheduleSummary:Bt(n.analytics.schedule),providerLabel:n.jobProviders.analytics?(O=o.find(w=>w.value===n.jobProviders.analytics))==null?void 0:O.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(zn,{summary:Bt(n.analytics.schedule),onOpen:()=>j("analytics")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(We,{label:"Provider",value:n.jobProviders.analytics??"",onChange:w=>b("analytics",w),options:y}),s.jsx(je,{label:"Amplitude API Key",value:((R=n.providerEnv)==null?void 0:R.AMPLITUDE_API_KEY)??"",onChange:w=>r("providerEnv",{...n.providerEnv,AMPLITUDE_API_KEY:w.target.value}),placeholder:"Required"}),s.jsx(je,{label:"Amplitude Secret Key",type:"password",value:((I=n.providerEnv)==null?void 0:I.AMPLITUDE_SECRET_KEY)??"",onChange:w=>r("providerEnv",{...n.providerEnv,AMPLITUDE_SECRET_KEY:w.target.value}),placeholder:"Required"}),s.jsx(je,{label:"Max Runtime",type:"number",value:String(n.analytics.maxRuntime),onChange:w=>r("analytics",{...n.analytics,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(je,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(n.analytics.lookbackDays),onChange:w=>r("analytics",{...n.analytics,lookbackDays:Math.max(1,Math.min(90,Number(w.target.value||7)))})}),s.jsx(We,{label:"Target Column",value:n.analytics.targetColumn,onChange:w=>r("analytics",{...n.analytics,targetColumn:w}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]}),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:w=>r("analytics",{...n.analytics,analysisPrompt:w.target.value}),placeholder:"Custom prompt for AI analysis. Leave empty to use default.",className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-y"})]})]})]})}),s.jsx(_n,{id:"job-section-pr-resolver",title:"PR Resolver",icon:mh,description:"Repo-wide conflict resolver that rebases PRs and applies feedback",enabled:n.prResolver.enabled,onToggle:w=>r("prResolver",{...n.prResolver,enabled:w}),expanded:h==="pr-resolver",onExpandChange:w=>f(w?"pr-resolver":null),scheduleSummary:Bt(n.prResolver.schedule),providerLabel:n.jobProviders["pr-resolver"]?(U=o.find(w=>w.value===n.jobProviders["pr-resolver"]))==null?void 0:U.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(zn,{summary:Bt(n.prResolver.schedule),onOpen:()=>j("pr-resolver")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(We,{label:"Provider",value:n.jobProviders["pr-resolver"]??"",onChange:w=>b("pr-resolver",w),options:y}),s.jsx(je,{label:"Max Runtime",type:"number",value:String(n.prResolver.maxRuntime),onChange:w=>r("prResolver",{...n.prResolver,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(je,{label:"Per-PR Timeout",type:"number",value:String(n.prResolver.perPrTimeout),onChange:w=>r("prResolver",{...n.prResolver,perPrTimeout:Math.max(0,Number(w.target.value||0))}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(je,{label:"Max PRs Per Run",type:"number",min:"0",value:String(n.prResolver.maxPrsPerRun),onChange:w=>r("prResolver",{...n.prResolver,maxPrsPerRun:Math.max(0,Number(w.target.value||0))})}),s.jsx(je,{label:"Ready Label",value:n.prResolver.readyLabel,onChange:w=>r("prResolver",{...n.prResolver,readyLabel:w.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(Pt,{checked:n.prResolver.aiConflictResolution,onChange:w=>r("prResolver",{...n.prResolver,aiConflictResolution:w})})]}),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(Pt,{checked:n.prResolver.aiReviewResolution,onChange:w=>r("prResolver",{...n.prResolver,aiReviewResolution:w})})]})]}),s.jsx(Fr,{label:"PR Resolver Branch Patterns",value:n.prResolver.branchPatterns,onChange:w=>r("prResolver",{...n.prResolver,branchPatterns:w}),placeholder:"e.g., feat/, night-watch/",helpText:"Branch patterns to filter PRs (empty = all)"})]})}),s.jsx(_n,{id:"job-section-merger",title:"Merge Orchestrator",icon:bo,description:"Repo-wide PR merge coordinator — scans, rebases, and merges",enabled:n.merger.enabled,onToggle:w=>r("merger",{...n.merger,enabled:w}),expanded:h==="merger",onExpandChange:w=>f(w?"merger":null),scheduleSummary:Bt(n.merger.schedule),providerLabel:n.jobProviders.merger?(J=o.find(w=>w.value===n.jobProviders.merger))==null?void 0:J.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(zn,{summary:Bt(n.merger.schedule),onOpen:()=>j("merger")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(We,{label:"Provider",value:n.jobProviders.merger??"",onChange:w=>b("merger",w),options:y}),s.jsx(je,{label:"Max Runtime",type:"number",value:String(n.merger.maxRuntime),onChange:w=>r("merger",{...n.merger,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(We,{label:"Merge Method",value:n.merger.mergeMethod,onChange:w=>r("merger",{...n.merger,mergeMethod:w}),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]}),s.jsx(je,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(n.merger.minReviewScore),onChange:w=>r("merger",{...n.merger,minReviewScore:Math.max(0,Math.min(100,Number(w.target.value||0)))})}),s.jsx(je,{label:"Max PRs Per Run",type:"number",min:"0",value:String(n.merger.maxPrsPerRun),onChange:w=>r("merger",{...n.merger,maxPrsPerRun:Math.max(0,Number(w.target.value||0))})}),s.jsx(We,{label:"CI Policy",value:n.merger.ciPolicy,onChange:w=>r("merger",{...n.merger,ciPolicy:w}),options:[{label:"Fallback to Local Checks",value:"fallback-local"},{label:"Require GitHub CI",value:"ci-only"},{label:"Ignore CI",value:"ignore"}]}),s.jsx(je,{label:"Local Check Command",value:n.merger.localCheckCommand,onChange:w=>r("merger",{...n.merger,localCheckCommand:w.target.value}),helperText:"Used only when CI policy falls back to local checks."})]}),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(Pt,{checked:n.merger.rebaseBeforeMerge,onChange:w=>r("merger",{...n.merger,rebaseBeforeMerge:w})})]}),s.jsx(Fr,{label:"Merger Branch Patterns",value:n.merger.branchPatterns,onChange:w=>r("merger",{...n.merger,branchPatterns:w}),placeholder:"e.g., feat/, night-watch/"})]})}),s.jsx(_n,{id:"job-section-manager",title:"Manager",icon:hh,description:"Monitors roadmap, PRDs, docs, board state, and system health",enabled:n.manager.enabled,onToggle:w=>r("manager",{...n.manager,enabled:w}),expanded:h==="manager",onExpandChange:w=>f(w?"manager":null),scheduleSummary:Bt(n.manager.schedule),providerLabel:n.jobProviders.manager?(k=o.find(w=>w.value===n.jobProviders.manager))==null?void 0:k.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(zn,{summary:Bt(n.manager.schedule),onOpen:()=>j("manager")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(We,{label:"Provider",value:n.jobProviders.manager??"",onChange:w=>b("manager",w),options:y}),s.jsx(je,{label:"Max Runtime",type:"number",min:"0",value:String(n.manager.maxRuntime),onChange:w=>r("manager",{...n.manager,maxRuntime:Math.max(0,Number(w.target.value||0))}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(We,{label:"Output Mode",value:n.manager.outputMode,onChange:w=>r("manager",{...n.manager,outputMode:w}),options:[{value:"board-draft",label:"Board Draft"},{value:"filesystem-prd",label:"Filesystem PRD"},{value:"report-only",label:"Report Only"}]}),s.jsx(We,{label:"Authority",value:n.manager.authority,onChange:w=>r("manager",{...n.manager,authority:w}),options:[{value:"draft",label:"Draft"},{value:"ready",label:"Ready"},{value:"workflow",label:"Workflow"}]}),s.jsx(We,{label:"Target Column",value:n.manager.targetColumn,onChange:w=>r("manager",{...n.manager,targetColumn:w}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]}),s.jsx(je,{label:"Memory Path",value:n.manager.memoryPath,onChange:w=>r("manager",{...n.manager,memoryPath:w.target.value})}),s.jsx(je,{label:"Generated Docs Directory",value:n.manager.docsDir,onChange:w=>r("manager",{...n.manager,docsDir:w.target.value})}),s.jsx(je,{label:"Weekly Summary Day",type:"number",min:"0",max:"6",value:String(n.manager.weeklySummaryDay),onChange:w=>r("manager",{...n.manager,weeklySummaryDay:Math.max(0,Math.min(6,Number(w.target.value||0)))}),helperText:"0 = Sunday, 1 = Monday"}),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:"Weekly summary"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Send a periodic project health summary"})]}),s.jsx(Pt,{checked:n.manager.weeklySummaryEnabled,onChange:w=>r("manager",{...n.manager,weeklySummaryEnabled:w})})]})]})]})})]})]})},lv="5 * * * *",sv="25 */3 * * *",Bw={enabled:!0,roadmapPath:"ROADMAP.md",autoScanInterval:300,slicerSchedule:"35 */6 * * *",slicerMaxRuntime:600,priorityMode:"roadmap-first",issueColumn:"Ready"},kx={enabled:!0,schedule:"45 2,10,18 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},Pw={enabled:!1,schedule:"50 3 * * 1",maxRuntime:1800,createIssues:!1,targetColumn:"Draft"},Ax={enabled:!1,schedule:"0 7 * * 1",maxRuntime:0,targetColumn:"Draft",baseUrl:"",startUrl:"",flows:[],autoInstallPlaywright:!0,maxIssues:10,reportPrompt:""},$w={enabled:!1,schedule:"0 6 * * 1",maxRuntime:900,lookbackDays:7,targetColumn:"Draft",analysisPrompt:""},_x={enabled:!0,schedule:"15 6,14,22 * * *",maxRuntime:3600,branchPatterns:[],maxPrsPerRun:0,perPrTimeout:600,aiConflictResolution:!0,aiReviewResolution:!1,readyLabel:"ready-to-merge"},zx={enabled:!1,schedule:"55 */4 * * *",maxRuntime:1800,mergeMethod:"squash",minReviewScore:80,branchPatterns:[],rebaseBeforeMerge:!0,maxPrsPerRun:0,ciPolicy:"fallback-local",localCheckCommand:"yarn install --frozen-lockfile && yarn verify && yarn test"},Yw={enabled:!0,schedule:"15 7 * * *",maxRuntime:0,authority:"draft",outputMode:"board-draft",targetColumn:"Draft",memoryPath:".night-watch/manager/memory.md",docsDir:".night-watch/manager/docs",weeklySummaryEnabled:!0,weeklySummaryDay:1};function Ir(){return{...Bw}}function rv(){return{...kx,branchPatterns:[...kx.branchPatterns]}}function iv(){return{...Pw}}function Eh(){return{...Ax,flows:[...Ax.flows]}}function Ch(){return{...$w}}function bc(){return{..._x,branchPatterns:[..._x.branchPatterns]}}function wo(){return{...zx,branchPatterns:[...zx.branchPatterns]}}function jc(){return{...Yw}}const go=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],cv={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"}}},Gw={enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,manager:25,qa:20,audit:10,ux:10},providerBuckets:{}},Fw=["executor","reviewer","qa","audit","ux","slicer","analytics","pr-resolver","merger","manager"],Zw=new Set(["overview","schedules","jobs"]),$f=n=>{if(!n)return null;const r=n==="planner"?"slicer":n;return["executor","reviewer","qa","audit","ux","slicer","analytics","pr-resolver","merger","manager"].includes(r)?r:null},no=n=>({cronSchedule:n.cronSchedule||lv,reviewerSchedule:n.reviewerSchedule||sv,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||rv(),audit:n.audit||iv(),ux:n.ux||Eh(),analytics:n.analytics||Ch(),feedback:n.feedback??{enabled:!0,confidenceThreshold:.75,augmentationTtlDays:14,maxActiveAugmentations:3,successStreakToExpire:3},prResolver:n.prResolver??bc(),merger:n.merger??wo(),manager:n.manager??jc(),roadmapScanner:n.roadmapScanner||Ir(),queue:n.queue||Gw}),io=n=>{var r,u,o;return Lw(n.scheduleBundleId,n.cronSchedule,n.reviewerSchedule,n.qa.schedule,n.audit.schedule,n.ux.schedule,n.roadmapScanner.slicerSchedule??Ir().slicerSchedule,((r=n.prResolver)==null?void 0:r.schedule)??bc().schedule,((u=n.merger)==null?void 0:u.schedule)??wo().schedule,((o=n.manager)==null?void 0:o.schedule)??jc().schedule)},lo=n=>{const r=io(n);return!n.scheduleBundleId&&r?{form:{...n,scheduleBundleId:r.id},detectedTemplate:r}:{form:n,detectedTemplate:r}},Iw=()=>{var hl,Qe,ml,gt,$t,_t,zt,ns,Xs,Js,nn;const n=Hn(),{addToast:r,selectedProjectId:u,globalModeLoading:o}=Zt(),[h,f]=L.useState(!1),[j,b]=L.useState(!1),[y,x]=L.useState(!1),[E,M]=L.useState(null),[D,_]=L.useState([]),[N,O]=L.useState(null),[R,I]=L.useState(null),[U,J]=L.useState(!0),[k,w]=L.useState("overview"),[q,G]=L.useState(null),[Z,le]=L.useState(null),[S,te]=L.useState(null),[ae,ie]=L.useState("template"),[ge,pe]=L.useState(""),[$,K]=L.useState(!1),[fe,me]=L.useState(!1),be=L.useRef(null),H=L.useRef(!1),se=L.useRef(null),{data:he,loading:ye,error:Re,refetch:xe}=Ua(Np,[u],{enabled:!o}),{data:Se,loading:lt,refetch:Ye}=Ua(jh,[u],{enabled:!o});L.useEffect(()=>{if(o)return;let ue=!1;J(!0),O(null),I(null),_([]);const ve=async(St=!1)=>{St&&J(!0),xe();const[ht,wn,ls]=await Promise.all([Ig().catch(()=>null),vN(24).catch(()=>null),oN().catch(()=>[])]);ue||(O(ht),I(wn),_(ls),J(!1))};ve(!0);const Be=setInterval(()=>{ve()},3e4);return()=>{ue=!0,clearInterval(Be)}},[u,o,xe]),L.useEffect(()=>{if(!Se)return;if(H.current){H.current=!1;return}const{form:ue,detectedTemplate:ve}=lo(no(Se));te(ue),be.current=ue,ie(ve?"template":"custom"),pe((ve==null?void 0:ve.id)??""),K(!1)},[Se]),L.useEffect(()=>{!S||!be.current||K(JSON.stringify(S)!==JSON.stringify(be.current))},[S]),L.useEffect(()=>{if(k!=="jobs"||!q)return;const ue=window.setTimeout(()=>{const ve=document.getElementById(`job-section-${q}`);ve&&ve.scrollIntoView({behavior:"smooth",block:"center"})},100);return()=>window.clearTimeout(ue)},[k,q]),L.useEffect(()=>{if(k!=="schedules"||ae!=="custom"||!Z)return;const ue=Z,ve=window.setTimeout(()=>{const Be=document.getElementById(`job-schedule-${ue}`);Be&&Be.scrollIntoView({behavior:"smooth",block:"center"}),le(null)},100);return()=>window.clearTimeout(ve)},[k,ae,Z]);const wt=(ue,ve)=>{te(Be=>Be&&{...Be,[ue]:ve})},oa=()=>{if(ie("template"),!S)return;const ue=io(S);if(ue){pe(ue.id),wt("scheduleBundleId",ue.id);return}const ve=eh(ge)??eh("always-on");ve&&da(ve)},Ta=()=>{ie("custom"),wt("scheduleBundleId",null),pe("")},Va=ue=>{const ve=$f(ue);ve&&(ae!=="custom"&&Ta(),w("schedules"),le(ve))},da=ue=>{pe(ue.id),te(ve=>ve&&{...ve,cronSchedule:ue.schedules.executor,reviewerSchedule:ue.schedules.reviewer,scheduleBundleId:ue.id,qa:{...ve.qa,schedule:ue.schedules.qa},audit:{...ve.audit,schedule:ue.schedules.audit},ux:{...ve.ux,schedule:ue.schedules.ux},roadmapScanner:{...ve.roadmapScanner,slicerSchedule:ue.schedules.slicer},prResolver:{...ve.prResolver,schedule:ue.schedules.prResolver},merger:{...ve.merger,schedule:ue.schedules.merger},manager:{...ve.manager,schedule:ue.schedules.manager}})},ma=async()=>{if(S){me(!0);try{const ue={};for(const ht of Fw){const wn=S.jobProviders[ht];typeof wn=="string"&&wn.trim().length>0?ue[ht]=wn:Se!=null&&Se.jobProviders[ht]&&(ue[ht]=null)}const ve=await fo({cronSchedule:S.cronSchedule,reviewerSchedule:S.reviewerSchedule,scheduleBundleId:ae==="template"?S.scheduleBundleId:null,cronScheduleOffset:S.cronScheduleOffset,schedulingPriority:S.schedulingPriority,executorEnabled:S.executorEnabled,reviewerEnabled:S.reviewerEnabled,maxRuntime:S.maxRuntime,reviewerMaxRuntime:S.reviewerMaxRuntime,maxRetries:S.maxRetries,reviewerMaxRetries:S.reviewerMaxRetries,reviewerRetryDelay:S.reviewerRetryDelay,reviewerMaxPrsPerRun:S.reviewerMaxPrsPerRun,minReviewScore:S.minReviewScore,branchPatterns:S.branchPatterns,providerEnv:S.providerEnv,jobProviders:ue,qa:S.qa,audit:S.audit,ux:S.ux,analytics:S.analytics,feedback:S.feedback,prResolver:S.prResolver,merger:S.merger,manager:S.manager,roadmapScanner:S.roadmapScanner,queue:S.queue}),{form:Be}=lo(no(ve));te(Be),be.current=Be,K(!1);let St="";try{await gc()}catch(ht){St=ht instanceof Error?ht.message:"Failed to reinstall cron"}r(St?{title:"Saved (Cron Reinstall Failed)",message:St,type:"warning"}:{title:"Saved",message:"Configuration updated and cron schedules reinstalled.",type:"success"}),H.current=!0,Ye()}catch(ue){r({title:"Save Failed",message:ue instanceof Error?ue.message:"Failed to save configuration",type:"error"})}finally{me(!1)}}},bn=()=>{if(be.current){te(be.current);const ue=be.current,ve=io(ue);ie(ve?"template":"custom"),pe((ve==null?void 0:ve.id)??""),K(!1)}},jn=async ue=>{try{const ve=await Tp(ue),{form:Be}=lo(no(ve));te(Be),be.current=Be,K(!1);let St="";try{await gc()}catch(ht){St=ht instanceof Error?ht.message:"Failed to reinstall cron"}r(St?{title:"Saved (Cron Reinstall Failed)",message:St,type:"warning"}:{title:ue?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${ue?"enabled":"disabled"}.`,type:"success"}),H.current=!0,Ye(),xe()}catch(ve){r({title:"Toggle Failed",message:ve instanceof Error?ve.message:"Failed to toggle roadmap scanner",type:"error"})}},Nn=async()=>{if(he){f(!0);try{he.paused?(await gc(),r({title:"Schedule Resumed",message:"Cron schedules are active.",type:"success"})):(await Sp(),r({title:"Schedule Paused",message:"Cron schedules are deactivated.",type:"info"})),xe()}catch(ue){r({title:"Action Failed",message:ue instanceof Error?ue.message:"Toggle failed",type:"error"})}finally{f(!1)}}},Ba=async()=>{if(window.confirm("Are you sure you want to clear all pending jobs?")){b(!0);try{const ue=await yN();r({title:"Queue Cleared",message:`Removed ${ue.cleared} pending jobs.`,type:"success"}),Ig().then(O)}catch(ue){r({title:"Clear Failed",message:ue instanceof Error?ue.message:"Failed to clear queue",type:"error"})}finally{b(!1)}}},Pa=async ue=>{if(S){me(!0);try{const ve=await fo({queue:{...S.queue,...ue}}),{form:Be}=lo(no(ve));te(Be),be.current=Be,K(!1),r({title:"Settings Saved",message:"Queue configuration updated.",type:"success"}),H.current=!0,Ye(),xe()}catch(ve){r({title:"Save Failed",message:ve instanceof Error?ve.message:"Save failed",type:"error"})}finally{me(!1)}}},It=async ue=>{const ve=ue==="planner"?"slicer":ue;M(ue);try{await wp(ve),r({title:"Job Triggered",message:`${ue} job queued successfully.`,type:"success"})}catch(Be){r({title:"Trigger Failed",message:Be instanceof Error?Be.message:"Failed to trigger job",type:"error"})}finally{M(null)}},$a=ue=>{const ve=$f(ue);ve&&(w("jobs"),G(ve))};L.useEffect(()=>{if(!S||se.current===n.search)return;se.current=n.search;const ue=new URLSearchParams(n.search),ve=ue.get("tab"),Be=ve==="queue"?"overview":ve,St=ue.get("mode"),ht=$f(ue.get("jobType"));if(Be&&Zw.has(Be)){if(Be==="jobs"){w("jobs"),ht&&G(ht);return}if(Be==="schedules"){if(ht){Va(ht);return}w("schedules"),St==="custom"&&ae!=="custom"&&Ta(),St==="template"&&ae!=="template"&&oa();return}w(Be);return}St==="custom"&&ae!=="custom"&&(w("schedules"),Ta()),St==="template"&&ae!=="template"&&(w("schedules"),oa())},[n.search,S,ae]);const ts=L.useMemo(()=>{const ue={...cv,...(S==null?void 0:S.providerPresets)??{}};return Object.entries(ue).map(([ve,Be])=>({label:Be.name||ve,value:ve}))},[S==null?void 0:S.providerPresets]);if(ye||lt||!S)return s.jsx(La,{message:"Loading automation",detail:"Fetching schedules, queue state, and job configuration."});if(Re||!he||!Se)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:()=>{xe(),Ye()},children:"Retry"})]});const vt=he.paused,Jt=S?io(S):void 0,qn=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(et,{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(Fg,{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:Ba,loading:j,disabled:!(N!=null&&N.items.length),className:"text-slate-500 hover:text-red-400 hover:bg-red-400/10",children:[s.jsx(Is,{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(Yg,{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(We,{label:"Dispatch Mode",value:((hl=S==null?void 0:S.queue)==null?void 0:hl.mode)||"auto",onChange:ue=>Pa({mode:ue}),options:[{label:"Auto (Recommended)",value:"auto"},{label:"Conservative (1 at a time)",value:"conservative"},{label:"Provider-aware",value:"provider-aware"}]}),s.jsx(je,{label:"Max Concurrency",type:"number",min:"1",max:"20",value:String(((Qe=S==null?void 0:S.queue)==null?void 0:Qe.maxConcurrency)||1),onChange:ue=>Pa({maxConcurrency:Number(ue.target.value)})}),s.jsx("div",{className:"md:col-span-2 flex items-center gap-3",children:s.jsx(Pt,{label:"Coordinator Enabled",checked:((ml=S==null?void 0:S.queue)==null?void 0:ml.enabled)??!0,onChange:ue=>Pa({enabled:ue})})})]})}),s.jsx("div",{className:"p-0",children:U&&!N?s.jsx(La,{variant:"inline",message:"Loading queue"}):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(ue=>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:ue.jobType}),s.jsx("div",{className:"text-[11px] text-slate-500 truncate max-w-[200px]",title:ue.projectPath,children:ue.projectName||ue.projectPath})]}),s.jsx("td",{className:"px-6 py-4",children:s.jsx(Tt,{variant:ue.status==="running"?"info":"neutral",className:"text-[10px]",children:ue.status})}),s.jsx("td",{className:"px-6 py-4 text-slate-400 font-mono text-xs",children:Dx(new Date(ue.enqueuedAt*1e3))}),s.jsx("td",{className:"px-6 py-4 text-right",children:s.jsx("button",{onClick:()=>$a(ue.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(Yg,{className:"h-4 w-4"})})})]},ue.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($g,{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(vc,{className:"h-3 w-3 animate-spin-slow"})," Live Update"]})]}),U&&D.length===0?s.jsx(La,{variant:"card",message:"Loading timeline",rows:2}):s.jsx(_w,{configs:D,currentProjectId:u??void 0,onEditJob:(ue,ve)=>$a(ve),queueStatus:N,queueAnalytics:R})]}),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(et,{className:"border-slate-800 overflow-hidden",children:U&&!R?s.jsx(La,{variant:"inline",message:"Loading execution history"}):R!=null&&R.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:R.recentRuns.map(ue=>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:ue.jobType})}),s.jsx("td",{className:"px-6 py-4",children:s.jsx(Tt,{variant:ue.status==="finished"?"success":ue.status==="failed"?"error":"neutral",className:"text-[10px]",children:ue.status})}),s.jsx("td",{className:"px-6 py-4 text-slate-400",children:ue.durationSeconds?`${ue.durationSeconds}s`:"--"}),s.jsx("td",{className:"px-6 py-4 text-slate-500 text-xs",children:Dx(new Date(ue.startedAt*1e3))}),s.jsx("td",{className:"px-6 py-4 text-right text-slate-500 font-mono text-xs",children:ue.providerKey||"default"})]},ue.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(et,{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:(Jt==null?void 0:Jt.label)??"Custom"}),s.jsx("p",{className:"mt-1 text-xs text-slate-500",children:(Jt==null?void 0:Jt.description)??"Custom cron expressions are active for this project."})]}),s.jsx(We,{label:"Scheduling Priority",value:String(S.schedulingPriority),onChange:ue=>wt("schedulingPriority",Number(ue)),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(je,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(S.cronScheduleOffset),onChange:ue=>wt("cronScheduleOffset",Math.min(59,Math.max(0,Number(ue.target.value||0)))),helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]}),s.jsxs(et,{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(et,{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:(S==null?void 0:S.executorEnabled)!==!1},{id:"reviewer",label:"Run Reviewer",icon:Xr,enabled:(S==null?void 0:S.reviewerEnabled)??!1},{id:"qa",label:"Run QA",icon:Fg,enabled:((gt=S==null?void 0:S.qa)==null?void 0:gt.enabled)??!1},{id:"audit",label:"Run Audit",icon:$g,enabled:(($t=S==null?void 0:S.audit)==null?void 0:$t.enabled)??!1},{id:"ux",label:"Run UX",icon:Eye,enabled:((_t=S==null?void 0:S.ux)==null?void 0:_t.enabled)??!1},{id:"planner",label:"Run Planner",icon:xh,enabled:((zt=S==null?void 0:S.roadmapScanner)==null?void 0:zt.enabled)??!1},{id:"analytics",label:"Run Analytics",icon:yo,enabled:((ns=S==null?void 0:S.analytics)==null?void 0:ns.enabled)??!1},{id:"pr-resolver",label:"Run PR Resolver",icon:mh,enabled:((Xs=S==null?void 0:S.prResolver)==null?void 0:Xs.enabled)??!1},{id:"merger",label:"Run Merger",icon:bo,enabled:((Js=S==null?void 0:S.merger)==null?void 0:Js.enabled)??!1},{id:"manager",label:"Run Manager",icon:hh,enabled:((nn=S==null?void 0:S.manager)==null?void 0:nn.enabled)??!1}].map(ue=>s.jsxs("button",{onClick:()=>It(ue.id),disabled:E===ue.id||!ue.enabled,className:`w-full flex items-center justify-between p-3 rounded-lg text-sm transition-colors group disabled:cursor-not-allowed ${ue.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(ue.icon,{className:`h-4 w-4 ${ue.enabled?"text-slate-500 group-hover:text-indigo-400":"text-slate-700"}`}),ue.label]}),E===ue.id?s.jsx(vc,{className:"h-3 w-3 animate-spin text-indigo-400"}):ue.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"})]},ue.id))})]})]})]}),Qs=S?s.jsx(qw,{form:{cronSchedule:S.cronSchedule,reviewerSchedule:S.reviewerSchedule,qa:S.qa,audit:S.audit,ux:S.ux,analytics:S.analytics,roadmapScanner:{...S.roadmapScanner,slicerSchedule:S.roadmapScanner.slicerSchedule??Ir().slicerSchedule},prResolver:S.prResolver,merger:S.merger,manager:S.manager},scheduleMode:ae,selectedTemplateId:ge,onFieldChange:(ue,ve)=>{wt(ue,ve)},onSwitchToTemplate:oa,onSwitchToCustom:Ta,onApplyTemplate:da}):null,Kr=[{id:"overview",label:"Overview",content:qn},{id:"schedules",label:"Schedules",content:Qs},{id:"jobs",label:"Jobs",content:S?s.jsx(Vw,{form:S,updateField:wt,handleRoadmapToggle:jn,presetOptions:ts,expandedJob:q,onExpandedJobChange:G,onOpenSchedule:Va}):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(Tt,{variant:vt?"warning":"success",className:"px-3 py-1 text-xs uppercase tracking-wider",children:vt?"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:vt?"primary":"outline",size:"lg",className:vt?"bg-emerald-600 hover:bg-emerald-700":"border-slate-700 hover:bg-slate-800",onClick:Nn,loading:h,children:vt?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(uo,{className:"h-5 w-5 mr-2"})," Pause Scheduling"]})})]}),s.jsx(Rp,{tabs:Kr,activeTab:k,onChange:w}),$&&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(Fs,{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:bn,className:"text-slate-400",children:[s.jsx(ph,{className:"h-4 w-4 mr-1.5"}),"Reset"]}),s.jsxs(Le,{variant:"primary",size:"sm",onClick:ma,loading:fe,children:[s.jsx(pp,{className:"h-4 w-4 mr-1.5"}),"Save"]})]})]})})]})},Ww=({isOpen:n,onClose:r,title:u,children:o})=>(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?p1.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:u}),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(Jr,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:o})]})]}),document.body):null),Qw=n=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(u=>n.toUpperCase().includes(u)),Xw=({value:n,isSensitive:r})=>{const[u,o]=ze.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:u?n:"***********"}),s.jsx("button",{type:"button",onClick:()=>o(!u),className:"text-slate-500 hover:text-slate-300","aria-label":u?"Hide sensitive value":"Show sensitive value",title:u?"Hide sensitive value":"Show sensitive value",children:u?s.jsx(cj,{className:"h-4 w-4"}):s.jsx(pc,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:n})},uv=({envVars:n,onChange:r,compact:u=!1})=>{const[o,h]=ze.useState(""),[f,j]=ze.useState(""),[b,y]=ze.useState(null),[x,E]=ze.useState(""),{addToast:M}=Zt(),D=()=>{if(o.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(o)){M({title:"Invalid Key Format",message:"Key must be uppercase with underscores (e.g., API_KEY)",type:"error"});return}r({...n,[o]:f}),h(""),j("")}},_=U=>{const J={...n};delete J[U],r(J)},N=U=>{y(U),E(n[U]??"")},O=()=>{b&&(r({...n,[b]:x}),y(null),E(""))},R=()=>{y(null),E("")},I=Object.entries(n);return s.jsxs("div",{className:"space-y-4",children:[!u&&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:I.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):I.map(([U,J])=>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:U}),b===U?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:x,onChange:k=>E(k.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 ${U} value`,title:`Save ${U} value`,children:s.jsx(U1,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:R,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${U}`,title:`Cancel editing ${U}`,children:s.jsx(Jr,{className:"h-4 w-4"})})]}):s.jsx(Xw,{value:J,isSensitive:Qw(U)})]}),b!==U&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>N(U),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${U}`,title:`Edit ${U}`,children:s.jsx(jo,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>_(U),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${U}`,title:`Delete ${U}`,children:s.jsx(Is,{className:"h-4 w-4"})})]})]},U))}),s.jsxs("div",{className:`flex items-end gap-3 ${u?"":"pt-4 border-t border-slate-800"}`,children:[s.jsxs("div",{className:"flex-1",children:[!u&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:o,onChange:U=>h(U.target.value.toUpperCase()),placeholder:u?"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:[!u&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:f,onChange:U=>j(U.target.value),placeholder:u?"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:D,disabled:!o.trim(),size:u?"sm":"md",children:[s.jsx(es,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function Jw(n,r){var u;return!!(n!=null&&n.startsWith("glm-")||(u=r==null?void 0:r.model)!=null&&u.startsWith("glm-"))}function Kw(n,r){var u,o;return Jw(n,r)?!((o=(u=r==null?void 0:r.envVars)==null?void 0:u.ANTHROPIC_API_KEY)!=null&&o.trim()):!1}const Lx={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:""}},eS=({isOpen:n,onClose:r,onSave:u,presetId:o,preset:h,isBuiltIn:f,existingIds:j})=>{const[b,y]=ze.useState(""),[x,E]=ze.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[M,D]=ze.useState(!1),[_,N]=ze.useState("custom"),[O,R]=ze.useState(null),I=Kw(o??b,x);ze.useEffect(()=>{n&&(o&&h?(y(o),E({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??{}}),o==="claude"||h.command==="claude"?N("claude"):o==="codex"||h.command==="codex"?N("codex"):N("custom")):(y(""),E({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),N("custom")),R(null),D(!!(h!=null&&h.envVars&&Object.keys(h.envVars).length>0)))},[n,o,h]);const U=q=>{if(N(q),q!=="custom"&&Lx[q]){const G=Lx[q];E(Z=>({...Z,...G,envVars:Z.envVars})),!o&&!b&&y(q)}},J=(q,G)=>{E(Z=>({...Z,[q]:G})),R(null)},k=()=>{if(!x.name.trim())return R("Name is required"),!1;if(!x.command.trim())return R("Command is required"),!1;if(!o){if(!b.trim())return R("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(b))return R("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(j.includes(b))return R("A preset with this ID already exists"),!1}return!0},w=()=>{var G,Z,le,S,te,ae;if(!k())return;const q={name:x.name.trim(),command:x.command.trim()};(G=x.subcommand)!=null&&G.trim()&&(q.subcommand=x.subcommand.trim()),(Z=x.promptFlag)!=null&&Z.trim()&&(q.promptFlag=x.promptFlag.trim()),(le=x.autoApproveFlag)!=null&&le.trim()&&(q.autoApproveFlag=x.autoApproveFlag.trim()),(S=x.workdirFlag)!=null&&S.trim()&&(q.workdirFlag=x.workdirFlag.trim()),(te=x.modelFlag)!=null&&te.trim()&&(q.modelFlag=x.modelFlag.trim()),(ae=x.model)!=null&&ae.trim()&&(q.model=x.model.trim()),x.envVars&&Object.keys(x.envVars).length>0&&(q.envVars=x.envVars),u(o||b,q),r()};return s.jsx(Ww,{isOpen:n,onClose:r,title:o?`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}),I&&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(Fs,{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(We,{label:"Template",value:_,onChange:U,options:[{label:"Start from scratch",value:"custom"},{label:"Claude (Anthropic)",value:"claude"},{label:"Codex (OpenAI)",value:"codex"}],helperText:"Start with a pre-configured template or customize from scratch"})}),!o&&s.jsx(je,{label:"Preset ID",value:b,onChange:q=>y(q.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(je,{label:"Display Name",value:x.name,onChange:q=>J("name",q.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(je,{label:"Command",value:x.command,onChange:q=>J("command",q.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(je,{label:"Model",value:x.model??"",onChange:q=>J("model",q.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(je,{label:"Model Flag",value:x.modelFlag??"",onChange:q=>J("modelFlag",q.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:()=>D(!M),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[M?s.jsx(Y1,{className:"h-4 w-4"}):s.jsx(fh,{className:"h-4 w-4"}),"Advanced Options"]}),M&&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(je,{label:"Subcommand",value:x.subcommand??"",onChange:q=>J("subcommand",q.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(je,{label:"Prompt Flag",value:x.promptFlag??"",onChange:q=>J("promptFlag",q.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(je,{label:"Auto-Approve Flag",value:x.autoApproveFlag??"",onChange:q=>J("autoApproveFlag",q.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(je,{label:"Workdir Flag",value:x.workdirFlag??"",onChange:q=>J("workdirFlag",q.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(uv,{envVars:x.envVars??{},onChange:q=>J("envVars",q),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:w,children:o?"Save Changes":"Add Preset"})]})]})})},tS=({form:n,updateField:r,projectName:u,doctorChecks:o,doctorLoading:h})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(et,{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(je,{label:"Project Name",value:u,disabled:!0}),s.jsx(je,{label:"Default Branch",value:n.defaultBranch,onChange:f=>r("defaultBranch",f.target.value)}),s.jsx(je,{label:"PRD Directory",value:n.prdDir,onChange:f=>r("prdDir",f.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(je,{label:"Branch Prefix",value:n.branchPrefix,onChange:f=>r("branchPrefix",f.target.value)}),s.jsx(je,{label:"Templates Directory",value:n.templatesDir,onChange:f=>r("templatesDir",f.target.value),helperText:"Directory for custom template overrides"}),s.jsx(je,{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(Pt,{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(Fr,{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(Fr,{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(et,{className:"divide-y divide-slate-800",children:[s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx(dp,{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..."}):o.map((f,j)=>{const b=f.status==="pass",y=f.status==="warn",x=b?"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}-${j}`)})]})]}),Ux=({presetId:n,preset:r,isBuiltIn:u,onEdit:o,onDelete:h,onReset:f})=>{var x,E,M;const j=r.envVars?Object.keys(r.envVars).length:0,y=(n.startsWith("glm-")||((x=r.model)==null?void 0:x.startsWith("glm-")))&&!((M=(E=r.envVars)==null?void 0:E.ANTHROPIC_API_KEY)!=null&&M.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}),u&&s.jsx(Tt,{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(Fs,{className:"h-3 w-3"}),"Missing ANTHROPIC_API_KEY"]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{type:"button",onClick:o,className:"p-1.5 text-slate-400 hover:text-slate-200 hover:bg-slate-800 rounded transition-colors","aria-label":`Edit ${r.name} preset`,title:"Edit preset",children:s.jsx(jo,{className:"h-4 w-4"})}),u?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(ph,{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(Is,{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(Tt,{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]}),j>0&&s.jsxs("span",{className:"text-xs text-slate-500",children:[j," env var",j!==1?"s":""]})]})]})},th={0:"Su",1:"Mo",2:"Tu",3:"We",4:"Th",5:"Fr",6:"Sa"},ah={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",ux:"UX",slicer:"Planner",analytics:"Analytics",planner:"Planner","pr-resolver":"PR Resolver",merger:"Merger",manager:"Manager"},Yf={label:"",presetId:"",days:[1,2,3,4,5],startTime:"23:00",endTime:"04:00",jobTypes:null,enabled:!0},Hx=({override:n,onChange:r,onSave:u,onCancel:o,isNew:h,presetOptions:f})=>{const j=N=>{const O=n.days.includes(N)?n.days.filter(R=>R!==N):[...n.days,N].sort((R,I)=>R-I);r({...n,days:O})},b=()=>{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]})},E=()=>{r({...n,jobTypes:null})},M=N=>{const O=n.jobTypes??[],R=O.includes(N)?O.filter(I=>I!==N):[...O,N];r({...n,jobTypes:R.length===0?null:R})},D=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(je,{label:"Label",value:n.label,onChange:N=>r({...n,label:N.target.value}),placeholder:"e.g., Night Hours",required:!0}),s.jsx(We,{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(th).map(N=>s.jsx("button",{type:"button",onClick:()=>j(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:th[N]},N)),s.jsxs("div",{className:"flex gap-1 ml-2",children:[s.jsx("button",{type:"button",onClick:b,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:E,className:"text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:D?"All Jobs Selected":"Select All Jobs"})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Object.keys(ah).filter(N=>N!=="planner").map(N=>{var R;const O=D||(((R=n.jobTypes)==null?void 0:R.includes(N))??!1);return s.jsx("button",{type:"button",onClick:()=>M(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:D,children:ah[N]},N)})}),D&&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(Pt,{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:o,children:"Cancel"}),s.jsx(Le,{onClick:u,disabled:!_,children:h?"Add Override":"Save Changes"})]})]})},aS=({overrides:n,onChange:r,presetOptions:u})=>{const[o,h]=ze.useState(null),[f,j]=ze.useState(!1),[b,y]=ze.useState(Yf),x=()=>{r([...n,b]),y({...Yf}),j(!1)},E=(R,I)=>{const U=[...n];U[R]=I,r(U)},M=R=>{window.confirm("Are you sure you want to delete this schedule override?")&&r(n.filter((I,U)=>U!==R))},D=R=>{const I=[...n];I[R]={...I[R],enabled:!I[R].enabled},r(I)},_=R=>R.length===7?"Every day":R.length===5&&R.every(I=>I>=1&&I<=5)?"Weekdays":R.length===2&&R.includes(0)&&R.includes(6)?"Weekends":R.map(I=>th[I]).join(", "),N=R=>!R||R.length===0?"All Jobs":R.map(I=>ah[I]).join(", "),O=R=>{const I=u.find(U=>U.value===R);return(I==null?void 0:I.label)||R};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((R,I)=>s.jsx("div",{children:o===I?s.jsx(Hx,{override:R,onChange:U=>E(I,U),onSave:()=>h(null),onCancel:()=>h(null),presetOptions:u}):s.jsxs("div",{className:`flex items-start justify-between p-4 rounded-md border bg-slate-950/40 ${R.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(Pt,{checked:R.enabled,onChange:()=>D(I)}),s.jsx("span",{className:"text-slate-100 font-medium",children:R.label})]}),s.jsxs("div",{className:"text-sm text-slate-400 ml-11",children:[s.jsx("span",{className:"text-indigo-400",children:O(R.presetId)})," · ",_(R.days)," · ",R.startTime," - ",R.endTime," · ",N(R.jobTypes)]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>h(I),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${R.label}`,title:`Edit ${R.label}`,children:s.jsx(jo,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>M(I),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${R.label}`,title:`Delete ${R.label}`,children:s.jsx(Is,{className:"h-4 w-4"})})]})]})},I))}),f?s.jsx(Hx,{override:b,onChange:y,onSave:x,onCancel:()=>{j(!1),y({...Yf})},isNew:!0,presetOptions:u}):s.jsxs(Le,{variant:"ghost",onClick:()=>j(!0),children:[s.jsx(es,{className:"h-4 w-4 mr-2"}),"Add Schedule Override"]})]})},nS=({form:n,updateField:r,getAllPresets:u,getPresetOptions:o,handleEditPreset:h,handleDeletePreset:f,handleResetPreset:j,handleAddPreset:b})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(et,{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(We,{value:n.provider,onChange:y=>r("provider",y),options:o(n.providerPresets)})})]})}),s.jsxs(et,{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:b,variant:"primary",size:"sm",children:[s.jsx(es,{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:[go.map(y=>{const E=u()[y];return E?s.jsx(Ux,{presetId:y,preset:E,isBuiltIn:!0,onEdit:()=>h(y),onReset:()=>j(y)},y):null}),Object.entries(n.providerPresets).filter(([y])=>!go.includes(y)).map(([y,x])=>s.jsx(Ux,{presetId:y,preset:x,isBuiltIn:!1,onEdit:()=>h(y),onDelete:()=>f(y)},y))]})]}),s.jsxs(et,{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(We,{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(We,{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(We,{label:"Primary Fallback Preset",value:n.primaryFallbackPreset,onChange:y=>r("primaryFallbackPreset",y),options:[{label:"— None —",value:""},...Object.entries(u()).map(([y,x])=>({label:x.name,value:y}))],helperText:"Automatic switch when global provider is throttled"}),s.jsx(We,{label:"Secondary Fallback Preset",value:n.secondaryFallbackPreset,onChange:y=>r("secondaryFallbackPreset",y),options:[{label:"— None —",value:""},...Object.entries(u()).map(([y,x])=>({label:x.name,value:y}))]})]})]}),s.jsxs(et,{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(aS,{overrides:n.providerScheduleOverrides,onChange:y=>r("providerScheduleOverrides",y),presetOptions:Object.entries(u()).map(([y,x])=>({label:x.name,value:y}))})]}),s.jsxs(et,{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(uv,{envVars:n.providerEnv,onChange:y=>r("providerEnv",y)})]})]});function qx(n){return n.type==="telegram"?`telegram:${n.botToken}:${n.chatId}`:`${n.type}:${n.url}`}const lS=[{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"}],sS=(n,r)=>n.includes(r)?n.filter(u=>u!==r):[...n,r],Vx=({webhook:n,onChange:r,onSave:u,onCancel:o,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(We,{label:"Type",value:n.type,onChange:f=>{const j=f;r(j==="telegram"?{type:j,botToken:"",chatId:"",events:n.events}:{type:j,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(je,{label:"Bot Token",type:"password",value:n.botToken||"",onChange:f=>r({...n,botToken:f.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(je,{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(je,{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:lS.map(f=>s.jsx("button",{type:"button",onClick:()=>r({...n,events:sS(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:o,children:"Cancel"}),s.jsx(Le,{onClick:u,disabled:n.events.length===0||(n.type==="telegram"?!n.botToken||!n.chatId:!n.url),children:h?"Add Webhook":"Save Changes"})]})]}),rS=({notifications:n,onChange:r,globalWebhook:u,onSetGlobal:o,onUnsetGlobal:h})=>{const[f,j]=ze.useState(null),[b,y]=ze.useState(!1),[x,E]=ze.useState({type:"slack",url:"",events:[]}),M=()=>{r({webhooks:[...n.webhooks,x]}),E({type:"slack",url:"",events:[]}),y(!1)},D=(N,O)=>{const R=[...n.webhooks];R[N]=O,r({webhooks:R})},_=N=>{r({webhooks:n.webhooks.filter((O,R)=>R!==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(Vx,{webhook:N,onChange:R=>D(O,R),onSave:()=>j(null),onCancel:()=>j(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(R=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:R.replace("_"," ")},R))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[o!==void 0&&(()=>{const R=u!=null&&qx(N)===qx(u);return s.jsx("button",{type:"button",onClick:()=>R?h==null?void 0:h():o(N),className:`p-2 transition-colors ${R?"text-indigo-400 hover:text-indigo-300":"text-slate-500 hover:text-slate-300"}`,"aria-label":R?"Global channel (active)":"Set as global channel",title:R?"Global channel (active)":"Set as global channel",children:s.jsx(mj,{className:"h-4 w-4"})})})(),s.jsx("button",{type:"button",onClick:()=>j(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(jo,{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(Is,{className:"h-4 w-4"})})]})]})},O))}),b?s.jsx(Vx,{webhook:x,onChange:E,onSave:M,onCancel:()=>y(!1),isNew:!0}):s.jsxs(Le,{variant:"ghost",onClick:()=>y(!0),children:[s.jsx(es,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},Bx=[{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"}],Px=[{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 iS(n){return encodeURIComponent(n.replace(/\//g,"~"))}function cS(){return typeof window>"u"||window.location.origin==="null"?"":window.location.origin}function uS(n){return(n==null?void 0:n.join(", "))??""}function oS(n){const r=n.split(",").map(u=>u.trim()).filter(Boolean);return r.length>0?r:void 0}function dS(n){return{event:"workflow_run",action:"completed",jobId:n}}function fS(n,r,u){const o=n&&r?`/api/projects/${iS(r)}/jobs/${u}/run`:`/api/jobs/${u}/run`;return`${cS()}${o}`}function hS(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(`
|
|
447
|
+
`)}const mS=({form:n,updateField:r,globalWebhook:u,isGlobalMode:o=!1,onSetGlobal:h,onUnsetGlobal:f,selectedProjectId:j})=>{const[b,y]=ze.useState(null),x=n.webhookTriggers,E=x.allowedJobIds[0]??"reviewer",M=fS(o,j,E),D=hS(M),_=k=>{r("webhookTriggers",{...x,...k})},N=k=>{_({github:{...x.github,...k}})},O=k=>{const w=x.allowedJobIds.includes(k)?x.allowedJobIds.filter(q=>q!==k):[...x.allowedJobIds,k];_({allowedJobIds:w})},R=k=>{const w=x.github.events.includes(k)?x.github.events.filter(q=>q!==k):[...x.github.events,k];N({events:w})},I=(k,w)=>{const q=x.github.rules.map((G,Z)=>Z===k?{...G,...w}:G);N({rules:q})},U=k=>{N({rules:x.github.rules.filter((w,q)=>q!==k)})},J=async(k,w)=>{var q;await((q=navigator.clipboard)==null?void 0:q.writeText(k)),y(w),window.setTimeout(()=>y(null),1500)};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(et,{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(Pt,{checked:n.boardProvider.enabled,onChange:k=>r("boardProvider",{...n.boardProvider,enabled:k})})]}),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(We,{label:"Board Provider",value:n.boardProvider.provider,onChange:k=>r("boardProvider",{...n.boardProvider,provider:k}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),n.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(je,{label:"Project Number",type:"number",value:String(n.boardProvider.projectNumber||""),onChange:k=>r("boardProvider",{...n.boardProvider,projectNumber:k.target.value?Number(k.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(je,{label:"Repository",value:n.boardProvider.repo||"",onChange:k=>r("boardProvider",{...n.boardProvider,repo:k.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(et,{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(Pt,{checked:x.enabled,label:"Enabled",name:"webhookTriggers.enabled",onChange:k=>_({enabled:k})})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-6 border-t border-slate-800",children:[s.jsx(je,{label:"Secret Environment Variable",name:"webhookTriggers.secretEnv",value:x.secretEnv,onChange:k=>_({secretEnv:k.target.value}),helperText:"Server environment variable containing the shared HMAC secret"}),s.jsx(je,{label:"Signature Max Skew",min:0,name:"webhookTriggers.maxSkewSeconds",type:"number",value:String(x.maxSkewSeconds),onChange:k=>_({maxSkewSeconds:k.target.value?Math.max(0,Number(k.target.value)):0}),helperText:"Seconds, used when timestamp validation is required"}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Pt,{checked:x.requireTimestamp,label:"Require timestamp header",name:"webhookTriggers.requireTimestamp",onChange:k=>_({requireTimestamp:k})})})]}),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:Bx.map(k=>s.jsx("button",{type:"button","aria-pressed":x.allowedJobIds.includes(k.value),onClick:()=>O(k.value),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${x.allowedJobIds.includes(k.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:k.label},k.value))})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-end gap-2",children:[s.jsx(je,{label:"Endpoint URL",readOnly:!0,value:M}),s.jsx(Le,{"aria-label":"Copy endpoint URL",size:"icon",type:"button",variant:"outline",onClick:()=>J(M,"endpoint"),children:s.jsx(Pg,{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:()=>J(D,"curl"),children:[s.jsx(Pg,{className:"h-4 w-4 mr-2"}),b==="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:D})})]})]}),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(Pt,{checked:x.github.enabled,label:"Enabled",name:"webhookTriggers.github.enabled",onChange:k=>N({enabled:k})})]}),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:Px.map(k=>s.jsx("button",{type:"button","aria-pressed":x.github.events.includes(k.value),onClick:()=>R(k.value),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${x.github.events.includes(k.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:k.label},k.value))})]}),s.jsxs("div",{className:"space-y-3",children:[x.github.rules.map((k,w)=>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(We,{label:"Event",value:k.event,onChange:q=>I(w,{event:q}),options:Px}),s.jsx(je,{label:"Action",value:k.action??"",onChange:q=>I(w,{action:q.target.value||void 0}),placeholder:"completed"}),s.jsx(We,{label:"Job",value:k.jobId,onChange:q=>I(w,{jobId:q}),options:Bx})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[1fr_auto_auto] gap-4 md:items-end",children:[s.jsx(je,{label:"Branch Patterns",value:uS(k.branchPatterns),onChange:q=>I(w,{branchPatterns:oS(q.target.value)}),placeholder:"main, release/*"}),s.jsx(Pt,{checked:k.onlyOnFailure??!1,label:"Only failures",onChange:q=>I(w,{onlyOnFailure:q})}),s.jsx(Le,{"aria-label":`Delete GitHub rule ${w+1}`,size:"icon",type:"button",variant:"ghost",onClick:()=>U(w),children:s.jsx(Is,{className:"h-4 w-4 text-red-400"})})]})]},w)),s.jsxs(Le,{type:"button",variant:"ghost",onClick:()=>N({rules:[...x.github.rules,dS(E)]}),children:[s.jsx(es,{className:"h-4 w-4 mr-2"}),"Add GitHub Rule"]})]})]})]}),s.jsxs(et,{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(rS,{notifications:n.notifications,onChange:k=>r("notifications",k),globalWebhook:u,onSetGlobal:h,onUnsetGlobal:f})]})]})};function gS(n,r,u,o){const{addToast:h}=Zt(),[f,j]=L.useState(!1),[b,y]=L.useState(null),[x,E]=L.useState(null),[M,D]=L.useState(null),_=L.useCallback(()=>({...cv,...n}),[n]),N=L.useCallback(q=>{const G=_();return Object.entries(G).map(([Z,le])=>({label:le.name,value:Z}))},[_]),O=L.useCallback(q=>{const G=[];r===q&&G.push("Global Provider");const Z={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics"};for(const[le,S]of Object.entries(u))S===q&&G.push(Z[le]??le);return G},[r,u]),R=L.useCallback(()=>{y(null),E(null),j(!0)},[]),I=L.useCallback(q=>{const Z=_()[q];Z&&(y(q),E(Z),j(!0))},[_]),U=L.useCallback(async(q,G)=>{const Z=!b,le={...n,[q]:G};o("providerPresets",le);try{await fo({providerPresets:{[q]:G}}),h({title:Z?"Preset Added":"Preset Updated",message:Z?`${G.name} has been added. You can now assign it to jobs.`:`${G.name} has been saved.`,type:"success"})}catch(S){h({title:"Save Failed",message:S instanceof Error?S.message:"Failed to save preset",type:"error"}),o("providerPresets",n)}},[b,n,o,h]),J=L.useCallback(q=>{var le,S;if(go.includes(q)){h({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const G=O(q);if(G.length>0){D({presetId:q,presetName:((le=_()[q])==null?void 0:le.name)??q,references:G});return}const Z={...n};delete Z[q],o("providerPresets",Z),h({title:"Preset Deleted",message:`${((S=_()[q])==null?void 0:S.name)??q} has been removed.`,type:"success"})},[n,o,h,O,_]),k=L.useCallback(q=>{const G={...n};delete G[q],o("providerPresets",G),h({title:"Preset Reset",message:`${q} has been reset to built-in defaults.`,type:"success"})},[n,o,h]),w=L.useCallback(()=>{if(!M)return;const{presetId:q}=M,G={...n};delete G[q],o("providerPresets",G);const Z={...u};for(const le of Object.keys(Z))Z[le]===q&&delete Z[le];o("jobProviders",Z),r===q&&o("provider","claude"),D(null),h({title:"Preset Deleted",message:`${M.presetName} has been removed and all references cleared.`,type:"success"})},[M,n,u,r,o,h]);return{presetModalOpen:f,setPresetModalOpen:j,editingPresetId:b,editingPreset:x,deleteWarning:M,setDeleteWarning:D,getAllPresets:_,getPresetOptions:N,getPresetReferences:O,handleAddPreset:R,handleEditPreset:I,handleSavePreset:U,handleDeletePreset:J,handleResetPreset:k,handleConfirmDelete:w}}const xS=["executor","reviewer","qa","audit","ux","slicer","analytics","pr-resolver","merger","manager"],pS=["executor","reviewer","qa","audit","ux","slicer","analytics","pr-resolver","merger","manager"],vS={enabled:!1,secretEnv:"NIGHT_WATCH_WEBHOOK_SECRET",allowedJobIds:pS,requireTimestamp:!1,maxSkewSeconds:300,github:{enabled:!1,events:[],rules:[]}},$x=n=>{const r=n.primaryFallbackModel!==void 0?n.primaryFallbackModel??"":n.claudeModel??"",u=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||lv,reviewerSchedule:n.reviewerSchedule||sv,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||Ir(),templatesDir:n.templatesDir||".night-watch/templates",boardProvider:n.boardProvider||{enabled:!0,provider:"github"},jobProviders:n.jobProviders||{},fallbackOnRateLimit:n.fallbackOnRateLimit??!0,primaryFallbackModel:r,secondaryFallbackModel:u,primaryFallbackPreset:n.primaryFallbackPreset??"",secondaryFallbackPreset:n.secondaryFallbackPreset??"",claudeModel:r,providerScheduleOverrides:n.providerScheduleOverrides??[],qa:n.qa||rv(),audit:{...iv(),...n.audit??{}},ux:{...Eh(),...n.ux??{}},analytics:n.analytics||Ch(),feedback:n.feedback??{enabled:!0,confidenceThreshold:.75,augmentationTtlDays:14,maxActiveAugmentations:3,successStreakToExpire:3},prResolver:n.prResolver??bc(),merger:n.merger??wo(),manager:n.manager??jc(),queue:n.queue||{enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10,ux:10},providerBuckets:{}},webhookTriggers:n.webhookTriggers??vS}},yS=()=>{const n=Hn(),r=po(),{addToast:u,projectName:o,selectedProjectId:h,globalModeLoading:f,isGlobalMode:j,removeProjectFromList:b}=Zt(),[y,x]=ze.useState(!1),[E,M]=ze.useState(!1),[D,_]=ze.useState(!1),[N,O]=ze.useState(null),[R,I]=ze.useState(void 0),U=ze.useRef(null),[J,k]=ze.useState(!1),w=ze.useRef(!1),q=ze.useRef(!1),[G,Z]=ze.useState("project"),le=ze.useMemo(()=>{const xe=new URLSearchParams(n.search).get("tab");return xe==="jobs"||xe==="schedules"?xe:null},[n.search]),{data:S,loading:te,error:ae,refetch:ie}=Ua(jh,[h],{enabled:!f}),{data:ge,loading:pe,refetch:$}=Ua(dN,[h],{enabled:!f}),K=ge??[],fe=(xe,Se)=>{O(lt=>lt&&{...lt,[xe]:Se})},me=gS((N==null?void 0:N.providerPresets)??{},(N==null?void 0:N.provider)??"claude",(N==null?void 0:N.jobProviders)??{},fe);ze.useEffect(()=>{bN().then(xe=>I(xe.webhook)).catch(()=>{})},[h]),ze.useEffect(()=>{le&&r({pathname:"/scheduling",search:n.search},{replace:!0})},[le,n.search,r]),ze.useEffect(()=>{if(le)return;const Se=new URLSearchParams(n.search).get("tab");Se&&Z({providers:"ai-providers",runtime:"ai-providers","ai-runtime":"ai-providers",notifications:"integrations",general:"project",advanced:"project"}[Se]??Se)},[le,n.search]),ze.useEffect(()=>{if(S){if(w.current){w.current=!1;return}const xe=$x(S);O(xe),U.current=xe,k(!1)}},[S]),ze.useEffect(()=>{if(!N||!U.current)return;const xe=JSON.stringify(N),Se=JSON.stringify(U.current);k(xe!==Se)},[N]),ze.useEffect(()=>{N&&q.current&&(q.current=!1,be())},[N==null?void 0:N.jobProviders]);const be=async()=>{var lt,Ye,wt,oa,Ta,Va,da,ma,bn,jn,Nn,Ba,Pa;if(!N)return;const xe=N.cronSchedule!==(S==null?void 0:S.cronSchedule)||N.reviewerSchedule!==(S==null?void 0:S.reviewerSchedule)||N.cronScheduleOffset!==((S==null?void 0:S.cronScheduleOffset)??0)||N.schedulingPriority!==((S==null?void 0:S.schedulingPriority)??3)||N.executorEnabled!==((S==null?void 0:S.executorEnabled)??!0)||N.reviewerEnabled!==((S==null?void 0:S.reviewerEnabled)??!0)||N.queue.enabled!==(((lt=S==null?void 0:S.queue)==null?void 0:lt.enabled)??!0)||N.qa.enabled!==((S==null?void 0:S.qa.enabled)??!0)||N.qa.schedule!==(S==null?void 0:S.qa.schedule)||N.audit.enabled!==((S==null?void 0:S.audit.enabled)??!1)||N.audit.schedule!==(S==null?void 0:S.audit.schedule)||N.ux.enabled!==(((Ye=S==null?void 0:S.ux)==null?void 0:Ye.enabled)??!1)||N.ux.schedule!==(((wt=S==null?void 0:S.ux)==null?void 0:wt.schedule)??Eh().schedule)||N.analytics.enabled!==(((oa=S==null?void 0:S.analytics)==null?void 0:oa.enabled)??!1)||N.analytics.schedule!==(((Ta=S==null?void 0:S.analytics)==null?void 0:Ta.schedule)??Ch().schedule)||N.prResolver.enabled!==(((Va=S==null?void 0:S.prResolver)==null?void 0:Va.enabled)??bc().enabled)||N.prResolver.schedule!==(((da=S==null?void 0:S.prResolver)==null?void 0:da.schedule)??bc().schedule)||N.merger.enabled!==(((ma=S==null?void 0:S.merger)==null?void 0:ma.enabled)??!1)||N.merger.schedule!==(((bn=S==null?void 0:S.merger)==null?void 0:bn.schedule)??wo().schedule)||N.manager.enabled!==(((jn=S==null?void 0:S.manager)==null?void 0:jn.enabled)??jc().enabled)||N.manager.schedule!==(((Nn=S==null?void 0:S.manager)==null?void 0:Nn.schedule)??jc().schedule)||N.roadmapScanner.enabled!==(((Ba=S==null?void 0:S.roadmapScanner)==null?void 0:Ba.enabled)??!0)||(N.roadmapScanner.slicerSchedule||Ir().slicerSchedule)!==(((Pa=S==null?void 0:S.roadmapScanner)==null?void 0:Pa.slicerSchedule)||Ir().slicerSchedule),Se={};for(const It of xS){const $a=N.jobProviders[It];typeof $a=="string"&&$a.trim().length>0?Se[It]=$a:S!=null&&S.jobProviders[It]&&(Se[It]=null)}x(!0);try{const It=N.primaryFallbackModel||null,$a=N.secondaryFallbackModel||null,ts=await fo({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:Se,fallbackOnRateLimit:N.fallbackOnRateLimit,primaryFallbackModel:It,secondaryFallbackModel:$a,primaryFallbackPreset:N.primaryFallbackPreset||void 0,secondaryFallbackPreset:N.secondaryFallbackPreset||void 0,claudeModel:It,providerScheduleOverrides:N.providerScheduleOverrides,qa:N.qa,audit:N.audit,ux:N.ux,analytics:N.analytics,feedback:N.feedback,prResolver:N.prResolver,merger:N.merger,manager:N.manager,queue:N.queue,webhookTriggers:N.webhookTriggers}),vt=$x(ts);O(vt),U.current=vt,k(!1);let Jt="";if(xe)try{await gc()}catch(qn){Jt=qn instanceof Error?qn.message:"failed to reinstall cron schedules"}u(Jt?{title:"Settings Saved (Cron Reinstall Failed)",message:Jt,type:"warning"}:{title:"Settings Saved",message:xe?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),w.current=!0,ie(),$()}catch(It){u({title:"Save Failed",message:It instanceof Error?It.message:"Failed to save configuration",type:"error"})}finally{x(!1)}},H=()=>{U.current&&(O(U.current),k(!1),u({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"}))},se=async xe=>{if(!(R!=null&&!window.confirm("Replace existing global channel?")))try{const Se=await Wg({webhook:xe});I(Se.webhook)}catch(Se){u({title:"Failed to set global channel",message:Se instanceof Error?Se.message:"Unknown error",type:"error"})}},he=async()=>{try{await Wg({webhook:null}),I(null)}catch(xe){u({title:"Failed to unset global channel",message:xe instanceof Error?xe.message:"Unknown error",type:"error"})}},ye=async()=>{if(h){_(!0);try{await sN(h),b(h),M(!1),u({title:"Project Removed",message:"Cron jobs uninstalled and all project data removed from the database.",type:"success"})}catch(xe){u({title:"Remove Failed",message:xe instanceof Error?xe.message:"Failed to remove project",type:"error"})}finally{_(!1)}}};if(le)return s.jsx(La,{message:"Opening automation",rows:1});if(te||!N)return s.jsx(La,{message:"Loading settings",detail:"Fetching project configuration and health checks."});if(ae)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:ae.message}),s.jsx(Le,{onClick:()=>ie(),children:"Retry"})]});const Re=[{id:"project",label:"Project",content:s.jsx(tS,{form:N,updateField:fe,projectName:o,doctorChecks:K,doctorLoading:pe})},{id:"ai-providers",label:"AI Providers",content:s.jsx(nS,{form:N,updateField:fe,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(mS,{form:N,updateField:fe,globalWebhook:R,isGlobalMode:j,onSetGlobal:se,onUnsetGlobal:he,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"})]}),J&&s.jsxs(Tt,{variant:"warning",className:"animate-pulse",children:[s.jsx(Fs,{className:"h-3 w-3 mr-1"}),"Unsaved Changes"]})]}),s.jsx(Rp,{tabs:Re,activeTab:G,onChange:Z}),J&&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(ph,{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:be,loading:y,children:[s.jsx(pp,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]})]})}),j&&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:()=>M(!0),children:[s.jsx(Is,{className:"h-4 w-4 mr-2"}),"Remove Project"]})]}),E&&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:()=>!D&&M(!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(Fs,{className:"h-6 w-6 text-red-400"}),s.jsxs("h3",{className:"text-lg font-semibold text-slate-100",children:["Remove ",o,"?"]})]}),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:()=>M(!1),disabled:D,children:"Cancel"}),s.jsx(Le,{variant:"secondary",className:"bg-red-600 hover:bg-red-700",onClick:ye,loading:D,children:"Remove"})]})]})]}),s.jsx(eS,{isOpen:me.presetModalOpen,onClose:()=>{me.setPresetModalOpen(!1)},onSave:me.handleSavePreset,presetId:me.editingPresetId,preset:me.editingPreset,isBuiltIn:me.editingPresetId?go.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(Fs,{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"})]})]})]})]})},bS=()=>(kN(),AN(),s.jsx(i1,{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(MN,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(ON,{}),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(Ub,{children:[s.jsx(Ln,{path:"/",element:s.jsx(IN,{})}),s.jsx(Ln,{path:"/analytics",element:s.jsx(qN,{})}),s.jsx(Ln,{path:"/prs",element:s.jsx(QN,{})}),s.jsx(Ln,{path:"/board",element:s.jsx(YN,{})}),s.jsx(Ln,{path:"/scheduling",element:s.jsx(Iw,{})}),s.jsx(Ln,{path:"/logs",element:s.jsx(WN,{})}),s.jsx(Ln,{path:"/roadmap",element:s.jsx(XN,{})}),s.jsx(Ln,{path:"/settings",element:s.jsx(yS,{})}),s.jsx(Ln,{path:"*",element:s.jsx(zb,{to:"/",replace:!0})})]})})})]}),s.jsx(DN,{})]})})),ov=document.getElementById("root");if(!ov)throw new Error("Could not find root element to mount to");const jS=qy.createRoot(ov);jS.render(s.jsx(ze.StrictMode,{children:s.jsx(bS,{})}));
|