@jonit-dev/night-watch-cli 1.8.10-beta.1 → 1.8.10-beta.3
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 +2309 -1313
- package/dist/scripts/night-watch-cron.sh +1 -3
- package/dist/scripts/night-watch-merger-cron.sh +1 -1
- package/dist/scripts/night-watch-plan-cron.sh +1 -1
- package/dist/scripts/night-watch-slicer-cron.sh +1 -1
- package/dist/web/assets/index-BUgI2S1s.js +406 -0
- package/dist/web/assets/index-CkdLFBd7.js +406 -0
- package/dist/web/assets/index-RMfswANB.css +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/commands/analytics.d.ts +0 -14
- package/dist/commands/analytics.d.ts.map +0 -1
- package/dist/commands/analytics.js +0 -69
- package/dist/commands/analytics.js.map +0 -1
- package/dist/commands/audit.d.ts +0 -19
- package/dist/commands/audit.d.ts.map +0 -1
- package/dist/commands/audit.js +0 -144
- package/dist/commands/audit.js.map +0 -1
- package/dist/commands/board.d.ts +0 -9
- package/dist/commands/board.d.ts.map +0 -1
- package/dist/commands/board.js +0 -702
- package/dist/commands/board.js.map +0 -1
- package/dist/commands/cancel.d.ts +0 -46
- package/dist/commands/cancel.d.ts.map +0 -1
- package/dist/commands/cancel.js +0 -239
- package/dist/commands/cancel.js.map +0 -1
- package/dist/commands/cron.d.ts +0 -8
- package/dist/commands/cron.d.ts.map +0 -1
- package/dist/commands/cron.js +0 -134
- package/dist/commands/cron.js.map +0 -1
- package/dist/commands/dashboard/tab-actions.d.ts +0 -10
- package/dist/commands/dashboard/tab-actions.d.ts.map +0 -1
- package/dist/commands/dashboard/tab-actions.js +0 -247
- package/dist/commands/dashboard/tab-actions.js.map +0 -1
- package/dist/commands/dashboard/tab-config.d.ts +0 -21
- package/dist/commands/dashboard/tab-config.d.ts.map +0 -1
- package/dist/commands/dashboard/tab-config.js +0 -873
- package/dist/commands/dashboard/tab-config.js.map +0 -1
- package/dist/commands/dashboard/tab-logs.d.ts +0 -10
- package/dist/commands/dashboard/tab-logs.d.ts.map +0 -1
- package/dist/commands/dashboard/tab-logs.js +0 -202
- package/dist/commands/dashboard/tab-logs.js.map +0 -1
- package/dist/commands/dashboard/tab-schedules.d.ts +0 -21
- package/dist/commands/dashboard/tab-schedules.d.ts.map +0 -1
- package/dist/commands/dashboard/tab-schedules.js +0 -320
- package/dist/commands/dashboard/tab-schedules.js.map +0 -1
- package/dist/commands/dashboard/tab-status.d.ts +0 -32
- package/dist/commands/dashboard/tab-status.d.ts.map +0 -1
- package/dist/commands/dashboard/tab-status.js +0 -424
- package/dist/commands/dashboard/tab-status.js.map +0 -1
- package/dist/commands/dashboard/types.d.ts +0 -42
- package/dist/commands/dashboard/types.d.ts.map +0 -1
- package/dist/commands/dashboard/types.js +0 -5
- package/dist/commands/dashboard/types.js.map +0 -1
- package/dist/commands/dashboard.d.ts +0 -11
- package/dist/commands/dashboard.d.ts.map +0 -1
- package/dist/commands/dashboard.js +0 -242
- package/dist/commands/dashboard.js.map +0 -1
- package/dist/commands/doctor.d.ts +0 -16
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -195
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/history.d.ts +0 -7
- package/dist/commands/history.d.ts.map +0 -1
- package/dist/commands/history.js +0 -49
- package/dist/commands/history.js.map +0 -1
- package/dist/commands/init.d.ts +0 -45
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -777
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/install.d.ts +0 -65
- package/dist/commands/install.d.ts.map +0 -1
- package/dist/commands/install.js +0 -405
- package/dist/commands/install.js.map +0 -1
- package/dist/commands/logs.d.ts +0 -15
- package/dist/commands/logs.d.ts.map +0 -1
- package/dist/commands/logs.js +0 -155
- package/dist/commands/logs.js.map +0 -1
- package/dist/commands/merge.d.ts +0 -26
- package/dist/commands/merge.d.ts.map +0 -1
- package/dist/commands/merge.js +0 -159
- package/dist/commands/merge.js.map +0 -1
- package/dist/commands/notify.d.ts +0 -7
- package/dist/commands/notify.d.ts.map +0 -1
- package/dist/commands/notify.js +0 -43
- package/dist/commands/notify.js.map +0 -1
- package/dist/commands/plan.d.ts +0 -19
- package/dist/commands/plan.d.ts.map +0 -1
- package/dist/commands/plan.js +0 -88
- package/dist/commands/plan.js.map +0 -1
- package/dist/commands/prd-state.d.ts +0 -12
- package/dist/commands/prd-state.d.ts.map +0 -1
- package/dist/commands/prd-state.js +0 -47
- package/dist/commands/prd-state.js.map +0 -1
- package/dist/commands/prd.d.ts +0 -18
- package/dist/commands/prd.d.ts.map +0 -1
- package/dist/commands/prd.js +0 -363
- package/dist/commands/prd.js.map +0 -1
- package/dist/commands/prds.d.ts +0 -13
- package/dist/commands/prds.d.ts.map +0 -1
- package/dist/commands/prds.js +0 -194
- package/dist/commands/prds.js.map +0 -1
- package/dist/commands/prs.d.ts +0 -14
- package/dist/commands/prs.d.ts.map +0 -1
- package/dist/commands/prs.js +0 -104
- package/dist/commands/prs.js.map +0 -1
- package/dist/commands/qa.d.ts +0 -34
- package/dist/commands/qa.d.ts.map +0 -1
- package/dist/commands/qa.js +0 -214
- package/dist/commands/qa.js.map +0 -1
- package/dist/commands/queue.d.ts +0 -8
- package/dist/commands/queue.d.ts.map +0 -1
- package/dist/commands/queue.js +0 -376
- package/dist/commands/queue.js.map +0 -1
- package/dist/commands/resolve.d.ts +0 -26
- package/dist/commands/resolve.d.ts.map +0 -1
- package/dist/commands/resolve.js +0 -186
- package/dist/commands/resolve.js.map +0 -1
- package/dist/commands/retry.d.ts +0 -9
- package/dist/commands/retry.d.ts.map +0 -1
- package/dist/commands/retry.js +0 -71
- package/dist/commands/retry.js.map +0 -1
- package/dist/commands/review.d.ts +0 -82
- package/dist/commands/review.d.ts.map +0 -1
- package/dist/commands/review.js +0 -479
- package/dist/commands/review.js.map +0 -1
- package/dist/commands/run.d.ts +0 -73
- package/dist/commands/run.d.ts.map +0 -1
- package/dist/commands/run.js +0 -509
- package/dist/commands/run.js.map +0 -1
- package/dist/commands/serve.d.ts +0 -19
- package/dist/commands/serve.d.ts.map +0 -1
- package/dist/commands/serve.js +0 -142
- package/dist/commands/serve.js.map +0 -1
- package/dist/commands/shared/env-builder.d.ts +0 -49
- package/dist/commands/shared/env-builder.d.ts.map +0 -1
- package/dist/commands/shared/env-builder.js +0 -150
- package/dist/commands/shared/env-builder.js.map +0 -1
- package/dist/commands/slice.d.ts +0 -35
- package/dist/commands/slice.d.ts.map +0 -1
- package/dist/commands/slice.js +0 -316
- package/dist/commands/slice.js.map +0 -1
- package/dist/commands/state.d.ts +0 -8
- package/dist/commands/state.d.ts.map +0 -1
- package/dist/commands/state.js +0 -54
- package/dist/commands/state.js.map +0 -1
- package/dist/commands/status.d.ts +0 -14
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -297
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/summary.d.ts +0 -14
- package/dist/commands/summary.d.ts.map +0 -1
- package/dist/commands/summary.js +0 -193
- package/dist/commands/summary.js.map +0 -1
- package/dist/commands/uninstall.d.ts +0 -25
- package/dist/commands/uninstall.d.ts.map +0 -1
- package/dist/commands/uninstall.js +0 -134
- package/dist/commands/uninstall.js.map +0 -1
- package/dist/commands/update.d.ts +0 -22
- package/dist/commands/update.d.ts.map +0 -1
- package/dist/commands/update.js +0 -90
- package/dist/commands/update.js.map +0 -1
- package/dist/web/assets/index-2JY0x_Ij.js +0 -381
- package/dist/web/assets/index-3h8pgmqL.css +0 -1
- package/dist/web/assets/index-B-wbyZq7.js +0 -386
- package/dist/web/assets/index-B1BnOpiO.css +0 -1
- package/dist/web/assets/index-B3CnV08_.js +0 -365
- package/dist/web/assets/index-B5QjuFh9.css +0 -1
- package/dist/web/assets/index-B8FW2ecQ.js +0 -370
- package/dist/web/assets/index-BFxPiKyy.js +0 -381
- package/dist/web/assets/index-BGqNh_Da.js +0 -365
- package/dist/web/assets/index-BIONU0qz.css +0 -1
- package/dist/web/assets/index-B_l_3wnA.js +0 -370
- package/dist/web/assets/index-Ba-4YvTQ.js +0 -365
- package/dist/web/assets/index-Bbb4-39N.js +0 -370
- package/dist/web/assets/index-BdgdShEN.js +0 -365
- package/dist/web/assets/index-BhiC4Z-G.js +0 -381
- package/dist/web/assets/index-BjhCFjZi.js +0 -381
- package/dist/web/assets/index-BlRxmrnQ.css +0 -1
- package/dist/web/assets/index-BqwbXsHS.js +0 -365
- package/dist/web/assets/index-BsC7RT48.css +0 -1
- package/dist/web/assets/index-Bvh8XI8_.js +0 -370
- package/dist/web/assets/index-C01r2ymn.js +0 -381
- package/dist/web/assets/index-C51Rbsmk.js +0 -381
- package/dist/web/assets/index-C7lMNxRE.js +0 -370
- package/dist/web/assets/index-CJLObgsn.js +0 -386
- package/dist/web/assets/index-CLuRf7Zt.js +0 -381
- package/dist/web/assets/index-CM3xFd3e.css +0 -1
- package/dist/web/assets/index-CNkBtDK7.js +0 -370
- package/dist/web/assets/index-CPQbZ1BL.css +0 -1
- package/dist/web/assets/index-CTy5dUDU.css +0 -1
- package/dist/web/assets/index-CU15COKs.js +0 -370
- package/dist/web/assets/index-CiRJZI4z.js +0 -386
- package/dist/web/assets/index-Cp7RYjoy.css +0 -1
- package/dist/web/assets/index-CvPkZOWT.js +0 -381
- package/dist/web/assets/index-CvUk-33B.css +0 -1
- package/dist/web/assets/index-Cvmj-oF6.css +0 -1
- package/dist/web/assets/index-CxE5iQVO.js +0 -381
- package/dist/web/assets/index-D7lZQpFV.js +0 -365
- package/dist/web/assets/index-DAyP4GOi.css +0 -1
- package/dist/web/assets/index-DCG0n8Kg.js +0 -386
- package/dist/web/assets/index-DEEI8cyF.css +0 -1
- package/dist/web/assets/index-DF99BowV.js +0 -381
- package/dist/web/assets/index-DGWsvFj6.css +0 -1
- package/dist/web/assets/index-DGpU39Cp.css +0 -1
- package/dist/web/assets/index-DI4kFgOi.js +0 -370
- package/dist/web/assets/index-DIyTcPw5.css +0 -1
- package/dist/web/assets/index-DTsfDC7m.js +0 -381
- package/dist/web/assets/index-DcgNAi4A.js +0 -386
- package/dist/web/assets/index-DgOAgkZy.css +0 -1
- package/dist/web/assets/index-DnHkqbOa.js +0 -386
- package/dist/web/assets/index-DnR7Idcf.css +0 -1
- package/dist/web/assets/index-DpVirMEe.css +0 -1
- package/dist/web/assets/index-DsYIWZ86.css +0 -1
- package/dist/web/assets/index-DtrDkci5.js +0 -381
- package/dist/web/assets/index-DyjIth5M.js +0 -386
- package/dist/web/assets/index-FwIKfHPL.css +0 -1
- package/dist/web/assets/index-IKrZymWk.css +0 -1
- package/dist/web/assets/index-MA6fM0ab.js +0 -381
- package/dist/web/assets/index-N_QxaSEg.css +0 -1
- package/dist/web/assets/index-OcU-0TCQ.css +0 -1
- package/dist/web/assets/index-OyhrmG-L.js +0 -381
- package/dist/web/assets/index-SQlBKu_s.js +0 -386
- package/dist/web/assets/index-Sv2B60J4.js +0 -370
- package/dist/web/assets/index-Vgyivb5u.js +0 -365
- package/dist/web/assets/index-ZABWMEZR.js +0 -381
- package/dist/web/assets/index-ZE5lOeJp.js +0 -386
- package/dist/web/assets/index-aCHmkAcJ.css +0 -1
- package/dist/web/assets/index-bFijnpuU.js +0 -381
- package/dist/web/assets/index-bUPZgSoZ.css +0 -1
- package/dist/web/assets/index-mz1VIYsP.css +0 -1
- package/dist/web/assets/index-oOp_MFeE.js +0 -376
- package/dist/web/assets/index-rfU713Zm.js +0 -386
- package/dist/web/assets/index-tuNH9gmb.js +0 -448
- package/dist/web/assets/index-viSwHyDD.js +0 -365
- package/dist/web/assets/index-yKEQysks.js +0 -365
|
@@ -1,386 +0,0 @@
|
|
|
1
|
-
var Xy=Object.defineProperty;var ng=l=>{throw TypeError(l)};var Jy=(l,r,o)=>r in l?Xy(l,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):l[r]=o;var lg=(l,r,o)=>Jy(l,typeof r!="symbol"?r+"":r,o),hf=(l,r,o)=>r.has(l)||ng("Cannot "+o);var te=(l,r,o)=>(hf(l,r,"read from private field"),o?o.call(l):r.get(l)),at=(l,r,o)=>r.has(l)?ng("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(l):r.set(l,o),Te=(l,r,o,c)=>(hf(l,r,"write to private field"),c?c.call(l,o):r.set(l,o),o),Se=(l,r,o)=>(hf(l,r,"access private method"),o);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))c(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const v of m.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&c(v)}).observe(document,{childList:!0,subtree:!0});function o(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function c(f){if(f.ep)return;f.ep=!0;const m=o(f);fetch(f.href,m)}})();function Gf(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}function Ky(l){if(Object.prototype.hasOwnProperty.call(l,"__esModule"))return l;var r=l.default;if(typeof r=="function"){var o=function c(){return this instanceof c?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};o.prototype=r.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(l).forEach(function(c){var f=Object.getOwnPropertyDescriptor(l,c);Object.defineProperty(o,c,f.get?f:{enumerable:!0,get:function(){return l[c]}})}),o}var mf={exports:{}},Fi={};/**
|
|
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 sg;function ev(){if(sg)return Fi;sg=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(c,f,m){var v=null;if(m!==void 0&&(v=""+m),f.key!==void 0&&(v=""+f.key),"key"in f){m={};for(var S in f)S!=="key"&&(m[S]=f[S])}else m=f;return f=m.ref,{$$typeof:l,type:c,key:v,ref:f!==void 0?f:null,props:m}}return Fi.Fragment=r,Fi.jsx=o,Fi.jsxs=o,Fi}var rg;function tv(){return rg||(rg=1,mf.exports=ev()),mf.exports}var s=tv(),gf={exports:{}},Le={};/**
|
|
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 ig;function av(){if(ig)return Le;ig=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),v=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),j=Symbol.iterator;function D(_){return _===null||typeof _!="object"?null:(_=j&&_[j]||_["@@iterator"],typeof _=="function"?_:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,A={};function I(_,se,ge){this.props=_,this.context=se,this.refs=A,this.updater=ge||C}I.prototype.isReactComponent={},I.prototype.setState=function(_,se){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,se,"setState")},I.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function B(){}B.prototype=I.prototype;function J(_,se,ge){this.props=_,this.context=se,this.refs=A,this.updater=ge||C}var K=J.prototype=new B;K.constructor=J,M(K,I.prototype),K.isPureReactComponent=!0;var ce=Array.isArray;function P(){}var F={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function ne(_,se,ge){var pe=ge.ref;return{$$typeof:l,type:_,key:se,ref:pe!==void 0?pe:null,props:ge}}function O(_,se){return ne(_.type,se,_.props)}function le(_){return typeof _=="object"&&_!==null&&_.$$typeof===l}function k(_){var se={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(ge){return se[ge]})}var oe=/\/+/g;function ee(_,se){return typeof _=="object"&&_!==null&&_.key!=null?k(""+_.key):se.toString(36)}function xe(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(P,P):(_.status="pending",_.then(function(se){_.status==="pending"&&(_.status="fulfilled",_.value=se)},function(se){_.status==="pending"&&(_.status="rejected",_.reason=se)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function Y(_,se,ge,pe,Me){var we=typeof _;(we==="undefined"||we==="boolean")&&(_=null);var He=!1;if(_===null)He=!0;else switch(we){case"bigint":case"string":case"number":He=!0;break;case"object":switch(_.$$typeof){case l:case r:He=!0;break;case b:return He=_._init,Y(He(_._payload),se,ge,pe,Me)}}if(He)return Me=Me(_),He=pe===""?"."+ee(_,0):pe,ce(Me)?(ge="",He!=null&&(ge=He.replace(oe,"$&/")+"/"),Y(Me,se,ge,"",function(Xt){return Xt})):Me!=null&&(le(Me)&&(Me=O(Me,ge+(Me.key==null||_&&_.key===Me.key?"":(""+Me.key).replace(oe,"$&/")+"/")+He)),se.push(Me)),1;He=0;var mt=pe===""?".":pe+":";if(ce(_))for(var Pe=0;Pe<_.length;Pe++)pe=_[Pe],we=mt+ee(pe,Pe),He+=Y(pe,se,ge,we,Me);else if(Pe=D(_),typeof Pe=="function")for(_=Pe.call(_),Pe=0;!(pe=_.next()).done;)pe=pe.value,we=mt+ee(pe,Pe++),He+=Y(pe,se,ge,we,Me);else if(we==="object"){if(typeof _.then=="function")return Y(xe(_),se,ge,pe,Me);throw se=String(_),Error("Objects are not valid as a React child (found: "+(se==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":se)+"). If you meant to render a collection of children, use an array instead.")}return He}function ie(_,se,ge){if(_==null)return _;var pe=[],Me=0;return Y(_,pe,"","",function(we){return se.call(ge,we,Me++)}),pe}function me(_){if(_._status===-1){var se=_._result;se=se(),se.then(function(ge){(_._status===0||_._status===-1)&&(_._status=1,_._result=ge)},function(ge){(_._status===0||_._status===-1)&&(_._status=2,_._result=ge)}),_._status===-1&&(_._status=0,_._result=se)}if(_._status===1)return _._result.default;throw _._result}var je=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var se=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(se))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},be={map:ie,forEach:function(_,se,ge){ie(_,function(){se.apply(this,arguments)},ge)},count:function(_){var se=0;return ie(_,function(){se++}),se},toArray:function(_){return ie(_,function(se){return se})||[]},only:function(_){if(!le(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return Le.Activity=T,Le.Children=be,Le.Component=I,Le.Fragment=o,Le.Profiler=f,Le.PureComponent=J,Le.StrictMode=c,Le.Suspense=N,Le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,Le.__COMPILER_RUNTIME={__proto__:null,c:function(_){return F.H.useMemoCache(_)}},Le.cache=function(_){return function(){return _.apply(null,arguments)}},Le.cacheSignal=function(){return null},Le.cloneElement=function(_,se,ge){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var pe=M({},_.props),Me=_.key;if(se!=null)for(we in se.key!==void 0&&(Me=""+se.key),se)!Z.call(se,we)||we==="key"||we==="__self"||we==="__source"||we==="ref"&&se.ref===void 0||(pe[we]=se[we]);var we=arguments.length-2;if(we===1)pe.children=ge;else if(1<we){for(var He=Array(we),mt=0;mt<we;mt++)He[mt]=arguments[mt+2];pe.children=He}return ne(_.type,Me,pe)},Le.createContext=function(_){return _={$$typeof:v,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:m,_context:_},_},Le.createElement=function(_,se,ge){var pe,Me={},we=null;if(se!=null)for(pe in se.key!==void 0&&(we=""+se.key),se)Z.call(se,pe)&&pe!=="key"&&pe!=="__self"&&pe!=="__source"&&(Me[pe]=se[pe]);var He=arguments.length-2;if(He===1)Me.children=ge;else if(1<He){for(var mt=Array(He),Pe=0;Pe<He;Pe++)mt[Pe]=arguments[Pe+2];Me.children=mt}if(_&&_.defaultProps)for(pe in He=_.defaultProps,He)Me[pe]===void 0&&(Me[pe]=He[pe]);return ne(_,we,Me)},Le.createRef=function(){return{current:null}},Le.forwardRef=function(_){return{$$typeof:S,render:_}},Le.isValidElement=le,Le.lazy=function(_){return{$$typeof:b,_payload:{_status:-1,_result:_},_init:me}},Le.memo=function(_,se){return{$$typeof:x,type:_,compare:se===void 0?null:se}},Le.startTransition=function(_){var se=F.T,ge={};F.T=ge;try{var pe=_(),Me=F.S;Me!==null&&Me(ge,pe),typeof pe=="object"&&pe!==null&&typeof pe.then=="function"&&pe.then(P,je)}catch(we){je(we)}finally{se!==null&&ge.types!==null&&(se.types=ge.types),F.T=se}},Le.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},Le.use=function(_){return F.H.use(_)},Le.useActionState=function(_,se,ge){return F.H.useActionState(_,se,ge)},Le.useCallback=function(_,se){return F.H.useCallback(_,se)},Le.useContext=function(_){return F.H.useContext(_)},Le.useDebugValue=function(){},Le.useDeferredValue=function(_,se){return F.H.useDeferredValue(_,se)},Le.useEffect=function(_,se){return F.H.useEffect(_,se)},Le.useEffectEvent=function(_){return F.H.useEffectEvent(_)},Le.useId=function(){return F.H.useId()},Le.useImperativeHandle=function(_,se,ge){return F.H.useImperativeHandle(_,se,ge)},Le.useInsertionEffect=function(_,se){return F.H.useInsertionEffect(_,se)},Le.useLayoutEffect=function(_,se){return F.H.useLayoutEffect(_,se)},Le.useMemo=function(_,se){return F.H.useMemo(_,se)},Le.useOptimistic=function(_,se){return F.H.useOptimistic(_,se)},Le.useReducer=function(_,se,ge){return F.H.useReducer(_,se,ge)},Le.useRef=function(_){return F.H.useRef(_)},Le.useState=function(_){return F.H.useState(_)},Le.useSyncExternalStore=function(_,se,ge){return F.H.useSyncExternalStore(_,se,ge)},Le.useTransition=function(){return F.H.useTransition()},Le.version="19.2.4",Le}var ug;function Ff(){return ug||(ug=1,gf.exports=av()),gf.exports}var U=Ff();const ze=Gf(U);var xf={exports:{}},Zi={},pf={exports:{}},yf={};/**
|
|
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 cg;function nv(){return cg||(cg=1,(function(l){function r(Y,ie){var me=Y.length;Y.push(ie);e:for(;0<me;){var je=me-1>>>1,be=Y[je];if(0<f(be,ie))Y[je]=ie,Y[me]=be,me=je;else break e}}function o(Y){return Y.length===0?null:Y[0]}function c(Y){if(Y.length===0)return null;var ie=Y[0],me=Y.pop();if(me!==ie){Y[0]=me;e:for(var je=0,be=Y.length,_=be>>>1;je<_;){var se=2*(je+1)-1,ge=Y[se],pe=se+1,Me=Y[pe];if(0>f(ge,me))pe<be&&0>f(Me,ge)?(Y[je]=Me,Y[pe]=me,je=pe):(Y[je]=ge,Y[se]=me,je=se);else if(pe<be&&0>f(Me,me))Y[je]=Me,Y[pe]=me,je=pe;else break e}}return ie}function f(Y,ie){var me=Y.sortIndex-ie.sortIndex;return me!==0?me:Y.id-ie.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;l.unstable_now=function(){return m.now()}}else{var v=Date,S=v.now();l.unstable_now=function(){return v.now()-S}}var N=[],x=[],b=1,T=null,j=3,D=!1,C=!1,M=!1,A=!1,I=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,J=typeof setImmediate<"u"?setImmediate:null;function K(Y){for(var ie=o(x);ie!==null;){if(ie.callback===null)c(x);else if(ie.startTime<=Y)c(x),ie.sortIndex=ie.expirationTime,r(N,ie);else break;ie=o(x)}}function ce(Y){if(M=!1,K(Y),!C)if(o(N)!==null)C=!0,P||(P=!0,k());else{var ie=o(x);ie!==null&&xe(ce,ie.startTime-Y)}}var P=!1,F=-1,Z=5,ne=-1;function O(){return A?!0:!(l.unstable_now()-ne<Z)}function le(){if(A=!1,P){var Y=l.unstable_now();ne=Y;var ie=!0;try{e:{C=!1,M&&(M=!1,B(F),F=-1),D=!0;var me=j;try{t:{for(K(Y),T=o(N);T!==null&&!(T.expirationTime>Y&&O());){var je=T.callback;if(typeof je=="function"){T.callback=null,j=T.priorityLevel;var be=je(T.expirationTime<=Y);if(Y=l.unstable_now(),typeof be=="function"){T.callback=be,K(Y),ie=!0;break t}T===o(N)&&c(N),K(Y)}else c(N);T=o(N)}if(T!==null)ie=!0;else{var _=o(x);_!==null&&xe(ce,_.startTime-Y),ie=!1}}break e}finally{T=null,j=me,D=!1}ie=void 0}}finally{ie?k():P=!1}}}var k;if(typeof J=="function")k=function(){J(le)};else if(typeof MessageChannel<"u"){var oe=new MessageChannel,ee=oe.port2;oe.port1.onmessage=le,k=function(){ee.postMessage(null)}}else k=function(){I(le,0)};function xe(Y,ie){F=I(function(){Y(l.unstable_now())},ie)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(Y){Y.callback=null},l.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<Y?Math.floor(1e3/Y):5},l.unstable_getCurrentPriorityLevel=function(){return j},l.unstable_next=function(Y){switch(j){case 1:case 2:case 3:var ie=3;break;default:ie=j}var me=j;j=ie;try{return Y()}finally{j=me}},l.unstable_requestPaint=function(){A=!0},l.unstable_runWithPriority=function(Y,ie){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var me=j;j=Y;try{return ie()}finally{j=me}},l.unstable_scheduleCallback=function(Y,ie,me){var je=l.unstable_now();switch(typeof me=="object"&&me!==null?(me=me.delay,me=typeof me=="number"&&0<me?je+me:je):me=je,Y){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=me+be,Y={id:b++,callback:ie,priorityLevel:Y,startTime:me,expirationTime:be,sortIndex:-1},me>je?(Y.sortIndex=me,r(x,Y),o(N)===null&&Y===o(x)&&(M?(B(F),F=-1):M=!0,xe(ce,me-je))):(Y.sortIndex=be,r(N,Y),C||D||(C=!0,P||(P=!0,k()))),Y},l.unstable_shouldYield=O,l.unstable_wrapCallback=function(Y){var ie=j;return function(){var me=j;j=ie;try{return Y.apply(this,arguments)}finally{j=me}}}})(yf)),yf}var og;function lv(){return og||(og=1,pf.exports=nv()),pf.exports}var vf={exports:{}},oa={};/**
|
|
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 dg;function sv(){if(dg)return oa;dg=1;var l=Ff();function r(N){var x="https://react.dev/errors/"+N;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)x+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+N+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var c={d:{f:o,r:function(){throw Error(r(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},f=Symbol.for("react.portal");function m(N,x,b){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:T==null?null:""+T,children:N,containerInfo:x,implementation:b}}var v=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function S(N,x){if(N==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return oa.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,oa.createPortal=function(N,x){var b=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 m(N,x,null,b)},oa.flushSync=function(N){var x=v.T,b=c.p;try{if(v.T=null,c.p=2,N)return N()}finally{v.T=x,c.p=b,c.d.f()}},oa.preconnect=function(N,x){typeof N=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,c.d.C(N,x))},oa.prefetchDNS=function(N){typeof N=="string"&&c.d.D(N)},oa.preinit=function(N,x){if(typeof N=="string"&&x&&typeof x.as=="string"){var b=x.as,T=S(b,x.crossOrigin),j=typeof x.integrity=="string"?x.integrity:void 0,D=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;b==="style"?c.d.S(N,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:T,integrity:j,fetchPriority:D}):b==="script"&&c.d.X(N,{crossOrigin:T,integrity:j,fetchPriority:D,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},oa.preinitModule=function(N,x){if(typeof N=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var b=S(x.as,x.crossOrigin);c.d.M(N,{crossOrigin:b,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&c.d.M(N)},oa.preload=function(N,x){if(typeof N=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var b=x.as,T=S(b,x.crossOrigin);c.d.L(N,b,{crossOrigin:T,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},oa.preloadModule=function(N,x){if(typeof N=="string")if(x){var b=S(x.as,x.crossOrigin);c.d.m(N,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:b,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else c.d.m(N)},oa.requestFormReset=function(N){c.d.r(N)},oa.unstable_batchedUpdates=function(N,x){return N(x)},oa.useFormState=function(N,x,b){return v.H.useFormState(N,x,b)},oa.useFormStatus=function(){return v.H.useHostTransitionStatus()},oa.version="19.2.4",oa}var fg;function gx(){if(fg)return vf.exports;fg=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(r){console.error(r)}}return l(),vf.exports=sv(),vf.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 hg;function rv(){if(hg)return Zi;hg=1;var l=lv(),r=Ff(),o=gx();function c(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 f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function v(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function S(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 N(e){if(m(e)!==e)throw Error(c(188))}function x(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(c(188));return t!==e?null:e}for(var a=e,n=t;;){var u=a.return;if(u===null)break;var d=u.alternate;if(d===null){if(n=u.return,n!==null){a=n;continue}break}if(u.child===d.child){for(d=u.child;d;){if(d===a)return N(u),e;if(d===n)return N(u),t;d=d.sibling}throw Error(c(188))}if(a.return!==n.return)a=u,n=d;else{for(var p=!1,E=u.child;E;){if(E===a){p=!0,a=u,n=d;break}if(E===n){p=!0,n=u,a=d;break}E=E.sibling}if(!p){for(E=d.child;E;){if(E===a){p=!0,a=d,n=u;break}if(E===n){p=!0,n=d,a=u;break}E=E.sibling}if(!p)throw Error(c(189))}}if(a.alternate!==n)throw Error(c(190))}if(a.tag!==3)throw Error(c(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var T=Object.assign,j=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),J=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),ce=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function k(e){return e===null||typeof e!="object"?null:(e=le&&e[le]||e["@@iterator"],typeof e=="function"?e:null)}var oe=Symbol.for("react.client.reference");function ee(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===oe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case I:return"Profiler";case A:return"StrictMode";case ce:return"Suspense";case P:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case J:return e.displayName||"Context";case B: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 F:return t=e.displayName||null,t!==null?t:ee(e.type)||"Memo";case Z:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var xe=Array.isArray,Y=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},je=[],be=-1;function _(e){return{current:e}}function se(e){0>be||(e.current=je[be],je[be]=null,be--)}function ge(e,t){be++,je[be]=e.current,e.current=t}var pe=_(null),Me=_(null),we=_(null),He=_(null);function mt(e,t){switch(ge(we,t),ge(Me,e),ge(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?T0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=T0(t),e=M0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}se(pe),ge(pe,e)}function Pe(){se(pe),se(Me),se(we)}function Xt(e){e.memoizedState!==null&&ge(He,e);var t=pe.current,a=M0(t,e.type);t!==a&&(ge(Me,e),ge(pe,a))}function Ha(e){Me.current===e&&(se(pe),se(Me)),He.current===e&&(se(He),Yi._currentValue=me)}var gn,Ka;function ha(e){if(gn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);gn=t&&t[1]||"",Ka=-1<a.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+gn+e+Ka}var ma=!1;function xn(e,t){if(!e||ma)return"";ma=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(ae){var X=ae}Reflect.construct(e,[],de)}else{try{de.call()}catch(ae){X=ae}e.call(de.prototype)}}else{try{throw Error()}catch(ae){X=ae}(de=e())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(ae){if(ae&&X&&typeof ae.stack=="string")return[ae.stack,X.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=n.DetermineComponentFrameRoot(),p=d[0],E=d[1];if(p&&E){var z=p.split(`
|
|
44
|
-
`),Q=E.split(`
|
|
45
|
-
`);for(u=n=0;n<z.length&&!z[n].includes("DetermineComponentFrameRoot");)n++;for(;u<Q.length&&!Q[u].includes("DetermineComponentFrameRoot");)u++;if(n===z.length||u===Q.length)for(n=z.length-1,u=Q.length-1;1<=n&&0<=u&&z[n]!==Q[u];)u--;for(;1<=n&&0<=u;n--,u--)if(z[n]!==Q[u]){if(n!==1||u!==1)do if(n--,u--,0>u||z[n]!==Q[u]){var re=`
|
|
46
|
-
`+z[n].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),re}while(1<=n&&0<=u);break}}}finally{ma=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ha(a):""}function $(e,t){switch(e.tag){case 26:case 27:case 5:return ha(e.type);case 16:return ha("Lazy");case 13:return e.child!==t&&t!==null?ha("Suspense Fallback"):ha("Suspense");case 19:return ha("SuspenseList");case 0:case 15:return xn(e.type,!1);case 11:return xn(e.type.render,!1);case 1:return xn(e.type,!0);case 31:return ha("Activity");default:return""}}function he(e){try{var t="",a=null;do t+=$(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
-
Error generating stack: `+n.message+`
|
|
48
|
-
`+n.stack}}var Oe=Object.prototype.hasOwnProperty,Ge=l.unstable_scheduleCallback,gt=l.unstable_cancelCallback,St=l.unstable_shouldYield,qt=l.unstable_requestPaint,it=l.unstable_now,sa=l.unstable_getCurrentPriorityLevel,pn=l.unstable_ImmediatePriority,yn=l.unstable_UserBlockingPriority,Bt=l.unstable_NormalPriority,Ma=l.unstable_LowPriority,qa=l.unstable_IdlePriority,Ye=l.log,ll=l.unstable_setDisableYieldValue,xt=null,Vt=null;function At(e){if(typeof Ye=="function"&&ll(e),Vt&&typeof Vt.setStrictMode=="function")try{Vt.setStrictMode(xt,e)}catch{}}var kt=Math.clz32?Math.clz32:uo,Xl=Math.log,Ys=Math.LN2;function uo(e){return e>>>=0,e===0?32:31-(Xl(e)/Ys|0)|0}var sl=256,$s=262144,ra=4194304;function vn(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 Jl(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var u=0,d=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var E=n&134217727;return E!==0?(n=E&~d,n!==0?u=vn(n):(p&=E,p!==0?u=vn(p):a||(a=E&~e,a!==0&&(u=vn(a))))):(E=n&~d,E!==0?u=vn(E):p!==0?u=vn(p):a||(a=n&~e,a!==0&&(u=vn(a)))),u===0?0:t!==0&&t!==u&&(t&d)===0&&(d=u&-u,a=t&-t,d>=a||d===32&&(a&4194048)!==0)?t:u}function rl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function gu(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 Gr(){var e=ra;return ra<<=1,(ra&62914560)===0&&(ra=4194304),e}function Ps(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function il(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function xu(e,t,a,n,u,d){var p=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var E=e.entanglements,z=e.expirationTimes,Q=e.hiddenUpdates;for(a=p&~a;0<a;){var re=31-kt(a),de=1<<re;E[re]=0,z[re]=-1;var X=Q[re];if(X!==null)for(Q[re]=null,re=0;re<X.length;re++){var ae=X[re];ae!==null&&(ae.lane&=-536870913)}a&=~de}n!==0&&ht(e,n,0),d!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=d&~(p&~t))}function ht(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-kt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function ga(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-kt(a),u=1<<n;u&t|e[n]&t&&(e[n]|=t),a&=~u}}function Fr(e,t){var a=t&-t;return a=(a&42)!==0?1:Gs(a),(a&(e.suspendedLanes|t))!==0?0:a}function Gs(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 ia(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Fs(){var e=ie.p;return e!==0?e:(e=window.event,e===void 0?32:I0(e.type))}function Zr(e,t){var a=ie.p;try{return ie.p=e,t()}finally{ie.p=a}}var en=Math.random().toString(36).slice(2),Et="__reactFiber$"+en,Yt="__reactProps$"+en,Rn="__reactContainer$"+en,Kl="__reactEvents$"+en,pu="__reactListeners$"+en,yu="__reactHandles$"+en,vu="__reactResources$"+en,es="__reactMarker$"+en;function Zs(e){delete e[Et],delete e[Yt],delete e[Kl],delete e[pu],delete e[yu]}function Dn(e){var t=e[Et];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Rn]||a[Et]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=_0(e);e!==null;){if(a=e[Et])return a;e=_0(e)}return t}e=a,a=e.parentNode}return null}function Re(e){if(e=e[Et]||e[Rn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function xa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function tn(e){var t=e[vu];return t||(t=e[vu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _t(e){e[es]=!0}var bu=new Set,Wr={};function bn(e,t){ul(e,t),ul(e+"Capture",t)}function ul(e,t){for(Wr[e]=t,e=0;e<t.length;e++)bu.add(t[e])}var Nu=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]*$"),Su={},An={};function Qr(e){return Oe.call(An,e)?!0:Oe.call(Su,e)?!1:Nu.test(e)?An[e]=!0:(Su[e]=!0,!1)}function Jt(e,t,a){if(Qr(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Ws(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function nt(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}function Tt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Nn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ir(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var u=n.get,d=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(p){a=""+p,d.call(this,p)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(p){a=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ts(e){if(!e._valueTracker){var t=Nn(e)?"checked":"value";e._valueTracker=Ir(e,t,""+e[t])}}function cl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=Nn(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function an(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 Qs=/[\n"\\]/g;function Kt(e){return e.replace(Qs,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Is(e,t,a,n,u,d,p,E){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Tt(t)):e.value!==""+Tt(t)&&(e.value=""+Tt(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?as(e,p,Tt(t)):a!=null?as(e,p,Tt(a)):n!=null&&e.removeAttribute("value"),u==null&&d!=null&&(e.defaultChecked=!!d),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+Tt(E):e.removeAttribute("name")}function ol(e,t,a,n,u,d,p,E){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){ts(e);return}a=a!=null?""+Tt(a):"",t=t!=null?""+Tt(t):a,E||t===e.value||(e.value=t),e.defaultValue=t}n=n??u,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=E?e.checked:!!n,e.defaultChecked=!!n,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),ts(e)}function as(e,t,a){t==="number"&&an(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function kn(e,t,a,n){if(e=e.options,t){t={};for(var u=0;u<a.length;u++)t["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=t.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Tt(a),t=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,n&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function ns(e,t,a){if(t!=null&&(t=""+Tt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Tt(a):""}function Xr(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(c(92));if(xe(n)){if(1<n.length)throw Error(c(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Tt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),ts(e)}function nn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var ls=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 ss(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||ls.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function ju(e,t,a){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var u in t)n=t[u],t.hasOwnProperty(u)&&a[u]!==n&&ss(e,u,n)}else for(var d in t)t.hasOwnProperty(d)&&ss(e,d,t[d])}function Xs(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 co=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"]]),wu=/^[\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 rs(e){return wu.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ba(){}var Jr=null;function Js(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _n=null,dl=null;function Eu(e){var t=Re(e);if(t&&(e=t.stateNode)){var a=e[Yt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Is(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="'+Kt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var u=n[Yt]||null;if(!u)throw Error(c(90));Is(n,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&cl(n)}break e;case"textarea":ns(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&kn(e,!!a.multiple,t,!1)}}}var Kr=!1;function ei(e,t,a){if(Kr)return e(t,a);Kr=!0;try{var n=e(t);return n}finally{if(Kr=!1,(_n!==null||dl!==null)&&(vc(),_n&&(t=_n,e=dl,dl=_n=null,Eu(t),e)))for(t=0;t<e.length;t++)Eu(e[t])}}function is(e,t){var a=e.stateNode;if(a===null)return null;var n=a[Yt]||null;if(n===null)return null;a=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(c(231,t,typeof a));return a}var ln=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ti=!1;if(ln)try{var us={};Object.defineProperty(us,"passive",{get:function(){ti=!0}}),window.addEventListener("test",us,us),window.removeEventListener("test",us,us)}catch{ti=!1}var Sn=null,Ks=null,er=null;function $t(){if(er)return er;var e,t=Ks,a=t.length,n,u="value"in Sn?Sn.value:Sn.textContent,d=u.length;for(e=0;e<a&&t[e]===u[e];e++);var p=a-e;for(n=1;n<=p&&t[a-n]===u[d-n];n++);return er=u.slice(e,1<n?1-n:void 0)}function cs(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 sn(){return!0}function zn(){return!1}function Mt(e){function t(a,n,u,d,p){this._reactName=a,this._targetInst=u,this.type=n,this.nativeEvent=d,this.target=p,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(a=e[E],this[E]=a?a(d):d[E]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?sn:zn,this.isPropagationStopped=zn,this}return T(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=sn)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=sn)},persist:function(){},isPersistent:sn}),t}var jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},os=Mt(jn),ds=T({},jn,{view:0,detail:0}),ai=Mt(ds),tr,fs,hs,ar=T({},ds,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gs,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!==hs&&(hs&&e.type==="mousemove"?(tr=e.screenX-hs.screenX,fs=e.screenY-hs.screenY):fs=tr=0,hs=e),tr)},movementY:function(e){return"movementY"in e?e.movementY:fs}}),Tu=Mt(ar),oo=T({},ar,{dataTransfer:0}),fo=Mt(oo),ho=T({},ds,{relatedTarget:0}),nr=Mt(ho),mo=T({},jn,{animationName:0,elapsedTime:0,pseudoElement:0}),fl=Mt(mo),go=T({},jn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),hl=Mt(go),ms=T({},jn,{data:0}),ml=Mt(ms),xo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},po={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"},yo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vo(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=yo[e])?!!t[e]:!1}function gs(){return vo}var bo=T({},ds,{key:function(e){if(e.key){var t=xo[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?po[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gs,charCode:function(e){return e.type==="keypress"?cs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),No=Mt(bo),So=T({},ar,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mu=Mt(So),jo=T({},ds,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gs}),wo=Mt(jo),Cu=T({},jn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Eo=Mt(Cu),To=T({},ar,{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}),Mo=Mt(To),Co=T({},jn,{newState:0,oldState:0}),Oo=Mt(Co),Ou=[9,13,27,32],ni=ln&&"CompositionEvent"in window,xs=null;ln&&"documentMode"in document&&(xs=document.documentMode);var Ro=ln&&"TextEvent"in window&&!xs,Ru=ln&&(!ni||xs&&8<xs&&11>=xs),Du=" ",Au=!1;function ku(e,t){switch(e){case"keyup":return Ou.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _u(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gl=!1;function Do(e,t){switch(e){case"compositionend":return _u(t);case"keypress":return t.which!==32?null:(Au=!0,Du);case"textInput":return e=t.data,e===Du&&Au?null:e;default:return null}}function Ao(e,t){if(gl)return e==="compositionend"||!ni&&ku(e,t)?(e=$t(),er=Ks=Sn=null,gl=!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 Ru&&t.locale!=="ko"?null:t.data;default:return null}}var ko={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 zu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ko[e.type]:t==="textarea"}function li(e,t,a,n){_n?dl?dl.push(n):dl=[n]:_n=n,t=Tc(t,"onChange"),0<t.length&&(a=new os("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var xl=null,ps=null;function pa(e){b0(e,0)}function rn(e){var t=xa(e);if(cl(t))return e}function Uu(e,t){if(e==="change")return t}var wn=!1;if(ln){var si;if(ln){var Ca="oninput"in document;if(!Ca){var ri=document.createElement("div");ri.setAttribute("oninput","return;"),Ca=typeof ri.oninput=="function"}si=Ca}else si=!1;wn=si&&(!document.documentMode||9<document.documentMode)}function ii(){xl&&(xl.detachEvent("onpropertychange",ui),ps=xl=null)}function ui(e){if(e.propertyName==="value"&&rn(ps)){var t=[];li(t,ps,e,Js(e)),ei(pa,t)}}function We(e,t,a){e==="focusin"?(ii(),xl=t,ps=a,xl.attachEvent("onpropertychange",ui)):e==="focusout"&&ii()}function pl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return rn(ps)}function _o(e,t){if(e==="click")return rn(t)}function pt(e,t){if(e==="input"||e==="change")return rn(t)}function ys(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ua=typeof Object.is=="function"?Object.is:ys;function vs(e,t){if(ua(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var u=a[n];if(!Oe.call(t,u)||!ua(e[u],t[u]))return!1}return!0}function Lu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hu(e,t){var a=Lu(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Lu(a)}}function Je(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Je(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=an(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=an(e.document)}return t}function lr(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 qu=ln&&"documentMode"in document&&11>=document.documentMode,yl=null,sr=null,ea=null,rr=!1;function bs(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;rr||yl==null||yl!==an(n)||(n=yl,"selectionStart"in n&&lr(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),ea&&vs(ea,n)||(ea=n,n=Tc(sr,"onSelect"),0<n.length&&(t=new os("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=yl)))}function Un(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var vl={animationend:Un("Animation","AnimationEnd"),animationiteration:Un("Animation","AnimationIteration"),animationstart:Un("Animation","AnimationStart"),transitionrun:Un("Transition","TransitionRun"),transitionstart:Un("Transition","TransitionStart"),transitioncancel:Un("Transition","TransitionCancel"),transitionend:Un("Transition","TransitionEnd")},ci={},Bu={};ln&&(Bu=document.createElement("div").style,"AnimationEvent"in window||(delete vl.animationend.animation,delete vl.animationiteration.animation,delete vl.animationstart.animation),"TransitionEvent"in window||delete vl.transitionend.transition);function Ln(e){if(ci[e])return ci[e];if(!vl[e])return e;var t=vl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Bu)return ci[e]=t[a];return e}var Vu=Ln("animationend"),Yu=Ln("animationiteration"),ir=Ln("animationstart"),Uo=Ln("transitionrun"),Lo=Ln("transitionstart"),$u=Ln("transitioncancel"),oi=Ln("transitionend"),di=new Map,fi="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(" ");fi.push("scrollEnd");function ya(e,t){di.set(e,t),bn(t,[e])}var bl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},da=[],Va=0,Ns=0;function Nl(){for(var e=Va,t=Ns=Va=0;t<e;){var a=da[t];da[t++]=null;var n=da[t];da[t++]=null;var u=da[t];da[t++]=null;var d=da[t];if(da[t++]=null,n!==null&&u!==null){var p=n.pending;p===null?u.next=u:(u.next=p.next,p.next=u),n.pending=u}d!==0&&Ss(a,u,d)}}function Ya(e,t,a,n){da[Va++]=e,da[Va++]=t,da[Va++]=a,da[Va++]=n,Ns|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function ur(e,t,a,n){return Ya(e,t,a,n),js(e)}function $a(e,t){return Ya(e,null,null,t),js(e)}function Ss(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var u=!1,d=e.return;d!==null;)d.childLanes|=a,n=d.alternate,n!==null&&(n.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(u=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,u&&t!==null&&(u=31-kt(a),e=d.hiddenUpdates,n=e[u],n===null?e[u]=[t]:n.push(t),t.lane=a|536870912),d):null}function js(e){if(50<zi)throw zi=0,Ud=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Oa={};function cr(e,t,a,n){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ta(e,t,a,n){return new cr(e,t,a,n)}function or(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Pa(e,t){var a=e.alternate;return a===null?(a=ta(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 Pu(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 dr(e,t,a,n,u,d){var p=0;if(n=e,typeof e=="function")or(e)&&(p=1);else if(typeof e=="string")p=qy(e,a,pe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ne:return e=ta(31,a,t,u),e.elementType=ne,e.lanes=d,e;case M:return Ga(a.children,u,d,t);case A:p=8,u|=24;break;case I:return e=ta(12,a,t,u|2),e.elementType=I,e.lanes=d,e;case ce:return e=ta(13,a,t,u),e.elementType=ce,e.lanes=d,e;case P:return e=ta(19,a,t,u),e.elementType=P,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case J:p=10;break e;case B:p=9;break e;case K:p=11;break e;case F:p=14;break e;case Z:p=16,n=null;break e}p=29,a=Error(c(130,e===null?"null":typeof e,"")),n=null}return t=ta(p,a,t,u),t.elementType=e,t.type=n,t.lanes=d,t}function Ga(e,t,a,n){return e=ta(7,e,n,t),e.lanes=a,e}function hi(e,t,a){return e=ta(6,e,null,t),e.lanes=a,e}function Gu(e){var t=ta(18,null,null,0);return t.stateNode=e,t}function Sl(e,t,a){return t=ta(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mi=new WeakMap;function va(e,t){if(typeof e=="object"&&e!==null){var a=mi.get(e);return a!==void 0?a:(t={value:e,source:t,stack:he(t)},mi.set(e,t),t)}return{value:e,source:t,stack:he(t)}}var Hn=[],qn=0,ws=null,un=0,ca=[],Ee=0,ba=null,Fa=1,g="";function i(e,t){Hn[qn++]=un,Hn[qn++]=ws,ws=e,un=t}function h(e,t,a){ca[Ee++]=Fa,ca[Ee++]=g,ca[Ee++]=ba,ba=e;var n=Fa;e=g;var u=32-kt(n)-1;n&=~(1<<u),a+=1;var d=32-kt(t)+u;if(30<d){var p=u-u%5;d=(n&(1<<p)-1).toString(32),n>>=p,u-=p,Fa=1<<32-kt(t)+u|a<<u|n,g=d+e}else Fa=1<<d|a<<u|n,g=e}function y(e){e.return!==null&&(i(e,1),h(e,1,0))}function w(e){for(;e===ws;)ws=Hn[--qn],Hn[qn]=null,un=Hn[--qn],Hn[qn]=null;for(;e===ba;)ba=ca[--Ee],ca[Ee]=null,g=ca[--Ee],ca[Ee]=null,Fa=ca[--Ee],ca[Ee]=null}function R(e,t){ca[Ee++]=Fa,ca[Ee++]=g,ca[Ee++]=ba,Fa=t.id,g=t.overflow,ba=e}var L=null,H=null,V=!1,fe=null,ye=!1,Ue=Error(c(519));function Qe(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cn(va(t,e)),Ue}function De(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[Et]=e,t[Yt]=n,a){case"dialog":Ze("cancel",t),Ze("close",t);break;case"iframe":case"object":case"embed":Ze("load",t);break;case"video":case"audio":for(a=0;a<Li.length;a++)Ze(Li[a],t);break;case"source":Ze("error",t);break;case"img":case"image":case"link":Ze("error",t),Ze("load",t);break;case"details":Ze("toggle",t);break;case"input":Ze("invalid",t),ol(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Ze("invalid",t);break;case"textarea":Ze("invalid",t),Xr(t,n.value,n.defaultValue,n.children)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||w0(t.textContent,a)?(n.popover!=null&&(Ze("beforetoggle",t),Ze("toggle",t)),n.onScroll!=null&&Ze("scroll",t),n.onScrollEnd!=null&&Ze("scrollend",t),n.onClick!=null&&(t.onclick=Ba),t=!0):t=!1,t||Qe(e,!0)}function Nt(e){for(L=e.return;L;)switch(L.tag){case 5:case 31:case 13:ye=!1;return;case 27:case 3:ye=!0;return;default:L=L.return}}function Ft(e){if(e!==L)return!1;if(!V)return Nt(e),V=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Xd(e.type,e.memoizedProps)),a=!a),a&&H&&Qe(e),Nt(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));H=k0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));H=k0(e)}else t===27?(t=H,zl(e.type)?(e=af,af=null,H=e):H=t):H=L?Ia(e.stateNode.nextSibling):null;return!0}function Zt(){H=L=null,V=!1}function En(){var e=fe;return e!==null&&(wa===null?wa=e:wa.push.apply(wa,e),fe=null),e}function cn(e){fe===null?fe=[e]:fe.push(e)}var fr=_(null),Bn=null,Za=null;function Tn(e,t,a){ge(fr,t._currentValue),t._currentValue=a}function on(e){e._currentValue=fr.current,se(fr)}function gi(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function Vn(e,t,a,n){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var d=u.dependencies;if(d!==null){var p=u.child;d=d.firstContext;e:for(;d!==null;){var E=d;d=u;for(var z=0;z<t.length;z++)if(E.context===t[z]){d.lanes|=a,E=d.alternate,E!==null&&(E.lanes|=a),gi(d.return,a,e),n||(p=null);break e}d=E.next}}else if(u.tag===18){if(p=u.return,p===null)throw Error(c(341));p.lanes|=a,d=p.alternate,d!==null&&(d.lanes|=a),gi(p,a,e),p=null}else p=u.child;if(p!==null)p.return=u;else for(p=u;p!==null;){if(p===e){p=null;break}if(u=p.sibling,u!==null){u.return=p.return,p=u;break}p=p.return}u=p}}function Wa(e,t,a,n){e=null;for(var u=t,d=!1;u!==null;){if(!d){if((u.flags&524288)!==0)d=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var p=u.alternate;if(p===null)throw Error(c(387));if(p=p.memoizedProps,p!==null){var E=u.type;ua(u.pendingProps.value,p.value)||(e!==null?e.push(E):e=[E])}}else if(u===He.current){if(p=u.alternate,p===null)throw Error(c(387));p.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Yi):e=[Yi])}u=u.return}e!==null&&Vn(t,e,a,n),t.flags|=262144}function hr(e){for(e=e.firstContext;e!==null;){if(!ua(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Es(e){Bn=e,Za=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function aa(e){return ch(Bn,e)}function Fu(e,t){return Bn===null&&Es(e),ch(e,t)}function ch(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Za===null){if(e===null)throw Error(c(308));Za=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Za=Za.next=t;return a}var zp=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Up=l.unstable_scheduleCallback,Lp=l.unstable_NormalPriority,zt={$$typeof:J,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ho(){return{controller:new zp,data:new Map,refCount:0}}function xi(e){e.refCount--,e.refCount===0&&Up(Lp,function(){e.controller.abort()})}var pi=null,qo=0,mr=0,gr=null;function Hp(e,t){if(pi===null){var a=pi=[];qo=0,mr=Yd(),gr={status:"pending",value:void 0,then:function(n){a.push(n)}}}return qo++,t.then(oh,oh),t}function oh(){if(--qo===0&&pi!==null){gr!==null&&(gr.status="fulfilled");var e=pi;pi=null,mr=0,gr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function qp(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(u){a.push(u)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var u=0;u<a.length;u++)(0,a[u])(t)},function(u){for(n.status="rejected",n.reason=u,u=0;u<a.length;u++)(0,a[u])(void 0)}),n}var dh=Y.S;Y.S=function(e,t){Wm=it(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Hp(e,t),dh!==null&&dh(e,t)};var Ts=_(null);function Bo(){var e=Ts.current;return e!==null?e:dt.pooledCache}function Zu(e,t){t===null?ge(Ts,Ts.current):ge(Ts,t.pool)}function fh(){var e=Bo();return e===null?null:{parent:zt._currentValue,pool:e}}var xr=Error(c(460)),Vo=Error(c(474)),Wu=Error(c(542)),Qu={then:function(){}};function hh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function mh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ba,Ba),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,xh(e),e;default:if(typeof t.status=="string")t.then(Ba,Ba);else{if(e=dt,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=n}},function(n){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,xh(e),e}throw Cs=t,xr}}function Ms(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Cs=a,xr):a}}var Cs=null;function gh(){if(Cs===null)throw Error(c(459));var e=Cs;return Cs=null,e}function xh(e){if(e===xr||e===Wu)throw Error(c(483))}var pr=null,yi=0;function Iu(e){var t=yi;return yi+=1,pr===null&&(pr=[]),mh(pr,e,t)}function vi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Xu(e,t){throw t.$$typeof===j?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ph(e){function t(G,q){if(e){var W=G.deletions;W===null?(G.deletions=[q],G.flags|=16):W.push(q)}}function a(G,q){if(!e)return null;for(;q!==null;)t(G,q),q=q.sibling;return null}function n(G){for(var q=new Map;G!==null;)G.key!==null?q.set(G.key,G):q.set(G.index,G),G=G.sibling;return q}function u(G,q){return G=Pa(G,q),G.index=0,G.sibling=null,G}function d(G,q,W){return G.index=W,e?(W=G.alternate,W!==null?(W=W.index,W<q?(G.flags|=67108866,q):W):(G.flags|=67108866,q)):(G.flags|=1048576,q)}function p(G){return e&&G.alternate===null&&(G.flags|=67108866),G}function E(G,q,W,ue){return q===null||q.tag!==6?(q=hi(W,G.mode,ue),q.return=G,q):(q=u(q,W),q.return=G,q)}function z(G,q,W,ue){var Ce=W.type;return Ce===M?re(G,q,W.props.children,ue,W.key):q!==null&&(q.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===Z&&Ms(Ce)===q.type)?(q=u(q,W.props),vi(q,W),q.return=G,q):(q=dr(W.type,W.key,W.props,null,G.mode,ue),vi(q,W),q.return=G,q)}function Q(G,q,W,ue){return q===null||q.tag!==4||q.stateNode.containerInfo!==W.containerInfo||q.stateNode.implementation!==W.implementation?(q=Sl(W,G.mode,ue),q.return=G,q):(q=u(q,W.children||[]),q.return=G,q)}function re(G,q,W,ue,Ce){return q===null||q.tag!==7?(q=Ga(W,G.mode,ue,Ce),q.return=G,q):(q=u(q,W),q.return=G,q)}function de(G,q,W){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=hi(""+q,G.mode,W),q.return=G,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case D:return W=dr(q.type,q.key,q.props,null,G.mode,W),vi(W,q),W.return=G,W;case C:return q=Sl(q,G.mode,W),q.return=G,q;case Z:return q=Ms(q),de(G,q,W)}if(xe(q)||k(q))return q=Ga(q,G.mode,W,null),q.return=G,q;if(typeof q.then=="function")return de(G,Iu(q),W);if(q.$$typeof===J)return de(G,Fu(G,q),W);Xu(G,q)}return null}function X(G,q,W,ue){var Ce=q!==null?q.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Ce!==null?null:E(G,q,""+W,ue);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case D:return W.key===Ce?z(G,q,W,ue):null;case C:return W.key===Ce?Q(G,q,W,ue):null;case Z:return W=Ms(W),X(G,q,W,ue)}if(xe(W)||k(W))return Ce!==null?null:re(G,q,W,ue,null);if(typeof W.then=="function")return X(G,q,Iu(W),ue);if(W.$$typeof===J)return X(G,q,Fu(G,W),ue);Xu(G,W)}return null}function ae(G,q,W,ue,Ce){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return G=G.get(W)||null,E(q,G,""+ue,Ce);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case D:return G=G.get(ue.key===null?W:ue.key)||null,z(q,G,ue,Ce);case C:return G=G.get(ue.key===null?W:ue.key)||null,Q(q,G,ue,Ce);case Z:return ue=Ms(ue),ae(G,q,W,ue,Ce)}if(xe(ue)||k(ue))return G=G.get(W)||null,re(q,G,ue,Ce,null);if(typeof ue.then=="function")return ae(G,q,W,Iu(ue),Ce);if(ue.$$typeof===J)return ae(G,q,W,Fu(q,ue),Ce);Xu(q,ue)}return null}function ve(G,q,W,ue){for(var Ce=null,Ke=null,Ne=q,Be=q=0,Xe=null;Ne!==null&&Be<W.length;Be++){Ne.index>Be?(Xe=Ne,Ne=null):Xe=Ne.sibling;var et=X(G,Ne,W[Be],ue);if(et===null){Ne===null&&(Ne=Xe);break}e&&Ne&&et.alternate===null&&t(G,Ne),q=d(et,q,Be),Ke===null?Ce=et:Ke.sibling=et,Ke=et,Ne=Xe}if(Be===W.length)return a(G,Ne),V&&i(G,Be),Ce;if(Ne===null){for(;Be<W.length;Be++)Ne=de(G,W[Be],ue),Ne!==null&&(q=d(Ne,q,Be),Ke===null?Ce=Ne:Ke.sibling=Ne,Ke=Ne);return V&&i(G,Be),Ce}for(Ne=n(Ne);Be<W.length;Be++)Xe=ae(Ne,G,Be,W[Be],ue),Xe!==null&&(e&&Xe.alternate!==null&&Ne.delete(Xe.key===null?Be:Xe.key),q=d(Xe,q,Be),Ke===null?Ce=Xe:Ke.sibling=Xe,Ke=Xe);return e&&Ne.forEach(function(Bl){return t(G,Bl)}),V&&i(G,Be),Ce}function Ae(G,q,W,ue){if(W==null)throw Error(c(151));for(var Ce=null,Ke=null,Ne=q,Be=q=0,Xe=null,et=W.next();Ne!==null&&!et.done;Be++,et=W.next()){Ne.index>Be?(Xe=Ne,Ne=null):Xe=Ne.sibling;var Bl=X(G,Ne,et.value,ue);if(Bl===null){Ne===null&&(Ne=Xe);break}e&&Ne&&Bl.alternate===null&&t(G,Ne),q=d(Bl,q,Be),Ke===null?Ce=Bl:Ke.sibling=Bl,Ke=Bl,Ne=Xe}if(et.done)return a(G,Ne),V&&i(G,Be),Ce;if(Ne===null){for(;!et.done;Be++,et=W.next())et=de(G,et.value,ue),et!==null&&(q=d(et,q,Be),Ke===null?Ce=et:Ke.sibling=et,Ke=et);return V&&i(G,Be),Ce}for(Ne=n(Ne);!et.done;Be++,et=W.next())et=ae(Ne,G,Be,et.value,ue),et!==null&&(e&&et.alternate!==null&&Ne.delete(et.key===null?Be:et.key),q=d(et,q,Be),Ke===null?Ce=et:Ke.sibling=et,Ke=et);return e&&Ne.forEach(function(Iy){return t(G,Iy)}),V&&i(G,Be),Ce}function ot(G,q,W,ue){if(typeof W=="object"&&W!==null&&W.type===M&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case D:e:{for(var Ce=W.key;q!==null;){if(q.key===Ce){if(Ce=W.type,Ce===M){if(q.tag===7){a(G,q.sibling),ue=u(q,W.props.children),ue.return=G,G=ue;break e}}else if(q.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===Z&&Ms(Ce)===q.type){a(G,q.sibling),ue=u(q,W.props),vi(ue,W),ue.return=G,G=ue;break e}a(G,q);break}else t(G,q);q=q.sibling}W.type===M?(ue=Ga(W.props.children,G.mode,ue,W.key),ue.return=G,G=ue):(ue=dr(W.type,W.key,W.props,null,G.mode,ue),vi(ue,W),ue.return=G,G=ue)}return p(G);case C:e:{for(Ce=W.key;q!==null;){if(q.key===Ce)if(q.tag===4&&q.stateNode.containerInfo===W.containerInfo&&q.stateNode.implementation===W.implementation){a(G,q.sibling),ue=u(q,W.children||[]),ue.return=G,G=ue;break e}else{a(G,q);break}else t(G,q);q=q.sibling}ue=Sl(W,G.mode,ue),ue.return=G,G=ue}return p(G);case Z:return W=Ms(W),ot(G,q,W,ue)}if(xe(W))return ve(G,q,W,ue);if(k(W)){if(Ce=k(W),typeof Ce!="function")throw Error(c(150));return W=Ce.call(W),Ae(G,q,W,ue)}if(typeof W.then=="function")return ot(G,q,Iu(W),ue);if(W.$$typeof===J)return ot(G,q,Fu(G,W),ue);Xu(G,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,q!==null&&q.tag===6?(a(G,q.sibling),ue=u(q,W),ue.return=G,G=ue):(a(G,q),ue=hi(W,G.mode,ue),ue.return=G,G=ue),p(G)):a(G,q)}return function(G,q,W,ue){try{yi=0;var Ce=ot(G,q,W,ue);return pr=null,Ce}catch(Ne){if(Ne===xr||Ne===Wu)throw Ne;var Ke=ta(29,Ne,null,G.mode);return Ke.lanes=ue,Ke.return=G,Ke}finally{}}}var Os=ph(!0),yh=ph(!1),jl=!1;function Yo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $o(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 wl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function El(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(tt&2)!==0){var u=n.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),n.pending=t,t=js(e),Ss(e,null,a),t}return Ya(e,n,t,a),js(e)}function bi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,ga(e,a)}}function Po(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var u=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?u=d=p:d=d.next=p,a=a.next}while(a!==null);d===null?u=d=t:d=d.next=t}else u=d=t;a={baseState:n.baseState,firstBaseUpdate:u,lastBaseUpdate:d,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Go=!1;function Ni(){if(Go){var e=gr;if(e!==null)throw e}}function Si(e,t,a,n){Go=!1;var u=e.updateQueue;jl=!1;var d=u.firstBaseUpdate,p=u.lastBaseUpdate,E=u.shared.pending;if(E!==null){u.shared.pending=null;var z=E,Q=z.next;z.next=null,p===null?d=Q:p.next=Q,p=z;var re=e.alternate;re!==null&&(re=re.updateQueue,E=re.lastBaseUpdate,E!==p&&(E===null?re.firstBaseUpdate=Q:E.next=Q,re.lastBaseUpdate=z))}if(d!==null){var de=u.baseState;p=0,re=Q=z=null,E=d;do{var X=E.lane&-536870913,ae=X!==E.lane;if(ae?(Ie&X)===X:(n&X)===X){X!==0&&X===mr&&(Go=!0),re!==null&&(re=re.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var ve=e,Ae=E;X=t;var ot=a;switch(Ae.tag){case 1:if(ve=Ae.payload,typeof ve=="function"){de=ve.call(ot,de,X);break e}de=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=Ae.payload,X=typeof ve=="function"?ve.call(ot,de,X):ve,X==null)break e;de=T({},de,X);break e;case 2:jl=!0}}X=E.callback,X!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=u.callbacks,ae===null?u.callbacks=[X]:ae.push(X))}else ae={lane:X,tag:E.tag,payload:E.payload,callback:E.callback,next:null},re===null?(Q=re=ae,z=de):re=re.next=ae,p|=X;if(E=E.next,E===null){if(E=u.shared.pending,E===null)break;ae=E,E=ae.next,ae.next=null,u.lastBaseUpdate=ae,u.shared.pending=null}}while(!0);re===null&&(z=de),u.baseState=z,u.firstBaseUpdate=Q,u.lastBaseUpdate=re,d===null&&(u.shared.lanes=0),Rl|=p,e.lanes=p,e.memoizedState=de}}function vh(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function bh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)vh(a[e],t)}var yr=_(null),Ju=_(0);function Nh(e,t){e=In,ge(Ju,e),ge(yr,t),In=e|t.baseLanes}function Fo(){ge(Ju,In),ge(yr,yr.current)}function Zo(){In=Ju.current,se(yr),se(Ju)}var Ra=_(null),Qa=null;function Tl(e){var t=e.alternate;ge(Ct,Ct.current&1),ge(Ra,e),Qa===null&&(t===null||yr.current!==null||t.memoizedState!==null)&&(Qa=e)}function Wo(e){ge(Ct,Ct.current),ge(Ra,e),Qa===null&&(Qa=e)}function Sh(e){e.tag===22?(ge(Ct,Ct.current),ge(Ra,e),Qa===null&&(Qa=e)):Ml()}function Ml(){ge(Ct,Ct.current),ge(Ra,Ra.current)}function Da(e){se(Ra),Qa===e&&(Qa=null),se(Ct)}var Ct=_(0);function Ku(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||ef(a)||tf(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 Yn=0,qe=null,ut=null,Ut=null,ec=!1,vr=!1,Rs=!1,tc=0,ji=0,br=null,Bp=0;function jt(){throw Error(c(321))}function Qo(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!ua(e[a],t[a]))return!1;return!0}function Io(e,t,a,n,u,d){return Yn=d,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Y.H=e===null||e.memoizedState===null?sm:dd,Rs=!1,d=a(n,u),Rs=!1,vr&&(d=wh(t,a,n,u)),jh(e),d}function jh(e){Y.H=Ti;var t=ut!==null&&ut.next!==null;if(Yn=0,Ut=ut=qe=null,ec=!1,ji=0,br=null,t)throw Error(c(300));e===null||Lt||(e=e.dependencies,e!==null&&hr(e)&&(Lt=!0))}function wh(e,t,a,n){qe=e;var u=0;do{if(vr&&(br=null),ji=0,vr=!1,25<=u)throw Error(c(301));if(u+=1,Ut=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)}Y.H=rm,d=t(a,n)}while(vr);return d}function Vp(){var e=Y.H,t=e.useState()[0];return t=typeof t.then=="function"?wi(t):t,e=e.useState()[0],(ut!==null?ut.memoizedState:null)!==e&&(qe.flags|=1024),t}function Xo(){var e=tc!==0;return tc=0,e}function Jo(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Ko(e){if(ec){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ec=!1}Yn=0,Ut=ut=qe=null,vr=!1,ji=tc=0,br=null}function fa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ut===null?qe.memoizedState=Ut=e:Ut=Ut.next=e,Ut}function Ot(){if(ut===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=ut.next;var t=Ut===null?qe.memoizedState:Ut.next;if(t!==null)Ut=t,ut=e;else{if(e===null)throw qe.alternate===null?Error(c(467)):Error(c(310));ut=e,e={memoizedState:ut.memoizedState,baseState:ut.baseState,baseQueue:ut.baseQueue,queue:ut.queue,next:null},Ut===null?qe.memoizedState=Ut=e:Ut=Ut.next=e}return Ut}function ac(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wi(e){var t=ji;return ji+=1,br===null&&(br=[]),e=mh(br,e,t),t=qe,(Ut===null?t.memoizedState:Ut.next)===null&&(t=t.alternate,Y.H=t===null||t.memoizedState===null?sm:dd),e}function nc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return wi(e);if(e.$$typeof===J)return aa(e)}throw Error(c(438,String(e)))}function ed(e){var t=null,a=qe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=qe.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=ac(),qe.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=O;return t.index++,a}function $n(e,t){return typeof t=="function"?t(e):t}function lc(e){var t=Ot();return td(t,ut,e)}function td(e,t,a){var n=e.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=a;var u=e.baseQueue,d=n.pending;if(d!==null){if(u!==null){var p=u.next;u.next=d.next,d.next=p}t.baseQueue=u=d,n.pending=null}if(d=e.baseState,u===null)e.memoizedState=d;else{t=u.next;var E=p=null,z=null,Q=t,re=!1;do{var de=Q.lane&-536870913;if(de!==Q.lane?(Ie&de)===de:(Yn&de)===de){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}),de===mr&&(re=!0);else if((Yn&X)===X){Q=Q.next,X===mr&&(re=!0);continue}else de={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},z===null?(E=z=de,p=d):z=z.next=de,qe.lanes|=X,Rl|=X;de=Q.action,Rs&&a(d,de),d=Q.hasEagerState?Q.eagerState:a(d,de)}else X={lane:de,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},z===null?(E=z=X,p=d):z=z.next=X,qe.lanes|=de,Rl|=de;Q=Q.next}while(Q!==null&&Q!==t);if(z===null?p=d:z.next=E,!ua(d,e.memoizedState)&&(Lt=!0,re&&(a=gr,a!==null)))throw a;e.memoizedState=d,e.baseState=p,e.baseQueue=z,n.lastRenderedState=d}return u===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function ad(e){var t=Ot(),a=t.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=e;var n=a.dispatch,u=a.pending,d=t.memoizedState;if(u!==null){a.pending=null;var p=u=u.next;do d=e(d,p.action),p=p.next;while(p!==u);ua(d,t.memoizedState)||(Lt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),a.lastRenderedState=d}return[d,n]}function Eh(e,t,a){var n=qe,u=Ot(),d=V;if(d){if(a===void 0)throw Error(c(407));a=a()}else a=t();var p=!ua((ut||u).memoizedState,a);if(p&&(u.memoizedState=a,Lt=!0),u=u.queue,sd(Ch.bind(null,n,u,e),[e]),u.getSnapshot!==t||p||Ut!==null&&Ut.memoizedState.tag&1){if(n.flags|=2048,Nr(9,{destroy:void 0},Mh.bind(null,n,u,a,t),null),dt===null)throw Error(c(349));d||(Yn&127)!==0||Th(n,t,a)}return a}function Th(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=qe.updateQueue,t===null?(t=ac(),qe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Mh(e,t,a,n){t.value=a,t.getSnapshot=n,Oh(t)&&Rh(e)}function Ch(e,t,a){return a(function(){Oh(t)&&Rh(e)})}function Oh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!ua(e,a)}catch{return!0}}function Rh(e){var t=$a(e,2);t!==null&&Ea(t,e,2)}function nd(e){var t=fa();if(typeof e=="function"){var a=e;if(e=a(),Rs){At(!0);try{a()}finally{At(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:e},t}function Dh(e,t,a,n){return e.baseState=a,td(e,ut,typeof n=="function"?n:$n)}function Yp(e,t,a,n,u){if(ic(e))throw Error(c(485));if(e=t.action,e!==null){var d={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){d.listeners.push(p)}};Y.T!==null?a(!0):d.isTransition=!1,n(d),a=t.pending,a===null?(d.next=t.pending=d,Ah(t,d)):(d.next=a.next,t.pending=a.next=d)}}function Ah(e,t){var a=t.action,n=t.payload,u=e.state;if(t.isTransition){var d=Y.T,p={};Y.T=p;try{var E=a(u,n),z=Y.S;z!==null&&z(p,E),kh(e,t,E)}catch(Q){ld(e,t,Q)}finally{d!==null&&p.types!==null&&(d.types=p.types),Y.T=d}}else try{d=a(u,n),kh(e,t,d)}catch(Q){ld(e,t,Q)}}function kh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){_h(e,t,n)},function(n){return ld(e,t,n)}):_h(e,t,a)}function _h(e,t,a){t.status="fulfilled",t.value=a,zh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Ah(e,a)))}function ld(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,zh(t),t=t.next;while(t!==n)}e.action=null}function zh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Uh(e,t){return t}function Lh(e,t){if(V){var a=dt.formState;if(a!==null){e:{var n=qe;if(V){if(H){t:{for(var u=H,d=ye;u.nodeType!==8;){if(!d){u=null;break t}if(u=Ia(u.nextSibling),u===null){u=null;break t}}d=u.data,u=d==="F!"||d==="F"?u:null}if(u){H=Ia(u.nextSibling),n=u.data==="F!";break e}}Qe(n)}n=!1}n&&(t=a[0])}}return a=fa(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Uh,lastRenderedState:t},a.queue=n,a=am.bind(null,qe,n),n.dispatch=a,n=nd(!1),d=od.bind(null,qe,!1,n.queue),n=fa(),u={state:t,dispatch:null,action:e,pending:null},n.queue=u,a=Yp.bind(null,qe,u,d,a),u.dispatch=a,n.memoizedState=e,[t,a,!1]}function Hh(e){var t=Ot();return qh(t,ut,e)}function qh(e,t,a){if(t=td(e,t,Uh)[0],e=lc($n)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=wi(t)}catch(p){throw p===xr?Wu:p}else n=t;t=Ot();var u=t.queue,d=u.dispatch;return a!==t.memoizedState&&(qe.flags|=2048,Nr(9,{destroy:void 0},$p.bind(null,u,a),null)),[n,d,e]}function $p(e,t){e.action=t}function Bh(e){var t=Ot(),a=ut;if(a!==null)return qh(t,a,e);Ot(),t=t.memoizedState,a=Ot();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function Nr(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=qe.updateQueue,t===null&&(t=ac(),qe.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function Vh(){return Ot().memoizedState}function sc(e,t,a,n){var u=fa();qe.flags|=e,u.memoizedState=Nr(1|t,{destroy:void 0},a,n===void 0?null:n)}function rc(e,t,a,n){var u=Ot();n=n===void 0?null:n;var d=u.memoizedState.inst;ut!==null&&n!==null&&Qo(n,ut.memoizedState.deps)?u.memoizedState=Nr(t,d,a,n):(qe.flags|=e,u.memoizedState=Nr(1|t,d,a,n))}function Yh(e,t){sc(8390656,8,e,t)}function sd(e,t){rc(2048,8,e,t)}function Pp(e){qe.flags|=4;var t=qe.updateQueue;if(t===null)t=ac(),qe.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function $h(e){var t=Ot().memoizedState;return Pp({ref:t,nextImpl:e}),function(){if((tt&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function Ph(e,t){return rc(4,2,e,t)}function Gh(e,t){return rc(4,4,e,t)}function Fh(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 Zh(e,t,a){a=a!=null?a.concat([e]):null,rc(4,4,Fh.bind(null,t,e),a)}function rd(){}function Wh(e,t){var a=Ot();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Qo(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Qh(e,t){var a=Ot();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Qo(t,n[1]))return n[0];if(n=e(),Rs){At(!0);try{e()}finally{At(!1)}}return a.memoizedState=[n,t],n}function id(e,t,a){return a===void 0||(Yn&1073741824)!==0&&(Ie&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Im(),qe.lanes|=e,Rl|=e,a)}function Ih(e,t,a,n){return ua(a,t)?a:yr.current!==null?(e=id(e,a,n),ua(e,t)||(Lt=!0),e):(Yn&42)===0||(Yn&1073741824)!==0&&(Ie&261930)===0?(Lt=!0,e.memoizedState=a):(e=Im(),qe.lanes|=e,Rl|=e,t)}function Xh(e,t,a,n,u){var d=ie.p;ie.p=d!==0&&8>d?d:8;var p=Y.T,E={};Y.T=E,od(e,!1,t,a);try{var z=u(),Q=Y.S;if(Q!==null&&Q(E,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var re=qp(z,n);Ei(e,t,re,_a(e))}else Ei(e,t,n,_a(e))}catch(de){Ei(e,t,{then:function(){},status:"rejected",reason:de},_a())}finally{ie.p=d,p!==null&&E.types!==null&&(p.types=E.types),Y.T=p}}function Gp(){}function ud(e,t,a,n){if(e.tag!==5)throw Error(c(476));var u=Jh(e).queue;Xh(e,u,t,me,a===null?Gp:function(){return Kh(e),a(n)})}function Jh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:me,baseState:me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:me},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Kh(e){var t=Jh(e);t.next===null&&(t=e.alternate.memoizedState),Ei(e,t.next.queue,{},_a())}function cd(){return aa(Yi)}function em(){return Ot().memoizedState}function tm(){return Ot().memoizedState}function Fp(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=_a();e=wl(a);var n=El(t,e,a);n!==null&&(Ea(n,t,a),bi(n,t,a)),t={cache:Ho()},e.payload=t;return}t=t.return}}function Zp(e,t,a){var n=_a();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ic(e)?nm(t,a):(a=ur(e,t,a,n),a!==null&&(Ea(a,e,n),lm(a,t,n)))}function am(e,t,a){var n=_a();Ei(e,t,a,n)}function Ei(e,t,a,n){var u={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ic(e))nm(t,u);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var p=t.lastRenderedState,E=d(p,a);if(u.hasEagerState=!0,u.eagerState=E,ua(E,p))return Ya(e,t,u,0),dt===null&&Nl(),!1}catch{}finally{}if(a=ur(e,t,u,n),a!==null)return Ea(a,e,n),lm(a,t,n),!0}return!1}function od(e,t,a,n){if(n={lane:2,revertLane:Yd(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ic(e)){if(t)throw Error(c(479))}else t=ur(e,a,n,2),t!==null&&Ea(t,e,2)}function ic(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function nm(e,t){vr=ec=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function lm(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,ga(e,a)}}var Ti={readContext:aa,use:nc,useCallback:jt,useContext:jt,useEffect:jt,useImperativeHandle:jt,useLayoutEffect:jt,useInsertionEffect:jt,useMemo:jt,useReducer:jt,useRef:jt,useState:jt,useDebugValue:jt,useDeferredValue:jt,useTransition:jt,useSyncExternalStore:jt,useId:jt,useHostTransitionStatus:jt,useFormState:jt,useActionState:jt,useOptimistic:jt,useMemoCache:jt,useCacheRefresh:jt};Ti.useEffectEvent=jt;var sm={readContext:aa,use:nc,useCallback:function(e,t){return fa().memoizedState=[e,t===void 0?null:t],e},useContext:aa,useEffect:Yh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,sc(4194308,4,Fh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return sc(4194308,4,e,t)},useInsertionEffect:function(e,t){sc(4,2,e,t)},useMemo:function(e,t){var a=fa();t=t===void 0?null:t;var n=e();if(Rs){At(!0);try{e()}finally{At(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=fa();if(a!==void 0){var u=a(t);if(Rs){At(!0);try{a(t)}finally{At(!1)}}}else u=t;return n.memoizedState=n.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},n.queue=e,e=e.dispatch=Zp.bind(null,qe,e),[n.memoizedState,e]},useRef:function(e){var t=fa();return e={current:e},t.memoizedState=e},useState:function(e){e=nd(e);var t=e.queue,a=am.bind(null,qe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:rd,useDeferredValue:function(e,t){var a=fa();return id(a,e,t)},useTransition:function(){var e=nd(!1);return e=Xh.bind(null,qe,e.queue,!0,!1),fa().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=qe,u=fa();if(V){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),dt===null)throw Error(c(349));(Ie&127)!==0||Th(n,t,a)}u.memoizedState=a;var d={value:a,getSnapshot:t};return u.queue=d,Yh(Ch.bind(null,n,d,e),[e]),n.flags|=2048,Nr(9,{destroy:void 0},Mh.bind(null,n,d,a,t),null),a},useId:function(){var e=fa(),t=dt.identifierPrefix;if(V){var a=g,n=Fa;a=(n&~(1<<32-kt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=tc++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Bp++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:cd,useFormState:Lh,useActionState:Lh,useOptimistic:function(e){var t=fa();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=od.bind(null,qe,!0,a),a.dispatch=t,[e,t]},useMemoCache:ed,useCacheRefresh:function(){return fa().memoizedState=Fp.bind(null,qe)},useEffectEvent:function(e){var t=fa(),a={impl:e};return t.memoizedState=a,function(){if((tt&2)!==0)throw Error(c(440));return a.impl.apply(void 0,arguments)}}},dd={readContext:aa,use:nc,useCallback:Wh,useContext:aa,useEffect:sd,useImperativeHandle:Zh,useInsertionEffect:Ph,useLayoutEffect:Gh,useMemo:Qh,useReducer:lc,useRef:Vh,useState:function(){return lc($n)},useDebugValue:rd,useDeferredValue:function(e,t){var a=Ot();return Ih(a,ut.memoizedState,e,t)},useTransition:function(){var e=lc($n)[0],t=Ot().memoizedState;return[typeof e=="boolean"?e:wi(e),t]},useSyncExternalStore:Eh,useId:em,useHostTransitionStatus:cd,useFormState:Hh,useActionState:Hh,useOptimistic:function(e,t){var a=Ot();return Dh(a,ut,e,t)},useMemoCache:ed,useCacheRefresh:tm};dd.useEffectEvent=$h;var rm={readContext:aa,use:nc,useCallback:Wh,useContext:aa,useEffect:sd,useImperativeHandle:Zh,useInsertionEffect:Ph,useLayoutEffect:Gh,useMemo:Qh,useReducer:ad,useRef:Vh,useState:function(){return ad($n)},useDebugValue:rd,useDeferredValue:function(e,t){var a=Ot();return ut===null?id(a,e,t):Ih(a,ut.memoizedState,e,t)},useTransition:function(){var e=ad($n)[0],t=Ot().memoizedState;return[typeof e=="boolean"?e:wi(e),t]},useSyncExternalStore:Eh,useId:em,useHostTransitionStatus:cd,useFormState:Bh,useActionState:Bh,useOptimistic:function(e,t){var a=Ot();return ut!==null?Dh(a,ut,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:ed,useCacheRefresh:tm};rm.useEffectEvent=$h;function fd(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:T({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var hd={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=_a(),u=wl(n);u.payload=t,a!=null&&(u.callback=a),t=El(e,u,n),t!==null&&(Ea(t,e,n),bi(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=_a(),u=wl(n);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=El(e,u,n),t!==null&&(Ea(t,e,n),bi(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=_a(),n=wl(a);n.tag=2,t!=null&&(n.callback=t),t=El(e,n,a),t!==null&&(Ea(t,e,a),bi(t,e,a))}};function im(e,t,a,n,u,d,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,d,p):t.prototype&&t.prototype.isPureReactComponent?!vs(a,n)||!vs(u,d):!0}function um(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&hd.enqueueReplaceState(t,t.state,null)}function Ds(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=T({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}function cm(e){bl(e)}function om(e){console.error(e)}function dm(e){bl(e)}function uc(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function fm(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function md(e,t,a){return a=wl(a),a.tag=3,a.payload={element:null},a.callback=function(){uc(e,t)},a}function hm(e){return e=wl(e),e.tag=3,e}function mm(e,t,a,n){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var d=n.value;e.payload=function(){return u(d)},e.callback=function(){fm(t,a,n)}}var p=a.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){fm(t,a,n),typeof u!="function"&&(Dl===null?Dl=new Set([this]):Dl.add(this));var E=n.stack;this.componentDidCatch(n.value,{componentStack:E!==null?E:""})})}function Wp(e,t,a,n,u){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Wa(t,a,u,!0),a=Ra.current,a!==null){switch(a.tag){case 31:case 13:return Qa===null?bc():a.alternate===null&&wt===0&&(wt=3),a.flags&=-257,a.flags|=65536,a.lanes=u,n===Qu?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),qd(e,n,u)),!1;case 22:return a.flags|=65536,n===Qu?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),qd(e,n,u)),!1}throw Error(c(435,a.tag))}return qd(e,n,u),bc(),!1}if(V)return t=Ra.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,n!==Ue&&(e=Error(c(422),{cause:n}),cn(va(e,a)))):(n!==Ue&&(t=Error(c(423),{cause:n}),cn(va(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,n=va(n,a),u=md(e.stateNode,n,u),Po(e,u),wt!==4&&(wt=2)),!1;var d=Error(c(520),{cause:n});if(d=va(d,a),_i===null?_i=[d]:_i.push(d),wt!==4&&(wt=2),t===null)return!0;n=va(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=md(a.stateNode,n,e),Po(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"&&(Dl===null||!Dl.has(d))))return a.flags|=65536,u&=-u,a.lanes|=u,u=hm(u),mm(u,e,a,n),Po(a,u),!1}a=a.return}while(a!==null);return!1}var gd=Error(c(461)),Lt=!1;function na(e,t,a,n){t.child=e===null?yh(t,null,a,n):Os(t,e.child,a,n)}function gm(e,t,a,n,u){a=a.render;var d=t.ref;if("ref"in n){var p={};for(var E in n)E!=="ref"&&(p[E]=n[E])}else p=n;return Es(t),n=Io(e,t,a,p,d,u),E=Xo(),e!==null&&!Lt?(Jo(e,t,u),Pn(e,t,u)):(V&&E&&y(t),t.flags|=1,na(e,t,n,u),t.child)}function xm(e,t,a,n,u){if(e===null){var d=a.type;return typeof d=="function"&&!or(d)&&d.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=d,pm(e,t,d,n,u)):(e=dr(a.type,null,n,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!jd(e,u)){var p=d.memoizedProps;if(a=a.compare,a=a!==null?a:vs,a(p,n)&&e.ref===t.ref)return Pn(e,t,u)}return t.flags|=1,e=Pa(d,n),e.ref=t.ref,e.return=t,t.child=e}function pm(e,t,a,n,u){if(e!==null){var d=e.memoizedProps;if(vs(d,n)&&e.ref===t.ref)if(Lt=!1,t.pendingProps=n=d,jd(e,u))(e.flags&131072)!==0&&(Lt=!0);else return t.lanes=e.lanes,Pn(e,t,u)}return xd(e,t,a,n,u)}function ym(e,t,a,n){var u=n.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(n=t.child=e.child,u=0;n!==null;)u=u|n.lanes|n.childLanes,n=n.sibling;n=u&~d}else n=0,t.child=null;return vm(e,t,d,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Zu(t,d!==null?d.cachePool:null),d!==null?Nh(t,d):Fo(),Sh(t);else return n=t.lanes=536870912,vm(e,t,d!==null?d.baseLanes|a:a,a,n)}else d!==null?(Zu(t,d.cachePool),Nh(t,d),Ml(),t.memoizedState=null):(e!==null&&Zu(t,null),Fo(),Ml());return na(e,t,u,a),t.child}function Mi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function vm(e,t,a,n,u){var d=Bo();return d=d===null?null:{parent:zt._currentValue,pool:d},t.memoizedState={baseLanes:a,cachePool:d},e!==null&&Zu(t,null),Fo(),Sh(t),e!==null&&Wa(e,t,n,!0),t.childLanes=u,null}function cc(e,t){return t=dc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function bm(e,t,a){return Os(t,e.child,null,a),e=cc(t,t.pendingProps),e.flags|=2,Da(t),t.memoizedState=null,e}function Qp(e,t,a){var n=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(V){if(n.mode==="hidden")return e=cc(t,n),t.lanes=536870912,Mi(null,e);if(Wo(t),(e=H)?(e=A0(e,ye),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ba!==null?{id:Fa,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Gu(e),a.return=t,t.child=a,L=t,H=null)):e=null,e===null)throw Qe(t);return t.lanes=536870912,null}return cc(t,n)}var d=e.memoizedState;if(d!==null){var p=d.dehydrated;if(Wo(t),u)if(t.flags&256)t.flags&=-257,t=bm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(Lt||Wa(e,t,a,!1),u=(a&e.childLanes)!==0,Lt||u){if(n=dt,n!==null&&(p=Fr(n,a),p!==0&&p!==d.retryLane))throw d.retryLane=p,$a(e,p),Ea(n,e,p),gd;bc(),t=bm(e,t,a)}else e=d.treeContext,H=Ia(p.nextSibling),L=t,V=!0,fe=null,ye=!1,e!==null&&R(t,e),t=cc(t,n),t.flags|=4096;return t}return e=Pa(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function oc(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(c(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function xd(e,t,a,n,u){return Es(t),a=Io(e,t,a,n,void 0,u),n=Xo(),e!==null&&!Lt?(Jo(e,t,u),Pn(e,t,u)):(V&&n&&y(t),t.flags|=1,na(e,t,a,u),t.child)}function Nm(e,t,a,n,u,d){return Es(t),t.updateQueue=null,a=wh(t,n,a,u),jh(e),n=Xo(),e!==null&&!Lt?(Jo(e,t,d),Pn(e,t,d)):(V&&n&&y(t),t.flags|=1,na(e,t,a,d),t.child)}function Sm(e,t,a,n,u){if(Es(t),t.stateNode===null){var d=Oa,p=a.contextType;typeof p=="object"&&p!==null&&(d=aa(p)),d=new a(n,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=hd,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=n,d.state=t.memoizedState,d.refs={},Yo(t),p=a.contextType,d.context=typeof p=="object"&&p!==null?aa(p):Oa,d.state=t.memoizedState,p=a.getDerivedStateFromProps,typeof p=="function"&&(fd(t,a,p,n),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&&hd.enqueueReplaceState(d,d.state,null),Si(t,n,d,u),Ni(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){d=t.stateNode;var E=t.memoizedProps,z=Ds(a,E);d.props=z;var Q=d.context,re=a.contextType;p=Oa,typeof re=="object"&&re!==null&&(p=aa(re));var de=a.getDerivedStateFromProps;re=typeof de=="function"||typeof d.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,re||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(E||Q!==p)&&um(t,d,n,p),jl=!1;var X=t.memoizedState;d.state=X,Si(t,n,d,u),Ni(),Q=t.memoizedState,E||X!==Q||jl?(typeof de=="function"&&(fd(t,a,de,n),Q=t.memoizedState),(z=jl||im(t,a,z,n,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=n,t.memoizedState=Q),d.props=n,d.state=Q,d.context=p,n=z):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{d=t.stateNode,$o(e,t),p=t.memoizedProps,re=Ds(a,p),d.props=re,de=t.pendingProps,X=d.context,Q=a.contextType,z=Oa,typeof Q=="object"&&Q!==null&&(z=aa(Q)),E=a.getDerivedStateFromProps,(Q=typeof E=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(p!==de||X!==z)&&um(t,d,n,z),jl=!1,X=t.memoizedState,d.state=X,Si(t,n,d,u),Ni();var ae=t.memoizedState;p!==de||X!==ae||jl||e!==null&&e.dependencies!==null&&hr(e.dependencies)?(typeof E=="function"&&(fd(t,a,E,n),ae=t.memoizedState),(re=jl||im(t,a,re,n,X,ae,z)||e!==null&&e.dependencies!==null&&hr(e.dependencies))?(Q||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(n,ae,z),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(n,ae,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=n,t.memoizedState=ae),d.props=n,d.state=ae,d.context=z,n=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),n=!1)}return d=n,oc(e,t),n=(t.flags&128)!==0,d||n?(d=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&n?(t.child=Os(t,e.child,null,u),t.child=Os(t,null,a,u)):na(e,t,a,u),t.memoizedState=d.state,e=t.child):e=Pn(e,t,u),e}function jm(e,t,a,n){return Zt(),t.flags|=256,na(e,t,a,n),t.child}var pd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yd(e){return{baseLanes:e,cachePool:fh()}}function vd(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=ka),e}function wm(e,t,a){var n=t.pendingProps,u=!1,d=(t.flags&128)!==0,p;if((p=d)||(p=e!==null&&e.memoizedState===null?!1:(Ct.current&2)!==0),p&&(u=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(V){if(u?Tl(t):Ml(),(e=H)?(e=A0(e,ye),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ba!==null?{id:Fa,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Gu(e),a.return=t,t.child=a,L=t,H=null)):e=null,e===null)throw Qe(t);return tf(e)?t.lanes=32:t.lanes=536870912,null}var E=n.children;return n=n.fallback,u?(Ml(),u=t.mode,E=dc({mode:"hidden",children:E},u),n=Ga(n,u,a,null),E.return=t,n.return=t,E.sibling=n,t.child=E,n=t.child,n.memoizedState=yd(a),n.childLanes=vd(e,p,a),t.memoizedState=pd,Mi(null,n)):(Tl(t),bd(t,E))}var z=e.memoizedState;if(z!==null&&(E=z.dehydrated,E!==null)){if(d)t.flags&256?(Tl(t),t.flags&=-257,t=Nd(e,t,a)):t.memoizedState!==null?(Ml(),t.child=e.child,t.flags|=128,t=null):(Ml(),E=n.fallback,u=t.mode,n=dc({mode:"visible",children:n.children},u),E=Ga(E,u,a,null),E.flags|=2,n.return=t,E.return=t,n.sibling=E,t.child=n,Os(t,e.child,null,a),n=t.child,n.memoizedState=yd(a),n.childLanes=vd(e,p,a),t.memoizedState=pd,t=Mi(null,n));else if(Tl(t),tf(E)){if(p=E.nextSibling&&E.nextSibling.dataset,p)var Q=p.dgst;p=Q,n=Error(c(419)),n.stack="",n.digest=p,cn({value:n,source:null,stack:null}),t=Nd(e,t,a)}else if(Lt||Wa(e,t,a,!1),p=(a&e.childLanes)!==0,Lt||p){if(p=dt,p!==null&&(n=Fr(p,a),n!==0&&n!==z.retryLane))throw z.retryLane=n,$a(e,n),Ea(p,e,n),gd;ef(E)||bc(),t=Nd(e,t,a)}else ef(E)?(t.flags|=192,t.child=e.child,t=null):(e=z.treeContext,H=Ia(E.nextSibling),L=t,V=!0,fe=null,ye=!1,e!==null&&R(t,e),t=bd(t,n.children),t.flags|=4096);return t}return u?(Ml(),E=n.fallback,u=t.mode,z=e.child,Q=z.sibling,n=Pa(z,{mode:"hidden",children:n.children}),n.subtreeFlags=z.subtreeFlags&65011712,Q!==null?E=Pa(Q,E):(E=Ga(E,u,a,null),E.flags|=2),E.return=t,n.return=t,n.sibling=E,t.child=n,Mi(null,n),n=t.child,E=e.child.memoizedState,E===null?E=yd(a):(u=E.cachePool,u!==null?(z=zt._currentValue,u=u.parent!==z?{parent:z,pool:z}:u):u=fh(),E={baseLanes:E.baseLanes|a,cachePool:u}),n.memoizedState=E,n.childLanes=vd(e,p,a),t.memoizedState=pd,Mi(e.child,n)):(Tl(t),a=e.child,e=a.sibling,a=Pa(a,{mode:"visible",children:n.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 bd(e,t){return t=dc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function dc(e,t){return e=ta(22,e,null,t),e.lanes=0,e}function Nd(e,t,a){return Os(t,e.child,null,a),e=bd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Em(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),gi(e.return,t,a)}function Sd(e,t,a,n,u,d){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:u,treeForkCount:d}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=n,p.tail=a,p.tailMode=u,p.treeForkCount=d)}function Tm(e,t,a){var n=t.pendingProps,u=n.revealOrder,d=n.tail;n=n.children;var p=Ct.current,E=(p&2)!==0;if(E?(p=p&1|2,t.flags|=128):p&=1,ge(Ct,p),na(e,t,n,a),n=V?un:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Em(e,a,t);else if(e.tag===19)Em(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(u){case"forwards":for(a=t.child,u=null;a!==null;)e=a.alternate,e!==null&&Ku(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=t.child,t.child=null):(u=a.sibling,a.sibling=null),Sd(t,!1,u,a,d,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&Ku(e)===null){t.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}Sd(t,!0,a,null,d,n);break;case"together":Sd(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Pn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Rl|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Wa(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,a=Pa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Pa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function jd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&hr(e)))}function Ip(e,t,a){switch(t.tag){case 3:mt(t,t.stateNode.containerInfo),Tn(t,zt,e.memoizedState.cache),Zt();break;case 27:case 5:Xt(t);break;case 4:mt(t,t.stateNode.containerInfo);break;case 10:Tn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Wo(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Tl(t),t.flags|=128,null):(a&t.child.childLanes)!==0?wm(e,t,a):(Tl(t),e=Pn(e,t,a),e!==null?e.sibling:null);Tl(t);break;case 19:var u=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Wa(e,t,a,!1),n=(a&t.childLanes)!==0),u){if(n)return Tm(e,t,a);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),ge(Ct,Ct.current),n)break;return null;case 22:return t.lanes=0,ym(e,t,a,t.pendingProps);case 24:Tn(t,zt,e.memoizedState.cache)}return Pn(e,t,a)}function Mm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Lt=!0;else{if(!jd(e,a)&&(t.flags&128)===0)return Lt=!1,Ip(e,t,a);Lt=(e.flags&131072)!==0}else Lt=!1,V&&(t.flags&1048576)!==0&&h(t,un,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Ms(t.elementType),t.type=e,typeof e=="function")or(e)?(n=Ds(e,n),t.tag=1,t=Sm(null,t,e,n,a)):(t.tag=0,t=xd(null,t,e,n,a));else{if(e!=null){var u=e.$$typeof;if(u===K){t.tag=11,t=gm(null,t,e,n,a);break e}else if(u===F){t.tag=14,t=xm(null,t,e,n,a);break e}}throw t=ee(e)||e,Error(c(306,t,""))}}return t;case 0:return xd(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,u=Ds(n,t.pendingProps),Sm(e,t,n,u,a);case 3:e:{if(mt(t,t.stateNode.containerInfo),e===null)throw Error(c(387));n=t.pendingProps;var d=t.memoizedState;u=d.element,$o(e,t),Si(t,n,null,a);var p=t.memoizedState;if(n=p.cache,Tn(t,zt,n),n!==d.cache&&Vn(t,[zt],a,!0),Ni(),n=p.element,d.isDehydrated)if(d={element:n,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=jm(e,t,n,a);break e}else if(n!==u){u=va(Error(c(424)),t),cn(u),t=jm(e,t,n,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(H=Ia(e.firstChild),L=t,V=!0,fe=null,ye=!0,a=yh(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Zt(),n===u){t=Pn(e,t,a);break e}na(e,t,n,a)}t=t.child}return t;case 26:return oc(e,t),e===null?(a=H0(t.type,null,t.pendingProps,null))?t.memoizedState=a:V||(a=t.type,e=t.pendingProps,n=Mc(we.current).createElement(a),n[Et]=t,n[Yt]=e,la(n,a,e),_t(n),t.stateNode=n):t.memoizedState=H0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Xt(t),e===null&&V&&(n=t.stateNode=z0(t.type,t.pendingProps,we.current),L=t,ye=!0,u=H,zl(t.type)?(af=u,H=Ia(n.firstChild)):H=u),na(e,t,t.pendingProps.children,a),oc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&V&&((u=n=H)&&(n=Ty(n,t.type,t.pendingProps,ye),n!==null?(t.stateNode=n,L=t,H=Ia(n.firstChild),ye=!1,u=!0):u=!1),u||Qe(t)),Xt(t),u=t.type,d=t.pendingProps,p=e!==null?e.memoizedProps:null,n=d.children,Xd(u,d)?n=null:p!==null&&Xd(u,p)&&(t.flags|=32),t.memoizedState!==null&&(u=Io(e,t,Vp,null,null,a),Yi._currentValue=u),oc(e,t),na(e,t,n,a),t.child;case 6:return e===null&&V&&((e=a=H)&&(a=My(a,t.pendingProps,ye),a!==null?(t.stateNode=a,L=t,H=null,e=!0):e=!1),e||Qe(t)),null;case 13:return wm(e,t,a);case 4:return mt(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Os(t,null,n,a):na(e,t,n,a),t.child;case 11:return gm(e,t,t.type,t.pendingProps,a);case 7:return na(e,t,t.pendingProps,a),t.child;case 8:return na(e,t,t.pendingProps.children,a),t.child;case 12:return na(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,Tn(t,t.type,n.value),na(e,t,n.children,a),t.child;case 9:return u=t.type._context,n=t.pendingProps.children,Es(t),u=aa(u),n=n(u),t.flags|=1,na(e,t,n,a),t.child;case 14:return xm(e,t,t.type,t.pendingProps,a);case 15:return pm(e,t,t.type,t.pendingProps,a);case 19:return Tm(e,t,a);case 31:return Qp(e,t,a);case 22:return ym(e,t,a,t.pendingProps);case 24:return Es(t),n=aa(zt),e===null?(u=Bo(),u===null&&(u=dt,d=Ho(),u.pooledCache=d,d.refCount++,d!==null&&(u.pooledCacheLanes|=a),u=d),t.memoizedState={parent:n,cache:u},Yo(t),Tn(t,zt,u)):((e.lanes&a)!==0&&($o(e,t),Si(t,null,null,a),Ni()),u=e.memoizedState,d=t.memoizedState,u.parent!==n?(u={parent:n,cache:n},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),Tn(t,zt,n)):(n=d.cache,Tn(t,zt,n),n!==u.cache&&Vn(t,[zt],a,!0))),na(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function Gn(e){e.flags|=4}function wd(e,t,a,n,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(e0())e.flags|=8192;else throw Cs=Qu,Vo}else e.flags&=-16777217}function Cm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!$0(t))if(e0())e.flags|=8192;else throw Cs=Qu,Vo}function fc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Gr():536870912,e.lanes|=t,Er|=t)}function Ci(e,t){if(!V)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function yt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,n|=u.subtreeFlags&65011712,n|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,n|=u.subtreeFlags,n|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function Xp(e,t,a){var n=t.pendingProps;switch(w(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(t),null;case 1:return yt(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),on(zt),Pe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ft(t)?Gn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,En())),yt(t),null;case 26:var u=t.type,d=t.memoizedState;return e===null?(Gn(t),d!==null?(yt(t),Cm(t,d)):(yt(t),wd(t,u,null,n,a))):d?d!==e.memoizedState?(Gn(t),yt(t),Cm(t,d)):(yt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Gn(t),yt(t),wd(t,u,e,n,a)),null;case 27:if(Ha(t),a=we.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Gn(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return yt(t),null}e=pe.current,Ft(t)?De(t):(e=z0(u,n,a),t.stateNode=e,Gn(t))}return yt(t),null;case 5:if(Ha(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Gn(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return yt(t),null}if(d=pe.current,Ft(t))De(t);else{var p=Mc(we.current);switch(d){case 1:d=p.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:d=p.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":d=p.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":d=p.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":d=p.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof n.is=="string"?p.createElement("select",{is:n.is}):p.createElement("select"),n.multiple?d.multiple=!0:n.size&&(d.size=n.size);break;default:d=typeof n.is=="string"?p.createElement(u,{is:n.is}):p.createElement(u)}}d[Et]=t,d[Yt]=n;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(la(d,u,n),u){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Gn(t)}}return yt(t),wd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Gn(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(c(166));if(e=we.current,Ft(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,u=L,u!==null)switch(u.tag){case 27:case 5:n=u.memoizedProps}e[Et]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||w0(e.nodeValue,a)),e||Qe(t,!0)}else e=Mc(e).createTextNode(n),e[Et]=t,t.stateNode=e}return yt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Ft(t),a!==null){if(e===null){if(!n)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[Et]=t}else Zt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;yt(t),e=!1}else a=En(),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(c(558))}return yt(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Ft(t),n!==null&&n.dehydrated!==null){if(e===null){if(!u)throw Error(c(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(c(317));u[Et]=t}else Zt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;yt(t),u=!1}else u=En(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Da(t),t):(Da(t),null)}return Da(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,u=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(u=n.alternate.memoizedState.cachePool.pool),d=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(d=n.memoizedState.cachePool.pool),d!==u&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),fc(t,t.updateQueue),yt(t),null);case 4:return Pe(),e===null&&Fd(t.stateNode.containerInfo),yt(t),null;case 10:return on(t.type),yt(t),null;case 19:if(se(Ct),n=t.memoizedState,n===null)return yt(t),null;if(u=(t.flags&128)!==0,d=n.rendering,d===null)if(u)Ci(n,!1);else{if(wt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=Ku(e),d!==null){for(t.flags|=128,Ci(n,!1),e=d.updateQueue,t.updateQueue=e,fc(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Pu(a,e),a=a.sibling;return ge(Ct,Ct.current&1|2),V&&i(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&it()>pc&&(t.flags|=128,u=!0,Ci(n,!1),t.lanes=4194304)}else{if(!u)if(e=Ku(d),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,fc(t,e),Ci(n,!0),n.tail===null&&n.tailMode==="hidden"&&!d.alternate&&!V)return yt(t),null}else 2*it()-n.renderingStartTime>pc&&a!==536870912&&(t.flags|=128,u=!0,Ci(n,!1),t.lanes=4194304);n.isBackwards?(d.sibling=t.child,t.child=d):(e=n.last,e!==null?e.sibling=d:t.child=d,n.last=d)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=it(),e.sibling=null,a=Ct.current,ge(Ct,u?a&1|2:a&1),V&&i(t,n.treeForkCount),e):(yt(t),null);case 22:case 23:return Da(t),Zo(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),a=t.updateQueue,a!==null&&fc(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&se(Ts),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),on(zt),yt(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Jp(e,t){switch(w(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return on(zt),Pe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ha(t),null;case 31:if(t.memoizedState!==null){if(Da(t),t.alternate===null)throw Error(c(340));Zt()}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(c(340));Zt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(Ct),null;case 4:return Pe(),null;case 10:return on(t.type),null;case 22:case 23:return Da(t),Zo(),e!==null&&se(Ts),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return on(zt),null;case 25:return null;default:return null}}function Om(e,t){switch(w(t),t.tag){case 3:on(zt),Pe();break;case 26:case 27:case 5:Ha(t);break;case 4:Pe();break;case 31:t.memoizedState!==null&&Da(t);break;case 13:Da(t);break;case 19:se(Ct);break;case 10:on(t.type);break;case 22:case 23:Da(t),Zo(),e!==null&&se(Ts);break;case 24:on(zt)}}function Oi(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){n=void 0;var d=a.create,p=a.inst;n=d(),p.destroy=n}a=a.next}while(a!==u)}}catch(E){st(t,t.return,E)}}function Cl(e,t,a){try{var n=t.updateQueue,u=n!==null?n.lastEffect:null;if(u!==null){var d=u.next;n=d;do{if((n.tag&e)===e){var p=n.inst,E=p.destroy;if(E!==void 0){p.destroy=void 0,u=t;var z=a,Q=E;try{Q()}catch(re){st(u,z,re)}}}n=n.next}while(n!==d)}}catch(re){st(t,t.return,re)}}function Rm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{bh(t,a)}catch(n){st(e,e.return,n)}}}function Dm(e,t,a){a.props=Ds(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){st(e,t,n)}}function Ri(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(u){st(e,t,u)}}function Mn(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(u){st(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){st(e,t,u)}else a.current=null}function Am(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(u){st(e,e.return,u)}}function Ed(e,t,a){try{var n=e.stateNode;by(n,e.type,a,t),n[Yt]=t}catch(u){st(e,e.return,u)}}function km(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&zl(e.type)||e.tag===4}function Td(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||km(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&&zl(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 Md(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Ba));else if(n!==4&&(n===27&&zl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Md(e,t,a),e=e.sibling;e!==null;)Md(e,t,a),e=e.sibling}function hc(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&zl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(hc(e,t,a),e=e.sibling;e!==null;)hc(e,t,a),e=e.sibling}function _m(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);la(t,n,a),t[Et]=e,t[Yt]=a}catch(d){st(e,e.return,d)}}var Fn=!1,Ht=!1,Cd=!1,zm=typeof WeakSet=="function"?WeakSet:Set,Wt=null;function Kp(e,t){if(e=e.containerInfo,Qd=_c,e=zo(e),lr(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var u=n.anchorOffset,d=n.focusNode;n=n.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var p=0,E=-1,z=-1,Q=0,re=0,de=e,X=null;t:for(;;){for(var ae;de!==a||u!==0&&de.nodeType!==3||(E=p+u),de!==d||n!==0&&de.nodeType!==3||(z=p+n),de.nodeType===3&&(p+=de.nodeValue.length),(ae=de.firstChild)!==null;)X=de,de=ae;for(;;){if(de===e)break t;if(X===a&&++Q===u&&(E=p),X===d&&++re===n&&(z=p),(ae=de.nextSibling)!==null)break;de=X,X=de.parentNode}de=ae}a=E===-1||z===-1?null:{start:E,end:z}}else a=null}a=a||{start:0,end:0}}else a=null;for(Id={focusedElem:e,selectionRange:a},_c=!1,Wt=t;Wt!==null;)if(t=Wt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Wt=e;else for(;Wt!==null;){switch(t=Wt,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++)u=e[a],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=t,u=d.memoizedProps,d=d.memoizedState,n=a.stateNode;try{var ve=Ds(a.type,u);e=n.getSnapshotBeforeUpdate(ve,d),n.__reactInternalSnapshotBeforeUpdate=e}catch(Ae){st(a,a.return,Ae)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Kd(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Kd(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(c(163))}if(e=t.sibling,e!==null){e.return=t.return,Wt=e;break}Wt=t.return}}function Um(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Wn(e,a),n&4&&Oi(5,a);break;case 1:if(Wn(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(p){st(a,a.return,p)}else{var u=Ds(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){st(a,a.return,p)}}n&64&&Rm(a),n&512&&Ri(a,a.return);break;case 3:if(Wn(e,a),n&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{bh(e,t)}catch(p){st(a,a.return,p)}}break;case 27:t===null&&n&4&&_m(a);case 26:case 5:Wn(e,a),t===null&&n&4&&Am(a),n&512&&Ri(a,a.return);break;case 12:Wn(e,a);break;case 31:Wn(e,a),n&4&&qm(e,a);break;case 13:Wn(e,a),n&4&&Bm(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=uy.bind(null,a),Cy(e,a))));break;case 22:if(n=a.memoizedState!==null||Fn,!n){t=t!==null&&t.memoizedState!==null||Ht,u=Fn;var d=Ht;Fn=n,(Ht=t)&&!d?Qn(e,a,(a.subtreeFlags&8772)!==0):Wn(e,a),Fn=u,Ht=d}break;case 30:break;default:Wn(e,a)}}function Lm(e){var t=e.alternate;t!==null&&(e.alternate=null,Lm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Zs(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 vt=null,Na=!1;function Zn(e,t,a){for(a=a.child;a!==null;)Hm(e,t,a),a=a.sibling}function Hm(e,t,a){if(Vt&&typeof Vt.onCommitFiberUnmount=="function")try{Vt.onCommitFiberUnmount(xt,a)}catch{}switch(a.tag){case 26:Ht||Mn(a,t),Zn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ht||Mn(a,t);var n=vt,u=Na;zl(a.type)&&(vt=a.stateNode,Na=!1),Zn(e,t,a),qi(a.stateNode),vt=n,Na=u;break;case 5:Ht||Mn(a,t);case 6:if(n=vt,u=Na,vt=null,Zn(e,t,a),vt=n,Na=u,vt!==null)if(Na)try{(vt.nodeType===9?vt.body:vt.nodeName==="HTML"?vt.ownerDocument.body:vt).removeChild(a.stateNode)}catch(d){st(a,t,d)}else try{vt.removeChild(a.stateNode)}catch(d){st(a,t,d)}break;case 18:vt!==null&&(Na?(e=vt,R0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),kr(e)):R0(vt,a.stateNode));break;case 4:n=vt,u=Na,vt=a.stateNode.containerInfo,Na=!0,Zn(e,t,a),vt=n,Na=u;break;case 0:case 11:case 14:case 15:Cl(2,a,t),Ht||Cl(4,a,t),Zn(e,t,a);break;case 1:Ht||(Mn(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&Dm(a,t,n)),Zn(e,t,a);break;case 21:Zn(e,t,a);break;case 22:Ht=(n=Ht)||a.memoizedState!==null,Zn(e,t,a),Ht=n;break;default:Zn(e,t,a)}}function qm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{kr(e)}catch(a){st(t,t.return,a)}}}function Bm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{kr(e)}catch(a){st(t,t.return,a)}}function ey(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new zm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new zm),t;default:throw Error(c(435,e.tag))}}function mc(e,t){var a=ey(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var u=cy.bind(null,e,n);n.then(u,u)}})}function Sa(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var u=a[n],d=e,p=t,E=p;e:for(;E!==null;){switch(E.tag){case 27:if(zl(E.type)){vt=E.stateNode,Na=!1;break e}break;case 5:vt=E.stateNode,Na=!1;break e;case 3:case 4:vt=E.stateNode.containerInfo,Na=!0;break e}E=E.return}if(vt===null)throw Error(c(160));Hm(d,p,u),vt=null,Na=!1,d=u.alternate,d!==null&&(d.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Vm(t,e),t=t.sibling}var dn=null;function Vm(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Sa(t,e),ja(e),n&4&&(Cl(3,e,e.return),Oi(3,e),Cl(5,e,e.return));break;case 1:Sa(t,e),ja(e),n&512&&(Ht||a===null||Mn(a,a.return)),n&64&&Fn&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var u=dn;if(Sa(t,e),ja(e),n&512&&(Ht||a===null||Mn(a,a.return)),n&4){var d=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,u=u.ownerDocument||u;t:switch(n){case"title":d=u.getElementsByTagName("title")[0],(!d||d[es]||d[Et]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=u.createElement(n),u.head.insertBefore(d,u.querySelector("head > title"))),la(d,n,a),d[Et]=e,_t(d),n=d;break e;case"link":var p=V0("link","href",u).get(n+(a.href||""));if(p){for(var E=0;E<p.length;E++)if(d=p[E],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){p.splice(E,1);break t}}d=u.createElement(n),la(d,n,a),u.head.appendChild(d);break;case"meta":if(p=V0("meta","content",u).get(n+(a.content||""))){for(E=0;E<p.length;E++)if(d=p[E],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){p.splice(E,1);break t}}d=u.createElement(n),la(d,n,a),u.head.appendChild(d);break;default:throw Error(c(468,n))}d[Et]=e,_t(d),n=d}e.stateNode=n}else Y0(u,e.type,e.stateNode);else e.stateNode=B0(u,n,e.memoizedProps);else d!==n?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,n===null?Y0(u,e.type,e.stateNode):B0(u,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Ed(e,e.memoizedProps,a.memoizedProps)}break;case 27:Sa(t,e),ja(e),n&512&&(Ht||a===null||Mn(a,a.return)),a!==null&&n&4&&Ed(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Sa(t,e),ja(e),n&512&&(Ht||a===null||Mn(a,a.return)),e.flags&32){u=e.stateNode;try{nn(u,"")}catch(ve){st(e,e.return,ve)}}n&4&&e.stateNode!=null&&(u=e.memoizedProps,Ed(e,u,a!==null?a.memoizedProps:u)),n&1024&&(Cd=!0);break;case 6:if(Sa(t,e),ja(e),n&4){if(e.stateNode===null)throw Error(c(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(ve){st(e,e.return,ve)}}break;case 3:if(Rc=null,u=dn,dn=Cc(t.containerInfo),Sa(t,e),dn=u,ja(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{kr(t.containerInfo)}catch(ve){st(e,e.return,ve)}Cd&&(Cd=!1,Ym(e));break;case 4:n=dn,dn=Cc(e.stateNode.containerInfo),Sa(t,e),ja(e),dn=n;break;case 12:Sa(t,e),ja(e);break;case 31:Sa(t,e),ja(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,mc(e,n)));break;case 13:Sa(t,e),ja(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(xc=it()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,mc(e,n)));break;case 22:u=e.memoizedState!==null;var z=a!==null&&a.memoizedState!==null,Q=Fn,re=Ht;if(Fn=Q||u,Ht=re||z,Sa(t,e),Ht=re,Fn=Q,ja(e),n&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(a===null||z||Fn||Ht||As(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){z=a=t;try{if(d=z.stateNode,u)p=d.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{E=z.stateNode;var de=z.memoizedProps.style,X=de!=null&&de.hasOwnProperty("display")?de.display:null;E.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(ve){st(z,z.return,ve)}}}else if(t.tag===6){if(a===null){z=t;try{z.stateNode.nodeValue=u?"":z.memoizedProps}catch(ve){st(z,z.return,ve)}}}else if(t.tag===18){if(a===null){z=t;try{var ae=z.stateNode;u?D0(ae,!0):D0(z.stateNode,!1)}catch(ve){st(z,z.return,ve)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,mc(e,a))));break;case 19:Sa(t,e),ja(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,mc(e,n)));break;case 30:break;case 21:break;default:Sa(t,e),ja(e)}}function ja(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(km(n)){a=n;break}n=n.return}if(a==null)throw Error(c(160));switch(a.tag){case 27:var u=a.stateNode,d=Td(e);hc(e,d,u);break;case 5:var p=a.stateNode;a.flags&32&&(nn(p,""),a.flags&=-33);var E=Td(e);hc(e,E,p);break;case 3:case 4:var z=a.stateNode.containerInfo,Q=Td(e);Md(e,Q,z);break;default:throw Error(c(161))}}catch(re){st(e,e.return,re)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ym(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ym(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Um(e,t.alternate,t),t=t.sibling}function As(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Cl(4,t,t.return),As(t);break;case 1:Mn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Dm(t,t.return,a),As(t);break;case 27:qi(t.stateNode);case 26:case 5:Mn(t,t.return),As(t);break;case 22:t.memoizedState===null&&As(t);break;case 30:As(t);break;default:As(t)}e=e.sibling}}function Qn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,u=e,d=t,p=d.flags;switch(d.tag){case 0:case 11:case 15:Qn(u,d,a),Oi(4,d);break;case 1:if(Qn(u,d,a),n=d,u=n.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(Q){st(n,n.return,Q)}if(n=d,u=n.updateQueue,u!==null){var E=n.stateNode;try{var z=u.shared.hiddenCallbacks;if(z!==null)for(u.shared.hiddenCallbacks=null,u=0;u<z.length;u++)vh(z[u],E)}catch(Q){st(n,n.return,Q)}}a&&p&64&&Rm(d),Ri(d,d.return);break;case 27:_m(d);case 26:case 5:Qn(u,d,a),a&&n===null&&p&4&&Am(d),Ri(d,d.return);break;case 12:Qn(u,d,a);break;case 31:Qn(u,d,a),a&&p&4&&qm(u,d);break;case 13:Qn(u,d,a),a&&p&4&&Bm(u,d);break;case 22:d.memoizedState===null&&Qn(u,d,a),Ri(d,d.return);break;case 30:break;default:Qn(u,d,a)}t=t.sibling}}function Od(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&&xi(a))}function Rd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xi(e))}function fn(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)$m(e,t,a,n),t=t.sibling}function $m(e,t,a,n){var u=t.flags;switch(t.tag){case 0:case 11:case 15:fn(e,t,a,n),u&2048&&Oi(9,t);break;case 1:fn(e,t,a,n);break;case 3:fn(e,t,a,n),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&xi(e)));break;case 12:if(u&2048){fn(e,t,a,n),e=t.stateNode;try{var d=t.memoizedProps,p=d.id,E=d.onPostCommit;typeof E=="function"&&E(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(z){st(t,t.return,z)}}else fn(e,t,a,n);break;case 31:fn(e,t,a,n);break;case 13:fn(e,t,a,n);break;case 23:break;case 22:d=t.stateNode,p=t.alternate,t.memoizedState!==null?d._visibility&2?fn(e,t,a,n):Di(e,t):d._visibility&2?fn(e,t,a,n):(d._visibility|=2,Sr(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Od(p,t);break;case 24:fn(e,t,a,n),u&2048&&Rd(t.alternate,t);break;default:fn(e,t,a,n)}}function Sr(e,t,a,n,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,p=t,E=a,z=n,Q=p.flags;switch(p.tag){case 0:case 11:case 15:Sr(d,p,E,z,u),Oi(8,p);break;case 23:break;case 22:var re=p.stateNode;p.memoizedState!==null?re._visibility&2?Sr(d,p,E,z,u):Di(d,p):(re._visibility|=2,Sr(d,p,E,z,u)),u&&Q&2048&&Od(p.alternate,p);break;case 24:Sr(d,p,E,z,u),u&&Q&2048&&Rd(p.alternate,p);break;default:Sr(d,p,E,z,u)}t=t.sibling}}function Di(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,u=n.flags;switch(n.tag){case 22:Di(a,n),u&2048&&Od(n.alternate,n);break;case 24:Di(a,n),u&2048&&Rd(n.alternate,n);break;default:Di(a,n)}t=t.sibling}}var Ai=8192;function jr(e,t,a){if(e.subtreeFlags&Ai)for(e=e.child;e!==null;)Pm(e,t,a),e=e.sibling}function Pm(e,t,a){switch(e.tag){case 26:jr(e,t,a),e.flags&Ai&&e.memoizedState!==null&&By(a,dn,e.memoizedState,e.memoizedProps);break;case 5:jr(e,t,a);break;case 3:case 4:var n=dn;dn=Cc(e.stateNode.containerInfo),jr(e,t,a),dn=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Ai,Ai=16777216,jr(e,t,a),Ai=n):jr(e,t,a));break;default:jr(e,t,a)}}function Gm(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 ki(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Wt=n,Zm(n,e)}Gm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fm(e),e=e.sibling}function Fm(e){switch(e.tag){case 0:case 11:case 15:ki(e),e.flags&2048&&Cl(9,e,e.return);break;case 3:ki(e);break;case 12:ki(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,gc(e)):ki(e);break;default:ki(e)}}function gc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Wt=n,Zm(n,e)}Gm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Cl(8,t,t.return),gc(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,gc(t));break;default:gc(t)}e=e.sibling}}function Zm(e,t){for(;Wt!==null;){var a=Wt;switch(a.tag){case 0:case 11:case 15:Cl(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:xi(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Wt=n;else e:for(a=e;Wt!==null;){n=Wt;var u=n.sibling,d=n.return;if(Lm(n),n===a){Wt=null;break e}if(u!==null){u.return=d,Wt=u;break e}Wt=d}}}var ty={getCacheForType:function(e){var t=aa(zt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return aa(zt).controller.signal}},ay=typeof WeakMap=="function"?WeakMap:Map,tt=0,dt=null,Fe=null,Ie=0,lt=0,Aa=null,Ol=!1,wr=!1,Dd=!1,In=0,wt=0,Rl=0,ks=0,Ad=0,ka=0,Er=0,_i=null,wa=null,kd=!1,xc=0,Wm=0,pc=1/0,yc=null,Dl=null,Pt=0,Al=null,Tr=null,Xn=0,_d=0,zd=null,Qm=null,zi=0,Ud=null;function _a(){return(tt&2)!==0&&Ie!==0?Ie&-Ie:Y.T!==null?Yd():Fs()}function Im(){if(ka===0)if((Ie&536870912)===0||V){var e=$s;$s<<=1,($s&3932160)===0&&($s=262144),ka=e}else ka=536870912;return e=Ra.current,e!==null&&(e.flags|=32),ka}function Ea(e,t,a){(e===dt&&(lt===2||lt===9)||e.cancelPendingCommit!==null)&&(Mr(e,0),kl(e,Ie,ka,!1)),il(e,a),((tt&2)===0||e!==dt)&&(e===dt&&((tt&2)===0&&(ks|=a),wt===4&&kl(e,Ie,ka,!1)),Cn(e))}function Xm(e,t,a){if((tt&6)!==0)throw Error(c(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||rl(e,t),u=n?sy(e,t):Hd(e,t,!0),d=n;do{if(u===0){wr&&!n&&kl(e,t,0,!1);break}else{if(a=e.current.alternate,d&&!ny(a)){u=Hd(e,t,!1),d=!1;continue}if(u===2){if(d=t,e.errorRecoveryDisabledLanes&d)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var E=e;u=_i;var z=E.current.memoizedState.isDehydrated;if(z&&(Mr(E,p).flags|=256),p=Hd(E,p,!1),p!==2){if(Dd&&!z){E.errorRecoveryDisabledLanes|=d,ks|=d,u=4;break e}d=wa,wa=u,d!==null&&(wa===null?wa=d:wa.push.apply(wa,d))}u=p}if(d=!1,u!==2)continue}}if(u===1){Mr(e,0),kl(e,t,0,!0);break}e:{switch(n=e,d=u,d){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:kl(n,t,ka,!Ol);break e;case 2:wa=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(u=xc+300-it(),10<u)){if(kl(n,t,ka,!Ol),Jl(n,0,!0)!==0)break e;Xn=t,n.timeoutHandle=C0(Jm.bind(null,n,a,wa,yc,kd,t,ka,ks,Er,Ol,d,"Throttled",-0,0),u);break e}Jm(n,a,wa,yc,kd,t,ka,ks,Er,Ol,d,null,-0,0)}}break}while(!0);Cn(e)}function Jm(e,t,a,n,u,d,p,E,z,Q,re,de,X,ae){if(e.timeoutHandle=-1,de=t.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ba},Pm(t,d,de);var ve=(d&62914560)===d?xc-it():(d&4194048)===d?Wm-it():0;if(ve=Vy(de,ve),ve!==null){Xn=d,e.cancelPendingCommit=ve(r0.bind(null,e,t,d,a,n,u,p,E,z,re,de,null,X,ae)),kl(e,d,p,!Q);return}}r0(e,t,d,a,n,u,p,E,z)}function ny(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var n=0;n<a.length;n++){var u=a[n],d=u.getSnapshot;u=u.value;try{if(!ua(d(),u))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 kl(e,t,a,n){t&=~Ad,t&=~ks,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var u=t;0<u;){var d=31-kt(u),p=1<<d;n[d]=-1,u&=~p}a!==0&&ht(e,a,t)}function vc(){return(tt&6)===0?(Ui(0),!1):!0}function Ld(){if(Fe!==null){if(lt===0)var e=Fe.return;else e=Fe,Za=Bn=null,Ko(e),pr=null,yi=0,e=Fe;for(;e!==null;)Om(e.alternate,e),e=e.return;Fe=null}}function Mr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,jy(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Xn=0,Ld(),dt=e,Fe=a=Pa(e.current,null),Ie=t,lt=0,Aa=null,Ol=!1,wr=rl(e,t),Dd=!1,Er=ka=Ad=ks=Rl=wt=0,wa=_i=null,kd=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var u=31-kt(n),d=1<<u;t|=e[u],n&=~d}return In=t,Nl(),a}function Km(e,t){qe=null,Y.H=Ti,t===xr||t===Wu?(t=gh(),lt=3):t===Vo?(t=gh(),lt=4):lt=t===gd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Aa=t,Fe===null&&(wt=1,uc(e,va(t,e.current)))}function e0(){var e=Ra.current;return e===null?!0:(Ie&4194048)===Ie?Qa===null:(Ie&62914560)===Ie||(Ie&536870912)!==0?e===Qa:!1}function t0(){var e=Y.H;return Y.H=Ti,e===null?Ti:e}function a0(){var e=Y.A;return Y.A=ty,e}function bc(){wt=4,Ol||(Ie&4194048)!==Ie&&Ra.current!==null||(wr=!0),(Rl&134217727)===0&&(ks&134217727)===0||dt===null||kl(dt,Ie,ka,!1)}function Hd(e,t,a){var n=tt;tt|=2;var u=t0(),d=a0();(dt!==e||Ie!==t)&&(yc=null,Mr(e,t)),t=!1;var p=wt;e:do try{if(lt!==0&&Fe!==null){var E=Fe,z=Aa;switch(lt){case 8:Ld(),p=6;break e;case 3:case 2:case 9:case 6:Ra.current===null&&(t=!0);var Q=lt;if(lt=0,Aa=null,Cr(e,E,z,Q),a&&wr){p=0;break e}break;default:Q=lt,lt=0,Aa=null,Cr(e,E,z,Q)}}ly(),p=wt;break}catch(re){Km(e,re)}while(!0);return t&&e.shellSuspendCounter++,Za=Bn=null,tt=n,Y.H=u,Y.A=d,Fe===null&&(dt=null,Ie=0,Nl()),p}function ly(){for(;Fe!==null;)n0(Fe)}function sy(e,t){var a=tt;tt|=2;var n=t0(),u=a0();dt!==e||Ie!==t?(yc=null,pc=it()+500,Mr(e,t)):wr=rl(e,t);e:do try{if(lt!==0&&Fe!==null){t=Fe;var d=Aa;t:switch(lt){case 1:lt=0,Aa=null,Cr(e,t,d,1);break;case 2:case 9:if(hh(d)){lt=0,Aa=null,l0(t);break}t=function(){lt!==2&<!==9||dt!==e||(lt=7),Cn(e)},d.then(t,t);break e;case 3:lt=7;break e;case 4:lt=5;break e;case 7:hh(d)?(lt=0,Aa=null,l0(t)):(lt=0,Aa=null,Cr(e,t,d,7));break;case 5:var p=null;switch(Fe.tag){case 26:p=Fe.memoizedState;case 5:case 27:var E=Fe;if(p?$0(p):E.stateNode.complete){lt=0,Aa=null;var z=E.sibling;if(z!==null)Fe=z;else{var Q=E.return;Q!==null?(Fe=Q,Nc(Q)):Fe=null}break t}}lt=0,Aa=null,Cr(e,t,d,5);break;case 6:lt=0,Aa=null,Cr(e,t,d,6);break;case 8:Ld(),wt=6;break e;default:throw Error(c(462))}}ry();break}catch(re){Km(e,re)}while(!0);return Za=Bn=null,Y.H=n,Y.A=u,tt=a,Fe!==null?0:(dt=null,Ie=0,Nl(),wt)}function ry(){for(;Fe!==null&&!St();)n0(Fe)}function n0(e){var t=Mm(e.alternate,e,In);e.memoizedProps=e.pendingProps,t===null?Nc(e):Fe=t}function l0(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Nm(a,t,t.pendingProps,t.type,void 0,Ie);break;case 11:t=Nm(a,t,t.pendingProps,t.type.render,t.ref,Ie);break;case 5:Ko(t);default:Om(a,t),t=Fe=Pu(t,In),t=Mm(a,t,In)}e.memoizedProps=e.pendingProps,t===null?Nc(e):Fe=t}function Cr(e,t,a,n){Za=Bn=null,Ko(t),pr=null,yi=0;var u=t.return;try{if(Wp(e,u,t,a,Ie)){wt=1,uc(e,va(a,e.current)),Fe=null;return}}catch(d){if(u!==null)throw Fe=u,d;wt=1,uc(e,va(a,e.current)),Fe=null;return}t.flags&32768?(V||n===1?e=!0:wr||(Ie&536870912)!==0?e=!1:(Ol=e=!0,(n===2||n===9||n===3||n===6)&&(n=Ra.current,n!==null&&n.tag===13&&(n.flags|=16384))),s0(t,e)):Nc(t)}function Nc(e){var t=e;do{if((t.flags&32768)!==0){s0(t,Ol);return}e=t.return;var a=Xp(t.alternate,t,In);if(a!==null){Fe=a;return}if(t=t.sibling,t!==null){Fe=t;return}Fe=t=e}while(t!==null);wt===0&&(wt=5)}function s0(e,t){do{var a=Jp(e.alternate,e);if(a!==null){a.flags&=32767,Fe=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Fe=e;return}Fe=e=a}while(e!==null);wt=6,Fe=null}function r0(e,t,a,n,u,d,p,E,z){e.cancelPendingCommit=null;do Sc();while(Pt!==0);if((tt&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(d=t.lanes|t.childLanes,d|=Ns,xu(e,a,d,p,E,z),e===dt&&(Fe=dt=null,Ie=0),Tr=t,Al=e,Xn=a,_d=d,zd=u,Qm=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,oy(Bt,function(){return d0(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=Y.T,Y.T=null,u=ie.p,ie.p=2,p=tt,tt|=4;try{Kp(e,t,a)}finally{tt=p,ie.p=u,Y.T=n}}Pt=1,i0(),u0(),c0()}}function i0(){if(Pt===1){Pt=0;var e=Al,t=Tr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=Y.T,Y.T=null;var n=ie.p;ie.p=2;var u=tt;tt|=4;try{Vm(t,e);var d=Id,p=zo(e.containerInfo),E=d.focusedElem,z=d.selectionRange;if(p!==E&&E&&E.ownerDocument&&Je(E.ownerDocument.documentElement,E)){if(z!==null&&lr(E)){var Q=z.start,re=z.end;if(re===void 0&&(re=Q),"selectionStart"in E)E.selectionStart=Q,E.selectionEnd=Math.min(re,E.value.length);else{var de=E.ownerDocument||document,X=de&&de.defaultView||window;if(X.getSelection){var ae=X.getSelection(),ve=E.textContent.length,Ae=Math.min(z.start,ve),ot=z.end===void 0?Ae:Math.min(z.end,ve);!ae.extend&&Ae>ot&&(p=ot,ot=Ae,Ae=p);var G=Hu(E,Ae),q=Hu(E,ot);if(G&&q&&(ae.rangeCount!==1||ae.anchorNode!==G.node||ae.anchorOffset!==G.offset||ae.focusNode!==q.node||ae.focusOffset!==q.offset)){var W=de.createRange();W.setStart(G.node,G.offset),ae.removeAllRanges(),Ae>ot?(ae.addRange(W),ae.extend(q.node,q.offset)):(W.setEnd(q.node,q.offset),ae.addRange(W))}}}}for(de=[],ae=E;ae=ae.parentNode;)ae.nodeType===1&&de.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<de.length;E++){var ue=de[E];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}_c=!!Qd,Id=Qd=null}finally{tt=u,ie.p=n,Y.T=a}}e.current=t,Pt=2}}function u0(){if(Pt===2){Pt=0;var e=Al,t=Tr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=Y.T,Y.T=null;var n=ie.p;ie.p=2;var u=tt;tt|=4;try{Um(e,t.alternate,t)}finally{tt=u,ie.p=n,Y.T=a}}Pt=3}}function c0(){if(Pt===4||Pt===3){Pt=0,qt();var e=Al,t=Tr,a=Xn,n=Qm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Pt=5:(Pt=0,Tr=Al=null,o0(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Dl=null),ia(a),t=t.stateNode,Vt&&typeof Vt.onCommitFiberRoot=="function")try{Vt.onCommitFiberRoot(xt,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=Y.T,u=ie.p,ie.p=2,Y.T=null;try{for(var d=e.onRecoverableError,p=0;p<n.length;p++){var E=n[p];d(E.value,{componentStack:E.stack})}}finally{Y.T=t,ie.p=u}}(Xn&3)!==0&&Sc(),Cn(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===Ud?zi++:(zi=0,Ud=e):zi=0,Ui(0)}}function o0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,xi(t)))}function Sc(){return i0(),u0(),c0(),d0()}function d0(){if(Pt!==5)return!1;var e=Al,t=_d;_d=0;var a=ia(Xn),n=Y.T,u=ie.p;try{ie.p=32>a?32:a,Y.T=null,a=zd,zd=null;var d=Al,p=Xn;if(Pt=0,Tr=Al=null,Xn=0,(tt&6)!==0)throw Error(c(331));var E=tt;if(tt|=4,Fm(d.current),$m(d,d.current,p,a),tt=E,Ui(0,!1),Vt&&typeof Vt.onPostCommitFiberRoot=="function")try{Vt.onPostCommitFiberRoot(xt,d)}catch{}return!0}finally{ie.p=u,Y.T=n,o0(e,t)}}function f0(e,t,a){t=va(a,t),t=md(e.stateNode,t,2),e=El(e,t,2),e!==null&&(il(e,2),Cn(e))}function st(e,t,a){if(e.tag===3)f0(e,e,a);else for(;t!==null;){if(t.tag===3){f0(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Dl===null||!Dl.has(n))){e=va(a,e),a=hm(2),n=El(t,a,2),n!==null&&(mm(a,n,t,e),il(n,2),Cn(n));break}}t=t.return}}function qd(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new ay;var u=new Set;n.set(t,u)}else u=n.get(t),u===void 0&&(u=new Set,n.set(t,u));u.has(a)||(Dd=!0,u.add(a),e=iy.bind(null,e,t,a),t.then(e,e))}function iy(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,dt===e&&(Ie&a)===a&&(wt===4||wt===3&&(Ie&62914560)===Ie&&300>it()-xc?(tt&2)===0&&Mr(e,0):Ad|=a,Er===Ie&&(Er=0)),Cn(e)}function h0(e,t){t===0&&(t=Gr()),e=$a(e,t),e!==null&&(il(e,t),Cn(e))}function uy(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),h0(e,a)}function cy(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(c(314))}n!==null&&n.delete(t),h0(e,a)}function oy(e,t){return Ge(e,t)}var jc=null,Or=null,Bd=!1,wc=!1,Vd=!1,_l=0;function Cn(e){e!==Or&&e.next===null&&(Or===null?jc=Or=e:Or=Or.next=e),wc=!0,Bd||(Bd=!0,fy())}function Ui(e,t){if(!Vd&&wc){Vd=!0;do for(var a=!1,n=jc;n!==null;){if(e!==0){var u=n.pendingLanes;if(u===0)var d=0;else{var p=n.suspendedLanes,E=n.pingedLanes;d=(1<<31-kt(42|e)+1)-1,d&=u&~(p&~E),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,p0(n,d))}else d=Ie,d=Jl(n,n===dt?d:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(d&3)===0||rl(n,d)||(a=!0,p0(n,d));n=n.next}while(a);Vd=!1}}function dy(){m0()}function m0(){wc=Bd=!1;var e=0;_l!==0&&Sy()&&(e=_l);for(var t=it(),a=null,n=jc;n!==null;){var u=n.next,d=g0(n,t);d===0?(n.next=null,a===null?jc=u:a.next=u,u===null&&(Or=a)):(a=n,(e!==0||(d&3)!==0)&&(wc=!0)),n=u}Pt!==0&&Pt!==5||Ui(e),_l!==0&&(_l=0)}function g0(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,u=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var p=31-kt(d),E=1<<p,z=u[p];z===-1?((E&a)===0||(E&n)!==0)&&(u[p]=gu(E,t)):z<=t&&(e.expiredLanes|=E),d&=~E}if(t=dt,a=Ie,a=Jl(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(lt===2||lt===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&>(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||rl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&>(n),ia(a)){case 2:case 8:a=yn;break;case 32:a=Bt;break;case 268435456:a=qa;break;default:a=Bt}return n=x0.bind(null,e),a=Ge(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&>(n),e.callbackPriority=2,e.callbackNode=null,2}function x0(e,t){if(Pt!==0&&Pt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Sc()&&e.callbackNode!==a)return null;var n=Ie;return n=Jl(e,e===dt?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Xm(e,n,t),g0(e,it()),e.callbackNode!=null&&e.callbackNode===a?x0.bind(null,e):null)}function p0(e,t){if(Sc())return null;Xm(e,t,!0)}function fy(){wy(function(){(tt&6)!==0?Ge(pn,dy):m0()})}function Yd(){if(_l===0){var e=mr;e===0&&(e=sl,sl<<=1,(sl&261888)===0&&(sl=256)),_l=e}return _l}function y0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:rs(""+e)}function v0(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 hy(e,t,a,n,u){if(t==="submit"&&a&&a.stateNode===u){var d=y0((u[Yt]||null).action),p=n.submitter;p&&(t=(t=p[Yt]||null)?y0(t.formAction):p.getAttribute("formAction"),t!==null&&(d=t,p=null));var E=new os("action","action",null,n,u);e.push({event:E,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(_l!==0){var z=p?v0(u,p):new FormData(u);ud(a,{pending:!0,data:z,method:u.method,action:d},null,z)}}else typeof d=="function"&&(E.preventDefault(),z=p?v0(u,p):new FormData(u),ud(a,{pending:!0,data:z,method:u.method,action:d},d,z))},currentTarget:u}]})}}for(var $d=0;$d<fi.length;$d++){var Pd=fi[$d],my=Pd.toLowerCase(),gy=Pd[0].toUpperCase()+Pd.slice(1);ya(my,"on"+gy)}ya(Vu,"onAnimationEnd"),ya(Yu,"onAnimationIteration"),ya(ir,"onAnimationStart"),ya("dblclick","onDoubleClick"),ya("focusin","onFocus"),ya("focusout","onBlur"),ya(Uo,"onTransitionRun"),ya(Lo,"onTransitionStart"),ya($u,"onTransitionCancel"),ya(oi,"onTransitionEnd"),ul("onMouseEnter",["mouseout","mouseover"]),ul("onMouseLeave",["mouseout","mouseover"]),ul("onPointerEnter",["pointerout","pointerover"]),ul("onPointerLeave",["pointerout","pointerover"]),bn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),bn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),bn("onBeforeInput",["compositionend","keypress","textInput","paste"]),bn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),bn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),bn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Li="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(" "),xy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Li));function b0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],u=n.event;n=n.listeners;e:{var d=void 0;if(t)for(var p=n.length-1;0<=p;p--){var E=n[p],z=E.instance,Q=E.currentTarget;if(E=E.listener,z!==d&&u.isPropagationStopped())break e;d=E,u.currentTarget=Q;try{d(u)}catch(re){bl(re)}u.currentTarget=null,d=z}else for(p=0;p<n.length;p++){if(E=n[p],z=E.instance,Q=E.currentTarget,E=E.listener,z!==d&&u.isPropagationStopped())break e;d=E,u.currentTarget=Q;try{d(u)}catch(re){bl(re)}u.currentTarget=null,d=z}}}}function Ze(e,t){var a=t[Kl];a===void 0&&(a=t[Kl]=new Set);var n=e+"__bubble";a.has(n)||(N0(t,e,2,!1),a.add(n))}function Gd(e,t,a){var n=0;t&&(n|=4),N0(a,e,n,t)}var Ec="_reactListening"+Math.random().toString(36).slice(2);function Fd(e){if(!e[Ec]){e[Ec]=!0,bu.forEach(function(a){a!=="selectionchange"&&(xy.has(a)||Gd(a,!1,e),Gd(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ec]||(t[Ec]=!0,Gd("selectionchange",!1,t))}}function N0(e,t,a,n){switch(I0(t)){case 2:var u=Py;break;case 8:u=Gy;break;default:u=uf}a=u.bind(null,t,a,e),u=void 0,!ti||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),n?u!==void 0?e.addEventListener(t,a,{capture:!0,passive:u}):e.addEventListener(t,a,!0):u!==void 0?e.addEventListener(t,a,{passive:u}):e.addEventListener(t,a,!1)}function Zd(e,t,a,n,u){var d=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var p=n.tag;if(p===3||p===4){var E=n.stateNode.containerInfo;if(E===u)break;if(p===4)for(p=n.return;p!==null;){var z=p.tag;if((z===3||z===4)&&p.stateNode.containerInfo===u)return;p=p.return}for(;E!==null;){if(p=Dn(E),p===null)return;if(z=p.tag,z===5||z===6||z===26||z===27){n=d=p;continue e}E=E.parentNode}}n=n.return}ei(function(){var Q=d,re=Js(a),de=[];e:{var X=di.get(e);if(X!==void 0){var ae=os,ve=e;switch(e){case"keypress":if(cs(a)===0)break e;case"keydown":case"keyup":ae=No;break;case"focusin":ve="focus",ae=nr;break;case"focusout":ve="blur",ae=nr;break;case"beforeblur":case"afterblur":ae=nr;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=Tu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=fo;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=wo;break;case Vu:case Yu:case ir:ae=fl;break;case oi:ae=Eo;break;case"scroll":case"scrollend":ae=ai;break;case"wheel":ae=Mo;break;case"copy":case"cut":case"paste":ae=hl;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=Mu;break;case"toggle":case"beforetoggle":ae=Oo}var Ae=(t&4)!==0,ot=!Ae&&(e==="scroll"||e==="scrollend"),G=Ae?X!==null?X+"Capture":null:X;Ae=[];for(var q=Q,W;q!==null;){var ue=q;if(W=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||W===null||G===null||(ue=is(q,G),ue!=null&&Ae.push(Hi(q,ue,W))),ot)break;q=q.return}0<Ae.length&&(X=new ae(X,ve,null,a,re),de.push({event:X,listeners:Ae}))}}if((t&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",X&&a!==Jr&&(ve=a.relatedTarget||a.fromElement)&&(Dn(ve)||ve[Rn]))break e;if((ae||X)&&(X=re.window===re?re:(X=re.ownerDocument)?X.defaultView||X.parentWindow:window,ae?(ve=a.relatedTarget||a.toElement,ae=Q,ve=ve?Dn(ve):null,ve!==null&&(ot=m(ve),Ae=ve.tag,ve!==ot||Ae!==5&&Ae!==27&&Ae!==6)&&(ve=null)):(ae=null,ve=Q),ae!==ve)){if(Ae=Tu,ue="onMouseLeave",G="onMouseEnter",q="mouse",(e==="pointerout"||e==="pointerover")&&(Ae=Mu,ue="onPointerLeave",G="onPointerEnter",q="pointer"),ot=ae==null?X:xa(ae),W=ve==null?X:xa(ve),X=new Ae(ue,q+"leave",ae,a,re),X.target=ot,X.relatedTarget=W,ue=null,Dn(re)===Q&&(Ae=new Ae(G,q+"enter",ve,a,re),Ae.target=W,Ae.relatedTarget=ot,ue=Ae),ot=ue,ae&&ve)t:{for(Ae=py,G=ae,q=ve,W=0,ue=G;ue;ue=Ae(ue))W++;ue=0;for(var Ce=q;Ce;Ce=Ae(Ce))ue++;for(;0<W-ue;)G=Ae(G),W--;for(;0<ue-W;)q=Ae(q),ue--;for(;W--;){if(G===q||q!==null&&G===q.alternate){Ae=G;break t}G=Ae(G),q=Ae(q)}Ae=null}else Ae=null;ae!==null&&S0(de,X,ae,Ae,!1),ve!==null&&ot!==null&&S0(de,ot,ve,Ae,!0)}}e:{if(X=Q?xa(Q):window,ae=X.nodeName&&X.nodeName.toLowerCase(),ae==="select"||ae==="input"&&X.type==="file")var Ke=Uu;else if(zu(X))if(wn)Ke=pt;else{Ke=pl;var Ne=We}else ae=X.nodeName,!ae||ae.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Q&&Xs(Q.elementType)&&(Ke=Uu):Ke=_o;if(Ke&&(Ke=Ke(e,Q))){li(de,Ke,a,re);break e}Ne&&Ne(e,X,Q),e==="focusout"&&Q&&X.type==="number"&&Q.memoizedProps.value!=null&&as(X,"number",X.value)}switch(Ne=Q?xa(Q):window,e){case"focusin":(zu(Ne)||Ne.contentEditable==="true")&&(yl=Ne,sr=Q,ea=null);break;case"focusout":ea=sr=yl=null;break;case"mousedown":rr=!0;break;case"contextmenu":case"mouseup":case"dragend":rr=!1,bs(de,a,re);break;case"selectionchange":if(qu)break;case"keydown":case"keyup":bs(de,a,re)}var Be;if(ni)e:{switch(e){case"compositionstart":var Xe="onCompositionStart";break e;case"compositionend":Xe="onCompositionEnd";break e;case"compositionupdate":Xe="onCompositionUpdate";break e}Xe=void 0}else gl?ku(e,a)&&(Xe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Xe="onCompositionStart");Xe&&(Ru&&a.locale!=="ko"&&(gl||Xe!=="onCompositionStart"?Xe==="onCompositionEnd"&&gl&&(Be=$t()):(Sn=re,Ks="value"in Sn?Sn.value:Sn.textContent,gl=!0)),Ne=Tc(Q,Xe),0<Ne.length&&(Xe=new ml(Xe,e,null,a,re),de.push({event:Xe,listeners:Ne}),Be?Xe.data=Be:(Be=_u(a),Be!==null&&(Xe.data=Be)))),(Be=Ro?Do(e,a):Ao(e,a))&&(Xe=Tc(Q,"onBeforeInput"),0<Xe.length&&(Ne=new ml("onBeforeInput","beforeinput",null,a,re),de.push({event:Ne,listeners:Xe}),Ne.data=Be)),hy(de,e,Q,a,re)}b0(de,t)})}function Hi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Tc(e,t){for(var a=t+"Capture",n=[];e!==null;){var u=e,d=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||d===null||(u=is(e,a),u!=null&&n.unshift(Hi(e,u,d)),u=is(e,t),u!=null&&n.push(Hi(e,u,d))),e.tag===3)return n;e=e.return}return[]}function py(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function S0(e,t,a,n,u){for(var d=t._reactName,p=[];a!==null&&a!==n;){var E=a,z=E.alternate,Q=E.stateNode;if(E=E.tag,z!==null&&z===n)break;E!==5&&E!==26&&E!==27||Q===null||(z=Q,u?(Q=is(a,d),Q!=null&&p.unshift(Hi(a,Q,z))):u||(Q=is(a,d),Q!=null&&p.push(Hi(a,Q,z)))),a=a.return}p.length!==0&&e.push({event:t,listeners:p})}var yy=/\r\n?/g,vy=/\u0000|\uFFFD/g;function j0(e){return(typeof e=="string"?e:""+e).replace(yy,`
|
|
49
|
-
`).replace(vy,"")}function w0(e,t){return t=j0(t),j0(e)===t}function ct(e,t,a,n,u,d){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||nn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&nn(e,""+n);break;case"className":Ws(e,"class",n);break;case"tabIndex":Ws(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Ws(e,a,n);break;case"style":ju(e,n,d);break;case"data":if(t!=="object"){Ws(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=rs(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(a==="formAction"?(t!=="input"&&ct(e,t,"name",u.name,u,null),ct(e,t,"formEncType",u.formEncType,u,null),ct(e,t,"formMethod",u.formMethod,u,null),ct(e,t,"formTarget",u.formTarget,u,null)):(ct(e,t,"encType",u.encType,u,null),ct(e,t,"method",u.method,u,null),ct(e,t,"target",u.target,u,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=rs(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Ba);break;case"onScroll":n!=null&&Ze("scroll",e);break;case"onScrollEnd":n!=null&&Ze("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(a=n.__html,a!=null){if(u.children!=null)throw Error(c(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=rs(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":Ze("beforetoggle",e),Ze("toggle",e),Jt(e,"popover",n);break;case"xlinkActuate":nt(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":nt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":nt(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":nt(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":nt(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":nt(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":nt(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":nt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":nt(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Jt(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=co.get(a)||a,Jt(e,a,n))}}function Wd(e,t,a,n,u,d){switch(a){case"style":ju(e,n,d);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(a=n.__html,a!=null){if(u.children!=null)throw Error(c(60));e.innerHTML=a}}break;case"children":typeof n=="string"?nn(e,n):(typeof n=="number"||typeof n=="bigint")&&nn(e,""+n);break;case"onScroll":n!=null&&Ze("scroll",e);break;case"onScrollEnd":n!=null&&Ze("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Ba);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Wr.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),t=a.slice(2,u?a.length-7:void 0),d=e[Yt]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(t,d,u),typeof n=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,u);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Jt(e,a,n)}}}function la(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ze("error",e),Ze("load",e);var n=!1,u=!1,d;for(d in a)if(a.hasOwnProperty(d)){var p=a[d];if(p!=null)switch(d){case"src":n=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:ct(e,t,d,p,a,null)}}u&&ct(e,t,"srcSet",a.srcSet,a,null),n&&ct(e,t,"src",a.src,a,null);return;case"input":Ze("invalid",e);var E=d=p=u=null,z=null,Q=null;for(n in a)if(a.hasOwnProperty(n)){var re=a[n];if(re!=null)switch(n){case"name":u=re;break;case"type":p=re;break;case"checked":z=re;break;case"defaultChecked":Q=re;break;case"value":d=re;break;case"defaultValue":E=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(c(137,t));break;default:ct(e,t,n,re,a,null)}}ol(e,d,E,z,Q,p,u,!1);return;case"select":Ze("invalid",e),n=p=d=null;for(u in a)if(a.hasOwnProperty(u)&&(E=a[u],E!=null))switch(u){case"value":d=E;break;case"defaultValue":p=E;break;case"multiple":n=E;default:ct(e,t,u,E,a,null)}t=d,a=p,e.multiple=!!n,t!=null?kn(e,!!n,t,!1):a!=null&&kn(e,!!n,a,!0);return;case"textarea":Ze("invalid",e),d=u=n=null;for(p in a)if(a.hasOwnProperty(p)&&(E=a[p],E!=null))switch(p){case"value":n=E;break;case"defaultValue":u=E;break;case"children":d=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(c(91));break;default:ct(e,t,p,E,a,null)}Xr(e,n,u,d);return;case"option":for(z in a)if(a.hasOwnProperty(z)&&(n=a[z],n!=null))switch(z){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:ct(e,t,z,n,a,null)}return;case"dialog":Ze("beforetoggle",e),Ze("toggle",e),Ze("cancel",e),Ze("close",e);break;case"iframe":case"object":Ze("load",e);break;case"video":case"audio":for(n=0;n<Li.length;n++)Ze(Li[n],e);break;case"image":Ze("error",e),Ze("load",e);break;case"details":Ze("toggle",e);break;case"embed":case"source":case"link":Ze("error",e),Ze("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)&&(n=a[Q],n!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:ct(e,t,Q,n,a,null)}return;default:if(Xs(t)){for(re in a)a.hasOwnProperty(re)&&(n=a[re],n!==void 0&&Wd(e,t,re,n,a,void 0));return}}for(E in a)a.hasOwnProperty(E)&&(n=a[E],n!=null&&ct(e,t,E,n,a,null))}function by(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,d=null,p=null,E=null,z=null,Q=null,re=null;for(ae in a){var de=a[ae];if(a.hasOwnProperty(ae)&&de!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":z=de;default:n.hasOwnProperty(ae)||ct(e,t,ae,null,n,de)}}for(var X in n){var ae=n[X];if(de=a[X],n.hasOwnProperty(X)&&(ae!=null||de!=null))switch(X){case"type":d=ae;break;case"name":u=ae;break;case"checked":Q=ae;break;case"defaultChecked":re=ae;break;case"value":p=ae;break;case"defaultValue":E=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(c(137,t));break;default:ae!==de&&ct(e,t,X,ae,n,de)}}Is(e,p,E,z,Q,re,d,u);return;case"select":ae=p=E=X=null;for(d in a)if(z=a[d],a.hasOwnProperty(d)&&z!=null)switch(d){case"value":break;case"multiple":ae=z;default:n.hasOwnProperty(d)||ct(e,t,d,null,n,z)}for(u in n)if(d=n[u],z=a[u],n.hasOwnProperty(u)&&(d!=null||z!=null))switch(u){case"value":X=d;break;case"defaultValue":E=d;break;case"multiple":p=d;default:d!==z&&ct(e,t,u,d,n,z)}t=E,a=p,n=ae,X!=null?kn(e,!!a,X,!1):!!n!=!!a&&(t!=null?kn(e,!!a,t,!0):kn(e,!!a,a?[]:"",!1));return;case"textarea":ae=X=null;for(E in a)if(u=a[E],a.hasOwnProperty(E)&&u!=null&&!n.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:ct(e,t,E,null,n,u)}for(p in n)if(u=n[p],d=a[p],n.hasOwnProperty(p)&&(u!=null||d!=null))switch(p){case"value":X=u;break;case"defaultValue":ae=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(c(91));break;default:u!==d&&ct(e,t,p,u,n,d)}ns(e,X,ae);return;case"option":for(var ve in a)if(X=a[ve],a.hasOwnProperty(ve)&&X!=null&&!n.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:ct(e,t,ve,null,n,X)}for(z in n)if(X=n[z],ae=a[z],n.hasOwnProperty(z)&&X!==ae&&(X!=null||ae!=null))switch(z){case"selected":e.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:ct(e,t,z,X,n,ae)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ae in a)X=a[Ae],a.hasOwnProperty(Ae)&&X!=null&&!n.hasOwnProperty(Ae)&&ct(e,t,Ae,null,n,X);for(Q in n)if(X=n[Q],ae=a[Q],n.hasOwnProperty(Q)&&X!==ae&&(X!=null||ae!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(c(137,t));break;default:ct(e,t,Q,X,n,ae)}return;default:if(Xs(t)){for(var ot in a)X=a[ot],a.hasOwnProperty(ot)&&X!==void 0&&!n.hasOwnProperty(ot)&&Wd(e,t,ot,void 0,n,X);for(re in n)X=n[re],ae=a[re],!n.hasOwnProperty(re)||X===ae||X===void 0&&ae===void 0||Wd(e,t,re,X,n,ae);return}}for(var G in a)X=a[G],a.hasOwnProperty(G)&&X!=null&&!n.hasOwnProperty(G)&&ct(e,t,G,null,n,X);for(de in n)X=n[de],ae=a[de],!n.hasOwnProperty(de)||X===ae||X==null&&ae==null||ct(e,t,de,X,n,ae)}function E0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ny(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var u=a[n],d=u.transferSize,p=u.initiatorType,E=u.duration;if(d&&E&&E0(p)){for(p=0,E=u.responseEnd,n+=1;n<a.length;n++){var z=a[n],Q=z.startTime;if(Q>E)break;var re=z.transferSize,de=z.initiatorType;re&&E0(de)&&(z=z.responseEnd,p+=re*(z<E?1:(E-Q)/(z-Q)))}if(--n,t+=8*(d+p)/(u.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 Qd=null,Id=null;function Mc(e){return e.nodeType===9?e:e.ownerDocument}function T0(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 M0(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 Xd(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 Jd=null;function Sy(){var e=window.event;return e&&e.type==="popstate"?e===Jd?!1:(Jd=e,!0):(Jd=null,!1)}var C0=typeof setTimeout=="function"?setTimeout:void 0,jy=typeof clearTimeout=="function"?clearTimeout:void 0,O0=typeof Promise=="function"?Promise:void 0,wy=typeof queueMicrotask=="function"?queueMicrotask:typeof O0<"u"?function(e){return O0.resolve(null).then(e).catch(Ey)}:C0;function Ey(e){setTimeout(function(){throw e})}function zl(e){return e==="head"}function R0(e,t){var a=t,n=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(u),kr(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")qi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,qi(a);for(var d=a.firstChild;d;){var p=d.nextSibling,E=d.nodeName;d[es]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=p}}else a==="body"&&qi(e.ownerDocument.body);a=u}while(a);kr(t)}function D0(e,t){var a=e;e=0;do{var n=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=n}while(a)}function Kd(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":Kd(a),Zs(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Ty(e,t,a,n){for(;e.nodeType===1;){var u=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[es])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!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Ia(e.nextSibling),e===null)break}return null}function My(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ia(e.nextSibling),e===null))return null;return e}function A0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ia(e.nextSibling),e===null))return null;return e}function ef(e){return e.data==="$?"||e.data==="$~"}function tf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Cy(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function Ia(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 af=null;function k0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Ia(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function _0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function z0(e,t,a){switch(t=Mc(a),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function qi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Zs(e)}var Xa=new Map,U0=new Set;function Cc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Jn=ie.d;ie.d={f:Oy,r:Ry,D:Dy,C:Ay,L:ky,m:_y,X:Uy,S:zy,M:Ly};function Oy(){var e=Jn.f(),t=vc();return e||t}function Ry(e){var t=Re(e);t!==null&&t.tag===5&&t.type==="form"?Kh(t):Jn.r(e)}var Rr=typeof document>"u"?null:document;function L0(e,t,a){var n=Rr;if(n&&typeof t=="string"&&t){var u=Kt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),U0.has(u)||(U0.add(u),e={rel:e,crossOrigin:a,href:t},n.querySelector(u)===null&&(t=n.createElement("link"),la(t,"link",e),_t(t),n.head.appendChild(t)))}}function Dy(e){Jn.D(e),L0("dns-prefetch",e,null)}function Ay(e,t){Jn.C(e,t),L0("preconnect",e,t)}function ky(e,t,a){Jn.L(e,t,a);var n=Rr;if(n&&e&&t){var u='link[rel="preload"][as="'+Kt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+Kt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+Kt(a.imageSizes)+'"]')):u+='[href="'+Kt(e)+'"]';var d=u;switch(t){case"style":d=Dr(e);break;case"script":d=Ar(e)}Xa.has(d)||(e=T({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Xa.set(d,e),n.querySelector(u)!==null||t==="style"&&n.querySelector(Bi(d))||t==="script"&&n.querySelector(Vi(d))||(t=n.createElement("link"),la(t,"link",e),_t(t),n.head.appendChild(t)))}}function _y(e,t){Jn.m(e,t);var a=Rr;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Kt(n)+'"][href="'+Kt(e)+'"]',d=u;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Ar(e)}if(!Xa.has(d)&&(e=T({rel:"modulepreload",href:e},t),Xa.set(d,e),a.querySelector(u)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Vi(d)))return}n=a.createElement("link"),la(n,"link",e),_t(n),a.head.appendChild(n)}}}function zy(e,t,a){Jn.S(e,t,a);var n=Rr;if(n&&e){var u=tn(n).hoistableStyles,d=Dr(e);t=t||"default";var p=u.get(d);if(!p){var E={loading:0,preload:null};if(p=n.querySelector(Bi(d)))E.loading=5;else{e=T({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Xa.get(d))&&nf(e,a);var z=p=n.createElement("link");_t(z),la(z,"link",e),z._p=new Promise(function(Q,re){z.onload=Q,z.onerror=re}),z.addEventListener("load",function(){E.loading|=1}),z.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Oc(p,t,n)}p={type:"stylesheet",instance:p,count:1,state:E},u.set(d,p)}}}function Uy(e,t){Jn.X(e,t);var a=Rr;if(a&&e){var n=tn(a).hoistableScripts,u=Ar(e),d=n.get(u);d||(d=a.querySelector(Vi(u)),d||(e=T({src:e,async:!0},t),(t=Xa.get(u))&&lf(e,t),d=a.createElement("script"),_t(d),la(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},n.set(u,d))}}function Ly(e,t){Jn.M(e,t);var a=Rr;if(a&&e){var n=tn(a).hoistableScripts,u=Ar(e),d=n.get(u);d||(d=a.querySelector(Vi(u)),d||(e=T({src:e,async:!0,type:"module"},t),(t=Xa.get(u))&&lf(e,t),d=a.createElement("script"),_t(d),la(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},n.set(u,d))}}function H0(e,t,a,n){var u=(u=we.current)?Cc(u):null;if(!u)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Dr(a.href),a=tn(u).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Dr(a.href);var d=tn(u).hoistableStyles,p=d.get(e);if(p||(u=u.ownerDocument||u,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,p),(d=u.querySelector(Bi(e)))&&!d._p&&(p.instance=d,p.state.loading=5),Xa.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Xa.set(e,a),d||Hy(u,e,a,p.state))),t&&n===null)throw Error(c(528,""));return p}if(t&&n!==null)throw Error(c(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ar(a),a=tn(u).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function Dr(e){return'href="'+Kt(e)+'"'}function Bi(e){return'link[rel="stylesheet"]['+e+"]"}function q0(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Hy(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),la(t,"link",a),_t(t),e.head.appendChild(t))}function Ar(e){return'[src="'+Kt(e)+'"]'}function Vi(e){return"script[async]"+e}function B0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Kt(a.href)+'"]');if(n)return t.instance=n,_t(n),n;var u=T({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),_t(n),la(n,"style",u),Oc(n,a.precedence,e),t.instance=n;case"stylesheet":u=Dr(a.href);var d=e.querySelector(Bi(u));if(d)return t.state.loading|=4,t.instance=d,_t(d),d;n=q0(a),(u=Xa.get(u))&&nf(n,u),d=(e.ownerDocument||e).createElement("link"),_t(d);var p=d;return p._p=new Promise(function(E,z){p.onload=E,p.onerror=z}),la(d,"link",n),t.state.loading|=4,Oc(d,a.precedence,e),t.instance=d;case"script":return d=Ar(a.src),(u=e.querySelector(Vi(d)))?(t.instance=u,_t(u),u):(n=a,(u=Xa.get(d))&&(n=T({},a),lf(n,u)),e=e.ownerDocument||e,u=e.createElement("script"),_t(u),la(u,"link",n),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Oc(n,a.precedence,e));return t.instance}function Oc(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=n.length?n[n.length-1]:null,d=u,p=0;p<n.length;p++){var E=n[p];if(E.dataset.precedence===t)d=E;else if(d!==u)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function nf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function lf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Rc=null;function V0(e,t,a){if(Rc===null){var n=new Map,u=Rc=new Map;u.set(a,n)}else u=Rc,n=u.get(a),n||(n=new Map,u.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),u=0;u<a.length;u++){var d=a[u];if(!(d[es]||d[Et]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var p=d.getAttribute(t)||"";p=e+p;var E=n.get(p);E?E.push(d):n.set(p,[d])}}return n}function Y0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function qy(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function $0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function By(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=Dr(n.href),d=t.querySelector(Bi(u));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Dc.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=d,_t(d);return}d=t.ownerDocument||t,n=q0(n),(u=Xa.get(u))&&nf(n,u),d=d.createElement("link"),_t(d);var p=d;p._p=new Promise(function(E,z){p.onload=E,p.onerror=z}),la(d,"link",n),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=Dc.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var sf=0;function Vy(e,t){return e.stylesheets&&e.count===0&&kc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&kc(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&sf===0&&(sf=62500*Ny());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&kc(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>sf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(u)}}:null}function Dc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)kc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ac=null;function kc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ac=new Map,t.forEach(Yy,e),Ac=null,Dc.call(e))}function Yy(e,t){if(!(t.state.loading&4)){var a=Ac.get(e);if(a)var n=a.get(null);else{a=new Map,Ac.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<u.length;d++){var p=u[d];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(a.set(p.dataset.precedence,p),n=p)}n&&a.set(null,n)}u=t.instance,p=u.getAttribute("data-precedence"),d=a.get(p)||n,d===n&&a.set(null,u),a.set(p,u),this.count++,n=Dc.bind(this),u.addEventListener("load",n),u.addEventListener("error",n),d?d.parentNode.insertBefore(u,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var Yi={$$typeof:J,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function $y(e,t,a,n,u,d,p,E,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=Ps(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ps(0),this.hiddenUpdates=Ps(null),this.identifierPrefix=n,this.onUncaughtError=u,this.onCaughtError=d,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function P0(e,t,a,n,u,d,p,E,z,Q,re,de){return e=new $y(e,t,a,p,z,Q,re,de,E),t=1,d===!0&&(t|=24),d=ta(3,null,null,t),e.current=d,d.stateNode=e,t=Ho(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:n,isDehydrated:a,cache:t},Yo(d),e}function G0(e){return e?(e=Oa,e):Oa}function F0(e,t,a,n,u,d){u=G0(u),n.context===null?n.context=u:n.pendingContext=u,n=wl(t),n.payload={element:a},d=d===void 0?null:d,d!==null&&(n.callback=d),a=El(e,n,t),a!==null&&(Ea(a,e,t),bi(a,e,t))}function Z0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function rf(e,t){Z0(e,t),(e=e.alternate)&&Z0(e,t)}function W0(e){if(e.tag===13||e.tag===31){var t=$a(e,67108864);t!==null&&Ea(t,e,67108864),rf(e,67108864)}}function Q0(e){if(e.tag===13||e.tag===31){var t=_a();t=Gs(t);var a=$a(e,t);a!==null&&Ea(a,e,t),rf(e,t)}}var _c=!0;function Py(e,t,a,n){var u=Y.T;Y.T=null;var d=ie.p;try{ie.p=2,uf(e,t,a,n)}finally{ie.p=d,Y.T=u}}function Gy(e,t,a,n){var u=Y.T;Y.T=null;var d=ie.p;try{ie.p=8,uf(e,t,a,n)}finally{ie.p=d,Y.T=u}}function uf(e,t,a,n){if(_c){var u=cf(n);if(u===null)Zd(e,t,n,zc,a),X0(e,n);else if(Zy(u,e,t,a,n))n.stopPropagation();else if(X0(e,n),t&4&&-1<Fy.indexOf(e)){for(;u!==null;){var d=Re(u);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var p=vn(d.pendingLanes);if(p!==0){var E=d;for(E.pendingLanes|=2,E.entangledLanes|=2;p;){var z=1<<31-kt(p);E.entanglements[1]|=z,p&=~z}Cn(d),(tt&6)===0&&(pc=it()+500,Ui(0))}}break;case 31:case 13:E=$a(d,2),E!==null&&Ea(E,d,2),vc(),rf(d,2)}if(d=cf(n),d===null&&Zd(e,t,n,zc,a),d===u)break;u=d}u!==null&&n.stopPropagation()}else Zd(e,t,n,null,a)}}function cf(e){return e=Js(e),of(e)}var zc=null;function of(e){if(zc=null,e=Dn(e),e!==null){var t=m(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=v(t),e!==null)return e;e=null}else if(a===31){if(e=S(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 zc=e,null}function I0(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(sa()){case pn:return 2;case yn:return 8;case Bt:case Ma:return 32;case qa:return 268435456;default:return 32}default:return 32}}var df=!1,Ul=null,Ll=null,Hl=null,$i=new Map,Pi=new Map,ql=[],Fy="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 X0(e,t){switch(e){case"focusin":case"focusout":Ul=null;break;case"dragenter":case"dragleave":Ll=null;break;case"mouseover":case"mouseout":Hl=null;break;case"pointerover":case"pointerout":$i.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pi.delete(t.pointerId)}}function Gi(e,t,a,n,u,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:d,targetContainers:[u]},t!==null&&(t=Re(t),t!==null&&W0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Zy(e,t,a,n,u){switch(t){case"focusin":return Ul=Gi(Ul,e,t,a,n,u),!0;case"dragenter":return Ll=Gi(Ll,e,t,a,n,u),!0;case"mouseover":return Hl=Gi(Hl,e,t,a,n,u),!0;case"pointerover":var d=u.pointerId;return $i.set(d,Gi($i.get(d)||null,e,t,a,n,u)),!0;case"gotpointercapture":return d=u.pointerId,Pi.set(d,Gi(Pi.get(d)||null,e,t,a,n,u)),!0}return!1}function J0(e){var t=Dn(e.target);if(t!==null){var a=m(t);if(a!==null){if(t=a.tag,t===13){if(t=v(a),t!==null){e.blockedOn=t,Zr(e.priority,function(){Q0(a)});return}}else if(t===31){if(t=S(a),t!==null){e.blockedOn=t,Zr(e.priority,function(){Q0(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Uc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=cf(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Jr=n,a.target.dispatchEvent(n),Jr=null}else return t=Re(a),t!==null&&W0(t),e.blockedOn=a,!1;t.shift()}return!0}function K0(e,t,a){Uc(e)&&a.delete(t)}function Wy(){df=!1,Ul!==null&&Uc(Ul)&&(Ul=null),Ll!==null&&Uc(Ll)&&(Ll=null),Hl!==null&&Uc(Hl)&&(Hl=null),$i.forEach(K0),Pi.forEach(K0)}function Lc(e,t){e.blockedOn===t&&(e.blockedOn=null,df||(df=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Wy)))}var Hc=null;function eg(e){Hc!==e&&(Hc=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Hc===e&&(Hc=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],u=e[t+2];if(typeof n!="function"){if(of(n||a)===null)continue;break}var d=Re(a);d!==null&&(e.splice(t,3),t-=3,ud(d,{pending:!0,data:u,method:a.method,action:n},n,u))}}))}function kr(e){function t(z){return Lc(z,e)}Ul!==null&&Lc(Ul,e),Ll!==null&&Lc(Ll,e),Hl!==null&&Lc(Hl,e),$i.forEach(t),Pi.forEach(t);for(var a=0;a<ql.length;a++){var n=ql[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<ql.length&&(a=ql[0],a.blockedOn===null);)J0(a),a.blockedOn===null&&ql.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var u=a[n],d=a[n+1],p=u[Yt]||null;if(typeof d=="function")p||eg(a);else if(p){var E=null;if(d&&d.hasAttribute("formAction")){if(u=d,p=d[Yt]||null)E=p.formAction;else if(of(u)!==null)continue}else E=p.action;typeof E=="function"?a[n+1]=E:(a.splice(n,3),n-=3),eg(a)}}}function tg(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(p){return u=p})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),n||setTimeout(a,20)}function a(){if(!n&&!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 n=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function ff(e){this._internalRoot=e}qc.prototype.render=ff.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var a=t.current,n=_a();F0(a,n,e,t,null,null)},qc.prototype.unmount=ff.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;F0(e.current,2,null,e,null,null),vc(),t[Rn]=null}};function qc(e){this._internalRoot=e}qc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fs();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ql.length&&t!==0&&t<ql[a].priority;a++);ql.splice(a,0,e),a===0&&J0(e)}};var ag=r.version;if(ag!=="19.2.4")throw Error(c(527,ag,"19.2.4"));ie.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=x(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var Qy={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bc.isDisabled&&Bc.supportsFiber)try{xt=Bc.inject(Qy),Vt=Bc}catch{}}return Zi.createRoot=function(e,t){if(!f(e))throw Error(c(299));var a=!1,n="",u=cm,d=om,p=dm;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError)),t=P0(e,1,!1,null,null,a,n,null,u,d,p,tg),e[Rn]=t.current,Fd(e),new ff(t)},Zi.hydrateRoot=function(e,t,a){if(!f(e))throw Error(c(299));var n=!1,u="",d=cm,p=om,E=dm,z=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(p=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError),a.formState!==void 0&&(z=a.formState)),t=P0(e,1,!0,t,a??null,n,u,z,d,p,E,tg),t.context=G0(null),a=t.current,n=_a(),n=Gs(n),u=wl(n),u.callback=null,El(a,u,n),a=n,t.current.lanes=a,il(t,a),Cn(t),e[Rn]=t.current,Fd(e),new qc(t)},Zi.version="19.2.4",Zi}var mg;function iv(){if(mg)return xf.exports;mg=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(r){console.error(r)}}return l(),xf.exports=rv(),xf.exports}var uv=iv();const cv=Gf(uv);/**
|
|
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 gg="popstate";function ov(l={}){function r(f,m){let{pathname:v="/",search:S="",hash:N=""}=Bs(f.location.hash.substring(1));return!v.startsWith("/")&&!v.startsWith(".")&&(v="/"+v),Df("",{pathname:v,search:S,hash:N},m.state&&m.state.usr||null,m.state&&m.state.key||"default")}function o(f,m){let v=f.document.querySelector("base"),S="";if(v&&v.getAttribute("href")){let N=f.location.href,x=N.indexOf("#");S=x===-1?N:N.slice(0,x)}return S+"#"+(typeof m=="string"?m:uu(m))}function c(f,m){Ja(f.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(m)})`)}return fv(r,o,c,l)}function bt(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function Ja(l,r){if(!l){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function dv(){return Math.random().toString(36).substring(2,10)}function xg(l,r){return{usr:l.state,key:l.key,idx:r}}function Df(l,r,o=null,c){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof r=="string"?Bs(r):r,state:o,key:r&&r.key||c||dv()}}function uu({pathname:l="/",search:r="",hash:o=""}){return r&&r!=="?"&&(l+=r.charAt(0)==="?"?r:"?"+r),o&&o!=="#"&&(l+=o.charAt(0)==="#"?o:"#"+o),l}function Bs(l){let r={};if(l){let o=l.indexOf("#");o>=0&&(r.hash=l.substring(o),l=l.substring(0,o));let c=l.indexOf("?");c>=0&&(r.search=l.substring(c),l=l.substring(0,c)),l&&(r.pathname=l)}return r}function fv(l,r,o,c={}){let{window:f=document.defaultView,v5Compat:m=!1}=c,v=f.history,S="POP",N=null,x=b();x==null&&(x=0,v.replaceState({...v.state,idx:x},""));function b(){return(v.state||{idx:null}).idx}function T(){S="POP";let A=b(),I=A==null?null:A-x;x=A,N&&N({action:S,location:M.location,delta:I})}function j(A,I){S="PUSH";let B=Df(M.location,A,I);o&&o(B,A),x=b()+1;let J=xg(B,x),K=M.createHref(B);try{v.pushState(J,"",K)}catch(ce){if(ce instanceof DOMException&&ce.name==="DataCloneError")throw ce;f.location.assign(K)}m&&N&&N({action:S,location:M.location,delta:1})}function D(A,I){S="REPLACE";let B=Df(M.location,A,I);o&&o(B,A),x=b();let J=xg(B,x),K=M.createHref(B);v.replaceState(J,"",K),m&&N&&N({action:S,location:M.location,delta:0})}function C(A){return hv(A)}let M={get action(){return S},get location(){return l(f,v)},listen(A){if(N)throw new Error("A history only accepts one active listener");return f.addEventListener(gg,T),N=A,()=>{f.removeEventListener(gg,T),N=null}},createHref(A){return r(f,A)},createURL:C,encodeLocation(A){let I=C(A);return{pathname:I.pathname,search:I.search,hash:I.hash}},push:j,replace:D,go(A){return v.go(A)}};return M}function hv(l,r=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),bt(o,"No window.location.(origin|href) available to create URL");let c=typeof l=="string"?l:uu(l);return c=c.replace(/ $/,"%20"),!r&&c.startsWith("//")&&(c=o+c),new URL(c,o)}function xx(l,r,o="/"){return mv(l,r,o,!1)}function mv(l,r,o,c){let f=typeof r=="string"?Bs(r):r,m=al(f.pathname||"/",o);if(m==null)return null;let v=px(l);gv(v);let S=null;for(let N=0;S==null&&N<v.length;++N){let x=Tv(m);S=wv(v[N],x,c)}return S}function px(l,r=[],o=[],c="",f=!1){let m=(v,S,N=f,x)=>{let b={relativePath:x===void 0?v.path||"":x,caseSensitive:v.caseSensitive===!0,childrenIndex:S,route:v};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(c)&&N)return;bt(b.relativePath.startsWith(c),`Absolute route path "${b.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(c.length)}let T=tl([c,b.relativePath]),j=o.concat(b);v.children&&v.children.length>0&&(bt(v.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${T}".`),px(v.children,r,j,T,N)),!(v.path==null&&!v.index)&&r.push({path:T,score:Sv(T,v.index),routesMeta:j})};return l.forEach((v,S)=>{var N;if(v.path===""||!((N=v.path)!=null&&N.includes("?")))m(v,S);else for(let x of yx(v.path))m(v,S,!0,x)}),r}function yx(l){let r=l.split("/");if(r.length===0)return[];let[o,...c]=r,f=o.endsWith("?"),m=o.replace(/\?$/,"");if(c.length===0)return f?[m,""]:[m];let v=yx(c.join("/")),S=[];return S.push(...v.map(N=>N===""?m:[m,N].join("/"))),f&&S.push(...v),S.map(N=>l.startsWith("/")&&N===""?"/":N)}function gv(l){l.sort((r,o)=>r.score!==o.score?o.score-r.score:jv(r.routesMeta.map(c=>c.childrenIndex),o.routesMeta.map(c=>c.childrenIndex)))}var xv=/^:[\w-]+$/,pv=3,yv=2,vv=1,bv=10,Nv=-2,pg=l=>l==="*";function Sv(l,r){let o=l.split("/"),c=o.length;return o.some(pg)&&(c+=Nv),r&&(c+=yv),o.filter(f=>!pg(f)).reduce((f,m)=>f+(xv.test(m)?pv:m===""?vv:bv),c)}function jv(l,r){return l.length===r.length&&l.slice(0,-1).every((c,f)=>c===r[f])?l[l.length-1]-r[r.length-1]:0}function wv(l,r,o=!1){let{routesMeta:c}=l,f={},m="/",v=[];for(let S=0;S<c.length;++S){let N=c[S],x=S===c.length-1,b=m==="/"?r:r.slice(m.length)||"/",T=Ic({path:N.relativePath,caseSensitive:N.caseSensitive,end:x},b),j=N.route;if(!T&&x&&o&&!c[c.length-1].route.index&&(T=Ic({path:N.relativePath,caseSensitive:N.caseSensitive,end:!1},b)),!T)return null;Object.assign(f,T.params),v.push({params:f,pathname:tl([m,T.pathname]),pathnameBase:Rv(tl([m,T.pathnameBase])),route:j}),T.pathnameBase!=="/"&&(m=tl([m,T.pathnameBase]))}return v}function Ic(l,r){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[o,c]=Ev(l.path,l.caseSensitive,l.end),f=r.match(o);if(!f)return null;let m=f[0],v=m.replace(/(.)\/+$/,"$1"),S=f.slice(1);return{params:c.reduce((x,{paramName:b,isOptional:T},j)=>{if(b==="*"){let C=S[j]||"";v=m.slice(0,m.length-C.length).replace(/(.)\/+$/,"$1")}const D=S[j];return T&&!D?x[b]=void 0:x[b]=(D||"").replace(/%2F/g,"/"),x},{}),pathname:m,pathnameBase:v,pattern:l}}function Ev(l,r=!1,o=!0){Ja(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let c=[],f="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(v,S,N)=>(c.push({paramName:S,isOptional:N!=null}),N?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(c.push({paramName:"*"}),f+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?f+="\\/*$":l!==""&&l!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,r?void 0:"i"),c]}function Tv(l){try{return l.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Ja(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),l}}function al(l,r){if(r==="/")return l;if(!l.toLowerCase().startsWith(r.toLowerCase()))return null;let o=r.endsWith("/")?r.length-1:r.length,c=l.charAt(o);return c&&c!=="/"?null:l.slice(o)||"/"}var Mv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Cv(l,r="/"){let{pathname:o,search:c="",hash:f=""}=typeof l=="string"?Bs(l):l,m;return o?(o=o.replace(/\/\/+/g,"/"),o.startsWith("/")?m=yg(o.substring(1),"/"):m=yg(o,r)):m=r,{pathname:m,search:Dv(c),hash:Av(f)}}function yg(l,r){let o=r.replace(/\/+$/,"").split("/");return l.split("/").forEach(f=>{f===".."?o.length>1&&o.pop():f!=="."&&o.push(f)}),o.length>1?o.join("/"):"/"}function bf(l,r,o,c){return`Cannot include a '${l}' character in a manually specified \`to.${r}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ov(l){return l.filter((r,o)=>o===0||r.route.path&&r.route.path.length>0)}function Zf(l){let r=Ov(l);return r.map((o,c)=>c===r.length-1?o.pathname:o.pathnameBase)}function Wf(l,r,o,c=!1){let f;typeof l=="string"?f=Bs(l):(f={...l},bt(!f.pathname||!f.pathname.includes("?"),bf("?","pathname","search",f)),bt(!f.pathname||!f.pathname.includes("#"),bf("#","pathname","hash",f)),bt(!f.search||!f.search.includes("#"),bf("#","search","hash",f)));let m=l===""||f.pathname==="",v=m?"/":f.pathname,S;if(v==null)S=o;else{let T=r.length-1;if(!c&&v.startsWith("..")){let j=v.split("/");for(;j[0]==="..";)j.shift(),T-=1;f.pathname=j.join("/")}S=T>=0?r[T]:"/"}let N=Cv(f,S),x=v&&v!=="/"&&v.endsWith("/"),b=(m||v===".")&&o.endsWith("/");return!N.pathname.endsWith("/")&&(x||b)&&(N.pathname+="/"),N}var tl=l=>l.join("/").replace(/\/\/+/g,"/"),Rv=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),Dv=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,Av=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,kv=class{constructor(l,r,o,c=!1){this.status=l,this.statusText=r||"",this.internal=c,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function _v(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function zv(l){return l.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var vx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function bx(l,r){let o=l;if(typeof o!="string"||!Mv.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let c=o,f=!1;if(vx)try{let m=new URL(window.location.href),v=o.startsWith("//")?new URL(m.protocol+o):new URL(o),S=al(v.pathname,r);v.origin===m.origin&&S!=null?o=S+v.search+v.hash:f=!0}catch{Ja(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:f,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Nx=["POST","PUT","PATCH","DELETE"];new Set(Nx);var Uv=["GET",...Nx];new Set(Uv);var Vr=U.createContext(null);Vr.displayName="DataRouter";var no=U.createContext(null);no.displayName="DataRouterState";var Lv=U.createContext(!1),Sx=U.createContext({isTransitioning:!1});Sx.displayName="ViewTransition";var Hv=U.createContext(new Map);Hv.displayName="Fetchers";var qv=U.createContext(null);qv.displayName="Await";var La=U.createContext(null);La.displayName="Navigation";var fu=U.createContext(null);fu.displayName="Location";var On=U.createContext({outlet:null,matches:[],isDataRoute:!1});On.displayName="Route";var Qf=U.createContext(null);Qf.displayName="RouteError";var jx="REACT_ROUTER_ERROR",Bv="REDIRECT",Vv="ROUTE_ERROR_RESPONSE";function Yv(l){if(l.startsWith(`${jx}:${Bv}:{`))try{let r=JSON.parse(l.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 $v(l){if(l.startsWith(`${jx}:${Vv}:{`))try{let r=JSON.parse(l.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new kv(r.status,r.statusText,r.data)}catch{}}function Pv(l,{relative:r}={}){bt(Yr(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:c}=U.useContext(La),{hash:f,pathname:m,search:v}=hu(l,{relative:r}),S=m;return o!=="/"&&(S=m==="/"?o:tl([o,m])),c.createHref({pathname:S,search:v,hash:f})}function Yr(){return U.useContext(fu)!=null}function Ql(){return bt(Yr(),"useLocation() may be used only in the context of a <Router> component."),U.useContext(fu).location}var wx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ex(l){U.useContext(La).static||U.useLayoutEffect(l)}function lo(){let{isDataRoute:l}=U.useContext(On);return l?nb():Gv()}function Gv(){bt(Yr(),"useNavigate() may be used only in the context of a <Router> component.");let l=U.useContext(Vr),{basename:r,navigator:o}=U.useContext(La),{matches:c}=U.useContext(On),{pathname:f}=Ql(),m=JSON.stringify(Zf(c)),v=U.useRef(!1);return Ex(()=>{v.current=!0}),U.useCallback((N,x={})=>{if(Ja(v.current,wx),!v.current)return;if(typeof N=="number"){o.go(N);return}let b=Wf(N,JSON.parse(m),f,x.relative==="path");l==null&&r!=="/"&&(b.pathname=b.pathname==="/"?r:tl([r,b.pathname])),(x.replace?o.replace:o.push)(b,x.state,x)},[r,o,m,f,l])}U.createContext(null);function hu(l,{relative:r}={}){let{matches:o}=U.useContext(On),{pathname:c}=Ql(),f=JSON.stringify(Zf(o));return U.useMemo(()=>Wf(l,JSON.parse(f),c,r==="path"),[l,f,c,r])}function Fv(l,r){return Tx(l,r)}function Tx(l,r,o,c,f){var B;bt(Yr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:m}=U.useContext(La),{matches:v}=U.useContext(On),S=v[v.length-1],N=S?S.params:{},x=S?S.pathname:"/",b=S?S.pathnameBase:"/",T=S&&S.route;{let J=T&&T.path||"";Cx(x,!T||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 j=Ql(),D;if(r){let J=typeof r=="string"?Bs(r):r;bt(b==="/"||((B=J.pathname)==null?void 0:B.startsWith(b)),`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 "${b}" but pathname "${J.pathname}" was given in the \`location\` prop.`),D=J}else D=j;let C=D.pathname||"/",M=C;if(b!=="/"){let J=b.replace(/^\//,"").split("/");M="/"+C.replace(/^\//,"").split("/").slice(J.length).join("/")}let A=xx(l,{pathname:M});Ja(T||A!=null,`No routes matched location "${D.pathname}${D.search}${D.hash}" `),Ja(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${D.pathname}${D.search}${D.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let I=Xv(A&&A.map(J=>Object.assign({},J,{params:Object.assign({},N,J.params),pathname:tl([b,m.encodeLocation?m.encodeLocation(J.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:J.pathname]),pathnameBase:J.pathnameBase==="/"?b:tl([b,m.encodeLocation?m.encodeLocation(J.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:J.pathnameBase])})),v,o,c,f);return r&&I?U.createElement(fu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...D},navigationType:"POP"}},I):I}function Zv(){let l=ab(),r=_v(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),o=l instanceof Error?l.stack:null,c="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:c},m={padding:"2px 4px",backgroundColor:c},v=null;return console.error("Error handled by React Router default ErrorBoundary:",l),v=U.createElement(U.Fragment,null,U.createElement("p",null,"💿 Hey developer 👋"),U.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",U.createElement("code",{style:m},"ErrorBoundary")," or"," ",U.createElement("code",{style:m},"errorElement")," prop on your route.")),U.createElement(U.Fragment,null,U.createElement("h2",null,"Unexpected Application Error!"),U.createElement("h3",{style:{fontStyle:"italic"}},r),o?U.createElement("pre",{style:f},o):null,v)}var Wv=U.createElement(Zv,null),Mx=class extends U.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,r){return r.location!==l.location||r.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:r.error,location:r.location,revalidation:l.revalidation||r.revalidation}}componentDidCatch(l,r){this.props.onError?this.props.onError(l,r):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const o=$v(l.digest);o&&(l=o)}let r=l!==void 0?U.createElement(On.Provider,{value:this.props.routeContext},U.createElement(Qf.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?U.createElement(Qv,{error:l},r):r}};Mx.contextType=Lv;var Nf=new WeakMap;function Qv({children:l,error:r}){let{basename:o}=U.useContext(La);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let c=Yv(r.digest);if(c){let f=Nf.get(r);if(f)throw f;let m=bx(c.location,o);if(vx&&!Nf.get(r))if(m.isExternal||c.reloadDocument)window.location.href=m.absoluteURL||m.to;else{const v=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:c.replace}));throw Nf.set(r,v),v}return U.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m.absoluteURL||m.to}`})}}return l}function Iv({routeContext:l,match:r,children:o}){let c=U.useContext(Vr);return c&&c.static&&c.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=r.route.id),U.createElement(On.Provider,{value:l},o)}function Xv(l,r=[],o=null,c=null,f=null){if(l==null){if(!o)return null;if(o.errors)l=o.matches;else if(r.length===0&&!o.initialized&&o.matches.length>0)l=o.matches;else return null}let m=l,v=o==null?void 0:o.errors;if(v!=null){let b=m.findIndex(T=>T.route.id&&(v==null?void 0:v[T.route.id])!==void 0);bt(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(v).join(",")}`),m=m.slice(0,Math.min(m.length,b+1))}let S=!1,N=-1;if(o)for(let b=0;b<m.length;b++){let T=m[b];if((T.route.HydrateFallback||T.route.hydrateFallbackElement)&&(N=b),T.route.id){let{loaderData:j,errors:D}=o,C=T.route.loader&&!j.hasOwnProperty(T.route.id)&&(!D||D[T.route.id]===void 0);if(T.route.lazy||C){S=!0,N>=0?m=m.slice(0,N+1):m=[m[0]];break}}}let x=o&&c?(b,T)=>{var j,D;c(b,{location:o.location,params:((D=(j=o.matches)==null?void 0:j[0])==null?void 0:D.params)??{},unstable_pattern:zv(o.matches),errorInfo:T})}:void 0;return m.reduceRight((b,T,j)=>{let D,C=!1,M=null,A=null;o&&(D=v&&T.route.id?v[T.route.id]:void 0,M=T.route.errorElement||Wv,S&&(N<0&&j===0?(Cx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,A=null):N===j&&(C=!0,A=T.route.hydrateFallbackElement||null)));let I=r.concat(m.slice(0,j+1)),B=()=>{let J;return D?J=M:C?J=A:T.route.Component?J=U.createElement(T.route.Component,null):T.route.element?J=T.route.element:J=b,U.createElement(Iv,{match:T,routeContext:{outlet:b,matches:I,isDataRoute:o!=null},children:J})};return o&&(T.route.ErrorBoundary||T.route.errorElement||j===0)?U.createElement(Mx,{location:o.location,revalidation:o.revalidation,component:M,error:D,children:B(),routeContext:{outlet:null,matches:I,isDataRoute:!0},onError:x}):B()},null)}function If(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Jv(l){let r=U.useContext(Vr);return bt(r,If(l)),r}function Kv(l){let r=U.useContext(no);return bt(r,If(l)),r}function eb(l){let r=U.useContext(On);return bt(r,If(l)),r}function Xf(l){let r=eb(l),o=r.matches[r.matches.length-1];return bt(o.route.id,`${l} can only be used on routes that contain a unique "id"`),o.route.id}function tb(){return Xf("useRouteId")}function ab(){var c;let l=U.useContext(Qf),r=Kv("useRouteError"),o=Xf("useRouteError");return l!==void 0?l:(c=r.errors)==null?void 0:c[o]}function nb(){let{router:l}=Jv("useNavigate"),r=Xf("useNavigate"),o=U.useRef(!1);return Ex(()=>{o.current=!0}),U.useCallback(async(f,m={})=>{Ja(o.current,wx),o.current&&(typeof f=="number"?await l.navigate(f):await l.navigate(f,{fromRouteId:r,...m}))},[l,r])}var vg={};function Cx(l,r,o){!r&&!vg[l]&&(vg[l]=!0,Ja(!1,o))}U.memo(lb);function lb({routes:l,future:r,state:o,onError:c}){return Tx(l,void 0,o,c,r)}function sb({to:l,replace:r,state:o,relative:c}){bt(Yr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:f}=U.useContext(La);Ja(!f,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:m}=U.useContext(On),{pathname:v}=Ql(),S=lo(),N=Wf(l,Zf(m),v,c==="path"),x=JSON.stringify(N);return U.useEffect(()=>{S(JSON.parse(x),{replace:r,state:o,relative:c})},[S,x,c,r,o]),null}function el(l){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 rb({basename:l="/",children:r=null,location:o,navigationType:c="POP",navigator:f,static:m=!1,unstable_useTransitions:v}){bt(!Yr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let S=l.replace(/^\/*/,"/"),N=U.useMemo(()=>({basename:S,navigator:f,static:m,unstable_useTransitions:v,future:{}}),[S,f,m,v]);typeof o=="string"&&(o=Bs(o));let{pathname:x="/",search:b="",hash:T="",state:j=null,key:D="default"}=o,C=U.useMemo(()=>{let M=al(x,S);return M==null?null:{location:{pathname:M,search:b,hash:T,state:j,key:D},navigationType:c}},[S,x,b,T,j,D,c]);return Ja(C!=null,`<Router basename="${S}"> is not able to match the URL "${x}${b}${T}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:U.createElement(La.Provider,{value:N},U.createElement(fu.Provider,{children:r,value:C}))}function ib({children:l,location:r}){return Fv(Af(l),r)}function Af(l,r=[]){let o=[];return U.Children.forEach(l,(c,f)=>{if(!U.isValidElement(c))return;let m=[...r,f];if(c.type===U.Fragment){o.push.apply(o,Af(c.props.children,m));return}bt(c.type===el,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),bt(!c.props.index||!c.props.children,"An index route cannot have child routes.");let v={id:c.props.id||m.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(v.children=Af(c.props.children,m)),o.push(v)}),o}var Zc="get",Wc="application/x-www-form-urlencoded";function so(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function ub(l){return so(l)&&l.tagName.toLowerCase()==="button"}function cb(l){return so(l)&&l.tagName.toLowerCase()==="form"}function ob(l){return so(l)&&l.tagName.toLowerCase()==="input"}function db(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function fb(l,r){return l.button===0&&(!r||r==="_self")&&!db(l)}var Vc=null;function hb(){if(Vc===null)try{new FormData(document.createElement("form"),0),Vc=!1}catch{Vc=!0}return Vc}var mb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Sf(l){return l!=null&&!mb.has(l)?(Ja(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Wc}"`),null):l}function gb(l,r){let o,c,f,m,v;if(cb(l)){let S=l.getAttribute("action");c=S?al(S,r):null,o=l.getAttribute("method")||Zc,f=Sf(l.getAttribute("enctype"))||Wc,m=new FormData(l)}else if(ub(l)||ob(l)&&(l.type==="submit"||l.type==="image")){let S=l.form;if(S==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let N=l.getAttribute("formaction")||S.getAttribute("action");if(c=N?al(N,r):null,o=l.getAttribute("formmethod")||S.getAttribute("method")||Zc,f=Sf(l.getAttribute("formenctype"))||Sf(S.getAttribute("enctype"))||Wc,m=new FormData(S,l),!hb()){let{name:x,type:b,value:T}=l;if(b==="image"){let j=x?`${x}.`:"";m.append(`${j}x`,"0"),m.append(`${j}y`,"0")}else x&&m.append(x,T)}}else{if(so(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=Zc,c=null,f=Wc,v=l}return m&&f==="text/plain"&&(v=m,m=void 0),{action:c,method:o.toLowerCase(),encType:f,formData:m,body:v}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Jf(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function xb(l,r,o,c){let f=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return o?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${c}`:f.pathname=`${f.pathname}.${c}`:f.pathname==="/"?f.pathname=`_root.${c}`:r&&al(f.pathname,r)==="/"?f.pathname=`${r.replace(/\/$/,"")}/_root.${c}`:f.pathname=`${f.pathname.replace(/\/$/,"")}.${c}`,f}async function pb(l,r){if(l.id in r)return r[l.id];try{let o=await import(l.module);return r[l.id]=o,o}catch(o){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function yb(l){return l==null?!1:l.href==null?l.rel==="preload"&&typeof l.imageSrcSet=="string"&&typeof l.imageSizes=="string":typeof l.rel=="string"&&typeof l.href=="string"}async function vb(l,r,o){let c=await Promise.all(l.map(async f=>{let m=r.routes[f.route.id];if(m){let v=await pb(m,o);return v.links?v.links():[]}return[]}));return jb(c.flat(1).filter(yb).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function bg(l,r,o,c,f,m){let v=(N,x)=>o[x]?N.route.id!==o[x].route.id:!0,S=(N,x)=>{var b;return o[x].pathname!==N.pathname||((b=o[x].route.path)==null?void 0:b.endsWith("*"))&&o[x].params["*"]!==N.params["*"]};return m==="assets"?r.filter((N,x)=>v(N,x)||S(N,x)):m==="data"?r.filter((N,x)=>{var T;let b=c.routes[N.route.id];if(!b||!b.hasLoader)return!1;if(v(N,x)||S(N,x))return!0;if(N.route.shouldRevalidate){let j=N.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((T=o[0])==null?void 0:T.params)||{},nextUrl:new URL(l,window.origin),nextParams:N.params,defaultShouldRevalidate:!0});if(typeof j=="boolean")return j}return!0}):[]}function bb(l,r,{includeHydrateFallback:o}={}){return Nb(l.map(c=>{let f=r.routes[c.route.id];if(!f)return[];let m=[f.module];return f.clientActionModule&&(m=m.concat(f.clientActionModule)),f.clientLoaderModule&&(m=m.concat(f.clientLoaderModule)),o&&f.hydrateFallbackModule&&(m=m.concat(f.hydrateFallbackModule)),f.imports&&(m=m.concat(f.imports)),m}).flat(1))}function Nb(l){return[...new Set(l)]}function Sb(l){let r={},o=Object.keys(l).sort();for(let c of o)r[c]=l[c];return r}function jb(l,r){let o=new Set;return new Set(r),l.reduce((c,f)=>{let m=JSON.stringify(Sb(f));return o.has(m)||(o.add(m),c.push({key:m,link:f})),c},[])}function Ox(){let l=U.useContext(Vr);return Jf(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function wb(){let l=U.useContext(no);return Jf(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Kf=U.createContext(void 0);Kf.displayName="FrameworkContext";function Rx(){let l=U.useContext(Kf);return Jf(l,"You must render this element inside a <HydratedRouter> element"),l}function Eb(l,r){let o=U.useContext(Kf),[c,f]=U.useState(!1),[m,v]=U.useState(!1),{onFocus:S,onBlur:N,onMouseEnter:x,onMouseLeave:b,onTouchStart:T}=r,j=U.useRef(null);U.useEffect(()=>{if(l==="render"&&v(!0),l==="viewport"){let M=I=>{I.forEach(B=>{v(B.isIntersecting)})},A=new IntersectionObserver(M,{threshold:.5});return j.current&&A.observe(j.current),()=>{A.disconnect()}}},[l]),U.useEffect(()=>{if(c){let M=setTimeout(()=>{v(!0)},100);return()=>{clearTimeout(M)}}},[c]);let D=()=>{f(!0)},C=()=>{f(!1),v(!1)};return o?l!=="intent"?[m,j,{}]:[m,j,{onFocus:Wi(S,D),onBlur:Wi(N,C),onMouseEnter:Wi(x,D),onMouseLeave:Wi(b,C),onTouchStart:Wi(T,D)}]:[!1,j,{}]}function Wi(l,r){return o=>{l&&l(o),o.defaultPrevented||r(o)}}function Tb({page:l,...r}){let{router:o}=Ox(),c=U.useMemo(()=>xx(o.routes,l,o.basename),[o.routes,l,o.basename]);return c?U.createElement(Cb,{page:l,matches:c,...r}):null}function Mb(l){let{manifest:r,routeModules:o}=Rx(),[c,f]=U.useState([]);return U.useEffect(()=>{let m=!1;return vb(l,r,o).then(v=>{m||f(v)}),()=>{m=!0}},[l,r,o]),c}function Cb({page:l,matches:r,...o}){let c=Ql(),{future:f,manifest:m,routeModules:v}=Rx(),{basename:S}=Ox(),{loaderData:N,matches:x}=wb(),b=U.useMemo(()=>bg(l,r,x,m,c,"data"),[l,r,x,m,c]),T=U.useMemo(()=>bg(l,r,x,m,c,"assets"),[l,r,x,m,c]),j=U.useMemo(()=>{if(l===c.pathname+c.search+c.hash)return[];let M=new Set,A=!1;if(r.forEach(B=>{var K;let J=m.routes[B.route.id];!J||!J.hasLoader||(!b.some(ce=>ce.route.id===B.route.id)&&B.route.id in N&&((K=v[B.route.id])!=null&&K.shouldRevalidate)||J.hasClientLoader?A=!0:M.add(B.route.id))}),M.size===0)return[];let I=xb(l,S,f.unstable_trailingSlashAwareDataRequests,"data");return A&&M.size>0&&I.searchParams.set("_routes",r.filter(B=>M.has(B.route.id)).map(B=>B.route.id).join(",")),[I.pathname+I.search]},[S,f.unstable_trailingSlashAwareDataRequests,N,c,m,b,r,l,v]),D=U.useMemo(()=>bb(T,m),[T,m]),C=Mb(T);return U.createElement(U.Fragment,null,j.map(M=>U.createElement("link",{key:M,rel:"prefetch",as:"fetch",href:M,...o})),D.map(M=>U.createElement("link",{key:M,rel:"modulepreload",href:M,...o})),C.map(({key:M,link:A})=>U.createElement("link",{key:M,nonce:o.nonce,...A,crossOrigin:A.crossOrigin??o.crossOrigin})))}function Ob(...l){return r=>{l.forEach(o=>{typeof o=="function"?o(r):o!=null&&(o.current=r)})}}var Rb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Rb&&(window.__reactRouterVersion="7.13.0")}catch{}function Db({basename:l,children:r,unstable_useTransitions:o,window:c}){let f=U.useRef();f.current==null&&(f.current=ov({window:c,v5Compat:!0}));let m=f.current,[v,S]=U.useState({action:m.action,location:m.location}),N=U.useCallback(x=>{o===!1?S(x):U.startTransition(()=>S(x))},[o]);return U.useLayoutEffect(()=>m.listen(N),[m,N]),U.createElement(rb,{basename:l,children:r,location:v.location,navigationType:v.action,navigator:m,unstable_useTransitions:o})}var Dx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ax=U.forwardRef(function({onClick:r,discover:o="render",prefetch:c="none",relative:f,reloadDocument:m,replace:v,state:S,target:N,to:x,preventScrollReset:b,viewTransition:T,unstable_defaultShouldRevalidate:j,...D},C){let{basename:M,unstable_useTransitions:A}=U.useContext(La),I=typeof x=="string"&&Dx.test(x),B=bx(x,M);x=B.to;let J=Pv(x,{relative:f}),[K,ce,P]=Eb(c,D),F=_b(x,{replace:v,state:S,target:N,preventScrollReset:b,relative:f,viewTransition:T,unstable_defaultShouldRevalidate:j,unstable_useTransitions:A});function Z(O){r&&r(O),O.defaultPrevented||F(O)}let ne=U.createElement("a",{...D,...P,href:B.absoluteURL||J,onClick:B.isExternal||m?r:Z,ref:Ob(C,ce),target:N,"data-discover":!I&&o==="render"?"true":void 0});return K&&!I?U.createElement(U.Fragment,null,ne,U.createElement(Tb,{page:J})):ne});Ax.displayName="Link";var kx=U.forwardRef(function({"aria-current":r="page",caseSensitive:o=!1,className:c="",end:f=!1,style:m,to:v,viewTransition:S,children:N,...x},b){let T=hu(v,{relative:x.relative}),j=Ql(),D=U.useContext(no),{navigator:C,basename:M}=U.useContext(La),A=D!=null&&qb(T)&&S===!0,I=C.encodeLocation?C.encodeLocation(T).pathname:T.pathname,B=j.pathname,J=D&&D.navigation&&D.navigation.location?D.navigation.location.pathname:null;o||(B=B.toLowerCase(),J=J?J.toLowerCase():null,I=I.toLowerCase()),J&&M&&(J=al(J,M)||J);const K=I!=="/"&&I.endsWith("/")?I.length-1:I.length;let ce=B===I||!f&&B.startsWith(I)&&B.charAt(K)==="/",P=J!=null&&(J===I||!f&&J.startsWith(I)&&J.charAt(I.length)==="/"),F={isActive:ce,isPending:P,isTransitioning:A},Z=ce?r:void 0,ne;typeof c=="function"?ne=c(F):ne=[c,ce?"active":null,P?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let O=typeof m=="function"?m(F):m;return U.createElement(Ax,{...x,"aria-current":Z,className:ne,ref:b,style:O,to:v,viewTransition:S},typeof N=="function"?N(F):N)});kx.displayName="NavLink";var Ab=U.forwardRef(({discover:l="render",fetcherKey:r,navigate:o,reloadDocument:c,replace:f,state:m,method:v=Zc,action:S,onSubmit:N,relative:x,preventScrollReset:b,viewTransition:T,unstable_defaultShouldRevalidate:j,...D},C)=>{let{unstable_useTransitions:M}=U.useContext(La),A=Lb(),I=Hb(S,{relative:x}),B=v.toLowerCase()==="get"?"get":"post",J=typeof S=="string"&&Dx.test(S),K=ce=>{if(N&&N(ce),ce.defaultPrevented)return;ce.preventDefault();let P=ce.nativeEvent.submitter,F=(P==null?void 0:P.getAttribute("formmethod"))||v,Z=()=>A(P||ce.currentTarget,{fetcherKey:r,method:F,navigate:o,replace:f,state:m,relative:x,preventScrollReset:b,viewTransition:T,unstable_defaultShouldRevalidate:j});M&&o!==!1?U.startTransition(()=>Z()):Z()};return U.createElement("form",{ref:C,method:B,action:I,onSubmit:c?N:K,...D,"data-discover":!J&&l==="render"?"true":void 0})});Ab.displayName="Form";function kb(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _x(l){let r=U.useContext(Vr);return bt(r,kb(l)),r}function _b(l,{target:r,replace:o,state:c,preventScrollReset:f,relative:m,viewTransition:v,unstable_defaultShouldRevalidate:S,unstable_useTransitions:N}={}){let x=lo(),b=Ql(),T=hu(l,{relative:m});return U.useCallback(j=>{if(fb(j,r)){j.preventDefault();let D=o!==void 0?o:uu(b)===uu(T),C=()=>x(l,{replace:D,state:c,preventScrollReset:f,relative:m,viewTransition:v,unstable_defaultShouldRevalidate:S});N?U.startTransition(()=>C()):C()}},[b,x,T,o,c,r,l,f,m,v,S,N])}var zb=0,Ub=()=>`__${String(++zb)}__`;function Lb(){let{router:l}=_x("useSubmit"),{basename:r}=U.useContext(La),o=tb(),c=l.fetch,f=l.navigate;return U.useCallback(async(m,v={})=>{let{action:S,method:N,encType:x,formData:b,body:T}=gb(m,r);if(v.navigate===!1){let j=v.fetcherKey||Ub();await c(j,o,v.action||S,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:b,body:T,formMethod:v.method||N,formEncType:v.encType||x,flushSync:v.flushSync})}else await f(v.action||S,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:b,body:T,formMethod:v.method||N,formEncType:v.encType||x,replace:v.replace,state:v.state,fromRouteId:o,flushSync:v.flushSync,viewTransition:v.viewTransition})},[c,f,r,o])}function Hb(l,{relative:r}={}){let{basename:o}=U.useContext(La),c=U.useContext(On);bt(c,"useFormAction must be used inside a RouteContext");let[f]=c.matches.slice(-1),m={...hu(l||".",{relative:r})},v=Ql();if(l==null){m.search=v.search;let S=new URLSearchParams(m.search),N=S.getAll("index");if(N.some(b=>b==="")){S.delete("index"),N.filter(T=>T).forEach(T=>S.append("index",T));let b=S.toString();m.search=b?`?${b}`:""}}return(!l||l===".")&&f.route.index&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(m.pathname=m.pathname==="/"?o:tl([o,m.pathname])),uu(m)}function qb(l,{relative:r}={}){let o=U.useContext(Sx);bt(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=_x("useViewTransitionState"),f=hu(l,{relative:r});if(!o.isTransitioning)return!1;let m=al(o.currentLocation.pathname,c)||o.currentLocation.pathname,v=al(o.nextLocation.pathname,c)||o.nextLocation.pathname;return Ic(f.pathname,v)!=null||Ic(f.pathname,m)!=null}var Bb=gx();const Vb=Gf(Bb);/**
|
|
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 zx=(...l)=>l.filter((r,o,c)=>!!r&&r.trim()!==""&&c.indexOf(r)===o).join(" ").trim();/**
|
|
66
|
-
* @license lucide-react v0.564.0 - ISC
|
|
67
|
-
*
|
|
68
|
-
* This source code is licensed under the ISC license.
|
|
69
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/const Yb=l=>l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
71
|
-
* @license lucide-react v0.564.0 - ISC
|
|
72
|
-
*
|
|
73
|
-
* This source code is licensed under the ISC license.
|
|
74
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/const $b=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,c)=>c?c.toUpperCase():o.toLowerCase());/**
|
|
76
|
-
* @license lucide-react v0.564.0 - ISC
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the ISC license.
|
|
79
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const Ng=l=>{const r=$b(l);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 Pb={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 Gb=l=>{for(const r in l)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 Fb=U.forwardRef(({color:l="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:c,className:f="",children:m,iconNode:v,...S},N)=>U.createElement("svg",{ref:N,...Pb,width:r,height:r,stroke:l,strokeWidth:c?Number(o)*24/Number(r):o,className:zx("lucide",f),...!m&&!Gb(S)&&{"aria-hidden":"true"},...S},[...v.map(([x,b])=>U.createElement(x,b)),...Array.isArray(m)?m:[m]]));/**
|
|
96
|
-
* @license lucide-react v0.564.0 - ISC
|
|
97
|
-
*
|
|
98
|
-
* This source code is licensed under the ISC license.
|
|
99
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const _e=(l,r)=>{const o=U.forwardRef(({className:c,...f},m)=>U.createElement(Fb,{ref:m,iconNode:r,className:zx(`lucide-${Yb(Ng(l))}`,`lucide-${l}`,c),...f}));return o.displayName=Ng(l),o};/**
|
|
101
|
-
* @license lucide-react v0.564.0 - ISC
|
|
102
|
-
*
|
|
103
|
-
* This source code is licensed under the ISC license.
|
|
104
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const Zb=[["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"}]],Ux=_e("activity",Zb);/**
|
|
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 Wb=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Qb=_e("arrow-down",Wb);/**
|
|
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 Ib=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Sg=_e("arrow-right",Ib);/**
|
|
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 Xb=[["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"}]],Jb=_e("arrow-up-down",Xb);/**
|
|
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 Kb=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],e1=_e("arrow-up",Kb);/**
|
|
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 t1=[["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"}]],a1=_e("bell",t1);/**
|
|
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 n1=[["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"}]],jg=_e("briefcase",n1);/**
|
|
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 l1=[["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"}]],eh=_e("calendar",l1);/**
|
|
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 s1=[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]],r1=_e("chart-no-axes-column",s1);/**
|
|
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 i1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],kf=_e("check",i1);/**
|
|
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 u1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Lx=_e("chevron-down",u1);/**
|
|
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 c1=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],o1=_e("chevron-left",c1);/**
|
|
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 d1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],f1=_e("chevron-right",d1);/**
|
|
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 h1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],m1=_e("chevron-up",h1);/**
|
|
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"}]],x1=_e("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 p1=[["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"}]],nl=_e("circle-alert",p1);/**
|
|
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 y1=[["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"}]],wg=_e("circle-arrow-down",y1);/**
|
|
186
|
-
* @license lucide-react v0.564.0 - ISC
|
|
187
|
-
*
|
|
188
|
-
* This source code is licensed under the ISC license.
|
|
189
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
-
*/const v1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],mu=_e("circle-check-big",v1);/**
|
|
191
|
-
* @license lucide-react v0.564.0 - ISC
|
|
192
|
-
*
|
|
193
|
-
* This source code is licensed under the ISC license.
|
|
194
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
-
*/const b1=[["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"}]],N1=_e("circle-x",b1);/**
|
|
196
|
-
* @license lucide-react v0.564.0 - ISC
|
|
197
|
-
*
|
|
198
|
-
* This source code is licensed under the ISC license.
|
|
199
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
-
*/const S1=[["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"}]],Eg=_e("clipboard-list",S1);/**
|
|
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 j1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Xc=_e("clock",j1);/**
|
|
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 w1=[["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"}]],Hx=_e("external-link",w1);/**
|
|
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 E1=[["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"}]],T1=_e("eye-off",E1);/**
|
|
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 M1=[["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"}]],C1=_e("eye",M1);/**
|
|
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 O1=[["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"}]],_f=_e("file-text",O1);/**
|
|
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 R1=[["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"}]],D1=_e("git-pull-request",R1);/**
|
|
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 A1=[["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"}]],k1=_e("globe",A1);/**
|
|
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 _1=[["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"}]],z1=_e("house",_1);/**
|
|
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 U1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],L1=_e("info",U1);/**
|
|
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 H1=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],q1=_e("kanban",H1);/**
|
|
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 B1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],qx=_e("loader-circle",B1);/**
|
|
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 V1=[["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"}]],Bx=_e("map",V1);/**
|
|
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 Y1=[["path",{d:"M5 12h14",key:"1ays0h"}]],$1=_e("minus",Y1);/**
|
|
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 P1=[["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"}]],Vx=_e("pause",P1);/**
|
|
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 G1=[["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"}]],ro=_e("pen",G1);/**
|
|
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 F1=[["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"}]],qr=_e("play",F1);/**
|
|
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 Z1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Il=_e("plus",Z1);/**
|
|
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 W1=[["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"}]],Yx=_e("rotate-ccw",W1);/**
|
|
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 Q1=[["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"}]],I1=_e("save",Q1);/**
|
|
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 X1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],cu=_e("search",X1);/**
|
|
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 J1=[["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"}]],K1=_e("settings",J1);/**
|
|
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 e2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Tg=_e("square",e2);/**
|
|
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 t2=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],a2=_e("terminal",t2);/**
|
|
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 n2=[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]],l2=_e("test-tube-diagonal",n2);/**
|
|
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 s2=[["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"}]],$r=_e("trash-2",s2);/**
|
|
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 r2=[["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"}]],ou=_e("triangle-alert",r2);/**
|
|
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 i2=[["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"}]],u2=_e("wifi",i2);/**
|
|
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 c2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Pr=_e("x",c2);/**
|
|
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 o2=[["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"}]],Mg=_e("zap",o2),$x=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"}},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"}},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"}},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"}},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"}},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"}},{id:"pr-resolver",label:"PR Resolver",processName:"pr-resolver",color:{bg:"bg-teal-500",border:"border-teal-500/60"}},{id:"merger",label:"Merger",processName:"merger",color:{bg:"bg-cyan-500",border:"border-cyan-500/60"}}],Px=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"},triggerEndpoint:"/api/actions/run",scheduleTemplateKey:"executor",getEnabled:l=>l.executorEnabled??!0,getSchedule:l=>l.cronSchedule??"5 */2 * * *",settingsSection:"general",buildEnabledPatch:l=>({executorEnabled:l})},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"},triggerEndpoint:"/api/actions/review",scheduleTemplateKey:"reviewer",getEnabled:l=>l.reviewerEnabled??!0,getSchedule:l=>l.reviewerSchedule??"25 */3 * * *",settingsSection:"general",buildEnabledPatch:l=>({reviewerEnabled:l})},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"},triggerEndpoint:"/api/actions/qa",scheduleTemplateKey:"qa",getEnabled:l=>{var r;return((r=l.qa)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.qa)==null?void 0:r.schedule)??"45 2,10,18 * * *"},settingsSection:"general",buildEnabledPatch:(l,r)=>({qa:{...r.qa??{},enabled:l}})},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"},triggerEndpoint:"/api/actions/audit",scheduleTemplateKey:"audit",getEnabled:l=>{var r;return((r=l.audit)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.audit)==null?void 0:r.schedule)??"50 3 * * 1"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({audit:{...r.audit??{},enabled:l}})},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"},triggerEndpoint:"/api/actions/planner",scheduleTemplateKey:"slicer",getEnabled:l=>{var r;return((r=l.roadmapScanner)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.roadmapScanner)==null?void 0:r.slicerSchedule)??"35 */6 * * *"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({roadmapScanner:{...r.roadmapScanner??{},enabled:l}})},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"},triggerEndpoint:"/api/actions/analytics",scheduleTemplateKey:"analytics",getEnabled:l=>{var r;return((r=l.analytics)==null?void 0:r.enabled)??!1},getSchedule:l=>{var r;return((r=l.analytics)==null?void 0:r.schedule)??"0 6 * * 1"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({analytics:{...r.analytics??{},enabled:l}})},{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:l=>{var r;return((r=l.prResolver)==null?void 0:r.enabled)??!0},getSchedule:l=>{var r;return((r=l.prResolver)==null?void 0:r.schedule)??"15 6,14,22 * * *"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({prResolver:{...r.prResolver??{},enabled:l}})},{id:"merger",label:"Merger",processName:"merger",color:{bg:"bg-cyan-500",border:"border-cyan-500/60"},triggerEndpoint:"/api/actions/merge",scheduleTemplateKey:"merger",getEnabled:l=>{var r;return((r=l.merger)==null?void 0:r.enabled)??!1},getSchedule:l=>{var r;return((r=l.merger)==null?void 0:r.schedule)??"55 */4 * * *"},settingsSection:"advanced",buildEnabledPatch:(l,r)=>({merger:{...r.merger??{},enabled:l}})}];function d2(l){return Px.find(r=>r.id===l)}const th="";let ah=!1,Jc=null;function f2(l){ah=l}function Cg(l){Jc=l}function h2(){return ah}function nh(l){return encodeURIComponent(l.replace(/\//g,"~"))}function Dt(l){return ah&&Jc?l.replace("/api/",`/api/projects/${nh(Jc)}/`):l}function m2(){return ft("/api/mode")}function Gx(){return ft("/api/projects")}function g2(l){const r=nh(l);return ft(`/api/projects/${r}`,{method:"DELETE"})}async function ft(l,r){const o=`${th}${l}`,c=await fetch(o,{headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r});if(!c.ok){const f=await c.json().catch(()=>({error:"Unknown error"}));throw new Error(f.error||`HTTP ${c.status}: ${c.statusText}`)}return c.json()}function jf(){return ft(Dt("/api/status"))}function Fx(){return ft(Dt("/api/prs"))}function x2(l,r){const o=`?lines=${encodeURIComponent(r)}`;return ft(Dt(`/api/logs/${encodeURIComponent(l)}${o}`))}function lh(){return ft(Dt("/api/config"))}async function Zx(){if(h2()){const r=(await Gx()).filter(c=>c.valid);return(await Promise.all(r.map(async c=>{try{const f=await ft(`/api/projects/${nh(c.name)}/config`);return{projectId:c.name,config:f}}catch(f){return console.error(`Failed to fetch config for project ${c.name}`,f),null}}))).filter(c=>c!==null)}else{const l=await lh();return[{projectId:Jc||"current",config:l}]}}function sh(l){return ft(Dt("/api/config"),{method:"PUT",body:JSON.stringify(l)})}function p2(){return ft(Dt("/api/doctor"))}function Wx(){return ft(Dt("/api/schedule-info"))}function y2(){return ft(Dt("/api/actions/review"),{method:"POST"})}function Qx(l){const r=d2(l);return r?ft(Dt(r.triggerEndpoint),{method:"POST"}):Promise.reject(new Error(`Unknown job ID: ${l}`))}function zf(){return ft(Dt("/api/actions/install-cron"),{method:"POST"})}function v2(){return ft(Dt("/api/actions/uninstall-cron"),{method:"POST"})}function b2(l="all"){return ft(Dt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:l})})}const Fl=["Draft","Ready","In Progress","Review","Done"];function Ix(){return ft(Dt("/api/board/status"))}function N2(l){return ft(Dt("/api/board/issues"),{method:"POST",body:JSON.stringify(l)})}function Xx(l,r){return ft(Dt(`/api/board/issues/${l}/move`),{method:"PATCH",body:JSON.stringify({column:r})})}async function S2(l){const r=`${th}${Dt(`/api/board/issues/${l}`)}`,o=await fetch(r,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!o.ok){const c=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(c.error||`HTTP ${o.status}: ${o.statusText}`)}}function j2(){return ft(Dt("/api/actions/clear-lock"),{method:"POST"})}function w2(l,r=[],o){const c=(o==null?void 0:o.enabled)??!0,f=U.useRef(l);f.current=l,U.useEffect(()=>{if(!c)return;const m=`${th}${Dt("/api/status/events")}`,v=new EventSource(m);return v.addEventListener("status_changed",S=>{try{const N=JSON.parse(S.data);f.current(N)}catch{}}),()=>{v.close()}},[c,...r])}function E2(){return ft("/api/queue/status")}function T2(l){const r=`?window=${encodeURIComponent(l)}`;return ft(`/api/queue/analytics${r}`)}function M2(){return ft("/api/global-notifications")}function Og(l){return ft("/api/global-notifications",{method:"PUT",body:JSON.stringify(l)})}function C2(){return ft(Dt("/api/roadmap"))}function O2(){return ft(Dt("/api/roadmap/scan"),{method:"POST"})}function Jx(l){return ft(Dt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:l})})}function mn(l,r=[],o){const c=(o==null?void 0:o.enabled)??!0,[f,m]=U.useState(null),[v,S]=U.useState(!0),[N,x]=U.useState(null),b=U.useRef(l);b.current=l;const T=U.useRef(()=>{(async()=>{x(null);try{const D=await b.current();m(D)}catch(D){x(D instanceof Error?D:new Error("Unknown error"))}})()});return U.useEffect(()=>{if(!c)return;let j=!1;return S(!0),x(null),(async()=>{try{const C=await b.current();j||m(C)}catch(C){j||x(C instanceof Error?C:new Error("Unknown error"))}finally{j||S(!1)}})(),()=>{j=!0}},[...r,c]),{data:f,loading:v,error:N,refetch:T.current}}const Rg=l=>{let r;const o=new Set,c=(x,b)=>{const T=typeof x=="function"?x(r):x;if(!Object.is(T,r)){const j=r;r=b??(typeof T!="object"||T===null)?T:Object.assign({},r,T),o.forEach(D=>D(r,j))}},f=()=>r,S={setState:c,getState:f,getInitialState:()=>N,subscribe:x=>(o.add(x),()=>o.delete(x))},N=r=l(c,f,S);return S},R2=l=>l?Rg(l):Rg,D2=l=>l;function A2(l,r=D2){const o=ze.useSyncExternalStore(l.subscribe,()=>r(l.getState()),()=>r(l.getInitialState()));return ze.useDebugValue(o),o}const Dg=l=>{const r=R2(l),o=c=>A2(r,c);return Object.assign(o,r),o},k2=l=>l?Dg(l):Dg,_2=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,It=k2((l,r)=>({projectName:"Night Watch",setProjectName:o=>l({projectName:o}),toasts:[],addToast:o=>{const c=Math.random().toString(36).substring(7);l(f=>({toasts:[...f.toasts,{...o,id:c}]})),setTimeout(()=>{l(f=>({toasts:f.toasts.filter(m=>m.id!==c)}))},5e3)},removeToast:o=>l(c=>({toasts:c.toasts.filter(f=>f.id!==o)})),status:null,setStatus:o=>l(c=>!c.status||new Date(o.timestamp)>new Date(c.status.timestamp)?{status:o}:c),globalModeLoading:!0,setGlobalModeLoading:o=>l({globalModeLoading:o}),isGlobalMode:!1,setGlobalMode:o=>{f2(o),l({isGlobalMode:o})},projects:[],setProjects:o=>l({projects:o}),selectedProjectId:_2,selectProject:o=>{Cg(o),o?localStorage.setItem("nw-selected-project",o):localStorage.removeItem("nw-selected-project"),l(c=>{const f=c.projects.find(m=>m.name===o);return{selectedProjectId:o,...f?{projectName:f.name}:{}}})},removeProjectFromList:o=>{l(c=>{var S;const f=c.projects.filter(N=>N.name!==o),m=c.selectedProjectId===o,v=m?((S=f[0])==null?void 0:S.name)??null:c.selectedProjectId;return m&&(Cg(v),v?localStorage.setItem("nw-selected-project",v):localStorage.removeItem("nw-selected-project")),{projects:f,selectedProjectId:v,...m&&f[0]?{projectName:f[0].name}:{}}})},getJobStates:()=>{const{status:o}=r(),c=o==null?void 0:o.config;return Px.map(f=>({id:f.id,label:f.label,processName:f.processName,color:f.color,enabled:c?f.getEnabled(c):!0,schedule:c?f.getSchedule(c):"",triggerEndpoint:f.triggerEndpoint}))}})),z2=()=>{const[l,r]=U.useState(!1),{projectName:o,isGlobalMode:c,projects:f,selectedProjectId:m,selectProject:v,globalModeLoading:S}=It(),{data:N}=mn(Fx,[m],{enabled:!S}),x=(N==null?void 0:N.length)??0,b=U.useMemo(()=>[{icon:z1,label:"Dashboard",path:"/",section:"Overview"},{icon:a2,label:"Logs",path:"/logs"},{icon:q1,label:"Board",path:"/board",section:"Work"},{icon:D1,label:"Pull Requests",path:"/prs",badge:x},{icon:Bx,label:"Roadmap",path:"/roadmap"},{icon:eh,label:"Schedules",path:"/scheduling",section:"Automation"},{icon:K1,label:"Settings",path:"/settings",section:"Config"}],[x]);return s.jsxs("aside",{className:`
|
|
346
|
-
relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
|
|
347
|
-
${l?"w-20":"w-72"} h-screen flex-shrink-0 z-50
|
|
348
|
-
bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
|
|
349
|
-
`,children:[s.jsx("div",{className:`p-6 border-b border-white/5 ${l?"items-center justify-center flex":""}`,children:l?s.jsx("div",{className:"relative group",children:s.jsx("div",{className:"h-10 w-10 bg-indigo-600 rounded-xl flex items-center justify-center text-white font-bold cursor-pointer shadow-lg shadow-indigo-500/20 group-hover:bg-indigo-500 transition-colors bg-gradient-to-br from-indigo-500 to-indigo-700",title:"Switch Project",children:"NW"})}):s.jsxs("div",{className:"relative w-full",children:[s.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-3 block pl-1",children:c?"Projects":"Workspace"}),c?s.jsxs("div",{className:"relative",children:[s.jsx(jg,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-indigo-400 pointer-events-none"}),s.jsx("select",{value:m||"",onChange:T=>v(T.target.value),className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 pl-10 pr-8 text-sm font-medium shadow-sm appearance-none cursor-pointer hover:border-white/20 transition-colors focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20",children:f.filter(T=>T.valid).map(T=>s.jsx("option",{value:T.name,children:T.name},T.name))}),s.jsx(x1,{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(jg,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:o})]})]})}),s.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:s.jsx("ul",{className:"space-y-1.5 px-4",children:b.map(T=>s.jsxs(ze.Fragment,{children:[T.section&&!l&&s.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:T.section}),s.jsx("li",{children:s.jsx(kx,{to:T.path,className:({isActive:j})=>`
|
|
350
|
-
flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
|
|
351
|
-
${j?"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"}
|
|
352
|
-
${l?"justify-center":""}
|
|
353
|
-
`,children:({isActive:j})=>s.jsxs(s.Fragment,{children:[s.jsx(T.icon,{className:`h-5 w-5 transition-colors ${j?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${l?"":"mr-3.5"}`}),!l&&s.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:T.label}),T.badge&&(l?s.jsx("span",{className:"absolute top-2 right-2 h-2 w-2 bg-indigo-500 rounded-full border border-[#030712] shadow-sm"}):s.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-md ${j?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:T.badge})),j&&!l&&s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 bg-indigo-500 rounded-r-full shadow-[0_0_10px_rgba(99,102,241,0.4)]"}),l&&s.jsx("div",{className:"absolute left-full ml-4 px-3 py-1.5 bg-[#111827] text-white text-xs font-medium rounded-md border border-white/10 shadow-xl opacity-0 group-hover:opacity-100 pointer-events-none whitespace-nowrap z-50 transition-opacity translate-x-2 group-hover:translate-x-0",children:T.label})]})})})]},T.path))})}),s.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:s.jsx("button",{onClick:()=>r(!l),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:l?s.jsx(f1,{className:"h-5 w-5"}):s.jsx(o1,{className:"h-5 w-5"})})})]})},U2=()=>{const{projectName:l}=It();return s.jsxs("header",{className:"h-20 flex items-center justify-between px-8 z-40 sticky top-0 bg-[#030712]/80 backdrop-blur-md border-b border-white/5",children:[s.jsxs("div",{className:"flex items-center space-x-6",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs font-mono text-indigo-400 mb-0.5 tracking-tight",children:"Active Project"}),s.jsx("h1",{className:"text-xl font-semibold text-white tracking-tight leading-none",children:l})]}),s.jsx("div",{className:"h-8 w-px bg-white/10 mx-2"}),s.jsxs("div",{className:"flex items-center space-x-2 text-xs font-medium px-3 py-1.5 rounded-full border transition-colors bg-emerald-500/5 text-emerald-400 border-emerald-500/20 shadow-[0_0_10px_-4px_rgba(16,185,129,0.3)]",children:[s.jsx(u2,{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(cu,{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(a1,{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"})]})]})},L2=({toast:l,onDismiss:r})=>{const o={success:s.jsx(mu,{className:"h-5 w-5 text-green-400"}),error:s.jsx(nl,{className:"h-5 w-5 text-red-400"}),info:s.jsx(L1,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(ou,{className:"h-5 w-5 text-amber-400"})},c={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:`
|
|
354
|
-
pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
|
|
355
|
-
bg-slate-900 border border-slate-800 border-l-4 ${c[l.type]}
|
|
356
|
-
shadow-lg ring-1 ring-black ring-opacity-5 transition-all
|
|
357
|
-
animate-in slide-in-from-right-full fade-in duration-300
|
|
358
|
-
`,children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:o[l.type]}),s.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:l.title}),l.message&&s.jsx("p",{className:"mt-1 text-sm text-slate-400",children:l.message})]}),s.jsx("div",{className:"ml-4 flex flex-shrink-0",children:s.jsxs("button",{type:"button",className:"inline-flex rounded-md text-slate-400 hover:text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",onClick:()=>r(l.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(Pr,{className:"h-5 w-5"})]})})]})})})},H2=()=>{const{toasts:l,removeToast:r}=It();return s.jsx("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 flex flex-col items-end px-4 py-6 sm:items-end sm:p-6 z-[100] gap-4",children:l.map(o=>s.jsx(L2,{toast:o,onDismiss:r},o.id))})};function q2(){const{setGlobalMode:l,setGlobalModeLoading:r,setProjects:o,selectProject:c,selectedProjectId:f}=It();U.useEffect(()=>{r(!0),m2().then(async({globalMode:m})=>{if(l(m),!m)return;const v=await Gx();o(v);const S=v.filter(N=>N.valid);f&&S.some(N=>N.name===f)?c(f):S.length>0&&c(S[0].name)}).catch(()=>{l(!1)}).finally(()=>{r(!1)})},[])}function Ag(l){if(!(l!=null&&l.timestamp))return Number.NEGATIVE_INFINITY;const r=new Date(l.timestamp).getTime();return Number.isNaN(r)?Number.NEGATIVE_INFINITY:r}function Yc(l,r){return l?r?Ag(l)>=Ag(r)?l:r:l:r}function B2(){const{setStatus:l,setProjectName:r,selectedProjectId:o,globalModeLoading:c,status:f}=It(),m=U.useRef(null);m.current=It.getState().status,w2(v=>{Yc(v,m.current)===v&&l(v)},[o,c],{enabled:!c}),U.useEffect(()=>{if(c)return;jf().then(S=>{Yc(S,m.current)===S&&l(S)}).catch(()=>{});const v=setInterval(()=>{jf().then(S=>{Yc(S,m.current)===S&&l(S)}).catch(()=>{})},3e4);return()=>clearInterval(v)},[o,c,l]),U.useEffect(()=>{const v=()=>{jf().then(S=>{Yc(S,m.current)===S&&l(S)}).catch(()=>{})};return window.addEventListener("focus",v),()=>window.removeEventListener("focus",v)},[o,l]),U.useEffect(()=>{f!=null&&f.projectName&&r(f.projectName)},[f==null?void 0:f.projectName,r])}const $e=({children:l,className:r="",onClick:o})=>s.jsxs("div",{className:`
|
|
359
|
-
relative bg-[#0b101b] rounded-xl border border-white/5
|
|
360
|
-
shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
|
|
361
|
-
transition-all duration-300
|
|
362
|
-
${o?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
|
|
363
|
-
${r}
|
|
364
|
-
`,onClick:o,children:[o&&s.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),s.jsx("div",{className:"relative z-10",children:l})]}),Ve=({children:l,variant:r="primary",size:o="md",loading:c=!1,className:f="",disabled:m,...v})=>{const S="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]",N={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:`${S} ${N[r]} ${x[o]} ${f}`,disabled:m||c,...v,children:[c&&s.jsx(qx,{className:"mr-2 h-4 w-4 animate-spin"}),l]})},Lr=({children:l,variant:r="default",className:o=""})=>{const c={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 ${c[r]} ${o}`,children:l})},Kx={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"}},V2=({defaultColumn:l,onClose:r,onCreated:o})=>{const[c,f]=U.useState(""),[m,v]=U.useState(""),[S,N]=U.useState(l),[x,b]=U.useState(!1),[T,j]=U.useState(null),{addToast:D}=It(),C=async M=>{if(M.preventDefault(),!!c.trim()){b(!0),j(null);try{await N2({title:c.trim(),body:m,column:S}),D({title:"Issue created",message:`"${c.trim()}" added to ${S}`,type:"success"}),o(),r()}catch(A){j(A instanceof Error?A.message:"Failed to create issue")}finally{b(!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(Pr,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:C,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:c,onChange:M=>f(M.target.value),placeholder:"Issue title...",required:!0,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),s.jsx("select",{value:S,onChange:M=>N(M.target.value),className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:border-indigo-500/50 appearance-none cursor-pointer",children:Fl.map(M=>s.jsx("option",{value:M,children:M},M))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),s.jsx("textarea",{value:m,onChange:M=>v(M.target.value),placeholder:"Issue description...",rows:5,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-none font-mono"})]}),T&&s.jsx("p",{className:"text-sm text-red-400",children:T}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(Ve,{variant:"ghost",type:"button",onClick:r,children:"Cancel"}),s.jsx(Ve,{type:"submit",disabled:x||!c.trim(),children:x?"Creating...":"Create Issue"})]})]})]})]})},Y2=({issue:l,onClose:r,onMoved:o,onClosed:c})=>{const[f,m]=U.useState(!1),[v,S]=U.useState(!1),[N,x]=U.useState(!1),{addToast:b}=It(),T=async C=>{if(C!==l.column){m(!0);try{await Xx(l.number,C),b({title:"Issue moved",message:`#${l.number} moved to ${C}`,type:"success"}),o(),r()}catch(M){b({title:"Move failed",message:M instanceof Error?M.message:"Failed to move issue",type:"error"})}finally{m(!1)}}},j=async()=>{x(!1),S(!0);try{await S2(l.number),b({title:"Issue closed",message:`#${l.number} closed on GitHub`,type:"success"}),c(),r()}catch(C){b({title:"Close failed",message:C instanceof Error?C.message:"Failed to close issue",type:"error"})}finally{S(!1)}},D=l.column??"Draft";return s.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick: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:["#",l.number]}),s.jsx(Lr,{variant:Kx[D].badge,children:D})]}),s.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:l.title}),l.assignees.length>0&&s.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",l.assignees.join(", ")]})]}),s.jsx("button",{onClick: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(Pr,{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:"}),Fl.filter(C=>C!==l.column).map(C=>s.jsx("button",{onClick:()=>T(C),disabled:f,className:"text-xs px-2.5 py-1 rounded-md bg-slate-800 text-slate-300 hover:bg-slate-700 hover:text-slate-100 border border-slate-700 transition-colors disabled:opacity-50",children:C},C))]}),s.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[l.url&&!l.url.startsWith("local://")&&s.jsxs("a",{href:l.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center space-x-1 text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:[s.jsx(Hx,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:()=>x(!0),disabled:v,className:"text-xs px-2.5 py-1 rounded-md bg-red-500/10 text-red-400 hover:bg-red-500/20 border border-red-500/20 transition-colors disabled:opacity-50",children:v?"Closing...":"Close Issue"})]})]}),N&&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 #",l.number,': "',l.title,'"?']}),s.jsxs("div",{className:"flex justify-end space-x-3",children:[s.jsx(Ve,{variant:"ghost",onClick:()=>x(!1),children:"Cancel"}),s.jsx(Ve,{onClick:j,children:"Confirm"})]})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:l.body?s.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:l.body}):s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},$2=({issue:l,onClick:r,onDragStart:o})=>{const[c,f]=U.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:m=>{m.dataTransfer.setData("issueNumber",String(l.number)),m.dataTransfer.effectAllowed="move",f(!0),o(l)},onDragEnd:()=>f(!1),children:s.jsxs($e,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${c?"opacity-30":""}`,onClick:r,children:[s.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",l.number]}),s.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:l.title}),l.assignees.length>0&&s.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:l.assignees.join(", ")})]})})},P2=({name:l,issues:r,draggingIssue:o,onIssueClick:c,onNewIssue:f,onMoveIssue:m,onDragStart:v})=>{const S=Kx[l],[N,x]=U.useState(!1),b=o!==null&&o.column!==l;return s.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${N&&b?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:T=>{b&&(T.preventDefault(),T.dataTransfer.dropEffect="move",x(!0))},onDragLeave:()=>x(!1),onDrop:T=>{T.preventDefault(),x(!1),o&&o.column!==l&&m(o,l)},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${S.dot}`}),s.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:l}),s.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:r.length})]}),s.jsx("button",{onClick:()=>f(l),className:"p-1 rounded-md hover:bg-white/5 text-slate-600 hover:text-slate-400 transition-colors",title:`Add issue to ${l}`,children:s.jsx(Il,{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 ${N&&b?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:N&&b?"Drop here":"No issues"})}):r.map(T=>s.jsx($2,{issue:T,onClick:()=>c(T),onDragStart:v},T.id))})]})},G2=()=>{const[l,r]=U.useState(null),[o,c]=U.useState(null),[f,m]=U.useState(null),[v,S]=U.useState(null),N=U.useRef(!1),{addToast:x,selectedProjectId:b,globalModeLoading:T}=It(),{data:j,loading:D,error:C,refetch:M}=mn(Ix,[b],{enabled:!T});U.useEffect(()=>{const B=setInterval(()=>{N.current||M()},3e4);return()=>clearInterval(B)},[M]);const A=U.useCallback(async(B,J)=>{m(null);const K=v??(j==null?void 0:j.columns);if(!K)return;const ce=K,P={};for(const Z of Fl)P[Z]=(K[Z]??[]).filter(ne=>ne.number!==B.number);const F={...B,column:J};P[J]=[...P[J]??[],F],S(P),r(Z=>(Z==null?void 0:Z.number)===B.number?F:Z),N.current=!0;try{await Xx(B.number,J),M(),setTimeout(()=>{S(null),N.current=!1},800)}catch(Z){S(ce),r(ne=>(ne==null?void 0:ne.number)===B.number?B:ne),N.current=!1,x({title:"Move failed",message:Z instanceof Error?Z.message:"Failed to move issue",type:"error"})}},[x,M,v,j]);if(T||D)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(C&&C.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(C)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:C.message}),s.jsx(Ve,{onClick:()=>M(),children:"Retry"})]});if(!j)return null;const I=v??j.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:[Fl.reduce((B,J)=>{var K;return B+(((K=I[J])==null?void 0:K.length)??0)},0)," issues across ",Fl.length," columns"]})]}),s.jsxs(Ve,{onClick:()=>c("Ready"),children:[s.jsx(Il,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),s.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",onDragEnd:()=>m(null),children:s.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${Fl.length*236}px`},children:Fl.map(B=>s.jsx(P2,{name:B,issues:I[B]??[],draggingIssue:f,onIssueClick:r,onNewIssue:c,onMoveIssue:A,onDragStart:m},B))})}),l&&s.jsx(Y2,{issue:l,onClose:()=>r(null),onMoved:()=>M(),onClosed:()=>M()}),o&&s.jsx(V2,{defaultColumn:o,onClose:()=>c(null),onCreated:()=>M()})]})},F2=[{name:"executor",displayName:"Executor",processName:"executor",triggerId:"executor",cancelType:"run",runningLabel:"Running",idleLabel:"Idle"},{name:"reviewer",displayName:"Reviewer",processName:"reviewer",triggerId:"reviewer",cancelType:"review",runningLabel:"Running",idleLabel:"Idle"},{name:"qa",displayName:"QA",processName:"qa",triggerId:"qa",runningLabel:"Running",idleLabel:"Idle"},{name:"auditor",displayName:"Auditor",processName:"audit",triggerId:"audit",runningLabel:"Running",idleLabel:"Idle"},{name:"planner",displayName:"Planner",processName:"planner",triggerId:"planner",runningLabel:"Writing PRDs",idleLabel:"Idle"},{name:"analytics",displayName:"Analytics",processName:"analytics",triggerId:"analytics",runningLabel:"Running",idleLabel:"Idle"},{name:"pr-resolver",displayName:"PR Resolver",processName:"pr-resolver",triggerId:"pr-resolver",runningLabel:"Resolving",idleLabel:"Idle"},{name:"merger",displayName:"Merger",processName:"merger",triggerId:"merger",runningLabel:"Running",idleLabel:"Idle"}],Z2=({processes:l,activePrd:r,onCancelProcess:o,onForceClear:c,onViewLog:f,cancellingProcess:m,clearingLock:v,onTriggerJob:S,triggeringJob:N})=>{const x=T=>l.find(j=>j.name===T),b=(T,j)=>T.length<=j?T:T.slice(0,j-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-8 gap-3",children:F2.map(T=>{const j=x(T.processName),D=(j==null?void 0:j.running)??!1,C=j==null?void 0:j.pid,M=m===T.cancelType,A=D&&T.cancelType,I=!D&&T.name==="executor"&&r,B=D?C?`PID: ${C}`:T.runningLabel:T.idleLabel,J=D&&T.name==="executor"&&r?b(r,20):null;return s.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${D?"bg-green-950/30 border-green-800/50":"bg-slate-950/50 border-slate-800"}`,children:[s.jsx("div",{className:`h-2.5 w-2.5 rounded-full flex-shrink-0 ${D?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:`text-sm font-medium ${D?"text-slate-200":"text-slate-400"}`,children:T.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(_f,{className:"h-3 w-3 flex-shrink-0"}),J]}):B})]}),s.jsxs("div",{className:"flex-shrink-0",children:[A&&s.jsx("button",{onClick:()=>T.cancelType&&o(T.cancelType),disabled:M,className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded transition-colors disabled:opacity-50",title:"Stop process",children:s.jsx(Tg,{className:"h-3.5 w-3.5"})}),I&&s.jsx("button",{onClick:c,disabled:v,className:"p-1 text-amber-400 hover:text-amber-300 hover:bg-amber-500/10 rounded transition-colors disabled:opacity-50",title:"Force clear stale state",children:s.jsx(Tg,{className:"h-3.5 w-3.5"})}),!A&&!I&&D&&s.jsx("button",{onClick:f,className:"p-1 text-slate-400 hover:text-slate-300 hover:bg-white/5 rounded transition-colors",title:"View log",children:s.jsx(_f,{className:"h-3.5 w-3.5"})}),!D&&!I&&s.jsx("button",{onClick:()=>S(T.triggerId),disabled:N!==null,className:"p-1 text-slate-500 hover:text-green-400 hover:bg-green-500/10 rounded transition-colors disabled:opacity-50",title:`Run ${T.displayName}`,children:N===T.triggerId?s.jsx("div",{className:"h-3.5 w-3.5 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(qr,{className:"h-3.5 w-3.5"})})]})]},T.name)})})},W2={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"},Q2=()=>{var O,le;const l=lo(),[r,o]=U.useState(null),[c,f]=U.useState(!1),[m,v]=U.useState(null),{setProjectName:S,addToast:N,selectedProjectId:x,globalModeLoading:b,status:T}=It(),{data:j}=mn(Wx,[x],{enabled:!b}),{data:D,loading:C}=mn(()=>Ix().catch(()=>null),[x],{enabled:!b}),M=T;if(ze.useEffect(()=>{M!=null&&M.projectName&&S(M.projectName)},[M,S]),b)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!M)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const A=M.prs.length,I=M.prs.filter(k=>k.reviewScore!==null&&k.reviewScore<70).length,B=((O=D==null?void 0:D.columns.Ready)==null?void 0:O.length)??0,J=((le=D==null?void 0:D.columns["In Progress"])==null?void 0:le.length)??0;M.processes.find(k=>k.name==="executor"),M.processes.find(k=>k.name==="reviewer"),M.processes.find(k=>k.name==="qa"),M.processes.find(k=>k.name==="audit"),M.processes.find(k=>k.name==="planner"),M.processes.find(k=>k.name==="analytics");const K=async k=>{o(k);try{const oe=await b2(k),ee=oe.results.every(xe=>xe.success);N({title:ee?"Process Cancelled":"Cancel Failed",message:oe.results.map(xe=>xe.message).join("; "),type:ee?"success":"error"})}catch(oe){N({title:"Cancel Failed",message:oe instanceof Error?oe.message:"Failed to cancel process",type:"error"})}finally{o(null)}},ce=async()=>{f(!0);try{await j2(),N({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(k){N({title:"Clear Failed",message:k instanceof Error?k.message:"Failed to clear lock",type:"error"})}finally{f(!1)}},P=async k=>{v(k);try{await Qx(k==="planner"?"slicer":k),N({title:"Job Triggered",message:`${k[0].toUpperCase()+k.slice(1)} job has been queued.`,type:"success"})}catch(oe){N({title:"Trigger Failed",message:oe instanceof Error?oe.message:`Failed to trigger ${k}`,type:"error"})}finally{v(null)}},F=k=>{if(!k)return"Not scheduled";try{const oe=new Date(k),ee=new Date,xe=oe.getTime()-ee.getTime(),Y=Math.floor(xe/6e4);return Y<0?"Running now...":Y<60?`in ${Y} min`:Y<1440?`in ${Math.floor(Y/60)} hr${Y>=120?"s":""}`:`in ${Math.floor(Y/1440)} day${Y>=2880?"s":""}`}catch{return"Unknown"}},ne=(()=>{var ee,xe,Y,ie,me,je;if(j!=null&&j.paused)return null;const k=[{agent:"Executor",nextRun:(j==null?void 0:j.executor.nextRun)??null},{agent:"Reviewer",nextRun:(j==null?void 0:j.reviewer.nextRun)??null},{agent:"QA",nextRun:((ee=j==null?void 0:j.qa)==null?void 0:ee.nextRun)??null},{agent:"Auditor",nextRun:((xe=j==null?void 0:j.audit)==null?void 0:xe.nextRun)??null},{agent:"Planner",nextRun:((Y=j==null?void 0:j.planner)==null?void 0:Y.nextRun)??null},{agent:"Analytics",nextRun:((ie=j==null?void 0:j.analytics)==null?void 0:ie.nextRun)??null},{agent:"PR Resolver",nextRun:((me=j==null?void 0:j.prResolver)==null?void 0:me.nextRun)??null},{agent:"Merger",nextRun:((je=j==null?void 0:j.merger)==null?void 0:je.nextRun)??null}];let oe=null;for(const be of k)be.nextRun&&(!oe||new Date(be.nextRun)<new Date(oe.nextRun))&&(oe=be);return oe?{agent:oe.agent,time:F(oe.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($e,{className:"p-5",onClick:()=>l("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Board Ready"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:B})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(mu,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs($e,{className:"p-5",onClick:()=>l("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"In Progress"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:J})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(Ux,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs($e,{className:"p-5",onClick:()=>l("/prs"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Open PRs"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:A})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(Xc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${I>0?"text-red-400 font-medium":"text-slate-500"}`,children:I>0?`${I} need work`:"All passing"})]}),s.jsxs($e,{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:j!=null&&j.paused?"Paused":M.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${j!=null&&j.paused?"bg-amber-500/10 text-amber-400":M.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:s.jsx(eh,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:j!=null&&j.paused?"All schedules paused":M.crontab.installed?`${M.crontab.entries.length} entr${M.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs($e,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h2",{className:"text-base font-semibold text-slate-200",children:"Agents"}),s.jsx("button",{onClick:()=>l("/logs"),className:"text-xs text-slate-400 hover:text-slate-300 transition-colors",children:"View logs"})]}),s.jsx(Z2,{processes:M.processes,activePrd:M.activePrd,onCancelProcess:K,onForceClear:ce,onViewLog:()=>l("/logs"),cancellingProcess:r,clearingLock:c,onTriggerJob:P,triggeringJob:m})]}),ne&&s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-slate-900/50 rounded-lg border border-slate-800",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-400",children:[s.jsx("span",{children:"Next automation:"}),s.jsx("span",{className:"text-slate-200 font-medium",children:ne.agent}),s.jsx("span",{children:ne.time})]}),s.jsxs("button",{onClick:()=>l("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",s.jsx(Sg,{className:"ml-1 h-3 w-3"})]})]}),s.jsxs("div",{className:"mt-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:"GitHub Board"}),s.jsxs("button",{onClick:()=>l("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",s.jsx(Sg,{className:"ml-1 h-3 w-3"})]})]}),s.jsx($e,{className:"p-4",children:C?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx("div",{className:"text-slate-400 text-sm",children:"Loading board..."})}):D?s.jsx("div",{className:"flex flex-wrap gap-3",children:Fl.map(k=>{var ee;const oe=((ee=D.columns[k])==null?void 0:ee.length)??0;return s.jsxs("button",{onClick:()=>l("/board"),className:`inline-flex items-center space-x-2 px-3 py-2 rounded-lg ring-1 ring-inset transition-colors hover:opacity-80 ${W2[k]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:k}),s.jsx("span",{className:"text-xs font-bold",children:oe})]},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."]})})]})]})},I2=()=>{const[l,r]=U.useState(!0),[o,c]=U.useState(""),[f,m]=U.useState("executor"),v=U.useRef(null),{selectedProjectId:S,globalModeLoading:N}=It(),x=It(B=>B.status),{data:b,loading:T,error:j,refetch:D}=mn(()=>x2(f,500),[f,S],{enabled:!N}),C=(b==null?void 0:b.lines)||[];U.useEffect(()=>{l&&v.current&&(v.current.scrollTop=v.current.scrollHeight)},[C,l]),U.useEffect(()=>{if(!l)return;const B=window.setInterval(()=>{D()},3e3);return()=>window.clearInterval(B)},[l,f,D]);const M=C.filter(B=>B.toLowerCase().includes(o.toLowerCase())),A=B=>{m(B),c("")},I=B=>{if(!(x!=null&&x.processes))return!1;const J=x.processes.find(K=>K.name===B);return(J==null?void 0:J.running)??!1};return j?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(nl,{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:j.message}),s.jsx(Ve,{onClick:()=>D(),children:"Retry"})]}):s.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"relative group",children:[s.jsx("input",{type:"text",placeholder:"Filter logs...",className:"pl-9 pr-4 py-1.5 rounded-md border border-slate-700 bg-slate-950 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent w-64 placeholder:text-slate-600",value:o,onChange:B=>c(B.target.value)}),s.jsx(cu,{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:$x.map(({processName:B,label:J})=>s.jsx("button",{onClick:()=>A(B),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${f===B?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:J}),I(B)&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})},B))})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(Ve,{size:"sm",variant:"ghost",onClick:()=>D(),children:[s.jsx(wg,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Ve,{size:"sm",variant:"ghost",onClick:()=>r(!l),children:[l?s.jsx(Vx,{className:"h-4 w-4 mr-2"}):s.jsx(qr,{className:"h-4 w-4 mr-2"}),l?"Pause":"Resume"]})]})]}),s.jsxs("div",{className:"flex-1 bg-slate-900 rounded-xl overflow-hidden shadow-inner border border-slate-800 flex flex-col relative",children:[s.jsxs("div",{className:"bg-slate-950/50 backdrop-blur text-xs text-slate-500 px-4 py-1.5 flex justify-between border-b border-slate-800",children:[s.jsxs("span",{children:["File: ",f,".log"]}),s.jsxs("span",{children:[M.length," lines"]})]}),s.jsxs("div",{ref:v,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[T?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):M.length===0?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:o?"No logs match your filter":"No logs yet — logs will appear after the first run"}):M.map((B,J)=>{const K=B.includes("[ERROR]"),ce=B.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${K?"text-red-400":ce?"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}),B]},J)}),l&&s.jsx("div",{className:"h-4"})," "]}),!l&&s.jsxs("div",{className:"absolute bottom-4 right-4 bg-indigo-600 text-white px-3 py-1.5 rounded-full shadow-lg shadow-indigo-900/40 text-xs font-medium flex items-center cursor-pointer hover:bg-indigo-500 transition-colors",onClick:()=>r(!0),children:[s.jsx(wg,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},X2=()=>{const[l,r]=U.useState(null),[o,c]=U.useState(!1),[f,m]=U.useState("all"),[v,S]=U.useState("number"),[N,x]=U.useState("desc"),{addToast:b,selectedProjectId:T,globalModeLoading:j}=It(),{data:D,loading:C,error:M,refetch:A}=mn(Fx,[T],{enabled:!j}),I=D??[],B=O=>{switch(O){case"pass":return s.jsx(mu,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(N1,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(qx,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(nl,{className:"h-4 w-4 text-slate-500"})}},J=O=>{switch(O){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=O=>O===null?"No review decision yet":O===100?"PR has been approved":O===0?"Changes have been requested":`Review score: ${O}`,ce=U.useMemo(()=>I.filter(O=>{switch(f){case"needs-work":return O.ciStatus==="fail"||O.reviewScore===0;case"pending":return O.ciStatus==="pending"||O.ciStatus==="unknown"||O.reviewScore===null;case"passed":return O.ciStatus==="pass"&&O.reviewScore===100;case"all":default:return!0}}),[I,f]),P=U.useMemo(()=>[...ce].sort((le,k)=>{let oe=0;switch(v){case"number":oe=le.number-k.number;break;case"title":oe=le.title.localeCompare(k.title);break;case"branch":oe=le.branch.localeCompare(k.branch);break;case"ciStatus":{const ee={fail:0,pending:1,unknown:2,pass:3};oe=(ee[le.ciStatus]??2)-(ee[k.ciStatus]??2);break}case"reviewScore":{const ee=le.reviewScore??-1,xe=k.reviewScore??-1;oe=ee-xe;break}}return N==="asc"?oe:-oe}),[ce,v,N]),F=O=>{v===O?x(N==="asc"?"desc":"asc"):(S(O),x("desc"))},Z=O=>v!==O?s.jsx(Jb,{className:"h-3 w-3 text-slate-600"}):N==="asc"?s.jsx(e1,{className:"h-3 w-3 text-indigo-400"}):s.jsx(Qb,{className:"h-3 w-3 text-indigo-400"});if(C)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(M)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(nl,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load PRs"}),s.jsx("div",{className:"text-sm text-slate-500",children:M.message}),s.jsx(Ve,{onClick:()=>A(),children:"Retry"})]});const ne=async()=>{c(!0);try{const O=await y2();b({title:"Reviewer Started",message:O.pid?`Started with PID ${O.pid}`:"Reviewer started",type:"success"})}catch(O){b({title:"Reviewer Failed",message:O instanceof Error?O.message:"Failed to start reviewer",type:"error"})}finally{c(!1)}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("button",{onClick:()=>m("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${f==="all"?"bg-slate-800 text-slate-200 border-slate-700":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"All"}),s.jsx("button",{onClick:()=>m("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${f==="needs-work"?"bg-red-900/50 text-red-300 border-red-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Needs Work"}),s.jsx("button",{onClick:()=>m("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${f==="pending"?"bg-amber-900/50 text-amber-300 border-amber-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Pending"}),s.jsx("button",{onClick:()=>m("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${f==="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(Ve,{size:"sm",onClick:ne,disabled:o,children:[s.jsx(cu,{className:"h-4 w-4 mr-2"}),o?"Starting...":"Run Reviewer Now"]})]}),s.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:s.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[s.jsx("thead",{className:"bg-slate-950/50",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>F("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:()=>F("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:()=>F("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:()=>F("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:[P.map(O=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>r(l===O.number?null:O.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:["#",O.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:O.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:O.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:J(O.ciStatus),children:[B(O.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:O.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:O.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:K(O.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${O.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${O.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${O.reviewScore>=70?"text-green-500":"text-red-500"}`,children:O.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:O.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:le=>le.stopPropagation(),children:s.jsx(Hx,{className:"h-4 w-4"})})})]},O.number)),P.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 "${f}" filter.`})})]})]})}),l&&s.jsx($e,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const O=I.find(le=>le.number===l);return O?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:O.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:O.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:J(O.ciStatus),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"CI Status"}),s.jsxs("div",{className:"flex items-center space-x-1 mt-1",children:[B(O.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:O.ciStatus})]})]}),O.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:K(O.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${O.reviewScore>=70?"text-green-500":"text-red-500"}`,children:O.reviewScore})]})]})]}):null})()})]})},Gt=ze.forwardRef(({className:l="",label:r,checked:o,onChange:c,...f},m)=>{const v=S=>{c&&c(S.target.checked)};return s.jsxs("label",{className:`inline-flex items-center cursor-pointer ${l}`,children:[s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"checkbox",className:"sr-only peer",ref:m,checked:o,onChange:v,...f}),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})]})});Gt.displayName="Switch";const J2=()=>{const{addToast:l,selectedProjectId:r,globalModeLoading:o}=It(),[c,f]=U.useState(!1),[m,v]=U.useState(!1),{data:S,loading:N,error:x,refetch:b}=mn(C2,[r],{enabled:!o});U.useEffect(()=>{if(!(S!=null&&S.enabled))return;const B=setInterval(()=>{b()},1e4);return()=>clearInterval(B)},[S==null?void 0:S.enabled,b]);const T=async B=>{v(!0);try{await Jx(B),l({title:B?"Scanner Enabled":"Scanner Disabled",message:B?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:B?"success":"info"}),b()}catch(J){l({title:"Toggle Failed",message:J instanceof Error?J.message:"Failed to toggle scanner",type:"error"})}finally{v(!1)}},j=async()=>{f(!0);try{const B=await O2();B.created.length>0?l({title:"Scan Complete",message:`Created ${B.created.length} PRD(s): ${B.created.join(", ")}`,type:"success"}):l({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),B.errors.length>0&&l({title:"Scan Errors",message:B.errors.join("; "),type:"warning"}),b()}catch(B){l({title:"Scan Failed",message:B instanceof Error?B.message:"Failed to scan roadmap",type:"error"})}finally{f(!1)}};if(N)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(x)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(nl,{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(Ve,{onClick:()=>b(),children:"Retry"})]});if(!S)return null;if(S.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($e,{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(Bx,{className:"h-10 w-10 text-slate-500"})}),s.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"No ROADMAP.md Found"}),s.jsxs("p",{className:"text-slate-400 max-w-md",children:["Create a ",s.jsx("code",{className:"text-indigo-400 bg-indigo-500/10 px-1.5 py-0.5 rounded text-sm",children:"ROADMAP.md"})," in your project root with checklist items (",s.jsx("code",{className:"text-slate-300 text-sm",children:"- [ ] Feature"}),") or heading-based items (",s.jsx("code",{className:"text-slate-300 text-sm",children:"### Feature"}),") to get started."]})]})})]});const D=S.totalItems>0?Math.round(S.processedItems/S.totalItems*100):0,C=eN(S.status),M=tN(S.items),A=S.lastScan?aN(S.lastScan):"Never",I=S.autoScanInterval?Math.round(S.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(Gt,{label:S.enabled?"Enabled":"Disabled",checked:S.enabled,onChange:T,disabled:m}),s.jsxs(Ve,{onClick:j,loading:c,disabled:!S.enabled||S.status==="complete",children:[s.jsx(qr,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx($e,{className:`p-6 border-2 ${C.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(C.icon,{className:`h-8 w-8 ${C.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 ${C.textColor}`,children:C.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:A})]}),S.enabled&&S.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",I," min"]})]}),S.enabled&&S.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs($e,{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:[S.processedItems," / ",S.totalItems," items (",D,"%)"]})]}),s.jsx("div",{className:"w-full h-3 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${D===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${D}%`}})})]}),Object.entries(M).map(([B,J])=>s.jsxs($e,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:B}),s.jsx("div",{className:"space-y-2",children:J.map(K=>s.jsx(K2,{item:K},K.hash))})]},B))]})};function K2({item:l}){const r=l.checked,o=l.processed;return s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${r?"bg-slate-950/30 border-slate-800/50":o?"bg-emerald-500/5 border-emerald-500/10":"bg-slate-950/50 border-slate-800"}`,children:[s.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[r?s.jsx($1,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):o?s.jsx(mu,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(_f,{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:l.title}),l.description&&s.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:l.description})]})]}),s.jsx("div",{className:"flex-shrink-0 ml-3",children:r?s.jsx(Lr,{variant:"neutral",children:"Skipped"}):o?s.jsx(Lr,{variant:"success",children:l.prdFile||"Processed"}):s.jsx(Lr,{variant:"warning",children:"Pending"})})]})}function eN(l){switch(l){case"complete":return{label:"Complete",icon:mu,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Xc,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:qr,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:nl,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:nl,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function tN(l){const r={};for(const o of l){const c=o.section||"General";r[c]||(r[c]=[]),r[c].push(o)}return r}function aN(l){try{const r=new Date(l),c=new Date().getTime()-r.getTime(),f=Math.floor(c/6e4);if(f<1)return"Just now";if(f<60)return`${f} min ago`;const m=Math.floor(f/60);return m<24?`${m} hr ago`:`${Math.floor(m/24)} day(s) ago`}catch{return"Unknown"}}const ke=ze.forwardRef(({className:l="",label:r,error:o,helperText:c,rightIcon:f,...m},v)=>{const S=ze.useId(),N=m.id??S,x=o?`${N}-error`:void 0,b=!o&&c?`${N}-help`:void 0,T=[x,b].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:N,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:v,id:N,"aria-describedby":T,"aria-invalid":o?!0:m["aria-invalid"],className:`
|
|
365
|
-
w-full rounded-lg bg-slate-950 border border-slate-800
|
|
366
|
-
px-3 py-2 text-sm text-slate-200
|
|
367
|
-
placeholder:text-slate-600
|
|
368
|
-
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
369
|
-
disabled:opacity-50 disabled:cursor-not-allowed
|
|
370
|
-
transition-all duration-200
|
|
371
|
-
${o?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
372
|
-
${f?"pr-10":""}
|
|
373
|
-
${l}
|
|
374
|
-
`,...m}),f&&s.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:f})]}),o?s.jsx("p",{id:x,className:"mt-1.5 text-xs text-red-400",children:o}):c?s.jsx("p",{id:b,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});ke.displayName="Input";const Qt=ze.forwardRef(({className:l="",label:r,error:o,helperText:c,options:f,value:m,onChange:v,children:S,...N},x)=>{const b=ze.useId(),T=N.id??b,j=o?`${T}-error`:void 0,D=!o&&c?`${T}-help`:void 0,C=[j,D].filter(Boolean).join(" ")||void 0,M=A=>{v&&v(A.target.value)};return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:T,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:x,id:T,"aria-describedby":C,"aria-invalid":o?!0:N["aria-invalid"],className:`
|
|
375
|
-
w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
|
|
376
|
-
px-3 py-2 pr-10 text-sm text-slate-200
|
|
377
|
-
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
378
|
-
disabled:opacity-50 disabled:cursor-not-allowed
|
|
379
|
-
transition-all duration-200
|
|
380
|
-
${o?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
381
|
-
${l}
|
|
382
|
-
`,value:m,onChange:M,...N,children:f?f.map(A=>s.jsx("option",{value:A.value,children:A.label},A.value)):S}),s.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:s.jsx(Lx,{className:"h-4 w-4"})})]}),o?s.jsx("p",{id:j,className:"mt-1.5 text-xs text-red-400",children:o}):c?s.jsx("p",{id:D,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});Qt.displayName="Select";const ep=({tabs:l,activeTab:r,onChange:o,className:c=""})=>{var N,x;const[f,m]=ze.useState((N=l[0])==null?void 0:N.id),v=r||f,S=b=>{o?o(b):m(b)};return s.jsxs("div",{className:`flex flex-col ${c}`,children:[s.jsx("div",{className:"border-b border-slate-800 mb-6",children:s.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:l.map(b=>s.jsx("button",{onClick:()=>S(b.id),className:`
|
|
383
|
-
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
384
|
-
${v===b.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
385
|
-
`,children:b.label},b.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(x=l.find(b=>b.id===v))==null?void 0:x.content})]})};var _s={},za={},Qi={},zs={},wf={},kg;function nN(){return kg||(kg=1,Object.defineProperty(wf,"__esModule",{value:!0})),wf}var Ii={},Xi={},_g;function Vs(){var r,o,c,f,m,tp,S;if(_g)return Xi;_g=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.CronField=void 0;let l=(S=class{constructor(x,b={rawValue:""}){at(this,m);at(this,r,!1);at(this,o,!1);at(this,c,!1);at(this,f,[]);lg(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={...b,rawValue:b.rawValue??""},Te(this,f,x.sort(S.sorter)),Te(this,c,this.options.wildcard!==void 0?this.options.wildcard:Se(this,m,tp).call(this)),Te(this,r,this.options.rawValue.includes("L")||x.includes("L")),Te(this,o,this.options.rawValue.includes("?")||x.includes("?"))}static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return te(this,r)}get hasQuestionMarkChar(){return te(this,o)}get isWildcard(){return te(this,c)}get values(){return te(this,f)}static sorter(x,b){const T=typeof x=="number",j=typeof b=="number";return T&&j?x-b:!T&&!j?x.localeCompare(b):T?-1:1}static findNearestValueInList(x,b,T=!1){if(T){for(let j=x.length-1;j>=0;j--)if(x[j]<b)return x[j];return null}for(let j=0;j<x.length;j++)if(x[j]>b)return x[j];return null}findNearestValue(x,b=!1){return this.constructor.findNearestValueInList(this.values,x,b)}serialize(){return{wildcard:te(this,c),values:te(this,f)}}validate(){let x;const b=this.chars.length>0?` or chars ${this.chars.join("")}`:"",T=M=>A=>new RegExp(`^\\d{0,2}${A}$`).test(M),j=M=>(x=M,typeof M=="number"?M>=this.min&&M<=this.max:this.chars.some(T(M)));if(!te(this,f).every(j))throw new Error(`${this.constructor.name} Validation error, got value ${x} expected range ${this.min}-${this.max}${b}`);const C=te(this,f).find((M,A)=>te(this,f).indexOf(M)!==A);if(C)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${C}`)}},r=new WeakMap,o=new WeakMap,c=new WeakMap,f=new WeakMap,m=new WeakSet,tp=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(x,b)=>b+this.min).every(x=>te(this,f).includes(x))},S);return Xi.CronField=l,Xi}var zg;function lN(){if(zg)return Ii;zg=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.CronDayOfMonth=void 0;const l=Vs(),r=1,o=31,c=Object.freeze(["L"]);let f=class extends l.CronField{static get min(){return r}static get max(){return o}static get chars(){return c}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(v,S){super(v,S),this.validate()}get values(){return super.values}};return Ii.CronDayOfMonth=f,Ii}var Ji={},Ug;function sN(){if(Ug)return Ji;Ug=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.CronDayOfWeek=void 0;const l=Vs(),r=0,o=7,c=Object.freeze(["L"]);let f=class extends l.CronField{static get min(){return r}static get max(){return o}static get chars(){return c}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(v,S){super(v,S),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return Ji.CronDayOfWeek=f,Ji}var Ki={},Lg;function rN(){if(Lg)return Ki;Lg=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.CronHour=void 0;const l=Vs(),r=0,o=23,c=Object.freeze([]);let f=class extends l.CronField{static get min(){return r}static get max(){return o}static get chars(){return c}constructor(v,S){super(v,S),this.validate()}get values(){return super.values}};return Ki.CronHour=f,Ki}var eu={},Hg;function iN(){if(Hg)return eu;Hg=1,Object.defineProperty(eu,"__esModule",{value:!0}),eu.CronMinute=void 0;const l=Vs(),r=0,o=59,c=Object.freeze([]);let f=class extends l.CronField{static get min(){return r}static get max(){return o}static get chars(){return c}constructor(v,S){super(v,S),this.validate()}get values(){return super.values}};return eu.CronMinute=f,eu}var tu={},Ef={},Ta={},qg;function uN(){if(qg)return Ta;qg=1,Object.defineProperty(Ta,"__esModule",{value:!0});class l extends Error{}class r extends l{constructor(i){super(`Invalid DateTime: ${i.toMessage()}`)}}class o extends l{constructor(i){super(`Invalid Interval: ${i.toMessage()}`)}}class c extends l{constructor(i){super(`Invalid Duration: ${i.toMessage()}`)}}class f extends l{}class m extends l{constructor(i){super(`Invalid unit ${i}`)}}class v extends l{}class S extends l{constructor(){super("Zone is an abstract class")}}const N="numeric",x="short",b="long",T={year:N,month:N,day:N},j={year:N,month:x,day:N},D={year:N,month:x,day:N,weekday:x},C={year:N,month:b,day:N},M={year:N,month:b,day:N,weekday:b},A={hour:N,minute:N},I={hour:N,minute:N,second:N},B={hour:N,minute:N,second:N,timeZoneName:x},J={hour:N,minute:N,second:N,timeZoneName:b},K={hour:N,minute:N,hourCycle:"h23"},ce={hour:N,minute:N,second:N,hourCycle:"h23"},P={hour:N,minute:N,second:N,hourCycle:"h23",timeZoneName:x},F={hour:N,minute:N,second:N,hourCycle:"h23",timeZoneName:b},Z={year:N,month:N,day:N,hour:N,minute:N},ne={year:N,month:N,day:N,hour:N,minute:N,second:N},O={year:N,month:x,day:N,hour:N,minute:N},le={year:N,month:x,day:N,hour:N,minute:N,second:N},k={year:N,month:x,day:N,weekday:x,hour:N,minute:N},oe={year:N,month:b,day:N,hour:N,minute:N,timeZoneName:x},ee={year:N,month:b,day:N,hour:N,minute:N,second:N,timeZoneName:x},xe={year:N,month:b,day:N,weekday:b,hour:N,minute:N,timeZoneName:b},Y={year:N,month:b,day:N,weekday:b,hour:N,minute:N,second:N,timeZoneName:b};class ie{get type(){throw new S}get name(){throw new S}get ianaName(){return this.name}get isUniversal(){throw new S}offsetName(i,h){throw new S}formatOffset(i,h){throw new S}offset(i){throw new S}equals(i){throw new S}get isValid(){throw new S}}let me=null;class je extends ie{static get instance(){return me===null&&(me=new je),me}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(i,{format:h,locale:y}){return kn(i,h,y)}formatOffset(i,h){return ls(this.offset(i),h)}offset(i){return-new Date(i).getTimezoneOffset()}equals(i){return i.type==="system"}get isValid(){return!0}}const be=new Map;function _(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 ge(g,i){const h=g.format(i).replace(/\u200E/g,""),y=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(h),[,w,R,L,H,V,fe,ye]=y;return[L,w,R,H,V,fe,ye]}function pe(g,i){const h=g.formatToParts(i),y=[];for(let w=0;w<h.length;w++){const{type:R,value:L}=h[w],H=se[R];R==="era"?y[H]=L:Re(H)||(y[H]=parseInt(L,10))}return y}const Me=new Map;class we extends ie{static create(i){let h=Me.get(i);return h===void 0&&Me.set(i,h=new we(i)),h}static resetCache(){Me.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=we.isValidZone(i)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(i,{format:h,locale:y}){return kn(i,h,y,this.name)}formatOffset(i,h){return ls(this.offset(i),h)}offset(i){if(!this.valid)return NaN;const h=new Date(i);if(isNaN(h))return NaN;const y=_(this.name);let[w,R,L,H,V,fe,ye]=y.formatToParts?pe(y,h):ge(y,h);H==="BC"&&(w=-Math.abs(w)+1);const Qe=Kt({year:w,month:R,day:L,hour:V===24?0:V,minute:fe,second:ye,millisecond:0});let De=+h;const Nt=De%1e3;return De-=Nt>=0?Nt:1e3+Nt,(Qe-De)/(60*1e3)}equals(i){return i.type==="iana"&&i.name===this.name}get isValid(){return this.valid}}let He={};function mt(g,i={}){const h=JSON.stringify([g,i]);let y=He[h];return y||(y=new Intl.ListFormat(g,i),He[h]=y),y}const Pe=new Map;function Xt(g,i={}){const h=JSON.stringify([g,i]);let y=Pe.get(h);return y===void 0&&(y=new Intl.DateTimeFormat(g,i),Pe.set(h,y)),y}const Ha=new Map;function gn(g,i={}){const h=JSON.stringify([g,i]);let y=Ha.get(h);return y===void 0&&(y=new Intl.NumberFormat(g,i),Ha.set(h,y)),y}const Ka=new Map;function ha(g,i={}){const{base:h,...y}=i,w=JSON.stringify([g,y]);let R=Ka.get(w);return R===void 0&&(R=new Intl.RelativeTimeFormat(g,i),Ka.set(w,R)),R}let ma=null;function xn(){return ma||(ma=new Intl.DateTimeFormat().resolvedOptions().locale,ma)}const $=new Map;function he(g){let i=$.get(g);return i===void 0&&(i=new Intl.DateTimeFormat(g).resolvedOptions(),$.set(g,i)),i}const Oe=new Map;function Ge(g){let i=Oe.get(g);if(!i){const h=new Intl.Locale(g);i="getWeekInfo"in h?h.getWeekInfo():h.weekInfo,"minimalDays"in i||(i={...qa,...i}),Oe.set(g,i)}return i}function gt(g){const i=g.indexOf("-x-");i!==-1&&(g=g.substring(0,i));const h=g.indexOf("-u-");if(h===-1)return[g];{let y,w;try{y=Xt(g).resolvedOptions(),w=g}catch{const V=g.substring(0,h);y=Xt(V).resolvedOptions(),w=V}const{numberingSystem:R,calendar:L}=y;return[w,R,L]}}function St(g,i,h){return(h||i)&&(g.includes("-u-")||(g+="-u"),h&&(g+=`-ca-${h}`),i&&(g+=`-nu-${i}`)),g}function qt(g){const i=[];for(let h=1;h<=12;h++){const y=Ee.utc(2009,h,1);i.push(g(y))}return i}function it(g){const i=[];for(let h=1;h<=7;h++){const y=Ee.utc(2016,11,13+h);i.push(g(y))}return i}function sa(g,i,h,y){const w=g.listingMode();return w==="error"?null:w==="en"?h(i):y(i)}function pn(g){return g.numberingSystem&&g.numberingSystem!=="latn"?!1:g.numberingSystem==="latn"||!g.locale||g.locale.startsWith("en")||he(g.locale).numberingSystem==="latn"}class yn{constructor(i,h,y){this.padTo=y.padTo||0,this.floor=y.floor||!1;const{padTo:w,floor:R,...L}=y;if(!h||Object.keys(L).length>0){const H={useGrouping:!1,...y};y.padTo>0&&(H.minimumIntegerDigits=y.padTo),this.inf=gn(i,H)}}format(i){if(this.inf){const h=this.floor?Math.floor(i):i;return this.inf.format(h)}else{const h=this.floor?Math.floor(i):ts(i,3);return nt(h,this.padTo)}}}class Bt{constructor(i,h,y){this.opts=y,this.originalZone=void 0;let w;if(this.opts.timeZone)this.dt=i;else if(i.zone.type==="fixed"){const L=-1*(i.offset/60),H=L>=0?`Etc/GMT+${L}`:`Etc/GMT${L}`;i.offset!==0&&we.create(H).valid?(w=H,this.dt=i):(w="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,w=i.zone.name):(w="UTC",this.dt=i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone);const R={...this.opts};R.timeZone=R.timeZone||w,this.dtf=Xt(h,R)}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(h=>{if(h.type==="timeZoneName"){const y=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...h,value:y}}else return h}):i}resolvedOptions(){return this.dtf.resolvedOptions()}}class Ma{constructor(i,h,y){this.opts={style:"long",...y},!h&&Wr()&&(this.rtf=ha(i,y))}format(i,h){return this.rtf?this.rtf.format(i,h):Sn(h,i,this.opts.numeric,this.opts.style!=="long")}formatToParts(i,h){return this.rtf?this.rtf.formatToParts(i,h):[]}}const qa={firstDay:1,minimalDays:4,weekend:[6,7]};class Ye{static fromOpts(i){return Ye.create(i.locale,i.numberingSystem,i.outputCalendar,i.weekSettings,i.defaultToEN)}static create(i,h,y,w,R=!1){const L=i||ht.defaultLocale,H=L||(R?"en-US":xn()),V=h||ht.defaultNumberingSystem,fe=y||ht.defaultOutputCalendar,ye=Qr(w)||ht.defaultWeekSettings;return new Ye(H,V,fe,ye,L)}static resetCache(){ma=null,Pe.clear(),Ha.clear(),Ka.clear(),$.clear(),Oe.clear()}static fromObject({locale:i,numberingSystem:h,outputCalendar:y,weekSettings:w}={}){return Ye.create(i,h,y,w)}constructor(i,h,y,w,R){const[L,H,V]=gt(i);this.locale=L,this.numberingSystem=h||H||null,this.outputCalendar=y||V||null,this.weekSettings=w,this.intl=St(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=R,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=pn(this)),this.fastNumbersCached}listingMode(){const i=this.isEnglish(),h=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return i&&h?"en":"intl"}clone(i){return!i||Object.getOwnPropertyNames(i).length===0?this:Ye.create(i.locale||this.specifiedLocale,i.numberingSystem||this.numberingSystem,i.outputCalendar||this.outputCalendar,Qr(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,h=!1){return sa(this,i,wu,()=>{const y=this.intl==="ja"||this.intl.startsWith("ja-");h&=!y;const w=h?{month:i,day:"numeric"}:{month:i},R=h?"format":"standalone";if(!this.monthsCache[R][i]){const L=y?H=>this.dtFormatter(H,w).format():H=>this.extract(H,w,"month");this.monthsCache[R][i]=qt(L)}return this.monthsCache[R][i]})}weekdays(i,h=!1){return sa(this,i,Js,()=>{const y=h?{weekday:i,year:"numeric",month:"long",day:"numeric"}:{weekday:i},w=h?"format":"standalone";return this.weekdaysCache[w][i]||(this.weekdaysCache[w][i]=it(R=>this.extract(R,y,"weekday"))),this.weekdaysCache[w][i]})}meridiems(){return sa(this,void 0,()=>_n,()=>{if(!this.meridiemCache){const i={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ee.utc(2016,11,13,9),Ee.utc(2016,11,13,19)].map(h=>this.extract(h,i,"dayperiod"))}return this.meridiemCache})}eras(i){return sa(this,i,ei,()=>{const h={era:i};return this.eraCache[i]||(this.eraCache[i]=[Ee.utc(-40,1,1),Ee.utc(2017,1,1)].map(y=>this.extract(y,h,"era"))),this.eraCache[i]})}extract(i,h,y){const w=this.dtFormatter(i,h),R=w.formatToParts(),L=R.find(H=>H.type.toLowerCase()===y);return L?L.value:null}numberFormatter(i={}){return new yn(this.intl,i.forceSimple||this.fastNumbers,i)}dtFormatter(i,h={}){return new Bt(i,this.intl,h)}relFormatter(i={}){return new Ma(this.intl,this.isEnglish(),i)}listFormatter(i={}){return mt(this.intl,i)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||he(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:bn()?Ge(this.locale):qa}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 ll=null;class xt extends ie{static get utcInstance(){return ll===null&&(ll=new xt(0)),ll}static instance(i){return i===0?xt.utcInstance:new xt(i)}static parseSpecifier(i){if(i){const h=i.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(h)return new xt(ns(h[1],h[2]))}return null}constructor(i){super(),this.fixed=i}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ls(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ls(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(i,h){return ls(this.fixed,h)}get isUniversal(){return!0}offset(){return this.fixed}equals(i){return i.type==="fixed"&&i.fixed===this.fixed}get isValid(){return!0}}class Vt extends ie{constructor(i){super(),this.zoneName=i}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function At(g,i){if(Re(g)||g===null)return i;if(g instanceof ie)return g;if(_t(g)){const h=g.toLowerCase();return h==="default"?i:h==="local"||h==="system"?je.instance:h==="utc"||h==="gmt"?xt.utcInstance:xt.parseSpecifier(h)||we.create(g)}else return xa(g)?xt.instance(g):typeof g=="object"&&"offset"in g&&typeof g.offset=="function"?g:new Vt(g)}const kt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Xl={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]},Ys=kt.hanidec.replace(/[\[|\]]/g,"").split("");function uo(g){let i=parseInt(g,10);if(isNaN(i)){i="";for(let h=0;h<g.length;h++){const y=g.charCodeAt(h);if(g[h].search(kt.hanidec)!==-1)i+=Ys.indexOf(g[h]);else for(const w in Xl){const[R,L]=Xl[w];y>=R&&y<=L&&(i+=y-R)}}return parseInt(i,10)}else return i}const sl=new Map;function $s(){sl.clear()}function ra({numberingSystem:g},i=""){const h=g||"latn";let y=sl.get(h);y===void 0&&(y=new Map,sl.set(h,y));let w=y.get(i);return w===void 0&&(w=new RegExp(`${kt[h]}${i}`),y.set(i,w)),w}let vn=()=>Date.now(),Jl="system",rl=null,gu=null,Gr=null,Ps=60,il,xu=null;class ht{static get now(){return vn}static set now(i){vn=i}static set defaultZone(i){Jl=i}static get defaultZone(){return At(Jl,je.instance)}static get defaultLocale(){return rl}static set defaultLocale(i){rl=i}static get defaultNumberingSystem(){return gu}static set defaultNumberingSystem(i){gu=i}static get defaultOutputCalendar(){return Gr}static set defaultOutputCalendar(i){Gr=i}static get defaultWeekSettings(){return xu}static set defaultWeekSettings(i){xu=Qr(i)}static get twoDigitCutoffYear(){return Ps}static set twoDigitCutoffYear(i){Ps=i%100}static get throwOnInvalid(){return il}static set throwOnInvalid(i){il=i}static resetCaches(){Ye.resetCache(),we.resetCache(),Ee.resetCache(),$s()}}class ga{constructor(i,h){this.reason=i,this.explanation=h}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Fr=[0,31,59,90,120,151,181,212,243,273,304,334],Gs=[0,31,60,91,121,152,182,213,244,274,305,335];function ia(g,i){return new ga("unit out of range",`you specified ${i} (of type ${typeof i}) as a ${g}, which is invalid`)}function Fs(g,i,h){const y=new Date(Date.UTC(g,i-1,h));g<100&&g>=0&&y.setUTCFullYear(y.getUTCFullYear()-1900);const w=y.getUTCDay();return w===0?7:w}function Zr(g,i,h){return h+(cl(g)?Gs:Fr)[i-1]}function en(g,i){const h=cl(g)?Gs:Fr,y=h.findIndex(R=>R<i),w=i-h[y];return{month:y+1,day:w}}function Et(g,i){return(g-i+7)%7+1}function Yt(g,i=4,h=1){const{year:y,month:w,day:R}=g,L=Zr(y,w,R),H=Et(Fs(y,w,R),h);let V=Math.floor((L-H+14-i)/7),fe;return V<1?(fe=y-1,V=ol(fe,i,h)):V>ol(y,i,h)?(fe=y+1,V=1):fe=y,{weekYear:fe,weekNumber:V,weekday:H,...ss(g)}}function Rn(g,i=4,h=1){const{weekYear:y,weekNumber:w,weekday:R}=g,L=Et(Fs(y,1,i),h),H=an(y);let V=w*7+R-L-7+i,fe;V<1?(fe=y-1,V+=an(fe)):V>H?(fe=y+1,V-=an(y)):fe=y;const{month:ye,day:Ue}=en(fe,V);return{year:fe,month:ye,day:Ue,...ss(g)}}function Kl(g){const{year:i,month:h,day:y}=g,w=Zr(i,h,y);return{year:i,ordinal:w,...ss(g)}}function pu(g){const{year:i,ordinal:h}=g,{month:y,day:w}=en(i,h);return{year:i,month:y,day:w,...ss(g)}}function yu(g,i){if(!Re(g.localWeekday)||!Re(g.localWeekNumber)||!Re(g.localWeekYear)){if(!Re(g.weekday)||!Re(g.weekNumber)||!Re(g.weekYear))throw new f("Cannot mix locale-based week fields with ISO-based week fields");return Re(g.localWeekday)||(g.weekday=g.localWeekday),Re(g.localWeekNumber)||(g.weekNumber=g.localWeekNumber),Re(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 vu(g,i=4,h=1){const y=tn(g.weekYear),w=Jt(g.weekNumber,1,ol(g.weekYear,i,h)),R=Jt(g.weekday,1,7);return y?w?R?!1:ia("weekday",g.weekday):ia("week",g.weekNumber):ia("weekYear",g.weekYear)}function es(g){const i=tn(g.year),h=Jt(g.ordinal,1,an(g.year));return i?h?!1:ia("ordinal",g.ordinal):ia("year",g.year)}function Zs(g){const i=tn(g.year),h=Jt(g.month,1,12),y=Jt(g.day,1,Qs(g.year,g.month));return i?h?y?!1:ia("day",g.day):ia("month",g.month):ia("year",g.year)}function Dn(g){const{hour:i,minute:h,second:y,millisecond:w}=g,R=Jt(i,0,23)||i===24&&h===0&&y===0&&w===0,L=Jt(h,0,59),H=Jt(y,0,59),V=Jt(w,0,999);return R?L?H?V?!1:ia("millisecond",w):ia("second",y):ia("minute",h):ia("hour",i)}function Re(g){return typeof g>"u"}function xa(g){return typeof g=="number"}function tn(g){return typeof g=="number"&&g%1===0}function _t(g){return typeof g=="string"}function bu(g){return Object.prototype.toString.call(g)==="[object Date]"}function Wr(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function bn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function ul(g){return Array.isArray(g)?g:[g]}function Nu(g,i,h){if(g.length!==0)return g.reduce((y,w)=>{const R=[i(w),w];return y&&h(y[0],R[0])===y[0]?y:R},null)[1]}function Su(g,i){return i.reduce((h,y)=>(h[y]=g[y],h),{})}function An(g,i){return Object.prototype.hasOwnProperty.call(g,i)}function Qr(g){if(g==null)return null;if(typeof g!="object")throw new v("Week settings must be an object");if(!Jt(g.firstDay,1,7)||!Jt(g.minimalDays,1,7)||!Array.isArray(g.weekend)||g.weekend.some(i=>!Jt(i,1,7)))throw new v("Invalid week settings");return{firstDay:g.firstDay,minimalDays:g.minimalDays,weekend:Array.from(g.weekend)}}function Jt(g,i,h){return tn(g)&&g>=i&&g<=h}function Ws(g,i){return g-i*Math.floor(g/i)}function nt(g,i=2){const h=g<0;let y;return h?y="-"+(""+-g).padStart(i,"0"):y=(""+g).padStart(i,"0"),y}function Tt(g){if(!(Re(g)||g===null||g===""))return parseInt(g,10)}function Nn(g){if(!(Re(g)||g===null||g===""))return parseFloat(g)}function Ir(g){if(!(Re(g)||g===null||g==="")){const i=parseFloat("0."+g)*1e3;return Math.floor(i)}}function ts(g,i,h="round"){const y=10**i;switch(h){case"expand":return g>0?Math.ceil(g*y)/y:Math.floor(g*y)/y;case"trunc":return Math.trunc(g*y)/y;case"round":return Math.round(g*y)/y;case"floor":return Math.floor(g*y)/y;case"ceil":return Math.ceil(g*y)/y;default:throw new RangeError(`Value rounding ${h} is out of range`)}}function cl(g){return g%4===0&&(g%100!==0||g%400===0)}function an(g){return cl(g)?366:365}function Qs(g,i){const h=Ws(i-1,12)+1,y=g+(i-h)/12;return h===2?cl(y)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][h-1]}function Kt(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 Is(g,i,h){return-Et(Fs(g,1,i),h)+i-1}function ol(g,i=4,h=1){const y=Is(g,i,h),w=Is(g+1,i,h);return(an(g)-y+w)/7}function as(g){return g>99?g:g>ht.twoDigitCutoffYear?1900+g:2e3+g}function kn(g,i,h,y=null){const w=new Date(g),R={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};y&&(R.timeZone=y);const L={timeZoneName:i,...R},H=new Intl.DateTimeFormat(h,L).formatToParts(w).find(V=>V.type.toLowerCase()==="timezonename");return H?H.value:null}function ns(g,i){let h=parseInt(g,10);Number.isNaN(h)&&(h=0);const y=parseInt(i,10)||0,w=h<0||Object.is(h,-0)?-y:y;return h*60+w}function Xr(g){const i=Number(g);if(typeof g=="boolean"||g===""||!Number.isFinite(i))throw new v(`Invalid unit value ${g}`);return i}function nn(g,i){const h={};for(const y in g)if(An(g,y)){const w=g[y];if(w==null)continue;h[i(y)]=Xr(w)}return h}function ls(g,i){const h=Math.trunc(Math.abs(g/60)),y=Math.trunc(Math.abs(g%60)),w=g>=0?"+":"-";switch(i){case"short":return`${w}${nt(h,2)}:${nt(y,2)}`;case"narrow":return`${w}${h}${y>0?`:${y}`:""}`;case"techie":return`${w}${nt(h,2)}${nt(y,2)}`;default:throw new RangeError(`Value format ${i} is out of range for property format`)}}function ss(g){return Su(g,["hour","minute","second","millisecond"])}const ju=["January","February","March","April","May","June","July","August","September","October","November","December"],Xs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],co=["J","F","M","A","M","J","J","A","S","O","N","D"];function wu(g){switch(g){case"narrow":return[...co];case"short":return[...Xs];case"long":return[...ju];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 rs=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ba=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Jr=["M","T","W","T","F","S","S"];function Js(g){switch(g){case"narrow":return[...Jr];case"short":return[...Ba];case"long":return[...rs];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const _n=["AM","PM"],dl=["Before Christ","Anno Domini"],Eu=["BC","AD"],Kr=["B","A"];function ei(g){switch(g){case"narrow":return[...Kr];case"short":return[...Eu];case"long":return[...dl];default:return null}}function is(g){return _n[g.hour<12?0:1]}function ln(g,i){return Js(i)[g.weekday-1]}function ti(g,i){return wu(i)[g.month-1]}function us(g,i){return ei(i)[g.year<0?0:1]}function Sn(g,i,h="always",y=!1){const w={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."]},R=["hours","minutes","seconds"].indexOf(g)===-1;if(h==="auto"&&R){const Ue=g==="days";switch(i){case 1:return Ue?"tomorrow":`next ${w[g][0]}`;case-1:return Ue?"yesterday":`last ${w[g][0]}`;case 0:return Ue?"today":`this ${w[g][0]}`}}const L=Object.is(i,-0)||i<0,H=Math.abs(i),V=H===1,fe=w[g],ye=y?V?fe[1]:fe[2]||fe[1]:V?w[g][0]:g;return L?`${H} ${ye} ago`:`in ${H} ${ye}`}function Ks(g,i){let h="";for(const y of g)y.literal?h+=y.val:h+=i(y.val);return h}const er={D:T,DD:j,DDD:C,DDDD:M,t:A,tt:I,ttt:B,tttt:J,T:K,TT:ce,TTT:P,TTTT:F,f:Z,ff:O,fff:oe,ffff:xe,F:ne,FF:le,FFF:ee,FFFF:Y};class $t{static create(i,h={}){return new $t(i,h)}static parseFormat(i){let h=null,y="",w=!1;const R=[];for(let L=0;L<i.length;L++){const H=i.charAt(L);H==="'"?((y.length>0||w)&&R.push({literal:w||/^\s+$/.test(y),val:y===""?"'":y}),h=null,y="",w=!w):w||H===h?y+=H:(y.length>0&&R.push({literal:/^\s+$/.test(y),val:y}),y=H,h=H)}return y.length>0&&R.push({literal:w||/^\s+$/.test(y),val:y}),R}static macroTokenToFormatOpts(i){return er[i]}constructor(i,h){this.opts=h,this.loc=i,this.systemLoc=null}formatWithSystemDefault(i,h){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(i,{...this.opts,...h}).format()}dtFormatter(i,h={}){return this.loc.dtFormatter(i,{...this.opts,...h})}formatDateTime(i,h){return this.dtFormatter(i,h).format()}formatDateTimeParts(i,h){return this.dtFormatter(i,h).formatToParts()}formatInterval(i,h){return this.dtFormatter(i.start,h).dtf.formatRange(i.start.toJSDate(),i.end.toJSDate())}resolvedOptions(i,h){return this.dtFormatter(i,h).resolvedOptions()}num(i,h=0,y=void 0){if(this.opts.forceSimple)return nt(i,h);const w={...this.opts};return h>0&&(w.padTo=h),y&&(w.signDisplay=y),this.loc.numberFormatter(w).format(i)}formatDateTimeFromString(i,h){const y=this.loc.listingMode()==="en",w=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",R=(De,Nt)=>this.loc.extract(i,De,Nt),L=De=>i.isOffsetFixed&&i.offset===0&&De.allowZ?"Z":i.isValid?i.zone.formatOffset(i.ts,De.format):"",H=()=>y?is(i):R({hour:"numeric",hourCycle:"h12"},"dayperiod"),V=(De,Nt)=>y?ti(i,De):R(Nt?{month:De}:{month:De,day:"numeric"},"month"),fe=(De,Nt)=>y?ln(i,De):R(Nt?{weekday:De}:{weekday:De,month:"long",day:"numeric"},"weekday"),ye=De=>{const Nt=$t.macroTokenToFormatOpts(De);return Nt?this.formatWithSystemDefault(i,Nt):De},Ue=De=>y?us(i,De):R({era:De},"era"),Qe=De=>{switch(De){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 L({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return L({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return L({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 H();case"d":return w?R({day:"numeric"},"day"):this.num(i.day);case"dd":return w?R({day:"2-digit"},"day"):this.num(i.day,2);case"c":return this.num(i.weekday);case"ccc":return fe("short",!0);case"cccc":return fe("long",!0);case"ccccc":return fe("narrow",!0);case"E":return this.num(i.weekday);case"EEE":return fe("short",!1);case"EEEE":return fe("long",!1);case"EEEEE":return fe("narrow",!1);case"L":return w?R({month:"numeric",day:"numeric"},"month"):this.num(i.month);case"LL":return w?R({month:"2-digit",day:"numeric"},"month"):this.num(i.month,2);case"LLL":return V("short",!0);case"LLLL":return V("long",!0);case"LLLLL":return V("narrow",!0);case"M":return w?R({month:"numeric"},"month"):this.num(i.month);case"MM":return w?R({month:"2-digit"},"month"):this.num(i.month,2);case"MMM":return V("short",!1);case"MMMM":return V("long",!1);case"MMMMM":return V("narrow",!1);case"y":return w?R({year:"numeric"},"year"):this.num(i.year);case"yy":return w?R({year:"2-digit"},"year"):this.num(i.year.toString().slice(-2),2);case"yyyy":return w?R({year:"numeric"},"year"):this.num(i.year,4);case"yyyyyy":return w?R({year:"numeric"},"year"):this.num(i.year,6);case"G":return Ue("short");case"GG":return Ue("long");case"GGGGG":return Ue("narrow");case"kk":return this.num(i.weekYear.toString().slice(-2),2);case"kkkk":return this.num(i.weekYear,4);case"W":return this.num(i.weekNumber);case"WW":return this.num(i.weekNumber,2);case"n":return this.num(i.localWeekNumber);case"nn":return this.num(i.localWeekNumber,2);case"ii":return this.num(i.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(i.localWeekYear,4);case"o":return this.num(i.ordinal);case"ooo":return this.num(i.ordinal,3);case"q":return this.num(i.quarter);case"qq":return this.num(i.quarter,2);case"X":return this.num(Math.floor(i.ts/1e3));case"x":return this.num(i.ts);default:return ye(De)}};return Ks($t.parseFormat(h),Qe)}formatDurationFromString(i,h){const y=this.opts.signMode==="negativeLargestOnly"?-1:1,w=ye=>{switch(ye[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},R=(ye,Ue)=>Qe=>{const De=w(Qe);if(De){const Nt=Ue.isNegativeDuration&&De!==Ue.largestUnit?y:1;let Ft;return this.opts.signMode==="negativeLargestOnly"&&De!==Ue.largestUnit?Ft="never":this.opts.signMode==="all"?Ft="always":Ft="auto",this.num(ye.get(De)*Nt,Qe.length,Ft)}else return Qe},L=$t.parseFormat(h),H=L.reduce((ye,{literal:Ue,val:Qe})=>Ue?ye:ye.concat(Qe),[]),V=i.shiftTo(...H.map(w).filter(ye=>ye)),fe={isNegativeDuration:V<0,largestUnit:Object.keys(V.values)[0]};return Ks(L,R(V,fe))}}const cs=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function sn(...g){const i=g.reduce((h,y)=>h+y.source,"");return RegExp(`^${i}$`)}function zn(...g){return i=>g.reduce(([h,y,w],R)=>{const[L,H,V]=R(i,w);return[{...h,...L},H||y,V]},[{},null,1]).slice(0,2)}function Mt(g,...i){if(g==null)return[null,null];for(const[h,y]of i){const w=h.exec(g);if(w)return y(w)}return[null,null]}function jn(...g){return(i,h)=>{const y={};let w;for(w=0;w<g.length;w++)y[g[w]]=Tt(i[h+w]);return[y,null,h+w]}}const os=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,ds=`(?:${os.source}?(?:\\[(${cs.source})\\])?)?`,ai=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,tr=RegExp(`${ai.source}${ds}`),fs=RegExp(`(?:[Tt]${tr.source})?`),hs=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ar=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Tu=/(\d{4})-?(\d{3})/,oo=jn("weekYear","weekNumber","weekDay"),fo=jn("year","ordinal"),ho=/(\d{4})-(\d\d)-(\d\d)/,nr=RegExp(`${ai.source} ?(?:${os.source}|(${cs.source}))?`),mo=RegExp(`(?: ${nr.source})?`);function fl(g,i,h){const y=g[i];return Re(y)?h:Tt(y)}function go(g,i){return[{year:fl(g,i),month:fl(g,i+1,1),day:fl(g,i+2,1)},null,i+3]}function hl(g,i){return[{hours:fl(g,i,0),minutes:fl(g,i+1,0),seconds:fl(g,i+2,0),milliseconds:Ir(g[i+3])},null,i+4]}function ms(g,i){const h=!g[i]&&!g[i+1],y=ns(g[i+1],g[i+2]),w=h?null:xt.instance(y);return[{},w,i+3]}function ml(g,i){const h=g[i]?we.create(g[i]):null;return[{},h,i+1]}const xo=RegExp(`^T?${ai.source}$`),po=/^-?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 yo(g){const[i,h,y,w,R,L,H,V,fe]=g,ye=i[0]==="-",Ue=V&&V[0]==="-",Qe=(De,Nt=!1)=>De!==void 0&&(Nt||De&&ye)?-De:De;return[{years:Qe(Nn(h)),months:Qe(Nn(y)),weeks:Qe(Nn(w)),days:Qe(Nn(R)),hours:Qe(Nn(L)),minutes:Qe(Nn(H)),seconds:Qe(Nn(V),V==="-0"),milliseconds:Qe(Ir(fe),Ue)}]}const vo={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function gs(g,i,h,y,w,R,L){const H={year:i.length===2?as(Tt(i)):Tt(i),month:Xs.indexOf(h)+1,day:Tt(y),hour:Tt(w),minute:Tt(R)};return L&&(H.second=Tt(L)),g&&(H.weekday=g.length>3?rs.indexOf(g)+1:Ba.indexOf(g)+1),H}const bo=/^(?:(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 No(g){const[,i,h,y,w,R,L,H,V,fe,ye,Ue]=g,Qe=gs(i,w,y,h,R,L,H);let De;return V?De=vo[V]:fe?De=0:De=ns(ye,Ue),[Qe,new xt(De)]}function So(g){return g.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Mu=/^(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$/,jo=/^(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$/,wo=/^(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 Cu(g){const[,i,h,y,w,R,L,H]=g;return[gs(i,w,y,h,R,L,H),xt.utcInstance]}function Eo(g){const[,i,h,y,w,R,L,H]=g;return[gs(i,H,h,y,w,R,L),xt.utcInstance]}const To=sn(hs,fs),Mo=sn(ar,fs),Co=sn(Tu,fs),Oo=sn(tr),Ou=zn(go,hl,ms,ml),ni=zn(oo,hl,ms,ml),xs=zn(fo,hl,ms,ml),Ro=zn(hl,ms,ml);function Ru(g){return Mt(g,[To,Ou],[Mo,ni],[Co,xs],[Oo,Ro])}function Du(g){return Mt(So(g),[bo,No])}function Au(g){return Mt(g,[Mu,Cu],[jo,Cu],[wo,Eo])}function ku(g){return Mt(g,[po,yo])}const _u=zn(hl);function gl(g){return Mt(g,[xo,_u])}const Do=sn(ho,mo),Ao=sn(nr),ko=zn(hl,ms,ml);function zu(g){return Mt(g,[Do,Ou],[Ao,ko])}const li="Invalid Duration",xl={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}},ps={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},...xl},pa=146097/400,rn=146097/4800,Uu={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:rn/7,days:rn,hours:rn*24,minutes:rn*24*60,seconds:rn*24*60*60,milliseconds:rn*24*60*60*1e3},...xl},wn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],si=wn.slice(0).reverse();function Ca(g,i,h=!1){const y={values:h?i.values:{...g.values,...i.values||{}},loc:g.loc.clone(i.loc),conversionAccuracy:i.conversionAccuracy||g.conversionAccuracy,matrix:i.matrix||g.matrix};return new We(y)}function ri(g,i){var h;let y=(h=i.milliseconds)!=null?h:0;for(const w of si.slice(1))i[w]&&(y+=i[w]*g[w].milliseconds);return y}function ii(g,i){const h=ri(g,i)<0?-1:1;wn.reduceRight((y,w)=>{if(Re(i[w]))return y;if(y){const R=i[y]*h,L=g[w][y],H=Math.floor(R/L);i[w]+=H*h,i[y]-=H*L*h}return w},null),wn.reduce((y,w)=>{if(Re(i[w]))return y;if(y){const R=i[y]%1;i[y]-=R,i[w]+=R*g[y][w]}return w},null)}function ui(g){const i={};for(const[h,y]of Object.entries(g))y!==0&&(i[h]=y);return i}class We{constructor(i){const h=i.conversionAccuracy==="longterm"||!1;let y=h?Uu:ps;i.matrix&&(y=i.matrix),this.values=i.values,this.loc=i.loc||Ye.create(),this.conversionAccuracy=h?"longterm":"casual",this.invalid=i.invalid||null,this.matrix=y,this.isLuxonDuration=!0}static fromMillis(i,h){return We.fromObject({milliseconds:i},h)}static fromObject(i,h={}){if(i==null||typeof i!="object")throw new v(`Duration.fromObject: argument expected to be an object, got ${i===null?"null":typeof i}`);return new We({values:nn(i,We.normalizeUnit),loc:Ye.fromObject(h),conversionAccuracy:h.conversionAccuracy,matrix:h.matrix})}static fromDurationLike(i){if(xa(i))return We.fromMillis(i);if(We.isDuration(i))return i;if(typeof i=="object")return We.fromObject(i);throw new v(`Unknown duration argument ${i} of type ${typeof i}`)}static fromISO(i,h){const[y]=ku(i);return y?We.fromObject(y,h):We.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static fromISOTime(i,h){const[y]=gl(i);return y?We.fromObject(y,h):We.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static invalid(i,h=null){if(!i)throw new v("need to specify a reason the Duration is invalid");const y=i instanceof ga?i:new ga(i,h);if(ht.throwOnInvalid)throw new c(y);return new We({invalid:y})}static normalizeUnit(i){const h={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[i&&i.toLowerCase()];if(!h)throw new m(i);return h}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,h={}){const y={...h,floor:h.round!==!1&&h.floor!==!1};return this.isValid?$t.create(this.loc,y).formatDurationFromString(this,i):li}toHuman(i={}){if(!this.isValid)return li;const h=i.showZeros!==!1,y=wn.map(w=>{const R=this.values[w];return Re(R)||R===0&&!h?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...i,unit:w.slice(0,-1)}).format(R)}).filter(w=>w);return this.loc.listFormatter({type:"conjunction",style:i.listStyle||"narrow",...i}).format(y)}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+=ts(this.seconds+this.milliseconds/1e3,3)+"S"),i==="P"&&(i+="T0S"),i}toISOTime(i={}){if(!this.isValid)return null;const h=this.toMillis();return h<0||h>=864e5?null:(i={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...i,includeOffset:!1},Ee.fromMillis(h,{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?ri(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(i){if(!this.isValid)return this;const h=We.fromDurationLike(i),y={};for(const w of wn)(An(h.values,w)||An(this.values,w))&&(y[w]=h.get(w)+this.get(w));return Ca(this,{values:y},!0)}minus(i){if(!this.isValid)return this;const h=We.fromDurationLike(i);return this.plus(h.negate())}mapUnits(i){if(!this.isValid)return this;const h={};for(const y of Object.keys(this.values))h[y]=Xr(i(this.values[y],y));return Ca(this,{values:h},!0)}get(i){return this[We.normalizeUnit(i)]}set(i){if(!this.isValid)return this;const h={...this.values,...nn(i,We.normalizeUnit)};return Ca(this,{values:h})}reconfigure({locale:i,numberingSystem:h,conversionAccuracy:y,matrix:w}={}){const L={loc:this.loc.clone({locale:i,numberingSystem:h}),matrix:w,conversionAccuracy:y};return Ca(this,L)}as(i){return this.isValid?this.shiftTo(i).get(i):NaN}normalize(){if(!this.isValid)return this;const i=this.toObject();return ii(this.matrix,i),Ca(this,{values:i},!0)}rescale(){if(!this.isValid)return this;const i=ui(this.normalize().shiftToAll().toObject());return Ca(this,{values:i},!0)}shiftTo(...i){if(!this.isValid)return this;if(i.length===0)return this;i=i.map(L=>We.normalizeUnit(L));const h={},y={},w=this.toObject();let R;for(const L of wn)if(i.indexOf(L)>=0){R=L;let H=0;for(const fe in y)H+=this.matrix[fe][L]*y[fe],y[fe]=0;xa(w[L])&&(H+=w[L]);const V=Math.trunc(H);h[L]=V,y[L]=(H*1e3-V*1e3)/1e3}else xa(w[L])&&(y[L]=w[L]);for(const L in y)y[L]!==0&&(h[R]+=L===R?y[L]:y[L]/this.matrix[R][L]);return ii(this.matrix,h),Ca(this,{values:h},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const i={};for(const h of Object.keys(this.values))i[h]=this.values[h]===0?0:-this.values[h];return Ca(this,{values:i},!0)}removeZeros(){if(!this.isValid)return this;const i=ui(this.values);return Ca(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 h(y,w){return y===void 0||y===0?w===void 0||w===0:y===w}for(const y of wn)if(!h(this.values[y],i.values[y]))return!1;return!0}}const pl="Invalid Interval";function _o(g,i){return!g||!g.isValid?pt.invalid("missing or invalid start"):!i||!i.isValid?pt.invalid("missing or invalid end"):i<g?pt.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 pt{constructor(i){this.s=i.start,this.e=i.end,this.invalid=i.invalid||null,this.isLuxonInterval=!0}static invalid(i,h=null){if(!i)throw new v("need to specify a reason the Interval is invalid");const y=i instanceof ga?i:new ga(i,h);if(ht.throwOnInvalid)throw new o(y);return new pt({invalid:y})}static fromDateTimes(i,h){const y=ba(i),w=ba(h),R=_o(y,w);return R??new pt({start:y,end:w})}static after(i,h){const y=We.fromDurationLike(h),w=ba(i);return pt.fromDateTimes(w,w.plus(y))}static before(i,h){const y=We.fromDurationLike(h),w=ba(i);return pt.fromDateTimes(w.minus(y),w)}static fromISO(i,h){const[y,w]=(i||"").split("/",2);if(y&&w){let R,L;try{R=Ee.fromISO(y,h),L=R.isValid}catch{L=!1}let H,V;try{H=Ee.fromISO(w,h),V=H.isValid}catch{V=!1}if(L&&V)return pt.fromDateTimes(R,H);if(L){const fe=We.fromISO(w,h);if(fe.isValid)return pt.after(R,fe)}else if(V){const fe=We.fromISO(y,h);if(fe.isValid)return pt.before(H,fe)}}return pt.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",h){if(!this.isValid)return NaN;const y=this.start.startOf(i,h);let w;return h!=null&&h.useLocaleWeeks?w=this.end.reconfigure({locale:y.locale}):w=this.end,w=w.startOf(i,h),Math.floor(w.diff(y,i).get(i))+(w.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:h}={}){return this.isValid?pt.fromDateTimes(i||this.s,h||this.e):this}splitAt(...i){if(!this.isValid)return[];const h=i.map(ba).filter(L=>this.contains(L)).sort((L,H)=>L.toMillis()-H.toMillis()),y=[];let{s:w}=this,R=0;for(;w<this.e;){const L=h[R]||this.e,H=+L>+this.e?this.e:L;y.push(pt.fromDateTimes(w,H)),w=H,R+=1}return y}splitBy(i){const h=We.fromDurationLike(i);if(!this.isValid||!h.isValid||h.as("milliseconds")===0)return[];let{s:y}=this,w=1,R;const L=[];for(;y<this.e;){const H=this.start.plus(h.mapUnits(V=>V*w));R=+H>+this.e?this.e:H,L.push(pt.fromDateTimes(y,R)),y=R,w+=1}return L}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 h=this.s>i.s?this.s:i.s,y=this.e<i.e?this.e:i.e;return h>=y?null:pt.fromDateTimes(h,y)}union(i){if(!this.isValid)return this;const h=this.s<i.s?this.s:i.s,y=this.e>i.e?this.e:i.e;return pt.fromDateTimes(h,y)}static merge(i){const[h,y]=i.sort((w,R)=>w.s-R.s).reduce(([w,R],L)=>R?R.overlaps(L)||R.abutsStart(L)?[w,R.union(L)]:[w.concat([R]),L]:[w,L],[[],null]);return y&&h.push(y),h}static xor(i){let h=null,y=0;const w=[],R=i.map(V=>[{time:V.s,type:"s"},{time:V.e,type:"e"}]),L=Array.prototype.concat(...R),H=L.sort((V,fe)=>V.time-fe.time);for(const V of H)y+=V.type==="s"?1:-1,y===1?h=V.time:(h&&+h!=+V.time&&w.push(pt.fromDateTimes(h,V.time)),h=null);return pt.merge(w)}difference(...i){return pt.xor([this].concat(i)).map(h=>this.intersection(h)).filter(h=>h&&!h.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:pl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(i=T,h={}){return this.isValid?$t.create(this.s.loc.clone(h),i).formatInterval(this):pl}toISO(i){return this.isValid?`${this.s.toISO(i)}/${this.e.toISO(i)}`:pl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:pl}toISOTime(i){return this.isValid?`${this.s.toISOTime(i)}/${this.e.toISOTime(i)}`:pl}toFormat(i,{separator:h=" – "}={}){return this.isValid?`${this.s.toFormat(i)}${h}${this.e.toFormat(i)}`:pl}toDuration(i,h){return this.isValid?this.e.diff(this.s,i,h):We.invalid(this.invalidReason)}mapEndpoints(i){return pt.fromDateTimes(i(this.s),i(this.e))}}class ys{static hasDST(i=ht.defaultZone){const h=Ee.now().setZone(i).set({month:12});return!i.isUniversal&&h.offset!==h.set({month:6}).offset}static isValidIANAZone(i){return we.isValidZone(i)}static normalizeZone(i){return At(i,ht.defaultZone)}static getStartOfWeek({locale:i=null,locObj:h=null}={}){return(h||Ye.create(i)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:i=null,locObj:h=null}={}){return(h||Ye.create(i)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:i=null,locObj:h=null}={}){return(h||Ye.create(i)).getWeekendDays().slice()}static months(i="long",{locale:h=null,numberingSystem:y=null,locObj:w=null,outputCalendar:R="gregory"}={}){return(w||Ye.create(h,y,R)).months(i)}static monthsFormat(i="long",{locale:h=null,numberingSystem:y=null,locObj:w=null,outputCalendar:R="gregory"}={}){return(w||Ye.create(h,y,R)).months(i,!0)}static weekdays(i="long",{locale:h=null,numberingSystem:y=null,locObj:w=null}={}){return(w||Ye.create(h,y,null)).weekdays(i)}static weekdaysFormat(i="long",{locale:h=null,numberingSystem:y=null,locObj:w=null}={}){return(w||Ye.create(h,y,null)).weekdays(i,!0)}static meridiems({locale:i=null}={}){return Ye.create(i).meridiems()}static eras(i="short",{locale:h=null}={}){return Ye.create(h,null,"gregory").eras(i)}static features(){return{relative:Wr(),localeWeek:bn()}}}function ua(g,i){const h=w=>w.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),y=h(i)-h(g);return Math.floor(We.fromMillis(y).as("days"))}function vs(g,i,h){const y=[["years",(V,fe)=>fe.year-V.year],["quarters",(V,fe)=>fe.quarter-V.quarter+(fe.year-V.year)*4],["months",(V,fe)=>fe.month-V.month+(fe.year-V.year)*12],["weeks",(V,fe)=>{const ye=ua(V,fe);return(ye-ye%7)/7}],["days",ua]],w={},R=g;let L,H;for(const[V,fe]of y)h.indexOf(V)>=0&&(L=V,w[V]=fe(g,i),H=R.plus(w),H>i?(w[V]--,g=R.plus(w),g>i&&(H=g,w[V]--,g=R.plus(w))):g=H);return[g,w,H,L]}function Lu(g,i,h,y){let[w,R,L,H]=vs(g,i,h);const V=i-w,fe=h.filter(Ue=>["hours","minutes","seconds","milliseconds"].indexOf(Ue)>=0);fe.length===0&&(L<i&&(L=w.plus({[H]:1})),L!==w&&(R[H]=(R[H]||0)+V/(L-w)));const ye=We.fromObject(R,y);return fe.length>0?We.fromMillis(V,y).shiftTo(...fe).plus(ye):ye}const Hu="missing Intl.DateTimeFormat.formatToParts support";function Je(g,i=h=>h){return{regex:g,deser:([h])=>i(uo(h))}}const lr="[ ]",qu=new RegExp(lr,"g");function yl(g){return g.replace(/\./g,"\\.?").replace(qu,lr)}function sr(g){return g.replace(/\./g,"").replace(qu," ").toLowerCase()}function ea(g,i){return g===null?null:{regex:RegExp(g.map(yl).join("|")),deser:([h])=>g.findIndex(y=>sr(h)===sr(y))+i}}function rr(g,i){return{regex:g,deser:([,h,y])=>ns(h,y),groups:i}}function bs(g){return{regex:g,deser:([i])=>i}}function Un(g){return g.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function vl(g,i){const h=ra(i),y=ra(i,"{2}"),w=ra(i,"{3}"),R=ra(i,"{4}"),L=ra(i,"{6}"),H=ra(i,"{1,2}"),V=ra(i,"{1,3}"),fe=ra(i,"{1,6}"),ye=ra(i,"{1,9}"),Ue=ra(i,"{2,4}"),Qe=ra(i,"{4,6}"),De=Zt=>({regex:RegExp(Un(Zt.val)),deser:([En])=>En,literal:!0}),Ft=(Zt=>{if(g.literal)return De(Zt);switch(Zt.val){case"G":return ea(i.eras("short"),0);case"GG":return ea(i.eras("long"),0);case"y":return Je(fe);case"yy":return Je(Ue,as);case"yyyy":return Je(R);case"yyyyy":return Je(Qe);case"yyyyyy":return Je(L);case"M":return Je(H);case"MM":return Je(y);case"MMM":return ea(i.months("short",!0),1);case"MMMM":return ea(i.months("long",!0),1);case"L":return Je(H);case"LL":return Je(y);case"LLL":return ea(i.months("short",!1),1);case"LLLL":return ea(i.months("long",!1),1);case"d":return Je(H);case"dd":return Je(y);case"o":return Je(V);case"ooo":return Je(w);case"HH":return Je(y);case"H":return Je(H);case"hh":return Je(y);case"h":return Je(H);case"mm":return Je(y);case"m":return Je(H);case"q":return Je(H);case"qq":return Je(y);case"s":return Je(H);case"ss":return Je(y);case"S":return Je(V);case"SSS":return Je(w);case"u":return bs(ye);case"uu":return bs(H);case"uuu":return Je(h);case"a":return ea(i.meridiems(),0);case"kkkk":return Je(R);case"kk":return Je(Ue,as);case"W":return Je(H);case"WW":return Je(y);case"E":case"c":return Je(h);case"EEE":return ea(i.weekdays("short",!1),1);case"EEEE":return ea(i.weekdays("long",!1),1);case"ccc":return ea(i.weekdays("short",!0),1);case"cccc":return ea(i.weekdays("long",!0),1);case"Z":case"ZZ":return rr(new RegExp(`([+-]${H.source})(?::(${y.source}))?`),2);case"ZZZ":return rr(new RegExp(`([+-]${H.source})(${y.source})?`),2);case"z":return bs(/[a-z_+-/]{1,256}?/i);case" ":return bs(/[^\S\n\r]/);default:return De(Zt)}})(g)||{invalidReason:Hu};return Ft.token=g,Ft}const ci={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 Bu(g,i,h){const{type:y,value:w}=g;if(y==="literal"){const V=/^\s+$/.test(w);return{literal:!V,val:V?" ":w}}const R=i[y];let L=y;y==="hour"&&(i.hour12!=null?L=i.hour12?"hour12":"hour24":i.hourCycle!=null?i.hourCycle==="h11"||i.hourCycle==="h12"?L="hour12":L="hour24":L=h.hour12?"hour12":"hour24");let H=ci[L];if(typeof H=="object"&&(H=H[R]),H)return{literal:!1,val:H}}function Ln(g){return[`^${g.map(h=>h.regex).reduce((h,y)=>`${h}(${y.source})`,"")}$`,g]}function Vu(g,i,h){const y=g.match(i);if(y){const w={};let R=1;for(const L in h)if(An(h,L)){const H=h[L],V=H.groups?H.groups+1:1;!H.literal&&H.token&&(w[H.token.val[0]]=H.deser(y.slice(R,R+V))),R+=V}return[y,w]}else return[y,{}]}function Yu(g){const i=R=>{switch(R){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let h=null,y;return Re(g.z)||(h=we.create(g.z)),Re(g.Z)||(h||(h=new xt(g.Z)),y=g.Z),Re(g.q)||(g.M=(g.q-1)*3+1),Re(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),Re(g.u)||(g.S=Ir(g.u)),[Object.keys(g).reduce((R,L)=>{const H=i(L);return H&&(R[H]=g[L]),R},{}),h,y]}let ir=null;function Uo(){return ir||(ir=Ee.fromMillis(1555555555555)),ir}function Lo(g,i){if(g.literal)return g;const h=$t.macroTokenToFormatOpts(g.val),y=ya(h,i);return y==null||y.includes(void 0)?g:y}function $u(g,i){return Array.prototype.concat(...g.map(h=>Lo(h,i)))}class oi{constructor(i,h){if(this.locale=i,this.format=h,this.tokens=$u($t.parseFormat(h),i),this.units=this.tokens.map(y=>vl(y,i)),this.disqualifyingUnit=this.units.find(y=>y.invalidReason),!this.disqualifyingUnit){const[y,w]=Ln(this.units);this.regex=RegExp(y,"i"),this.handlers=w}}explainFromTokens(i){if(this.isValid){const[h,y]=Vu(i,this.regex,this.handlers),[w,R,L]=y?Yu(y):[null,null,void 0];if(An(y,"a")&&An(y,"H"))throw new f("Can't include meridiem when specifying 24-hour format");return{input:i,tokens:this.tokens,regex:this.regex,rawMatches:h,matches:y,result:w,zone:R,specificOffset:L}}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 di(g,i,h){return new oi(g,h).explainFromTokens(i)}function fi(g,i,h){const{result:y,zone:w,specificOffset:R,invalidReason:L}=di(g,i,h);return[y,w,R,L]}function ya(g,i){if(!g)return null;const y=$t.create(i,g).dtFormatter(Uo()),w=y.formatToParts(),R=y.resolvedOptions();return w.map(L=>Bu(L,g,R))}const bl="Invalid DateTime",da=864e13;function Va(g){return new ga("unsupported zone",`the zone "${g.name}" is not supported`)}function Ns(g){return g.weekData===null&&(g.weekData=Yt(g.c)),g.weekData}function Nl(g){return g.localWeekData===null&&(g.localWeekData=Yt(g.c,g.loc.getMinDaysInFirstWeek(),g.loc.getStartOfWeek())),g.localWeekData}function Ya(g,i){const h={ts:g.ts,zone:g.zone,c:g.c,o:g.o,loc:g.loc,invalid:g.invalid};return new Ee({...h,...i,old:h})}function ur(g,i,h){let y=g-i*60*1e3;const w=h.offset(y);if(i===w)return[y,i];y-=(w-i)*60*1e3;const R=h.offset(y);return w===R?[y,w]:[g-Math.min(w,R)*60*1e3,Math.max(w,R)]}function $a(g,i){g+=i*60*1e3;const h=new Date(g);return{year:h.getUTCFullYear(),month:h.getUTCMonth()+1,day:h.getUTCDate(),hour:h.getUTCHours(),minute:h.getUTCMinutes(),second:h.getUTCSeconds(),millisecond:h.getUTCMilliseconds()}}function Ss(g,i,h){return ur(Kt(g),i,h)}function js(g,i){const h=g.o,y=g.c.year+Math.trunc(i.years),w=g.c.month+Math.trunc(i.months)+Math.trunc(i.quarters)*3,R={...g.c,year:y,month:w,day:Math.min(g.c.day,Qs(y,w))+Math.trunc(i.days)+Math.trunc(i.weeks)*7},L=We.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"),H=Kt(R);let[V,fe]=ur(H,h,g.zone);return L!==0&&(V+=L,fe=g.zone.offset(V)),{ts:V,o:fe}}function Oa(g,i,h,y,w,R){const{setZone:L,zone:H}=h;if(g&&Object.keys(g).length!==0||i){const V=i||H,fe=Ee.fromObject(g,{...h,zone:V,specificOffset:R});return L?fe:fe.setZone(H)}else return Ee.invalid(new ga("unparsable",`the input "${w}" can't be parsed as ${y}`))}function cr(g,i,h=!0){return g.isValid?$t.create(Ye.create("en-US"),{allowZ:h,forceSimple:!0}).formatDateTimeFromString(g,i):null}function ta(g,i,h){const y=g.c.year>9999||g.c.year<0;let w="";if(y&&g.c.year>=0&&(w+="+"),w+=nt(g.c.year,y?6:4),h==="year")return w;if(i){if(w+="-",w+=nt(g.c.month),h==="month")return w;w+="-"}else if(w+=nt(g.c.month),h==="month")return w;return w+=nt(g.c.day),w}function or(g,i,h,y,w,R,L){let H=!h||g.c.millisecond!==0||g.c.second!==0,V="";switch(L){case"day":case"month":case"year":break;default:if(V+=nt(g.c.hour),L==="hour")break;if(i){if(V+=":",V+=nt(g.c.minute),L==="minute")break;H&&(V+=":",V+=nt(g.c.second))}else{if(V+=nt(g.c.minute),L==="minute")break;H&&(V+=nt(g.c.second))}if(L==="second")break;H&&(!y||g.c.millisecond!==0)&&(V+=".",V+=nt(g.c.millisecond,3))}return w&&(g.isOffsetFixed&&g.offset===0&&!R?V+="Z":g.o<0?(V+="-",V+=nt(Math.trunc(-g.o/60)),V+=":",V+=nt(Math.trunc(-g.o%60))):(V+="+",V+=nt(Math.trunc(g.o/60)),V+=":",V+=nt(Math.trunc(g.o%60)))),R&&(V+="["+g.zone.ianaName+"]"),V}const Pa={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Pu={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},dr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ga=["year","month","day","hour","minute","second","millisecond"],hi=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Gu=["year","ordinal","hour","minute","second","millisecond"];function Sl(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 m(g);return i}function mi(g){switch(g.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Sl(g)}}function va(g){if(un===void 0&&(un=ht.now()),g.type!=="iana")return g.offset(un);const i=g.name;let h=ca.get(i);return h===void 0&&(h=g.offset(un),ca.set(i,h)),h}function Hn(g,i){const h=At(i.zone,ht.defaultZone);if(!h.isValid)return Ee.invalid(Va(h));const y=Ye.fromObject(i);let w,R;if(Re(g.year))w=ht.now();else{for(const V of Ga)Re(g[V])&&(g[V]=Pa[V]);const L=Zs(g)||Dn(g);if(L)return Ee.invalid(L);const H=va(h);[w,R]=Ss(g,H,h)}return new Ee({ts:w,zone:h,loc:y,o:R})}function qn(g,i,h){const y=Re(h.round)?!0:h.round,w=Re(h.rounding)?"trunc":h.rounding,R=(H,V)=>(H=ts(H,y||h.calendary?0:2,h.calendary?"round":w),i.loc.clone(h).relFormatter(h).format(H,V)),L=H=>h.calendary?i.hasSame(g,H)?0:i.startOf(H).diff(g.startOf(H),H).get(H):i.diff(g,H).get(H);if(h.unit)return R(L(h.unit),h.unit);for(const H of h.units){const V=L(H);if(Math.abs(V)>=1)return R(V,H)}return R(g>i?-0:0,h.units[h.units.length-1])}function ws(g){let i={},h;return g.length>0&&typeof g[g.length-1]=="object"?(i=g[g.length-1],h=Array.from(g).slice(0,g.length-1)):h=Array.from(g),[i,h]}let un;const ca=new Map;class Ee{constructor(i){const h=i.zone||ht.defaultZone;let y=i.invalid||(Number.isNaN(i.ts)?new ga("invalid input"):null)||(h.isValid?null:Va(h));this.ts=Re(i.ts)?ht.now():i.ts;let w=null,R=null;if(!y)if(i.old&&i.old.ts===this.ts&&i.old.zone.equals(h))[w,R]=[i.old.c,i.old.o];else{const H=xa(i.o)&&!i.old?i.o:h.offset(this.ts);w=$a(this.ts,H),y=Number.isNaN(w.year)?new ga("invalid input"):null,w=y?null:w,R=y?null:H}this._zone=h,this.loc=i.loc||Ye.create(),this.invalid=y,this.weekData=null,this.localWeekData=null,this.c=w,this.o=R,this.isLuxonDateTime=!0}static now(){return new Ee({})}static local(){const[i,h]=ws(arguments),[y,w,R,L,H,V,fe]=h;return Hn({year:y,month:w,day:R,hour:L,minute:H,second:V,millisecond:fe},i)}static utc(){const[i,h]=ws(arguments),[y,w,R,L,H,V,fe]=h;return i.zone=xt.utcInstance,Hn({year:y,month:w,day:R,hour:L,minute:H,second:V,millisecond:fe},i)}static fromJSDate(i,h={}){const y=bu(i)?i.valueOf():NaN;if(Number.isNaN(y))return Ee.invalid("invalid input");const w=At(h.zone,ht.defaultZone);return w.isValid?new Ee({ts:y,zone:w,loc:Ye.fromObject(h)}):Ee.invalid(Va(w))}static fromMillis(i,h={}){if(xa(i))return i<-da||i>da?Ee.invalid("Timestamp out of range"):new Ee({ts:i,zone:At(h.zone,ht.defaultZone),loc:Ye.fromObject(h)});throw new v(`fromMillis requires a numerical input, but received a ${typeof i} with value ${i}`)}static fromSeconds(i,h={}){if(xa(i))return new Ee({ts:i*1e3,zone:At(h.zone,ht.defaultZone),loc:Ye.fromObject(h)});throw new v("fromSeconds requires a numerical input")}static fromObject(i,h={}){i=i||{};const y=At(h.zone,ht.defaultZone);if(!y.isValid)return Ee.invalid(Va(y));const w=Ye.fromObject(h),R=nn(i,mi),{minDaysInFirstWeek:L,startOfWeek:H}=yu(R,w),V=ht.now(),fe=Re(h.specificOffset)?y.offset(V):h.specificOffset,ye=!Re(R.ordinal),Ue=!Re(R.year),Qe=!Re(R.month)||!Re(R.day),De=Ue||Qe,Nt=R.weekYear||R.weekNumber;if((De||ye)&&Nt)throw new f("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Qe&&ye)throw new f("Can't mix ordinal dates with month/day");const Ft=Nt||R.weekday&&!De;let Zt,En,cn=$a(V,fe);Ft?(Zt=hi,En=Pu,cn=Yt(cn,L,H)):ye?(Zt=Gu,En=dr,cn=Kl(cn)):(Zt=Ga,En=Pa);let fr=!1;for(const Wa of Zt){const hr=R[Wa];Re(hr)?fr?R[Wa]=En[Wa]:R[Wa]=cn[Wa]:fr=!0}const Bn=Ft?vu(R,L,H):ye?es(R):Zs(R),Za=Bn||Dn(R);if(Za)return Ee.invalid(Za);const Tn=Ft?Rn(R,L,H):ye?pu(R):R,[on,gi]=Ss(Tn,fe,y),Vn=new Ee({ts:on,zone:y,o:gi,loc:w});return R.weekday&&De&&i.weekday!==Vn.weekday?Ee.invalid("mismatched weekday",`you can't specify both a weekday of ${R.weekday} and a date of ${Vn.toISO()}`):Vn.isValid?Vn:Ee.invalid(Vn.invalid)}static fromISO(i,h={}){const[y,w]=Ru(i);return Oa(y,w,h,"ISO 8601",i)}static fromRFC2822(i,h={}){const[y,w]=Du(i);return Oa(y,w,h,"RFC 2822",i)}static fromHTTP(i,h={}){const[y,w]=Au(i);return Oa(y,w,h,"HTTP",h)}static fromFormat(i,h,y={}){if(Re(i)||Re(h))throw new v("fromFormat requires an input string and a format");const{locale:w=null,numberingSystem:R=null}=y,L=Ye.fromOpts({locale:w,numberingSystem:R,defaultToEN:!0}),[H,V,fe,ye]=fi(L,i,h);return ye?Ee.invalid(ye):Oa(H,V,y,`format ${h}`,i,fe)}static fromString(i,h,y={}){return Ee.fromFormat(i,h,y)}static fromSQL(i,h={}){const[y,w]=zu(i);return Oa(y,w,h,"SQL",i)}static invalid(i,h=null){if(!i)throw new v("need to specify a reason the DateTime is invalid");const y=i instanceof ga?i:new ga(i,h);if(ht.throwOnInvalid)throw new r(y);return new Ee({invalid:y})}static isDateTime(i){return i&&i.isLuxonDateTime||!1}static parseFormatForOpts(i,h={}){const y=ya(i,Ye.fromObject(h));return y?y.map(w=>w?w.val:null).join(""):null}static expandFormat(i,h={}){return $u($t.parseFormat(i),Ye.fromObject(h)).map(w=>w.val).join("")}static resetCache(){un=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?Ns(this).weekYear:NaN}get weekNumber(){return this.isValid?Ns(this).weekNumber:NaN}get weekday(){return this.isValid?Ns(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Nl(this).weekday:NaN}get localWeekNumber(){return this.isValid?Nl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Nl(this).weekYear:NaN}get ordinal(){return this.isValid?Kl(this.c).ordinal:NaN}get monthShort(){return this.isValid?ys.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ys.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ys.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ys.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,h=6e4,y=Kt(this.c),w=this.zone.offset(y-i),R=this.zone.offset(y+i),L=this.zone.offset(y-w*h),H=this.zone.offset(y-R*h);if(L===H)return[this];const V=y-L*h,fe=y-H*h,ye=$a(V,L),Ue=$a(fe,H);return ye.hour===Ue.hour&&ye.minute===Ue.minute&&ye.second===Ue.second&&ye.millisecond===Ue.millisecond?[Ya(this,{ts:V}),Ya(this,{ts:fe})]:[this]}get isInLeapYear(){return cl(this.year)}get daysInMonth(){return Qs(this.year,this.month)}get daysInYear(){return this.isValid?an(this.year):NaN}get weeksInWeekYear(){return this.isValid?ol(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ol(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(i={}){const{locale:h,numberingSystem:y,calendar:w}=$t.create(this.loc.clone(i),i).resolvedOptions(this);return{locale:h,numberingSystem:y,outputCalendar:w}}toUTC(i=0,h={}){return this.setZone(xt.instance(i),h)}toLocal(){return this.setZone(ht.defaultZone)}setZone(i,{keepLocalTime:h=!1,keepCalendarTime:y=!1}={}){if(i=At(i,ht.defaultZone),i.equals(this.zone))return this;if(i.isValid){let w=this.ts;if(h||y){const R=i.offset(this.ts),L=this.toObject();[w]=Ss(L,R,i)}return Ya(this,{ts:w,zone:i})}else return Ee.invalid(Va(i))}reconfigure({locale:i,numberingSystem:h,outputCalendar:y}={}){const w=this.loc.clone({locale:i,numberingSystem:h,outputCalendar:y});return Ya(this,{loc:w})}setLocale(i){return this.reconfigure({locale:i})}set(i){if(!this.isValid)return this;const h=nn(i,mi),{minDaysInFirstWeek:y,startOfWeek:w}=yu(h,this.loc),R=!Re(h.weekYear)||!Re(h.weekNumber)||!Re(h.weekday),L=!Re(h.ordinal),H=!Re(h.year),V=!Re(h.month)||!Re(h.day),fe=H||V,ye=h.weekYear||h.weekNumber;if((fe||L)&&ye)throw new f("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(V&&L)throw new f("Can't mix ordinal dates with month/day");let Ue;R?Ue=Rn({...Yt(this.c,y,w),...h},y,w):Re(h.ordinal)?(Ue={...this.toObject(),...h},Re(h.day)&&(Ue.day=Math.min(Qs(Ue.year,Ue.month),Ue.day))):Ue=pu({...Kl(this.c),...h});const[Qe,De]=Ss(Ue,this.o,this.zone);return Ya(this,{ts:Qe,o:De})}plus(i){if(!this.isValid)return this;const h=We.fromDurationLike(i);return Ya(this,js(this,h))}minus(i){if(!this.isValid)return this;const h=We.fromDurationLike(i).negate();return Ya(this,js(this,h))}startOf(i,{useLocaleWeeks:h=!1}={}){if(!this.isValid)return this;const y={},w=We.normalizeUnit(i);switch(w){case"years":y.month=1;case"quarters":case"months":y.day=1;case"weeks":case"days":y.hour=0;case"hours":y.minute=0;case"minutes":y.second=0;case"seconds":y.millisecond=0;break}if(w==="weeks")if(h){const R=this.loc.getStartOfWeek(),{weekday:L}=this;L<R&&(y.weekNumber=this.weekNumber-1),y.weekday=R}else y.weekday=1;if(w==="quarters"){const R=Math.ceil(this.month/3);y.month=(R-1)*3+1}return this.set(y)}endOf(i,h){return this.isValid?this.plus({[i]:1}).startOf(i,h).minus(1):this}toFormat(i,h={}){return this.isValid?$t.create(this.loc.redefaultToEN(h)).formatDateTimeFromString(this,i):bl}toLocaleString(i=T,h={}){return this.isValid?$t.create(this.loc.clone(h),i).formatDateTime(this):bl}toLocaleParts(i={}){return this.isValid?$t.create(this.loc.clone(i),i).formatDateTimeParts(this):[]}toISO({format:i="extended",suppressSeconds:h=!1,suppressMilliseconds:y=!1,includeOffset:w=!0,extendedZone:R=!1,precision:L="milliseconds"}={}){if(!this.isValid)return null;L=Sl(L);const H=i==="extended";let V=ta(this,H,L);return Ga.indexOf(L)>=3&&(V+="T"),V+=or(this,H,h,y,w,R,L),V}toISODate({format:i="extended",precision:h="day"}={}){return this.isValid?ta(this,i==="extended",Sl(h)):null}toISOWeekDate(){return cr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:i=!1,suppressSeconds:h=!1,includeOffset:y=!0,includePrefix:w=!1,extendedZone:R=!1,format:L="extended",precision:H="milliseconds"}={}){return this.isValid?(H=Sl(H),(w&&Ga.indexOf(H)>=3?"T":"")+or(this,L==="extended",h,i,y,R,H)):null}toRFC2822(){return cr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return cr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?ta(this,!0):null}toSQLTime({includeOffset:i=!0,includeZone:h=!1,includeOffsetSpace:y=!0}={}){let w="HH:mm:ss.SSS";return(h||i)&&(y&&(w+=" "),h?w+="z":i&&(w+="ZZ")),cr(this,w,!0)}toSQL(i={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(i)}`:null}toString(){return this.isValid?this.toISO():bl}[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 h={...this.c};return i.includeConfig&&(h.outputCalendar=this.outputCalendar,h.numberingSystem=this.loc.numberingSystem,h.locale=this.loc.locale),h}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(i,h="milliseconds",y={}){if(!this.isValid||!i.isValid)return We.invalid("created by diffing an invalid DateTime");const w={locale:this.locale,numberingSystem:this.numberingSystem,...y},R=ul(h).map(We.normalizeUnit),L=i.valueOf()>this.valueOf(),H=L?this:i,V=L?i:this,fe=Lu(H,V,R,w);return L?fe.negate():fe}diffNow(i="milliseconds",h={}){return this.diff(Ee.now(),i,h)}until(i){return this.isValid?pt.fromDateTimes(this,i):this}hasSame(i,h,y){if(!this.isValid)return!1;const w=i.valueOf(),R=this.setZone(i.zone,{keepLocalTime:!0});return R.startOf(h,y)<=w&&w<=R.endOf(h,y)}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 h=i.base||Ee.fromObject({},{zone:this.zone}),y=i.padding?this<h?-i.padding:i.padding:0;let w=["years","months","days","hours","minutes","seconds"],R=i.unit;return Array.isArray(i.unit)&&(w=i.unit,R=void 0),qn(h,this.plus(y),{...i,numeric:"always",units:w,unit:R})}toRelativeCalendar(i={}){return this.isValid?qn(i.base||Ee.fromObject({},{zone:this.zone}),this,{...i,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...i){if(!i.every(Ee.isDateTime))throw new v("min requires all arguments be DateTimes");return Nu(i,h=>h.valueOf(),Math.min)}static max(...i){if(!i.every(Ee.isDateTime))throw new v("max requires all arguments be DateTimes");return Nu(i,h=>h.valueOf(),Math.max)}static fromFormatExplain(i,h,y={}){const{locale:w=null,numberingSystem:R=null}=y,L=Ye.fromOpts({locale:w,numberingSystem:R,defaultToEN:!0});return di(L,i,h)}static fromStringExplain(i,h,y={}){return Ee.fromFormatExplain(i,h,y)}static buildFormatParser(i,h={}){const{locale:y=null,numberingSystem:w=null}=h,R=Ye.fromOpts({locale:y,numberingSystem:w,defaultToEN:!0});return new oi(R,i)}static fromFormatParser(i,h,y={}){if(Re(i)||Re(h))throw new v("fromFormatParser requires an input string and a format parser");const{locale:w=null,numberingSystem:R=null}=y,L=Ye.fromOpts({locale:w,numberingSystem:R,defaultToEN:!0});if(!L.equals(h.locale))throw new v(`fromFormatParser called with a locale of ${L}, but the format parser was created for ${h.locale}`);const{result:H,zone:V,specificOffset:fe,invalidReason:ye}=h.explainFromTokens(i);return ye?Ee.invalid(ye):Oa(H,V,y,`format ${h.format}`,i,fe)}static get DATE_SHORT(){return T}static get DATE_MED(){return j}static get DATE_MED_WITH_WEEKDAY(){return D}static get DATE_FULL(){return C}static get DATE_HUGE(){return M}static get TIME_SIMPLE(){return A}static get TIME_WITH_SECONDS(){return I}static get TIME_WITH_SHORT_OFFSET(){return B}static get TIME_WITH_LONG_OFFSET(){return J}static get TIME_24_SIMPLE(){return K}static get TIME_24_WITH_SECONDS(){return ce}static get TIME_24_WITH_SHORT_OFFSET(){return P}static get TIME_24_WITH_LONG_OFFSET(){return F}static get DATETIME_SHORT(){return Z}static get DATETIME_SHORT_WITH_SECONDS(){return ne}static get DATETIME_MED(){return O}static get DATETIME_MED_WITH_SECONDS(){return le}static get DATETIME_MED_WITH_WEEKDAY(){return k}static get DATETIME_FULL(){return oe}static get DATETIME_FULL_WITH_SECONDS(){return ee}static get DATETIME_HUGE(){return xe}static get DATETIME_HUGE_WITH_SECONDS(){return Y}}function ba(g){if(Ee.isDateTime(g))return g;if(g&&g.valueOf&&xa(g.valueOf()))return Ee.fromJSDate(g);if(g&&typeof g=="object")return Ee.fromObject(g);throw new v(`Unknown datetime argument: ${g}, of type ${typeof g}`)}const Fa="3.7.2";return Ta.DateTime=Ee,Ta.Duration=We,Ta.FixedOffsetZone=xt,Ta.IANAZone=we,Ta.Info=ys,Ta.Interval=pt,Ta.InvalidZone=Vt,Ta.Settings=ht,Ta.SystemZone=je,Ta.VERSION=Fa,Ta.Zone=ie,Ta}var Bg;function rh(){return Bg||(Bg=1,(function(l){var m,v,S,N,x,Uf,T,$l;Object.defineProperty(l,"__esModule",{value:!0}),l.CronDate=l.DAYS_IN_MONTH=l.DateMathOp=l.TimeUnit=void 0;const r=uN();var o;(function(C){C.Second="Second",C.Minute="Minute",C.Hour="Hour",C.Day="Day",C.Month="Month",C.Year="Year"})(o||(l.TimeUnit=o={}));var c;(function(C){C.Add="Add",C.Subtract="Subtract"})(c||(l.DateMathOp=c={})),l.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);const D=class D{constructor(M,A){at(this,T);at(this,m);at(this,v,null);at(this,S,null);at(this,N,{add:{[o.Year]:this.addYear.bind(this),[o.Month]:this.addMonth.bind(this),[o.Day]:this.addDay.bind(this),[o.Hour]:this.addHour.bind(this),[o.Minute]:this.addMinute.bind(this),[o.Second]:this.addSecond.bind(this)},subtract:{[o.Year]:this.subtractYear.bind(this),[o.Month]:this.subtractMonth.bind(this),[o.Day]:this.subtractDay.bind(this),[o.Hour]:this.subtractHour.bind(this),[o.Minute]:this.subtractMinute.bind(this),[o.Second]:this.subtractSecond.bind(this)}});const I={zone:A};if(M?M instanceof D?(Te(this,m,te(M,m)),Te(this,v,te(M,v)),Te(this,S,te(M,S))):M instanceof Date?Te(this,m,r.DateTime.fromJSDate(M,I)):typeof M=="number"?Te(this,m,r.DateTime.fromMillis(M,I)):(Te(this,m,r.DateTime.fromISO(M,I)),te(this,m).isValid||Te(this,m,r.DateTime.fromRFC2822(M,I)),te(this,m).isValid||Te(this,m,r.DateTime.fromSQL(M,I)),te(this,m).isValid||Te(this,m,r.DateTime.fromFormat(M,"EEE, d MMM yyyy HH:mm:ss",I))):Te(this,m,r.DateTime.local()),!te(this,m).isValid)throw new Error(`CronDate: unhandled timestamp: ${M}`);A&&A!==te(this,m).zoneName&&Te(this,m,te(this,m).setZone(A))}get dstStart(){return te(this,v)}set dstStart(M){Te(this,v,M)}get dstEnd(){return te(this,S)}set dstEnd(M){Te(this,S,M)}addYear(){Te(this,m,te(this,m).plus({years:1}))}addMonth(){Te(this,m,te(this,m).plus({months:1}).startOf("month"))}addDay(){Te(this,m,te(this,m).plus({days:1}).startOf("day"))}addHour(){Te(this,m,te(this,m).plus({hours:1}).startOf("hour"))}addMinute(){Te(this,m,te(this,m).plus({minutes:1}).startOf("minute"))}addSecond(){Te(this,m,te(this,m).plus({seconds:1}))}subtractYear(){Te(this,m,te(this,m).minus({years:1}))}subtractMonth(){Te(this,m,te(this,m).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Te(this,m,te(this,m).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Te(this,m,te(this,m).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Te(this,m,te(this,m).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Te(this,m,te(this,m).minus({seconds:1}))}addUnit(M){te(this,N).add[M]()}subtractUnit(M){te(this,N).subtract[M]()}invokeDateOperation(M,A){if(M===c.Add){this.addUnit(A);return}if(M===c.Subtract){this.subtractUnit(A);return}throw new Error(`Invalid verb: ${M}`)}getDate(){return te(this,m).day}getFullYear(){return te(this,m).year}getDay(){const M=te(this,m).weekday;return M===7?0:M}getMonth(){return te(this,m).month-1}getHours(){return te(this,m).hour}getMinutes(){return te(this,m).minute}getSeconds(){return te(this,m).second}getMilliseconds(){return te(this,m).millisecond}getUTCOffset(){return te(this,m).offset}setStartOfDay(){Te(this,m,te(this,m).startOf("day"))}setEndOfDay(){Te(this,m,te(this,m).endOf("day"))}getTime(){return te(this,m).valueOf()}getUTCDate(){return Se(this,T,$l).call(this).day}getUTCFullYear(){return Se(this,T,$l).call(this).year}getUTCDay(){const M=Se(this,T,$l).call(this).weekday;return M===7?0:M}getUTCMonth(){return Se(this,T,$l).call(this).month-1}getUTCHours(){return Se(this,T,$l).call(this).hour}getUTCMinutes(){return Se(this,T,$l).call(this).minute}getUTCSeconds(){return Se(this,T,$l).call(this).second}toISOString(){return te(this,m).toUTC().toISO()}toJSON(){return te(this,m).toJSON()}setDate(M){Te(this,m,te(this,m).set({day:M}))}setFullYear(M){Te(this,m,te(this,m).set({year:M}))}setDay(M){Te(this,m,te(this,m).set({weekday:M}))}setMonth(M){Te(this,m,te(this,m).set({month:M+1}))}setHours(M){Te(this,m,te(this,m).set({hour:M}))}setMinutes(M){Te(this,m,te(this,m).set({minute:M}))}setSeconds(M){Te(this,m,te(this,m).set({second:M}))}setMilliseconds(M){Te(this,m,te(this,m).set({millisecond:M}))}toString(){return this.toDate().toString()}toDate(){return te(this,m).toJSDate()}isLastDayOfMonth(){var I;const{day:M,month:A}=te(this,m);if(A===2){const B=Se(I=D,x,Uf).call(I,te(this,m).year);return M===l.DAYS_IN_MONTH[A-1]-(B?0:1)}return M===l.DAYS_IN_MONTH[A-1]}isLastWeekdayOfMonth(){var B;const{day:M,month:A}=te(this,m);let I;return A===2?I=l.DAYS_IN_MONTH[A-1]-(Se(B=D,x,Uf).call(B,te(this,m).year)?0:1):I=l.DAYS_IN_MONTH[A-1],M>I-7}applyDateOperation(M,A,I){if(A===o.Month||A===o.Day){this.invokeDateOperation(M,A);return}const B=this.getHours();this.invokeDateOperation(M,A);const J=this.getHours(),K=J-B;K===2?I!==24&&(this.dstStart=J):K===0&&this.getMinutes()===0&&this.getSeconds()===0&&I!==24&&(this.dstEnd=J)}};m=new WeakMap,v=new WeakMap,S=new WeakMap,N=new WeakMap,x=new WeakSet,Uf=function(M){return M%4===0&&M%100!==0||M%400===0},T=new WeakSet,$l=function(){return te(this,m).toUTC()},at(D,x);let f=D;l.CronDate=f,l.default=f})(Ef)),Ef}var Vg;function cN(){if(Vg)return tu;Vg=1,Object.defineProperty(tu,"__esModule",{value:!0}),tu.CronMonth=void 0;const l=rh(),r=Vs(),o=1,c=12,f=Object.freeze([]);let m=class extends r.CronField{static get min(){return o}static get max(){return c}static get chars(){return f}static get daysInMonth(){return l.DAYS_IN_MONTH}constructor(S,N){super(S,N),this.validate()}get values(){return super.values}};return tu.CronMonth=m,tu}var au={},Yg;function oN(){if(Yg)return au;Yg=1,Object.defineProperty(au,"__esModule",{value:!0}),au.CronSecond=void 0;const l=Vs(),r=0,o=59,c=Object.freeze([]);let f=class extends l.CronField{static get min(){return r}static get max(){return o}static get chars(){return c}constructor(v,S){super(v,S),this.validate()}get values(){return super.values}};return au.CronSecond=f,au}var $g;function ih(){return $g||($g=1,(function(l){var r=zs&&zs.__createBinding||(Object.create?(function(c,f,m,v){v===void 0&&(v=m);var S=Object.getOwnPropertyDescriptor(f,m);(!S||("get"in S?!f.__esModule:S.writable||S.configurable))&&(S={enumerable:!0,get:function(){return f[m]}}),Object.defineProperty(c,v,S)}):(function(c,f,m,v){v===void 0&&(v=m),c[v]=f[m]})),o=zs&&zs.__exportStar||function(c,f){for(var m in c)m!=="default"&&!Object.prototype.hasOwnProperty.call(f,m)&&r(f,c,m)};Object.defineProperty(l,"__esModule",{value:!0}),o(nN(),l),o(lN(),l),o(sN(),l),o(Vs(),l),o(rN(),l),o(iN(),l),o(cN(),l),o(oN(),l)})(zs)),zs}var Pg;function lp(){var o,c,f,m,v,S,N,x,ap,np;if(Pg)return Qi;Pg=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.CronFieldCollection=void 0;const l=ih();let r=(x=class{constructor({second:D,minute:C,hour:M,dayOfMonth:A,month:I,dayOfWeek:B}){at(this,o);at(this,c);at(this,f);at(this,m);at(this,v);at(this,S);if(!D)throw new Error("Validation error, Field second is missing");if(!C)throw new Error("Validation error, Field minute is missing");if(!M)throw new Error("Validation error, Field hour is missing");if(!A)throw new Error("Validation error, Field dayOfMonth is missing");if(!I)throw new Error("Validation error, Field month is missing");if(!B)throw new Error("Validation error, Field dayOfWeek is missing");if(I.values.length===1&&!A.hasLastChar&&!(parseInt(A.values[0],10)<=l.CronMonth.daysInMonth[I.values[0]-1]))throw new Error("Invalid explicit day of month definition");Te(this,o,D),Te(this,c,C),Te(this,f,M),Te(this,v,I),Te(this,S,B),Te(this,m,A)}static from(D,C){return new x({second:this.resolveField(l.CronSecond,D.second,C.second),minute:this.resolveField(l.CronMinute,D.minute,C.minute),hour:this.resolveField(l.CronHour,D.hour,C.hour),dayOfMonth:this.resolveField(l.CronDayOfMonth,D.dayOfMonth,C.dayOfMonth),month:this.resolveField(l.CronMonth,D.month,C.month),dayOfWeek:this.resolveField(l.CronDayOfWeek,D.dayOfWeek,C.dayOfWeek)})}static resolveField(D,C,M){return M?M instanceof l.CronField?M:new D(M):C}get second(){return te(this,o)}get minute(){return te(this,c)}get hour(){return te(this,f)}get dayOfMonth(){return te(this,m)}get month(){return te(this,v)}get dayOfWeek(){return te(this,S)}static compactField(D){if(D.length===0)return[];const C=[];let M;return D.forEach((A,I,B)=>{if(M===void 0){M={start:A,count:1};return}const J=B[I-1]||M.start,K=B[I+1];if(A==="L"||A==="W"){C.push(M),C.push({start:A,count:1}),M=void 0;return}if(M.step===void 0&&K!==void 0){const ce=A-J,P=K-A;if(ce<=P){M={...M,count:2,end:A,step:ce};return}M.step=1}A-(M.end??0)===M.step?(M.count++,M.end=A):(M.count===1?C.push({start:M.start,count:1}):M.count===2?(C.push({start:M.start,count:1}),C.push({start:M.end??J,count:1})):C.push(M),M={start:A,count:1})}),M&&C.push(M),C}stringifyField(D){var I;let C=D.max,M=D.values;if(D instanceof l.CronDayOfWeek){C=6;const B=te(this,S).values;M=B[B.length-1]===7?B.slice(0,-1):B}D instanceof l.CronDayOfMonth&&(C=te(this,v).values.length===1?l.CronMonth.daysInMonth[te(this,v).values[0]-1]:D.max);const A=x.compactField(M);if(A.length===1){const B=Se(I=x,N,ap).call(I,D,A[0],C);if(B)return B}return A.map(B=>{var K;const J=B.count===1?B.start.toString():Se(K=x,N,np).call(K,B,C);return D instanceof l.CronDayOfWeek&&D.nthDay>0?`${J}#${D.nthDay}`:J}).join(",")}stringify(D=!1){const C=[];return D&&C.push(this.stringifyField(te(this,o))),C.push(this.stringifyField(te(this,c)),this.stringifyField(te(this,f)),this.stringifyField(te(this,m)),this.stringifyField(te(this,v)),this.stringifyField(te(this,S))),C.join(" ")}serialize(){return{second:te(this,o).serialize(),minute:te(this,c).serialize(),hour:te(this,f).serialize(),dayOfMonth:te(this,m).serialize(),month:te(this,v).serialize(),dayOfWeek:te(this,S).serialize()}}},o=new WeakMap,c=new WeakMap,f=new WeakMap,m=new WeakMap,v=new WeakMap,S=new WeakMap,N=new WeakSet,ap=function(D,C,M){const A=C.step;return A?A===1&&C.start===D.min&&C.end&&C.end>=M?D.hasQuestionMarkChar?"?":"*":A!==1&&C.start===D.min&&C.end&&C.end>=M-A+1?`*/${A}`:null:null},np=function(D,C){const M=D.step;if(M===1)return`${D.start}-${D.end}`;const A=D.start===0?D.count-1:D.count;if(!M)throw new Error("Unexpected range step");if(!D.end)throw new Error("Unexpected range end");if(M*A>D.end){const I=(J,K)=>{if(typeof D.start!="number")throw new Error("Unexpected range start");return K%M===0?D.start+K:null};if(typeof D.start!="number")throw new Error("Unexpected range start");const B={length:D.end-D.start+1};return Array.from(B,I).filter(J=>J!==null).join(",")}return D.end===C-M+1?`${D.start}/${M}`:`${D.start}-${D.end}/${M}`},at(x,N),x);return Qi.CronFieldCollection=r,Qi}var Tf={},Gg;function dp(){return Gg||(Gg=1,(function(l){var f,m,v,S,N,x,b,T,j,Pl,C,Ls,sp,rp,ip,up,Lf,cp,op,Ur;Object.defineProperty(l,"__esModule",{value:!0}),l.CronExpression=l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;const r=rh();l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";const o=1e4,Z=class Z{constructor(O,le){at(this,C);at(this,f);at(this,m);at(this,v);at(this,S);at(this,N);at(this,x);at(this,b,null);at(this,T,!1);Te(this,f,le),Te(this,m,le.tz),Te(this,S,le.startDate?new r.CronDate(le.startDate,te(this,m)):null),Te(this,N,le.endDate?new r.CronDate(le.endDate,te(this,m)):null);let k=le.currentDate??le.startDate;if(k){const oe=new r.CronDate(k,te(this,m));te(this,S)&&oe.getTime()<te(this,S).getTime()?k=te(this,S):te(this,N)&&oe.getTime()>te(this,N).getTime()&&(k=te(this,N))}Te(this,v,new r.CronDate(k,te(this,m))),Te(this,x,O)}get fields(){return te(this,x)}static fieldsToExpression(O,le){return new Z(O,le||{})}next(){return Se(this,C,Ur).call(this)}prev(){return Se(this,C,Ur).call(this,!0)}hasNext(){const O=te(this,v);try{return Se(this,C,Ur).call(this),!0}catch{return!1}finally{Te(this,v,O)}}hasPrev(){const O=te(this,v);try{return Se(this,C,Ur).call(this,!0),!0}catch{return!1}finally{Te(this,v,O)}}take(O){const le=[];if(O>=0)for(let k=0;k<O;k++)try{le.push(this.next())}catch{return le}else for(let k=0;k>O;k--)try{le.push(this.prev())}catch{return le}return le}reset(O){Te(this,v,new r.CronDate(O||te(this,f).currentDate))}stringify(O=!1){return te(this,x).stringify(O)}includesDate(O){const{second:le,minute:k,hour:oe,month:ee}=te(this,x),xe=new r.CronDate(O,te(this,m));return!(!le.values.includes(xe.getSeconds())||!k.values.includes(xe.getMinutes())||!oe.values.includes(xe.getHours())||!ee.values.includes(xe.getMonth()+1)||!Se(this,C,Lf).call(this,xe)||te(this,x).dayOfWeek.nthDay>0&&Math.ceil(xe.getDate()/7)!==te(this,x).dayOfWeek.nthDay)}toString(){return te(this,f).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Se(this,C,Ur).call(this),done:!this.hasNext()})}}};f=new WeakMap,m=new WeakMap,v=new WeakMap,S=new WeakMap,N=new WeakMap,x=new WeakMap,b=new WeakMap,T=new WeakMap,j=new WeakSet,Pl=function(O,le){return le.some(k=>k===O)},C=new WeakSet,Ls=function(O,le){return O[le?O.length-1:0]},sp=function(O){const le=`${O.getFullYear()}-${O.getMonth()+1}-${O.getDate()}`;if(te(this,b)===le)return te(this,T);const k=new r.CronDate(O);k.setStartOfDay();const oe=new r.CronDate(O);return oe.setEndOfDay(),Te(this,b,le),Te(this,T,k.getUTCOffset()!==oe.getUTCOffset()),te(this,T)},rp=function(O,le,k){const oe=te(this,x).second.values,ee=O.getSeconds(),xe=te(this,x).second.findNearestValue(ee,k);if(xe!==null){O.setSeconds(xe);return}O.applyDateOperation(le,r.TimeUnit.Minute,te(this,x).hour.values.length),O.setSeconds(Se(this,C,Ls).call(this,oe,k))},ip=function(O,le,k){const oe=te(this,x).minute.values,ee=te(this,x).second.values,xe=O.getMinutes(),Y=te(this,x).minute.findNearestValue(xe,k);if(Y!==null){O.setMinutes(Y),O.setSeconds(Se(this,C,Ls).call(this,ee,k));return}O.applyDateOperation(le,r.TimeUnit.Hour,te(this,x).hour.values.length),O.setMinutes(Se(this,C,Ls).call(this,oe,k)),O.setSeconds(Se(this,C,Ls).call(this,ee,k))},up=function(O,le){const k=le.isLastWeekdayOfMonth();return O.some(oe=>{const ee=parseInt(oe.toString().charAt(0),10)%7;if(Number.isNaN(ee))throw new Error(`Invalid last weekday of the month expression: ${oe}`);return le.getDay()===ee&&k})},Lf=function(O){var ie,me,je;const le=te(this,x).dayOfMonth.isWildcard,k=!le,oe=te(this,x).dayOfWeek.isWildcard,ee=!oe,xe=Se(ie=Z,j,Pl).call(ie,O.getDate(),te(this,x).dayOfMonth.values)||te(this,x).dayOfMonth.hasLastChar&&O.isLastDayOfMonth(),Y=Se(me=Z,j,Pl).call(me,O.getDay(),te(this,x).dayOfWeek.values)||te(this,x).dayOfWeek.hasLastChar&&Se(je=Z,j,up).call(je,te(this,x).dayOfWeek.values,O);return!!(k&&ee&&(xe||Y)||xe&&!ee||le&&!oe&&Y)},cp=function(O,le,k){var be,_;const oe=te(this,x).hour.values,ee=oe,xe=O.getHours(),Y=Se(be=Z,j,Pl).call(be,xe,oe),ie=O.dstStart===xe,me=O.dstEnd===xe;if(ie)return Se(_=Z,j,Pl).call(_,xe-1,oe)?!0:(O.invokeDateOperation(le,r.TimeUnit.Hour),!1);if(me&&!k)return O.dstEnd=null,O.applyDateOperation(r.DateMathOp.Add,r.TimeUnit.Hour,ee.length),!1;if(Y)return!0;O.dstStart=null;const je=te(this,x).hour.findNearestValue(xe,k);if(je===null)return O.applyDateOperation(le,r.TimeUnit.Day,ee.length),!1;if(Se(this,C,sp).call(this,O)){const se=k?xe-je:je-xe;for(let ge=0;ge<se;ge++)O.applyDateOperation(le,r.TimeUnit.Hour,ee.length)}else O.setHours(je);return O.setMinutes(Se(this,C,Ls).call(this,te(this,x).minute.values,k)),O.setSeconds(Se(this,C,Ls).call(this,te(this,x).second.values,k)),!1},op=function(O){if(!te(this,S)&&!te(this,N))return;const le=O.getTime();if(te(this,S)&&le<te(this,S).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(te(this,N)&&le>te(this,N).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},Ur=function(O=!1){var xe,Y,ie;const le=O?r.DateMathOp.Subtract:r.DateMathOp.Add,k=new r.CronDate(te(this,v)),oe=k.getTime();let ee=0;for(;++ee<o;){if(Se(this,C,op).call(this,k),!Se(this,C,Lf).call(this,k)){k.applyDateOperation(le,r.TimeUnit.Day,te(this,x).hour.values.length);continue}if(!(te(this,x).dayOfWeek.nthDay<=0||Math.ceil(k.getDate()/7)===te(this,x).dayOfWeek.nthDay)){k.applyDateOperation(le,r.TimeUnit.Day,te(this,x).hour.values.length);continue}if(!Se(xe=Z,j,Pl).call(xe,k.getMonth()+1,te(this,x).month.values)){k.applyDateOperation(le,r.TimeUnit.Month,te(this,x).hour.values.length);continue}if(Se(this,C,cp).call(this,k,le,O)){if(!Se(Y=Z,j,Pl).call(Y,k.getMinutes(),te(this,x).minute.values)){Se(this,C,ip).call(this,k,le,O);continue}if(!Se(ie=Z,j,Pl).call(ie,k.getSeconds(),te(this,x).second.values)){Se(this,C,rp).call(this,k,le,O);continue}if(oe===k.getTime()){(le==="Add"||k.getMilliseconds()===0)&&k.applyDateOperation(le,r.TimeUnit.Second,te(this,x).hour.values.length);continue}break}}if(ee>o)throw new Error(l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return k.getMilliseconds()!==0&&k.setMilliseconds(0),Te(this,v,k),k},at(Z,j);let c=Z;l.CronExpression=c,l.default=c})(Tf)),Tf}var $c={},Fg;function dN(){if(Fg)return $c;Fg=1,Object.defineProperty($c,"__esModule",{value:!0}),$c.seededRandom=o;function l(c){let f=2166136261;for(let m=0;m<c.length;m++)f^=c.charCodeAt(m),f=Math.imul(f,16777619);return()=>f>>>0}function r(c){return()=>{let f=c+=1831565813;return f=Math.imul(f^f>>>15,f|1),f^=f+Math.imul(f^f>>>7,f|61),((f^f>>>14)>>>0)/4294967296}}function o(c){const f=c?l(c)():Math.floor(Math.random()*1e10);return r(f)}return $c}var Zg;function qf(){var x,b,fp,Hs,hp,mp,gp,xp,pp,yp,vp,Hf,bp,Np;if(Zg)return za;Zg=1,Object.defineProperty(za,"__esModule",{value:!0}),za.CronExpressionParser=za.DayOfWeek=za.Months=za.CronUnit=za.PredefinedExpressions=void 0;const l=lp(),r=dp(),o=dN(),c=ih();var f;(function(F){F["@yearly"]="0 0 0 1 1 *",F["@annually"]="0 0 0 1 1 *",F["@monthly"]="0 0 0 1 * *",F["@weekly"]="0 0 0 * * 0",F["@daily"]="0 0 0 * * *",F["@hourly"]="0 0 * * * *",F["@minutely"]="0 * * * * *",F["@secondly"]="* * * * * *",F["@weekdays"]="0 0 0 * * 1-5",F["@weekends"]="0 0 0 * * 0,6"})(f||(za.PredefinedExpressions=f={}));var m;(function(F){F.Second="Second",F.Minute="Minute",F.Hour="Hour",F.DayOfMonth="DayOfMonth",F.Month="Month",F.DayOfWeek="DayOfWeek"})(m||(za.CronUnit=m={}));var v;(function(F){F[F.jan=1]="jan",F[F.feb=2]="feb",F[F.mar=3]="mar",F[F.apr=4]="apr",F[F.may=5]="may",F[F.jun=6]="jun",F[F.jul=7]="jul",F[F.aug=8]="aug",F[F.sep=9]="sep",F[F.oct=10]="oct",F[F.nov=11]="nov",F[F.dec=12]="dec"})(v||(za.Months=v={}));var S;(function(F){F[F.sun=0]="sun",F[F.mon=1]="mon",F[F.tue=2]="tue",F[F.wed=3]="wed",F[F.thu=4]="thu",F[F.fri=5]="fri",F[F.sat=6]="sat"})(S||(za.DayOfWeek=S={}));let N=(b=class{static parse(Z,ne={}){var ge,pe,Me,we,He,mt,Pe,Xt;const{strict:O=!1,hashSeed:le}=ne,k=(0,o.seededRandom)(le);Z=f[Z]||Z;const oe=Se(ge=b,x,fp).call(ge,Z,O);if(!(oe.dayOfMonth==="*"||oe.dayOfWeek==="*"||!O))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const ee=Se(pe=b,x,Hs).call(pe,m.Second,oe.second,c.CronSecond.constraints,k),xe=Se(Me=b,x,Hs).call(Me,m.Minute,oe.minute,c.CronMinute.constraints,k),Y=Se(we=b,x,Hs).call(we,m.Hour,oe.hour,c.CronHour.constraints,k),ie=Se(He=b,x,Hs).call(He,m.Month,oe.month,c.CronMonth.constraints,k),me=Se(mt=b,x,Hs).call(mt,m.DayOfMonth,oe.dayOfMonth,c.CronDayOfMonth.constraints,k),{dayOfWeek:je,nthDayOfWeek:be}=Se(Pe=b,x,bp).call(Pe,oe.dayOfWeek),_=Se(Xt=b,x,Hs).call(Xt,m.DayOfWeek,je,c.CronDayOfWeek.constraints,k),se=new l.CronFieldCollection({second:new c.CronSecond(ee,{rawValue:oe.second}),minute:new c.CronMinute(xe,{rawValue:oe.minute}),hour:new c.CronHour(Y,{rawValue:oe.hour}),dayOfMonth:new c.CronDayOfMonth(me,{rawValue:oe.dayOfMonth}),month:new c.CronMonth(ie,{rawValue:oe.month}),dayOfWeek:new c.CronDayOfWeek(_,{rawValue:oe.dayOfWeek,nthDayOfWeek:be})});return new r.CronExpression(se,{...ne,expression:Z})}},x=new WeakSet,fp=function(Z,ne){if(ne&&!Z.length)throw new Error("Invalid cron expression");Z=Z||"0 * * * * *";const O=Z.trim().split(/\s+/);if(ne&&O.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(O.length>6)throw new Error("Invalid cron expression, too many fields");const le=["*","*","*","*","*","0"];O.length<le.length&&O.unshift(...le.slice(O.length));const[k,oe,ee,xe,Y,ie]=O;return{second:k,minute:oe,hour:ee,dayOfMonth:xe,month:Y,dayOfWeek:ie}},Hs=function(Z,ne,O,le){if((Z===m.Month||Z===m.DayOfWeek)&&(ne=ne.replace(/[a-z]{3}/gi,k=>{k=k.toLowerCase();const oe=v[k]||S[k];if(oe===void 0)throw new Error(`Validation error, cannot resolve alias "${k}"`);return oe.toString()})),!O.validChars.test(ne))throw new Error(`Invalid characters, got value: ${ne}`);return ne=Se(this,x,hp).call(this,ne,O),ne=Se(this,x,mp).call(this,ne,O,le),Se(this,x,gp).call(this,Z,ne,O)},hp=function(Z,ne){return Z.replace(/[*?]/g,ne.min+"-"+ne.max)},mp=function(Z,ne,O){const le=O();return Z.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(k,oe,ee,xe)=>{if(oe&&ee&&xe){const Y=parseInt(oe,10),ie=parseInt(ee,10),me=parseInt(xe,10);if(Y>ie)throw new Error(`Invalid range: ${Y}-${ie}, min > max`);if(me<=0)throw new Error(`Invalid step: ${me}, must be positive`);const je=Math.max(Y,ne.min),be=Math.floor(le*me),_=[];for(let se=Math.floor(je/me)*me+be;se<=ie;se+=me)se>=je&&_.push(se);return _.join(",")}else if(oe&&ee){const Y=parseInt(oe,10),ie=parseInt(ee,10);if(Y>ie)throw new Error(`Invalid range: ${Y}-${ie}, min > max`);return String(Math.floor(le*(ie-Y+1))+Y)}else if(xe){const Y=parseInt(xe,10);if(Y<=0)throw new Error(`Invalid step: ${Y}, must be positive`);const ie=Math.floor(le*Y),me=[];for(let je=Math.floor(ne.min/Y)*Y+ie;je<=ne.max;je+=Y)je>=ne.min&&me.push(je);return me.join(",")}else return String(Math.floor(le*(ne.max-ne.min+1)+ne.min))})},gp=function(Z,ne,O){const le=[];function k(ee,xe){var Y;if(Array.isArray(ee))le.push(...ee);else if(Se(Y=b,x,Np).call(Y,xe,ee))le.push(ee);else{const ie=parseInt(ee.toString(),10);if(!(ie>=xe.min&&ie<=xe.max))throw new Error(`Constraint error, got value ${ee} expected range ${xe.min}-${xe.max}`);le.push(Z===m.DayOfWeek?ie%7:ee)}}return ne.split(",").forEach(ee=>{var xe;if(!(ee.length>0))throw new Error("Invalid list value format");k(Se(xe=b,x,xp).call(xe,Z,ee,O),O)}),le},xp=function(Z,ne,O){var k,oe;const le=ne.split("/");if(le.length>2)throw new Error(`Invalid repeat: ${ne}`);return le.length===2?(isNaN(parseInt(le[0],10))||(le[0]=`${le[0]}-${O.max}`),Se(k=b,x,Hf).call(k,Z,le[0],parseInt(le[1],10),O)):Se(oe=b,x,Hf).call(oe,Z,ne,1,O)},pp=function(Z,ne,O){if(!(!isNaN(Z)&&!isNaN(ne)&&Z>=O.min&&ne<=O.max))throw new Error(`Constraint error, got range ${Z}-${ne} expected range ${O.min}-${O.max}`);if(Z>ne)throw new Error(`Invalid range: ${Z}-${ne}, min(${Z}) > max(${ne})`)},yp=function(Z){if(!(!isNaN(Z)&&Z>0))throw new Error(`Constraint error, cannot repeat at every ${Z} time.`)},vp=function(Z,ne,O,le){const k=[];Z===m.DayOfWeek&&O%7===0&&k.push(0);for(let oe=ne;oe<=O;oe+=le)k.indexOf(oe)===-1&&k.push(oe);return k},Hf=function(Z,ne,O,le){const k=ne.split("-");if(k.length<=1)return isNaN(+ne)?ne:+ne;const[oe,ee]=k.map(xe=>parseInt(xe,10));return Se(this,x,pp).call(this,oe,ee,le),Se(this,x,yp).call(this,O),Se(this,x,vp).call(this,Z,oe,ee,O)},bp=function(Z){const ne=Z.split("#");if(ne.length<=1)return{dayOfWeek:ne[0]};const O=+ne[ne.length-1],le=Z.match(/([,-/])/);if(le!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${le==null?void 0:le[0]}\` special characters are incompatible`);if(!(ne.length<=2&&!isNaN(O)&&O>=1&&O<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:ne[0],nthDayOfWeek:O}},Np=function(Z,ne){return Z.chars.some(O=>ne.toString().includes(O))},at(b,x),b);return za.CronExpressionParser=N,za}var hn={};const fN={},hN=Object.freeze(Object.defineProperty({__proto__:null,default:fN},Symbol.toStringTag,{value:"Module"})),Wg=Ky(hN);var Qg;function mN(){var m,v,Bf,Sp;if(Qg)return hn;Qg=1;var l=hn&&hn.__createBinding||(Object.create?(function(x,b,T,j){j===void 0&&(j=T);var D=Object.getOwnPropertyDescriptor(b,T);(!D||("get"in D?!b.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return b[T]}}),Object.defineProperty(x,j,D)}):(function(x,b,T,j){j===void 0&&(j=T),x[j]=b[T]})),r=hn&&hn.__setModuleDefault||(Object.create?(function(x,b){Object.defineProperty(x,"default",{enumerable:!0,value:b})}):function(x,b){x.default=b}),o=hn&&hn.__importStar||(function(){var x=function(b){return x=Object.getOwnPropertyNames||function(T){var j=[];for(var D in T)Object.prototype.hasOwnProperty.call(T,D)&&(j[j.length]=D);return j},x(b)};return function(b){if(b&&b.__esModule)return b;var T={};if(b!=null)for(var j=x(b),D=0;D<j.length;D++)j[D]!=="default"&&l(T,b,j[D]);return r(T,b),T}})();Object.defineProperty(hn,"__esModule",{value:!0}),hn.CronFileParser=void 0;const c=qf();let f=(v=class{static async parseFile(b){var D;const{readFile:T}=await Promise.resolve().then(()=>o(Wg)),j=await T(b,"utf8");return Se(D=v,m,Bf).call(D,j)}static parseFileSync(b){var D;const{readFileSync:T}=Wg,j=T(b,"utf8");return Se(D=v,m,Bf).call(D,j)}},m=new WeakSet,Bf=function(b){var D;const T=b.split(`
|
|
386
|
-
`),j={variables:{},expressions:[],errors:{}};for(const C of T){const M=C.trim();if(M.length===0||M.startsWith("#"))continue;const A=M.match(/^(.*)=(.*)$/);if(A){const[,I,B]=A;j.variables[I]=B.replace(/["']/g,"");continue}try{const I=Se(D=v,m,Sp).call(D,M);j.expressions.push(I.interval)}catch(I){j.errors[M]=I}}return j},Sp=function(b){const T=b.split(" ");return{interval:c.CronExpressionParser.parse(T.slice(0,5).join(" ")),command:T.slice(5,T.length)}},at(v,m),v);return hn.CronFileParser=f,hn}var Ig;function gN(){return Ig||(Ig=1,(function(l){var r=_s&&_s.__createBinding||(Object.create?(function(x,b,T,j){j===void 0&&(j=T);var D=Object.getOwnPropertyDescriptor(b,T);(!D||("get"in D?!b.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return b[T]}}),Object.defineProperty(x,j,D)}):(function(x,b,T,j){j===void 0&&(j=T),x[j]=b[T]})),o=_s&&_s.__exportStar||function(x,b){for(var T in x)T!=="default"&&!Object.prototype.hasOwnProperty.call(b,T)&&r(b,x,T)};Object.defineProperty(l,"__esModule",{value:!0}),l.CronFileParser=l.CronExpressionParser=l.CronExpression=l.CronFieldCollection=l.CronDate=void 0;const c=qf();var f=rh();Object.defineProperty(l,"CronDate",{enumerable:!0,get:function(){return f.CronDate}});var m=lp();Object.defineProperty(l,"CronFieldCollection",{enumerable:!0,get:function(){return m.CronFieldCollection}});var v=dp();Object.defineProperty(l,"CronExpression",{enumerable:!0,get:function(){return v.CronExpression}});var S=qf();Object.defineProperty(l,"CronExpressionParser",{enumerable:!0,get:function(){return S.CronExpressionParser}});var N=mN();Object.defineProperty(l,"CronFileParser",{enumerable:!0,get:function(){return N.CronFileParser}}),o(ih(),l),l.default=c.CronExpressionParser})(_s)),_s}var xN=gN();const jp=6048e5,pN=864e5,yN=6e4,vN=36e5,Xg=Symbol.for("constructDateFrom");function Ua(l,r){return typeof l=="function"?l(r):l&&typeof l=="object"&&Xg in l?l[Xg](r):l instanceof Date?new l.constructor(r):new Date(r)}function Rt(l,r){return Ua(r||l,l)}function bN(l,r,o){return Ua(l,+Rt(l)+r)}function Pc(l,r,o){return bN(l,r*vN)}let NN={};function io(){return NN}function du(l,r){var S,N,x,b;const o=io(),c=(r==null?void 0:r.weekStartsOn)??((N=(S=r==null?void 0:r.locale)==null?void 0:S.options)==null?void 0:N.weekStartsOn)??o.weekStartsOn??((b=(x=o.locale)==null?void 0:x.options)==null?void 0:b.weekStartsOn)??0,f=Rt(l,r==null?void 0:r.in),m=f.getDay(),v=(m<c?7:0)+m-c;return f.setDate(f.getDate()-v),f.setHours(0,0,0,0),f}function Kc(l,r){return du(l,{...r,weekStartsOn:1})}function wp(l,r){const o=Rt(l,r==null?void 0:r.in),c=o.getFullYear(),f=Ua(o,0);f.setFullYear(c+1,0,4),f.setHours(0,0,0,0);const m=Kc(f),v=Ua(o,0);v.setFullYear(c,0,4),v.setHours(0,0,0,0);const S=Kc(v);return o.getTime()>=m.getTime()?c+1:o.getTime()>=S.getTime()?c:c-1}function Jg(l){const r=Rt(l),o=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return o.setUTCFullYear(r.getFullYear()),+l-+o}function SN(l,...r){const o=Ua.bind(null,r.find(c=>typeof c=="object"));return r.map(o)}function Kg(l,r){const o=Rt(l,r==null?void 0:r.in);return o.setHours(0,0,0,0),o}function jN(l,r,o){const[c,f]=SN(o==null?void 0:o.in,l,r),m=Kg(c),v=Kg(f),S=+m-Jg(m),N=+v-Jg(v);return Math.round((S-N)/pN)}function wN(l,r){const o=wp(l,r),c=Ua(l,0);return c.setFullYear(o,0,4),c.setHours(0,0,0,0),Kc(c)}function EN(l,r){let o,c=r==null?void 0:r.in;return l.forEach(f=>{!c&&typeof f=="object"&&(c=Ua.bind(null,f));const m=Rt(f,c);(!o||o<m||isNaN(+m))&&(o=m)}),Ua(c,o||NaN)}function TN(l,r){let o,c=r==null?void 0:r.in;return l.forEach(f=>{!c&&typeof f=="object"&&(c=Ua.bind(null,f));const m=Rt(f,c);(!o||o>m||isNaN(+m))&&(o=m)}),Ua(c,o||NaN)}function MN(l){return l instanceof Date||typeof l=="object"&&Object.prototype.toString.call(l)==="[object Date]"}function CN(l){return!(!MN(l)&&typeof l!="number"||isNaN(+Rt(l)))}function ON(l){return r=>{const c=(l?Math[l]:Math.trunc)(r);return c===0?0:c}}function RN(l,r){return+Rt(l)-+Rt(r)}function ex(l,r,o){const c=RN(l,r)/yN;return ON(o==null?void 0:o.roundingMethod)(c)}function DN(l,r){const o=Rt(l,r==null?void 0:r.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}const AN={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"}},kN=(l,r,o)=>{let c;const f=AN[l];return typeof f=="string"?c=f:r===1?c=f.one:c=f.other.replace("{{count}}",r.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+c:c+" ago":c};function Mf(l){return(r={})=>{const o=r.width?String(r.width):l.defaultWidth;return l.formats[o]||l.formats[l.defaultWidth]}}const _N={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zN={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},UN={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},LN={date:Mf({formats:_N,defaultWidth:"full"}),time:Mf({formats:zN,defaultWidth:"full"}),dateTime:Mf({formats:UN,defaultWidth:"full"})},HN={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},qN=(l,r,o,c)=>HN[l];function nu(l){return(r,o)=>{const c=o!=null&&o.context?String(o.context):"standalone";let f;if(c==="formatting"&&l.formattingValues){const v=l.defaultFormattingWidth||l.defaultWidth,S=o!=null&&o.width?String(o.width):v;f=l.formattingValues[S]||l.formattingValues[v]}else{const v=l.defaultWidth,S=o!=null&&o.width?String(o.width):l.defaultWidth;f=l.values[S]||l.values[v]}const m=l.argumentCallback?l.argumentCallback(r):r;return f[m]}}const BN={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},VN={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},YN={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"]},$N={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"]},PN={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"}},GN={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"}},FN=(l,r)=>{const o=Number(l),c=o%100;if(c>20||c<10)switch(c%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},ZN={ordinalNumber:FN,era:nu({values:BN,defaultWidth:"wide"}),quarter:nu({values:VN,defaultWidth:"wide",argumentCallback:l=>l-1}),month:nu({values:YN,defaultWidth:"wide"}),day:nu({values:$N,defaultWidth:"wide"}),dayPeriod:nu({values:PN,defaultWidth:"wide",formattingValues:GN,defaultFormattingWidth:"wide"})};function lu(l){return(r,o={})=>{const c=o.width,f=c&&l.matchPatterns[c]||l.matchPatterns[l.defaultMatchWidth],m=r.match(f);if(!m)return null;const v=m[0],S=c&&l.parsePatterns[c]||l.parsePatterns[l.defaultParseWidth],N=Array.isArray(S)?QN(S,T=>T.test(v)):WN(S,T=>T.test(v));let x;x=l.valueCallback?l.valueCallback(N):N,x=o.valueCallback?o.valueCallback(x):x;const b=r.slice(v.length);return{value:x,rest:b}}}function WN(l,r){for(const o in l)if(Object.prototype.hasOwnProperty.call(l,o)&&r(l[o]))return o}function QN(l,r){for(let o=0;o<l.length;o++)if(r(l[o]))return o}function IN(l){return(r,o={})=>{const c=r.match(l.matchPattern);if(!c)return null;const f=c[0],m=r.match(l.parsePattern);if(!m)return null;let v=l.valueCallback?l.valueCallback(m[0]):m[0];v=o.valueCallback?o.valueCallback(v):v;const S=r.slice(f.length);return{value:v,rest:S}}}const XN=/^(\d+)(th|st|nd|rd)?/i,JN=/\d+/i,KN={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},eS={any:[/^b/i,/^(a|c)/i]},tS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},aS={any:[/1/i,/2/i,/3/i,/4/i]},nS={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},lS={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]},sS={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},rS={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]},iS={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},uS={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}},cS={ordinalNumber:IN({matchPattern:XN,parsePattern:JN,valueCallback:l=>parseInt(l,10)}),era:lu({matchPatterns:KN,defaultMatchWidth:"wide",parsePatterns:eS,defaultParseWidth:"any"}),quarter:lu({matchPatterns:tS,defaultMatchWidth:"wide",parsePatterns:aS,defaultParseWidth:"any",valueCallback:l=>l+1}),month:lu({matchPatterns:nS,defaultMatchWidth:"wide",parsePatterns:lS,defaultParseWidth:"any"}),day:lu({matchPatterns:sS,defaultMatchWidth:"wide",parsePatterns:rS,defaultParseWidth:"any"}),dayPeriod:lu({matchPatterns:iS,defaultMatchWidth:"any",parsePatterns:uS,defaultParseWidth:"any"})},oS={code:"en-US",formatDistance:kN,formatLong:LN,formatRelative:qN,localize:ZN,match:cS,options:{weekStartsOn:0,firstWeekContainsDate:1}};function dS(l,r){const o=Rt(l,r==null?void 0:r.in);return jN(o,DN(o))+1}function fS(l,r){const o=Rt(l,r==null?void 0:r.in),c=+Kc(o)-+wN(o);return Math.round(c/jp)+1}function Ep(l,r){var b,T,j,D;const o=Rt(l,r==null?void 0:r.in),c=o.getFullYear(),f=io(),m=(r==null?void 0:r.firstWeekContainsDate)??((T=(b=r==null?void 0:r.locale)==null?void 0:b.options)==null?void 0:T.firstWeekContainsDate)??f.firstWeekContainsDate??((D=(j=f.locale)==null?void 0:j.options)==null?void 0:D.firstWeekContainsDate)??1,v=Ua((r==null?void 0:r.in)||l,0);v.setFullYear(c+1,0,m),v.setHours(0,0,0,0);const S=du(v,r),N=Ua((r==null?void 0:r.in)||l,0);N.setFullYear(c,0,m),N.setHours(0,0,0,0);const x=du(N,r);return+o>=+S?c+1:+o>=+x?c:c-1}function hS(l,r){var S,N,x,b;const o=io(),c=(r==null?void 0:r.firstWeekContainsDate)??((N=(S=r==null?void 0:r.locale)==null?void 0:S.options)==null?void 0:N.firstWeekContainsDate)??o.firstWeekContainsDate??((b=(x=o.locale)==null?void 0:x.options)==null?void 0:b.firstWeekContainsDate)??1,f=Ep(l,r),m=Ua((r==null?void 0:r.in)||l,0);return m.setFullYear(f,0,c),m.setHours(0,0,0,0),du(m,r)}function mS(l,r){const o=Rt(l,r==null?void 0:r.in),c=+du(o,r)-+hS(o,r);return Math.round(c/jp)+1}function rt(l,r){const o=l<0?"-":"",c=Math.abs(l).toString().padStart(r,"0");return o+c}const Vl={y(l,r){const o=l.getFullYear(),c=o>0?o:1-o;return rt(r==="yy"?c%100:c,r.length)},M(l,r){const o=l.getMonth();return r==="M"?String(o+1):rt(o+1,2)},d(l,r){return rt(l.getDate(),r.length)},a(l,r){const o=l.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];case"aaaa":default:return o==="am"?"a.m.":"p.m."}},h(l,r){return rt(l.getHours()%12||12,r.length)},H(l,r){return rt(l.getHours(),r.length)},m(l,r){return rt(l.getMinutes(),r.length)},s(l,r){return rt(l.getSeconds(),r.length)},S(l,r){const o=r.length,c=l.getMilliseconds(),f=Math.trunc(c*Math.pow(10,o-3));return rt(f,r.length)}},_r={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},tx={G:function(l,r,o){const c=l.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return o.era(c,{width:"abbreviated"});case"GGGGG":return o.era(c,{width:"narrow"});case"GGGG":default:return o.era(c,{width:"wide"})}},y:function(l,r,o){if(r==="yo"){const c=l.getFullYear(),f=c>0?c:1-c;return o.ordinalNumber(f,{unit:"year"})}return Vl.y(l,r)},Y:function(l,r,o,c){const f=Ep(l,c),m=f>0?f:1-f;if(r==="YY"){const v=m%100;return rt(v,2)}return r==="Yo"?o.ordinalNumber(m,{unit:"year"}):rt(m,r.length)},R:function(l,r){const o=wp(l);return rt(o,r.length)},u:function(l,r){const o=l.getFullYear();return rt(o,r.length)},Q:function(l,r,o){const c=Math.ceil((l.getMonth()+1)/3);switch(r){case"Q":return String(c);case"QQ":return rt(c,2);case"Qo":return o.ordinalNumber(c,{unit:"quarter"});case"QQQ":return o.quarter(c,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(c,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(c,{width:"wide",context:"formatting"})}},q:function(l,r,o){const c=Math.ceil((l.getMonth()+1)/3);switch(r){case"q":return String(c);case"qq":return rt(c,2);case"qo":return o.ordinalNumber(c,{unit:"quarter"});case"qqq":return o.quarter(c,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(c,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(c,{width:"wide",context:"standalone"})}},M:function(l,r,o){const c=l.getMonth();switch(r){case"M":case"MM":return Vl.M(l,r);case"Mo":return o.ordinalNumber(c+1,{unit:"month"});case"MMM":return o.month(c,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(c,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(c,{width:"wide",context:"formatting"})}},L:function(l,r,o){const c=l.getMonth();switch(r){case"L":return String(c+1);case"LL":return rt(c+1,2);case"Lo":return o.ordinalNumber(c+1,{unit:"month"});case"LLL":return o.month(c,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(c,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(c,{width:"wide",context:"standalone"})}},w:function(l,r,o,c){const f=mS(l,c);return r==="wo"?o.ordinalNumber(f,{unit:"week"}):rt(f,r.length)},I:function(l,r,o){const c=fS(l);return r==="Io"?o.ordinalNumber(c,{unit:"week"}):rt(c,r.length)},d:function(l,r,o){return r==="do"?o.ordinalNumber(l.getDate(),{unit:"date"}):Vl.d(l,r)},D:function(l,r,o){const c=dS(l);return r==="Do"?o.ordinalNumber(c,{unit:"dayOfYear"}):rt(c,r.length)},E:function(l,r,o){const c=l.getDay();switch(r){case"E":case"EE":case"EEE":return o.day(c,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(c,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(c,{width:"short",context:"formatting"});case"EEEE":default:return o.day(c,{width:"wide",context:"formatting"})}},e:function(l,r,o,c){const f=l.getDay(),m=(f-c.weekStartsOn+8)%7||7;switch(r){case"e":return String(m);case"ee":return rt(m,2);case"eo":return o.ordinalNumber(m,{unit:"day"});case"eee":return o.day(f,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(f,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(f,{width:"short",context:"formatting"});case"eeee":default:return o.day(f,{width:"wide",context:"formatting"})}},c:function(l,r,o,c){const f=l.getDay(),m=(f-c.weekStartsOn+8)%7||7;switch(r){case"c":return String(m);case"cc":return rt(m,r.length);case"co":return o.ordinalNumber(m,{unit:"day"});case"ccc":return o.day(f,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(f,{width:"narrow",context:"standalone"});case"cccccc":return o.day(f,{width:"short",context:"standalone"});case"cccc":default:return o.day(f,{width:"wide",context:"standalone"})}},i:function(l,r,o){const c=l.getDay(),f=c===0?7:c;switch(r){case"i":return String(f);case"ii":return rt(f,r.length);case"io":return o.ordinalNumber(f,{unit:"day"});case"iii":return o.day(c,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(c,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(c,{width:"short",context:"formatting"});case"iiii":default:return o.day(c,{width:"wide",context:"formatting"})}},a:function(l,r,o){const f=l.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return o.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(f,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(f,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(f,{width:"wide",context:"formatting"})}},b:function(l,r,o){const c=l.getHours();let f;switch(c===12?f=_r.noon:c===0?f=_r.midnight:f=c/12>=1?"pm":"am",r){case"b":case"bb":return o.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(f,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(f,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(f,{width:"wide",context:"formatting"})}},B:function(l,r,o){const c=l.getHours();let f;switch(c>=17?f=_r.evening:c>=12?f=_r.afternoon:c>=4?f=_r.morning:f=_r.night,r){case"B":case"BB":case"BBB":return o.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(f,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(f,{width:"wide",context:"formatting"})}},h:function(l,r,o){if(r==="ho"){let c=l.getHours()%12;return c===0&&(c=12),o.ordinalNumber(c,{unit:"hour"})}return Vl.h(l,r)},H:function(l,r,o){return r==="Ho"?o.ordinalNumber(l.getHours(),{unit:"hour"}):Vl.H(l,r)},K:function(l,r,o){const c=l.getHours()%12;return r==="Ko"?o.ordinalNumber(c,{unit:"hour"}):rt(c,r.length)},k:function(l,r,o){let c=l.getHours();return c===0&&(c=24),r==="ko"?o.ordinalNumber(c,{unit:"hour"}):rt(c,r.length)},m:function(l,r,o){return r==="mo"?o.ordinalNumber(l.getMinutes(),{unit:"minute"}):Vl.m(l,r)},s:function(l,r,o){return r==="so"?o.ordinalNumber(l.getSeconds(),{unit:"second"}):Vl.s(l,r)},S:function(l,r){return Vl.S(l,r)},X:function(l,r,o){const c=l.getTimezoneOffset();if(c===0)return"Z";switch(r){case"X":return nx(c);case"XXXX":case"XX":return qs(c);case"XXXXX":case"XXX":default:return qs(c,":")}},x:function(l,r,o){const c=l.getTimezoneOffset();switch(r){case"x":return nx(c);case"xxxx":case"xx":return qs(c);case"xxxxx":case"xxx":default:return qs(c,":")}},O:function(l,r,o){const c=l.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+ax(c,":");case"OOOO":default:return"GMT"+qs(c,":")}},z:function(l,r,o){const c=l.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+ax(c,":");case"zzzz":default:return"GMT"+qs(c,":")}},t:function(l,r,o){const c=Math.trunc(+l/1e3);return rt(c,r.length)},T:function(l,r,o){return rt(+l,r.length)}};function ax(l,r=""){const o=l>0?"-":"+",c=Math.abs(l),f=Math.trunc(c/60),m=c%60;return m===0?o+String(f):o+String(f)+r+rt(m,2)}function nx(l,r){return l%60===0?(l>0?"-":"+")+rt(Math.abs(l)/60,2):qs(l,r)}function qs(l,r=""){const o=l>0?"-":"+",c=Math.abs(l),f=rt(Math.trunc(c/60),2),m=rt(c%60,2);return o+f+r+m}const lx=(l,r)=>{switch(l){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"})}},Tp=(l,r)=>{switch(l){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"})}},gS=(l,r)=>{const o=l.match(/(P+)(p+)?/)||[],c=o[1],f=o[2];if(!f)return lx(l,r);let m;switch(c){case"P":m=r.dateTime({width:"short"});break;case"PP":m=r.dateTime({width:"medium"});break;case"PPP":m=r.dateTime({width:"long"});break;case"PPPP":default:m=r.dateTime({width:"full"});break}return m.replace("{{date}}",lx(c,r)).replace("{{time}}",Tp(f,r))},xS={p:Tp,P:gS},pS=/^D+$/,yS=/^Y+$/,vS=["D","DD","YY","YYYY"];function bS(l){return pS.test(l)}function NS(l){return yS.test(l)}function SS(l,r,o){const c=jS(l,r,o);if(console.warn(c),vS.includes(l))throw new RangeError(c)}function jS(l,r,o){const c=l[0]==="Y"?"years":"days of the month";return`Use \`${l.toLowerCase()}\` instead of \`${l}\` (in \`${r}\`) for formatting ${c} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const wS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ES=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,TS=/^'([^]*?)'?$/,MS=/''/g,CS=/[a-zA-Z]/;function Us(l,r,o){var b,T,j,D;const c=io(),f=c.locale??oS,m=c.firstWeekContainsDate??((T=(b=c.locale)==null?void 0:b.options)==null?void 0:T.firstWeekContainsDate)??1,v=c.weekStartsOn??((D=(j=c.locale)==null?void 0:j.options)==null?void 0:D.weekStartsOn)??0,S=Rt(l,o==null?void 0:o.in);if(!CN(S))throw new RangeError("Invalid time value");let N=r.match(ES).map(C=>{const M=C[0];if(M==="p"||M==="P"){const A=xS[M];return A(C,f.formatLong)}return C}).join("").match(wS).map(C=>{if(C==="''")return{isToken:!1,value:"'"};const M=C[0];if(M==="'")return{isToken:!1,value:OS(C)};if(tx[M])return{isToken:!0,value:C};if(M.match(CS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");return{isToken:!1,value:C}});f.localize.preprocessor&&(N=f.localize.preprocessor(S,N));const x={firstWeekContainsDate:m,weekStartsOn:v,locale:f};return N.map(C=>{if(!C.isToken)return C.value;const M=C.value;(NS(M)||bS(M))&&SS(M,r,String(l));const A=tx[M[0]];return A(S,M,f.localize,x)}).join("")}function OS(l){const r=l.match(TS);return r?r[1].replace(MS,"'"):l}function RS(l,r){return+Rt(l)>+Rt(r)}function DS(l,r){return+Rt(l)<+Rt(r)}function AS(l,r){const o=Rt(l,r==null?void 0:r.in);return o.setMinutes(0,0,0),o}const Cf=$x,Gc=[{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"}],Kn=160,Fc=14,kS=10,_S=7,sx=4,Mp=({configs:l,currentProjectId:r,onEditJob:o,queueStatus:c,queueAnalytics:f})=>{const m=U.useMemo(()=>AS(new Date),[]),v=U.useMemo(()=>Pc(m,24),[m]),S=U.useMemo(()=>Pc(m,-24),[m]),N=v,x=U.useMemo(()=>{const K=[];for(let ce=0;ce<=24;ce++)K.push(Pc(m,ce));return K},[m]),b=U.useMemo(()=>{const K=[];return l.forEach(({projectId:ce,config:P})=>{var ne,O,le,k,oe;const F={executor:P.executorEnabled!==!1?P.cronSchedule:null,reviewer:P.reviewerEnabled?P.reviewerSchedule:null,qa:P.qa.enabled?P.qa.schedule:null,audit:P.audit.enabled?P.audit.schedule:null,slicer:P.roadmapScanner.enabled?P.roadmapScanner.slicerSchedule:null,analytics:(ne=P.analytics)!=null&&ne.enabled?(O=P.analytics)==null?void 0:O.schedule:null,"pr-resolver":(le=P.prResolver)!=null&&le.enabled?P.prResolver.schedule:null,merger:(k=P.merger)!=null&&k.enabled?(oe=P.merger)==null?void 0:oe.schedule:null},Z=P.cronScheduleOffset||0;Object.entries(F).forEach(([ee,xe])=>{if(xe)try{const Y=xN.CronExpressionParser.parse(xe,{currentDate:m,endDate:v});for(;Y.hasNext();){const ie=Y.next(),me=new Date(ie.getTime());me.setMinutes(me.getMinutes()+Z),RS(me,m)&&DS(me,v)&&K.push({projectId:ce,jobType:ee,time:me})}}catch(Y){console.error(`Failed to parse cron "${xe}" for ${ce}/${ee}`,Y)}})}),K},[l,m,v]),T=U.useMemo(()=>{const K=new Set;return l.length===0||(l.every(ce=>ce.config.executorEnabled===!1)&&K.add("executor"),l.every(ce=>!ce.config.reviewerEnabled)&&K.add("reviewer"),l.every(ce=>!ce.config.qa.enabled)&&K.add("qa"),l.every(ce=>!ce.config.audit.enabled)&&K.add("audit"),l.every(ce=>!ce.config.roadmapScanner.enabled)&&K.add("slicer"),l.every(ce=>{var P;return!((P=ce.config.analytics)!=null&&P.enabled)})&&K.add("analytics"),l.every(ce=>{var P;return!((P=ce.config.prResolver)!=null&&P.enabled)})&&K.add("pr-resolver"),l.every(ce=>{var P;return!((P=ce.config.merger)!=null&&P.enabled)})&&K.add("merger")),K},[l]),j=U.useMemo(()=>{const K=new Map;let ce=0;return l.forEach(P=>{P.projectId===r||(K.set(P.projectId,ce%Gc.length),ce++)}),K},[l,r]),D=K=>ex(K,m),C=U.useMemo(()=>{const K=[];for(let ce=0;ce<=24;ce++)K.push(Pc(S,ce));return K},[S]),M=K=>{const ce=TN([EN([K,S]),N]);return ex(ce,S)},A=U.useMemo(()=>{const K=(f==null?void 0:f.recentRuns)??[],ce=new Map;for(const P of K){const F=P.providerKey||"default",Z=new Date(P.startedAt*1e3),ne=P.finishedAt?new Date(P.finishedAt*1e3):new Date;ne<S||Z>N||(ce.has(F)||ce.set(F,[]),ce.get(F).push({id:P.id,jobType:P.jobType,status:P.status,projectPath:P.projectPath,startedAt:Z,finishedAt:ne,throttledCount:P.throttledCount}))}if(c!=null&&c.running){const P=c.running.providerKey??"default";ce.has(P)||ce.set(P,[]),ce.get(P).push({id:c.running.id,jobType:c.running.jobType,status:"running",projectPath:c.running.projectPath,startedAt:new Date((c.running.dispatchedAt??c.running.enqueuedAt)*1e3),finishedAt:new Date,throttledCount:0})}return Array.from(ce.entries()).sort(([P],[F])=>P.localeCompare(F)).map(([P,F])=>({providerKey:P,runs:F.sort((Z,ne)=>Z.startedAt.getTime()-ne.startedAt.getTime())}))},[N,S,f,c]),I=K=>K.split(/[-_]/).map(ce=>ce.charAt(0).toUpperCase()+ce.slice(1)).join(" "),B=l.length>1,J=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:x.map((K,ce)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},ce))});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."})]}),B&&s.jsxs("div",{className:"flex flex-wrap gap-2 justify-end max-w-sm",children:[s.jsxs("div",{className:"flex items-center gap-1 mr-1",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-slate-400 shrink-0"}),s.jsx("span",{className:"text-[10px] text-slate-400 font-semibold",children:"current"})]}),l.filter(K=>K.projectId!==r).slice(0,5).map(K=>{const ce=j.get(K.projectId)??0,P=Gc[ce],F=(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 ${P.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:K.projectId,children:F})]},K.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+Kn},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:Kn},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:x.map((K,ce)=>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:ce*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Us(K,"HH:mm")})},ce))})]}),s.jsxs("div",{className:"relative",children:[l.length===0&&s.jsx("div",{className:"flex items-center justify-center p-8",children:s.jsx("p",{className:"text-sm text-slate-500 italic",children:"No project data available for timeline."})}),Cf.map(K=>{const ce=T.has(K.id),P=b.filter(Z=>Z.jobType===K.id);if(!B)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${ce?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:Kn},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,P.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:ce?"Disabled":"No runs in this window"})}):P.map((Z,ne)=>s.jsx("button",{type:"button",onClick:()=>o==null?void 0:o(Z.projectId,Z.jobType),style:{left:D(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 ${Us(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:Us(Z.time,"HH:mm")})},ne))]})]},K.id);const F=l.length*Fc+sx*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${ce?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:Kn,height:F},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})]}),l.map(Z=>{const ne=Z.projectId===r,O=(Z.projectId.split("/").pop()??Z.projectId).slice(0,14),le=j.get(Z.projectId)??0,k=ne?K.color.bg:Gc[le].bg;return s.jsxs("div",{style:{height:Fc},className:"flex items-center gap-1 overflow-hidden",children:[s.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${k}`}),s.jsx("span",{className:`text-[9px] truncate ${ne?"text-slate-200 font-semibold":"text-slate-600"}`,title:Z.projectId,children:ne?`${O} ★`:O})]},Z.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:F},children:[J,l.map((Z,ne)=>{const O=Z.projectId===r,le=P.filter(ie=>ie.projectId===Z.projectId),k=sx+ne*Fc,oe=O?kS:_S,ee=Math.floor((Fc-oe)/2),xe=j.get(Z.projectId)??0,Y=O?{bg:K.color.bg,border:K.color.border}:Gc[xe];return s.jsxs(ze.Fragment,{children:[ne>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:k}}),le.map((ie,me)=>s.jsx("button",{type:"button",onClick:()=>o==null?void 0:o(Z.projectId,ie.jobType),style:{left:D(ie.time)-3,top:k+ee,height:oe},className:`absolute w-6 rounded border ${Y.bg} ${Y.border} ${O?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${Z.projectId} · ${K.label} @ ${Us(ie.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:Us(ie.time,"HH:mm")})},me))]},Z.projectId)}),P.length===0&&!ce&&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:Kn+D(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})}),s.jsxs("div",{className:"p-3 bg-slate-900/40 flex items-center gap-4 text-[10px] text-slate-500",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-1.5 h-3 rounded bg-blue-500/50 border border-blue-500"}),s.jsx("span",{children:"Each block = one scheduled run"})]}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-[1px] h-4 bg-rose-500"}),s.jsx("span",{children:"Current Time"})]}),B&&s.jsx("div",{className:"flex items-center gap-1.5",children:s.jsx("span",{children:"★ = current project · blocks in same column = scheduling overlap"})})]}),A.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:[(f==null?void 0:f.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+Kn},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:Kn},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:C.map((K,ce)=>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:ce*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Us(K,"HH:mm")})},ce))})]}),s.jsx("div",{className:"relative",children:A.map(({providerKey:K,runs:ce})=>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:Kn},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:C.map((P,F)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},F))}),ce.map(P=>{const F=Cf.find(xe=>xe.id===P.jobType)??Cf[0],Z=M(P.startedAt),ne=M(P.finishedAt),O=Math.max(ne-Z,8),le=P.status==="running",k=P.status==="error"||P.status==="failed"||P.status==="errored",oe=le?"bg-green-500":k?"bg-red-500":F.color.bg,ee=le?"border-green-400/60":k?"border-red-400/60":F.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${oe} ${ee} opacity-85 shadow-lg ${le?"animate-pulse":""}`,style:{left:Z,width:O},title:`${K} • ${F.label} • ${Us(P.startedAt,"MMM d HH:mm")} • ${P.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:F.label}),s.jsx("span",{className:"text-white/70",children:P.status}),P.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",P.throttledCount,"x"]})]})},`${K}-${P.id}-${P.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:Kn+M(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},eo=[{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"}],uh=[{id:"night-surge",label:"Night Surge",description:"Dense overnight execution every 2h with daytime reviews.",schedules:{executor:"5 20,22,0,2,4,6 * * *",reviewer:"25 8,14,20 * * *",qa:"45 22,10 * * *",audit:"50 4 * * 1",slicer:"35 19,7 * * *",prResolver:"15 9,15,21 * * *",merger:"55 */4 * * *"},hints:{executor:"8pm–6am every 2h (6 runs)",reviewer:"8:25am, 2:25pm, 8:25pm",qa:"10:45pm & 10:45am",audit:"Mon 4:50am",slicer:"7:35pm & 7:35am",prResolver:"9:15am, 3:15pm, 9:15pm",merger:"Every 4h at :55"}},{id:"always-on",label:"Always On (Recommended)",description:"24/7 with maximum cadence — executor every hour, reviewer every 3h.",schedules:{executor:"5 * * * *",reviewer:"25 */3 * * *",qa:"45 2,10,18 * * *",audit:"50 3 * * 1",slicer:"35 */6 * * *",prResolver:"15 6,14,22 * * *",merger:"55 */4 * * *"},hints:{executor:"Every hour at :05",reviewer:"Every 3h at :25",qa:"2:45am, 10:45am & 6:45pm",audit:"Mon 3:50am",slicer:"Every 6h at :35",prResolver:"6:15am, 2:15pm & 10:15pm",merger:"Every 4h at :55"}},{id:"day-shift",label:"Day Shift",description:"Weekday daytime — hourly executor 8am–8pm, reviews 4x/day.",schedules:{executor:"5 8-20 * * 1-5",reviewer:"25 9,13,17,19 * * 1-5",qa:"45 10,14,18 * * 1-5",audit:"50 9 * * 1",slicer:"35 7 * * 1",prResolver:"15 8,12,16 * * 1-5",merger:"55 */4 * * 1-5"},hints:{executor:"Hourly at :05, 8am–8pm weekdays",reviewer:"9:25am, 1:25pm, 5:25pm, 7:25pm",qa:"10:45am, 2:45pm & 6:45pm weekdays",audit:"Mon 9:50am",slicer:"Mon 7:35am",prResolver:"8:15am, 12:15pm & 4:15pm weekdays",merger:"Every 4h at :55 weekdays"}},{id:"minimal",label:"Minimal",description:"Twice-daily executor and reviewer with weekly heavy jobs.",schedules:{executor:"5 2,14 * * *",reviewer:"25 8,20 * * *",qa:"45 3 * * 0",audit:"50 4 * * 0",slicer:"35 1 * * 1",prResolver:"15 8 * * 1,4",merger:"55 */8 * * *"},hints:{executor:"2:05am & 2:05pm",reviewer:"8:25am & 8:25pm",qa:"Sun 3:45am",audit:"Sun 4:50am",slicer:"Mon 1:35am",prResolver:"Mon & Thu at 8:15am",merger:"Every 8h at :55"}}];function Br(l){return l?l.trim().replace(/\s+/g," "):""}function Gl(l,r){return Br(l)===Br(r)}function zS(l){if(l)return uh.find(r=>r.id===l)}function Cp(l,r,o,c,f,m,v,S){return Gl(l.schedules.executor,r)&&Gl(l.schedules.reviewer,o)&&Gl(l.schedules.qa,c)&&Gl(l.schedules.audit,f)&&Gl(l.schedules.slicer,m)&&Gl(l.schedules.prResolver,v)&&Gl(l.schedules.merger,S)}function US(l,r,o,c,f,m,v){return uh.find(S=>Cp(S,l,r,o,c,f,m,v))}function Op(l,r,o,c,f,m,v,S){const N=zS(l);return N&&Cp(N,r,o,c,f,m,v,S)?N:US(r,o,c,f,m,v,S)}function Qc(l){const r=Br(l),o=r.split(/\s+/);if(o.length!==5)return r;const[c,f,m,v,S]=o,N=/^\d+$/.test(c),x=eo.find(b=>Br(b.value)===r);if(x)return x.label;if(c==="*/30"&&f==="*")return"Every 30 minutes";if(c==="0"&&f==="*")return"Every hour";if(c.startsWith("*/"))return`Every ${parseInt(c.replace("*/",""),10)} minutes`;if(N&&f.startsWith("*/")&&m==="*"&&v==="*"&&S==="*"){const b=parseInt(f.replace("*/",""),10);return c==="0"?`Every ${b} hours`:`Every ${b} hours at :${c.padStart(2,"0")}`}if(c==="0"&&f.startsWith("*/"))return`Every ${parseInt(f.replace("*/",""),10)} hours`;if(c==="0"&&f.includes("-")){const[b,T]=f.split("-");return`Every hour from ${su(b)} to ${su(T)}`}if(N&&f.includes("-")&&m==="*"&&v==="*"&&S==="*"){const[b,T]=f.split("-");return`Every hour from ${ru(b,c)} to ${ru(T,c)}`}if(c==="0"&&f.includes(",")){const b=f.split(",").map(su);return b.length<=3?`At ${b.join(" and ")}`:`At ${b.slice(0,-1).join(", ")}, and ${b[b.length-1]}`}if(N&&f.includes(",")&&m==="*"&&v==="*"&&(S==="*"||S==="1-5")){const b=f.split(",").map(j=>ru(j,c)),T=S==="1-5"?"Weekdays at ":"At ";return b.length<=3?`${T}${b.join(" and ")}`:`${T}${b.slice(0,-1).join(", ")}, and ${b[b.length-1]}`}return c==="0"&&f!=="*"&&m==="*"&&v==="*"&&S==="*"?`Daily at ${su(f)}`:N&&f!=="*"&&m==="*"&&v==="*"&&S==="*"?`Daily at ${ru(f,c)}`:c==="0"&&f!=="*"&&m==="*"&&v==="*"&&S==="1-5"?`Weekdays at ${su(f)}`:N&&f!=="*"&&m==="*"&&v==="*"&&S==="1-5"?`Weekdays at ${ru(f,c)}`:r}function su(l){const r=parseInt(l,10);return r===0?"12 AM":r<12?`${r} AM`:r===12?"12 PM":`${r-12} PM`}function ru(l,r){const o=r.padStart(2,"0"),c=parseInt(l,10);return Number.isNaN(c)?`${l}:${o}`:c===0?`12:${o} AM`:c<12?`${c}:${o} AM`:c===12?`12:${o} PM`:`${c-12}:${o} PM`}function LS(l){const r=Br(l),o=eo.find(c=>Br(c.value)===r);return(o==null?void 0:o.value)??"__custom__"}function HS(l){const r=new Date,o=l.getTime()-r.getTime(),c=Math.floor(o/6e4),f=Math.floor(c/60),m=Math.floor(f/24);return c<1?"less than a minute":c<60?`in ${c} minute${c>1?"s":""}`:f<24?`in ${f} hour${f>1?"s":""}`:`in ${m} day${m>1?"s":""}`}function qS(l){const r={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return l.toLocaleDateString("en-US",r)}function BS(l){const r=new Date,o=l.getTime()-r.getTime(),c=Math.floor(o/6e4);return c>=0&&c<30}const Rp="5 * * * *",Dp="25 */3 * * *",VS={enabled:!0,roadmapPath:"ROADMAP.md",autoScanInterval:300,slicerSchedule:"35 */6 * * *",slicerMaxRuntime:600,priorityMode:"roadmap-first",issueColumn:"Ready"},rx={enabled:!0,schedule:"45 2,10,18 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},YS={enabled:!0,schedule:"50 3 * * 1",maxRuntime:1800,targetColumn:"Draft"},$S={enabled:!1,schedule:"0 6 * * 1",maxRuntime:900,lookbackDays:7,targetColumn:"Draft",analysisPrompt:""},ix={enabled:!0,schedule:"15 6,14,22 * * *",maxRuntime:3600,branchPatterns:[],maxPrsPerRun:0,perPrTimeout:600,aiConflictResolution:!0,aiReviewResolution:!1,readyLabel:"ready-to-merge"},ux={enabled:!1,schedule:"55 */4 * * *",maxRuntime:1800,mergeMethod:"squash",minReviewScore:80,branchPatterns:[],rebaseBeforeMerge:!0,maxPrsPerRun:0};function Wl(){return{...VS}}function Vf(){return{...rx,branchPatterns:[...rx.branchPatterns]}}function Yf(){return{...YS}}function to(){return{...$S}}function Zl(){return{...ix,branchPatterns:[...ix.branchPatterns]}}function Hr(){return{...ux,branchPatterns:[...ux.branchPatterns]}}const PS=()=>{var gn,Ka,ha,ma,xn;const l=lo(),{addToast:r,selectedProjectId:o,globalModeLoading:c}=It(),[f,m]=U.useState("overview"),[v,S]=U.useState(!1),[N,x]=U.useState(!1),[b,T]=U.useState(null),[j,D]=U.useState([]),[C,M]=U.useState(null),[A,I]=U.useState(null),[B,J]=U.useState({isDirty:!1,enabled:!0,queueMode:"auto",globalMaxConcurrency:1,providerBuckets:[]}),[K,ce]=U.useState(""),[P,F]=U.useState("1"),[Z,ne]=U.useState(!1),{data:O,loading:le,error:k,refetch:oe}=mn(Wx,[o],{enabled:!c}),{data:ee,loading:xe,refetch:Y}=mn(lh,[o],{enabled:!c});U.useEffect(()=>{const $=setInterval(()=>{oe()},3e4);return()=>clearInterval($)},[oe]),U.useEffect(()=>{c||Zx().then(D).catch(console.error)},[o,c]),U.useEffect(()=>{if(c)return;const $=()=>{E2().then(M).catch(()=>{}),T2(24).then(I).catch(()=>{})};$();const he=setInterval($,3e4);return()=>clearInterval(he)},[c,o]),U.useEffect(()=>{var $,he,Oe,Ge;if(ee&&!B.isDirty){const gt=(($=ee.queue)==null?void 0:$.providerBuckets)??{};J({isDirty:!1,enabled:((he=ee.queue)==null?void 0:he.enabled)??!0,queueMode:((Oe=ee.queue)==null?void 0:Oe.mode)??"auto",globalMaxConcurrency:((Ge=ee.queue)==null?void 0:Ge.maxConcurrency)??1,providerBuckets:Object.entries(gt).map(([St,qt])=>({key:St,maxConcurrency:qt.maxConcurrency}))})}},[ee,B.isDirty]);const ie=()=>{Y(),oe()},me=($,he)=>$ instanceof Error?$.message:he,je=async()=>{if(O){S(!0);try{O.paused?(await zf(),r({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await v2(),r({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),ie()}catch($){r({title:"Action Failed",message:me($,"Failed to toggle schedule state"),type:"error"})}finally{S(!1)}}},be=($,he)=>{const Oe=new URLSearchParams({tab:$});$==="schedules"&&Oe.set("mode","custom"),he&&Oe.set("jobType",he==="planner"?"slicer":he),l(`/settings?${Oe.toString()}`)},_=async $=>{const he=$==="planner"?"slicer":$;T($);try{await Qx(he),r({title:"Job Triggered",message:`${$[0].toUpperCase()+$.slice(1)} job has been queued.`,type:"success"}),oe()}catch(Oe){r({title:"Trigger Failed",message:me(Oe,`Failed to trigger ${$} job`),type:"error"})}finally{T(null)}},se=async()=>{if(ee){x(!0);try{await sh({queue:{...ee.queue,enabled:B.enabled,mode:B.queueMode,maxConcurrency:B.globalMaxConcurrency,providerBuckets:Object.fromEntries(B.providerBuckets.map($=>[$.key,{maxConcurrency:$.maxConcurrency}]))}}),J($=>({...$,isDirty:!1})),ie(),r({title:"Parallelism Updated",message:"Queue coordination settings were saved.",type:"success"})}catch($){r({title:"Save Failed",message:me($,"Failed to save queue settings"),type:"error"})}finally{x(!1)}}},ge=$=>{if(!$)return s.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const he=new Date($),Oe=BS(he);return s.jsxs("div",{className:"flex items-center space-x-2",children:[Oe&&s.jsxs("span",{className:"relative flex h-3 w-3",children:[s.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),s.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-green-500"})]}),s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"text-slate-200 font-medium",children:HS(he)}),s.jsxs("span",{className:"text-slate-500 ml-2",children:["(",qS(he),")"]})]})]})},pe=$=>{if(!$||$.delayMinutes<=0)return s.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Starts directly at the scheduled time."});const he=[];return $.balancedDelayMinutes>0&&he.push(`auto +${$.balancedDelayMinutes}m`),$.manualDelayMinutes>0&&he.push(`manual +${$.manualDelayMinutes}m`),s.jsxs("div",{className:"text-xs text-slate-500 mt-2",children:["Delayed after cron fire:",s.jsxs("span",{className:"text-slate-300",children:[" ",he.join(" - ")]})]})},Me=U.useMemo(()=>{var $,he,Oe,Ge,gt,St,qt,it,sa,pn,yn,Bt,Ma,qa,Ye,ll,xt,Vt,At,kt,Xl,Ys;return!ee||!O?[]:[{id:"executor",name:"Executor",description:"Creates implementation PRs from PRDs",icon:s.jsx(Xc,{className:"h-4 w-4"}),enabled:(ee==null?void 0:ee.executorEnabled)!==!1,schedule:O.executor.schedule,nextRun:O.executor.nextRun,delayInfo:O.executor},{id:"reviewer",name:"Reviewer",description:"Reviews PRs and manages merge readiness",icon:s.jsx(cu,{className:"h-4 w-4"}),enabled:(ee==null?void 0:ee.reviewerEnabled)??!1,schedule:O.reviewer.schedule,nextRun:O.reviewer.nextRun,delayInfo:O.reviewer},{id:"qa",name:"QA",description:"Generates and runs quality checks on PRs",icon:s.jsx(l2,{className:"h-4 w-4"}),enabled:(($=ee==null?void 0:ee.qa)==null?void 0:$.enabled)??!1,schedule:(he=O.qa)==null?void 0:he.schedule,nextRun:(Oe=O.qa)==null?void 0:Oe.nextRun,delayInfo:O.qa},{id:"audit",name:"Auditor",description:"Runs automated audit reports",icon:s.jsx(Eg,{className:"h-4 w-4"}),enabled:((Ge=ee==null?void 0:ee.audit)==null?void 0:Ge.enabled)??!1,schedule:(gt=O.audit)==null?void 0:gt.schedule,nextRun:(St=O.audit)==null?void 0:St.nextRun,delayInfo:O.audit},{id:"planner",name:"Planner",description:"Creates PRDs from audit findings and pending roadmap items",icon:s.jsx(Eg,{className:"h-4 w-4"}),enabled:((qt=ee==null?void 0:ee.roadmapScanner)==null?void 0:qt.enabled)??!1,schedule:((it=O.planner)==null?void 0:it.schedule)||((sa=ee.roadmapScanner)==null?void 0:sa.slicerSchedule)||Wl().slicerSchedule,nextRun:(pn=O.planner)==null?void 0:pn.nextRun,delayInfo:O.planner},{id:"analytics",name:"Analytics",description:"Fetches Amplitude data, analyzes with AI, and creates board issues",icon:s.jsx(r1,{className:"h-4 w-4"}),enabled:((yn=ee==null?void 0:ee.analytics)==null?void 0:yn.enabled)??!1,schedule:((Bt=O.analytics)==null?void 0:Bt.schedule)||((Ma=ee.analytics)==null?void 0:Ma.schedule)||to().schedule,nextRun:(qa=O.analytics)==null?void 0:qa.nextRun,delayInfo:O.analytics},{id:"pr-resolver",name:"PR Resolver",description:"Rebases conflicted PRs and optionally applies AI-powered review fixes",icon:s.jsx(cu,{className:"h-4 w-4"}),enabled:((Ye=ee==null?void 0:ee.prResolver)==null?void 0:Ye.enabled)??Zl().enabled,schedule:((ll=O.prResolver)==null?void 0:ll.schedule)||((xt=ee.prResolver)==null?void 0:xt.schedule)||Zl().schedule,nextRun:(Vt=O.prResolver)==null?void 0:Vt.nextRun,delayInfo:O.prResolver},{id:"merger",name:"Merger",description:"Repo-wide PR merge orchestrator — merges eligible PRs in FIFO order",icon:s.jsx(Mg,{className:"h-4 w-4"}),enabled:((At=ee==null?void 0:ee.merger)==null?void 0:At.enabled)??!1,schedule:((kt=O.merger)==null?void 0:kt.schedule)||((Xl=ee.merger)==null?void 0:Xl.schedule)||Hr().schedule,nextRun:(Ys=O.merger)==null?void 0:Ys.nextRun,delayInfo:O.merger}]},[ee,O]);if(le||xe)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading scheduling information..."})});if(k||!O||!ee)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(nl,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load schedule information"}),s.jsx("div",{className:"text-sm text-slate-500",children:(k==null?void 0:k.message)||"Unknown error"}),s.jsx(Ve,{onClick:()=>{oe(),Y()},children:"Retry"})]});const we=O.paused,He=we?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",mt=we?"Paused":"Active",Pe=Op(ee.scheduleBundleId,ee.cronSchedule,ee.reviewerSchedule,((gn=ee.qa)==null?void 0:gn.schedule)||Vf().schedule,((Ka=ee.audit)==null?void 0:Ka.schedule)||Yf().schedule,((ha=ee.roadmapScanner)==null?void 0:ha.slicerSchedule)||Wl().slicerSchedule,((ma=ee.prResolver)==null?void 0:ma.schedule)??Zl().schedule,((xn=ee.merger)==null?void 0:xn.schedule)??Hr().schedule),Xt=($,he,Oe)=>!Pe||$==="analytics"||!Gl(Pe.schedules[$],he)?Qc(Oe):`${Pe.label} - ${Pe.hints[$]}`,Ha=[{id:"overview",label:"Overview",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx($e,{className:`p-6 border-2 ${He}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(Xc,{className:"h-8 w-8"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Automation Status"}),s.jsx("div",{className:"text-2xl font-bold",children:mt}),s.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"Automatic balancing spreads registered projects before queueing overlaps."})]})]}),s.jsx(Ve,{variant:we?"primary":"outline",size:"lg",onClick:je,loading:v,children:we?s.jsxs(s.Fragment,{children:[s.jsx(qr,{className:"h-5 w-5 mr-2"}),"Resume"]}):s.jsxs(s.Fragment,{children:[s.jsx(Vx,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),s.jsxs($e,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:Me.map($=>{var he,Oe,Ge,gt,St,qt;return s.jsxs("div",{className:`p-4 rounded-lg border ${$.enabled?"border-slate-800":"border-slate-800 opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[$.icon,s.jsxs("div",{children:[s.jsx("h4",{className:"text-base font-semibold text-slate-200",children:$.name}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:$.description})]})]}),s.jsx("span",{className:`inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-medium ${$.enabled?"border-green-500/30 bg-green-500/10 text-green-300":"border-slate-700 bg-slate-900 text-slate-400"}`,children:$.enabled?"Enabled":"Disabled"})]}),s.jsxs("div",{className:"space-y-3 mt-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Schedule"}),s.jsx("div",{className:"text-sm text-slate-200 font-medium",children:Xt($.id==="planner"?"slicer":$.id==="pr-resolver"?"prResolver":$.id,$.id==="qa"?((he=ee.qa)==null?void 0:he.schedule)||Vf().schedule:$.id==="audit"?((Oe=ee.audit)==null?void 0:Oe.schedule)||Yf().schedule:$.id==="planner"?((Ge=ee.roadmapScanner)==null?void 0:Ge.slicerSchedule)||Wl().slicerSchedule:$.id==="analytics"?((gt=ee.analytics)==null?void 0:gt.schedule)||to().schedule:$.id==="pr-resolver"?((St=ee.prResolver)==null?void 0:St.schedule)||Zl().schedule:$.id==="merger"?((qt=ee.merger)==null?void 0:qt.schedule)||Hr().schedule:$.id==="reviewer"?ee.reviewerSchedule||Dp:ee.cronSchedule||Rp,$.schedule)})]}),pe($.delayInfo),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Next Run"}),ge($.nextRun)]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsxs("div",{className:`flex items-center space-x-2 text-sm ${$.enabled?"text-green-400":"text-amber-400"}`,children:[s.jsx(kf,{className:"h-4 w-4"}),s.jsx("span",{children:$.enabled?"Configured in Settings > Jobs":"Disabled in Settings > Jobs"})]}),s.jsx("button",{type:"button",onClick:()=>be("schedules",$.id),className:"rounded-md border border-slate-700 px-3 py-1.5 text-xs font-medium text-slate-300 transition-colors hover:border-slate-600 hover:bg-slate-900",children:"Edit cadence"}),["qa","audit","planner","analytics","pr-resolver","merger"].includes($.id)&&s.jsx("button",{type:"button",onClick:()=>be("jobs",$.id),className:"rounded-md border border-indigo-500/30 bg-indigo-500/10 px-3 py-1.5 text-xs font-medium text-indigo-300 transition-colors hover:border-indigo-400/50 hover:bg-indigo-500/15",children:"Job settings"}),s.jsxs("button",{disabled:b!==null,onClick:()=>_($.id),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium text-green-400 bg-green-500/10 hover:bg-green-500/20 border border-green-500/30 hover:border-green-500/50 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:[b===$.id?s.jsx("div",{className:"h-3 w-3 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(qr,{className:"h-3 w-3 fill-current"}),"Run now"]})]})]})]},$.id)})})]})]})},{id:"cadence",label:"Cadence",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Mp,{configs:j,currentProjectId:o??void 0,onEditJob:($,he)=>be("schedules",he),queueStatus:C,queueAnalytics:A}),s.jsx($e,{className:"p-6 border border-slate-800 bg-slate-950/50",children:s.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Cadence is configured in Settings"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Use Settings > Schedules for cron cadence and templates. Use Settings > Jobs for enablement, runtime, resolver, and merger behavior."})]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx(Ve,{variant:"outline",onClick:()=>be("schedules"),children:"Open Schedules"}),s.jsx(Ve,{onClick:()=>be("jobs"),children:"Open Jobs"})]})]})}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:Me.map($=>s.jsxs($e,{className:"p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[$.icon,s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-semibold text-slate-200",children:$.name}),s.jsx("div",{className:"text-xs text-slate-500",children:$.description})]})]}),s.jsx("span",{className:"text-xs font-mono text-slate-500",children:$.schedule})]}),s.jsx("div",{className:"text-sm text-slate-300",children:Qc($.schedule)}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsx("button",{type:"button",onClick:()=>be("schedules",$.id),className:"rounded-md border border-slate-700 px-3 py-1.5 text-xs font-medium text-slate-300 transition-colors hover:border-slate-600 hover:bg-slate-900",children:"Edit cadence"}),["qa","audit","planner","analytics","pr-resolver","merger"].includes($.id)&&s.jsx("button",{type:"button",onClick:()=>be("jobs",$.id),className:"rounded-md border border-indigo-500/30 bg-indigo-500/10 px-3 py-1.5 text-xs font-medium text-indigo-300 transition-colors hover:border-indigo-400/50 hover:bg-indigo-500/15",children:"Job settings"})]})]},`cadence-${$.id}`))})]})},{id:"crontab",label:"Crontab",content:s.jsxs($e,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[s.jsx(eh,{className:"h-5 w-5 text-slate-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),O.entries.length===0?s.jsx("div",{className:"text-slate-500 text-sm",children:"No crontab entries found."}):s.jsx("div",{className:"space-y-2",children:O.entries.map(($,he)=>s.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:$},he))})]})},{id:"parallelism",label:"Parallelism",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs($e,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Mg,{className:"h-5 w-5 text-indigo-400"}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Provider Buckets"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Control how jobs from different AI providers are dispatched concurrently."})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/50 p-4",children:s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Queue Enabled"}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Coordinate overlapping jobs globally instead of dispatching each project independently."})]}),s.jsx(Gt,{checked:B.enabled,onChange:$=>J(he=>({...he,enabled:$,isDirty:!0}))})]})}),s.jsx(Qt,{label:"Dispatch Mode",value:B.queueMode,onChange:$=>{J(he=>({...he,queueMode:$,isDirty:!0}))},options:[{label:"Auto — detect providers, balance automatically",value:"auto"},{label:"Conservative — one job at a time globally",value:"conservative"},{label:"Provider-aware — per-bucket concurrency",value:"provider-aware"}],helperText:"Auto (recommended) detects providers and allows cross-provider parallelism with no config. Provider-aware lets you set explicit per-bucket limits."}),s.jsx(ke,{label:"Global Max Concurrency",type:"number",min:"1",max:"20",value:String(B.globalMaxConcurrency),onChange:$=>{const he=Math.min(20,Math.max(1,Number($.target.value||1)));J(Oe=>({...Oe,globalMaxConcurrency:he,isDirty:!0}))},helperText:"Maximum concurrent jobs across all providers."})]}),B.queueMode==="provider-aware"&&s.jsxs("div",{className:"space-y-3 pt-2 border-t border-slate-800",children:[s.jsx("div",{className:"text-sm font-medium text-slate-300",children:"Configured Buckets"}),B.providerBuckets.length===0&&s.jsx("div",{className:"text-sm text-slate-500",children:"No buckets configured. Add a bucket below to set per-provider concurrency limits."}),B.providerBuckets.map(($,he)=>{var Ge,gt;const Oe=((gt=(Ge=A==null?void 0:A.byProviderBucket)==null?void 0:Ge[$.key])==null?void 0:gt.running)??0;return s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-slate-800 bg-slate-950/50",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-sm font-mono text-slate-200 truncate",children:$.key}),Oe>0&&s.jsxs("div",{className:"text-xs text-amber-400 mt-0.5",children:[Oe," running"]})]}),s.jsx("div",{className:"w-28 shrink-0",children:s.jsx(ke,{type:"number",min:"1",max:"10",value:String($.maxConcurrency),"aria-label":`Max concurrency for ${$.key}`,onChange:St=>{const qt=Math.min(10,Math.max(1,Number(St.target.value||1)));J(it=>{const sa=[...it.providerBuckets];return sa[he]={...sa[he],maxConcurrency:qt},{...it,providerBuckets:sa,isDirty:!0}})}})}),s.jsx("button",{type:"button","aria-label":`Remove bucket ${$.key}`,onClick:()=>{J(St=>({...St,providerBuckets:St.providerBuckets.filter((qt,it)=>it!==he),isDirty:!0}))},className:"p-1.5 rounded text-slate-500 hover:text-red-400 hover:bg-red-500/10 transition-colors",children:s.jsx($r,{className:"h-4 w-4"})})]},$.key)}),Z?s.jsxs("div",{className:"flex items-end gap-3 p-3 rounded-lg border border-indigo-500/30 bg-indigo-950/20",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(ke,{label:"Bucket Key",placeholder:"e.g. claude-native, codex",value:K,onChange:$=>ce($.target.value),helperText:"Provider bucket key"})}),s.jsx("div",{className:"w-28 shrink-0",children:s.jsx(ke,{label:"Max Concurrency",type:"number",min:"1",max:"10",value:P,onChange:$=>F($.target.value)})}),s.jsxs("div",{className:"flex gap-2 pb-0.5",children:[s.jsx(Ve,{size:"sm",onClick:()=>{const $=K.trim();if(!$)return;const he=Math.min(10,Math.max(1,Number(P||1)));J(Oe=>({...Oe,providerBuckets:[...Oe.providerBuckets.filter(Ge=>Ge.key!==$),{key:$,maxConcurrency:he}],isDirty:!0})),ce(""),F("1"),ne(!1)},disabled:!K.trim(),children:"Add"}),s.jsx(Ve,{size:"sm",variant:"ghost",onClick:()=>{ne(!1),ce(""),F("1")},children:"Cancel"})]})]}):s.jsxs("button",{type:"button",onClick:()=>ne(!0),className:"flex items-center gap-1.5 text-sm text-indigo-400 hover:text-indigo-300 transition-colors",children:[s.jsx(Il,{className:"h-4 w-4"}),"Add Bucket"]})]})]}),s.jsxs("div",{className:"flex justify-end pt-4",children:[s.jsx(Ve,{variant:"ghost",onClick:()=>{var $;if(ee){const he=(($=ee.queue)==null?void 0:$.providerBuckets)??{};J(Oe=>{var Ge,gt,St;return{...Oe,enabled:((Ge=ee.queue)==null?void 0:Ge.enabled)??!0,queueMode:((gt=ee.queue)==null?void 0:gt.mode)??"auto",globalMaxConcurrency:((St=ee.queue)==null?void 0:St.maxConcurrency)??1,providerBuckets:Object.entries(he).map(([qt,it])=>({key:qt,maxConcurrency:it.maxConcurrency})),isDirty:!1}}),ne(!1),ce(""),F("1")}},disabled:!B.isDirty,children:"Reset"}),s.jsxs(Ve,{onClick:se,loading:N,disabled:!B.isDirty,children:[s.jsx(kf,{className:"h-4 w-4 mr-2"}),"Save Queue Settings"]})]})]})}];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.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Scheduling"}),s.jsx("p",{className:"text-sm text-slate-500 mt-1",children:"Monitor automation here. Edit cadence and job behavior in Settings."})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[Pe&&s.jsxs("div",{className:"text-right",children:[s.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Schedule Bundle"}),s.jsx("div",{className:"text-sm font-medium text-indigo-300",children:Pe.label}),s.jsxs("div",{className:"text-xs text-slate-500",children:["Priority ",O.schedulingPriority,"/5 across registered projects"]})]}),s.jsx(Ve,{variant:"outline",onClick:()=>be("schedules"),children:"Open Settings"})]})]}),s.jsx(ep,{tabs:Ha,activeTab:f,onChange:m})]})};function cx(l){return l.type==="telegram"?`telegram:${l.botToken}:${l.chatId}`:`${l.type}:${l.url}`}const GS=[{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"}],FS=(l,r)=>l.includes(r)?l.filter(o=>o!==r):[...l,r],ox=({webhook:l,onChange:r,onSave:o,onCancel:c,isNew:f})=>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(Qt,{label:"Type",value:l.type,onChange:m=>{const v=m;r(v==="telegram"?{type:v,botToken:"",chatId:"",events:l.events}:{type:v,url:"",events:l.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),l.type==="telegram"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"relative",children:s.jsx(ke,{label:"Bot Token",type:"password",value:l.botToken||"",onChange:m=>r({...l,botToken:m.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(ke,{label:"Chat ID",value:l.chatId||"",onChange:m=>r({...l,chatId:m.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(ke,{label:"Webhook URL",type:"password",value:l.url||"",onChange:m=>r({...l,url:m.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:GS.map(m=>s.jsx("button",{type:"button",onClick:()=>r({...l,events:FS(l.events,m.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${l.events.includes(m.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:m.label},m.value))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(Ve,{variant:"ghost",onClick:c,children:"Cancel"}),s.jsx(Ve,{onClick:o,disabled:l.events.length===0||(l.type==="telegram"?!l.botToken||!l.chatId:!l.url),children:f?"Add Webhook":"Save Changes"})]})]}),Ap=({notifications:l,onChange:r,globalWebhook:o,onSetGlobal:c,onUnsetGlobal:f})=>{const[m,v]=ze.useState(null),[S,N]=ze.useState(!1),[x,b]=ze.useState({type:"slack",url:"",events:[]}),T=()=>{r({webhooks:[...l.webhooks,x]}),b({type:"slack",url:"",events:[]}),N(!1)},j=(C,M)=>{const A=[...l.webhooks];A[C]=M,r({webhooks:A})},D=C=>{r({webhooks:l.webhooks.filter((M,A)=>A!==C)})};return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),s.jsx("div",{className:"space-y-3",children:l.webhooks.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):l.webhooks.map((C,M)=>s.jsx("div",{children:m===M?s.jsx(ox,{webhook:C,onChange:A=>j(M,A),onSave:()=>v(null),onCancel:()=>v(null)}):s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"text-sm font-medium text-slate-200 capitalize",children:C.type}),C.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",C.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:C.events.map(A=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:A.replace("_"," ")},A))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[c!==void 0&&(()=>{const A=o!=null&&cx(C)===cx(o);return s.jsx("button",{type:"button",onClick:()=>A?f==null?void 0:f():c(C),className:`p-2 transition-colors ${A?"text-indigo-400 hover:text-indigo-300":"text-slate-500 hover:text-slate-300"}`,"aria-label":A?"Global channel (active)":"Set as global channel",title:A?"Global channel (active)":"Set as global channel",children:s.jsx(k1,{className:"h-4 w-4"})})})(),s.jsx("button",{type:"button",onClick:()=>v(M),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${C.type} webhook`,title:`Edit ${C.type} webhook`,children:s.jsx(ro,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>D(M),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${C.type} webhook`,title:`Delete ${C.type} webhook`,children:s.jsx($r,{className:"h-4 w-4"})})]})]})},M))}),S?s.jsx(ox,{webhook:x,onChange:b,onSave:T,onCancel:()=>N(!1),isNew:!0}):s.jsxs(Ve,{variant:"ghost",onClick:()=>N(!0),children:[s.jsx(Il,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},ZS=({isOpen:l,onClose:r,title:o,children:c})=>(U.useEffect(()=>{const f=m=>{m.key==="Escape"&&r()};return l&&(document.addEventListener("keydown",f),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",f),document.body.style.overflow="unset"}},[l,r]),l?Vb.createPortal(s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:r,"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-2xl transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl transition-all flex flex-col max-h-[90vh]",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-slate-800 px-6 py-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:o}),s.jsx("button",{onClick:r,className:"rounded-full p-1 text-slate-400 hover:bg-slate-800 hover:text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:s.jsx(Pr,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:c})]})]}),document.body):null),WS=l=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(o=>l.toUpperCase().includes(o)),QS=({value:l,isSensitive:r})=>{const[o,c]=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:o?l:"***********"}),s.jsx("button",{type:"button",onClick:()=>c(!o),className:"text-slate-500 hover:text-slate-300","aria-label":o?"Hide sensitive value":"Show sensitive value",title:o?"Hide sensitive value":"Show sensitive value",children:o?s.jsx(T1,{className:"h-4 w-4"}):s.jsx(C1,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:l})},kp=({envVars:l,onChange:r,compact:o=!1})=>{const[c,f]=ze.useState(""),[m,v]=ze.useState(""),[S,N]=ze.useState(null),[x,b]=ze.useState(""),{addToast:T}=It(),j=()=>{if(c.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(c)){T({title:"Invalid Key Format",message:"Key must be uppercase with underscores (e.g., API_KEY)",type:"error"});return}r({...l,[c]:m}),f(""),v("")}},D=B=>{const J={...l};delete J[B],r(J)},C=B=>{N(B),b(l[B]??"")},M=()=>{S&&(r({...l,[S]:x}),N(null),b(""))},A=()=>{N(null),b("")},I=Object.entries(l);return s.jsxs("div",{className:"space-y-4",children:[!o&&s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),s.jsx("div",{className:"space-y-2",children:I.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):I.map(([B,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:B}),S===B?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:x,onChange:K=>b(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:M,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${B} value`,title:`Save ${B} value`,children:s.jsx(kf,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:A,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${B}`,title:`Cancel editing ${B}`,children:s.jsx(Pr,{className:"h-4 w-4"})})]}):s.jsx(QS,{value:J,isSensitive:WS(B)})]}),S!==B&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>C(B),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${B}`,title:`Edit ${B}`,children:s.jsx(ro,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>D(B),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${B}`,title:`Delete ${B}`,children:s.jsx($r,{className:"h-4 w-4"})})]})]},B))}),s.jsxs("div",{className:`flex items-end gap-3 ${o?"":"pt-4 border-t border-slate-800"}`,children:[s.jsxs("div",{className:"flex-1",children:[!o&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:c,onChange:B=>f(B.target.value.toUpperCase()),placeholder:o?"ENV_VAR_NAME":"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs("div",{className:"flex-1",children:[!o&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:m,onChange:B=>v(B.target.value),placeholder:o?"value":"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs(Ve,{onClick:j,disabled:!c.trim(),size:o?"sm":"md",children:[s.jsx(Il,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function IS(l,r){var o;return!!(l!=null&&l.startsWith("glm-")||(o=r==null?void 0:r.model)!=null&&o.startsWith("glm-"))}function XS(l,r){var o,c;return IS(l,r)?!((c=(o=r==null?void 0:r.envVars)==null?void 0:o.ANTHROPIC_API_KEY)!=null&&c.trim()):!1}const dx={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:""}},JS=({isOpen:l,onClose:r,onSave:o,presetId:c,preset:f,isBuiltIn:m,existingIds:v})=>{const[S,N]=ze.useState(""),[x,b]=ze.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[T,j]=ze.useState(!1),[D,C]=ze.useState("custom"),[M,A]=ze.useState(null),I=XS(c??S,x);ze.useEffect(()=>{l&&(c&&f?(N(c),b({name:f.name,command:f.command,subcommand:f.subcommand??"",promptFlag:f.promptFlag??"",autoApproveFlag:f.autoApproveFlag??"",workdirFlag:f.workdirFlag??"",modelFlag:f.modelFlag??"",model:f.model??"",envVars:f.envVars??{}}),c==="claude"||f.command==="claude"?C("claude"):c==="codex"||f.command==="codex"?C("codex"):C("custom")):(N(""),b({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),C("custom")),A(null),j(!!(f!=null&&f.envVars&&Object.keys(f.envVars).length>0)))},[l,c,f]);const B=P=>{if(C(P),P!=="custom"&&dx[P]){const F=dx[P];b(Z=>({...Z,...F,envVars:Z.envVars})),!c&&!S&&N(P)}},J=(P,F)=>{b(Z=>({...Z,[P]:F})),A(null)},K=()=>{if(!x.name.trim())return A("Name is required"),!1;if(!x.command.trim())return A("Command is required"),!1;if(!c){if(!S.trim())return A("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(S))return A("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(v.includes(S))return A("A preset with this ID already exists"),!1}return!0},ce=()=>{var F,Z,ne,O,le,k;if(!K())return;const P={name:x.name.trim(),command:x.command.trim()};(F=x.subcommand)!=null&&F.trim()&&(P.subcommand=x.subcommand.trim()),(Z=x.promptFlag)!=null&&Z.trim()&&(P.promptFlag=x.promptFlag.trim()),(ne=x.autoApproveFlag)!=null&&ne.trim()&&(P.autoApproveFlag=x.autoApproveFlag.trim()),(O=x.workdirFlag)!=null&&O.trim()&&(P.workdirFlag=x.workdirFlag.trim()),(le=x.modelFlag)!=null&&le.trim()&&(P.modelFlag=x.modelFlag.trim()),(k=x.model)!=null&&k.trim()&&(P.model=x.model.trim()),x.envVars&&Object.keys(x.envVars).length>0&&(P.envVars=x.envVars),o(c||S,P),r()};return s.jsx(ZS,{isOpen:l,onClose:r,title:c?`Edit Preset: ${f==null?void 0:f.name}`:"Add Provider Preset",children:s.jsxs("div",{className:"space-y-6",children:[M&&s.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:M}),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(ou,{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."})]})]})}),!m&&s.jsx("div",{children:s.jsx(Qt,{label:"Template",value:D,onChange:B,options:[{label:"Start from scratch",value:"custom"},{label:"Claude (Anthropic)",value:"claude"},{label:"Codex (OpenAI)",value:"codex"}],helperText:"Start with a pre-configured template or customize from scratch"})}),!c&&s.jsx(ke,{label:"Preset ID",value:S,onChange:P=>N(P.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(ke,{label:"Display Name",value:x.name,onChange:P=>J("name",P.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(ke,{label:"Command",value:x.command,onChange:P=>J("command",P.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(ke,{label:"Model",value:x.model??"",onChange:P=>J("model",P.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(ke,{label:"Model Flag",value:x.modelFlag??"",onChange:P=>J("modelFlag",P.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:()=>j(!T),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[T?s.jsx(m1,{className:"h-4 w-4"}):s.jsx(Lx,{className:"h-4 w-4"}),"Advanced Options"]}),T&&s.jsxs("div",{className:"mt-4 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(ke,{label:"Subcommand",value:x.subcommand??"",onChange:P=>J("subcommand",P.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(ke,{label:"Prompt Flag",value:x.promptFlag??"",onChange:P=>J("promptFlag",P.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(ke,{label:"Auto-Approve Flag",value:x.autoApproveFlag??"",onChange:P=>J("autoApproveFlag",P.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(ke,{label:"Workdir Flag",value:x.workdirFlag??"",onChange:P=>J("workdirFlag",P.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(kp,{envVars:x.envVars??{},onChange:P=>J("envVars",P),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(Ve,{variant:"ghost",onClick:r,children:"Cancel"}),s.jsx(Ve,{onClick:ce,children:c?"Save Changes":"Add Preset"})]})]})})},iu=({label:l,value:r,onChange:o,placeholder:c,helpText:f})=>{const[m,v]=ze.useState(""),S=()=>{m.trim()&&!r.includes(m.trim())&&(o([...r,m.trim()]),v(""))},N=b=>{o(r.filter(T=>T!==b))},x=b=>{b.key==="Enter"&&(b.preventDefault(),S())};return s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:l}),s.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:r.map(b=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[b,s.jsx("button",{type:"button",onClick:()=>N(b),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${b}`,title:`Remove ${b}`,children:s.jsx(Pr,{className:"h-3 w-3"})})]},b))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:m,onChange:b=>v(b.target.value),onKeyDown:x,placeholder:c,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(Ve,{onClick:S,disabled:!m.trim(),"aria-label":`Add ${l.toLowerCase()} value`,children:s.jsx(Il,{className:"h-4 w-4"})})]}),f&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:f})]})},KS=({form:l,updateField:r,projectName:o,doctorChecks:c,doctorLoading:f})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx($e,{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(ke,{label:"Project Name",value:o,disabled:!0}),s.jsx(ke,{label:"Default Branch",value:l.defaultBranch,onChange:m=>r("defaultBranch",m.target.value)}),s.jsx(ke,{label:"PRD Directory",value:l.prdDir,onChange:m=>r("prdDir",m.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(ke,{label:"Branch Prefix",value:l.branchPrefix,onChange:m=>r("branchPrefix",m.target.value)}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Gt,{label:"Enable PRD Executor",checked:l.executorEnabled,onChange:m=>r("executorEnabled",m)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Gt,{label:"Enable Automated Reviews",checked:l.reviewerEnabled,onChange:m=>r("reviewerEnabled",m)})})]}),s.jsx("div",{className:"pt-4 mt-4 border-t border-slate-800",children:s.jsx(iu,{label:"Branch Patterns",value:l.branchPatterns,onChange:m=>r("branchPatterns",m),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"})})]})}),s.jsxs($e,{className:"divide-y divide-slate-800",children:[s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx(Ux,{className:"h-4 w-4 text-indigo-500"}),s.jsx("h3",{className:"text-base font-medium text-slate-200",children:"System Health"})]}),f?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):c.map((m,v)=>{const S=m.status==="pass",N=m.status==="warn",x=S?"bg-green-500/10 text-green-400 border-green-500/20":N?"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:m.name}),s.jsx("p",{className:"text-xs text-slate-500",children:m.detail})]}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${x}`,children:m.status.toUpperCase()})]},`${m.name}-${v}`)})]})]}),fx=({presetId:l,preset:r,isBuiltIn:o,onEdit:c,onDelete:f,onReset:m})=>{var x,b,T;const v=r.envVars?Object.keys(r.envVars).length:0,N=(l.startsWith("glm-")||((x=r.model)==null?void 0:x.startsWith("glm-")))&&!((T=(b=r.envVars)==null?void 0:b.ANTHROPIC_API_KEY)!=null&&T.trim());return s.jsxs("div",{className:"flex flex-col p-4 rounded-lg border border-slate-800 bg-slate-950/40 hover:border-slate-700 transition-colors",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2 mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:r.name}),o&&s.jsx(Lr,{variant:"info",className:"text-[10px]",children:"Built-in"}),N&&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(ou,{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:c,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(ro,{className:"h-4 w-4"})}),o?m&&s.jsx("button",{type:"button",onClick:m,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(Yx,{className:"h-4 w-4"})}):f&&s.jsx("button",{type:"button",onClick:f,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($r,{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(Lr,{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: ",l]}),v>0&&s.jsxs("span",{className:"text-xs text-slate-500",children:[v," env var",v!==1?"s":""]})]})]})},$f={0:"Su",1:"Mo",2:"Tu",3:"We",4:"Th",5:"Fr",6:"Sa"},Pf={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics",planner:"Planner","pr-resolver":"PR Resolver",merger:"Merger"},Of={label:"",presetId:"",days:[1,2,3,4,5],startTime:"23:00",endTime:"04:00",jobTypes:null,enabled:!0},hx=({override:l,onChange:r,onSave:o,onCancel:c,isNew:f,presetOptions:m})=>{const v=C=>{const M=l.days.includes(C)?l.days.filter(A=>A!==C):[...l.days,C].sort((A,I)=>A-I);r({...l,days:M})},S=()=>{r({...l,days:[1,2,3,4,5]})},N=()=>{r({...l,days:[0,6]})},x=()=>{r({...l,days:[0,1,2,3,4,5,6]})},b=()=>{r({...l,jobTypes:null})},T=C=>{const M=l.jobTypes??[],A=M.includes(C)?M.filter(I=>I!==C):[...M,C];r({...l,jobTypes:A.length===0?null:A})},j=l.jobTypes===null||l.jobTypes===void 0,D=l.label.trim().length>0&&l.presetId.trim().length>0&&l.days.length>0&&l.startTime.trim().length>0&&l.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(ke,{label:"Label",value:l.label,onChange:C=>r({...l,label:C.target.value}),placeholder:"e.g., Night Hours",required:!0}),s.jsx(Qt,{label:"Provider",value:l.presetId,onChange:C=>r({...l,presetId:C}),options:m})]}),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($f).map(C=>s.jsx("button",{type:"button",onClick:()=>v(C),className:`w-10 h-10 rounded-md text-sm font-medium transition-colors ${l.days.includes(C)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:$f[C]},C)),s.jsxs("div",{className:"flex gap-1 ml-2",children:[s.jsx("button",{type:"button",onClick:S,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:N,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:l.startTime,onChange:C=>r({...l,startTime:C.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:l.endTime,onChange:C=>r({...l,endTime:C.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:b,className:"text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:j?"All Jobs Selected":"Select All Jobs"})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Object.keys(Pf).filter(C=>C!=="planner").map(C=>{var A;const M=j||(((A=l.jobTypes)==null?void 0:A.includes(C))??!1);return s.jsx("button",{type:"button",onClick:()=>T(C),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${M?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,disabled:j,children:Pf[C]},C)})}),j&&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(Gt,{checked:l.enabled,onChange:C=>r({...l,enabled:C}),label:"Enabled"})}),s.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[s.jsx(Ve,{variant:"ghost",onClick:c,children:"Cancel"}),s.jsx(Ve,{onClick:o,disabled:!D,children:f?"Add Override":"Save Changes"})]})]})},ej=({overrides:l,onChange:r,presetOptions:o})=>{const[c,f]=ze.useState(null),[m,v]=ze.useState(!1),[S,N]=ze.useState(Of),x=()=>{r([...l,S]),N({...Of}),v(!1)},b=(A,I)=>{const B=[...l];B[A]=I,r(B)},T=A=>{window.confirm("Are you sure you want to delete this schedule override?")&&r(l.filter((I,B)=>B!==A))},j=A=>{const I=[...l];I[A]={...I[A],enabled:!I[A].enabled},r(I)},D=A=>A.length===7?"Every day":A.length===5&&A.every(I=>I>=1&&I<=5)?"Weekdays":A.length===2&&A.includes(0)&&A.includes(6)?"Weekends":A.map(I=>$f[I]).join(", "),C=A=>!A||A.length===0?"All Jobs":A.map(I=>Pf[I]).join(", "),M=A=>{const I=o.find(B=>B.value===A);return(I==null?void 0:I.label)||A};return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"space-y-3",children:l.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No schedule overrides configured."}):l.map((A,I)=>s.jsx("div",{children:c===I?s.jsx(hx,{override:A,onChange:B=>b(I,B),onSave:()=>f(null),onCancel:()=>f(null),presetOptions:o}):s.jsxs("div",{className:`flex items-start justify-between p-4 rounded-md border bg-slate-950/40 ${A.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(Gt,{checked:A.enabled,onChange:()=>j(I)}),s.jsx("span",{className:"text-slate-100 font-medium",children:A.label})]}),s.jsxs("div",{className:"text-sm text-slate-400 ml-11",children:[s.jsx("span",{className:"text-indigo-400",children:M(A.presetId)})," · ",D(A.days)," · ",A.startTime," - ",A.endTime," · ",C(A.jobTypes)]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>f(I),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${A.label}`,title:`Edit ${A.label}`,children:s.jsx(ro,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>T(I),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${A.label}`,title:`Delete ${A.label}`,children:s.jsx($r,{className:"h-4 w-4"})})]})]})},I))}),m?s.jsx(hx,{override:S,onChange:N,onSave:x,onCancel:()=>{v(!1),N({...Of})},isNew:!0,presetOptions:o}):s.jsxs(Ve,{variant:"ghost",onClick:()=>v(!0),children:[s.jsx(Il,{className:"h-4 w-4 mr-2"}),"Add Schedule Override"]})]})},ao=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],tj={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"}}},aj=({form:l,updateField:r,jobProvidersChangedRef:o,getAllPresets:c,getPresetOptions:f,handleEditPreset:m,handleDeletePreset:v,handleResetPreset:S,handleAddPreset:N})=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs($e,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Provider Presets"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure AI provider presets with custom commands, models, and environment variables"})]}),s.jsxs(Ve,{onClick:N,children:[s.jsx(Il,{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:[ao.map(x=>{const T=c()[x];return T?s.jsx(fx,{presetId:x,preset:T,isBuiltIn:!0,onEdit:()=>m(x),onReset:()=>S(x)},x):null}),Object.entries(l.providerPresets).filter(([x])=>!ao.includes(x)).map(([x,b])=>s.jsx(fx,{presetId:x,preset:b,isBuiltIn:!1,onEdit:()=>m(x),onDelete:()=>v(x)},x))]})]}),s.jsxs($e,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Job Assignments"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Assign provider presets to specific job types. Jobs without an assignment use the global provider."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-indigo-500/30 bg-indigo-500/5 gap-4",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Global Provider"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Default preset for all jobs without a specific assignment"})]}),s.jsx("div",{className:"w-64",children:s.jsx(Qt,{value:l.provider,onChange:x=>r("provider",x),options:f(l.providerPresets)})})]}),[{key:"executor",label:"Executor"},{key:"reviewer",label:"Reviewer"},{key:"qa",label:"QA"},{key:"audit",label:"Audit"},{key:"slicer",label:"Planner"},{key:"analytics",label:"Analytics"},{key:"pr-resolver",label:"PR Resolver"},{key:"merger",label:"Merger"}].map(({key:x,label:b})=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 gap-4",children:[s.jsx("span",{className:"text-sm font-medium text-slate-200 whitespace-nowrap",children:b}),s.jsx("div",{className:"w-64",children:s.jsx(Qt,{value:l.jobProviders[x]??"",onChange:T=>{const j={...l.jobProviders};T===""?delete j[x]:j[x]=T,o.current=!0,r("jobProviders",j)},options:[{label:"Use Global (default)",value:""},...f(l.providerPresets)]})})]},x))]})]}),s.jsxs($e,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Rate Limit Fallback"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Preset to use when the active provider is rate-limited"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Qt,{label:"Primary Fallback Preset",value:l.primaryFallbackPreset,onChange:x=>r("primaryFallbackPreset",x),options:[{label:"— None —",value:""},...Object.entries(c()).map(([x,b])=>({label:b.name,value:x}))],helperText:"Preset to use as the primary rate-limit fallback"}),s.jsx(Qt,{label:"Secondary Fallback Preset",value:l.secondaryFallbackPreset,onChange:x=>r("secondaryFallbackPreset",x),options:[{label:"— None —",value:""},...Object.entries(c()).map(([x,b])=>({label:b.name,value:x}))],helperText:"Used only if the primary fallback preset is also rate-limited"})]})]}),s.jsxs($e,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Provider Schedule Overrides"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Temporarily switch providers based on day of week and time windows"})]}),s.jsx(ej,{overrides:l.providerScheduleOverrides,onChange:x=>r("providerScheduleOverrides",x),presetOptions:Object.entries(c()).map(([x,b])=>({label:b.name,value:x}))})]}),s.jsxs($e,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Global Provider Environment Variables"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Environment variables passed to all provider CLIs. Preset-level env vars take precedence."}),s.jsx(kp,{envVars:l.providerEnv,onChange:x=>r("providerEnv",x)})]}),s.jsxs($e,{className:"p-6 space-y-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Performance"}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Min Review Score (0-100)"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx("input",{type:"range",min:"0",max:"100",value:l.minReviewScore,onChange:x=>r("minReviewScore",Number(x.target.value)),className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),s.jsx("span",{className:"text-sm font-bold text-slate-200 w-10",children:l.minReviewScore})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:'PRs below this score will be marked as "Needs Work".'})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ke,{label:"Max Runtime (Executor)",type:"number",value:String(l.maxRuntime),onChange:x=>r("maxRuntime",Number(x.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ke,{label:"Max Runtime (Reviewer)",type:"number",value:String(l.reviewerMaxRuntime),onChange:x=>r("reviewerMaxRuntime",Number(x.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ke,{label:"Max Log Size",type:"number",value:String(l.maxLogSize),onChange:x=>r("maxLogSize",Number(x.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),s.jsxs($e,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Retry Settings"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure automatic retry behavior for the PR reviewer when fixes do not fully resolve issues."})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ke,{label:"Max Retry Attempts",type:"number",min:"0",max:"10",value:String(l.reviewerMaxRetries),onChange:x=>{const b=Math.min(10,Math.max(0,Number(x.target.value||0)));r("reviewerMaxRetries",b)},helperText:"Additional fix attempts after initial review. 0 = no retries."}),s.jsx(ke,{label:"Retry Delay (seconds)",type:"number",min:"0",max:"300",value:String(l.reviewerRetryDelay),onChange:x=>{const b=Math.min(300,Math.max(0,Number(x.target.value||0)));r("reviewerRetryDelay",b)},helperText:"Wait time between retry attempts to let CI settle."}),s.jsx(ke,{label:"Max PRs Per Run",type:"number",min:"0",max:"100",value:String(l.reviewerMaxPrsPerRun),onChange:x=>{const b=Math.min(100,Math.max(0,Number(x.target.value||0)));r("reviewerMaxPrsPerRun",b)},helperText:"Hard cap on how many PRs the reviewer processes per run. 0 = unlimited."})]})]})]}),zr=({schedule:l,onManage:r})=>s.jsxs("div",{className:"flex items-start justify-between gap-4 p-4 rounded-xl border border-slate-800 bg-slate-950/50",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Managed in Schedules"}),s.jsx("div",{className:"text-sm font-medium text-slate-200 mt-1",children:Qc(l)}),s.jsx("div",{className:"text-xs font-mono text-slate-500 mt-1",children:l})]}),s.jsx("button",{type:"button",onClick:r,className:"shrink-0 rounded-md border border-indigo-500/30 bg-indigo-500/10 px-3 py-1.5 text-xs font-medium text-indigo-300 transition-colors hover:border-indigo-400/50 hover:bg-indigo-500/15",children:"Manage schedule"})]}),nj=({form:l,updateField:r,handleRoadmapToggle:o,onManageSchedule:c})=>{var f,m;return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{id:"job-section-qa",children:s.jsxs($e,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Quality Assurance"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated UI testing using Playwright"})]}),s.jsx(Gt,{checked:l.qa.enabled,onChange:v=>r("qa",{...l.qa,enabled:v})})]}),l.qa.enabled&&s.jsxs("div",{className:"space-y-6 pt-4 border-t border-slate-800",children:[s.jsx(zr,{schedule:l.qa.schedule,onManage:()=>c("qa")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.qa.maxRuntime),onChange:v=>r("qa",{...l.qa,maxRuntime:Number(v.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for QA tasks (default: 3600 seconds)"}),s.jsx(Qt,{label:"Artifacts",value:l.qa.artifacts,onChange:v=>r("qa",{...l.qa,artifacts:v}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}],helperText:"What artifacts to capture for UI tests"}),s.jsx(ke,{label:"Skip Label",value:l.qa.skipLabel,onChange:v=>r("qa",{...l.qa,skipLabel:v.target.value}),helperText:"GitHub label to skip QA (PRs with this label are excluded)"})]}),s.jsx(iu,{label:"QA Branch Patterns",value:l.qa.branchPatterns,onChange:v=>r("qa",{...l.qa,branchPatterns:v}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA (defaults to top-level branchPatterns if empty)"}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Auto-install Playwright"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Automatically install Playwright browsers if missing during QA run"})]}),s.jsx(Gt,{checked:l.qa.autoInstallPlaywright,onChange:v=>r("qa",{...l.qa,autoInstallPlaywright:v})})]})]})]})}),s.jsx("div",{id:"job-section-audit",children:s.jsxs($e,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Code Audit"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated code quality and security audits"})]}),s.jsx(Gt,{checked:l.audit.enabled,onChange:v=>r("audit",{...l.audit,enabled:v})})]}),l.audit.enabled&&s.jsxs("div",{className:"space-y-6 pt-4 border-t border-slate-800",children:[s.jsx(zr,{schedule:l.audit.schedule,onManage:()=>c("audit")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.audit.maxRuntime),onChange:v=>r("audit",{...l.audit,maxRuntime:Number(v.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for audit tasks (default: 1800 seconds)"}),s.jsx(Qt,{label:"Target Column",value:l.audit.targetColumn,onChange:v=>r("audit",{...l.audit,targetColumn:v}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}],helperText:"Board column for created audit issues"})]})]})]})}),s.jsx("div",{id:"job-section-analytics",children:s.jsxs($e,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Analytics (Amplitude)"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Fetch Amplitude data, analyze with AI, and create board issues"})]}),s.jsx(Gt,{checked:l.analytics.enabled,onChange:v=>r("analytics",{...l.analytics,enabled:v})})]}),l.analytics.enabled&&s.jsxs("div",{className:"space-y-6 pt-4 border-t border-slate-800",children:[s.jsx(zr,{schedule:l.analytics.schedule,onManage:()=>c("analytics")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ke,{label:"Amplitude API Key",value:((f=l.providerEnv)==null?void 0:f.AMPLITUDE_API_KEY)??"",onChange:v=>r("providerEnv",{...l.providerEnv,AMPLITUDE_API_KEY:v.target.value}),placeholder:"Required",helperText:"Your Amplitude project API key"}),s.jsx(ke,{label:"Amplitude Secret Key",type:"password",value:((m=l.providerEnv)==null?void 0:m.AMPLITUDE_SECRET_KEY)??"",onChange:v=>r("providerEnv",{...l.providerEnv,AMPLITUDE_SECRET_KEY:v.target.value}),placeholder:"Required",helperText:"Your Amplitude secret key"}),s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.analytics.maxRuntime),onChange:v=>r("analytics",{...l.analytics,maxRuntime:Number(v.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for analytics job (default: 900 seconds)"}),s.jsx(ke,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(l.analytics.lookbackDays),onChange:v=>r("analytics",{...l.analytics,lookbackDays:Math.max(1,Math.min(90,Number(v.target.value||7)))}),helperText:"Number of days to look back in Amplitude (1-90)"}),s.jsx(Qt,{label:"Target Column",value:l.analytics.targetColumn,onChange:v=>r("analytics",{...l.analytics,targetColumn:v}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}],helperText:"Board column for created issues"}),s.jsxs("div",{className:"md:col-span-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1.5",children:"Analysis Prompt (optional)"}),s.jsx("textarea",{rows:4,value:l.analytics.analysisPrompt??"",onChange:v=>r("analytics",{...l.analytics,analysisPrompt:v.target.value}),placeholder:"Custom prompt for AI analysis. Leave empty to use default.",className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-y"}),s.jsx("p",{className:"mt-1.5 text-xs text-slate-500",children:"Custom prompt for AI analysis. Leave empty to use default."})]})]})]})]})}),s.jsx("div",{id:"job-section-slicer",children:s.jsxs($e,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Planner"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Generate one PRD per run using ROADMAP.md first, then audit findings when roadmap work is exhausted"})]}),s.jsx(Gt,{checked:l.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:o})]}),l.roadmapScanner.enabled&&s.jsxs("div",{className:"space-y-6 pt-4 border-t border-slate-800",children:[s.jsx(zr,{schedule:l.roadmapScanner.slicerSchedule,onManage:()=>c("slicer")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ke,{label:"Roadmap File Path",value:l.roadmapScanner.roadmapPath,onChange:v=>r("roadmapScanner",{...l.roadmapScanner,roadmapPath:v.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(ke,{label:"Planner Max Runtime",type:"number",value:String(l.roadmapScanner.slicerMaxRuntime||""),onChange:v=>r("roadmapScanner",{...l.roadmapScanner,slicerMaxRuntime:Number(v.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for planner tasks"}),s.jsx(Qt,{label:"Planner Priority Mode",value:l.roadmapScanner.priorityMode||"roadmap-first",onChange:v=>r("roadmapScanner",{...l.roadmapScanner,priorityMode:v==="audit-first"?"audit-first":"roadmap-first"}),options:[{label:"Roadmap first (recommended)",value:"roadmap-first"},{label:"Audit first",value:"audit-first"}],helperText:"Choose whether planner consumes roadmap items or audit findings first."}),s.jsx(Qt,{label:"Planner Issue Column",value:l.roadmapScanner.issueColumn||"Ready",onChange:v=>r("roadmapScanner",{...l.roadmapScanner,issueColumn:v==="Draft"?"Draft":"Ready"}),options:[{label:"Ready (default)",value:"Ready"},{label:"Draft",value:"Draft"}],helperText:"Column where planner-created issues are added after PRD generation."})]})]})]})}),s.jsx("div",{id:"job-section-pr-resolver",children:s.jsxs($e,{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:"PR Resolver"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Repo-wide conflict resolver that rebases PRs and can optionally apply review feedback"})]}),s.jsx(Gt,{checked:l.prResolver.enabled,onChange:v=>r("prResolver",{...l.prResolver,enabled:v})})]}),l.prResolver.enabled&&s.jsxs("div",{className:"space-y-6 pt-4 border-t border-slate-800",children:[s.jsx(zr,{schedule:l.prResolver.schedule,onManage:()=>c("pr-resolver")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.prResolver.maxRuntime),onChange:v=>r("prResolver",{...l.prResolver,maxRuntime:Number(v.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for the resolver (default: 3600 seconds)"}),s.jsx(ke,{label:"Per-PR Timeout",type:"number",value:String(l.prResolver.perPrTimeout),onChange:v=>r("prResolver",{...l.prResolver,perPrTimeout:Math.max(0,Number(v.target.value||0))}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum time spent resolving a single PR"}),s.jsx(ke,{label:"Max PRs Per Run",type:"number",min:"0",value:String(l.prResolver.maxPrsPerRun),onChange:v=>r("prResolver",{...l.prResolver,maxPrsPerRun:Math.max(0,Number(v.target.value||0))}),helperText:"Maximum PRs to process per run (0 = unlimited)"}),s.jsx(ke,{label:"Ready Label",value:l.prResolver.readyLabel,onChange:v=>r("prResolver",{...l.prResolver,readyLabel:v.target.value}),helperText:"GitHub label applied when a PR ends conflict-free"})]}),s.jsx(iu,{label:"Branch Patterns",value:l.prResolver.branchPatterns,onChange:v=>r("prResolver",{...l.prResolver,branchPatterns:v}),placeholder:"e.g., feat/, night-watch/",helpText:"Branch patterns to filter PRs (empty = all open PRs)"}),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:"Use the configured provider when git cannot auto-resolve a rebase"})]}),s.jsx(Gt,{checked:l.prResolver.aiConflictResolution,onChange:v=>r("prResolver",{...l.prResolver,aiConflictResolution:v})})]}),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:"Optionally implement open review comments after conflict resolution"})]}),s.jsx(Gt,{checked:l.prResolver.aiReviewResolution,onChange:v=>r("prResolver",{...l.prResolver,aiReviewResolution:v})})]})]})]})]})}),s.jsx("div",{id:"job-section-merger",children:s.jsxs($e,{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:"Merge Orchestrator"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Repo-wide PR merge coordinator — scans, rebases, and merges in FIFO order"})]}),s.jsx(Gt,{checked:l.merger.enabled,onChange:v=>r("merger",{...l.merger,enabled:v})})]}),l.merger.enabled&&s.jsxs("div",{className:"space-y-6 pt-4 border-t border-slate-800",children:[s.jsx(zr,{schedule:l.merger.schedule,onManage:()=>c("merger")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.merger.maxRuntime),onChange:v=>r("merger",{...l.merger,maxRuntime:Number(v.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime (default: 1800 seconds)"}),s.jsx(Qt,{label:"Merge Method",value:l.merger.mergeMethod,onChange:v=>r("merger",{...l.merger,mergeMethod:v}),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}],helperText:"Git merge method for eligible PRs"}),s.jsx(ke,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(l.merger.minReviewScore),onChange:v=>r("merger",{...l.merger,minReviewScore:Math.max(0,Math.min(100,Number(v.target.value||0)))}),helperText:"Minimum review score required (0-100)"}),s.jsx(ke,{label:"Max PRs Per Run",type:"number",min:"0",value:String(l.merger.maxPrsPerRun),onChange:v=>r("merger",{...l.merger,maxPrsPerRun:Math.max(0,Number(v.target.value||0))}),helperText:"Maximum PRs to merge per run (0 = unlimited)"})]}),s.jsx(iu,{label:"Branch Patterns",value:l.merger.branchPatterns,onChange:v=>r("merger",{...l.merger,branchPatterns:v}),placeholder:"e.g., feat/, night-watch/",helpText:"Branch patterns to filter eligible PRs (empty = use top-level patterns)"}),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 before merging"})]}),s.jsx(Gt,{checked:l.merger.rebaseBeforeMerge,onChange:v=>r("merger",{...l.merger,rebaseBeforeMerge:v})})]})]})]})})]})},Yl=({label:l,value:r,onChange:o,helperText:c,placeholder:f="5 */3 * * *"})=>{const m=LS(r),v=m==="__custom__",S=b=>{b!=="__custom__"&&o(b)},N=b=>{o(b.target.value)},x=eo.find(b=>b.value===m);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(Qt,{label:l,value:m,onChange:S,options:eo.map(b=>({label:b.label,value:b.value})),helperText:v?void 0:(x==null?void 0:x.description)||c}),v&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(ke,{label:"Cron Expression",value:r,onChange:N,placeholder:f}),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)"]})]})]})},lj=({form:l,scheduleMode:r,selectedTemplateId:o,onFieldChange:c,onSwitchToTemplate:f,onSwitchToCustom:m,onApplyTemplate:v,allProjectConfigs:S,currentProjectId:N,onEditJob:x})=>s.jsxs($e,{className:"p-6 space-y-6",children:[S&&S.length>0&&s.jsx(Mp,{configs:S,currentProjectId:N,onEditJob:x}),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",children:"Cadence is managed here. Enablement and runtime 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:f,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:m,children:"Custom"})]})]}),r==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:uh.map(b=>{const T=o===b.id;return s.jsxs("button",{type:"button",onClick:()=>v(b),className:`text-left p-4 rounded-lg border transition-colors ${T?"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],["Planner",b.hints.slicer],["PR Resolver",b.hints.prResolver],["Merger",b.hints.merger]].map(([j,D])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:j}),s.jsx("span",{className:"text-xs text-slate-400",children:D})]},j))})]},b.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx("div",{id:"job-schedule-executor",children:s.jsx(Yl,{label:"PRD Execution Schedule",value:l.cronSchedule,onChange:b=>c("cronSchedule",b)})}),s.jsx("div",{id:"job-schedule-reviewer",children:s.jsx(Yl,{label:"PR Review Schedule",value:l.reviewerSchedule,onChange:b=>c("reviewerSchedule",b)})}),s.jsx("div",{id:"job-schedule-qa",children:s.jsx(Yl,{label:"QA Schedule",value:l.qa.schedule,onChange:b=>c("qa",{...l.qa,schedule:b})})}),s.jsx("div",{id:"job-schedule-audit",children:s.jsx(Yl,{label:"Audit Schedule",value:l.audit.schedule,onChange:b=>c("audit",{...l.audit,schedule:b})})}),s.jsx("div",{id:"job-schedule-slicer",children:s.jsx(Yl,{label:"Planner Schedule",value:l.roadmapScanner.slicerSchedule,onChange:b=>c("roadmapScanner",{...l.roadmapScanner,slicerSchedule:b})})}),l.analytics&&s.jsx("div",{id:"job-schedule-analytics",children:s.jsx(Yl,{label:"Analytics Schedule",value:l.analytics.schedule,onChange:b=>c("analytics",{...l.analytics,schedule:b})})}),l.prResolver&&s.jsx("div",{id:"job-schedule-pr-resolver",children:s.jsx(Yl,{label:"PR Resolver Schedule",value:l.prResolver.schedule,onChange:b=>c("prResolver",{...l.prResolver,schedule:b})})}),l.merger&&s.jsx("div",{id:"job-schedule-merger",children:s.jsx(Yl,{label:"Merge Orchestrator Schedule",value:l.merger.schedule,onChange:b=>c("merger",{...l.merger,schedule:b})})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsx(Qt,{label:"Scheduling Priority",value:String(l.schedulingPriority),onChange:b=>c("schedulingPriority",Number(b)),options:[{label:"1 - Lowest",value:"1"},{label:"2 - Low",value:"2"},{label:"3 - Balanced",value:"3"},{label:"4 - High",value:"4"},{label:"5 - Highest",value:"5"}],helperText:"Higher-priority projects get earlier balanced start slots and win queue tie-breakers first."}),s.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/50 p-4",children:s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Global Queue"}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Queue overlapping jobs across projects instead of letting them burst the provider API."})]}),s.jsx(Gt,{checked:l.globalQueueEnabled??!0,onChange:b=>c("globalQueueEnabled",b)})]})}),s.jsx(ke,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(l.cronScheduleOffset),onChange:b=>{const T=Math.min(59,Math.max(0,Number(b.target.value||0)));c("cronScheduleOffset",T)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]}),sj=({form:l,scheduleMode:r,selectedTemplateId:o,onFieldChange:c,onSwitchToTemplate:f,onSwitchToCustom:m,onApplyTemplate:v,allProjectConfigs:S,currentProjectId:N,onEditJob:x})=>s.jsx(lj,{form:l,scheduleMode:r,selectedTemplateId:o,onFieldChange:c,onSwitchToTemplate:f,onSwitchToCustom:m,onApplyTemplate:v,allProjectConfigs:S,currentProjectId:N,onEditJob:x}),rj=({form:l,updateField:r})=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs($e,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Board Provider"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Track PRDs and their status using GitHub Projects or local SQLite"})]}),s.jsx(Gt,{checked:l.boardProvider.enabled,onChange:o=>r("boardProvider",{...l.boardProvider,enabled:o})})]}),l.boardProvider.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(Qt,{label:"Board Provider",value:l.boardProvider.provider,onChange:o=>r("boardProvider",{...l.boardProvider,provider:o}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),l.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(ke,{label:"Project Number",type:"number",value:String(l.boardProvider.projectNumber||""),onChange:o=>r("boardProvider",{...l.boardProvider,projectNumber:o.target.value?Number(o.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(ke,{label:"Repository",value:l.boardProvider.repo||"",onChange:o=>r("boardProvider",{...l.boardProvider,repo:o.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),l.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($e,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(Ap,{notifications:l.notifications,onChange:o=>r("notifications",o)})]})]}),ij=({form:l,updateField:r})=>s.jsxs($e,{className:"p-6 space-y-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Advanced Settings"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Templates, retry policy, and PRD execution priority"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ke,{label:"Templates Directory",value:l.templatesDir,onChange:o=>r("templatesDir",o.target.value),helperText:"Directory for custom template overrides"}),s.jsx(ke,{label:"Max Retries",type:"number",min:"1",value:String(l.maxRetries),onChange:o=>{const c=Math.max(1,Number(o.target.value||1));r("maxRetries",c)},helperText:"Retry attempts for rate-limited API calls"})]}),s.jsx("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:s.jsx(iu,{label:"PRD Priority",value:l.prdPriority,onChange:o=>r("prdPriority",o),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})})]});function uj(l,r,o,c){const{addToast:f}=It(),[m,v]=U.useState(!1),[S,N]=U.useState(null),[x,b]=U.useState(null),[T,j]=U.useState(null),D=U.useCallback(()=>({...tj,...l}),[l]),C=U.useCallback(P=>{const F=D();return Object.entries(F).map(([Z,ne])=>({label:ne.name,value:Z}))},[D]),M=U.useCallback(P=>{const F=[];r===P&&F.push("Global Provider");const Z={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics"};for(const[ne,O]of Object.entries(o))O===P&&F.push(Z[ne]??ne);return F},[r,o]),A=U.useCallback(()=>{N(null),b(null),v(!0)},[]),I=U.useCallback(P=>{const Z=D()[P];Z&&(N(P),b(Z),v(!0))},[D]),B=U.useCallback(async(P,F)=>{const Z=!S,ne={...l,[P]:F};c("providerPresets",ne);try{await sh({providerPresets:{[P]:F}}),f({title:Z?"Preset Added":"Preset Updated",message:Z?`${F.name} has been added. You can now assign it to jobs.`:`${F.name} has been saved.`,type:"success"})}catch(O){f({title:"Save Failed",message:O instanceof Error?O.message:"Failed to save preset",type:"error"}),c("providerPresets",l)}},[S,l,c,f]),J=U.useCallback(P=>{var ne,O;if(ao.includes(P)){f({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const F=M(P);if(F.length>0){j({presetId:P,presetName:((ne=D()[P])==null?void 0:ne.name)??P,references:F});return}const Z={...l};delete Z[P],c("providerPresets",Z),f({title:"Preset Deleted",message:`${((O=D()[P])==null?void 0:O.name)??P} has been removed.`,type:"success"})},[l,c,f,M,D]),K=U.useCallback(P=>{const F={...l};delete F[P],c("providerPresets",F),f({title:"Preset Reset",message:`${P} has been reset to built-in defaults.`,type:"success"})},[l,c,f]),ce=U.useCallback(()=>{if(!T)return;const{presetId:P}=T,F={...l};delete F[P],c("providerPresets",F);const Z={...o};for(const ne of Object.keys(Z))Z[ne]===P&&delete Z[ne];c("jobProviders",Z),r===P&&c("provider","claude"),j(null),f({title:"Preset Deleted",message:`${T.presetName} has been removed and all references cleared.`,type:"success"})},[T,l,o,r,c,f]);return{presetModalOpen:m,setPresetModalOpen:v,editingPresetId:S,editingPreset:x,deleteWarning:T,setDeleteWarning:j,getAllPresets:D,getPresetOptions:C,getPresetReferences:M,handleAddPreset:A,handleEditPreset:I,handleSavePreset:B,handleDeletePreset:J,handleResetPreset:K,handleConfirmDelete:ce}}const cj=["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger"],Rf=l=>({provider:l.provider,providerLabel:l.providerLabel??"",providerPresets:l.providerPresets??{},defaultBranch:l.defaultBranch,prdDir:l.prdDir||"docs/prds",branchPrefix:l.branchPrefix,branchPatterns:l.branchPatterns||[],executorEnabled:l.executorEnabled??!0,reviewerEnabled:l.reviewerEnabled,minReviewScore:l.minReviewScore,maxRuntime:l.maxRuntime,reviewerMaxRuntime:l.reviewerMaxRuntime,maxLogSize:l.maxLogSize,cronSchedule:l.cronSchedule||Rp,reviewerSchedule:l.reviewerSchedule||Dp,scheduleBundleId:l.scheduleBundleId??null,cronScheduleOffset:l.cronScheduleOffset??0,schedulingPriority:l.schedulingPriority??3,maxRetries:l.maxRetries??3,reviewerMaxRetries:l.reviewerMaxRetries??2,reviewerRetryDelay:l.reviewerRetryDelay??30,reviewerMaxPrsPerRun:l.reviewerMaxPrsPerRun??0,providerEnv:l.providerEnv||{},notifications:l.notifications||{webhooks:[]},prdPriority:l.prdPriority||[],roadmapScanner:l.roadmapScanner||Wl(),templatesDir:l.templatesDir||".night-watch/templates",boardProvider:l.boardProvider||{enabled:!0,provider:"github"},jobProviders:l.jobProviders||{},fallbackOnRateLimit:l.fallbackOnRateLimit??!0,primaryFallbackModel:l.primaryFallbackModel??l.claudeModel??"sonnet",secondaryFallbackModel:l.secondaryFallbackModel??l.primaryFallbackModel??l.claudeModel??"sonnet",primaryFallbackPreset:l.primaryFallbackPreset??"",secondaryFallbackPreset:l.secondaryFallbackPreset??"",claudeModel:l.primaryFallbackModel??l.claudeModel??"sonnet",providerScheduleOverrides:l.providerScheduleOverrides??[],qa:l.qa||Vf(),audit:l.audit||Yf(),analytics:l.analytics||to(),prResolver:l.prResolver??Zl(),merger:l.merger??Hr(),queue:l.queue||{enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10},providerBuckets:{}}}),mx=l=>{var o,c;const r=Op(l.scheduleBundleId,l.cronSchedule,l.reviewerSchedule,l.qa.schedule,l.audit.schedule,l.roadmapScanner.slicerSchedule??Wl().slicerSchedule,((o=l.prResolver)==null?void 0:o.schedule)??Zl().schedule,((c=l.merger)==null?void 0:c.schedule)??Hr().schedule);return r?{mode:"template",selectedTemplateId:r.id}:{mode:"custom",selectedTemplateId:""}},oj=()=>{const{addToast:l,projectName:r,selectedProjectId:o,globalModeLoading:c,isGlobalMode:f,removeProjectFromList:m}=It(),[v,S]=ze.useState(!1),[N,x]=ze.useState(!1),[b,T]=ze.useState(!1),[j,D]=ze.useState(null),[C,M]=ze.useState([]),[A,I]=ze.useState(void 0),B=ze.useRef(!1),J=ze.useRef(!1),[K,ce]=ze.useState("template"),[P,F]=ze.useState("always-on"),[Z,ne]=ze.useState("general"),[O,le]=ze.useState(null),{data:k,loading:oe,error:ee,refetch:xe}=mn(lh,[o],{enabled:!c}),{data:Y,loading:ie,refetch:me}=mn(p2,[o],{enabled:!c}),je=Y??[],be=($,he)=>{D(Oe=>Oe&&{...Oe,[$]:he})},_=uj((j==null?void 0:j.providerPresets)??{},(j==null?void 0:j.provider)??"claude",(j==null?void 0:j.jobProviders)??{},be);ze.useEffect(()=>{Zx().then(M).catch(console.error),M2().then($=>I($.webhook)).catch(()=>{})},[o]),ze.useEffect(()=>{const $=new URLSearchParams(location.search),he=$.get("tab"),Oe=$.get("mode");he&&ne({providers:"ai-runtime",runtime:"ai-runtime",roadmap:"jobs",qa:"jobs",audit:"jobs",analytics:"jobs",board:"integrations",notifications:"integrations"}[he]??he),Oe==="custom"?ce("custom"):Oe==="template"&&ce("template");const Ge=$.get("jobType");Ge&&setTimeout(()=>{mt("current",Ge,he==="schedules"?"schedule":he==="jobs"?"job":void 0)},300)},[location.search,k]);const se=ze.useCallback($=>{const he=mx($);ce(he.mode),F(he.selectedTemplateId)},[]);ze.useEffect(()=>{if(k)if(B.current)B.current=!1;else{const $=Rf(k);D($),se($)}},[k,se]),ze.useEffect(()=>{j&&J.current&&(J.current=!1,Xt())},[j==null?void 0:j.jobProviders]),ze.useEffect(()=>{if(O){const $=setTimeout(()=>le(null),2e3);return()=>clearTimeout($)}},[O]);const ge=()=>{if(ce("template"),!j)return;const $=mx(j);$.mode==="template"&&(F($.selectedTemplateId),be("scheduleBundleId",$.selectedTemplateId))},pe=()=>{ce("custom"),be("scheduleBundleId",null),F("")},Me=$=>{setTimeout(()=>{const he=document.getElementById($);he&&(he.scrollIntoView({behavior:"smooth",block:"center"}),le($))},50)},we=$=>{const he=$==="planner"?"slicer":$;ne("jobs"),Me(`job-section-${he}`)},He=$=>{const he=$==="planner"?"slicer":$;K!=="custom"&&pe(),ne("schedules"),Me(`job-schedule-${he}`)},mt=($,he,Oe)=>{if($!==r&&$!=="current"){l({title:"Project Switch Required",message:`To edit ${$}, please switch to that project in the sidebar.`,type:"info"});return}const Ge=he==="planner"?"slicer":he,gt=new Set(["qa","audit","slicer","analytics","pr-resolver","merger"]);if(Oe==="job"){we(Ge);return}if(Oe==="schedule"){He(Ge);return}if(gt.has(Ge)){we(Ge);return}He(Ge)},Pe=$=>{F($.id),D(he=>he&&{...he,cronSchedule:$.schedules.executor,reviewerSchedule:$.schedules.reviewer,scheduleBundleId:$.id,qa:{...he.qa,schedule:$.schedules.qa},audit:{...he.audit,schedule:$.schedules.audit},roadmapScanner:{...he.roadmapScanner,slicerSchedule:$.schedules.slicer},prResolver:{...he.prResolver,schedule:$.schedules.prResolver},merger:{...he.merger,schedule:$.schedules.merger},fallbackOnRateLimit:!0})},Xt=async()=>{var Oe,Ge,gt,St,qt,it,sa,pn,yn;if(!j)return;const $=j.cronSchedule!==(k==null?void 0:k.cronSchedule)||j.reviewerSchedule!==(k==null?void 0:k.reviewerSchedule)||j.cronScheduleOffset!==((k==null?void 0:k.cronScheduleOffset)??0)||j.schedulingPriority!==((k==null?void 0:k.schedulingPriority)??3)||j.executorEnabled!==((k==null?void 0:k.executorEnabled)??!0)||j.reviewerEnabled!==((k==null?void 0:k.reviewerEnabled)??!0)||j.queue.enabled!==(((Oe=k==null?void 0:k.queue)==null?void 0:Oe.enabled)??!0)||j.qa.enabled!==((k==null?void 0:k.qa.enabled)??!0)||j.qa.schedule!==(k==null?void 0:k.qa.schedule)||j.audit.enabled!==((k==null?void 0:k.audit.enabled)??!0)||j.audit.schedule!==(k==null?void 0:k.audit.schedule)||j.analytics.enabled!==(((Ge=k==null?void 0:k.analytics)==null?void 0:Ge.enabled)??!1)||j.analytics.schedule!==(((gt=k==null?void 0:k.analytics)==null?void 0:gt.schedule)??to().schedule)||j.prResolver.enabled!==(((St=k==null?void 0:k.prResolver)==null?void 0:St.enabled)??Zl().enabled)||j.prResolver.schedule!==(((qt=k==null?void 0:k.prResolver)==null?void 0:qt.schedule)??Zl().schedule)||j.merger.enabled!==(((it=k==null?void 0:k.merger)==null?void 0:it.enabled)??!1)||j.merger.schedule!==(((sa=k==null?void 0:k.merger)==null?void 0:sa.schedule)??Hr().schedule)||j.roadmapScanner.enabled!==(((pn=k==null?void 0:k.roadmapScanner)==null?void 0:pn.enabled)??!0)||(j.roadmapScanner.slicerSchedule||Wl().slicerSchedule)!==(((yn=k==null?void 0:k.roadmapScanner)==null?void 0:yn.slicerSchedule)||Wl().slicerSchedule),he={};for(const Bt of cj){const Ma=j.jobProviders[Bt];typeof Ma=="string"&&Ma.trim().length>0?he[Bt]=Ma:k!=null&&k.jobProviders[Bt]&&(he[Bt]=null)}S(!0);try{const Bt=await sh({provider:j.provider,providerLabel:j.providerLabel.trim(),providerPresets:Object.keys(j.providerPresets).length>0?j.providerPresets:void 0,defaultBranch:j.defaultBranch,prdDir:j.prdDir,branchPrefix:j.branchPrefix,branchPatterns:j.branchPatterns,executorEnabled:j.executorEnabled,reviewerEnabled:j.reviewerEnabled,minReviewScore:j.minReviewScore,maxRuntime:j.maxRuntime,reviewerMaxRuntime:j.reviewerMaxRuntime,maxLogSize:j.maxLogSize,cronSchedule:j.cronSchedule,reviewerSchedule:j.reviewerSchedule,scheduleBundleId:K==="template"?j.scheduleBundleId:null,cronScheduleOffset:j.cronScheduleOffset,schedulingPriority:j.schedulingPriority,maxRetries:j.maxRetries,reviewerMaxRetries:j.reviewerMaxRetries,reviewerRetryDelay:j.reviewerRetryDelay,reviewerMaxPrsPerRun:j.reviewerMaxPrsPerRun,providerEnv:j.providerEnv,notifications:j.notifications,prdPriority:j.prdPriority,roadmapScanner:j.roadmapScanner,templatesDir:j.templatesDir,boardProvider:j.boardProvider,jobProviders:he,fallbackOnRateLimit:j.fallbackOnRateLimit,primaryFallbackModel:j.primaryFallbackModel,secondaryFallbackModel:j.secondaryFallbackModel,primaryFallbackPreset:j.primaryFallbackPreset||void 0,secondaryFallbackPreset:j.secondaryFallbackPreset||void 0,claudeModel:j.primaryFallbackModel,providerScheduleOverrides:j.providerScheduleOverrides,qa:j.qa,audit:j.audit,analytics:j.analytics,prResolver:j.prResolver,merger:j.merger,queue:j.queue}),Ma=Rf(Bt);D(Ma),se(Ma);let qa="";if($)try{await zf()}catch(Ye){qa=Ye instanceof Error?Ye.message:"failed to reinstall cron schedules"}l(qa?{title:"Settings Saved (Cron Reinstall Failed)",message:qa,type:"warning"}:{title:"Settings Saved",message:$?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),B.current=!0,xe(),me()}catch(Bt){l({title:"Save Failed",message:Bt instanceof Error?Bt.message:"Failed to save configuration",type:"error"})}finally{S(!1)}},Ha=()=>{if(k){const $=Rf(k);D($),se($),l({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},gn=async $=>{if(!(A!=null&&!window.confirm("Replace existing global channel?")))try{const he=await Og({webhook:$});I(he.webhook)}catch(he){l({title:"Failed to set global channel",message:he instanceof Error?he.message:"Unknown error",type:"error"})}},Ka=async()=>{try{await Og({webhook:null}),I(null)}catch($){l({title:"Failed to unset global channel",message:$ instanceof Error?$.message:"Unknown error",type:"error"})}},ha=async $=>{try{const he=await Jx($);be("roadmapScanner",he.roadmapScanner);let Oe="";try{await zf()}catch(Ge){Oe=Ge instanceof Error?Ge.message:"Failed to reinstall cron schedules"}l(Oe?{title:"Planner Saved (Cron Reinstall Failed)",message:Oe,type:"warning"}:{title:$?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${$?"enabled":"disabled"}.`,type:"success"})}catch(he){l({title:"Toggle Failed",message:he instanceof Error?he.message:"Failed to toggle roadmap scanner",type:"error"})}},ma=async()=>{if(o){T(!0);try{await g2(o),m(o),x(!1),l({title:"Project Removed",message:"Cron jobs uninstalled and all project data removed from the database.",type:"success"})}catch($){l({title:"Remove Failed",message:$ instanceof Error?$.message:"Failed to remove project",type:"error"})}finally{T(!1)}}};if(oe||!j)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(ee)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(nl,{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:ee.message}),s.jsx(Ve,{onClick:()=>xe(),children:"Retry"})]});const xn=[{id:"general",label:"General",content:s.jsx(KS,{form:j,updateField:be,projectName:r,doctorChecks:je,doctorLoading:ie})},{id:"ai-runtime",label:"AI & Runtime",content:s.jsx(aj,{form:j,updateField:be,jobProvidersChangedRef:J,getAllPresets:_.getAllPresets,getPresetOptions:_.getPresetOptions,handleEditPreset:_.handleEditPreset,handleDeletePreset:_.handleDeletePreset,handleResetPreset:_.handleResetPreset,handleAddPreset:_.handleAddPreset})},{id:"jobs",label:"Jobs",content:s.jsx(nj,{form:j,updateField:be,handleRoadmapToggle:ha,onManageSchedule:He})},{id:"schedules",label:"Schedules",content:s.jsx(sj,{form:{cronSchedule:j.cronSchedule,reviewerSchedule:j.reviewerSchedule,qa:j.qa,audit:j.audit,analytics:j.analytics,roadmapScanner:{enabled:j.roadmapScanner.enabled,slicerSchedule:j.roadmapScanner.slicerSchedule||Wl().slicerSchedule},prResolver:j.prResolver,merger:j.merger,scheduleBundleId:j.scheduleBundleId,schedulingPriority:j.schedulingPriority,cronScheduleOffset:j.cronScheduleOffset,globalQueueEnabled:j.queue.enabled},scheduleMode:K,selectedTemplateId:P,onFieldChange:($,he)=>{$==="globalQueueEnabled"?be("queue",{...j.queue,enabled:he}):be($,he)},onSwitchToTemplate:ge,onSwitchToCustom:pe,onApplyTemplate:Pe,allProjectConfigs:C,currentProjectId:o,onEditJob:mt})},{id:"notifications",label:"Notifications",content:s.jsxs($e,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(Ap,{notifications:j.notifications,onChange:$=>be("notifications",$),globalWebhook:A,onSetGlobal:gn,onUnsetGlobal:Ka})]})},{id:"integrations",label:"Integrations",content:s.jsx(rj,{form:j,updateField:be})},{id:"advanced",label:"Advanced",content:s.jsx(ij,{form:j,updateField:be})}];return s.jsxs("div",{className:"max-w-4xl mx-auto pb-10",children:[s.jsx("h2",{className:"text-2xl font-bold text-slate-100 mb-6",children:"Settings"}),s.jsx(ep,{tabs:xn,activeTab:Z,onChange:ne}),s.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[s.jsxs(Ve,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:Ha,children:[s.jsx(Yx,{className:"h-4 w-4 mr-2"}),"Reset"]}),s.jsxs(Ve,{onClick:Xt,loading:v,children:[s.jsx(I1,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),f&&o&&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(Ve,{variant:"secondary",className:"bg-red-600 hover:bg-red-700 text-white",onClick:()=>x(!0),children:[s.jsx($r,{className:"h-4 w-4 mr-2"}),"Remove Project"]})]}),N&&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:()=>!b&&x(!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(ou,{className:"h-6 w-6 text-red-400"}),s.jsxs("h3",{className:"text-lg font-semibold text-slate-100",children:["Remove ",r,"?"]})]}),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(Ve,{variant:"ghost",onClick:()=>x(!1),disabled:b,children:"Cancel"}),s.jsx(Ve,{variant:"secondary",className:"bg-red-600 hover:bg-red-700",onClick:ma,loading:b,children:"Remove"})]})]})]}),s.jsx(JS,{isOpen:_.presetModalOpen,onClose:()=>{_.setPresetModalOpen(!1)},onSave:_.handleSavePreset,presetId:_.editingPresetId,preset:_.editingPreset,isBuiltIn:_.editingPresetId?ao.includes(_.editingPresetId):!1,existingIds:Object.keys(_.getAllPresets())}),_.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:()=>_.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(ou,{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:_.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:_.deleteWarning.references.map($=>s.jsx("li",{children:$},$))}),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(Ve,{variant:"ghost",onClick:()=>_.setDeleteWarning(null),children:"Cancel"}),s.jsx(Ve,{variant:"secondary",onClick:_.handleConfirmDelete,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},dj=()=>(q2(),B2(),s.jsx(Db,{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(z2,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(U2,{}),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(ib,{children:[s.jsx(el,{path:"/",element:s.jsx(Q2,{})}),s.jsx(el,{path:"/prs",element:s.jsx(X2,{})}),s.jsx(el,{path:"/board",element:s.jsx(G2,{})}),s.jsx(el,{path:"/scheduling",element:s.jsx(PS,{})}),s.jsx(el,{path:"/logs",element:s.jsx(I2,{})}),s.jsx(el,{path:"/roadmap",element:s.jsx(J2,{})}),s.jsx(el,{path:"/settings",element:s.jsx(oj,{})}),s.jsx(el,{path:"*",element:s.jsx(sb,{to:"/",replace:!0})})]})})})]}),s.jsx(H2,{})]})})),_p=document.getElementById("root");if(!_p)throw new Error("Could not find root element to mount to");const fj=cv.createRoot(_p);fj.render(s.jsx(ze.StrictMode,{children:s.jsx(dj,{})}));
|