@jonit-dev/night-watch-cli 1.8.10-beta.2 → 1.8.10-beta.4
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.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +957 -1906
- package/dist/cli.js.map +1 -0
- package/dist/commands/analytics.d.ts +14 -0
- package/dist/commands/analytics.d.ts.map +1 -0
- package/dist/commands/analytics.js +69 -0
- package/dist/commands/analytics.js.map +1 -0
- package/dist/commands/audit.d.ts +19 -0
- package/dist/commands/audit.d.ts.map +1 -0
- package/dist/commands/audit.js +144 -0
- package/dist/commands/audit.js.map +1 -0
- package/dist/commands/board.d.ts +9 -0
- package/dist/commands/board.d.ts.map +1 -0
- package/dist/commands/board.js +702 -0
- package/dist/commands/board.js.map +1 -0
- package/dist/commands/cancel.d.ts +46 -0
- package/dist/commands/cancel.d.ts.map +1 -0
- package/dist/commands/cancel.js +239 -0
- package/dist/commands/cancel.js.map +1 -0
- package/dist/commands/cron.d.ts +8 -0
- package/dist/commands/cron.d.ts.map +1 -0
- package/dist/commands/cron.js +134 -0
- package/dist/commands/cron.js.map +1 -0
- package/dist/commands/dashboard/tab-actions.d.ts +10 -0
- package/dist/commands/dashboard/tab-actions.d.ts.map +1 -0
- package/dist/commands/dashboard/tab-actions.js +247 -0
- package/dist/commands/dashboard/tab-actions.js.map +1 -0
- package/dist/commands/dashboard/tab-config.d.ts +21 -0
- package/dist/commands/dashboard/tab-config.d.ts.map +1 -0
- package/dist/commands/dashboard/tab-config.js +873 -0
- package/dist/commands/dashboard/tab-config.js.map +1 -0
- package/dist/commands/dashboard/tab-logs.d.ts +10 -0
- package/dist/commands/dashboard/tab-logs.d.ts.map +1 -0
- package/dist/commands/dashboard/tab-logs.js +202 -0
- package/dist/commands/dashboard/tab-logs.js.map +1 -0
- package/dist/commands/dashboard/tab-schedules.d.ts +21 -0
- package/dist/commands/dashboard/tab-schedules.d.ts.map +1 -0
- package/dist/commands/dashboard/tab-schedules.js +320 -0
- package/dist/commands/dashboard/tab-schedules.js.map +1 -0
- package/dist/commands/dashboard/tab-status.d.ts +32 -0
- package/dist/commands/dashboard/tab-status.d.ts.map +1 -0
- package/dist/commands/dashboard/tab-status.js +424 -0
- package/dist/commands/dashboard/tab-status.js.map +1 -0
- package/dist/commands/dashboard/types.d.ts +42 -0
- package/dist/commands/dashboard/types.d.ts.map +1 -0
- package/dist/commands/dashboard/types.js +5 -0
- package/dist/commands/dashboard/types.js.map +1 -0
- package/dist/commands/dashboard.d.ts +11 -0
- package/dist/commands/dashboard.d.ts.map +1 -0
- package/dist/commands/dashboard.js +242 -0
- package/dist/commands/dashboard.js.map +1 -0
- package/dist/commands/doctor.d.ts +16 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +195 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/history.d.ts +7 -0
- package/dist/commands/history.d.ts.map +1 -0
- package/dist/commands/history.js +49 -0
- package/dist/commands/history.js.map +1 -0
- package/dist/commands/init.d.ts +45 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +777 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/install.d.ts +65 -0
- package/dist/commands/install.d.ts.map +1 -0
- package/dist/commands/install.js +405 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/logs.d.ts +15 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +155 -0
- package/dist/commands/logs.js.map +1 -0
- package/dist/commands/merge.d.ts +26 -0
- package/dist/commands/merge.d.ts.map +1 -0
- package/dist/commands/merge.js +159 -0
- package/dist/commands/merge.js.map +1 -0
- package/dist/commands/notify.d.ts +7 -0
- package/dist/commands/notify.d.ts.map +1 -0
- package/dist/commands/notify.js +43 -0
- package/dist/commands/notify.js.map +1 -0
- package/dist/commands/plan.d.ts +19 -0
- package/dist/commands/plan.d.ts.map +1 -0
- package/dist/commands/plan.js +88 -0
- package/dist/commands/plan.js.map +1 -0
- package/dist/commands/prd-state.d.ts +12 -0
- package/dist/commands/prd-state.d.ts.map +1 -0
- package/dist/commands/prd-state.js +47 -0
- package/dist/commands/prd-state.js.map +1 -0
- package/dist/commands/prd.d.ts +18 -0
- package/dist/commands/prd.d.ts.map +1 -0
- package/dist/commands/prd.js +363 -0
- package/dist/commands/prd.js.map +1 -0
- package/dist/commands/prds.d.ts +13 -0
- package/dist/commands/prds.d.ts.map +1 -0
- package/dist/commands/prds.js +194 -0
- package/dist/commands/prds.js.map +1 -0
- package/dist/commands/prs.d.ts +14 -0
- package/dist/commands/prs.d.ts.map +1 -0
- package/dist/commands/prs.js +104 -0
- package/dist/commands/prs.js.map +1 -0
- package/dist/commands/qa.d.ts +34 -0
- package/dist/commands/qa.d.ts.map +1 -0
- package/dist/commands/qa.js +214 -0
- package/dist/commands/qa.js.map +1 -0
- package/dist/commands/queue.d.ts +8 -0
- package/dist/commands/queue.d.ts.map +1 -0
- package/dist/commands/queue.js +378 -0
- package/dist/commands/queue.js.map +1 -0
- package/dist/commands/resolve.d.ts +26 -0
- package/dist/commands/resolve.d.ts.map +1 -0
- package/dist/commands/resolve.js +186 -0
- package/dist/commands/resolve.js.map +1 -0
- package/dist/commands/retry.d.ts +9 -0
- package/dist/commands/retry.d.ts.map +1 -0
- package/dist/commands/retry.js +71 -0
- package/dist/commands/retry.js.map +1 -0
- package/dist/commands/review.d.ts +82 -0
- package/dist/commands/review.d.ts.map +1 -0
- package/dist/commands/review.js +479 -0
- package/dist/commands/review.js.map +1 -0
- package/dist/commands/run.d.ts +73 -0
- package/dist/commands/run.d.ts.map +1 -0
- package/dist/commands/run.js +509 -0
- package/dist/commands/run.js.map +1 -0
- package/dist/commands/serve.d.ts +19 -0
- package/dist/commands/serve.d.ts.map +1 -0
- package/dist/commands/serve.js +142 -0
- package/dist/commands/serve.js.map +1 -0
- package/dist/commands/shared/env-builder.d.ts +49 -0
- package/dist/commands/shared/env-builder.d.ts.map +1 -0
- package/dist/commands/shared/env-builder.js +150 -0
- package/dist/commands/shared/env-builder.js.map +1 -0
- package/dist/commands/slice.d.ts +35 -0
- package/dist/commands/slice.d.ts.map +1 -0
- package/dist/commands/slice.js +316 -0
- package/dist/commands/slice.js.map +1 -0
- package/dist/commands/state.d.ts +8 -0
- package/dist/commands/state.d.ts.map +1 -0
- package/dist/commands/state.js +54 -0
- package/dist/commands/state.js.map +1 -0
- package/dist/commands/status.d.ts +14 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +297 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/summary.d.ts +14 -0
- package/dist/commands/summary.d.ts.map +1 -0
- package/dist/commands/summary.js +193 -0
- package/dist/commands/summary.js.map +1 -0
- package/dist/commands/uninstall.d.ts +25 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +134 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.d.ts +22 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +90 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/scripts/night-watch-cron.sh +1 -3
- package/dist/scripts/night-watch-helpers.sh +52 -7
- 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-CgXj_KM1.css +1 -0
- package/dist/web/assets/index-Dr4zlyJf.js +406 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/index-BUgI2S1s.js +0 -406
- package/dist/web/assets/index-CkdLFBd7.js +0 -406
- package/dist/web/assets/index-RMfswANB.css +0 -1
|
@@ -1,406 +0,0 @@
|
|
|
1
|
-
var Jp=Object.defineProperty;var J0=l=>{throw TypeError(l)};var Kp=(l,r,d)=>r in l?Jp(l,r,{enumerable:!0,configurable:!0,writable:!0,value:d}):l[r]=d;var K0=(l,r,d)=>Kp(l,typeof r!="symbol"?r+"":r,d),of=(l,r,d)=>r.has(l)||J0("Cannot "+d);var te=(l,r,d)=>(of(l,r,"read from private field"),d?d.call(l):r.get(l)),Ke=(l,r,d)=>r.has(l)?J0("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(l):r.set(l,d),we=(l,r,d,c)=>(of(l,r,"write to private field"),c?c.call(l,d):r.set(l,d),d),Ne=(l,r,d)=>(of(l,r,"access private method"),d);(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 b of m.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&c(b)}).observe(document,{childList:!0,subtree:!0});function d(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=d(f);fetch(f.href,m)}})();function Hf(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}function ev(l){if(Object.prototype.hasOwnProperty.call(l,"__esModule"))return l;var r=l.default;if(typeof r=="function"){var d=function c(){return this instanceof c?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};d.prototype=r.prototype}else d={};return Object.defineProperty(d,"__esModule",{value:!0}),Object.keys(l).forEach(function(c){var f=Object.getOwnPropertyDescriptor(l,c);Object.defineProperty(d,c,f.get?f:{enumerable:!0,get:function(){return l[c]}})}),d}var df={exports:{}},$i={};/**
|
|
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 eg;function tv(){if(eg)return $i;eg=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function d(c,f,m){var b=null;if(m!==void 0&&(b=""+m),f.key!==void 0&&(b=""+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:b,ref:f!==void 0?f:null,props:m}}return $i.Fragment=r,$i.jsx=d,$i.jsxs=d,$i}var tg;function av(){return tg||(tg=1,df.exports=tv()),df.exports}var s=av(),ff={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 ag;function nv(){if(ag)return Le;ag=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),b=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),w=Symbol.iterator;function A(z){return z===null||typeof z!="object"?null:(z=w&&z[w]||z["@@iterator"],typeof z=="function"?z:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,R={};function W(z,le,he){this.props=z,this.context=le,this.refs=R,this.updater=he||O}W.prototype.isReactComponent={},W.prototype.setState=function(z,le){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,le,"setState")},W.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function V(){}V.prototype=W.prototype;function ee(z,le,he){this.props=z,this.context=le,this.refs=R,this.updater=he||O}var J=ee.prototype=new V;J.constructor=ee,C(J,W.prototype),J.isPureReactComponent=!0;var ue=Array.isArray;function $(){}var F={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function M(z,le,he){var me=he.ref;return{$$typeof:l,type:z,key:le,ref:me!==void 0?me:null,props:he}}function _(z,le){return M(z.type,le,z.props)}function ae(z){return typeof z=="object"&&z!==null&&z.$$typeof===l}function Z(z){var le={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(he){return le[he]})}var ce=/\/+/g;function xe(z,le){return typeof z=="object"&&z!==null&&z.key!=null?Z(""+z.key):le.toString(36)}function K(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then($,$):(z.status="pending",z.then(function(le){z.status==="pending"&&(z.status="fulfilled",z.value=le)},function(le){z.status==="pending"&&(z.status="rejected",z.reason=le)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function Y(z,le,he,me,Ee){var de=typeof z;(de==="undefined"||de==="boolean")&&(z=null);var _e=!1;if(z===null)_e=!0;else switch(de){case"bigint":case"string":case"number":_e=!0;break;case"object":switch(z.$$typeof){case l:case r:_e=!0;break;case N:return _e=z._init,Y(_e(z._payload),le,he,me,Ee)}}if(_e)return Ee=Ee(z),_e=me===""?"."+xe(z,0):me,ue(Ee)?(he="",_e!=null&&(he=_e.replace(ce,"$&/")+"/"),Y(Ee,le,he,"",function(la){return la})):Ee!=null&&(ae(Ee)&&(Ee=_(Ee,he+(Ee.key==null||z&&z.key===Ee.key?"":(""+Ee.key).replace(ce,"$&/")+"/")+_e)),le.push(Ee)),1;_e=0;var ct=me===""?".":me+":";if(ue(z))for(var Xe=0;Xe<z.length;Xe++)me=z[Xe],de=ct+xe(me,Xe),_e+=Y(me,le,he,de,Ee);else if(Xe=A(z),typeof Xe=="function")for(z=Xe.call(z),Xe=0;!(me=z.next()).done;)me=me.value,de=ct+xe(me,Xe++),_e+=Y(me,le,he,de,Ee);else if(de==="object"){if(typeof z.then=="function")return Y(K(z),le,he,me,Ee);throw le=String(z),Error("Objects are not valid as a React child (found: "+(le==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":le)+"). If you meant to render a collection of children, use an array instead.")}return _e}function re(z,le,he){if(z==null)return z;var me=[],Ee=0;return Y(z,me,"","",function(de){return le.call(he,de,Ee++)}),me}function ge(z){if(z._status===-1){var le=z._result;le=le(),le.then(function(he){(z._status===0||z._status===-1)&&(z._status=1,z._result=he)},function(he){(z._status===0||z._status===-1)&&(z._status=2,z._result=he)}),z._status===-1&&(z._status=0,z._result=le)}if(z._status===1)return z._result.default;throw z._result}var Se=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var le=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(le))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},ke={map:re,forEach:function(z,le,he){re(z,function(){le.apply(this,arguments)},he)},count:function(z){var le=0;return re(z,function(){le++}),le},toArray:function(z){return re(z,function(le){return le})||[]},only:function(z){if(!ae(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Le.Activity=T,Le.Children=ke,Le.Component=W,Le.Fragment=d,Le.Profiler=f,Le.PureComponent=ee,Le.StrictMode=c,Le.Suspense=v,Le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,Le.__COMPILER_RUNTIME={__proto__:null,c:function(z){return F.H.useMemoCache(z)}},Le.cache=function(z){return function(){return z.apply(null,arguments)}},Le.cacheSignal=function(){return null},Le.cloneElement=function(z,le,he){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var me=C({},z.props),Ee=z.key;if(le!=null)for(de in le.key!==void 0&&(Ee=""+le.key),le)!P.call(le,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&le.ref===void 0||(me[de]=le[de]);var de=arguments.length-2;if(de===1)me.children=he;else if(1<de){for(var _e=Array(de),ct=0;ct<de;ct++)_e[ct]=arguments[ct+2];me.children=_e}return M(z.type,Ee,me)},Le.createContext=function(z){return z={$$typeof:b,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:m,_context:z},z},Le.createElement=function(z,le,he){var me,Ee={},de=null;if(le!=null)for(me in le.key!==void 0&&(de=""+le.key),le)P.call(le,me)&&me!=="key"&&me!=="__self"&&me!=="__source"&&(Ee[me]=le[me]);var _e=arguments.length-2;if(_e===1)Ee.children=he;else if(1<_e){for(var ct=Array(_e),Xe=0;Xe<_e;Xe++)ct[Xe]=arguments[Xe+2];Ee.children=ct}if(z&&z.defaultProps)for(me in _e=z.defaultProps,_e)Ee[me]===void 0&&(Ee[me]=_e[me]);return M(z,de,Ee)},Le.createRef=function(){return{current:null}},Le.forwardRef=function(z){return{$$typeof:S,render:z}},Le.isValidElement=ae,Le.lazy=function(z){return{$$typeof:N,_payload:{_status:-1,_result:z},_init:ge}},Le.memo=function(z,le){return{$$typeof:p,type:z,compare:le===void 0?null:le}},Le.startTransition=function(z){var le=F.T,he={};F.T=he;try{var me=z(),Ee=F.S;Ee!==null&&Ee(he,me),typeof me=="object"&&me!==null&&typeof me.then=="function"&&me.then($,Se)}catch(de){Se(de)}finally{le!==null&&he.types!==null&&(le.types=he.types),F.T=le}},Le.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},Le.use=function(z){return F.H.use(z)},Le.useActionState=function(z,le,he){return F.H.useActionState(z,le,he)},Le.useCallback=function(z,le){return F.H.useCallback(z,le)},Le.useContext=function(z){return F.H.useContext(z)},Le.useDebugValue=function(){},Le.useDeferredValue=function(z,le){return F.H.useDeferredValue(z,le)},Le.useEffect=function(z,le){return F.H.useEffect(z,le)},Le.useEffectEvent=function(z){return F.H.useEffectEvent(z)},Le.useId=function(){return F.H.useId()},Le.useImperativeHandle=function(z,le,he){return F.H.useImperativeHandle(z,le,he)},Le.useInsertionEffect=function(z,le){return F.H.useInsertionEffect(z,le)},Le.useLayoutEffect=function(z,le){return F.H.useLayoutEffect(z,le)},Le.useMemo=function(z,le){return F.H.useMemo(z,le)},Le.useOptimistic=function(z,le){return F.H.useOptimistic(z,le)},Le.useReducer=function(z,le,he){return F.H.useReducer(z,le,he)},Le.useRef=function(z){return F.H.useRef(z)},Le.useState=function(z){return F.H.useState(z)},Le.useSyncExternalStore=function(z,le,he){return F.H.useSyncExternalStore(z,le,he)},Le.useTransition=function(){return F.H.useTransition()},Le.version="19.2.4",Le}var ng;function qf(){return ng||(ng=1,ff.exports=nv()),ff.exports}var H=qf();const Me=Hf(H);var hf={exports:{}},Pi={},mf={exports:{}},gf={};/**
|
|
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 lg;function lv(){return lg||(lg=1,(function(l){function r(Y,re){var ge=Y.length;Y.push(re);e:for(;0<ge;){var Se=ge-1>>>1,ke=Y[Se];if(0<f(ke,re))Y[Se]=re,Y[ge]=ke,ge=Se;else break e}}function d(Y){return Y.length===0?null:Y[0]}function c(Y){if(Y.length===0)return null;var re=Y[0],ge=Y.pop();if(ge!==re){Y[0]=ge;e:for(var Se=0,ke=Y.length,z=ke>>>1;Se<z;){var le=2*(Se+1)-1,he=Y[le],me=le+1,Ee=Y[me];if(0>f(he,ge))me<ke&&0>f(Ee,he)?(Y[Se]=Ee,Y[me]=ge,Se=me):(Y[Se]=he,Y[le]=ge,Se=le);else if(me<ke&&0>f(Ee,ge))Y[Se]=Ee,Y[me]=ge,Se=me;else break e}}return re}function f(Y,re){var ge=Y.sortIndex-re.sortIndex;return ge!==0?ge:Y.id-re.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 b=Date,S=b.now();l.unstable_now=function(){return b.now()-S}}var v=[],p=[],N=1,T=null,w=3,A=!1,O=!1,C=!1,R=!1,W=typeof setTimeout=="function"?setTimeout:null,V=typeof clearTimeout=="function"?clearTimeout:null,ee=typeof setImmediate<"u"?setImmediate:null;function J(Y){for(var re=d(p);re!==null;){if(re.callback===null)c(p);else if(re.startTime<=Y)c(p),re.sortIndex=re.expirationTime,r(v,re);else break;re=d(p)}}function ue(Y){if(C=!1,J(Y),!O)if(d(v)!==null)O=!0,$||($=!0,Z());else{var re=d(p);re!==null&&K(ue,re.startTime-Y)}}var $=!1,F=-1,P=5,M=-1;function _(){return R?!0:!(l.unstable_now()-M<P)}function ae(){if(R=!1,$){var Y=l.unstable_now();M=Y;var re=!0;try{e:{O=!1,C&&(C=!1,V(F),F=-1),A=!0;var ge=w;try{t:{for(J(Y),T=d(v);T!==null&&!(T.expirationTime>Y&&_());){var Se=T.callback;if(typeof Se=="function"){T.callback=null,w=T.priorityLevel;var ke=Se(T.expirationTime<=Y);if(Y=l.unstable_now(),typeof ke=="function"){T.callback=ke,J(Y),re=!0;break t}T===d(v)&&c(v),J(Y)}else c(v);T=d(v)}if(T!==null)re=!0;else{var z=d(p);z!==null&&K(ue,z.startTime-Y),re=!1}}break e}finally{T=null,w=ge,A=!1}re=void 0}}finally{re?Z():$=!1}}}var Z;if(typeof ee=="function")Z=function(){ee(ae)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,xe=ce.port2;ce.port1.onmessage=ae,Z=function(){xe.postMessage(null)}}else Z=function(){W(ae,0)};function K(Y,re){F=W(function(){Y(l.unstable_now())},re)}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"):P=0<Y?Math.floor(1e3/Y):5},l.unstable_getCurrentPriorityLevel=function(){return w},l.unstable_next=function(Y){switch(w){case 1:case 2:case 3:var re=3;break;default:re=w}var ge=w;w=re;try{return Y()}finally{w=ge}},l.unstable_requestPaint=function(){R=!0},l.unstable_runWithPriority=function(Y,re){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var ge=w;w=Y;try{return re()}finally{w=ge}},l.unstable_scheduleCallback=function(Y,re,ge){var Se=l.unstable_now();switch(typeof ge=="object"&&ge!==null?(ge=ge.delay,ge=typeof ge=="number"&&0<ge?Se+ge:Se):ge=Se,Y){case 1:var ke=-1;break;case 2:ke=250;break;case 5:ke=1073741823;break;case 4:ke=1e4;break;default:ke=5e3}return ke=ge+ke,Y={id:N++,callback:re,priorityLevel:Y,startTime:ge,expirationTime:ke,sortIndex:-1},ge>Se?(Y.sortIndex=ge,r(p,Y),d(v)===null&&Y===d(p)&&(C?(V(F),F=-1):C=!0,K(ue,ge-Se))):(Y.sortIndex=ke,r(v,Y),O||A||(O=!0,$||($=!0,Z()))),Y},l.unstable_shouldYield=_,l.unstable_wrapCallback=function(Y){var re=w;return function(){var ge=w;w=re;try{return Y.apply(this,arguments)}finally{w=ge}}}})(gf)),gf}var sg;function sv(){return sg||(sg=1,mf.exports=lv()),mf.exports}var xf={exports:{}},na={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var rg;function rv(){if(rg)return na;rg=1;var l=qf();function r(v){var p="https://react.dev/errors/"+v;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var N=2;N<arguments.length;N++)p+="&args[]="+encodeURIComponent(arguments[N])}return"Minified React error #"+v+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var c={d:{f:d,r:function(){throw Error(r(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},f=Symbol.for("react.portal");function m(v,p,N){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:T==null?null:""+T,children:v,containerInfo:p,implementation:N}}var b=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function S(v,p){if(v==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return na.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,na.createPortal=function(v,p){var N=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(r(299));return m(v,p,null,N)},na.flushSync=function(v){var p=b.T,N=c.p;try{if(b.T=null,c.p=2,v)return v()}finally{b.T=p,c.p=N,c.d.f()}},na.preconnect=function(v,p){typeof v=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,c.d.C(v,p))},na.prefetchDNS=function(v){typeof v=="string"&&c.d.D(v)},na.preinit=function(v,p){if(typeof v=="string"&&p&&typeof p.as=="string"){var N=p.as,T=S(N,p.crossOrigin),w=typeof p.integrity=="string"?p.integrity:void 0,A=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;N==="style"?c.d.S(v,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:T,integrity:w,fetchPriority:A}):N==="script"&&c.d.X(v,{crossOrigin:T,integrity:w,fetchPriority:A,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},na.preinitModule=function(v,p){if(typeof v=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var N=S(p.as,p.crossOrigin);c.d.M(v,{crossOrigin:N,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&c.d.M(v)},na.preload=function(v,p){if(typeof v=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var N=p.as,T=S(N,p.crossOrigin);c.d.L(v,N,{crossOrigin:T,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},na.preloadModule=function(v,p){if(typeof v=="string")if(p){var N=S(p.as,p.crossOrigin);c.d.m(v,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:N,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else c.d.m(v)},na.requestFormReset=function(v){c.d.r(v)},na.unstable_batchedUpdates=function(v,p){return v(p)},na.useFormState=function(v,p,N){return b.H.useFormState(v,p,N)},na.useFormStatus=function(){return b.H.useHostTransitionStatus()},na.version="19.2.4",na}var ig;function gx(){if(ig)return xf.exports;ig=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}/**
|
|
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 ug;function iv(){if(ug)return Pi;ug=1;var l=sv(),r=qf(),d=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 b(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function 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 v(e){if(m(e)!==e)throw Error(c(188))}function p(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 o=u.alternate;if(o===null){if(n=u.return,n!==null){a=n;continue}break}if(u.child===o.child){for(o=u.child;o;){if(o===a)return v(u),e;if(o===n)return v(u),t;o=o.sibling}throw Error(c(188))}if(a.return!==n.return)a=u,n=o;else{for(var x=!1,E=u.child;E;){if(E===a){x=!0,a=u,n=o;break}if(E===n){x=!0,n=u,a=o;break}E=E.sibling}if(!x){for(E=o.child;E;){if(E===a){x=!0,a=o,n=u;break}if(E===n){x=!0,n=o,a=u;break}E=E.sibling}if(!x)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 N(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=N(e),t!==null)return t;e=e.sibling}return null}var T=Object.assign,w=Symbol.for("react.element"),A=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),V=Symbol.for("react.consumer"),ee=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),_=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function Z(e){return e===null||typeof e!="object"?null:(e=ae&&e[ae]||e["@@iterator"],typeof e=="function"?e:null)}var ce=Symbol.for("react.client.reference");function xe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ce?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case W:return"Profiler";case R:return"StrictMode";case ue:return"Suspense";case $:return"SuspenseList";case M:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case O:return"Portal";case ee:return e.displayName||"Context";case V:return(e._context.displayName||"Context")+".Consumer";case J: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:xe(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return xe(e(t))}catch{}}return null}var K=Array.isArray,Y=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge={pending:!1,data:null,method:null,action:null},Se=[],ke=-1;function z(e){return{current:e}}function le(e){0>ke||(e.current=Se[ke],Se[ke]=null,ke--)}function he(e,t){ke++,Se[ke]=e.current,e.current=t}var me=z(null),Ee=z(null),de=z(null),_e=z(null);function ct(e,t){switch(he(de,t),he(Ee,e),he(me,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?S0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=S0(t),e=N0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}le(me),he(me,e)}function Xe(){le(me),le(Ee),le(de)}function la(e){e.memoizedState!==null&&he(_e,e);var t=me.current,a=N0(t,e.type);t!==a&&(he(Ee,e),he(me,a))}function un(e){Ee.current===e&&(le(me),le(Ee)),_e.current===e&&(le(_e),qi._currentValue=ge)}var Pl,Sn;function Ga(e){if(Pl===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Pl=t&&t[1]||"",Sn=-1<a.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Pl+e+Sn}var Fa=!1;function Gl(e,t){if(!e||Fa)return"";Fa=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(ne){var X=ne}Reflect.construct(e,[],oe)}else{try{oe.call()}catch(ne){X=ne}e.call(oe.prototype)}}else{try{throw Error()}catch(ne){X=ne}(oe=e())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(ne){if(ne&&X&&typeof ne.stack=="string")return[ne.stack,X.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=n.DetermineComponentFrameRoot(),x=o[0],E=o[1];if(x&&E){var k=x.split(`
|
|
44
|
-
`),I=E.split(`
|
|
45
|
-
`);for(u=n=0;n<k.length&&!k[n].includes("DetermineComponentFrameRoot");)n++;for(;u<I.length&&!I[u].includes("DetermineComponentFrameRoot");)u++;if(n===k.length||u===I.length)for(n=k.length-1,u=I.length-1;1<=n&&0<=u&&k[n]!==I[u];)u--;for(;1<=n&&0<=u;n--,u--)if(k[n]!==I[u]){if(n!==1||u!==1)do if(n--,u--,0>u||k[n]!==I[u]){var se=`
|
|
46
|
-
`+k[n].replace(" at new "," at ");return e.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",e.displayName)),se}while(1<=n&&0<=u);break}}}finally{Fa=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ga(a):""}function Fl(e,t){switch(e.tag){case 26:case 27:case 5:return Ga(e.type);case 16:return Ga("Lazy");case 13:return e.child!==t&&t!==null?Ga("Suspense Fallback"):Ga("Suspense");case 19:return Ga("SuspenseList");case 0:case 15:return Gl(e.type,!1);case 11:return Gl(e.type.render,!1);case 1:return Gl(e.type,!0);case 31:return Ga("Activity");default:return""}}function Zl(e){try{var t="",a=null;do t+=Fl(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
-
Error generating stack: `+n.message+`
|
|
48
|
-
`+n.stack}}var Nn=Object.prototype.hasOwnProperty,ye=l.unstable_scheduleCallback,De=l.unstable_cancelCallback,Ot=l.unstable_shouldYield,qt=l.unstable_requestPaint,St=l.unstable_now,jn=l.unstable_getCurrentPriorityLevel,Wl=l.unstable_ImmediatePriority,Ql=l.unstable_UserBlockingPriority,wn=l.unstable_NormalPriority,Ys=l.unstable_LowPriority,Jn=l.unstable_IdlePriority,He=l.log,va=l.unstable_setDisableYieldValue,ot=null,zt=null;function Pt(e){if(typeof He=="function"&&va(e),zt&&typeof zt.setStrictMode=="function")try{zt.setStrictMode(ot,e)}catch{}}var Gt=Math.clz32?Math.clz32:so,du=Math.log,lo=Math.LN2;function so(e){return e>>>=0,e===0?32:31-(du(e)/lo|0)|0}var Kn=256,$s=262144,Kt=4194304;function cn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Il(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var u=0,o=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var E=n&134217727;return E!==0?(n=E&~o,n!==0?u=cn(n):(x&=E,x!==0?u=cn(x):a||(a=E&~e,a!==0&&(u=cn(a))))):(E=n&~o,E!==0?u=cn(E):x!==0?u=cn(x):a||(a=n&~e,a!==0&&(u=cn(a)))),u===0?0:t!==0&&t!==u&&(t&o)===0&&(o=u&-u,a=t&-t,o>=a||o===32&&(a&4194048)!==0)?t:u}function el(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function fu(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 Yr(){var e=Kt;return Kt<<=1,(Kt&62914560)===0&&(Kt=4194304),e}function Ps(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function tl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function hu(e,t,a,n,u,o){var x=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var E=e.entanglements,k=e.expirationTimes,I=e.hiddenUpdates;for(a=x&~a;0<a;){var se=31-Gt(a),oe=1<<se;E[se]=0,k[se]=-1;var X=I[se];if(X!==null)for(I[se]=null,se=0;se<X.length;se++){var ne=X[se];ne!==null&&(ne.lane&=-536870913)}a&=~oe}n!==0&&dt(e,n,0),o!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=o&~(x&~t))}function dt(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Gt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function ia(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-Gt(a),u=1<<n;u&t|e[n]&t&&(e[n]|=t),a&=~u}}function $r(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 ea(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Fs(){var e=re.p;return e!==0?e:(e=window.event,e===void 0?32:G0(e.type))}function Pr(e,t){var a=re.p;try{return re.p=e,t()}finally{re.p=a}}var Za=Math.random().toString(36).slice(2),Nt="__reactFiber$"+Za,Ut="__reactProps$"+Za,En="__reactContainer$"+Za,Xl="__reactEvents$"+Za,mu="__reactListeners$"+Za,gu="__reactHandles$"+Za,xu="__reactResources$"+Za,Jl="__reactMarker$"+Za;function Zs(e){delete e[Nt],delete e[Ut],delete e[Xl],delete e[mu],delete e[gu]}function Tn(e){var t=e[Nt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[En]||a[Nt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=O0(e);e!==null;){if(a=e[Nt])return a;e=O0(e)}return t}e=a,a=e.parentNode}return null}function Ce(e){if(e=e[Nt]||e[En]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ua(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function Wa(e){var t=e[xu];return t||(t=e[xu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Rt(e){e[Jl]=!0}var yu=new Set,Gr={};function on(e,t){al(e,t),al(e+"Capture",t)}function al(e,t){for(Gr[e]=t,e=0;e<t.length;e++)yu.add(t[e])}var pu=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]*$"),vu={},Cn={};function Fr(e){return Nn.call(Cn,e)?!0:Nn.call(vu,e)?!1:pu.test(e)?Cn[e]=!0:(vu[e]=!0,!1)}function Ft(e,t,a){if(Fr(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 et(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 jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function dn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Zr(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var u=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(x){a=""+x,o.call(this,x)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(x){a=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Kl(e){if(!e._valueTracker){var t=dn(e)?"checked":"value";e._valueTracker=Zr(e,t,""+e[t])}}function nl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=dn(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Qa(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 Zt(e){return e.replace(Qs,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Is(e,t,a,n,u,o,x,E){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?es(e,x,jt(t)):a!=null?es(e,x,jt(a)):n!=null&&e.removeAttribute("value"),u==null&&o!=null&&(e.defaultChecked=!!o),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+jt(E):e.removeAttribute("name")}function ll(e,t,a,n,u,o,x,E){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||a!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Kl(e);return}a=a!=null?""+jt(a):"",t=t!=null?""+jt(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,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Kl(e)}function es(e,t,a){t==="number"&&Qa(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Mn(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=""+jt(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 ts(e,t,a){if(t!=null&&(t=""+jt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+jt(a):""}function Wr(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(c(92));if(K(n)){if(1<n.length)throw Error(c(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=jt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Kl(e)}function Ia(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var as=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 ns(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||as.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function bu(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&&ns(e,u,n)}else for(var o in t)t.hasOwnProperty(o)&&ns(e,o,t[o])}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 ro=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"]]),Su=/^[\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 ls(e){return Su.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ra(){}var Qr=null;function Js(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var On=null,sl=null;function Nu(e){var t=Ce(e);if(t&&(e=t.stateNode)){var a=e[Ut]||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="'+Zt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var u=n[Ut]||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&&nl(n)}break e;case"textarea":ts(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Mn(e,!!a.multiple,t,!1)}}}var Ir=!1;function Xr(e,t,a){if(Ir)return e(t,a);Ir=!0;try{var n=e(t);return n}finally{if(Ir=!1,(On!==null||sl!==null)&&(xc(),On&&(t=On,e=sl,sl=On=null,Nu(t),e)))for(t=0;t<e.length;t++)Nu(e[t])}}function ss(e,t){var a=e.stateNode;if(a===null)return null;var n=a[Ut]||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 Xa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jr=!1;if(Xa)try{var rs={};Object.defineProperty(rs,"passive",{get:function(){Jr=!0}}),window.addEventListener("test",rs,rs),window.removeEventListener("test",rs,rs)}catch{Jr=!1}var fn=null,Ks=null,er=null;function Lt(){if(er)return er;var e,t=Ks,a=t.length,n,u="value"in fn?fn.value:fn.textContent,o=u.length;for(e=0;e<a&&t[e]===u[e];e++);var x=a-e;for(n=1;n<=x&&t[a-n]===u[o-n];n++);return er=u.slice(e,1<n?1-n:void 0)}function is(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ja(){return!0}function Rn(){return!1}function wt(e){function t(a,n,u,o,x){this._reactName=a,this._targetInst=u,this.type=n,this.nativeEvent=o,this.target=x,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(a=e[E],this[E]=a?a(o):o[E]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Ja:Rn,this.isPropagationStopped=Rn,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=Ja)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ja)},persist:function(){},isPersistent:Ja}),t}var hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},us=wt(hn),cs=T({},hn,{view:0,detail:0}),Kr=wt(cs),tr,os,ds,ar=T({},cs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hs,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!==ds&&(ds&&e.type==="mousemove"?(tr=e.screenX-ds.screenX,os=e.screenY-ds.screenY):os=tr=0,ds=e),tr)},movementY:function(e){return"movementY"in e?e.movementY:os}}),ju=wt(ar),io=T({},ar,{dataTransfer:0}),uo=wt(io),co=T({},cs,{relatedTarget:0}),nr=wt(co),oo=T({},hn,{animationName:0,elapsedTime:0,pseudoElement:0}),rl=wt(oo),fo=T({},hn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),il=wt(fo),fs=T({},hn,{data:0}),ul=wt(fs),ho={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mo={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"},go={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xo(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=go[e])?!!t[e]:!1}function hs(){return xo}var yo=T({},cs,{key:function(e){if(e.key){var t=ho[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=is(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?mo[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hs,charCode:function(e){return e.type==="keypress"?is(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?is(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),po=wt(yo),vo=T({},ar,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wu=wt(vo),bo=T({},cs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hs}),So=wt(bo),Eu=T({},hn,{propertyName:0,elapsedTime:0,pseudoElement:0}),No=wt(Eu),jo=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}),wo=wt(jo),Eo=T({},hn,{newState:0,oldState:0}),To=wt(Eo),Tu=[9,13,27,32],ei=Xa&&"CompositionEvent"in window,ms=null;Xa&&"documentMode"in document&&(ms=document.documentMode);var Co=Xa&&"TextEvent"in window&&!ms,Cu=Xa&&(!ei||ms&&8<ms&&11>=ms),Mu=" ",Ou=!1;function Ru(e,t){switch(e){case"keyup":return Tu.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Du(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var cl=!1;function Mo(e,t){switch(e){case"compositionend":return Du(t);case"keypress":return t.which!==32?null:(Ou=!0,Mu);case"textInput":return e=t.data,e===Mu&&Ou?null:e;default:return null}}function Oo(e,t){if(cl)return e==="compositionend"||!ei&&Ru(e,t)?(e=Lt(),er=Ks=fn=null,cl=!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 Cu&&t.locale!=="ko"?null:t.data;default:return null}}var Ro={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 Au(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ro[e.type]:t==="textarea"}function ti(e,t,a,n){On?sl?sl.push(n):sl=[n]:On=n,t=jc(t,"onChange"),0<t.length&&(a=new us("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var ol=null,gs=null;function ca(e){g0(e,0)}function Ka(e){var t=ua(e);if(nl(t))return e}function _u(e,t){if(e==="change")return t}var mn=!1;if(Xa){var ai;if(Xa){var ba="oninput"in document;if(!ba){var ni=document.createElement("div");ni.setAttribute("oninput","return;"),ba=typeof ni.oninput=="function"}ai=ba}else ai=!1;mn=ai&&(!document.documentMode||9<document.documentMode)}function li(){ol&&(ol.detachEvent("onpropertychange",si),gs=ol=null)}function si(e){if(e.propertyName==="value"&&Ka(gs)){var t=[];ti(t,gs,e,Js(e)),Xr(ca,t)}}function $e(e,t,a){e==="focusin"?(li(),ol=t,gs=a,ol.attachEvent("onpropertychange",si)):e==="focusout"&&li()}function dl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ka(gs)}function Do(e,t){if(e==="click")return Ka(t)}function ft(e,t){if(e==="input"||e==="change")return Ka(t)}function xs(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ta=typeof Object.is=="function"?Object.is:xs;function ys(e,t){if(ta(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var u=a[n];if(!Nn.call(t,u)||!ta(e[u],t[u]))return!1}return!0}function ku(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zu(e,t){var a=ku(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=ku(a)}}function We(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?We(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ao(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Qa(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=Qa(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 Uu=Xa&&"documentMode"in document&&11>=document.documentMode,fl=null,sr=null,Wt=null,rr=!1;function ps(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;rr||fl==null||fl!==Qa(n)||(n=fl,"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}),Wt&&ys(Wt,n)||(Wt=n,n=jc(sr,"onSelect"),0<n.length&&(t=new us("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=fl)))}function Dn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var hl={animationend:Dn("Animation","AnimationEnd"),animationiteration:Dn("Animation","AnimationIteration"),animationstart:Dn("Animation","AnimationStart"),transitionrun:Dn("Transition","TransitionRun"),transitionstart:Dn("Transition","TransitionStart"),transitioncancel:Dn("Transition","TransitionCancel"),transitionend:Dn("Transition","TransitionEnd")},ri={},Lu={};Xa&&(Lu=document.createElement("div").style,"AnimationEvent"in window||(delete hl.animationend.animation,delete hl.animationiteration.animation,delete hl.animationstart.animation),"TransitionEvent"in window||delete hl.transitionend.transition);function An(e){if(ri[e])return ri[e];if(!hl[e])return e;var t=hl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Lu)return ri[e]=t[a];return e}var Hu=An("animationend"),qu=An("animationiteration"),ir=An("animationstart"),_o=An("transitionrun"),ko=An("transitionstart"),Vu=An("transitioncancel"),ii=An("transitionend"),ui=new Map,ci="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(" ");ci.push("scrollEnd");function oa(e,t){ui.set(e,t),on(t,[e])}var ml=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},sa=[],Da=0,vs=0;function gl(){for(var e=Da,t=vs=Da=0;t<e;){var a=sa[t];sa[t++]=null;var n=sa[t];sa[t++]=null;var u=sa[t];sa[t++]=null;var o=sa[t];if(sa[t++]=null,n!==null&&u!==null){var x=n.pending;x===null?u.next=u:(u.next=x.next,x.next=u),n.pending=u}o!==0&&bs(a,u,o)}}function Aa(e,t,a,n){sa[Da++]=e,sa[Da++]=t,sa[Da++]=a,sa[Da++]=n,vs|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function ur(e,t,a,n){return Aa(e,t,a,n),Ss(e)}function _a(e,t){return Aa(e,null,null,t),Ss(e)}function bs(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var u=!1,o=e.return;o!==null;)o.childLanes|=a,n=o.alternate,n!==null&&(n.childLanes|=a),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(u=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,u&&t!==null&&(u=31-Gt(a),e=o.hiddenUpdates,n=e[u],n===null?e[u]=[t]:n.push(t),t.lane=a|536870912),o):null}function Ss(e){if(50<Ai)throw Ai=0,_d=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Sa={};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 Qt(e,t,a,n){return new cr(e,t,a,n)}function or(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ka(e,t){var a=e.alternate;return a===null?(a=Qt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Bu(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,o){var x=0;if(n=e,typeof e=="function")or(e)&&(x=1);else if(typeof e=="string")x=Vp(e,a,me.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case M:return e=Qt(31,a,t,u),e.elementType=M,e.lanes=o,e;case C:return za(a.children,u,o,t);case R:x=8,u|=24;break;case W:return e=Qt(12,a,t,u|2),e.elementType=W,e.lanes=o,e;case ue:return e=Qt(13,a,t,u),e.elementType=ue,e.lanes=o,e;case $:return e=Qt(19,a,t,u),e.elementType=$,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ee:x=10;break e;case V:x=9;break e;case J:x=11;break e;case F:x=14;break e;case P:x=16,n=null;break e}x=29,a=Error(c(130,e===null?"null":typeof e,"")),n=null}return t=Qt(x,a,t,u),t.elementType=e,t.type=n,t.lanes=o,t}function za(e,t,a,n){return e=Qt(7,e,n,t),e.lanes=a,e}function oi(e,t,a){return e=Qt(6,e,null,t),e.lanes=a,e}function Yu(e){var t=Qt(18,null,null,0);return t.stateNode=e,t}function xl(e,t,a){return t=Qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var di=new WeakMap;function da(e,t){if(typeof e=="object"&&e!==null){var a=di.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Zl(t)},di.set(e,t),t)}return{value:e,source:t,stack:Zl(t)}}var _n=[],kn=0,Ns=null,en=0,aa=[],je=0,fa=null,Ua=1,g="";function i(e,t){_n[kn++]=en,_n[kn++]=Ns,Ns=e,en=t}function h(e,t,a){aa[je++]=Ua,aa[je++]=g,aa[je++]=fa,fa=e;var n=Ua;e=g;var u=32-Gt(n)-1;n&=~(1<<u),a+=1;var o=32-Gt(t)+u;if(30<o){var x=u-u%5;o=(n&(1<<x)-1).toString(32),n>>=x,u-=x,Ua=1<<32-Gt(t)+u|a<<u|n,g=o+e}else Ua=1<<o|a<<u|n,g=e}function y(e){e.return!==null&&(i(e,1),h(e,1,0))}function j(e){for(;e===Ns;)Ns=_n[--kn],_n[kn]=null,en=_n[--kn],_n[kn]=null;for(;e===fa;)fa=aa[--je],aa[je]=null,g=aa[--je],aa[je]=null,Ua=aa[--je],aa[je]=null}function D(e,t){aa[je++]=Ua,aa[je++]=g,aa[je++]=fa,Ua=t.id,g=t.overflow,fa=e}var U=null,L=null,B=!1,fe=null,pe=!1,Ue=Error(c(519));function Pe(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw tn(da(t,e)),Ue}function Re(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[Nt]=e,t[Ut]=n,a){case"dialog":Ye("cancel",t),Ye("close",t);break;case"iframe":case"object":case"embed":Ye("load",t);break;case"video":case"audio":for(a=0;a<ki.length;a++)Ye(ki[a],t);break;case"source":Ye("error",t);break;case"img":case"image":case"link":Ye("error",t),Ye("load",t);break;case"details":Ye("toggle",t);break;case"input":Ye("invalid",t),ll(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Ye("invalid",t);break;case"textarea":Ye("invalid",t),Wr(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||v0(t.textContent,a)?(n.popover!=null&&(Ye("beforetoggle",t),Ye("toggle",t)),n.onScroll!=null&&Ye("scroll",t),n.onScrollEnd!=null&&Ye("scrollend",t),n.onClick!=null&&(t.onclick=Ra),t=!0):t=!1,t||Pe(e,!0)}function pt(e){for(U=e.return;U;)switch(U.tag){case 5:case 31:case 13:pe=!1;return;case 27:case 3:pe=!0;return;default:U=U.return}}function Vt(e){if(e!==U)return!1;if(!B)return pt(e),B=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Wd(e.type,e.memoizedProps)),a=!a),a&&L&&Pe(e),pt(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));L=M0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));L=M0(e)}else t===27?(t=L,Ol(e.type)?(e=Kd,Kd=null,L=e):L=t):L=U?Va(e.stateNode.nextSibling):null;return!0}function Bt(){L=U=null,B=!1}function gn(){var e=fe;return e!==null&&(xa===null?xa=e:xa.push.apply(xa,e),fe=null),e}function tn(e){fe===null?fe=[e]:fe.push(e)}var fr=z(null),zn=null,La=null;function xn(e,t,a){he(fr,t._currentValue),t._currentValue=a}function an(e){e._currentValue=fr.current,le(fr)}function fi(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 Un(e,t,a,n){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var o=u.dependencies;if(o!==null){var x=u.child;o=o.firstContext;e:for(;o!==null;){var E=o;o=u;for(var k=0;k<t.length;k++)if(E.context===t[k]){o.lanes|=a,E=o.alternate,E!==null&&(E.lanes|=a),fi(o.return,a,e),n||(x=null);break e}o=E.next}}else if(u.tag===18){if(x=u.return,x===null)throw Error(c(341));x.lanes|=a,o=x.alternate,o!==null&&(o.lanes|=a),fi(x,a,e),x=null}else x=u.child;if(x!==null)x.return=u;else for(x=u;x!==null;){if(x===e){x=null;break}if(u=x.sibling,u!==null){u.return=x.return,x=u;break}x=x.return}u=x}}function Ha(e,t,a,n){e=null;for(var u=t,o=!1;u!==null;){if(!o){if((u.flags&524288)!==0)o=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var x=u.alternate;if(x===null)throw Error(c(387));if(x=x.memoizedProps,x!==null){var E=u.type;ta(u.pendingProps.value,x.value)||(e!==null?e.push(E):e=[E])}}else if(u===_e.current){if(x=u.alternate,x===null)throw Error(c(387));x.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(qi):e=[qi])}u=u.return}e!==null&&Un(t,e,a,n),t.flags|=262144}function hr(e){for(e=e.firstContext;e!==null;){if(!ta(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function js(e){zn=e,La=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function It(e){return lh(zn,e)}function $u(e,t){return zn===null&&js(e),lh(e,t)}function lh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},La===null){if(e===null)throw Error(c(308));La=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else La=La.next=t;return a}var Uy=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()})}},Ly=l.unstable_scheduleCallback,Hy=l.unstable_NormalPriority,Dt={$$typeof:ee,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zo(){return{controller:new Uy,data:new Map,refCount:0}}function hi(e){e.refCount--,e.refCount===0&&Ly(Hy,function(){e.controller.abort()})}var mi=null,Uo=0,mr=0,gr=null;function qy(e,t){if(mi===null){var a=mi=[];Uo=0,mr=qd(),gr={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Uo++,t.then(sh,sh),t}function sh(){if(--Uo===0&&mi!==null){gr!==null&&(gr.status="fulfilled");var e=mi;mi=null,mr=0,gr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Vy(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 rh=Y.S;Y.S=function(e,t){$m=St(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&qy(e,t),rh!==null&&rh(e,t)};var ws=z(null);function Lo(){var e=ws.current;return e!==null?e:ut.pooledCache}function Pu(e,t){t===null?he(ws,ws.current):he(ws,t.pool)}function ih(){var e=Lo();return e===null?null:{parent:Dt._currentValue,pool:e}}var xr=Error(c(460)),Ho=Error(c(474)),Gu=Error(c(542)),Fu={then:function(){}};function uh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ch(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ra,Ra),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,dh(e),e;default:if(typeof t.status=="string")t.then(Ra,Ra);else{if(e=ut,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,dh(e),e}throw Ts=t,xr}}function Es(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ts=a,xr):a}}var Ts=null;function oh(){if(Ts===null)throw Error(c(459));var e=Ts;return Ts=null,e}function dh(e){if(e===xr||e===Gu)throw Error(c(483))}var yr=null,gi=0;function Zu(e){var t=gi;return gi+=1,yr===null&&(yr=[]),ch(yr,e,t)}function xi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Wu(e,t){throw t.$$typeof===w?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function fh(e){function t(G,q){if(e){var Q=G.deletions;Q===null?(G.deletions=[q],G.flags|=16):Q.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=ka(G,q),G.index=0,G.sibling=null,G}function o(G,q,Q){return G.index=Q,e?(Q=G.alternate,Q!==null?(Q=Q.index,Q<q?(G.flags|=67108866,q):Q):(G.flags|=67108866,q)):(G.flags|=1048576,q)}function x(G){return e&&G.alternate===null&&(G.flags|=67108866),G}function E(G,q,Q,ie){return q===null||q.tag!==6?(q=oi(Q,G.mode,ie),q.return=G,q):(q=u(q,Q),q.return=G,q)}function k(G,q,Q,ie){var Te=Q.type;return Te===C?se(G,q,Q.props.children,ie,Q.key):q!==null&&(q.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===P&&Es(Te)===q.type)?(q=u(q,Q.props),xi(q,Q),q.return=G,q):(q=dr(Q.type,Q.key,Q.props,null,G.mode,ie),xi(q,Q),q.return=G,q)}function I(G,q,Q,ie){return q===null||q.tag!==4||q.stateNode.containerInfo!==Q.containerInfo||q.stateNode.implementation!==Q.implementation?(q=xl(Q,G.mode,ie),q.return=G,q):(q=u(q,Q.children||[]),q.return=G,q)}function se(G,q,Q,ie,Te){return q===null||q.tag!==7?(q=za(Q,G.mode,ie,Te),q.return=G,q):(q=u(q,Q),q.return=G,q)}function oe(G,q,Q){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=oi(""+q,G.mode,Q),q.return=G,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case A:return Q=dr(q.type,q.key,q.props,null,G.mode,Q),xi(Q,q),Q.return=G,Q;case O:return q=xl(q,G.mode,Q),q.return=G,q;case P:return q=Es(q),oe(G,q,Q)}if(K(q)||Z(q))return q=za(q,G.mode,Q,null),q.return=G,q;if(typeof q.then=="function")return oe(G,Zu(q),Q);if(q.$$typeof===ee)return oe(G,$u(G,q),Q);Wu(G,q)}return null}function X(G,q,Q,ie){var Te=q!==null?q.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Te!==null?null:E(G,q,""+Q,ie);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case A:return Q.key===Te?k(G,q,Q,ie):null;case O:return Q.key===Te?I(G,q,Q,ie):null;case P:return Q=Es(Q),X(G,q,Q,ie)}if(K(Q)||Z(Q))return Te!==null?null:se(G,q,Q,ie,null);if(typeof Q.then=="function")return X(G,q,Zu(Q),ie);if(Q.$$typeof===ee)return X(G,q,$u(G,Q),ie);Wu(G,Q)}return null}function ne(G,q,Q,ie,Te){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return G=G.get(Q)||null,E(q,G,""+ie,Te);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case A:return G=G.get(ie.key===null?Q:ie.key)||null,k(q,G,ie,Te);case O:return G=G.get(ie.key===null?Q:ie.key)||null,I(q,G,ie,Te);case P:return ie=Es(ie),ne(G,q,Q,ie,Te)}if(K(ie)||Z(ie))return G=G.get(Q)||null,se(q,G,ie,Te,null);if(typeof ie.then=="function")return ne(G,q,Q,Zu(ie),Te);if(ie.$$typeof===ee)return ne(G,q,Q,$u(q,ie),Te);Wu(q,ie)}return null}function ve(G,q,Q,ie){for(var Te=null,Qe=null,be=q,Ve=q=0,Fe=null;be!==null&&Ve<Q.length;Ve++){be.index>Ve?(Fe=be,be=null):Fe=be.sibling;var Ie=X(G,be,Q[Ve],ie);if(Ie===null){be===null&&(be=Fe);break}e&&be&&Ie.alternate===null&&t(G,be),q=o(Ie,q,Ve),Qe===null?Te=Ie:Qe.sibling=Ie,Qe=Ie,be=Fe}if(Ve===Q.length)return a(G,be),B&&i(G,Ve),Te;if(be===null){for(;Ve<Q.length;Ve++)be=oe(G,Q[Ve],ie),be!==null&&(q=o(be,q,Ve),Qe===null?Te=be:Qe.sibling=be,Qe=be);return B&&i(G,Ve),Te}for(be=n(be);Ve<Q.length;Ve++)Fe=ne(be,G,Ve,Q[Ve],ie),Fe!==null&&(e&&Fe.alternate!==null&&be.delete(Fe.key===null?Ve:Fe.key),q=o(Fe,q,Ve),Qe===null?Te=Fe:Qe.sibling=Fe,Qe=Fe);return e&&be.forEach(function(kl){return t(G,kl)}),B&&i(G,Ve),Te}function Ae(G,q,Q,ie){if(Q==null)throw Error(c(151));for(var Te=null,Qe=null,be=q,Ve=q=0,Fe=null,Ie=Q.next();be!==null&&!Ie.done;Ve++,Ie=Q.next()){be.index>Ve?(Fe=be,be=null):Fe=be.sibling;var kl=X(G,be,Ie.value,ie);if(kl===null){be===null&&(be=Fe);break}e&&be&&kl.alternate===null&&t(G,be),q=o(kl,q,Ve),Qe===null?Te=kl:Qe.sibling=kl,Qe=kl,be=Fe}if(Ie.done)return a(G,be),B&&i(G,Ve),Te;if(be===null){for(;!Ie.done;Ve++,Ie=Q.next())Ie=oe(G,Ie.value,ie),Ie!==null&&(q=o(Ie,q,Ve),Qe===null?Te=Ie:Qe.sibling=Ie,Qe=Ie);return B&&i(G,Ve),Te}for(be=n(be);!Ie.done;Ve++,Ie=Q.next())Ie=ne(be,G,Ve,Ie.value,ie),Ie!==null&&(e&&Ie.alternate!==null&&be.delete(Ie.key===null?Ve:Ie.key),q=o(Ie,q,Ve),Qe===null?Te=Ie:Qe.sibling=Ie,Qe=Ie);return e&&be.forEach(function(Xp){return t(G,Xp)}),B&&i(G,Ve),Te}function rt(G,q,Q,ie){if(typeof Q=="object"&&Q!==null&&Q.type===C&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case A:e:{for(var Te=Q.key;q!==null;){if(q.key===Te){if(Te=Q.type,Te===C){if(q.tag===7){a(G,q.sibling),ie=u(q,Q.props.children),ie.return=G,G=ie;break e}}else if(q.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===P&&Es(Te)===q.type){a(G,q.sibling),ie=u(q,Q.props),xi(ie,Q),ie.return=G,G=ie;break e}a(G,q);break}else t(G,q);q=q.sibling}Q.type===C?(ie=za(Q.props.children,G.mode,ie,Q.key),ie.return=G,G=ie):(ie=dr(Q.type,Q.key,Q.props,null,G.mode,ie),xi(ie,Q),ie.return=G,G=ie)}return x(G);case O:e:{for(Te=Q.key;q!==null;){if(q.key===Te)if(q.tag===4&&q.stateNode.containerInfo===Q.containerInfo&&q.stateNode.implementation===Q.implementation){a(G,q.sibling),ie=u(q,Q.children||[]),ie.return=G,G=ie;break e}else{a(G,q);break}else t(G,q);q=q.sibling}ie=xl(Q,G.mode,ie),ie.return=G,G=ie}return x(G);case P:return Q=Es(Q),rt(G,q,Q,ie)}if(K(Q))return ve(G,q,Q,ie);if(Z(Q)){if(Te=Z(Q),typeof Te!="function")throw Error(c(150));return Q=Te.call(Q),Ae(G,q,Q,ie)}if(typeof Q.then=="function")return rt(G,q,Zu(Q),ie);if(Q.$$typeof===ee)return rt(G,q,$u(G,Q),ie);Wu(G,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,q!==null&&q.tag===6?(a(G,q.sibling),ie=u(q,Q),ie.return=G,G=ie):(a(G,q),ie=oi(Q,G.mode,ie),ie.return=G,G=ie),x(G)):a(G,q)}return function(G,q,Q,ie){try{gi=0;var Te=rt(G,q,Q,ie);return yr=null,Te}catch(be){if(be===xr||be===Gu)throw be;var Qe=Qt(29,be,null,G.mode);return Qe.lanes=ie,Qe.return=G,Qe}finally{}}}var Cs=fh(!0),hh=fh(!1),yl=!1;function qo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Vo(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 pl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function vl(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Je&2)!==0){var u=n.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),n.pending=t,t=Ss(e),bs(e,null,a),t}return Aa(e,n,t,a),Ss(e)}function yi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,ia(e,a)}}function Bo(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var u=null,o=null;if(a=a.firstBaseUpdate,a!==null){do{var x={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};o===null?u=o=x:o=o.next=x,a=a.next}while(a!==null);o===null?u=o=t:o=o.next=t}else u=o=t;a={baseState:n.baseState,firstBaseUpdate:u,lastBaseUpdate:o,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 Yo=!1;function pi(){if(Yo){var e=gr;if(e!==null)throw e}}function vi(e,t,a,n){Yo=!1;var u=e.updateQueue;yl=!1;var o=u.firstBaseUpdate,x=u.lastBaseUpdate,E=u.shared.pending;if(E!==null){u.shared.pending=null;var k=E,I=k.next;k.next=null,x===null?o=I:x.next=I,x=k;var se=e.alternate;se!==null&&(se=se.updateQueue,E=se.lastBaseUpdate,E!==x&&(E===null?se.firstBaseUpdate=I:E.next=I,se.lastBaseUpdate=k))}if(o!==null){var oe=u.baseState;x=0,se=I=k=null,E=o;do{var X=E.lane&-536870913,ne=X!==E.lane;if(ne?(Ge&X)===X:(n&X)===X){X!==0&&X===mr&&(Yo=!0),se!==null&&(se=se.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var ve=e,Ae=E;X=t;var rt=a;switch(Ae.tag){case 1:if(ve=Ae.payload,typeof ve=="function"){oe=ve.call(rt,oe,X);break e}oe=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=Ae.payload,X=typeof ve=="function"?ve.call(rt,oe,X):ve,X==null)break e;oe=T({},oe,X);break e;case 2:yl=!0}}X=E.callback,X!==null&&(e.flags|=64,ne&&(e.flags|=8192),ne=u.callbacks,ne===null?u.callbacks=[X]:ne.push(X))}else ne={lane:X,tag:E.tag,payload:E.payload,callback:E.callback,next:null},se===null?(I=se=ne,k=oe):se=se.next=ne,x|=X;if(E=E.next,E===null){if(E=u.shared.pending,E===null)break;ne=E,E=ne.next,ne.next=null,u.lastBaseUpdate=ne,u.shared.pending=null}}while(!0);se===null&&(k=oe),u.baseState=k,u.firstBaseUpdate=I,u.lastBaseUpdate=se,o===null&&(u.shared.lanes=0),wl|=x,e.lanes=x,e.memoizedState=oe}}function mh(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function gh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)mh(a[e],t)}var pr=z(null),Qu=z(0);function xh(e,t){e=Gn,he(Qu,e),he(pr,t),Gn=e|t.baseLanes}function $o(){he(Qu,Gn),he(pr,pr.current)}function Po(){Gn=Qu.current,le(pr),le(Qu)}var Na=z(null),qa=null;function bl(e){var t=e.alternate;he(Et,Et.current&1),he(Na,e),qa===null&&(t===null||pr.current!==null||t.memoizedState!==null)&&(qa=e)}function Go(e){he(Et,Et.current),he(Na,e),qa===null&&(qa=e)}function yh(e){e.tag===22?(he(Et,Et.current),he(Na,e),qa===null&&(qa=e)):Sl()}function Sl(){he(Et,Et.current),he(Na,Na.current)}function ja(e){le(Na),qa===e&&(qa=null),le(Et)}var Et=z(0);function Iu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Xd(a)||Jd(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 Ln=0,qe=null,lt=null,At=null,Xu=!1,vr=!1,Ms=!1,Ju=0,bi=0,br=null,By=0;function vt(){throw Error(c(321))}function Fo(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!ta(e[a],t[a]))return!1;return!0}function Zo(e,t,a,n,u,o){return Ln=o,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Y.H=e===null||e.memoizedState===null?em:ud,Ms=!1,o=a(n,u),Ms=!1,vr&&(o=vh(t,a,n,u)),ph(e),o}function ph(e){Y.H=ji;var t=lt!==null&<.next!==null;if(Ln=0,At=lt=qe=null,Xu=!1,bi=0,br=null,t)throw Error(c(300));e===null||_t||(e=e.dependencies,e!==null&&hr(e)&&(_t=!0))}function vh(e,t,a,n){qe=e;var u=0;do{if(vr&&(br=null),bi=0,vr=!1,25<=u)throw Error(c(301));if(u+=1,At=lt=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}Y.H=tm,o=t(a,n)}while(vr);return o}function Yy(){var e=Y.H,t=e.useState()[0];return t=typeof t.then=="function"?Si(t):t,e=e.useState()[0],(lt!==null?lt.memoizedState:null)!==e&&(qe.flags|=1024),t}function Wo(){var e=Ju!==0;return Ju=0,e}function Qo(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Io(e){if(Xu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Xu=!1}Ln=0,At=lt=qe=null,vr=!1,bi=Ju=0,br=null}function ra(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return At===null?qe.memoizedState=At=e:At=At.next=e,At}function Tt(){if(lt===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=lt.next;var t=At===null?qe.memoizedState:At.next;if(t!==null)At=t,lt=e;else{if(e===null)throw qe.alternate===null?Error(c(467)):Error(c(310));lt=e,e={memoizedState:lt.memoizedState,baseState:lt.baseState,baseQueue:lt.baseQueue,queue:lt.queue,next:null},At===null?qe.memoizedState=At=e:At=At.next=e}return At}function Ku(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Si(e){var t=bi;return bi+=1,br===null&&(br=[]),e=ch(br,e,t),t=qe,(At===null?t.memoizedState:At.next)===null&&(t=t.alternate,Y.H=t===null||t.memoizedState===null?em:ud),e}function ec(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Si(e);if(e.$$typeof===ee)return It(e)}throw Error(c(438,String(e)))}function Xo(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=Ku(),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]=_;return t.index++,a}function Hn(e,t){return typeof t=="function"?t(e):t}function tc(e){var t=Tt();return Jo(t,lt,e)}function Jo(e,t,a){var n=e.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=a;var u=e.baseQueue,o=n.pending;if(o!==null){if(u!==null){var x=u.next;u.next=o.next,o.next=x}t.baseQueue=u=o,n.pending=null}if(o=e.baseState,u===null)e.memoizedState=o;else{t=u.next;var E=x=null,k=null,I=t,se=!1;do{var oe=I.lane&-536870913;if(oe!==I.lane?(Ge&oe)===oe:(Ln&oe)===oe){var X=I.revertLane;if(X===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),oe===mr&&(se=!0);else if((Ln&X)===X){I=I.next,X===mr&&(se=!0);continue}else oe={lane:0,revertLane:I.revertLane,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},k===null?(E=k=oe,x=o):k=k.next=oe,qe.lanes|=X,wl|=X;oe=I.action,Ms&&a(o,oe),o=I.hasEagerState?I.eagerState:a(o,oe)}else X={lane:oe,revertLane:I.revertLane,gesture:I.gesture,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},k===null?(E=k=X,x=o):k=k.next=X,qe.lanes|=oe,wl|=oe;I=I.next}while(I!==null&&I!==t);if(k===null?x=o:k.next=E,!ta(o,e.memoizedState)&&(_t=!0,se&&(a=gr,a!==null)))throw a;e.memoizedState=o,e.baseState=x,e.baseQueue=k,n.lastRenderedState=o}return u===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Ko(e){var t=Tt(),a=t.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=e;var n=a.dispatch,u=a.pending,o=t.memoizedState;if(u!==null){a.pending=null;var x=u=u.next;do o=e(o,x.action),x=x.next;while(x!==u);ta(o,t.memoizedState)||(_t=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),a.lastRenderedState=o}return[o,n]}function bh(e,t,a){var n=qe,u=Tt(),o=B;if(o){if(a===void 0)throw Error(c(407));a=a()}else a=t();var x=!ta((lt||u).memoizedState,a);if(x&&(u.memoizedState=a,_t=!0),u=u.queue,ad(jh.bind(null,n,u,e),[e]),u.getSnapshot!==t||x||At!==null&&At.memoizedState.tag&1){if(n.flags|=2048,Sr(9,{destroy:void 0},Nh.bind(null,n,u,a,t),null),ut===null)throw Error(c(349));o||(Ln&127)!==0||Sh(n,t,a)}return a}function Sh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=qe.updateQueue,t===null?(t=Ku(),qe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Nh(e,t,a,n){t.value=a,t.getSnapshot=n,wh(t)&&Eh(e)}function jh(e,t,a){return a(function(){wh(t)&&Eh(e)})}function wh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!ta(e,a)}catch{return!0}}function Eh(e){var t=_a(e,2);t!==null&&ya(t,e,2)}function ed(e){var t=ra();if(typeof e=="function"){var a=e;if(e=a(),Ms){Pt(!0);try{a()}finally{Pt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hn,lastRenderedState:e},t}function Th(e,t,a,n){return e.baseState=a,Jo(e,lt,typeof n=="function"?n:Hn)}function $y(e,t,a,n,u){if(lc(e))throw Error(c(485));if(e=t.action,e!==null){var o={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){o.listeners.push(x)}};Y.T!==null?a(!0):o.isTransition=!1,n(o),a=t.pending,a===null?(o.next=t.pending=o,Ch(t,o)):(o.next=a.next,t.pending=a.next=o)}}function Ch(e,t){var a=t.action,n=t.payload,u=e.state;if(t.isTransition){var o=Y.T,x={};Y.T=x;try{var E=a(u,n),k=Y.S;k!==null&&k(x,E),Mh(e,t,E)}catch(I){td(e,t,I)}finally{o!==null&&x.types!==null&&(o.types=x.types),Y.T=o}}else try{o=a(u,n),Mh(e,t,o)}catch(I){td(e,t,I)}}function Mh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){Oh(e,t,n)},function(n){return td(e,t,n)}):Oh(e,t,a)}function Oh(e,t,a){t.status="fulfilled",t.value=a,Rh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Ch(e,a)))}function td(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,Rh(t),t=t.next;while(t!==n)}e.action=null}function Rh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Dh(e,t){return t}function Ah(e,t){if(B){var a=ut.formState;if(a!==null){e:{var n=qe;if(B){if(L){t:{for(var u=L,o=pe;u.nodeType!==8;){if(!o){u=null;break t}if(u=Va(u.nextSibling),u===null){u=null;break t}}o=u.data,u=o==="F!"||o==="F"?u:null}if(u){L=Va(u.nextSibling),n=u.data==="F!";break e}}Pe(n)}n=!1}n&&(t=a[0])}}return a=ra(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dh,lastRenderedState:t},a.queue=n,a=Xh.bind(null,qe,n),n.dispatch=a,n=ed(!1),o=id.bind(null,qe,!1,n.queue),n=ra(),u={state:t,dispatch:null,action:e,pending:null},n.queue=u,a=$y.bind(null,qe,u,o,a),u.dispatch=a,n.memoizedState=e,[t,a,!1]}function _h(e){var t=Tt();return kh(t,lt,e)}function kh(e,t,a){if(t=Jo(e,t,Dh)[0],e=tc(Hn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Si(t)}catch(x){throw x===xr?Gu:x}else n=t;t=Tt();var u=t.queue,o=u.dispatch;return a!==t.memoizedState&&(qe.flags|=2048,Sr(9,{destroy:void 0},Py.bind(null,u,a),null)),[n,o,e]}function Py(e,t){e.action=t}function zh(e){var t=Tt(),a=lt;if(a!==null)return kh(t,a,e);Tt(),t=t.memoizedState,a=Tt();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function Sr(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=qe.updateQueue,t===null&&(t=Ku(),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 Uh(){return Tt().memoizedState}function ac(e,t,a,n){var u=ra();qe.flags|=e,u.memoizedState=Sr(1|t,{destroy:void 0},a,n===void 0?null:n)}function nc(e,t,a,n){var u=Tt();n=n===void 0?null:n;var o=u.memoizedState.inst;lt!==null&&n!==null&&Fo(n,lt.memoizedState.deps)?u.memoizedState=Sr(t,o,a,n):(qe.flags|=e,u.memoizedState=Sr(1|t,o,a,n))}function Lh(e,t){ac(8390656,8,e,t)}function ad(e,t){nc(2048,8,e,t)}function Gy(e){qe.flags|=4;var t=qe.updateQueue;if(t===null)t=Ku(),qe.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Hh(e){var t=Tt().memoizedState;return Gy({ref:t,nextImpl:e}),function(){if((Je&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function qh(e,t){return nc(4,2,e,t)}function Vh(e,t){return nc(4,4,e,t)}function Bh(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 Yh(e,t,a){a=a!=null?a.concat([e]):null,nc(4,4,Bh.bind(null,t,e),a)}function nd(){}function $h(e,t){var a=Tt();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Fo(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Ph(e,t){var a=Tt();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Fo(t,n[1]))return n[0];if(n=e(),Ms){Pt(!0);try{e()}finally{Pt(!1)}}return a.memoizedState=[n,t],n}function ld(e,t,a){return a===void 0||(Ln&1073741824)!==0&&(Ge&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Gm(),qe.lanes|=e,wl|=e,a)}function Gh(e,t,a,n){return ta(a,t)?a:pr.current!==null?(e=ld(e,a,n),ta(e,t)||(_t=!0),e):(Ln&42)===0||(Ln&1073741824)!==0&&(Ge&261930)===0?(_t=!0,e.memoizedState=a):(e=Gm(),qe.lanes|=e,wl|=e,t)}function Fh(e,t,a,n,u){var o=re.p;re.p=o!==0&&8>o?o:8;var x=Y.T,E={};Y.T=E,id(e,!1,t,a);try{var k=u(),I=Y.S;if(I!==null&&I(E,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var se=Vy(k,n);Ni(e,t,se,Ta(e))}else Ni(e,t,n,Ta(e))}catch(oe){Ni(e,t,{then:function(){},status:"rejected",reason:oe},Ta())}finally{re.p=o,x!==null&&E.types!==null&&(x.types=E.types),Y.T=x}}function Fy(){}function sd(e,t,a,n){if(e.tag!==5)throw Error(c(476));var u=Zh(e).queue;Fh(e,u,t,ge,a===null?Fy:function(){return Wh(e),a(n)})}function Zh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ge,baseState:ge,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hn,lastRenderedState:ge},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Wh(e){var t=Zh(e);t.next===null&&(t=e.alternate.memoizedState),Ni(e,t.next.queue,{},Ta())}function rd(){return It(qi)}function Qh(){return Tt().memoizedState}function Ih(){return Tt().memoizedState}function Zy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ta();e=pl(a);var n=vl(t,e,a);n!==null&&(ya(n,t,a),yi(n,t,a)),t={cache:zo()},e.payload=t;return}t=t.return}}function Wy(e,t,a){var n=Ta();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},lc(e)?Jh(t,a):(a=ur(e,t,a,n),a!==null&&(ya(a,e,n),Kh(a,t,n)))}function Xh(e,t,a){var n=Ta();Ni(e,t,a,n)}function Ni(e,t,a,n){var u={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(lc(e))Jh(t,u);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var x=t.lastRenderedState,E=o(x,a);if(u.hasEagerState=!0,u.eagerState=E,ta(E,x))return Aa(e,t,u,0),ut===null&&gl(),!1}catch{}finally{}if(a=ur(e,t,u,n),a!==null)return ya(a,e,n),Kh(a,t,n),!0}return!1}function id(e,t,a,n){if(n={lane:2,revertLane:qd(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},lc(e)){if(t)throw Error(c(479))}else t=ur(e,a,n,2),t!==null&&ya(t,e,2)}function lc(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function Jh(e,t){vr=Xu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Kh(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,ia(e,a)}}var ji={readContext:It,use:ec,useCallback:vt,useContext:vt,useEffect:vt,useImperativeHandle:vt,useLayoutEffect:vt,useInsertionEffect:vt,useMemo:vt,useReducer:vt,useRef:vt,useState:vt,useDebugValue:vt,useDeferredValue:vt,useTransition:vt,useSyncExternalStore:vt,useId:vt,useHostTransitionStatus:vt,useFormState:vt,useActionState:vt,useOptimistic:vt,useMemoCache:vt,useCacheRefresh:vt};ji.useEffectEvent=vt;var em={readContext:It,use:ec,useCallback:function(e,t){return ra().memoizedState=[e,t===void 0?null:t],e},useContext:It,useEffect:Lh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ac(4194308,4,Bh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ac(4194308,4,e,t)},useInsertionEffect:function(e,t){ac(4,2,e,t)},useMemo:function(e,t){var a=ra();t=t===void 0?null:t;var n=e();if(Ms){Pt(!0);try{e()}finally{Pt(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=ra();if(a!==void 0){var u=a(t);if(Ms){Pt(!0);try{a(t)}finally{Pt(!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=Wy.bind(null,qe,e),[n.memoizedState,e]},useRef:function(e){var t=ra();return e={current:e},t.memoizedState=e},useState:function(e){e=ed(e);var t=e.queue,a=Xh.bind(null,qe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:nd,useDeferredValue:function(e,t){var a=ra();return ld(a,e,t)},useTransition:function(){var e=ed(!1);return e=Fh.bind(null,qe,e.queue,!0,!1),ra().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=qe,u=ra();if(B){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),ut===null)throw Error(c(349));(Ge&127)!==0||Sh(n,t,a)}u.memoizedState=a;var o={value:a,getSnapshot:t};return u.queue=o,Lh(jh.bind(null,n,o,e),[e]),n.flags|=2048,Sr(9,{destroy:void 0},Nh.bind(null,n,o,a,t),null),a},useId:function(){var e=ra(),t=ut.identifierPrefix;if(B){var a=g,n=Ua;a=(n&~(1<<32-Gt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ju++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=By++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:rd,useFormState:Ah,useActionState:Ah,useOptimistic:function(e){var t=ra();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=id.bind(null,qe,!0,a),a.dispatch=t,[e,t]},useMemoCache:Xo,useCacheRefresh:function(){return ra().memoizedState=Zy.bind(null,qe)},useEffectEvent:function(e){var t=ra(),a={impl:e};return t.memoizedState=a,function(){if((Je&2)!==0)throw Error(c(440));return a.impl.apply(void 0,arguments)}}},ud={readContext:It,use:ec,useCallback:$h,useContext:It,useEffect:ad,useImperativeHandle:Yh,useInsertionEffect:qh,useLayoutEffect:Vh,useMemo:Ph,useReducer:tc,useRef:Uh,useState:function(){return tc(Hn)},useDebugValue:nd,useDeferredValue:function(e,t){var a=Tt();return Gh(a,lt.memoizedState,e,t)},useTransition:function(){var e=tc(Hn)[0],t=Tt().memoizedState;return[typeof e=="boolean"?e:Si(e),t]},useSyncExternalStore:bh,useId:Qh,useHostTransitionStatus:rd,useFormState:_h,useActionState:_h,useOptimistic:function(e,t){var a=Tt();return Th(a,lt,e,t)},useMemoCache:Xo,useCacheRefresh:Ih};ud.useEffectEvent=Hh;var tm={readContext:It,use:ec,useCallback:$h,useContext:It,useEffect:ad,useImperativeHandle:Yh,useInsertionEffect:qh,useLayoutEffect:Vh,useMemo:Ph,useReducer:Ko,useRef:Uh,useState:function(){return Ko(Hn)},useDebugValue:nd,useDeferredValue:function(e,t){var a=Tt();return lt===null?ld(a,e,t):Gh(a,lt.memoizedState,e,t)},useTransition:function(){var e=Ko(Hn)[0],t=Tt().memoizedState;return[typeof e=="boolean"?e:Si(e),t]},useSyncExternalStore:bh,useId:Qh,useHostTransitionStatus:rd,useFormState:zh,useActionState:zh,useOptimistic:function(e,t){var a=Tt();return lt!==null?Th(a,lt,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Xo,useCacheRefresh:Ih};tm.useEffectEvent=Hh;function cd(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 od={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Ta(),u=pl(n);u.payload=t,a!=null&&(u.callback=a),t=vl(e,u,n),t!==null&&(ya(t,e,n),yi(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Ta(),u=pl(n);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=vl(e,u,n),t!==null&&(ya(t,e,n),yi(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ta(),n=pl(a);n.tag=2,t!=null&&(n.callback=t),t=vl(e,n,a),t!==null&&(ya(t,e,a),yi(t,e,a))}};function am(e,t,a,n,u,o,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,x):t.prototype&&t.prototype.isPureReactComponent?!ys(a,n)||!ys(u,o):!0}function nm(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&&od.enqueueReplaceState(t,t.state,null)}function Os(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 lm(e){ml(e)}function sm(e){console.error(e)}function rm(e){ml(e)}function sc(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function im(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 dd(e,t,a){return a=pl(a),a.tag=3,a.payload={element:null},a.callback=function(){sc(e,t)},a}function um(e){return e=pl(e),e.tag=3,e}function cm(e,t,a,n){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var o=n.value;e.payload=function(){return u(o)},e.callback=function(){im(t,a,n)}}var x=a.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){im(t,a,n),typeof u!="function"&&(El===null?El=new Set([this]):El.add(this));var E=n.stack;this.componentDidCatch(n.value,{componentStack:E!==null?E:""})})}function Qy(e,t,a,n,u){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Ha(t,a,u,!0),a=Na.current,a!==null){switch(a.tag){case 31:case 13:return qa===null?yc():a.alternate===null&&bt===0&&(bt=3),a.flags&=-257,a.flags|=65536,a.lanes=u,n===Fu?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Ud(e,n,u)),!1;case 22:return a.flags|=65536,n===Fu?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)),Ud(e,n,u)),!1}throw Error(c(435,a.tag))}return Ud(e,n,u),yc(),!1}if(B)return t=Na.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,n!==Ue&&(e=Error(c(422),{cause:n}),tn(da(e,a)))):(n!==Ue&&(t=Error(c(423),{cause:n}),tn(da(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,n=da(n,a),u=dd(e.stateNode,n,u),Bo(e,u),bt!==4&&(bt=2)),!1;var o=Error(c(520),{cause:n});if(o=da(o,a),Di===null?Di=[o]:Di.push(o),bt!==4&&(bt=2),t===null)return!0;n=da(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=dd(a.stateNode,n,e),Bo(a,e),!1;case 1:if(t=a.type,o=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(El===null||!El.has(o))))return a.flags|=65536,u&=-u,a.lanes|=u,u=um(u),cm(u,e,a,n),Bo(a,u),!1}a=a.return}while(a!==null);return!1}var fd=Error(c(461)),_t=!1;function Xt(e,t,a,n){t.child=e===null?hh(t,null,a,n):Cs(t,e.child,a,n)}function om(e,t,a,n,u){a=a.render;var o=t.ref;if("ref"in n){var x={};for(var E in n)E!=="ref"&&(x[E]=n[E])}else x=n;return js(t),n=Zo(e,t,a,x,o,u),E=Wo(),e!==null&&!_t?(Qo(e,t,u),qn(e,t,u)):(B&&E&&y(t),t.flags|=1,Xt(e,t,n,u),t.child)}function dm(e,t,a,n,u){if(e===null){var o=a.type;return typeof o=="function"&&!or(o)&&o.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=o,fm(e,t,o,n,u)):(e=dr(a.type,null,n,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!bd(e,u)){var x=o.memoizedProps;if(a=a.compare,a=a!==null?a:ys,a(x,n)&&e.ref===t.ref)return qn(e,t,u)}return t.flags|=1,e=ka(o,n),e.ref=t.ref,e.return=t,t.child=e}function fm(e,t,a,n,u){if(e!==null){var o=e.memoizedProps;if(ys(o,n)&&e.ref===t.ref)if(_t=!1,t.pendingProps=n=o,bd(e,u))(e.flags&131072)!==0&&(_t=!0);else return t.lanes=e.lanes,qn(e,t,u)}return hd(e,t,a,n,u)}function hm(e,t,a,n){var u=n.children,o=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(o=o!==null?o.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&~o}else n=0,t.child=null;return mm(e,t,o,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Pu(t,o!==null?o.cachePool:null),o!==null?xh(t,o):$o(),yh(t);else return n=t.lanes=536870912,mm(e,t,o!==null?o.baseLanes|a:a,a,n)}else o!==null?(Pu(t,o.cachePool),xh(t,o),Sl(),t.memoizedState=null):(e!==null&&Pu(t,null),$o(),Sl());return Xt(e,t,u,a),t.child}function wi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mm(e,t,a,n,u){var o=Lo();return o=o===null?null:{parent:Dt._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&Pu(t,null),$o(),yh(t),e!==null&&Ha(e,t,n,!0),t.childLanes=u,null}function rc(e,t){return t=uc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gm(e,t,a){return Cs(t,e.child,null,a),e=rc(t,t.pendingProps),e.flags|=2,ja(t),t.memoizedState=null,e}function Iy(e,t,a){var n=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(B){if(n.mode==="hidden")return e=rc(t,n),t.lanes=536870912,wi(null,e);if(Go(t),(e=L)?(e=C0(e,pe),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:fa!==null?{id:Ua,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Yu(e),a.return=t,t.child=a,U=t,L=null)):e=null,e===null)throw Pe(t);return t.lanes=536870912,null}return rc(t,n)}var o=e.memoizedState;if(o!==null){var x=o.dehydrated;if(Go(t),u)if(t.flags&256)t.flags&=-257,t=gm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(_t||Ha(e,t,a,!1),u=(a&e.childLanes)!==0,_t||u){if(n=ut,n!==null&&(x=$r(n,a),x!==0&&x!==o.retryLane))throw o.retryLane=x,_a(e,x),ya(n,e,x),fd;yc(),t=gm(e,t,a)}else e=o.treeContext,L=Va(x.nextSibling),U=t,B=!0,fe=null,pe=!1,e!==null&&D(t,e),t=rc(t,n),t.flags|=4096;return t}return e=ka(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ic(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 hd(e,t,a,n,u){return js(t),a=Zo(e,t,a,n,void 0,u),n=Wo(),e!==null&&!_t?(Qo(e,t,u),qn(e,t,u)):(B&&n&&y(t),t.flags|=1,Xt(e,t,a,u),t.child)}function xm(e,t,a,n,u,o){return js(t),t.updateQueue=null,a=vh(t,n,a,u),ph(e),n=Wo(),e!==null&&!_t?(Qo(e,t,o),qn(e,t,o)):(B&&n&&y(t),t.flags|=1,Xt(e,t,a,o),t.child)}function ym(e,t,a,n,u){if(js(t),t.stateNode===null){var o=Sa,x=a.contextType;typeof x=="object"&&x!==null&&(o=It(x)),o=new a(n,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=od,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=n,o.state=t.memoizedState,o.refs={},qo(t),x=a.contextType,o.context=typeof x=="object"&&x!==null?It(x):Sa,o.state=t.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(cd(t,a,x,n),o.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(x=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),x!==o.state&&od.enqueueReplaceState(o,o.state,null),vi(t,n,o,u),pi(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){o=t.stateNode;var E=t.memoizedProps,k=Os(a,E);o.props=k;var I=o.context,se=a.contextType;x=Sa,typeof se=="object"&&se!==null&&(x=It(se));var oe=a.getDerivedStateFromProps;se=typeof oe=="function"||typeof o.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,se||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(E||I!==x)&&nm(t,o,n,x),yl=!1;var X=t.memoizedState;o.state=X,vi(t,n,o,u),pi(),I=t.memoizedState,E||X!==I||yl?(typeof oe=="function"&&(cd(t,a,oe,n),I=t.memoizedState),(k=yl||am(t,a,k,n,X,I,x))?(se||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=I),o.props=n,o.state=I,o.context=x,n=k):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,Vo(e,t),x=t.memoizedProps,se=Os(a,x),o.props=se,oe=t.pendingProps,X=o.context,I=a.contextType,k=Sa,typeof I=="object"&&I!==null&&(k=It(I)),E=a.getDerivedStateFromProps,(I=typeof E=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(x!==oe||X!==k)&&nm(t,o,n,k),yl=!1,X=t.memoizedState,o.state=X,vi(t,n,o,u),pi();var ne=t.memoizedState;x!==oe||X!==ne||yl||e!==null&&e.dependencies!==null&&hr(e.dependencies)?(typeof E=="function"&&(cd(t,a,E,n),ne=t.memoizedState),(se=yl||am(t,a,se,n,X,ne,k)||e!==null&&e.dependencies!==null&&hr(e.dependencies))?(I||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,ne,k),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,ne,k)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||x===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=ne),o.props=n,o.state=ne,o.context=k,n=se):(typeof o.componentDidUpdate!="function"||x===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),n=!1)}return o=n,ic(e,t),n=(t.flags&128)!==0,o||n?(o=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&n?(t.child=Cs(t,e.child,null,u),t.child=Cs(t,null,a,u)):Xt(e,t,a,u),t.memoizedState=o.state,e=t.child):e=qn(e,t,u),e}function pm(e,t,a,n){return Bt(),t.flags|=256,Xt(e,t,a,n),t.child}var md={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gd(e){return{baseLanes:e,cachePool:ih()}}function xd(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Ea),e}function vm(e,t,a){var n=t.pendingProps,u=!1,o=(t.flags&128)!==0,x;if((x=o)||(x=e!==null&&e.memoizedState===null?!1:(Et.current&2)!==0),x&&(u=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(B){if(u?bl(t):Sl(),(e=L)?(e=C0(e,pe),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:fa!==null?{id:Ua,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Yu(e),a.return=t,t.child=a,U=t,L=null)):e=null,e===null)throw Pe(t);return Jd(e)?t.lanes=32:t.lanes=536870912,null}var E=n.children;return n=n.fallback,u?(Sl(),u=t.mode,E=uc({mode:"hidden",children:E},u),n=za(n,u,a,null),E.return=t,n.return=t,E.sibling=n,t.child=E,n=t.child,n.memoizedState=gd(a),n.childLanes=xd(e,x,a),t.memoizedState=md,wi(null,n)):(bl(t),yd(t,E))}var k=e.memoizedState;if(k!==null&&(E=k.dehydrated,E!==null)){if(o)t.flags&256?(bl(t),t.flags&=-257,t=pd(e,t,a)):t.memoizedState!==null?(Sl(),t.child=e.child,t.flags|=128,t=null):(Sl(),E=n.fallback,u=t.mode,n=uc({mode:"visible",children:n.children},u),E=za(E,u,a,null),E.flags|=2,n.return=t,E.return=t,n.sibling=E,t.child=n,Cs(t,e.child,null,a),n=t.child,n.memoizedState=gd(a),n.childLanes=xd(e,x,a),t.memoizedState=md,t=wi(null,n));else if(bl(t),Jd(E)){if(x=E.nextSibling&&E.nextSibling.dataset,x)var I=x.dgst;x=I,n=Error(c(419)),n.stack="",n.digest=x,tn({value:n,source:null,stack:null}),t=pd(e,t,a)}else if(_t||Ha(e,t,a,!1),x=(a&e.childLanes)!==0,_t||x){if(x=ut,x!==null&&(n=$r(x,a),n!==0&&n!==k.retryLane))throw k.retryLane=n,_a(e,n),ya(x,e,n),fd;Xd(E)||yc(),t=pd(e,t,a)}else Xd(E)?(t.flags|=192,t.child=e.child,t=null):(e=k.treeContext,L=Va(E.nextSibling),U=t,B=!0,fe=null,pe=!1,e!==null&&D(t,e),t=yd(t,n.children),t.flags|=4096);return t}return u?(Sl(),E=n.fallback,u=t.mode,k=e.child,I=k.sibling,n=ka(k,{mode:"hidden",children:n.children}),n.subtreeFlags=k.subtreeFlags&65011712,I!==null?E=ka(I,E):(E=za(E,u,a,null),E.flags|=2),E.return=t,n.return=t,n.sibling=E,t.child=n,wi(null,n),n=t.child,E=e.child.memoizedState,E===null?E=gd(a):(u=E.cachePool,u!==null?(k=Dt._currentValue,u=u.parent!==k?{parent:k,pool:k}:u):u=ih(),E={baseLanes:E.baseLanes|a,cachePool:u}),n.memoizedState=E,n.childLanes=xd(e,x,a),t.memoizedState=md,wi(e.child,n)):(bl(t),a=e.child,e=a.sibling,a=ka(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=a,t.memoizedState=null,a)}function yd(e,t){return t=uc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function uc(e,t){return e=Qt(22,e,null,t),e.lanes=0,e}function pd(e,t,a){return Cs(t,e.child,null,a),e=yd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bm(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),fi(e.return,t,a)}function vd(e,t,a,n,u,o){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:u,treeForkCount:o}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=n,x.tail=a,x.tailMode=u,x.treeForkCount=o)}function Sm(e,t,a){var n=t.pendingProps,u=n.revealOrder,o=n.tail;n=n.children;var x=Et.current,E=(x&2)!==0;if(E?(x=x&1|2,t.flags|=128):x&=1,he(Et,x),Xt(e,t,n,a),n=B?en:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bm(e,a,t);else if(e.tag===19)bm(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&&Iu(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=t.child,t.child=null):(u=a.sibling,a.sibling=null),vd(t,!1,u,a,o,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&&Iu(e)===null){t.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}vd(t,!0,a,null,o,n);break;case"together":vd(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function qn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),wl|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ha(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=ka(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ka(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function bd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&hr(e)))}function Xy(e,t,a){switch(t.tag){case 3:ct(t,t.stateNode.containerInfo),xn(t,Dt,e.memoizedState.cache),Bt();break;case 27:case 5:la(t);break;case 4:ct(t,t.stateNode.containerInfo);break;case 10:xn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Go(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(bl(t),t.flags|=128,null):(a&t.child.childLanes)!==0?vm(e,t,a):(bl(t),e=qn(e,t,a),e!==null?e.sibling:null);bl(t);break;case 19:var u=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Ha(e,t,a,!1),n=(a&t.childLanes)!==0),u){if(n)return Sm(e,t,a);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),he(Et,Et.current),n)break;return null;case 22:return t.lanes=0,hm(e,t,a,t.pendingProps);case 24:xn(t,Dt,e.memoizedState.cache)}return qn(e,t,a)}function Nm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)_t=!0;else{if(!bd(e,a)&&(t.flags&128)===0)return _t=!1,Xy(e,t,a);_t=(e.flags&131072)!==0}else _t=!1,B&&(t.flags&1048576)!==0&&h(t,en,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Es(t.elementType),t.type=e,typeof e=="function")or(e)?(n=Os(e,n),t.tag=1,t=ym(null,t,e,n,a)):(t.tag=0,t=hd(null,t,e,n,a));else{if(e!=null){var u=e.$$typeof;if(u===J){t.tag=11,t=om(null,t,e,n,a);break e}else if(u===F){t.tag=14,t=dm(null,t,e,n,a);break e}}throw t=xe(e)||e,Error(c(306,t,""))}}return t;case 0:return hd(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,u=Os(n,t.pendingProps),ym(e,t,n,u,a);case 3:e:{if(ct(t,t.stateNode.containerInfo),e===null)throw Error(c(387));n=t.pendingProps;var o=t.memoizedState;u=o.element,Vo(e,t),vi(t,n,null,a);var x=t.memoizedState;if(n=x.cache,xn(t,Dt,n),n!==o.cache&&Un(t,[Dt],a,!0),pi(),n=x.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=pm(e,t,n,a);break e}else if(n!==u){u=da(Error(c(424)),t),tn(u),t=pm(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(L=Va(e.firstChild),U=t,B=!0,fe=null,pe=!0,a=hh(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Bt(),n===u){t=qn(e,t,a);break e}Xt(e,t,n,a)}t=t.child}return t;case 26:return ic(e,t),e===null?(a=_0(t.type,null,t.pendingProps,null))?t.memoizedState=a:B||(a=t.type,e=t.pendingProps,n=wc(de.current).createElement(a),n[Nt]=t,n[Ut]=e,Jt(n,a,e),Rt(n),t.stateNode=n):t.memoizedState=_0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return la(t),e===null&&B&&(n=t.stateNode=R0(t.type,t.pendingProps,de.current),U=t,pe=!0,u=L,Ol(t.type)?(Kd=u,L=Va(n.firstChild)):L=u),Xt(e,t,t.pendingProps.children,a),ic(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&B&&((u=n=L)&&(n=Cp(n,t.type,t.pendingProps,pe),n!==null?(t.stateNode=n,U=t,L=Va(n.firstChild),pe=!1,u=!0):u=!1),u||Pe(t)),la(t),u=t.type,o=t.pendingProps,x=e!==null?e.memoizedProps:null,n=o.children,Wd(u,o)?n=null:x!==null&&Wd(u,x)&&(t.flags|=32),t.memoizedState!==null&&(u=Zo(e,t,Yy,null,null,a),qi._currentValue=u),ic(e,t),Xt(e,t,n,a),t.child;case 6:return e===null&&B&&((e=a=L)&&(a=Mp(a,t.pendingProps,pe),a!==null?(t.stateNode=a,U=t,L=null,e=!0):e=!1),e||Pe(t)),null;case 13:return vm(e,t,a);case 4:return ct(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Cs(t,null,n,a):Xt(e,t,n,a),t.child;case 11:return om(e,t,t.type,t.pendingProps,a);case 7:return Xt(e,t,t.pendingProps,a),t.child;case 8:return Xt(e,t,t.pendingProps.children,a),t.child;case 12:return Xt(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,xn(t,t.type,n.value),Xt(e,t,n.children,a),t.child;case 9:return u=t.type._context,n=t.pendingProps.children,js(t),u=It(u),n=n(u),t.flags|=1,Xt(e,t,n,a),t.child;case 14:return dm(e,t,t.type,t.pendingProps,a);case 15:return fm(e,t,t.type,t.pendingProps,a);case 19:return Sm(e,t,a);case 31:return Iy(e,t,a);case 22:return hm(e,t,a,t.pendingProps);case 24:return js(t),n=It(Dt),e===null?(u=Lo(),u===null&&(u=ut,o=zo(),u.pooledCache=o,o.refCount++,o!==null&&(u.pooledCacheLanes|=a),u=o),t.memoizedState={parent:n,cache:u},qo(t),xn(t,Dt,u)):((e.lanes&a)!==0&&(Vo(e,t),vi(t,null,null,a),pi()),u=e.memoizedState,o=t.memoizedState,u.parent!==n?(u={parent:n,cache:n},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),xn(t,Dt,n)):(n=o.cache,xn(t,Dt,n),n!==u.cache&&Un(t,[Dt],a,!0))),Xt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function Vn(e){e.flags|=4}function Sd(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(Qm())e.flags|=8192;else throw Ts=Fu,Ho}else e.flags&=-16777217}function jm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!H0(t))if(Qm())e.flags|=8192;else throw Ts=Fu,Ho}function cc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Yr():536870912,e.lanes|=t,Er|=t)}function Ei(e,t){if(!B)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 ht(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 Jy(e,t,a){var n=t.pendingProps;switch(j(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(t),null;case 1:return ht(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),an(Dt),Xe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Vt(t)?Vn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,gn())),ht(t),null;case 26:var u=t.type,o=t.memoizedState;return e===null?(Vn(t),o!==null?(ht(t),jm(t,o)):(ht(t),Sd(t,u,null,n,a))):o?o!==e.memoizedState?(Vn(t),ht(t),jm(t,o)):(ht(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Vn(t),ht(t),Sd(t,u,e,n,a)),null;case 27:if(un(t),a=de.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Vn(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return ht(t),null}e=me.current,Vt(t)?Re(t):(e=R0(u,n,a),t.stateNode=e,Vn(t))}return ht(t),null;case 5:if(un(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Vn(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return ht(t),null}if(o=me.current,Vt(t))Re(t);else{var x=wc(de.current);switch(o){case 1:o=x.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:o=x.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":o=x.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":o=x.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":o=x.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof n.is=="string"?x.createElement("select",{is:n.is}):x.createElement("select"),n.multiple?o.multiple=!0:n.size&&(o.size=n.size);break;default:o=typeof n.is=="string"?x.createElement(u,{is:n.is}):x.createElement(u)}}o[Nt]=t,o[Ut]=n;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)o.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=o;e:switch(Jt(o,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&&Vn(t)}}return ht(t),Sd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Vn(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(c(166));if(e=de.current,Vt(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,u=U,u!==null)switch(u.tag){case 27:case 5:n=u.memoizedProps}e[Nt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||v0(e.nodeValue,a)),e||Pe(t,!0)}else e=wc(e).createTextNode(n),e[Nt]=t,t.stateNode=e}return ht(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Vt(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[Nt]=t}else Bt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),e=!1}else a=gn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(ja(t),t):(ja(t),null);if((t.flags&128)!==0)throw Error(c(558))}return ht(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Vt(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[Nt]=t}else Bt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),u=!1}else u=gn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(ja(t),t):(ja(t),null)}return ja(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),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==u&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),cc(t,t.updateQueue),ht(t),null);case 4:return Xe(),e===null&&$d(t.stateNode.containerInfo),ht(t),null;case 10:return an(t.type),ht(t),null;case 19:if(le(Et),n=t.memoizedState,n===null)return ht(t),null;if(u=(t.flags&128)!==0,o=n.rendering,o===null)if(u)Ei(n,!1);else{if(bt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=Iu(e),o!==null){for(t.flags|=128,Ei(n,!1),e=o.updateQueue,t.updateQueue=e,cc(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Bu(a,e),a=a.sibling;return he(Et,Et.current&1|2),B&&i(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&St()>mc&&(t.flags|=128,u=!0,Ei(n,!1),t.lanes=4194304)}else{if(!u)if(e=Iu(o),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,cc(t,e),Ei(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!B)return ht(t),null}else 2*St()-n.renderingStartTime>mc&&a!==536870912&&(t.flags|=128,u=!0,Ei(n,!1),t.lanes=4194304);n.isBackwards?(o.sibling=t.child,t.child=o):(e=n.last,e!==null?e.sibling=o:t.child=o,n.last=o)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=St(),e.sibling=null,a=Et.current,he(Et,u?a&1|2:a&1),B&&i(t,n.treeForkCount),e):(ht(t),null);case 22:case 23:return ja(t),Po(),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&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),a=t.updateQueue,a!==null&&cc(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&&le(ws),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),an(Dt),ht(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Ky(e,t){switch(j(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return an(Dt),Xe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return un(t),null;case 31:if(t.memoizedState!==null){if(ja(t),t.alternate===null)throw Error(c(340));Bt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ja(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Bt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return le(Et),null;case 4:return Xe(),null;case 10:return an(t.type),null;case 22:case 23:return ja(t),Po(),e!==null&&le(ws),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return an(Dt),null;case 25:return null;default:return null}}function wm(e,t){switch(j(t),t.tag){case 3:an(Dt),Xe();break;case 26:case 27:case 5:un(t);break;case 4:Xe();break;case 31:t.memoizedState!==null&&ja(t);break;case 13:ja(t);break;case 19:le(Et);break;case 10:an(t.type);break;case 22:case 23:ja(t),Po(),e!==null&&le(ws);break;case 24:an(Dt)}}function Ti(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 o=a.create,x=a.inst;n=o(),x.destroy=n}a=a.next}while(a!==u)}}catch(E){at(t,t.return,E)}}function Nl(e,t,a){try{var n=t.updateQueue,u=n!==null?n.lastEffect:null;if(u!==null){var o=u.next;n=o;do{if((n.tag&e)===e){var x=n.inst,E=x.destroy;if(E!==void 0){x.destroy=void 0,u=t;var k=a,I=E;try{I()}catch(se){at(u,k,se)}}}n=n.next}while(n!==o)}}catch(se){at(t,t.return,se)}}function Em(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{gh(t,a)}catch(n){at(e,e.return,n)}}}function Tm(e,t,a){a.props=Os(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){at(e,t,n)}}function Ci(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){at(e,t,u)}}function yn(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(u){at(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){at(e,t,u)}else a.current=null}function Cm(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){at(e,e.return,u)}}function Nd(e,t,a){try{var n=e.stateNode;Sp(n,e.type,a,t),n[Ut]=t}catch(u){at(e,e.return,u)}}function Mm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ol(e.type)||e.tag===4}function jd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Mm(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&&Ol(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 wd(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=Ra));else if(n!==4&&(n===27&&Ol(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(wd(e,t,a),e=e.sibling;e!==null;)wd(e,t,a),e=e.sibling}function oc(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&&Ol(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(oc(e,t,a),e=e.sibling;e!==null;)oc(e,t,a),e=e.sibling}function Om(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Jt(t,n,a),t[Nt]=e,t[Ut]=a}catch(o){at(e,e.return,o)}}var Bn=!1,kt=!1,Ed=!1,Rm=typeof WeakSet=="function"?WeakSet:Set,Yt=null;function ep(e,t){if(e=e.containerInfo,Fd=Dc,e=Ao(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,o=n.focusNode;n=n.focusOffset;try{a.nodeType,o.nodeType}catch{a=null;break e}var x=0,E=-1,k=-1,I=0,se=0,oe=e,X=null;t:for(;;){for(var ne;oe!==a||u!==0&&oe.nodeType!==3||(E=x+u),oe!==o||n!==0&&oe.nodeType!==3||(k=x+n),oe.nodeType===3&&(x+=oe.nodeValue.length),(ne=oe.firstChild)!==null;)X=oe,oe=ne;for(;;){if(oe===e)break t;if(X===a&&++I===u&&(E=x),X===o&&++se===n&&(k=x),(ne=oe.nextSibling)!==null)break;oe=X,X=oe.parentNode}oe=ne}a=E===-1||k===-1?null:{start:E,end:k}}else a=null}a=a||{start:0,end:0}}else a=null;for(Zd={focusedElem:e,selectionRange:a},Dc=!1,Yt=t;Yt!==null;)if(t=Yt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Yt=e;else for(;Yt!==null;){switch(t=Yt,o=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&&o!==null){e=void 0,a=t,u=o.memoizedProps,o=o.memoizedState,n=a.stateNode;try{var ve=Os(a.type,u);e=n.getSnapshotBeforeUpdate(ve,o),n.__reactInternalSnapshotBeforeUpdate=e}catch(Ae){at(a,a.return,Ae)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Id(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Id(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,Yt=e;break}Yt=t.return}}function Dm(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:$n(e,a),n&4&&Ti(5,a);break;case 1:if($n(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(x){at(a,a.return,x)}else{var u=Os(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){at(a,a.return,x)}}n&64&&Em(a),n&512&&Ci(a,a.return);break;case 3:if($n(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{gh(e,t)}catch(x){at(a,a.return,x)}}break;case 27:t===null&&n&4&&Om(a);case 26:case 5:$n(e,a),t===null&&n&4&&Cm(a),n&512&&Ci(a,a.return);break;case 12:$n(e,a);break;case 31:$n(e,a),n&4&&km(e,a);break;case 13:$n(e,a),n&4&&zm(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=cp.bind(null,a),Op(e,a))));break;case 22:if(n=a.memoizedState!==null||Bn,!n){t=t!==null&&t.memoizedState!==null||kt,u=Bn;var o=kt;Bn=n,(kt=t)&&!o?Pn(e,a,(a.subtreeFlags&8772)!==0):$n(e,a),Bn=u,kt=o}break;case 30:break;default:$n(e,a)}}function Am(e){var t=e.alternate;t!==null&&(e.alternate=null,Am(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 xt=null,ha=!1;function Yn(e,t,a){for(a=a.child;a!==null;)_m(e,t,a),a=a.sibling}function _m(e,t,a){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(ot,a)}catch{}switch(a.tag){case 26:kt||yn(a,t),Yn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:kt||yn(a,t);var n=xt,u=ha;Ol(a.type)&&(xt=a.stateNode,ha=!1),Yn(e,t,a),Ui(a.stateNode),xt=n,ha=u;break;case 5:kt||yn(a,t);case 6:if(n=xt,u=ha,xt=null,Yn(e,t,a),xt=n,ha=u,xt!==null)if(ha)try{(xt.nodeType===9?xt.body:xt.nodeName==="HTML"?xt.ownerDocument.body:xt).removeChild(a.stateNode)}catch(o){at(a,t,o)}else try{xt.removeChild(a.stateNode)}catch(o){at(a,t,o)}break;case 18:xt!==null&&(ha?(e=xt,E0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),_r(e)):E0(xt,a.stateNode));break;case 4:n=xt,u=ha,xt=a.stateNode.containerInfo,ha=!0,Yn(e,t,a),xt=n,ha=u;break;case 0:case 11:case 14:case 15:Nl(2,a,t),kt||Nl(4,a,t),Yn(e,t,a);break;case 1:kt||(yn(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&Tm(a,t,n)),Yn(e,t,a);break;case 21:Yn(e,t,a);break;case 22:kt=(n=kt)||a.memoizedState!==null,Yn(e,t,a),kt=n;break;default:Yn(e,t,a)}}function km(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{_r(e)}catch(a){at(t,t.return,a)}}}function zm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{_r(e)}catch(a){at(t,t.return,a)}}function tp(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Rm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Rm),t;default:throw Error(c(435,e.tag))}}function dc(e,t){var a=tp(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var u=op.bind(null,e,n);n.then(u,u)}})}function ma(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var u=a[n],o=e,x=t,E=x;e:for(;E!==null;){switch(E.tag){case 27:if(Ol(E.type)){xt=E.stateNode,ha=!1;break e}break;case 5:xt=E.stateNode,ha=!1;break e;case 3:case 4:xt=E.stateNode.containerInfo,ha=!0;break e}E=E.return}if(xt===null)throw Error(c(160));_m(o,x,u),xt=null,ha=!1,o=u.alternate,o!==null&&(o.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Um(t,e),t=t.sibling}var nn=null;function Um(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ma(t,e),ga(e),n&4&&(Nl(3,e,e.return),Ti(3,e),Nl(5,e,e.return));break;case 1:ma(t,e),ga(e),n&512&&(kt||a===null||yn(a,a.return)),n&64&&Bn&&(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=nn;if(ma(t,e),ga(e),n&512&&(kt||a===null||yn(a,a.return)),n&4){var o=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":o=u.getElementsByTagName("title")[0],(!o||o[Jl]||o[Nt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=u.createElement(n),u.head.insertBefore(o,u.querySelector("head > title"))),Jt(o,n,a),o[Nt]=e,Rt(o),n=o;break e;case"link":var x=U0("link","href",u).get(n+(a.href||""));if(x){for(var E=0;E<x.length;E++)if(o=x[E],o.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&o.getAttribute("rel")===(a.rel==null?null:a.rel)&&o.getAttribute("title")===(a.title==null?null:a.title)&&o.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){x.splice(E,1);break t}}o=u.createElement(n),Jt(o,n,a),u.head.appendChild(o);break;case"meta":if(x=U0("meta","content",u).get(n+(a.content||""))){for(E=0;E<x.length;E++)if(o=x[E],o.getAttribute("content")===(a.content==null?null:""+a.content)&&o.getAttribute("name")===(a.name==null?null:a.name)&&o.getAttribute("property")===(a.property==null?null:a.property)&&o.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&o.getAttribute("charset")===(a.charSet==null?null:a.charSet)){x.splice(E,1);break t}}o=u.createElement(n),Jt(o,n,a),u.head.appendChild(o);break;default:throw Error(c(468,n))}o[Nt]=e,Rt(o),n=o}e.stateNode=n}else L0(u,e.type,e.stateNode);else e.stateNode=z0(u,n,e.memoizedProps);else o!==n?(o===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):o.count--,n===null?L0(u,e.type,e.stateNode):z0(u,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Nd(e,e.memoizedProps,a.memoizedProps)}break;case 27:ma(t,e),ga(e),n&512&&(kt||a===null||yn(a,a.return)),a!==null&&n&4&&Nd(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ma(t,e),ga(e),n&512&&(kt||a===null||yn(a,a.return)),e.flags&32){u=e.stateNode;try{Ia(u,"")}catch(ve){at(e,e.return,ve)}}n&4&&e.stateNode!=null&&(u=e.memoizedProps,Nd(e,u,a!==null?a.memoizedProps:u)),n&1024&&(Ed=!0);break;case 6:if(ma(t,e),ga(e),n&4){if(e.stateNode===null)throw Error(c(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(ve){at(e,e.return,ve)}}break;case 3:if(Cc=null,u=nn,nn=Ec(t.containerInfo),ma(t,e),nn=u,ga(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{_r(t.containerInfo)}catch(ve){at(e,e.return,ve)}Ed&&(Ed=!1,Lm(e));break;case 4:n=nn,nn=Ec(e.stateNode.containerInfo),ma(t,e),ga(e),nn=n;break;case 12:ma(t,e),ga(e);break;case 31:ma(t,e),ga(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,dc(e,n)));break;case 13:ma(t,e),ga(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(hc=St()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,dc(e,n)));break;case 22:u=e.memoizedState!==null;var k=a!==null&&a.memoizedState!==null,I=Bn,se=kt;if(Bn=I||u,kt=se||k,ma(t,e),kt=se,Bn=I,ga(e),n&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(a===null||k||Bn||kt||Rs(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){k=a=t;try{if(o=k.stateNode,u)x=o.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{E=k.stateNode;var oe=k.memoizedProps.style,X=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;E.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(ve){at(k,k.return,ve)}}}else if(t.tag===6){if(a===null){k=t;try{k.stateNode.nodeValue=u?"":k.memoizedProps}catch(ve){at(k,k.return,ve)}}}else if(t.tag===18){if(a===null){k=t;try{var ne=k.stateNode;u?T0(ne,!0):T0(k.stateNode,!1)}catch(ve){at(k,k.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,dc(e,a))));break;case 19:ma(t,e),ga(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,dc(e,n)));break;case 30:break;case 21:break;default:ma(t,e),ga(e)}}function ga(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(Mm(n)){a=n;break}n=n.return}if(a==null)throw Error(c(160));switch(a.tag){case 27:var u=a.stateNode,o=jd(e);oc(e,o,u);break;case 5:var x=a.stateNode;a.flags&32&&(Ia(x,""),a.flags&=-33);var E=jd(e);oc(e,E,x);break;case 3:case 4:var k=a.stateNode.containerInfo,I=jd(e);wd(e,I,k);break;default:throw Error(c(161))}}catch(se){at(e,e.return,se)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Lm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Lm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function $n(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Dm(e,t.alternate,t),t=t.sibling}function Rs(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Nl(4,t,t.return),Rs(t);break;case 1:yn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Tm(t,t.return,a),Rs(t);break;case 27:Ui(t.stateNode);case 26:case 5:yn(t,t.return),Rs(t);break;case 22:t.memoizedState===null&&Rs(t);break;case 30:Rs(t);break;default:Rs(t)}e=e.sibling}}function Pn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,u=e,o=t,x=o.flags;switch(o.tag){case 0:case 11:case 15:Pn(u,o,a),Ti(4,o);break;case 1:if(Pn(u,o,a),n=o,u=n.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(I){at(n,n.return,I)}if(n=o,u=n.updateQueue,u!==null){var E=n.stateNode;try{var k=u.shared.hiddenCallbacks;if(k!==null)for(u.shared.hiddenCallbacks=null,u=0;u<k.length;u++)mh(k[u],E)}catch(I){at(n,n.return,I)}}a&&x&64&&Em(o),Ci(o,o.return);break;case 27:Om(o);case 26:case 5:Pn(u,o,a),a&&n===null&&x&4&&Cm(o),Ci(o,o.return);break;case 12:Pn(u,o,a);break;case 31:Pn(u,o,a),a&&x&4&&km(u,o);break;case 13:Pn(u,o,a),a&&x&4&&zm(u,o);break;case 22:o.memoizedState===null&&Pn(u,o,a),Ci(o,o.return);break;case 30:break;default:Pn(u,o,a)}t=t.sibling}}function Td(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&&hi(a))}function Cd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&hi(e))}function ln(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Hm(e,t,a,n),t=t.sibling}function Hm(e,t,a,n){var u=t.flags;switch(t.tag){case 0:case 11:case 15:ln(e,t,a,n),u&2048&&Ti(9,t);break;case 1:ln(e,t,a,n);break;case 3:ln(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&&hi(e)));break;case 12:if(u&2048){ln(e,t,a,n),e=t.stateNode;try{var o=t.memoizedProps,x=o.id,E=o.onPostCommit;typeof E=="function"&&E(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(k){at(t,t.return,k)}}else ln(e,t,a,n);break;case 31:ln(e,t,a,n);break;case 13:ln(e,t,a,n);break;case 23:break;case 22:o=t.stateNode,x=t.alternate,t.memoizedState!==null?o._visibility&2?ln(e,t,a,n):Mi(e,t):o._visibility&2?ln(e,t,a,n):(o._visibility|=2,Nr(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Td(x,t);break;case 24:ln(e,t,a,n),u&2048&&Cd(t.alternate,t);break;default:ln(e,t,a,n)}}function Nr(e,t,a,n,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,x=t,E=a,k=n,I=x.flags;switch(x.tag){case 0:case 11:case 15:Nr(o,x,E,k,u),Ti(8,x);break;case 23:break;case 22:var se=x.stateNode;x.memoizedState!==null?se._visibility&2?Nr(o,x,E,k,u):Mi(o,x):(se._visibility|=2,Nr(o,x,E,k,u)),u&&I&2048&&Td(x.alternate,x);break;case 24:Nr(o,x,E,k,u),u&&I&2048&&Cd(x.alternate,x);break;default:Nr(o,x,E,k,u)}t=t.sibling}}function Mi(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:Mi(a,n),u&2048&&Td(n.alternate,n);break;case 24:Mi(a,n),u&2048&&Cd(n.alternate,n);break;default:Mi(a,n)}t=t.sibling}}var Oi=8192;function jr(e,t,a){if(e.subtreeFlags&Oi)for(e=e.child;e!==null;)qm(e,t,a),e=e.sibling}function qm(e,t,a){switch(e.tag){case 26:jr(e,t,a),e.flags&Oi&&e.memoizedState!==null&&Bp(a,nn,e.memoizedState,e.memoizedProps);break;case 5:jr(e,t,a);break;case 3:case 4:var n=nn;nn=Ec(e.stateNode.containerInfo),jr(e,t,a),nn=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Oi,Oi=16777216,jr(e,t,a),Oi=n):jr(e,t,a));break;default:jr(e,t,a)}}function Vm(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 Ri(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];Yt=n,Ym(n,e)}Vm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Bm(e),e=e.sibling}function Bm(e){switch(e.tag){case 0:case 11:case 15:Ri(e),e.flags&2048&&Nl(9,e,e.return);break;case 3:Ri(e);break;case 12:Ri(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,fc(e)):Ri(e);break;default:Ri(e)}}function fc(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];Yt=n,Ym(n,e)}Vm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Nl(8,t,t.return),fc(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,fc(t));break;default:fc(t)}e=e.sibling}}function Ym(e,t){for(;Yt!==null;){var a=Yt;switch(a.tag){case 0:case 11:case 15:Nl(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:hi(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Yt=n;else e:for(a=e;Yt!==null;){n=Yt;var u=n.sibling,o=n.return;if(Am(n),n===a){Yt=null;break e}if(u!==null){u.return=o,Yt=u;break e}Yt=o}}}var ap={getCacheForType:function(e){var t=It(Dt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return It(Dt).controller.signal}},np=typeof WeakMap=="function"?WeakMap:Map,Je=0,ut=null,Be=null,Ge=0,tt=0,wa=null,jl=!1,wr=!1,Md=!1,Gn=0,bt=0,wl=0,Ds=0,Od=0,Ea=0,Er=0,Di=null,xa=null,Rd=!1,hc=0,$m=0,mc=1/0,gc=null,El=null,Ht=0,Tl=null,Tr=null,Fn=0,Dd=0,Ad=null,Pm=null,Ai=0,_d=null;function Ta(){return(Je&2)!==0&&Ge!==0?Ge&-Ge:Y.T!==null?qd():Fs()}function Gm(){if(Ea===0)if((Ge&536870912)===0||B){var e=$s;$s<<=1,($s&3932160)===0&&($s=262144),Ea=e}else Ea=536870912;return e=Na.current,e!==null&&(e.flags|=32),Ea}function ya(e,t,a){(e===ut&&(tt===2||tt===9)||e.cancelPendingCommit!==null)&&(Cr(e,0),Cl(e,Ge,Ea,!1)),tl(e,a),((Je&2)===0||e!==ut)&&(e===ut&&((Je&2)===0&&(Ds|=a),bt===4&&Cl(e,Ge,Ea,!1)),pn(e))}function Fm(e,t,a){if((Je&6)!==0)throw Error(c(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||el(e,t),u=n?rp(e,t):zd(e,t,!0),o=n;do{if(u===0){wr&&!n&&Cl(e,t,0,!1);break}else{if(a=e.current.alternate,o&&!lp(a)){u=zd(e,t,!1),o=!1;continue}if(u===2){if(o=t,e.errorRecoveryDisabledLanes&o)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var E=e;u=Di;var k=E.current.memoizedState.isDehydrated;if(k&&(Cr(E,x).flags|=256),x=zd(E,x,!1),x!==2){if(Md&&!k){E.errorRecoveryDisabledLanes|=o,Ds|=o,u=4;break e}o=xa,xa=u,o!==null&&(xa===null?xa=o:xa.push.apply(xa,o))}u=x}if(o=!1,u!==2)continue}}if(u===1){Cr(e,0),Cl(e,t,0,!0);break}e:{switch(n=e,o=u,o){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:Cl(n,t,Ea,!jl);break e;case 2:xa=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(u=hc+300-St(),10<u)){if(Cl(n,t,Ea,!jl),Il(n,0,!0)!==0)break e;Fn=t,n.timeoutHandle=j0(Zm.bind(null,n,a,xa,gc,Rd,t,Ea,Ds,Er,jl,o,"Throttled",-0,0),u);break e}Zm(n,a,xa,gc,Rd,t,Ea,Ds,Er,jl,o,null,-0,0)}}break}while(!0);pn(e)}function Zm(e,t,a,n,u,o,x,E,k,I,se,oe,X,ne){if(e.timeoutHandle=-1,oe=t.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ra},qm(t,o,oe);var ve=(o&62914560)===o?hc-St():(o&4194048)===o?$m-St():0;if(ve=Yp(oe,ve),ve!==null){Fn=o,e.cancelPendingCommit=ve(t0.bind(null,e,t,o,a,n,u,x,E,k,se,oe,null,X,ne)),Cl(e,o,x,!I);return}}t0(e,t,o,a,n,u,x,E,k)}function lp(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],o=u.getSnapshot;u=u.value;try{if(!ta(o(),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 Cl(e,t,a,n){t&=~Od,t&=~Ds,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var u=t;0<u;){var o=31-Gt(u),x=1<<o;n[o]=-1,u&=~x}a!==0&&dt(e,a,t)}function xc(){return(Je&6)===0?(_i(0),!1):!0}function kd(){if(Be!==null){if(tt===0)var e=Be.return;else e=Be,La=zn=null,Io(e),yr=null,gi=0,e=Be;for(;e!==null;)wm(e.alternate,e),e=e.return;Be=null}}function Cr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,wp(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Fn=0,kd(),ut=e,Be=a=ka(e.current,null),Ge=t,tt=0,wa=null,jl=!1,wr=el(e,t),Md=!1,Er=Ea=Od=Ds=wl=bt=0,xa=Di=null,Rd=!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-Gt(n),o=1<<u;t|=e[u],n&=~o}return Gn=t,gl(),a}function Wm(e,t){qe=null,Y.H=ji,t===xr||t===Gu?(t=oh(),tt=3):t===Ho?(t=oh(),tt=4):tt=t===fd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,wa=t,Be===null&&(bt=1,sc(e,da(t,e.current)))}function Qm(){var e=Na.current;return e===null?!0:(Ge&4194048)===Ge?qa===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?e===qa:!1}function Im(){var e=Y.H;return Y.H=ji,e===null?ji:e}function Xm(){var e=Y.A;return Y.A=ap,e}function yc(){bt=4,jl||(Ge&4194048)!==Ge&&Na.current!==null||(wr=!0),(wl&134217727)===0&&(Ds&134217727)===0||ut===null||Cl(ut,Ge,Ea,!1)}function zd(e,t,a){var n=Je;Je|=2;var u=Im(),o=Xm();(ut!==e||Ge!==t)&&(gc=null,Cr(e,t)),t=!1;var x=bt;e:do try{if(tt!==0&&Be!==null){var E=Be,k=wa;switch(tt){case 8:kd(),x=6;break e;case 3:case 2:case 9:case 6:Na.current===null&&(t=!0);var I=tt;if(tt=0,wa=null,Mr(e,E,k,I),a&&wr){x=0;break e}break;default:I=tt,tt=0,wa=null,Mr(e,E,k,I)}}sp(),x=bt;break}catch(se){Wm(e,se)}while(!0);return t&&e.shellSuspendCounter++,La=zn=null,Je=n,Y.H=u,Y.A=o,Be===null&&(ut=null,Ge=0,gl()),x}function sp(){for(;Be!==null;)Jm(Be)}function rp(e,t){var a=Je;Je|=2;var n=Im(),u=Xm();ut!==e||Ge!==t?(gc=null,mc=St()+500,Cr(e,t)):wr=el(e,t);e:do try{if(tt!==0&&Be!==null){t=Be;var o=wa;t:switch(tt){case 1:tt=0,wa=null,Mr(e,t,o,1);break;case 2:case 9:if(uh(o)){tt=0,wa=null,Km(t);break}t=function(){tt!==2&&tt!==9||ut!==e||(tt=7),pn(e)},o.then(t,t);break e;case 3:tt=7;break e;case 4:tt=5;break e;case 7:uh(o)?(tt=0,wa=null,Km(t)):(tt=0,wa=null,Mr(e,t,o,7));break;case 5:var x=null;switch(Be.tag){case 26:x=Be.memoizedState;case 5:case 27:var E=Be;if(x?H0(x):E.stateNode.complete){tt=0,wa=null;var k=E.sibling;if(k!==null)Be=k;else{var I=E.return;I!==null?(Be=I,pc(I)):Be=null}break t}}tt=0,wa=null,Mr(e,t,o,5);break;case 6:tt=0,wa=null,Mr(e,t,o,6);break;case 8:kd(),bt=6;break e;default:throw Error(c(462))}}ip();break}catch(se){Wm(e,se)}while(!0);return La=zn=null,Y.H=n,Y.A=u,Je=a,Be!==null?0:(ut=null,Ge=0,gl(),bt)}function ip(){for(;Be!==null&&!Ot();)Jm(Be)}function Jm(e){var t=Nm(e.alternate,e,Gn);e.memoizedProps=e.pendingProps,t===null?pc(e):Be=t}function Km(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=xm(a,t,t.pendingProps,t.type,void 0,Ge);break;case 11:t=xm(a,t,t.pendingProps,t.type.render,t.ref,Ge);break;case 5:Io(t);default:wm(a,t),t=Be=Bu(t,Gn),t=Nm(a,t,Gn)}e.memoizedProps=e.pendingProps,t===null?pc(e):Be=t}function Mr(e,t,a,n){La=zn=null,Io(t),yr=null,gi=0;var u=t.return;try{if(Qy(e,u,t,a,Ge)){bt=1,sc(e,da(a,e.current)),Be=null;return}}catch(o){if(u!==null)throw Be=u,o;bt=1,sc(e,da(a,e.current)),Be=null;return}t.flags&32768?(B||n===1?e=!0:wr||(Ge&536870912)!==0?e=!1:(jl=e=!0,(n===2||n===9||n===3||n===6)&&(n=Na.current,n!==null&&n.tag===13&&(n.flags|=16384))),e0(t,e)):pc(t)}function pc(e){var t=e;do{if((t.flags&32768)!==0){e0(t,jl);return}e=t.return;var a=Jy(t.alternate,t,Gn);if(a!==null){Be=a;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);bt===0&&(bt=5)}function e0(e,t){do{var a=Ky(e.alternate,e);if(a!==null){a.flags&=32767,Be=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Be=e;return}Be=e=a}while(e!==null);bt=6,Be=null}function t0(e,t,a,n,u,o,x,E,k){e.cancelPendingCommit=null;do vc();while(Ht!==0);if((Je&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(o=t.lanes|t.childLanes,o|=vs,hu(e,a,o,x,E,k),e===ut&&(Be=ut=null,Ge=0),Tr=t,Tl=e,Fn=a,Dd=o,Ad=u,Pm=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,dp(wn,function(){return r0(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=Y.T,Y.T=null,u=re.p,re.p=2,x=Je,Je|=4;try{ep(e,t,a)}finally{Je=x,re.p=u,Y.T=n}}Ht=1,a0(),n0(),l0()}}function a0(){if(Ht===1){Ht=0;var e=Tl,t=Tr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=Y.T,Y.T=null;var n=re.p;re.p=2;var u=Je;Je|=4;try{Um(t,e);var o=Zd,x=Ao(e.containerInfo),E=o.focusedElem,k=o.selectionRange;if(x!==E&&E&&E.ownerDocument&&We(E.ownerDocument.documentElement,E)){if(k!==null&&lr(E)){var I=k.start,se=k.end;if(se===void 0&&(se=I),"selectionStart"in E)E.selectionStart=I,E.selectionEnd=Math.min(se,E.value.length);else{var oe=E.ownerDocument||document,X=oe&&oe.defaultView||window;if(X.getSelection){var ne=X.getSelection(),ve=E.textContent.length,Ae=Math.min(k.start,ve),rt=k.end===void 0?Ae:Math.min(k.end,ve);!ne.extend&&Ae>rt&&(x=rt,rt=Ae,Ae=x);var G=zu(E,Ae),q=zu(E,rt);if(G&&q&&(ne.rangeCount!==1||ne.anchorNode!==G.node||ne.anchorOffset!==G.offset||ne.focusNode!==q.node||ne.focusOffset!==q.offset)){var Q=oe.createRange();Q.setStart(G.node,G.offset),ne.removeAllRanges(),Ae>rt?(ne.addRange(Q),ne.extend(q.node,q.offset)):(Q.setEnd(q.node,q.offset),ne.addRange(Q))}}}}for(oe=[],ne=E;ne=ne.parentNode;)ne.nodeType===1&&oe.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<oe.length;E++){var ie=oe[E];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}Dc=!!Fd,Zd=Fd=null}finally{Je=u,re.p=n,Y.T=a}}e.current=t,Ht=2}}function n0(){if(Ht===2){Ht=0;var e=Tl,t=Tr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=Y.T,Y.T=null;var n=re.p;re.p=2;var u=Je;Je|=4;try{Dm(e,t.alternate,t)}finally{Je=u,re.p=n,Y.T=a}}Ht=3}}function l0(){if(Ht===4||Ht===3){Ht=0,qt();var e=Tl,t=Tr,a=Fn,n=Pm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ht=5:(Ht=0,Tr=Tl=null,s0(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(El=null),ea(a),t=t.stateNode,zt&&typeof zt.onCommitFiberRoot=="function")try{zt.onCommitFiberRoot(ot,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=Y.T,u=re.p,re.p=2,Y.T=null;try{for(var o=e.onRecoverableError,x=0;x<n.length;x++){var E=n[x];o(E.value,{componentStack:E.stack})}}finally{Y.T=t,re.p=u}}(Fn&3)!==0&&vc(),pn(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===_d?Ai++:(Ai=0,_d=e):Ai=0,_i(0)}}function s0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,hi(t)))}function vc(){return a0(),n0(),l0(),r0()}function r0(){if(Ht!==5)return!1;var e=Tl,t=Dd;Dd=0;var a=ea(Fn),n=Y.T,u=re.p;try{re.p=32>a?32:a,Y.T=null,a=Ad,Ad=null;var o=Tl,x=Fn;if(Ht=0,Tr=Tl=null,Fn=0,(Je&6)!==0)throw Error(c(331));var E=Je;if(Je|=4,Bm(o.current),Hm(o,o.current,x,a),Je=E,_i(0,!1),zt&&typeof zt.onPostCommitFiberRoot=="function")try{zt.onPostCommitFiberRoot(ot,o)}catch{}return!0}finally{re.p=u,Y.T=n,s0(e,t)}}function i0(e,t,a){t=da(a,t),t=dd(e.stateNode,t,2),e=vl(e,t,2),e!==null&&(tl(e,2),pn(e))}function at(e,t,a){if(e.tag===3)i0(e,e,a);else for(;t!==null;){if(t.tag===3){i0(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(El===null||!El.has(n))){e=da(a,e),a=um(2),n=vl(t,a,2),n!==null&&(cm(a,n,t,e),tl(n,2),pn(n));break}}t=t.return}}function Ud(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new np;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)||(Md=!0,u.add(a),e=up.bind(null,e,t,a),t.then(e,e))}function up(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ut===e&&(Ge&a)===a&&(bt===4||bt===3&&(Ge&62914560)===Ge&&300>St()-hc?(Je&2)===0&&Cr(e,0):Od|=a,Er===Ge&&(Er=0)),pn(e)}function u0(e,t){t===0&&(t=Yr()),e=_a(e,t),e!==null&&(tl(e,t),pn(e))}function cp(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),u0(e,a)}function op(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),u0(e,a)}function dp(e,t){return ye(e,t)}var bc=null,Or=null,Ld=!1,Sc=!1,Hd=!1,Ml=0;function pn(e){e!==Or&&e.next===null&&(Or===null?bc=Or=e:Or=Or.next=e),Sc=!0,Ld||(Ld=!0,hp())}function _i(e,t){if(!Hd&&Sc){Hd=!0;do for(var a=!1,n=bc;n!==null;){if(e!==0){var u=n.pendingLanes;if(u===0)var o=0;else{var x=n.suspendedLanes,E=n.pingedLanes;o=(1<<31-Gt(42|e)+1)-1,o&=u&~(x&~E),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(a=!0,f0(n,o))}else o=Ge,o=Il(n,n===ut?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(o&3)===0||el(n,o)||(a=!0,f0(n,o));n=n.next}while(a);Hd=!1}}function fp(){c0()}function c0(){Sc=Ld=!1;var e=0;Ml!==0&&jp()&&(e=Ml);for(var t=St(),a=null,n=bc;n!==null;){var u=n.next,o=o0(n,t);o===0?(n.next=null,a===null?bc=u:a.next=u,u===null&&(Or=a)):(a=n,(e!==0||(o&3)!==0)&&(Sc=!0)),n=u}Ht!==0&&Ht!==5||_i(e),Ml!==0&&(Ml=0)}function o0(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,u=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var x=31-Gt(o),E=1<<x,k=u[x];k===-1?((E&a)===0||(E&n)!==0)&&(u[x]=fu(E,t)):k<=t&&(e.expiredLanes|=E),o&=~E}if(t=ut,a=Ge,a=Il(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(tt===2||tt===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&De(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||el(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&De(n),ea(a)){case 2:case 8:a=Ql;break;case 32:a=wn;break;case 268435456:a=Jn;break;default:a=wn}return n=d0.bind(null,e),a=ye(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&De(n),e.callbackPriority=2,e.callbackNode=null,2}function d0(e,t){if(Ht!==0&&Ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(vc()&&e.callbackNode!==a)return null;var n=Ge;return n=Il(e,e===ut?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Fm(e,n,t),o0(e,St()),e.callbackNode!=null&&e.callbackNode===a?d0.bind(null,e):null)}function f0(e,t){if(vc())return null;Fm(e,t,!0)}function hp(){Ep(function(){(Je&6)!==0?ye(Wl,fp):c0()})}function qd(){if(Ml===0){var e=mr;e===0&&(e=Kn,Kn<<=1,(Kn&261888)===0&&(Kn=256)),Ml=e}return Ml}function h0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ls(""+e)}function m0(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 mp(e,t,a,n,u){if(t==="submit"&&a&&a.stateNode===u){var o=h0((u[Ut]||null).action),x=n.submitter;x&&(t=(t=x[Ut]||null)?h0(t.formAction):x.getAttribute("formAction"),t!==null&&(o=t,x=null));var E=new us("action","action",null,n,u);e.push({event:E,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Ml!==0){var k=x?m0(u,x):new FormData(u);sd(a,{pending:!0,data:k,method:u.method,action:o},null,k)}}else typeof o=="function"&&(E.preventDefault(),k=x?m0(u,x):new FormData(u),sd(a,{pending:!0,data:k,method:u.method,action:o},o,k))},currentTarget:u}]})}}for(var Vd=0;Vd<ci.length;Vd++){var Bd=ci[Vd],gp=Bd.toLowerCase(),xp=Bd[0].toUpperCase()+Bd.slice(1);oa(gp,"on"+xp)}oa(Hu,"onAnimationEnd"),oa(qu,"onAnimationIteration"),oa(ir,"onAnimationStart"),oa("dblclick","onDoubleClick"),oa("focusin","onFocus"),oa("focusout","onBlur"),oa(_o,"onTransitionRun"),oa(ko,"onTransitionStart"),oa(Vu,"onTransitionCancel"),oa(ii,"onTransitionEnd"),al("onMouseEnter",["mouseout","mouseover"]),al("onMouseLeave",["mouseout","mouseover"]),al("onPointerEnter",["pointerout","pointerover"]),al("onPointerLeave",["pointerout","pointerover"]),on("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),on("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),on("onBeforeInput",["compositionend","keypress","textInput","paste"]),on("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),on("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),on("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ki="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(" "),yp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ki));function g0(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 o=void 0;if(t)for(var x=n.length-1;0<=x;x--){var E=n[x],k=E.instance,I=E.currentTarget;if(E=E.listener,k!==o&&u.isPropagationStopped())break e;o=E,u.currentTarget=I;try{o(u)}catch(se){ml(se)}u.currentTarget=null,o=k}else for(x=0;x<n.length;x++){if(E=n[x],k=E.instance,I=E.currentTarget,E=E.listener,k!==o&&u.isPropagationStopped())break e;o=E,u.currentTarget=I;try{o(u)}catch(se){ml(se)}u.currentTarget=null,o=k}}}}function Ye(e,t){var a=t[Xl];a===void 0&&(a=t[Xl]=new Set);var n=e+"__bubble";a.has(n)||(x0(t,e,2,!1),a.add(n))}function Yd(e,t,a){var n=0;t&&(n|=4),x0(a,e,n,t)}var Nc="_reactListening"+Math.random().toString(36).slice(2);function $d(e){if(!e[Nc]){e[Nc]=!0,yu.forEach(function(a){a!=="selectionchange"&&(yp.has(a)||Yd(a,!1,e),Yd(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Nc]||(t[Nc]=!0,Yd("selectionchange",!1,t))}}function x0(e,t,a,n){switch(G0(t)){case 2:var u=Gp;break;case 8:u=Fp;break;default:u=lf}a=u.bind(null,t,a,e),u=void 0,!Jr||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 Pd(e,t,a,n,u){var o=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var x=n.tag;if(x===3||x===4){var E=n.stateNode.containerInfo;if(E===u)break;if(x===4)for(x=n.return;x!==null;){var k=x.tag;if((k===3||k===4)&&x.stateNode.containerInfo===u)return;x=x.return}for(;E!==null;){if(x=Tn(E),x===null)return;if(k=x.tag,k===5||k===6||k===26||k===27){n=o=x;continue e}E=E.parentNode}}n=n.return}Xr(function(){var I=o,se=Js(a),oe=[];e:{var X=ui.get(e);if(X!==void 0){var ne=us,ve=e;switch(e){case"keypress":if(is(a)===0)break e;case"keydown":case"keyup":ne=po;break;case"focusin":ve="focus",ne=nr;break;case"focusout":ve="blur",ne=nr;break;case"beforeblur":case"afterblur":ne=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":ne=ju;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=uo;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=So;break;case Hu:case qu:case ir:ne=rl;break;case ii:ne=No;break;case"scroll":case"scrollend":ne=Kr;break;case"wheel":ne=wo;break;case"copy":case"cut":case"paste":ne=il;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=wu;break;case"toggle":case"beforetoggle":ne=To}var Ae=(t&4)!==0,rt=!Ae&&(e==="scroll"||e==="scrollend"),G=Ae?X!==null?X+"Capture":null:X;Ae=[];for(var q=I,Q;q!==null;){var ie=q;if(Q=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||Q===null||G===null||(ie=ss(q,G),ie!=null&&Ae.push(zi(q,ie,Q))),rt)break;q=q.return}0<Ae.length&&(X=new ne(X,ve,null,a,se),oe.push({event:X,listeners:Ae}))}}if((t&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",ne=e==="mouseout"||e==="pointerout",X&&a!==Qr&&(ve=a.relatedTarget||a.fromElement)&&(Tn(ve)||ve[En]))break e;if((ne||X)&&(X=se.window===se?se:(X=se.ownerDocument)?X.defaultView||X.parentWindow:window,ne?(ve=a.relatedTarget||a.toElement,ne=I,ve=ve?Tn(ve):null,ve!==null&&(rt=m(ve),Ae=ve.tag,ve!==rt||Ae!==5&&Ae!==27&&Ae!==6)&&(ve=null)):(ne=null,ve=I),ne!==ve)){if(Ae=ju,ie="onMouseLeave",G="onMouseEnter",q="mouse",(e==="pointerout"||e==="pointerover")&&(Ae=wu,ie="onPointerLeave",G="onPointerEnter",q="pointer"),rt=ne==null?X:ua(ne),Q=ve==null?X:ua(ve),X=new Ae(ie,q+"leave",ne,a,se),X.target=rt,X.relatedTarget=Q,ie=null,Tn(se)===I&&(Ae=new Ae(G,q+"enter",ve,a,se),Ae.target=Q,Ae.relatedTarget=rt,ie=Ae),rt=ie,ne&&ve)t:{for(Ae=pp,G=ne,q=ve,Q=0,ie=G;ie;ie=Ae(ie))Q++;ie=0;for(var Te=q;Te;Te=Ae(Te))ie++;for(;0<Q-ie;)G=Ae(G),Q--;for(;0<ie-Q;)q=Ae(q),ie--;for(;Q--;){if(G===q||q!==null&&G===q.alternate){Ae=G;break t}G=Ae(G),q=Ae(q)}Ae=null}else Ae=null;ne!==null&&y0(oe,X,ne,Ae,!1),ve!==null&&rt!==null&&y0(oe,rt,ve,Ae,!0)}}e:{if(X=I?ua(I):window,ne=X.nodeName&&X.nodeName.toLowerCase(),ne==="select"||ne==="input"&&X.type==="file")var Qe=_u;else if(Au(X))if(mn)Qe=ft;else{Qe=dl;var be=$e}else ne=X.nodeName,!ne||ne.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?I&&Xs(I.elementType)&&(Qe=_u):Qe=Do;if(Qe&&(Qe=Qe(e,I))){ti(oe,Qe,a,se);break e}be&&be(e,X,I),e==="focusout"&&I&&X.type==="number"&&I.memoizedProps.value!=null&&es(X,"number",X.value)}switch(be=I?ua(I):window,e){case"focusin":(Au(be)||be.contentEditable==="true")&&(fl=be,sr=I,Wt=null);break;case"focusout":Wt=sr=fl=null;break;case"mousedown":rr=!0;break;case"contextmenu":case"mouseup":case"dragend":rr=!1,ps(oe,a,se);break;case"selectionchange":if(Uu)break;case"keydown":case"keyup":ps(oe,a,se)}var Ve;if(ei)e:{switch(e){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else cl?Ru(e,a)&&(Fe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Fe="onCompositionStart");Fe&&(Cu&&a.locale!=="ko"&&(cl||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&cl&&(Ve=Lt()):(fn=se,Ks="value"in fn?fn.value:fn.textContent,cl=!0)),be=jc(I,Fe),0<be.length&&(Fe=new ul(Fe,e,null,a,se),oe.push({event:Fe,listeners:be}),Ve?Fe.data=Ve:(Ve=Du(a),Ve!==null&&(Fe.data=Ve)))),(Ve=Co?Mo(e,a):Oo(e,a))&&(Fe=jc(I,"onBeforeInput"),0<Fe.length&&(be=new ul("onBeforeInput","beforeinput",null,a,se),oe.push({event:be,listeners:Fe}),be.data=Ve)),mp(oe,e,I,a,se)}g0(oe,t)})}function zi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function jc(e,t){for(var a=t+"Capture",n=[];e!==null;){var u=e,o=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||o===null||(u=ss(e,a),u!=null&&n.unshift(zi(e,u,o)),u=ss(e,t),u!=null&&n.push(zi(e,u,o))),e.tag===3)return n;e=e.return}return[]}function pp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function y0(e,t,a,n,u){for(var o=t._reactName,x=[];a!==null&&a!==n;){var E=a,k=E.alternate,I=E.stateNode;if(E=E.tag,k!==null&&k===n)break;E!==5&&E!==26&&E!==27||I===null||(k=I,u?(I=ss(a,o),I!=null&&x.unshift(zi(a,I,k))):u||(I=ss(a,o),I!=null&&x.push(zi(a,I,k)))),a=a.return}x.length!==0&&e.push({event:t,listeners:x})}var vp=/\r\n?/g,bp=/\u0000|\uFFFD/g;function p0(e){return(typeof e=="string"?e:""+e).replace(vp,`
|
|
49
|
-
`).replace(bp,"")}function v0(e,t){return t=p0(t),p0(e)===t}function st(e,t,a,n,u,o){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||Ia(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&Ia(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":bu(e,n,o);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=ls(""+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 o=="function"&&(a==="formAction"?(t!=="input"&&st(e,t,"name",u.name,u,null),st(e,t,"formEncType",u.formEncType,u,null),st(e,t,"formMethod",u.formMethod,u,null),st(e,t,"formTarget",u.formTarget,u,null)):(st(e,t,"encType",u.encType,u,null),st(e,t,"method",u.method,u,null),st(e,t,"target",u.target,u,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=ls(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Ra);break;case"onScroll":n!=null&&Ye("scroll",e);break;case"onScrollEnd":n!=null&&Ye("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=ls(""+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":Ye("beforetoggle",e),Ye("toggle",e),Ft(e,"popover",n);break;case"xlinkActuate":et(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":et(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":et(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":et(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":et(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":et(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":et(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":et(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":et(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Ft(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=ro.get(a)||a,Ft(e,a,n))}}function Gd(e,t,a,n,u,o){switch(a){case"style":bu(e,n,o);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"?Ia(e,n):(typeof n=="number"||typeof n=="bigint")&&Ia(e,""+n);break;case"onScroll":n!=null&&Ye("scroll",e);break;case"onScrollEnd":n!=null&&Ye("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Ra);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Gr.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),t=a.slice(2,u?a.length-7:void 0),o=e[Ut]||null,o=o!=null?o[a]:null,typeof o=="function"&&e.removeEventListener(t,o,u),typeof n=="function")){typeof o!="function"&&o!==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,""):Ft(e,a,n)}}}function Jt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ye("error",e),Ye("load",e);var n=!1,u=!1,o;for(o in a)if(a.hasOwnProperty(o)){var x=a[o];if(x!=null)switch(o){case"src":n=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:st(e,t,o,x,a,null)}}u&&st(e,t,"srcSet",a.srcSet,a,null),n&&st(e,t,"src",a.src,a,null);return;case"input":Ye("invalid",e);var E=o=x=u=null,k=null,I=null;for(n in a)if(a.hasOwnProperty(n)){var se=a[n];if(se!=null)switch(n){case"name":u=se;break;case"type":x=se;break;case"checked":k=se;break;case"defaultChecked":I=se;break;case"value":o=se;break;case"defaultValue":E=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(c(137,t));break;default:st(e,t,n,se,a,null)}}ll(e,o,E,k,I,x,u,!1);return;case"select":Ye("invalid",e),n=x=o=null;for(u in a)if(a.hasOwnProperty(u)&&(E=a[u],E!=null))switch(u){case"value":o=E;break;case"defaultValue":x=E;break;case"multiple":n=E;default:st(e,t,u,E,a,null)}t=o,a=x,e.multiple=!!n,t!=null?Mn(e,!!n,t,!1):a!=null&&Mn(e,!!n,a,!0);return;case"textarea":Ye("invalid",e),o=u=n=null;for(x in a)if(a.hasOwnProperty(x)&&(E=a[x],E!=null))switch(x){case"value":n=E;break;case"defaultValue":u=E;break;case"children":o=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(c(91));break;default:st(e,t,x,E,a,null)}Wr(e,n,u,o);return;case"option":for(k in a)if(a.hasOwnProperty(k)&&(n=a[k],n!=null))switch(k){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:st(e,t,k,n,a,null)}return;case"dialog":Ye("beforetoggle",e),Ye("toggle",e),Ye("cancel",e),Ye("close",e);break;case"iframe":case"object":Ye("load",e);break;case"video":case"audio":for(n=0;n<ki.length;n++)Ye(ki[n],e);break;case"image":Ye("error",e),Ye("load",e);break;case"details":Ye("toggle",e);break;case"embed":case"source":case"link":Ye("error",e),Ye("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(I in a)if(a.hasOwnProperty(I)&&(n=a[I],n!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:st(e,t,I,n,a,null)}return;default:if(Xs(t)){for(se in a)a.hasOwnProperty(se)&&(n=a[se],n!==void 0&&Gd(e,t,se,n,a,void 0));return}}for(E in a)a.hasOwnProperty(E)&&(n=a[E],n!=null&&st(e,t,E,n,a,null))}function Sp(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,o=null,x=null,E=null,k=null,I=null,se=null;for(ne in a){var oe=a[ne];if(a.hasOwnProperty(ne)&&oe!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":k=oe;default:n.hasOwnProperty(ne)||st(e,t,ne,null,n,oe)}}for(var X in n){var ne=n[X];if(oe=a[X],n.hasOwnProperty(X)&&(ne!=null||oe!=null))switch(X){case"type":o=ne;break;case"name":u=ne;break;case"checked":I=ne;break;case"defaultChecked":se=ne;break;case"value":x=ne;break;case"defaultValue":E=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(c(137,t));break;default:ne!==oe&&st(e,t,X,ne,n,oe)}}Is(e,x,E,k,I,se,o,u);return;case"select":ne=x=E=X=null;for(o in a)if(k=a[o],a.hasOwnProperty(o)&&k!=null)switch(o){case"value":break;case"multiple":ne=k;default:n.hasOwnProperty(o)||st(e,t,o,null,n,k)}for(u in n)if(o=n[u],k=a[u],n.hasOwnProperty(u)&&(o!=null||k!=null))switch(u){case"value":X=o;break;case"defaultValue":E=o;break;case"multiple":x=o;default:o!==k&&st(e,t,u,o,n,k)}t=E,a=x,n=ne,X!=null?Mn(e,!!a,X,!1):!!n!=!!a&&(t!=null?Mn(e,!!a,t,!0):Mn(e,!!a,a?[]:"",!1));return;case"textarea":ne=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:st(e,t,E,null,n,u)}for(x in n)if(u=n[x],o=a[x],n.hasOwnProperty(x)&&(u!=null||o!=null))switch(x){case"value":X=u;break;case"defaultValue":ne=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(c(91));break;default:u!==o&&st(e,t,x,u,n,o)}ts(e,X,ne);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:st(e,t,ve,null,n,X)}for(k in n)if(X=n[k],ne=a[k],n.hasOwnProperty(k)&&X!==ne&&(X!=null||ne!=null))switch(k){case"selected":e.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:st(e,t,k,X,n,ne)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ae in a)X=a[Ae],a.hasOwnProperty(Ae)&&X!=null&&!n.hasOwnProperty(Ae)&&st(e,t,Ae,null,n,X);for(I in n)if(X=n[I],ne=a[I],n.hasOwnProperty(I)&&X!==ne&&(X!=null||ne!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(c(137,t));break;default:st(e,t,I,X,n,ne)}return;default:if(Xs(t)){for(var rt in a)X=a[rt],a.hasOwnProperty(rt)&&X!==void 0&&!n.hasOwnProperty(rt)&&Gd(e,t,rt,void 0,n,X);for(se in n)X=n[se],ne=a[se],!n.hasOwnProperty(se)||X===ne||X===void 0&&ne===void 0||Gd(e,t,se,X,n,ne);return}}for(var G in a)X=a[G],a.hasOwnProperty(G)&&X!=null&&!n.hasOwnProperty(G)&&st(e,t,G,null,n,X);for(oe in n)X=n[oe],ne=a[oe],!n.hasOwnProperty(oe)||X===ne||X==null&&ne==null||st(e,t,oe,X,n,ne)}function b0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Np(){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],o=u.transferSize,x=u.initiatorType,E=u.duration;if(o&&E&&b0(x)){for(x=0,E=u.responseEnd,n+=1;n<a.length;n++){var k=a[n],I=k.startTime;if(I>E)break;var se=k.transferSize,oe=k.initiatorType;se&&b0(oe)&&(k=k.responseEnd,x+=se*(k<E?1:(E-I)/(k-I)))}if(--n,t+=8*(o+x)/(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 Fd=null,Zd=null;function wc(e){return e.nodeType===9?e:e.ownerDocument}function S0(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 N0(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 Wd(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 Qd=null;function jp(){var e=window.event;return e&&e.type==="popstate"?e===Qd?!1:(Qd=e,!0):(Qd=null,!1)}var j0=typeof setTimeout=="function"?setTimeout:void 0,wp=typeof clearTimeout=="function"?clearTimeout:void 0,w0=typeof Promise=="function"?Promise:void 0,Ep=typeof queueMicrotask=="function"?queueMicrotask:typeof w0<"u"?function(e){return w0.resolve(null).then(e).catch(Tp)}:j0;function Tp(e){setTimeout(function(){throw e})}function Ol(e){return e==="head"}function E0(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),_r(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")Ui(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ui(a);for(var o=a.firstChild;o;){var x=o.nextSibling,E=o.nodeName;o[Jl]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&o.rel.toLowerCase()==="stylesheet"||a.removeChild(o),o=x}}else a==="body"&&Ui(e.ownerDocument.body);a=u}while(a);_r(t)}function T0(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 Id(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":Id(a),Zs(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Cp(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[Jl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==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(o=e.getAttribute("src"),(o!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=Va(e.nextSibling),e===null)break}return null}function Mp(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Va(e.nextSibling),e===null))return null;return e}function C0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Va(e.nextSibling),e===null))return null;return e}function Xd(e){return e.data==="$?"||e.data==="$~"}function Jd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Op(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function Va(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Kd=null;function M0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Va(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function O0(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 R0(e,t,a){switch(t=wc(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 Ui(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Zs(e)}var Ba=new Map,D0=new Set;function Ec(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Zn=re.d;re.d={f:Rp,r:Dp,D:Ap,C:_p,L:kp,m:zp,X:Lp,S:Up,M:Hp};function Rp(){var e=Zn.f(),t=xc();return e||t}function Dp(e){var t=Ce(e);t!==null&&t.tag===5&&t.type==="form"?Wh(t):Zn.r(e)}var Rr=typeof document>"u"?null:document;function A0(e,t,a){var n=Rr;if(n&&typeof t=="string"&&t){var u=Zt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),D0.has(u)||(D0.add(u),e={rel:e,crossOrigin:a,href:t},n.querySelector(u)===null&&(t=n.createElement("link"),Jt(t,"link",e),Rt(t),n.head.appendChild(t)))}}function Ap(e){Zn.D(e),A0("dns-prefetch",e,null)}function _p(e,t){Zn.C(e,t),A0("preconnect",e,t)}function kp(e,t,a){Zn.L(e,t,a);var n=Rr;if(n&&e&&t){var u='link[rel="preload"][as="'+Zt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+Zt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+Zt(a.imageSizes)+'"]')):u+='[href="'+Zt(e)+'"]';var o=u;switch(t){case"style":o=Dr(e);break;case"script":o=Ar(e)}Ba.has(o)||(e=T({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ba.set(o,e),n.querySelector(u)!==null||t==="style"&&n.querySelector(Li(o))||t==="script"&&n.querySelector(Hi(o))||(t=n.createElement("link"),Jt(t,"link",e),Rt(t),n.head.appendChild(t)))}}function zp(e,t){Zn.m(e,t);var a=Rr;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Zt(n)+'"][href="'+Zt(e)+'"]',o=u;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Ar(e)}if(!Ba.has(o)&&(e=T({rel:"modulepreload",href:e},t),Ba.set(o,e),a.querySelector(u)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Hi(o)))return}n=a.createElement("link"),Jt(n,"link",e),Rt(n),a.head.appendChild(n)}}}function Up(e,t,a){Zn.S(e,t,a);var n=Rr;if(n&&e){var u=Wa(n).hoistableStyles,o=Dr(e);t=t||"default";var x=u.get(o);if(!x){var E={loading:0,preload:null};if(x=n.querySelector(Li(o)))E.loading=5;else{e=T({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ba.get(o))&&ef(e,a);var k=x=n.createElement("link");Rt(k),Jt(k,"link",e),k._p=new Promise(function(I,se){k.onload=I,k.onerror=se}),k.addEventListener("load",function(){E.loading|=1}),k.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Tc(x,t,n)}x={type:"stylesheet",instance:x,count:1,state:E},u.set(o,x)}}}function Lp(e,t){Zn.X(e,t);var a=Rr;if(a&&e){var n=Wa(a).hoistableScripts,u=Ar(e),o=n.get(u);o||(o=a.querySelector(Hi(u)),o||(e=T({src:e,async:!0},t),(t=Ba.get(u))&&tf(e,t),o=a.createElement("script"),Rt(o),Jt(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(u,o))}}function Hp(e,t){Zn.M(e,t);var a=Rr;if(a&&e){var n=Wa(a).hoistableScripts,u=Ar(e),o=n.get(u);o||(o=a.querySelector(Hi(u)),o||(e=T({src:e,async:!0,type:"module"},t),(t=Ba.get(u))&&tf(e,t),o=a.createElement("script"),Rt(o),Jt(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(u,o))}}function _0(e,t,a,n){var u=(u=de.current)?Ec(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=Wa(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 o=Wa(u).hoistableStyles,x=o.get(e);if(x||(u=u.ownerDocument||u,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,x),(o=u.querySelector(Li(e)))&&!o._p&&(x.instance=o,x.state.loading=5),Ba.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Ba.set(e,a),o||qp(u,e,a,x.state))),t&&n===null)throw Error(c(528,""));return x}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=Wa(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="'+Zt(e)+'"'}function Li(e){return'link[rel="stylesheet"]['+e+"]"}function k0(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function qp(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}),Jt(t,"link",a),Rt(t),e.head.appendChild(t))}function Ar(e){return'[src="'+Zt(e)+'"]'}function Hi(e){return"script[async]"+e}function z0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Zt(a.href)+'"]');if(n)return t.instance=n,Rt(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"),Rt(n),Jt(n,"style",u),Tc(n,a.precedence,e),t.instance=n;case"stylesheet":u=Dr(a.href);var o=e.querySelector(Li(u));if(o)return t.state.loading|=4,t.instance=o,Rt(o),o;n=k0(a),(u=Ba.get(u))&&ef(n,u),o=(e.ownerDocument||e).createElement("link"),Rt(o);var x=o;return x._p=new Promise(function(E,k){x.onload=E,x.onerror=k}),Jt(o,"link",n),t.state.loading|=4,Tc(o,a.precedence,e),t.instance=o;case"script":return o=Ar(a.src),(u=e.querySelector(Hi(o)))?(t.instance=u,Rt(u),u):(n=a,(u=Ba.get(o))&&(n=T({},a),tf(n,u)),e=e.ownerDocument||e,u=e.createElement("script"),Rt(u),Jt(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,Tc(n,a.precedence,e));return t.instance}function Tc(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=n.length?n[n.length-1]:null,o=u,x=0;x<n.length;x++){var E=n[x];if(E.dataset.precedence===t)o=E;else if(o!==u)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function ef(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function tf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Cc=null;function U0(e,t,a){if(Cc===null){var n=new Map,u=Cc=new Map;u.set(a,n)}else u=Cc,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 o=a[u];if(!(o[Jl]||o[Nt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var x=o.getAttribute(t)||"";x=e+x;var E=n.get(x);E?E.push(o):n.set(x,[o])}}return n}function L0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Vp(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 H0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Bp(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),o=t.querySelector(Li(u));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Mc.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=o,Rt(o);return}o=t.ownerDocument||t,n=k0(n),(u=Ba.get(u))&&ef(n,u),o=o.createElement("link"),Rt(o);var x=o;x._p=new Promise(function(E,k){x.onload=E,x.onerror=k}),Jt(o,"link",n),a.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Mc.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var af=0;function Yp(e,t){return e.stylesheets&&e.count===0&&Rc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Rc(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&af===0&&(af=62500*Np());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Rc(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>af?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(u)}}:null}function Mc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Rc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Oc=null;function Rc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Oc=new Map,t.forEach($p,e),Oc=null,Mc.call(e))}function $p(e,t){if(!(t.state.loading&4)){var a=Oc.get(e);if(a)var n=a.get(null);else{a=new Map,Oc.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<u.length;o++){var x=u[o];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(a.set(x.dataset.precedence,x),n=x)}n&&a.set(null,n)}u=t.instance,x=u.getAttribute("data-precedence"),o=a.get(x)||n,o===n&&a.set(null,u),a.set(x,u),this.count++,n=Mc.bind(this),u.addEventListener("load",n),u.addEventListener("error",n),o?o.parentNode.insertBefore(u,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var qi={$$typeof:ee,Provider:null,Consumer:null,_currentValue:ge,_currentValue2:ge,_threadCount:0};function Pp(e,t,a,n,u,o,x,E,k){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=o,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function q0(e,t,a,n,u,o,x,E,k,I,se,oe){return e=new Pp(e,t,a,x,k,I,se,oe,E),t=1,o===!0&&(t|=24),o=Qt(3,null,null,t),e.current=o,o.stateNode=e,t=zo(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:n,isDehydrated:a,cache:t},qo(o),e}function V0(e){return e?(e=Sa,e):Sa}function B0(e,t,a,n,u,o){u=V0(u),n.context===null?n.context=u:n.pendingContext=u,n=pl(t),n.payload={element:a},o=o===void 0?null:o,o!==null&&(n.callback=o),a=vl(e,n,t),a!==null&&(ya(a,e,t),yi(a,e,t))}function Y0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function nf(e,t){Y0(e,t),(e=e.alternate)&&Y0(e,t)}function $0(e){if(e.tag===13||e.tag===31){var t=_a(e,67108864);t!==null&&ya(t,e,67108864),nf(e,67108864)}}function P0(e){if(e.tag===13||e.tag===31){var t=Ta();t=Gs(t);var a=_a(e,t);a!==null&&ya(a,e,t),nf(e,t)}}var Dc=!0;function Gp(e,t,a,n){var u=Y.T;Y.T=null;var o=re.p;try{re.p=2,lf(e,t,a,n)}finally{re.p=o,Y.T=u}}function Fp(e,t,a,n){var u=Y.T;Y.T=null;var o=re.p;try{re.p=8,lf(e,t,a,n)}finally{re.p=o,Y.T=u}}function lf(e,t,a,n){if(Dc){var u=sf(n);if(u===null)Pd(e,t,n,Ac,a),F0(e,n);else if(Wp(u,e,t,a,n))n.stopPropagation();else if(F0(e,n),t&4&&-1<Zp.indexOf(e)){for(;u!==null;){var o=Ce(u);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var x=cn(o.pendingLanes);if(x!==0){var E=o;for(E.pendingLanes|=2,E.entangledLanes|=2;x;){var k=1<<31-Gt(x);E.entanglements[1]|=k,x&=~k}pn(o),(Je&6)===0&&(mc=St()+500,_i(0))}}break;case 31:case 13:E=_a(o,2),E!==null&&ya(E,o,2),xc(),nf(o,2)}if(o=sf(n),o===null&&Pd(e,t,n,Ac,a),o===u)break;u=o}u!==null&&n.stopPropagation()}else Pd(e,t,n,null,a)}}function sf(e){return e=Js(e),rf(e)}var Ac=null;function rf(e){if(Ac=null,e=Tn(e),e!==null){var t=m(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=b(t),e!==null)return e;e=null}else if(a===31){if(e=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 Ac=e,null}function G0(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(jn()){case Wl:return 2;case Ql:return 8;case wn:case Ys:return 32;case Jn:return 268435456;default:return 32}default:return 32}}var uf=!1,Rl=null,Dl=null,Al=null,Vi=new Map,Bi=new Map,_l=[],Zp="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function F0(e,t){switch(e){case"focusin":case"focusout":Rl=null;break;case"dragenter":case"dragleave":Dl=null;break;case"mouseover":case"mouseout":Al=null;break;case"pointerover":case"pointerout":Vi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bi.delete(t.pointerId)}}function Yi(e,t,a,n,u,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:o,targetContainers:[u]},t!==null&&(t=Ce(t),t!==null&&$0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Wp(e,t,a,n,u){switch(t){case"focusin":return Rl=Yi(Rl,e,t,a,n,u),!0;case"dragenter":return Dl=Yi(Dl,e,t,a,n,u),!0;case"mouseover":return Al=Yi(Al,e,t,a,n,u),!0;case"pointerover":var o=u.pointerId;return Vi.set(o,Yi(Vi.get(o)||null,e,t,a,n,u)),!0;case"gotpointercapture":return o=u.pointerId,Bi.set(o,Yi(Bi.get(o)||null,e,t,a,n,u)),!0}return!1}function Z0(e){var t=Tn(e.target);if(t!==null){var a=m(t);if(a!==null){if(t=a.tag,t===13){if(t=b(a),t!==null){e.blockedOn=t,Pr(e.priority,function(){P0(a)});return}}else if(t===31){if(t=S(a),t!==null){e.blockedOn=t,Pr(e.priority,function(){P0(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 _c(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=sf(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Qr=n,a.target.dispatchEvent(n),Qr=null}else return t=Ce(a),t!==null&&$0(t),e.blockedOn=a,!1;t.shift()}return!0}function W0(e,t,a){_c(e)&&a.delete(t)}function Qp(){uf=!1,Rl!==null&&_c(Rl)&&(Rl=null),Dl!==null&&_c(Dl)&&(Dl=null),Al!==null&&_c(Al)&&(Al=null),Vi.forEach(W0),Bi.forEach(W0)}function kc(e,t){e.blockedOn===t&&(e.blockedOn=null,uf||(uf=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Qp)))}var zc=null;function Q0(e){zc!==e&&(zc=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){zc===e&&(zc=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(rf(n||a)===null)continue;break}var o=Ce(a);o!==null&&(e.splice(t,3),t-=3,sd(o,{pending:!0,data:u,method:a.method,action:n},n,u))}}))}function _r(e){function t(k){return kc(k,e)}Rl!==null&&kc(Rl,e),Dl!==null&&kc(Dl,e),Al!==null&&kc(Al,e),Vi.forEach(t),Bi.forEach(t);for(var a=0;a<_l.length;a++){var n=_l[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<_l.length&&(a=_l[0],a.blockedOn===null);)Z0(a),a.blockedOn===null&&_l.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var u=a[n],o=a[n+1],x=u[Ut]||null;if(typeof o=="function")x||Q0(a);else if(x){var E=null;if(o&&o.hasAttribute("formAction")){if(u=o,x=o[Ut]||null)E=x.formAction;else if(rf(u)!==null)continue}else E=x.action;typeof E=="function"?a[n+1]=E:(a.splice(n,3),n-=3),Q0(a)}}}function I0(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(x){return u=x})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.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 cf(e){this._internalRoot=e}Uc.prototype.render=cf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var a=t.current,n=Ta();B0(a,n,e,t,null,null)},Uc.prototype.unmount=cf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;B0(e.current,2,null,e,null,null),xc(),t[En]=null}};function Uc(e){this._internalRoot=e}Uc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fs();e={blockedOn:null,target:e,priority:t};for(var a=0;a<_l.length&&t!==0&&t<_l[a].priority;a++);_l.splice(a,0,e),a===0&&Z0(e)}};var X0=r.version;if(X0!=="19.2.4")throw Error(c(527,X0,"19.2.4"));re.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=p(t),e=e!==null?N(e):null,e=e===null?null:e.stateNode,e};var Ip={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Lc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Lc.isDisabled&&Lc.supportsFiber)try{ot=Lc.inject(Ip),zt=Lc}catch{}}return Pi.createRoot=function(e,t){if(!f(e))throw Error(c(299));var a=!1,n="",u=lm,o=sm,x=rm;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&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=q0(e,1,!1,null,null,a,n,null,u,o,x,I0),e[En]=t.current,$d(e),new cf(t)},Pi.hydrateRoot=function(e,t,a){if(!f(e))throw Error(c(299));var n=!1,u="",o=lm,x=sm,E=rm,k=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(o=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError),a.formState!==void 0&&(k=a.formState)),t=q0(e,1,!0,t,a??null,n,u,k,o,x,E,I0),t.context=V0(null),a=t.current,n=Ta(),n=Gs(n),u=pl(n),u.callback=null,vl(a,u,n),a=n,t.current.lanes=a,tl(t,a),pn(t),e[En]=t.current,$d(e),new Uc(t)},Pi.version="19.2.4",Pi}var cg;function uv(){if(cg)return hf.exports;cg=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(),hf.exports=iv(),hf.exports}var cv=uv();const ov=Hf(cv);/**
|
|
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 og="popstate";function dv(l={}){function r(f,m){let{pathname:b="/",search:S="",hash:v=""}=qs(f.location.hash.substring(1));return!b.startsWith("/")&&!b.startsWith(".")&&(b="/"+b),Cf("",{pathname:b,search:S,hash:v},m.state&&m.state.usr||null,m.state&&m.state.key||"default")}function d(f,m){let b=f.document.querySelector("base"),S="";if(b&&b.getAttribute("href")){let v=f.location.href,p=v.indexOf("#");S=p===-1?v:v.slice(0,p)}return S+"#"+(typeof m=="string"?m:su(m))}function c(f,m){Pa(f.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(m)})`)}return hv(r,d,c,l)}function yt(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function Pa(l,r){if(!l){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function fv(){return Math.random().toString(36).substring(2,10)}function dg(l,r){return{usr:l.state,key:l.key,idx:r}}function Cf(l,r,d=null,c){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof r=="string"?qs(r):r,state:d,key:r&&r.key||c||fv()}}function su({pathname:l="/",search:r="",hash:d=""}){return r&&r!=="?"&&(l+=r.charAt(0)==="?"?r:"?"+r),d&&d!=="#"&&(l+=d.charAt(0)==="#"?d:"#"+d),l}function qs(l){let r={};if(l){let d=l.indexOf("#");d>=0&&(r.hash=l.substring(d),l=l.substring(0,d));let c=l.indexOf("?");c>=0&&(r.search=l.substring(c),l=l.substring(0,c)),l&&(r.pathname=l)}return r}function hv(l,r,d,c={}){let{window:f=document.defaultView,v5Compat:m=!1}=c,b=f.history,S="POP",v=null,p=N();p==null&&(p=0,b.replaceState({...b.state,idx:p},""));function N(){return(b.state||{idx:null}).idx}function T(){S="POP";let R=N(),W=R==null?null:R-p;p=R,v&&v({action:S,location:C.location,delta:W})}function w(R,W){S="PUSH";let V=Cf(C.location,R,W);d&&d(V,R),p=N()+1;let ee=dg(V,p),J=C.createHref(V);try{b.pushState(ee,"",J)}catch(ue){if(ue instanceof DOMException&&ue.name==="DataCloneError")throw ue;f.location.assign(J)}m&&v&&v({action:S,location:C.location,delta:1})}function A(R,W){S="REPLACE";let V=Cf(C.location,R,W);d&&d(V,R),p=N();let ee=dg(V,p),J=C.createHref(V);b.replaceState(ee,"",J),m&&v&&v({action:S,location:C.location,delta:0})}function O(R){return mv(R)}let C={get action(){return S},get location(){return l(f,b)},listen(R){if(v)throw new Error("A history only accepts one active listener");return f.addEventListener(og,T),v=R,()=>{f.removeEventListener(og,T),v=null}},createHref(R){return r(f,R)},createURL:O,encodeLocation(R){let W=O(R);return{pathname:W.pathname,search:W.search,hash:W.hash}},push:w,replace:A,go(R){return b.go(R)}};return C}function mv(l,r=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),yt(d,"No window.location.(origin|href) available to create URL");let c=typeof l=="string"?l:su(l);return c=c.replace(/ $/,"%20"),!r&&c.startsWith("//")&&(c=d+c),new URL(c,d)}function xx(l,r,d="/"){return gv(l,r,d,!1)}function gv(l,r,d,c){let f=typeof r=="string"?qs(r):r,m=Xn(f.pathname||"/",d);if(m==null)return null;let b=yx(l);xv(b);let S=null;for(let v=0;S==null&&v<b.length;++v){let p=Cv(m);S=Ev(b[v],p,c)}return S}function yx(l,r=[],d=[],c="",f=!1){let m=(b,S,v=f,p)=>{let N={relativePath:p===void 0?b.path||"":p,caseSensitive:b.caseSensitive===!0,childrenIndex:S,route:b};if(N.relativePath.startsWith("/")){if(!N.relativePath.startsWith(c)&&v)return;yt(N.relativePath.startsWith(c),`Absolute route path "${N.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),N.relativePath=N.relativePath.slice(c.length)}let T=In([c,N.relativePath]),w=d.concat(N);b.children&&b.children.length>0&&(yt(b.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${T}".`),yx(b.children,r,w,T,v)),!(b.path==null&&!b.index)&&r.push({path:T,score:jv(T,b.index),routesMeta:w})};return l.forEach((b,S)=>{var v;if(b.path===""||!((v=b.path)!=null&&v.includes("?")))m(b,S);else for(let p of px(b.path))m(b,S,!0,p)}),r}function px(l){let r=l.split("/");if(r.length===0)return[];let[d,...c]=r,f=d.endsWith("?"),m=d.replace(/\?$/,"");if(c.length===0)return f?[m,""]:[m];let b=px(c.join("/")),S=[];return S.push(...b.map(v=>v===""?m:[m,v].join("/"))),f&&S.push(...b),S.map(v=>l.startsWith("/")&&v===""?"/":v)}function xv(l){l.sort((r,d)=>r.score!==d.score?d.score-r.score:wv(r.routesMeta.map(c=>c.childrenIndex),d.routesMeta.map(c=>c.childrenIndex)))}var yv=/^:[\w-]+$/,pv=3,vv=2,bv=1,Sv=10,Nv=-2,fg=l=>l==="*";function jv(l,r){let d=l.split("/"),c=d.length;return d.some(fg)&&(c+=Nv),r&&(c+=vv),d.filter(f=>!fg(f)).reduce((f,m)=>f+(yv.test(m)?pv:m===""?bv:Sv),c)}function wv(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 Ev(l,r,d=!1){let{routesMeta:c}=l,f={},m="/",b=[];for(let S=0;S<c.length;++S){let v=c[S],p=S===c.length-1,N=m==="/"?r:r.slice(m.length)||"/",T=Fc({path:v.relativePath,caseSensitive:v.caseSensitive,end:p},N),w=v.route;if(!T&&p&&d&&!c[c.length-1].route.index&&(T=Fc({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},N)),!T)return null;Object.assign(f,T.params),b.push({params:f,pathname:In([m,T.pathname]),pathnameBase:Dv(In([m,T.pathnameBase])),route:w}),T.pathnameBase!=="/"&&(m=In([m,T.pathnameBase]))}return b}function Fc(l,r){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[d,c]=Tv(l.path,l.caseSensitive,l.end),f=r.match(d);if(!f)return null;let m=f[0],b=m.replace(/(.)\/+$/,"$1"),S=f.slice(1);return{params:c.reduce((p,{paramName:N,isOptional:T},w)=>{if(N==="*"){let O=S[w]||"";b=m.slice(0,m.length-O.length).replace(/(.)\/+$/,"$1")}const A=S[w];return T&&!A?p[N]=void 0:p[N]=(A||"").replace(/%2F/g,"/"),p},{}),pathname:m,pathnameBase:b,pattern:l}}function Tv(l,r=!1,d=!0){Pa(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let c=[],f="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(b,S,v)=>(c.push({paramName:S,isOptional:v!=null}),v?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(c.push({paramName:"*"}),f+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?f+="\\/*$":l!==""&&l!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,r?void 0:"i"),c]}function Cv(l){try{return l.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Pa(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),l}}function Xn(l,r){if(r==="/")return l;if(!l.toLowerCase().startsWith(r.toLowerCase()))return null;let d=r.endsWith("/")?r.length-1:r.length,c=l.charAt(d);return c&&c!=="/"?null:l.slice(d)||"/"}var Mv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Ov(l,r="/"){let{pathname:d,search:c="",hash:f=""}=typeof l=="string"?qs(l):l,m;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?m=hg(d.substring(1),"/"):m=hg(d,r)):m=r,{pathname:m,search:Av(c),hash:_v(f)}}function hg(l,r){let d=r.replace(/\/+$/,"").split("/");return l.split("/").forEach(f=>{f===".."?d.length>1&&d.pop():f!=="."&&d.push(f)}),d.length>1?d.join("/"):"/"}function yf(l,r,d,c){return`Cannot include a '${l}' character in a manually specified \`to.${r}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${d}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Rv(l){return l.filter((r,d)=>d===0||r.route.path&&r.route.path.length>0)}function Vf(l){let r=Rv(l);return r.map((d,c)=>c===r.length-1?d.pathname:d.pathnameBase)}function Bf(l,r,d,c=!1){let f;typeof l=="string"?f=qs(l):(f={...l},yt(!f.pathname||!f.pathname.includes("?"),yf("?","pathname","search",f)),yt(!f.pathname||!f.pathname.includes("#"),yf("#","pathname","hash",f)),yt(!f.search||!f.search.includes("#"),yf("#","search","hash",f)));let m=l===""||f.pathname==="",b=m?"/":f.pathname,S;if(b==null)S=d;else{let T=r.length-1;if(!c&&b.startsWith("..")){let w=b.split("/");for(;w[0]==="..";)w.shift(),T-=1;f.pathname=w.join("/")}S=T>=0?r[T]:"/"}let v=Ov(f,S),p=b&&b!=="/"&&b.endsWith("/"),N=(m||b===".")&&d.endsWith("/");return!v.pathname.endsWith("/")&&(p||N)&&(v.pathname+="/"),v}var In=l=>l.join("/").replace(/\/\/+/g,"/"),Dv=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),Av=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,_v=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,kv=class{constructor(l,r,d,c=!1){this.status=l,this.statusText=r||"",this.internal=c,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function zv(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function Uv(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 d=l;if(typeof d!="string"||!Mv.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let c=d,f=!1;if(vx)try{let m=new URL(window.location.href),b=d.startsWith("//")?new URL(m.protocol+d):new URL(d),S=Xn(b.pathname,r);b.origin===m.origin&&S!=null?d=S+b.search+b.hash:f=!0}catch{Pa(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:f,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Sx=["POST","PUT","PATCH","DELETE"];new Set(Sx);var Lv=["GET",...Sx];new Set(Lv);var Hr=H.createContext(null);Hr.displayName="DataRouter";var Kc=H.createContext(null);Kc.displayName="DataRouterState";var Hv=H.createContext(!1),Nx=H.createContext({isTransitioning:!1});Nx.displayName="ViewTransition";var qv=H.createContext(new Map);qv.displayName="Fetchers";var Vv=H.createContext(null);Vv.displayName="Await";var Oa=H.createContext(null);Oa.displayName="Navigation";var iu=H.createContext(null);iu.displayName="Location";var bn=H.createContext({outlet:null,matches:[],isDataRoute:!1});bn.displayName="Route";var Yf=H.createContext(null);Yf.displayName="RouteError";var jx="REACT_ROUTER_ERROR",Bv="REDIRECT",Yv="ROUTE_ERROR_RESPONSE";function $v(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 Pv(l){if(l.startsWith(`${jx}:${Yv}:{`))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 Gv(l,{relative:r}={}){yt(qr(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:c}=H.useContext(Oa),{hash:f,pathname:m,search:b}=uu(l,{relative:r}),S=m;return d!=="/"&&(S=m==="/"?d:In([d,m])),c.createHref({pathname:S,search:b,hash:f})}function qr(){return H.useContext(iu)!=null}function $l(){return yt(qr(),"useLocation() may be used only in the context of a <Router> component."),H.useContext(iu).location}var wx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ex(l){H.useContext(Oa).static||H.useLayoutEffect(l)}function eo(){let{isDataRoute:l}=H.useContext(bn);return l?lb():Fv()}function Fv(){yt(qr(),"useNavigate() may be used only in the context of a <Router> component.");let l=H.useContext(Hr),{basename:r,navigator:d}=H.useContext(Oa),{matches:c}=H.useContext(bn),{pathname:f}=$l(),m=JSON.stringify(Vf(c)),b=H.useRef(!1);return Ex(()=>{b.current=!0}),H.useCallback((v,p={})=>{if(Pa(b.current,wx),!b.current)return;if(typeof v=="number"){d.go(v);return}let N=Bf(v,JSON.parse(m),f,p.relative==="path");l==null&&r!=="/"&&(N.pathname=N.pathname==="/"?r:In([r,N.pathname])),(p.replace?d.replace:d.push)(N,p.state,p)},[r,d,m,f,l])}H.createContext(null);function uu(l,{relative:r}={}){let{matches:d}=H.useContext(bn),{pathname:c}=$l(),f=JSON.stringify(Vf(d));return H.useMemo(()=>Bf(l,JSON.parse(f),c,r==="path"),[l,f,c,r])}function Zv(l,r){return Tx(l,r)}function Tx(l,r,d,c,f){var V;yt(qr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:m}=H.useContext(Oa),{matches:b}=H.useContext(bn),S=b[b.length-1],v=S?S.params:{},p=S?S.pathname:"/",N=S?S.pathnameBase:"/",T=S&&S.route;{let ee=T&&T.path||"";Mx(p,!T||ee.endsWith("*")||ee.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${ee}">) 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="${ee}"> to <Route path="${ee==="/"?"*":`${ee}/*`}">.`)}let w=$l(),A;if(r){let ee=typeof r=="string"?qs(r):r;yt(N==="/"||((V=ee.pathname)==null?void 0:V.startsWith(N)),`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 "${N}" but pathname "${ee.pathname}" was given in the \`location\` prop.`),A=ee}else A=w;let O=A.pathname||"/",C=O;if(N!=="/"){let ee=N.replace(/^\//,"").split("/");C="/"+O.replace(/^\//,"").split("/").slice(ee.length).join("/")}let R=xx(l,{pathname:C});Pa(T||R!=null,`No routes matched location "${A.pathname}${A.search}${A.hash}" `),Pa(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${A.pathname}${A.search}${A.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let W=Jv(R&&R.map(ee=>Object.assign({},ee,{params:Object.assign({},v,ee.params),pathname:In([N,m.encodeLocation?m.encodeLocation(ee.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:ee.pathname]),pathnameBase:ee.pathnameBase==="/"?N:In([N,m.encodeLocation?m.encodeLocation(ee.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:ee.pathnameBase])})),b,d,c,f);return r&&W?H.createElement(iu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...A},navigationType:"POP"}},W):W}function Wv(){let l=nb(),r=zv(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),d=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},b=null;return console.error("Error handled by React Router default ErrorBoundary:",l),b=H.createElement(H.Fragment,null,H.createElement("p",null,"💿 Hey developer 👋"),H.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",H.createElement("code",{style:m},"ErrorBoundary")," or"," ",H.createElement("code",{style:m},"errorElement")," prop on your route.")),H.createElement(H.Fragment,null,H.createElement("h2",null,"Unexpected Application Error!"),H.createElement("h3",{style:{fontStyle:"italic"}},r),d?H.createElement("pre",{style:f},d):null,b)}var Qv=H.createElement(Wv,null),Cx=class extends H.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 d=Pv(l.digest);d&&(l=d)}let r=l!==void 0?H.createElement(bn.Provider,{value:this.props.routeContext},H.createElement(Yf.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?H.createElement(Iv,{error:l},r):r}};Cx.contextType=Hv;var pf=new WeakMap;function Iv({children:l,error:r}){let{basename:d}=H.useContext(Oa);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let c=$v(r.digest);if(c){let f=pf.get(r);if(f)throw f;let m=bx(c.location,d);if(vx&&!pf.get(r))if(m.isExternal||c.reloadDocument)window.location.href=m.absoluteURL||m.to;else{const b=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:c.replace}));throw pf.set(r,b),b}return H.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m.absoluteURL||m.to}`})}}return l}function Xv({routeContext:l,match:r,children:d}){let c=H.useContext(Hr);return c&&c.static&&c.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=r.route.id),H.createElement(bn.Provider,{value:l},d)}function Jv(l,r=[],d=null,c=null,f=null){if(l==null){if(!d)return null;if(d.errors)l=d.matches;else if(r.length===0&&!d.initialized&&d.matches.length>0)l=d.matches;else return null}let m=l,b=d==null?void 0:d.errors;if(b!=null){let N=m.findIndex(T=>T.route.id&&(b==null?void 0:b[T.route.id])!==void 0);yt(N>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(b).join(",")}`),m=m.slice(0,Math.min(m.length,N+1))}let S=!1,v=-1;if(d)for(let N=0;N<m.length;N++){let T=m[N];if((T.route.HydrateFallback||T.route.hydrateFallbackElement)&&(v=N),T.route.id){let{loaderData:w,errors:A}=d,O=T.route.loader&&!w.hasOwnProperty(T.route.id)&&(!A||A[T.route.id]===void 0);if(T.route.lazy||O){S=!0,v>=0?m=m.slice(0,v+1):m=[m[0]];break}}}let p=d&&c?(N,T)=>{var w,A;c(N,{location:d.location,params:((A=(w=d.matches)==null?void 0:w[0])==null?void 0:A.params)??{},unstable_pattern:Uv(d.matches),errorInfo:T})}:void 0;return m.reduceRight((N,T,w)=>{let A,O=!1,C=null,R=null;d&&(A=b&&T.route.id?b[T.route.id]:void 0,C=T.route.errorElement||Qv,S&&(v<0&&w===0?(Mx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),O=!0,R=null):v===w&&(O=!0,R=T.route.hydrateFallbackElement||null)));let W=r.concat(m.slice(0,w+1)),V=()=>{let ee;return A?ee=C:O?ee=R:T.route.Component?ee=H.createElement(T.route.Component,null):T.route.element?ee=T.route.element:ee=N,H.createElement(Xv,{match:T,routeContext:{outlet:N,matches:W,isDataRoute:d!=null},children:ee})};return d&&(T.route.ErrorBoundary||T.route.errorElement||w===0)?H.createElement(Cx,{location:d.location,revalidation:d.revalidation,component:C,error:A,children:V(),routeContext:{outlet:null,matches:W,isDataRoute:!0},onError:p}):V()},null)}function $f(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kv(l){let r=H.useContext(Hr);return yt(r,$f(l)),r}function eb(l){let r=H.useContext(Kc);return yt(r,$f(l)),r}function tb(l){let r=H.useContext(bn);return yt(r,$f(l)),r}function Pf(l){let r=tb(l),d=r.matches[r.matches.length-1];return yt(d.route.id,`${l} can only be used on routes that contain a unique "id"`),d.route.id}function ab(){return Pf("useRouteId")}function nb(){var c;let l=H.useContext(Yf),r=eb("useRouteError"),d=Pf("useRouteError");return l!==void 0?l:(c=r.errors)==null?void 0:c[d]}function lb(){let{router:l}=Kv("useNavigate"),r=Pf("useNavigate"),d=H.useRef(!1);return Ex(()=>{d.current=!0}),H.useCallback(async(f,m={})=>{Pa(d.current,wx),d.current&&(typeof f=="number"?await l.navigate(f):await l.navigate(f,{fromRouteId:r,...m}))},[l,r])}var mg={};function Mx(l,r,d){!r&&!mg[l]&&(mg[l]=!0,Pa(!1,d))}H.memo(sb);function sb({routes:l,future:r,state:d,onError:c}){return Tx(l,void 0,d,c,r)}function rb({to:l,replace:r,state:d,relative:c}){yt(qr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:f}=H.useContext(Oa);Pa(!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}=H.useContext(bn),{pathname:b}=$l(),S=eo(),v=Bf(l,Vf(m),b,c==="path"),p=JSON.stringify(v);return H.useEffect(()=>{S(JSON.parse(p),{replace:r,state:d,relative:c})},[S,p,c,r,d]),null}function Qn(l){yt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function ib({basename:l="/",children:r=null,location:d,navigationType:c="POP",navigator:f,static:m=!1,unstable_useTransitions:b}){yt(!qr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let S=l.replace(/^\/*/,"/"),v=H.useMemo(()=>({basename:S,navigator:f,static:m,unstable_useTransitions:b,future:{}}),[S,f,m,b]);typeof d=="string"&&(d=qs(d));let{pathname:p="/",search:N="",hash:T="",state:w=null,key:A="default"}=d,O=H.useMemo(()=>{let C=Xn(p,S);return C==null?null:{location:{pathname:C,search:N,hash:T,state:w,key:A},navigationType:c}},[S,p,N,T,w,A,c]);return Pa(O!=null,`<Router basename="${S}"> is not able to match the URL "${p}${N}${T}" because it does not start with the basename, so the <Router> won't render anything.`),O==null?null:H.createElement(Oa.Provider,{value:v},H.createElement(iu.Provider,{children:r,value:O}))}function ub({children:l,location:r}){return Zv(Mf(l),r)}function Mf(l,r=[]){let d=[];return H.Children.forEach(l,(c,f)=>{if(!H.isValidElement(c))return;let m=[...r,f];if(c.type===H.Fragment){d.push.apply(d,Mf(c.props.children,m));return}yt(c.type===Qn,`[${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>`),yt(!c.props.index||!c.props.children,"An index route cannot have child routes.");let b={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&&(b.children=Mf(c.props.children,m)),d.push(b)}),d}var Pc="get",Gc="application/x-www-form-urlencoded";function to(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function cb(l){return to(l)&&l.tagName.toLowerCase()==="button"}function ob(l){return to(l)&&l.tagName.toLowerCase()==="form"}function db(l){return to(l)&&l.tagName.toLowerCase()==="input"}function fb(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function hb(l,r){return l.button===0&&(!r||r==="_self")&&!fb(l)}var Hc=null;function mb(){if(Hc===null)try{new FormData(document.createElement("form"),0),Hc=!1}catch{Hc=!0}return Hc}var gb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vf(l){return l!=null&&!gb.has(l)?(Pa(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Gc}"`),null):l}function xb(l,r){let d,c,f,m,b;if(ob(l)){let S=l.getAttribute("action");c=S?Xn(S,r):null,d=l.getAttribute("method")||Pc,f=vf(l.getAttribute("enctype"))||Gc,m=new FormData(l)}else if(cb(l)||db(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 v=l.getAttribute("formaction")||S.getAttribute("action");if(c=v?Xn(v,r):null,d=l.getAttribute("formmethod")||S.getAttribute("method")||Pc,f=vf(l.getAttribute("formenctype"))||vf(S.getAttribute("enctype"))||Gc,m=new FormData(S,l),!mb()){let{name:p,type:N,value:T}=l;if(N==="image"){let w=p?`${p}.`:"";m.append(`${w}x`,"0"),m.append(`${w}y`,"0")}else p&&m.append(p,T)}}else{if(to(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Pc,c=null,f=Gc,b=l}return m&&f==="text/plain"&&(b=m,m=void 0),{action:c,method:d.toLowerCase(),encType:f,formData:m,body:b}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Gf(l,r){if(l===!1||l===null||typeof l>"u")throw new Error(r)}function yb(l,r,d,c){let f=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return d?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${c}`:f.pathname=`${f.pathname}.${c}`:f.pathname==="/"?f.pathname=`_root.${c}`:r&&Xn(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 d=await import(l.module);return r[l.id]=d,d}catch(d){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function vb(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 bb(l,r,d){let c=await Promise.all(l.map(async f=>{let m=r.routes[f.route.id];if(m){let b=await pb(m,d);return b.links?b.links():[]}return[]}));return wb(c.flat(1).filter(vb).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function gg(l,r,d,c,f,m){let b=(v,p)=>d[p]?v.route.id!==d[p].route.id:!0,S=(v,p)=>{var N;return d[p].pathname!==v.pathname||((N=d[p].route.path)==null?void 0:N.endsWith("*"))&&d[p].params["*"]!==v.params["*"]};return m==="assets"?r.filter((v,p)=>b(v,p)||S(v,p)):m==="data"?r.filter((v,p)=>{var T;let N=c.routes[v.route.id];if(!N||!N.hasLoader)return!1;if(b(v,p)||S(v,p))return!0;if(v.route.shouldRevalidate){let w=v.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((T=d[0])==null?void 0:T.params)||{},nextUrl:new URL(l,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof w=="boolean")return w}return!0}):[]}function Sb(l,r,{includeHydrateFallback:d}={}){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)),d&&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 jb(l){let r={},d=Object.keys(l).sort();for(let c of d)r[c]=l[c];return r}function wb(l,r){let d=new Set;return new Set(r),l.reduce((c,f)=>{let m=JSON.stringify(jb(f));return d.has(m)||(d.add(m),c.push({key:m,link:f})),c},[])}function Ox(){let l=H.useContext(Hr);return Gf(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function Eb(){let l=H.useContext(Kc);return Gf(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Ff=H.createContext(void 0);Ff.displayName="FrameworkContext";function Rx(){let l=H.useContext(Ff);return Gf(l,"You must render this element inside a <HydratedRouter> element"),l}function Tb(l,r){let d=H.useContext(Ff),[c,f]=H.useState(!1),[m,b]=H.useState(!1),{onFocus:S,onBlur:v,onMouseEnter:p,onMouseLeave:N,onTouchStart:T}=r,w=H.useRef(null);H.useEffect(()=>{if(l==="render"&&b(!0),l==="viewport"){let C=W=>{W.forEach(V=>{b(V.isIntersecting)})},R=new IntersectionObserver(C,{threshold:.5});return w.current&&R.observe(w.current),()=>{R.disconnect()}}},[l]),H.useEffect(()=>{if(c){let C=setTimeout(()=>{b(!0)},100);return()=>{clearTimeout(C)}}},[c]);let A=()=>{f(!0)},O=()=>{f(!1),b(!1)};return d?l!=="intent"?[m,w,{}]:[m,w,{onFocus:Gi(S,A),onBlur:Gi(v,O),onMouseEnter:Gi(p,A),onMouseLeave:Gi(N,O),onTouchStart:Gi(T,A)}]:[!1,w,{}]}function Gi(l,r){return d=>{l&&l(d),d.defaultPrevented||r(d)}}function Cb({page:l,...r}){let{router:d}=Ox(),c=H.useMemo(()=>xx(d.routes,l,d.basename),[d.routes,l,d.basename]);return c?H.createElement(Ob,{page:l,matches:c,...r}):null}function Mb(l){let{manifest:r,routeModules:d}=Rx(),[c,f]=H.useState([]);return H.useEffect(()=>{let m=!1;return bb(l,r,d).then(b=>{m||f(b)}),()=>{m=!0}},[l,r,d]),c}function Ob({page:l,matches:r,...d}){let c=$l(),{future:f,manifest:m,routeModules:b}=Rx(),{basename:S}=Ox(),{loaderData:v,matches:p}=Eb(),N=H.useMemo(()=>gg(l,r,p,m,c,"data"),[l,r,p,m,c]),T=H.useMemo(()=>gg(l,r,p,m,c,"assets"),[l,r,p,m,c]),w=H.useMemo(()=>{if(l===c.pathname+c.search+c.hash)return[];let C=new Set,R=!1;if(r.forEach(V=>{var J;let ee=m.routes[V.route.id];!ee||!ee.hasLoader||(!N.some(ue=>ue.route.id===V.route.id)&&V.route.id in v&&((J=b[V.route.id])!=null&&J.shouldRevalidate)||ee.hasClientLoader?R=!0:C.add(V.route.id))}),C.size===0)return[];let W=yb(l,S,f.unstable_trailingSlashAwareDataRequests,"data");return R&&C.size>0&&W.searchParams.set("_routes",r.filter(V=>C.has(V.route.id)).map(V=>V.route.id).join(",")),[W.pathname+W.search]},[S,f.unstable_trailingSlashAwareDataRequests,v,c,m,N,r,l,b]),A=H.useMemo(()=>Sb(T,m),[T,m]),O=Mb(T);return H.createElement(H.Fragment,null,w.map(C=>H.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...d})),A.map(C=>H.createElement("link",{key:C,rel:"modulepreload",href:C,...d})),O.map(({key:C,link:R})=>H.createElement("link",{key:C,nonce:d.nonce,...R,crossOrigin:R.crossOrigin??d.crossOrigin})))}function Rb(...l){return r=>{l.forEach(d=>{typeof d=="function"?d(r):d!=null&&(d.current=r)})}}var Db=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Db&&(window.__reactRouterVersion="7.13.0")}catch{}function Ab({basename:l,children:r,unstable_useTransitions:d,window:c}){let f=H.useRef();f.current==null&&(f.current=dv({window:c,v5Compat:!0}));let m=f.current,[b,S]=H.useState({action:m.action,location:m.location}),v=H.useCallback(p=>{d===!1?S(p):H.startTransition(()=>S(p))},[d]);return H.useLayoutEffect(()=>m.listen(v),[m,v]),H.createElement(ib,{basename:l,children:r,location:b.location,navigationType:b.action,navigator:m,unstable_useTransitions:d})}var Dx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ax=H.forwardRef(function({onClick:r,discover:d="render",prefetch:c="none",relative:f,reloadDocument:m,replace:b,state:S,target:v,to:p,preventScrollReset:N,viewTransition:T,unstable_defaultShouldRevalidate:w,...A},O){let{basename:C,unstable_useTransitions:R}=H.useContext(Oa),W=typeof p=="string"&&Dx.test(p),V=bx(p,C);p=V.to;let ee=Gv(p,{relative:f}),[J,ue,$]=Tb(c,A),F=zb(p,{replace:b,state:S,target:v,preventScrollReset:N,relative:f,viewTransition:T,unstable_defaultShouldRevalidate:w,unstable_useTransitions:R});function P(_){r&&r(_),_.defaultPrevented||F(_)}let M=H.createElement("a",{...A,...$,href:V.absoluteURL||ee,onClick:V.isExternal||m?r:P,ref:Rb(O,ue),target:v,"data-discover":!W&&d==="render"?"true":void 0});return J&&!W?H.createElement(H.Fragment,null,M,H.createElement(Cb,{page:ee})):M});Ax.displayName="Link";var _x=H.forwardRef(function({"aria-current":r="page",caseSensitive:d=!1,className:c="",end:f=!1,style:m,to:b,viewTransition:S,children:v,...p},N){let T=uu(b,{relative:p.relative}),w=$l(),A=H.useContext(Kc),{navigator:O,basename:C}=H.useContext(Oa),R=A!=null&&Vb(T)&&S===!0,W=O.encodeLocation?O.encodeLocation(T).pathname:T.pathname,V=w.pathname,ee=A&&A.navigation&&A.navigation.location?A.navigation.location.pathname:null;d||(V=V.toLowerCase(),ee=ee?ee.toLowerCase():null,W=W.toLowerCase()),ee&&C&&(ee=Xn(ee,C)||ee);const J=W!=="/"&&W.endsWith("/")?W.length-1:W.length;let ue=V===W||!f&&V.startsWith(W)&&V.charAt(J)==="/",$=ee!=null&&(ee===W||!f&&ee.startsWith(W)&&ee.charAt(W.length)==="/"),F={isActive:ue,isPending:$,isTransitioning:R},P=ue?r:void 0,M;typeof c=="function"?M=c(F):M=[c,ue?"active":null,$?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let _=typeof m=="function"?m(F):m;return H.createElement(Ax,{...p,"aria-current":P,className:M,ref:N,style:_,to:b,viewTransition:S},typeof v=="function"?v(F):v)});_x.displayName="NavLink";var _b=H.forwardRef(({discover:l="render",fetcherKey:r,navigate:d,reloadDocument:c,replace:f,state:m,method:b=Pc,action:S,onSubmit:v,relative:p,preventScrollReset:N,viewTransition:T,unstable_defaultShouldRevalidate:w,...A},O)=>{let{unstable_useTransitions:C}=H.useContext(Oa),R=Hb(),W=qb(S,{relative:p}),V=b.toLowerCase()==="get"?"get":"post",ee=typeof S=="string"&&Dx.test(S),J=ue=>{if(v&&v(ue),ue.defaultPrevented)return;ue.preventDefault();let $=ue.nativeEvent.submitter,F=($==null?void 0:$.getAttribute("formmethod"))||b,P=()=>R($||ue.currentTarget,{fetcherKey:r,method:F,navigate:d,replace:f,state:m,relative:p,preventScrollReset:N,viewTransition:T,unstable_defaultShouldRevalidate:w});C&&d!==!1?H.startTransition(()=>P()):P()};return H.createElement("form",{ref:O,method:V,action:W,onSubmit:c?v:J,...A,"data-discover":!ee&&l==="render"?"true":void 0})});_b.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 kx(l){let r=H.useContext(Hr);return yt(r,kb(l)),r}function zb(l,{target:r,replace:d,state:c,preventScrollReset:f,relative:m,viewTransition:b,unstable_defaultShouldRevalidate:S,unstable_useTransitions:v}={}){let p=eo(),N=$l(),T=uu(l,{relative:m});return H.useCallback(w=>{if(hb(w,r)){w.preventDefault();let A=d!==void 0?d:su(N)===su(T),O=()=>p(l,{replace:A,state:c,preventScrollReset:f,relative:m,viewTransition:b,unstable_defaultShouldRevalidate:S});v?H.startTransition(()=>O()):O()}},[N,p,T,d,c,r,l,f,m,b,S,v])}var Ub=0,Lb=()=>`__${String(++Ub)}__`;function Hb(){let{router:l}=kx("useSubmit"),{basename:r}=H.useContext(Oa),d=ab(),c=l.fetch,f=l.navigate;return H.useCallback(async(m,b={})=>{let{action:S,method:v,encType:p,formData:N,body:T}=xb(m,r);if(b.navigate===!1){let w=b.fetcherKey||Lb();await c(w,d,b.action||S,{unstable_defaultShouldRevalidate:b.unstable_defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:N,body:T,formMethod:b.method||v,formEncType:b.encType||p,flushSync:b.flushSync})}else await f(b.action||S,{unstable_defaultShouldRevalidate:b.unstable_defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:N,body:T,formMethod:b.method||v,formEncType:b.encType||p,replace:b.replace,state:b.state,fromRouteId:d,flushSync:b.flushSync,viewTransition:b.viewTransition})},[c,f,r,d])}function qb(l,{relative:r}={}){let{basename:d}=H.useContext(Oa),c=H.useContext(bn);yt(c,"useFormAction must be used inside a RouteContext");let[f]=c.matches.slice(-1),m={...uu(l||".",{relative:r})},b=$l();if(l==null){m.search=b.search;let S=new URLSearchParams(m.search),v=S.getAll("index");if(v.some(N=>N==="")){S.delete("index"),v.filter(T=>T).forEach(T=>S.append("index",T));let N=S.toString();m.search=N?`?${N}`:""}}return(!l||l===".")&&f.route.index&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(m.pathname=m.pathname==="/"?d:In([d,m.pathname])),su(m)}function Vb(l,{relative:r}={}){let d=H.useContext(Nx);yt(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=kx("useViewTransitionState"),f=uu(l,{relative:r});if(!d.isTransitioning)return!1;let m=Xn(d.currentLocation.pathname,c)||d.currentLocation.pathname,b=Xn(d.nextLocation.pathname,c)||d.nextLocation.pathname;return Fc(f.pathname,b)!=null||Fc(f.pathname,m)!=null}var Bb=gx();const Yb=Hf(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,d,c)=>!!r&&r.trim()!==""&&c.indexOf(r)===d).join(" ").trim();/**
|
|
66
|
-
* @license lucide-react v0.564.0 - ISC
|
|
67
|
-
*
|
|
68
|
-
* This source code is licensed under the ISC license.
|
|
69
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/const $b=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 Pb=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,d,c)=>c?c.toUpperCase():d.toLowerCase());/**
|
|
76
|
-
* @license lucide-react v0.564.0 - ISC
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the ISC license.
|
|
79
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const xg=l=>{const r=Pb(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 Gb={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 Fb=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 Zb=H.forwardRef(({color:l="currentColor",size:r=24,strokeWidth:d=2,absoluteStrokeWidth:c,className:f="",children:m,iconNode:b,...S},v)=>H.createElement("svg",{ref:v,...Gb,width:r,height:r,stroke:l,strokeWidth:c?Number(d)*24/Number(r):d,className:zx("lucide",f),...!m&&!Fb(S)&&{"aria-hidden":"true"},...S},[...b.map(([p,N])=>H.createElement(p,N)),...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 Oe=(l,r)=>{const d=H.forwardRef(({className:c,...f},m)=>H.createElement(Zb,{ref:m,iconNode:r,className:zx(`lucide-${$b(xg(l))}`,`lucide-${l}`,c),...f}));return d.displayName=xg(l),d};/**
|
|
101
|
-
* @license lucide-react v0.564.0 - ISC
|
|
102
|
-
*
|
|
103
|
-
* This source code is licensed under the ISC license.
|
|
104
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const Wb=[["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=Oe("activity",Wb);/**
|
|
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 Qb=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Ib=Oe("arrow-down",Qb);/**
|
|
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 Xb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],yg=Oe("arrow-right",Xb);/**
|
|
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 Jb=[["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"}]],Kb=Oe("arrow-up-down",Jb);/**
|
|
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 e1=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],t1=Oe("arrow-up",e1);/**
|
|
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 a1=[["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"}]],n1=Oe("bell",a1);/**
|
|
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 l1=[["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"}]],pg=Oe("briefcase",l1);/**
|
|
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 s1=[["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"}]],Lx=Oe("calendar",s1);/**
|
|
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 r1=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],Hx=Oe("chart-column",r1);/**
|
|
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"}]],u1=Oe("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 c1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Zf=Oe("chevron-down",c1);/**
|
|
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 o1=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],d1=Oe("chevron-left",o1);/**
|
|
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 f1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],h1=Oe("chevron-right",f1);/**
|
|
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 m1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],g1=Oe("chevron-up",m1);/**
|
|
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 x1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],y1=Oe("chevrons-up-down",x1);/**
|
|
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"}]],vn=Oe("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 v1=[["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"}]],vg=Oe("circle-arrow-down",v1);/**
|
|
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 b1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],S1=Oe("circle-check",b1);/**
|
|
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 N1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],cu=Oe("circle-check-big",N1);/**
|
|
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 j1=[["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"}]],w1=Oe("circle-x",j1);/**
|
|
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 E1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],qx=Oe("clock",E1);/**
|
|
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 T1=[["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"}]],Vx=Oe("external-link",T1);/**
|
|
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 C1=[["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"}]],M1=Oe("eye-off",C1);/**
|
|
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 O1=[["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"}]],Bx=Oe("eye",O1);/**
|
|
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 R1=[["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"}]],Of=Oe("file-text",R1);/**
|
|
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 D1=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Yx=Oe("git-merge",D1);/**
|
|
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:"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"}]],Wf=Oe("git-pull-request",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=[["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=Oe("globe",_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 z1=[["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"}]],U1=Oe("house",z1);/**
|
|
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 L1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],H1=Oe("info",L1);/**
|
|
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 q1=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],V1=Oe("kanban",q1);/**
|
|
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 B1=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M7 12H3",key:"13ou7f"}],["path",{d:"M7 19H3",key:"wbqt3n"}],["path",{d:"M12 18a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L11 14",key:"qth677"}],["path",{d:"M11 10v4h4",key:"172dkj"}]],bg=Oe("list-restart",B1);/**
|
|
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:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],$x=Oe("loader-circle",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 $1=[["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"}]],Px=Oe("map",$1);/**
|
|
271
|
-
* @license lucide-react v0.564.0 - ISC
|
|
272
|
-
*
|
|
273
|
-
* This source code is licensed under the ISC license.
|
|
274
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
-
*/const P1=[["path",{d:"M5 12h14",key:"1ays0h"}]],G1=Oe("minus",P1);/**
|
|
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=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],Gx=Oe("panels-top-left",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=[["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"}]],Fx=Oe("pause",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:"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"}]],ao=Oe("pen",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:"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"}]],Yl=Oe("play",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 I1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Vs=Oe("plus",I1);/**
|
|
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 X1=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Sg=Oe("refresh-cw",X1);/**
|
|
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 J1=[["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"}]],Zx=Oe("rotate-ccw",J1);/**
|
|
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 K1=[["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"}]],e2=Oe("save",K1);/**
|
|
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 t2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ou=Oe("search",t2);/**
|
|
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 a2=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Ng=Oe("settings-2",a2);/**
|
|
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 n2=[["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"}]],l2=Oe("settings",n2);/**
|
|
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 s2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],jg=Oe("square",s2);/**
|
|
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 r2=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],i2=Oe("terminal",r2);/**
|
|
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 u2=[["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"}]],Vr=Oe("trash-2",u2);/**
|
|
346
|
-
* @license lucide-react v0.564.0 - ISC
|
|
347
|
-
*
|
|
348
|
-
* This source code is licensed under the ISC license.
|
|
349
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
-
*/const c2=[["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"}]],Ur=Oe("triangle-alert",c2);/**
|
|
351
|
-
* @license lucide-react v0.564.0 - ISC
|
|
352
|
-
*
|
|
353
|
-
* This source code is licensed under the ISC license.
|
|
354
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
-
*/const o2=[["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"}]],d2=Oe("wifi",o2);/**
|
|
356
|
-
* @license lucide-react v0.564.0 - ISC
|
|
357
|
-
*
|
|
358
|
-
* This source code is licensed under the ISC license.
|
|
359
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
-
*/const f2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Br=Oe("x",f2);/**
|
|
361
|
-
* @license lucide-react v0.564.0 - ISC
|
|
362
|
-
*
|
|
363
|
-
* This source code is licensed under the ISC license.
|
|
364
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
-
*/const h2=[["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"}]],wg=Oe("zap",h2),Wx=[{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"}}],Qx=[{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 m2(l){return Qx.find(r=>r.id===l)}const Qf="";let If=!1,Zc=null;function g2(l){If=l}function Eg(l){Zc=l}function x2(){return If}function Xf(l){return encodeURIComponent(l.replace(/\//g,"~"))}function Mt(l){return If&&Zc?l.replace("/api/",`/api/projects/${Xf(Zc)}/`):l}function y2(){return it("/api/mode")}function Ix(){return it("/api/projects")}function p2(l){const r=Xf(l);return it(`/api/projects/${r}`,{method:"DELETE"})}async function it(l,r){const d=`${Qf}${l}`,c=await fetch(d,{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 bf(){return it(Mt("/api/status"))}function Xx(){return it(Mt("/api/prs"))}function v2(l,r){const d=`?lines=${encodeURIComponent(r)}`;return it(Mt(`/api/logs/${encodeURIComponent(l)}${d}`))}function Jf(){return it(Mt("/api/config"))}async function Jx(){if(x2()){const r=(await Ix()).filter(c=>c.valid);return(await Promise.all(r.map(async c=>{try{const f=await it(`/api/projects/${Xf(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 Jf();return[{projectId:Zc||"current",config:l}]}}function Kf(l){return it(Mt("/api/config"),{method:"PUT",body:JSON.stringify(l)})}function b2(){return it(Mt("/api/doctor"))}function Kx(){return it(Mt("/api/schedule-info"))}function S2(){return it(Mt("/api/actions/review"),{method:"POST"})}function ey(l){const r=m2(l);return r?it(Mt(r.triggerEndpoint),{method:"POST"}):Promise.reject(new Error(`Unknown job ID: ${l}`))}function Rf(){return it(Mt("/api/actions/install-cron"),{method:"POST"})}function N2(){return it(Mt("/api/actions/uninstall-cron"),{method:"POST"})}function j2(l="all"){return it(Mt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:l})})}const Bl=["Draft","Ready","In Progress","Review","Done"];function ty(){return it(Mt("/api/board/status"))}function w2(l){return it(Mt("/api/board/issues"),{method:"POST",body:JSON.stringify(l)})}function ay(l,r){return it(Mt(`/api/board/issues/${l}/move`),{method:"PATCH",body:JSON.stringify({column:r})})}async function E2(l){const r=`${Qf}${Mt(`/api/board/issues/${l}`)}`,d=await fetch(r,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!d.ok){const c=await d.json().catch(()=>({error:"Unknown error"}));throw new Error(c.error||`HTTP ${d.status}: ${d.statusText}`)}}function T2(){return it(Mt("/api/actions/clear-lock"),{method:"POST"})}function C2(l,r=[],d){const c=(d==null?void 0:d.enabled)??!0,f=H.useRef(l);f.current=l,H.useEffect(()=>{if(!c)return;const m=`${Qf}${Mt("/api/status/events")}`,b=new EventSource(m);return b.addEventListener("status_changed",S=>{try{const v=JSON.parse(S.data);f.current(v)}catch{}}),()=>{b.close()}},[c,...r])}function Tg(){return it("/api/queue/status")}function M2(l){const r=`?window=${encodeURIComponent(l)}`;return it(`/api/queue/analytics${r}`)}function O2(l){return it("/api/queue/clear",{method:"POST",body:JSON.stringify({force:!1})})}function R2(){return it("/api/global-notifications")}function Cg(l){return it("/api/global-notifications",{method:"PUT",body:JSON.stringify(l)})}function D2(){return it(Mt("/api/roadmap"))}function A2(){return it(Mt("/api/roadmap/scan"),{method:"POST"})}function ny(l){return it(Mt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:l})})}function rn(l,r=[],d){const c=(d==null?void 0:d.enabled)??!0,[f,m]=H.useState(null),[b,S]=H.useState(!0),[v,p]=H.useState(null),N=H.useRef(l);N.current=l;const T=H.useRef(()=>{(async()=>{p(null);try{const A=await N.current();m(A)}catch(A){p(A instanceof Error?A:new Error("Unknown error"))}})()});return H.useEffect(()=>{if(!c)return;let w=!1;return S(!0),p(null),(async()=>{try{const O=await N.current();w||m(O)}catch(O){w||p(O instanceof Error?O:new Error("Unknown error"))}finally{w||S(!1)}})(),()=>{w=!0}},[...r,c]),{data:f,loading:b,error:v,refetch:T.current}}const Mg=l=>{let r;const d=new Set,c=(p,N)=>{const T=typeof p=="function"?p(r):p;if(!Object.is(T,r)){const w=r;r=N??(typeof T!="object"||T===null)?T:Object.assign({},r,T),d.forEach(A=>A(r,w))}},f=()=>r,S={setState:c,getState:f,getInitialState:()=>v,subscribe:p=>(d.add(p),()=>d.delete(p))},v=r=l(c,f,S);return S},_2=l=>l?Mg(l):Mg,k2=l=>l;function z2(l,r=k2){const d=Me.useSyncExternalStore(l.subscribe,()=>r(l.getState()),()=>r(l.getInitialState()));return Me.useDebugValue(d),d}const Og=l=>{const r=_2(l),d=c=>z2(r,c);return Object.assign(d,r),d},U2=l=>l?Og(l):Og,L2=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,$t=U2((l,r)=>({projectName:"Night Watch",setProjectName:d=>l({projectName:d}),toasts:[],addToast:d=>{const c=Math.random().toString(36).substring(7);l(f=>({toasts:[...f.toasts,{...d,id:c}]})),setTimeout(()=>{l(f=>({toasts:f.toasts.filter(m=>m.id!==c)}))},5e3)},removeToast:d=>l(c=>({toasts:c.toasts.filter(f=>f.id!==d)})),status:null,setStatus:d=>l(c=>!c.status||new Date(d.timestamp)>new Date(c.status.timestamp)?{status:d}:c),globalModeLoading:!0,setGlobalModeLoading:d=>l({globalModeLoading:d}),isGlobalMode:!1,setGlobalMode:d=>{g2(d),l({isGlobalMode:d})},projects:[],setProjects:d=>l({projects:d}),selectedProjectId:L2,selectProject:d=>{Eg(d),d?localStorage.setItem("nw-selected-project",d):localStorage.removeItem("nw-selected-project"),l(c=>{const f=c.projects.find(m=>m.name===d);return{selectedProjectId:d,...f?{projectName:f.name}:{}}})},removeProjectFromList:d=>{l(c=>{var S;const f=c.projects.filter(v=>v.name!==d),m=c.selectedProjectId===d,b=m?((S=f[0])==null?void 0:S.name)??null:c.selectedProjectId;return m&&(Eg(b),b?localStorage.setItem("nw-selected-project",b):localStorage.removeItem("nw-selected-project")),{projects:f,selectedProjectId:b,...m&&f[0]?{projectName:f[0].name}:{}}})},getJobStates:()=>{const{status:d}=r(),c=d==null?void 0:d.config;return Qx.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}))}})),H2=()=>{const[l,r]=H.useState(!1),{projectName:d,isGlobalMode:c,projects:f,selectedProjectId:m,selectProject:b,globalModeLoading:S}=$t(),{data:v}=rn(Xx,[m],{enabled:!S}),p=(v==null?void 0:v.length)??0,N=H.useMemo(()=>[{icon:U1,label:"Dashboard",path:"/",section:"Overview"},{icon:i2,label:"Logs",path:"/logs"},{icon:V1,label:"Board",path:"/board",section:"Work"},{icon:Wf,label:"Pull Requests",path:"/prs",badge:p},{icon:Px,label:"Roadmap",path:"/roadmap"},{icon:Lx,label:"Schedules",path:"/scheduling",section:"Automation"},{icon:l2,label:"Settings",path:"/settings",section:"Config"}],[p]);return s.jsxs("aside",{className:`
|
|
366
|
-
relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
|
|
367
|
-
${l?"w-20":"w-72"} h-screen flex-shrink-0 z-50
|
|
368
|
-
bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
|
|
369
|
-
`,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(pg,{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=>b(T.target.value),className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 pl-10 pr-8 text-sm font-medium shadow-sm appearance-none cursor-pointer hover:border-white/20 transition-colors focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20",children:f.filter(T=>T.valid).map(T=>s.jsx("option",{value:T.name,children:T.name},T.name))}),s.jsx(y1,{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(pg,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:d})]})]})}),s.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:s.jsx("ul",{className:"space-y-1.5 px-4",children:N.map(T=>s.jsxs(Me.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(_x,{to:T.path,className:({isActive:w})=>`
|
|
370
|
-
flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
|
|
371
|
-
${w?"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"}
|
|
372
|
-
${l?"justify-center":""}
|
|
373
|
-
`,children:({isActive:w})=>s.jsxs(s.Fragment,{children:[s.jsx(T.icon,{className:`h-5 w-5 transition-colors ${w?"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 ${w?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:T.badge})),w&&!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(h1,{className:"h-5 w-5"}):s.jsx(d1,{className:"h-5 w-5"})})})]})},q2=()=>{const{projectName:l}=$t();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(d2,{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(ou,{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(n1,{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"})]})]})},V2=({toast:l,onDismiss:r})=>{const d={success:s.jsx(cu,{className:"h-5 w-5 text-green-400"}),error:s.jsx(vn,{className:"h-5 w-5 text-red-400"}),info:s.jsx(H1,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(Ur,{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:`
|
|
374
|
-
pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
|
|
375
|
-
bg-slate-900 border border-slate-800 border-l-4 ${c[l.type]}
|
|
376
|
-
shadow-lg ring-1 ring-black ring-opacity-5 transition-all
|
|
377
|
-
animate-in slide-in-from-right-full fade-in duration-300
|
|
378
|
-
`,children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:d[l.type]}),s.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:l.title}),l.message&&s.jsx("p",{className:"mt-1 text-sm text-slate-400",children:l.message})]}),s.jsx("div",{className:"ml-4 flex flex-shrink-0",children:s.jsxs("button",{type:"button",className:"inline-flex rounded-md text-slate-400 hover:text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",onClick:()=>r(l.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(Br,{className:"h-5 w-5"})]})})]})})})},B2=()=>{const{toasts:l,removeToast:r}=$t();return s.jsx("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 flex flex-col items-end px-4 py-6 sm:items-end sm:p-6 z-[100] gap-4",children:l.map(d=>s.jsx(V2,{toast:d,onDismiss:r},d.id))})};function Y2(){const{setGlobalMode:l,setGlobalModeLoading:r,setProjects:d,selectProject:c,selectedProjectId:f}=$t();H.useEffect(()=>{r(!0),y2().then(async({globalMode:m})=>{if(l(m),!m)return;const b=await Ix();d(b);const S=b.filter(v=>v.valid);f&&S.some(v=>v.name===f)?c(f):S.length>0&&c(S[0].name)}).catch(()=>{l(!1)}).finally(()=>{r(!1)})},[])}function Rg(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 qc(l,r){return l?r?Rg(l)>=Rg(r)?l:r:l:r}function $2(){const{setStatus:l,setProjectName:r,selectedProjectId:d,globalModeLoading:c,status:f}=$t(),m=H.useRef(null);m.current=$t.getState().status,C2(b=>{qc(b,m.current)===b&&l(b)},[d,c],{enabled:!c}),H.useEffect(()=>{if(c)return;bf().then(S=>{qc(S,m.current)===S&&l(S)}).catch(()=>{});const b=setInterval(()=>{bf().then(S=>{qc(S,m.current)===S&&l(S)}).catch(()=>{})},3e4);return()=>clearInterval(b)},[d,c,l]),H.useEffect(()=>{const b=()=>{bf().then(S=>{qc(S,m.current)===S&&l(S)}).catch(()=>{})};return window.addEventListener("focus",b),()=>window.removeEventListener("focus",b)},[d,l]),H.useEffect(()=>{f!=null&&f.projectName&&r(f.projectName)},[f==null?void 0:f.projectName,r])}const gt=({children:l,className:r="",onClick:d})=>s.jsxs("div",{className:`
|
|
379
|
-
relative bg-[#0b101b] rounded-xl border border-white/5
|
|
380
|
-
shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
|
|
381
|
-
transition-all duration-300
|
|
382
|
-
${d?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
|
|
383
|
-
${r}
|
|
384
|
-
`,onClick:d,children:[d&&s.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),s.jsx("div",{className:"relative z-10",children:l})]}),Ze=({children:l,variant:r="primary",size:d="md",loading:c=!1,className:f="",disabled:m,...b})=>{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]",v={primary:"bg-indigo-600 text-white hover:bg-indigo-500 focus:ring-indigo-500 shadow-[0_0_15px_-3px_rgba(79,70,229,0.4)] border border-indigo-500/50 hover:shadow-[0_0_20px_-3px_rgba(79,70,229,0.5)]",secondary:"bg-[#1f2937] text-slate-200 hover:bg-[#374151] focus:ring-slate-500 border border-white/5",danger:"bg-red-600/10 text-red-400 hover:bg-red-600/20 focus:ring-red-500 border border-red-900/50 hover:border-red-500/50",ghost:"bg-transparent text-slate-400 hover:bg-white/5 hover:text-slate-200 focus:ring-slate-400",outline:"border border-slate-700/50 bg-transparent text-slate-300 hover:bg-white/5 hover:border-slate-500 focus:ring-slate-400"},p={sm:"h-8 px-3 text-xs tracking-wide",md:"h-10 px-4 py-2 text-sm",lg:"h-12 px-6 text-base",icon:"h-9 w-9"};return s.jsxs("button",{className:`${S} ${v[r]} ${p[d]} ${f}`,disabled:m||c,...b,children:[c&&s.jsx($x,{className:"mr-2 h-4 w-4 animate-spin"}),l]})},$a=({children:l,variant:r="default",className:d=""})=>{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]} ${d}`,children:l})},ly={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"}},P2=({defaultColumn:l,onClose:r,onCreated:d})=>{const[c,f]=H.useState(""),[m,b]=H.useState(""),[S,v]=H.useState(l),[p,N]=H.useState(!1),[T,w]=H.useState(null),{addToast:A}=$t(),O=async C=>{if(C.preventDefault(),!!c.trim()){N(!0),w(null);try{await w2({title:c.trim(),body:m,column:S}),A({title:"Issue created",message:`"${c.trim()}" added to ${S}`,type:"success"}),d(),r()}catch(R){w(R instanceof Error?R.message:"Failed to create issue")}finally{N(!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(Br,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:O,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:C=>f(C.target.value),placeholder:"Issue title...",required:!0,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),s.jsx("select",{value:S,onChange:C=>v(C.target.value),className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:border-indigo-500/50 appearance-none cursor-pointer",children:Bl.map(C=>s.jsx("option",{value:C,children:C},C))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),s.jsx("textarea",{value:m,onChange:C=>b(C.target.value),placeholder:"Issue description...",rows:5,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-none font-mono"})]}),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(Ze,{variant:"ghost",type:"button",onClick:r,children:"Cancel"}),s.jsx(Ze,{type:"submit",disabled:p||!c.trim(),children:p?"Creating...":"Create Issue"})]})]})]})]})},G2=({issue:l,onClose:r,onMoved:d,onClosed:c})=>{const[f,m]=H.useState(!1),[b,S]=H.useState(!1),[v,p]=H.useState(!1),{addToast:N}=$t(),T=async O=>{if(O!==l.column){m(!0);try{await ay(l.number,O),N({title:"Issue moved",message:`#${l.number} moved to ${O}`,type:"success"}),d(),r()}catch(C){N({title:"Move failed",message:C instanceof Error?C.message:"Failed to move issue",type:"error"})}finally{m(!1)}}},w=async()=>{p(!1),S(!0);try{await E2(l.number),N({title:"Issue closed",message:`#${l.number} closed on GitHub`,type:"success"}),c(),r()}catch(O){N({title:"Close failed",message:O instanceof Error?O.message:"Failed to close issue",type:"error"})}finally{S(!1)}},A=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($a,{variant:ly[A].badge,children:A})]}),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(Br,{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:"}),Bl.filter(O=>O!==l.column).map(O=>s.jsx("button",{onClick:()=>T(O),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:O},O))]}),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(Vx,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:()=>p(!0),disabled:b,className:"text-xs px-2.5 py-1 rounded-md bg-red-500/10 text-red-400 hover:bg-red-500/20 border border-red-500/20 transition-colors disabled:opacity-50",children:b?"Closing...":"Close Issue"})]})]}),v&&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:()=>p(!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(Ze,{variant:"ghost",onClick:()=>p(!1),children:"Cancel"}),s.jsx(Ze,{onClick:w,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."})})]})]})},F2=({issue:l,onClick:r,onDragStart:d})=>{const[c,f]=H.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),d(l)},onDragEnd:()=>f(!1),children:s.jsxs(gt,{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(", ")})]})})},Z2=({name:l,issues:r,draggingIssue:d,onIssueClick:c,onNewIssue:f,onMoveIssue:m,onDragStart:b})=>{const S=ly[l],[v,p]=H.useState(!1),N=d!==null&&d.column!==l;return s.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${v&&N?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:T=>{N&&(T.preventDefault(),T.dataTransfer.dropEffect="move",p(!0))},onDragLeave:()=>p(!1),onDrop:T=>{T.preventDefault(),p(!1),d&&d.column!==l&&m(d,l)},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${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(Vs,{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 ${v&&N?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:v&&N?"Drop here":"No issues"})}):r.map(T=>s.jsx(F2,{issue:T,onClick:()=>c(T),onDragStart:b},T.id))})]})},W2=()=>{const[l,r]=H.useState(null),[d,c]=H.useState(null),[f,m]=H.useState(null),[b,S]=H.useState(null),v=H.useRef(!1),{addToast:p,selectedProjectId:N,globalModeLoading:T}=$t(),{data:w,loading:A,error:O,refetch:C}=rn(ty,[N],{enabled:!T});H.useEffect(()=>{const V=setInterval(()=>{v.current||C()},3e4);return()=>clearInterval(V)},[C]);const R=H.useCallback(async(V,ee)=>{m(null);const J=b??(w==null?void 0:w.columns);if(!J)return;const ue=J,$={};for(const P of Bl)$[P]=(J[P]??[]).filter(M=>M.number!==V.number);const F={...V,column:ee};$[ee]=[...$[ee]??[],F],S($),r(P=>(P==null?void 0:P.number)===V.number?F:P),v.current=!0;try{await ay(V.number,ee),C(),setTimeout(()=>{S(null),v.current=!1},800)}catch(P){S(ue),r(M=>(M==null?void 0:M.number)===V.number?V:M),v.current=!1,p({title:"Move failed",message:P instanceof Error?P.message:"Failed to move issue",type:"error"})}},[p,C,b,w]);if(T||A)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(O&&O.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(O)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:O.message}),s.jsx(Ze,{onClick:()=>C(),children:"Retry"})]});if(!w)return null;const W=b??w.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:[Bl.reduce((V,ee)=>{var J;return V+(((J=W[ee])==null?void 0:J.length)??0)},0)," issues across ",Bl.length," columns"]})]}),s.jsxs(Ze,{onClick:()=>c("Ready"),children:[s.jsx(Vs,{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:`${Bl.length*236}px`},children:Bl.map(V=>s.jsx(Z2,{name:V,issues:W[V]??[],draggingIssue:f,onIssueClick:r,onNewIssue:c,onMoveIssue:R,onDragStart:m},V))})}),l&&s.jsx(G2,{issue:l,onClose:()=>r(null),onMoved:()=>C(),onClosed:()=>C()}),d&&s.jsx(P2,{defaultColumn:d,onClose:()=>c(null),onCreated:()=>C()})]})},Q2=[{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"}],I2=({processes:l,activePrd:r,onCancelProcess:d,onForceClear:c,onViewLog:f,cancellingProcess:m,clearingLock:b,onTriggerJob:S,triggeringJob:v})=>{const p=T=>l.find(w=>w.name===T),N=(T,w)=>T.length<=w?T:T.slice(0,w-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-8 gap-3",children:Q2.map(T=>{const w=p(T.processName),A=(w==null?void 0:w.running)??!1,O=w==null?void 0:w.pid,C=m===T.cancelType,R=A&&T.cancelType,W=!A&&T.name==="executor"&&r,V=A?O?`PID: ${O}`:T.runningLabel:T.idleLabel,ee=A&&T.name==="executor"&&r?N(r,20):null;return s.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${A?"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 ${A?"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 ${A?"text-slate-200":"text-slate-400"}`,children:T.displayName}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:ee?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Of,{className:"h-3 w-3 flex-shrink-0"}),ee]}):V})]}),s.jsxs("div",{className:"flex-shrink-0",children:[R&&s.jsx("button",{onClick:()=>T.cancelType&&d(T.cancelType),disabled:C,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(jg,{className:"h-3.5 w-3.5"})}),W&&s.jsx("button",{onClick:c,disabled:b,className:"p-1 text-amber-400 hover:text-amber-300 hover:bg-amber-500/10 rounded transition-colors disabled:opacity-50",title:"Force clear stale state",children:s.jsx(jg,{className:"h-3.5 w-3.5"})}),!R&&!W&&A&&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(Of,{className:"h-3.5 w-3.5"})}),!A&&!W&&s.jsx("button",{onClick:()=>S(T.triggerId),disabled:v!==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:v===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(Yl,{className:"h-3.5 w-3.5"})})]})]},T.name)})})},X2={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"},J2=()=>{var _,ae;const l=eo(),[r,d]=H.useState(null),[c,f]=H.useState(!1),[m,b]=H.useState(null),{setProjectName:S,addToast:v,selectedProjectId:p,globalModeLoading:N,status:T}=$t(),{data:w}=rn(Kx,[p],{enabled:!N}),{data:A,loading:O}=rn(()=>ty().catch(()=>null),[p],{enabled:!N}),C=T;if(Me.useEffect(()=>{C!=null&&C.projectName&&S(C.projectName)},[C,S]),N)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!C)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const R=C.prs.length,W=C.prs.filter(Z=>Z.reviewScore!==null&&Z.reviewScore<70).length,V=((_=A==null?void 0:A.columns.Ready)==null?void 0:_.length)??0,ee=((ae=A==null?void 0:A.columns["In Progress"])==null?void 0:ae.length)??0;C.processes.find(Z=>Z.name==="executor"),C.processes.find(Z=>Z.name==="reviewer"),C.processes.find(Z=>Z.name==="qa"),C.processes.find(Z=>Z.name==="audit"),C.processes.find(Z=>Z.name==="planner"),C.processes.find(Z=>Z.name==="analytics");const J=async Z=>{d(Z);try{const ce=await j2(Z),xe=ce.results.every(K=>K.success);v({title:xe?"Process Cancelled":"Cancel Failed",message:ce.results.map(K=>K.message).join("; "),type:xe?"success":"error"})}catch(ce){v({title:"Cancel Failed",message:ce instanceof Error?ce.message:"Failed to cancel process",type:"error"})}finally{d(null)}},ue=async()=>{f(!0);try{await T2(),v({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(Z){v({title:"Clear Failed",message:Z instanceof Error?Z.message:"Failed to clear lock",type:"error"})}finally{f(!1)}},$=async Z=>{b(Z);try{await ey(Z==="planner"?"slicer":Z),v({title:"Job Triggered",message:`${Z[0].toUpperCase()+Z.slice(1)} job has been queued.`,type:"success"})}catch(ce){v({title:"Trigger Failed",message:ce instanceof Error?ce.message:`Failed to trigger ${Z}`,type:"error"})}finally{b(null)}},F=Z=>{if(!Z)return"Not scheduled";try{const ce=new Date(Z),xe=new Date,K=ce.getTime()-xe.getTime(),Y=Math.floor(K/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"}},M=(()=>{var xe,K,Y,re,ge,Se;if(w!=null&&w.paused)return null;const Z=[{agent:"Executor",nextRun:(w==null?void 0:w.executor.nextRun)??null},{agent:"Reviewer",nextRun:(w==null?void 0:w.reviewer.nextRun)??null},{agent:"QA",nextRun:((xe=w==null?void 0:w.qa)==null?void 0:xe.nextRun)??null},{agent:"Auditor",nextRun:((K=w==null?void 0:w.audit)==null?void 0:K.nextRun)??null},{agent:"Planner",nextRun:((Y=w==null?void 0:w.planner)==null?void 0:Y.nextRun)??null},{agent:"Analytics",nextRun:((re=w==null?void 0:w.analytics)==null?void 0:re.nextRun)??null},{agent:"PR Resolver",nextRun:((ge=w==null?void 0:w.prResolver)==null?void 0:ge.nextRun)??null},{agent:"Merger",nextRun:((Se=w==null?void 0:w.merger)==null?void 0:Se.nextRun)??null}];let ce=null;for(const ke of Z)ke.nextRun&&(!ce||new Date(ke.nextRun)<new Date(ce.nextRun))&&(ce=ke);return ce?{agent:ce.agent,time:F(ce.nextRun)}:null})();return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsxs(gt,{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:V})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(cu,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(gt,{className:"p-5",onClick:()=>l("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"In Progress"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:ee})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(Ux,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(gt,{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:R})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(qx,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${W>0?"text-red-400 font-medium":"text-slate-500"}`,children:W>0?`${W} need work`:"All passing"})]}),s.jsxs(gt,{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:w!=null&&w.paused?"Paused":C.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${w!=null&&w.paused?"bg-amber-500/10 text-amber-400":C.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:s.jsx(Lx,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:w!=null&&w.paused?"All schedules paused":C.crontab.installed?`${C.crontab.entries.length} entr${C.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(gt,{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(I2,{processes:C.processes,activePrd:C.activePrd,onCancelProcess:J,onForceClear:ue,onViewLog:()=>l("/logs"),cancellingProcess:r,clearingLock:c,onTriggerJob:$,triggeringJob:m})]}),M&&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:M.agent}),s.jsx("span",{children:M.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(yg,{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(yg,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(gt,{className:"p-4",children:O?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx("div",{className:"text-slate-400 text-sm",children:"Loading board..."})}):A?s.jsx("div",{className:"flex flex-wrap gap-3",children:Bl.map(Z=>{var xe;const ce=((xe=A.columns[Z])==null?void 0:xe.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 ${X2[Z]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:Z}),s.jsx("span",{className:"text-xs font-bold",children:ce})]},Z)})}):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."]})})]})]})},K2=()=>{const[l,r]=H.useState(!0),[d,c]=H.useState(""),[f,m]=H.useState("executor"),b=H.useRef(null),{selectedProjectId:S,globalModeLoading:v}=$t(),p=$t(V=>V.status),{data:N,loading:T,error:w,refetch:A}=rn(()=>v2(f,500),[f,S],{enabled:!v}),O=(N==null?void 0:N.lines)||[];H.useEffect(()=>{l&&b.current&&(b.current.scrollTop=b.current.scrollHeight)},[O,l]),H.useEffect(()=>{if(!l)return;const V=window.setInterval(()=>{A()},3e3);return()=>window.clearInterval(V)},[l,f,A]);const C=O.filter(V=>V.toLowerCase().includes(d.toLowerCase())),R=V=>{m(V),c("")},W=V=>{if(!(p!=null&&p.processes))return!1;const ee=p.processes.find(J=>J.name===V);return(ee==null?void 0:ee.running)??!1};return w?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(vn,{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:w.message}),s.jsx(Ze,{onClick:()=>A(),children:"Retry"})]}):s.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"relative group",children:[s.jsx("input",{type:"text",placeholder:"Filter logs...",className:"pl-9 pr-4 py-1.5 rounded-md border border-slate-700 bg-slate-950 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent w-64 placeholder:text-slate-600",value:d,onChange:V=>c(V.target.value)}),s.jsx(ou,{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:Wx.map(({processName:V,label:ee})=>s.jsx("button",{onClick:()=>R(V),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${f===V?"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:ee}),W(V)&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})},V))})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(Ze,{size:"sm",variant:"ghost",onClick:()=>A(),children:[s.jsx(vg,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Ze,{size:"sm",variant:"ghost",onClick:()=>r(!l),children:[l?s.jsx(Fx,{className:"h-4 w-4 mr-2"}):s.jsx(Yl,{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:[C.length," lines"]})]}),s.jsxs("div",{ref:b,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[T?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):C.length===0?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:d?"No logs match your filter":"No logs yet — logs will appear after the first run"}):C.map((V,ee)=>{const J=V.includes("[ERROR]"),ue=V.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${J?"text-red-400":ue?"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:ee+1}),V]},ee)}),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(vg,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},eS=()=>{const[l,r]=H.useState(null),[d,c]=H.useState(!1),[f,m]=H.useState("all"),[b,S]=H.useState("number"),[v,p]=H.useState("desc"),{addToast:N,selectedProjectId:T,globalModeLoading:w}=$t(),{data:A,loading:O,error:C,refetch:R}=rn(Xx,[T],{enabled:!w}),W=A??[],V=_=>{switch(_){case"pass":return s.jsx(cu,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(w1,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx($x,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(vn,{className:"h-4 w-4 text-slate-500"})}},ee=_=>{switch(_){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"}},J=_=>_===null?"No review decision yet":_===100?"PR has been approved":_===0?"Changes have been requested":`Review score: ${_}`,ue=H.useMemo(()=>W.filter(_=>{switch(f){case"needs-work":return _.ciStatus==="fail"||_.reviewScore===0;case"pending":return _.ciStatus==="pending"||_.ciStatus==="unknown"||_.reviewScore===null;case"passed":return _.ciStatus==="pass"&&_.reviewScore===100;case"all":default:return!0}}),[W,f]),$=H.useMemo(()=>[...ue].sort((ae,Z)=>{let ce=0;switch(b){case"number":ce=ae.number-Z.number;break;case"title":ce=ae.title.localeCompare(Z.title);break;case"branch":ce=ae.branch.localeCompare(Z.branch);break;case"ciStatus":{const xe={fail:0,pending:1,unknown:2,pass:3};ce=(xe[ae.ciStatus]??2)-(xe[Z.ciStatus]??2);break}case"reviewScore":{const xe=ae.reviewScore??-1,K=Z.reviewScore??-1;ce=xe-K;break}}return v==="asc"?ce:-ce}),[ue,b,v]),F=_=>{b===_?p(v==="asc"?"desc":"asc"):(S(_),p("desc"))},P=_=>b!==_?s.jsx(Kb,{className:"h-3 w-3 text-slate-600"}):v==="asc"?s.jsx(t1,{className:"h-3 w-3 text-indigo-400"}):s.jsx(Ib,{className:"h-3 w-3 text-indigo-400"});if(O)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(C)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(vn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load PRs"}),s.jsx("div",{className:"text-sm text-slate-500",children:C.message}),s.jsx(Ze,{onClick:()=>R(),children:"Retry"})]});const M=async()=>{c(!0);try{const _=await S2();N({title:"Reviewer Started",message:_.pid?`Started with PID ${_.pid}`:"Reviewer started",type:"success"})}catch(_){N({title:"Reviewer Failed",message:_ instanceof Error?_.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(Ze,{size:"sm",onClick:M,disabled:d,children:[s.jsx(ou,{className:"h-4 w-4 mr-2"}),d?"Starting...":"Run Reviewer Now"]})]}),s.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:s.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[s.jsx("thead",{className:"bg-slate-950/50",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>F("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),P("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"}),P("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"}),P("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"}),P("reviewScore")]})}),s.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Actions"})]})}),s.jsxs("tbody",{className:"divide-y divide-slate-800",children:[$.map(_=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>r(l===_.number?null:_.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:["#",_.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:_.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:_.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:ee(_.ciStatus),children:[V(_.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:_.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:_.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:J(_.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${_.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${_.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${_.reviewScore>=70?"text-green-500":"text-red-500"}`,children:_.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:_.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:ae=>ae.stopPropagation(),children:s.jsx(Vx,{className:"h-4 w-4"})})})]},_.number)),$.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:W.length===0?"No open PRs found.":`No PRs match the "${f}" filter.`})})]})]})}),l&&s.jsx(gt,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const _=W.find(ae=>ae.number===l);return _?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:_.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:_.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:ee(_.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:[V(_.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:_.ciStatus})]})]}),_.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:J(_.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${_.reviewScore>=70?"text-green-500":"text-red-500"}`,children:_.reviewScore})]})]})]}):null})()})]})},Ya=Me.forwardRef(({className:l="",label:r,checked:d,onChange:c,...f},m)=>{const b=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:d,onChange:b,...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})]})});Ya.displayName="Switch";const tS=()=>{const{addToast:l,selectedProjectId:r,globalModeLoading:d}=$t(),[c,f]=H.useState(!1),[m,b]=H.useState(!1),{data:S,loading:v,error:p,refetch:N}=rn(D2,[r],{enabled:!d});H.useEffect(()=>{if(!(S!=null&&S.enabled))return;const V=setInterval(()=>{N()},1e4);return()=>clearInterval(V)},[S==null?void 0:S.enabled,N]);const T=async V=>{b(!0);try{await ny(V),l({title:V?"Scanner Enabled":"Scanner Disabled",message:V?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:V?"success":"info"}),N()}catch(ee){l({title:"Toggle Failed",message:ee instanceof Error?ee.message:"Failed to toggle scanner",type:"error"})}finally{b(!1)}},w=async()=>{f(!0);try{const V=await A2();V.created.length>0?l({title:"Scan Complete",message:`Created ${V.created.length} PRD(s): ${V.created.join(", ")}`,type:"success"}):l({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),V.errors.length>0&&l({title:"Scan Errors",message:V.errors.join("; "),type:"warning"}),N()}catch(V){l({title:"Scan Failed",message:V instanceof Error?V.message:"Failed to scan roadmap",type:"error"})}finally{f(!1)}};if(v)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(p)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(vn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),s.jsx("div",{className:"text-sm text-slate-500",children:p.message}),s.jsx(Ze,{onClick:()=>N(),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(gt,{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(Px,{className:"h-10 w-10 text-slate-500"})}),s.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"No ROADMAP.md Found"}),s.jsxs("p",{className:"text-slate-400 max-w-md",children:["Create a ",s.jsx("code",{className:"text-indigo-400 bg-indigo-500/10 px-1.5 py-0.5 rounded text-sm",children:"ROADMAP.md"})," in your project root with checklist items (",s.jsx("code",{className:"text-slate-300 text-sm",children:"- [ ] Feature"}),") or heading-based items (",s.jsx("code",{className:"text-slate-300 text-sm",children:"### Feature"}),") to get started."]})]})})]});const A=S.totalItems>0?Math.round(S.processedItems/S.totalItems*100):0,O=nS(S.status),C=lS(S.items),R=S.lastScan?sS(S.lastScan):"Never",W=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(Ya,{label:S.enabled?"Enabled":"Disabled",checked:S.enabled,onChange:T,disabled:m}),s.jsxs(Ze,{onClick:w,loading:c,disabled:!S.enabled||S.status==="complete",children:[s.jsx(Yl,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(gt,{className:`p-6 border-2 ${O.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(O.icon,{className:`h-8 w-8 ${O.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 ${O.textColor}`,children:O.label})]})]}),s.jsxs("div",{className:"text-right text-sm text-slate-400 space-y-1",children:[s.jsxs("div",{children:["Last scan: ",s.jsx("span",{className:"text-slate-300",children:R})]}),S.enabled&&S.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",W," min"]})]}),S.enabled&&S.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(gt,{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 (",A,"%)"]})]}),s.jsx("div",{className:"w-full h-3 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${A===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${A}%`}})})]}),Object.entries(C).map(([V,ee])=>s.jsxs(gt,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:V}),s.jsx("div",{className:"space-y-2",children:ee.map(J=>s.jsx(aS,{item:J},J.hash))})]},V))]})};function aS({item:l}){const r=l.checked,d=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":d?"bg-emerald-500/5 border-emerald-500/10":"bg-slate-950/50 border-slate-800"}`,children:[s.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[r?s.jsx(G1,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?s.jsx(cu,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Of,{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($a,{variant:"neutral",children:"Skipped"}):d?s.jsx($a,{variant:"success",children:l.prdFile||"Processed"}):s.jsx($a,{variant:"warning",children:"Pending"})})]})}function nS(l){switch(l){case"complete":return{label:"Complete",icon:cu,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:qx,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:Yl,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:vn,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:vn,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function lS(l){const r={};for(const d of l){const c=d.section||"General";r[c]||(r[c]=[]),r[c].push(d)}return r}function sS(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 mt=Me.forwardRef(({className:l="",label:r,error:d,helperText:c,options:f,value:m,onChange:b,children:S,...v},p)=>{const N=Me.useId(),T=v.id??N,w=d?`${T}-error`:void 0,A=!d&&c?`${T}-help`:void 0,O=[w,A].filter(Boolean).join(" ")||void 0,C=R=>{b&&b(R.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:p,id:T,"aria-describedby":O,"aria-invalid":d?!0:v["aria-invalid"],className:`
|
|
385
|
-
w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
|
|
386
|
-
px-3 py-2 pr-10 text-sm text-slate-200
|
|
387
|
-
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
388
|
-
disabled:opacity-50 disabled:cursor-not-allowed
|
|
389
|
-
transition-all duration-200
|
|
390
|
-
${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
391
|
-
${l}
|
|
392
|
-
`,value:m,onChange:C,...v,children:f?f.map(R=>s.jsx("option",{value:R.value,children:R.label},R.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(Zf,{className:"h-4 w-4"})})]}),d?s.jsx("p",{id:w,className:"mt-1.5 text-xs text-red-400",children:d}):c?s.jsx("p",{id:A,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});mt.displayName="Select";const ze=Me.forwardRef(({className:l="",label:r,error:d,helperText:c,rightIcon:f,...m},b)=>{const S=Me.useId(),v=m.id??S,p=d?`${v}-error`:void 0,N=!d&&c?`${v}-help`:void 0,T=[p,N].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:v,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:b,id:v,"aria-describedby":T,"aria-invalid":d?!0:m["aria-invalid"],className:`
|
|
393
|
-
w-full rounded-lg bg-slate-950 border border-slate-800
|
|
394
|
-
px-3 py-2 text-sm text-slate-200
|
|
395
|
-
placeholder:text-slate-600
|
|
396
|
-
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
397
|
-
disabled:opacity-50 disabled:cursor-not-allowed
|
|
398
|
-
transition-all duration-200
|
|
399
|
-
${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
400
|
-
${f?"pr-10":""}
|
|
401
|
-
${l}
|
|
402
|
-
`,...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})]}),d?s.jsx("p",{id:p,className:"mt-1.5 text-xs text-red-400",children:d}):c?s.jsx("p",{id:N,className:"mt-1.5 text-xs text-slate-500",children:c}):null]})});ze.displayName="Input";var As={},Ca={},Fi={},_s={},Sf={},Dg;function rS(){return Dg||(Dg=1,Object.defineProperty(Sf,"__esModule",{value:!0})),Sf}var Zi={},Wi={},Ag;function Bs(){var r,d,c,f,m,sy,S;if(Ag)return Wi;Ag=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.CronField=void 0;let l=(S=class{constructor(p,N={rawValue:""}){Ke(this,m);Ke(this,r,!1);Ke(this,d,!1);Ke(this,c,!1);Ke(this,f,[]);K0(this,"options",{rawValue:""});if(!Array.isArray(p))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(p.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...N,rawValue:N.rawValue??""},we(this,f,p.sort(S.sorter)),we(this,c,this.options.wildcard!==void 0?this.options.wildcard:Ne(this,m,sy).call(this)),we(this,r,this.options.rawValue.includes("L")||p.includes("L")),we(this,d,this.options.rawValue.includes("?")||p.includes("?"))}static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return te(this,r)}get hasQuestionMarkChar(){return te(this,d)}get isWildcard(){return te(this,c)}get values(){return te(this,f)}static sorter(p,N){const T=typeof p=="number",w=typeof N=="number";return T&&w?p-N:!T&&!w?p.localeCompare(N):T?-1:1}static findNearestValueInList(p,N,T=!1){if(T){for(let w=p.length-1;w>=0;w--)if(p[w]<N)return p[w];return null}for(let w=0;w<p.length;w++)if(p[w]>N)return p[w];return null}findNearestValue(p,N=!1){return this.constructor.findNearestValueInList(this.values,p,N)}serialize(){return{wildcard:te(this,c),values:te(this,f)}}validate(){let p;const N=this.chars.length>0?` or chars ${this.chars.join("")}`:"",T=C=>R=>new RegExp(`^\\d{0,2}${R}$`).test(C),w=C=>(p=C,typeof C=="number"?C>=this.min&&C<=this.max:this.chars.some(T(C)));if(!te(this,f).every(w))throw new Error(`${this.constructor.name} Validation error, got value ${p} expected range ${this.min}-${this.max}${N}`);const O=te(this,f).find((C,R)=>te(this,f).indexOf(C)!==R);if(O)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${O}`)}},r=new WeakMap,d=new WeakMap,c=new WeakMap,f=new WeakMap,m=new WeakSet,sy=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(p,N)=>N+this.min).every(p=>te(this,f).includes(p))},S);return Wi.CronField=l,Wi}var _g;function iS(){if(_g)return Zi;_g=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.CronDayOfMonth=void 0;const l=Bs(),r=1,d=31,c=Object.freeze(["L"]);let f=class extends l.CronField{static get min(){return r}static get max(){return d}static get chars(){return c}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(b,S){super(b,S),this.validate()}get values(){return super.values}};return Zi.CronDayOfMonth=f,Zi}var Qi={},kg;function uS(){if(kg)return Qi;kg=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.CronDayOfWeek=void 0;const l=Bs(),r=0,d=7,c=Object.freeze(["L"]);let f=class extends l.CronField{static get min(){return r}static get max(){return d}static get chars(){return c}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(b,S){super(b,S),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return Qi.CronDayOfWeek=f,Qi}var Ii={},zg;function cS(){if(zg)return Ii;zg=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.CronHour=void 0;const l=Bs(),r=0,d=23,c=Object.freeze([]);let f=class extends l.CronField{static get min(){return r}static get max(){return d}static get chars(){return c}constructor(b,S){super(b,S),this.validate()}get values(){return super.values}};return Ii.CronHour=f,Ii}var Xi={},Ug;function oS(){if(Ug)return Xi;Ug=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.CronMinute=void 0;const l=Bs(),r=0,d=59,c=Object.freeze([]);let f=class extends l.CronField{static get min(){return r}static get max(){return d}static get chars(){return c}constructor(b,S){super(b,S),this.validate()}get values(){return super.values}};return Xi.CronMinute=f,Xi}var Ji={},Nf={},pa={},Lg;function dS(){if(Lg)return pa;Lg=1,Object.defineProperty(pa,"__esModule",{value:!0});class l extends Error{}class r extends l{constructor(i){super(`Invalid DateTime: ${i.toMessage()}`)}}class d 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 b extends l{}class S extends l{constructor(){super("Zone is an abstract class")}}const v="numeric",p="short",N="long",T={year:v,month:v,day:v},w={year:v,month:p,day:v},A={year:v,month:p,day:v,weekday:p},O={year:v,month:N,day:v},C={year:v,month:N,day:v,weekday:N},R={hour:v,minute:v},W={hour:v,minute:v,second:v},V={hour:v,minute:v,second:v,timeZoneName:p},ee={hour:v,minute:v,second:v,timeZoneName:N},J={hour:v,minute:v,hourCycle:"h23"},ue={hour:v,minute:v,second:v,hourCycle:"h23"},$={hour:v,minute:v,second:v,hourCycle:"h23",timeZoneName:p},F={hour:v,minute:v,second:v,hourCycle:"h23",timeZoneName:N},P={year:v,month:v,day:v,hour:v,minute:v},M={year:v,month:v,day:v,hour:v,minute:v,second:v},_={year:v,month:p,day:v,hour:v,minute:v},ae={year:v,month:p,day:v,hour:v,minute:v,second:v},Z={year:v,month:p,day:v,weekday:p,hour:v,minute:v},ce={year:v,month:N,day:v,hour:v,minute:v,timeZoneName:p},xe={year:v,month:N,day:v,hour:v,minute:v,second:v,timeZoneName:p},K={year:v,month:N,day:v,weekday:N,hour:v,minute:v,timeZoneName:N},Y={year:v,month:N,day:v,weekday:N,hour:v,minute:v,second:v,timeZoneName:N};class re{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 ge=null;class Se extends re{static get instance(){return ge===null&&(ge=new Se),ge}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(i,{format:h,locale:y}){return Mn(i,h,y)}formatOffset(i,h){return as(this.offset(i),h)}offset(i){return-new Date(i).getTimezoneOffset()}equals(i){return i.type==="system"}get isValid(){return!0}}const ke=new Map;function z(g){let i=ke.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"}),ke.set(g,i)),i}const le={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function he(g,i){const h=g.format(i).replace(/\u200E/g,""),y=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(h),[,j,D,U,L,B,fe,pe]=y;return[U,j,D,L,B,fe,pe]}function me(g,i){const h=g.formatToParts(i),y=[];for(let j=0;j<h.length;j++){const{type:D,value:U}=h[j],L=le[D];D==="era"?y[L]=U:Ce(L)||(y[L]=parseInt(U,10))}return y}const Ee=new Map;class de extends re{static create(i){let h=Ee.get(i);return h===void 0&&Ee.set(i,h=new de(i)),h}static resetCache(){Ee.clear(),ke.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=de.isValidZone(i)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(i,{format:h,locale:y}){return Mn(i,h,y,this.name)}formatOffset(i,h){return as(this.offset(i),h)}offset(i){if(!this.valid)return NaN;const h=new Date(i);if(isNaN(h))return NaN;const y=z(this.name);let[j,D,U,L,B,fe,pe]=y.formatToParts?me(y,h):he(y,h);L==="BC"&&(j=-Math.abs(j)+1);const Pe=Zt({year:j,month:D,day:U,hour:B===24?0:B,minute:fe,second:pe,millisecond:0});let Re=+h;const pt=Re%1e3;return Re-=pt>=0?pt:1e3+pt,(Pe-Re)/(60*1e3)}equals(i){return i.type==="iana"&&i.name===this.name}get isValid(){return this.valid}}let _e={};function ct(g,i={}){const h=JSON.stringify([g,i]);let y=_e[h];return y||(y=new Intl.ListFormat(g,i),_e[h]=y),y}const Xe=new Map;function la(g,i={}){const h=JSON.stringify([g,i]);let y=Xe.get(h);return y===void 0&&(y=new Intl.DateTimeFormat(g,i),Xe.set(h,y)),y}const un=new Map;function Pl(g,i={}){const h=JSON.stringify([g,i]);let y=un.get(h);return y===void 0&&(y=new Intl.NumberFormat(g,i),un.set(h,y)),y}const Sn=new Map;function Ga(g,i={}){const{base:h,...y}=i,j=JSON.stringify([g,y]);let D=Sn.get(j);return D===void 0&&(D=new Intl.RelativeTimeFormat(g,i),Sn.set(j,D)),D}let Fa=null;function Gl(){return Fa||(Fa=new Intl.DateTimeFormat().resolvedOptions().locale,Fa)}const Fl=new Map;function Zl(g){let i=Fl.get(g);return i===void 0&&(i=new Intl.DateTimeFormat(g).resolvedOptions(),Fl.set(g,i)),i}const Nn=new Map;function ye(g){let i=Nn.get(g);if(!i){const h=new Intl.Locale(g);i="getWeekInfo"in h?h.getWeekInfo():h.weekInfo,"minimalDays"in i||(i={...Jn,...i}),Nn.set(g,i)}return i}function De(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,j;try{y=la(g).resolvedOptions(),j=g}catch{const B=g.substring(0,h);y=la(B).resolvedOptions(),j=B}const{numberingSystem:D,calendar:U}=y;return[j,D,U]}}function Ot(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=je.utc(2009,h,1);i.push(g(y))}return i}function St(g){const i=[];for(let h=1;h<=7;h++){const y=je.utc(2016,11,13+h);i.push(g(y))}return i}function jn(g,i,h,y){const j=g.listingMode();return j==="error"?null:j==="en"?h(i):y(i)}function Wl(g){return g.numberingSystem&&g.numberingSystem!=="latn"?!1:g.numberingSystem==="latn"||!g.locale||g.locale.startsWith("en")||Zl(g.locale).numberingSystem==="latn"}class Ql{constructor(i,h,y){this.padTo=y.padTo||0,this.floor=y.floor||!1;const{padTo:j,floor:D,...U}=y;if(!h||Object.keys(U).length>0){const L={useGrouping:!1,...y};y.padTo>0&&(L.minimumIntegerDigits=y.padTo),this.inf=Pl(i,L)}}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):Kl(i,3);return et(h,this.padTo)}}}class wn{constructor(i,h,y){this.opts=y,this.originalZone=void 0;let j;if(this.opts.timeZone)this.dt=i;else if(i.zone.type==="fixed"){const U=-1*(i.offset/60),L=U>=0?`Etc/GMT+${U}`:`Etc/GMT${U}`;i.offset!==0&&de.create(L).valid?(j=L,this.dt=i):(j="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,j=i.zone.name):(j="UTC",this.dt=i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone);const D={...this.opts};D.timeZone=D.timeZone||j,this.dtf=la(h,D)}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 Ys{constructor(i,h,y){this.opts={style:"long",...y},!h&&Gr()&&(this.rtf=Ga(i,y))}format(i,h){return this.rtf?this.rtf.format(i,h):fn(h,i,this.opts.numeric,this.opts.style!=="long")}formatToParts(i,h){return this.rtf?this.rtf.formatToParts(i,h):[]}}const Jn={firstDay:1,minimalDays:4,weekend:[6,7]};class He{static fromOpts(i){return He.create(i.locale,i.numberingSystem,i.outputCalendar,i.weekSettings,i.defaultToEN)}static create(i,h,y,j,D=!1){const U=i||dt.defaultLocale,L=U||(D?"en-US":Gl()),B=h||dt.defaultNumberingSystem,fe=y||dt.defaultOutputCalendar,pe=Fr(j)||dt.defaultWeekSettings;return new He(L,B,fe,pe,U)}static resetCache(){Fa=null,Xe.clear(),un.clear(),Sn.clear(),Fl.clear(),Nn.clear()}static fromObject({locale:i,numberingSystem:h,outputCalendar:y,weekSettings:j}={}){return He.create(i,h,y,j)}constructor(i,h,y,j,D){const[U,L,B]=De(i);this.locale=U,this.numberingSystem=h||L||null,this.outputCalendar=y||B||null,this.weekSettings=j,this.intl=Ot(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=D,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Wl(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:He.create(i.locale||this.specifiedLocale,i.numberingSystem||this.numberingSystem,i.outputCalendar||this.outputCalendar,Fr(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 jn(this,i,Su,()=>{const y=this.intl==="ja"||this.intl.startsWith("ja-");h&=!y;const j=h?{month:i,day:"numeric"}:{month:i},D=h?"format":"standalone";if(!this.monthsCache[D][i]){const U=y?L=>this.dtFormatter(L,j).format():L=>this.extract(L,j,"month");this.monthsCache[D][i]=qt(U)}return this.monthsCache[D][i]})}weekdays(i,h=!1){return jn(this,i,Js,()=>{const y=h?{weekday:i,year:"numeric",month:"long",day:"numeric"}:{weekday:i},j=h?"format":"standalone";return this.weekdaysCache[j][i]||(this.weekdaysCache[j][i]=St(D=>this.extract(D,y,"weekday"))),this.weekdaysCache[j][i]})}meridiems(){return jn(this,void 0,()=>On,()=>{if(!this.meridiemCache){const i={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[je.utc(2016,11,13,9),je.utc(2016,11,13,19)].map(h=>this.extract(h,i,"dayperiod"))}return this.meridiemCache})}eras(i){return jn(this,i,Xr,()=>{const h={era:i};return this.eraCache[i]||(this.eraCache[i]=[je.utc(-40,1,1),je.utc(2017,1,1)].map(y=>this.extract(y,h,"era"))),this.eraCache[i]})}extract(i,h,y){const j=this.dtFormatter(i,h),D=j.formatToParts(),U=D.find(L=>L.type.toLowerCase()===y);return U?U.value:null}numberFormatter(i={}){return new Ql(this.intl,i.forceSimple||this.fastNumbers,i)}dtFormatter(i,h={}){return new wn(i,this.intl,h)}relFormatter(i={}){return new Ys(this.intl,this.isEnglish(),i)}listFormatter(i={}){return ct(this.intl,i)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Zl(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:on()?ye(this.locale):Jn}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 va=null;class ot extends re{static get utcInstance(){return va===null&&(va=new ot(0)),va}static instance(i){return i===0?ot.utcInstance:new ot(i)}static parseSpecifier(i){if(i){const h=i.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(h)return new ot(ts(h[1],h[2]))}return null}constructor(i){super(),this.fixed=i}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${as(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${as(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(i,h){return as(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 zt extends re{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 Pt(g,i){if(Ce(g)||g===null)return i;if(g instanceof re)return g;if(Rt(g)){const h=g.toLowerCase();return h==="default"?i:h==="local"||h==="system"?Se.instance:h==="utc"||h==="gmt"?ot.utcInstance:ot.parseSpecifier(h)||de.create(g)}else return ua(g)?ot.instance(g):typeof g=="object"&&"offset"in g&&typeof g.offset=="function"?g:new zt(g)}const Gt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},du={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]},lo=Gt.hanidec.replace(/[\[|\]]/g,"").split("");function so(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(Gt.hanidec)!==-1)i+=lo.indexOf(g[h]);else for(const j in du){const[D,U]=du[j];y>=D&&y<=U&&(i+=y-D)}}return parseInt(i,10)}else return i}const Kn=new Map;function $s(){Kn.clear()}function Kt({numberingSystem:g},i=""){const h=g||"latn";let y=Kn.get(h);y===void 0&&(y=new Map,Kn.set(h,y));let j=y.get(i);return j===void 0&&(j=new RegExp(`${Gt[h]}${i}`),y.set(i,j)),j}let cn=()=>Date.now(),Il="system",el=null,fu=null,Yr=null,Ps=60,tl,hu=null;class dt{static get now(){return cn}static set now(i){cn=i}static set defaultZone(i){Il=i}static get defaultZone(){return Pt(Il,Se.instance)}static get defaultLocale(){return el}static set defaultLocale(i){el=i}static get defaultNumberingSystem(){return fu}static set defaultNumberingSystem(i){fu=i}static get defaultOutputCalendar(){return Yr}static set defaultOutputCalendar(i){Yr=i}static get defaultWeekSettings(){return hu}static set defaultWeekSettings(i){hu=Fr(i)}static get twoDigitCutoffYear(){return Ps}static set twoDigitCutoffYear(i){Ps=i%100}static get throwOnInvalid(){return tl}static set throwOnInvalid(i){tl=i}static resetCaches(){He.resetCache(),de.resetCache(),je.resetCache(),$s()}}class ia{constructor(i,h){this.reason=i,this.explanation=h}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const $r=[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 ea(g,i){return new ia("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 j=y.getUTCDay();return j===0?7:j}function Pr(g,i,h){return h+(nl(g)?Gs:$r)[i-1]}function Za(g,i){const h=nl(g)?Gs:$r,y=h.findIndex(D=>D<i),j=i-h[y];return{month:y+1,day:j}}function Nt(g,i){return(g-i+7)%7+1}function Ut(g,i=4,h=1){const{year:y,month:j,day:D}=g,U=Pr(y,j,D),L=Nt(Fs(y,j,D),h);let B=Math.floor((U-L+14-i)/7),fe;return B<1?(fe=y-1,B=ll(fe,i,h)):B>ll(y,i,h)?(fe=y+1,B=1):fe=y,{weekYear:fe,weekNumber:B,weekday:L,...ns(g)}}function En(g,i=4,h=1){const{weekYear:y,weekNumber:j,weekday:D}=g,U=Nt(Fs(y,1,i),h),L=Qa(y);let B=j*7+D-U-7+i,fe;B<1?(fe=y-1,B+=Qa(fe)):B>L?(fe=y+1,B-=Qa(y)):fe=y;const{month:pe,day:Ue}=Za(fe,B);return{year:fe,month:pe,day:Ue,...ns(g)}}function Xl(g){const{year:i,month:h,day:y}=g,j=Pr(i,h,y);return{year:i,ordinal:j,...ns(g)}}function mu(g){const{year:i,ordinal:h}=g,{month:y,day:j}=Za(i,h);return{year:i,month:y,day:j,...ns(g)}}function gu(g,i){if(!Ce(g.localWeekday)||!Ce(g.localWeekNumber)||!Ce(g.localWeekYear)){if(!Ce(g.weekday)||!Ce(g.weekNumber)||!Ce(g.weekYear))throw new f("Cannot mix locale-based week fields with ISO-based week fields");return Ce(g.localWeekday)||(g.weekday=g.localWeekday),Ce(g.localWeekNumber)||(g.weekNumber=g.localWeekNumber),Ce(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 xu(g,i=4,h=1){const y=Wa(g.weekYear),j=Ft(g.weekNumber,1,ll(g.weekYear,i,h)),D=Ft(g.weekday,1,7);return y?j?D?!1:ea("weekday",g.weekday):ea("week",g.weekNumber):ea("weekYear",g.weekYear)}function Jl(g){const i=Wa(g.year),h=Ft(g.ordinal,1,Qa(g.year));return i?h?!1:ea("ordinal",g.ordinal):ea("year",g.year)}function Zs(g){const i=Wa(g.year),h=Ft(g.month,1,12),y=Ft(g.day,1,Qs(g.year,g.month));return i?h?y?!1:ea("day",g.day):ea("month",g.month):ea("year",g.year)}function Tn(g){const{hour:i,minute:h,second:y,millisecond:j}=g,D=Ft(i,0,23)||i===24&&h===0&&y===0&&j===0,U=Ft(h,0,59),L=Ft(y,0,59),B=Ft(j,0,999);return D?U?L?B?!1:ea("millisecond",j):ea("second",y):ea("minute",h):ea("hour",i)}function Ce(g){return typeof g>"u"}function ua(g){return typeof g=="number"}function Wa(g){return typeof g=="number"&&g%1===0}function Rt(g){return typeof g=="string"}function yu(g){return Object.prototype.toString.call(g)==="[object Date]"}function Gr(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function on(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function al(g){return Array.isArray(g)?g:[g]}function pu(g,i,h){if(g.length!==0)return g.reduce((y,j)=>{const D=[i(j),j];return y&&h(y[0],D[0])===y[0]?y:D},null)[1]}function vu(g,i){return i.reduce((h,y)=>(h[y]=g[y],h),{})}function Cn(g,i){return Object.prototype.hasOwnProperty.call(g,i)}function Fr(g){if(g==null)return null;if(typeof g!="object")throw new b("Week settings must be an object");if(!Ft(g.firstDay,1,7)||!Ft(g.minimalDays,1,7)||!Array.isArray(g.weekend)||g.weekend.some(i=>!Ft(i,1,7)))throw new b("Invalid week settings");return{firstDay:g.firstDay,minimalDays:g.minimalDays,weekend:Array.from(g.weekend)}}function Ft(g,i,h){return Wa(g)&&g>=i&&g<=h}function Ws(g,i){return g-i*Math.floor(g/i)}function et(g,i=2){const h=g<0;let y;return h?y="-"+(""+-g).padStart(i,"0"):y=(""+g).padStart(i,"0"),y}function jt(g){if(!(Ce(g)||g===null||g===""))return parseInt(g,10)}function dn(g){if(!(Ce(g)||g===null||g===""))return parseFloat(g)}function Zr(g){if(!(Ce(g)||g===null||g==="")){const i=parseFloat("0."+g)*1e3;return Math.floor(i)}}function Kl(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 nl(g){return g%4===0&&(g%100!==0||g%400===0)}function Qa(g){return nl(g)?366:365}function Qs(g,i){const h=Ws(i-1,12)+1,y=g+(i-h)/12;return h===2?nl(y)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][h-1]}function Zt(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-Nt(Fs(g,1,i),h)+i-1}function ll(g,i=4,h=1){const y=Is(g,i,h),j=Is(g+1,i,h);return(Qa(g)-y+j)/7}function es(g){return g>99?g:g>dt.twoDigitCutoffYear?1900+g:2e3+g}function Mn(g,i,h,y=null){const j=new Date(g),D={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};y&&(D.timeZone=y);const U={timeZoneName:i,...D},L=new Intl.DateTimeFormat(h,U).formatToParts(j).find(B=>B.type.toLowerCase()==="timezonename");return L?L.value:null}function ts(g,i){let h=parseInt(g,10);Number.isNaN(h)&&(h=0);const y=parseInt(i,10)||0,j=h<0||Object.is(h,-0)?-y:y;return h*60+j}function Wr(g){const i=Number(g);if(typeof g=="boolean"||g===""||!Number.isFinite(i))throw new b(`Invalid unit value ${g}`);return i}function Ia(g,i){const h={};for(const y in g)if(Cn(g,y)){const j=g[y];if(j==null)continue;h[i(y)]=Wr(j)}return h}function as(g,i){const h=Math.trunc(Math.abs(g/60)),y=Math.trunc(Math.abs(g%60)),j=g>=0?"+":"-";switch(i){case"short":return`${j}${et(h,2)}:${et(y,2)}`;case"narrow":return`${j}${h}${y>0?`:${y}`:""}`;case"techie":return`${j}${et(h,2)}${et(y,2)}`;default:throw new RangeError(`Value format ${i} is out of range for property format`)}}function ns(g){return vu(g,["hour","minute","second","millisecond"])}const bu=["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"],ro=["J","F","M","A","M","J","J","A","S","O","N","D"];function Su(g){switch(g){case"narrow":return[...ro];case"short":return[...Xs];case"long":return[...bu];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 ls=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ra=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Qr=["M","T","W","T","F","S","S"];function Js(g){switch(g){case"narrow":return[...Qr];case"short":return[...Ra];case"long":return[...ls];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const On=["AM","PM"],sl=["Before Christ","Anno Domini"],Nu=["BC","AD"],Ir=["B","A"];function Xr(g){switch(g){case"narrow":return[...Ir];case"short":return[...Nu];case"long":return[...sl];default:return null}}function ss(g){return On[g.hour<12?0:1]}function Xa(g,i){return Js(i)[g.weekday-1]}function Jr(g,i){return Su(i)[g.month-1]}function rs(g,i){return Xr(i)[g.year<0?0:1]}function fn(g,i,h="always",y=!1){const j={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},D=["hours","minutes","seconds"].indexOf(g)===-1;if(h==="auto"&&D){const Ue=g==="days";switch(i){case 1:return Ue?"tomorrow":`next ${j[g][0]}`;case-1:return Ue?"yesterday":`last ${j[g][0]}`;case 0:return Ue?"today":`this ${j[g][0]}`}}const U=Object.is(i,-0)||i<0,L=Math.abs(i),B=L===1,fe=j[g],pe=y?B?fe[1]:fe[2]||fe[1]:B?j[g][0]:g;return U?`${L} ${pe} ago`:`in ${L} ${pe}`}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:w,DDD:O,DDDD:C,t:R,tt:W,ttt:V,tttt:ee,T:J,TT:ue,TTT:$,TTTT:F,f:P,ff:_,fff:ce,ffff:K,F:M,FF:ae,FFF:xe,FFFF:Y};class Lt{static create(i,h={}){return new Lt(i,h)}static parseFormat(i){let h=null,y="",j=!1;const D=[];for(let U=0;U<i.length;U++){const L=i.charAt(U);L==="'"?((y.length>0||j)&&D.push({literal:j||/^\s+$/.test(y),val:y===""?"'":y}),h=null,y="",j=!j):j||L===h?y+=L:(y.length>0&&D.push({literal:/^\s+$/.test(y),val:y}),y=L,h=L)}return y.length>0&&D.push({literal:j||/^\s+$/.test(y),val:y}),D}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 et(i,h);const j={...this.opts};return h>0&&(j.padTo=h),y&&(j.signDisplay=y),this.loc.numberFormatter(j).format(i)}formatDateTimeFromString(i,h){const y=this.loc.listingMode()==="en",j=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",D=(Re,pt)=>this.loc.extract(i,Re,pt),U=Re=>i.isOffsetFixed&&i.offset===0&&Re.allowZ?"Z":i.isValid?i.zone.formatOffset(i.ts,Re.format):"",L=()=>y?ss(i):D({hour:"numeric",hourCycle:"h12"},"dayperiod"),B=(Re,pt)=>y?Jr(i,Re):D(pt?{month:Re}:{month:Re,day:"numeric"},"month"),fe=(Re,pt)=>y?Xa(i,Re):D(pt?{weekday:Re}:{weekday:Re,month:"long",day:"numeric"},"weekday"),pe=Re=>{const pt=Lt.macroTokenToFormatOpts(Re);return pt?this.formatWithSystemDefault(i,pt):Re},Ue=Re=>y?rs(i,Re):D({era:Re},"era"),Pe=Re=>{switch(Re){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 U({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return U({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return U({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 L();case"d":return j?D({day:"numeric"},"day"):this.num(i.day);case"dd":return j?D({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 j?D({month:"numeric",day:"numeric"},"month"):this.num(i.month);case"LL":return j?D({month:"2-digit",day:"numeric"},"month"):this.num(i.month,2);case"LLL":return B("short",!0);case"LLLL":return B("long",!0);case"LLLLL":return B("narrow",!0);case"M":return j?D({month:"numeric"},"month"):this.num(i.month);case"MM":return j?D({month:"2-digit"},"month"):this.num(i.month,2);case"MMM":return B("short",!1);case"MMMM":return B("long",!1);case"MMMMM":return B("narrow",!1);case"y":return j?D({year:"numeric"},"year"):this.num(i.year);case"yy":return j?D({year:"2-digit"},"year"):this.num(i.year.toString().slice(-2),2);case"yyyy":return j?D({year:"numeric"},"year"):this.num(i.year,4);case"yyyyyy":return j?D({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 pe(Re)}};return Ks(Lt.parseFormat(h),Pe)}formatDurationFromString(i,h){const y=this.opts.signMode==="negativeLargestOnly"?-1:1,j=pe=>{switch(pe[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},D=(pe,Ue)=>Pe=>{const Re=j(Pe);if(Re){const pt=Ue.isNegativeDuration&&Re!==Ue.largestUnit?y:1;let Vt;return this.opts.signMode==="negativeLargestOnly"&&Re!==Ue.largestUnit?Vt="never":this.opts.signMode==="all"?Vt="always":Vt="auto",this.num(pe.get(Re)*pt,Pe.length,Vt)}else return Pe},U=Lt.parseFormat(h),L=U.reduce((pe,{literal:Ue,val:Pe})=>Ue?pe:pe.concat(Pe),[]),B=i.shiftTo(...L.map(j).filter(pe=>pe)),fe={isNegativeDuration:B<0,largestUnit:Object.keys(B.values)[0]};return Ks(U,D(B,fe))}}const is=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Ja(...g){const i=g.reduce((h,y)=>h+y.source,"");return RegExp(`^${i}$`)}function Rn(...g){return i=>g.reduce(([h,y,j],D)=>{const[U,L,B]=D(i,j);return[{...h,...U},L||y,B]},[{},null,1]).slice(0,2)}function wt(g,...i){if(g==null)return[null,null];for(const[h,y]of i){const j=h.exec(g);if(j)return y(j)}return[null,null]}function hn(...g){return(i,h)=>{const y={};let j;for(j=0;j<g.length;j++)y[g[j]]=jt(i[h+j]);return[y,null,h+j]}}const us=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,cs=`(?:${us.source}?(?:\\[(${is.source})\\])?)?`,Kr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,tr=RegExp(`${Kr.source}${cs}`),os=RegExp(`(?:[Tt]${tr.source})?`),ds=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ar=/(\d{4})-?W(\d\d)(?:-?(\d))?/,ju=/(\d{4})-?(\d{3})/,io=hn("weekYear","weekNumber","weekDay"),uo=hn("year","ordinal"),co=/(\d{4})-(\d\d)-(\d\d)/,nr=RegExp(`${Kr.source} ?(?:${us.source}|(${is.source}))?`),oo=RegExp(`(?: ${nr.source})?`);function rl(g,i,h){const y=g[i];return Ce(y)?h:jt(y)}function fo(g,i){return[{year:rl(g,i),month:rl(g,i+1,1),day:rl(g,i+2,1)},null,i+3]}function il(g,i){return[{hours:rl(g,i,0),minutes:rl(g,i+1,0),seconds:rl(g,i+2,0),milliseconds:Zr(g[i+3])},null,i+4]}function fs(g,i){const h=!g[i]&&!g[i+1],y=ts(g[i+1],g[i+2]),j=h?null:ot.instance(y);return[{},j,i+3]}function ul(g,i){const h=g[i]?de.create(g[i]):null;return[{},h,i+1]}const ho=RegExp(`^T?${Kr.source}$`),mo=/^-?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 go(g){const[i,h,y,j,D,U,L,B,fe]=g,pe=i[0]==="-",Ue=B&&B[0]==="-",Pe=(Re,pt=!1)=>Re!==void 0&&(pt||Re&&pe)?-Re:Re;return[{years:Pe(dn(h)),months:Pe(dn(y)),weeks:Pe(dn(j)),days:Pe(dn(D)),hours:Pe(dn(U)),minutes:Pe(dn(L)),seconds:Pe(dn(B),B==="-0"),milliseconds:Pe(Zr(fe),Ue)}]}const xo={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function hs(g,i,h,y,j,D,U){const L={year:i.length===2?es(jt(i)):jt(i),month:Xs.indexOf(h)+1,day:jt(y),hour:jt(j),minute:jt(D)};return U&&(L.second=jt(U)),g&&(L.weekday=g.length>3?ls.indexOf(g)+1:Ra.indexOf(g)+1),L}const yo=/^(?:(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 po(g){const[,i,h,y,j,D,U,L,B,fe,pe,Ue]=g,Pe=hs(i,j,y,h,D,U,L);let Re;return B?Re=xo[B]:fe?Re=0:Re=ts(pe,Ue),[Pe,new ot(Re)]}function vo(g){return g.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const wu=/^(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$/,bo=/^(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$/,So=/^(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 Eu(g){const[,i,h,y,j,D,U,L]=g;return[hs(i,j,y,h,D,U,L),ot.utcInstance]}function No(g){const[,i,h,y,j,D,U,L]=g;return[hs(i,L,h,y,j,D,U),ot.utcInstance]}const jo=Ja(ds,os),wo=Ja(ar,os),Eo=Ja(ju,os),To=Ja(tr),Tu=Rn(fo,il,fs,ul),ei=Rn(io,il,fs,ul),ms=Rn(uo,il,fs,ul),Co=Rn(il,fs,ul);function Cu(g){return wt(g,[jo,Tu],[wo,ei],[Eo,ms],[To,Co])}function Mu(g){return wt(vo(g),[yo,po])}function Ou(g){return wt(g,[wu,Eu],[bo,Eu],[So,No])}function Ru(g){return wt(g,[mo,go])}const Du=Rn(il);function cl(g){return wt(g,[ho,Du])}const Mo=Ja(co,oo),Oo=Ja(nr),Ro=Rn(il,fs,ul);function Au(g){return wt(g,[Mo,Tu],[Oo,Ro])}const ti="Invalid Duration",ol={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}},gs={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},...ol},ca=146097/400,Ka=146097/4800,_u={years:{quarters:4,months:12,weeks:ca/7,days:ca,hours:ca*24,minutes:ca*24*60,seconds:ca*24*60*60,milliseconds:ca*24*60*60*1e3},quarters:{months:3,weeks:ca/28,days:ca/4,hours:ca*24/4,minutes:ca*24*60/4,seconds:ca*24*60*60/4,milliseconds:ca*24*60*60*1e3/4},months:{weeks:Ka/7,days:Ka,hours:Ka*24,minutes:Ka*24*60,seconds:Ka*24*60*60,milliseconds:Ka*24*60*60*1e3},...ol},mn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ai=mn.slice(0).reverse();function ba(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 $e(y)}function ni(g,i){var h;let y=(h=i.milliseconds)!=null?h:0;for(const j of ai.slice(1))i[j]&&(y+=i[j]*g[j].milliseconds);return y}function li(g,i){const h=ni(g,i)<0?-1:1;mn.reduceRight((y,j)=>{if(Ce(i[j]))return y;if(y){const D=i[y]*h,U=g[j][y],L=Math.floor(D/U);i[j]+=L*h,i[y]-=L*U*h}return j},null),mn.reduce((y,j)=>{if(Ce(i[j]))return y;if(y){const D=i[y]%1;i[y]-=D,i[j]+=D*g[y][j]}return j},null)}function si(g){const i={};for(const[h,y]of Object.entries(g))y!==0&&(i[h]=y);return i}class $e{constructor(i){const h=i.conversionAccuracy==="longterm"||!1;let y=h?_u:gs;i.matrix&&(y=i.matrix),this.values=i.values,this.loc=i.loc||He.create(),this.conversionAccuracy=h?"longterm":"casual",this.invalid=i.invalid||null,this.matrix=y,this.isLuxonDuration=!0}static fromMillis(i,h){return $e.fromObject({milliseconds:i},h)}static fromObject(i,h={}){if(i==null||typeof i!="object")throw new b(`Duration.fromObject: argument expected to be an object, got ${i===null?"null":typeof i}`);return new $e({values:Ia(i,$e.normalizeUnit),loc:He.fromObject(h),conversionAccuracy:h.conversionAccuracy,matrix:h.matrix})}static fromDurationLike(i){if(ua(i))return $e.fromMillis(i);if($e.isDuration(i))return i;if(typeof i=="object")return $e.fromObject(i);throw new b(`Unknown duration argument ${i} of type ${typeof i}`)}static fromISO(i,h){const[y]=Ru(i);return y?$e.fromObject(y,h):$e.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static fromISOTime(i,h){const[y]=cl(i);return y?$e.fromObject(y,h):$e.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static invalid(i,h=null){if(!i)throw new b("need to specify a reason the Duration is invalid");const y=i instanceof ia?i:new ia(i,h);if(dt.throwOnInvalid)throw new c(y);return new $e({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?Lt.create(this.loc,y).formatDurationFromString(this,i):ti}toHuman(i={}){if(!this.isValid)return ti;const h=i.showZeros!==!1,y=mn.map(j=>{const D=this.values[j];return Ce(D)||D===0&&!h?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...i,unit:j.slice(0,-1)}).format(D)}).filter(j=>j);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+=Kl(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},je.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?ni(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(i){if(!this.isValid)return this;const h=$e.fromDurationLike(i),y={};for(const j of mn)(Cn(h.values,j)||Cn(this.values,j))&&(y[j]=h.get(j)+this.get(j));return ba(this,{values:y},!0)}minus(i){if(!this.isValid)return this;const h=$e.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]=Wr(i(this.values[y],y));return ba(this,{values:h},!0)}get(i){return this[$e.normalizeUnit(i)]}set(i){if(!this.isValid)return this;const h={...this.values,...Ia(i,$e.normalizeUnit)};return ba(this,{values:h})}reconfigure({locale:i,numberingSystem:h,conversionAccuracy:y,matrix:j}={}){const U={loc:this.loc.clone({locale:i,numberingSystem:h}),matrix:j,conversionAccuracy:y};return ba(this,U)}as(i){return this.isValid?this.shiftTo(i).get(i):NaN}normalize(){if(!this.isValid)return this;const i=this.toObject();return li(this.matrix,i),ba(this,{values:i},!0)}rescale(){if(!this.isValid)return this;const i=si(this.normalize().shiftToAll().toObject());return ba(this,{values:i},!0)}shiftTo(...i){if(!this.isValid)return this;if(i.length===0)return this;i=i.map(U=>$e.normalizeUnit(U));const h={},y={},j=this.toObject();let D;for(const U of mn)if(i.indexOf(U)>=0){D=U;let L=0;for(const fe in y)L+=this.matrix[fe][U]*y[fe],y[fe]=0;ua(j[U])&&(L+=j[U]);const B=Math.trunc(L);h[U]=B,y[U]=(L*1e3-B*1e3)/1e3}else ua(j[U])&&(y[U]=j[U]);for(const U in y)y[U]!==0&&(h[D]+=U===D?y[U]:y[U]/this.matrix[D][U]);return li(this.matrix,h),ba(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 ba(this,{values:i},!0)}removeZeros(){if(!this.isValid)return this;const i=si(this.values);return ba(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,j){return y===void 0||y===0?j===void 0||j===0:y===j}for(const y of mn)if(!h(this.values[y],i.values[y]))return!1;return!0}}const dl="Invalid Interval";function Do(g,i){return!g||!g.isValid?ft.invalid("missing or invalid start"):!i||!i.isValid?ft.invalid("missing or invalid end"):i<g?ft.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 ft{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 b("need to specify a reason the Interval is invalid");const y=i instanceof ia?i:new ia(i,h);if(dt.throwOnInvalid)throw new d(y);return new ft({invalid:y})}static fromDateTimes(i,h){const y=fa(i),j=fa(h),D=Do(y,j);return D??new ft({start:y,end:j})}static after(i,h){const y=$e.fromDurationLike(h),j=fa(i);return ft.fromDateTimes(j,j.plus(y))}static before(i,h){const y=$e.fromDurationLike(h),j=fa(i);return ft.fromDateTimes(j.minus(y),j)}static fromISO(i,h){const[y,j]=(i||"").split("/",2);if(y&&j){let D,U;try{D=je.fromISO(y,h),U=D.isValid}catch{U=!1}let L,B;try{L=je.fromISO(j,h),B=L.isValid}catch{B=!1}if(U&&B)return ft.fromDateTimes(D,L);if(U){const fe=$e.fromISO(j,h);if(fe.isValid)return ft.after(D,fe)}else if(B){const fe=$e.fromISO(y,h);if(fe.isValid)return ft.before(L,fe)}}return ft.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 j;return h!=null&&h.useLocaleWeeks?j=this.end.reconfigure({locale:y.locale}):j=this.end,j=j.startOf(i,h),Math.floor(j.diff(y,i).get(i))+(j.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?ft.fromDateTimes(i||this.s,h||this.e):this}splitAt(...i){if(!this.isValid)return[];const h=i.map(fa).filter(U=>this.contains(U)).sort((U,L)=>U.toMillis()-L.toMillis()),y=[];let{s:j}=this,D=0;for(;j<this.e;){const U=h[D]||this.e,L=+U>+this.e?this.e:U;y.push(ft.fromDateTimes(j,L)),j=L,D+=1}return y}splitBy(i){const h=$e.fromDurationLike(i);if(!this.isValid||!h.isValid||h.as("milliseconds")===0)return[];let{s:y}=this,j=1,D;const U=[];for(;y<this.e;){const L=this.start.plus(h.mapUnits(B=>B*j));D=+L>+this.e?this.e:L,U.push(ft.fromDateTimes(y,D)),y=D,j+=1}return U}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:ft.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 ft.fromDateTimes(h,y)}static merge(i){const[h,y]=i.sort((j,D)=>j.s-D.s).reduce(([j,D],U)=>D?D.overlaps(U)||D.abutsStart(U)?[j,D.union(U)]:[j.concat([D]),U]:[j,U],[[],null]);return y&&h.push(y),h}static xor(i){let h=null,y=0;const j=[],D=i.map(B=>[{time:B.s,type:"s"},{time:B.e,type:"e"}]),U=Array.prototype.concat(...D),L=U.sort((B,fe)=>B.time-fe.time);for(const B of L)y+=B.type==="s"?1:-1,y===1?h=B.time:(h&&+h!=+B.time&&j.push(ft.fromDateTimes(h,B.time)),h=null);return ft.merge(j)}difference(...i){return ft.xor([this].concat(i)).map(h=>this.intersection(h)).filter(h=>h&&!h.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:dl}[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?Lt.create(this.s.loc.clone(h),i).formatInterval(this):dl}toISO(i){return this.isValid?`${this.s.toISO(i)}/${this.e.toISO(i)}`:dl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:dl}toISOTime(i){return this.isValid?`${this.s.toISOTime(i)}/${this.e.toISOTime(i)}`:dl}toFormat(i,{separator:h=" – "}={}){return this.isValid?`${this.s.toFormat(i)}${h}${this.e.toFormat(i)}`:dl}toDuration(i,h){return this.isValid?this.e.diff(this.s,i,h):$e.invalid(this.invalidReason)}mapEndpoints(i){return ft.fromDateTimes(i(this.s),i(this.e))}}class xs{static hasDST(i=dt.defaultZone){const h=je.now().setZone(i).set({month:12});return!i.isUniversal&&h.offset!==h.set({month:6}).offset}static isValidIANAZone(i){return de.isValidZone(i)}static normalizeZone(i){return Pt(i,dt.defaultZone)}static getStartOfWeek({locale:i=null,locObj:h=null}={}){return(h||He.create(i)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:i=null,locObj:h=null}={}){return(h||He.create(i)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:i=null,locObj:h=null}={}){return(h||He.create(i)).getWeekendDays().slice()}static months(i="long",{locale:h=null,numberingSystem:y=null,locObj:j=null,outputCalendar:D="gregory"}={}){return(j||He.create(h,y,D)).months(i)}static monthsFormat(i="long",{locale:h=null,numberingSystem:y=null,locObj:j=null,outputCalendar:D="gregory"}={}){return(j||He.create(h,y,D)).months(i,!0)}static weekdays(i="long",{locale:h=null,numberingSystem:y=null,locObj:j=null}={}){return(j||He.create(h,y,null)).weekdays(i)}static weekdaysFormat(i="long",{locale:h=null,numberingSystem:y=null,locObj:j=null}={}){return(j||He.create(h,y,null)).weekdays(i,!0)}static meridiems({locale:i=null}={}){return He.create(i).meridiems()}static eras(i="short",{locale:h=null}={}){return He.create(h,null,"gregory").eras(i)}static features(){return{relative:Gr(),localeWeek:on()}}}function ta(g,i){const h=j=>j.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),y=h(i)-h(g);return Math.floor($e.fromMillis(y).as("days"))}function ys(g,i,h){const y=[["years",(B,fe)=>fe.year-B.year],["quarters",(B,fe)=>fe.quarter-B.quarter+(fe.year-B.year)*4],["months",(B,fe)=>fe.month-B.month+(fe.year-B.year)*12],["weeks",(B,fe)=>{const pe=ta(B,fe);return(pe-pe%7)/7}],["days",ta]],j={},D=g;let U,L;for(const[B,fe]of y)h.indexOf(B)>=0&&(U=B,j[B]=fe(g,i),L=D.plus(j),L>i?(j[B]--,g=D.plus(j),g>i&&(L=g,j[B]--,g=D.plus(j))):g=L);return[g,j,L,U]}function ku(g,i,h,y){let[j,D,U,L]=ys(g,i,h);const B=i-j,fe=h.filter(Ue=>["hours","minutes","seconds","milliseconds"].indexOf(Ue)>=0);fe.length===0&&(U<i&&(U=j.plus({[L]:1})),U!==j&&(D[L]=(D[L]||0)+B/(U-j)));const pe=$e.fromObject(D,y);return fe.length>0?$e.fromMillis(B,y).shiftTo(...fe).plus(pe):pe}const zu="missing Intl.DateTimeFormat.formatToParts support";function We(g,i=h=>h){return{regex:g,deser:([h])=>i(so(h))}}const lr="[ ]",Uu=new RegExp(lr,"g");function fl(g){return g.replace(/\./g,"\\.?").replace(Uu,lr)}function sr(g){return g.replace(/\./g,"").replace(Uu," ").toLowerCase()}function Wt(g,i){return g===null?null:{regex:RegExp(g.map(fl).join("|")),deser:([h])=>g.findIndex(y=>sr(h)===sr(y))+i}}function rr(g,i){return{regex:g,deser:([,h,y])=>ts(h,y),groups:i}}function ps(g){return{regex:g,deser:([i])=>i}}function Dn(g){return g.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function hl(g,i){const h=Kt(i),y=Kt(i,"{2}"),j=Kt(i,"{3}"),D=Kt(i,"{4}"),U=Kt(i,"{6}"),L=Kt(i,"{1,2}"),B=Kt(i,"{1,3}"),fe=Kt(i,"{1,6}"),pe=Kt(i,"{1,9}"),Ue=Kt(i,"{2,4}"),Pe=Kt(i,"{4,6}"),Re=Bt=>({regex:RegExp(Dn(Bt.val)),deser:([gn])=>gn,literal:!0}),Vt=(Bt=>{if(g.literal)return Re(Bt);switch(Bt.val){case"G":return Wt(i.eras("short"),0);case"GG":return Wt(i.eras("long"),0);case"y":return We(fe);case"yy":return We(Ue,es);case"yyyy":return We(D);case"yyyyy":return We(Pe);case"yyyyyy":return We(U);case"M":return We(L);case"MM":return We(y);case"MMM":return Wt(i.months("short",!0),1);case"MMMM":return Wt(i.months("long",!0),1);case"L":return We(L);case"LL":return We(y);case"LLL":return Wt(i.months("short",!1),1);case"LLLL":return Wt(i.months("long",!1),1);case"d":return We(L);case"dd":return We(y);case"o":return We(B);case"ooo":return We(j);case"HH":return We(y);case"H":return We(L);case"hh":return We(y);case"h":return We(L);case"mm":return We(y);case"m":return We(L);case"q":return We(L);case"qq":return We(y);case"s":return We(L);case"ss":return We(y);case"S":return We(B);case"SSS":return We(j);case"u":return ps(pe);case"uu":return ps(L);case"uuu":return We(h);case"a":return Wt(i.meridiems(),0);case"kkkk":return We(D);case"kk":return We(Ue,es);case"W":return We(L);case"WW":return We(y);case"E":case"c":return We(h);case"EEE":return Wt(i.weekdays("short",!1),1);case"EEEE":return Wt(i.weekdays("long",!1),1);case"ccc":return Wt(i.weekdays("short",!0),1);case"cccc":return Wt(i.weekdays("long",!0),1);case"Z":case"ZZ":return rr(new RegExp(`([+-]${L.source})(?::(${y.source}))?`),2);case"ZZZ":return rr(new RegExp(`([+-]${L.source})(${y.source})?`),2);case"z":return ps(/[a-z_+-/]{1,256}?/i);case" ":return ps(/[^\S\n\r]/);default:return Re(Bt)}})(g)||{invalidReason:zu};return Vt.token=g,Vt}const ri={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 Lu(g,i,h){const{type:y,value:j}=g;if(y==="literal"){const B=/^\s+$/.test(j);return{literal:!B,val:B?" ":j}}const D=i[y];let U=y;y==="hour"&&(i.hour12!=null?U=i.hour12?"hour12":"hour24":i.hourCycle!=null?i.hourCycle==="h11"||i.hourCycle==="h12"?U="hour12":U="hour24":U=h.hour12?"hour12":"hour24");let L=ri[U];if(typeof L=="object"&&(L=L[D]),L)return{literal:!1,val:L}}function An(g){return[`^${g.map(h=>h.regex).reduce((h,y)=>`${h}(${y.source})`,"")}$`,g]}function Hu(g,i,h){const y=g.match(i);if(y){const j={};let D=1;for(const U in h)if(Cn(h,U)){const L=h[U],B=L.groups?L.groups+1:1;!L.literal&&L.token&&(j[L.token.val[0]]=L.deser(y.slice(D,D+B))),D+=B}return[y,j]}else return[y,{}]}function qu(g){const i=D=>{switch(D){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let h=null,y;return Ce(g.z)||(h=de.create(g.z)),Ce(g.Z)||(h||(h=new ot(g.Z)),y=g.Z),Ce(g.q)||(g.M=(g.q-1)*3+1),Ce(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),Ce(g.u)||(g.S=Zr(g.u)),[Object.keys(g).reduce((D,U)=>{const L=i(U);return L&&(D[L]=g[U]),D},{}),h,y]}let ir=null;function _o(){return ir||(ir=je.fromMillis(1555555555555)),ir}function ko(g,i){if(g.literal)return g;const h=Lt.macroTokenToFormatOpts(g.val),y=oa(h,i);return y==null||y.includes(void 0)?g:y}function Vu(g,i){return Array.prototype.concat(...g.map(h=>ko(h,i)))}class ii{constructor(i,h){if(this.locale=i,this.format=h,this.tokens=Vu(Lt.parseFormat(h),i),this.units=this.tokens.map(y=>hl(y,i)),this.disqualifyingUnit=this.units.find(y=>y.invalidReason),!this.disqualifyingUnit){const[y,j]=An(this.units);this.regex=RegExp(y,"i"),this.handlers=j}}explainFromTokens(i){if(this.isValid){const[h,y]=Hu(i,this.regex,this.handlers),[j,D,U]=y?qu(y):[null,null,void 0];if(Cn(y,"a")&&Cn(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:j,zone:D,specificOffset:U}}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 ui(g,i,h){return new ii(g,h).explainFromTokens(i)}function ci(g,i,h){const{result:y,zone:j,specificOffset:D,invalidReason:U}=ui(g,i,h);return[y,j,D,U]}function oa(g,i){if(!g)return null;const y=Lt.create(i,g).dtFormatter(_o()),j=y.formatToParts(),D=y.resolvedOptions();return j.map(U=>Lu(U,g,D))}const ml="Invalid DateTime",sa=864e13;function Da(g){return new ia("unsupported zone",`the zone "${g.name}" is not supported`)}function vs(g){return g.weekData===null&&(g.weekData=Ut(g.c)),g.weekData}function gl(g){return g.localWeekData===null&&(g.localWeekData=Ut(g.c,g.loc.getMinDaysInFirstWeek(),g.loc.getStartOfWeek())),g.localWeekData}function Aa(g,i){const h={ts:g.ts,zone:g.zone,c:g.c,o:g.o,loc:g.loc,invalid:g.invalid};return new je({...h,...i,old:h})}function ur(g,i,h){let y=g-i*60*1e3;const j=h.offset(y);if(i===j)return[y,i];y-=(j-i)*60*1e3;const D=h.offset(y);return j===D?[y,j]:[g-Math.min(j,D)*60*1e3,Math.max(j,D)]}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 bs(g,i,h){return ur(Zt(g),i,h)}function Ss(g,i){const h=g.o,y=g.c.year+Math.trunc(i.years),j=g.c.month+Math.trunc(i.months)+Math.trunc(i.quarters)*3,D={...g.c,year:y,month:j,day:Math.min(g.c.day,Qs(y,j))+Math.trunc(i.days)+Math.trunc(i.weeks)*7},U=$e.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"),L=Zt(D);let[B,fe]=ur(L,h,g.zone);return U!==0&&(B+=U,fe=g.zone.offset(B)),{ts:B,o:fe}}function Sa(g,i,h,y,j,D){const{setZone:U,zone:L}=h;if(g&&Object.keys(g).length!==0||i){const B=i||L,fe=je.fromObject(g,{...h,zone:B,specificOffset:D});return U?fe:fe.setZone(L)}else return je.invalid(new ia("unparsable",`the input "${j}" can't be parsed as ${y}`))}function cr(g,i,h=!0){return g.isValid?Lt.create(He.create("en-US"),{allowZ:h,forceSimple:!0}).formatDateTimeFromString(g,i):null}function Qt(g,i,h){const y=g.c.year>9999||g.c.year<0;let j="";if(y&&g.c.year>=0&&(j+="+"),j+=et(g.c.year,y?6:4),h==="year")return j;if(i){if(j+="-",j+=et(g.c.month),h==="month")return j;j+="-"}else if(j+=et(g.c.month),h==="month")return j;return j+=et(g.c.day),j}function or(g,i,h,y,j,D,U){let L=!h||g.c.millisecond!==0||g.c.second!==0,B="";switch(U){case"day":case"month":case"year":break;default:if(B+=et(g.c.hour),U==="hour")break;if(i){if(B+=":",B+=et(g.c.minute),U==="minute")break;L&&(B+=":",B+=et(g.c.second))}else{if(B+=et(g.c.minute),U==="minute")break;L&&(B+=et(g.c.second))}if(U==="second")break;L&&(!y||g.c.millisecond!==0)&&(B+=".",B+=et(g.c.millisecond,3))}return j&&(g.isOffsetFixed&&g.offset===0&&!D?B+="Z":g.o<0?(B+="-",B+=et(Math.trunc(-g.o/60)),B+=":",B+=et(Math.trunc(-g.o%60))):(B+="+",B+=et(Math.trunc(g.o/60)),B+=":",B+=et(Math.trunc(g.o%60)))),D&&(B+="["+g.zone.ianaName+"]"),B}const ka={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Bu={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},dr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},za=["year","month","day","hour","minute","second","millisecond"],oi=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Yu=["year","ordinal","hour","minute","second","millisecond"];function xl(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 di(g){switch(g.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return xl(g)}}function da(g){if(en===void 0&&(en=dt.now()),g.type!=="iana")return g.offset(en);const i=g.name;let h=aa.get(i);return h===void 0&&(h=g.offset(en),aa.set(i,h)),h}function _n(g,i){const h=Pt(i.zone,dt.defaultZone);if(!h.isValid)return je.invalid(Da(h));const y=He.fromObject(i);let j,D;if(Ce(g.year))j=dt.now();else{for(const B of za)Ce(g[B])&&(g[B]=ka[B]);const U=Zs(g)||Tn(g);if(U)return je.invalid(U);const L=da(h);[j,D]=bs(g,L,h)}return new je({ts:j,zone:h,loc:y,o:D})}function kn(g,i,h){const y=Ce(h.round)?!0:h.round,j=Ce(h.rounding)?"trunc":h.rounding,D=(L,B)=>(L=Kl(L,y||h.calendary?0:2,h.calendary?"round":j),i.loc.clone(h).relFormatter(h).format(L,B)),U=L=>h.calendary?i.hasSame(g,L)?0:i.startOf(L).diff(g.startOf(L),L).get(L):i.diff(g,L).get(L);if(h.unit)return D(U(h.unit),h.unit);for(const L of h.units){const B=U(L);if(Math.abs(B)>=1)return D(B,L)}return D(g>i?-0:0,h.units[h.units.length-1])}function Ns(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 en;const aa=new Map;class je{constructor(i){const h=i.zone||dt.defaultZone;let y=i.invalid||(Number.isNaN(i.ts)?new ia("invalid input"):null)||(h.isValid?null:Da(h));this.ts=Ce(i.ts)?dt.now():i.ts;let j=null,D=null;if(!y)if(i.old&&i.old.ts===this.ts&&i.old.zone.equals(h))[j,D]=[i.old.c,i.old.o];else{const L=ua(i.o)&&!i.old?i.o:h.offset(this.ts);j=_a(this.ts,L),y=Number.isNaN(j.year)?new ia("invalid input"):null,j=y?null:j,D=y?null:L}this._zone=h,this.loc=i.loc||He.create(),this.invalid=y,this.weekData=null,this.localWeekData=null,this.c=j,this.o=D,this.isLuxonDateTime=!0}static now(){return new je({})}static local(){const[i,h]=Ns(arguments),[y,j,D,U,L,B,fe]=h;return _n({year:y,month:j,day:D,hour:U,minute:L,second:B,millisecond:fe},i)}static utc(){const[i,h]=Ns(arguments),[y,j,D,U,L,B,fe]=h;return i.zone=ot.utcInstance,_n({year:y,month:j,day:D,hour:U,minute:L,second:B,millisecond:fe},i)}static fromJSDate(i,h={}){const y=yu(i)?i.valueOf():NaN;if(Number.isNaN(y))return je.invalid("invalid input");const j=Pt(h.zone,dt.defaultZone);return j.isValid?new je({ts:y,zone:j,loc:He.fromObject(h)}):je.invalid(Da(j))}static fromMillis(i,h={}){if(ua(i))return i<-sa||i>sa?je.invalid("Timestamp out of range"):new je({ts:i,zone:Pt(h.zone,dt.defaultZone),loc:He.fromObject(h)});throw new b(`fromMillis requires a numerical input, but received a ${typeof i} with value ${i}`)}static fromSeconds(i,h={}){if(ua(i))return new je({ts:i*1e3,zone:Pt(h.zone,dt.defaultZone),loc:He.fromObject(h)});throw new b("fromSeconds requires a numerical input")}static fromObject(i,h={}){i=i||{};const y=Pt(h.zone,dt.defaultZone);if(!y.isValid)return je.invalid(Da(y));const j=He.fromObject(h),D=Ia(i,di),{minDaysInFirstWeek:U,startOfWeek:L}=gu(D,j),B=dt.now(),fe=Ce(h.specificOffset)?y.offset(B):h.specificOffset,pe=!Ce(D.ordinal),Ue=!Ce(D.year),Pe=!Ce(D.month)||!Ce(D.day),Re=Ue||Pe,pt=D.weekYear||D.weekNumber;if((Re||pe)&&pt)throw new f("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Pe&&pe)throw new f("Can't mix ordinal dates with month/day");const Vt=pt||D.weekday&&!Re;let Bt,gn,tn=_a(B,fe);Vt?(Bt=oi,gn=Bu,tn=Ut(tn,U,L)):pe?(Bt=Yu,gn=dr,tn=Xl(tn)):(Bt=za,gn=ka);let fr=!1;for(const Ha of Bt){const hr=D[Ha];Ce(hr)?fr?D[Ha]=gn[Ha]:D[Ha]=tn[Ha]:fr=!0}const zn=Vt?xu(D,U,L):pe?Jl(D):Zs(D),La=zn||Tn(D);if(La)return je.invalid(La);const xn=Vt?En(D,U,L):pe?mu(D):D,[an,fi]=bs(xn,fe,y),Un=new je({ts:an,zone:y,o:fi,loc:j});return D.weekday&&Re&&i.weekday!==Un.weekday?je.invalid("mismatched weekday",`you can't specify both a weekday of ${D.weekday} and a date of ${Un.toISO()}`):Un.isValid?Un:je.invalid(Un.invalid)}static fromISO(i,h={}){const[y,j]=Cu(i);return Sa(y,j,h,"ISO 8601",i)}static fromRFC2822(i,h={}){const[y,j]=Mu(i);return Sa(y,j,h,"RFC 2822",i)}static fromHTTP(i,h={}){const[y,j]=Ou(i);return Sa(y,j,h,"HTTP",h)}static fromFormat(i,h,y={}){if(Ce(i)||Ce(h))throw new b("fromFormat requires an input string and a format");const{locale:j=null,numberingSystem:D=null}=y,U=He.fromOpts({locale:j,numberingSystem:D,defaultToEN:!0}),[L,B,fe,pe]=ci(U,i,h);return pe?je.invalid(pe):Sa(L,B,y,`format ${h}`,i,fe)}static fromString(i,h,y={}){return je.fromFormat(i,h,y)}static fromSQL(i,h={}){const[y,j]=Au(i);return Sa(y,j,h,"SQL",i)}static invalid(i,h=null){if(!i)throw new b("need to specify a reason the DateTime is invalid");const y=i instanceof ia?i:new ia(i,h);if(dt.throwOnInvalid)throw new r(y);return new je({invalid:y})}static isDateTime(i){return i&&i.isLuxonDateTime||!1}static parseFormatForOpts(i,h={}){const y=oa(i,He.fromObject(h));return y?y.map(j=>j?j.val:null).join(""):null}static expandFormat(i,h={}){return Vu(Lt.parseFormat(i),He.fromObject(h)).map(j=>j.val).join("")}static resetCache(){en=void 0,aa.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?vs(this).weekYear:NaN}get weekNumber(){return this.isValid?vs(this).weekNumber:NaN}get weekday(){return this.isValid?vs(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?gl(this).weekday:NaN}get localWeekNumber(){return this.isValid?gl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?gl(this).weekYear:NaN}get ordinal(){return this.isValid?Xl(this.c).ordinal:NaN}get monthShort(){return this.isValid?xs.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?xs.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?xs.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?xs.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=Zt(this.c),j=this.zone.offset(y-i),D=this.zone.offset(y+i),U=this.zone.offset(y-j*h),L=this.zone.offset(y-D*h);if(U===L)return[this];const B=y-U*h,fe=y-L*h,pe=_a(B,U),Ue=_a(fe,L);return pe.hour===Ue.hour&&pe.minute===Ue.minute&&pe.second===Ue.second&&pe.millisecond===Ue.millisecond?[Aa(this,{ts:B}),Aa(this,{ts:fe})]:[this]}get isInLeapYear(){return nl(this.year)}get daysInMonth(){return Qs(this.year,this.month)}get daysInYear(){return this.isValid?Qa(this.year):NaN}get weeksInWeekYear(){return this.isValid?ll(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ll(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(i={}){const{locale:h,numberingSystem:y,calendar:j}=Lt.create(this.loc.clone(i),i).resolvedOptions(this);return{locale:h,numberingSystem:y,outputCalendar:j}}toUTC(i=0,h={}){return this.setZone(ot.instance(i),h)}toLocal(){return this.setZone(dt.defaultZone)}setZone(i,{keepLocalTime:h=!1,keepCalendarTime:y=!1}={}){if(i=Pt(i,dt.defaultZone),i.equals(this.zone))return this;if(i.isValid){let j=this.ts;if(h||y){const D=i.offset(this.ts),U=this.toObject();[j]=bs(U,D,i)}return Aa(this,{ts:j,zone:i})}else return je.invalid(Da(i))}reconfigure({locale:i,numberingSystem:h,outputCalendar:y}={}){const j=this.loc.clone({locale:i,numberingSystem:h,outputCalendar:y});return Aa(this,{loc:j})}setLocale(i){return this.reconfigure({locale:i})}set(i){if(!this.isValid)return this;const h=Ia(i,di),{minDaysInFirstWeek:y,startOfWeek:j}=gu(h,this.loc),D=!Ce(h.weekYear)||!Ce(h.weekNumber)||!Ce(h.weekday),U=!Ce(h.ordinal),L=!Ce(h.year),B=!Ce(h.month)||!Ce(h.day),fe=L||B,pe=h.weekYear||h.weekNumber;if((fe||U)&&pe)throw new f("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(B&&U)throw new f("Can't mix ordinal dates with month/day");let Ue;D?Ue=En({...Ut(this.c,y,j),...h},y,j):Ce(h.ordinal)?(Ue={...this.toObject(),...h},Ce(h.day)&&(Ue.day=Math.min(Qs(Ue.year,Ue.month),Ue.day))):Ue=mu({...Xl(this.c),...h});const[Pe,Re]=bs(Ue,this.o,this.zone);return Aa(this,{ts:Pe,o:Re})}plus(i){if(!this.isValid)return this;const h=$e.fromDurationLike(i);return Aa(this,Ss(this,h))}minus(i){if(!this.isValid)return this;const h=$e.fromDurationLike(i).negate();return Aa(this,Ss(this,h))}startOf(i,{useLocaleWeeks:h=!1}={}){if(!this.isValid)return this;const y={},j=$e.normalizeUnit(i);switch(j){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(j==="weeks")if(h){const D=this.loc.getStartOfWeek(),{weekday:U}=this;U<D&&(y.weekNumber=this.weekNumber-1),y.weekday=D}else y.weekday=1;if(j==="quarters"){const D=Math.ceil(this.month/3);y.month=(D-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?Lt.create(this.loc.redefaultToEN(h)).formatDateTimeFromString(this,i):ml}toLocaleString(i=T,h={}){return this.isValid?Lt.create(this.loc.clone(h),i).formatDateTime(this):ml}toLocaleParts(i={}){return this.isValid?Lt.create(this.loc.clone(i),i).formatDateTimeParts(this):[]}toISO({format:i="extended",suppressSeconds:h=!1,suppressMilliseconds:y=!1,includeOffset:j=!0,extendedZone:D=!1,precision:U="milliseconds"}={}){if(!this.isValid)return null;U=xl(U);const L=i==="extended";let B=Qt(this,L,U);return za.indexOf(U)>=3&&(B+="T"),B+=or(this,L,h,y,j,D,U),B}toISODate({format:i="extended",precision:h="day"}={}){return this.isValid?Qt(this,i==="extended",xl(h)):null}toISOWeekDate(){return cr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:i=!1,suppressSeconds:h=!1,includeOffset:y=!0,includePrefix:j=!1,extendedZone:D=!1,format:U="extended",precision:L="milliseconds"}={}){return this.isValid?(L=xl(L),(j&&za.indexOf(L)>=3?"T":"")+or(this,U==="extended",h,i,y,D,L)):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?Qt(this,!0):null}toSQLTime({includeOffset:i=!0,includeZone:h=!1,includeOffsetSpace:y=!0}={}){let j="HH:mm:ss.SSS";return(h||i)&&(y&&(j+=" "),h?j+="z":i&&(j+="ZZ")),cr(this,j,!0)}toSQL(i={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(i)}`:null}toString(){return this.isValid?this.toISO():ml}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(i={}){if(!this.isValid)return{};const 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 $e.invalid("created by diffing an invalid DateTime");const j={locale:this.locale,numberingSystem:this.numberingSystem,...y},D=al(h).map($e.normalizeUnit),U=i.valueOf()>this.valueOf(),L=U?this:i,B=U?i:this,fe=ku(L,B,D,j);return U?fe.negate():fe}diffNow(i="milliseconds",h={}){return this.diff(je.now(),i,h)}until(i){return this.isValid?ft.fromDateTimes(this,i):this}hasSame(i,h,y){if(!this.isValid)return!1;const j=i.valueOf(),D=this.setZone(i.zone,{keepLocalTime:!0});return D.startOf(h,y)<=j&&j<=D.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||je.fromObject({},{zone:this.zone}),y=i.padding?this<h?-i.padding:i.padding:0;let j=["years","months","days","hours","minutes","seconds"],D=i.unit;return Array.isArray(i.unit)&&(j=i.unit,D=void 0),kn(h,this.plus(y),{...i,numeric:"always",units:j,unit:D})}toRelativeCalendar(i={}){return this.isValid?kn(i.base||je.fromObject({},{zone:this.zone}),this,{...i,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...i){if(!i.every(je.isDateTime))throw new b("min requires all arguments be DateTimes");return pu(i,h=>h.valueOf(),Math.min)}static max(...i){if(!i.every(je.isDateTime))throw new b("max requires all arguments be DateTimes");return pu(i,h=>h.valueOf(),Math.max)}static fromFormatExplain(i,h,y={}){const{locale:j=null,numberingSystem:D=null}=y,U=He.fromOpts({locale:j,numberingSystem:D,defaultToEN:!0});return ui(U,i,h)}static fromStringExplain(i,h,y={}){return je.fromFormatExplain(i,h,y)}static buildFormatParser(i,h={}){const{locale:y=null,numberingSystem:j=null}=h,D=He.fromOpts({locale:y,numberingSystem:j,defaultToEN:!0});return new ii(D,i)}static fromFormatParser(i,h,y={}){if(Ce(i)||Ce(h))throw new b("fromFormatParser requires an input string and a format parser");const{locale:j=null,numberingSystem:D=null}=y,U=He.fromOpts({locale:j,numberingSystem:D,defaultToEN:!0});if(!U.equals(h.locale))throw new b(`fromFormatParser called with a locale of ${U}, but the format parser was created for ${h.locale}`);const{result:L,zone:B,specificOffset:fe,invalidReason:pe}=h.explainFromTokens(i);return pe?je.invalid(pe):Sa(L,B,y,`format ${h.format}`,i,fe)}static get DATE_SHORT(){return T}static get DATE_MED(){return w}static get DATE_MED_WITH_WEEKDAY(){return A}static get DATE_FULL(){return O}static get DATE_HUGE(){return C}static get TIME_SIMPLE(){return R}static get TIME_WITH_SECONDS(){return W}static get TIME_WITH_SHORT_OFFSET(){return V}static get TIME_WITH_LONG_OFFSET(){return ee}static get TIME_24_SIMPLE(){return J}static get TIME_24_WITH_SECONDS(){return ue}static get TIME_24_WITH_SHORT_OFFSET(){return $}static get TIME_24_WITH_LONG_OFFSET(){return F}static get DATETIME_SHORT(){return P}static get DATETIME_SHORT_WITH_SECONDS(){return M}static get DATETIME_MED(){return _}static get DATETIME_MED_WITH_SECONDS(){return ae}static get DATETIME_MED_WITH_WEEKDAY(){return Z}static get DATETIME_FULL(){return ce}static get DATETIME_FULL_WITH_SECONDS(){return xe}static get DATETIME_HUGE(){return K}static get DATETIME_HUGE_WITH_SECONDS(){return Y}}function fa(g){if(je.isDateTime(g))return g;if(g&&g.valueOf&&ua(g.valueOf()))return je.fromJSDate(g);if(g&&typeof g=="object")return je.fromObject(g);throw new b(`Unknown datetime argument: ${g}, of type ${typeof g}`)}const Ua="3.7.2";return pa.DateTime=je,pa.Duration=$e,pa.FixedOffsetZone=ot,pa.IANAZone=de,pa.Info=xs,pa.Interval=ft,pa.InvalidZone=zt,pa.Settings=dt,pa.SystemZone=Se,pa.VERSION=Ua,pa.Zone=re,pa}var Hg;function eh(){return Hg||(Hg=1,(function(l){var m,b,S,v,p,Df,T,ql;Object.defineProperty(l,"__esModule",{value:!0}),l.CronDate=l.DAYS_IN_MONTH=l.DateMathOp=l.TimeUnit=void 0;const r=dS();var d;(function(O){O.Second="Second",O.Minute="Minute",O.Hour="Hour",O.Day="Day",O.Month="Month",O.Year="Year"})(d||(l.TimeUnit=d={}));var c;(function(O){O.Add="Add",O.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 A=class A{constructor(C,R){Ke(this,T);Ke(this,m);Ke(this,b,null);Ke(this,S,null);Ke(this,v,{add:{[d.Year]:this.addYear.bind(this),[d.Month]:this.addMonth.bind(this),[d.Day]:this.addDay.bind(this),[d.Hour]:this.addHour.bind(this),[d.Minute]:this.addMinute.bind(this),[d.Second]:this.addSecond.bind(this)},subtract:{[d.Year]:this.subtractYear.bind(this),[d.Month]:this.subtractMonth.bind(this),[d.Day]:this.subtractDay.bind(this),[d.Hour]:this.subtractHour.bind(this),[d.Minute]:this.subtractMinute.bind(this),[d.Second]:this.subtractSecond.bind(this)}});const W={zone:R};if(C?C instanceof A?(we(this,m,te(C,m)),we(this,b,te(C,b)),we(this,S,te(C,S))):C instanceof Date?we(this,m,r.DateTime.fromJSDate(C,W)):typeof C=="number"?we(this,m,r.DateTime.fromMillis(C,W)):(we(this,m,r.DateTime.fromISO(C,W)),te(this,m).isValid||we(this,m,r.DateTime.fromRFC2822(C,W)),te(this,m).isValid||we(this,m,r.DateTime.fromSQL(C,W)),te(this,m).isValid||we(this,m,r.DateTime.fromFormat(C,"EEE, d MMM yyyy HH:mm:ss",W))):we(this,m,r.DateTime.local()),!te(this,m).isValid)throw new Error(`CronDate: unhandled timestamp: ${C}`);R&&R!==te(this,m).zoneName&&we(this,m,te(this,m).setZone(R))}get dstStart(){return te(this,b)}set dstStart(C){we(this,b,C)}get dstEnd(){return te(this,S)}set dstEnd(C){we(this,S,C)}addYear(){we(this,m,te(this,m).plus({years:1}))}addMonth(){we(this,m,te(this,m).plus({months:1}).startOf("month"))}addDay(){we(this,m,te(this,m).plus({days:1}).startOf("day"))}addHour(){we(this,m,te(this,m).plus({hours:1}).startOf("hour"))}addMinute(){we(this,m,te(this,m).plus({minutes:1}).startOf("minute"))}addSecond(){we(this,m,te(this,m).plus({seconds:1}))}subtractYear(){we(this,m,te(this,m).minus({years:1}))}subtractMonth(){we(this,m,te(this,m).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){we(this,m,te(this,m).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){we(this,m,te(this,m).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){we(this,m,te(this,m).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){we(this,m,te(this,m).minus({seconds:1}))}addUnit(C){te(this,v).add[C]()}subtractUnit(C){te(this,v).subtract[C]()}invokeDateOperation(C,R){if(C===c.Add){this.addUnit(R);return}if(C===c.Subtract){this.subtractUnit(R);return}throw new Error(`Invalid verb: ${C}`)}getDate(){return te(this,m).day}getFullYear(){return te(this,m).year}getDay(){const C=te(this,m).weekday;return C===7?0:C}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(){we(this,m,te(this,m).startOf("day"))}setEndOfDay(){we(this,m,te(this,m).endOf("day"))}getTime(){return te(this,m).valueOf()}getUTCDate(){return Ne(this,T,ql).call(this).day}getUTCFullYear(){return Ne(this,T,ql).call(this).year}getUTCDay(){const C=Ne(this,T,ql).call(this).weekday;return C===7?0:C}getUTCMonth(){return Ne(this,T,ql).call(this).month-1}getUTCHours(){return Ne(this,T,ql).call(this).hour}getUTCMinutes(){return Ne(this,T,ql).call(this).minute}getUTCSeconds(){return Ne(this,T,ql).call(this).second}toISOString(){return te(this,m).toUTC().toISO()}toJSON(){return te(this,m).toJSON()}setDate(C){we(this,m,te(this,m).set({day:C}))}setFullYear(C){we(this,m,te(this,m).set({year:C}))}setDay(C){we(this,m,te(this,m).set({weekday:C}))}setMonth(C){we(this,m,te(this,m).set({month:C+1}))}setHours(C){we(this,m,te(this,m).set({hour:C}))}setMinutes(C){we(this,m,te(this,m).set({minute:C}))}setSeconds(C){we(this,m,te(this,m).set({second:C}))}setMilliseconds(C){we(this,m,te(this,m).set({millisecond:C}))}toString(){return this.toDate().toString()}toDate(){return te(this,m).toJSDate()}isLastDayOfMonth(){var W;const{day:C,month:R}=te(this,m);if(R===2){const V=Ne(W=A,p,Df).call(W,te(this,m).year);return C===l.DAYS_IN_MONTH[R-1]-(V?0:1)}return C===l.DAYS_IN_MONTH[R-1]}isLastWeekdayOfMonth(){var V;const{day:C,month:R}=te(this,m);let W;return R===2?W=l.DAYS_IN_MONTH[R-1]-(Ne(V=A,p,Df).call(V,te(this,m).year)?0:1):W=l.DAYS_IN_MONTH[R-1],C>W-7}applyDateOperation(C,R,W){if(R===d.Month||R===d.Day){this.invokeDateOperation(C,R);return}const V=this.getHours();this.invokeDateOperation(C,R);const ee=this.getHours(),J=ee-V;J===2?W!==24&&(this.dstStart=ee):J===0&&this.getMinutes()===0&&this.getSeconds()===0&&W!==24&&(this.dstEnd=ee)}};m=new WeakMap,b=new WeakMap,S=new WeakMap,v=new WeakMap,p=new WeakSet,Df=function(C){return C%4===0&&C%100!==0||C%400===0},T=new WeakSet,ql=function(){return te(this,m).toUTC()},Ke(A,p);let f=A;l.CronDate=f,l.default=f})(Nf)),Nf}var qg;function fS(){if(qg)return Ji;qg=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.CronMonth=void 0;const l=eh(),r=Bs(),d=1,c=12,f=Object.freeze([]);let m=class extends r.CronField{static get min(){return d}static get max(){return c}static get chars(){return f}static get daysInMonth(){return l.DAYS_IN_MONTH}constructor(S,v){super(S,v),this.validate()}get values(){return super.values}};return Ji.CronMonth=m,Ji}var Ki={},Vg;function hS(){if(Vg)return Ki;Vg=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.CronSecond=void 0;const l=Bs(),r=0,d=59,c=Object.freeze([]);let f=class extends l.CronField{static get min(){return r}static get max(){return d}static get chars(){return c}constructor(b,S){super(b,S),this.validate()}get values(){return super.values}};return Ki.CronSecond=f,Ki}var Bg;function th(){return Bg||(Bg=1,(function(l){var r=_s&&_s.__createBinding||(Object.create?(function(c,f,m,b){b===void 0&&(b=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,b,S)}):(function(c,f,m,b){b===void 0&&(b=m),c[b]=f[m]})),d=_s&&_s.__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}),d(rS(),l),d(iS(),l),d(uS(),l),d(Bs(),l),d(cS(),l),d(oS(),l),d(fS(),l),d(hS(),l)})(_s)),_s}var Yg;function uy(){var d,c,f,m,b,S,v,p,ry,iy;if(Yg)return Fi;Yg=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.CronFieldCollection=void 0;const l=th();let r=(p=class{constructor({second:A,minute:O,hour:C,dayOfMonth:R,month:W,dayOfWeek:V}){Ke(this,d);Ke(this,c);Ke(this,f);Ke(this,m);Ke(this,b);Ke(this,S);if(!A)throw new Error("Validation error, Field second is missing");if(!O)throw new Error("Validation error, Field minute is missing");if(!C)throw new Error("Validation error, Field hour is missing");if(!R)throw new Error("Validation error, Field dayOfMonth is missing");if(!W)throw new Error("Validation error, Field month is missing");if(!V)throw new Error("Validation error, Field dayOfWeek is missing");if(W.values.length===1&&!R.hasLastChar&&!(parseInt(R.values[0],10)<=l.CronMonth.daysInMonth[W.values[0]-1]))throw new Error("Invalid explicit day of month definition");we(this,d,A),we(this,c,O),we(this,f,C),we(this,b,W),we(this,S,V),we(this,m,R)}static from(A,O){return new p({second:this.resolveField(l.CronSecond,A.second,O.second),minute:this.resolveField(l.CronMinute,A.minute,O.minute),hour:this.resolveField(l.CronHour,A.hour,O.hour),dayOfMonth:this.resolveField(l.CronDayOfMonth,A.dayOfMonth,O.dayOfMonth),month:this.resolveField(l.CronMonth,A.month,O.month),dayOfWeek:this.resolveField(l.CronDayOfWeek,A.dayOfWeek,O.dayOfWeek)})}static resolveField(A,O,C){return C?C instanceof l.CronField?C:new A(C):O}get second(){return te(this,d)}get minute(){return te(this,c)}get hour(){return te(this,f)}get dayOfMonth(){return te(this,m)}get month(){return te(this,b)}get dayOfWeek(){return te(this,S)}static compactField(A){if(A.length===0)return[];const O=[];let C;return A.forEach((R,W,V)=>{if(C===void 0){C={start:R,count:1};return}const ee=V[W-1]||C.start,J=V[W+1];if(R==="L"||R==="W"){O.push(C),O.push({start:R,count:1}),C=void 0;return}if(C.step===void 0&&J!==void 0){const ue=R-ee,$=J-R;if(ue<=$){C={...C,count:2,end:R,step:ue};return}C.step=1}R-(C.end??0)===C.step?(C.count++,C.end=R):(C.count===1?O.push({start:C.start,count:1}):C.count===2?(O.push({start:C.start,count:1}),O.push({start:C.end??ee,count:1})):O.push(C),C={start:R,count:1})}),C&&O.push(C),O}stringifyField(A){var W;let O=A.max,C=A.values;if(A instanceof l.CronDayOfWeek){O=6;const V=te(this,S).values;C=V[V.length-1]===7?V.slice(0,-1):V}A instanceof l.CronDayOfMonth&&(O=te(this,b).values.length===1?l.CronMonth.daysInMonth[te(this,b).values[0]-1]:A.max);const R=p.compactField(C);if(R.length===1){const V=Ne(W=p,v,ry).call(W,A,R[0],O);if(V)return V}return R.map(V=>{var J;const ee=V.count===1?V.start.toString():Ne(J=p,v,iy).call(J,V,O);return A instanceof l.CronDayOfWeek&&A.nthDay>0?`${ee}#${A.nthDay}`:ee}).join(",")}stringify(A=!1){const O=[];return A&&O.push(this.stringifyField(te(this,d))),O.push(this.stringifyField(te(this,c)),this.stringifyField(te(this,f)),this.stringifyField(te(this,m)),this.stringifyField(te(this,b)),this.stringifyField(te(this,S))),O.join(" ")}serialize(){return{second:te(this,d).serialize(),minute:te(this,c).serialize(),hour:te(this,f).serialize(),dayOfMonth:te(this,m).serialize(),month:te(this,b).serialize(),dayOfWeek:te(this,S).serialize()}}},d=new WeakMap,c=new WeakMap,f=new WeakMap,m=new WeakMap,b=new WeakMap,S=new WeakMap,v=new WeakSet,ry=function(A,O,C){const R=O.step;return R?R===1&&O.start===A.min&&O.end&&O.end>=C?A.hasQuestionMarkChar?"?":"*":R!==1&&O.start===A.min&&O.end&&O.end>=C-R+1?`*/${R}`:null:null},iy=function(A,O){const C=A.step;if(C===1)return`${A.start}-${A.end}`;const R=A.start===0?A.count-1:A.count;if(!C)throw new Error("Unexpected range step");if(!A.end)throw new Error("Unexpected range end");if(C*R>A.end){const W=(ee,J)=>{if(typeof A.start!="number")throw new Error("Unexpected range start");return J%C===0?A.start+J:null};if(typeof A.start!="number")throw new Error("Unexpected range start");const V={length:A.end-A.start+1};return Array.from(V,W).filter(ee=>ee!==null).join(",")}return A.end===O-C+1?`${A.start}/${C}`:`${A.start}-${A.end}/${C}`},Ke(p,v),p);return Fi.CronFieldCollection=r,Fi}var jf={},$g;function gy(){return $g||($g=1,(function(l){var f,m,b,S,v,p,N,T,w,Vl,O,Us,cy,oy,dy,fy,Af,hy,my,zr;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=eh();l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";const d=1e4,P=class P{constructor(_,ae){Ke(this,O);Ke(this,f);Ke(this,m);Ke(this,b);Ke(this,S);Ke(this,v);Ke(this,p);Ke(this,N,null);Ke(this,T,!1);we(this,f,ae),we(this,m,ae.tz),we(this,S,ae.startDate?new r.CronDate(ae.startDate,te(this,m)):null),we(this,v,ae.endDate?new r.CronDate(ae.endDate,te(this,m)):null);let Z=ae.currentDate??ae.startDate;if(Z){const ce=new r.CronDate(Z,te(this,m));te(this,S)&&ce.getTime()<te(this,S).getTime()?Z=te(this,S):te(this,v)&&ce.getTime()>te(this,v).getTime()&&(Z=te(this,v))}we(this,b,new r.CronDate(Z,te(this,m))),we(this,p,_)}get fields(){return te(this,p)}static fieldsToExpression(_,ae){return new P(_,ae||{})}next(){return Ne(this,O,zr).call(this)}prev(){return Ne(this,O,zr).call(this,!0)}hasNext(){const _=te(this,b);try{return Ne(this,O,zr).call(this),!0}catch{return!1}finally{we(this,b,_)}}hasPrev(){const _=te(this,b);try{return Ne(this,O,zr).call(this,!0),!0}catch{return!1}finally{we(this,b,_)}}take(_){const ae=[];if(_>=0)for(let Z=0;Z<_;Z++)try{ae.push(this.next())}catch{return ae}else for(let Z=0;Z>_;Z--)try{ae.push(this.prev())}catch{return ae}return ae}reset(_){we(this,b,new r.CronDate(_||te(this,f).currentDate))}stringify(_=!1){return te(this,p).stringify(_)}includesDate(_){const{second:ae,minute:Z,hour:ce,month:xe}=te(this,p),K=new r.CronDate(_,te(this,m));return!(!ae.values.includes(K.getSeconds())||!Z.values.includes(K.getMinutes())||!ce.values.includes(K.getHours())||!xe.values.includes(K.getMonth()+1)||!Ne(this,O,Af).call(this,K)||te(this,p).dayOfWeek.nthDay>0&&Math.ceil(K.getDate()/7)!==te(this,p).dayOfWeek.nthDay)}toString(){return te(this,f).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Ne(this,O,zr).call(this),done:!this.hasNext()})}}};f=new WeakMap,m=new WeakMap,b=new WeakMap,S=new WeakMap,v=new WeakMap,p=new WeakMap,N=new WeakMap,T=new WeakMap,w=new WeakSet,Vl=function(_,ae){return ae.some(Z=>Z===_)},O=new WeakSet,Us=function(_,ae){return _[ae?_.length-1:0]},cy=function(_){const ae=`${_.getFullYear()}-${_.getMonth()+1}-${_.getDate()}`;if(te(this,N)===ae)return te(this,T);const Z=new r.CronDate(_);Z.setStartOfDay();const ce=new r.CronDate(_);return ce.setEndOfDay(),we(this,N,ae),we(this,T,Z.getUTCOffset()!==ce.getUTCOffset()),te(this,T)},oy=function(_,ae,Z){const ce=te(this,p).second.values,xe=_.getSeconds(),K=te(this,p).second.findNearestValue(xe,Z);if(K!==null){_.setSeconds(K);return}_.applyDateOperation(ae,r.TimeUnit.Minute,te(this,p).hour.values.length),_.setSeconds(Ne(this,O,Us).call(this,ce,Z))},dy=function(_,ae,Z){const ce=te(this,p).minute.values,xe=te(this,p).second.values,K=_.getMinutes(),Y=te(this,p).minute.findNearestValue(K,Z);if(Y!==null){_.setMinutes(Y),_.setSeconds(Ne(this,O,Us).call(this,xe,Z));return}_.applyDateOperation(ae,r.TimeUnit.Hour,te(this,p).hour.values.length),_.setMinutes(Ne(this,O,Us).call(this,ce,Z)),_.setSeconds(Ne(this,O,Us).call(this,xe,Z))},fy=function(_,ae){const Z=ae.isLastWeekdayOfMonth();return _.some(ce=>{const xe=parseInt(ce.toString().charAt(0),10)%7;if(Number.isNaN(xe))throw new Error(`Invalid last weekday of the month expression: ${ce}`);return ae.getDay()===xe&&Z})},Af=function(_){var re,ge,Se;const ae=te(this,p).dayOfMonth.isWildcard,Z=!ae,ce=te(this,p).dayOfWeek.isWildcard,xe=!ce,K=Ne(re=P,w,Vl).call(re,_.getDate(),te(this,p).dayOfMonth.values)||te(this,p).dayOfMonth.hasLastChar&&_.isLastDayOfMonth(),Y=Ne(ge=P,w,Vl).call(ge,_.getDay(),te(this,p).dayOfWeek.values)||te(this,p).dayOfWeek.hasLastChar&&Ne(Se=P,w,fy).call(Se,te(this,p).dayOfWeek.values,_);return!!(Z&&xe&&(K||Y)||K&&!xe||ae&&!ce&&Y)},hy=function(_,ae,Z){var ke,z;const ce=te(this,p).hour.values,xe=ce,K=_.getHours(),Y=Ne(ke=P,w,Vl).call(ke,K,ce),re=_.dstStart===K,ge=_.dstEnd===K;if(re)return Ne(z=P,w,Vl).call(z,K-1,ce)?!0:(_.invokeDateOperation(ae,r.TimeUnit.Hour),!1);if(ge&&!Z)return _.dstEnd=null,_.applyDateOperation(r.DateMathOp.Add,r.TimeUnit.Hour,xe.length),!1;if(Y)return!0;_.dstStart=null;const Se=te(this,p).hour.findNearestValue(K,Z);if(Se===null)return _.applyDateOperation(ae,r.TimeUnit.Day,xe.length),!1;if(Ne(this,O,cy).call(this,_)){const le=Z?K-Se:Se-K;for(let he=0;he<le;he++)_.applyDateOperation(ae,r.TimeUnit.Hour,xe.length)}else _.setHours(Se);return _.setMinutes(Ne(this,O,Us).call(this,te(this,p).minute.values,Z)),_.setSeconds(Ne(this,O,Us).call(this,te(this,p).second.values,Z)),!1},my=function(_){if(!te(this,S)&&!te(this,v))return;const ae=_.getTime();if(te(this,S)&&ae<te(this,S).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(te(this,v)&&ae>te(this,v).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},zr=function(_=!1){var K,Y,re;const ae=_?r.DateMathOp.Subtract:r.DateMathOp.Add,Z=new r.CronDate(te(this,b)),ce=Z.getTime();let xe=0;for(;++xe<d;){if(Ne(this,O,my).call(this,Z),!Ne(this,O,Af).call(this,Z)){Z.applyDateOperation(ae,r.TimeUnit.Day,te(this,p).hour.values.length);continue}if(!(te(this,p).dayOfWeek.nthDay<=0||Math.ceil(Z.getDate()/7)===te(this,p).dayOfWeek.nthDay)){Z.applyDateOperation(ae,r.TimeUnit.Day,te(this,p).hour.values.length);continue}if(!Ne(K=P,w,Vl).call(K,Z.getMonth()+1,te(this,p).month.values)){Z.applyDateOperation(ae,r.TimeUnit.Month,te(this,p).hour.values.length);continue}if(Ne(this,O,hy).call(this,Z,ae,_)){if(!Ne(Y=P,w,Vl).call(Y,Z.getMinutes(),te(this,p).minute.values)){Ne(this,O,dy).call(this,Z,ae,_);continue}if(!Ne(re=P,w,Vl).call(re,Z.getSeconds(),te(this,p).second.values)){Ne(this,O,oy).call(this,Z,ae,_);continue}if(ce===Z.getTime()){(ae==="Add"||Z.getMilliseconds()===0)&&Z.applyDateOperation(ae,r.TimeUnit.Second,te(this,p).hour.values.length);continue}break}}if(xe>d)throw new Error(l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return Z.getMilliseconds()!==0&&Z.setMilliseconds(0),we(this,b,Z),Z},Ke(P,w);let c=P;l.CronExpression=c,l.default=c})(jf)),jf}var Vc={},Pg;function mS(){if(Pg)return Vc;Pg=1,Object.defineProperty(Vc,"__esModule",{value:!0}),Vc.seededRandom=d;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 d(c){const f=c?l(c)():Math.floor(Math.random()*1e10);return r(f)}return Vc}var Gg;function kf(){var p,N,xy,Ls,yy,py,vy,by,Sy,Ny,jy,_f,wy,Ey;if(Gg)return Ca;Gg=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.CronExpressionParser=Ca.DayOfWeek=Ca.Months=Ca.CronUnit=Ca.PredefinedExpressions=void 0;const l=uy(),r=gy(),d=mS(),c=th();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||(Ca.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||(Ca.CronUnit=m={}));var b;(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"})(b||(Ca.Months=b={}));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||(Ca.DayOfWeek=S={}));let v=(N=class{static parse(P,M={}){var he,me,Ee,de,_e,ct,Xe,la;const{strict:_=!1,hashSeed:ae}=M,Z=(0,d.seededRandom)(ae);P=f[P]||P;const ce=Ne(he=N,p,xy).call(he,P,_);if(!(ce.dayOfMonth==="*"||ce.dayOfWeek==="*"||!_))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const xe=Ne(me=N,p,Ls).call(me,m.Second,ce.second,c.CronSecond.constraints,Z),K=Ne(Ee=N,p,Ls).call(Ee,m.Minute,ce.minute,c.CronMinute.constraints,Z),Y=Ne(de=N,p,Ls).call(de,m.Hour,ce.hour,c.CronHour.constraints,Z),re=Ne(_e=N,p,Ls).call(_e,m.Month,ce.month,c.CronMonth.constraints,Z),ge=Ne(ct=N,p,Ls).call(ct,m.DayOfMonth,ce.dayOfMonth,c.CronDayOfMonth.constraints,Z),{dayOfWeek:Se,nthDayOfWeek:ke}=Ne(Xe=N,p,wy).call(Xe,ce.dayOfWeek),z=Ne(la=N,p,Ls).call(la,m.DayOfWeek,Se,c.CronDayOfWeek.constraints,Z),le=new l.CronFieldCollection({second:new c.CronSecond(xe,{rawValue:ce.second}),minute:new c.CronMinute(K,{rawValue:ce.minute}),hour:new c.CronHour(Y,{rawValue:ce.hour}),dayOfMonth:new c.CronDayOfMonth(ge,{rawValue:ce.dayOfMonth}),month:new c.CronMonth(re,{rawValue:ce.month}),dayOfWeek:new c.CronDayOfWeek(z,{rawValue:ce.dayOfWeek,nthDayOfWeek:ke})});return new r.CronExpression(le,{...M,expression:P})}},p=new WeakSet,xy=function(P,M){if(M&&!P.length)throw new Error("Invalid cron expression");P=P||"0 * * * * *";const _=P.trim().split(/\s+/);if(M&&_.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(_.length>6)throw new Error("Invalid cron expression, too many fields");const ae=["*","*","*","*","*","0"];_.length<ae.length&&_.unshift(...ae.slice(_.length));const[Z,ce,xe,K,Y,re]=_;return{second:Z,minute:ce,hour:xe,dayOfMonth:K,month:Y,dayOfWeek:re}},Ls=function(P,M,_,ae){if((P===m.Month||P===m.DayOfWeek)&&(M=M.replace(/[a-z]{3}/gi,Z=>{Z=Z.toLowerCase();const ce=b[Z]||S[Z];if(ce===void 0)throw new Error(`Validation error, cannot resolve alias "${Z}"`);return ce.toString()})),!_.validChars.test(M))throw new Error(`Invalid characters, got value: ${M}`);return M=Ne(this,p,yy).call(this,M,_),M=Ne(this,p,py).call(this,M,_,ae),Ne(this,p,vy).call(this,P,M,_)},yy=function(P,M){return P.replace(/[*?]/g,M.min+"-"+M.max)},py=function(P,M,_){const ae=_();return P.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(Z,ce,xe,K)=>{if(ce&&xe&&K){const Y=parseInt(ce,10),re=parseInt(xe,10),ge=parseInt(K,10);if(Y>re)throw new Error(`Invalid range: ${Y}-${re}, min > max`);if(ge<=0)throw new Error(`Invalid step: ${ge}, must be positive`);const Se=Math.max(Y,M.min),ke=Math.floor(ae*ge),z=[];for(let le=Math.floor(Se/ge)*ge+ke;le<=re;le+=ge)le>=Se&&z.push(le);return z.join(",")}else if(ce&&xe){const Y=parseInt(ce,10),re=parseInt(xe,10);if(Y>re)throw new Error(`Invalid range: ${Y}-${re}, min > max`);return String(Math.floor(ae*(re-Y+1))+Y)}else if(K){const Y=parseInt(K,10);if(Y<=0)throw new Error(`Invalid step: ${Y}, must be positive`);const re=Math.floor(ae*Y),ge=[];for(let Se=Math.floor(M.min/Y)*Y+re;Se<=M.max;Se+=Y)Se>=M.min&&ge.push(Se);return ge.join(",")}else return String(Math.floor(ae*(M.max-M.min+1)+M.min))})},vy=function(P,M,_){const ae=[];function Z(xe,K){var Y;if(Array.isArray(xe))ae.push(...xe);else if(Ne(Y=N,p,Ey).call(Y,K,xe))ae.push(xe);else{const re=parseInt(xe.toString(),10);if(!(re>=K.min&&re<=K.max))throw new Error(`Constraint error, got value ${xe} expected range ${K.min}-${K.max}`);ae.push(P===m.DayOfWeek?re%7:xe)}}return M.split(",").forEach(xe=>{var K;if(!(xe.length>0))throw new Error("Invalid list value format");Z(Ne(K=N,p,by).call(K,P,xe,_),_)}),ae},by=function(P,M,_){var Z,ce;const ae=M.split("/");if(ae.length>2)throw new Error(`Invalid repeat: ${M}`);return ae.length===2?(isNaN(parseInt(ae[0],10))||(ae[0]=`${ae[0]}-${_.max}`),Ne(Z=N,p,_f).call(Z,P,ae[0],parseInt(ae[1],10),_)):Ne(ce=N,p,_f).call(ce,P,M,1,_)},Sy=function(P,M,_){if(!(!isNaN(P)&&!isNaN(M)&&P>=_.min&&M<=_.max))throw new Error(`Constraint error, got range ${P}-${M} expected range ${_.min}-${_.max}`);if(P>M)throw new Error(`Invalid range: ${P}-${M}, min(${P}) > max(${M})`)},Ny=function(P){if(!(!isNaN(P)&&P>0))throw new Error(`Constraint error, cannot repeat at every ${P} time.`)},jy=function(P,M,_,ae){const Z=[];P===m.DayOfWeek&&_%7===0&&Z.push(0);for(let ce=M;ce<=_;ce+=ae)Z.indexOf(ce)===-1&&Z.push(ce);return Z},_f=function(P,M,_,ae){const Z=M.split("-");if(Z.length<=1)return isNaN(+M)?M:+M;const[ce,xe]=Z.map(K=>parseInt(K,10));return Ne(this,p,Sy).call(this,ce,xe,ae),Ne(this,p,Ny).call(this,_),Ne(this,p,jy).call(this,P,ce,xe,_)},wy=function(P){const M=P.split("#");if(M.length<=1)return{dayOfWeek:M[0]};const _=+M[M.length-1],ae=P.match(/([,-/])/);if(ae!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${ae==null?void 0:ae[0]}\` special characters are incompatible`);if(!(M.length<=2&&!isNaN(_)&&_>=1&&_<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:M[0],nthDayOfWeek:_}},Ey=function(P,M){return P.chars.some(_=>M.toString().includes(_))},Ke(N,p),N);return Ca.CronExpressionParser=v,Ca}var sn={};const gS={},xS=Object.freeze(Object.defineProperty({__proto__:null,default:gS},Symbol.toStringTag,{value:"Module"})),Fg=ev(xS);var Zg;function yS(){var m,b,zf,Ty;if(Zg)return sn;Zg=1;var l=sn&&sn.__createBinding||(Object.create?(function(p,N,T,w){w===void 0&&(w=T);var A=Object.getOwnPropertyDescriptor(N,T);(!A||("get"in A?!N.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return N[T]}}),Object.defineProperty(p,w,A)}):(function(p,N,T,w){w===void 0&&(w=T),p[w]=N[T]})),r=sn&&sn.__setModuleDefault||(Object.create?(function(p,N){Object.defineProperty(p,"default",{enumerable:!0,value:N})}):function(p,N){p.default=N}),d=sn&&sn.__importStar||(function(){var p=function(N){return p=Object.getOwnPropertyNames||function(T){var w=[];for(var A in T)Object.prototype.hasOwnProperty.call(T,A)&&(w[w.length]=A);return w},p(N)};return function(N){if(N&&N.__esModule)return N;var T={};if(N!=null)for(var w=p(N),A=0;A<w.length;A++)w[A]!=="default"&&l(T,N,w[A]);return r(T,N),T}})();Object.defineProperty(sn,"__esModule",{value:!0}),sn.CronFileParser=void 0;const c=kf();let f=(b=class{static async parseFile(N){var A;const{readFile:T}=await Promise.resolve().then(()=>d(Fg)),w=await T(N,"utf8");return Ne(A=b,m,zf).call(A,w)}static parseFileSync(N){var A;const{readFileSync:T}=Fg,w=T(N,"utf8");return Ne(A=b,m,zf).call(A,w)}},m=new WeakSet,zf=function(N){var A;const T=N.split(`
|
|
403
|
-
`),w={variables:{},expressions:[],errors:{}};for(const O of T){const C=O.trim();if(C.length===0||C.startsWith("#"))continue;const R=C.match(/^(.*)=(.*)$/);if(R){const[,W,V]=R;w.variables[W]=V.replace(/["']/g,"");continue}try{const W=Ne(A=b,m,Ty).call(A,C);w.expressions.push(W.interval)}catch(W){w.errors[C]=W}}return w},Ty=function(N){const T=N.split(" ");return{interval:c.CronExpressionParser.parse(T.slice(0,5).join(" ")),command:T.slice(5,T.length)}},Ke(b,m),b);return sn.CronFileParser=f,sn}var Wg;function pS(){return Wg||(Wg=1,(function(l){var r=As&&As.__createBinding||(Object.create?(function(p,N,T,w){w===void 0&&(w=T);var A=Object.getOwnPropertyDescriptor(N,T);(!A||("get"in A?!N.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return N[T]}}),Object.defineProperty(p,w,A)}):(function(p,N,T,w){w===void 0&&(w=T),p[w]=N[T]})),d=As&&As.__exportStar||function(p,N){for(var T in p)T!=="default"&&!Object.prototype.hasOwnProperty.call(N,T)&&r(N,p,T)};Object.defineProperty(l,"__esModule",{value:!0}),l.CronFileParser=l.CronExpressionParser=l.CronExpression=l.CronFieldCollection=l.CronDate=void 0;const c=kf();var f=eh();Object.defineProperty(l,"CronDate",{enumerable:!0,get:function(){return f.CronDate}});var m=uy();Object.defineProperty(l,"CronFieldCollection",{enumerable:!0,get:function(){return m.CronFieldCollection}});var b=gy();Object.defineProperty(l,"CronExpression",{enumerable:!0,get:function(){return b.CronExpression}});var S=kf();Object.defineProperty(l,"CronExpressionParser",{enumerable:!0,get:function(){return S.CronExpressionParser}});var v=yS();Object.defineProperty(l,"CronFileParser",{enumerable:!0,get:function(){return v.CronFileParser}}),d(th(),l),l.default=c.CronExpressionParser})(As)),As}var vS=pS();const Cy=6048e5,bS=864e5,SS=6e4,NS=36e5,Qg=Symbol.for("constructDateFrom");function Ma(l,r){return typeof l=="function"?l(r):l&&typeof l=="object"&&Qg in l?l[Qg](r):l instanceof Date?new l.constructor(r):new Date(r)}function Ct(l,r){return Ma(r||l,l)}function jS(l,r,d){return Ma(l,+Ct(l)+r)}function Bc(l,r,d){return jS(l,r*NS)}let wS={};function no(){return wS}function ru(l,r){var S,v,p,N;const d=no(),c=(r==null?void 0:r.weekStartsOn)??((v=(S=r==null?void 0:r.locale)==null?void 0:S.options)==null?void 0:v.weekStartsOn)??d.weekStartsOn??((N=(p=d.locale)==null?void 0:p.options)==null?void 0:N.weekStartsOn)??0,f=Ct(l,r==null?void 0:r.in),m=f.getDay(),b=(m<c?7:0)+m-c;return f.setDate(f.getDate()-b),f.setHours(0,0,0,0),f}function Wc(l,r){return ru(l,{...r,weekStartsOn:1})}function My(l,r){const d=Ct(l,r==null?void 0:r.in),c=d.getFullYear(),f=Ma(d,0);f.setFullYear(c+1,0,4),f.setHours(0,0,0,0);const m=Wc(f),b=Ma(d,0);b.setFullYear(c,0,4),b.setHours(0,0,0,0);const S=Wc(b);return d.getTime()>=m.getTime()?c+1:d.getTime()>=S.getTime()?c:c-1}function Ig(l){const r=Ct(l),d=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return d.setUTCFullYear(r.getFullYear()),+l-+d}function ES(l,...r){const d=Ma.bind(null,r.find(c=>typeof c=="object"));return r.map(d)}function Xg(l,r){const d=Ct(l,r==null?void 0:r.in);return d.setHours(0,0,0,0),d}function TS(l,r,d){const[c,f]=ES(d==null?void 0:d.in,l,r),m=Xg(c),b=Xg(f),S=+m-Ig(m),v=+b-Ig(b);return Math.round((S-v)/bS)}function CS(l,r){const d=My(l,r),c=Ma(l,0);return c.setFullYear(d,0,4),c.setHours(0,0,0,0),Wc(c)}function MS(l,r){let d,c=r==null?void 0:r.in;return l.forEach(f=>{!c&&typeof f=="object"&&(c=Ma.bind(null,f));const m=Ct(f,c);(!d||d<m||isNaN(+m))&&(d=m)}),Ma(c,d||NaN)}function OS(l,r){let d,c=r==null?void 0:r.in;return l.forEach(f=>{!c&&typeof f=="object"&&(c=Ma.bind(null,f));const m=Ct(f,c);(!d||d>m||isNaN(+m))&&(d=m)}),Ma(c,d||NaN)}function RS(l){return l instanceof Date||typeof l=="object"&&Object.prototype.toString.call(l)==="[object Date]"}function DS(l){return!(!RS(l)&&typeof l!="number"||isNaN(+Ct(l)))}function AS(l){return r=>{const c=(l?Math[l]:Math.trunc)(r);return c===0?0:c}}function _S(l,r){return+Ct(l)-+Ct(r)}function Jg(l,r,d){const c=_S(l,r)/SS;return AS(d==null?void 0:d.roundingMethod)(c)}function kS(l,r){const d=Ct(l,r==null?void 0:r.in);return d.setFullYear(d.getFullYear(),0,1),d.setHours(0,0,0,0),d}const zS={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"}},US=(l,r,d)=>{let c;const f=zS[l];return typeof f=="string"?c=f:r===1?c=f.one:c=f.other.replace("{{count}}",r.toString()),d!=null&&d.addSuffix?d.comparison&&d.comparison>0?"in "+c:c+" ago":c};function wf(l){return(r={})=>{const d=r.width?String(r.width):l.defaultWidth;return l.formats[d]||l.formats[l.defaultWidth]}}const LS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},HS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},qS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},VS={date:wf({formats:LS,defaultWidth:"full"}),time:wf({formats:HS,defaultWidth:"full"}),dateTime:wf({formats:qS,defaultWidth:"full"})},BS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},YS=(l,r,d,c)=>BS[l];function eu(l){return(r,d)=>{const c=d!=null&&d.context?String(d.context):"standalone";let f;if(c==="formatting"&&l.formattingValues){const b=l.defaultFormattingWidth||l.defaultWidth,S=d!=null&&d.width?String(d.width):b;f=l.formattingValues[S]||l.formattingValues[b]}else{const b=l.defaultWidth,S=d!=null&&d.width?String(d.width):l.defaultWidth;f=l.values[S]||l.values[b]}const m=l.argumentCallback?l.argumentCallback(r):r;return f[m]}}const $S={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},PS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},GS={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"]},FS={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"]},ZS={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"}},WS={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"}},QS=(l,r)=>{const d=Number(l),c=d%100;if(c>20||c<10)switch(c%10){case 1:return d+"st";case 2:return d+"nd";case 3:return d+"rd"}return d+"th"},IS={ordinalNumber:QS,era:eu({values:$S,defaultWidth:"wide"}),quarter:eu({values:PS,defaultWidth:"wide",argumentCallback:l=>l-1}),month:eu({values:GS,defaultWidth:"wide"}),day:eu({values:FS,defaultWidth:"wide"}),dayPeriod:eu({values:ZS,defaultWidth:"wide",formattingValues:WS,defaultFormattingWidth:"wide"})};function tu(l){return(r,d={})=>{const c=d.width,f=c&&l.matchPatterns[c]||l.matchPatterns[l.defaultMatchWidth],m=r.match(f);if(!m)return null;const b=m[0],S=c&&l.parsePatterns[c]||l.parsePatterns[l.defaultParseWidth],v=Array.isArray(S)?JS(S,T=>T.test(b)):XS(S,T=>T.test(b));let p;p=l.valueCallback?l.valueCallback(v):v,p=d.valueCallback?d.valueCallback(p):p;const N=r.slice(b.length);return{value:p,rest:N}}}function XS(l,r){for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d)&&r(l[d]))return d}function JS(l,r){for(let d=0;d<l.length;d++)if(r(l[d]))return d}function KS(l){return(r,d={})=>{const c=r.match(l.matchPattern);if(!c)return null;const f=c[0],m=r.match(l.parsePattern);if(!m)return null;let b=l.valueCallback?l.valueCallback(m[0]):m[0];b=d.valueCallback?d.valueCallback(b):b;const S=r.slice(f.length);return{value:b,rest:S}}}const eN=/^(\d+)(th|st|nd|rd)?/i,tN=/\d+/i,aN={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},nN={any:[/^b/i,/^(a|c)/i]},lN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},sN={any:[/1/i,/2/i,/3/i,/4/i]},rN={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},iN={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]},uN={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},cN={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]},oN={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},dN={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}},fN={ordinalNumber:KS({matchPattern:eN,parsePattern:tN,valueCallback:l=>parseInt(l,10)}),era:tu({matchPatterns:aN,defaultMatchWidth:"wide",parsePatterns:nN,defaultParseWidth:"any"}),quarter:tu({matchPatterns:lN,defaultMatchWidth:"wide",parsePatterns:sN,defaultParseWidth:"any",valueCallback:l=>l+1}),month:tu({matchPatterns:rN,defaultMatchWidth:"wide",parsePatterns:iN,defaultParseWidth:"any"}),day:tu({matchPatterns:uN,defaultMatchWidth:"wide",parsePatterns:cN,defaultParseWidth:"any"}),dayPeriod:tu({matchPatterns:oN,defaultMatchWidth:"any",parsePatterns:dN,defaultParseWidth:"any"})},hN={code:"en-US",formatDistance:US,formatLong:VS,formatRelative:YS,localize:IS,match:fN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function mN(l,r){const d=Ct(l,r==null?void 0:r.in);return TS(d,kS(d))+1}function gN(l,r){const d=Ct(l,r==null?void 0:r.in),c=+Wc(d)-+CS(d);return Math.round(c/Cy)+1}function Oy(l,r){var N,T,w,A;const d=Ct(l,r==null?void 0:r.in),c=d.getFullYear(),f=no(),m=(r==null?void 0:r.firstWeekContainsDate)??((T=(N=r==null?void 0:r.locale)==null?void 0:N.options)==null?void 0:T.firstWeekContainsDate)??f.firstWeekContainsDate??((A=(w=f.locale)==null?void 0:w.options)==null?void 0:A.firstWeekContainsDate)??1,b=Ma((r==null?void 0:r.in)||l,0);b.setFullYear(c+1,0,m),b.setHours(0,0,0,0);const S=ru(b,r),v=Ma((r==null?void 0:r.in)||l,0);v.setFullYear(c,0,m),v.setHours(0,0,0,0);const p=ru(v,r);return+d>=+S?c+1:+d>=+p?c:c-1}function xN(l,r){var S,v,p,N;const d=no(),c=(r==null?void 0:r.firstWeekContainsDate)??((v=(S=r==null?void 0:r.locale)==null?void 0:S.options)==null?void 0:v.firstWeekContainsDate)??d.firstWeekContainsDate??((N=(p=d.locale)==null?void 0:p.options)==null?void 0:N.firstWeekContainsDate)??1,f=Oy(l,r),m=Ma((r==null?void 0:r.in)||l,0);return m.setFullYear(f,0,c),m.setHours(0,0,0,0),ru(m,r)}function yN(l,r){const d=Ct(l,r==null?void 0:r.in),c=+ru(d,r)-+xN(d,r);return Math.round(c/Cy)+1}function nt(l,r){const d=l<0?"-":"",c=Math.abs(l).toString().padStart(r,"0");return d+c}const zl={y(l,r){const d=l.getFullYear(),c=d>0?d:1-d;return nt(r==="yy"?c%100:c,r.length)},M(l,r){const d=l.getMonth();return r==="M"?String(d+1):nt(d+1,2)},d(l,r){return nt(l.getDate(),r.length)},a(l,r){const d=l.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return d.toUpperCase();case"aaa":return d;case"aaaaa":return d[0];case"aaaa":default:return d==="am"?"a.m.":"p.m."}},h(l,r){return nt(l.getHours()%12||12,r.length)},H(l,r){return nt(l.getHours(),r.length)},m(l,r){return nt(l.getMinutes(),r.length)},s(l,r){return nt(l.getSeconds(),r.length)},S(l,r){const d=r.length,c=l.getMilliseconds(),f=Math.trunc(c*Math.pow(10,d-3));return nt(f,r.length)}},kr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Kg={G:function(l,r,d){const c=l.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return d.era(c,{width:"abbreviated"});case"GGGGG":return d.era(c,{width:"narrow"});case"GGGG":default:return d.era(c,{width:"wide"})}},y:function(l,r,d){if(r==="yo"){const c=l.getFullYear(),f=c>0?c:1-c;return d.ordinalNumber(f,{unit:"year"})}return zl.y(l,r)},Y:function(l,r,d,c){const f=Oy(l,c),m=f>0?f:1-f;if(r==="YY"){const b=m%100;return nt(b,2)}return r==="Yo"?d.ordinalNumber(m,{unit:"year"}):nt(m,r.length)},R:function(l,r){const d=My(l);return nt(d,r.length)},u:function(l,r){const d=l.getFullYear();return nt(d,r.length)},Q:function(l,r,d){const c=Math.ceil((l.getMonth()+1)/3);switch(r){case"Q":return String(c);case"QQ":return nt(c,2);case"Qo":return d.ordinalNumber(c,{unit:"quarter"});case"QQQ":return d.quarter(c,{width:"abbreviated",context:"formatting"});case"QQQQQ":return d.quarter(c,{width:"narrow",context:"formatting"});case"QQQQ":default:return d.quarter(c,{width:"wide",context:"formatting"})}},q:function(l,r,d){const c=Math.ceil((l.getMonth()+1)/3);switch(r){case"q":return String(c);case"qq":return nt(c,2);case"qo":return d.ordinalNumber(c,{unit:"quarter"});case"qqq":return d.quarter(c,{width:"abbreviated",context:"standalone"});case"qqqqq":return d.quarter(c,{width:"narrow",context:"standalone"});case"qqqq":default:return d.quarter(c,{width:"wide",context:"standalone"})}},M:function(l,r,d){const c=l.getMonth();switch(r){case"M":case"MM":return zl.M(l,r);case"Mo":return d.ordinalNumber(c+1,{unit:"month"});case"MMM":return d.month(c,{width:"abbreviated",context:"formatting"});case"MMMMM":return d.month(c,{width:"narrow",context:"formatting"});case"MMMM":default:return d.month(c,{width:"wide",context:"formatting"})}},L:function(l,r,d){const c=l.getMonth();switch(r){case"L":return String(c+1);case"LL":return nt(c+1,2);case"Lo":return d.ordinalNumber(c+1,{unit:"month"});case"LLL":return d.month(c,{width:"abbreviated",context:"standalone"});case"LLLLL":return d.month(c,{width:"narrow",context:"standalone"});case"LLLL":default:return d.month(c,{width:"wide",context:"standalone"})}},w:function(l,r,d,c){const f=yN(l,c);return r==="wo"?d.ordinalNumber(f,{unit:"week"}):nt(f,r.length)},I:function(l,r,d){const c=gN(l);return r==="Io"?d.ordinalNumber(c,{unit:"week"}):nt(c,r.length)},d:function(l,r,d){return r==="do"?d.ordinalNumber(l.getDate(),{unit:"date"}):zl.d(l,r)},D:function(l,r,d){const c=mN(l);return r==="Do"?d.ordinalNumber(c,{unit:"dayOfYear"}):nt(c,r.length)},E:function(l,r,d){const c=l.getDay();switch(r){case"E":case"EE":case"EEE":return d.day(c,{width:"abbreviated",context:"formatting"});case"EEEEE":return d.day(c,{width:"narrow",context:"formatting"});case"EEEEEE":return d.day(c,{width:"short",context:"formatting"});case"EEEE":default:return d.day(c,{width:"wide",context:"formatting"})}},e:function(l,r,d,c){const f=l.getDay(),m=(f-c.weekStartsOn+8)%7||7;switch(r){case"e":return String(m);case"ee":return nt(m,2);case"eo":return d.ordinalNumber(m,{unit:"day"});case"eee":return d.day(f,{width:"abbreviated",context:"formatting"});case"eeeee":return d.day(f,{width:"narrow",context:"formatting"});case"eeeeee":return d.day(f,{width:"short",context:"formatting"});case"eeee":default:return d.day(f,{width:"wide",context:"formatting"})}},c:function(l,r,d,c){const f=l.getDay(),m=(f-c.weekStartsOn+8)%7||7;switch(r){case"c":return String(m);case"cc":return nt(m,r.length);case"co":return d.ordinalNumber(m,{unit:"day"});case"ccc":return d.day(f,{width:"abbreviated",context:"standalone"});case"ccccc":return d.day(f,{width:"narrow",context:"standalone"});case"cccccc":return d.day(f,{width:"short",context:"standalone"});case"cccc":default:return d.day(f,{width:"wide",context:"standalone"})}},i:function(l,r,d){const c=l.getDay(),f=c===0?7:c;switch(r){case"i":return String(f);case"ii":return nt(f,r.length);case"io":return d.ordinalNumber(f,{unit:"day"});case"iii":return d.day(c,{width:"abbreviated",context:"formatting"});case"iiiii":return d.day(c,{width:"narrow",context:"formatting"});case"iiiiii":return d.day(c,{width:"short",context:"formatting"});case"iiii":default:return d.day(c,{width:"wide",context:"formatting"})}},a:function(l,r,d){const f=l.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return d.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"aaa":return d.dayPeriod(f,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return d.dayPeriod(f,{width:"narrow",context:"formatting"});case"aaaa":default:return d.dayPeriod(f,{width:"wide",context:"formatting"})}},b:function(l,r,d){const c=l.getHours();let f;switch(c===12?f=kr.noon:c===0?f=kr.midnight:f=c/12>=1?"pm":"am",r){case"b":case"bb":return d.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"bbb":return d.dayPeriod(f,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return d.dayPeriod(f,{width:"narrow",context:"formatting"});case"bbbb":default:return d.dayPeriod(f,{width:"wide",context:"formatting"})}},B:function(l,r,d){const c=l.getHours();let f;switch(c>=17?f=kr.evening:c>=12?f=kr.afternoon:c>=4?f=kr.morning:f=kr.night,r){case"B":case"BB":case"BBB":return d.dayPeriod(f,{width:"abbreviated",context:"formatting"});case"BBBBB":return d.dayPeriod(f,{width:"narrow",context:"formatting"});case"BBBB":default:return d.dayPeriod(f,{width:"wide",context:"formatting"})}},h:function(l,r,d){if(r==="ho"){let c=l.getHours()%12;return c===0&&(c=12),d.ordinalNumber(c,{unit:"hour"})}return zl.h(l,r)},H:function(l,r,d){return r==="Ho"?d.ordinalNumber(l.getHours(),{unit:"hour"}):zl.H(l,r)},K:function(l,r,d){const c=l.getHours()%12;return r==="Ko"?d.ordinalNumber(c,{unit:"hour"}):nt(c,r.length)},k:function(l,r,d){let c=l.getHours();return c===0&&(c=24),r==="ko"?d.ordinalNumber(c,{unit:"hour"}):nt(c,r.length)},m:function(l,r,d){return r==="mo"?d.ordinalNumber(l.getMinutes(),{unit:"minute"}):zl.m(l,r)},s:function(l,r,d){return r==="so"?d.ordinalNumber(l.getSeconds(),{unit:"second"}):zl.s(l,r)},S:function(l,r){return zl.S(l,r)},X:function(l,r,d){const c=l.getTimezoneOffset();if(c===0)return"Z";switch(r){case"X":return tx(c);case"XXXX":case"XX":return Hs(c);case"XXXXX":case"XXX":default:return Hs(c,":")}},x:function(l,r,d){const c=l.getTimezoneOffset();switch(r){case"x":return tx(c);case"xxxx":case"xx":return Hs(c);case"xxxxx":case"xxx":default:return Hs(c,":")}},O:function(l,r,d){const c=l.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+ex(c,":");case"OOOO":default:return"GMT"+Hs(c,":")}},z:function(l,r,d){const c=l.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+ex(c,":");case"zzzz":default:return"GMT"+Hs(c,":")}},t:function(l,r,d){const c=Math.trunc(+l/1e3);return nt(c,r.length)},T:function(l,r,d){return nt(+l,r.length)}};function ex(l,r=""){const d=l>0?"-":"+",c=Math.abs(l),f=Math.trunc(c/60),m=c%60;return m===0?d+String(f):d+String(f)+r+nt(m,2)}function tx(l,r){return l%60===0?(l>0?"-":"+")+nt(Math.abs(l)/60,2):Hs(l,r)}function Hs(l,r=""){const d=l>0?"-":"+",c=Math.abs(l),f=nt(Math.trunc(c/60),2),m=nt(c%60,2);return d+f+r+m}const ax=(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"})}},Ry=(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"})}},pN=(l,r)=>{const d=l.match(/(P+)(p+)?/)||[],c=d[1],f=d[2];if(!f)return ax(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}}",ax(c,r)).replace("{{time}}",Ry(f,r))},vN={p:Ry,P:pN},bN=/^D+$/,SN=/^Y+$/,NN=["D","DD","YY","YYYY"];function jN(l){return bN.test(l)}function wN(l){return SN.test(l)}function EN(l,r,d){const c=TN(l,r,d);if(console.warn(c),NN.includes(l))throw new RangeError(c)}function TN(l,r,d){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 \`${d}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const CN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,MN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ON=/^'([^]*?)'?$/,RN=/''/g,DN=/[a-zA-Z]/;function ks(l,r,d){var N,T,w,A;const c=no(),f=c.locale??hN,m=c.firstWeekContainsDate??((T=(N=c.locale)==null?void 0:N.options)==null?void 0:T.firstWeekContainsDate)??1,b=c.weekStartsOn??((A=(w=c.locale)==null?void 0:w.options)==null?void 0:A.weekStartsOn)??0,S=Ct(l,d==null?void 0:d.in);if(!DS(S))throw new RangeError("Invalid time value");let v=r.match(MN).map(O=>{const C=O[0];if(C==="p"||C==="P"){const R=vN[C];return R(O,f.formatLong)}return O}).join("").match(CN).map(O=>{if(O==="''")return{isToken:!1,value:"'"};const C=O[0];if(C==="'")return{isToken:!1,value:AN(O)};if(Kg[C])return{isToken:!0,value:O};if(C.match(DN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:O}});f.localize.preprocessor&&(v=f.localize.preprocessor(S,v));const p={firstWeekContainsDate:m,weekStartsOn:b,locale:f};return v.map(O=>{if(!O.isToken)return O.value;const C=O.value;(wN(C)||jN(C))&&EN(C,r,String(l));const R=Kg[C[0]];return R(S,C,f.localize,p)}).join("")}function AN(l){const r=l.match(ON);return r?r[1].replace(RN,"'"):l}function _N(l,r){return+Ct(l)>+Ct(r)}function kN(l,r){return+Ct(l)<+Ct(r)}function zN(l,r){const d=Ct(l,r==null?void 0:r.in);return d.setMinutes(0,0,0),d}const Ef=Wx,Yc=[{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"}],Wn=160,$c=14,UN=10,LN=7,nx=4,Dy=({configs:l,currentProjectId:r,onEditJob:d,queueStatus:c,queueAnalytics:f})=>{const m=H.useMemo(()=>zN(new Date),[]),b=H.useMemo(()=>Bc(m,24),[m]),S=H.useMemo(()=>Bc(m,-24),[m]),v=b,p=H.useMemo(()=>{const J=[];for(let ue=0;ue<=24;ue++)J.push(Bc(m,ue));return J},[m]),N=H.useMemo(()=>{const J=[];return l.forEach(({projectId:ue,config:$})=>{var M,_,ae,Z,ce;const F={executor:$.executorEnabled!==!1?$.cronSchedule:null,reviewer:$.reviewerEnabled?$.reviewerSchedule:null,qa:$.qa.enabled?$.qa.schedule:null,audit:$.audit.enabled?$.audit.schedule:null,slicer:$.roadmapScanner.enabled?$.roadmapScanner.slicerSchedule:null,analytics:(M=$.analytics)!=null&&M.enabled?(_=$.analytics)==null?void 0:_.schedule:null,"pr-resolver":(ae=$.prResolver)!=null&&ae.enabled?$.prResolver.schedule:null,merger:(Z=$.merger)!=null&&Z.enabled?(ce=$.merger)==null?void 0:ce.schedule:null},P=$.cronScheduleOffset||0;Object.entries(F).forEach(([xe,K])=>{if(K)try{const Y=vS.CronExpressionParser.parse(K,{currentDate:m,endDate:b});for(;Y.hasNext();){const re=Y.next(),ge=new Date(re.getTime());ge.setMinutes(ge.getMinutes()+P),_N(ge,m)&&kN(ge,b)&&J.push({projectId:ue,jobType:xe,time:ge})}}catch(Y){console.error(`Failed to parse cron "${K}" for ${ue}/${xe}`,Y)}})}),J},[l,m,b]),T=H.useMemo(()=>{const J=new Set;return l.length===0||(l.every(ue=>ue.config.executorEnabled===!1)&&J.add("executor"),l.every(ue=>!ue.config.reviewerEnabled)&&J.add("reviewer"),l.every(ue=>!ue.config.qa.enabled)&&J.add("qa"),l.every(ue=>!ue.config.audit.enabled)&&J.add("audit"),l.every(ue=>!ue.config.roadmapScanner.enabled)&&J.add("slicer"),l.every(ue=>{var $;return!(($=ue.config.analytics)!=null&&$.enabled)})&&J.add("analytics"),l.every(ue=>{var $;return!(($=ue.config.prResolver)!=null&&$.enabled)})&&J.add("pr-resolver"),l.every(ue=>{var $;return!(($=ue.config.merger)!=null&&$.enabled)})&&J.add("merger")),J},[l]),w=H.useMemo(()=>{const J=new Map;let ue=0;return l.forEach($=>{$.projectId===r||(J.set($.projectId,ue%Yc.length),ue++)}),J},[l,r]),A=J=>Jg(J,m),O=H.useMemo(()=>{const J=[];for(let ue=0;ue<=24;ue++)J.push(Bc(S,ue));return J},[S]),C=J=>{const ue=OS([MS([J,S]),v]);return Jg(ue,S)},R=H.useMemo(()=>{const J=(f==null?void 0:f.recentRuns)??[],ue=new Map;for(const $ of J){const F=$.providerKey||"default",P=new Date($.startedAt*1e3),M=$.finishedAt?new Date($.finishedAt*1e3):new Date;M<S||P>v||(ue.has(F)||ue.set(F,[]),ue.get(F).push({id:$.id,jobType:$.jobType,status:$.status,projectPath:$.projectPath,startedAt:P,finishedAt:M,throttledCount:$.throttledCount}))}if(c!=null&&c.running){const $=c.running.providerKey??"default";ue.has($)||ue.set($,[]),ue.get($).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(ue.entries()).sort(([$],[F])=>$.localeCompare(F)).map(([$,F])=>({providerKey:$,runs:F.sort((P,M)=>P.startedAt.getTime()-M.startedAt.getTime())}))},[v,S,f,c]),W=J=>J.split(/[-_]/).map(ue=>ue.charAt(0).toUpperCase()+ue.slice(1)).join(" "),V=l.length>1,ee=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:p.map((J,ue)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},ue))});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."})]}),V&&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(J=>J.projectId!==r).slice(0,5).map(J=>{const ue=w.get(J.projectId)??0,$=Yc[ue],F=(J.projectId.split("/").pop()??J.projectId).slice(0,14);return s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${$.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:J.projectId,children:F})]},J.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+Wn},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:Wn},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:p.map((J,ue)=>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:ue*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:ks(J,"HH:mm")})},ue))})]}),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."})}),Ef.map(J=>{const ue=T.has(J.id),$=N.filter(P=>P.jobType===J.id);if(!V)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${ue?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:Wn},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 ${J.color.bg} shrink-0`}),s.jsx("span",{className:"text-xs font-semibold text-slate-300",children:J.label})]}),s.jsxs("div",{className:"flex-1 relative h-10",children:[ee,$.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:ue?"Disabled":"No runs in this window"})}):$.map((P,M)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(P.projectId,P.jobType),style:{left:A(P.time)-3},className:`absolute top-1/2 -translate-y-1/2 h-4 w-6 rounded border ${J.color.bg} ${J.color.border} opacity-90 hover:opacity-100 hover:scale-110 transition-all cursor-pointer shadow-lg group`,title:`${J.label} at ${ks(P.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:ks(P.time,"HH:mm")})},M))]})]},J.id);const F=l.length*$c+nx*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${ue?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:Wn,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 ${J.color.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:J.label})]}),l.map(P=>{const M=P.projectId===r,_=(P.projectId.split("/").pop()??P.projectId).slice(0,14),ae=w.get(P.projectId)??0,Z=M?J.color.bg:Yc[ae].bg;return s.jsxs("div",{style:{height:$c},className:"flex items-center gap-1 overflow-hidden",children:[s.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${Z}`}),s.jsx("span",{className:`text-[9px] truncate ${M?"text-slate-200 font-semibold":"text-slate-600"}`,title:P.projectId,children:M?`${_} ★`:_})]},P.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:F},children:[ee,l.map((P,M)=>{const _=P.projectId===r,ae=$.filter(re=>re.projectId===P.projectId),Z=nx+M*$c,ce=_?UN:LN,xe=Math.floor(($c-ce)/2),K=w.get(P.projectId)??0,Y=_?{bg:J.color.bg,border:J.color.border}:Yc[K];return s.jsxs(Me.Fragment,{children:[M>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:Z}}),ae.map((re,ge)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(P.projectId,re.jobType),style:{left:A(re.time)-3,top:Z+xe,height:ce},className:`absolute w-6 rounded border ${Y.bg} ${Y.border} ${_?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${P.projectId} · ${J.label} @ ${ks(re.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:ks(re.time,"HH:mm")})},ge))]},P.projectId)}),$.length===0&&!ue&&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"})})]})]},J.id)})]}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:Wn+A(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})}),s.jsxs("div",{className:"p-3 bg-slate-900/40 flex items-center gap-4 text-[10px] text-slate-500",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-1.5 h-3 rounded bg-blue-500/50 border border-blue-500"}),s.jsx("span",{children:"Each block = one scheduled run"})]}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-[1px] h-4 bg-rose-500"}),s.jsx("span",{children:"Current Time"})]}),V&&s.jsx("div",{className:"flex items-center gap-1.5",children:s.jsx("span",{children:"★ = current project · blocks in same column = scheduling overlap"})})]}),R.length>0&&s.jsxs("div",{className:"border-t border-slate-800",children:[s.jsxs("div",{className:"p-4 border-b border-slate-800 flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:"Recent Execution Runs"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Last 24h of real runs grouped by provider bucket."})]}),s.jsxs("div",{className:"text-[10px] uppercase tracking-[0.2em] text-slate-500",children:[(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+Wn},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:Wn},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:O.map((J,ue)=>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:ue*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:ks(J,"HH:mm")})},ue))})]}),s.jsx("div",{className:"relative",children:R.map(({providerKey:J,runs:ue})=>s.jsxs("div",{className:"flex border-b border-slate-800/30 min-h-14","data-testid":`provider-execution-lane-${J}`,children:[s.jsxs("div",{style:{width:Wn},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:J,children:W(J)}),s.jsx("span",{className:"text-[10px] text-slate-500 font-mono truncate",children:J})]}),s.jsxs("div",{className:"flex-1 relative h-14",children:[s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:O.map(($,F)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},F))}),ue.map($=>{const F=Ef.find(K=>K.id===$.jobType)??Ef[0],P=C($.startedAt),M=C($.finishedAt),_=Math.max(M-P,8),ae=$.status==="running",Z=$.status==="error"||$.status==="failed"||$.status==="errored",ce=ae?"bg-green-500":Z?"bg-red-500":F.color.bg,xe=ae?"border-green-400/60":Z?"border-red-400/60":F.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${ce} ${xe} opacity-85 shadow-lg ${ae?"animate-pulse":""}`,style:{left:P,width:_},title:`${J} • ${F.label} • ${ks($.startedAt,"MMM d HH:mm")} • ${$.status}`,"data-testid":"provider-execution-run",children:s.jsxs("div",{className:"h-full px-2 flex items-center justify-between gap-2 text-[10px] text-white/90 overflow-hidden whitespace-nowrap",children:[s.jsx("span",{className:"font-semibold uppercase tracking-wide",children:F.label}),s.jsx("span",{className:"text-white/70",children:$.status}),$.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",$.throttledCount,"x"]})]})},`${J}-${$.id}-${$.startedAt.getTime()}`)})]})]},J))}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:Wn+C(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},Qc=[{label:"Balanced (recommended)",value:"5 */2 * * *",description:"Every 2 hours at minute 5"},{label:"Every 6 hours (very safe)",value:"10 */6 * * *",description:"Every 6 hours at minute 10"},{label:"Every 4 hours",value:"10 */4 * * *",description:"Every 4 hours at minute 10"},{label:"Twice daily",value:"20 2,14 * * *",description:"At 02:20 and 14:20 UTC"},{label:"Daily",value:"30 3 * * *",description:"Once per day at 03:30 UTC"},{label:"Weekdays only",value:"30 9 * * 1-5",description:"At 09:30 UTC, Monday to Friday"},{label:"Weekly (Monday)",value:"40 3 * * 1",description:"At 03:40 UTC every Monday"},{label:"Custom",value:"__custom__",description:"Enter your own cron expression"}],ah=[{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 Lr(l){return l?l.trim().replace(/\s+/g," "):""}function zs(l,r){return Lr(l)===Lr(r)}function HN(l){if(l)return ah.find(r=>r.id===l)}function Ay(l,r,d,c,f,m,b,S){return zs(l.schedules.executor,r)&&zs(l.schedules.reviewer,d)&&zs(l.schedules.qa,c)&&zs(l.schedules.audit,f)&&zs(l.schedules.slicer,m)&&zs(l.schedules.prResolver,b)&&zs(l.schedules.merger,S)}function qN(l,r,d,c,f,m,b){return ah.find(S=>Ay(S,l,r,d,c,f,m,b))}function VN(l,r,d,c,f,m,b,S){const v=HN(l);return v&&Ay(v,r,d,c,f,m,b,S)?v:qN(r,d,c,f,m,b,S)}function Ul(l){const r=Lr(l),d=r.split(/\s+/);if(d.length!==5)return r;const[c,f,m,b,S]=d,v=/^\d+$/.test(c),p=Qc.find(N=>Lr(N.value)===r);if(p)return p.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(v&&f.startsWith("*/")&&m==="*"&&b==="*"&&S==="*"){const N=parseInt(f.replace("*/",""),10);return c==="0"?`Every ${N} hours`:`Every ${N} hours at :${c.padStart(2,"0")}`}if(c==="0"&&f.startsWith("*/"))return`Every ${parseInt(f.replace("*/",""),10)} hours`;if(c==="0"&&f.includes("-")){const[N,T]=f.split("-");return`Every hour from ${au(N)} to ${au(T)}`}if(v&&f.includes("-")&&m==="*"&&b==="*"&&S==="*"){const[N,T]=f.split("-");return`Every hour from ${nu(N,c)} to ${nu(T,c)}`}if(c==="0"&&f.includes(",")){const N=f.split(",").map(au);return N.length<=3?`At ${N.join(" and ")}`:`At ${N.slice(0,-1).join(", ")}, and ${N[N.length-1]}`}if(v&&f.includes(",")&&m==="*"&&b==="*"&&(S==="*"||S==="1-5")){const N=f.split(",").map(w=>nu(w,c)),T=S==="1-5"?"Weekdays at ":"At ";return N.length<=3?`${T}${N.join(" and ")}`:`${T}${N.slice(0,-1).join(", ")}, and ${N[N.length-1]}`}return c==="0"&&f!=="*"&&m==="*"&&b==="*"&&S==="*"?`Daily at ${au(f)}`:v&&f!=="*"&&m==="*"&&b==="*"&&S==="*"?`Daily at ${nu(f,c)}`:c==="0"&&f!=="*"&&m==="*"&&b==="*"&&S==="1-5"?`Weekdays at ${au(f)}`:v&&f!=="*"&&m==="*"&&b==="*"&&S==="1-5"?`Weekdays at ${nu(f,c)}`:r}function au(l){const r=parseInt(l,10);return r===0?"12 AM":r<12?`${r} AM`:r===12?"12 PM":`${r-12} PM`}function nu(l,r){const d=r.padStart(2,"0"),c=parseInt(l,10);return Number.isNaN(c)?`${l}:${d}`:c===0?`12:${d} AM`:c<12?`${c}:${d} AM`:c===12?`12:${d} PM`:`${c-12}:${d} PM`}function BN(l){const r=Lr(l),d=Qc.find(c=>Lr(c.value)===r);return(d==null?void 0:d.value)??"__custom__"}function lx(l){const r=new Date,d=l.getTime()-r.getTime(),c=Math.floor(d/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":""}`}const YN=()=>{var re,ge,Se,ke,z,le,he,me,Ee;const l=eo(),{addToast:r,selectedProjectId:d,globalModeLoading:c}=$t(),[f,m]=H.useState(!1),[b,S]=H.useState(!1),[v,p]=H.useState(!1),[N,T]=H.useState(!1),[w,A]=H.useState(null),[O,C]=H.useState([]),[R,W]=H.useState(null),[V,ee]=H.useState(null),{data:J,loading:ue,error:$,refetch:F}=rn(Kx,[d],{enabled:!c}),{data:P,loading:M,refetch:_}=rn(Jf,[d],{enabled:!c});H.useEffect(()=>{if(c)return;const de=()=>{F(),_(),Tg().then(W).catch(()=>{}),M2(24).then(ee).catch(()=>{}),Jx().then(C).catch(()=>{})};de();const _e=setInterval(de,3e4);return()=>clearInterval(_e)},[d,c,F,_]);const ae=async()=>{if(J){m(!0);try{J.paused?(await Rf(),r({title:"Schedule Resumed",message:"Cron schedules are active.",type:"success"})):(await N2(),r({title:"Schedule Paused",message:"Cron schedules are deactivated.",type:"info"})),F()}catch(de){r({title:"Action Failed",message:de instanceof Error?de.message:"Toggle failed",type:"error"})}finally{m(!1)}}},Z=async()=>{if(window.confirm("Are you sure you want to clear all pending jobs?")){p(!0);try{const de=await O2();r({title:"Queue Cleared",message:`Removed ${de.cleared} pending jobs.`,type:"success"}),Tg().then(W)}catch(de){r({title:"Clear Failed",message:de instanceof Error?de.message:"Failed to clear queue",type:"error"})}finally{p(!1)}}},ce=async de=>{if(P){S(!0);try{await Kf({queue:{...P.queue,...de}}),r({title:"Settings Saved",message:"Queue configuration updated.",type:"success"}),_()}catch(_e){r({title:"Save Failed",message:_e instanceof Error?_e.message:"Save failed",type:"error"})}finally{S(!1)}}},xe=async de=>{const _e=de==="planner"?"slicer":de;A(de);try{await ey(_e),r({title:"Job Triggered",message:`${de} job queued successfully.`,type:"success"})}catch(ct){r({title:"Trigger Failed",message:ct instanceof Error?ct.message:"Failed to trigger job",type:"error"})}finally{A(null)}},K=de=>{l(`/settings?tab=jobs&jobType=${de==="planner"?"slicer":de}`)};if(ue||M)return s.jsx("div",{className:"flex items-center justify-center min-h-[400px] text-slate-500",children:"Loading automation state..."});if($||!J||!P)return s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:[s.jsx(vn,{className:"h-10 w-10 text-red-500"}),s.jsx("div",{className:"text-slate-300 font-medium",children:"Failed to load scheduling data"}),s.jsx(Ze,{onClick:()=>{F(),_()},children:"Retry"})]});const Y=J.paused;return s.jsxs("div",{className:"max-w-6xl mx-auto space-y-8 pb-20",children:[s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-6",children:[s.jsxs("div",{children:[s.jsxs("h2",{className:"text-2xl font-bold text-slate-100 flex items-center gap-3",children:["Automation Control",s.jsx($a,{variant:Y?"warning":"success",className:"px-3 py-1 text-xs uppercase tracking-wider",children:Y?"Paused":"Active"})]}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Managed cron triggers and global job queue"})]}),s.jsx(Ze,{variant:Y?"primary":"outline",size:"lg",className:Y?"bg-emerald-600 hover:bg-emerald-700":"border-slate-700 hover:bg-slate-800",onClick:ae,loading:f,children:Y?s.jsxs(s.Fragment,{children:[s.jsx(Yl,{className:"h-5 w-5 mr-2 fill-current"})," Resume Scheduling"]}):s.jsxs(s.Fragment,{children:[s.jsx(Fx,{className:"h-5 w-5 mr-2"})," Pause Scheduling"]})})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-8",children:[s.jsxs(gt,{className:"overflow-hidden border-slate-800",children:[s.jsxs("div",{className:"p-5 border-b border-slate-800 flex items-center justify-between bg-slate-900/30",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(wg,{className:"h-5 w-5 text-indigo-400"}),s.jsx("h3",{className:"font-semibold text-slate-200",children:"Execution Queue"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(Ze,{variant:"ghost",size:"sm",onClick:Z,loading:v,disabled:!(R!=null&&R.items.length),className:"text-slate-500 hover:text-red-400 hover:bg-red-400/10",children:[s.jsx(Vr,{className:"h-4 w-4 mr-1.5"}),"Clear"]}),s.jsx("div",{className:`p-1.5 rounded-lg cursor-pointer hover:bg-slate-800 transition-colors ${N?"text-indigo-400 bg-slate-800":"text-slate-500"}`,onClick:()=>T(!N),title:"Queue Settings",children:s.jsx(Ng,{className:"h-5 w-5"})})]})]}),s.jsx("div",{className:`transition-all duration-300 overflow-hidden ${N?"max-h-[500px]":"max-h-0"}`,children:s.jsxs("div",{className:"p-6 bg-slate-950/40 border-b border-slate-800 grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(mt,{label:"Dispatch Mode",value:((re=P.queue)==null?void 0:re.mode)||"auto",onChange:de=>ce({mode:de}),options:[{label:"Auto (Recommended)",value:"auto"},{label:"Conservative (1 at a time)",value:"conservative"},{label:"Provider-aware",value:"provider-aware"}]}),s.jsx(ze,{label:"Max Concurrency",type:"number",min:"1",max:"20",value:String(((ge=P.queue)==null?void 0:ge.maxConcurrency)||1),onChange:de=>ce({maxConcurrency:Number(de.target.value)})}),s.jsx("div",{className:"md:col-span-2 flex items-center gap-3",children:s.jsx(Ya,{label:"Coordinator Enabled",checked:((Se=P.queue)==null?void 0:Se.enabled)??!0,onChange:de=>ce({enabled:de})})})]})}),s.jsx("div",{className:"p-0",children:R!=null&&R.items.length?s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-left text-sm",children:[s.jsx("thead",{className:"text-[11px] uppercase tracking-wider text-slate-500 font-semibold bg-slate-900/20",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3",children:"Job / Project"}),s.jsx("th",{className:"px-6 py-3",children:"Status"}),s.jsx("th",{className:"px-6 py-3",children:"Wait Time"}),s.jsx("th",{className:"px-6 py-3 text-right",children:"Actions"})]})}),s.jsx("tbody",{className:"divide-y divide-slate-800/40",children:R.items.map(de=>s.jsxs("tr",{className:"hover:bg-slate-800/20 transition-colors group",children:[s.jsxs("td",{className:"px-6 py-4",children:[s.jsx("div",{className:"font-medium text-slate-200",children:de.jobType}),s.jsx("div",{className:"text-[11px] text-slate-500 truncate max-w-[200px]",title:de.projectPath,children:de.projectName||de.projectPath})]}),s.jsx("td",{className:"px-6 py-4",children:s.jsx($a,{variant:de.status==="running"?"info":"neutral",className:"text-[10px]",children:de.status})}),s.jsx("td",{className:"px-6 py-4 text-slate-400 font-mono text-xs",children:lx(new Date(de.enqueuedAt*1e3))}),s.jsx("td",{className:"px-6 py-4 text-right",children:s.jsx("button",{onClick:()=>K(de.jobType),className:"opacity-0 group-hover:opacity-100 p-2 text-slate-500 hover:text-indigo-400 transition-all",title:"Configure Job",children:s.jsx(Ng,{className:"h-4 w-4"})})})]},de.id))})]})}):s.jsxs("div",{className:"py-12 flex flex-col items-center justify-center text-slate-500 text-sm italic",children:[s.jsx("div",{className:"mb-3 p-3 rounded-full bg-slate-900 border border-slate-800",children:s.jsx(bg,{className:"h-6 w-6 opacity-30"})}),"Queue is empty"]})})]}),s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Operational Timeline"}),s.jsxs("div",{className:"text-xs text-slate-500 flex items-center gap-2",children:[s.jsx(Sg,{className:"h-3 w-3 animate-spin-slow"})," Live Update"]})]}),s.jsx(Dy,{configs:O,currentProjectId:d??void 0,onEditJob:(de,_e)=>K(_e),queueStatus:R,queueAnalytics:V})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs(gt,{className:"p-5 space-y-4 border-slate-800 bg-slate-900/20",children:[s.jsx("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest",children:"Efficiency Stats"}),s.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[s.jsxs("div",{className:"p-4 rounded-xl border border-slate-800 bg-slate-950/40",children:[s.jsx("div",{className:"text-[10px] text-slate-500 uppercase",children:"Avg Wait Time"}),s.jsxs("div",{className:"text-xl font-bold text-slate-200 mt-1",children:[R!=null&&R.averageWaitSeconds?(R.averageWaitSeconds/60).toFixed(1):"0"," ",s.jsx("span",{className:"text-xs font-normal text-slate-500",children:"min"})]})]}),s.jsxs("div",{className:"p-4 rounded-xl border border-slate-800 bg-slate-950/40",children:[s.jsx("div",{className:"text-[10px] text-slate-500 uppercase",children:"Oldest Pending"}),s.jsxs("div",{className:"text-xl font-bold text-slate-200 mt-1",children:[R!=null&&R.oldestPendingAge?(R.oldestPendingAge/60).toFixed(1):"0"," ",s.jsx("span",{className:"text-xs font-normal text-slate-500",children:"min"})]})]})]})]}),s.jsxs(gt,{className:"divide-y divide-slate-800 border-slate-800",children:[s.jsx("div",{className:"p-4 bg-slate-900/30",children:s.jsx("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest",children:"Manual Trigger"})}),s.jsx("div",{className:"p-2 space-y-1",children:[{id:"executor",label:"Run Executor",icon:Yl,enabled:P.executorEnabled!==!1},{id:"reviewer",label:"Run Reviewer",icon:ou,enabled:P.reviewerEnabled??!1},{id:"qa",label:"Run QA",icon:wg,enabled:((ke=P.qa)==null?void 0:ke.enabled)??!1},{id:"audit",label:"Run Audit",icon:bg,enabled:((z=P.audit)==null?void 0:z.enabled)??!1},{id:"planner",label:"Run Planner",icon:Gx,enabled:((le=P.roadmapScanner)==null?void 0:le.enabled)??!1},{id:"analytics",label:"Run Analytics",icon:Hx,enabled:((he=P.analytics)==null?void 0:he.enabled)??!1},{id:"pr-resolver",label:"Run PR Resolver",icon:Yx,enabled:((me=P.prResolver)==null?void 0:me.enabled)??!1},{id:"merger",label:"Run Merger",icon:Wf,enabled:((Ee=P.merger)==null?void 0:Ee.enabled)??!1}].map(de=>s.jsxs("button",{onClick:()=>xe(de.id),disabled:w===de.id||!de.enabled,className:`w-full flex items-center justify-between p-3 rounded-lg text-sm transition-colors group disabled:cursor-not-allowed ${de.enabled?"text-slate-300 hover:bg-slate-800/40":"text-slate-600 opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(de.icon,{className:`h-4 w-4 ${de.enabled?"text-slate-500 group-hover:text-indigo-400":"text-slate-700"}`}),de.label]}),w===de.id?s.jsx(Sg,{className:"h-3 w-3 animate-spin text-indigo-400"}):de.enabled?s.jsx(Yl,{className:"h-3 w-3 opacity-0 group-hover:opacity-100 transition-all fill-current text-indigo-400"}):s.jsx("span",{className:"text-[10px] text-slate-600 uppercase tracking-wider",children:"Off"})]},de.id))}),s.jsx("div",{className:"p-4",children:s.jsx(Ze,{variant:"outline",size:"sm",className:"w-full",onClick:()=>l("/settings?tab=jobs"),children:"Advanced Settings"})})]})]})]}),s.jsxs("section",{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Execution History (Last 24h)"}),s.jsx(gt,{className:"border-slate-800 overflow-hidden",children:V!=null&&V.recentRuns.length?s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-left text-sm",children:[s.jsx("thead",{className:"text-[11px] uppercase tracking-wider text-slate-500 font-semibold bg-slate-900/20",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-4",children:"Job Type"}),s.jsx("th",{className:"px-6 py-4",children:"Status"}),s.jsx("th",{className:"px-6 py-4",children:"Duration"}),s.jsx("th",{className:"px-6 py-4",children:"Started"}),s.jsx("th",{className:"px-6 py-4 text-right",children:"Provider"})]})}),s.jsx("tbody",{className:"divide-y divide-slate-800/40",children:V.recentRuns.map(de=>s.jsxs("tr",{className:"hover:bg-slate-800/10 transition-colors",children:[s.jsx("td",{className:"px-6 py-4",children:s.jsx("span",{className:"font-medium text-slate-300 capitalize",children:de.jobType})}),s.jsx("td",{className:"px-6 py-4",children:s.jsx($a,{variant:de.status==="finished"?"success":de.status==="failed"?"error":"neutral",className:"text-[10px]",children:de.status})}),s.jsx("td",{className:"px-6 py-4 text-slate-400",children:de.durationSeconds?`${de.durationSeconds}s`:"--"}),s.jsx("td",{className:"px-6 py-4 text-slate-500 text-xs",children:lx(new Date(de.startedAt*1e3))}),s.jsx("td",{className:"px-6 py-4 text-right text-slate-500 font-mono text-xs",children:de.providerKey||"default"})]},de.id))})]})}):s.jsx("div",{className:"py-20 text-center text-slate-500 italic text-sm",children:"No recorded runs in the last 24 hours."})})]})]})},$N=({isOpen:l,onClose:r,title:d,children:c})=>(H.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?Yb.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:d}),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(Br,{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),PN=l=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>l.toUpperCase().includes(d)),GN=({value:l,isSensitive:r})=>{const[d,c]=Me.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:d?l:"***********"}),s.jsx("button",{type:"button",onClick:()=>c(!d),className:"text-slate-500 hover:text-slate-300","aria-label":d?"Hide sensitive value":"Show sensitive value",title:d?"Hide sensitive value":"Show sensitive value",children:d?s.jsx(M1,{className:"h-4 w-4"}):s.jsx(Bx,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:l})},_y=({envVars:l,onChange:r,compact:d=!1})=>{const[c,f]=Me.useState(""),[m,b]=Me.useState(""),[S,v]=Me.useState(null),[p,N]=Me.useState(""),{addToast:T}=$t(),w=()=>{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(""),b("")}},A=V=>{const ee={...l};delete ee[V],r(ee)},O=V=>{v(V),N(l[V]??"")},C=()=>{S&&(r({...l,[S]:p}),v(null),N(""))},R=()=>{v(null),N("")},W=Object.entries(l);return s.jsxs("div",{className:"space-y-4",children:[!d&&s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),s.jsx("div",{className:"space-y-2",children:W.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):W.map(([V,ee])=>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:V}),S===V?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:p,onChange:J=>N(J.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:C,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${V} value`,title:`Save ${V} value`,children:s.jsx(u1,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:R,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${V}`,title:`Cancel editing ${V}`,children:s.jsx(Br,{className:"h-4 w-4"})})]}):s.jsx(GN,{value:ee,isSensitive:PN(V)})]}),S!==V&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>O(V),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${V}`,title:`Edit ${V}`,children:s.jsx(ao,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>A(V),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${V}`,title:`Delete ${V}`,children:s.jsx(Vr,{className:"h-4 w-4"})})]})]},V))}),s.jsxs("div",{className:`flex items-end gap-3 ${d?"":"pt-4 border-t border-slate-800"}`,children:[s.jsxs("div",{className:"flex-1",children:[!d&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:c,onChange:V=>f(V.target.value.toUpperCase()),placeholder:d?"ENV_VAR_NAME":"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs("div",{className:"flex-1",children:[!d&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:m,onChange:V=>b(V.target.value),placeholder:d?"value":"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs(Ze,{onClick:w,disabled:!c.trim(),size:d?"sm":"md",children:[s.jsx(Vs,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function FN(l,r){var d;return!!(l!=null&&l.startsWith("glm-")||(d=r==null?void 0:r.model)!=null&&d.startsWith("glm-"))}function ZN(l,r){var d,c;return FN(l,r)?!((c=(d=r==null?void 0:r.envVars)==null?void 0:d.ANTHROPIC_API_KEY)!=null&&c.trim()):!1}const sx={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:""}},WN=({isOpen:l,onClose:r,onSave:d,presetId:c,preset:f,isBuiltIn:m,existingIds:b})=>{const[S,v]=Me.useState(""),[p,N]=Me.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[T,w]=Me.useState(!1),[A,O]=Me.useState("custom"),[C,R]=Me.useState(null),W=ZN(c??S,p);Me.useEffect(()=>{l&&(c&&f?(v(c),N({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"?O("claude"):c==="codex"||f.command==="codex"?O("codex"):O("custom")):(v(""),N({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),O("custom")),R(null),w(!!(f!=null&&f.envVars&&Object.keys(f.envVars).length>0)))},[l,c,f]);const V=$=>{if(O($),$!=="custom"&&sx[$]){const F=sx[$];N(P=>({...P,...F,envVars:P.envVars})),!c&&!S&&v($)}},ee=($,F)=>{N(P=>({...P,[$]:F})),R(null)},J=()=>{if(!p.name.trim())return R("Name is required"),!1;if(!p.command.trim())return R("Command is required"),!1;if(!c){if(!S.trim())return R("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(S))return R("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(b.includes(S))return R("A preset with this ID already exists"),!1}return!0},ue=()=>{var F,P,M,_,ae,Z;if(!J())return;const $={name:p.name.trim(),command:p.command.trim()};(F=p.subcommand)!=null&&F.trim()&&($.subcommand=p.subcommand.trim()),(P=p.promptFlag)!=null&&P.trim()&&($.promptFlag=p.promptFlag.trim()),(M=p.autoApproveFlag)!=null&&M.trim()&&($.autoApproveFlag=p.autoApproveFlag.trim()),(_=p.workdirFlag)!=null&&_.trim()&&($.workdirFlag=p.workdirFlag.trim()),(ae=p.modelFlag)!=null&&ae.trim()&&($.modelFlag=p.modelFlag.trim()),(Z=p.model)!=null&&Z.trim()&&($.model=p.model.trim()),p.envVars&&Object.keys(p.envVars).length>0&&($.envVars=p.envVars),d(c||S,$),r()};return s.jsx($N,{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:[C&&s.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:C}),W&&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(Ur,{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(mt,{label:"Template",value:A,onChange:V,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(ze,{label:"Preset ID",value:S,onChange:$=>v($.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(ze,{label:"Display Name",value:p.name,onChange:$=>ee("name",$.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(ze,{label:"Command",value:p.command,onChange:$=>ee("command",$.target.value),placeholder:"e.g., claude, codex, npx",required:!0})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(ze,{label:"Model",value:p.model??"",onChange:$=>ee("model",$.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(ze,{label:"Model Flag",value:p.modelFlag??"",onChange:$=>ee("modelFlag",$.target.value),placeholder:"e.g., --model",helperText:"Flag for specifying the model"})]}),s.jsxs("div",{className:"border-t border-slate-800 pt-4",children:[s.jsxs("button",{type:"button",onClick:()=>w(!T),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[T?s.jsx(g1,{className:"h-4 w-4"}):s.jsx(Zf,{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(ze,{label:"Subcommand",value:p.subcommand??"",onChange:$=>ee("subcommand",$.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(ze,{label:"Prompt Flag",value:p.promptFlag??"",onChange:$=>ee("promptFlag",$.target.value),placeholder:"e.g., -p",helperText:"Flag for passing the prompt"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(ze,{label:"Auto-Approve Flag",value:p.autoApproveFlag??"",onChange:$=>ee("autoApproveFlag",$.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(ze,{label:"Workdir Flag",value:p.workdirFlag??"",onChange:$=>ee("workdirFlag",$.target.value),placeholder:"e.g., -C",helperText:"Flag for setting working directory"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Environment Variables"}),s.jsx(_y,{envVars:p.envVars??{},onChange:$=>ee("envVars",$),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(Ze,{variant:"ghost",onClick:r,children:"Cancel"}),s.jsx(Ze,{onClick:ue,children:c?"Save Changes":"Add Preset"})]})]})})},QN=({tabs:l,activeTab:r,onChange:d,className:c=""})=>{var v,p;const[f,m]=Me.useState((v=l[0])==null?void 0:v.id),b=r||f,S=N=>{d?d(N):m(N)};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(N=>s.jsx("button",{onClick:()=>S(N.id),className:`
|
|
404
|
-
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
405
|
-
${b===N.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
406
|
-
`,children:N.label},N.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(p=l.find(N=>N.id===b))==null?void 0:p.content})]})},lu=({label:l,value:r=[],onChange:d,placeholder:c,helpText:f})=>{const[m,b]=Me.useState(""),S=()=>{m.trim()&&!r.includes(m.trim())&&(d([...r,m.trim()]),b(""))},v=N=>{d(r.filter(T=>T!==N))},p=N=>{N.key==="Enter"&&(N.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(N=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[N,s.jsx("button",{type:"button",onClick:()=>v(N),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${N}`,title:`Remove ${N}`,children:s.jsx(Br,{className:"h-3 w-3"})})]},N))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:m,onChange:N=>b(N.target.value),onKeyDown:p,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(Ze,{onClick:S,disabled:!m.trim(),"aria-label":`Add ${l.toLowerCase()} value`,children:s.jsx(Vs,{className:"h-4 w-4"})})]}),f&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:f})]})},IN=({form:l,updateField:r,projectName:d,doctorChecks:c,doctorLoading:f})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(gt,{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(ze,{label:"Project Name",value:d,disabled:!0}),s.jsx(ze,{label:"Default Branch",value:l.defaultBranch,onChange:m=>r("defaultBranch",m.target.value)}),s.jsx(ze,{label:"PRD Directory",value:l.prdDir,onChange:m=>r("prdDir",m.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(ze,{label:"Branch Prefix",value:l.branchPrefix,onChange:m=>r("branchPrefix",m.target.value)}),s.jsx(ze,{label:"Templates Directory",value:l.templatesDir,onChange:m=>r("templatesDir",m.target.value),helperText:"Directory for custom template overrides"}),s.jsx(ze,{label:"Max Log Size",type:"number",value:String(l.maxLogSize),onChange:m=>r("maxLogSize",Number(m.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"}),helperText:"Maximum size for process log files"})]}),s.jsxs("div",{className:"pt-4 mt-4 border-t border-slate-800 space-y-6",children:[s.jsx(lu,{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.jsx(lu,{label:"PRD Priority",value:l.prdPriority,onChange:m=>r("prdPriority",m),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})]})]})}),s.jsxs(gt,{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,b)=>{const S=m.status==="pass",v=m.status==="warn",p=S?"bg-green-500/10 text-green-400 border-green-500/20":v?"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 ${p}`,children:m.status.toUpperCase()})]},`${m.name}-${b}`)})]})]}),rx=({presetId:l,preset:r,isBuiltIn:d,onEdit:c,onDelete:f,onReset:m})=>{var p,N,T;const b=r.envVars?Object.keys(r.envVars).length:0,v=(l.startsWith("glm-")||((p=r.model)==null?void 0:p.startsWith("glm-")))&&!((T=(N=r.envVars)==null?void 0:N.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}),d&&s.jsx($a,{variant:"info",className:"text-[10px]",children:"Built-in"}),v&&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(Ur,{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(ao,{className:"h-4 w-4"})}),d?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(Zx,{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(Vr,{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($a,{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]}),b>0&&s.jsxs("span",{className:"text-xs text-slate-500",children:[b," env var",b!==1?"s":""]})]})]})},Uf={0:"Su",1:"Mo",2:"Tu",3:"We",4:"Th",5:"Fr",6:"Sa"},Lf={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics",planner:"Planner","pr-resolver":"PR Resolver",merger:"Merger"},Tf={label:"",presetId:"",days:[1,2,3,4,5],startTime:"23:00",endTime:"04:00",jobTypes:null,enabled:!0},ix=({override:l,onChange:r,onSave:d,onCancel:c,isNew:f,presetOptions:m})=>{const b=O=>{const C=l.days.includes(O)?l.days.filter(R=>R!==O):[...l.days,O].sort((R,W)=>R-W);r({...l,days:C})},S=()=>{r({...l,days:[1,2,3,4,5]})},v=()=>{r({...l,days:[0,6]})},p=()=>{r({...l,days:[0,1,2,3,4,5,6]})},N=()=>{r({...l,jobTypes:null})},T=O=>{const C=l.jobTypes??[],R=C.includes(O)?C.filter(W=>W!==O):[...C,O];r({...l,jobTypes:R.length===0?null:R})},w=l.jobTypes===null||l.jobTypes===void 0,A=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(ze,{label:"Label",value:l.label,onChange:O=>r({...l,label:O.target.value}),placeholder:"e.g., Night Hours",required:!0}),s.jsx(mt,{label:"Provider",value:l.presetId,onChange:O=>r({...l,presetId:O}),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(Uf).map(O=>s.jsx("button",{type:"button",onClick:()=>b(O),className:`w-10 h-10 rounded-md text-sm font-medium transition-colors ${l.days.includes(O)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:Uf[O]},O)),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:v,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:p,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:O=>r({...l,startTime:O.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:O=>r({...l,endTime:O.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:N,className:"text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:w?"All Jobs Selected":"Select All Jobs"})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Object.keys(Lf).filter(O=>O!=="planner").map(O=>{var R;const C=w||(((R=l.jobTypes)==null?void 0:R.includes(O))??!1);return s.jsx("button",{type:"button",onClick:()=>T(O),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${C?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,disabled:w,children:Lf[O]},O)})}),w&&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(Ya,{checked:l.enabled,onChange:O=>r({...l,enabled:O}),label:"Enabled"})}),s.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[s.jsx(Ze,{variant:"ghost",onClick:c,children:"Cancel"}),s.jsx(Ze,{onClick:d,disabled:!A,children:f?"Add Override":"Save Changes"})]})]})},XN=({overrides:l,onChange:r,presetOptions:d})=>{const[c,f]=Me.useState(null),[m,b]=Me.useState(!1),[S,v]=Me.useState(Tf),p=()=>{r([...l,S]),v({...Tf}),b(!1)},N=(R,W)=>{const V=[...l];V[R]=W,r(V)},T=R=>{window.confirm("Are you sure you want to delete this schedule override?")&&r(l.filter((W,V)=>V!==R))},w=R=>{const W=[...l];W[R]={...W[R],enabled:!W[R].enabled},r(W)},A=R=>R.length===7?"Every day":R.length===5&&R.every(W=>W>=1&&W<=5)?"Weekdays":R.length===2&&R.includes(0)&&R.includes(6)?"Weekends":R.map(W=>Uf[W]).join(", "),O=R=>!R||R.length===0?"All Jobs":R.map(W=>Lf[W]).join(", "),C=R=>{const W=d.find(V=>V.value===R);return(W==null?void 0:W.label)||R};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((R,W)=>s.jsx("div",{children:c===W?s.jsx(ix,{override:R,onChange:V=>N(W,V),onSave:()=>f(null),onCancel:()=>f(null),presetOptions:d}):s.jsxs("div",{className:`flex items-start justify-between p-4 rounded-md border bg-slate-950/40 ${R.enabled?"border-slate-800":"border-slate-800/50 opacity-60"}`,children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[s.jsx(Ya,{checked:R.enabled,onChange:()=>w(W)}),s.jsx("span",{className:"text-slate-100 font-medium",children:R.label})]}),s.jsxs("div",{className:"text-sm text-slate-400 ml-11",children:[s.jsx("span",{className:"text-indigo-400",children:C(R.presetId)})," · ",A(R.days)," · ",R.startTime," - ",R.endTime," · ",O(R.jobTypes)]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>f(W),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${R.label}`,title:`Edit ${R.label}`,children:s.jsx(ao,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>T(W),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${R.label}`,title:`Delete ${R.label}`,children:s.jsx(Vr,{className:"h-4 w-4"})})]})]})},W))}),m?s.jsx(ix,{override:S,onChange:v,onSave:p,onCancel:()=>{b(!1),v({...Tf})},isNew:!0,presetOptions:d}):s.jsxs(Ze,{variant:"ghost",onClick:()=>b(!0),children:[s.jsx(Vs,{className:"h-4 w-4 mr-2"}),"Add Schedule Override"]})]})},Ic=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],JN={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"}}},KN=({form:l,updateField:r,getAllPresets:d,getPresetOptions:c,handleEditPreset:f,handleDeletePreset:m,handleResetPreset:b,handleAddPreset:S})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(gt,{className:"p-6 bg-slate-900/60 border-indigo-500/20",children:s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-100",children:"Global AI Provider"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Default preset for all automation tasks"})]}),s.jsx("div",{className:"w-full md:w-72",children:s.jsx(mt,{value:l.provider,onChange:v=>r("provider",v),options:c(l.providerPresets)})})]})}),s.jsxs(gt,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Available Presets"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Custom AI models and environment configurations"})]}),s.jsxs(Ze,{onClick:S,variant:"primary",size:"sm",children:[s.jsx(Vs,{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:[Ic.map(v=>{const N=d()[v];return N?s.jsx(rx,{presetId:v,preset:N,isBuiltIn:!0,onEdit:()=>f(v),onReset:()=>b(v)},v):null}),Object.entries(l.providerPresets).filter(([v])=>!Ic.includes(v)).map(([v,p])=>s.jsx(rx,{presetId:v,preset:p,isBuiltIn:!1,onEdit:()=>f(v),onDelete:()=>m(v)},v))]})]}),s.jsxs(gt,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Reliability & Fallbacks"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure automated fallback when a provider is rate-limited"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(mt,{label:"Primary Fallback Preset",value:l.primaryFallbackPreset,onChange:v=>r("primaryFallbackPreset",v),options:[{label:"— None —",value:""},...Object.entries(d()).map(([v,p])=>({label:p.name,value:v}))],helperText:"Automatic switch when global provider is throttled"}),s.jsx(mt,{label:"Secondary Fallback Preset",value:l.secondaryFallbackPreset,onChange:v=>r("secondaryFallbackPreset",v),options:[{label:"— None —",value:""},...Object.entries(d()).map(([v,p])=>({label:p.name,value:v}))]})]})]}),s.jsxs(gt,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Scheduled Overrides"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Automatically switch providers based on the time of day (e.g. use cheaper models at night)"})]}),s.jsx(XN,{overrides:l.providerScheduleOverrides,onChange:v=>r("providerScheduleOverrides",v),presetOptions:Object.entries(d()).map(([v,p])=>({label:p.name,value:v}))})]}),s.jsxs(gt,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Global Environment Variables"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Variables passed to all provider CLI executions"}),s.jsx(_y,{envVars:l.providerEnv,onChange:v=>r("providerEnv",v)})]})]}),Ll=({label:l,value:r,onChange:d,helperText:c,placeholder:f="5 */3 * * *"})=>{const m=BN(r),b=m==="__custom__",S=N=>{N!=="__custom__"&&d(N)},v=N=>{d(N.target.value)},p=Qc.find(N=>N.value===m);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(mt,{label:l,value:m,onChange:S,options:Qc.map(N=>({label:N.label,value:N.value})),helperText:b?void 0:(p==null?void 0:p.description)||c}),b&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(ze,{label:"Cron Expression",value:r,onChange:v,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)"]})]})]})},Hl=({title:l,icon:r,description:d,enabled:c,onToggle:f,expanded:m,onExpandChange:b,scheduleSummary:S,providerLabel:v,children:p,id:N})=>s.jsxs("div",{id:N,className:`border border-slate-800 rounded-xl overflow-hidden transition-all duration-200 ${m?"bg-slate-900/50 ring-1 ring-indigo-500/20":"bg-slate-900/20 hover:bg-slate-900/40"}`,children:[s.jsxs("div",{className:"flex items-center justify-between p-4 cursor-pointer select-none",onClick:()=>b(!m),children:[s.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[s.jsx("div",{className:`p-2 rounded-lg ${m?"bg-indigo-500/20 text-indigo-400":"bg-slate-800 text-slate-400"}`,children:s.jsx(r,{className:"h-5 w-5"})}),s.jsxs("div",{className:"overflow-hidden",children:[s.jsx("h3",{className:"text-sm font-medium text-slate-200 truncate",children:l}),!m&&s.jsx("p",{className:"text-xs text-slate-500 truncate",children:d})]})]}),s.jsxs("div",{className:"flex items-center gap-4 shrink-0",children:[!m&&s.jsxs("div",{className:"hidden sm:flex items-center gap-2",children:[S&&s.jsx($a,{variant:"neutral",className:"bg-slate-800/50 text-[10px]",children:S}),v&&s.jsx($a,{variant:"info",className:"bg-blue-500/5 text-[10px]",children:v})]}),s.jsx("div",{onClick:T=>T.stopPropagation(),children:s.jsx(Ya,{checked:c,onChange:f})}),s.jsx(Zf,{className:`h-5 w-5 text-slate-500 transition-transform duration-300 ${m?"rotate-180 text-indigo-400":""}`})]})]}),s.jsx("div",{className:`grid transition-all duration-300 ease-in-out ${m?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:s.jsx("div",{className:"overflow-hidden",children:s.jsx("div",{className:"p-6 pt-0 space-y-6 border-t border-slate-800/50 mt-2",children:s.jsx("div",{className:"pt-6",children:p})})})})]}),ej=({form:l,updateField:r,handleRoadmapToggle:d,presetOptions:c,scheduleMode:f,onSwitchToTemplate:m,onSwitchToCustom:b,onApplyTemplate:S,allProjectConfigs:v,currentProjectId:p})=>{var C,R,W,V,ee,J,ue,$,F,P;const[N,T]=Me.useState(null);Me.useEffect(()=>{const _=new URLSearchParams(window.location.search).get("jobType");_&&(T(_),setTimeout(()=>{const ae=document.getElementById(`job-section-${_}`);ae&&ae.scrollIntoView({behavior:"smooth",block:"center"})},100))},[]);const w=(M,_)=>{const ae={...l.jobProviders};_===""?delete ae[M]:ae[M]=_,r("jobProviders",ae)},A=(M,_)=>{const ae=_==="planner"?"slicer":_;T(ae),setTimeout(()=>{const Z=document.getElementById(`job-section-${ae}`);Z&&Z.scrollIntoView({behavior:"smooth",block:"center"})},50)},O=[{label:"Use Global (default)",value:""},...c];return s.jsxs("div",{className:"space-y-8",children:[s.jsxs("section",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-1",children:"Schedule Presets"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Apply a template to all jobs or configure custom schedules per job"})]}),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 ${f==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:m,children:"Template"}),s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${f==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:b,children:"Custom"})]})]}),f==="template"&&s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:ah.map(M=>{const _=l.scheduleBundleId===M.id;return s.jsxs("button",{type:"button",onClick:()=>S(M),className:`text-left p-4 rounded-lg border transition-all ${_?"border-indigo-500 bg-indigo-950/40 ring-1 ring-indigo-500/20":"border-slate-800 bg-slate-900/30 hover:border-slate-700"}`,children:[s.jsx("div",{className:"font-medium text-slate-200 mb-1 text-sm",children:M.label}),s.jsx("p",{className:"text-[11px] text-slate-500 leading-relaxed",children:M.description})]},M.id)})}),s.jsx(Dy,{configs:v,currentProjectId:p,onEditJob:A}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 pt-4 border-t border-slate-800/50",children:[s.jsx(mt,{label:"Scheduling Priority",value:String(l.schedulingPriority),onChange:M=>r("schedulingPriority",Number(M)),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:"Projects with higher priority get earlier slots"}),s.jsx(ze,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(l.cronScheduleOffset),onChange:M=>r("cronScheduleOffset",Math.min(59,Math.max(0,Number(M.target.value||0)))),rightIcon:s.jsx("span",{className:"text-xs",children:"min"}),helperText:"Manual delay added to all jobs"}),s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-xl border border-slate-800 bg-slate-950/30",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Global Queue"}),s.jsx("p",{className:"text-[11px] text-slate-500 mt-0.5",children:"Queue overlapping jobs"})]}),s.jsx(Ya,{checked:l.queue.enabled,onChange:M=>r("queue",{...l.queue,enabled:M})})]})]})]}),s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-slate-800/50",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Job Configurations"}),s.jsx("span",{className:"text-xs text-slate-500",children:"8 total jobs"})]}),s.jsx(Hl,{id:"job-section-executor",title:"PRD Executor",icon:Yl,description:"Executes PRDs to generate code and create PRs",enabled:l.executorEnabled,onToggle:M=>r("executorEnabled",M),expanded:N==="executor",onExpandChange:M=>T(M?"executor":null),scheduleSummary:Ul(l.cronSchedule),providerLabel:l.jobProviders.executor?(C=c.find(M=>M.value===l.jobProviders.executor))==null?void 0:C.label:"Global",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ll,{label:"Schedule",value:l.cronSchedule,onChange:M=>r("cronSchedule",M)}),s.jsx(mt,{label:"Provider",value:l.jobProviders.executor??"",onChange:M=>w("executor",M),options:O}),s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.maxRuntime),onChange:M=>r("maxRuntime",Number(M.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for executor tasks"})]})}),s.jsx(Hl,{id:"job-section-reviewer",title:"PR Reviewer",icon:Bx,description:"Reviews PRs and provides feedback or automated fixes",enabled:l.reviewerEnabled,onToggle:M=>r("reviewerEnabled",M),expanded:N==="reviewer",onExpandChange:M=>T(M?"reviewer":null),scheduleSummary:Ul(l.reviewerSchedule),providerLabel:l.jobProviders.reviewer?(R=c.find(M=>M.value===l.jobProviders.reviewer))==null?void 0:R.label:"Global",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ll,{label:"Schedule",value:l.reviewerSchedule,onChange:M=>r("reviewerSchedule",M)}),s.jsx(mt,{label:"Provider",value:l.jobProviders.reviewer??"",onChange:M=>w("reviewer",M),options:O}),s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.reviewerMaxRuntime),onChange:M=>r("reviewerMaxRuntime",Number(M.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ze,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(l.minReviewScore),onChange:M=>r("minReviewScore",Number(M.target.value||0)),helperText:"PRs below this score will be marked as 'Needs Work'"}),s.jsx(ze,{label:"Max Retries",type:"number",value:String(l.reviewerMaxRetries),onChange:M=>r("reviewerMaxRetries",Number(M.target.value||0)),helperText:"Fix attempts after initial review"}),s.jsx(ze,{label:"Retry Delay",type:"number",value:String(l.reviewerRetryDelay),onChange:M=>r("reviewerRetryDelay",Number(M.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(ze,{label:"Max PRs Per Run",type:"number",value:String(l.reviewerMaxPrsPerRun),onChange:M=>r("reviewerMaxPrsPerRun",Number(M.target.value||0)),helperText:"Hard cap on PRs processed per run (0 = unlimited)"})})]})}),s.jsx(Hl,{id:"job-section-qa",title:"Quality Assurance",icon:S1,description:"Automated UI testing using Playwright",enabled:l.qa.enabled,onToggle:M=>r("qa",{...l.qa,enabled:M}),expanded:N==="qa",onExpandChange:M=>T(M?"qa":null),scheduleSummary:Ul(l.qa.schedule),providerLabel:l.jobProviders.qa?(W=c.find(M=>M.value===l.jobProviders.qa))==null?void 0:W.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ll,{label:"Schedule",value:l.qa.schedule,onChange:M=>r("qa",{...l.qa,schedule:M})}),s.jsx(mt,{label:"Provider",value:l.jobProviders.qa??"",onChange:M=>w("qa",M),options:O}),s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.qa.maxRuntime),onChange:M=>r("qa",{...l.qa,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(mt,{label:"Artifacts",value:l.qa.artifacts,onChange:M=>r("qa",{...l.qa,artifacts:M}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}]}),s.jsx(ze,{label:"Skip Label",value:l.qa.skipLabel,onChange:M=>r("qa",{...l.qa,skipLabel:M.target.value}),helperText:"GitHub label to skip QA"}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 mt-1.5",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Auto-install Playwright"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Install browsers if missing"})]}),s.jsx(Ya,{checked:l.qa.autoInstallPlaywright,onChange:M=>r("qa",{...l.qa,autoInstallPlaywright:M})})]})]}),s.jsx(lu,{label:"QA Branch Patterns",value:l.qa.branchPatterns,onChange:M=>r("qa",{...l.qa,branchPatterns:M}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA"})]})}),s.jsx(Hl,{id:"job-section-audit",title:"Code Audit",icon:ou,description:"Automated code quality and security audits",enabled:l.audit.enabled,onToggle:M=>r("audit",{...l.audit,enabled:M}),expanded:N==="audit",onExpandChange:M=>T(M?"audit":null),scheduleSummary:Ul(l.audit.schedule),providerLabel:l.jobProviders.audit?(V=c.find(M=>M.value===l.jobProviders.audit))==null?void 0:V.label:"Global",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ll,{label:"Schedule",value:l.audit.schedule,onChange:M=>r("audit",{...l.audit,schedule:M})}),s.jsx(mt,{label:"Provider",value:l.jobProviders.audit??"",onChange:M=>w("audit",M),options:O}),s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.audit.maxRuntime),onChange:M=>r("audit",{...l.audit,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(mt,{label:"Target Column",value:l.audit.targetColumn,onChange:M=>r("audit",{...l.audit,targetColumn:M}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]})]})}),s.jsx(Hl,{id:"job-section-slicer",title:"Planner",icon:Gx,description:"Generate one PRD per run using ROADMAP.md or audit findings",enabled:l.roadmapScanner.enabled,onToggle:d,expanded:N==="slicer",onExpandChange:M=>T(M?"slicer":null),scheduleSummary:Ul(l.roadmapScanner.slicerSchedule),providerLabel:l.jobProviders.slicer?(ee=c.find(M=>M.value===l.jobProviders.slicer))==null?void 0:ee.label:"Global",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ll,{label:"Schedule",value:l.roadmapScanner.slicerSchedule,onChange:M=>r("roadmapScanner",{...l.roadmapScanner,slicerSchedule:M})}),s.jsx(mt,{label:"Provider",value:l.jobProviders.slicer??"",onChange:M=>w("slicer",M),options:O}),s.jsx(ze,{label:"Roadmap File Path",value:l.roadmapScanner.roadmapPath,onChange:M=>r("roadmapScanner",{...l.roadmapScanner,roadmapPath:M.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.roadmapScanner.slicerMaxRuntime||""),onChange:M=>r("roadmapScanner",{...l.roadmapScanner,slicerMaxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(mt,{label:"Priority Mode",value:l.roadmapScanner.priorityMode||"roadmap-first",onChange:M=>r("roadmapScanner",{...l.roadmapScanner,priorityMode:M==="audit-first"?"audit-first":"roadmap-first"}),options:[{label:"Roadmap first (recommended)",value:"roadmap-first"},{label:"Audit first",value:"audit-first"}]}),s.jsx(mt,{label:"Issue Column",value:l.roadmapScanner.issueColumn||"Ready",onChange:M=>r("roadmapScanner",{...l.roadmapScanner,issueColumn:M==="Draft"?"Draft":"Ready"}),options:[{label:"Ready (default)",value:"Ready"},{label:"Draft",value:"Draft"}]})]})}),s.jsx(Hl,{id:"job-section-analytics",title:"Analytics (Amplitude)",icon:Hx,description:"Fetch Amplitude data, analyze with AI, and create board issues",enabled:l.analytics.enabled,onToggle:M=>r("analytics",{...l.analytics,enabled:M}),expanded:N==="analytics",onExpandChange:M=>T(M?"analytics":null),scheduleSummary:Ul(l.analytics.schedule),providerLabel:l.jobProviders.analytics?(J=c.find(M=>M.value===l.jobProviders.analytics))==null?void 0:J.label:"Global",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ll,{label:"Schedule",value:l.analytics.schedule,onChange:M=>r("analytics",{...l.analytics,schedule:M})}),s.jsx(mt,{label:"Provider",value:l.jobProviders.analytics??"",onChange:M=>w("analytics",M),options:O}),s.jsx(ze,{label:"Amplitude API Key",value:((ue=l.providerEnv)==null?void 0:ue.AMPLITUDE_API_KEY)??"",onChange:M=>r("providerEnv",{...l.providerEnv,AMPLITUDE_API_KEY:M.target.value}),placeholder:"Required"}),s.jsx(ze,{label:"Amplitude Secret Key",type:"password",value:(($=l.providerEnv)==null?void 0:$.AMPLITUDE_SECRET_KEY)??"",onChange:M=>r("providerEnv",{...l.providerEnv,AMPLITUDE_SECRET_KEY:M.target.value}),placeholder:"Required"}),s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.analytics.maxRuntime),onChange:M=>r("analytics",{...l.analytics,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ze,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(l.analytics.lookbackDays),onChange:M=>r("analytics",{...l.analytics,lookbackDays:Math.max(1,Math.min(90,Number(M.target.value||7)))})}),s.jsx(mt,{label:"Target Column",value:l.analytics.targetColumn,onChange:M=>r("analytics",{...l.analytics,targetColumn:M}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]}),s.jsxs("div",{className:"md:col-span-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1.5",children:"Analysis Prompt (optional)"}),s.jsx("textarea",{rows:4,value:l.analytics.analysisPrompt??"",onChange:M=>r("analytics",{...l.analytics,analysisPrompt:M.target.value}),placeholder:"Custom prompt for AI analysis. Leave empty to use default.",className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-y"})]})]})}),s.jsx(Hl,{id:"job-section-pr-resolver",title:"PR Resolver",icon:Yx,description:"Repo-wide conflict resolver that rebases PRs and applies feedback",enabled:l.prResolver.enabled,onToggle:M=>r("prResolver",{...l.prResolver,enabled:M}),expanded:N==="pr-resolver",onExpandChange:M=>T(M?"pr-resolver":null),scheduleSummary:Ul(l.prResolver.schedule),providerLabel:l.jobProviders["pr-resolver"]?(F=c.find(M=>M.value===l.jobProviders["pr-resolver"]))==null?void 0:F.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ll,{label:"Schedule",value:l.prResolver.schedule,onChange:M=>r("prResolver",{...l.prResolver,schedule:M})}),s.jsx(mt,{label:"Provider",value:l.jobProviders["pr-resolver"]??"",onChange:M=>w("pr-resolver",M),options:O}),s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.prResolver.maxRuntime),onChange:M=>r("prResolver",{...l.prResolver,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ze,{label:"Per-PR Timeout",type:"number",value:String(l.prResolver.perPrTimeout),onChange:M=>r("prResolver",{...l.prResolver,perPrTimeout:Math.max(0,Number(M.target.value||0))}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ze,{label:"Max PRs Per Run",type:"number",min:"0",value:String(l.prResolver.maxPrsPerRun),onChange:M=>r("prResolver",{...l.prResolver,maxPrsPerRun:Math.max(0,Number(M.target.value||0))})}),s.jsx(ze,{label:"Ready Label",value:l.prResolver.readyLabel,onChange:M=>r("prResolver",{...l.prResolver,readyLabel:M.target.value})})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"AI conflict resolution"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"AI help for non-trivial rebases"})]}),s.jsx(Ya,{checked:l.prResolver.aiConflictResolution,onChange:M=>r("prResolver",{...l.prResolver,aiConflictResolution:M})})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"AI review resolution"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Implement open review comments"})]}),s.jsx(Ya,{checked:l.prResolver.aiReviewResolution,onChange:M=>r("prResolver",{...l.prResolver,aiReviewResolution:M})})]})]}),s.jsx(lu,{label:"PR Resolver Branch Patterns",value:l.prResolver.branchPatterns,onChange:M=>r("prResolver",{...l.prResolver,branchPatterns:M}),placeholder:"e.g., feat/, night-watch/",helpText:"Branch patterns to filter PRs (empty = all)"})]})}),s.jsx(Hl,{id:"job-section-merger",title:"Merge Orchestrator",icon:Wf,description:"Repo-wide PR merge coordinator — scans, rebases, and merges",enabled:l.merger.enabled,onToggle:M=>r("merger",{...l.merger,enabled:M}),expanded:N==="merger",onExpandChange:M=>T(M?"merger":null),scheduleSummary:Ul(l.merger.schedule),providerLabel:l.jobProviders.merger?(P=c.find(M=>M.value===l.jobProviders.merger))==null?void 0:P.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ll,{label:"Schedule",value:l.merger.schedule,onChange:M=>r("merger",{...l.merger,schedule:M})}),s.jsx(mt,{label:"Provider",value:l.jobProviders.merger??"",onChange:M=>w("merger",M),options:O}),s.jsx(ze,{label:"Max Runtime",type:"number",value:String(l.merger.maxRuntime),onChange:M=>r("merger",{...l.merger,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(mt,{label:"Merge Method",value:l.merger.mergeMethod,onChange:M=>r("merger",{...l.merger,mergeMethod:M}),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]}),s.jsx(ze,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(l.merger.minReviewScore),onChange:M=>r("merger",{...l.merger,minReviewScore:Math.max(0,Math.min(100,Number(M.target.value||0)))})}),s.jsx(ze,{label:"Max PRs Per Run",type:"number",min:"0",value:String(l.merger.maxPrsPerRun),onChange:M=>r("merger",{...l.merger,maxPrsPerRun:Math.max(0,Number(M.target.value||0))})})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Rebase before merge"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Rebase each PR against its base branch"})]}),s.jsx(Ya,{checked:l.merger.rebaseBeforeMerge,onChange:M=>r("merger",{...l.merger,rebaseBeforeMerge:M})})]}),s.jsx(lu,{label:"Merger Branch Patterns",value:l.merger.branchPatterns,onChange:M=>r("merger",{...l.merger,branchPatterns:M}),placeholder:"e.g., feat/, night-watch/"})]})})]})]})};function ux(l){return l.type==="telegram"?`telegram:${l.botToken}:${l.chatId}`:`${l.type}:${l.url}`}const tj=[{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"}],aj=(l,r)=>l.includes(r)?l.filter(d=>d!==r):[...l,r],cx=({webhook:l,onChange:r,onSave:d,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(mt,{label:"Type",value:l.type,onChange:m=>{const b=m;r(b==="telegram"?{type:b,botToken:"",chatId:"",events:l.events}:{type:b,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(ze,{label:"Bot Token",type:"password",value:l.botToken||"",onChange:m=>r({...l,botToken:m.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(ze,{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(ze,{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:tj.map(m=>s.jsx("button",{type:"button",onClick:()=>r({...l,events:aj(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(Ze,{variant:"ghost",onClick:c,children:"Cancel"}),s.jsx(Ze,{onClick:d,disabled:l.events.length===0||(l.type==="telegram"?!l.botToken||!l.chatId:!l.url),children:f?"Add Webhook":"Save Changes"})]})]}),nj=({notifications:l,onChange:r,globalWebhook:d,onSetGlobal:c,onUnsetGlobal:f})=>{const[m,b]=Me.useState(null),[S,v]=Me.useState(!1),[p,N]=Me.useState({type:"slack",url:"",events:[]}),T=()=>{r({webhooks:[...l.webhooks,p]}),N({type:"slack",url:"",events:[]}),v(!1)},w=(O,C)=>{const R=[...l.webhooks];R[O]=C,r({webhooks:R})},A=O=>{r({webhooks:l.webhooks.filter((C,R)=>R!==O)})};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((O,C)=>s.jsx("div",{children:m===C?s.jsx(cx,{webhook:O,onChange:R=>w(C,R),onSave:()=>b(null),onCancel:()=>b(null)}):s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"text-sm font-medium text-slate-200 capitalize",children:O.type}),O.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",O.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:O.events.map(R=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:R.replace("_"," ")},R))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[c!==void 0&&(()=>{const R=d!=null&&ux(O)===ux(d);return s.jsx("button",{type:"button",onClick:()=>R?f==null?void 0:f():c(O),className:`p-2 transition-colors ${R?"text-indigo-400 hover:text-indigo-300":"text-slate-500 hover:text-slate-300"}`,"aria-label":R?"Global channel (active)":"Set as global channel",title:R?"Global channel (active)":"Set as global channel",children:s.jsx(k1,{className:"h-4 w-4"})})})(),s.jsx("button",{type:"button",onClick:()=>b(C),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${O.type} webhook`,title:`Edit ${O.type} webhook`,children:s.jsx(ao,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>A(C),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${O.type} webhook`,title:`Delete ${O.type} webhook`,children:s.jsx(Vr,{className:"h-4 w-4"})})]})]})},C))}),S?s.jsx(cx,{webhook:p,onChange:N,onSave:T,onCancel:()=>v(!1),isNew:!0}):s.jsxs(Ze,{variant:"ghost",onClick:()=>v(!0),children:[s.jsx(Vs,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},lj=({form:l,updateField:r,globalWebhook:d,onSetGlobal:c,onUnsetGlobal:f})=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs(gt,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Board Provider"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Track PRDs and their status using GitHub Projects or local SQLite"})]}),s.jsx(Ya,{checked:l.boardProvider.enabled,onChange:m=>r("boardProvider",{...l.boardProvider,enabled:m})})]}),l.boardProvider.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-6 border-t border-slate-800",children:[s.jsx(mt,{label:"Board Provider",value:l.boardProvider.provider,onChange:m=>r("boardProvider",{...l.boardProvider,provider:m}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),l.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(ze,{label:"Project Number",type:"number",value:String(l.boardProvider.projectNumber||""),onChange:m=>r("boardProvider",{...l.boardProvider,projectNumber:m.target.value?Number(m.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(ze,{label:"Repository",value:l.boardProvider.repo||"",onChange:m=>r("boardProvider",{...l.boardProvider,repo:m.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(gt,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx("p",{className:"text-sm text-slate-400 mb-6",children:"Send status updates and job results to custom endpoints or team channels"}),s.jsx(nj,{notifications:l.notifications,onChange:m=>r("notifications",m),globalWebhook:d,onSetGlobal:c,onUnsetGlobal:f})]})]});function sj(l,r,d,c){const{addToast:f}=$t(),[m,b]=H.useState(!1),[S,v]=H.useState(null),[p,N]=H.useState(null),[T,w]=H.useState(null),A=H.useCallback(()=>({...JN,...l}),[l]),O=H.useCallback($=>{const F=A();return Object.entries(F).map(([P,M])=>({label:M.name,value:P}))},[A]),C=H.useCallback($=>{const F=[];r===$&&F.push("Global Provider");const P={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics"};for(const[M,_]of Object.entries(d))_===$&&F.push(P[M]??M);return F},[r,d]),R=H.useCallback(()=>{v(null),N(null),b(!0)},[]),W=H.useCallback($=>{const P=A()[$];P&&(v($),N(P),b(!0))},[A]),V=H.useCallback(async($,F)=>{const P=!S,M={...l,[$]:F};c("providerPresets",M);try{await Kf({providerPresets:{[$]:F}}),f({title:P?"Preset Added":"Preset Updated",message:P?`${F.name} has been added. You can now assign it to jobs.`:`${F.name} has been saved.`,type:"success"})}catch(_){f({title:"Save Failed",message:_ instanceof Error?_.message:"Failed to save preset",type:"error"}),c("providerPresets",l)}},[S,l,c,f]),ee=H.useCallback($=>{var M,_;if(Ic.includes($)){f({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const F=C($);if(F.length>0){w({presetId:$,presetName:((M=A()[$])==null?void 0:M.name)??$,references:F});return}const P={...l};delete P[$],c("providerPresets",P),f({title:"Preset Deleted",message:`${((_=A()[$])==null?void 0:_.name)??$} has been removed.`,type:"success"})},[l,c,f,C,A]),J=H.useCallback($=>{const F={...l};delete F[$],c("providerPresets",F),f({title:"Preset Reset",message:`${$} has been reset to built-in defaults.`,type:"success"})},[l,c,f]),ue=H.useCallback(()=>{if(!T)return;const{presetId:$}=T,F={...l};delete F[$],c("providerPresets",F);const P={...d};for(const M of Object.keys(P))P[M]===$&&delete P[M];c("jobProviders",P),r===$&&c("provider","claude"),w(null),f({title:"Preset Deleted",message:`${T.presetName} has been removed and all references cleared.`,type:"success"})},[T,l,d,r,c,f]);return{presetModalOpen:m,setPresetModalOpen:b,editingPresetId:S,editingPreset:p,deleteWarning:T,setDeleteWarning:w,getAllPresets:A,getPresetOptions:O,getPresetReferences:C,handleAddPreset:R,handleEditPreset:W,handleSavePreset:V,handleDeletePreset:ee,handleResetPreset:J,handleConfirmDelete:ue}}const rj="5 * * * *",ij="25 */3 * * *",uj={enabled:!0,roadmapPath:"ROADMAP.md",autoScanInterval:300,slicerSchedule:"35 */6 * * *",slicerMaxRuntime:600,priorityMode:"roadmap-first",issueColumn:"Ready"},ox={enabled:!0,schedule:"45 2,10,18 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},cj={enabled:!0,schedule:"50 3 * * 1",maxRuntime:1800,targetColumn:"Draft"},oj={enabled:!1,schedule:"0 6 * * 1",maxRuntime:900,lookbackDays:7,targetColumn:"Draft",analysisPrompt:""},dx={enabled:!0,schedule:"15 6,14,22 * * *",maxRuntime:3600,branchPatterns:[],maxPrsPerRun:0,perPrTimeout:600,aiConflictResolution:!0,aiReviewResolution:!1,readyLabel:"ready-to-merge"},fx={enabled:!1,schedule:"55 */4 * * *",maxRuntime:1800,mergeMethod:"squash",minReviewScore:80,branchPatterns:[],rebaseBeforeMerge:!0,maxPrsPerRun:0};function Xc(){return{...uj}}function dj(){return{...ox,branchPatterns:[...ox.branchPatterns]}}function fj(){return{...cj}}function ky(){return{...oj}}function Jc(){return{...dx,branchPatterns:[...dx.branchPatterns]}}function nh(){return{...fx,branchPatterns:[...fx.branchPatterns]}}const hj=["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger"],hx=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||rj,reviewerSchedule:l.reviewerSchedule||ij,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||Xc(),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||dj(),audit:l.audit||fj(),analytics:l.analytics||ky(),prResolver:l.prResolver??Jc(),merger:l.merger??nh(),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 d,c;const r=VN(l.scheduleBundleId,l.cronSchedule,l.reviewerSchedule,l.qa.schedule,l.audit.schedule,l.roadmapScanner.slicerSchedule??Xc().slicerSchedule,((d=l.prResolver)==null?void 0:d.schedule)??Jc().schedule,((c=l.merger)==null?void 0:c.schedule)??nh().schedule);return r?{mode:"template",selectedTemplateId:r.id}:{mode:"custom",selectedTemplateId:""}},mj=()=>{const{addToast:l,projectName:r,selectedProjectId:d,globalModeLoading:c,isGlobalMode:f,removeProjectFromList:m}=$t(),[b,S]=Me.useState(!1),[v,p]=Me.useState(!1),[N,T]=Me.useState(!1),[w,A]=Me.useState(null),[O,C]=Me.useState([]),[R,W]=Me.useState(void 0),V=Me.useRef(null),[ee,J]=Me.useState(!1),ue=Me.useRef(!1),$=Me.useRef(!1),[F,P]=Me.useState("template"),[M,_]=Me.useState("always-on"),[ae,Z]=Me.useState("project"),[ce,xe]=Me.useState(null),{data:K,loading:Y,error:re,refetch:ge}=rn(Jf,[d],{enabled:!c}),{data:Se,loading:ke,refetch:z}=rn(b2,[d],{enabled:!c}),le=Se??[],he=(ye,De)=>{A(Ot=>Ot&&{...Ot,[ye]:De})},me=sj((w==null?void 0:w.providerPresets)??{},(w==null?void 0:w.provider)??"claude",(w==null?void 0:w.jobProviders)??{},he);Me.useEffect(()=>{Jx().then(C).catch(console.error),R2().then(ye=>W(ye.webhook)).catch(()=>{})},[d]),Me.useEffect(()=>{const ye=new URLSearchParams(window.location.search),De=ye.get("tab"),Ot=ye.get("mode");De&&Z({providers:"ai-runtime",runtime:"ai-runtime",roadmap:"jobs",qa:"jobs",audit:"jobs",notifications:"integrations",schedules:"jobs",general:"project","ai-runtime":"ai-providers",advanced:"project"}[De]??De),Ot==="custom"?P("custom"):Ot==="template"&&P("template");const qt=ye.get("jobType");qt&&setTimeout(()=>{un("current",qt,De==="schedules"?"schedule":De==="jobs"?"job":void 0)},300)},[location.search,K]);const Ee=Me.useCallback(ye=>{const De=mx(ye);P(De.mode),_(De.selectedTemplateId)},[]);Me.useEffect(()=>{if(K){if(ue.current){ue.current=!1;return}const ye=hx(K);A(ye),V.current=ye,J(!1),Ee(ye)}},[K,Ee]),Me.useEffect(()=>{if(!w||!V.current)return;const ye=JSON.stringify(w),De=JSON.stringify(V.current);J(ye!==De)},[w]),Me.useEffect(()=>{w&&$.current&&($.current=!1,Sn())},[w==null?void 0:w.jobProviders]),Me.useEffect(()=>{if(ce){const ye=setTimeout(()=>xe(null),2e3);return()=>clearTimeout(ye)}},[ce]);const de=()=>{if(P("template"),!w)return;const ye=mx(w);ye.mode==="template"&&(_(ye.selectedTemplateId),he("scheduleBundleId",ye.selectedTemplateId))},_e=()=>{P("custom"),he("scheduleBundleId",null),_("")},ct=ye=>{setTimeout(()=>{const De=document.getElementById(ye);De&&(De.scrollIntoView({behavior:"smooth",block:"center"}),xe(ye))},50)},Xe=ye=>{const De=ye==="planner"?"slicer":ye;Z("jobs"),ct(`job-section-${De}`)},la=ye=>{const De=ye==="planner"?"slicer":ye;F!=="custom"&&_e(),Z("schedules"),ct(`job-schedule-${De}`)},un=(ye,De,Ot)=>{const qt=De==="planner"?"slicer":De,St=new Set(["qa","audit","slicer","analytics","pr-resolver","merger"]);if(Ot==="job"){Xe(qt);return}if(Ot==="schedule"){la(qt);return}if(St.has(qt)){Xe(qt);return}la(qt)},Pl=ye=>{_(ye.id),A(De=>De&&{...De,cronSchedule:ye.schedules.executor,reviewerSchedule:ye.schedules.reviewer,scheduleBundleId:ye.id,qa:{...De.qa,schedule:ye.schedules.qa},audit:{...De.audit,schedule:ye.schedules.audit},roadmapScanner:{...De.roadmapScanner,slicerSchedule:ye.schedules.slicer},prResolver:{...De.prResolver,schedule:ye.schedules.prResolver},merger:{...De.merger,schedule:ye.schedules.merger},fallbackOnRateLimit:!0})},Sn=async()=>{var Ot,qt,St,jn,Wl,Ql,wn,Ys,Jn;if(!w)return;const ye=w.cronSchedule!==(K==null?void 0:K.cronSchedule)||w.reviewerSchedule!==(K==null?void 0:K.reviewerSchedule)||w.cronScheduleOffset!==((K==null?void 0:K.cronScheduleOffset)??0)||w.schedulingPriority!==((K==null?void 0:K.schedulingPriority)??3)||w.executorEnabled!==((K==null?void 0:K.executorEnabled)??!0)||w.reviewerEnabled!==((K==null?void 0:K.reviewerEnabled)??!0)||w.queue.enabled!==(((Ot=K==null?void 0:K.queue)==null?void 0:Ot.enabled)??!0)||w.qa.enabled!==((K==null?void 0:K.qa.enabled)??!0)||w.qa.schedule!==(K==null?void 0:K.qa.schedule)||w.audit.enabled!==((K==null?void 0:K.audit.enabled)??!0)||w.audit.schedule!==(K==null?void 0:K.audit.schedule)||w.analytics.enabled!==(((qt=K==null?void 0:K.analytics)==null?void 0:qt.enabled)??!1)||w.analytics.schedule!==(((St=K==null?void 0:K.analytics)==null?void 0:St.schedule)??ky().schedule)||w.prResolver.enabled!==(((jn=K==null?void 0:K.prResolver)==null?void 0:jn.enabled)??Jc().enabled)||w.prResolver.schedule!==(((Wl=K==null?void 0:K.prResolver)==null?void 0:Wl.schedule)??Jc().schedule)||w.merger.enabled!==(((Ql=K==null?void 0:K.merger)==null?void 0:Ql.enabled)??!1)||w.merger.schedule!==(((wn=K==null?void 0:K.merger)==null?void 0:wn.schedule)??nh().schedule)||w.roadmapScanner.enabled!==(((Ys=K==null?void 0:K.roadmapScanner)==null?void 0:Ys.enabled)??!0)||(w.roadmapScanner.slicerSchedule||Xc().slicerSchedule)!==(((Jn=K==null?void 0:K.roadmapScanner)==null?void 0:Jn.slicerSchedule)||Xc().slicerSchedule),De={};for(const He of hj){const va=w.jobProviders[He];typeof va=="string"&&va.trim().length>0?De[He]=va:K!=null&&K.jobProviders[He]&&(De[He]=null)}S(!0);try{const He=await Kf({provider:w.provider,providerLabel:w.providerLabel.trim(),providerPresets:Object.keys(w.providerPresets).length>0?w.providerPresets:void 0,defaultBranch:w.defaultBranch,prdDir:w.prdDir,branchPrefix:w.branchPrefix,branchPatterns:w.branchPatterns,executorEnabled:w.executorEnabled,reviewerEnabled:w.reviewerEnabled,minReviewScore:w.minReviewScore,maxRuntime:w.maxRuntime,reviewerMaxRuntime:w.reviewerMaxRuntime,maxLogSize:w.maxLogSize,cronSchedule:w.cronSchedule,reviewerSchedule:w.reviewerSchedule,scheduleBundleId:F==="template"?w.scheduleBundleId:null,cronScheduleOffset:w.cronScheduleOffset,schedulingPriority:w.schedulingPriority,maxRetries:w.maxRetries,reviewerMaxRetries:w.reviewerMaxRetries,reviewerRetryDelay:w.reviewerRetryDelay,reviewerMaxPrsPerRun:w.reviewerMaxPrsPerRun,providerEnv:w.providerEnv,notifications:w.notifications,prdPriority:w.prdPriority,roadmapScanner:w.roadmapScanner,templatesDir:w.templatesDir,boardProvider:w.boardProvider,jobProviders:De,fallbackOnRateLimit:w.fallbackOnRateLimit,primaryFallbackModel:w.primaryFallbackModel,secondaryFallbackModel:w.secondaryFallbackModel,primaryFallbackPreset:w.primaryFallbackPreset||void 0,secondaryFallbackPreset:w.secondaryFallbackPreset||void 0,claudeModel:w.primaryFallbackModel,providerScheduleOverrides:w.providerScheduleOverrides,qa:w.qa,audit:w.audit,analytics:w.analytics,prResolver:w.prResolver,merger:w.merger,queue:w.queue}),va=hx(He);A(va),V.current=va,J(!1),Ee(va);let ot="";if(ye)try{await Rf()}catch(zt){ot=zt instanceof Error?zt.message:"failed to reinstall cron schedules"}l(ot?{title:"Settings Saved (Cron Reinstall Failed)",message:ot,type:"warning"}:{title:"Settings Saved",message:ye?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),ue.current=!0,ge(),z()}catch(He){l({title:"Save Failed",message:He instanceof Error?He.message:"Failed to save configuration",type:"error"})}finally{S(!1)}},Ga=()=>{if(V.current){const ye=V.current;A(ye),J(!1),Ee(ye),l({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},Fa=async ye=>{if(!(R!=null&&!window.confirm("Replace existing global channel?")))try{const De=await Cg({webhook:ye});W(De.webhook)}catch(De){l({title:"Failed to set global channel",message:De instanceof Error?De.message:"Unknown error",type:"error"})}},Gl=async()=>{try{await Cg({webhook:null}),W(null)}catch(ye){l({title:"Failed to unset global channel",message:ye instanceof Error?ye.message:"Unknown error",type:"error"})}},Fl=async ye=>{try{const De=await ny(ye);he("roadmapScanner",De.roadmapScanner);let Ot="";try{await Rf()}catch(qt){Ot=qt instanceof Error?qt.message:"Failed to reinstall cron schedules"}l(Ot?{title:"Planner Saved (Cron Reinstall Failed)",message:Ot,type:"warning"}:{title:ye?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${ye?"enabled":"disabled"}.`,type:"success"})}catch(De){l({title:"Toggle Failed",message:De instanceof Error?De.message:"Failed to toggle roadmap scanner",type:"error"})}},Zl=async()=>{if(d){T(!0);try{await p2(d),m(d),p(!1),l({title:"Project Removed",message:"Cron jobs uninstalled and all project data removed from the database.",type:"success"})}catch(ye){l({title:"Remove Failed",message:ye instanceof Error?ye.message:"Failed to remove project",type:"error"})}finally{T(!1)}}};if(Y||!w)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(re)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(vn,{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:re.message}),s.jsx(Ze,{onClick:()=>ge(),children:"Retry"})]});const Nn=[{id:"project",label:"Project",content:s.jsx(IN,{form:w,updateField:he,projectName:r,doctorChecks:le,doctorLoading:ke})},{id:"ai-providers",label:"AI Providers",content:s.jsx(KN,{form:w,updateField:he,getAllPresets:me.getAllPresets,getPresetOptions:me.getPresetOptions,handleEditPreset:me.handleEditPreset,handleDeletePreset:me.handleDeletePreset,handleResetPreset:me.handleResetPreset,handleAddPreset:me.handleAddPreset})},{id:"jobs",label:"Jobs",content:s.jsx(ej,{form:w,updateField:he,handleRoadmapToggle:Fl,presetOptions:me.getPresetOptions(w.providerPresets),scheduleMode:F,onSwitchToTemplate:de,onSwitchToCustom:_e,onApplyTemplate:Pl,allProjectConfigs:O,currentProjectId:d})},{id:"integrations",label:"Integrations",content:s.jsx(lj,{form:w,updateField:he,globalWebhook:R,onSetGlobal:Fa,onUnsetGlobal:Gl})}];return s.jsxs("div",{className:"max-w-4xl mx-auto pb-32",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold text-slate-100",children:"Settings"}),s.jsx("p",{className:"text-sm text-slate-500 mt-1",children:"Configure project automation, providers, and integrations"})]}),ee&&s.jsxs($a,{variant:"warning",className:"animate-pulse",children:[s.jsx(Ur,{className:"h-3 w-3 mr-1"}),"Unsaved Changes"]})]}),s.jsx(QN,{tabs:Nn,activeTab:ae,onChange:Z}),ee&&s.jsx("div",{className:"fixed bottom-8 left-1/2 -translate-x-1/2 z-50 w-full max-w-2xl px-4 animate-in fade-in slide-in-from-bottom-4 duration-300",children:s.jsxs("div",{className:"bg-slate-900/90 backdrop-blur-md border border-indigo-500/30 rounded-2xl p-4 shadow-2xl flex items-center justify-between shadow-indigo-500/10",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-indigo-500/20 text-indigo-400",children:s.jsx(vn,{className:"h-5 w-5"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-semibold text-slate-200",children:"You have unsaved changes"}),s.jsx("div",{className:"text-[11px] text-slate-400",children:"Save your configuration to apply changes"})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs(Ze,{variant:"ghost",size:"sm",className:"text-slate-400 hover:text-slate-300",onClick:Ga,children:[s.jsx(Zx,{className:"h-4 w-4 mr-2"}),"Discard"]}),s.jsxs(Ze,{size:"sm",className:"bg-indigo-600 hover:bg-indigo-500 shadow-lg shadow-indigo-500/20",onClick:Sn,loading:b,children:[s.jsx(e2,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]})]})}),f&&d&&s.jsxs("div",{className:"mt-10 rounded-lg border border-red-900/50 bg-red-950/20 p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-red-400 mb-2",children:"Danger Zone"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Remove this project from Night Watch. This will uninstall cron jobs and delete all project data from the database. Files on disk will not be touched."}),s.jsxs(Ze,{variant:"secondary",className:"bg-red-600 hover:bg-red-700 text-white",onClick:()=>p(!0),children:[s.jsx(Vr,{className:"h-4 w-4 mr-2"}),"Remove Project"]})]}),v&&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:()=>!N&&p(!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(Ur,{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(Ze,{variant:"ghost",onClick:()=>p(!1),disabled:N,children:"Cancel"}),s.jsx(Ze,{variant:"secondary",className:"bg-red-600 hover:bg-red-700",onClick:Zl,loading:N,children:"Remove"})]})]})]}),s.jsx(WN,{isOpen:me.presetModalOpen,onClose:()=>{me.setPresetModalOpen(!1)},onSave:me.handleSavePreset,presetId:me.editingPresetId,preset:me.editingPreset,isBuiltIn:me.editingPresetId?Ic.includes(me.editingPresetId):!1,existingIds:Object.keys(me.getAllPresets())}),me.deleteWarning&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm",onClick:()=>me.setDeleteWarning(null),"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-md transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(Ur,{className:"h-6 w-6 text-amber-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:"Cannot Delete Preset"})]}),s.jsxs("p",{className:"text-sm text-slate-300 mb-4",children:[s.jsx("strong",{children:me.deleteWarning.presetName})," is currently assigned to the following jobs:"]}),s.jsx("ul",{className:"list-disc list-inside text-sm text-slate-400 mb-4",children:me.deleteWarning.references.map(ye=>s.jsx("li",{children:ye},ye))}),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(Ze,{variant:"ghost",onClick:()=>me.setDeleteWarning(null),children:"Cancel"}),s.jsx(Ze,{variant:"secondary",onClick:me.handleConfirmDelete,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},gj=()=>(Y2(),$2(),s.jsx(Ab,{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(H2,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(q2,{}),s.jsx("main",{className:"flex-1 overflow-auto p-6 scroll-smooth relative",children:s.jsx("div",{className:"max-w-7xl mx-auto w-full",children:s.jsxs(ub,{children:[s.jsx(Qn,{path:"/",element:s.jsx(J2,{})}),s.jsx(Qn,{path:"/prs",element:s.jsx(eS,{})}),s.jsx(Qn,{path:"/board",element:s.jsx(W2,{})}),s.jsx(Qn,{path:"/scheduling",element:s.jsx(YN,{})}),s.jsx(Qn,{path:"/logs",element:s.jsx(K2,{})}),s.jsx(Qn,{path:"/roadmap",element:s.jsx(tS,{})}),s.jsx(Qn,{path:"/settings",element:s.jsx(mj,{})}),s.jsx(Qn,{path:"*",element:s.jsx(rb,{to:"/",replace:!0})})]})})})]}),s.jsx(B2,{})]})})),zy=document.getElementById("root");if(!zy)throw new Error("Could not find root element to mount to");const xj=ov.createRoot(zy);xj.render(s.jsx(Me.StrictMode,{children:s.jsx(gj,{})}));
|