@jonit-dev/night-watch-cli 1.8.10-beta.3 → 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.
Files changed (164) hide show
  1. package/dist/cli.d.ts +3 -0
  2. package/dist/cli.d.ts.map +1 -0
  3. package/dist/cli.js +957 -1906
  4. package/dist/cli.js.map +1 -0
  5. package/dist/commands/analytics.d.ts +14 -0
  6. package/dist/commands/analytics.d.ts.map +1 -0
  7. package/dist/commands/analytics.js +69 -0
  8. package/dist/commands/analytics.js.map +1 -0
  9. package/dist/commands/audit.d.ts +19 -0
  10. package/dist/commands/audit.d.ts.map +1 -0
  11. package/dist/commands/audit.js +144 -0
  12. package/dist/commands/audit.js.map +1 -0
  13. package/dist/commands/board.d.ts +9 -0
  14. package/dist/commands/board.d.ts.map +1 -0
  15. package/dist/commands/board.js +702 -0
  16. package/dist/commands/board.js.map +1 -0
  17. package/dist/commands/cancel.d.ts +46 -0
  18. package/dist/commands/cancel.d.ts.map +1 -0
  19. package/dist/commands/cancel.js +239 -0
  20. package/dist/commands/cancel.js.map +1 -0
  21. package/dist/commands/cron.d.ts +8 -0
  22. package/dist/commands/cron.d.ts.map +1 -0
  23. package/dist/commands/cron.js +134 -0
  24. package/dist/commands/cron.js.map +1 -0
  25. package/dist/commands/dashboard/tab-actions.d.ts +10 -0
  26. package/dist/commands/dashboard/tab-actions.d.ts.map +1 -0
  27. package/dist/commands/dashboard/tab-actions.js +247 -0
  28. package/dist/commands/dashboard/tab-actions.js.map +1 -0
  29. package/dist/commands/dashboard/tab-config.d.ts +21 -0
  30. package/dist/commands/dashboard/tab-config.d.ts.map +1 -0
  31. package/dist/commands/dashboard/tab-config.js +873 -0
  32. package/dist/commands/dashboard/tab-config.js.map +1 -0
  33. package/dist/commands/dashboard/tab-logs.d.ts +10 -0
  34. package/dist/commands/dashboard/tab-logs.d.ts.map +1 -0
  35. package/dist/commands/dashboard/tab-logs.js +202 -0
  36. package/dist/commands/dashboard/tab-logs.js.map +1 -0
  37. package/dist/commands/dashboard/tab-schedules.d.ts +21 -0
  38. package/dist/commands/dashboard/tab-schedules.d.ts.map +1 -0
  39. package/dist/commands/dashboard/tab-schedules.js +320 -0
  40. package/dist/commands/dashboard/tab-schedules.js.map +1 -0
  41. package/dist/commands/dashboard/tab-status.d.ts +32 -0
  42. package/dist/commands/dashboard/tab-status.d.ts.map +1 -0
  43. package/dist/commands/dashboard/tab-status.js +424 -0
  44. package/dist/commands/dashboard/tab-status.js.map +1 -0
  45. package/dist/commands/dashboard/types.d.ts +42 -0
  46. package/dist/commands/dashboard/types.d.ts.map +1 -0
  47. package/dist/commands/dashboard/types.js +5 -0
  48. package/dist/commands/dashboard/types.js.map +1 -0
  49. package/dist/commands/dashboard.d.ts +11 -0
  50. package/dist/commands/dashboard.d.ts.map +1 -0
  51. package/dist/commands/dashboard.js +242 -0
  52. package/dist/commands/dashboard.js.map +1 -0
  53. package/dist/commands/doctor.d.ts +16 -0
  54. package/dist/commands/doctor.d.ts.map +1 -0
  55. package/dist/commands/doctor.js +195 -0
  56. package/dist/commands/doctor.js.map +1 -0
  57. package/dist/commands/history.d.ts +7 -0
  58. package/dist/commands/history.d.ts.map +1 -0
  59. package/dist/commands/history.js +49 -0
  60. package/dist/commands/history.js.map +1 -0
  61. package/dist/commands/init.d.ts +45 -0
  62. package/dist/commands/init.d.ts.map +1 -0
  63. package/dist/commands/init.js +777 -0
  64. package/dist/commands/init.js.map +1 -0
  65. package/dist/commands/install.d.ts +65 -0
  66. package/dist/commands/install.d.ts.map +1 -0
  67. package/dist/commands/install.js +405 -0
  68. package/dist/commands/install.js.map +1 -0
  69. package/dist/commands/logs.d.ts +15 -0
  70. package/dist/commands/logs.d.ts.map +1 -0
  71. package/dist/commands/logs.js +155 -0
  72. package/dist/commands/logs.js.map +1 -0
  73. package/dist/commands/merge.d.ts +26 -0
  74. package/dist/commands/merge.d.ts.map +1 -0
  75. package/dist/commands/merge.js +159 -0
  76. package/dist/commands/merge.js.map +1 -0
  77. package/dist/commands/notify.d.ts +7 -0
  78. package/dist/commands/notify.d.ts.map +1 -0
  79. package/dist/commands/notify.js +43 -0
  80. package/dist/commands/notify.js.map +1 -0
  81. package/dist/commands/plan.d.ts +19 -0
  82. package/dist/commands/plan.d.ts.map +1 -0
  83. package/dist/commands/plan.js +88 -0
  84. package/dist/commands/plan.js.map +1 -0
  85. package/dist/commands/prd-state.d.ts +12 -0
  86. package/dist/commands/prd-state.d.ts.map +1 -0
  87. package/dist/commands/prd-state.js +47 -0
  88. package/dist/commands/prd-state.js.map +1 -0
  89. package/dist/commands/prd.d.ts +18 -0
  90. package/dist/commands/prd.d.ts.map +1 -0
  91. package/dist/commands/prd.js +363 -0
  92. package/dist/commands/prd.js.map +1 -0
  93. package/dist/commands/prds.d.ts +13 -0
  94. package/dist/commands/prds.d.ts.map +1 -0
  95. package/dist/commands/prds.js +194 -0
  96. package/dist/commands/prds.js.map +1 -0
  97. package/dist/commands/prs.d.ts +14 -0
  98. package/dist/commands/prs.d.ts.map +1 -0
  99. package/dist/commands/prs.js +104 -0
  100. package/dist/commands/prs.js.map +1 -0
  101. package/dist/commands/qa.d.ts +34 -0
  102. package/dist/commands/qa.d.ts.map +1 -0
  103. package/dist/commands/qa.js +214 -0
  104. package/dist/commands/qa.js.map +1 -0
  105. package/dist/commands/queue.d.ts +8 -0
  106. package/dist/commands/queue.d.ts.map +1 -0
  107. package/dist/commands/queue.js +378 -0
  108. package/dist/commands/queue.js.map +1 -0
  109. package/dist/commands/resolve.d.ts +26 -0
  110. package/dist/commands/resolve.d.ts.map +1 -0
  111. package/dist/commands/resolve.js +186 -0
  112. package/dist/commands/resolve.js.map +1 -0
  113. package/dist/commands/retry.d.ts +9 -0
  114. package/dist/commands/retry.d.ts.map +1 -0
  115. package/dist/commands/retry.js +71 -0
  116. package/dist/commands/retry.js.map +1 -0
  117. package/dist/commands/review.d.ts +82 -0
  118. package/dist/commands/review.d.ts.map +1 -0
  119. package/dist/commands/review.js +479 -0
  120. package/dist/commands/review.js.map +1 -0
  121. package/dist/commands/run.d.ts +73 -0
  122. package/dist/commands/run.d.ts.map +1 -0
  123. package/dist/commands/run.js +509 -0
  124. package/dist/commands/run.js.map +1 -0
  125. package/dist/commands/serve.d.ts +19 -0
  126. package/dist/commands/serve.d.ts.map +1 -0
  127. package/dist/commands/serve.js +142 -0
  128. package/dist/commands/serve.js.map +1 -0
  129. package/dist/commands/shared/env-builder.d.ts +49 -0
  130. package/dist/commands/shared/env-builder.d.ts.map +1 -0
  131. package/dist/commands/shared/env-builder.js +150 -0
  132. package/dist/commands/shared/env-builder.js.map +1 -0
  133. package/dist/commands/slice.d.ts +35 -0
  134. package/dist/commands/slice.d.ts.map +1 -0
  135. package/dist/commands/slice.js +316 -0
  136. package/dist/commands/slice.js.map +1 -0
  137. package/dist/commands/state.d.ts +8 -0
  138. package/dist/commands/state.d.ts.map +1 -0
  139. package/dist/commands/state.js +54 -0
  140. package/dist/commands/state.js.map +1 -0
  141. package/dist/commands/status.d.ts +14 -0
  142. package/dist/commands/status.d.ts.map +1 -0
  143. package/dist/commands/status.js +297 -0
  144. package/dist/commands/status.js.map +1 -0
  145. package/dist/commands/summary.d.ts +14 -0
  146. package/dist/commands/summary.d.ts.map +1 -0
  147. package/dist/commands/summary.js +193 -0
  148. package/dist/commands/summary.js.map +1 -0
  149. package/dist/commands/uninstall.d.ts +25 -0
  150. package/dist/commands/uninstall.d.ts.map +1 -0
  151. package/dist/commands/uninstall.js +134 -0
  152. package/dist/commands/uninstall.js.map +1 -0
  153. package/dist/commands/update.d.ts +22 -0
  154. package/dist/commands/update.d.ts.map +1 -0
  155. package/dist/commands/update.js +90 -0
  156. package/dist/commands/update.js.map +1 -0
  157. package/dist/scripts/night-watch-helpers.sh +52 -7
  158. package/dist/web/assets/index-CgXj_KM1.css +1 -0
  159. package/dist/web/assets/index-Dr4zlyJf.js +406 -0
  160. package/dist/web/index.html +2 -2
  161. package/package.json +1 -1
  162. package/dist/web/assets/index-BUgI2S1s.js +0 -406
  163. package/dist/web/assets/index-CkdLFBd7.js +0 -406
  164. package/dist/web/assets/index-RMfswANB.css +0 -1
@@ -1,406 +0,0 @@
1
- var Wp=Object.defineProperty;var X0=l=>{throw TypeError(l)};var Ip=(l,r,d)=>r in l?Wp(l,r,{enumerable:!0,configurable:!0,writable:!0,value:d}):l[r]=d;var J0=(l,r,d)=>Ip(l,typeof r!="symbol"?r+"":r,d),of=(l,r,d)=>r.has(l)||X0("Cannot "+d);var te=(l,r,d)=>(of(l,r,"read from private field"),d?d.call(l):r.get(l)),Je=(l,r,d)=>r.has(l)?X0("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),Se=(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 Qp(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 K0;function Xp(){if(K0)return $i;K0=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 eg;function Jp(){return eg||(eg=1,df.exports=Xp()),df.exports}var s=Jp(),ff={exports:{}},Ue={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var tg;function Kp(){if(tg)return Ue;tg=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(U){return U===null||typeof U!="object"?null:(U=w&&U[w]||U["@@iterator"],typeof U=="function"?U:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,D={};function W(U,ne,ge){this.props=U,this.context=ne,this.refs=D,this.updater=ge||O}W.prototype.isReactComponent={},W.prototype.setState=function(U,ne){if(typeof U!="object"&&typeof U!="function"&&U!=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,U,ne,"setState")},W.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function Y(){}Y.prototype=W.prototype;function K(U,ne,ge){this.props=U,this.context=ne,this.refs=D,this.updater=ge||O}var J=K.prototype=new Y;J.constructor=K,M(J,W.prototype),J.isPureReactComponent=!0;var ie=Array.isArray;function P(){}var G={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function C(U,ne,ge){var xe=ge.ref;return{$$typeof:l,type:U,key:ne,ref:xe!==void 0?xe:null,props:ge}}function k(U,ne){return C(U.type,ne,U.props)}function ee(U){return typeof U=="object"&&U!==null&&U.$$typeof===l}function _(U){var ne={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(ge){return ne[ge]})}var ce=/\/+/g;function me(U,ne){return typeof U=="object"&&U!==null&&U.key!=null?_(""+U.key):ne.toString(36)}function fe(U){switch(U.status){case"fulfilled":return U.value;case"rejected":throw U.reason;default:switch(typeof U.status=="string"?U.then(P,P):(U.status="pending",U.then(function(ne){U.status==="pending"&&(U.status="fulfilled",U.value=ne)},function(ne){U.status==="pending"&&(U.status="rejected",U.reason=ne)})),U.status){case"fulfilled":return U.value;case"rejected":throw U.reason}}throw U}function $(U,ne,ge,xe,Oe){var Te=typeof U;(Te==="undefined"||Te==="boolean")&&(U=null);var qe=!1;if(U===null)qe=!0;else switch(Te){case"bigint":case"string":case"number":qe=!0;break;case"object":switch(U.$$typeof){case l:case r:qe=!0;break;case N:return qe=U._init,$(qe(U._payload),ne,ge,xe,Oe)}}if(qe)return Oe=Oe(U),qe=xe===""?"."+me(U,0):xe,ie(Oe)?(ge="",qe!=null&&(ge=qe.replace(ce,"$&/")+"/"),$(Oe,ne,ge,"",function(sa){return sa})):Oe!=null&&(ee(Oe)&&(Oe=k(Oe,ge+(Oe.key==null||U&&U.key===Oe.key?"":(""+Oe.key).replace(ce,"$&/")+"/")+qe)),ne.push(Oe)),1;qe=0;var pt=xe===""?".":xe+":";if(ie(U))for(var Ke=0;Ke<U.length;Ke++)xe=U[Ke],Te=pt+me(xe,Ke),qe+=$(xe,ne,ge,Te,Oe);else if(Ke=A(U),typeof Ke=="function")for(U=Ke.call(U),Ke=0;!(xe=U.next()).done;)xe=xe.value,Te=pt+me(xe,Ke++),qe+=$(xe,ne,ge,Te,Oe);else if(Te==="object"){if(typeof U.then=="function")return $(fe(U),ne,ge,xe,Oe);throw ne=String(U),Error("Objects are not valid as a React child (found: "+(ne==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":ne)+"). If you meant to render a collection of children, use an array instead.")}return qe}function se(U,ne,ge){if(U==null)return U;var xe=[],Oe=0;return $(U,xe,"","",function(Te){return ne.call(ge,Te,Oe++)}),xe}function he(U){if(U._status===-1){var ne=U._result;ne=ne(),ne.then(function(ge){(U._status===0||U._status===-1)&&(U._status=1,U._result=ge)},function(ge){(U._status===0||U._status===-1)&&(U._status=2,U._result=ge)}),U._status===-1&&(U._status=0,U._result=ne)}if(U._status===1)return U._result.default;throw U._result}var oe=typeof reportError=="function"?reportError:function(U){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ne=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof U=="object"&&U!==null&&typeof U.message=="string"?String(U.message):String(U),error:U});if(!window.dispatchEvent(ne))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",U);return}console.error(U)},Ne={map:se,forEach:function(U,ne,ge){se(U,function(){ne.apply(this,arguments)},ge)},count:function(U){var ne=0;return se(U,function(){ne++}),ne},toArray:function(U){return se(U,function(ne){return ne})||[]},only:function(U){if(!ee(U))throw Error("React.Children.only expected to receive a single React element child.");return U}};return Ue.Activity=T,Ue.Children=Ne,Ue.Component=W,Ue.Fragment=d,Ue.Profiler=f,Ue.PureComponent=K,Ue.StrictMode=c,Ue.Suspense=v,Ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,Ue.__COMPILER_RUNTIME={__proto__:null,c:function(U){return G.H.useMemoCache(U)}},Ue.cache=function(U){return function(){return U.apply(null,arguments)}},Ue.cacheSignal=function(){return null},Ue.cloneElement=function(U,ne,ge){if(U==null)throw Error("The argument must be a React element, but you passed "+U+".");var xe=M({},U.props),Oe=U.key;if(ne!=null)for(Te in ne.key!==void 0&&(Oe=""+ne.key),ne)!Z.call(ne,Te)||Te==="key"||Te==="__self"||Te==="__source"||Te==="ref"&&ne.ref===void 0||(xe[Te]=ne[Te]);var Te=arguments.length-2;if(Te===1)xe.children=ge;else if(1<Te){for(var qe=Array(Te),pt=0;pt<Te;pt++)qe[pt]=arguments[pt+2];xe.children=qe}return C(U.type,Oe,xe)},Ue.createContext=function(U){return U={$$typeof:b,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null},U.Provider=U,U.Consumer={$$typeof:m,_context:U},U},Ue.createElement=function(U,ne,ge){var xe,Oe={},Te=null;if(ne!=null)for(xe in ne.key!==void 0&&(Te=""+ne.key),ne)Z.call(ne,xe)&&xe!=="key"&&xe!=="__self"&&xe!=="__source"&&(Oe[xe]=ne[xe]);var qe=arguments.length-2;if(qe===1)Oe.children=ge;else if(1<qe){for(var pt=Array(qe),Ke=0;Ke<qe;Ke++)pt[Ke]=arguments[Ke+2];Oe.children=pt}if(U&&U.defaultProps)for(xe in qe=U.defaultProps,qe)Oe[xe]===void 0&&(Oe[xe]=qe[xe]);return C(U,Te,Oe)},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(U){return{$$typeof:S,render:U}},Ue.isValidElement=ee,Ue.lazy=function(U){return{$$typeof:N,_payload:{_status:-1,_result:U},_init:he}},Ue.memo=function(U,ne){return{$$typeof:p,type:U,compare:ne===void 0?null:ne}},Ue.startTransition=function(U){var ne=G.T,ge={};G.T=ge;try{var xe=U(),Oe=G.S;Oe!==null&&Oe(ge,xe),typeof xe=="object"&&xe!==null&&typeof xe.then=="function"&&xe.then(P,oe)}catch(Te){oe(Te)}finally{ne!==null&&ge.types!==null&&(ne.types=ge.types),G.T=ne}},Ue.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},Ue.use=function(U){return G.H.use(U)},Ue.useActionState=function(U,ne,ge){return G.H.useActionState(U,ne,ge)},Ue.useCallback=function(U,ne){return G.H.useCallback(U,ne)},Ue.useContext=function(U){return G.H.useContext(U)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(U,ne){return G.H.useDeferredValue(U,ne)},Ue.useEffect=function(U,ne){return G.H.useEffect(U,ne)},Ue.useEffectEvent=function(U){return G.H.useEffectEvent(U)},Ue.useId=function(){return G.H.useId()},Ue.useImperativeHandle=function(U,ne,ge){return G.H.useImperativeHandle(U,ne,ge)},Ue.useInsertionEffect=function(U,ne){return G.H.useInsertionEffect(U,ne)},Ue.useLayoutEffect=function(U,ne){return G.H.useLayoutEffect(U,ne)},Ue.useMemo=function(U,ne){return G.H.useMemo(U,ne)},Ue.useOptimistic=function(U,ne){return G.H.useOptimistic(U,ne)},Ue.useReducer=function(U,ne,ge){return G.H.useReducer(U,ne,ge)},Ue.useRef=function(U){return G.H.useRef(U)},Ue.useState=function(U){return G.H.useState(U)},Ue.useSyncExternalStore=function(U,ne,ge){return G.H.useSyncExternalStore(U,ne,ge)},Ue.useTransition=function(){return G.H.useTransition()},Ue.version="19.2.4",Ue}var ag;function qf(){return ag||(ag=1,ff.exports=Kp()),ff.exports}var q=qf();const _e=Hf(q);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 ng;function ev(){return ng||(ng=1,(function(l){function r($,se){var he=$.length;$.push(se);e:for(;0<he;){var oe=he-1>>>1,Ne=$[oe];if(0<f(Ne,se))$[oe]=se,$[he]=Ne,he=oe;else break e}}function d($){return $.length===0?null:$[0]}function c($){if($.length===0)return null;var se=$[0],he=$.pop();if(he!==se){$[0]=he;e:for(var oe=0,Ne=$.length,U=Ne>>>1;oe<U;){var ne=2*(oe+1)-1,ge=$[ne],xe=ne+1,Oe=$[xe];if(0>f(ge,he))xe<Ne&&0>f(Oe,ge)?($[oe]=Oe,$[xe]=he,oe=xe):($[oe]=ge,$[ne]=he,oe=ne);else if(xe<Ne&&0>f(Oe,he))$[oe]=Oe,$[xe]=he,oe=xe;else break e}}return se}function f($,se){var he=$.sortIndex-se.sortIndex;return he!==0?he:$.id-se.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;l.unstable_now=function(){return m.now()}}else{var 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,M=!1,D=!1,W=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,K=typeof setImmediate<"u"?setImmediate:null;function J($){for(var se=d(p);se!==null;){if(se.callback===null)c(p);else if(se.startTime<=$)c(p),se.sortIndex=se.expirationTime,r(v,se);else break;se=d(p)}}function ie($){if(M=!1,J($),!O)if(d(v)!==null)O=!0,P||(P=!0,_());else{var se=d(p);se!==null&&fe(ie,se.startTime-$)}}var P=!1,G=-1,Z=5,C=-1;function k(){return D?!0:!(l.unstable_now()-C<Z)}function ee(){if(D=!1,P){var $=l.unstable_now();C=$;var se=!0;try{e:{O=!1,M&&(M=!1,Y(G),G=-1),A=!0;var he=w;try{t:{for(J($),T=d(v);T!==null&&!(T.expirationTime>$&&k());){var oe=T.callback;if(typeof oe=="function"){T.callback=null,w=T.priorityLevel;var Ne=oe(T.expirationTime<=$);if($=l.unstable_now(),typeof Ne=="function"){T.callback=Ne,J($),se=!0;break t}T===d(v)&&c(v),J($)}else c(v);T=d(v)}if(T!==null)se=!0;else{var U=d(p);U!==null&&fe(ie,U.startTime-$),se=!1}}break e}finally{T=null,w=he,A=!1}se=void 0}}finally{se?_():P=!1}}}var _;if(typeof K=="function")_=function(){K(ee)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,me=ce.port2;ce.port1.onmessage=ee,_=function(){me.postMessage(null)}}else _=function(){W(ee,0)};function fe($,se){G=W(function(){$(l.unstable_now())},se)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function($){$.callback=null},l.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<$?Math.floor(1e3/$):5},l.unstable_getCurrentPriorityLevel=function(){return w},l.unstable_next=function($){switch(w){case 1:case 2:case 3:var se=3;break;default:se=w}var he=w;w=se;try{return $()}finally{w=he}},l.unstable_requestPaint=function(){D=!0},l.unstable_runWithPriority=function($,se){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var he=w;w=$;try{return se()}finally{w=he}},l.unstable_scheduleCallback=function($,se,he){var oe=l.unstable_now();switch(typeof he=="object"&&he!==null?(he=he.delay,he=typeof he=="number"&&0<he?oe+he:oe):he=oe,$){case 1:var Ne=-1;break;case 2:Ne=250;break;case 5:Ne=1073741823;break;case 4:Ne=1e4;break;default:Ne=5e3}return Ne=he+Ne,$={id:N++,callback:se,priorityLevel:$,startTime:he,expirationTime:Ne,sortIndex:-1},he>oe?($.sortIndex=he,r(p,$),d(v)===null&&$===d(p)&&(M?(Y(G),G=-1):M=!0,fe(ie,he-oe))):($.sortIndex=Ne,r(v,$),O||A||(O=!0,P||(P=!0,_()))),$},l.unstable_shouldYield=k,l.unstable_wrapCallback=function($){var se=w;return function(){var he=w;w=se;try{return $.apply(this,arguments)}finally{w=he}}}})(gf)),gf}var lg;function tv(){return lg||(lg=1,mf.exports=ev()),mf.exports}var xf={exports:{}},la={};/**
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 sg;function av(){if(sg)return la;sg=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 la.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,la.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)},la.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()}},la.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))},la.prefetchDNS=function(v){typeof v=="string"&&c.d.D(v)},la.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})}},la.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)},la.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})}},la.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)},la.requestFormReset=function(v){c.d.r(v)},la.unstable_batchedUpdates=function(v,p){return v(p)},la.useFormState=function(v,p,N){return b.H.useFormState(v,p,N)},la.useFormStatus=function(){return b.H.useHostTransitionStatus()},la.version="19.2.4",la}var rg;function mx(){if(rg)return xf.exports;rg=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=av(),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 ig;function nv(){if(ig)return Pi;ig=1;var l=tv(),r=qf(),d=mx();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"),M=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),K=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),ie=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),k=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function _(e){return e===null||typeof e!="object"?null:(e=ee&&e[ee]||e["@@iterator"],typeof e=="function"?e:null)}var ce=Symbol.for("react.client.reference");function me(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 M:return"Fragment";case W:return"Profiler";case D:return"StrictMode";case ie:return"Suspense";case P:return"SuspenseList";case C:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case O:return"Portal";case K:return e.displayName||"Context";case Y: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 G:return t=e.displayName||null,t!==null?t:me(e.type)||"Memo";case Z:t=e._payload,e=e._init;try{return me(e(t))}catch{}}return null}var fe=Array.isArray,$=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},oe=[],Ne=-1;function U(e){return{current:e}}function ne(e){0>Ne||(e.current=oe[Ne],oe[Ne]=null,Ne--)}function ge(e,t){Ne++,oe[Ne]=e.current,e.current=t}var xe=U(null),Oe=U(null),Te=U(null),qe=U(null);function pt(e,t){switch(ge(Te,t),ge(Oe,e),ge(xe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?b0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=b0(t),e=S0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ne(xe),ge(xe,e)}function Ke(){ne(xe),ne(Oe),ne(Te)}function sa(e){e.memoizedState!==null&&ge(qe,e);var t=xe.current,a=S0(t,e.type);t!==a&&(ge(Oe,e),ge(xe,a))}function on(e){Oe.current===e&&(ne(xe),ne(Oe)),qe.current===e&&(ne(qe),qi._currentValue=he)}var Pl,Jn;function Ga(e){if(Pl===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Pl=t&&t[1]||"",Jn=-1<a.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+Pl+e+Jn}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 ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(ae){var X=ae}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(ae){X=ae}e.call(ue.prototype)}}else{try{throw Error()}catch(ae){X=ae}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(ae){if(ae&&X&&typeof ae.stack=="string")return[ae.stack,X.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=n.DetermineComponentFrameRoot(),x=o[0],E=o[1];if(x&&E){var z=x.split(`
44
- `),Q=E.split(`
45
- `);for(u=n=0;n<z.length&&!z[n].includes("DetermineComponentFrameRoot");)n++;for(;u<Q.length&&!Q[u].includes("DetermineComponentFrameRoot");)u++;if(n===z.length||u===Q.length)for(n=z.length-1,u=Q.length-1;1<=n&&0<=u&&z[n]!==Q[u];)u--;for(;1<=n&&0<=u;n--,u--)if(z[n]!==Q[u]){if(n!==1||u!==1)do if(n--,u--,0>u||z[n]!==Q[u]){var le=`
46
- `+z[n].replace(" at new "," at ");return e.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",e.displayName)),le}while(1<=n&&0<=u);break}}}finally{Fa=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ga(a):""}function ye(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 Re(e){try{var t="",a=null;do t+=ye(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
47
- Error generating stack: `+n.message+`
48
- `+n.stack}}var mt=Object.prototype.hasOwnProperty,Ot=l.unstable_scheduleCallback,Za=l.unstable_cancelCallback,Vs=l.unstable_shouldYield,Bs=l.unstable_requestPaint,Ht=l.unstable_now,jn=l.unstable_getCurrentPriorityLevel,Fl=l.unstable_ImmediatePriority,Zl=l.unstable_UserBlockingPriority,Jt=l.unstable_NormalPriority,Wa=l.unstable_LowPriority,wn=l.unstable_IdlePriority,Ze=l.log,Br=l.unstable_setDisableYieldValue,vt=null,Kt=null;function $t(e){if(typeof Ze=="function"&&Br(e),Kt&&typeof Kt.setStrictMode=="function")try{Kt.setStrictMode(vt,e)}catch{}}var Pt=Math.clz32?Math.clz32:so,ou=Math.log,lo=Math.LN2;function so(e){return e>>>=0,e===0?32:31-(ou(e)/lo|0)|0}var Kn=256,Ys=262144,ea=4194304;function dn(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 Wl(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=dn(n):(x&=E,x!==0?u=dn(x):a||(a=E&~e,a!==0&&(u=dn(a))))):(E=n&~o,E!==0?u=dn(E):x!==0?u=dn(x):a||(a=n&~e,a!==0&&(u=dn(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 du(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=ea;return ea<<=1,(ea&62914560)===0&&(ea=4194304),e}function $s(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 fu(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,z=e.expirationTimes,Q=e.hiddenUpdates;for(a=x&~a;0<a;){var le=31-Pt(a),ue=1<<le;E[le]=0,z[le]=-1;var X=Q[le];if(X!==null)for(Q[le]=null,le=0;le<X.length;le++){var ae=X[le];ae!==null&&(ae.lane&=-536870913)}a&=~ue}n!==0&&ct(e,n,0),o!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=o&~(x&~t))}function ct(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Pt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function ua(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-Pt(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:Ps(a),(a&(e.suspendedLanes|t))!==0?0:a}function Ps(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 ta(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Gs(){var e=se.p;return e!==0?e:(e=window.event,e===void 0?32:P0(e.type))}function Pr(e,t){var a=se.p;try{return se.p=e,t()}finally{se.p=a}}var Ia=Math.random().toString(36).slice(2),Nt="__reactFiber$"+Ia,zt="__reactProps$"+Ia,En="__reactContainer$"+Ia,Il="__reactEvents$"+Ia,hu="__reactListeners$"+Ia,mu="__reactHandles$"+Ia,gu="__reactResources$"+Ia,Ql="__reactMarker$"+Ia;function Fs(e){delete e[Nt],delete e[zt],delete e[Il],delete e[hu],delete e[mu]}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=M0(e);e!==null;){if(a=e[Nt])return a;e=M0(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 ca(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function Qa(e){var t=e[gu];return t||(t=e[gu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Dt(e){e[Ql]=!0}var xu=new Set,Gr={};function fn(e,t){al(e,t),al(e+"Capture",t)}function al(e,t){for(Gr[e]=t,e=0;e<t.length;e++)xu.add(t[e])}var yu=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]*$"),pu={},Cn={};function Fr(e){return mt.call(Cn,e)?!0:mt.call(pu,e)?!1:yu.test(e)?Cn[e]=!0:(pu[e]=!0,!1)}function Gt(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 Zs(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 hn(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 Xl(e){if(!e._valueTracker){var t=hn(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=hn(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Xa(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 Ws=/[\n"\\]/g;function Ft(e){return e.replace(Ws,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?Jl(e,x,jt(t)):a!=null?Jl(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)){Xl(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),Xl(e)}function Jl(e,t,a){t==="number"&&Xa(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 Kl(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(fe(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),Xl(e)}function Ja(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var es=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 ts(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||es.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function vu(e,t,a){if(t!=null&&typeof t!="object")throw Error(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&&ts(e,u,n)}else for(var o in t)t.hasOwnProperty(o)&&ts(e,o,t[o])}function Qs(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"]]),bu=/^[\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 as(e){return bu.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Da(){}var Ir=null;function Xs(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 Su(e){var t=Ce(e);if(t&&(e=t.stateNode)){var a=e[zt]||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="'+Ft(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var u=n[zt]||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":Kl(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Mn(e,!!a.multiple,t,!1)}}}var Qr=!1;function Xr(e,t,a){if(Qr)return e(t,a);Qr=!0;try{var n=e(t);return n}finally{if(Qr=!1,(On!==null||sl!==null)&&(gc(),On&&(t=On,e=sl,sl=On=null,Su(t),e)))for(t=0;t<e.length;t++)Su(e[t])}}function ns(e,t){var a=e.stateNode;if(a===null)return null;var n=a[zt]||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 Ka=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jr=!1;if(Ka)try{var ls={};Object.defineProperty(ls,"passive",{get:function(){Jr=!0}}),window.addEventListener("test",ls,ls),window.removeEventListener("test",ls,ls)}catch{Jr=!1}var mn=null,Js=null,Ks=null;function Ut(){if(Ks)return Ks;var e,t=Js,a=t.length,n,u="value"in mn?mn.value:mn.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 Ks=u.slice(e,1<n?1-n:void 0)}function ss(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 en(){return!0}function Dn(){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)?en:Dn,this.isPropagationStopped=Dn,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=en)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=en)},persist:function(){},isPersistent:en}),t}var gn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rs=wt(gn),is=T({},gn,{view:0,detail:0}),Kr=wt(is),er,us,cs,tr=T({},is,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ds,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!==cs&&(cs&&e.type==="mousemove"?(er=e.screenX-cs.screenX,us=e.screenY-cs.screenY):us=er=0,cs=e),er)},movementY:function(e){return"movementY"in e?e.movementY:us}}),Nu=wt(tr),io=T({},tr,{dataTransfer:0}),uo=wt(io),co=T({},is,{relatedTarget:0}),ar=wt(co),oo=T({},gn,{animationName:0,elapsedTime:0,pseudoElement:0}),rl=wt(oo),fo=T({},gn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),il=wt(fo),os=T({},gn,{data:0}),ul=wt(os),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 ds(){return xo}var yo=T({},is,{key:function(e){if(e.key){var t=ho[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ss(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:ds,charCode:function(e){return e.type==="keypress"?ss(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ss(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),po=wt(yo),vo=T({},tr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ju=wt(vo),bo=T({},is,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ds}),So=wt(bo),wu=T({},gn,{propertyName:0,elapsedTime:0,pseudoElement:0}),No=wt(wu),jo=T({},tr,{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({},gn,{newState:0,oldState:0}),To=wt(Eo),Eu=[9,13,27,32],ei=Ka&&"CompositionEvent"in window,fs=null;Ka&&"documentMode"in document&&(fs=document.documentMode);var Co=Ka&&"TextEvent"in window&&!fs,Tu=Ka&&(!ei||fs&&8<fs&&11>=fs),Cu=" ",Mu=!1;function Ou(e,t){switch(e){case"keyup":return Eu.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:(Mu=!0,Cu);case"textInput":return e=t.data,e===Cu&&Mu?null:e;default:return null}}function Oo(e,t){if(cl)return e==="compositionend"||!ei&&Ou(e,t)?(e=Ut(),Ks=Js=mn=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 Tu&&t.locale!=="ko"?null:t.data;default:return null}}var Do={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 Ru(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Do[e.type]:t==="textarea"}function ti(e,t,a,n){On?sl?sl.push(n):sl=[n]:On=n,t=Nc(t,"onChange"),0<t.length&&(a=new rs("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var ol=null,hs=null;function oa(e){m0(e,0)}function tn(e){var t=ca(e);if(nl(t))return e}function Au(e,t){if(e==="change")return t}var xn=!1;if(Ka){var ai;if(Ka){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;xn=ai&&(!document.documentMode||9<document.documentMode)}function li(){ol&&(ol.detachEvent("onpropertychange",si),hs=ol=null)}function si(e){if(e.propertyName==="value"&&tn(hs)){var t=[];ti(t,hs,e,Xs(e)),Xr(oa,t)}}function Ye(e,t,a){e==="focusin"?(li(),ol=t,hs=a,ol.attachEvent("onpropertychange",si)):e==="focusout"&&li()}function dl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return tn(hs)}function Ro(e,t){if(e==="click")return tn(t)}function ot(e,t){if(e==="input"||e==="change")return tn(t)}function ms(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var aa=typeof Object.is=="function"?Object.is:ms;function gs(e,t){if(aa(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(!mt.call(t,u)||!aa(e[u],t[u]))return!1}return!0}function _u(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ku(e,t){var a=_u(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=_u(a)}}function 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=Xa(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=Xa(e.document)}return t}function nr(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 zu=Ka&&"documentMode"in document&&11>=document.documentMode,fl=null,lr=null,Zt=null,sr=!1;function xs(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;sr||fl==null||fl!==Xa(n)||(n=fl,"selectionStart"in n&&nr(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}),Zt&&gs(Zt,n)||(Zt=n,n=Nc(lr,"onSelect"),0<n.length&&(t=new rs("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=fl)))}function Rn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var hl={animationend:Rn("Animation","AnimationEnd"),animationiteration:Rn("Animation","AnimationIteration"),animationstart:Rn("Animation","AnimationStart"),transitionrun:Rn("Transition","TransitionRun"),transitionstart:Rn("Transition","TransitionStart"),transitioncancel:Rn("Transition","TransitionCancel"),transitionend:Rn("Transition","TransitionEnd")},ri={},Uu={};Ka&&(Uu=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 Uu)return ri[e]=t[a];return e}var Lu=An("animationend"),Hu=An("animationiteration"),rr=An("animationstart"),_o=An("transitionrun"),ko=An("transitionstart"),qu=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 da(e,t){ui.set(e,t),fn(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)},ra=[],Ra=0,ys=0;function gl(){for(var e=Ra,t=ys=Ra=0;t<e;){var a=ra[t];ra[t++]=null;var n=ra[t];ra[t++]=null;var u=ra[t];ra[t++]=null;var o=ra[t];if(ra[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&&ps(a,u,o)}}function Aa(e,t,a,n){ra[Ra++]=e,ra[Ra++]=t,ra[Ra++]=a,ra[Ra++]=n,ys|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function ir(e,t,a,n){return Aa(e,t,a,n),vs(e)}function _a(e,t){return Aa(e,null,null,t),vs(e)}function ps(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-Pt(a),e=o.hiddenUpdates,n=e[u],n===null?e[u]=[t]:n.push(t),t.lane=a|536870912),o):null}function vs(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 ur(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 Wt(e,t,a,n){return new ur(e,t,a,n)}function cr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ka(e,t){var a=e.alternate;return a===null?(a=Wt(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 Vu(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 or(e,t,a,n,u,o){var x=0;if(n=e,typeof e=="function")cr(e)&&(x=1);else if(typeof e=="string")x=Up(e,a,xe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case C:return e=Wt(31,a,t,u),e.elementType=C,e.lanes=o,e;case M:return za(a.children,u,o,t);case D:x=8,u|=24;break;case W:return e=Wt(12,a,t,u|2),e.elementType=W,e.lanes=o,e;case ie:return e=Wt(13,a,t,u),e.elementType=ie,e.lanes=o,e;case P:return e=Wt(19,a,t,u),e.elementType=P,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case K:x=10;break e;case Y:x=9;break e;case J:x=11;break e;case G:x=14;break e;case Z:x=16,n=null;break e}x=29,a=Error(c(130,e===null?"null":typeof e,"")),n=null}return t=Wt(x,a,t,u),t.elementType=e,t.type=n,t.lanes=o,t}function za(e,t,a,n){return e=Wt(7,e,n,t),e.lanes=a,e}function oi(e,t,a){return e=Wt(6,e,null,t),e.lanes=a,e}function Bu(e){var t=Wt(18,null,null,0);return t.stateNode=e,t}function xl(e,t,a){return t=Wt(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 fa(e,t){if(typeof e=="object"&&e!==null){var a=di.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Re(t)},di.set(e,t),t)}return{value:e,source:t,stack:Re(t)}}var _n=[],kn=0,bs=null,an=0,na=[],je=0,ha=null,Ua=1,g="";function i(e,t){_n[kn++]=an,_n[kn++]=bs,bs=e,an=t}function h(e,t,a){na[je++]=Ua,na[je++]=g,na[je++]=ha,ha=e;var n=Ua;e=g;var u=32-Pt(n)-1;n&=~(1<<u),a+=1;var o=32-Pt(t)+u;if(30<o){var x=u-u%5;o=(n&(1<<x)-1).toString(32),n>>=x,u-=x,Ua=1<<32-Pt(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===bs;)bs=_n[--kn],_n[kn]=null,an=_n[--kn],_n[kn]=null;for(;e===ha;)ha=na[--je],na[je]=null,g=na[--je],na[je]=null,Ua=na[--je],na[je]=null}function R(e,t){na[je++]=Ua,na[je++]=g,na[je++]=ha,Ua=t.id,g=t.overflow,ha=e}var L=null,H=null,B=!1,de=null,pe=!1,ze=Error(c(519));function $e(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw nn(fa(t,e)),ze}function De(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[Nt]=e,t[zt]=n,a){case"dialog":Be("cancel",t),Be("close",t);break;case"iframe":case"object":case"embed":Be("load",t);break;case"video":case"audio":for(a=0;a<ki.length;a++)Be(ki[a],t);break;case"source":Be("error",t);break;case"img":case"image":case"link":Be("error",t),Be("load",t);break;case"details":Be("toggle",t);break;case"input":Be("invalid",t),ll(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Be("invalid",t);break;case"textarea":Be("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||p0(t.textContent,a)?(n.popover!=null&&(Be("beforetoggle",t),Be("toggle",t)),n.onScroll!=null&&Be("scroll",t),n.onScrollEnd!=null&&Be("scrollend",t),n.onClick!=null&&(t.onclick=Da),t=!0):t=!1,t||$e(e,!0)}function yt(e){for(L=e.return;L;)switch(L.tag){case 5:case 31:case 13:pe=!1;return;case 27:case 3:pe=!0;return;default:L=L.return}}function qt(e){if(e!==L)return!1;if(!B)return yt(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&&H&&$e(e),yt(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));H=C0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));H=C0(e)}else t===27?(t=H,Ol(e.type)?(e=Kd,Kd=null,H=e):H=t):H=L?Va(e.stateNode.nextSibling):null;return!0}function Vt(){H=L=null,B=!1}function yn(){var e=de;return e!==null&&(ya===null?ya=e:ya.push.apply(ya,e),de=null),e}function nn(e){de===null?de=[e]:de.push(e)}var dr=U(null),zn=null,La=null;function pn(e,t,a){ge(dr,t._currentValue),t._currentValue=a}function ln(e){e._currentValue=dr.current,ne(dr)}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 z=0;z<t.length;z++)if(E.context===t[z]){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;aa(u.pendingProps.value,x.value)||(e!==null?e.push(E):e=[E])}}else if(u===qe.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 fr(e){for(e=e.firstContext;e!==null;){if(!aa(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ss(e){zn=e,La=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function It(e){return nh(zn,e)}function Yu(e,t){return zn===null&&Ss(e),nh(e,t)}function nh(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 Ay=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()})}},_y=l.unstable_scheduleCallback,ky=l.unstable_NormalPriority,Rt={$$typeof:K,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zo(){return{controller:new Ay,data:new Map,refCount:0}}function hi(e){e.refCount--,e.refCount===0&&_y(ky,function(){e.controller.abort()})}var mi=null,Uo=0,hr=0,mr=null;function zy(e,t){if(mi===null){var a=mi=[];Uo=0,hr=qd(),mr={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Uo++,t.then(lh,lh),t}function lh(){if(--Uo===0&&mi!==null){mr!==null&&(mr.status="fulfilled");var e=mi;mi=null,hr=0,mr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Uy(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 sh=$.S;$.S=function(e,t){Ym=Ht(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&zy(e,t),sh!==null&&sh(e,t)};var Ns=U(null);function Lo(){var e=Ns.current;return e!==null?e:ut.pooledCache}function $u(e,t){t===null?ge(Ns,Ns.current):ge(Ns,t.pool)}function rh(){var e=Lo();return e===null?null:{parent:Rt._currentValue,pool:e}}var gr=Error(c(460)),Ho=Error(c(474)),Pu=Error(c(542)),Gu={then:function(){}};function ih(e){return e=e.status,e==="fulfilled"||e==="rejected"}function uh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Da,Da),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,oh(e),e;default:if(typeof t.status=="string")t.then(Da,Da);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,oh(e),e}throw ws=t,gr}}function js(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ws=a,gr):a}}var ws=null;function ch(){if(ws===null)throw Error(c(459));var e=ws;return ws=null,e}function oh(e){if(e===gr||e===Pu)throw Error(c(483))}var xr=null,gi=0;function Fu(e){var t=gi;return gi+=1,xr===null&&(xr=[]),uh(xr,e,t)}function xi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Zu(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 dh(e){function t(F,V){if(e){var I=F.deletions;I===null?(F.deletions=[V],F.flags|=16):I.push(V)}}function a(F,V){if(!e)return null;for(;V!==null;)t(F,V),V=V.sibling;return null}function n(F){for(var V=new Map;F!==null;)F.key!==null?V.set(F.key,F):V.set(F.index,F),F=F.sibling;return V}function u(F,V){return F=ka(F,V),F.index=0,F.sibling=null,F}function o(F,V,I){return F.index=I,e?(I=F.alternate,I!==null?(I=I.index,I<V?(F.flags|=67108866,V):I):(F.flags|=67108866,V)):(F.flags|=1048576,V)}function x(F){return e&&F.alternate===null&&(F.flags|=67108866),F}function E(F,V,I,re){return V===null||V.tag!==6?(V=oi(I,F.mode,re),V.return=F,V):(V=u(V,I),V.return=F,V)}function z(F,V,I,re){var Ee=I.type;return Ee===M?le(F,V,I.props.children,re,I.key):V!==null&&(V.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Z&&js(Ee)===V.type)?(V=u(V,I.props),xi(V,I),V.return=F,V):(V=or(I.type,I.key,I.props,null,F.mode,re),xi(V,I),V.return=F,V)}function Q(F,V,I,re){return V===null||V.tag!==4||V.stateNode.containerInfo!==I.containerInfo||V.stateNode.implementation!==I.implementation?(V=xl(I,F.mode,re),V.return=F,V):(V=u(V,I.children||[]),V.return=F,V)}function le(F,V,I,re,Ee){return V===null||V.tag!==7?(V=za(I,F.mode,re,Ee),V.return=F,V):(V=u(V,I),V.return=F,V)}function ue(F,V,I){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=oi(""+V,F.mode,I),V.return=F,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case A:return I=or(V.type,V.key,V.props,null,F.mode,I),xi(I,V),I.return=F,I;case O:return V=xl(V,F.mode,I),V.return=F,V;case Z:return V=js(V),ue(F,V,I)}if(fe(V)||_(V))return V=za(V,F.mode,I,null),V.return=F,V;if(typeof V.then=="function")return ue(F,Fu(V),I);if(V.$$typeof===K)return ue(F,Yu(F,V),I);Zu(F,V)}return null}function X(F,V,I,re){var Ee=V!==null?V.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return Ee!==null?null:E(F,V,""+I,re);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case A:return I.key===Ee?z(F,V,I,re):null;case O:return I.key===Ee?Q(F,V,I,re):null;case Z:return I=js(I),X(F,V,I,re)}if(fe(I)||_(I))return Ee!==null?null:le(F,V,I,re,null);if(typeof I.then=="function")return X(F,V,Fu(I),re);if(I.$$typeof===K)return X(F,V,Yu(F,I),re);Zu(F,I)}return null}function ae(F,V,I,re,Ee){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return F=F.get(I)||null,E(V,F,""+re,Ee);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case A:return F=F.get(re.key===null?I:re.key)||null,z(V,F,re,Ee);case O:return F=F.get(re.key===null?I:re.key)||null,Q(V,F,re,Ee);case Z:return re=js(re),ae(F,V,I,re,Ee)}if(fe(re)||_(re))return F=F.get(I)||null,le(V,F,re,Ee,null);if(typeof re.then=="function")return ae(F,V,I,Fu(re),Ee);if(re.$$typeof===K)return ae(F,V,I,Yu(V,re),Ee);Zu(V,re)}return null}function ve(F,V,I,re){for(var Ee=null,Ie=null,be=V,He=V=0,Ge=null;be!==null&&He<I.length;He++){be.index>He?(Ge=be,be=null):Ge=be.sibling;var Qe=X(F,be,I[He],re);if(Qe===null){be===null&&(be=Ge);break}e&&be&&Qe.alternate===null&&t(F,be),V=o(Qe,V,He),Ie===null?Ee=Qe:Ie.sibling=Qe,Ie=Qe,be=Ge}if(He===I.length)return a(F,be),B&&i(F,He),Ee;if(be===null){for(;He<I.length;He++)be=ue(F,I[He],re),be!==null&&(V=o(be,V,He),Ie===null?Ee=be:Ie.sibling=be,Ie=be);return B&&i(F,He),Ee}for(be=n(be);He<I.length;He++)Ge=ae(be,F,He,I[He],re),Ge!==null&&(e&&Ge.alternate!==null&&be.delete(Ge.key===null?He:Ge.key),V=o(Ge,V,He),Ie===null?Ee=Ge:Ie.sibling=Ge,Ie=Ge);return e&&be.forEach(function(kl){return t(F,kl)}),B&&i(F,He),Ee}function Ae(F,V,I,re){if(I==null)throw Error(c(151));for(var Ee=null,Ie=null,be=V,He=V=0,Ge=null,Qe=I.next();be!==null&&!Qe.done;He++,Qe=I.next()){be.index>He?(Ge=be,be=null):Ge=be.sibling;var kl=X(F,be,Qe.value,re);if(kl===null){be===null&&(be=Ge);break}e&&be&&kl.alternate===null&&t(F,be),V=o(kl,V,He),Ie===null?Ee=kl:Ie.sibling=kl,Ie=kl,be=Ge}if(Qe.done)return a(F,be),B&&i(F,He),Ee;if(be===null){for(;!Qe.done;He++,Qe=I.next())Qe=ue(F,Qe.value,re),Qe!==null&&(V=o(Qe,V,He),Ie===null?Ee=Qe:Ie.sibling=Qe,Ie=Qe);return B&&i(F,He),Ee}for(be=n(be);!Qe.done;He++,Qe=I.next())Qe=ae(be,F,He,Qe.value,re),Qe!==null&&(e&&Qe.alternate!==null&&be.delete(Qe.key===null?He:Qe.key),V=o(Qe,V,He),Ie===null?Ee=Qe:Ie.sibling=Qe,Ie=Qe);return e&&be.forEach(function(Zp){return t(F,Zp)}),B&&i(F,He),Ee}function rt(F,V,I,re){if(typeof I=="object"&&I!==null&&I.type===M&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case A:e:{for(var Ee=I.key;V!==null;){if(V.key===Ee){if(Ee=I.type,Ee===M){if(V.tag===7){a(F,V.sibling),re=u(V,I.props.children),re.return=F,F=re;break e}}else if(V.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===Z&&js(Ee)===V.type){a(F,V.sibling),re=u(V,I.props),xi(re,I),re.return=F,F=re;break e}a(F,V);break}else t(F,V);V=V.sibling}I.type===M?(re=za(I.props.children,F.mode,re,I.key),re.return=F,F=re):(re=or(I.type,I.key,I.props,null,F.mode,re),xi(re,I),re.return=F,F=re)}return x(F);case O:e:{for(Ee=I.key;V!==null;){if(V.key===Ee)if(V.tag===4&&V.stateNode.containerInfo===I.containerInfo&&V.stateNode.implementation===I.implementation){a(F,V.sibling),re=u(V,I.children||[]),re.return=F,F=re;break e}else{a(F,V);break}else t(F,V);V=V.sibling}re=xl(I,F.mode,re),re.return=F,F=re}return x(F);case Z:return I=js(I),rt(F,V,I,re)}if(fe(I))return ve(F,V,I,re);if(_(I)){if(Ee=_(I),typeof Ee!="function")throw Error(c(150));return I=Ee.call(I),Ae(F,V,I,re)}if(typeof I.then=="function")return rt(F,V,Fu(I),re);if(I.$$typeof===K)return rt(F,V,Yu(F,I),re);Zu(F,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,V!==null&&V.tag===6?(a(F,V.sibling),re=u(V,I),re.return=F,F=re):(a(F,V),re=oi(I,F.mode,re),re.return=F,F=re),x(F)):a(F,V)}return function(F,V,I,re){try{gi=0;var Ee=rt(F,V,I,re);return xr=null,Ee}catch(be){if(be===gr||be===Pu)throw be;var Ie=Wt(29,be,null,F.mode);return Ie.lanes=re,Ie.return=F,Ie}finally{}}}var Es=dh(!0),fh=dh(!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,(Xe&2)!==0){var u=n.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),n.pending=t,t=vs(e),ps(e,null,a),t}return Aa(e,n,t,a),vs(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,ua(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=mr;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 z=E,Q=z.next;z.next=null,x===null?o=Q:x.next=Q,x=z;var le=e.alternate;le!==null&&(le=le.updateQueue,E=le.lastBaseUpdate,E!==x&&(E===null?le.firstBaseUpdate=Q:E.next=Q,le.lastBaseUpdate=z))}if(o!==null){var ue=u.baseState;x=0,le=Q=z=null,E=o;do{var X=E.lane&-536870913,ae=X!==E.lane;if(ae?(Pe&X)===X:(n&X)===X){X!==0&&X===hr&&(Yo=!0),le!==null&&(le=le.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"){ue=ve.call(rt,ue,X);break e}ue=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=Ae.payload,X=typeof ve=="function"?ve.call(rt,ue,X):ve,X==null)break e;ue=T({},ue,X);break e;case 2:yl=!0}}X=E.callback,X!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=u.callbacks,ae===null?u.callbacks=[X]:ae.push(X))}else ae={lane:X,tag:E.tag,payload:E.payload,callback:E.callback,next:null},le===null?(Q=le=ae,z=ue):le=le.next=ae,x|=X;if(E=E.next,E===null){if(E=u.shared.pending,E===null)break;ae=E,E=ae.next,ae.next=null,u.lastBaseUpdate=ae,u.shared.pending=null}}while(!0);le===null&&(z=ue),u.baseState=z,u.firstBaseUpdate=Q,u.lastBaseUpdate=le,o===null&&(u.shared.lanes=0),wl|=x,e.lanes=x,e.memoizedState=ue}}function hh(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function mh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)hh(a[e],t)}var yr=U(null),Wu=U(0);function gh(e,t){e=Gn,ge(Wu,e),ge(yr,t),Gn=e|t.baseLanes}function $o(){ge(Wu,Gn),ge(yr,yr.current)}function Po(){Gn=Wu.current,ne(yr),ne(Wu)}var Na=U(null),qa=null;function bl(e){var t=e.alternate;ge(Et,Et.current&1),ge(Na,e),qa===null&&(t===null||yr.current!==null||t.memoizedState!==null)&&(qa=e)}function Go(e){ge(Et,Et.current),ge(Na,e),qa===null&&(qa=e)}function xh(e){e.tag===22?(ge(Et,Et.current),ge(Na,e),qa===null&&(qa=e)):Sl()}function Sl(){ge(Et,Et.current),ge(Na,Na.current)}function ja(e){ne(Na),qa===e&&(qa=null),ne(Et)}var Et=U(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,Le=null,lt=null,At=null,Qu=!1,pr=!1,Ts=!1,Xu=0,bi=0,vr=null,Ly=0;function bt(){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(!aa(e[a],t[a]))return!1;return!0}function Zo(e,t,a,n,u,o){return Ln=o,Le=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$.H=e===null||e.memoizedState===null?Kh:ud,Ts=!1,o=a(n,u),Ts=!1,pr&&(o=ph(t,a,n,u)),yh(e),o}function yh(e){$.H=ji;var t=lt!==null&&lt.next!==null;if(Ln=0,At=lt=Le=null,Qu=!1,bi=0,vr=null,t)throw Error(c(300));e===null||_t||(e=e.dependencies,e!==null&&fr(e)&&(_t=!0))}function ph(e,t,a,n){Le=e;var u=0;do{if(pr&&(vr=null),bi=0,pr=!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)}$.H=em,o=t(a,n)}while(pr);return o}function Hy(){var e=$.H,t=e.useState()[0];return t=typeof t.then=="function"?Si(t):t,e=e.useState()[0],(lt!==null?lt.memoizedState:null)!==e&&(Le.flags|=1024),t}function Wo(){var e=Xu!==0;return Xu=0,e}function Io(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Qo(e){if(Qu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Qu=!1}Ln=0,At=lt=Le=null,pr=!1,bi=Xu=0,vr=null}function ia(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return At===null?Le.memoizedState=At=e:At=At.next=e,At}function Tt(){if(lt===null){var e=Le.alternate;e=e!==null?e.memoizedState:null}else e=lt.next;var t=At===null?Le.memoizedState:At.next;if(t!==null)At=t,lt=e;else{if(e===null)throw Le.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?Le.memoizedState=At=e:At=At.next=e}return At}function Ju(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Si(e){var t=bi;return bi+=1,vr===null&&(vr=[]),e=uh(vr,e,t),t=Le,(At===null?t.memoizedState:At.next)===null&&(t=t.alternate,$.H=t===null||t.memoizedState===null?Kh:ud),e}function Ku(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Si(e);if(e.$$typeof===K)return It(e)}throw Error(c(438,String(e)))}function Xo(e){var t=null,a=Le.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=Le.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=Ju(),Le.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=k;return t.index++,a}function Hn(e,t){return typeof t=="function"?t(e):t}function ec(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,z=null,Q=t,le=!1;do{var ue=Q.lane&-536870913;if(ue!==Q.lane?(Pe&ue)===ue:(Ln&ue)===ue){var X=Q.revertLane;if(X===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),ue===hr&&(le=!0);else if((Ln&X)===X){Q=Q.next,X===hr&&(le=!0);continue}else ue={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},z===null?(E=z=ue,x=o):z=z.next=ue,Le.lanes|=X,wl|=X;ue=Q.action,Ts&&a(o,ue),o=Q.hasEagerState?Q.eagerState:a(o,ue)}else X={lane:ue,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},z===null?(E=z=X,x=o):z=z.next=X,Le.lanes|=ue,wl|=ue;Q=Q.next}while(Q!==null&&Q!==t);if(z===null?x=o:z.next=E,!aa(o,e.memoizedState)&&(_t=!0,le&&(a=mr,a!==null)))throw a;e.memoizedState=o,e.baseState=x,e.baseQueue=z,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);aa(o,t.memoizedState)||(_t=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),a.lastRenderedState=o}return[o,n]}function vh(e,t,a){var n=Le,u=Tt(),o=B;if(o){if(a===void 0)throw Error(c(407));a=a()}else a=t();var x=!aa((lt||u).memoizedState,a);if(x&&(u.memoizedState=a,_t=!0),u=u.queue,ad(Nh.bind(null,n,u,e),[e]),u.getSnapshot!==t||x||At!==null&&At.memoizedState.tag&1){if(n.flags|=2048,br(9,{destroy:void 0},Sh.bind(null,n,u,a,t),null),ut===null)throw Error(c(349));o||(Ln&127)!==0||bh(n,t,a)}return a}function bh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Le.updateQueue,t===null?(t=Ju(),Le.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Sh(e,t,a,n){t.value=a,t.getSnapshot=n,jh(t)&&wh(e)}function Nh(e,t,a){return a(function(){jh(t)&&wh(e)})}function jh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!aa(e,a)}catch{return!0}}function wh(e){var t=_a(e,2);t!==null&&pa(t,e,2)}function ed(e){var t=ia();if(typeof e=="function"){var a=e;if(e=a(),Ts){$t(!0);try{a()}finally{$t(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hn,lastRenderedState:e},t}function Eh(e,t,a,n){return e.baseState=a,Jo(e,lt,typeof n=="function"?n:Hn)}function qy(e,t,a,n,u){if(nc(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)}};$.T!==null?a(!0):o.isTransition=!1,n(o),a=t.pending,a===null?(o.next=t.pending=o,Th(t,o)):(o.next=a.next,t.pending=a.next=o)}}function Th(e,t){var a=t.action,n=t.payload,u=e.state;if(t.isTransition){var o=$.T,x={};$.T=x;try{var E=a(u,n),z=$.S;z!==null&&z(x,E),Ch(e,t,E)}catch(Q){td(e,t,Q)}finally{o!==null&&x.types!==null&&(o.types=x.types),$.T=o}}else try{o=a(u,n),Ch(e,t,o)}catch(Q){td(e,t,Q)}}function Ch(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){Mh(e,t,n)},function(n){return td(e,t,n)}):Mh(e,t,a)}function Mh(e,t,a){t.status="fulfilled",t.value=a,Oh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Th(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,Oh(t),t=t.next;while(t!==n)}e.action=null}function Oh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Dh(e,t){return t}function Rh(e,t){if(B){var a=ut.formState;if(a!==null){e:{var n=Le;if(B){if(H){t:{for(var u=H,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){H=Va(u.nextSibling),n=u.data==="F!";break e}}$e(n)}n=!1}n&&(t=a[0])}}return a=ia(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dh,lastRenderedState:t},a.queue=n,a=Qh.bind(null,Le,n),n.dispatch=a,n=ed(!1),o=id.bind(null,Le,!1,n.queue),n=ia(),u={state:t,dispatch:null,action:e,pending:null},n.queue=u,a=qy.bind(null,Le,u,o,a),u.dispatch=a,n.memoizedState=e,[t,a,!1]}function Ah(e){var t=Tt();return _h(t,lt,e)}function _h(e,t,a){if(t=Jo(e,t,Dh)[0],e=ec(Hn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Si(t)}catch(x){throw x===gr?Pu:x}else n=t;t=Tt();var u=t.queue,o=u.dispatch;return a!==t.memoizedState&&(Le.flags|=2048,br(9,{destroy:void 0},Vy.bind(null,u,a),null)),[n,o,e]}function Vy(e,t){e.action=t}function kh(e){var t=Tt(),a=lt;if(a!==null)return _h(t,a,e);Tt(),t=t.memoizedState,a=Tt();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function br(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=Le.updateQueue,t===null&&(t=Ju(),Le.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 zh(){return Tt().memoizedState}function tc(e,t,a,n){var u=ia();Le.flags|=e,u.memoizedState=br(1|t,{destroy:void 0},a,n===void 0?null:n)}function ac(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=br(t,o,a,n):(Le.flags|=e,u.memoizedState=br(1|t,o,a,n))}function Uh(e,t){tc(8390656,8,e,t)}function ad(e,t){ac(2048,8,e,t)}function By(e){Le.flags|=4;var t=Le.updateQueue;if(t===null)t=Ju(),Le.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Lh(e){var t=Tt().memoizedState;return By({ref:t,nextImpl:e}),function(){if((Xe&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function Hh(e,t){return ac(4,2,e,t)}function qh(e,t){return ac(4,4,e,t)}function Vh(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 Bh(e,t,a){a=a!=null?a.concat([e]):null,ac(4,4,Vh.bind(null,t,e),a)}function nd(){}function Yh(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 $h(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(),Ts){$t(!0);try{e()}finally{$t(!1)}}return a.memoizedState=[n,t],n}function ld(e,t,a){return a===void 0||(Ln&1073741824)!==0&&(Pe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Pm(),Le.lanes|=e,wl|=e,a)}function Ph(e,t,a,n){return aa(a,t)?a:yr.current!==null?(e=ld(e,a,n),aa(e,t)||(_t=!0),e):(Ln&42)===0||(Ln&1073741824)!==0&&(Pe&261930)===0?(_t=!0,e.memoizedState=a):(e=Pm(),Le.lanes|=e,wl|=e,t)}function Gh(e,t,a,n,u){var o=se.p;se.p=o!==0&&8>o?o:8;var x=$.T,E={};$.T=E,id(e,!1,t,a);try{var z=u(),Q=$.S;if(Q!==null&&Q(E,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var le=Uy(z,n);Ni(e,t,le,Ta(e))}else Ni(e,t,n,Ta(e))}catch(ue){Ni(e,t,{then:function(){},status:"rejected",reason:ue},Ta())}finally{se.p=o,x!==null&&E.types!==null&&(x.types=E.types),$.T=x}}function Yy(){}function sd(e,t,a,n){if(e.tag!==5)throw Error(c(476));var u=Fh(e).queue;Gh(e,u,t,he,a===null?Yy:function(){return Zh(e),a(n)})}function Fh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hn,lastRenderedState:he},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 Zh(e){var t=Fh(e);t.next===null&&(t=e.alternate.memoizedState),Ni(e,t.next.queue,{},Ta())}function rd(){return It(qi)}function Wh(){return Tt().memoizedState}function Ih(){return Tt().memoizedState}function $y(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&&(pa(n,t,a),yi(n,t,a)),t={cache:zo()},e.payload=t;return}t=t.return}}function Py(e,t,a){var n=Ta();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},nc(e)?Xh(t,a):(a=ir(e,t,a,n),a!==null&&(pa(a,e,n),Jh(a,t,n)))}function Qh(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(nc(e))Xh(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,aa(E,x))return Aa(e,t,u,0),ut===null&&gl(),!1}catch{}finally{}if(a=ir(e,t,u,n),a!==null)return pa(a,e,n),Jh(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},nc(e)){if(t)throw Error(c(479))}else t=ir(e,a,n,2),t!==null&&pa(t,e,2)}function nc(e){var t=e.alternate;return e===Le||t!==null&&t===Le}function Xh(e,t){pr=Qu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Jh(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,ua(e,a)}}var ji={readContext:It,use:Ku,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useLayoutEffect:bt,useInsertionEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useSyncExternalStore:bt,useId:bt,useHostTransitionStatus:bt,useFormState:bt,useActionState:bt,useOptimistic:bt,useMemoCache:bt,useCacheRefresh:bt};ji.useEffectEvent=bt;var Kh={readContext:It,use:Ku,useCallback:function(e,t){return ia().memoizedState=[e,t===void 0?null:t],e},useContext:It,useEffect:Uh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,tc(4194308,4,Vh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return tc(4194308,4,e,t)},useInsertionEffect:function(e,t){tc(4,2,e,t)},useMemo:function(e,t){var a=ia();t=t===void 0?null:t;var n=e();if(Ts){$t(!0);try{e()}finally{$t(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=ia();if(a!==void 0){var u=a(t);if(Ts){$t(!0);try{a(t)}finally{$t(!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=Py.bind(null,Le,e),[n.memoizedState,e]},useRef:function(e){var t=ia();return e={current:e},t.memoizedState=e},useState:function(e){e=ed(e);var t=e.queue,a=Qh.bind(null,Le,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:nd,useDeferredValue:function(e,t){var a=ia();return ld(a,e,t)},useTransition:function(){var e=ed(!1);return e=Gh.bind(null,Le,e.queue,!0,!1),ia().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=Le,u=ia();if(B){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),ut===null)throw Error(c(349));(Pe&127)!==0||bh(n,t,a)}u.memoizedState=a;var o={value:a,getSnapshot:t};return u.queue=o,Uh(Nh.bind(null,n,o,e),[e]),n.flags|=2048,br(9,{destroy:void 0},Sh.bind(null,n,o,a,t),null),a},useId:function(){var e=ia(),t=ut.identifierPrefix;if(B){var a=g,n=Ua;a=(n&~(1<<32-Pt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Xu++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Ly++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:rd,useFormState:Rh,useActionState:Rh,useOptimistic:function(e){var t=ia();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,Le,!0,a),a.dispatch=t,[e,t]},useMemoCache:Xo,useCacheRefresh:function(){return ia().memoizedState=$y.bind(null,Le)},useEffectEvent:function(e){var t=ia(),a={impl:e};return t.memoizedState=a,function(){if((Xe&2)!==0)throw Error(c(440));return a.impl.apply(void 0,arguments)}}},ud={readContext:It,use:Ku,useCallback:Yh,useContext:It,useEffect:ad,useImperativeHandle:Bh,useInsertionEffect:Hh,useLayoutEffect:qh,useMemo:$h,useReducer:ec,useRef:zh,useState:function(){return ec(Hn)},useDebugValue:nd,useDeferredValue:function(e,t){var a=Tt();return Ph(a,lt.memoizedState,e,t)},useTransition:function(){var e=ec(Hn)[0],t=Tt().memoizedState;return[typeof e=="boolean"?e:Si(e),t]},useSyncExternalStore:vh,useId:Wh,useHostTransitionStatus:rd,useFormState:Ah,useActionState:Ah,useOptimistic:function(e,t){var a=Tt();return Eh(a,lt,e,t)},useMemoCache:Xo,useCacheRefresh:Ih};ud.useEffectEvent=Lh;var em={readContext:It,use:Ku,useCallback:Yh,useContext:It,useEffect:ad,useImperativeHandle:Bh,useInsertionEffect:Hh,useLayoutEffect:qh,useMemo:$h,useReducer:Ko,useRef:zh,useState:function(){return Ko(Hn)},useDebugValue:nd,useDeferredValue:function(e,t){var a=Tt();return lt===null?ld(a,e,t):Ph(a,lt.memoizedState,e,t)},useTransition:function(){var e=Ko(Hn)[0],t=Tt().memoizedState;return[typeof e=="boolean"?e:Si(e),t]},useSyncExternalStore:vh,useId:Wh,useHostTransitionStatus:rd,useFormState:kh,useActionState:kh,useOptimistic:function(e,t){var a=Tt();return lt!==null?Eh(a,lt,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Xo,useCacheRefresh:Ih};em.useEffectEvent=Lh;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&&(pa(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&&(pa(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&&(pa(t,e,a),yi(t,e,a))}};function tm(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?!gs(a,n)||!gs(u,o):!0}function am(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 Cs(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 nm(e){ml(e)}function lm(e){console.error(e)}function sm(e){ml(e)}function lc(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function rm(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(){lc(e,t)},a}function im(e){return e=pl(e),e.tag=3,e}function um(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(){rm(t,a,n)}}var x=a.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){rm(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 Gy(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?xc():a.alternate===null&&St===0&&(St=3),a.flags&=-257,a.flags|=65536,a.lanes=u,n===Gu?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===Gu?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),Ud(e,n,u)),!1}throw Error(c(435,a.tag))}return Ud(e,n,u),xc(),!1}if(B)return t=Na.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,n!==ze&&(e=Error(c(422),{cause:n}),nn(fa(e,a)))):(n!==ze&&(t=Error(c(423),{cause:n}),nn(fa(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,n=fa(n,a),u=dd(e.stateNode,n,u),Bo(e,u),St!==4&&(St=2)),!1;var o=Error(c(520),{cause:n});if(o=fa(o,a),Ri===null?Ri=[o]:Ri.push(o),St!==4&&(St=2),t===null)return!0;n=fa(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=im(u),um(u,e,a,n),Bo(a,u),!1}a=a.return}while(a!==null);return!1}var fd=Error(c(461)),_t=!1;function Qt(e,t,a,n){t.child=e===null?fh(t,null,a,n):Es(t,e.child,a,n)}function cm(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 Ss(t),n=Zo(e,t,a,x,o,u),E=Wo(),e!==null&&!_t?(Io(e,t,u),qn(e,t,u)):(B&&E&&y(t),t.flags|=1,Qt(e,t,n,u),t.child)}function om(e,t,a,n,u){if(e===null){var o=a.type;return typeof o=="function"&&!cr(o)&&o.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=o,dm(e,t,o,n,u)):(e=or(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:gs,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 dm(e,t,a,n,u){if(e!==null){var o=e.memoizedProps;if(gs(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 fm(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 hm(e,t,o,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&$u(t,o!==null?o.cachePool:null),o!==null?gh(t,o):$o(),xh(t);else return n=t.lanes=536870912,hm(e,t,o!==null?o.baseLanes|a:a,a,n)}else o!==null?($u(t,o.cachePool),gh(t,o),Sl(),t.memoizedState=null):(e!==null&&$u(t,null),$o(),Sl());return Qt(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 hm(e,t,a,n,u){var o=Lo();return o=o===null?null:{parent:Rt._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&$u(t,null),$o(),xh(t),e!==null&&Ha(e,t,n,!0),t.childLanes=u,null}function sc(e,t){return t=ic({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function mm(e,t,a){return Es(t,e.child,null,a),e=sc(t,t.pendingProps),e.flags|=2,ja(t),t.memoizedState=null,e}function Fy(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=sc(t,n),t.lanes=536870912,wi(null,e);if(Go(t),(e=H)?(e=T0(e,pe),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ha!==null?{id:Ua,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Bu(e),a.return=t,t.child=a,L=t,H=null)):e=null,e===null)throw $e(t);return t.lanes=536870912,null}return sc(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=mm(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),pa(n,e,x),fd;xc(),t=mm(e,t,a)}else e=o.treeContext,H=Va(x.nextSibling),L=t,B=!0,de=null,pe=!1,e!==null&&R(t,e),t=sc(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 rc(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 Ss(t),a=Zo(e,t,a,n,void 0,u),n=Wo(),e!==null&&!_t?(Io(e,t,u),qn(e,t,u)):(B&&n&&y(t),t.flags|=1,Qt(e,t,a,u),t.child)}function gm(e,t,a,n,u,o){return Ss(t),t.updateQueue=null,a=ph(t,n,a,u),yh(e),n=Wo(),e!==null&&!_t?(Io(e,t,o),qn(e,t,o)):(B&&n&&y(t),t.flags|=1,Qt(e,t,a,o),t.child)}function xm(e,t,a,n,u){if(Ss(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,z=Cs(a,E);o.props=z;var Q=o.context,le=a.contextType;x=Sa,typeof le=="object"&&le!==null&&(x=It(le));var ue=a.getDerivedStateFromProps;le=typeof ue=="function"||typeof o.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,le||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(E||Q!==x)&&am(t,o,n,x),yl=!1;var X=t.memoizedState;o.state=X,vi(t,n,o,u),pi(),Q=t.memoizedState,E||X!==Q||yl?(typeof ue=="function"&&(cd(t,a,ue,n),Q=t.memoizedState),(z=yl||tm(t,a,z,n,X,Q,x))?(le||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=Q),o.props=n,o.state=Q,o.context=x,n=z):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,Vo(e,t),x=t.memoizedProps,le=Cs(a,x),o.props=le,ue=t.pendingProps,X=o.context,Q=a.contextType,z=Sa,typeof Q=="object"&&Q!==null&&(z=It(Q)),E=a.getDerivedStateFromProps,(Q=typeof E=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(x!==ue||X!==z)&&am(t,o,n,z),yl=!1,X=t.memoizedState,o.state=X,vi(t,n,o,u),pi();var ae=t.memoizedState;x!==ue||X!==ae||yl||e!==null&&e.dependencies!==null&&fr(e.dependencies)?(typeof E=="function"&&(cd(t,a,E,n),ae=t.memoizedState),(le=yl||tm(t,a,le,n,X,ae,z)||e!==null&&e.dependencies!==null&&fr(e.dependencies))?(Q||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,ae,z),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,ae,z)),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=ae),o.props=n,o.state=ae,o.context=z,n=le):(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,rc(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=Es(t,e.child,null,u),t.child=Es(t,null,a,u)):Qt(e,t,a,u),t.memoizedState=o.state,e=t.child):e=qn(e,t,u),e}function ym(e,t,a,n){return Vt(),t.flags|=256,Qt(e,t,a,n),t.child}var md={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gd(e){return{baseLanes:e,cachePool:rh()}}function xd(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Ea),e}function pm(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=H)?(e=T0(e,pe),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ha!==null?{id:Ua,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Bu(e),a.return=t,t.child=a,L=t,H=null)):e=null,e===null)throw $e(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=ic({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 z=e.memoizedState;if(z!==null&&(E=z.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=ic({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,Es(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 Q=x.dgst;x=Q,n=Error(c(419)),n.stack="",n.digest=x,nn({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!==z.retryLane))throw z.retryLane=n,_a(e,n),pa(x,e,n),fd;Xd(E)||xc(),t=pd(e,t,a)}else Xd(E)?(t.flags|=192,t.child=e.child,t=null):(e=z.treeContext,H=Va(E.nextSibling),L=t,B=!0,de=null,pe=!1,e!==null&&R(t,e),t=yd(t,n.children),t.flags|=4096);return t}return u?(Sl(),E=n.fallback,u=t.mode,z=e.child,Q=z.sibling,n=ka(z,{mode:"hidden",children:n.children}),n.subtreeFlags=z.subtreeFlags&65011712,Q!==null?E=ka(Q,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?(z=Rt._currentValue,u=u.parent!==z?{parent:z,pool:z}:u):u=rh(),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=ic({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ic(e,t){return e=Wt(22,e,null,t),e.lanes=0,e}function pd(e,t,a){return Es(t,e.child,null,a),e=yd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function vm(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 bm(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,ge(Et,x),Qt(e,t,n,a),n=B?an:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&vm(e,a,t);else if(e.tag===19)vm(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&&fr(e)))}function Zy(e,t,a){switch(t.tag){case 3:pt(t,t.stateNode.containerInfo),pn(t,Rt,e.memoizedState.cache),Vt();break;case 27:case 5:sa(t);break;case 4:pt(t,t.stateNode.containerInfo);break;case 10:pn(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?pm(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 bm(e,t,a);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),ge(Et,Et.current),n)break;return null;case 22:return t.lanes=0,fm(e,t,a,t.pendingProps);case 24:pn(t,Rt,e.memoizedState.cache)}return qn(e,t,a)}function Sm(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,Zy(e,t,a);_t=(e.flags&131072)!==0}else _t=!1,B&&(t.flags&1048576)!==0&&h(t,an,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=js(t.elementType),t.type=e,typeof e=="function")cr(e)?(n=Cs(e,n),t.tag=1,t=xm(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=cm(null,t,e,n,a);break e}else if(u===G){t.tag=14,t=om(null,t,e,n,a);break e}}throw t=me(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=Cs(n,t.pendingProps),xm(e,t,n,u,a);case 3:e:{if(pt(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,pn(t,Rt,n),n!==o.cache&&Un(t,[Rt],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=ym(e,t,n,a);break e}else if(n!==u){u=fa(Error(c(424)),t),nn(u),t=ym(e,t,n,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(H=Va(e.firstChild),L=t,B=!0,de=null,pe=!0,a=fh(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Vt(),n===u){t=qn(e,t,a);break e}Qt(e,t,n,a)}t=t.child}return t;case 26:return rc(e,t),e===null?(a=A0(t.type,null,t.pendingProps,null))?t.memoizedState=a:B||(a=t.type,e=t.pendingProps,n=jc(Te.current).createElement(a),n[Nt]=t,n[zt]=e,Xt(n,a,e),Dt(n),t.stateNode=n):t.memoizedState=A0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return sa(t),e===null&&B&&(n=t.stateNode=O0(t.type,t.pendingProps,Te.current),L=t,pe=!0,u=H,Ol(t.type)?(Kd=u,H=Va(n.firstChild)):H=u),Qt(e,t,t.pendingProps.children,a),rc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&B&&((u=n=H)&&(n=jp(n,t.type,t.pendingProps,pe),n!==null?(t.stateNode=n,L=t,H=Va(n.firstChild),pe=!1,u=!0):u=!1),u||$e(t)),sa(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,Hy,null,null,a),qi._currentValue=u),rc(e,t),Qt(e,t,n,a),t.child;case 6:return e===null&&B&&((e=a=H)&&(a=wp(a,t.pendingProps,pe),a!==null?(t.stateNode=a,L=t,H=null,e=!0):e=!1),e||$e(t)),null;case 13:return pm(e,t,a);case 4:return pt(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Es(t,null,n,a):Qt(e,t,n,a),t.child;case 11:return cm(e,t,t.type,t.pendingProps,a);case 7:return Qt(e,t,t.pendingProps,a),t.child;case 8:return Qt(e,t,t.pendingProps.children,a),t.child;case 12:return Qt(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,pn(t,t.type,n.value),Qt(e,t,n.children,a),t.child;case 9:return u=t.type._context,n=t.pendingProps.children,Ss(t),u=It(u),n=n(u),t.flags|=1,Qt(e,t,n,a),t.child;case 14:return om(e,t,t.type,t.pendingProps,a);case 15:return dm(e,t,t.type,t.pendingProps,a);case 19:return bm(e,t,a);case 31:return Fy(e,t,a);case 22:return fm(e,t,a,t.pendingProps);case 24:return Ss(t),n=It(Rt),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),pn(t,Rt,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),pn(t,Rt,n)):(n=o.cache,pn(t,Rt,n),n!==u.cache&&Un(t,[Rt],a,!0))),Qt(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(Wm())e.flags|=8192;else throw ws=Gu,Ho}else e.flags&=-16777217}function Nm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!L0(t))if(Wm())e.flags|=8192;else throw ws=Gu,Ho}function uc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Yr():536870912,e.lanes|=t,wr|=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 dt(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 Wy(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 dt(t),null;case 1:return dt(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ln(Rt),Ke(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(qt(t)?Vn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,yn())),dt(t),null;case 26:var u=t.type,o=t.memoizedState;return e===null?(Vn(t),o!==null?(dt(t),Nm(t,o)):(dt(t),Sd(t,u,null,n,a))):o?o!==e.memoizedState?(Vn(t),dt(t),Nm(t,o)):(dt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Vn(t),dt(t),Sd(t,u,e,n,a)),null;case 27:if(on(t),a=Te.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 dt(t),null}e=xe.current,qt(t)?De(t):(e=O0(u,n,a),t.stateNode=e,Vn(t))}return dt(t),null;case 5:if(on(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 dt(t),null}if(o=xe.current,qt(t))De(t);else{var x=jc(Te.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[zt]=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(Xt(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 dt(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=Te.current,qt(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,u=L,u!==null)switch(u.tag){case 27:case 5:n=u.memoizedProps}e[Nt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||p0(e.nodeValue,a)),e||$e(t,!0)}else e=jc(e).createTextNode(n),e[Nt]=t,t.stateNode=e}return dt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=qt(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 Vt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),e=!1}else a=yn(),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 dt(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=qt(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 Vt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),u=!1}else u=yn(),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),uc(t,t.updateQueue),dt(t),null);case 4:return Ke(),e===null&&$d(t.stateNode.containerInfo),dt(t),null;case 10:return ln(t.type),dt(t),null;case 19:if(ne(Et),n=t.memoizedState,n===null)return dt(t),null;if(u=(t.flags&128)!==0,o=n.rendering,o===null)if(u)Ei(n,!1);else{if(St!==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,uc(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Vu(a,e),a=a.sibling;return ge(Et,Et.current&1|2),B&&i(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Ht()>hc&&(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,uc(t,e),Ei(n,!0),n.tail===null&&n.tailMode==="hidden"&&!o.alternate&&!B)return dt(t),null}else 2*Ht()-n.renderingStartTime>hc&&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=Ht(),e.sibling=null,a=Et.current,ge(Et,u?a&1|2:a&1),B&&i(t,n.treeForkCount),e):(dt(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&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),a=t.updateQueue,a!==null&&uc(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&&ne(Ns),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ln(Rt),dt(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Iy(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 ln(Rt),Ke(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return on(t),null;case 31:if(t.memoizedState!==null){if(ja(t),t.alternate===null)throw Error(c(340));Vt()}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));Vt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(Et),null;case 4:return Ke(),null;case 10:return ln(t.type),null;case 22:case 23:return ja(t),Po(),e!==null&&ne(Ns),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ln(Rt),null;case 25:return null;default:return null}}function jm(e,t){switch(j(t),t.tag){case 3:ln(Rt),Ke();break;case 26:case 27:case 5:on(t);break;case 4:Ke();break;case 31:t.memoizedState!==null&&ja(t);break;case 13:ja(t);break;case 19:ne(Et);break;case 10:ln(t.type);break;case 22:case 23:ja(t),Po(),e!==null&&ne(Ns);break;case 24:ln(Rt)}}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 z=a,Q=E;try{Q()}catch(le){at(u,z,le)}}}n=n.next}while(n!==o)}}catch(le){at(t,t.return,le)}}function wm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{mh(t,a)}catch(n){at(e,e.return,n)}}}function Em(e,t,a){a.props=Cs(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 vn(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 Tm(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;yp(n,e.type,a,t),n[zt]=t}catch(u){at(e,e.return,u)}}function Cm(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||Cm(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=Da));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 cc(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(cc(e,t,a),e=e.sibling;e!==null;)cc(e,t,a),e=e.sibling}function Mm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Xt(t,n,a),t[Nt]=e,t[zt]=a}catch(o){at(e,e.return,o)}}var Bn=!1,kt=!1,Ed=!1,Om=typeof WeakSet=="function"?WeakSet:Set,Bt=null;function Qy(e,t){if(e=e.containerInfo,Fd=Dc,e=Ao(e),nr(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,z=-1,Q=0,le=0,ue=e,X=null;t:for(;;){for(var ae;ue!==a||u!==0&&ue.nodeType!==3||(E=x+u),ue!==o||n!==0&&ue.nodeType!==3||(z=x+n),ue.nodeType===3&&(x+=ue.nodeValue.length),(ae=ue.firstChild)!==null;)X=ue,ue=ae;for(;;){if(ue===e)break t;if(X===a&&++Q===u&&(E=x),X===o&&++le===n&&(z=x),(ae=ue.nextSibling)!==null)break;ue=X,X=ue.parentNode}ue=ae}a=E===-1||z===-1?null:{start:E,end:z}}else a=null}a=a||{start:0,end:0}}else a=null;for(Zd={focusedElem:e,selectionRange:a},Dc=!1,Bt=t;Bt!==null;)if(t=Bt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Bt=e;else for(;Bt!==null;){switch(t=Bt,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=Cs(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)Qd(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(c(163))}if(e=t.sibling,e!==null){e.return=t.return,Bt=e;break}Bt=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=Cs(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){at(a,a.return,x)}}n&64&&wm(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{mh(e,t)}catch(x){at(a,a.return,x)}}break;case 27:t===null&&n&4&&Mm(a);case 26:case 5:$n(e,a),t===null&&n&4&&Tm(a),n&512&&Ci(a,a.return);break;case 12:$n(e,a);break;case 31:$n(e,a),n&4&&_m(e,a);break;case 13:$n(e,a),n&4&&km(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=sp.bind(null,a),Ep(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 Rm(e){var t=e.alternate;t!==null&&(e.alternate=null,Rm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Fs(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var gt=null,ma=!1;function Yn(e,t,a){for(a=a.child;a!==null;)Am(e,t,a),a=a.sibling}function Am(e,t,a){if(Kt&&typeof Kt.onCommitFiberUnmount=="function")try{Kt.onCommitFiberUnmount(vt,a)}catch{}switch(a.tag){case 26:kt||vn(a,t),Yn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:kt||vn(a,t);var n=gt,u=ma;Ol(a.type)&&(gt=a.stateNode,ma=!1),Yn(e,t,a),Ui(a.stateNode),gt=n,ma=u;break;case 5:kt||vn(a,t);case 6:if(n=gt,u=ma,gt=null,Yn(e,t,a),gt=n,ma=u,gt!==null)if(ma)try{(gt.nodeType===9?gt.body:gt.nodeName==="HTML"?gt.ownerDocument.body:gt).removeChild(a.stateNode)}catch(o){at(a,t,o)}else try{gt.removeChild(a.stateNode)}catch(o){at(a,t,o)}break;case 18:gt!==null&&(ma?(e=gt,w0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Ar(e)):w0(gt,a.stateNode));break;case 4:n=gt,u=ma,gt=a.stateNode.containerInfo,ma=!0,Yn(e,t,a),gt=n,ma=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||(vn(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&Em(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 _m(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ar(e)}catch(a){at(t,t.return,a)}}}function km(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ar(e)}catch(a){at(t,t.return,a)}}function Xy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Om),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Om),t;default:throw Error(c(435,e.tag))}}function oc(e,t){var a=Xy(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var u=rp.bind(null,e,n);n.then(u,u)}})}function ga(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)){gt=E.stateNode,ma=!1;break e}break;case 5:gt=E.stateNode,ma=!1;break e;case 3:case 4:gt=E.stateNode.containerInfo,ma=!0;break e}E=E.return}if(gt===null)throw Error(c(160));Am(o,x,u),gt=null,ma=!1,o=u.alternate,o!==null&&(o.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)zm(t,e),t=t.sibling}var sn=null;function zm(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ga(t,e),xa(e),n&4&&(Nl(3,e,e.return),Ti(3,e),Nl(5,e,e.return));break;case 1:ga(t,e),xa(e),n&512&&(kt||a===null||vn(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=sn;if(ga(t,e),xa(e),n&512&&(kt||a===null||vn(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[Ql]||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"))),Xt(o,n,a),o[Nt]=e,Dt(o),n=o;break e;case"link":var x=z0("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),Xt(o,n,a),u.head.appendChild(o);break;case"meta":if(x=z0("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),Xt(o,n,a),u.head.appendChild(o);break;default:throw Error(c(468,n))}o[Nt]=e,Dt(o),n=o}e.stateNode=n}else U0(u,e.type,e.stateNode);else e.stateNode=k0(u,n,e.memoizedProps);else o!==n?(o===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):o.count--,n===null?U0(u,e.type,e.stateNode):k0(u,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Nd(e,e.memoizedProps,a.memoizedProps)}break;case 27:ga(t,e),xa(e),n&512&&(kt||a===null||vn(a,a.return)),a!==null&&n&4&&Nd(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ga(t,e),xa(e),n&512&&(kt||a===null||vn(a,a.return)),e.flags&32){u=e.stateNode;try{Ja(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(ga(t,e),xa(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(Tc=null,u=sn,sn=wc(t.containerInfo),ga(t,e),sn=u,xa(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Ar(t.containerInfo)}catch(ve){at(e,e.return,ve)}Ed&&(Ed=!1,Um(e));break;case 4:n=sn,sn=wc(e.stateNode.containerInfo),ga(t,e),xa(e),sn=n;break;case 12:ga(t,e),xa(e);break;case 31:ga(t,e),xa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,oc(e,n)));break;case 13:ga(t,e),xa(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(fc=Ht()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,oc(e,n)));break;case 22:u=e.memoizedState!==null;var z=a!==null&&a.memoizedState!==null,Q=Bn,le=kt;if(Bn=Q||u,kt=le||z,ga(t,e),kt=le,Bn=Q,xa(e),n&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(a===null||z||Bn||kt||Ms(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){z=a=t;try{if(o=z.stateNode,u)x=o.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{E=z.stateNode;var ue=z.memoizedProps.style,X=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;E.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(ve){at(z,z.return,ve)}}}else if(t.tag===6){if(a===null){z=t;try{z.stateNode.nodeValue=u?"":z.memoizedProps}catch(ve){at(z,z.return,ve)}}}else if(t.tag===18){if(a===null){z=t;try{var ae=z.stateNode;u?E0(ae,!0):E0(z.stateNode,!1)}catch(ve){at(z,z.return,ve)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,oc(e,a))));break;case 19:ga(t,e),xa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,oc(e,n)));break;case 30:break;case 21:break;default:ga(t,e),xa(e)}}function xa(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(Cm(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);cc(e,o,u);break;case 5:var x=a.stateNode;a.flags&32&&(Ja(x,""),a.flags&=-33);var E=jd(e);cc(e,E,x);break;case 3:case 4:var z=a.stateNode.containerInfo,Q=jd(e);wd(e,Q,z);break;default:throw Error(c(161))}}catch(le){at(e,e.return,le)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Um(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Um(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 Ms(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),Ms(t);break;case 1:vn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Em(t,t.return,a),Ms(t);break;case 27:Ui(t.stateNode);case 26:case 5:vn(t,t.return),Ms(t);break;case 22:t.memoizedState===null&&Ms(t);break;case 30:Ms(t);break;default:Ms(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(Q){at(n,n.return,Q)}if(n=o,u=n.updateQueue,u!==null){var E=n.stateNode;try{var z=u.shared.hiddenCallbacks;if(z!==null)for(u.shared.hiddenCallbacks=null,u=0;u<z.length;u++)hh(z[u],E)}catch(Q){at(n,n.return,Q)}}a&&x&64&&wm(o),Ci(o,o.return);break;case 27:Mm(o);case 26:case 5:Pn(u,o,a),a&&n===null&&x&4&&Tm(o),Ci(o,o.return);break;case 12:Pn(u,o,a);break;case 31:Pn(u,o,a),a&&x&4&&_m(u,o);break;case 13:Pn(u,o,a),a&&x&4&&km(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 rn(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Lm(e,t,a,n),t=t.sibling}function Lm(e,t,a,n){var u=t.flags;switch(t.tag){case 0:case 11:case 15:rn(e,t,a,n),u&2048&&Ti(9,t);break;case 1:rn(e,t,a,n);break;case 3:rn(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){rn(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(z){at(t,t.return,z)}}else rn(e,t,a,n);break;case 31:rn(e,t,a,n);break;case 13:rn(e,t,a,n);break;case 23:break;case 22:o=t.stateNode,x=t.alternate,t.memoizedState!==null?o._visibility&2?rn(e,t,a,n):Mi(e,t):o._visibility&2?rn(e,t,a,n):(o._visibility|=2,Sr(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Td(x,t);break;case 24:rn(e,t,a,n),u&2048&&Cd(t.alternate,t);break;default:rn(e,t,a,n)}}function Sr(e,t,a,n,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,x=t,E=a,z=n,Q=x.flags;switch(x.tag){case 0:case 11:case 15:Sr(o,x,E,z,u),Ti(8,x);break;case 23:break;case 22:var le=x.stateNode;x.memoizedState!==null?le._visibility&2?Sr(o,x,E,z,u):Mi(o,x):(le._visibility|=2,Sr(o,x,E,z,u)),u&&Q&2048&&Td(x.alternate,x);break;case 24:Sr(o,x,E,z,u),u&&Q&2048&&Cd(x.alternate,x);break;default:Sr(o,x,E,z,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 Nr(e,t,a){if(e.subtreeFlags&Oi)for(e=e.child;e!==null;)Hm(e,t,a),e=e.sibling}function Hm(e,t,a){switch(e.tag){case 26:Nr(e,t,a),e.flags&Oi&&e.memoizedState!==null&&Lp(a,sn,e.memoizedState,e.memoizedProps);break;case 5:Nr(e,t,a);break;case 3:case 4:var n=sn;sn=wc(e.stateNode.containerInfo),Nr(e,t,a),sn=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Oi,Oi=16777216,Nr(e,t,a),Oi=n):Nr(e,t,a));break;default:Nr(e,t,a)}}function qm(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 Di(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];Bt=n,Bm(n,e)}qm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vm(e),e=e.sibling}function Vm(e){switch(e.tag){case 0:case 11:case 15:Di(e),e.flags&2048&&Nl(9,e,e.return);break;case 3:Di(e);break;case 12:Di(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,dc(e)):Di(e);break;default:Di(e)}}function dc(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];Bt=n,Bm(n,e)}qm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Nl(8,t,t.return),dc(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,dc(t));break;default:dc(t)}e=e.sibling}}function Bm(e,t){for(;Bt!==null;){var a=Bt;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,Bt=n;else e:for(a=e;Bt!==null;){n=Bt;var u=n.sibling,o=n.return;if(Rm(n),n===a){Bt=null;break e}if(u!==null){u.return=o,Bt=u;break e}Bt=o}}}var Jy={getCacheForType:function(e){var t=It(Rt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return It(Rt).controller.signal}},Ky=typeof WeakMap=="function"?WeakMap:Map,Xe=0,ut=null,Ve=null,Pe=0,tt=0,wa=null,jl=!1,jr=!1,Md=!1,Gn=0,St=0,wl=0,Os=0,Od=0,Ea=0,wr=0,Ri=null,ya=null,Dd=!1,fc=0,Ym=0,hc=1/0,mc=null,El=null,Lt=0,Tl=null,Er=null,Fn=0,Rd=0,Ad=null,$m=null,Ai=0,_d=null;function Ta(){return(Xe&2)!==0&&Pe!==0?Pe&-Pe:$.T!==null?qd():Gs()}function Pm(){if(Ea===0)if((Pe&536870912)===0||B){var e=Ys;Ys<<=1,(Ys&3932160)===0&&(Ys=262144),Ea=e}else Ea=536870912;return e=Na.current,e!==null&&(e.flags|=32),Ea}function pa(e,t,a){(e===ut&&(tt===2||tt===9)||e.cancelPendingCommit!==null)&&(Tr(e,0),Cl(e,Pe,Ea,!1)),tl(e,a),((Xe&2)===0||e!==ut)&&(e===ut&&((Xe&2)===0&&(Os|=a),St===4&&Cl(e,Pe,Ea,!1)),bn(e))}function Gm(e,t,a){if((Xe&6)!==0)throw Error(c(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||el(e,t),u=n?ap(e,t):zd(e,t,!0),o=n;do{if(u===0){jr&&!n&&Cl(e,t,0,!1);break}else{if(a=e.current.alternate,o&&!ep(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=Ri;var z=E.current.memoizedState.isDehydrated;if(z&&(Tr(E,x).flags|=256),x=zd(E,x,!1),x!==2){if(Md&&!z){E.errorRecoveryDisabledLanes|=o,Os|=o,u=4;break e}o=ya,ya=u,o!==null&&(ya===null?ya=o:ya.push.apply(ya,o))}u=x}if(o=!1,u!==2)continue}}if(u===1){Tr(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:ya=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(u=fc+300-Ht(),10<u)){if(Cl(n,t,Ea,!jl),Wl(n,0,!0)!==0)break e;Fn=t,n.timeoutHandle=N0(Fm.bind(null,n,a,ya,mc,Dd,t,Ea,Os,wr,jl,o,"Throttled",-0,0),u);break e}Fm(n,a,ya,mc,Dd,t,Ea,Os,wr,jl,o,null,-0,0)}}break}while(!0);bn(e)}function Fm(e,t,a,n,u,o,x,E,z,Q,le,ue,X,ae){if(e.timeoutHandle=-1,ue=t.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Da},Hm(t,o,ue);var ve=(o&62914560)===o?fc-Ht():(o&4194048)===o?Ym-Ht():0;if(ve=Hp(ue,ve),ve!==null){Fn=o,e.cancelPendingCommit=ve(e0.bind(null,e,t,o,a,n,u,x,E,z,le,ue,null,X,ae)),Cl(e,o,x,!Q);return}}e0(e,t,o,a,n,u,x,E,z)}function ep(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(!aa(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&=~Os,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var u=t;0<u;){var o=31-Pt(u),x=1<<o;n[o]=-1,u&=~x}a!==0&&ct(e,a,t)}function gc(){return(Xe&6)===0?(_i(0),!1):!0}function kd(){if(Ve!==null){if(tt===0)var e=Ve.return;else e=Ve,La=zn=null,Qo(e),xr=null,gi=0,e=Ve;for(;e!==null;)jm(e.alternate,e),e=e.return;Ve=null}}function Tr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,bp(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Fn=0,kd(),ut=e,Ve=a=ka(e.current,null),Pe=t,tt=0,wa=null,jl=!1,jr=el(e,t),Md=!1,wr=Ea=Od=Os=wl=St=0,ya=Ri=null,Dd=!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-Pt(n),o=1<<u;t|=e[u],n&=~o}return Gn=t,gl(),a}function Zm(e,t){Le=null,$.H=ji,t===gr||t===Pu?(t=ch(),tt=3):t===Ho?(t=ch(),tt=4):tt=t===fd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,wa=t,Ve===null&&(St=1,lc(e,fa(t,e.current)))}function Wm(){var e=Na.current;return e===null?!0:(Pe&4194048)===Pe?qa===null:(Pe&62914560)===Pe||(Pe&536870912)!==0?e===qa:!1}function Im(){var e=$.H;return $.H=ji,e===null?ji:e}function Qm(){var e=$.A;return $.A=Jy,e}function xc(){St=4,jl||(Pe&4194048)!==Pe&&Na.current!==null||(jr=!0),(wl&134217727)===0&&(Os&134217727)===0||ut===null||Cl(ut,Pe,Ea,!1)}function zd(e,t,a){var n=Xe;Xe|=2;var u=Im(),o=Qm();(ut!==e||Pe!==t)&&(mc=null,Tr(e,t)),t=!1;var x=St;e:do try{if(tt!==0&&Ve!==null){var E=Ve,z=wa;switch(tt){case 8:kd(),x=6;break e;case 3:case 2:case 9:case 6:Na.current===null&&(t=!0);var Q=tt;if(tt=0,wa=null,Cr(e,E,z,Q),a&&jr){x=0;break e}break;default:Q=tt,tt=0,wa=null,Cr(e,E,z,Q)}}tp(),x=St;break}catch(le){Zm(e,le)}while(!0);return t&&e.shellSuspendCounter++,La=zn=null,Xe=n,$.H=u,$.A=o,Ve===null&&(ut=null,Pe=0,gl()),x}function tp(){for(;Ve!==null;)Xm(Ve)}function ap(e,t){var a=Xe;Xe|=2;var n=Im(),u=Qm();ut!==e||Pe!==t?(mc=null,hc=Ht()+500,Tr(e,t)):jr=el(e,t);e:do try{if(tt!==0&&Ve!==null){t=Ve;var o=wa;t:switch(tt){case 1:tt=0,wa=null,Cr(e,t,o,1);break;case 2:case 9:if(ih(o)){tt=0,wa=null,Jm(t);break}t=function(){tt!==2&&tt!==9||ut!==e||(tt=7),bn(e)},o.then(t,t);break e;case 3:tt=7;break e;case 4:tt=5;break e;case 7:ih(o)?(tt=0,wa=null,Jm(t)):(tt=0,wa=null,Cr(e,t,o,7));break;case 5:var x=null;switch(Ve.tag){case 26:x=Ve.memoizedState;case 5:case 27:var E=Ve;if(x?L0(x):E.stateNode.complete){tt=0,wa=null;var z=E.sibling;if(z!==null)Ve=z;else{var Q=E.return;Q!==null?(Ve=Q,yc(Q)):Ve=null}break t}}tt=0,wa=null,Cr(e,t,o,5);break;case 6:tt=0,wa=null,Cr(e,t,o,6);break;case 8:kd(),St=6;break e;default:throw Error(c(462))}}np();break}catch(le){Zm(e,le)}while(!0);return La=zn=null,$.H=n,$.A=u,Xe=a,Ve!==null?0:(ut=null,Pe=0,gl(),St)}function np(){for(;Ve!==null&&!Vs();)Xm(Ve)}function Xm(e){var t=Sm(e.alternate,e,Gn);e.memoizedProps=e.pendingProps,t===null?yc(e):Ve=t}function Jm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=gm(a,t,t.pendingProps,t.type,void 0,Pe);break;case 11:t=gm(a,t,t.pendingProps,t.type.render,t.ref,Pe);break;case 5:Qo(t);default:jm(a,t),t=Ve=Vu(t,Gn),t=Sm(a,t,Gn)}e.memoizedProps=e.pendingProps,t===null?yc(e):Ve=t}function Cr(e,t,a,n){La=zn=null,Qo(t),xr=null,gi=0;var u=t.return;try{if(Gy(e,u,t,a,Pe)){St=1,lc(e,fa(a,e.current)),Ve=null;return}}catch(o){if(u!==null)throw Ve=u,o;St=1,lc(e,fa(a,e.current)),Ve=null;return}t.flags&32768?(B||n===1?e=!0:jr||(Pe&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))),Km(t,e)):yc(t)}function yc(e){var t=e;do{if((t.flags&32768)!==0){Km(t,jl);return}e=t.return;var a=Wy(t.alternate,t,Gn);if(a!==null){Ve=a;return}if(t=t.sibling,t!==null){Ve=t;return}Ve=t=e}while(t!==null);St===0&&(St=5)}function Km(e,t){do{var a=Iy(e.alternate,e);if(a!==null){a.flags&=32767,Ve=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ve=e;return}Ve=e=a}while(e!==null);St=6,Ve=null}function e0(e,t,a,n,u,o,x,E,z){e.cancelPendingCommit=null;do pc();while(Lt!==0);if((Xe&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(o=t.lanes|t.childLanes,o|=ys,fu(e,a,o,x,E,z),e===ut&&(Ve=ut=null,Pe=0),Er=t,Tl=e,Fn=a,Rd=o,Ad=u,$m=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,ip(Jt,function(){return s0(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=$.T,$.T=null,u=se.p,se.p=2,x=Xe,Xe|=4;try{Qy(e,t,a)}finally{Xe=x,se.p=u,$.T=n}}Lt=1,t0(),a0(),n0()}}function t0(){if(Lt===1){Lt=0;var e=Tl,t=Er,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=$.T,$.T=null;var n=se.p;se.p=2;var u=Xe;Xe|=4;try{zm(t,e);var o=Zd,x=Ao(e.containerInfo),E=o.focusedElem,z=o.selectionRange;if(x!==E&&E&&E.ownerDocument&&We(E.ownerDocument.documentElement,E)){if(z!==null&&nr(E)){var Q=z.start,le=z.end;if(le===void 0&&(le=Q),"selectionStart"in E)E.selectionStart=Q,E.selectionEnd=Math.min(le,E.value.length);else{var ue=E.ownerDocument||document,X=ue&&ue.defaultView||window;if(X.getSelection){var ae=X.getSelection(),ve=E.textContent.length,Ae=Math.min(z.start,ve),rt=z.end===void 0?Ae:Math.min(z.end,ve);!ae.extend&&Ae>rt&&(x=rt,rt=Ae,Ae=x);var F=ku(E,Ae),V=ku(E,rt);if(F&&V&&(ae.rangeCount!==1||ae.anchorNode!==F.node||ae.anchorOffset!==F.offset||ae.focusNode!==V.node||ae.focusOffset!==V.offset)){var I=ue.createRange();I.setStart(F.node,F.offset),ae.removeAllRanges(),Ae>rt?(ae.addRange(I),ae.extend(V.node,V.offset)):(I.setEnd(V.node,V.offset),ae.addRange(I))}}}}for(ue=[],ae=E;ae=ae.parentNode;)ae.nodeType===1&&ue.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<ue.length;E++){var re=ue[E];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}Dc=!!Fd,Zd=Fd=null}finally{Xe=u,se.p=n,$.T=a}}e.current=t,Lt=2}}function a0(){if(Lt===2){Lt=0;var e=Tl,t=Er,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=$.T,$.T=null;var n=se.p;se.p=2;var u=Xe;Xe|=4;try{Dm(e,t.alternate,t)}finally{Xe=u,se.p=n,$.T=a}}Lt=3}}function n0(){if(Lt===4||Lt===3){Lt=0,Bs();var e=Tl,t=Er,a=Fn,n=$m;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Lt=5:(Lt=0,Er=Tl=null,l0(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(El=null),ta(a),t=t.stateNode,Kt&&typeof Kt.onCommitFiberRoot=="function")try{Kt.onCommitFiberRoot(vt,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=$.T,u=se.p,se.p=2,$.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{$.T=t,se.p=u}}(Fn&3)!==0&&pc(),bn(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===_d?Ai++:(Ai=0,_d=e):Ai=0,_i(0)}}function l0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,hi(t)))}function pc(){return t0(),a0(),n0(),s0()}function s0(){if(Lt!==5)return!1;var e=Tl,t=Rd;Rd=0;var a=ta(Fn),n=$.T,u=se.p;try{se.p=32>a?32:a,$.T=null,a=Ad,Ad=null;var o=Tl,x=Fn;if(Lt=0,Er=Tl=null,Fn=0,(Xe&6)!==0)throw Error(c(331));var E=Xe;if(Xe|=4,Vm(o.current),Lm(o,o.current,x,a),Xe=E,_i(0,!1),Kt&&typeof Kt.onPostCommitFiberRoot=="function")try{Kt.onPostCommitFiberRoot(vt,o)}catch{}return!0}finally{se.p=u,$.T=n,l0(e,t)}}function r0(e,t,a){t=fa(a,t),t=dd(e.stateNode,t,2),e=vl(e,t,2),e!==null&&(tl(e,2),bn(e))}function at(e,t,a){if(e.tag===3)r0(e,e,a);else for(;t!==null;){if(t.tag===3){r0(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(El===null||!El.has(n))){e=fa(a,e),a=im(2),n=vl(t,a,2),n!==null&&(um(a,n,t,e),tl(n,2),bn(n));break}}t=t.return}}function Ud(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new Ky;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=lp.bind(null,e,t,a),t.then(e,e))}function lp(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ut===e&&(Pe&a)===a&&(St===4||St===3&&(Pe&62914560)===Pe&&300>Ht()-fc?(Xe&2)===0&&Tr(e,0):Od|=a,wr===Pe&&(wr=0)),bn(e)}function i0(e,t){t===0&&(t=Yr()),e=_a(e,t),e!==null&&(tl(e,t),bn(e))}function sp(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),i0(e,a)}function rp(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),i0(e,a)}function ip(e,t){return Ot(e,t)}var vc=null,Mr=null,Ld=!1,bc=!1,Hd=!1,Ml=0;function bn(e){e!==Mr&&e.next===null&&(Mr===null?vc=Mr=e:Mr=Mr.next=e),bc=!0,Ld||(Ld=!0,cp())}function _i(e,t){if(!Hd&&bc){Hd=!0;do for(var a=!1,n=vc;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-Pt(42|e)+1)-1,o&=u&~(x&~E),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(a=!0,d0(n,o))}else o=Pe,o=Wl(n,n===ut?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(o&3)===0||el(n,o)||(a=!0,d0(n,o));n=n.next}while(a);Hd=!1}}function up(){u0()}function u0(){bc=Ld=!1;var e=0;Ml!==0&&vp()&&(e=Ml);for(var t=Ht(),a=null,n=vc;n!==null;){var u=n.next,o=c0(n,t);o===0?(n.next=null,a===null?vc=u:a.next=u,u===null&&(Mr=a)):(a=n,(e!==0||(o&3)!==0)&&(bc=!0)),n=u}Lt!==0&&Lt!==5||_i(e),Ml!==0&&(Ml=0)}function c0(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,u=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var x=31-Pt(o),E=1<<x,z=u[x];z===-1?((E&a)===0||(E&n)!==0)&&(u[x]=du(E,t)):z<=t&&(e.expiredLanes|=E),o&=~E}if(t=ut,a=Pe,a=Wl(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&&Za(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&&Za(n),ta(a)){case 2:case 8:a=Zl;break;case 32:a=Jt;break;case 268435456:a=wn;break;default:a=Jt}return n=o0.bind(null,e),a=Ot(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Za(n),e.callbackPriority=2,e.callbackNode=null,2}function o0(e,t){if(Lt!==0&&Lt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(pc()&&e.callbackNode!==a)return null;var n=Pe;return n=Wl(e,e===ut?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Gm(e,n,t),c0(e,Ht()),e.callbackNode!=null&&e.callbackNode===a?o0.bind(null,e):null)}function d0(e,t){if(pc())return null;Gm(e,t,!0)}function cp(){Sp(function(){(Xe&6)!==0?Ot(Fl,up):u0()})}function qd(){if(Ml===0){var e=hr;e===0&&(e=Kn,Kn<<=1,(Kn&261888)===0&&(Kn=256)),Ml=e}return Ml}function f0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:as(""+e)}function h0(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 op(e,t,a,n,u){if(t==="submit"&&a&&a.stateNode===u){var o=f0((u[zt]||null).action),x=n.submitter;x&&(t=(t=x[zt]||null)?f0(t.formAction):x.getAttribute("formAction"),t!==null&&(o=t,x=null));var E=new rs("action","action",null,n,u);e.push({event:E,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Ml!==0){var z=x?h0(u,x):new FormData(u);sd(a,{pending:!0,data:z,method:u.method,action:o},null,z)}}else typeof o=="function"&&(E.preventDefault(),z=x?h0(u,x):new FormData(u),sd(a,{pending:!0,data:z,method:u.method,action:o},o,z))},currentTarget:u}]})}}for(var Vd=0;Vd<ci.length;Vd++){var Bd=ci[Vd],dp=Bd.toLowerCase(),fp=Bd[0].toUpperCase()+Bd.slice(1);da(dp,"on"+fp)}da(Lu,"onAnimationEnd"),da(Hu,"onAnimationIteration"),da(rr,"onAnimationStart"),da("dblclick","onDoubleClick"),da("focusin","onFocus"),da("focusout","onBlur"),da(_o,"onTransitionRun"),da(ko,"onTransitionStart"),da(qu,"onTransitionCancel"),da(ii,"onTransitionEnd"),al("onMouseEnter",["mouseout","mouseover"]),al("onMouseLeave",["mouseout","mouseover"]),al("onPointerEnter",["pointerout","pointerover"]),al("onPointerLeave",["pointerout","pointerover"]),fn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fn("onBeforeInput",["compositionend","keypress","textInput","paste"]),fn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fn("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(" "),hp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ki));function m0(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],z=E.instance,Q=E.currentTarget;if(E=E.listener,z!==o&&u.isPropagationStopped())break e;o=E,u.currentTarget=Q;try{o(u)}catch(le){ml(le)}u.currentTarget=null,o=z}else for(x=0;x<n.length;x++){if(E=n[x],z=E.instance,Q=E.currentTarget,E=E.listener,z!==o&&u.isPropagationStopped())break e;o=E,u.currentTarget=Q;try{o(u)}catch(le){ml(le)}u.currentTarget=null,o=z}}}}function Be(e,t){var a=t[Il];a===void 0&&(a=t[Il]=new Set);var n=e+"__bubble";a.has(n)||(g0(t,e,2,!1),a.add(n))}function Yd(e,t,a){var n=0;t&&(n|=4),g0(a,e,n,t)}var Sc="_reactListening"+Math.random().toString(36).slice(2);function $d(e){if(!e[Sc]){e[Sc]=!0,xu.forEach(function(a){a!=="selectionchange"&&(hp.has(a)||Yd(a,!1,e),Yd(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sc]||(t[Sc]=!0,Yd("selectionchange",!1,t))}}function g0(e,t,a,n){switch(P0(t)){case 2:var u=Bp;break;case 8:u=Yp;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 z=x.tag;if((z===3||z===4)&&x.stateNode.containerInfo===u)return;x=x.return}for(;E!==null;){if(x=Tn(E),x===null)return;if(z=x.tag,z===5||z===6||z===26||z===27){n=o=x;continue e}E=E.parentNode}}n=n.return}Xr(function(){var Q=o,le=Xs(a),ue=[];e:{var X=ui.get(e);if(X!==void 0){var ae=rs,ve=e;switch(e){case"keypress":if(ss(a)===0)break e;case"keydown":case"keyup":ae=po;break;case"focusin":ve="focus",ae=ar;break;case"focusout":ve="blur",ae=ar;break;case"beforeblur":case"afterblur":ae=ar;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=Nu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=uo;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=So;break;case Lu:case Hu:case rr:ae=rl;break;case ii:ae=No;break;case"scroll":case"scrollend":ae=Kr;break;case"wheel":ae=wo;break;case"copy":case"cut":case"paste":ae=il;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=ju;break;case"toggle":case"beforetoggle":ae=To}var Ae=(t&4)!==0,rt=!Ae&&(e==="scroll"||e==="scrollend"),F=Ae?X!==null?X+"Capture":null:X;Ae=[];for(var V=Q,I;V!==null;){var re=V;if(I=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||I===null||F===null||(re=ns(V,F),re!=null&&Ae.push(zi(V,re,I))),rt)break;V=V.return}0<Ae.length&&(X=new ae(X,ve,null,a,le),ue.push({event:X,listeners:Ae}))}}if((t&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",X&&a!==Ir&&(ve=a.relatedTarget||a.fromElement)&&(Tn(ve)||ve[En]))break e;if((ae||X)&&(X=le.window===le?le:(X=le.ownerDocument)?X.defaultView||X.parentWindow:window,ae?(ve=a.relatedTarget||a.toElement,ae=Q,ve=ve?Tn(ve):null,ve!==null&&(rt=m(ve),Ae=ve.tag,ve!==rt||Ae!==5&&Ae!==27&&Ae!==6)&&(ve=null)):(ae=null,ve=Q),ae!==ve)){if(Ae=Nu,re="onMouseLeave",F="onMouseEnter",V="mouse",(e==="pointerout"||e==="pointerover")&&(Ae=ju,re="onPointerLeave",F="onPointerEnter",V="pointer"),rt=ae==null?X:ca(ae),I=ve==null?X:ca(ve),X=new Ae(re,V+"leave",ae,a,le),X.target=rt,X.relatedTarget=I,re=null,Tn(le)===Q&&(Ae=new Ae(F,V+"enter",ve,a,le),Ae.target=I,Ae.relatedTarget=rt,re=Ae),rt=re,ae&&ve)t:{for(Ae=mp,F=ae,V=ve,I=0,re=F;re;re=Ae(re))I++;re=0;for(var Ee=V;Ee;Ee=Ae(Ee))re++;for(;0<I-re;)F=Ae(F),I--;for(;0<re-I;)V=Ae(V),re--;for(;I--;){if(F===V||V!==null&&F===V.alternate){Ae=F;break t}F=Ae(F),V=Ae(V)}Ae=null}else Ae=null;ae!==null&&x0(ue,X,ae,Ae,!1),ve!==null&&rt!==null&&x0(ue,rt,ve,Ae,!0)}}e:{if(X=Q?ca(Q):window,ae=X.nodeName&&X.nodeName.toLowerCase(),ae==="select"||ae==="input"&&X.type==="file")var Ie=Au;else if(Ru(X))if(xn)Ie=ot;else{Ie=dl;var be=Ye}else ae=X.nodeName,!ae||ae.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Q&&Qs(Q.elementType)&&(Ie=Au):Ie=Ro;if(Ie&&(Ie=Ie(e,Q))){ti(ue,Ie,a,le);break e}be&&be(e,X,Q),e==="focusout"&&Q&&X.type==="number"&&Q.memoizedProps.value!=null&&Jl(X,"number",X.value)}switch(be=Q?ca(Q):window,e){case"focusin":(Ru(be)||be.contentEditable==="true")&&(fl=be,lr=Q,Zt=null);break;case"focusout":Zt=lr=fl=null;break;case"mousedown":sr=!0;break;case"contextmenu":case"mouseup":case"dragend":sr=!1,xs(ue,a,le);break;case"selectionchange":if(zu)break;case"keydown":case"keyup":xs(ue,a,le)}var He;if(ei)e:{switch(e){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else cl?Ou(e,a)&&(Ge="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ge="onCompositionStart");Ge&&(Tu&&a.locale!=="ko"&&(cl||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&cl&&(He=Ut()):(mn=le,Js="value"in mn?mn.value:mn.textContent,cl=!0)),be=Nc(Q,Ge),0<be.length&&(Ge=new ul(Ge,e,null,a,le),ue.push({event:Ge,listeners:be}),He?Ge.data=He:(He=Du(a),He!==null&&(Ge.data=He)))),(He=Co?Mo(e,a):Oo(e,a))&&(Ge=Nc(Q,"onBeforeInput"),0<Ge.length&&(be=new ul("onBeforeInput","beforeinput",null,a,le),ue.push({event:be,listeners:Ge}),be.data=He)),op(ue,e,Q,a,le)}m0(ue,t)})}function zi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Nc(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=ns(e,a),u!=null&&n.unshift(zi(e,u,o)),u=ns(e,t),u!=null&&n.push(zi(e,u,o))),e.tag===3)return n;e=e.return}return[]}function mp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function x0(e,t,a,n,u){for(var o=t._reactName,x=[];a!==null&&a!==n;){var E=a,z=E.alternate,Q=E.stateNode;if(E=E.tag,z!==null&&z===n)break;E!==5&&E!==26&&E!==27||Q===null||(z=Q,u?(Q=ns(a,o),Q!=null&&x.unshift(zi(a,Q,z))):u||(Q=ns(a,o),Q!=null&&x.push(zi(a,Q,z)))),a=a.return}x.length!==0&&e.push({event:t,listeners:x})}var gp=/\r\n?/g,xp=/\u0000|\uFFFD/g;function y0(e){return(typeof e=="string"?e:""+e).replace(gp,`
49
- `).replace(xp,"")}function p0(e,t){return t=y0(t),y0(e)===t}function st(e,t,a,n,u,o){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||Ja(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&Ja(e,""+n);break;case"className":Zs(e,"class",n);break;case"tabIndex":Zs(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Zs(e,a,n);break;case"style":vu(e,n,o);break;case"data":if(t!=="object"){Zs(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=as(""+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=as(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Da);break;case"onScroll":n!=null&&Be("scroll",e);break;case"onScrollEnd":n!=null&&Be("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=as(""+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":Be("beforetoggle",e),Be("toggle",e),Gt(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":Gt(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=ro.get(a)||a,Gt(e,a,n))}}function Gd(e,t,a,n,u,o){switch(a){case"style":vu(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"?Ja(e,n):(typeof n=="number"||typeof n=="bigint")&&Ja(e,""+n);break;case"onScroll":n!=null&&Be("scroll",e);break;case"onScrollEnd":n!=null&&Be("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Da);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!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[zt]||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,""):Gt(e,a,n)}}}function Xt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",e),Be("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":Be("invalid",e);var E=o=x=u=null,z=null,Q=null;for(n in a)if(a.hasOwnProperty(n)){var le=a[n];if(le!=null)switch(n){case"name":u=le;break;case"type":x=le;break;case"checked":z=le;break;case"defaultChecked":Q=le;break;case"value":o=le;break;case"defaultValue":E=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(c(137,t));break;default:st(e,t,n,le,a,null)}}ll(e,o,E,z,Q,x,u,!1);return;case"select":Be("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":Be("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(z in a)if(a.hasOwnProperty(z)&&(n=a[z],n!=null))switch(z){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:st(e,t,z,n,a,null)}return;case"dialog":Be("beforetoggle",e),Be("toggle",e),Be("cancel",e),Be("close",e);break;case"iframe":case"object":Be("load",e);break;case"video":case"audio":for(n=0;n<ki.length;n++)Be(ki[n],e);break;case"image":Be("error",e),Be("load",e);break;case"details":Be("toggle",e);break;case"embed":case"source":case"link":Be("error",e),Be("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in a)if(a.hasOwnProperty(Q)&&(n=a[Q],n!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:st(e,t,Q,n,a,null)}return;default:if(Qs(t)){for(le in a)a.hasOwnProperty(le)&&(n=a[le],n!==void 0&&Gd(e,t,le,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 yp(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,z=null,Q=null,le=null;for(ae in a){var ue=a[ae];if(a.hasOwnProperty(ae)&&ue!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":z=ue;default:n.hasOwnProperty(ae)||st(e,t,ae,null,n,ue)}}for(var X in n){var ae=n[X];if(ue=a[X],n.hasOwnProperty(X)&&(ae!=null||ue!=null))switch(X){case"type":o=ae;break;case"name":u=ae;break;case"checked":Q=ae;break;case"defaultChecked":le=ae;break;case"value":x=ae;break;case"defaultValue":E=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(c(137,t));break;default:ae!==ue&&st(e,t,X,ae,n,ue)}}Is(e,x,E,z,Q,le,o,u);return;case"select":ae=x=E=X=null;for(o in a)if(z=a[o],a.hasOwnProperty(o)&&z!=null)switch(o){case"value":break;case"multiple":ae=z;default:n.hasOwnProperty(o)||st(e,t,o,null,n,z)}for(u in n)if(o=n[u],z=a[u],n.hasOwnProperty(u)&&(o!=null||z!=null))switch(u){case"value":X=o;break;case"defaultValue":E=o;break;case"multiple":x=o;default:o!==z&&st(e,t,u,o,n,z)}t=E,a=x,n=ae,X!=null?Mn(e,!!a,X,!1):!!n!=!!a&&(t!=null?Mn(e,!!a,t,!0):Mn(e,!!a,a?[]:"",!1));return;case"textarea":ae=X=null;for(E in a)if(u=a[E],a.hasOwnProperty(E)&&u!=null&&!n.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default: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":ae=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)}Kl(e,X,ae);return;case"option":for(var ve in a)if(X=a[ve],a.hasOwnProperty(ve)&&X!=null&&!n.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:st(e,t,ve,null,n,X)}for(z in n)if(X=n[z],ae=a[z],n.hasOwnProperty(z)&&X!==ae&&(X!=null||ae!=null))switch(z){case"selected":e.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:st(e,t,z,X,n,ae)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ae in a)X=a[Ae],a.hasOwnProperty(Ae)&&X!=null&&!n.hasOwnProperty(Ae)&&st(e,t,Ae,null,n,X);for(Q in n)if(X=n[Q],ae=a[Q],n.hasOwnProperty(Q)&&X!==ae&&(X!=null||ae!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(c(137,t));break;default:st(e,t,Q,X,n,ae)}return;default:if(Qs(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(le in n)X=n[le],ae=a[le],!n.hasOwnProperty(le)||X===ae||X===void 0&&ae===void 0||Gd(e,t,le,X,n,ae);return}}for(var F in a)X=a[F],a.hasOwnProperty(F)&&X!=null&&!n.hasOwnProperty(F)&&st(e,t,F,null,n,X);for(ue in n)X=n[ue],ae=a[ue],!n.hasOwnProperty(ue)||X===ae||X==null&&ae==null||st(e,t,ue,X,n,ae)}function v0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function pp(){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&&v0(x)){for(x=0,E=u.responseEnd,n+=1;n<a.length;n++){var z=a[n],Q=z.startTime;if(Q>E)break;var le=z.transferSize,ue=z.initiatorType;le&&v0(ue)&&(z=z.responseEnd,x+=le*(z<E?1:(E-Q)/(z-Q)))}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 jc(e){return e.nodeType===9?e:e.ownerDocument}function b0(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 S0(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 Id=null;function vp(){var e=window.event;return e&&e.type==="popstate"?e===Id?!1:(Id=e,!0):(Id=null,!1)}var N0=typeof setTimeout=="function"?setTimeout:void 0,bp=typeof clearTimeout=="function"?clearTimeout:void 0,j0=typeof Promise=="function"?Promise:void 0,Sp=typeof queueMicrotask=="function"?queueMicrotask:typeof j0<"u"?function(e){return j0.resolve(null).then(e).catch(Np)}:N0;function Np(e){setTimeout(function(){throw e})}function Ol(e){return e==="head"}function w0(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),Ar(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[Ql]||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);Ar(t)}function E0(e,t){var a=e;e=0;do{var n=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=n}while(a)}function Qd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Qd(a),Fs(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function jp(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[Ql])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 wp(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 T0(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 Ep(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 C0(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 M0(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 O0(e,t,a){switch(t=jc(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]);Fs(e)}var Ba=new Map,D0=new Set;function wc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Zn=se.d;se.d={f:Tp,r:Cp,D:Mp,C:Op,L:Dp,m:Rp,X:_p,S:Ap,M:kp};function Tp(){var e=Zn.f(),t=gc();return e||t}function Cp(e){var t=Ce(e);t!==null&&t.tag===5&&t.type==="form"?Zh(t):Zn.r(e)}var Or=typeof document>"u"?null:document;function R0(e,t,a){var n=Or;if(n&&typeof t=="string"&&t){var u=Ft(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"),Xt(t,"link",e),Dt(t),n.head.appendChild(t)))}}function Mp(e){Zn.D(e),R0("dns-prefetch",e,null)}function Op(e,t){Zn.C(e,t),R0("preconnect",e,t)}function Dp(e,t,a){Zn.L(e,t,a);var n=Or;if(n&&e&&t){var u='link[rel="preload"][as="'+Ft(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+Ft(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+Ft(a.imageSizes)+'"]')):u+='[href="'+Ft(e)+'"]';var o=u;switch(t){case"style":o=Dr(e);break;case"script":o=Rr(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"),Xt(t,"link",e),Dt(t),n.head.appendChild(t)))}}function Rp(e,t){Zn.m(e,t);var a=Or;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Ft(n)+'"][href="'+Ft(e)+'"]',o=u;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Rr(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"),Xt(n,"link",e),Dt(n),a.head.appendChild(n)}}}function Ap(e,t,a){Zn.S(e,t,a);var n=Or;if(n&&e){var u=Qa(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 z=x=n.createElement("link");Dt(z),Xt(z,"link",e),z._p=new Promise(function(Q,le){z.onload=Q,z.onerror=le}),z.addEventListener("load",function(){E.loading|=1}),z.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Ec(x,t,n)}x={type:"stylesheet",instance:x,count:1,state:E},u.set(o,x)}}}function _p(e,t){Zn.X(e,t);var a=Or;if(a&&e){var n=Qa(a).hoistableScripts,u=Rr(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"),Dt(o),Xt(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(u,o))}}function kp(e,t){Zn.M(e,t);var a=Or;if(a&&e){var n=Qa(a).hoistableScripts,u=Rr(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"),Dt(o),Xt(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},n.set(u,o))}}function A0(e,t,a,n){var u=(u=Te.current)?wc(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=Qa(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=Qa(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||zp(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=Rr(a),a=Qa(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="'+Ft(e)+'"'}function Li(e){return'link[rel="stylesheet"]['+e+"]"}function _0(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function zp(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}),Xt(t,"link",a),Dt(t),e.head.appendChild(t))}function Rr(e){return'[src="'+Ft(e)+'"]'}function Hi(e){return"script[async]"+e}function k0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Ft(a.href)+'"]');if(n)return t.instance=n,Dt(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"),Dt(n),Xt(n,"style",u),Ec(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,Dt(o),o;n=_0(a),(u=Ba.get(u))&&ef(n,u),o=(e.ownerDocument||e).createElement("link"),Dt(o);var x=o;return x._p=new Promise(function(E,z){x.onload=E,x.onerror=z}),Xt(o,"link",n),t.state.loading|=4,Ec(o,a.precedence,e),t.instance=o;case"script":return o=Rr(a.src),(u=e.querySelector(Hi(o)))?(t.instance=u,Dt(u),u):(n=a,(u=Ba.get(o))&&(n=T({},a),tf(n,u)),e=e.ownerDocument||e,u=e.createElement("script"),Dt(u),Xt(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,Ec(n,a.precedence,e));return t.instance}function Ec(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 Tc=null;function z0(e,t,a){if(Tc===null){var n=new Map,u=Tc=new Map;u.set(a,n)}else u=Tc,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[Ql]||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 U0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Up(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 L0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Lp(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=Cc.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=o,Dt(o);return}o=t.ownerDocument||t,n=_0(n),(u=Ba.get(u))&&ef(n,u),o=o.createElement("link"),Dt(o);var x=o;x._p=new Promise(function(E,z){x.onload=E,x.onerror=z}),Xt(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=Cc.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var af=0;function Hp(e,t){return e.stylesheets&&e.count===0&&Oc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Oc(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&af===0&&(af=62500*pp());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Oc(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 Cc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Oc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Mc=null;function Oc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Mc=new Map,t.forEach(qp,e),Mc=null,Cc.call(e))}function qp(e,t){if(!(t.state.loading&4)){var a=Mc.get(e);if(a)var n=a.get(null);else{a=new Map,Mc.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=Cc.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:K,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function Vp(e,t,a,n,u,o,x,E,z){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=$s(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$s(0),this.hiddenUpdates=$s(null),this.identifierPrefix=n,this.onUncaughtError=u,this.onCaughtError=o,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function H0(e,t,a,n,u,o,x,E,z,Q,le,ue){return e=new Vp(e,t,a,x,z,Q,le,ue,E),t=1,o===!0&&(t|=24),o=Wt(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 q0(e){return e?(e=Sa,e):Sa}function V0(e,t,a,n,u,o){u=q0(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&&(pa(a,e,t),yi(a,e,t))}function B0(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){B0(e,t),(e=e.alternate)&&B0(e,t)}function Y0(e){if(e.tag===13||e.tag===31){var t=_a(e,67108864);t!==null&&pa(t,e,67108864),nf(e,67108864)}}function $0(e){if(e.tag===13||e.tag===31){var t=Ta();t=Ps(t);var a=_a(e,t);a!==null&&pa(a,e,t),nf(e,t)}}var Dc=!0;function Bp(e,t,a,n){var u=$.T;$.T=null;var o=se.p;try{se.p=2,lf(e,t,a,n)}finally{se.p=o,$.T=u}}function Yp(e,t,a,n){var u=$.T;$.T=null;var o=se.p;try{se.p=8,lf(e,t,a,n)}finally{se.p=o,$.T=u}}function lf(e,t,a,n){if(Dc){var u=sf(n);if(u===null)Pd(e,t,n,Rc,a),G0(e,n);else if(Pp(u,e,t,a,n))n.stopPropagation();else if(G0(e,n),t&4&&-1<$p.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=dn(o.pendingLanes);if(x!==0){var E=o;for(E.pendingLanes|=2,E.entangledLanes|=2;x;){var z=1<<31-Pt(x);E.entanglements[1]|=z,x&=~z}bn(o),(Xe&6)===0&&(hc=Ht()+500,_i(0))}}break;case 31:case 13:E=_a(o,2),E!==null&&pa(E,o,2),gc(),nf(o,2)}if(o=sf(n),o===null&&Pd(e,t,n,Rc,a),o===u)break;u=o}u!==null&&n.stopPropagation()}else Pd(e,t,n,null,a)}}function sf(e){return e=Xs(e),rf(e)}var Rc=null;function rf(e){if(Rc=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 Rc=e,null}function P0(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 Fl:return 2;case Zl:return 8;case Jt:case Wa:return 32;case wn:return 268435456;default:return 32}default:return 32}}var uf=!1,Dl=null,Rl=null,Al=null,Vi=new Map,Bi=new Map,_l=[],$p="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 G0(e,t){switch(e){case"focusin":case"focusout":Dl=null;break;case"dragenter":case"dragleave":Rl=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&&Y0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Pp(e,t,a,n,u){switch(t){case"focusin":return Dl=Yi(Dl,e,t,a,n,u),!0;case"dragenter":return Rl=Yi(Rl,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 F0(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(){$0(a)});return}}else if(t===31){if(t=S(a),t!==null){e.blockedOn=t,Pr(e.priority,function(){$0(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 Ac(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);Ir=n,a.target.dispatchEvent(n),Ir=null}else return t=Ce(a),t!==null&&Y0(t),e.blockedOn=a,!1;t.shift()}return!0}function Z0(e,t,a){Ac(e)&&a.delete(t)}function Gp(){uf=!1,Dl!==null&&Ac(Dl)&&(Dl=null),Rl!==null&&Ac(Rl)&&(Rl=null),Al!==null&&Ac(Al)&&(Al=null),Vi.forEach(Z0),Bi.forEach(Z0)}function _c(e,t){e.blockedOn===t&&(e.blockedOn=null,uf||(uf=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Gp)))}var kc=null;function W0(e){kc!==e&&(kc=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){kc===e&&(kc=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 Ar(e){function t(z){return _c(z,e)}Dl!==null&&_c(Dl,e),Rl!==null&&_c(Rl,e),Al!==null&&_c(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);)F0(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[zt]||null;if(typeof o=="function")x||W0(a);else if(x){var E=null;if(o&&o.hasAttribute("formAction")){if(u=o,x=o[zt]||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),W0(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}zc.prototype.render=cf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var a=t.current,n=Ta();V0(a,n,e,t,null,null)},zc.prototype.unmount=cf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;V0(e.current,2,null,e,null,null),gc(),t[En]=null}};function zc(e){this._internalRoot=e}zc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Gs();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&&F0(e)}};var Q0=r.version;if(Q0!=="19.2.4")throw Error(c(527,Q0,"19.2.4"));se.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 Fp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Uc.isDisabled&&Uc.supportsFiber)try{vt=Uc.inject(Fp),Kt=Uc}catch{}}return Pi.createRoot=function(e,t){if(!f(e))throw Error(c(299));var a=!1,n="",u=nm,o=lm,x=sm;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=H0(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=nm,x=lm,E=sm,z=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&&(z=a.formState)),t=H0(e,1,!0,t,a??null,n,u,z,o,x,E,I0),t.context=q0(null),a=t.current,n=Ta(),n=Ps(n),u=pl(n),u.callback=null,vl(a,u,n),a=n,t.current.lanes=a,tl(t,a),bn(t),e[En]=t.current,$d(e),new zc(t)},Pi.version="19.2.4",Pi}var ug;function lv(){if(ug)return hf.exports;ug=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=nv(),hf.exports}var sv=lv();const rv=Hf(sv);/**
50
- * react-router v7.13.0
51
- *
52
- * Copyright (c) Remix Software Inc.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE.md file in the root directory of this source tree.
56
- *
57
- * @license MIT
58
- */var cg="popstate";function iv(l={}){function r(f,m){let{pathname:b="/",search:S="",hash:v=""}=Ls(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:lu(m))}function c(f,m){Pa(f.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(m)})`)}return cv(r,d,c,l)}function xt(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 uv(){return Math.random().toString(36).substring(2,10)}function og(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"?Ls(r):r,state:d,key:r&&r.key||c||uv()}}function lu({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 Ls(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 cv(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 D=N(),W=D==null?null:D-p;p=D,v&&v({action:S,location:M.location,delta:W})}function w(D,W){S="PUSH";let Y=Cf(M.location,D,W);d&&d(Y,D),p=N()+1;let K=og(Y,p),J=M.createHref(Y);try{b.pushState(K,"",J)}catch(ie){if(ie instanceof DOMException&&ie.name==="DataCloneError")throw ie;f.location.assign(J)}m&&v&&v({action:S,location:M.location,delta:1})}function A(D,W){S="REPLACE";let Y=Cf(M.location,D,W);d&&d(Y,D),p=N();let K=og(Y,p),J=M.createHref(Y);b.replaceState(K,"",J),m&&v&&v({action:S,location:M.location,delta:0})}function O(D){return ov(D)}let M={get action(){return S},get location(){return l(f,b)},listen(D){if(v)throw new Error("A history only accepts one active listener");return f.addEventListener(cg,T),v=D,()=>{f.removeEventListener(cg,T),v=null}},createHref(D){return r(f,D)},createURL:O,encodeLocation(D){let W=O(D);return{pathname:W.pathname,search:W.search,hash:W.hash}},push:w,replace:A,go(D){return b.go(D)}};return M}function ov(l,r=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),xt(d,"No window.location.(origin|href) available to create URL");let c=typeof l=="string"?l:lu(l);return c=c.replace(/ $/,"%20"),!r&&c.startsWith("//")&&(c=d+c),new URL(c,d)}function gx(l,r,d="/"){return dv(l,r,d,!1)}function dv(l,r,d,c){let f=typeof r=="string"?Ls(r):r,m=Xn(f.pathname||"/",d);if(m==null)return null;let b=xx(l);fv(b);let S=null;for(let v=0;S==null&&v<b.length;++v){let p=jv(m);S=Sv(b[v],p,c)}return S}function xx(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;xt(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=Qn([c,N.relativePath]),w=d.concat(N);b.children&&b.children.length>0&&(xt(b.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${T}".`),xx(b.children,r,w,T,v)),!(b.path==null&&!b.index)&&r.push({path:T,score:vv(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 yx(b.path))m(b,S,!0,p)}),r}function yx(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=yx(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 fv(l){l.sort((r,d)=>r.score!==d.score?d.score-r.score:bv(r.routesMeta.map(c=>c.childrenIndex),d.routesMeta.map(c=>c.childrenIndex)))}var hv=/^:[\w-]+$/,mv=3,gv=2,xv=1,yv=10,pv=-2,dg=l=>l==="*";function vv(l,r){let d=l.split("/"),c=d.length;return d.some(dg)&&(c+=pv),r&&(c+=gv),d.filter(f=>!dg(f)).reduce((f,m)=>f+(hv.test(m)?mv:m===""?xv:yv),c)}function bv(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 Sv(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=Gc({path:v.relativePath,caseSensitive:v.caseSensitive,end:p},N),w=v.route;if(!T&&p&&d&&!c[c.length-1].route.index&&(T=Gc({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},N)),!T)return null;Object.assign(f,T.params),b.push({params:f,pathname:Qn([m,T.pathname]),pathnameBase:Cv(Qn([m,T.pathnameBase])),route:w}),T.pathnameBase!=="/"&&(m=Qn([m,T.pathnameBase]))}return b}function Gc(l,r){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[d,c]=Nv(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 Nv(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 jv(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 wv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Ev(l,r="/"){let{pathname:d,search:c="",hash:f=""}=typeof l=="string"?Ls(l):l,m;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?m=fg(d.substring(1),"/"):m=fg(d,r)):m=r,{pathname:m,search:Mv(c),hash:Ov(f)}}function fg(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 Tv(l){return l.filter((r,d)=>d===0||r.route.path&&r.route.path.length>0)}function Vf(l){let r=Tv(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=Ls(l):(f={...l},xt(!f.pathname||!f.pathname.includes("?"),yf("?","pathname","search",f)),xt(!f.pathname||!f.pathname.includes("#"),yf("#","pathname","hash",f)),xt(!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=Ev(f,S),p=b&&b!=="/"&&b.endsWith("/"),N=(m||b===".")&&d.endsWith("/");return!v.pathname.endsWith("/")&&(p||N)&&(v.pathname+="/"),v}var Qn=l=>l.join("/").replace(/\/\/+/g,"/"),Cv=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),Mv=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,Ov=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,Dv=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 Rv(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function Av(l){return l.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var px=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function vx(l,r){let d=l;if(typeof d!="string"||!wv.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let c=d,f=!1;if(px)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 bx=["POST","PUT","PATCH","DELETE"];new Set(bx);var _v=["GET",...bx];new Set(_v);var Hr=q.createContext(null);Hr.displayName="DataRouter";var Jc=q.createContext(null);Jc.displayName="DataRouterState";var kv=q.createContext(!1),Sx=q.createContext({isTransitioning:!1});Sx.displayName="ViewTransition";var zv=q.createContext(new Map);zv.displayName="Fetchers";var Uv=q.createContext(null);Uv.displayName="Await";var Oa=q.createContext(null);Oa.displayName="Navigation";var ru=q.createContext(null);ru.displayName="Location";var Nn=q.createContext({outlet:null,matches:[],isDataRoute:!1});Nn.displayName="Route";var Yf=q.createContext(null);Yf.displayName="RouteError";var Nx="REACT_ROUTER_ERROR",Lv="REDIRECT",Hv="ROUTE_ERROR_RESPONSE";function qv(l){if(l.startsWith(`${Nx}:${Lv}:{`))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 Vv(l){if(l.startsWith(`${Nx}:${Hv}:{`))try{let r=JSON.parse(l.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new Dv(r.status,r.statusText,r.data)}catch{}}function Bv(l,{relative:r}={}){xt(qr(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:c}=q.useContext(Oa),{hash:f,pathname:m,search:b}=iu(l,{relative:r}),S=m;return d!=="/"&&(S=m==="/"?d:Qn([d,m])),c.createHref({pathname:S,search:b,hash:f})}function qr(){return q.useContext(ru)!=null}function $l(){return xt(qr(),"useLocation() may be used only in the context of a <Router> component."),q.useContext(ru).location}var jx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function wx(l){q.useContext(Oa).static||q.useLayoutEffect(l)}function Kc(){let{isDataRoute:l}=q.useContext(Nn);return l?eb():Yv()}function Yv(){xt(qr(),"useNavigate() may be used only in the context of a <Router> component.");let l=q.useContext(Hr),{basename:r,navigator:d}=q.useContext(Oa),{matches:c}=q.useContext(Nn),{pathname:f}=$l(),m=JSON.stringify(Vf(c)),b=q.useRef(!1);return wx(()=>{b.current=!0}),q.useCallback((v,p={})=>{if(Pa(b.current,jx),!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:Qn([r,N.pathname])),(p.replace?d.replace:d.push)(N,p.state,p)},[r,d,m,f,l])}q.createContext(null);function iu(l,{relative:r}={}){let{matches:d}=q.useContext(Nn),{pathname:c}=$l(),f=JSON.stringify(Vf(d));return q.useMemo(()=>Bf(l,JSON.parse(f),c,r==="path"),[l,f,c,r])}function $v(l,r){return Ex(l,r)}function Ex(l,r,d,c,f){var Y;xt(qr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:m}=q.useContext(Oa),{matches:b}=q.useContext(Nn),S=b[b.length-1],v=S?S.params:{},p=S?S.pathname:"/",N=S?S.pathnameBase:"/",T=S&&S.route;{let K=T&&T.path||"";Cx(p,!T||K.endsWith("*")||K.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${K}">) 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="${K}"> to <Route path="${K==="/"?"*":`${K}/*`}">.`)}let w=$l(),A;if(r){let K=typeof r=="string"?Ls(r):r;xt(N==="/"||((Y=K.pathname)==null?void 0:Y.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 "${K.pathname}" was given in the \`location\` prop.`),A=K}else A=w;let O=A.pathname||"/",M=O;if(N!=="/"){let K=N.replace(/^\//,"").split("/");M="/"+O.replace(/^\//,"").split("/").slice(K.length).join("/")}let D=gx(l,{pathname:M});Pa(T||D!=null,`No routes matched location "${A.pathname}${A.search}${A.hash}" `),Pa(D==null||D[D.length-1].route.element!==void 0||D[D.length-1].route.Component!==void 0||D[D.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=Wv(D&&D.map(K=>Object.assign({},K,{params:Object.assign({},v,K.params),pathname:Qn([N,m.encodeLocation?m.encodeLocation(K.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:K.pathname]),pathnameBase:K.pathnameBase==="/"?N:Qn([N,m.encodeLocation?m.encodeLocation(K.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:K.pathnameBase])})),b,d,c,f);return r&&W?q.createElement(ru.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...A},navigationType:"POP"}},W):W}function Pv(){let l=Kv(),r=Rv(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=q.createElement(q.Fragment,null,q.createElement("p",null,"💿 Hey developer 👋"),q.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",q.createElement("code",{style:m},"ErrorBoundary")," or"," ",q.createElement("code",{style:m},"errorElement")," prop on your route.")),q.createElement(q.Fragment,null,q.createElement("h2",null,"Unexpected Application Error!"),q.createElement("h3",{style:{fontStyle:"italic"}},r),d?q.createElement("pre",{style:f},d):null,b)}var Gv=q.createElement(Pv,null),Tx=class extends q.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,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=Vv(l.digest);d&&(l=d)}let r=l!==void 0?q.createElement(Nn.Provider,{value:this.props.routeContext},q.createElement(Yf.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?q.createElement(Fv,{error:l},r):r}};Tx.contextType=kv;var pf=new WeakMap;function Fv({children:l,error:r}){let{basename:d}=q.useContext(Oa);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let c=qv(r.digest);if(c){let f=pf.get(r);if(f)throw f;let m=vx(c.location,d);if(px&&!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 q.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m.absoluteURL||m.to}`})}}return l}function Zv({routeContext:l,match:r,children:d}){let c=q.useContext(Hr);return c&&c.static&&c.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=r.route.id),q.createElement(Nn.Provider,{value:l},d)}function Wv(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);xt(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:Av(d.matches),errorInfo:T})}:void 0;return m.reduceRight((N,T,w)=>{let A,O=!1,M=null,D=null;d&&(A=b&&T.route.id?b[T.route.id]:void 0,M=T.route.errorElement||Gv,S&&(v<0&&w===0?(Cx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),O=!0,D=null):v===w&&(O=!0,D=T.route.hydrateFallbackElement||null)));let W=r.concat(m.slice(0,w+1)),Y=()=>{let K;return A?K=M:O?K=D:T.route.Component?K=q.createElement(T.route.Component,null):T.route.element?K=T.route.element:K=N,q.createElement(Zv,{match:T,routeContext:{outlet:N,matches:W,isDataRoute:d!=null},children:K})};return d&&(T.route.ErrorBoundary||T.route.errorElement||w===0)?q.createElement(Tx,{location:d.location,revalidation:d.revalidation,component:M,error:A,children:Y(),routeContext:{outlet:null,matches:W,isDataRoute:!0},onError:p}):Y()},null)}function $f(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Iv(l){let r=q.useContext(Hr);return xt(r,$f(l)),r}function Qv(l){let r=q.useContext(Jc);return xt(r,$f(l)),r}function Xv(l){let r=q.useContext(Nn);return xt(r,$f(l)),r}function Pf(l){let r=Xv(l),d=r.matches[r.matches.length-1];return xt(d.route.id,`${l} can only be used on routes that contain a unique "id"`),d.route.id}function Jv(){return Pf("useRouteId")}function Kv(){var c;let l=q.useContext(Yf),r=Qv("useRouteError"),d=Pf("useRouteError");return l!==void 0?l:(c=r.errors)==null?void 0:c[d]}function eb(){let{router:l}=Iv("useNavigate"),r=Pf("useNavigate"),d=q.useRef(!1);return wx(()=>{d.current=!0}),q.useCallback(async(f,m={})=>{Pa(d.current,jx),d.current&&(typeof f=="number"?await l.navigate(f):await l.navigate(f,{fromRouteId:r,...m}))},[l,r])}var hg={};function Cx(l,r,d){!r&&!hg[l]&&(hg[l]=!0,Pa(!1,d))}q.memo(tb);function tb({routes:l,future:r,state:d,onError:c}){return Ex(l,void 0,d,c,r)}function ab({to:l,replace:r,state:d,relative:c}){xt(qr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:f}=q.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}=q.useContext(Nn),{pathname:b}=$l(),S=Kc(),v=Bf(l,Vf(m),b,c==="path"),p=JSON.stringify(v);return q.useEffect(()=>{S(JSON.parse(p),{replace:r,state:d,relative:c})},[S,p,c,r,d]),null}function In(l){xt(!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 nb({basename:l="/",children:r=null,location:d,navigationType:c="POP",navigator:f,static:m=!1,unstable_useTransitions:b}){xt(!qr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let S=l.replace(/^\/*/,"/"),v=q.useMemo(()=>({basename:S,navigator:f,static:m,unstable_useTransitions:b,future:{}}),[S,f,m,b]);typeof d=="string"&&(d=Ls(d));let{pathname:p="/",search:N="",hash:T="",state:w=null,key:A="default"}=d,O=q.useMemo(()=>{let M=Xn(p,S);return M==null?null:{location:{pathname:M,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:q.createElement(Oa.Provider,{value:v},q.createElement(ru.Provider,{children:r,value:O}))}function lb({children:l,location:r}){return $v(Mf(l),r)}function Mf(l,r=[]){let d=[];return q.Children.forEach(l,(c,f)=>{if(!q.isValidElement(c))return;let m=[...r,f];if(c.type===q.Fragment){d.push.apply(d,Mf(c.props.children,m));return}xt(c.type===In,`[${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>`),xt(!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 $c="get",Pc="application/x-www-form-urlencoded";function eo(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function sb(l){return eo(l)&&l.tagName.toLowerCase()==="button"}function rb(l){return eo(l)&&l.tagName.toLowerCase()==="form"}function ib(l){return eo(l)&&l.tagName.toLowerCase()==="input"}function ub(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function cb(l,r){return l.button===0&&(!r||r==="_self")&&!ub(l)}var Lc=null;function ob(){if(Lc===null)try{new FormData(document.createElement("form"),0),Lc=!1}catch{Lc=!0}return Lc}var db=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vf(l){return l!=null&&!db.has(l)?(Pa(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Pc}"`),null):l}function fb(l,r){let d,c,f,m,b;if(rb(l)){let S=l.getAttribute("action");c=S?Xn(S,r):null,d=l.getAttribute("method")||$c,f=vf(l.getAttribute("enctype"))||Pc,m=new FormData(l)}else if(sb(l)||ib(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")||$c,f=vf(l.getAttribute("formenctype"))||vf(S.getAttribute("enctype"))||Pc,m=new FormData(S,l),!ob()){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(eo(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=$c,c=null,f=Pc,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 hb(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 mb(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 gb(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 xb(l,r,d){let c=await Promise.all(l.map(async f=>{let m=r.routes[f.route.id];if(m){let b=await mb(m,d);return b.links?b.links():[]}return[]}));return bb(c.flat(1).filter(gb).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function mg(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 yb(l,r,{includeHydrateFallback:d}={}){return pb(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 pb(l){return[...new Set(l)]}function vb(l){let r={},d=Object.keys(l).sort();for(let c of d)r[c]=l[c];return r}function bb(l,r){let d=new Set;return new Set(r),l.reduce((c,f)=>{let m=JSON.stringify(vb(f));return d.has(m)||(d.add(m),c.push({key:m,link:f})),c},[])}function Mx(){let l=q.useContext(Hr);return Gf(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function Sb(){let l=q.useContext(Jc);return Gf(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Ff=q.createContext(void 0);Ff.displayName="FrameworkContext";function Ox(){let l=q.useContext(Ff);return Gf(l,"You must render this element inside a <HydratedRouter> element"),l}function Nb(l,r){let d=q.useContext(Ff),[c,f]=q.useState(!1),[m,b]=q.useState(!1),{onFocus:S,onBlur:v,onMouseEnter:p,onMouseLeave:N,onTouchStart:T}=r,w=q.useRef(null);q.useEffect(()=>{if(l==="render"&&b(!0),l==="viewport"){let M=W=>{W.forEach(Y=>{b(Y.isIntersecting)})},D=new IntersectionObserver(M,{threshold:.5});return w.current&&D.observe(w.current),()=>{D.disconnect()}}},[l]),q.useEffect(()=>{if(c){let M=setTimeout(()=>{b(!0)},100);return()=>{clearTimeout(M)}}},[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 jb({page:l,...r}){let{router:d}=Mx(),c=q.useMemo(()=>gx(d.routes,l,d.basename),[d.routes,l,d.basename]);return c?q.createElement(Eb,{page:l,matches:c,...r}):null}function wb(l){let{manifest:r,routeModules:d}=Ox(),[c,f]=q.useState([]);return q.useEffect(()=>{let m=!1;return xb(l,r,d).then(b=>{m||f(b)}),()=>{m=!0}},[l,r,d]),c}function Eb({page:l,matches:r,...d}){let c=$l(),{future:f,manifest:m,routeModules:b}=Ox(),{basename:S}=Mx(),{loaderData:v,matches:p}=Sb(),N=q.useMemo(()=>mg(l,r,p,m,c,"data"),[l,r,p,m,c]),T=q.useMemo(()=>mg(l,r,p,m,c,"assets"),[l,r,p,m,c]),w=q.useMemo(()=>{if(l===c.pathname+c.search+c.hash)return[];let M=new Set,D=!1;if(r.forEach(Y=>{var J;let K=m.routes[Y.route.id];!K||!K.hasLoader||(!N.some(ie=>ie.route.id===Y.route.id)&&Y.route.id in v&&((J=b[Y.route.id])!=null&&J.shouldRevalidate)||K.hasClientLoader?D=!0:M.add(Y.route.id))}),M.size===0)return[];let W=hb(l,S,f.unstable_trailingSlashAwareDataRequests,"data");return D&&M.size>0&&W.searchParams.set("_routes",r.filter(Y=>M.has(Y.route.id)).map(Y=>Y.route.id).join(",")),[W.pathname+W.search]},[S,f.unstable_trailingSlashAwareDataRequests,v,c,m,N,r,l,b]),A=q.useMemo(()=>yb(T,m),[T,m]),O=wb(T);return q.createElement(q.Fragment,null,w.map(M=>q.createElement("link",{key:M,rel:"prefetch",as:"fetch",href:M,...d})),A.map(M=>q.createElement("link",{key:M,rel:"modulepreload",href:M,...d})),O.map(({key:M,link:D})=>q.createElement("link",{key:M,nonce:d.nonce,...D,crossOrigin:D.crossOrigin??d.crossOrigin})))}function Tb(...l){return r=>{l.forEach(d=>{typeof d=="function"?d(r):d!=null&&(d.current=r)})}}var Cb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Cb&&(window.__reactRouterVersion="7.13.0")}catch{}function Mb({basename:l,children:r,unstable_useTransitions:d,window:c}){let f=q.useRef();f.current==null&&(f.current=iv({window:c,v5Compat:!0}));let m=f.current,[b,S]=q.useState({action:m.action,location:m.location}),v=q.useCallback(p=>{d===!1?S(p):q.startTransition(()=>S(p))},[d]);return q.useLayoutEffect(()=>m.listen(v),[m,v]),q.createElement(nb,{basename:l,children:r,location:b.location,navigationType:b.action,navigator:m,unstable_useTransitions:d})}var Dx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Rx=q.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:M,unstable_useTransitions:D}=q.useContext(Oa),W=typeof p=="string"&&Dx.test(p),Y=vx(p,M);p=Y.to;let K=Bv(p,{relative:f}),[J,ie,P]=Nb(c,A),G=Rb(p,{replace:b,state:S,target:v,preventScrollReset:N,relative:f,viewTransition:T,unstable_defaultShouldRevalidate:w,unstable_useTransitions:D});function Z(k){r&&r(k),k.defaultPrevented||G(k)}let C=q.createElement("a",{...A,...P,href:Y.absoluteURL||K,onClick:Y.isExternal||m?r:Z,ref:Tb(O,ie),target:v,"data-discover":!W&&d==="render"?"true":void 0});return J&&!W?q.createElement(q.Fragment,null,C,q.createElement(jb,{page:K})):C});Rx.displayName="Link";var Ax=q.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=iu(b,{relative:p.relative}),w=$l(),A=q.useContext(Jc),{navigator:O,basename:M}=q.useContext(Oa),D=A!=null&&Ub(T)&&S===!0,W=O.encodeLocation?O.encodeLocation(T).pathname:T.pathname,Y=w.pathname,K=A&&A.navigation&&A.navigation.location?A.navigation.location.pathname:null;d||(Y=Y.toLowerCase(),K=K?K.toLowerCase():null,W=W.toLowerCase()),K&&M&&(K=Xn(K,M)||K);const J=W!=="/"&&W.endsWith("/")?W.length-1:W.length;let ie=Y===W||!f&&Y.startsWith(W)&&Y.charAt(J)==="/",P=K!=null&&(K===W||!f&&K.startsWith(W)&&K.charAt(W.length)==="/"),G={isActive:ie,isPending:P,isTransitioning:D},Z=ie?r:void 0,C;typeof c=="function"?C=c(G):C=[c,ie?"active":null,P?"pending":null,D?"transitioning":null].filter(Boolean).join(" ");let k=typeof m=="function"?m(G):m;return q.createElement(Rx,{...p,"aria-current":Z,className:C,ref:N,style:k,to:b,viewTransition:S},typeof v=="function"?v(G):v)});Ax.displayName="NavLink";var Ob=q.forwardRef(({discover:l="render",fetcherKey:r,navigate:d,reloadDocument:c,replace:f,state:m,method:b=$c,action:S,onSubmit:v,relative:p,preventScrollReset:N,viewTransition:T,unstable_defaultShouldRevalidate:w,...A},O)=>{let{unstable_useTransitions:M}=q.useContext(Oa),D=kb(),W=zb(S,{relative:p}),Y=b.toLowerCase()==="get"?"get":"post",K=typeof S=="string"&&Dx.test(S),J=ie=>{if(v&&v(ie),ie.defaultPrevented)return;ie.preventDefault();let P=ie.nativeEvent.submitter,G=(P==null?void 0:P.getAttribute("formmethod"))||b,Z=()=>D(P||ie.currentTarget,{fetcherKey:r,method:G,navigate:d,replace:f,state:m,relative:p,preventScrollReset:N,viewTransition:T,unstable_defaultShouldRevalidate:w});M&&d!==!1?q.startTransition(()=>Z()):Z()};return q.createElement("form",{ref:O,method:Y,action:W,onSubmit:c?v:J,...A,"data-discover":!K&&l==="render"?"true":void 0})});Ob.displayName="Form";function Db(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _x(l){let r=q.useContext(Hr);return xt(r,Db(l)),r}function Rb(l,{target:r,replace:d,state:c,preventScrollReset:f,relative:m,viewTransition:b,unstable_defaultShouldRevalidate:S,unstable_useTransitions:v}={}){let p=Kc(),N=$l(),T=iu(l,{relative:m});return q.useCallback(w=>{if(cb(w,r)){w.preventDefault();let A=d!==void 0?d:lu(N)===lu(T),O=()=>p(l,{replace:A,state:c,preventScrollReset:f,relative:m,viewTransition:b,unstable_defaultShouldRevalidate:S});v?q.startTransition(()=>O()):O()}},[N,p,T,d,c,r,l,f,m,b,S,v])}var Ab=0,_b=()=>`__${String(++Ab)}__`;function kb(){let{router:l}=_x("useSubmit"),{basename:r}=q.useContext(Oa),d=Jv(),c=l.fetch,f=l.navigate;return q.useCallback(async(m,b={})=>{let{action:S,method:v,encType:p,formData:N,body:T}=fb(m,r);if(b.navigate===!1){let w=b.fetcherKey||_b();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 zb(l,{relative:r}={}){let{basename:d}=q.useContext(Oa),c=q.useContext(Nn);xt(c,"useFormAction must be used inside a RouteContext");let[f]=c.matches.slice(-1),m={...iu(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:Qn([d,m.pathname])),lu(m)}function Ub(l,{relative:r}={}){let d=q.useContext(Sx);xt(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=_x("useViewTransitionState"),f=iu(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 Gc(f.pathname,b)!=null||Gc(f.pathname,m)!=null}var Lb=mx();const Hb=Hf(Lb);/**
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 kx=(...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 qb=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 Vb=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 gg=l=>{const r=Vb(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 Bb={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 Yb=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 $b=q.forwardRef(({color:l="currentColor",size:r=24,strokeWidth:d=2,absoluteStrokeWidth:c,className:f="",children:m,iconNode:b,...S},v)=>q.createElement("svg",{ref:v,...Bb,width:r,height:r,stroke:l,strokeWidth:c?Number(d)*24/Number(r):d,className:kx("lucide",f),...!m&&!Yb(S)&&{"aria-hidden":"true"},...S},[...b.map(([p,N])=>q.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 Me=(l,r)=>{const d=q.forwardRef(({className:c,...f},m)=>q.createElement($b,{ref:m,iconNode:r,className:kx(`lucide-${qb(gg(l))}`,`lucide-${l}`,c),...f}));return d.displayName=gg(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 Pb=[["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"}]],zx=Me("activity",Pb);/**
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 Gb=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Fb=Me("arrow-down",Gb);/**
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 Zb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],xg=Me("arrow-right",Zb);/**
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 Wb=[["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"}]],Ib=Me("arrow-up-down",Wb);/**
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 Qb=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Xb=Me("arrow-up",Qb);/**
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 Jb=[["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"}]],Kb=Me("bell",Jb);/**
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 e1=[["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"}]],yg=Me("briefcase",e1);/**
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 t1=[["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"}]],Ux=Me("calendar",t1);/**
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 a1=[["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"}]],n1=Me("chart-column",a1);/**
146
- * @license lucide-react v0.564.0 - ISC
147
- *
148
- * This source code is licensed under the ISC license.
149
- * See the LICENSE file in the root directory of this source tree.
150
- */const l1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],s1=Me("check",l1);/**
151
- * @license lucide-react v0.564.0 - ISC
152
- *
153
- * This source code is licensed under the ISC license.
154
- * See the LICENSE file in the root directory of this source tree.
155
- */const r1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Zf=Me("chevron-down",r1);/**
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 i1=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],u1=Me("chevron-left",i1);/**
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 c1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],o1=Me("chevron-right",c1);/**
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 d1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],f1=Me("chevron-up",d1);/**
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 h1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],m1=Me("chevrons-up-down",h1);/**
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 g1=[["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"}]],Sn=Me("circle-alert",g1);/**
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 x1=[["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"}]],pg=Me("circle-arrow-down",x1);/**
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 y1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],p1=Me("circle-check",y1);/**
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 v1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],uu=Me("circle-check-big",v1);/**
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 b1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],S1=Me("circle-x",b1);/**
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 N1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Lx=Me("clock",N1);/**
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 j1=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Hx=Me("external-link",j1);/**
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 w1=[["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"}]],E1=Me("eye-off",w1);/**
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 T1=[["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"}]],qx=Me("eye",T1);/**
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 C1=[["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=Me("file-text",C1);/**
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 M1=[["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"}]],O1=Me("git-merge",M1);/**
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 D1=[["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"}]],Vx=Me("git-pull-request",D1);/**
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 R1=[["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"}]],A1=Me("globe",R1);/**
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 _1=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],k1=Me("house",_1);/**
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 z1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],U1=Me("info",z1);/**
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 L1=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],H1=Me("kanban",L1);/**
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 q1=[["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"}]],vg=Me("list-restart",q1);/**
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 V1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Bx=Me("loader-circle",V1);/**
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 B1=[["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"}]],Yx=Me("map",B1);/**
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 Y1=[["path",{d:"M5 12h14",key:"1ays0h"}]],$1=Me("minus",Y1);/**
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 P1=[["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"}]],G1=Me("panels-top-left",P1);/**
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 F1=[["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"}]],$x=Me("pause",F1);/**
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 Z1=[["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"}]],to=Me("pen",Z1);/**
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 W1=[["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=Me("play",W1);/**
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"}]],Hs=Me("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 Q1=[["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"}]],bg=Me("refresh-cw",Q1);/**
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 X1=[["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"}]],Px=Me("rotate-ccw",X1);/**
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 J1=[["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"}]],K1=Me("save",J1);/**
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 e2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ao=Me("search",e2);/**
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 t2=[["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"}]],Sg=Me("settings-2",t2);/**
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 a2=[["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"}]],n2=Me("settings",a2);/**
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 l2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Ng=Me("square",l2);/**
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 s2=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],r2=Me("terminal",s2);/**
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 i2=[["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"}]],cu=Me("trash-2",i2);/**
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 u2=[["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=Me("triangle-alert",u2);/**
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 c2=[["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"}]],o2=Me("wifi",c2);/**
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 d2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Vr=Me("x",d2);/**
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 f2=[["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"}]],jg=Me("zap",f2),Gx=[{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"}}],Fx=[{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 h2(l){return Fx.find(r=>r.id===l)}const Wf="";let If=!1,Fc=null;function m2(l){If=l}function wg(l){Fc=l}function g2(){return If}function Qf(l){return encodeURIComponent(l.replace(/\//g,"~"))}function Mt(l){return If&&Fc?l.replace("/api/",`/api/projects/${Qf(Fc)}/`):l}function x2(){return it("/api/mode")}function Zx(){return it("/api/projects")}function y2(l){const r=Qf(l);return it(`/api/projects/${r}`,{method:"DELETE"})}async function it(l,r){const d=`${Wf}${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 Wx(){return it(Mt("/api/prs"))}function p2(l,r){const d=`?lines=${encodeURIComponent(r)}`;return it(Mt(`/api/logs/${encodeURIComponent(l)}${d}`))}function Xf(){return it(Mt("/api/config"))}async function Ix(){if(g2()){const r=(await Zx()).filter(c=>c.valid);return(await Promise.all(r.map(async c=>{try{const f=await it(`/api/projects/${Qf(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 Xf();return[{projectId:Fc||"current",config:l}]}}function Jf(l){return it(Mt("/api/config"),{method:"PUT",body:JSON.stringify(l)})}function v2(){return it(Mt("/api/doctor"))}function Qx(){return it(Mt("/api/schedule-info"))}function b2(){return it(Mt("/api/actions/review"),{method:"POST"})}function S2(l){const r=h2(l);return r?it(Mt(r.triggerEndpoint),{method:"POST"}):Promise.reject(new Error(`Unknown job ID: ${l}`))}function Df(){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 Xx(){return it(Mt("/api/board/status"))}function w2(l){return it(Mt("/api/board/issues"),{method:"POST",body:JSON.stringify(l)})}function Jx(l,r){return it(Mt(`/api/board/issues/${l}/move`),{method:"PATCH",body:JSON.stringify({column:r})})}async function E2(l){const r=`${Wf}${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=q.useRef(l);f.current=l,q.useEffect(()=>{if(!c)return;const m=`${Wf}${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 Eg(){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 D2(){return it("/api/global-notifications")}function Tg(l){return it("/api/global-notifications",{method:"PUT",body:JSON.stringify(l)})}function R2(){return it(Mt("/api/roadmap"))}function A2(){return it(Mt("/api/roadmap/scan"),{method:"POST"})}function Kx(l){return it(Mt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:l})})}function cn(l,r=[],d){const c=(d==null?void 0:d.enabled)??!0,[f,m]=q.useState(null),[b,S]=q.useState(!0),[v,p]=q.useState(null),N=q.useRef(l);N.current=l;const T=q.useRef(()=>{(async()=>{p(null);try{const A=await N.current();m(A)}catch(A){p(A instanceof Error?A:new Error("Unknown error"))}})()});return q.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 Cg=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?Cg(l):Cg,k2=l=>l;function z2(l,r=k2){const d=_e.useSyncExternalStore(l.subscribe,()=>r(l.getState()),()=>r(l.getInitialState()));return _e.useDebugValue(d),d}const Mg=l=>{const r=_2(l),d=c=>z2(r,c);return Object.assign(d,r),d},U2=l=>l?Mg(l):Mg,L2=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,Yt=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=>{m2(d),l({isGlobalMode:d})},projects:[],setProjects:d=>l({projects:d}),selectedProjectId:L2,selectProject:d=>{wg(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&&(wg(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 Fx.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]=q.useState(!1),{projectName:d,isGlobalMode:c,projects:f,selectedProjectId:m,selectProject:b,globalModeLoading:S}=Yt(),{data:v}=cn(Wx,[m],{enabled:!S}),p=(v==null?void 0:v.length)??0,N=q.useMemo(()=>[{icon:k1,label:"Dashboard",path:"/",section:"Overview"},{icon:r2,label:"Logs",path:"/logs"},{icon:H1,label:"Board",path:"/board",section:"Work"},{icon:Vx,label:"Pull Requests",path:"/prs",badge:p},{icon:Yx,label:"Roadmap",path:"/roadmap"},{icon:Ux,label:"Schedules",path:"/scheduling",section:"Automation"},{icon:n2,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(yg,{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(m1,{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(yg,{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(_e.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(Ax,{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(o1,{className:"h-5 w-5"}):s.jsx(u1,{className:"h-5 w-5"})})})]})},q2=()=>{const{projectName:l}=Yt();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(o2,{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(ao,{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(Kb,{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(uu,{className:"h-5 w-5 text-green-400"}),error:s.jsx(Sn,{className:"h-5 w-5 text-red-400"}),info:s.jsx(U1,{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(Vr,{className:"h-5 w-5"})]})})]})})})},B2=()=>{const{toasts:l,removeToast:r}=Yt();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}=Yt();q.useEffect(()=>{r(!0),x2().then(async({globalMode:m})=>{if(l(m),!m)return;const b=await Zx();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 Og(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 Hc(l,r){return l?r?Og(l)>=Og(r)?l:r:l:r}function $2(){const{setStatus:l,setProjectName:r,selectedProjectId:d,globalModeLoading:c,status:f}=Yt(),m=q.useRef(null);m.current=Yt.getState().status,C2(b=>{Hc(b,m.current)===b&&l(b)},[d,c],{enabled:!c}),q.useEffect(()=>{if(c)return;bf().then(S=>{Hc(S,m.current)===S&&l(S)}).catch(()=>{});const b=setInterval(()=>{bf().then(S=>{Hc(S,m.current)===S&&l(S)}).catch(()=>{})},3e4);return()=>clearInterval(b)},[d,c,l]),q.useEffect(()=>{const b=()=>{bf().then(S=>{Hc(S,m.current)===S&&l(S)}).catch(()=>{})};return window.addEventListener("focus",b),()=>window.removeEventListener("focus",b)},[d,l]),q.useEffect(()=>{f!=null&&f.projectName&&r(f.projectName)},[f==null?void 0:f.projectName,r])}const ht=({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})]}),Fe=({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(Bx,{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})},ey={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]=q.useState(""),[m,b]=q.useState(""),[S,v]=q.useState(l),[p,N]=q.useState(!1),[T,w]=q.useState(null),{addToast:A}=Yt(),O=async M=>{if(M.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(D){w(D instanceof Error?D.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(Vr,{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:M=>f(M.target.value),placeholder:"Issue title...",required:!0,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),s.jsx("select",{value:S,onChange:M=>v(M.target.value),className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:border-indigo-500/50 appearance-none cursor-pointer",children:Bl.map(M=>s.jsx("option",{value:M,children:M},M))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),s.jsx("textarea",{value:m,onChange:M=>b(M.target.value),placeholder:"Issue description...",rows:5,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-none font-mono"})]}),T&&s.jsx("p",{className:"text-sm text-red-400",children:T}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(Fe,{variant:"ghost",type:"button",onClick:r,children:"Cancel"}),s.jsx(Fe,{type:"submit",disabled:p||!c.trim(),children:p?"Creating...":"Create Issue"})]})]})]})]})},G2=({issue:l,onClose:r,onMoved:d,onClosed:c})=>{const[f,m]=q.useState(!1),[b,S]=q.useState(!1),[v,p]=q.useState(!1),{addToast:N}=Yt(),T=async O=>{if(O!==l.column){m(!0);try{await Jx(l.number,O),N({title:"Issue moved",message:`#${l.number} moved to ${O}`,type:"success"}),d(),r()}catch(M){N({title:"Move failed",message:M instanceof Error?M.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:ey[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(Vr,{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(Hx,{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(Fe,{variant:"ghost",onClick:()=>p(!1),children:"Cancel"}),s.jsx(Fe,{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]=q.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(ht,{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=ey[l],[v,p]=q.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(Hs,{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]=q.useState(null),[d,c]=q.useState(null),[f,m]=q.useState(null),[b,S]=q.useState(null),v=q.useRef(!1),{addToast:p,selectedProjectId:N,globalModeLoading:T}=Yt(),{data:w,loading:A,error:O,refetch:M}=cn(Xx,[N],{enabled:!T});q.useEffect(()=>{const Y=setInterval(()=>{v.current||M()},3e4);return()=>clearInterval(Y)},[M]);const D=q.useCallback(async(Y,K)=>{m(null);const J=b??(w==null?void 0:w.columns);if(!J)return;const ie=J,P={};for(const Z of Bl)P[Z]=(J[Z]??[]).filter(C=>C.number!==Y.number);const G={...Y,column:K};P[K]=[...P[K]??[],G],S(P),r(Z=>(Z==null?void 0:Z.number)===Y.number?G:Z),v.current=!0;try{await Jx(Y.number,K),M(),setTimeout(()=>{S(null),v.current=!1},800)}catch(Z){S(ie),r(C=>(C==null?void 0:C.number)===Y.number?Y:C),v.current=!1,p({title:"Move failed",message:Z instanceof Error?Z.message:"Failed to move issue",type:"error"})}},[p,M,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(Fe,{onClick:()=>M(),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((Y,K)=>{var J;return Y+(((J=W[K])==null?void 0:J.length)??0)},0)," issues across ",Bl.length," columns"]})]}),s.jsxs(Fe,{onClick:()=>c("Ready"),children:[s.jsx(Hs,{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(Y=>s.jsx(Z2,{name:Y,issues:W[Y]??[],draggingIssue:f,onIssueClick:r,onNewIssue:c,onMoveIssue:D,onDragStart:m},Y))})}),l&&s.jsx(G2,{issue:l,onClose:()=>r(null),onMoved:()=>M(),onClosed:()=>M()}),d&&s.jsx(P2,{defaultColumn:d,onClose:()=>c(null),onCreated:()=>M()})]})},I2=[{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"}],Q2=({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:I2.map(T=>{const w=p(T.processName),A=(w==null?void 0:w.running)??!1,O=w==null?void 0:w.pid,M=m===T.cancelType,D=A&&T.cancelType,W=!A&&T.name==="executor"&&r,Y=A?O?`PID: ${O}`:T.runningLabel:T.idleLabel,K=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:K?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Of,{className:"h-3 w-3 flex-shrink-0"}),K]}):Y})]}),s.jsxs("div",{className:"flex-shrink-0",children:[D&&s.jsx("button",{onClick:()=>T.cancelType&&d(T.cancelType),disabled:M,className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded transition-colors disabled:opacity-50",title:"Stop process",children:s.jsx(Ng,{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(Ng,{className:"h-3.5 w-3.5"})}),!D&&!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 k,ee;const l=Kc(),[r,d]=q.useState(null),[c,f]=q.useState(!1),[m,b]=q.useState(null),{setProjectName:S,addToast:v,selectedProjectId:p,globalModeLoading:N,status:T}=Yt(),{data:w}=cn(Qx,[p],{enabled:!N}),{data:A,loading:O}=cn(()=>Xx().catch(()=>null),[p],{enabled:!N}),M=T;if(_e.useEffect(()=>{M!=null&&M.projectName&&S(M.projectName)},[M,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(!M)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const D=M.prs.length,W=M.prs.filter(_=>_.reviewScore!==null&&_.reviewScore<70).length,Y=((k=A==null?void 0:A.columns.Ready)==null?void 0:k.length)??0,K=((ee=A==null?void 0:A.columns["In Progress"])==null?void 0:ee.length)??0;M.processes.find(_=>_.name==="executor"),M.processes.find(_=>_.name==="reviewer"),M.processes.find(_=>_.name==="qa"),M.processes.find(_=>_.name==="audit"),M.processes.find(_=>_.name==="planner"),M.processes.find(_=>_.name==="analytics");const J=async _=>{d(_);try{const ce=await j2(_),me=ce.results.every(fe=>fe.success);v({title:me?"Process Cancelled":"Cancel Failed",message:ce.results.map(fe=>fe.message).join("; "),type:me?"success":"error"})}catch(ce){v({title:"Cancel Failed",message:ce instanceof Error?ce.message:"Failed to cancel process",type:"error"})}finally{d(null)}},ie=async()=>{f(!0);try{await T2(),v({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(_){v({title:"Clear Failed",message:_ instanceof Error?_.message:"Failed to clear lock",type:"error"})}finally{f(!1)}},P=async _=>{b(_);try{await S2(_==="planner"?"slicer":_),v({title:"Job Triggered",message:`${_[0].toUpperCase()+_.slice(1)} job has been queued.`,type:"success"})}catch(ce){v({title:"Trigger Failed",message:ce instanceof Error?ce.message:`Failed to trigger ${_}`,type:"error"})}finally{b(null)}},G=_=>{if(!_)return"Not scheduled";try{const ce=new Date(_),me=new Date,fe=ce.getTime()-me.getTime(),$=Math.floor(fe/6e4);return $<0?"Running now...":$<60?`in ${$} min`:$<1440?`in ${Math.floor($/60)} hr${$>=120?"s":""}`:`in ${Math.floor($/1440)} day${$>=2880?"s":""}`}catch{return"Unknown"}},C=(()=>{var me,fe,$,se,he,oe;if(w!=null&&w.paused)return null;const _=[{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:((me=w==null?void 0:w.qa)==null?void 0:me.nextRun)??null},{agent:"Auditor",nextRun:((fe=w==null?void 0:w.audit)==null?void 0:fe.nextRun)??null},{agent:"Planner",nextRun:(($=w==null?void 0:w.planner)==null?void 0:$.nextRun)??null},{agent:"Analytics",nextRun:((se=w==null?void 0:w.analytics)==null?void 0:se.nextRun)??null},{agent:"PR Resolver",nextRun:((he=w==null?void 0:w.prResolver)==null?void 0:he.nextRun)??null},{agent:"Merger",nextRun:((oe=w==null?void 0:w.merger)==null?void 0:oe.nextRun)??null}];let ce=null;for(const Ne of _)Ne.nextRun&&(!ce||new Date(Ne.nextRun)<new Date(ce.nextRun))&&(ce=Ne);return ce?{agent:ce.agent,time:G(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(ht,{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:Y})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(uu,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(ht,{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:K})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(zx,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(ht,{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:D})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(Lx,{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(ht,{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":M.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${w!=null&&w.paused?"bg-amber-500/10 text-amber-400":M.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:s.jsx(Ux,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:w!=null&&w.paused?"All schedules paused":M.crontab.installed?`${M.crontab.entries.length} entr${M.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(ht,{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(Q2,{processes:M.processes,activePrd:M.activePrd,onCancelProcess:J,onForceClear:ie,onViewLog:()=>l("/logs"),cancellingProcess:r,clearingLock:c,onTriggerJob:P,triggeringJob:m})]}),C&&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:C.agent}),s.jsx("span",{children:C.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(xg,{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(xg,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(ht,{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(_=>{var me;const ce=((me=A.columns[_])==null?void 0:me.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[_]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:_}),s.jsx("span",{className:"text-xs font-bold",children:ce})]},_)})}):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]=q.useState(!0),[d,c]=q.useState(""),[f,m]=q.useState("executor"),b=q.useRef(null),{selectedProjectId:S,globalModeLoading:v}=Yt(),p=Yt(Y=>Y.status),{data:N,loading:T,error:w,refetch:A}=cn(()=>p2(f,500),[f,S],{enabled:!v}),O=(N==null?void 0:N.lines)||[];q.useEffect(()=>{l&&b.current&&(b.current.scrollTop=b.current.scrollHeight)},[O,l]),q.useEffect(()=>{if(!l)return;const Y=window.setInterval(()=>{A()},3e3);return()=>window.clearInterval(Y)},[l,f,A]);const M=O.filter(Y=>Y.toLowerCase().includes(d.toLowerCase())),D=Y=>{m(Y),c("")},W=Y=>{if(!(p!=null&&p.processes))return!1;const K=p.processes.find(J=>J.name===Y);return(K==null?void 0:K.running)??!1};return w?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Sn,{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(Fe,{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:Y=>c(Y.target.value)}),s.jsx(ao,{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:Gx.map(({processName:Y,label:K})=>s.jsx("button",{onClick:()=>D(Y),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${f===Y?"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:K}),W(Y)&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})},Y))})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(Fe,{size:"sm",variant:"ghost",onClick:()=>A(),children:[s.jsx(pg,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Fe,{size:"sm",variant:"ghost",onClick:()=>r(!l),children:[l?s.jsx($x,{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:[M.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..."}):M.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"}):M.map((Y,K)=>{const J=Y.includes("[ERROR]"),ie=Y.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${J?"text-red-400":ie?"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:K+1}),Y]},K)}),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(pg,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},eS=()=>{const[l,r]=q.useState(null),[d,c]=q.useState(!1),[f,m]=q.useState("all"),[b,S]=q.useState("number"),[v,p]=q.useState("desc"),{addToast:N,selectedProjectId:T,globalModeLoading:w}=Yt(),{data:A,loading:O,error:M,refetch:D}=cn(Wx,[T],{enabled:!w}),W=A??[],Y=k=>{switch(k){case"pass":return s.jsx(uu,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(S1,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(Bx,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(Sn,{className:"h-4 w-4 text-slate-500"})}},K=k=>{switch(k){case"pass":return"All CI checks passed";case"fail":return"One or more CI checks failed";case"pending":return"CI checks are still running";default:return"No CI data available"}},J=k=>k===null?"No review decision yet":k===100?"PR has been approved":k===0?"Changes have been requested":`Review score: ${k}`,ie=q.useMemo(()=>W.filter(k=>{switch(f){case"needs-work":return k.ciStatus==="fail"||k.reviewScore===0;case"pending":return k.ciStatus==="pending"||k.ciStatus==="unknown"||k.reviewScore===null;case"passed":return k.ciStatus==="pass"&&k.reviewScore===100;case"all":default:return!0}}),[W,f]),P=q.useMemo(()=>[...ie].sort((ee,_)=>{let ce=0;switch(b){case"number":ce=ee.number-_.number;break;case"title":ce=ee.title.localeCompare(_.title);break;case"branch":ce=ee.branch.localeCompare(_.branch);break;case"ciStatus":{const me={fail:0,pending:1,unknown:2,pass:3};ce=(me[ee.ciStatus]??2)-(me[_.ciStatus]??2);break}case"reviewScore":{const me=ee.reviewScore??-1,fe=_.reviewScore??-1;ce=me-fe;break}}return v==="asc"?ce:-ce}),[ie,b,v]),G=k=>{b===k?p(v==="asc"?"desc":"asc"):(S(k),p("desc"))},Z=k=>b!==k?s.jsx(Ib,{className:"h-3 w-3 text-slate-600"}):v==="asc"?s.jsx(Xb,{className:"h-3 w-3 text-indigo-400"}):s.jsx(Fb,{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(M)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Sn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load PRs"}),s.jsx("div",{className:"text-sm text-slate-500",children:M.message}),s.jsx(Fe,{onClick:()=>D(),children:"Retry"})]});const C=async()=>{c(!0);try{const k=await b2();N({title:"Reviewer Started",message:k.pid?`Started with PID ${k.pid}`:"Reviewer started",type:"success"})}catch(k){N({title:"Reviewer Failed",message:k instanceof Error?k.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(Fe,{size:"sm",onClick:C,disabled:d,children:[s.jsx(ao,{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:()=>G("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),Z("number")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>G("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),Z("branch")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>G("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),Z("ciStatus")]})}),s.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>G("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),Z("reviewScore")]})}),s.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Actions"})]})}),s.jsxs("tbody",{className:"divide-y divide-slate-800",children:[P.map(k=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>r(l===k.number?null:k.number),children:[s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center",children:[s.jsxs("span",{className:"text-slate-500 font-mono mr-2",children:["#",k.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:k.title})]})}),s.jsx("td",{className:"px-6 py-4",children:s.jsx("span",{className:"px-2 py-1 bg-slate-800 text-slate-400 border border-slate-700 rounded text-xs font-mono",children:k.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:K(k.ciStatus),children:[Y(k.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:k.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:k.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:J(k.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${k.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${k.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${k.reviewScore>=70?"text-green-500":"text-red-500"}`,children:k.reviewScore})]}):s.jsx("span",{className:"text-slate-600 text-sm",title:"No review decision yet",children:"—"})}),s.jsx("td",{className:"px-6 py-4 text-right",children:s.jsx("a",{href:k.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:ee=>ee.stopPropagation(),children:s.jsx(Hx,{className:"h-4 w-4"})})})]},k.number)),P.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(ht,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const k=W.find(ee=>ee.number===l);return k?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:k.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:k.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:K(k.ciStatus),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"CI Status"}),s.jsxs("div",{className:"flex items-center space-x-1 mt-1",children:[Y(k.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:k.ciStatus})]})]}),k.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:J(k.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${k.reviewScore>=70?"text-green-500":"text-red-500"}`,children:k.reviewScore})]})]})]}):null})()})]})},Ya=_e.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}=Yt(),[c,f]=q.useState(!1),[m,b]=q.useState(!1),{data:S,loading:v,error:p,refetch:N}=cn(R2,[r],{enabled:!d});q.useEffect(()=>{if(!(S!=null&&S.enabled))return;const Y=setInterval(()=>{N()},1e4);return()=>clearInterval(Y)},[S==null?void 0:S.enabled,N]);const T=async Y=>{b(!0);try{await Kx(Y),l({title:Y?"Scanner Enabled":"Scanner Disabled",message:Y?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:Y?"success":"info"}),N()}catch(K){l({title:"Toggle Failed",message:K instanceof Error?K.message:"Failed to toggle scanner",type:"error"})}finally{b(!1)}},w=async()=>{f(!0);try{const Y=await A2();Y.created.length>0?l({title:"Scan Complete",message:`Created ${Y.created.length} PRD(s): ${Y.created.join(", ")}`,type:"success"}):l({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),Y.errors.length>0&&l({title:"Scan Errors",message:Y.errors.join("; "),type:"warning"}),N()}catch(Y){l({title:"Scan Failed",message:Y instanceof Error?Y.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(Sn,{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(Fe,{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(ht,{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(Yx,{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),M=lS(S.items),D=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(Fe,{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(ht,{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:D})]}),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(ht,{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(M).map(([Y,K])=>s.jsxs(ht,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:Y}),s.jsx("div",{className:"space-y-2",children:K.map(J=>s.jsx(aS,{item:J},J.hash))})]},Y))]})};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($1,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?s.jsx(uu,{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:uu,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Lx,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:Sn,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:Sn,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 ft=_e.forwardRef(({className:l="",label:r,error:d,helperText:c,options:f,value:m,onChange:b,children:S,...v},p)=>{const N=_e.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,M=D=>{b&&b(D.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:M,...v,children:f?f.map(D=>s.jsx("option",{value:D.value,children:D.label},D.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]})});ft.displayName="Select";const ke=_e.forwardRef(({className:l="",label:r,error:d,helperText:c,rightIcon:f,...m},b)=>{const S=_e.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]})});ke.displayName="Input";var Ds={},Ca={},Fi={},Rs={},Sf={},Dg;function rS(){return Dg||(Dg=1,Object.defineProperty(Sf,"__esModule",{value:!0})),Sf}var Zi={},Wi={},Rg;function qs(){var r,d,c,f,m,ty,S;if(Rg)return Wi;Rg=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.CronField=void 0;let l=(S=class{constructor(p,N={rawValue:""}){Je(this,m);Je(this,r,!1);Je(this,d,!1);Je(this,c,!1);Je(this,f,[]);J0(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:Se(this,m,ty).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=M=>D=>new RegExp(`^\\d{0,2}${D}$`).test(M),w=M=>(p=M,typeof M=="number"?M>=this.min&&M<=this.max:this.chars.some(T(M)));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((M,D)=>te(this,f).indexOf(M)!==D);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,ty=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 Ag;function iS(){if(Ag)return Zi;Ag=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.CronDayOfMonth=void 0;const l=qs(),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 Ii={},_g;function uS(){if(_g)return Ii;_g=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.CronDayOfWeek=void 0;const l=qs(),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 Ii.CronDayOfWeek=f,Ii}var Qi={},kg;function cS(){if(kg)return Qi;kg=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.CronHour=void 0;const l=qs(),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 Qi.CronHour=f,Qi}var Xi={},zg;function oS(){if(zg)return Xi;zg=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.CronMinute=void 0;const l=qs(),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={},va={},Ug;function dS(){if(Ug)return va;Ug=1,Object.defineProperty(va,"__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},M={year:v,month:N,day:v,weekday:N},D={hour:v,minute:v},W={hour:v,minute:v,second:v},Y={hour:v,minute:v,second:v,timeZoneName:p},K={hour:v,minute:v,second:v,timeZoneName:N},J={hour:v,minute:v,hourCycle:"h23"},ie={hour:v,minute:v,second:v,hourCycle:"h23"},P={hour:v,minute:v,second:v,hourCycle:"h23",timeZoneName:p},G={hour:v,minute:v,second:v,hourCycle:"h23",timeZoneName:N},Z={year:v,month:v,day:v,hour:v,minute:v},C={year:v,month:v,day:v,hour:v,minute:v,second:v},k={year:v,month:p,day:v,hour:v,minute:v},ee={year:v,month:p,day:v,hour:v,minute:v,second:v},_={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},me={year:v,month:N,day:v,hour:v,minute:v,second:v,timeZoneName:p},fe={year:v,month:N,day:v,weekday:N,hour:v,minute:v,timeZoneName:N},$={year:v,month:N,day:v,weekday:N,hour:v,minute:v,second:v,timeZoneName:N};class se{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 he=null;class oe extends se{static get instance(){return he===null&&(he=new oe),he}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 es(this.offset(i),h)}offset(i){return-new Date(i).getTimezoneOffset()}equals(i){return i.type==="system"}get isValid(){return!0}}const Ne=new Map;function U(g){let i=Ne.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"}),Ne.set(g,i)),i}const ne={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function ge(g,i){const h=g.format(i).replace(/\u200E/g,""),y=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(h),[,j,R,L,H,B,de,pe]=y;return[L,j,R,H,B,de,pe]}function xe(g,i){const h=g.formatToParts(i),y=[];for(let j=0;j<h.length;j++){const{type:R,value:L}=h[j],H=ne[R];R==="era"?y[H]=L:Ce(H)||(y[H]=parseInt(L,10))}return y}const Oe=new Map;class Te extends se{static create(i){let h=Oe.get(i);return h===void 0&&Oe.set(i,h=new Te(i)),h}static resetCache(){Oe.clear(),Ne.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=Te.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 es(this.offset(i),h)}offset(i){if(!this.valid)return NaN;const h=new Date(i);if(isNaN(h))return NaN;const y=U(this.name);let[j,R,L,H,B,de,pe]=y.formatToParts?xe(y,h):ge(y,h);H==="BC"&&(j=-Math.abs(j)+1);const $e=Ft({year:j,month:R,day:L,hour:B===24?0:B,minute:de,second:pe,millisecond:0});let De=+h;const yt=De%1e3;return De-=yt>=0?yt:1e3+yt,($e-De)/(60*1e3)}equals(i){return i.type==="iana"&&i.name===this.name}get isValid(){return this.valid}}let qe={};function pt(g,i={}){const h=JSON.stringify([g,i]);let y=qe[h];return y||(y=new Intl.ListFormat(g,i),qe[h]=y),y}const Ke=new Map;function sa(g,i={}){const h=JSON.stringify([g,i]);let y=Ke.get(h);return y===void 0&&(y=new Intl.DateTimeFormat(g,i),Ke.set(h,y)),y}const on=new Map;function Pl(g,i={}){const h=JSON.stringify([g,i]);let y=on.get(h);return y===void 0&&(y=new Intl.NumberFormat(g,i),on.set(h,y)),y}const Jn=new Map;function Ga(g,i={}){const{base:h,...y}=i,j=JSON.stringify([g,y]);let R=Jn.get(j);return R===void 0&&(R=new Intl.RelativeTimeFormat(g,i),Jn.set(j,R)),R}let Fa=null;function Gl(){return Fa||(Fa=new Intl.DateTimeFormat().resolvedOptions().locale,Fa)}const ye=new Map;function Re(g){let i=ye.get(g);return i===void 0&&(i=new Intl.DateTimeFormat(g).resolvedOptions(),ye.set(g,i)),i}const mt=new Map;function Ot(g){let i=mt.get(g);if(!i){const h=new Intl.Locale(g);i="getWeekInfo"in h?h.getWeekInfo():h.weekInfo,"minimalDays"in i||(i={...wn,...i}),mt.set(g,i)}return i}function Za(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=sa(g).resolvedOptions(),j=g}catch{const B=g.substring(0,h);y=sa(B).resolvedOptions(),j=B}const{numberingSystem:R,calendar:L}=y;return[j,R,L]}}function Vs(g,i,h){return(h||i)&&(g.includes("-u-")||(g+="-u"),h&&(g+=`-ca-${h}`),i&&(g+=`-nu-${i}`)),g}function Bs(g){const i=[];for(let h=1;h<=12;h++){const y=je.utc(2009,h,1);i.push(g(y))}return i}function Ht(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 Fl(g){return g.numberingSystem&&g.numberingSystem!=="latn"?!1:g.numberingSystem==="latn"||!g.locale||g.locale.startsWith("en")||Re(g.locale).numberingSystem==="latn"}class Zl{constructor(i,h,y){this.padTo=y.padTo||0,this.floor=y.floor||!1;const{padTo:j,floor:R,...L}=y;if(!h||Object.keys(L).length>0){const H={useGrouping:!1,...y};y.padTo>0&&(H.minimumIntegerDigits=y.padTo),this.inf=Pl(i,H)}}format(i){if(this.inf){const h=this.floor?Math.floor(i):i;return this.inf.format(h)}else{const h=this.floor?Math.floor(i):Xl(i,3);return et(h,this.padTo)}}}class Jt{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 L=-1*(i.offset/60),H=L>=0?`Etc/GMT+${L}`:`Etc/GMT${L}`;i.offset!==0&&Te.create(H).valid?(j=H,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 R={...this.opts};R.timeZone=R.timeZone||j,this.dtf=sa(h,R)}format(){return this.originalZone?this.formatToParts().map(({value:i})=>i).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const i=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?i.map(h=>{if(h.type==="timeZoneName"){const y=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...h,value:y}}else return h}):i}resolvedOptions(){return this.dtf.resolvedOptions()}}class Wa{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):mn(h,i,this.opts.numeric,this.opts.style!=="long")}formatToParts(i,h){return this.rtf?this.rtf.formatToParts(i,h):[]}}const wn={firstDay:1,minimalDays:4,weekend:[6,7]};class Ze{static fromOpts(i){return Ze.create(i.locale,i.numberingSystem,i.outputCalendar,i.weekSettings,i.defaultToEN)}static create(i,h,y,j,R=!1){const L=i||ct.defaultLocale,H=L||(R?"en-US":Gl()),B=h||ct.defaultNumberingSystem,de=y||ct.defaultOutputCalendar,pe=Fr(j)||ct.defaultWeekSettings;return new Ze(H,B,de,pe,L)}static resetCache(){Fa=null,Ke.clear(),on.clear(),Jn.clear(),ye.clear(),mt.clear()}static fromObject({locale:i,numberingSystem:h,outputCalendar:y,weekSettings:j}={}){return Ze.create(i,h,y,j)}constructor(i,h,y,j,R){const[L,H,B]=Za(i);this.locale=L,this.numberingSystem=h||H||null,this.outputCalendar=y||B||null,this.weekSettings=j,this.intl=Vs(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=R,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Fl(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:Ze.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,bu,()=>{const y=this.intl==="ja"||this.intl.startsWith("ja-");h&=!y;const j=h?{month:i,day:"numeric"}:{month:i},R=h?"format":"standalone";if(!this.monthsCache[R][i]){const L=y?H=>this.dtFormatter(H,j).format():H=>this.extract(H,j,"month");this.monthsCache[R][i]=Bs(L)}return this.monthsCache[R][i]})}weekdays(i,h=!1){return jn(this,i,Xs,()=>{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]=Ht(R=>this.extract(R,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),R=j.formatToParts(),L=R.find(H=>H.type.toLowerCase()===y);return L?L.value:null}numberFormatter(i={}){return new Zl(this.intl,i.forceSimple||this.fastNumbers,i)}dtFormatter(i,h={}){return new Jt(i,this.intl,h)}relFormatter(i={}){return new Wa(this.intl,this.isEnglish(),i)}listFormatter(i={}){return pt(this.intl,i)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Re(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:fn()?Ot(this.locale):wn}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 Br=null;class vt extends se{static get utcInstance(){return Br===null&&(Br=new vt(0)),Br}static instance(i){return i===0?vt.utcInstance:new vt(i)}static parseSpecifier(i){if(i){const h=i.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(h)return new vt(Kl(h[1],h[2]))}return null}constructor(i){super(),this.fixed=i}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${es(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${es(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(i,h){return es(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 Kt extends se{constructor(i){super(),this.zoneName=i}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function $t(g,i){if(Ce(g)||g===null)return i;if(g instanceof se)return g;if(Dt(g)){const h=g.toLowerCase();return h==="default"?i:h==="local"||h==="system"?oe.instance:h==="utc"||h==="gmt"?vt.utcInstance:vt.parseSpecifier(h)||Te.create(g)}else return ca(g)?vt.instance(g):typeof g=="object"&&"offset"in g&&typeof g.offset=="function"?g:new Kt(g)}const Pt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},ou={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=Pt.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(Pt.hanidec)!==-1)i+=lo.indexOf(g[h]);else for(const j in ou){const[R,L]=ou[j];y>=R&&y<=L&&(i+=y-R)}}return parseInt(i,10)}else return i}const Kn=new Map;function Ys(){Kn.clear()}function ea({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(`${Pt[h]}${i}`),y.set(i,j)),j}let dn=()=>Date.now(),Wl="system",el=null,du=null,Yr=null,$s=60,tl,fu=null;class ct{static get now(){return dn}static set now(i){dn=i}static set defaultZone(i){Wl=i}static get defaultZone(){return $t(Wl,oe.instance)}static get defaultLocale(){return el}static set defaultLocale(i){el=i}static get defaultNumberingSystem(){return du}static set defaultNumberingSystem(i){du=i}static get defaultOutputCalendar(){return Yr}static set defaultOutputCalendar(i){Yr=i}static get defaultWeekSettings(){return fu}static set defaultWeekSettings(i){fu=Fr(i)}static get twoDigitCutoffYear(){return $s}static set twoDigitCutoffYear(i){$s=i%100}static get throwOnInvalid(){return tl}static set throwOnInvalid(i){tl=i}static resetCaches(){Ze.resetCache(),Te.resetCache(),je.resetCache(),Ys()}}class ua{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],Ps=[0,31,60,91,121,152,182,213,244,274,305,335];function ta(g,i){return new ua("unit out of range",`you specified ${i} (of type ${typeof i}) as a ${g}, which is invalid`)}function Gs(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)?Ps:$r)[i-1]}function Ia(g,i){const h=nl(g)?Ps:$r,y=h.findIndex(R=>R<i),j=i-h[y];return{month:y+1,day:j}}function Nt(g,i){return(g-i+7)%7+1}function zt(g,i=4,h=1){const{year:y,month:j,day:R}=g,L=Pr(y,j,R),H=Nt(Gs(y,j,R),h);let B=Math.floor((L-H+14-i)/7),de;return B<1?(de=y-1,B=ll(de,i,h)):B>ll(y,i,h)?(de=y+1,B=1):de=y,{weekYear:de,weekNumber:B,weekday:H,...ts(g)}}function En(g,i=4,h=1){const{weekYear:y,weekNumber:j,weekday:R}=g,L=Nt(Gs(y,1,i),h),H=Xa(y);let B=j*7+R-L-7+i,de;B<1?(de=y-1,B+=Xa(de)):B>H?(de=y+1,B-=Xa(y)):de=y;const{month:pe,day:ze}=Ia(de,B);return{year:de,month:pe,day:ze,...ts(g)}}function Il(g){const{year:i,month:h,day:y}=g,j=Pr(i,h,y);return{year:i,ordinal:j,...ts(g)}}function hu(g){const{year:i,ordinal:h}=g,{month:y,day:j}=Ia(i,h);return{year:i,month:y,day:j,...ts(g)}}function mu(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 gu(g,i=4,h=1){const y=Qa(g.weekYear),j=Gt(g.weekNumber,1,ll(g.weekYear,i,h)),R=Gt(g.weekday,1,7);return y?j?R?!1:ta("weekday",g.weekday):ta("week",g.weekNumber):ta("weekYear",g.weekYear)}function Ql(g){const i=Qa(g.year),h=Gt(g.ordinal,1,Xa(g.year));return i?h?!1:ta("ordinal",g.ordinal):ta("year",g.year)}function Fs(g){const i=Qa(g.year),h=Gt(g.month,1,12),y=Gt(g.day,1,Ws(g.year,g.month));return i?h?y?!1:ta("day",g.day):ta("month",g.month):ta("year",g.year)}function Tn(g){const{hour:i,minute:h,second:y,millisecond:j}=g,R=Gt(i,0,23)||i===24&&h===0&&y===0&&j===0,L=Gt(h,0,59),H=Gt(y,0,59),B=Gt(j,0,999);return R?L?H?B?!1:ta("millisecond",j):ta("second",y):ta("minute",h):ta("hour",i)}function Ce(g){return typeof g>"u"}function ca(g){return typeof g=="number"}function Qa(g){return typeof g=="number"&&g%1===0}function Dt(g){return typeof g=="string"}function xu(g){return Object.prototype.toString.call(g)==="[object Date]"}function Gr(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function fn(){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 yu(g,i,h){if(g.length!==0)return g.reduce((y,j)=>{const R=[i(j),j];return y&&h(y[0],R[0])===y[0]?y:R},null)[1]}function pu(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(!Gt(g.firstDay,1,7)||!Gt(g.minimalDays,1,7)||!Array.isArray(g.weekend)||g.weekend.some(i=>!Gt(i,1,7)))throw new b("Invalid week settings");return{firstDay:g.firstDay,minimalDays:g.minimalDays,weekend:Array.from(g.weekend)}}function Gt(g,i,h){return Qa(g)&&g>=i&&g<=h}function Zs(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 hn(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 Xl(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 Xa(g){return nl(g)?366:365}function Ws(g,i){const h=Zs(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 Ft(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(Gs(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(Xa(g)-y+j)/7}function Jl(g){return g>99?g:g>ct.twoDigitCutoffYear?1900+g:2e3+g}function Mn(g,i,h,y=null){const j=new Date(g),R={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};y&&(R.timeZone=y);const L={timeZoneName:i,...R},H=new Intl.DateTimeFormat(h,L).formatToParts(j).find(B=>B.type.toLowerCase()==="timezonename");return H?H.value:null}function Kl(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 Ja(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 es(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 ts(g){return pu(g,["hour","minute","second","millisecond"])}const vu=["January","February","March","April","May","June","July","August","September","October","November","December"],Qs=["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 bu(g){switch(g){case"narrow":return[...ro];case"short":return[...Qs];case"long":return[...vu];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const as=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Da=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ir=["M","T","W","T","F","S","S"];function Xs(g){switch(g){case"narrow":return[...Ir];case"short":return[...Da];case"long":return[...as];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const On=["AM","PM"],sl=["Before Christ","Anno Domini"],Su=["BC","AD"],Qr=["B","A"];function Xr(g){switch(g){case"narrow":return[...Qr];case"short":return[...Su];case"long":return[...sl];default:return null}}function ns(g){return On[g.hour<12?0:1]}function Ka(g,i){return Xs(i)[g.weekday-1]}function Jr(g,i){return bu(i)[g.month-1]}function ls(g,i){return Xr(i)[g.year<0?0:1]}function mn(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."]},R=["hours","minutes","seconds"].indexOf(g)===-1;if(h==="auto"&&R){const ze=g==="days";switch(i){case 1:return ze?"tomorrow":`next ${j[g][0]}`;case-1:return ze?"yesterday":`last ${j[g][0]}`;case 0:return ze?"today":`this ${j[g][0]}`}}const L=Object.is(i,-0)||i<0,H=Math.abs(i),B=H===1,de=j[g],pe=y?B?de[1]:de[2]||de[1]:B?j[g][0]:g;return L?`${H} ${pe} ago`:`in ${H} ${pe}`}function Js(g,i){let h="";for(const y of g)y.literal?h+=y.val:h+=i(y.val);return h}const Ks={D:T,DD:w,DDD:O,DDDD:M,t:D,tt:W,ttt:Y,tttt:K,T:J,TT:ie,TTT:P,TTTT:G,f:Z,ff:k,fff:ce,ffff:fe,F:C,FF:ee,FFF:me,FFFF:$};class Ut{static create(i,h={}){return new Ut(i,h)}static parseFormat(i){let h=null,y="",j=!1;const R=[];for(let L=0;L<i.length;L++){const H=i.charAt(L);H==="'"?((y.length>0||j)&&R.push({literal:j||/^\s+$/.test(y),val:y===""?"'":y}),h=null,y="",j=!j):j||H===h?y+=H:(y.length>0&&R.push({literal:/^\s+$/.test(y),val:y}),y=H,h=H)}return y.length>0&&R.push({literal:j||/^\s+$/.test(y),val:y}),R}static macroTokenToFormatOpts(i){return Ks[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",R=(De,yt)=>this.loc.extract(i,De,yt),L=De=>i.isOffsetFixed&&i.offset===0&&De.allowZ?"Z":i.isValid?i.zone.formatOffset(i.ts,De.format):"",H=()=>y?ns(i):R({hour:"numeric",hourCycle:"h12"},"dayperiod"),B=(De,yt)=>y?Jr(i,De):R(yt?{month:De}:{month:De,day:"numeric"},"month"),de=(De,yt)=>y?Ka(i,De):R(yt?{weekday:De}:{weekday:De,month:"long",day:"numeric"},"weekday"),pe=De=>{const yt=Ut.macroTokenToFormatOpts(De);return yt?this.formatWithSystemDefault(i,yt):De},ze=De=>y?ls(i,De):R({era:De},"era"),$e=De=>{switch(De){case"S":return this.num(i.millisecond);case"u":case"SSS":return this.num(i.millisecond,3);case"s":return this.num(i.second);case"ss":return this.num(i.second,2);case"uu":return this.num(Math.floor(i.millisecond/10),2);case"uuu":return this.num(Math.floor(i.millisecond/100));case"m":return this.num(i.minute);case"mm":return this.num(i.minute,2);case"h":return this.num(i.hour%12===0?12:i.hour%12);case"hh":return this.num(i.hour%12===0?12:i.hour%12,2);case"H":return this.num(i.hour);case"HH":return this.num(i.hour,2);case"Z":return L({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return L({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return L({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return i.zone.offsetName(i.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return i.zone.offsetName(i.ts,{format:"long",locale:this.loc.locale});case"z":return i.zoneName;case"a":return H();case"d":return j?R({day:"numeric"},"day"):this.num(i.day);case"dd":return j?R({day:"2-digit"},"day"):this.num(i.day,2);case"c":return this.num(i.weekday);case"ccc":return de("short",!0);case"cccc":return de("long",!0);case"ccccc":return de("narrow",!0);case"E":return this.num(i.weekday);case"EEE":return de("short",!1);case"EEEE":return de("long",!1);case"EEEEE":return de("narrow",!1);case"L":return j?R({month:"numeric",day:"numeric"},"month"):this.num(i.month);case"LL":return j?R({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?R({month:"numeric"},"month"):this.num(i.month);case"MM":return j?R({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?R({year:"numeric"},"year"):this.num(i.year);case"yy":return j?R({year:"2-digit"},"year"):this.num(i.year.toString().slice(-2),2);case"yyyy":return j?R({year:"numeric"},"year"):this.num(i.year,4);case"yyyyyy":return j?R({year:"numeric"},"year"):this.num(i.year,6);case"G":return ze("short");case"GG":return ze("long");case"GGGGG":return ze("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(De)}};return Js(Ut.parseFormat(h),$e)}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}},R=(pe,ze)=>$e=>{const De=j($e);if(De){const yt=ze.isNegativeDuration&&De!==ze.largestUnit?y:1;let qt;return this.opts.signMode==="negativeLargestOnly"&&De!==ze.largestUnit?qt="never":this.opts.signMode==="all"?qt="always":qt="auto",this.num(pe.get(De)*yt,$e.length,qt)}else return $e},L=Ut.parseFormat(h),H=L.reduce((pe,{literal:ze,val:$e})=>ze?pe:pe.concat($e),[]),B=i.shiftTo(...H.map(j).filter(pe=>pe)),de={isNegativeDuration:B<0,largestUnit:Object.keys(B.values)[0]};return Js(L,R(B,de))}}const ss=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function en(...g){const i=g.reduce((h,y)=>h+y.source,"");return RegExp(`^${i}$`)}function Dn(...g){return i=>g.reduce(([h,y,j],R)=>{const[L,H,B]=R(i,j);return[{...h,...L},H||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 gn(...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 rs=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,is=`(?:${rs.source}?(?:\\[(${ss.source})\\])?)?`,Kr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,er=RegExp(`${Kr.source}${is}`),us=RegExp(`(?:[Tt]${er.source})?`),cs=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,tr=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Nu=/(\d{4})-?(\d{3})/,io=gn("weekYear","weekNumber","weekDay"),uo=gn("year","ordinal"),co=/(\d{4})-(\d\d)-(\d\d)/,ar=RegExp(`${Kr.source} ?(?:${rs.source}|(${ss.source}))?`),oo=RegExp(`(?: ${ar.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 os(g,i){const h=!g[i]&&!g[i+1],y=Kl(g[i+1],g[i+2]),j=h?null:vt.instance(y);return[{},j,i+3]}function ul(g,i){const h=g[i]?Te.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,R,L,H,B,de]=g,pe=i[0]==="-",ze=B&&B[0]==="-",$e=(De,yt=!1)=>De!==void 0&&(yt||De&&pe)?-De:De;return[{years:$e(hn(h)),months:$e(hn(y)),weeks:$e(hn(j)),days:$e(hn(R)),hours:$e(hn(L)),minutes:$e(hn(H)),seconds:$e(hn(B),B==="-0"),milliseconds:$e(Zr(de),ze)}]}const xo={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ds(g,i,h,y,j,R,L){const H={year:i.length===2?Jl(jt(i)):jt(i),month:Qs.indexOf(h)+1,day:jt(y),hour:jt(j),minute:jt(R)};return L&&(H.second=jt(L)),g&&(H.weekday=g.length>3?as.indexOf(g)+1:Da.indexOf(g)+1),H}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,R,L,H,B,de,pe,ze]=g,$e=ds(i,j,y,h,R,L,H);let De;return B?De=xo[B]:de?De=0:De=Kl(pe,ze),[$e,new vt(De)]}function vo(g){return g.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const ju=/^(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 wu(g){const[,i,h,y,j,R,L,H]=g;return[ds(i,j,y,h,R,L,H),vt.utcInstance]}function No(g){const[,i,h,y,j,R,L,H]=g;return[ds(i,H,h,y,j,R,L),vt.utcInstance]}const jo=en(cs,us),wo=en(tr,us),Eo=en(Nu,us),To=en(er),Eu=Dn(fo,il,os,ul),ei=Dn(io,il,os,ul),fs=Dn(uo,il,os,ul),Co=Dn(il,os,ul);function Tu(g){return wt(g,[jo,Eu],[wo,ei],[Eo,fs],[To,Co])}function Cu(g){return wt(vo(g),[yo,po])}function Mu(g){return wt(g,[ju,wu],[bo,wu],[So,No])}function Ou(g){return wt(g,[mo,go])}const Du=Dn(il);function cl(g){return wt(g,[ho,Du])}const Mo=en(co,oo),Oo=en(ar),Do=Dn(il,os,ul);function Ru(g){return wt(g,[Mo,Eu],[Oo,Do])}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}},hs={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},oa=146097/400,tn=146097/4800,Au={years:{quarters:4,months:12,weeks:oa/7,days:oa,hours:oa*24,minutes:oa*24*60,seconds:oa*24*60*60,milliseconds:oa*24*60*60*1e3},quarters:{months:3,weeks:oa/28,days:oa/4,hours:oa*24/4,minutes:oa*24*60/4,seconds:oa*24*60*60/4,milliseconds:oa*24*60*60*1e3/4},months:{weeks:tn/7,days:tn,hours:tn*24,minutes:tn*24*60,seconds:tn*24*60*60,milliseconds:tn*24*60*60*1e3},...ol},xn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ai=xn.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 Ye(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;xn.reduceRight((y,j)=>{if(Ce(i[j]))return y;if(y){const R=i[y]*h,L=g[j][y],H=Math.floor(R/L);i[j]+=H*h,i[y]-=H*L*h}return j},null),xn.reduce((y,j)=>{if(Ce(i[j]))return y;if(y){const R=i[y]%1;i[y]-=R,i[j]+=R*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 Ye{constructor(i){const h=i.conversionAccuracy==="longterm"||!1;let y=h?Au:hs;i.matrix&&(y=i.matrix),this.values=i.values,this.loc=i.loc||Ze.create(),this.conversionAccuracy=h?"longterm":"casual",this.invalid=i.invalid||null,this.matrix=y,this.isLuxonDuration=!0}static fromMillis(i,h){return Ye.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 Ye({values:Ja(i,Ye.normalizeUnit),loc:Ze.fromObject(h),conversionAccuracy:h.conversionAccuracy,matrix:h.matrix})}static fromDurationLike(i){if(ca(i))return Ye.fromMillis(i);if(Ye.isDuration(i))return i;if(typeof i=="object")return Ye.fromObject(i);throw new b(`Unknown duration argument ${i} of type ${typeof i}`)}static fromISO(i,h){const[y]=Ou(i);return y?Ye.fromObject(y,h):Ye.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static fromISOTime(i,h){const[y]=cl(i);return y?Ye.fromObject(y,h):Ye.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 ua?i:new ua(i,h);if(ct.throwOnInvalid)throw new c(y);return new Ye({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?Ut.create(this.loc,y).formatDurationFromString(this,i):ti}toHuman(i={}){if(!this.isValid)return ti;const h=i.showZeros!==!1,y=xn.map(j=>{const R=this.values[j];return Ce(R)||R===0&&!h?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...i,unit:j.slice(0,-1)}).format(R)}).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+=Xl(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=Ye.fromDurationLike(i),y={};for(const j of xn)(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=Ye.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[Ye.normalizeUnit(i)]}set(i){if(!this.isValid)return this;const h={...this.values,...Ja(i,Ye.normalizeUnit)};return ba(this,{values:h})}reconfigure({locale:i,numberingSystem:h,conversionAccuracy:y,matrix:j}={}){const L={loc:this.loc.clone({locale:i,numberingSystem:h}),matrix:j,conversionAccuracy:y};return ba(this,L)}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(L=>Ye.normalizeUnit(L));const h={},y={},j=this.toObject();let R;for(const L of xn)if(i.indexOf(L)>=0){R=L;let H=0;for(const de in y)H+=this.matrix[de][L]*y[de],y[de]=0;ca(j[L])&&(H+=j[L]);const B=Math.trunc(H);h[L]=B,y[L]=(H*1e3-B*1e3)/1e3}else ca(j[L])&&(y[L]=j[L]);for(const L in y)y[L]!==0&&(h[R]+=L===R?y[L]:y[L]/this.matrix[R][L]);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 xn)if(!h(this.values[y],i.values[y]))return!1;return!0}}const dl="Invalid Interval";function Ro(g,i){return!g||!g.isValid?ot.invalid("missing or invalid start"):!i||!i.isValid?ot.invalid("missing or invalid end"):i<g?ot.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 ot{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 ua?i:new ua(i,h);if(ct.throwOnInvalid)throw new d(y);return new ot({invalid:y})}static fromDateTimes(i,h){const y=ha(i),j=ha(h),R=Ro(y,j);return R??new ot({start:y,end:j})}static after(i,h){const y=Ye.fromDurationLike(h),j=ha(i);return ot.fromDateTimes(j,j.plus(y))}static before(i,h){const y=Ye.fromDurationLike(h),j=ha(i);return ot.fromDateTimes(j.minus(y),j)}static fromISO(i,h){const[y,j]=(i||"").split("/",2);if(y&&j){let R,L;try{R=je.fromISO(y,h),L=R.isValid}catch{L=!1}let H,B;try{H=je.fromISO(j,h),B=H.isValid}catch{B=!1}if(L&&B)return ot.fromDateTimes(R,H);if(L){const de=Ye.fromISO(j,h);if(de.isValid)return ot.after(R,de)}else if(B){const de=Ye.fromISO(y,h);if(de.isValid)return ot.before(H,de)}}return ot.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?ot.fromDateTimes(i||this.s,h||this.e):this}splitAt(...i){if(!this.isValid)return[];const h=i.map(ha).filter(L=>this.contains(L)).sort((L,H)=>L.toMillis()-H.toMillis()),y=[];let{s:j}=this,R=0;for(;j<this.e;){const L=h[R]||this.e,H=+L>+this.e?this.e:L;y.push(ot.fromDateTimes(j,H)),j=H,R+=1}return y}splitBy(i){const h=Ye.fromDurationLike(i);if(!this.isValid||!h.isValid||h.as("milliseconds")===0)return[];let{s:y}=this,j=1,R;const L=[];for(;y<this.e;){const H=this.start.plus(h.mapUnits(B=>B*j));R=+H>+this.e?this.e:H,L.push(ot.fromDateTimes(y,R)),y=R,j+=1}return L}divideEqually(i){return this.isValid?this.splitBy(this.length()/i).slice(0,i):[]}overlaps(i){return this.e>i.s&&this.s<i.e}abutsStart(i){return this.isValid?+this.e==+i.s:!1}abutsEnd(i){return this.isValid?+i.e==+this.s:!1}engulfs(i){return this.isValid?this.s<=i.s&&this.e>=i.e:!1}equals(i){return!this.isValid||!i.isValid?!1:this.s.equals(i.s)&&this.e.equals(i.e)}intersection(i){if(!this.isValid)return this;const h=this.s>i.s?this.s:i.s,y=this.e<i.e?this.e:i.e;return h>=y?null:ot.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 ot.fromDateTimes(h,y)}static merge(i){const[h,y]=i.sort((j,R)=>j.s-R.s).reduce(([j,R],L)=>R?R.overlaps(L)||R.abutsStart(L)?[j,R.union(L)]:[j.concat([R]),L]:[j,L],[[],null]);return y&&h.push(y),h}static xor(i){let h=null,y=0;const j=[],R=i.map(B=>[{time:B.s,type:"s"},{time:B.e,type:"e"}]),L=Array.prototype.concat(...R),H=L.sort((B,de)=>B.time-de.time);for(const B of H)y+=B.type==="s"?1:-1,y===1?h=B.time:(h&&+h!=+B.time&&j.push(ot.fromDateTimes(h,B.time)),h=null);return ot.merge(j)}difference(...i){return ot.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?Ut.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):Ye.invalid(this.invalidReason)}mapEndpoints(i){return ot.fromDateTimes(i(this.s),i(this.e))}}class ms{static hasDST(i=ct.defaultZone){const h=je.now().setZone(i).set({month:12});return!i.isUniversal&&h.offset!==h.set({month:6}).offset}static isValidIANAZone(i){return Te.isValidZone(i)}static normalizeZone(i){return $t(i,ct.defaultZone)}static getStartOfWeek({locale:i=null,locObj:h=null}={}){return(h||Ze.create(i)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:i=null,locObj:h=null}={}){return(h||Ze.create(i)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:i=null,locObj:h=null}={}){return(h||Ze.create(i)).getWeekendDays().slice()}static months(i="long",{locale:h=null,numberingSystem:y=null,locObj:j=null,outputCalendar:R="gregory"}={}){return(j||Ze.create(h,y,R)).months(i)}static monthsFormat(i="long",{locale:h=null,numberingSystem:y=null,locObj:j=null,outputCalendar:R="gregory"}={}){return(j||Ze.create(h,y,R)).months(i,!0)}static weekdays(i="long",{locale:h=null,numberingSystem:y=null,locObj:j=null}={}){return(j||Ze.create(h,y,null)).weekdays(i)}static weekdaysFormat(i="long",{locale:h=null,numberingSystem:y=null,locObj:j=null}={}){return(j||Ze.create(h,y,null)).weekdays(i,!0)}static meridiems({locale:i=null}={}){return Ze.create(i).meridiems()}static eras(i="short",{locale:h=null}={}){return Ze.create(h,null,"gregory").eras(i)}static features(){return{relative:Gr(),localeWeek:fn()}}}function aa(g,i){const h=j=>j.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),y=h(i)-h(g);return Math.floor(Ye.fromMillis(y).as("days"))}function gs(g,i,h){const y=[["years",(B,de)=>de.year-B.year],["quarters",(B,de)=>de.quarter-B.quarter+(de.year-B.year)*4],["months",(B,de)=>de.month-B.month+(de.year-B.year)*12],["weeks",(B,de)=>{const pe=aa(B,de);return(pe-pe%7)/7}],["days",aa]],j={},R=g;let L,H;for(const[B,de]of y)h.indexOf(B)>=0&&(L=B,j[B]=de(g,i),H=R.plus(j),H>i?(j[B]--,g=R.plus(j),g>i&&(H=g,j[B]--,g=R.plus(j))):g=H);return[g,j,H,L]}function _u(g,i,h,y){let[j,R,L,H]=gs(g,i,h);const B=i-j,de=h.filter(ze=>["hours","minutes","seconds","milliseconds"].indexOf(ze)>=0);de.length===0&&(L<i&&(L=j.plus({[H]:1})),L!==j&&(R[H]=(R[H]||0)+B/(L-j)));const pe=Ye.fromObject(R,y);return de.length>0?Ye.fromMillis(B,y).shiftTo(...de).plus(pe):pe}const ku="missing Intl.DateTimeFormat.formatToParts support";function We(g,i=h=>h){return{regex:g,deser:([h])=>i(so(h))}}const nr="[  ]",zu=new RegExp(nr,"g");function fl(g){return g.replace(/\./g,"\\.?").replace(zu,nr)}function lr(g){return g.replace(/\./g,"").replace(zu," ").toLowerCase()}function Zt(g,i){return g===null?null:{regex:RegExp(g.map(fl).join("|")),deser:([h])=>g.findIndex(y=>lr(h)===lr(y))+i}}function sr(g,i){return{regex:g,deser:([,h,y])=>Kl(h,y),groups:i}}function xs(g){return{regex:g,deser:([i])=>i}}function Rn(g){return g.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function hl(g,i){const h=ea(i),y=ea(i,"{2}"),j=ea(i,"{3}"),R=ea(i,"{4}"),L=ea(i,"{6}"),H=ea(i,"{1,2}"),B=ea(i,"{1,3}"),de=ea(i,"{1,6}"),pe=ea(i,"{1,9}"),ze=ea(i,"{2,4}"),$e=ea(i,"{4,6}"),De=Vt=>({regex:RegExp(Rn(Vt.val)),deser:([yn])=>yn,literal:!0}),qt=(Vt=>{if(g.literal)return De(Vt);switch(Vt.val){case"G":return Zt(i.eras("short"),0);case"GG":return Zt(i.eras("long"),0);case"y":return We(de);case"yy":return We(ze,Jl);case"yyyy":return We(R);case"yyyyy":return We($e);case"yyyyyy":return We(L);case"M":return We(H);case"MM":return We(y);case"MMM":return Zt(i.months("short",!0),1);case"MMMM":return Zt(i.months("long",!0),1);case"L":return We(H);case"LL":return We(y);case"LLL":return Zt(i.months("short",!1),1);case"LLLL":return Zt(i.months("long",!1),1);case"d":return We(H);case"dd":return We(y);case"o":return We(B);case"ooo":return We(j);case"HH":return We(y);case"H":return We(H);case"hh":return We(y);case"h":return We(H);case"mm":return We(y);case"m":return We(H);case"q":return We(H);case"qq":return We(y);case"s":return We(H);case"ss":return We(y);case"S":return We(B);case"SSS":return We(j);case"u":return xs(pe);case"uu":return xs(H);case"uuu":return We(h);case"a":return Zt(i.meridiems(),0);case"kkkk":return We(R);case"kk":return We(ze,Jl);case"W":return We(H);case"WW":return We(y);case"E":case"c":return We(h);case"EEE":return Zt(i.weekdays("short",!1),1);case"EEEE":return Zt(i.weekdays("long",!1),1);case"ccc":return Zt(i.weekdays("short",!0),1);case"cccc":return Zt(i.weekdays("long",!0),1);case"Z":case"ZZ":return sr(new RegExp(`([+-]${H.source})(?::(${y.source}))?`),2);case"ZZZ":return sr(new RegExp(`([+-]${H.source})(${y.source})?`),2);case"z":return xs(/[a-z_+-/]{1,256}?/i);case" ":return xs(/[^\S\n\r]/);default:return De(Vt)}})(g)||{invalidReason:ku};return qt.token=g,qt}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 Uu(g,i,h){const{type:y,value:j}=g;if(y==="literal"){const B=/^\s+$/.test(j);return{literal:!B,val:B?" ":j}}const R=i[y];let L=y;y==="hour"&&(i.hour12!=null?L=i.hour12?"hour12":"hour24":i.hourCycle!=null?i.hourCycle==="h11"||i.hourCycle==="h12"?L="hour12":L="hour24":L=h.hour12?"hour12":"hour24");let H=ri[L];if(typeof H=="object"&&(H=H[R]),H)return{literal:!1,val:H}}function An(g){return[`^${g.map(h=>h.regex).reduce((h,y)=>`${h}(${y.source})`,"")}$`,g]}function Lu(g,i,h){const y=g.match(i);if(y){const j={};let R=1;for(const L in h)if(Cn(h,L)){const H=h[L],B=H.groups?H.groups+1:1;!H.literal&&H.token&&(j[H.token.val[0]]=H.deser(y.slice(R,R+B))),R+=B}return[y,j]}else return[y,{}]}function Hu(g){const i=R=>{switch(R){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let h=null,y;return Ce(g.z)||(h=Te.create(g.z)),Ce(g.Z)||(h||(h=new vt(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((R,L)=>{const H=i(L);return H&&(R[H]=g[L]),R},{}),h,y]}let rr=null;function _o(){return rr||(rr=je.fromMillis(1555555555555)),rr}function ko(g,i){if(g.literal)return g;const h=Ut.macroTokenToFormatOpts(g.val),y=da(h,i);return y==null||y.includes(void 0)?g:y}function qu(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=qu(Ut.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]=Lu(i,this.regex,this.handlers),[j,R,L]=y?Hu(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:R,specificOffset:L}}else return{input:i,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function ui(g,i,h){return new ii(g,h).explainFromTokens(i)}function ci(g,i,h){const{result:y,zone:j,specificOffset:R,invalidReason:L}=ui(g,i,h);return[y,j,R,L]}function da(g,i){if(!g)return null;const y=Ut.create(i,g).dtFormatter(_o()),j=y.formatToParts(),R=y.resolvedOptions();return j.map(L=>Uu(L,g,R))}const ml="Invalid DateTime",ra=864e13;function Ra(g){return new ua("unsupported zone",`the zone "${g.name}" is not supported`)}function ys(g){return g.weekData===null&&(g.weekData=zt(g.c)),g.weekData}function gl(g){return g.localWeekData===null&&(g.localWeekData=zt(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 ir(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 R=h.offset(y);return j===R?[y,j]:[g-Math.min(j,R)*60*1e3,Math.max(j,R)]}function _a(g,i){g+=i*60*1e3;const h=new Date(g);return{year:h.getUTCFullYear(),month:h.getUTCMonth()+1,day:h.getUTCDate(),hour:h.getUTCHours(),minute:h.getUTCMinutes(),second:h.getUTCSeconds(),millisecond:h.getUTCMilliseconds()}}function ps(g,i,h){return ir(Ft(g),i,h)}function vs(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,R={...g.c,year:y,month:j,day:Math.min(g.c.day,Ws(y,j))+Math.trunc(i.days)+Math.trunc(i.weeks)*7},L=Ye.fromObject({years:i.years-Math.trunc(i.years),quarters:i.quarters-Math.trunc(i.quarters),months:i.months-Math.trunc(i.months),weeks:i.weeks-Math.trunc(i.weeks),days:i.days-Math.trunc(i.days),hours:i.hours,minutes:i.minutes,seconds:i.seconds,milliseconds:i.milliseconds}).as("milliseconds"),H=Ft(R);let[B,de]=ir(H,h,g.zone);return L!==0&&(B+=L,de=g.zone.offset(B)),{ts:B,o:de}}function Sa(g,i,h,y,j,R){const{setZone:L,zone:H}=h;if(g&&Object.keys(g).length!==0||i){const B=i||H,de=je.fromObject(g,{...h,zone:B,specificOffset:R});return L?de:de.setZone(H)}else return je.invalid(new ua("unparsable",`the input "${j}" can't be parsed as ${y}`))}function ur(g,i,h=!0){return g.isValid?Ut.create(Ze.create("en-US"),{allowZ:h,forceSimple:!0}).formatDateTimeFromString(g,i):null}function Wt(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 cr(g,i,h,y,j,R,L){let H=!h||g.c.millisecond!==0||g.c.second!==0,B="";switch(L){case"day":case"month":case"year":break;default:if(B+=et(g.c.hour),L==="hour")break;if(i){if(B+=":",B+=et(g.c.minute),L==="minute")break;H&&(B+=":",B+=et(g.c.second))}else{if(B+=et(g.c.minute),L==="minute")break;H&&(B+=et(g.c.second))}if(L==="second")break;H&&(!y||g.c.millisecond!==0)&&(B+=".",B+=et(g.c.millisecond,3))}return j&&(g.isOffsetFixed&&g.offset===0&&!R?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)))),R&&(B+="["+g.zone.ianaName+"]"),B}const ka={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Vu={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},or={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"],Bu=["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 fa(g){if(an===void 0&&(an=ct.now()),g.type!=="iana")return g.offset(an);const i=g.name;let h=na.get(i);return h===void 0&&(h=g.offset(an),na.set(i,h)),h}function _n(g,i){const h=$t(i.zone,ct.defaultZone);if(!h.isValid)return je.invalid(Ra(h));const y=Ze.fromObject(i);let j,R;if(Ce(g.year))j=ct.now();else{for(const B of za)Ce(g[B])&&(g[B]=ka[B]);const L=Fs(g)||Tn(g);if(L)return je.invalid(L);const H=fa(h);[j,R]=ps(g,H,h)}return new je({ts:j,zone:h,loc:y,o:R})}function kn(g,i,h){const y=Ce(h.round)?!0:h.round,j=Ce(h.rounding)?"trunc":h.rounding,R=(H,B)=>(H=Xl(H,y||h.calendary?0:2,h.calendary?"round":j),i.loc.clone(h).relFormatter(h).format(H,B)),L=H=>h.calendary?i.hasSame(g,H)?0:i.startOf(H).diff(g.startOf(H),H).get(H):i.diff(g,H).get(H);if(h.unit)return R(L(h.unit),h.unit);for(const H of h.units){const B=L(H);if(Math.abs(B)>=1)return R(B,H)}return R(g>i?-0:0,h.units[h.units.length-1])}function bs(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 an;const na=new Map;class je{constructor(i){const h=i.zone||ct.defaultZone;let y=i.invalid||(Number.isNaN(i.ts)?new ua("invalid input"):null)||(h.isValid?null:Ra(h));this.ts=Ce(i.ts)?ct.now():i.ts;let j=null,R=null;if(!y)if(i.old&&i.old.ts===this.ts&&i.old.zone.equals(h))[j,R]=[i.old.c,i.old.o];else{const H=ca(i.o)&&!i.old?i.o:h.offset(this.ts);j=_a(this.ts,H),y=Number.isNaN(j.year)?new ua("invalid input"):null,j=y?null:j,R=y?null:H}this._zone=h,this.loc=i.loc||Ze.create(),this.invalid=y,this.weekData=null,this.localWeekData=null,this.c=j,this.o=R,this.isLuxonDateTime=!0}static now(){return new je({})}static local(){const[i,h]=bs(arguments),[y,j,R,L,H,B,de]=h;return _n({year:y,month:j,day:R,hour:L,minute:H,second:B,millisecond:de},i)}static utc(){const[i,h]=bs(arguments),[y,j,R,L,H,B,de]=h;return i.zone=vt.utcInstance,_n({year:y,month:j,day:R,hour:L,minute:H,second:B,millisecond:de},i)}static fromJSDate(i,h={}){const y=xu(i)?i.valueOf():NaN;if(Number.isNaN(y))return je.invalid("invalid input");const j=$t(h.zone,ct.defaultZone);return j.isValid?new je({ts:y,zone:j,loc:Ze.fromObject(h)}):je.invalid(Ra(j))}static fromMillis(i,h={}){if(ca(i))return i<-ra||i>ra?je.invalid("Timestamp out of range"):new je({ts:i,zone:$t(h.zone,ct.defaultZone),loc:Ze.fromObject(h)});throw new b(`fromMillis requires a numerical input, but received a ${typeof i} with value ${i}`)}static fromSeconds(i,h={}){if(ca(i))return new je({ts:i*1e3,zone:$t(h.zone,ct.defaultZone),loc:Ze.fromObject(h)});throw new b("fromSeconds requires a numerical input")}static fromObject(i,h={}){i=i||{};const y=$t(h.zone,ct.defaultZone);if(!y.isValid)return je.invalid(Ra(y));const j=Ze.fromObject(h),R=Ja(i,di),{minDaysInFirstWeek:L,startOfWeek:H}=mu(R,j),B=ct.now(),de=Ce(h.specificOffset)?y.offset(B):h.specificOffset,pe=!Ce(R.ordinal),ze=!Ce(R.year),$e=!Ce(R.month)||!Ce(R.day),De=ze||$e,yt=R.weekYear||R.weekNumber;if((De||pe)&&yt)throw new f("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if($e&&pe)throw new f("Can't mix ordinal dates with month/day");const qt=yt||R.weekday&&!De;let Vt,yn,nn=_a(B,de);qt?(Vt=oi,yn=Vu,nn=zt(nn,L,H)):pe?(Vt=Bu,yn=or,nn=Il(nn)):(Vt=za,yn=ka);let dr=!1;for(const Ha of Vt){const fr=R[Ha];Ce(fr)?dr?R[Ha]=yn[Ha]:R[Ha]=nn[Ha]:dr=!0}const zn=qt?gu(R,L,H):pe?Ql(R):Fs(R),La=zn||Tn(R);if(La)return je.invalid(La);const pn=qt?En(R,L,H):pe?hu(R):R,[ln,fi]=ps(pn,de,y),Un=new je({ts:ln,zone:y,o:fi,loc:j});return R.weekday&&De&&i.weekday!==Un.weekday?je.invalid("mismatched weekday",`you can't specify both a weekday of ${R.weekday} and a date of ${Un.toISO()}`):Un.isValid?Un:je.invalid(Un.invalid)}static fromISO(i,h={}){const[y,j]=Tu(i);return Sa(y,j,h,"ISO 8601",i)}static fromRFC2822(i,h={}){const[y,j]=Cu(i);return Sa(y,j,h,"RFC 2822",i)}static fromHTTP(i,h={}){const[y,j]=Mu(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:R=null}=y,L=Ze.fromOpts({locale:j,numberingSystem:R,defaultToEN:!0}),[H,B,de,pe]=ci(L,i,h);return pe?je.invalid(pe):Sa(H,B,y,`format ${h}`,i,de)}static fromString(i,h,y={}){return je.fromFormat(i,h,y)}static fromSQL(i,h={}){const[y,j]=Ru(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 ua?i:new ua(i,h);if(ct.throwOnInvalid)throw new r(y);return new je({invalid:y})}static isDateTime(i){return i&&i.isLuxonDateTime||!1}static parseFormatForOpts(i,h={}){const y=da(i,Ze.fromObject(h));return y?y.map(j=>j?j.val:null).join(""):null}static expandFormat(i,h={}){return qu(Ut.parseFormat(i),Ze.fromObject(h)).map(j=>j.val).join("")}static resetCache(){an=void 0,na.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?ys(this).weekYear:NaN}get weekNumber(){return this.isValid?ys(this).weekNumber:NaN}get weekday(){return this.isValid?ys(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?Il(this.c).ordinal:NaN}get monthShort(){return this.isValid?ms.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ms.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ms.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ms.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=Ft(this.c),j=this.zone.offset(y-i),R=this.zone.offset(y+i),L=this.zone.offset(y-j*h),H=this.zone.offset(y-R*h);if(L===H)return[this];const B=y-L*h,de=y-H*h,pe=_a(B,L),ze=_a(de,H);return pe.hour===ze.hour&&pe.minute===ze.minute&&pe.second===ze.second&&pe.millisecond===ze.millisecond?[Aa(this,{ts:B}),Aa(this,{ts:de})]:[this]}get isInLeapYear(){return nl(this.year)}get daysInMonth(){return Ws(this.year,this.month)}get daysInYear(){return this.isValid?Xa(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}=Ut.create(this.loc.clone(i),i).resolvedOptions(this);return{locale:h,numberingSystem:y,outputCalendar:j}}toUTC(i=0,h={}){return this.setZone(vt.instance(i),h)}toLocal(){return this.setZone(ct.defaultZone)}setZone(i,{keepLocalTime:h=!1,keepCalendarTime:y=!1}={}){if(i=$t(i,ct.defaultZone),i.equals(this.zone))return this;if(i.isValid){let j=this.ts;if(h||y){const R=i.offset(this.ts),L=this.toObject();[j]=ps(L,R,i)}return Aa(this,{ts:j,zone:i})}else return je.invalid(Ra(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=Ja(i,di),{minDaysInFirstWeek:y,startOfWeek:j}=mu(h,this.loc),R=!Ce(h.weekYear)||!Ce(h.weekNumber)||!Ce(h.weekday),L=!Ce(h.ordinal),H=!Ce(h.year),B=!Ce(h.month)||!Ce(h.day),de=H||B,pe=h.weekYear||h.weekNumber;if((de||L)&&pe)throw new f("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(B&&L)throw new f("Can't mix ordinal dates with month/day");let ze;R?ze=En({...zt(this.c,y,j),...h},y,j):Ce(h.ordinal)?(ze={...this.toObject(),...h},Ce(h.day)&&(ze.day=Math.min(Ws(ze.year,ze.month),ze.day))):ze=hu({...Il(this.c),...h});const[$e,De]=ps(ze,this.o,this.zone);return Aa(this,{ts:$e,o:De})}plus(i){if(!this.isValid)return this;const h=Ye.fromDurationLike(i);return Aa(this,vs(this,h))}minus(i){if(!this.isValid)return this;const h=Ye.fromDurationLike(i).negate();return Aa(this,vs(this,h))}startOf(i,{useLocaleWeeks:h=!1}={}){if(!this.isValid)return this;const y={},j=Ye.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 R=this.loc.getStartOfWeek(),{weekday:L}=this;L<R&&(y.weekNumber=this.weekNumber-1),y.weekday=R}else y.weekday=1;if(j==="quarters"){const R=Math.ceil(this.month/3);y.month=(R-1)*3+1}return this.set(y)}endOf(i,h){return this.isValid?this.plus({[i]:1}).startOf(i,h).minus(1):this}toFormat(i,h={}){return this.isValid?Ut.create(this.loc.redefaultToEN(h)).formatDateTimeFromString(this,i):ml}toLocaleString(i=T,h={}){return this.isValid?Ut.create(this.loc.clone(h),i).formatDateTime(this):ml}toLocaleParts(i={}){return this.isValid?Ut.create(this.loc.clone(i),i).formatDateTimeParts(this):[]}toISO({format:i="extended",suppressSeconds:h=!1,suppressMilliseconds:y=!1,includeOffset:j=!0,extendedZone:R=!1,precision:L="milliseconds"}={}){if(!this.isValid)return null;L=xl(L);const H=i==="extended";let B=Wt(this,H,L);return za.indexOf(L)>=3&&(B+="T"),B+=cr(this,H,h,y,j,R,L),B}toISODate({format:i="extended",precision:h="day"}={}){return this.isValid?Wt(this,i==="extended",xl(h)):null}toISOWeekDate(){return ur(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:i=!1,suppressSeconds:h=!1,includeOffset:y=!0,includePrefix:j=!1,extendedZone:R=!1,format:L="extended",precision:H="milliseconds"}={}){return this.isValid?(H=xl(H),(j&&za.indexOf(H)>=3?"T":"")+cr(this,L==="extended",h,i,y,R,H)):null}toRFC2822(){return ur(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ur(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Wt(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")),ur(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 Ye.invalid("created by diffing an invalid DateTime");const j={locale:this.locale,numberingSystem:this.numberingSystem,...y},R=al(h).map(Ye.normalizeUnit),L=i.valueOf()>this.valueOf(),H=L?this:i,B=L?i:this,de=_u(H,B,R,j);return L?de.negate():de}diffNow(i="milliseconds",h={}){return this.diff(je.now(),i,h)}until(i){return this.isValid?ot.fromDateTimes(this,i):this}hasSame(i,h,y){if(!this.isValid)return!1;const j=i.valueOf(),R=this.setZone(i.zone,{keepLocalTime:!0});return R.startOf(h,y)<=j&&j<=R.endOf(h,y)}equals(i){return this.isValid&&i.isValid&&this.valueOf()===i.valueOf()&&this.zone.equals(i.zone)&&this.loc.equals(i.loc)}toRelative(i={}){if(!this.isValid)return null;const h=i.base||je.fromObject({},{zone:this.zone}),y=i.padding?this<h?-i.padding:i.padding:0;let j=["years","months","days","hours","minutes","seconds"],R=i.unit;return Array.isArray(i.unit)&&(j=i.unit,R=void 0),kn(h,this.plus(y),{...i,numeric:"always",units:j,unit:R})}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 yu(i,h=>h.valueOf(),Math.min)}static max(...i){if(!i.every(je.isDateTime))throw new b("max requires all arguments be DateTimes");return yu(i,h=>h.valueOf(),Math.max)}static fromFormatExplain(i,h,y={}){const{locale:j=null,numberingSystem:R=null}=y,L=Ze.fromOpts({locale:j,numberingSystem:R,defaultToEN:!0});return ui(L,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,R=Ze.fromOpts({locale:y,numberingSystem:j,defaultToEN:!0});return new ii(R,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:R=null}=y,L=Ze.fromOpts({locale:j,numberingSystem:R,defaultToEN:!0});if(!L.equals(h.locale))throw new b(`fromFormatParser called with a locale of ${L}, but the format parser was created for ${h.locale}`);const{result:H,zone:B,specificOffset:de,invalidReason:pe}=h.explainFromTokens(i);return pe?je.invalid(pe):Sa(H,B,y,`format ${h.format}`,i,de)}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 M}static get TIME_SIMPLE(){return D}static get TIME_WITH_SECONDS(){return W}static get TIME_WITH_SHORT_OFFSET(){return Y}static get TIME_WITH_LONG_OFFSET(){return K}static get TIME_24_SIMPLE(){return J}static get TIME_24_WITH_SECONDS(){return ie}static get TIME_24_WITH_SHORT_OFFSET(){return P}static get TIME_24_WITH_LONG_OFFSET(){return G}static get DATETIME_SHORT(){return Z}static get DATETIME_SHORT_WITH_SECONDS(){return C}static get DATETIME_MED(){return k}static get DATETIME_MED_WITH_SECONDS(){return ee}static get DATETIME_MED_WITH_WEEKDAY(){return _}static get DATETIME_FULL(){return ce}static get DATETIME_FULL_WITH_SECONDS(){return me}static get DATETIME_HUGE(){return fe}static get DATETIME_HUGE_WITH_SECONDS(){return $}}function ha(g){if(je.isDateTime(g))return g;if(g&&g.valueOf&&ca(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 va.DateTime=je,va.Duration=Ye,va.FixedOffsetZone=vt,va.IANAZone=Te,va.Info=ms,va.Interval=ot,va.InvalidZone=Kt,va.Settings=ct,va.SystemZone=oe,va.VERSION=Ua,va.Zone=se,va}var Lg;function Kf(){return Lg||(Lg=1,(function(l){var m,b,S,v,p,Rf,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(M,D){Je(this,T);Je(this,m);Je(this,b,null);Je(this,S,null);Je(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:D};if(M?M instanceof A?(we(this,m,te(M,m)),we(this,b,te(M,b)),we(this,S,te(M,S))):M instanceof Date?we(this,m,r.DateTime.fromJSDate(M,W)):typeof M=="number"?we(this,m,r.DateTime.fromMillis(M,W)):(we(this,m,r.DateTime.fromISO(M,W)),te(this,m).isValid||we(this,m,r.DateTime.fromRFC2822(M,W)),te(this,m).isValid||we(this,m,r.DateTime.fromSQL(M,W)),te(this,m).isValid||we(this,m,r.DateTime.fromFormat(M,"EEE, d MMM yyyy HH:mm:ss",W))):we(this,m,r.DateTime.local()),!te(this,m).isValid)throw new Error(`CronDate: unhandled timestamp: ${M}`);D&&D!==te(this,m).zoneName&&we(this,m,te(this,m).setZone(D))}get dstStart(){return te(this,b)}set dstStart(M){we(this,b,M)}get dstEnd(){return te(this,S)}set dstEnd(M){we(this,S,M)}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(M){te(this,v).add[M]()}subtractUnit(M){te(this,v).subtract[M]()}invokeDateOperation(M,D){if(M===c.Add){this.addUnit(D);return}if(M===c.Subtract){this.subtractUnit(D);return}throw new Error(`Invalid verb: ${M}`)}getDate(){return te(this,m).day}getFullYear(){return te(this,m).year}getDay(){const M=te(this,m).weekday;return M===7?0:M}getMonth(){return te(this,m).month-1}getHours(){return te(this,m).hour}getMinutes(){return te(this,m).minute}getSeconds(){return te(this,m).second}getMilliseconds(){return te(this,m).millisecond}getUTCOffset(){return te(this,m).offset}setStartOfDay(){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 Se(this,T,ql).call(this).day}getUTCFullYear(){return Se(this,T,ql).call(this).year}getUTCDay(){const M=Se(this,T,ql).call(this).weekday;return M===7?0:M}getUTCMonth(){return Se(this,T,ql).call(this).month-1}getUTCHours(){return Se(this,T,ql).call(this).hour}getUTCMinutes(){return Se(this,T,ql).call(this).minute}getUTCSeconds(){return Se(this,T,ql).call(this).second}toISOString(){return te(this,m).toUTC().toISO()}toJSON(){return te(this,m).toJSON()}setDate(M){we(this,m,te(this,m).set({day:M}))}setFullYear(M){we(this,m,te(this,m).set({year:M}))}setDay(M){we(this,m,te(this,m).set({weekday:M}))}setMonth(M){we(this,m,te(this,m).set({month:M+1}))}setHours(M){we(this,m,te(this,m).set({hour:M}))}setMinutes(M){we(this,m,te(this,m).set({minute:M}))}setSeconds(M){we(this,m,te(this,m).set({second:M}))}setMilliseconds(M){we(this,m,te(this,m).set({millisecond:M}))}toString(){return this.toDate().toString()}toDate(){return te(this,m).toJSDate()}isLastDayOfMonth(){var W;const{day:M,month:D}=te(this,m);if(D===2){const Y=Se(W=A,p,Rf).call(W,te(this,m).year);return M===l.DAYS_IN_MONTH[D-1]-(Y?0:1)}return M===l.DAYS_IN_MONTH[D-1]}isLastWeekdayOfMonth(){var Y;const{day:M,month:D}=te(this,m);let W;return D===2?W=l.DAYS_IN_MONTH[D-1]-(Se(Y=A,p,Rf).call(Y,te(this,m).year)?0:1):W=l.DAYS_IN_MONTH[D-1],M>W-7}applyDateOperation(M,D,W){if(D===d.Month||D===d.Day){this.invokeDateOperation(M,D);return}const Y=this.getHours();this.invokeDateOperation(M,D);const K=this.getHours(),J=K-Y;J===2?W!==24&&(this.dstStart=K):J===0&&this.getMinutes()===0&&this.getSeconds()===0&&W!==24&&(this.dstEnd=K)}};m=new WeakMap,b=new WeakMap,S=new WeakMap,v=new WeakMap,p=new WeakSet,Rf=function(M){return M%4===0&&M%100!==0||M%400===0},T=new WeakSet,ql=function(){return te(this,m).toUTC()},Je(A,p);let f=A;l.CronDate=f,l.default=f})(Nf)),Nf}var Hg;function fS(){if(Hg)return Ji;Hg=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.CronMonth=void 0;const l=Kf(),r=qs(),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={},qg;function hS(){if(qg)return Ki;qg=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.CronSecond=void 0;const l=qs(),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 Vg;function eh(){return Vg||(Vg=1,(function(l){var r=Rs&&Rs.__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=Rs&&Rs.__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(qs(),l),d(cS(),l),d(oS(),l),d(fS(),l),d(hS(),l)})(Rs)),Rs}var Bg;function ly(){var d,c,f,m,b,S,v,p,ay,ny;if(Bg)return Fi;Bg=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.CronFieldCollection=void 0;const l=eh();let r=(p=class{constructor({second:A,minute:O,hour:M,dayOfMonth:D,month:W,dayOfWeek:Y}){Je(this,d);Je(this,c);Je(this,f);Je(this,m);Je(this,b);Je(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(!M)throw new Error("Validation error, Field hour is missing");if(!D)throw new Error("Validation error, Field dayOfMonth is missing");if(!W)throw new Error("Validation error, Field month is missing");if(!Y)throw new Error("Validation error, Field dayOfWeek is missing");if(W.values.length===1&&!D.hasLastChar&&!(parseInt(D.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,M),we(this,b,W),we(this,S,Y),we(this,m,D)}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,M){return M?M instanceof l.CronField?M:new A(M):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 M;return A.forEach((D,W,Y)=>{if(M===void 0){M={start:D,count:1};return}const K=Y[W-1]||M.start,J=Y[W+1];if(D==="L"||D==="W"){O.push(M),O.push({start:D,count:1}),M=void 0;return}if(M.step===void 0&&J!==void 0){const ie=D-K,P=J-D;if(ie<=P){M={...M,count:2,end:D,step:ie};return}M.step=1}D-(M.end??0)===M.step?(M.count++,M.end=D):(M.count===1?O.push({start:M.start,count:1}):M.count===2?(O.push({start:M.start,count:1}),O.push({start:M.end??K,count:1})):O.push(M),M={start:D,count:1})}),M&&O.push(M),O}stringifyField(A){var W;let O=A.max,M=A.values;if(A instanceof l.CronDayOfWeek){O=6;const Y=te(this,S).values;M=Y[Y.length-1]===7?Y.slice(0,-1):Y}A instanceof l.CronDayOfMonth&&(O=te(this,b).values.length===1?l.CronMonth.daysInMonth[te(this,b).values[0]-1]:A.max);const D=p.compactField(M);if(D.length===1){const Y=Se(W=p,v,ay).call(W,A,D[0],O);if(Y)return Y}return D.map(Y=>{var J;const K=Y.count===1?Y.start.toString():Se(J=p,v,ny).call(J,Y,O);return A instanceof l.CronDayOfWeek&&A.nthDay>0?`${K}#${A.nthDay}`:K}).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,ay=function(A,O,M){const D=O.step;return D?D===1&&O.start===A.min&&O.end&&O.end>=M?A.hasQuestionMarkChar?"?":"*":D!==1&&O.start===A.min&&O.end&&O.end>=M-D+1?`*/${D}`:null:null},ny=function(A,O){const M=A.step;if(M===1)return`${A.start}-${A.end}`;const D=A.start===0?A.count-1:A.count;if(!M)throw new Error("Unexpected range step");if(!A.end)throw new Error("Unexpected range end");if(M*D>A.end){const W=(K,J)=>{if(typeof A.start!="number")throw new Error("Unexpected range start");return J%M===0?A.start+J:null};if(typeof A.start!="number")throw new Error("Unexpected range start");const Y={length:A.end-A.start+1};return Array.from(Y,W).filter(K=>K!==null).join(",")}return A.end===O-M+1?`${A.start}/${M}`:`${A.start}-${A.end}/${M}`},Je(p,v),p);return Fi.CronFieldCollection=r,Fi}var jf={},Yg;function dy(){return Yg||(Yg=1,(function(l){var f,m,b,S,v,p,N,T,w,Vl,O,ks,sy,ry,iy,uy,Af,cy,oy,kr;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=Kf();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,Z=class Z{constructor(k,ee){Je(this,O);Je(this,f);Je(this,m);Je(this,b);Je(this,S);Je(this,v);Je(this,p);Je(this,N,null);Je(this,T,!1);we(this,f,ee),we(this,m,ee.tz),we(this,S,ee.startDate?new r.CronDate(ee.startDate,te(this,m)):null),we(this,v,ee.endDate?new r.CronDate(ee.endDate,te(this,m)):null);let _=ee.currentDate??ee.startDate;if(_){const ce=new r.CronDate(_,te(this,m));te(this,S)&&ce.getTime()<te(this,S).getTime()?_=te(this,S):te(this,v)&&ce.getTime()>te(this,v).getTime()&&(_=te(this,v))}we(this,b,new r.CronDate(_,te(this,m))),we(this,p,k)}get fields(){return te(this,p)}static fieldsToExpression(k,ee){return new Z(k,ee||{})}next(){return Se(this,O,kr).call(this)}prev(){return Se(this,O,kr).call(this,!0)}hasNext(){const k=te(this,b);try{return Se(this,O,kr).call(this),!0}catch{return!1}finally{we(this,b,k)}}hasPrev(){const k=te(this,b);try{return Se(this,O,kr).call(this,!0),!0}catch{return!1}finally{we(this,b,k)}}take(k){const ee=[];if(k>=0)for(let _=0;_<k;_++)try{ee.push(this.next())}catch{return ee}else for(let _=0;_>k;_--)try{ee.push(this.prev())}catch{return ee}return ee}reset(k){we(this,b,new r.CronDate(k||te(this,f).currentDate))}stringify(k=!1){return te(this,p).stringify(k)}includesDate(k){const{second:ee,minute:_,hour:ce,month:me}=te(this,p),fe=new r.CronDate(k,te(this,m));return!(!ee.values.includes(fe.getSeconds())||!_.values.includes(fe.getMinutes())||!ce.values.includes(fe.getHours())||!me.values.includes(fe.getMonth()+1)||!Se(this,O,Af).call(this,fe)||te(this,p).dayOfWeek.nthDay>0&&Math.ceil(fe.getDate()/7)!==te(this,p).dayOfWeek.nthDay)}toString(){return te(this,f).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Se(this,O,kr).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(k,ee){return ee.some(_=>_===k)},O=new WeakSet,ks=function(k,ee){return k[ee?k.length-1:0]},sy=function(k){const ee=`${k.getFullYear()}-${k.getMonth()+1}-${k.getDate()}`;if(te(this,N)===ee)return te(this,T);const _=new r.CronDate(k);_.setStartOfDay();const ce=new r.CronDate(k);return ce.setEndOfDay(),we(this,N,ee),we(this,T,_.getUTCOffset()!==ce.getUTCOffset()),te(this,T)},ry=function(k,ee,_){const ce=te(this,p).second.values,me=k.getSeconds(),fe=te(this,p).second.findNearestValue(me,_);if(fe!==null){k.setSeconds(fe);return}k.applyDateOperation(ee,r.TimeUnit.Minute,te(this,p).hour.values.length),k.setSeconds(Se(this,O,ks).call(this,ce,_))},iy=function(k,ee,_){const ce=te(this,p).minute.values,me=te(this,p).second.values,fe=k.getMinutes(),$=te(this,p).minute.findNearestValue(fe,_);if($!==null){k.setMinutes($),k.setSeconds(Se(this,O,ks).call(this,me,_));return}k.applyDateOperation(ee,r.TimeUnit.Hour,te(this,p).hour.values.length),k.setMinutes(Se(this,O,ks).call(this,ce,_)),k.setSeconds(Se(this,O,ks).call(this,me,_))},uy=function(k,ee){const _=ee.isLastWeekdayOfMonth();return k.some(ce=>{const me=parseInt(ce.toString().charAt(0),10)%7;if(Number.isNaN(me))throw new Error(`Invalid last weekday of the month expression: ${ce}`);return ee.getDay()===me&&_})},Af=function(k){var se,he,oe;const ee=te(this,p).dayOfMonth.isWildcard,_=!ee,ce=te(this,p).dayOfWeek.isWildcard,me=!ce,fe=Se(se=Z,w,Vl).call(se,k.getDate(),te(this,p).dayOfMonth.values)||te(this,p).dayOfMonth.hasLastChar&&k.isLastDayOfMonth(),$=Se(he=Z,w,Vl).call(he,k.getDay(),te(this,p).dayOfWeek.values)||te(this,p).dayOfWeek.hasLastChar&&Se(oe=Z,w,uy).call(oe,te(this,p).dayOfWeek.values,k);return!!(_&&me&&(fe||$)||fe&&!me||ee&&!ce&&$)},cy=function(k,ee,_){var Ne,U;const ce=te(this,p).hour.values,me=ce,fe=k.getHours(),$=Se(Ne=Z,w,Vl).call(Ne,fe,ce),se=k.dstStart===fe,he=k.dstEnd===fe;if(se)return Se(U=Z,w,Vl).call(U,fe-1,ce)?!0:(k.invokeDateOperation(ee,r.TimeUnit.Hour),!1);if(he&&!_)return k.dstEnd=null,k.applyDateOperation(r.DateMathOp.Add,r.TimeUnit.Hour,me.length),!1;if($)return!0;k.dstStart=null;const oe=te(this,p).hour.findNearestValue(fe,_);if(oe===null)return k.applyDateOperation(ee,r.TimeUnit.Day,me.length),!1;if(Se(this,O,sy).call(this,k)){const ne=_?fe-oe:oe-fe;for(let ge=0;ge<ne;ge++)k.applyDateOperation(ee,r.TimeUnit.Hour,me.length)}else k.setHours(oe);return k.setMinutes(Se(this,O,ks).call(this,te(this,p).minute.values,_)),k.setSeconds(Se(this,O,ks).call(this,te(this,p).second.values,_)),!1},oy=function(k){if(!te(this,S)&&!te(this,v))return;const ee=k.getTime();if(te(this,S)&&ee<te(this,S).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(te(this,v)&&ee>te(this,v).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},kr=function(k=!1){var fe,$,se;const ee=k?r.DateMathOp.Subtract:r.DateMathOp.Add,_=new r.CronDate(te(this,b)),ce=_.getTime();let me=0;for(;++me<d;){if(Se(this,O,oy).call(this,_),!Se(this,O,Af).call(this,_)){_.applyDateOperation(ee,r.TimeUnit.Day,te(this,p).hour.values.length);continue}if(!(te(this,p).dayOfWeek.nthDay<=0||Math.ceil(_.getDate()/7)===te(this,p).dayOfWeek.nthDay)){_.applyDateOperation(ee,r.TimeUnit.Day,te(this,p).hour.values.length);continue}if(!Se(fe=Z,w,Vl).call(fe,_.getMonth()+1,te(this,p).month.values)){_.applyDateOperation(ee,r.TimeUnit.Month,te(this,p).hour.values.length);continue}if(Se(this,O,cy).call(this,_,ee,k)){if(!Se($=Z,w,Vl).call($,_.getMinutes(),te(this,p).minute.values)){Se(this,O,iy).call(this,_,ee,k);continue}if(!Se(se=Z,w,Vl).call(se,_.getSeconds(),te(this,p).second.values)){Se(this,O,ry).call(this,_,ee,k);continue}if(ce===_.getTime()){(ee==="Add"||_.getMilliseconds()===0)&&_.applyDateOperation(ee,r.TimeUnit.Second,te(this,p).hour.values.length);continue}break}}if(me>d)throw new Error(l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return _.getMilliseconds()!==0&&_.setMilliseconds(0),we(this,b,_),_},Je(Z,w);let c=Z;l.CronExpression=c,l.default=c})(jf)),jf}var qc={},$g;function mS(){if($g)return qc;$g=1,Object.defineProperty(qc,"__esModule",{value:!0}),qc.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 qc}var Pg;function kf(){var p,N,fy,zs,hy,my,gy,xy,yy,py,vy,_f,by,Sy;if(Pg)return Ca;Pg=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.CronExpressionParser=Ca.DayOfWeek=Ca.Months=Ca.CronUnit=Ca.PredefinedExpressions=void 0;const l=ly(),r=dy(),d=mS(),c=eh();var f;(function(G){G["@yearly"]="0 0 0 1 1 *",G["@annually"]="0 0 0 1 1 *",G["@monthly"]="0 0 0 1 * *",G["@weekly"]="0 0 0 * * 0",G["@daily"]="0 0 0 * * *",G["@hourly"]="0 0 * * * *",G["@minutely"]="0 * * * * *",G["@secondly"]="* * * * * *",G["@weekdays"]="0 0 0 * * 1-5",G["@weekends"]="0 0 0 * * 0,6"})(f||(Ca.PredefinedExpressions=f={}));var m;(function(G){G.Second="Second",G.Minute="Minute",G.Hour="Hour",G.DayOfMonth="DayOfMonth",G.Month="Month",G.DayOfWeek="DayOfWeek"})(m||(Ca.CronUnit=m={}));var b;(function(G){G[G.jan=1]="jan",G[G.feb=2]="feb",G[G.mar=3]="mar",G[G.apr=4]="apr",G[G.may=5]="may",G[G.jun=6]="jun",G[G.jul=7]="jul",G[G.aug=8]="aug",G[G.sep=9]="sep",G[G.oct=10]="oct",G[G.nov=11]="nov",G[G.dec=12]="dec"})(b||(Ca.Months=b={}));var S;(function(G){G[G.sun=0]="sun",G[G.mon=1]="mon",G[G.tue=2]="tue",G[G.wed=3]="wed",G[G.thu=4]="thu",G[G.fri=5]="fri",G[G.sat=6]="sat"})(S||(Ca.DayOfWeek=S={}));let v=(N=class{static parse(Z,C={}){var ge,xe,Oe,Te,qe,pt,Ke,sa;const{strict:k=!1,hashSeed:ee}=C,_=(0,d.seededRandom)(ee);Z=f[Z]||Z;const ce=Se(ge=N,p,fy).call(ge,Z,k);if(!(ce.dayOfMonth==="*"||ce.dayOfWeek==="*"||!k))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const me=Se(xe=N,p,zs).call(xe,m.Second,ce.second,c.CronSecond.constraints,_),fe=Se(Oe=N,p,zs).call(Oe,m.Minute,ce.minute,c.CronMinute.constraints,_),$=Se(Te=N,p,zs).call(Te,m.Hour,ce.hour,c.CronHour.constraints,_),se=Se(qe=N,p,zs).call(qe,m.Month,ce.month,c.CronMonth.constraints,_),he=Se(pt=N,p,zs).call(pt,m.DayOfMonth,ce.dayOfMonth,c.CronDayOfMonth.constraints,_),{dayOfWeek:oe,nthDayOfWeek:Ne}=Se(Ke=N,p,by).call(Ke,ce.dayOfWeek),U=Se(sa=N,p,zs).call(sa,m.DayOfWeek,oe,c.CronDayOfWeek.constraints,_),ne=new l.CronFieldCollection({second:new c.CronSecond(me,{rawValue:ce.second}),minute:new c.CronMinute(fe,{rawValue:ce.minute}),hour:new c.CronHour($,{rawValue:ce.hour}),dayOfMonth:new c.CronDayOfMonth(he,{rawValue:ce.dayOfMonth}),month:new c.CronMonth(se,{rawValue:ce.month}),dayOfWeek:new c.CronDayOfWeek(U,{rawValue:ce.dayOfWeek,nthDayOfWeek:Ne})});return new r.CronExpression(ne,{...C,expression:Z})}},p=new WeakSet,fy=function(Z,C){if(C&&!Z.length)throw new Error("Invalid cron expression");Z=Z||"0 * * * * *";const k=Z.trim().split(/\s+/);if(C&&k.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(k.length>6)throw new Error("Invalid cron expression, too many fields");const ee=["*","*","*","*","*","0"];k.length<ee.length&&k.unshift(...ee.slice(k.length));const[_,ce,me,fe,$,se]=k;return{second:_,minute:ce,hour:me,dayOfMonth:fe,month:$,dayOfWeek:se}},zs=function(Z,C,k,ee){if((Z===m.Month||Z===m.DayOfWeek)&&(C=C.replace(/[a-z]{3}/gi,_=>{_=_.toLowerCase();const ce=b[_]||S[_];if(ce===void 0)throw new Error(`Validation error, cannot resolve alias "${_}"`);return ce.toString()})),!k.validChars.test(C))throw new Error(`Invalid characters, got value: ${C}`);return C=Se(this,p,hy).call(this,C,k),C=Se(this,p,my).call(this,C,k,ee),Se(this,p,gy).call(this,Z,C,k)},hy=function(Z,C){return Z.replace(/[*?]/g,C.min+"-"+C.max)},my=function(Z,C,k){const ee=k();return Z.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(_,ce,me,fe)=>{if(ce&&me&&fe){const $=parseInt(ce,10),se=parseInt(me,10),he=parseInt(fe,10);if($>se)throw new Error(`Invalid range: ${$}-${se}, min > max`);if(he<=0)throw new Error(`Invalid step: ${he}, must be positive`);const oe=Math.max($,C.min),Ne=Math.floor(ee*he),U=[];for(let ne=Math.floor(oe/he)*he+Ne;ne<=se;ne+=he)ne>=oe&&U.push(ne);return U.join(",")}else if(ce&&me){const $=parseInt(ce,10),se=parseInt(me,10);if($>se)throw new Error(`Invalid range: ${$}-${se}, min > max`);return String(Math.floor(ee*(se-$+1))+$)}else if(fe){const $=parseInt(fe,10);if($<=0)throw new Error(`Invalid step: ${$}, must be positive`);const se=Math.floor(ee*$),he=[];for(let oe=Math.floor(C.min/$)*$+se;oe<=C.max;oe+=$)oe>=C.min&&he.push(oe);return he.join(",")}else return String(Math.floor(ee*(C.max-C.min+1)+C.min))})},gy=function(Z,C,k){const ee=[];function _(me,fe){var $;if(Array.isArray(me))ee.push(...me);else if(Se($=N,p,Sy).call($,fe,me))ee.push(me);else{const se=parseInt(me.toString(),10);if(!(se>=fe.min&&se<=fe.max))throw new Error(`Constraint error, got value ${me} expected range ${fe.min}-${fe.max}`);ee.push(Z===m.DayOfWeek?se%7:me)}}return C.split(",").forEach(me=>{var fe;if(!(me.length>0))throw new Error("Invalid list value format");_(Se(fe=N,p,xy).call(fe,Z,me,k),k)}),ee},xy=function(Z,C,k){var _,ce;const ee=C.split("/");if(ee.length>2)throw new Error(`Invalid repeat: ${C}`);return ee.length===2?(isNaN(parseInt(ee[0],10))||(ee[0]=`${ee[0]}-${k.max}`),Se(_=N,p,_f).call(_,Z,ee[0],parseInt(ee[1],10),k)):Se(ce=N,p,_f).call(ce,Z,C,1,k)},yy=function(Z,C,k){if(!(!isNaN(Z)&&!isNaN(C)&&Z>=k.min&&C<=k.max))throw new Error(`Constraint error, got range ${Z}-${C} expected range ${k.min}-${k.max}`);if(Z>C)throw new Error(`Invalid range: ${Z}-${C}, min(${Z}) > max(${C})`)},py=function(Z){if(!(!isNaN(Z)&&Z>0))throw new Error(`Constraint error, cannot repeat at every ${Z} time.`)},vy=function(Z,C,k,ee){const _=[];Z===m.DayOfWeek&&k%7===0&&_.push(0);for(let ce=C;ce<=k;ce+=ee)_.indexOf(ce)===-1&&_.push(ce);return _},_f=function(Z,C,k,ee){const _=C.split("-");if(_.length<=1)return isNaN(+C)?C:+C;const[ce,me]=_.map(fe=>parseInt(fe,10));return Se(this,p,yy).call(this,ce,me,ee),Se(this,p,py).call(this,k),Se(this,p,vy).call(this,Z,ce,me,k)},by=function(Z){const C=Z.split("#");if(C.length<=1)return{dayOfWeek:C[0]};const k=+C[C.length-1],ee=Z.match(/([,-/])/);if(ee!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${ee==null?void 0:ee[0]}\` special characters are incompatible`);if(!(C.length<=2&&!isNaN(k)&&k>=1&&k<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:C[0],nthDayOfWeek:k}},Sy=function(Z,C){return Z.chars.some(k=>C.toString().includes(k))},Je(N,p),N);return Ca.CronExpressionParser=v,Ca}var un={};const gS={},xS=Object.freeze(Object.defineProperty({__proto__:null,default:gS},Symbol.toStringTag,{value:"Module"})),Gg=Qp(xS);var Fg;function yS(){var m,b,zf,Ny;if(Fg)return un;Fg=1;var l=un&&un.__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=un&&un.__setModuleDefault||(Object.create?(function(p,N){Object.defineProperty(p,"default",{enumerable:!0,value:N})}):function(p,N){p.default=N}),d=un&&un.__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(un,"__esModule",{value:!0}),un.CronFileParser=void 0;const c=kf();let f=(b=class{static async parseFile(N){var A;const{readFile:T}=await Promise.resolve().then(()=>d(Gg)),w=await T(N,"utf8");return Se(A=b,m,zf).call(A,w)}static parseFileSync(N){var A;const{readFileSync:T}=Gg,w=T(N,"utf8");return Se(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 M=O.trim();if(M.length===0||M.startsWith("#"))continue;const D=M.match(/^(.*)=(.*)$/);if(D){const[,W,Y]=D;w.variables[W]=Y.replace(/["']/g,"");continue}try{const W=Se(A=b,m,Ny).call(A,M);w.expressions.push(W.interval)}catch(W){w.errors[M]=W}}return w},Ny=function(N){const T=N.split(" ");return{interval:c.CronExpressionParser.parse(T.slice(0,5).join(" ")),command:T.slice(5,T.length)}},Je(b,m),b);return un.CronFileParser=f,un}var Zg;function pS(){return Zg||(Zg=1,(function(l){var r=Ds&&Ds.__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=Ds&&Ds.__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=Kf();Object.defineProperty(l,"CronDate",{enumerable:!0,get:function(){return f.CronDate}});var m=ly();Object.defineProperty(l,"CronFieldCollection",{enumerable:!0,get:function(){return m.CronFieldCollection}});var b=dy();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(eh(),l),l.default=c.CronExpressionParser})(Ds)),Ds}var vS=pS();const jy=6048e5,bS=864e5,SS=6e4,NS=36e5,Wg=Symbol.for("constructDateFrom");function Ma(l,r){return typeof l=="function"?l(r):l&&typeof l=="object"&&Wg in l?l[Wg](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 Vc(l,r,d){return jS(l,r*NS)}let wS={};function no(){return wS}function su(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 Zc(l,r){return su(l,{...r,weekStartsOn:1})}function wy(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=Zc(f),b=Ma(d,0);b.setFullYear(c,0,4),b.setHours(0,0,0,0);const S=Zc(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 Qg(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=Qg(c),b=Qg(f),S=+m-Ig(m),v=+b-Ig(b);return Math.round((S-v)/bS)}function CS(l,r){const d=wy(l,r),c=Ma(l,0);return c.setFullYear(d,0,4),c.setHours(0,0,0,0),Zc(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 DS(l){return l instanceof Date||typeof l=="object"&&Object.prototype.toString.call(l)==="[object Date]"}function RS(l){return!(!DS(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 Xg(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"}},IS=(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"},QS={ordinalNumber:IS,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:QS,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=+Zc(d)-+CS(d);return Math.round(c/jy)+1}function Ey(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=su(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=su(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=Ey(l,r),m=Ma((r==null?void 0:r.in)||l,0);return m.setFullYear(f,0,c),m.setHours(0,0,0,0),su(m,r)}function yN(l,r){const d=Ct(l,r==null?void 0:r.in),c=+su(d,r)-+xN(d,r);return Math.round(c/jy)+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)}},_r={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Jg={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=Ey(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=wy(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=_r.noon:c===0?f=_r.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=_r.evening:c>=12?f=_r.afternoon:c>=4?f=_r.morning:f=_r.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 ex(c);case"XXXX":case"XX":return Us(c);case"XXXXX":case"XXX":default:return Us(c,":")}},x:function(l,r,d){const c=l.getTimezoneOffset();switch(r){case"x":return ex(c);case"xxxx":case"xx":return Us(c);case"xxxxx":case"xxx":default:return Us(c,":")}},O:function(l,r,d){const c=l.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Kg(c,":");case"OOOO":default:return"GMT"+Us(c,":")}},z:function(l,r,d){const c=l.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Kg(c,":");case"zzzz":default:return"GMT"+Us(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 Kg(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 ex(l,r){return l%60===0?(l>0?"-":"+")+nt(Math.abs(l)/60,2):Us(l,r)}function Us(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 tx=(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"})}},Ty=(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 tx(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}}",tx(c,r)).replace("{{time}}",Ty(f,r))},vN={p:Ty,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=/^'([^]*?)'?$/,DN=/''/g,RN=/[a-zA-Z]/;function As(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(!RS(S))throw new RangeError("Invalid time value");let v=r.match(MN).map(O=>{const M=O[0];if(M==="p"||M==="P"){const D=vN[M];return D(O,f.formatLong)}return O}).join("").match(CN).map(O=>{if(O==="''")return{isToken:!1,value:"'"};const M=O[0];if(M==="'")return{isToken:!1,value:AN(O)};if(Jg[M])return{isToken:!0,value:O};if(M.match(RN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");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 M=O.value;(wN(M)||jN(M))&&EN(M,r,String(l));const D=Jg[M[0]];return D(S,M,f.localize,p)}).join("")}function AN(l){const r=l.match(ON);return r?r[1].replace(DN,"'"):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=Gx,Bc=[{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,Yc=14,UN=10,LN=7,ax=4,Cy=({configs:l,currentProjectId:r,onEditJob:d,queueStatus:c,queueAnalytics:f})=>{const m=q.useMemo(()=>zN(new Date),[]),b=q.useMemo(()=>Vc(m,24),[m]),S=q.useMemo(()=>Vc(m,-24),[m]),v=b,p=q.useMemo(()=>{const J=[];for(let ie=0;ie<=24;ie++)J.push(Vc(m,ie));return J},[m]),N=q.useMemo(()=>{const J=[];return l.forEach(({projectId:ie,config:P})=>{var C,k,ee,_,ce;const G={executor:P.executorEnabled!==!1?P.cronSchedule:null,reviewer:P.reviewerEnabled?P.reviewerSchedule:null,qa:P.qa.enabled?P.qa.schedule:null,audit:P.audit.enabled?P.audit.schedule:null,slicer:P.roadmapScanner.enabled?P.roadmapScanner.slicerSchedule:null,analytics:(C=P.analytics)!=null&&C.enabled?(k=P.analytics)==null?void 0:k.schedule:null,"pr-resolver":(ee=P.prResolver)!=null&&ee.enabled?P.prResolver.schedule:null,merger:(_=P.merger)!=null&&_.enabled?(ce=P.merger)==null?void 0:ce.schedule:null},Z=P.cronScheduleOffset||0;Object.entries(G).forEach(([me,fe])=>{if(fe)try{const $=vS.CronExpressionParser.parse(fe,{currentDate:m,endDate:b});for(;$.hasNext();){const se=$.next(),he=new Date(se.getTime());he.setMinutes(he.getMinutes()+Z),_N(he,m)&&kN(he,b)&&J.push({projectId:ie,jobType:me,time:he})}}catch($){console.error(`Failed to parse cron "${fe}" for ${ie}/${me}`,$)}})}),J},[l,m,b]),T=q.useMemo(()=>{const J=new Set;return l.length===0||(l.every(ie=>ie.config.executorEnabled===!1)&&J.add("executor"),l.every(ie=>!ie.config.reviewerEnabled)&&J.add("reviewer"),l.every(ie=>!ie.config.qa.enabled)&&J.add("qa"),l.every(ie=>!ie.config.audit.enabled)&&J.add("audit"),l.every(ie=>!ie.config.roadmapScanner.enabled)&&J.add("slicer"),l.every(ie=>{var P;return!((P=ie.config.analytics)!=null&&P.enabled)})&&J.add("analytics"),l.every(ie=>{var P;return!((P=ie.config.prResolver)!=null&&P.enabled)})&&J.add("pr-resolver"),l.every(ie=>{var P;return!((P=ie.config.merger)!=null&&P.enabled)})&&J.add("merger")),J},[l]),w=q.useMemo(()=>{const J=new Map;let ie=0;return l.forEach(P=>{P.projectId===r||(J.set(P.projectId,ie%Bc.length),ie++)}),J},[l,r]),A=J=>Xg(J,m),O=q.useMemo(()=>{const J=[];for(let ie=0;ie<=24;ie++)J.push(Vc(S,ie));return J},[S]),M=J=>{const ie=OS([MS([J,S]),v]);return Xg(ie,S)},D=q.useMemo(()=>{const J=(f==null?void 0:f.recentRuns)??[],ie=new Map;for(const P of J){const G=P.providerKey||"default",Z=new Date(P.startedAt*1e3),C=P.finishedAt?new Date(P.finishedAt*1e3):new Date;C<S||Z>v||(ie.has(G)||ie.set(G,[]),ie.get(G).push({id:P.id,jobType:P.jobType,status:P.status,projectPath:P.projectPath,startedAt:Z,finishedAt:C,throttledCount:P.throttledCount}))}if(c!=null&&c.running){const P=c.running.providerKey??"default";ie.has(P)||ie.set(P,[]),ie.get(P).push({id:c.running.id,jobType:c.running.jobType,status:"running",projectPath:c.running.projectPath,startedAt:new Date((c.running.dispatchedAt??c.running.enqueuedAt)*1e3),finishedAt:new Date,throttledCount:0})}return Array.from(ie.entries()).sort(([P],[G])=>P.localeCompare(G)).map(([P,G])=>({providerKey:P,runs:G.sort((Z,C)=>Z.startedAt.getTime()-C.startedAt.getTime())}))},[v,S,f,c]),W=J=>J.split(/[-_]/).map(ie=>ie.charAt(0).toUpperCase()+ie.slice(1)).join(" "),Y=l.length>1,K=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:p.map((J,ie)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},ie))});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."})]}),Y&&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 ie=w.get(J.projectId)??0,P=Bc[ie],G=(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 ${P.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:J.projectId,children:G})]},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,ie)=>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:ie*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:As(J,"HH:mm")})},ie))})]}),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 ie=T.has(J.id),P=N.filter(Z=>Z.jobType===J.id);if(!Y)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${ie?"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:[K,P.length===0?s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:s.jsx("span",{className:"text-[10px] text-slate-600 italic",children:ie?"Disabled":"No runs in this window"})}):P.map((Z,C)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(Z.projectId,Z.jobType),style:{left:A(Z.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 ${As(Z.time,"HH:mm")}`,children:s.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 rounded bg-slate-800 text-white text-[9px] whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none border border-slate-700 z-10",children:As(Z.time,"HH:mm")})},C))]})]},J.id);const G=l.length*Yc+ax*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${ie?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:Wn,height:G},className:"shrink-0 border-r border-slate-800/50 flex flex-col px-2 py-1",children:[s.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[s.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${J.color.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:J.label})]}),l.map(Z=>{const C=Z.projectId===r,k=(Z.projectId.split("/").pop()??Z.projectId).slice(0,14),ee=w.get(Z.projectId)??0,_=C?J.color.bg:Bc[ee].bg;return s.jsxs("div",{style:{height:Yc},className:"flex items-center gap-1 overflow-hidden",children:[s.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${_}`}),s.jsx("span",{className:`text-[9px] truncate ${C?"text-slate-200 font-semibold":"text-slate-600"}`,title:Z.projectId,children:C?`${k} ★`:k})]},Z.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:G},children:[K,l.map((Z,C)=>{const k=Z.projectId===r,ee=P.filter(se=>se.projectId===Z.projectId),_=ax+C*Yc,ce=k?UN:LN,me=Math.floor((Yc-ce)/2),fe=w.get(Z.projectId)??0,$=k?{bg:J.color.bg,border:J.color.border}:Bc[fe];return s.jsxs(_e.Fragment,{children:[C>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:_}}),ee.map((se,he)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(Z.projectId,se.jobType),style:{left:A(se.time)-3,top:_+me,height:ce},className:`absolute w-6 rounded border ${$.bg} ${$.border} ${k?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${Z.projectId} · ${J.label} @ ${As(se.time,"HH:mm")}`,children:s.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 rounded bg-slate-800 text-white text-[9px] whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none border border-slate-700 z-20",children:As(se.time,"HH:mm")})},he))]},Z.projectId)}),P.length===0&&!ie&&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"})]}),Y&&s.jsx("div",{className:"flex items-center gap-1.5",children:s.jsx("span",{children:"★ = current project  ·  blocks in same column = scheduling overlap"})})]}),D.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,ie)=>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:ie*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:As(J,"HH:mm")})},ie))})]}),s.jsx("div",{className:"relative",children:D.map(({providerKey:J,runs:ie})=>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((P,G)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},G))}),ie.map(P=>{const G=Ef.find(fe=>fe.id===P.jobType)??Ef[0],Z=M(P.startedAt),C=M(P.finishedAt),k=Math.max(C-Z,8),ee=P.status==="running",_=P.status==="error"||P.status==="failed"||P.status==="errored",ce=ee?"bg-green-500":_?"bg-red-500":G.color.bg,me=ee?"border-green-400/60":_?"border-red-400/60":G.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${ce} ${me} opacity-85 shadow-lg ${ee?"animate-pulse":""}`,style:{left:Z,width:k},title:`${J} • ${G.label} • ${As(P.startedAt,"MMM d HH:mm")} • ${P.status}`,"data-testid":"provider-execution-run",children:s.jsxs("div",{className:"h-full px-2 flex items-center justify-between gap-2 text-[10px] text-white/90 overflow-hidden whitespace-nowrap",children:[s.jsx("span",{className:"font-semibold uppercase tracking-wide",children:G.label}),s.jsx("span",{className:"text-white/70",children:P.status}),P.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",P.throttledCount,"x"]})]})},`${J}-${P.id}-${P.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+M(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},Wc=[{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"}],th=[{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 _s(l,r){return Lr(l)===Lr(r)}function HN(l){if(l)return th.find(r=>r.id===l)}function My(l,r,d,c,f,m,b,S){return _s(l.schedules.executor,r)&&_s(l.schedules.reviewer,d)&&_s(l.schedules.qa,c)&&_s(l.schedules.audit,f)&&_s(l.schedules.slicer,m)&&_s(l.schedules.prResolver,b)&&_s(l.schedules.merger,S)}function qN(l,r,d,c,f,m,b){return th.find(S=>My(S,l,r,d,c,f,m,b))}function VN(l,r,d,c,f,m,b,S){const v=HN(l);return v&&My(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=Wc.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=Wc.find(c=>Lr(c.value)===r);return(d==null?void 0:d.value)??"__custom__"}function nx(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 $,se,he;const l=Kc(),{addToast:r,selectedProjectId:d,globalModeLoading:c}=Yt(),[f,m]=q.useState(!1),[b,S]=q.useState(!1),[v,p]=q.useState(!1),[N,T]=q.useState(!1),[w,A]=q.useState(null),[O,M]=q.useState([]),[D,W]=q.useState(null),[Y,K]=q.useState(null),{data:J,loading:ie,error:P,refetch:G}=cn(Qx,[d],{enabled:!c}),{data:Z,loading:C,refetch:k}=cn(Xf,[d],{enabled:!c});q.useEffect(()=>{if(c)return;const oe=()=>{G(),k(),Eg().then(W).catch(()=>{}),M2(24).then(K).catch(()=>{}),Ix().then(M).catch(()=>{})};oe();const Ne=setInterval(oe,3e4);return()=>clearInterval(Ne)},[d,c,G,k]);const ee=async()=>{if(J){m(!0);try{J.paused?(await Df(),r({title:"Schedule Resumed",message:"Cron schedules are active.",type:"success"})):(await N2(),r({title:"Schedule Paused",message:"Cron schedules are deactivated.",type:"info"})),G()}catch(oe){r({title:"Action Failed",message:oe instanceof Error?oe.message:"Toggle failed",type:"error"})}finally{m(!1)}}},_=async()=>{if(window.confirm("Are you sure you want to clear all pending jobs?")){p(!0);try{const oe=await O2();r({title:"Queue Cleared",message:`Removed ${oe.cleared} pending jobs.`,type:"success"}),Eg().then(W)}catch(oe){r({title:"Clear Failed",message:oe instanceof Error?oe.message:"Failed to clear queue",type:"error"})}finally{p(!1)}}},ce=async oe=>{if(Z){S(!0);try{await Jf({queue:{...Z.queue,...oe}}),r({title:"Settings Saved",message:"Queue configuration updated.",type:"success"}),k()}catch(Ne){r({title:"Save Failed",message:Ne instanceof Error?Ne.message:"Save failed",type:"error"})}finally{S(!1)}}},me=oe=>{l(`/settings?tab=jobs&jobType=${oe==="planner"?"slicer":oe}`)};if(ie||C)return s.jsx("div",{className:"flex items-center justify-center min-h-[400px] text-slate-500",children:"Loading automation state..."});if(P||!J||!Z)return s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:[s.jsx(Sn,{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(Fe,{onClick:()=>{G(),k()},children:"Retry"})]});const fe=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:fe?"warning":"success",className:"px-3 py-1 text-xs uppercase tracking-wider",children:fe?"Paused":"Active"})]}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Managed cron triggers and global job queue"})]}),s.jsx(Fe,{variant:fe?"success":"outline",size:"lg",className:fe?"bg-emerald-600 hover:bg-emerald-700":"border-slate-700 hover:bg-slate-800",onClick:ee,loading:f,children:fe?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($x,{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(ht,{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(jg,{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(Fe,{variant:"ghost",size:"sm",onClick:_,loading:v,disabled:!(D!=null&&D.items.length),className:"text-slate-500 hover:text-red-400 hover:bg-red-400/10",children:[s.jsx(Trash2,{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(Sg,{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(ft,{label:"Dispatch Mode",value:(($=Z.queue)==null?void 0:$.mode)||"auto",onChange:oe=>ce({mode:oe}),options:[{label:"Auto (Recommended)",value:"auto"},{label:"Conservative (1 at a time)",value:"conservative"},{label:"Provider-aware",value:"provider-aware"}]}),s.jsx(ke,{label:"Max Concurrency",type:"number",min:"1",max:"20",value:String(((se=Z.queue)==null?void 0:se.maxConcurrency)||1),onChange:oe=>ce({maxConcurrency:Number(oe.target.value)})}),s.jsx("div",{className:"md:col-span-2 flex items-center gap-3",children:s.jsx(Ya,{label:"Coordinator Enabled",checked:((he=Z.queue)==null?void 0:he.enabled)??!0,onChange:oe=>ce({enabled:oe})})})]})}),s.jsx("div",{className:"p-0",children:D!=null&&D.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:D.items.map(oe=>s.jsxs("tr",{className:"hover:bg-slate-800/20 transition-colors group",children:[s.jsxs("td",{className:"px-6 py-4",children:[s.jsx("div",{className:"font-medium text-slate-200",children:oe.jobType}),s.jsx("div",{className:"text-[11px] text-slate-500 truncate max-w-[200px]",title:oe.projectPath,children:oe.projectName||oe.projectPath})]}),s.jsx("td",{className:"px-6 py-4",children:s.jsx($a,{variant:oe.status==="running"?"info":"neutral",className:"text-[10px]",children:oe.status})}),s.jsx("td",{className:"px-6 py-4 text-slate-400 font-mono text-xs",children:nx(new Date(oe.enqueuedAt*1e3))}),s.jsx("td",{className:"px-6 py-4 text-right",children:s.jsx("button",{onClick:()=>me(oe.jobType),className:"opacity-0 group-hover:opacity-100 p-2 text-slate-500 hover:text-indigo-400 transition-all",title:"Configure Job",children:s.jsx(Sg,{className:"h-4 w-4"})})})]},oe.id))})]})}):s.jsxs("div",{className:"py-12 flex flex-col items-center justify-center text-slate-500 text-sm italic",children:[s.jsx("div",{className:"mb-3 p-3 rounded-full bg-slate-900 border border-slate-800",children:s.jsx(vg,{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(bg,{className:"h-3 w-3 animate-spin-slow"})," Live Update"]})]}),s.jsx(Cy,{configs:O,currentProjectId:d??void 0,onEditJob:(oe,Ne)=>me(Ne),queueStatus:D,queueAnalytics:Y})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs(ht,{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:[D!=null&&D.averageWaitSeconds?(D.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:[D!=null&&D.oldestPendingAge?(D.oldestPendingAge/60).toFixed(1):"0"," ",s.jsx("span",{className:"text-xs font-normal text-slate-500",children:"min"})]})]})]})]}),s.jsxs(ht,{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},{id:"reviewer",label:"Run Reviewer",icon:Search},{id:"qa",label:"Run QA",icon:jg},{id:"audit",label:"Run Audit",icon:vg}].map(oe=>s.jsxs("button",{onClick:()=>handleTriggerJob(oe.id),disabled:w===oe.id,className:"w-full flex items-center justify-between p-3 rounded-lg hover:bg-slate-800/40 text-sm text-slate-300 transition-colors group disabled:opacity-50",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(oe.icon,{className:"h-4 w-4 text-slate-500 group-hover:text-indigo-400"}),oe.label]}),w===oe.id?s.jsx(bg,{className:"h-3 w-3 animate-spin text-indigo-400"}):s.jsx(Yl,{className:"h-3 w-3 opacity-0 group-hover:opacity-100 transition-all fill-current text-indigo-400"})]},oe.id))}),s.jsx("div",{className:"p-4",children:s.jsx(Fe,{variant:"outline",size:"sm",fullWidth:!0,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(ht,{className:"border-slate-800 overflow-hidden",children:Y!=null&&Y.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:Y.recentRuns.map(oe=>s.jsxs("tr",{className:"hover:bg-slate-800/10 transition-colors",children:[s.jsx("td",{className:"px-6 py-4",children:s.jsx("span",{className:"font-medium text-slate-300 capitalize",children:oe.jobType})}),s.jsx("td",{className:"px-6 py-4",children:s.jsx($a,{variant:oe.status==="finished"?"success":oe.status==="failed"?"error":"neutral",className:"text-[10px]",children:oe.status})}),s.jsx("td",{className:"px-6 py-4 text-slate-400",children:oe.durationSeconds?`${oe.durationSeconds}s`:"--"}),s.jsx("td",{className:"px-6 py-4 text-slate-500 text-xs",children:nx(new Date(oe.startedAt*1e3))}),s.jsx("td",{className:"px-6 py-4 text-right text-slate-500 font-mono text-xs",children:oe.providerKey||"default"})]},oe.id))})]})}):s.jsx("div",{className:"py-20 text-center text-slate-500 italic text-sm",children:"No recorded runs in the last 24 hours."})})]})]})},$N=({isOpen:l,onClose:r,title:d,children:c})=>(q.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?Hb.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(Vr,{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]=_e.useState(!1);return r?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-slate-300 font-mono",children: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(E1,{className:"h-4 w-4"}):s.jsx(qx,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:l})},Oy=({envVars:l,onChange:r,compact:d=!1})=>{const[c,f]=_e.useState(""),[m,b]=_e.useState(""),[S,v]=_e.useState(null),[p,N]=_e.useState(""),{addToast:T}=Yt(),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=Y=>{const K={...l};delete K[Y],r(K)},O=Y=>{v(Y),N(l[Y]??"")},M=()=>{S&&(r({...l,[S]:p}),v(null),N(""))},D=()=>{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(([Y,K])=>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:Y}),S===Y?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:M,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${Y} value`,title:`Save ${Y} value`,children:s.jsx(s1,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:D,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${Y}`,title:`Cancel editing ${Y}`,children:s.jsx(Vr,{className:"h-4 w-4"})})]}):s.jsx(GN,{value:K,isSensitive:PN(Y)})]}),S!==Y&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>O(Y),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${Y}`,title:`Edit ${Y}`,children:s.jsx(to,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>A(Y),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${Y}`,title:`Delete ${Y}`,children:s.jsx(cu,{className:"h-4 w-4"})})]})]},Y))}),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:Y=>f(Y.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:Y=>b(Y.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(Fe,{onClick:w,disabled:!c.trim(),size:d?"sm":"md",children:[s.jsx(Hs,{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 lx={claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"},custom:{name:"",command:""}},WN=({isOpen:l,onClose:r,onSave:d,presetId:c,preset:f,isBuiltIn:m,existingIds:b})=>{const[S,v]=_e.useState(""),[p,N]=_e.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[T,w]=_e.useState(!1),[A,O]=_e.useState("custom"),[M,D]=_e.useState(null),W=ZN(c??S,p);_e.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")),D(null),w(!!(f!=null&&f.envVars&&Object.keys(f.envVars).length>0)))},[l,c,f]);const Y=P=>{if(O(P),P!=="custom"&&lx[P]){const G=lx[P];N(Z=>({...Z,...G,envVars:Z.envVars})),!c&&!S&&v(P)}},K=(P,G)=>{N(Z=>({...Z,[P]:G})),D(null)},J=()=>{if(!p.name.trim())return D("Name is required"),!1;if(!p.command.trim())return D("Command is required"),!1;if(!c){if(!S.trim())return D("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(S))return D("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(b.includes(S))return D("A preset with this ID already exists"),!1}return!0},ie=()=>{var G,Z,C,k,ee,_;if(!J())return;const P={name:p.name.trim(),command:p.command.trim()};(G=p.subcommand)!=null&&G.trim()&&(P.subcommand=p.subcommand.trim()),(Z=p.promptFlag)!=null&&Z.trim()&&(P.promptFlag=p.promptFlag.trim()),(C=p.autoApproveFlag)!=null&&C.trim()&&(P.autoApproveFlag=p.autoApproveFlag.trim()),(k=p.workdirFlag)!=null&&k.trim()&&(P.workdirFlag=p.workdirFlag.trim()),(ee=p.modelFlag)!=null&&ee.trim()&&(P.modelFlag=p.modelFlag.trim()),(_=p.model)!=null&&_.trim()&&(P.model=p.model.trim()),p.envVars&&Object.keys(p.envVars).length>0&&(P.envVars=p.envVars),d(c||S,P),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:[M&&s.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:M}),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(ft,{label:"Template",value:A,onChange:Y,options:[{label:"Start from scratch",value:"custom"},{label:"Claude (Anthropic)",value:"claude"},{label:"Codex (OpenAI)",value:"codex"}],helperText:"Start with a pre-configured template or customize from scratch"})}),!c&&s.jsx(ke,{label:"Preset ID",value:S,onChange:P=>v(P.target.value.toLowerCase().replace(/[^a-z0-9_-]/g,"")),placeholder:"e.g., my-custom-provider",helperText:"Unique identifier for this preset (lowercase, numbers, hyphens, underscores)"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(ke,{label:"Display Name",value:p.name,onChange:P=>K("name",P.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(ke,{label:"Command",value:p.command,onChange:P=>K("command",P.target.value),placeholder:"e.g., claude, codex, npx",required:!0})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(ke,{label:"Model",value:p.model??"",onChange:P=>K("model",P.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(ke,{label:"Model Flag",value:p.modelFlag??"",onChange:P=>K("modelFlag",P.target.value),placeholder:"e.g., --model",helperText:"Flag for specifying the model"})]}),s.jsxs("div",{className:"border-t border-slate-800 pt-4",children:[s.jsxs("button",{type:"button",onClick:()=>w(!T),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[T?s.jsx(f1,{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(ke,{label:"Subcommand",value:p.subcommand??"",onChange:P=>K("subcommand",P.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(ke,{label:"Prompt Flag",value:p.promptFlag??"",onChange:P=>K("promptFlag",P.target.value),placeholder:"e.g., -p",helperText:"Flag for passing the prompt"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(ke,{label:"Auto-Approve Flag",value:p.autoApproveFlag??"",onChange:P=>K("autoApproveFlag",P.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(ke,{label:"Workdir Flag",value:p.workdirFlag??"",onChange:P=>K("workdirFlag",P.target.value),placeholder:"e.g., -C",helperText:"Flag for setting working directory"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Environment Variables"}),s.jsx(Oy,{envVars:p.envVars??{},onChange:P=>K("envVars",P),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(Fe,{variant:"ghost",onClick:r,children:"Cancel"}),s.jsx(Fe,{onClick:ie,children:c?"Save Changes":"Add Preset"})]})]})})},IN=({tabs:l,activeTab:r,onChange:d,className:c=""})=>{var v,p;const[f,m]=_e.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})]})},zr=({label:l,value:r,onChange:d,placeholder:c,helpText:f})=>{const[m,b]=_e.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(Vr,{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(Fe,{onClick:S,disabled:!m.trim(),"aria-label":`Add ${l.toLowerCase()} value`,children:s.jsx(Hs,{className:"h-4 w-4"})})]}),f&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:f})]})},QN=({form:l,updateField:r,projectName:d,doctorChecks:c,doctorLoading:f})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(ht,{className:"p-6 space-y-6",children:s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Project Configuration"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-4",children:[s.jsx(ke,{label:"Project Name",value:d,disabled:!0}),s.jsx(ke,{label:"Default Branch",value:l.defaultBranch,onChange:m=>r("defaultBranch",m.target.value)}),s.jsx(ke,{label:"PRD Directory",value:l.prdDir,onChange:m=>r("prdDir",m.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(ke,{label:"Branch Prefix",value:l.branchPrefix,onChange:m=>r("branchPrefix",m.target.value)}),s.jsx(ke,{label:"Templates Directory",value:l.templatesDir,onChange:m=>r("templatesDir",m.target.value),helperText:"Directory for custom template overrides"}),s.jsx(ke,{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(zr,{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(zr,{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(ht,{className:"divide-y divide-slate-800",children:[s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx(zx,{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}`)})]})]}),sx=({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(to,{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(Px,{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(cu,{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},rx=({override:l,onChange:r,onSave:d,onCancel:c,isNew:f,presetOptions:m})=>{const b=O=>{const M=l.days.includes(O)?l.days.filter(D=>D!==O):[...l.days,O].sort((D,W)=>D-W);r({...l,days:M})},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 M=l.jobTypes??[],D=M.includes(O)?M.filter(W=>W!==O):[...M,O];r({...l,jobTypes:D.length===0?null:D})},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(ke,{label:"Label",value:l.label,onChange:O=>r({...l,label:O.target.value}),placeholder:"e.g., Night Hours",required:!0}),s.jsx(ft,{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 D;const M=w||(((D=l.jobTypes)==null?void 0:D.includes(O))??!1);return s.jsx("button",{type:"button",onClick:()=>T(O),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${M?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,disabled: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(Fe,{variant:"ghost",onClick:c,children:"Cancel"}),s.jsx(Fe,{onClick:d,disabled:!A,children:f?"Add Override":"Save Changes"})]})]})},XN=({overrides:l,onChange:r,presetOptions:d})=>{const[c,f]=_e.useState(null),[m,b]=_e.useState(!1),[S,v]=_e.useState(Tf),p=()=>{r([...l,S]),v({...Tf}),b(!1)},N=(D,W)=>{const Y=[...l];Y[D]=W,r(Y)},T=D=>{window.confirm("Are you sure you want to delete this schedule override?")&&r(l.filter((W,Y)=>Y!==D))},w=D=>{const W=[...l];W[D]={...W[D],enabled:!W[D].enabled},r(W)},A=D=>D.length===7?"Every day":D.length===5&&D.every(W=>W>=1&&W<=5)?"Weekdays":D.length===2&&D.includes(0)&&D.includes(6)?"Weekends":D.map(W=>Uf[W]).join(", "),O=D=>!D||D.length===0?"All Jobs":D.map(W=>Lf[W]).join(", "),M=D=>{const W=d.find(Y=>Y.value===D);return(W==null?void 0:W.label)||D};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((D,W)=>s.jsx("div",{children:c===W?s.jsx(rx,{override:D,onChange:Y=>N(W,Y),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 ${D.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:D.enabled,onChange:()=>w(W)}),s.jsx("span",{className:"text-slate-100 font-medium",children:D.label})]}),s.jsxs("div",{className:"text-sm text-slate-400 ml-11",children:[s.jsx("span",{className:"text-indigo-400",children:M(D.presetId)})," · ",A(D.days)," · ",D.startTime," - ",D.endTime," · ",O(D.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 ${D.label}`,title:`Edit ${D.label}`,children:s.jsx(to,{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 ${D.label}`,title:`Delete ${D.label}`,children:s.jsx(cu,{className:"h-4 w-4"})})]})]})},W))}),m?s.jsx(rx,{override:S,onChange:v,onSave:p,onCancel:()=>{b(!1),v({...Tf})},isNew:!0,presetOptions:d}):s.jsxs(Fe,{variant:"ghost",onClick:()=>b(!0),children:[s.jsx(Hs,{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(ht,{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(ft,{value:l.provider,onChange:v=>r("provider",v),options:c(l.providerPresets)})})]})}),s.jsxs(ht,{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(Fe,{onClick:S,variant:"indigo",size:"sm",children:[s.jsx(Hs,{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(sx,{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(sx,{presetId:v,preset:p,isBuiltIn:!1,onEdit:()=>f(v),onDelete:()=>m(v)},v))]})]}),s.jsxs(ht,{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(ft,{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(ft,{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(ht,{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(ht,{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(Oy,{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=Wc.find(N=>N.value===m);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(ft,{label:l,value:m,onChange:S,options:Wc.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(ke,{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 M,D,W,Y,K,J,ie,P,G,Z;const[N,T]=_e.useState(null);_e.useEffect(()=>{const k=new URLSearchParams(window.location.search).get("jobType");k&&(T(k),setTimeout(()=>{const ee=document.getElementById(`job-section-${k}`);ee&&ee.scrollIntoView({behavior:"smooth",block:"center"})},100))},[]);const w=(C,k)=>{const ee={...l.jobProviders};k===""?delete ee[C]:ee[C]=k,r("jobProviders",ee)},A=(C,k)=>{const ee=k==="planner"?"slicer":k;T(ee),setTimeout(()=>{const _=document.getElementById(`job-section-${ee}`);_&&_.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:th.map(C=>{const k=l.scheduleBundleId===C.id;return s.jsxs("button",{type:"button",onClick:()=>S(C),className:`text-left p-4 rounded-lg border transition-all ${k?"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:C.label}),s.jsx("p",{className:"text-[11px] text-slate-500 leading-relaxed",children:C.description})]},C.id)})}),s.jsx(Cy,{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(ft,{label:"Scheduling Priority",value:String(l.schedulingPriority),onChange:C=>r("schedulingPriority",Number(C)),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(ke,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(l.cronScheduleOffset),onChange:C=>r("cronScheduleOffset",Math.min(59,Math.max(0,Number(C.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:C=>r("queue",{...l.queue,enabled:C})})]})]})]}),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:C=>r("executorEnabled",C),expanded:N==="executor",onExpandChange:C=>T(C?"executor":null),scheduleSummary:Ul(l.cronSchedule),providerLabel:l.jobProviders.executor?(M=c.find(C=>C.value===l.jobProviders.executor))==null?void 0:M.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:C=>r("cronSchedule",C)}),s.jsx(ft,{label:"Provider",value:l.jobProviders.executor??"",onChange:C=>w("executor",C),options:O}),s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.maxRuntime),onChange:C=>r("maxRuntime",Number(C.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:qx,description:"Reviews PRs and provides feedback or automated fixes",enabled:l.reviewerEnabled,onToggle:C=>r("reviewerEnabled",C),expanded:N==="reviewer",onExpandChange:C=>T(C?"reviewer":null),scheduleSummary:Ul(l.reviewerSchedule),providerLabel:l.jobProviders.reviewer?(D=c.find(C=>C.value===l.jobProviders.reviewer))==null?void 0:D.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:C=>r("reviewerSchedule",C)}),s.jsx(ft,{label:"Provider",value:l.jobProviders.reviewer??"",onChange:C=>w("reviewer",C),options:O}),s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.reviewerMaxRuntime),onChange:C=>r("reviewerMaxRuntime",Number(C.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ke,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(l.minReviewScore),onChange:C=>r("minReviewScore",Number(C.target.value||0)),helperText:"PRs below this score will be marked as 'Needs Work'"}),s.jsx(ke,{label:"Max Retries",type:"number",value:String(l.reviewerMaxRetries),onChange:C=>r("reviewerMaxRetries",Number(C.target.value||0)),helperText:"Fix attempts after initial review"}),s.jsx(ke,{label:"Retry Delay",type:"number",value:String(l.reviewerRetryDelay),onChange:C=>r("reviewerRetryDelay",Number(C.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(ke,{label:"Max PRs Per Run",type:"number",value:String(l.reviewerMaxPrsPerRun),onChange:C=>r("reviewerMaxPrsPerRun",Number(C.target.value||0)),helperText:"Hard cap on PRs processed per run (0 = unlimited)"})})]})}),s.jsx(Hl,{id:"job-section-qa",title:"Quality Assurance",icon:p1,description:"Automated UI testing using Playwright",enabled:l.qa.enabled,onToggle:C=>r("qa",{...l.qa,enabled:C}),expanded:N==="qa",onExpandChange:C=>T(C?"qa":null),scheduleSummary:Ul(l.qa.schedule),providerLabel:l.jobProviders.qa?(W=c.find(C=>C.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:C=>r("qa",{...l.qa,schedule:C})}),s.jsx(ft,{label:"Provider",value:l.jobProviders.qa??"",onChange:C=>w("qa",C),options:O}),s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.qa.maxRuntime),onChange:C=>r("qa",{...l.qa,maxRuntime:Number(C.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ft,{label:"Artifacts",value:l.qa.artifacts,onChange:C=>r("qa",{...l.qa,artifacts:C}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}]}),s.jsx(ke,{label:"Skip Label",value:l.qa.skipLabel,onChange:C=>r("qa",{...l.qa,skipLabel:C.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:C=>r("qa",{...l.qa,autoInstallPlaywright:C})})]})]}),s.jsx(zr,{label:"QA Branch Patterns",value:l.qa.branchPatterns,onChange:C=>r("qa",{...l.qa,branchPatterns:C}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA"})]})}),s.jsx(Hl,{id:"job-section-audit",title:"Code Audit",icon:ao,description:"Automated code quality and security audits",enabled:l.audit.enabled,onToggle:C=>r("audit",{...l.audit,enabled:C}),expanded:N==="audit",onExpandChange:C=>T(C?"audit":null),scheduleSummary:Ul(l.audit.schedule),providerLabel:l.jobProviders.audit?(Y=c.find(C=>C.value===l.jobProviders.audit))==null?void 0:Y.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:C=>r("audit",{...l.audit,schedule:C})}),s.jsx(ft,{label:"Provider",value:l.jobProviders.audit??"",onChange:C=>w("audit",C),options:O}),s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.audit.maxRuntime),onChange:C=>r("audit",{...l.audit,maxRuntime:Number(C.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ft,{label:"Target Column",value:l.audit.targetColumn,onChange:C=>r("audit",{...l.audit,targetColumn:C}),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("div",{className:"md:col-span-2",children:s.jsx(zr,{label:"Audit Branch Patterns",value:l.audit.branchPatterns,onChange:C=>r("audit",{...l.audit,branchPatterns:C}),placeholder:"e.g., audit/",helpText:"Branch patterns to match for audits"})})]})}),s.jsx(Hl,{id:"job-section-slicer",title:"Planner",icon:G1,description:"Generate one PRD per run using ROADMAP.md or audit findings",enabled:l.roadmapScanner.enabled,onToggle:d,expanded:N==="slicer",onExpandChange:C=>T(C?"slicer":null),scheduleSummary:Ul(l.roadmapScanner.slicerSchedule),providerLabel:l.jobProviders.slicer?(K=c.find(C=>C.value===l.jobProviders.slicer))==null?void 0:K.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:C=>r("roadmapScanner",{...l.roadmapScanner,slicerSchedule:C})}),s.jsx(ft,{label:"Provider",value:l.jobProviders.slicer??"",onChange:C=>w("slicer",C),options:O}),s.jsx(ke,{label:"Roadmap File Path",value:l.roadmapScanner.roadmapPath,onChange:C=>r("roadmapScanner",{...l.roadmapScanner,roadmapPath:C.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.roadmapScanner.slicerMaxRuntime||""),onChange:C=>r("roadmapScanner",{...l.roadmapScanner,slicerMaxRuntime:Number(C.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ft,{label:"Priority Mode",value:l.roadmapScanner.priorityMode||"roadmap-first",onChange:C=>r("roadmapScanner",{...l.roadmapScanner,priorityMode:C==="audit-first"?"audit-first":"roadmap-first"}),options:[{label:"Roadmap first (recommended)",value:"roadmap-first"},{label:"Audit first",value:"audit-first"}]}),s.jsx(ft,{label:"Issue Column",value:l.roadmapScanner.issueColumn||"Ready",onChange:C=>r("roadmapScanner",{...l.roadmapScanner,issueColumn:C==="Draft"?"Draft":"Ready"}),options:[{label:"Ready (default)",value:"Ready"},{label:"Draft",value:"Draft"}]})]})}),s.jsx(Hl,{id:"job-section-analytics",title:"Analytics (Amplitude)",icon:n1,description:"Fetch Amplitude data, analyze with AI, and create board issues",enabled:l.analytics.enabled,onToggle:C=>r("analytics",{...l.analytics,enabled:C}),expanded:N==="analytics",onExpandChange:C=>T(C?"analytics":null),scheduleSummary:Ul(l.analytics.schedule),providerLabel:l.jobProviders.analytics?(J=c.find(C=>C.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:C=>r("analytics",{...l.analytics,schedule:C})}),s.jsx(ft,{label:"Provider",value:l.jobProviders.analytics??"",onChange:C=>w("analytics",C),options:O}),s.jsx(ke,{label:"Amplitude API Key",value:((ie=l.providerEnv)==null?void 0:ie.AMPLITUDE_API_KEY)??"",onChange:C=>r("providerEnv",{...l.providerEnv,AMPLITUDE_API_KEY:C.target.value}),placeholder:"Required"}),s.jsx(ke,{label:"Amplitude Secret Key",type:"password",value:((P=l.providerEnv)==null?void 0:P.AMPLITUDE_SECRET_KEY)??"",onChange:C=>r("providerEnv",{...l.providerEnv,AMPLITUDE_SECRET_KEY:C.target.value}),placeholder:"Required"}),s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.analytics.maxRuntime),onChange:C=>r("analytics",{...l.analytics,maxRuntime:Number(C.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ke,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(l.analytics.lookbackDays),onChange:C=>r("analytics",{...l.analytics,lookbackDays:Math.max(1,Math.min(90,Number(C.target.value||7)))})}),s.jsx(ft,{label:"Target Column",value:l.analytics.targetColumn,onChange:C=>r("analytics",{...l.analytics,targetColumn:C}),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:C=>r("analytics",{...l.analytics,analysisPrompt:C.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:O1,description:"Repo-wide conflict resolver that rebases PRs and applies feedback",enabled:l.prResolver.enabled,onToggle:C=>r("prResolver",{...l.prResolver,enabled:C}),expanded:N==="pr-resolver",onExpandChange:C=>T(C?"pr-resolver":null),scheduleSummary:Ul(l.prResolver.schedule),providerLabel:l.jobProviders["pr-resolver"]?(G=c.find(C=>C.value===l.jobProviders["pr-resolver"]))==null?void 0:G.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:C=>r("prResolver",{...l.prResolver,schedule:C})}),s.jsx(ft,{label:"Provider",value:l.jobProviders["pr-resolver"]??"",onChange:C=>w("pr-resolver",C),options:O}),s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.prResolver.maxRuntime),onChange:C=>r("prResolver",{...l.prResolver,maxRuntime:Number(C.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ke,{label:"Per-PR Timeout",type:"number",value:String(l.prResolver.perPrTimeout),onChange:C=>r("prResolver",{...l.prResolver,perPrTimeout:Math.max(0,Number(C.target.value||0))}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ke,{label:"Max PRs Per Run",type:"number",min:"0",value:String(l.prResolver.maxPrsPerRun),onChange:C=>r("prResolver",{...l.prResolver,maxPrsPerRun:Math.max(0,Number(C.target.value||0))})}),s.jsx(ke,{label:"Ready Label",value:l.prResolver.readyLabel,onChange:C=>r("prResolver",{...l.prResolver,readyLabel:C.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:C=>r("prResolver",{...l.prResolver,aiConflictResolution:C})})]}),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:C=>r("prResolver",{...l.prResolver,aiReviewResolution:C})})]})]}),s.jsx(zr,{label:"PR Resolver Branch Patterns",value:l.prResolver.branchPatterns,onChange:C=>r("prResolver",{...l.prResolver,branchPatterns:C}),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:Vx,description:"Repo-wide PR merge coordinator — scans, rebases, and merges",enabled:l.merger.enabled,onToggle:C=>r("merger",{...l.merger,enabled:C}),expanded:N==="merger",onExpandChange:C=>T(C?"merger":null),scheduleSummary:Ul(l.merger.schedule),providerLabel:l.jobProviders.merger?(Z=c.find(C=>C.value===l.jobProviders.merger))==null?void 0:Z.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:C=>r("merger",{...l.merger,schedule:C})}),s.jsx(ft,{label:"Provider",value:l.jobProviders.merger??"",onChange:C=>w("merger",C),options:O}),s.jsx(ke,{label:"Max Runtime",type:"number",value:String(l.merger.maxRuntime),onChange:C=>r("merger",{...l.merger,maxRuntime:Number(C.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ft,{label:"Merge Method",value:l.merger.mergeMethod,onChange:C=>r("merger",{...l.merger,mergeMethod:C}),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]}),s.jsx(ke,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(l.merger.minReviewScore),onChange:C=>r("merger",{...l.merger,minReviewScore:Math.max(0,Math.min(100,Number(C.target.value||0)))})}),s.jsx(ke,{label:"Max PRs Per Run",type:"number",min:"0",value:String(l.merger.maxPrsPerRun),onChange:C=>r("merger",{...l.merger,maxPrsPerRun:Math.max(0,Number(C.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:C=>r("merger",{...l.merger,rebaseBeforeMerge:C})})]}),s.jsx(zr,{label:"Merger Branch Patterns",value:l.merger.branchPatterns,onChange:C=>r("merger",{...l.merger,branchPatterns:C}),placeholder:"e.g., feat/, night-watch/"})]})})]})]})};function ix(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],ux=({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(ft,{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(ke,{label:"Bot Token",type:"password",value:l.botToken||"",onChange:m=>r({...l,botToken:m.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(ke,{label:"Chat ID",value:l.chatId||"",onChange:m=>r({...l,chatId:m.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(ke,{label:"Webhook URL",type:"password",value:l.url||"",onChange:m=>r({...l,url:m.target.value}),placeholder:"https://hooks.slack.com/services/..."})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Events"}),s.jsx("div",{className:"flex flex-wrap gap-2",children: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(Fe,{variant:"ghost",onClick:c,children:"Cancel"}),s.jsx(Fe,{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]=_e.useState(null),[S,v]=_e.useState(!1),[p,N]=_e.useState({type:"slack",url:"",events:[]}),T=()=>{r({webhooks:[...l.webhooks,p]}),N({type:"slack",url:"",events:[]}),v(!1)},w=(O,M)=>{const D=[...l.webhooks];D[O]=M,r({webhooks:D})},A=O=>{r({webhooks:l.webhooks.filter((M,D)=>D!==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,M)=>s.jsx("div",{children:m===M?s.jsx(ux,{webhook:O,onChange:D=>w(M,D),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(D=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:D.replace("_"," ")},D))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[c!==void 0&&(()=>{const D=d!=null&&ix(O)===ix(d);return s.jsx("button",{type:"button",onClick:()=>D?f==null?void 0:f():c(O),className:`p-2 transition-colors ${D?"text-indigo-400 hover:text-indigo-300":"text-slate-500 hover:text-slate-300"}`,"aria-label":D?"Global channel (active)":"Set as global channel",title:D?"Global channel (active)":"Set as global channel",children:s.jsx(A1,{className:"h-4 w-4"})})})(),s.jsx("button",{type:"button",onClick:()=>b(M),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${O.type} webhook`,title:`Edit ${O.type} webhook`,children:s.jsx(to,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>A(M),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${O.type} webhook`,title:`Delete ${O.type} webhook`,children:s.jsx(cu,{className:"h-4 w-4"})})]})]})},M))}),S?s.jsx(ux,{webhook:p,onChange:N,onSave:T,onCancel:()=>v(!1),isNew:!0}):s.jsxs(Fe,{variant:"ghost",onClick:()=>v(!0),children:[s.jsx(Hs,{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(ht,{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(ft,{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(ke,{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(ke,{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(ht,{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}=Yt(),[m,b]=q.useState(!1),[S,v]=q.useState(null),[p,N]=q.useState(null),[T,w]=q.useState(null),A=q.useCallback(()=>({...JN,...l}),[l]),O=q.useCallback(P=>{const G=A();return Object.entries(G).map(([Z,C])=>({label:C.name,value:Z}))},[A]),M=q.useCallback(P=>{const G=[];r===P&&G.push("Global Provider");const Z={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics"};for(const[C,k]of Object.entries(d))k===P&&G.push(Z[C]??C);return G},[r,d]),D=q.useCallback(()=>{v(null),N(null),b(!0)},[]),W=q.useCallback(P=>{const Z=A()[P];Z&&(v(P),N(Z),b(!0))},[A]),Y=q.useCallback(async(P,G)=>{const Z=!S,C={...l,[P]:G};c("providerPresets",C);try{await Jf({providerPresets:{[P]:G}}),f({title:Z?"Preset Added":"Preset Updated",message:Z?`${G.name} has been added. You can now assign it to jobs.`:`${G.name} has been saved.`,type:"success"})}catch(k){f({title:"Save Failed",message:k instanceof Error?k.message:"Failed to save preset",type:"error"}),c("providerPresets",l)}},[S,l,c,f]),K=q.useCallback(P=>{var C,k;if(Ic.includes(P)){f({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const G=M(P);if(G.length>0){w({presetId:P,presetName:((C=A()[P])==null?void 0:C.name)??P,references:G});return}const Z={...l};delete Z[P],c("providerPresets",Z),f({title:"Preset Deleted",message:`${((k=A()[P])==null?void 0:k.name)??P} has been removed.`,type:"success"})},[l,c,f,M,A]),J=q.useCallback(P=>{const G={...l};delete G[P],c("providerPresets",G),f({title:"Preset Reset",message:`${P} has been reset to built-in defaults.`,type:"success"})},[l,c,f]),ie=q.useCallback(()=>{if(!T)return;const{presetId:P}=T,G={...l};delete G[P],c("providerPresets",G);const Z={...d};for(const C of Object.keys(Z))Z[C]===P&&delete Z[C];c("jobProviders",Z),r===P&&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:M,handleAddPreset:D,handleEditPreset:W,handleSavePreset:Y,handleDeletePreset:K,handleResetPreset:J,handleConfirmDelete:ie}}const rj="5 * * * *",ij="25 */3 * * *",uj={enabled:!0,roadmapPath:"ROADMAP.md",autoScanInterval:300,slicerSchedule:"35 */6 * * *",slicerMaxRuntime:600,priorityMode:"roadmap-first",issueColumn:"Ready"},cx={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:""},ox={enabled:!0,schedule:"15 6,14,22 * * *",maxRuntime:3600,branchPatterns:[],maxPrsPerRun:0,perPrTimeout:600,aiConflictResolution:!0,aiReviewResolution:!1,readyLabel:"ready-to-merge"},dx={enabled:!1,schedule:"55 */4 * * *",maxRuntime:1800,mergeMethod:"squash",minReviewScore:80,branchPatterns:[],rebaseBeforeMerge:!0,maxPrsPerRun:0};function Qc(){return{...uj}}function dj(){return{...cx,branchPatterns:[...cx.branchPatterns]}}function fj(){return{...cj}}function Dy(){return{...oj}}function Xc(){return{...ox,branchPatterns:[...ox.branchPatterns]}}function ah(){return{...dx,branchPatterns:[...dx.branchPatterns]}}const hj=["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger"],fx=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||Qc(),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||Dy(),prResolver:l.prResolver??Xc(),merger:l.merger??ah(),queue:l.queue||{enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10},providerBuckets:{}}}),hx=l=>{var d,c;const r=VN(l.scheduleBundleId,l.cronSchedule,l.reviewerSchedule,l.qa.schedule,l.audit.schedule,l.roadmapScanner.slicerSchedule??Qc().slicerSchedule,((d=l.prResolver)==null?void 0:d.schedule)??Xc().schedule,((c=l.merger)==null?void 0:c.schedule)??ah().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}=Yt(),[b,S]=_e.useState(!1),[v,p]=_e.useState(!1),[N,T]=_e.useState(!1),[w,A]=_e.useState(null),[O,M]=_e.useState([]),[D,W]=_e.useState(void 0),Y=_e.useRef(!1),K=_e.useRef(!1),[J,ie]=_e.useState("template"),[P,G]=_e.useState("always-on"),[Z,C]=_e.useState("general"),[k,ee]=_e.useState(null),{data:_,loading:ce,error:me,refetch:fe}=cn(Xf,[d],{enabled:!c}),{data:$,loading:se,refetch:he}=cn(v2,[d],{enabled:!c}),oe=$??[],Ne=(ye,Re)=>{A(mt=>mt&&{...mt,[ye]:Re})},U=sj((w==null?void 0:w.providerPresets)??{},(w==null?void 0:w.provider)??"claude",(w==null?void 0:w.jobProviders)??{},Ne);_e.useEffect(()=>{Ix().then(M).catch(console.error),D2().then(ye=>W(ye.webhook)).catch(()=>{})},[d]),_e.useEffect(()=>{const ye=new URLSearchParams(window.location.search),Re=ye.get("tab"),mt=ye.get("mode");Re&&C({providers:"ai-runtime",runtime:"ai-runtime",roadmap:"jobs",qa:"jobs",audit:"jobs",notifications:"integrations",schedules:"jobs",general:"project","ai-runtime":"ai-providers",advanced:"project"}[Re]??Re),mt==="custom"?ie("custom"):mt==="template"&&ie("template");const Ot=ye.get("jobType");Ot&&setTimeout(()=>{pt("current",Ot,Re==="schedules"?"schedule":Re==="jobs"?"job":void 0)},300)},[location.search,_]);const ne=_e.useCallback(ye=>{const Re=hx(ye);ie(Re.mode),G(Re.selectedTemplateId)},[]);_e.useEffect(()=>{if(_){const ye=fx(_);A(ye),initialFormRef.current=ye,setIsDirty(!1),ne(ye)}},[_,ne]),_e.useEffect(()=>{if(!w||!initialFormRef.current)return;const ye=JSON.stringify(w),Re=JSON.stringify(initialFormRef.current);setIsDirty(ye!==Re)},[w]),_e.useEffect(()=>{w&&K.current&&(K.current=!1,sa())},[w==null?void 0:w.jobProviders]),_e.useEffect(()=>{if(k){const ye=setTimeout(()=>ee(null),2e3);return()=>clearTimeout(ye)}},[k]);const ge=()=>{if(ie("template"),!w)return;const ye=hx(w);ye.mode==="template"&&(G(ye.selectedTemplateId),Ne("scheduleBundleId",ye.selectedTemplateId))},xe=()=>{ie("custom"),Ne("scheduleBundleId",null),G("")},Oe=ye=>{setTimeout(()=>{const Re=document.getElementById(ye);Re&&(Re.scrollIntoView({behavior:"smooth",block:"center"}),ee(ye))},50)},Te=ye=>{const Re=ye==="planner"?"slicer":ye;C("jobs"),Oe(`job-section-${Re}`)},qe=ye=>{const Re=ye==="planner"?"slicer":ye;J!=="custom"&&xe(),C("schedules"),Oe(`job-schedule-${Re}`)},pt=(ye,Re,mt)=>{const Ot=Re==="planner"?"slicer":Re,Za=new Set(["qa","audit","slicer","analytics","pr-resolver","merger"]);if(mt==="job"){Te(Ot);return}if(mt==="schedule"){qe(Ot);return}if(Za.has(Ot)){Te(Ot);return}qe(Ot)},Ke=ye=>{G(ye.id),A(Re=>Re&&{...Re,cronSchedule:ye.schedules.executor,reviewerSchedule:ye.schedules.reviewer,scheduleBundleId:ye.id,qa:{...Re.qa,schedule:ye.schedules.qa},audit:{...Re.audit,schedule:ye.schedules.audit},roadmapScanner:{...Re.roadmapScanner,slicerSchedule:ye.schedules.slicer},prResolver:{...Re.prResolver,schedule:ye.schedules.prResolver},merger:{...Re.merger,schedule:ye.schedules.merger},fallbackOnRateLimit:!0})},sa=async()=>{var mt,Ot,Za,Vs,Bs,Ht,jn,Fl,Zl;if(!w)return;const ye=w.cronSchedule!==(_==null?void 0:_.cronSchedule)||w.reviewerSchedule!==(_==null?void 0:_.reviewerSchedule)||w.cronScheduleOffset!==((_==null?void 0:_.cronScheduleOffset)??0)||w.schedulingPriority!==((_==null?void 0:_.schedulingPriority)??3)||w.executorEnabled!==((_==null?void 0:_.executorEnabled)??!0)||w.reviewerEnabled!==((_==null?void 0:_.reviewerEnabled)??!0)||w.queue.enabled!==(((mt=_==null?void 0:_.queue)==null?void 0:mt.enabled)??!0)||w.qa.enabled!==((_==null?void 0:_.qa.enabled)??!0)||w.qa.schedule!==(_==null?void 0:_.qa.schedule)||w.audit.enabled!==((_==null?void 0:_.audit.enabled)??!0)||w.audit.schedule!==(_==null?void 0:_.audit.schedule)||w.analytics.enabled!==(((Ot=_==null?void 0:_.analytics)==null?void 0:Ot.enabled)??!1)||w.analytics.schedule!==(((Za=_==null?void 0:_.analytics)==null?void 0:Za.schedule)??Dy().schedule)||w.prResolver.enabled!==(((Vs=_==null?void 0:_.prResolver)==null?void 0:Vs.enabled)??Xc().enabled)||w.prResolver.schedule!==(((Bs=_==null?void 0:_.prResolver)==null?void 0:Bs.schedule)??Xc().schedule)||w.merger.enabled!==(((Ht=_==null?void 0:_.merger)==null?void 0:Ht.enabled)??!1)||w.merger.schedule!==(((jn=_==null?void 0:_.merger)==null?void 0:jn.schedule)??ah().schedule)||w.roadmapScanner.enabled!==(((Fl=_==null?void 0:_.roadmapScanner)==null?void 0:Fl.enabled)??!0)||(w.roadmapScanner.slicerSchedule||Qc().slicerSchedule)!==(((Zl=_==null?void 0:_.roadmapScanner)==null?void 0:Zl.slicerSchedule)||Qc().slicerSchedule),Re={};for(const Jt of hj){const Wa=w.jobProviders[Jt];typeof Wa=="string"&&Wa.trim().length>0?Re[Jt]=Wa:_!=null&&_.jobProviders[Jt]&&(Re[Jt]=null)}S(!0);try{const Jt=await Jf({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:J==="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:Re,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}),Wa=fx(Jt);A(Wa),initialFormRef.current=Wa,setIsDirty(!1),ne(Wa);let wn="";if(ye)try{await Df()}catch(Ze){wn=Ze instanceof Error?Ze.message:"failed to reinstall cron schedules"}l(wn?{title:"Settings Saved (Cron Reinstall Failed)",message:wn,type:"warning"}:{title:"Settings Saved",message:ye?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),Y.current=!0,fe(),he()}catch(Jt){l({title:"Save Failed",message:Jt instanceof Error?Jt.message:"Failed to save configuration",type:"error"})}finally{S(!1)}},on=()=>{if(initialFormRef.current){const ye=initialFormRef.current;A(ye),setIsDirty(!1),ne(ye),l({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},Pl=async ye=>{if(!(D!=null&&!window.confirm("Replace existing global channel?")))try{const Re=await Tg({webhook:ye});W(Re.webhook)}catch(Re){l({title:"Failed to set global channel",message:Re instanceof Error?Re.message:"Unknown error",type:"error"})}},Jn=async()=>{try{await Tg({webhook:null}),W(null)}catch(ye){l({title:"Failed to unset global channel",message:ye instanceof Error?ye.message:"Unknown error",type:"error"})}},Ga=async ye=>{try{const Re=await Kx(ye);Ne("roadmapScanner",Re.roadmapScanner);let mt="";try{await Df()}catch(Ot){mt=Ot instanceof Error?Ot.message:"Failed to reinstall cron schedules"}l(mt?{title:"Planner Saved (Cron Reinstall Failed)",message:mt,type:"warning"}:{title:ye?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${ye?"enabled":"disabled"}.`,type:"success"})}catch(Re){l({title:"Toggle Failed",message:Re instanceof Error?Re.message:"Failed to toggle roadmap scanner",type:"error"})}},Fa=async()=>{if(d){T(!0);try{await y2(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(ce||!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(me)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Sn,{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:me.message}),s.jsx(Fe,{onClick:()=>fe(),children:"Retry"})]});const Gl=[{id:"project",label:"Project",content:s.jsx(QN,{form:w,updateField:Ne,projectName:r,doctorChecks:oe,doctorLoading:se})},{id:"ai-providers",label:"AI Providers",content:s.jsx(KN,{form:w,updateField:Ne,getAllPresets:U.getAllPresets,getPresetOptions:U.getPresetOptions,handleEditPreset:U.handleEditPreset,handleDeletePreset:U.handleDeletePreset,handleResetPreset:U.handleResetPreset,handleAddPreset:U.handleAddPreset})},{id:"jobs",label:"Jobs",content:s.jsx(ej,{form:w,updateField:Ne,handleRoadmapToggle:Ga,presetOptions:U.getPresetOptions(w.providerPresets),scheduleMode:J,onSwitchToTemplate:ge,onSwitchToCustom:xe,onApplyTemplate:Ke,allProjectConfigs:O,currentProjectId:d})},{id:"integrations",label:"Integrations",content:s.jsx(lj,{form:w,updateField:Ne,globalWebhook:D,onSetGlobal:Pl,onUnsetGlobal:Jn})}];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"})]}),isDirty&&s.jsxs($a,{variant:"warning",className:"animate-pulse",children:[s.jsx(Ur,{className:"h-3 w-3 mr-1"}),"Unsaved Changes"]})]}),s.jsx(IN,{tabs:Gl,activeTab:Z,onChange:C}),isDirty&&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(Sn,{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(Fe,{variant:"ghost",size:"sm",className:"text-slate-400 hover:text-slate-300",onClick:on,children:[s.jsx(Px,{className:"h-4 w-4 mr-2"}),"Discard"]}),s.jsxs(Fe,{size:"sm",className:"bg-indigo-600 hover:bg-indigo-500 shadow-lg shadow-indigo-500/20",onClick:sa,loading:b,children:[s.jsx(K1,{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(Fe,{variant:"secondary",className:"bg-red-600 hover:bg-red-700 text-white",onClick:()=>p(!0),children:[s.jsx(cu,{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(Fe,{variant:"ghost",onClick:()=>p(!1),disabled:N,children:"Cancel"}),s.jsx(Fe,{variant:"secondary",className:"bg-red-600 hover:bg-red-700",onClick:Fa,loading:N,children:"Remove"})]})]})]}),s.jsx(WN,{isOpen:U.presetModalOpen,onClose:()=>{U.setPresetModalOpen(!1)},onSave:U.handleSavePreset,presetId:U.editingPresetId,preset:U.editingPreset,isBuiltIn:U.editingPresetId?Ic.includes(U.editingPresetId):!1,existingIds:Object.keys(U.getAllPresets())}),U.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:()=>U.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:U.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:U.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(Fe,{variant:"ghost",onClick:()=>U.setDeleteWarning(null),children:"Cancel"}),s.jsx(Fe,{variant:"secondary",onClick:U.handleConfirmDelete,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},gj=()=>(Y2(),$2(),s.jsx(Mb,{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(lb,{children:[s.jsx(In,{path:"/",element:s.jsx(J2,{})}),s.jsx(In,{path:"/prs",element:s.jsx(eS,{})}),s.jsx(In,{path:"/board",element:s.jsx(W2,{})}),s.jsx(In,{path:"/scheduling",element:s.jsx(YN,{})}),s.jsx(In,{path:"/logs",element:s.jsx(K2,{})}),s.jsx(In,{path:"/roadmap",element:s.jsx(tS,{})}),s.jsx(In,{path:"/settings",element:s.jsx(mj,{})}),s.jsx(In,{path:"*",element:s.jsx(ab,{to:"/",replace:!0})})]})})})]}),s.jsx(B2,{})]})})),Ry=document.getElementById("root");if(!Ry)throw new Error("Could not find root element to mount to");const xj=rv.createRoot(Ry);xj.render(s.jsx(_e.StrictMode,{children:s.jsx(gj,{})}));