agent-dealer 1.2.4 → 1.2.5

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 (38) hide show
  1. package/bundle/server/dist/adapters/agent-health.js +25 -2
  2. package/bundle/server/dist/adapters/agent-health.test.js +55 -2
  3. package/bundle/server/dist/adapters/github.js +110 -12
  4. package/bundle/server/dist/adapters/github.test.js +274 -3
  5. package/bundle/server/dist/adapters/muse-capability.js +330 -0
  6. package/bundle/server/dist/adapters/muse-capability.test.js +378 -0
  7. package/bundle/server/dist/capacity/claude-local-cache.js +217 -64
  8. package/bundle/server/dist/capacity/claude-local-cache.test.js +174 -29
  9. package/bundle/server/dist/capacity/muse-host.js +60 -2
  10. package/bundle/server/dist/capacity/muse-host.test.js +125 -1
  11. package/bundle/server/dist/coordinator/admission.test.js +85 -0
  12. package/bundle/server/dist/coordinator/commands.js +35 -8
  13. package/bundle/server/dist/coordinator/developer-effect.js +40 -6
  14. package/bundle/server/dist/coordinator/developer-effect.test.js +121 -12
  15. package/bundle/server/dist/coordinator/human-resolution.js +31 -1
  16. package/bundle/server/dist/coordinator/muse-spawn.js +12 -2
  17. package/bundle/server/dist/coordinator/prompts.js +15 -0
  18. package/bundle/server/dist/coordinator/prompts.test.js +20 -0
  19. package/bundle/server/dist/coordinator/spawn.js +7 -0
  20. package/bundle/server/dist/coordinator/worktree-cwd-guard.js +48 -0
  21. package/bundle/server/dist/coordinator/worktree-cwd-guard.test.js +83 -0
  22. package/bundle/server/dist/routes/human-actions.js +10 -1
  23. package/bundle/server/dist/routes/human-actions.test.js +117 -1
  24. package/bundle/server/dist/routes/index.js +9 -5
  25. package/bundle/server/dist/routes/runtime-capacity.test.js +3 -2
  26. package/bundle/server/package.json +2 -2
  27. package/bundle/server/static-ui/assets/{index-CYqRh_-S.css → index-BII-LgB8.css} +1 -1
  28. package/bundle/server/static-ui/assets/index-Bq8wWpZm.js +60 -0
  29. package/bundle/server/static-ui/index.html +2 -2
  30. package/bundle/shared/dist/agents.d.ts +15 -15
  31. package/bundle/shared/dist/agents.js +6 -0
  32. package/bundle/shared/dist/index.d.ts +7 -7
  33. package/bundle/shared/package.json +1 -1
  34. package/dist/doctor.d.ts +7 -3
  35. package/dist/doctor.js +17 -12
  36. package/dist/doctor.test.js +9 -8
  37. package/package.json +1 -1
  38. package/bundle/server/static-ui/assets/index-UO4lHZw4.js +0 -60
@@ -0,0 +1,60 @@
1
+ (function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))u(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const m of f.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&u(m)}).observe(document,{childList:!0,subtree:!0});function s(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function u(d){if(d.ep)return;d.ep=!0;const f=s(d);fetch(d.href,f)}})();var Do={exports:{}},ms={};/**
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 Hp;function o0(){if(Hp)return ms;Hp=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(u,d,f){var m=null;if(f!==void 0&&(m=""+f),d.key!==void 0&&(m=""+d.key),"key"in d){f={};for(var y in d)y!=="key"&&(f[y]=d[y])}else f=d;return d=f.ref,{$$typeof:n,type:u,key:m,ref:d!==void 0?d:null,props:f}}return ms.Fragment=i,ms.jsx=s,ms.jsxs=s,ms}var $p;function d0(){return $p||($p=1,Do.exports=o0()),Do.exports}var c=d0(),Uo={exports:{}},ye={};/**
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 Vp;function f0(){if(Vp)return ye;Vp=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),m=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),U=Symbol.iterator;function K(j){return j===null||typeof j!="object"?null:(j=U&&j[U]||j["@@iterator"],typeof j=="function"?j:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},V=Object.assign,D={};function B(j,H,F){this.props=j,this.context=H,this.refs=D,this.updater=F||C}B.prototype.isReactComponent={},B.prototype.setState=function(j,H){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,H,"setState")},B.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function Q(){}Q.prototype=B.prototype;function W(j,H,F){this.props=j,this.context=H,this.refs=D,this.updater=F||C}var oe=W.prototype=new Q;oe.constructor=W,V(oe,B.prototype),oe.isPureReactComponent=!0;var J=Array.isArray;function Ee(){}var I={H:null,A:null,T:null,S:null},ge=Object.prototype.hasOwnProperty;function He(j,H,F){var ee=F.ref;return{$$typeof:n,type:j,key:H,ref:ee!==void 0?ee:null,props:F}}function yt(j,H){return He(j.type,H,j.props)}function dt(j){return typeof j=="object"&&j!==null&&j.$$typeof===n}function Pe(j){var H={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(F){return H[F]})}var Tt=/\/+/g;function gt(j,H){return typeof j=="object"&&j!==null&&j.key!=null?Pe(""+j.key):H.toString(36)}function Ie(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(Ee,Ee):(j.status="pending",j.then(function(H){j.status==="pending"&&(j.status="fulfilled",j.value=H)},function(H){j.status==="pending"&&(j.status="rejected",j.reason=H)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function L(j,H,F,ee,le){var xe=typeof j;(xe==="undefined"||xe==="boolean")&&(j=null);var he=!1;if(j===null)he=!0;else switch(xe){case"bigint":case"string":case"number":he=!0;break;case"object":switch(j.$$typeof){case n:case i:he=!0;break;case b:return he=j._init,L(he(j._payload),H,F,ee,le)}}if(he)return le=le(j),he=ee===""?"."+gt(j,0):ee,J(le)?(F="",he!=null&&(F=he.replace(Tt,"$&/")+"/"),L(le,H,F,"",function(Na){return Na})):le!=null&&(dt(le)&&(le=yt(le,F+(le.key==null||j&&j.key===le.key?"":(""+le.key).replace(Tt,"$&/")+"/")+he)),H.push(le)),1;he=0;var Me=ee===""?".":ee+":";if(J(j))for(var $e=0;$e<j.length;$e++)ee=j[$e],xe=Me+gt(ee,$e),he+=L(ee,H,F,xe,le);else if($e=K(j),typeof $e=="function")for(j=$e.call(j),$e=0;!(ee=j.next()).done;)ee=ee.value,xe=Me+gt(ee,$e++),he+=L(ee,H,F,xe,le);else if(xe==="object"){if(typeof j.then=="function")return L(Ie(j),H,F,ee,le);throw H=String(j),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return he}function Z(j,H,F){if(j==null)return j;var ee=[],le=0;return L(j,ee,"","",function(xe){return H.call(F,xe,le++)}),ee}function ce(j){if(j._status===-1){var H=j._result;H=H(),H.then(function(F){(j._status===0||j._status===-1)&&(j._status=1,j._result=F)},function(F){(j._status===0||j._status===-1)&&(j._status=2,j._result=F)}),j._status===-1&&(j._status=0,j._result=H)}if(j._status===1)return j._result.default;throw j._result}var Re=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},ke={map:Z,forEach:function(j,H,F){Z(j,function(){H.apply(this,arguments)},F)},count:function(j){var H=0;return Z(j,function(){H++}),H},toArray:function(j){return Z(j,function(H){return H})||[]},only:function(j){if(!dt(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return ye.Activity=N,ye.Children=ke,ye.Component=B,ye.Fragment=s,ye.Profiler=d,ye.PureComponent=W,ye.StrictMode=u,ye.Suspense=g,ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,ye.__COMPILER_RUNTIME={__proto__:null,c:function(j){return I.H.useMemoCache(j)}},ye.cache=function(j){return function(){return j.apply(null,arguments)}},ye.cacheSignal=function(){return null},ye.cloneElement=function(j,H,F){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var ee=V({},j.props),le=j.key;if(H!=null)for(xe in H.key!==void 0&&(le=""+H.key),H)!ge.call(H,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&H.ref===void 0||(ee[xe]=H[xe]);var xe=arguments.length-2;if(xe===1)ee.children=F;else if(1<xe){for(var he=Array(xe),Me=0;Me<xe;Me++)he[Me]=arguments[Me+2];ee.children=he}return He(j.type,le,ee)},ye.createContext=function(j){return j={$$typeof:m,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:f,_context:j},j},ye.createElement=function(j,H,F){var ee,le={},xe=null;if(H!=null)for(ee in H.key!==void 0&&(xe=""+H.key),H)ge.call(H,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(le[ee]=H[ee]);var he=arguments.length-2;if(he===1)le.children=F;else if(1<he){for(var Me=Array(he),$e=0;$e<he;$e++)Me[$e]=arguments[$e+2];le.children=Me}if(j&&j.defaultProps)for(ee in he=j.defaultProps,he)le[ee]===void 0&&(le[ee]=he[ee]);return He(j,xe,le)},ye.createRef=function(){return{current:null}},ye.forwardRef=function(j){return{$$typeof:y,render:j}},ye.isValidElement=dt,ye.lazy=function(j){return{$$typeof:b,_payload:{_status:-1,_result:j},_init:ce}},ye.memo=function(j,H){return{$$typeof:v,type:j,compare:H===void 0?null:H}},ye.startTransition=function(j){var H=I.T,F={};I.T=F;try{var ee=j(),le=I.S;le!==null&&le(F,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(Ee,Re)}catch(xe){Re(xe)}finally{H!==null&&F.types!==null&&(H.types=F.types),I.T=H}},ye.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},ye.use=function(j){return I.H.use(j)},ye.useActionState=function(j,H,F){return I.H.useActionState(j,H,F)},ye.useCallback=function(j,H){return I.H.useCallback(j,H)},ye.useContext=function(j){return I.H.useContext(j)},ye.useDebugValue=function(){},ye.useDeferredValue=function(j,H){return I.H.useDeferredValue(j,H)},ye.useEffect=function(j,H){return I.H.useEffect(j,H)},ye.useEffectEvent=function(j){return I.H.useEffectEvent(j)},ye.useId=function(){return I.H.useId()},ye.useImperativeHandle=function(j,H,F){return I.H.useImperativeHandle(j,H,F)},ye.useInsertionEffect=function(j,H){return I.H.useInsertionEffect(j,H)},ye.useLayoutEffect=function(j,H){return I.H.useLayoutEffect(j,H)},ye.useMemo=function(j,H){return I.H.useMemo(j,H)},ye.useOptimistic=function(j,H){return I.H.useOptimistic(j,H)},ye.useReducer=function(j,H,F){return I.H.useReducer(j,H,F)},ye.useRef=function(j){return I.H.useRef(j)},ye.useState=function(j){return I.H.useState(j)},ye.useSyncExternalStore=function(j,H,F){return I.H.useSyncExternalStore(j,H,F)},ye.useTransition=function(){return I.H.useTransition()},ye.version="19.2.7",ye}var Yp;function jd(){return Yp||(Yp=1,Uo.exports=f0()),Uo.exports}var w=jd(),zo={exports:{}},ps={},Bo={exports:{}},qo={};/**
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 Zp;function h0(){return Zp||(Zp=1,(function(n){function i(L,Z){var ce=L.length;L.push(Z);e:for(;0<ce;){var Re=ce-1>>>1,ke=L[Re];if(0<d(ke,Z))L[Re]=Z,L[ce]=ke,ce=Re;else break e}}function s(L){return L.length===0?null:L[0]}function u(L){if(L.length===0)return null;var Z=L[0],ce=L.pop();if(ce!==Z){L[0]=ce;e:for(var Re=0,ke=L.length,j=ke>>>1;Re<j;){var H=2*(Re+1)-1,F=L[H],ee=H+1,le=L[ee];if(0>d(F,ce))ee<ke&&0>d(le,F)?(L[Re]=le,L[ee]=ce,Re=ee):(L[Re]=F,L[H]=ce,Re=H);else if(ee<ke&&0>d(le,ce))L[Re]=le,L[ee]=ce,Re=ee;else break e}}return Z}function d(L,Z){var ce=L.sortIndex-Z.sortIndex;return ce!==0?ce:L.id-Z.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var m=Date,y=m.now();n.unstable_now=function(){return m.now()-y}}var g=[],v=[],b=1,N=null,U=3,K=!1,C=!1,V=!1,D=!1,B=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function oe(L){for(var Z=s(v);Z!==null;){if(Z.callback===null)u(v);else if(Z.startTime<=L)u(v),Z.sortIndex=Z.expirationTime,i(g,Z);else break;Z=s(v)}}function J(L){if(V=!1,oe(L),!C)if(s(g)!==null)C=!0,Ee||(Ee=!0,Pe());else{var Z=s(v);Z!==null&&Ie(J,Z.startTime-L)}}var Ee=!1,I=-1,ge=5,He=-1;function yt(){return D?!0:!(n.unstable_now()-He<ge)}function dt(){if(D=!1,Ee){var L=n.unstable_now();He=L;var Z=!0;try{e:{C=!1,V&&(V=!1,Q(I),I=-1),K=!0;var ce=U;try{t:{for(oe(L),N=s(g);N!==null&&!(N.expirationTime>L&&yt());){var Re=N.callback;if(typeof Re=="function"){N.callback=null,U=N.priorityLevel;var ke=Re(N.expirationTime<=L);if(L=n.unstable_now(),typeof ke=="function"){N.callback=ke,oe(L),Z=!0;break t}N===s(g)&&u(g),oe(L)}else u(g);N=s(g)}if(N!==null)Z=!0;else{var j=s(v);j!==null&&Ie(J,j.startTime-L),Z=!1}}break e}finally{N=null,U=ce,K=!1}Z=void 0}}finally{Z?Pe():Ee=!1}}}var Pe;if(typeof W=="function")Pe=function(){W(dt)};else if(typeof MessageChannel<"u"){var Tt=new MessageChannel,gt=Tt.port2;Tt.port1.onmessage=dt,Pe=function(){gt.postMessage(null)}}else Pe=function(){B(dt,0)};function Ie(L,Z){I=B(function(){L(n.unstable_now())},Z)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(L){L.callback=null},n.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ge=0<L?Math.floor(1e3/L):5},n.unstable_getCurrentPriorityLevel=function(){return U},n.unstable_next=function(L){switch(U){case 1:case 2:case 3:var Z=3;break;default:Z=U}var ce=U;U=Z;try{return L()}finally{U=ce}},n.unstable_requestPaint=function(){D=!0},n.unstable_runWithPriority=function(L,Z){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var ce=U;U=L;try{return Z()}finally{U=ce}},n.unstable_scheduleCallback=function(L,Z,ce){var Re=n.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?Re+ce:Re):ce=Re,L){case 1:var ke=-1;break;case 2:ke=250;break;case 5:ke=1073741823;break;case 4:ke=1e4;break;default:ke=5e3}return ke=ce+ke,L={id:b++,callback:Z,priorityLevel:L,startTime:ce,expirationTime:ke,sortIndex:-1},ce>Re?(L.sortIndex=ce,i(v,L),s(g)===null&&L===s(v)&&(V?(Q(I),I=-1):V=!0,Ie(J,ce-Re))):(L.sortIndex=ke,i(g,L),C||K||(C=!0,Ee||(Ee=!0,Pe()))),L},n.unstable_shouldYield=yt,n.unstable_wrapCallback=function(L){var Z=U;return function(){var ce=U;U=Z;try{return L.apply(this,arguments)}finally{U=ce}}}})(qo)),qo}var Gp;function m0(){return Gp||(Gp=1,Bo.exports=h0()),Bo.exports}var Ho={exports:{}},Ct={};/**
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 Qp;function p0(){if(Qp)return Ct;Qp=1;var n=jd();function i(g){var v="https://react.dev/errors/"+g;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)v+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+g+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var u={d:{f:s,r:function(){throw Error(i(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},d=Symbol.for("react.portal");function f(g,v,b){var N=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:N==null?null:""+N,children:g,containerInfo:v,implementation:b}}var m=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(g,v){if(g==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return Ct.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Ct.createPortal=function(g,v){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(i(299));return f(g,v,null,b)},Ct.flushSync=function(g){var v=m.T,b=u.p;try{if(m.T=null,u.p=2,g)return g()}finally{m.T=v,u.p=b,u.d.f()}},Ct.preconnect=function(g,v){typeof g=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,u.d.C(g,v))},Ct.prefetchDNS=function(g){typeof g=="string"&&u.d.D(g)},Ct.preinit=function(g,v){if(typeof g=="string"&&v&&typeof v.as=="string"){var b=v.as,N=y(b,v.crossOrigin),U=typeof v.integrity=="string"?v.integrity:void 0,K=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;b==="style"?u.d.S(g,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:N,integrity:U,fetchPriority:K}):b==="script"&&u.d.X(g,{crossOrigin:N,integrity:U,fetchPriority:K,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},Ct.preinitModule=function(g,v){if(typeof g=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var b=y(v.as,v.crossOrigin);u.d.M(g,{crossOrigin:b,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&u.d.M(g)},Ct.preload=function(g,v){if(typeof g=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var b=v.as,N=y(b,v.crossOrigin);u.d.L(g,b,{crossOrigin:N,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},Ct.preloadModule=function(g,v){if(typeof g=="string")if(v){var b=y(v.as,v.crossOrigin);u.d.m(g,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:b,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else u.d.m(g)},Ct.requestFormReset=function(g){u.d.r(g)},Ct.unstable_batchedUpdates=function(g,v){return g(v)},Ct.useFormState=function(g,v,b){return m.H.useFormState(g,v,b)},Ct.useFormStatus=function(){return m.H.useHostTransitionStatus()},Ct.version="19.2.7",Ct}var Xp;function x0(){if(Xp)return Ho.exports;Xp=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Ho.exports=p0(),Ho.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 Kp;function y0(){if(Kp)return ps;Kp=1;var n=m0(),i=jd(),s=x0();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function m(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 y(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 g(e){if(f(e)!==e)throw Error(u(188))}function v(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(u(188));return t!==e?null:e}for(var a=e,l=t;;){var r=a.return;if(r===null)break;var o=r.alternate;if(o===null){if(l=r.return,l!==null){a=l;continue}break}if(r.child===o.child){for(o=r.child;o;){if(o===a)return g(r),e;if(o===l)return g(r),t;o=o.sibling}throw Error(u(188))}if(a.return!==l.return)a=r,l=o;else{for(var h=!1,x=r.child;x;){if(x===a){h=!0,a=r,l=o;break}if(x===l){h=!0,l=r,a=o;break}x=x.sibling}if(!h){for(x=o.child;x;){if(x===a){h=!0,a=o,l=r;break}if(x===l){h=!0,l=o,a=r;break}x=x.sibling}if(!h)throw Error(u(189))}}if(a.alternate!==l)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var N=Object.assign,U=Symbol.for("react.element"),K=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),W=Symbol.for("react.context"),oe=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),Ee=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),ge=Symbol.for("react.lazy"),He=Symbol.for("react.activity"),yt=Symbol.for("react.memo_cache_sentinel"),dt=Symbol.iterator;function Pe(e){return e===null||typeof e!="object"?null:(e=dt&&e[dt]||e["@@iterator"],typeof e=="function"?e:null)}var Tt=Symbol.for("react.client.reference");function gt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Tt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case V:return"Fragment";case B:return"Profiler";case D:return"StrictMode";case J:return"Suspense";case Ee:return"SuspenseList";case He:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case W:return e.displayName||"Context";case Q:return(e._context.displayName||"Context")+".Consumer";case oe:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return t=e.displayName||null,t!==null?t:gt(e.type)||"Memo";case ge:t=e._payload,e=e._init;try{return gt(e(t))}catch{}}return null}var Ie=Array.isArray,L=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},Re=[],ke=-1;function j(e){return{current:e}}function H(e){0>ke||(e.current=Re[ke],Re[ke]=null,ke--)}function F(e,t){ke++,Re[ke]=e.current,e.current=t}var ee=j(null),le=j(null),xe=j(null),he=j(null);function Me(e,t){switch(F(xe,t),F(le,e),F(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?cp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=cp(t),e=op(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(ee),F(ee,e)}function $e(){H(ee),H(le),H(xe)}function Na(e){e.memoizedState!==null&&F(he,e);var t=ee.current,a=op(t,e.type);t!==a&&(F(le,e),F(ee,a))}function zt(e){le.current===e&&(H(ee),H(le)),he.current===e&&(H(he),os._currentValue=ce)}var ia,Qa;function Le(e){if(ia===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);ia=t&&t[1]||"",Qa=-1<a.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+ia+e+Qa}var bt=!1;function Xa(e,t){if(!e||bt)return"";bt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(M){var T=M}Reflect.construct(e,[],Y)}else{try{Y.call()}catch(M){T=M}e.call(Y.prototype)}}else{try{throw Error()}catch(M){T=M}(Y=e())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(M){if(M&&T&&typeof M.stack=="string")return[M.stack,T.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=l.DetermineComponentFrameRoot(),h=o[0],x=o[1];if(h&&x){var S=h.split(`
44
+ `),k=x.split(`
45
+ `);for(r=l=0;l<S.length&&!S[l].includes("DetermineComponentFrameRoot");)l++;for(;r<k.length&&!k[r].includes("DetermineComponentFrameRoot");)r++;if(l===S.length||r===k.length)for(l=S.length-1,r=k.length-1;1<=l&&0<=r&&S[l]!==k[r];)r--;for(;1<=l&&0<=r;l--,r--)if(S[l]!==k[r]){if(l!==1||r!==1)do if(l--,r--,0>r||S[l]!==k[r]){var z=`
46
+ `+S[l].replace(" at new "," at ");return e.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",e.displayName)),z}while(1<=l&&0<=r);break}}}finally{bt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Le(a):""}function lt(e,t){switch(e.tag){case 26:case 27:case 5:return Le(e.type);case 16:return Le("Lazy");case 13:return e.child!==t&&t!==null?Le("Suspense Fallback"):Le("Suspense");case 19:return Le("SuspenseList");case 0:case 15:return Xa(e.type,!1);case 11:return Xa(e.type.render,!1);case 1:return Xa(e.type,!0);case 31:return Le("Activity");default:return""}}function Pn(e){try{var t="",a=null;do t+=lt(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
47
+ Error generating stack: `+l.message+`
48
+ `+l.stack}}var wn=Object.prototype.hasOwnProperty,Ua=n.unstable_scheduleCallback,Ot=n.unstable_cancelCallback,Ka=n.unstable_shouldYield,Sn=n.unstable_requestPaint,et=n.unstable_now,it=n.unstable_getCurrentPriorityLevel,el=n.unstable_ImmediatePriority,tl=n.unstable_UserBlockingPriority,Ja=n.unstable_NormalPriority,al=n.unstable_LowPriority,wt=n.unstable_IdlePriority,ji=n.log,Rl=n.unstable_setDisableYieldValue,Ia=null,_t=null;function Kt(e){if(typeof ji=="function"&&Rl(e),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(Ia,e)}catch{}}var G=Math.clz32?Math.clz32:Bt,Ce=Math.log,st=Math.LN2;function Bt(e){return e>>>=0,e===0?32:31-(Ce(e)/st|0)|0}var jn=256,Mt=262144,sa=4194304;function za(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 kl(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var r=0,o=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var x=l&134217727;return x!==0?(l=x&~o,l!==0?r=za(l):(h&=x,h!==0?r=za(h):a||(a=x&~e,a!==0&&(r=za(a))))):(x=l&~o,x!==0?r=za(x):h!==0?r=za(h):a||(a=l&~e,a!==0&&(r=za(a)))),r===0?0:t!==0&&t!==r&&(t&o)===0&&(o=r&-r,a=t&-t,o>=a||o===32&&(a&4194048)!==0)?t:r}function O(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function re(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 Ke(){var e=sa;return sa<<=1,(sa&62914560)===0&&(sa=4194304),e}function Jt(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function _i(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Wy(e,t,a,l,r,o){var h=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 x=e.entanglements,S=e.expirationTimes,k=e.hiddenUpdates;for(a=h&~a;0<a;){var z=31-G(a),Y=1<<z;x[z]=0,S[z]=-1;var T=k[z];if(T!==null)for(k[z]=null,z=0;z<T.length;z++){var M=T[z];M!==null&&(M.lane&=-536870913)}a&=~Y}l!==0&&Zd(e,l,0),o!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=o&~(h&~t))}function Zd(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-G(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Gd(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-G(a),r=1<<l;r&t|e[l]&t&&(e[l]|=t),a&=~r}}function Qd(e,t){var a=t&-t;return a=(a&42)!==0?1:ju(a),(a&(e.suspendedLanes|t))!==0?0:a}function ju(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 _u(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Xd(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:Mp(e.type))}function Kd(e,t){var a=Z.p;try{return Z.p=e,t()}finally{Z.p=a}}var _n=Math.random().toString(36).slice(2),Nt="__reactFiber$"+_n,qt="__reactProps$"+_n,Cl="__reactContainer$"+_n,Nu="__reactEvents$"+_n,Py="__reactListeners$"+_n,ev="__reactHandles$"+_n,Jd="__reactResources$"+_n,Ni="__reactMarker$"+_n;function Au(e){delete e[Nt],delete e[qt],delete e[Nu],delete e[Py],delete e[ev]}function Tl(e){var t=e[Nt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Cl]||a[Nt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=yp(e);e!==null;){if(a=e[Nt])return a;e=yp(e)}return t}e=a,a=e.parentNode}return null}function Ol(e){if(e=e[Nt]||e[Cl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ai(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Ml(e){var t=e[Jd];return t||(t=e[Jd]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function St(e){e[Ni]=!0}var Id=new Set,Fd={};function nl(e,t){Ll(e,t),Ll(e+"Capture",t)}function Ll(e,t){for(Fd[e]=t,e=0;e<t.length;e++)Id.add(t[e])}var tv=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]*$"),Wd={},Pd={};function av(e){return wn.call(Pd,e)?!0:wn.call(Wd,e)?!1:tv.test(e)?Pd[e]=!0:(Wd[e]=!0,!1)}function Cs(e,t,a){if(av(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Ts(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 Fa(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function ra(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ef(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nv(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var r=l.get,o=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(h){a=""+h,o.call(this,h)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(h){a=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Eu(e){if(!e._valueTracker){var t=ef(e)?"checked":"value";e._valueTracker=nv(e,t,""+e[t])}}function tf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=ef(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Os(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 lv=/[\n"\\]/g;function ua(e){return e.replace(lv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ru(e,t,a,l,r,o,h,x){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+ra(t)):e.value!==""+ra(t)&&(e.value=""+ra(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?ku(e,h,ra(t)):a!=null?ku(e,h,ra(a)):l!=null&&e.removeAttribute("value"),r==null&&o!=null&&(e.defaultChecked=!!o),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+ra(x):e.removeAttribute("name")}function af(e,t,a,l,r,o,h,x){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)){Eu(e);return}a=a!=null?""+ra(a):"",t=t!=null?""+ra(t):a,x||t===e.value||(e.value=t),e.defaultValue=t}l=l??r,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=x?e.checked:!!l,e.defaultChecked=!!l,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),Eu(e)}function ku(e,t,a){t==="number"&&Os(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Dl(e,t,a,l){if(e=e.options,t){t={};for(var r=0;r<a.length;r++)t["$"+a[r]]=!0;for(a=0;a<e.length;a++)r=t.hasOwnProperty("$"+e[a].value),e[a].selected!==r&&(e[a].selected=r),r&&l&&(e[a].defaultSelected=!0)}else{for(a=""+ra(a),t=null,r=0;r<e.length;r++){if(e[r].value===a){e[r].selected=!0,l&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function nf(e,t,a){if(t!=null&&(t=""+ra(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+ra(a):""}function lf(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(u(92));if(Ie(l)){if(1<l.length)throw Error(u(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=ra(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Eu(e)}function Ul(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var iv=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 sf(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||iv.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function rf(e,t,a){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var r in t)l=t[r],t.hasOwnProperty(r)&&a[r]!==l&&sf(e,r,l)}else for(var o in t)t.hasOwnProperty(o)&&sf(e,o,t[o])}function Cu(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 sv=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"]]),rv=/^[\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 Ms(e){return rv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Wa(){}var Tu=null;function Ou(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zl=null,Bl=null;function uf(e){var t=Ol(e);if(t&&(e=t.stateNode)){var a=e[qt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ru(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="'+ua(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var r=l[qt]||null;if(!r)throw Error(u(90));Ru(l,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&tf(l)}break e;case"textarea":nf(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Dl(e,!!a.multiple,t,!1)}}}var Mu=!1;function cf(e,t,a){if(Mu)return e(t,a);Mu=!0;try{var l=e(t);return l}finally{if(Mu=!1,(zl!==null||Bl!==null)&&(br(),zl&&(t=zl,e=Bl,Bl=zl=null,uf(t),e)))for(t=0;t<e.length;t++)uf(e[t])}}function Ei(e,t){var a=e.stateNode;if(a===null)return null;var l=a[qt]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(u(231,t,typeof a));return a}var Pa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Lu=!1;if(Pa)try{var Ri={};Object.defineProperty(Ri,"passive",{get:function(){Lu=!0}}),window.addEventListener("test",Ri,Ri),window.removeEventListener("test",Ri,Ri)}catch{Lu=!1}var Nn=null,Du=null,Ls=null;function of(){if(Ls)return Ls;var e,t=Du,a=t.length,l,r="value"in Nn?Nn.value:Nn.textContent,o=r.length;for(e=0;e<a&&t[e]===r[e];e++);var h=a-e;for(l=1;l<=h&&t[a-l]===r[o-l];l++);return Ls=r.slice(e,1<l?1-l:void 0)}function Ds(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Us(){return!0}function df(){return!1}function Ht(e){function t(a,l,r,o,h){this._reactName=a,this._targetInst=r,this.type=l,this.nativeEvent=o,this.target=h,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(a=e[x],this[x]=a?a(o):o[x]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Us:df,this.isPropagationStopped=df,this}return N(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=Us)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Us)},persist:function(){},isPersistent:Us}),t}var ll={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zs=Ht(ll),ki=N({},ll,{view:0,detail:0}),uv=Ht(ki),Uu,zu,Ci,Bs=N({},ki,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qu,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!==Ci&&(Ci&&e.type==="mousemove"?(Uu=e.screenX-Ci.screenX,zu=e.screenY-Ci.screenY):zu=Uu=0,Ci=e),Uu)},movementY:function(e){return"movementY"in e?e.movementY:zu}}),ff=Ht(Bs),cv=N({},Bs,{dataTransfer:0}),ov=Ht(cv),dv=N({},ki,{relatedTarget:0}),Bu=Ht(dv),fv=N({},ll,{animationName:0,elapsedTime:0,pseudoElement:0}),hv=Ht(fv),mv=N({},ll,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),pv=Ht(mv),xv=N({},ll,{data:0}),hf=Ht(xv),yv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vv={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"},gv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=gv[e])?!!t[e]:!1}function qu(){return bv}var wv=N({},ki,{key:function(e){if(e.key){var t=yv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ds(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?vv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qu,charCode:function(e){return e.type==="keypress"?Ds(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ds(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Sv=Ht(wv),jv=N({},Bs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mf=Ht(jv),_v=N({},ki,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qu}),Nv=Ht(_v),Av=N({},ll,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ev=Ht(Av),Rv=N({},Bs,{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}),kv=Ht(Rv),Cv=N({},ll,{newState:0,oldState:0}),Tv=Ht(Cv),Ov=[9,13,27,32],Hu=Pa&&"CompositionEvent"in window,Ti=null;Pa&&"documentMode"in document&&(Ti=document.documentMode);var Mv=Pa&&"TextEvent"in window&&!Ti,pf=Pa&&(!Hu||Ti&&8<Ti&&11>=Ti),xf=" ",yf=!1;function vf(e,t){switch(e){case"keyup":return Ov.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ql=!1;function Lv(e,t){switch(e){case"compositionend":return gf(t);case"keypress":return t.which!==32?null:(yf=!0,xf);case"textInput":return e=t.data,e===xf&&yf?null:e;default:return null}}function Dv(e,t){if(ql)return e==="compositionend"||!Hu&&vf(e,t)?(e=of(),Ls=Du=Nn=null,ql=!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 pf&&t.locale!=="ko"?null:t.data;default:return null}}var Uv={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 bf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Uv[e.type]:t==="textarea"}function wf(e,t,a,l){zl?Bl?Bl.push(l):Bl=[l]:zl=l,t=Er(t,"onChange"),0<t.length&&(a=new zs("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Oi=null,Mi=null;function zv(e){np(e,0)}function qs(e){var t=Ai(e);if(tf(t))return e}function Sf(e,t){if(e==="change")return t}var jf=!1;if(Pa){var $u;if(Pa){var Vu="oninput"in document;if(!Vu){var _f=document.createElement("div");_f.setAttribute("oninput","return;"),Vu=typeof _f.oninput=="function"}$u=Vu}else $u=!1;jf=$u&&(!document.documentMode||9<document.documentMode)}function Nf(){Oi&&(Oi.detachEvent("onpropertychange",Af),Mi=Oi=null)}function Af(e){if(e.propertyName==="value"&&qs(Mi)){var t=[];wf(t,Mi,e,Ou(e)),cf(zv,t)}}function Bv(e,t,a){e==="focusin"?(Nf(),Oi=t,Mi=a,Oi.attachEvent("onpropertychange",Af)):e==="focusout"&&Nf()}function qv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qs(Mi)}function Hv(e,t){if(e==="click")return qs(t)}function $v(e,t){if(e==="input"||e==="change")return qs(t)}function Vv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var It=typeof Object.is=="function"?Object.is:Vv;function Li(e,t){if(It(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var r=a[l];if(!wn.call(t,r)||!It(e[r],t[r]))return!1}return!0}function Ef(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rf(e,t){var a=Ef(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Ef(a)}}function kf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Os(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=Os(e.document)}return t}function Yu(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 Yv=Pa&&"documentMode"in document&&11>=document.documentMode,Hl=null,Zu=null,Di=null,Gu=!1;function Tf(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Gu||Hl==null||Hl!==Os(l)||(l=Hl,"selectionStart"in l&&Yu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Di&&Li(Di,l)||(Di=l,l=Er(Zu,"onSelect"),0<l.length&&(t=new zs("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Hl)))}function il(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var $l={animationend:il("Animation","AnimationEnd"),animationiteration:il("Animation","AnimationIteration"),animationstart:il("Animation","AnimationStart"),transitionrun:il("Transition","TransitionRun"),transitionstart:il("Transition","TransitionStart"),transitioncancel:il("Transition","TransitionCancel"),transitionend:il("Transition","TransitionEnd")},Qu={},Of={};Pa&&(Of=document.createElement("div").style,"AnimationEvent"in window||(delete $l.animationend.animation,delete $l.animationiteration.animation,delete $l.animationstart.animation),"TransitionEvent"in window||delete $l.transitionend.transition);function sl(e){if(Qu[e])return Qu[e];if(!$l[e])return e;var t=$l[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Of)return Qu[e]=t[a];return e}var Mf=sl("animationend"),Lf=sl("animationiteration"),Df=sl("animationstart"),Zv=sl("transitionrun"),Gv=sl("transitionstart"),Qv=sl("transitioncancel"),Uf=sl("transitionend"),zf=new Map,Xu="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(" ");Xu.push("scrollEnd");function Aa(e,t){zf.set(e,t),nl(t,[e])}var Hs=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)},ca=[],Vl=0,Ku=0;function $s(){for(var e=Vl,t=Ku=Vl=0;t<e;){var a=ca[t];ca[t++]=null;var l=ca[t];ca[t++]=null;var r=ca[t];ca[t++]=null;var o=ca[t];if(ca[t++]=null,l!==null&&r!==null){var h=l.pending;h===null?r.next=r:(r.next=h.next,h.next=r),l.pending=r}o!==0&&Bf(a,r,o)}}function Vs(e,t,a,l){ca[Vl++]=e,ca[Vl++]=t,ca[Vl++]=a,ca[Vl++]=l,Ku|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Ju(e,t,a,l){return Vs(e,t,a,l),Ys(e)}function rl(e,t){return Vs(e,null,null,t),Ys(e)}function Bf(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var r=!1,o=e.return;o!==null;)o.childLanes|=a,l=o.alternate,l!==null&&(l.childLanes|=a),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(r=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,r&&t!==null&&(r=31-G(a),e=o.hiddenUpdates,l=e[r],l===null?e[r]=[t]:l.push(t),t.lane=a|536870912),o):null}function Ys(e){if(50<ns)throw ns=0,lo=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Yl={};function Xv(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ft(e,t,a,l){return new Xv(e,t,a,l)}function Iu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function en(e,t){var a=e.alternate;return a===null?(a=Ft(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 qf(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 Zs(e,t,a,l,r,o){var h=0;if(l=e,typeof e=="function")Iu(e)&&(h=1);else if(typeof e=="string")h=Wg(e,a,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case He:return e=Ft(31,a,t,r),e.elementType=He,e.lanes=o,e;case V:return ul(a.children,r,o,t);case D:h=8,r|=24;break;case B:return e=Ft(12,a,t,r|2),e.elementType=B,e.lanes=o,e;case J:return e=Ft(13,a,t,r),e.elementType=J,e.lanes=o,e;case Ee:return e=Ft(19,a,t,r),e.elementType=Ee,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case W:h=10;break e;case Q:h=9;break e;case oe:h=11;break e;case I:h=14;break e;case ge:h=16,l=null;break e}h=29,a=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=Ft(h,a,t,r),t.elementType=e,t.type=l,t.lanes=o,t}function ul(e,t,a,l){return e=Ft(7,e,l,t),e.lanes=a,e}function Fu(e,t,a){return e=Ft(6,e,null,t),e.lanes=a,e}function Hf(e){var t=Ft(18,null,null,0);return t.stateNode=e,t}function Wu(e,t,a){return t=Ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var $f=new WeakMap;function oa(e,t){if(typeof e=="object"&&e!==null){var a=$f.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Pn(t)},$f.set(e,t),t)}return{value:e,source:t,stack:Pn(t)}}var Zl=[],Gl=0,Gs=null,Ui=0,da=[],fa=0,An=null,Ba=1,qa="";function tn(e,t){Zl[Gl++]=Ui,Zl[Gl++]=Gs,Gs=e,Ui=t}function Vf(e,t,a){da[fa++]=Ba,da[fa++]=qa,da[fa++]=An,An=e;var l=Ba;e=qa;var r=32-G(l)-1;l&=~(1<<r),a+=1;var o=32-G(t)+r;if(30<o){var h=r-r%5;o=(l&(1<<h)-1).toString(32),l>>=h,r-=h,Ba=1<<32-G(t)+r|a<<r|l,qa=o+e}else Ba=1<<o|a<<r|l,qa=e}function Pu(e){e.return!==null&&(tn(e,1),Vf(e,1,0))}function ec(e){for(;e===Gs;)Gs=Zl[--Gl],Zl[Gl]=null,Ui=Zl[--Gl],Zl[Gl]=null;for(;e===An;)An=da[--fa],da[fa]=null,qa=da[--fa],da[fa]=null,Ba=da[--fa],da[fa]=null}function Yf(e,t){da[fa++]=Ba,da[fa++]=qa,da[fa++]=An,Ba=t.id,qa=t.overflow,An=e}var At=null,Fe=null,Te=!1,En=null,ha=!1,tc=Error(u(519));function Rn(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zi(oa(t,e)),tc}function Zf(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[Nt]=e,t[qt]=l,a){case"dialog":je("cancel",t),je("close",t);break;case"iframe":case"object":case"embed":je("load",t);break;case"video":case"audio":for(a=0;a<is.length;a++)je(is[a],t);break;case"source":je("error",t);break;case"img":case"image":case"link":je("error",t),je("load",t);break;case"details":je("toggle",t);break;case"input":je("invalid",t),af(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":je("invalid",t);break;case"textarea":je("invalid",t),lf(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||rp(t.textContent,a)?(l.popover!=null&&(je("beforetoggle",t),je("toggle",t)),l.onScroll!=null&&je("scroll",t),l.onScrollEnd!=null&&je("scrollend",t),l.onClick!=null&&(t.onclick=Wa),t=!0):t=!1,t||Rn(e,!0)}function Gf(e){for(At=e.return;At;)switch(At.tag){case 5:case 31:case 13:ha=!1;return;case 27:case 3:ha=!0;return;default:At=At.return}}function Ql(e){if(e!==At)return!1;if(!Te)return Gf(e),Te=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||bo(e.type,e.memoizedProps)),a=!a),a&&Fe&&Rn(e),Gf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Fe=xp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Fe=xp(e)}else t===27?(t=Fe,Vn(e.type)?(e=No,No=null,Fe=e):Fe=t):Fe=At?pa(e.stateNode.nextSibling):null;return!0}function cl(){Fe=At=null,Te=!1}function ac(){var e=En;return e!==null&&(Zt===null?Zt=e:Zt.push.apply(Zt,e),En=null),e}function zi(e){En===null?En=[e]:En.push(e)}var nc=j(null),ol=null,an=null;function kn(e,t,a){F(nc,t._currentValue),t._currentValue=a}function nn(e){e._currentValue=nc.current,H(nc)}function lc(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function ic(e,t,a,l){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var o=r.dependencies;if(o!==null){var h=r.child;o=o.firstContext;e:for(;o!==null;){var x=o;o=r;for(var S=0;S<t.length;S++)if(x.context===t[S]){o.lanes|=a,x=o.alternate,x!==null&&(x.lanes|=a),lc(o.return,a,e),l||(h=null);break e}o=x.next}}else if(r.tag===18){if(h=r.return,h===null)throw Error(u(341));h.lanes|=a,o=h.alternate,o!==null&&(o.lanes|=a),lc(h,a,e),h=null}else h=r.child;if(h!==null)h.return=r;else for(h=r;h!==null;){if(h===e){h=null;break}if(r=h.sibling,r!==null){r.return=h.return,h=r;break}h=h.return}r=h}}function Xl(e,t,a,l){e=null;for(var r=t,o=!1;r!==null;){if(!o){if((r.flags&524288)!==0)o=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var h=r.alternate;if(h===null)throw Error(u(387));if(h=h.memoizedProps,h!==null){var x=r.type;It(r.pendingProps.value,h.value)||(e!==null?e.push(x):e=[x])}}else if(r===he.current){if(h=r.alternate,h===null)throw Error(u(387));h.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(os):e=[os])}r=r.return}e!==null&&ic(t,e,a,l),t.flags|=262144}function Qs(e){for(e=e.firstContext;e!==null;){if(!It(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function dl(e){ol=e,an=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Et(e){return Qf(ol,e)}function Xs(e,t){return ol===null&&dl(e),Qf(e,t)}function Qf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},an===null){if(e===null)throw Error(u(308));an=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else an=an.next=t;return a}var Kv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Jv=n.unstable_scheduleCallback,Iv=n.unstable_NormalPriority,ft={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sc(){return{controller:new Kv,data:new Map,refCount:0}}function Bi(e){e.refCount--,e.refCount===0&&Jv(Iv,function(){e.controller.abort()})}var qi=null,rc=0,Kl=0,Jl=null;function Fv(e,t){if(qi===null){var a=qi=[];rc=0,Kl=oo(),Jl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return rc++,t.then(Xf,Xf),t}function Xf(){if(--rc===0&&qi!==null){Jl!==null&&(Jl.status="fulfilled");var e=qi;qi=null,Kl=0,Jl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Wv(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(r){a.push(r)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var r=0;r<a.length;r++)(0,a[r])(t)},function(r){for(l.status="rejected",l.reason=r,r=0;r<a.length;r++)(0,a[r])(void 0)}),l}var Kf=L.S;L.S=function(e,t){Tm=et(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Fv(e,t),Kf!==null&&Kf(e,t)};var fl=j(null);function uc(){var e=fl.current;return e!==null?e:Je.pooledCache}function Ks(e,t){t===null?F(fl,fl.current):F(fl,t.pool)}function Jf(){var e=uc();return e===null?null:{parent:ft._currentValue,pool:e}}var Il=Error(u(460)),cc=Error(u(474)),Js=Error(u(542)),Is={then:function(){}};function If(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ff(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Wa,Wa),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Pf(e),e;default:if(typeof t.status=="string")t.then(Wa,Wa);else{if(e=Je,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=l}},function(l){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Pf(e),e}throw ml=t,Il}}function hl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ml=a,Il):a}}var ml=null;function Wf(){if(ml===null)throw Error(u(459));var e=ml;return ml=null,e}function Pf(e){if(e===Il||e===Js)throw Error(u(483))}var Fl=null,Hi=0;function Fs(e){var t=Hi;return Hi+=1,Fl===null&&(Fl=[]),Ff(Fl,e,t)}function $i(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ws(e,t){throw t.$$typeof===U?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function eh(e){function t(A,_){if(e){var R=A.deletions;R===null?(A.deletions=[_],A.flags|=16):R.push(_)}}function a(A,_){if(!e)return null;for(;_!==null;)t(A,_),_=_.sibling;return null}function l(A){for(var _=new Map;A!==null;)A.key!==null?_.set(A.key,A):_.set(A.index,A),A=A.sibling;return _}function r(A,_){return A=en(A,_),A.index=0,A.sibling=null,A}function o(A,_,R){return A.index=R,e?(R=A.alternate,R!==null?(R=R.index,R<_?(A.flags|=67108866,_):R):(A.flags|=67108866,_)):(A.flags|=1048576,_)}function h(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function x(A,_,R,q){return _===null||_.tag!==6?(_=Fu(R,A.mode,q),_.return=A,_):(_=r(_,R),_.return=A,_)}function S(A,_,R,q){var ue=R.type;return ue===V?z(A,_,R.props.children,q,R.key):_!==null&&(_.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===ge&&hl(ue)===_.type)?(_=r(_,R.props),$i(_,R),_.return=A,_):(_=Zs(R.type,R.key,R.props,null,A.mode,q),$i(_,R),_.return=A,_)}function k(A,_,R,q){return _===null||_.tag!==4||_.stateNode.containerInfo!==R.containerInfo||_.stateNode.implementation!==R.implementation?(_=Wu(R,A.mode,q),_.return=A,_):(_=r(_,R.children||[]),_.return=A,_)}function z(A,_,R,q,ue){return _===null||_.tag!==7?(_=ul(R,A.mode,q,ue),_.return=A,_):(_=r(_,R),_.return=A,_)}function Y(A,_,R){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return _=Fu(""+_,A.mode,R),_.return=A,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case K:return R=Zs(_.type,_.key,_.props,null,A.mode,R),$i(R,_),R.return=A,R;case C:return _=Wu(_,A.mode,R),_.return=A,_;case ge:return _=hl(_),Y(A,_,R)}if(Ie(_)||Pe(_))return _=ul(_,A.mode,R,null),_.return=A,_;if(typeof _.then=="function")return Y(A,Fs(_),R);if(_.$$typeof===W)return Y(A,Xs(A,_),R);Ws(A,_)}return null}function T(A,_,R,q){var ue=_!==null?_.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return ue!==null?null:x(A,_,""+R,q);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case K:return R.key===ue?S(A,_,R,q):null;case C:return R.key===ue?k(A,_,R,q):null;case ge:return R=hl(R),T(A,_,R,q)}if(Ie(R)||Pe(R))return ue!==null?null:z(A,_,R,q,null);if(typeof R.then=="function")return T(A,_,Fs(R),q);if(R.$$typeof===W)return T(A,_,Xs(A,R),q);Ws(A,R)}return null}function M(A,_,R,q,ue){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return A=A.get(R)||null,x(_,A,""+q,ue);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case K:return A=A.get(q.key===null?R:q.key)||null,S(_,A,q,ue);case C:return A=A.get(q.key===null?R:q.key)||null,k(_,A,q,ue);case ge:return q=hl(q),M(A,_,R,q,ue)}if(Ie(q)||Pe(q))return A=A.get(R)||null,z(_,A,q,ue,null);if(typeof q.then=="function")return M(A,_,R,Fs(q),ue);if(q.$$typeof===W)return M(A,_,R,Xs(_,q),ue);Ws(_,q)}return null}function ae(A,_,R,q){for(var ue=null,Ue=null,ie=_,be=_=0,Ne=null;ie!==null&&be<R.length;be++){ie.index>be?(Ne=ie,ie=null):Ne=ie.sibling;var ze=T(A,ie,R[be],q);if(ze===null){ie===null&&(ie=Ne);break}e&&ie&&ze.alternate===null&&t(A,ie),_=o(ze,_,be),Ue===null?ue=ze:Ue.sibling=ze,Ue=ze,ie=Ne}if(be===R.length)return a(A,ie),Te&&tn(A,be),ue;if(ie===null){for(;be<R.length;be++)ie=Y(A,R[be],q),ie!==null&&(_=o(ie,_,be),Ue===null?ue=ie:Ue.sibling=ie,Ue=ie);return Te&&tn(A,be),ue}for(ie=l(ie);be<R.length;be++)Ne=M(ie,A,be,R[be],q),Ne!==null&&(e&&Ne.alternate!==null&&ie.delete(Ne.key===null?be:Ne.key),_=o(Ne,_,be),Ue===null?ue=Ne:Ue.sibling=Ne,Ue=Ne);return e&&ie.forEach(function(Xn){return t(A,Xn)}),Te&&tn(A,be),ue}function fe(A,_,R,q){if(R==null)throw Error(u(151));for(var ue=null,Ue=null,ie=_,be=_=0,Ne=null,ze=R.next();ie!==null&&!ze.done;be++,ze=R.next()){ie.index>be?(Ne=ie,ie=null):Ne=ie.sibling;var Xn=T(A,ie,ze.value,q);if(Xn===null){ie===null&&(ie=Ne);break}e&&ie&&Xn.alternate===null&&t(A,ie),_=o(Xn,_,be),Ue===null?ue=Xn:Ue.sibling=Xn,Ue=Xn,ie=Ne}if(ze.done)return a(A,ie),Te&&tn(A,be),ue;if(ie===null){for(;!ze.done;be++,ze=R.next())ze=Y(A,ze.value,q),ze!==null&&(_=o(ze,_,be),Ue===null?ue=ze:Ue.sibling=ze,Ue=ze);return Te&&tn(A,be),ue}for(ie=l(ie);!ze.done;be++,ze=R.next())ze=M(ie,A,be,ze.value,q),ze!==null&&(e&&ze.alternate!==null&&ie.delete(ze.key===null?be:ze.key),_=o(ze,_,be),Ue===null?ue=ze:Ue.sibling=ze,Ue=ze);return e&&ie.forEach(function(c0){return t(A,c0)}),Te&&tn(A,be),ue}function Xe(A,_,R,q){if(typeof R=="object"&&R!==null&&R.type===V&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case K:e:{for(var ue=R.key;_!==null;){if(_.key===ue){if(ue=R.type,ue===V){if(_.tag===7){a(A,_.sibling),q=r(_,R.props.children),q.return=A,A=q;break e}}else if(_.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===ge&&hl(ue)===_.type){a(A,_.sibling),q=r(_,R.props),$i(q,R),q.return=A,A=q;break e}a(A,_);break}else t(A,_);_=_.sibling}R.type===V?(q=ul(R.props.children,A.mode,q,R.key),q.return=A,A=q):(q=Zs(R.type,R.key,R.props,null,A.mode,q),$i(q,R),q.return=A,A=q)}return h(A);case C:e:{for(ue=R.key;_!==null;){if(_.key===ue)if(_.tag===4&&_.stateNode.containerInfo===R.containerInfo&&_.stateNode.implementation===R.implementation){a(A,_.sibling),q=r(_,R.children||[]),q.return=A,A=q;break e}else{a(A,_);break}else t(A,_);_=_.sibling}q=Wu(R,A.mode,q),q.return=A,A=q}return h(A);case ge:return R=hl(R),Xe(A,_,R,q)}if(Ie(R))return ae(A,_,R,q);if(Pe(R)){if(ue=Pe(R),typeof ue!="function")throw Error(u(150));return R=ue.call(R),fe(A,_,R,q)}if(typeof R.then=="function")return Xe(A,_,Fs(R),q);if(R.$$typeof===W)return Xe(A,_,Xs(A,R),q);Ws(A,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,_!==null&&_.tag===6?(a(A,_.sibling),q=r(_,R),q.return=A,A=q):(a(A,_),q=Fu(R,A.mode,q),q.return=A,A=q),h(A)):a(A,_)}return function(A,_,R,q){try{Hi=0;var ue=Xe(A,_,R,q);return Fl=null,ue}catch(ie){if(ie===Il||ie===Js)throw ie;var Ue=Ft(29,ie,null,A.mode);return Ue.lanes=q,Ue.return=A,Ue}finally{}}}var pl=eh(!0),th=eh(!1),Cn=!1;function oc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function dc(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 Tn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function On(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Be&2)!==0){var r=l.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),l.pending=t,t=Ys(e),Bf(e,null,a),t}return Vs(e,l,t,a),Ys(e)}function Vi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Gd(e,a)}}function fc(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var r=null,o=null;if(a=a.firstBaseUpdate,a!==null){do{var h={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};o===null?r=o=h:o=o.next=h,a=a.next}while(a!==null);o===null?r=o=t:o=o.next=t}else r=o=t;a={baseState:l.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var hc=!1;function Yi(){if(hc){var e=Jl;if(e!==null)throw e}}function Zi(e,t,a,l){hc=!1;var r=e.updateQueue;Cn=!1;var o=r.firstBaseUpdate,h=r.lastBaseUpdate,x=r.shared.pending;if(x!==null){r.shared.pending=null;var S=x,k=S.next;S.next=null,h===null?o=k:h.next=k,h=S;var z=e.alternate;z!==null&&(z=z.updateQueue,x=z.lastBaseUpdate,x!==h&&(x===null?z.firstBaseUpdate=k:x.next=k,z.lastBaseUpdate=S))}if(o!==null){var Y=r.baseState;h=0,z=k=S=null,x=o;do{var T=x.lane&-536870913,M=T!==x.lane;if(M?(_e&T)===T:(l&T)===T){T!==0&&T===Kl&&(hc=!0),z!==null&&(z=z.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var ae=e,fe=x;T=t;var Xe=a;switch(fe.tag){case 1:if(ae=fe.payload,typeof ae=="function"){Y=ae.call(Xe,Y,T);break e}Y=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=fe.payload,T=typeof ae=="function"?ae.call(Xe,Y,T):ae,T==null)break e;Y=N({},Y,T);break e;case 2:Cn=!0}}T=x.callback,T!==null&&(e.flags|=64,M&&(e.flags|=8192),M=r.callbacks,M===null?r.callbacks=[T]:M.push(T))}else M={lane:T,tag:x.tag,payload:x.payload,callback:x.callback,next:null},z===null?(k=z=M,S=Y):z=z.next=M,h|=T;if(x=x.next,x===null){if(x=r.shared.pending,x===null)break;M=x,x=M.next,M.next=null,r.lastBaseUpdate=M,r.shared.pending=null}}while(!0);z===null&&(S=Y),r.baseState=S,r.firstBaseUpdate=k,r.lastBaseUpdate=z,o===null&&(r.shared.lanes=0),zn|=h,e.lanes=h,e.memoizedState=Y}}function ah(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function nh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)ah(a[e],t)}var Wl=j(null),Ps=j(0);function lh(e,t){e=hn,F(Ps,e),F(Wl,t),hn=e|t.baseLanes}function mc(){F(Ps,hn),F(Wl,Wl.current)}function pc(){hn=Ps.current,H(Wl),H(Ps)}var Wt=j(null),ma=null;function Mn(e){var t=e.alternate;F(ct,ct.current&1),F(Wt,e),ma===null&&(t===null||Wl.current!==null||t.memoizedState!==null)&&(ma=e)}function xc(e){F(ct,ct.current),F(Wt,e),ma===null&&(ma=e)}function ih(e){e.tag===22?(F(ct,ct.current),F(Wt,e),ma===null&&(ma=e)):Ln()}function Ln(){F(ct,ct.current),F(Wt,Wt.current)}function Pt(e){H(Wt),ma===e&&(ma=null),H(ct)}var ct=j(0);function er(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||jo(a)||_o(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,ve=null,Ge=null,ht=null,tr=!1,Pl=!1,xl=!1,ar=0,Gi=0,ei=null,Pv=0;function rt(){throw Error(u(321))}function yc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!It(e[a],t[a]))return!1;return!0}function vc(e,t,a,l,r,o){return ln=o,ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?Vh:Mc,xl=!1,o=a(l,r),xl=!1,Pl&&(o=rh(t,a,l,r)),sh(e),o}function sh(e){L.H=Ki;var t=Ge!==null&&Ge.next!==null;if(ln=0,ht=Ge=ve=null,tr=!1,Gi=0,ei=null,t)throw Error(u(300));e===null||mt||(e=e.dependencies,e!==null&&Qs(e)&&(mt=!0))}function rh(e,t,a,l){ve=e;var r=0;do{if(Pl&&(ei=null),Gi=0,Pl=!1,25<=r)throw Error(u(301));if(r+=1,ht=Ge=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}L.H=Yh,o=t(a,l)}while(Pl);return o}function eg(){var e=L.H,t=e.useState()[0];return t=typeof t.then=="function"?Qi(t):t,e=e.useState()[0],(Ge!==null?Ge.memoizedState:null)!==e&&(ve.flags|=1024),t}function gc(){var e=ar!==0;return ar=0,e}function bc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function wc(e){if(tr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}tr=!1}ln=0,ht=Ge=ve=null,Pl=!1,Gi=ar=0,ei=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ht===null?ve.memoizedState=ht=e:ht=ht.next=e,ht}function ot(){if(Ge===null){var e=ve.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var t=ht===null?ve.memoizedState:ht.next;if(t!==null)ht=t,Ge=e;else{if(e===null)throw ve.alternate===null?Error(u(467)):Error(u(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},ht===null?ve.memoizedState=ht=e:ht=ht.next=e}return ht}function nr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Qi(e){var t=Gi;return Gi+=1,ei===null&&(ei=[]),e=Ff(ei,e,t),t=ve,(ht===null?t.memoizedState:ht.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?Vh:Mc),e}function lr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Qi(e);if(e.$$typeof===W)return Et(e)}throw Error(u(438,String(e)))}function Sc(e){var t=null,a=ve.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=ve.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=nr(),ve.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=yt;return t.index++,a}function sn(e,t){return typeof t=="function"?t(e):t}function ir(e){var t=ot();return jc(t,Ge,e)}function jc(e,t,a){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=a;var r=e.baseQueue,o=l.pending;if(o!==null){if(r!==null){var h=r.next;r.next=o.next,o.next=h}t.baseQueue=r=o,l.pending=null}if(o=e.baseState,r===null)e.memoizedState=o;else{t=r.next;var x=h=null,S=null,k=t,z=!1;do{var Y=k.lane&-536870913;if(Y!==k.lane?(_e&Y)===Y:(ln&Y)===Y){var T=k.revertLane;if(T===0)S!==null&&(S=S.next={lane:0,revertLane:0,gesture:null,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null}),Y===Kl&&(z=!0);else if((ln&T)===T){k=k.next,T===Kl&&(z=!0);continue}else Y={lane:0,revertLane:k.revertLane,gesture:null,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},S===null?(x=S=Y,h=o):S=S.next=Y,ve.lanes|=T,zn|=T;Y=k.action,xl&&a(o,Y),o=k.hasEagerState?k.eagerState:a(o,Y)}else T={lane:Y,revertLane:k.revertLane,gesture:k.gesture,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},S===null?(x=S=T,h=o):S=S.next=T,ve.lanes|=Y,zn|=Y;k=k.next}while(k!==null&&k!==t);if(S===null?h=o:S.next=x,!It(o,e.memoizedState)&&(mt=!0,z&&(a=Jl,a!==null)))throw a;e.memoizedState=o,e.baseState=h,e.baseQueue=S,l.lastRenderedState=o}return r===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function _c(e){var t=ot(),a=t.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=e;var l=a.dispatch,r=a.pending,o=t.memoizedState;if(r!==null){a.pending=null;var h=r=r.next;do o=e(o,h.action),h=h.next;while(h!==r);It(o,t.memoizedState)||(mt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),a.lastRenderedState=o}return[o,l]}function uh(e,t,a){var l=ve,r=ot(),o=Te;if(o){if(a===void 0)throw Error(u(407));a=a()}else a=t();var h=!It((Ge||r).memoizedState,a);if(h&&(r.memoizedState=a,mt=!0),r=r.queue,Ec(dh.bind(null,l,r,e),[e]),r.getSnapshot!==t||h||ht!==null&&ht.memoizedState.tag&1){if(l.flags|=2048,ti(9,{destroy:void 0},oh.bind(null,l,r,a,t),null),Je===null)throw Error(u(349));o||(ln&127)!==0||ch(l,t,a)}return a}function ch(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ve.updateQueue,t===null?(t=nr(),ve.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function oh(e,t,a,l){t.value=a,t.getSnapshot=l,fh(t)&&hh(e)}function dh(e,t,a){return a(function(){fh(t)&&hh(e)})}function fh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!It(e,a)}catch{return!0}}function hh(e){var t=rl(e,2);t!==null&&Gt(t,e,2)}function Nc(e){var t=Lt();if(typeof e=="function"){var a=e;if(e=a(),xl){Kt(!0);try{a()}finally{Kt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sn,lastRenderedState:e},t}function mh(e,t,a,l){return e.baseState=a,jc(e,Ge,typeof l=="function"?l:sn)}function tg(e,t,a,l,r){if(ur(e))throw Error(u(485));if(e=t.action,e!==null){var o={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){o.listeners.push(h)}};L.T!==null?a(!0):o.isTransition=!1,l(o),a=t.pending,a===null?(o.next=t.pending=o,ph(t,o)):(o.next=a.next,t.pending=a.next=o)}}function ph(e,t){var a=t.action,l=t.payload,r=e.state;if(t.isTransition){var o=L.T,h={};L.T=h;try{var x=a(r,l),S=L.S;S!==null&&S(h,x),xh(e,t,x)}catch(k){Ac(e,t,k)}finally{o!==null&&h.types!==null&&(o.types=h.types),L.T=o}}else try{o=a(r,l),xh(e,t,o)}catch(k){Ac(e,t,k)}}function xh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){yh(e,t,l)},function(l){return Ac(e,t,l)}):yh(e,t,a)}function yh(e,t,a){t.status="fulfilled",t.value=a,vh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,ph(e,a)))}function Ac(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,vh(t),t=t.next;while(t!==l)}e.action=null}function vh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function gh(e,t){return t}function bh(e,t){if(Te){var a=Je.formState;if(a!==null){e:{var l=ve;if(Te){if(Fe){t:{for(var r=Fe,o=ha;r.nodeType!==8;){if(!o){r=null;break t}if(r=pa(r.nextSibling),r===null){r=null;break t}}o=r.data,r=o==="F!"||o==="F"?r:null}if(r){Fe=pa(r.nextSibling),l=r.data==="F!";break e}}Rn(l)}l=!1}l&&(t=a[0])}}return a=Lt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gh,lastRenderedState:t},a.queue=l,a=qh.bind(null,ve,l),l.dispatch=a,l=Nc(!1),o=Oc.bind(null,ve,!1,l.queue),l=Lt(),r={state:t,dispatch:null,action:e,pending:null},l.queue=r,a=tg.bind(null,ve,r,o,a),r.dispatch=a,l.memoizedState=e,[t,a,!1]}function wh(e){var t=ot();return Sh(t,Ge,e)}function Sh(e,t,a){if(t=jc(e,t,gh)[0],e=ir(sn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Qi(t)}catch(h){throw h===Il?Js:h}else l=t;t=ot();var r=t.queue,o=r.dispatch;return a!==t.memoizedState&&(ve.flags|=2048,ti(9,{destroy:void 0},ag.bind(null,r,a),null)),[l,o,e]}function ag(e,t){e.action=t}function jh(e){var t=ot(),a=Ge;if(a!==null)return Sh(t,a,e);ot(),t=t.memoizedState,a=ot();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function ti(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=ve.updateQueue,t===null&&(t=nr(),ve.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function _h(){return ot().memoizedState}function sr(e,t,a,l){var r=Lt();ve.flags|=e,r.memoizedState=ti(1|t,{destroy:void 0},a,l===void 0?null:l)}function rr(e,t,a,l){var r=ot();l=l===void 0?null:l;var o=r.memoizedState.inst;Ge!==null&&l!==null&&yc(l,Ge.memoizedState.deps)?r.memoizedState=ti(t,o,a,l):(ve.flags|=e,r.memoizedState=ti(1|t,o,a,l))}function Nh(e,t){sr(8390656,8,e,t)}function Ec(e,t){rr(2048,8,e,t)}function ng(e){ve.flags|=4;var t=ve.updateQueue;if(t===null)t=nr(),ve.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Ah(e){var t=ot().memoizedState;return ng({ref:t,nextImpl:e}),function(){if((Be&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Eh(e,t){return rr(4,2,e,t)}function Rh(e,t){return rr(4,4,e,t)}function kh(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 Ch(e,t,a){a=a!=null?a.concat([e]):null,rr(4,4,kh.bind(null,t,e),a)}function Rc(){}function Th(e,t){var a=ot();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&yc(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function Oh(e,t){var a=ot();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&yc(t,l[1]))return l[0];if(l=e(),xl){Kt(!0);try{e()}finally{Kt(!1)}}return a.memoizedState=[l,t],l}function kc(e,t,a){return a===void 0||(ln&1073741824)!==0&&(_e&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Mm(),ve.lanes|=e,zn|=e,a)}function Mh(e,t,a,l){return It(a,t)?a:Wl.current!==null?(e=kc(e,a,l),It(e,t)||(mt=!0),e):(ln&42)===0||(ln&1073741824)!==0&&(_e&261930)===0?(mt=!0,e.memoizedState=a):(e=Mm(),ve.lanes|=e,zn|=e,t)}function Lh(e,t,a,l,r){var o=Z.p;Z.p=o!==0&&8>o?o:8;var h=L.T,x={};L.T=x,Oc(e,!1,t,a);try{var S=r(),k=L.S;if(k!==null&&k(x,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var z=Wv(S,l);Xi(e,t,z,aa(e))}else Xi(e,t,l,aa(e))}catch(Y){Xi(e,t,{then:function(){},status:"rejected",reason:Y},aa())}finally{Z.p=o,h!==null&&x.types!==null&&(h.types=x.types),L.T=h}}function lg(){}function Cc(e,t,a,l){if(e.tag!==5)throw Error(u(476));var r=Dh(e).queue;Lh(e,r,t,ce,a===null?lg:function(){return Uh(e),a(l)})}function Dh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sn,lastRenderedState:ce},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Uh(e){var t=Dh(e);t.next===null&&(t=e.alternate.memoizedState),Xi(e,t.next.queue,{},aa())}function Tc(){return Et(os)}function zh(){return ot().memoizedState}function Bh(){return ot().memoizedState}function ig(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=aa();e=Tn(a);var l=On(t,e,a);l!==null&&(Gt(l,t,a),Vi(l,t,a)),t={cache:sc()},e.payload=t;return}t=t.return}}function sg(e,t,a){var l=aa();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ur(e)?Hh(t,a):(a=Ju(e,t,a,l),a!==null&&(Gt(a,e,l),$h(a,t,l)))}function qh(e,t,a){var l=aa();Xi(e,t,a,l)}function Xi(e,t,a,l){var r={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ur(e))Hh(t,r);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var h=t.lastRenderedState,x=o(h,a);if(r.hasEagerState=!0,r.eagerState=x,It(x,h))return Vs(e,t,r,0),Je===null&&$s(),!1}catch{}finally{}if(a=Ju(e,t,r,l),a!==null)return Gt(a,e,l),$h(a,t,l),!0}return!1}function Oc(e,t,a,l){if(l={lane:2,revertLane:oo(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ur(e)){if(t)throw Error(u(479))}else t=Ju(e,a,l,2),t!==null&&Gt(t,e,2)}function ur(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function Hh(e,t){Pl=tr=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function $h(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Gd(e,a)}}var Ki={readContext:Et,use:lr,useCallback:rt,useContext:rt,useEffect:rt,useImperativeHandle:rt,useLayoutEffect:rt,useInsertionEffect:rt,useMemo:rt,useReducer:rt,useRef:rt,useState:rt,useDebugValue:rt,useDeferredValue:rt,useTransition:rt,useSyncExternalStore:rt,useId:rt,useHostTransitionStatus:rt,useFormState:rt,useActionState:rt,useOptimistic:rt,useMemoCache:rt,useCacheRefresh:rt};Ki.useEffectEvent=rt;var Vh={readContext:Et,use:lr,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:Et,useEffect:Nh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,sr(4194308,4,kh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return sr(4194308,4,e,t)},useInsertionEffect:function(e,t){sr(4,2,e,t)},useMemo:function(e,t){var a=Lt();t=t===void 0?null:t;var l=e();if(xl){Kt(!0);try{e()}finally{Kt(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Lt();if(a!==void 0){var r=a(t);if(xl){Kt(!0);try{a(t)}finally{Kt(!1)}}}else r=t;return l.memoizedState=l.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},l.queue=e,e=e.dispatch=sg.bind(null,ve,e),[l.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:function(e){e=Nc(e);var t=e.queue,a=qh.bind(null,ve,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Rc,useDeferredValue:function(e,t){var a=Lt();return kc(a,e,t)},useTransition:function(){var e=Nc(!1);return e=Lh.bind(null,ve,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=ve,r=Lt();if(Te){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),Je===null)throw Error(u(349));(_e&127)!==0||ch(l,t,a)}r.memoizedState=a;var o={value:a,getSnapshot:t};return r.queue=o,Nh(dh.bind(null,l,o,e),[e]),l.flags|=2048,ti(9,{destroy:void 0},oh.bind(null,l,o,a,t),null),a},useId:function(){var e=Lt(),t=Je.identifierPrefix;if(Te){var a=qa,l=Ba;a=(l&~(1<<32-G(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=ar++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Pv++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Tc,useFormState:bh,useActionState:bh,useOptimistic:function(e){var t=Lt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Oc.bind(null,ve,!0,a),a.dispatch=t,[e,t]},useMemoCache:Sc,useCacheRefresh:function(){return Lt().memoizedState=ig.bind(null,ve)},useEffectEvent:function(e){var t=Lt(),a={impl:e};return t.memoizedState=a,function(){if((Be&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}},Mc={readContext:Et,use:lr,useCallback:Th,useContext:Et,useEffect:Ec,useImperativeHandle:Ch,useInsertionEffect:Eh,useLayoutEffect:Rh,useMemo:Oh,useReducer:ir,useRef:_h,useState:function(){return ir(sn)},useDebugValue:Rc,useDeferredValue:function(e,t){var a=ot();return Mh(a,Ge.memoizedState,e,t)},useTransition:function(){var e=ir(sn)[0],t=ot().memoizedState;return[typeof e=="boolean"?e:Qi(e),t]},useSyncExternalStore:uh,useId:zh,useHostTransitionStatus:Tc,useFormState:wh,useActionState:wh,useOptimistic:function(e,t){var a=ot();return mh(a,Ge,e,t)},useMemoCache:Sc,useCacheRefresh:Bh};Mc.useEffectEvent=Ah;var Yh={readContext:Et,use:lr,useCallback:Th,useContext:Et,useEffect:Ec,useImperativeHandle:Ch,useInsertionEffect:Eh,useLayoutEffect:Rh,useMemo:Oh,useReducer:_c,useRef:_h,useState:function(){return _c(sn)},useDebugValue:Rc,useDeferredValue:function(e,t){var a=ot();return Ge===null?kc(a,e,t):Mh(a,Ge.memoizedState,e,t)},useTransition:function(){var e=_c(sn)[0],t=ot().memoizedState;return[typeof e=="boolean"?e:Qi(e),t]},useSyncExternalStore:uh,useId:zh,useHostTransitionStatus:Tc,useFormState:jh,useActionState:jh,useOptimistic:function(e,t){var a=ot();return Ge!==null?mh(a,Ge,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Sc,useCacheRefresh:Bh};Yh.useEffectEvent=Ah;function Lc(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:N({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Dc={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=aa(),r=Tn(l);r.payload=t,a!=null&&(r.callback=a),t=On(e,r,l),t!==null&&(Gt(t,e,l),Vi(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=aa(),r=Tn(l);r.tag=1,r.payload=t,a!=null&&(r.callback=a),t=On(e,r,l),t!==null&&(Gt(t,e,l),Vi(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=aa(),l=Tn(a);l.tag=2,t!=null&&(l.callback=t),t=On(e,l,a),t!==null&&(Gt(t,e,a),Vi(t,e,a))}};function Zh(e,t,a,l,r,o,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,o,h):t.prototype&&t.prototype.isPureReactComponent?!Li(a,l)||!Li(r,o):!0}function Gh(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Dc.enqueueReplaceState(t,t.state,null)}function yl(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=N({},a));for(var r in e)a[r]===void 0&&(a[r]=e[r])}return a}function Qh(e){Hs(e)}function Xh(e){console.error(e)}function Kh(e){Hs(e)}function cr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Jh(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Uc(e,t,a){return a=Tn(a),a.tag=3,a.payload={element:null},a.callback=function(){cr(e,t)},a}function Ih(e){return e=Tn(e),e.tag=3,e}function Fh(e,t,a,l){var r=a.type.getDerivedStateFromError;if(typeof r=="function"){var o=l.value;e.payload=function(){return r(o)},e.callback=function(){Jh(t,a,l)}}var h=a.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){Jh(t,a,l),typeof r!="function"&&(Bn===null?Bn=new Set([this]):Bn.add(this));var x=l.stack;this.componentDidCatch(l.value,{componentStack:x!==null?x:""})})}function rg(e,t,a,l,r){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Xl(t,a,r,!0),a=Wt.current,a!==null){switch(a.tag){case 31:case 13:return ma===null?wr():a.alternate===null&&ut===0&&(ut=3),a.flags&=-257,a.flags|=65536,a.lanes=r,l===Is?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),ro(e,l,r)),!1;case 22:return a.flags|=65536,l===Is?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),ro(e,l,r)),!1}throw Error(u(435,a.tag))}return ro(e,l,r),wr(),!1}if(Te)return t=Wt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,l!==tc&&(e=Error(u(422),{cause:l}),zi(oa(e,a)))):(l!==tc&&(t=Error(u(423),{cause:l}),zi(oa(t,a))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,l=oa(l,a),r=Uc(e.stateNode,l,r),fc(e,r),ut!==4&&(ut=2)),!1;var o=Error(u(520),{cause:l});if(o=oa(o,a),as===null?as=[o]:as.push(o),ut!==4&&(ut=2),t===null)return!0;l=oa(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=Uc(a.stateNode,l,e),fc(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"&&(Bn===null||!Bn.has(o))))return a.flags|=65536,r&=-r,a.lanes|=r,r=Ih(r),Fh(r,e,a,l),fc(a,r),!1}a=a.return}while(a!==null);return!1}var zc=Error(u(461)),mt=!1;function Rt(e,t,a,l){t.child=e===null?th(t,null,a,l):pl(t,e.child,a,l)}function Wh(e,t,a,l,r){a=a.render;var o=t.ref;if("ref"in l){var h={};for(var x in l)x!=="ref"&&(h[x]=l[x])}else h=l;return dl(t),l=vc(e,t,a,h,o,r),x=gc(),e!==null&&!mt?(bc(e,t,r),rn(e,t,r)):(Te&&x&&Pu(t),t.flags|=1,Rt(e,t,l,r),t.child)}function Ph(e,t,a,l,r){if(e===null){var o=a.type;return typeof o=="function"&&!Iu(o)&&o.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=o,em(e,t,o,l,r)):(e=Zs(a.type,null,l,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!Gc(e,r)){var h=o.memoizedProps;if(a=a.compare,a=a!==null?a:Li,a(h,l)&&e.ref===t.ref)return rn(e,t,r)}return t.flags|=1,e=en(o,l),e.ref=t.ref,e.return=t,t.child=e}function em(e,t,a,l,r){if(e!==null){var o=e.memoizedProps;if(Li(o,l)&&e.ref===t.ref)if(mt=!1,t.pendingProps=l=o,Gc(e,r))(e.flags&131072)!==0&&(mt=!0);else return t.lanes=e.lanes,rn(e,t,r)}return Bc(e,t,a,l,r)}function tm(e,t,a,l){var r=l.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(o=o!==null?o.baseLanes|a:a,e!==null){for(l=t.child=e.child,r=0;l!==null;)r=r|l.lanes|l.childLanes,l=l.sibling;l=r&~o}else l=0,t.child=null;return am(e,t,o,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ks(t,o!==null?o.cachePool:null),o!==null?lh(t,o):mc(),ih(t);else return l=t.lanes=536870912,am(e,t,o!==null?o.baseLanes|a:a,a,l)}else o!==null?(Ks(t,o.cachePool),lh(t,o),Ln(),t.memoizedState=null):(e!==null&&Ks(t,null),mc(),Ln());return Rt(e,t,r,a),t.child}function Ji(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function am(e,t,a,l,r){var o=uc();return o=o===null?null:{parent:ft._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&Ks(t,null),mc(),ih(t),e!==null&&Xl(e,t,l,!0),t.childLanes=r,null}function or(e,t){return t=fr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function nm(e,t,a){return pl(t,e.child,null,a),e=or(t,t.pendingProps),e.flags|=2,Pt(t),t.memoizedState=null,e}function ug(e,t,a){var l=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Te){if(l.mode==="hidden")return e=or(t,l),t.lanes=536870912,Ji(null,e);if(xc(t),(e=Fe)?(e=pp(e,ha),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:An!==null?{id:Ba,overflow:qa}:null,retryLane:536870912,hydrationErrors:null},a=Hf(e),a.return=t,t.child=a,At=t,Fe=null)):e=null,e===null)throw Rn(t);return t.lanes=536870912,null}return or(t,l)}var o=e.memoizedState;if(o!==null){var h=o.dehydrated;if(xc(t),r)if(t.flags&256)t.flags&=-257,t=nm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(mt||Xl(e,t,a,!1),r=(a&e.childLanes)!==0,mt||r){if(l=Je,l!==null&&(h=Qd(l,a),h!==0&&h!==o.retryLane))throw o.retryLane=h,rl(e,h),Gt(l,e,h),zc;wr(),t=nm(e,t,a)}else e=o.treeContext,Fe=pa(h.nextSibling),At=t,Te=!0,En=null,ha=!1,e!==null&&Yf(t,e),t=or(t,l),t.flags|=4096;return t}return e=en(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function dr(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(u(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Bc(e,t,a,l,r){return dl(t),a=vc(e,t,a,l,void 0,r),l=gc(),e!==null&&!mt?(bc(e,t,r),rn(e,t,r)):(Te&&l&&Pu(t),t.flags|=1,Rt(e,t,a,r),t.child)}function lm(e,t,a,l,r,o){return dl(t),t.updateQueue=null,a=rh(t,l,a,r),sh(e),l=gc(),e!==null&&!mt?(bc(e,t,o),rn(e,t,o)):(Te&&l&&Pu(t),t.flags|=1,Rt(e,t,a,o),t.child)}function im(e,t,a,l,r){if(dl(t),t.stateNode===null){var o=Yl,h=a.contextType;typeof h=="object"&&h!==null&&(o=Et(h)),o=new a(l,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Dc,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=l,o.state=t.memoizedState,o.refs={},oc(t),h=a.contextType,o.context=typeof h=="object"&&h!==null?Et(h):Yl,o.state=t.memoizedState,h=a.getDerivedStateFromProps,typeof h=="function"&&(Lc(t,a,h,l),o.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(h=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),h!==o.state&&Dc.enqueueReplaceState(o,o.state,null),Zi(t,l,o,r),Yi(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){o=t.stateNode;var x=t.memoizedProps,S=yl(a,x);o.props=S;var k=o.context,z=a.contextType;h=Yl,typeof z=="object"&&z!==null&&(h=Et(z));var Y=a.getDerivedStateFromProps;z=typeof Y=="function"||typeof o.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,z||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(x||k!==h)&&Gh(t,o,l,h),Cn=!1;var T=t.memoizedState;o.state=T,Zi(t,l,o,r),Yi(),k=t.memoizedState,x||T!==k||Cn?(typeof Y=="function"&&(Lc(t,a,Y,l),k=t.memoizedState),(S=Cn||Zh(t,a,S,l,T,k,h))?(z||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=l,t.memoizedState=k),o.props=l,o.state=k,o.context=h,l=S):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{o=t.stateNode,dc(e,t),h=t.memoizedProps,z=yl(a,h),o.props=z,Y=t.pendingProps,T=o.context,k=a.contextType,S=Yl,typeof k=="object"&&k!==null&&(S=Et(k)),x=a.getDerivedStateFromProps,(k=typeof x=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(h!==Y||T!==S)&&Gh(t,o,l,S),Cn=!1,T=t.memoizedState,o.state=T,Zi(t,l,o,r),Yi();var M=t.memoizedState;h!==Y||T!==M||Cn||e!==null&&e.dependencies!==null&&Qs(e.dependencies)?(typeof x=="function"&&(Lc(t,a,x,l),M=t.memoizedState),(z=Cn||Zh(t,a,z,l,T,M,S)||e!==null&&e.dependencies!==null&&Qs(e.dependencies))?(k||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(l,M,S),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(l,M,S)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=M),o.props=l,o.state=M,o.context=S,l=z):(typeof o.componentDidUpdate!="function"||h===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),l=!1)}return o=l,dr(e,t),l=(t.flags&128)!==0,o||l?(o=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&l?(t.child=pl(t,e.child,null,r),t.child=pl(t,null,a,r)):Rt(e,t,a,r),t.memoizedState=o.state,e=t.child):e=rn(e,t,r),e}function sm(e,t,a,l){return cl(),t.flags|=256,Rt(e,t,a,l),t.child}var qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Hc(e){return{baseLanes:e,cachePool:Jf()}}function $c(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=ta),e}function rm(e,t,a){var l=t.pendingProps,r=!1,o=(t.flags&128)!==0,h;if((h=o)||(h=e!==null&&e.memoizedState===null?!1:(ct.current&2)!==0),h&&(r=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(r?Mn(t):Ln(),(e=Fe)?(e=pp(e,ha),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:An!==null?{id:Ba,overflow:qa}:null,retryLane:536870912,hydrationErrors:null},a=Hf(e),a.return=t,t.child=a,At=t,Fe=null)):e=null,e===null)throw Rn(t);return _o(e)?t.lanes=32:t.lanes=536870912,null}var x=l.children;return l=l.fallback,r?(Ln(),r=t.mode,x=fr({mode:"hidden",children:x},r),l=ul(l,r,a,null),x.return=t,l.return=t,x.sibling=l,t.child=x,l=t.child,l.memoizedState=Hc(a),l.childLanes=$c(e,h,a),t.memoizedState=qc,Ji(null,l)):(Mn(t),Vc(t,x))}var S=e.memoizedState;if(S!==null&&(x=S.dehydrated,x!==null)){if(o)t.flags&256?(Mn(t),t.flags&=-257,t=Yc(e,t,a)):t.memoizedState!==null?(Ln(),t.child=e.child,t.flags|=128,t=null):(Ln(),x=l.fallback,r=t.mode,l=fr({mode:"visible",children:l.children},r),x=ul(x,r,a,null),x.flags|=2,l.return=t,x.return=t,l.sibling=x,t.child=l,pl(t,e.child,null,a),l=t.child,l.memoizedState=Hc(a),l.childLanes=$c(e,h,a),t.memoizedState=qc,t=Ji(null,l));else if(Mn(t),_o(x)){if(h=x.nextSibling&&x.nextSibling.dataset,h)var k=h.dgst;h=k,l=Error(u(419)),l.stack="",l.digest=h,zi({value:l,source:null,stack:null}),t=Yc(e,t,a)}else if(mt||Xl(e,t,a,!1),h=(a&e.childLanes)!==0,mt||h){if(h=Je,h!==null&&(l=Qd(h,a),l!==0&&l!==S.retryLane))throw S.retryLane=l,rl(e,l),Gt(h,e,l),zc;jo(x)||wr(),t=Yc(e,t,a)}else jo(x)?(t.flags|=192,t.child=e.child,t=null):(e=S.treeContext,Fe=pa(x.nextSibling),At=t,Te=!0,En=null,ha=!1,e!==null&&Yf(t,e),t=Vc(t,l.children),t.flags|=4096);return t}return r?(Ln(),x=l.fallback,r=t.mode,S=e.child,k=S.sibling,l=en(S,{mode:"hidden",children:l.children}),l.subtreeFlags=S.subtreeFlags&65011712,k!==null?x=en(k,x):(x=ul(x,r,a,null),x.flags|=2),x.return=t,l.return=t,l.sibling=x,t.child=l,Ji(null,l),l=t.child,x=e.child.memoizedState,x===null?x=Hc(a):(r=x.cachePool,r!==null?(S=ft._currentValue,r=r.parent!==S?{parent:S,pool:S}:r):r=Jf(),x={baseLanes:x.baseLanes|a,cachePool:r}),l.memoizedState=x,l.childLanes=$c(e,h,a),t.memoizedState=qc,Ji(e.child,l)):(Mn(t),a=e.child,e=a.sibling,a=en(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=a,t.memoizedState=null,a)}function Vc(e,t){return t=fr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function fr(e,t){return e=Ft(22,e,null,t),e.lanes=0,e}function Yc(e,t,a){return pl(t,e.child,null,a),e=Vc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function um(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),lc(e.return,t,a)}function Zc(e,t,a,l,r,o){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:r,treeForkCount:o}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=l,h.tail=a,h.tailMode=r,h.treeForkCount=o)}function cm(e,t,a){var l=t.pendingProps,r=l.revealOrder,o=l.tail;l=l.children;var h=ct.current,x=(h&2)!==0;if(x?(h=h&1|2,t.flags|=128):h&=1,F(ct,h),Rt(e,t,l,a),l=Te?Ui:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&um(e,a,t);else if(e.tag===19)um(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(r){case"forwards":for(a=t.child,r=null;a!==null;)e=a.alternate,e!==null&&er(e)===null&&(r=a),a=a.sibling;a=r,a===null?(r=t.child,t.child=null):(r=a.sibling,a.sibling=null),Zc(t,!1,r,a,o,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&er(e)===null){t.child=r;break}e=r.sibling,r.sibling=a,a=r,r=e}Zc(t,!0,a,null,o,l);break;case"together":Zc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function rn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),zn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Xl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,a=en(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=en(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Gc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Qs(e)))}function cg(e,t,a){switch(t.tag){case 3:Me(t,t.stateNode.containerInfo),kn(t,ft,e.memoizedState.cache),cl();break;case 27:case 5:Na(t);break;case 4:Me(t,t.stateNode.containerInfo);break;case 10:kn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,xc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Mn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?rm(e,t,a):(Mn(t),e=rn(e,t,a),e!==null?e.sibling:null);Mn(t);break;case 19:var r=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Xl(e,t,a,!1),l=(a&t.childLanes)!==0),r){if(l)return cm(e,t,a);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),F(ct,ct.current),l)break;return null;case 22:return t.lanes=0,tm(e,t,a,t.pendingProps);case 24:kn(t,ft,e.memoizedState.cache)}return rn(e,t,a)}function om(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)mt=!0;else{if(!Gc(e,a)&&(t.flags&128)===0)return mt=!1,cg(e,t,a);mt=(e.flags&131072)!==0}else mt=!1,Te&&(t.flags&1048576)!==0&&Vf(t,Ui,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=hl(t.elementType),t.type=e,typeof e=="function")Iu(e)?(l=yl(e,l),t.tag=1,t=im(null,t,e,l,a)):(t.tag=0,t=Bc(null,t,e,l,a));else{if(e!=null){var r=e.$$typeof;if(r===oe){t.tag=11,t=Wh(null,t,e,l,a);break e}else if(r===I){t.tag=14,t=Ph(null,t,e,l,a);break e}}throw t=gt(e)||e,Error(u(306,t,""))}}return t;case 0:return Bc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,r=yl(l,t.pendingProps),im(e,t,l,r,a);case 3:e:{if(Me(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var o=t.memoizedState;r=o.element,dc(e,t),Zi(t,l,null,a);var h=t.memoizedState;if(l=h.cache,kn(t,ft,l),l!==o.cache&&ic(t,[ft],a,!0),Yi(),l=h.element,o.isDehydrated)if(o={element:l,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=sm(e,t,l,a);break e}else if(l!==r){r=oa(Error(u(424)),t),zi(r),t=sm(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Fe=pa(e.firstChild),At=t,Te=!0,En=null,ha=!0,a=th(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(cl(),l===r){t=rn(e,t,a);break e}Rt(e,t,l,a)}t=t.child}return t;case 26:return dr(e,t),e===null?(a=wp(t.type,null,t.pendingProps,null))?t.memoizedState=a:Te||(a=t.type,e=t.pendingProps,l=Rr(xe.current).createElement(a),l[Nt]=t,l[qt]=e,kt(l,a,e),St(l),t.stateNode=l):t.memoizedState=wp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Na(t),e===null&&Te&&(l=t.stateNode=vp(t.type,t.pendingProps,xe.current),At=t,ha=!0,r=Fe,Vn(t.type)?(No=r,Fe=pa(l.firstChild)):Fe=r),Rt(e,t,t.pendingProps.children,a),dr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((r=l=Fe)&&(l=qg(l,t.type,t.pendingProps,ha),l!==null?(t.stateNode=l,At=t,Fe=pa(l.firstChild),ha=!1,r=!0):r=!1),r||Rn(t)),Na(t),r=t.type,o=t.pendingProps,h=e!==null?e.memoizedProps:null,l=o.children,bo(r,o)?l=null:h!==null&&bo(r,h)&&(t.flags|=32),t.memoizedState!==null&&(r=vc(e,t,eg,null,null,a),os._currentValue=r),dr(e,t),Rt(e,t,l,a),t.child;case 6:return e===null&&Te&&((e=a=Fe)&&(a=Hg(a,t.pendingProps,ha),a!==null?(t.stateNode=a,At=t,Fe=null,e=!0):e=!1),e||Rn(t)),null;case 13:return rm(e,t,a);case 4:return Me(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=pl(t,null,l,a):Rt(e,t,l,a),t.child;case 11:return Wh(e,t,t.type,t.pendingProps,a);case 7:return Rt(e,t,t.pendingProps,a),t.child;case 8:return Rt(e,t,t.pendingProps.children,a),t.child;case 12:return Rt(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,kn(t,t.type,l.value),Rt(e,t,l.children,a),t.child;case 9:return r=t.type._context,l=t.pendingProps.children,dl(t),r=Et(r),l=l(r),t.flags|=1,Rt(e,t,l,a),t.child;case 14:return Ph(e,t,t.type,t.pendingProps,a);case 15:return em(e,t,t.type,t.pendingProps,a);case 19:return cm(e,t,a);case 31:return ug(e,t,a);case 22:return tm(e,t,a,t.pendingProps);case 24:return dl(t),l=Et(ft),e===null?(r=uc(),r===null&&(r=Je,o=sc(),r.pooledCache=o,o.refCount++,o!==null&&(r.pooledCacheLanes|=a),r=o),t.memoizedState={parent:l,cache:r},oc(t),kn(t,ft,r)):((e.lanes&a)!==0&&(dc(e,t),Zi(t,null,null,a),Yi()),r=e.memoizedState,o=t.memoizedState,r.parent!==l?(r={parent:l,cache:l},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),kn(t,ft,l)):(l=o.cache,kn(t,ft,l),l!==r.cache&&ic(t,[ft],a,!0))),Rt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function un(e){e.flags|=4}function Qc(e,t,a,l,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(zm())e.flags|=8192;else throw ml=Is,cc}else e.flags&=-16777217}function dm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ap(t))if(zm())e.flags|=8192;else throw ml=Is,cc}function hr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ke():536870912,e.lanes|=t,ii|=t)}function Ii(e,t){if(!Te)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function We(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var r=e.child;r!==null;)a|=r.lanes|r.childLanes,l|=r.subtreeFlags&65011712,l|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,l|=r.subtreeFlags,l|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function og(e,t,a){var l=t.pendingProps;switch(ec(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(t),null;case 1:return We(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),nn(ft),$e(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ql(t)?un(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ac())),We(t),null;case 26:var r=t.type,o=t.memoizedState;return e===null?(un(t),o!==null?(We(t),dm(t,o)):(We(t),Qc(t,r,null,l,a))):o?o!==e.memoizedState?(un(t),We(t),dm(t,o)):(We(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&un(t),We(t),Qc(t,r,e,l,a)),null;case 27:if(zt(t),a=xe.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&un(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return We(t),null}e=ee.current,Ql(t)?Zf(t):(e=vp(r,l,a),t.stateNode=e,un(t))}return We(t),null;case 5:if(zt(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&un(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return We(t),null}if(o=ee.current,Ql(t))Zf(t);else{var h=Rr(xe.current);switch(o){case 1:o=h.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:o=h.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":o=h.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":o=h.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":o=h.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof l.is=="string"?h.createElement("select",{is:l.is}):h.createElement("select"),l.multiple?o.multiple=!0:l.size&&(o.size=l.size);break;default:o=typeof l.is=="string"?h.createElement(r,{is:l.is}):h.createElement(r)}}o[Nt]=t,o[qt]=l;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)o.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=o;e:switch(kt(o,r,l),r){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&un(t)}}return We(t),Qc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&un(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=xe.current,Ql(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,r=At,r!==null)switch(r.tag){case 27:case 5:l=r.memoizedProps}e[Nt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||rp(e.nodeValue,a)),e||Rn(t,!0)}else e=Rr(e).createTextNode(l),e[Nt]=t,t.stateNode=e}return We(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Ql(t),a!==null){if(e===null){if(!l)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[Nt]=t}else cl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),e=!1}else a=ac(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Pt(t),t):(Pt(t),null);if((t.flags&128)!==0)throw Error(u(558))}return We(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Ql(t),l!==null&&l.dehydrated!==null){if(e===null){if(!r)throw Error(u(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(u(317));r[Nt]=t}else cl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),r=!1}else r=ac(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Pt(t),t):(Pt(t),null)}return Pt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,r=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(r=l.alternate.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==r&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),hr(t,t.updateQueue),We(t),null);case 4:return $e(),e===null&&po(t.stateNode.containerInfo),We(t),null;case 10:return nn(t.type),We(t),null;case 19:if(H(ct),l=t.memoizedState,l===null)return We(t),null;if(r=(t.flags&128)!==0,o=l.rendering,o===null)if(r)Ii(l,!1);else{if(ut!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=er(e),o!==null){for(t.flags|=128,Ii(l,!1),e=o.updateQueue,t.updateQueue=e,hr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)qf(a,e),a=a.sibling;return F(ct,ct.current&1|2),Te&&tn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&et()>vr&&(t.flags|=128,r=!0,Ii(l,!1),t.lanes=4194304)}else{if(!r)if(e=er(o),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,hr(t,e),Ii(l,!0),l.tail===null&&l.tailMode==="hidden"&&!o.alternate&&!Te)return We(t),null}else 2*et()-l.renderingStartTime>vr&&a!==536870912&&(t.flags|=128,r=!0,Ii(l,!1),t.lanes=4194304);l.isBackwards?(o.sibling=t.child,t.child=o):(e=l.last,e!==null?e.sibling=o:t.child=o,l.last=o)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=et(),e.sibling=null,a=ct.current,F(ct,r?a&1|2:a&1),Te&&tn(t,l.treeForkCount),e):(We(t),null);case 22:case 23:return Pt(t),pc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),a=t.updateQueue,a!==null&&hr(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&H(fl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),nn(ft),We(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function dg(e,t){switch(ec(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return nn(ft),$e(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return zt(t),null;case 31:if(t.memoizedState!==null){if(Pt(t),t.alternate===null)throw Error(u(340));cl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Pt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));cl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(ct),null;case 4:return $e(),null;case 10:return nn(t.type),null;case 22:case 23:return Pt(t),pc(),e!==null&&H(fl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return nn(ft),null;case 25:return null;default:return null}}function fm(e,t){switch(ec(t),t.tag){case 3:nn(ft),$e();break;case 26:case 27:case 5:zt(t);break;case 4:$e();break;case 31:t.memoizedState!==null&&Pt(t);break;case 13:Pt(t);break;case 19:H(ct);break;case 10:nn(t.type);break;case 22:case 23:Pt(t),pc(),e!==null&&H(fl);break;case 24:nn(ft)}}function Fi(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var r=l.next;a=r;do{if((a.tag&e)===e){l=void 0;var o=a.create,h=a.inst;l=o(),h.destroy=l}a=a.next}while(a!==r)}}catch(x){Ye(t,t.return,x)}}function Dn(e,t,a){try{var l=t.updateQueue,r=l!==null?l.lastEffect:null;if(r!==null){var o=r.next;l=o;do{if((l.tag&e)===e){var h=l.inst,x=h.destroy;if(x!==void 0){h.destroy=void 0,r=t;var S=a,k=x;try{k()}catch(z){Ye(r,S,z)}}}l=l.next}while(l!==o)}}catch(z){Ye(t,t.return,z)}}function hm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{nh(t,a)}catch(l){Ye(e,e.return,l)}}}function mm(e,t,a){a.props=yl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Ye(e,t,l)}}function Wi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(r){Ye(e,t,r)}}function Ha(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(r){Ye(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){Ye(e,t,r)}else a.current=null}function pm(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(r){Ye(e,e.return,r)}}function Xc(e,t,a){try{var l=e.stateNode;Mg(l,e.type,a,t),l[qt]=t}catch(r){Ye(e,e.return,r)}}function xm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Vn(e.type)||e.tag===4}function Kc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Vn(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 Jc(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Wa));else if(l!==4&&(l===27&&Vn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Jc(e,t,a),e=e.sibling;e!==null;)Jc(e,t,a),e=e.sibling}function mr(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Vn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(mr(e,t,a),e=e.sibling;e!==null;)mr(e,t,a),e=e.sibling}function ym(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);kt(t,l,a),t[Nt]=e,t[qt]=a}catch(o){Ye(e,e.return,o)}}var cn=!1,pt=!1,Ic=!1,vm=typeof WeakSet=="function"?WeakSet:Set,jt=null;function fg(e,t){if(e=e.containerInfo,vo=Dr,e=Cf(e),Yu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var r=l.anchorOffset,o=l.focusNode;l=l.focusOffset;try{a.nodeType,o.nodeType}catch{a=null;break e}var h=0,x=-1,S=-1,k=0,z=0,Y=e,T=null;t:for(;;){for(var M;Y!==a||r!==0&&Y.nodeType!==3||(x=h+r),Y!==o||l!==0&&Y.nodeType!==3||(S=h+l),Y.nodeType===3&&(h+=Y.nodeValue.length),(M=Y.firstChild)!==null;)T=Y,Y=M;for(;;){if(Y===e)break t;if(T===a&&++k===r&&(x=h),T===o&&++z===l&&(S=h),(M=Y.nextSibling)!==null)break;Y=T,T=Y.parentNode}Y=M}a=x===-1||S===-1?null:{start:x,end:S}}else a=null}a=a||{start:0,end:0}}else a=null;for(go={focusedElem:e,selectionRange:a},Dr=!1,jt=t;jt!==null;)if(t=jt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,jt=e;else for(;jt!==null;){switch(t=jt,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++)r=e[a],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,a=t,r=o.memoizedProps,o=o.memoizedState,l=a.stateNode;try{var ae=yl(a.type,r);e=l.getSnapshotBeforeUpdate(ae,o),l.__reactInternalSnapshotBeforeUpdate=e}catch(fe){Ye(a,a.return,fe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)So(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":So(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,jt=e;break}jt=t.return}}function gm(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:dn(e,a),l&4&&Fi(5,a);break;case 1:if(dn(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(h){Ye(a,a.return,h)}else{var r=yl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Ye(a,a.return,h)}}l&64&&hm(a),l&512&&Wi(a,a.return);break;case 3:if(dn(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{nh(e,t)}catch(h){Ye(a,a.return,h)}}break;case 27:t===null&&l&4&&ym(a);case 26:case 5:dn(e,a),t===null&&l&4&&pm(a),l&512&&Wi(a,a.return);break;case 12:dn(e,a);break;case 31:dn(e,a),l&4&&Sm(e,a);break;case 13:dn(e,a),l&4&&jm(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=wg.bind(null,a),$g(e,a))));break;case 22:if(l=a.memoizedState!==null||cn,!l){t=t!==null&&t.memoizedState!==null||pt,r=cn;var o=pt;cn=l,(pt=t)&&!o?fn(e,a,(a.subtreeFlags&8772)!==0):dn(e,a),cn=r,pt=o}break;case 30:break;default:dn(e,a)}}function bm(e){var t=e.alternate;t!==null&&(e.alternate=null,bm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Au(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 tt=null,$t=!1;function on(e,t,a){for(a=a.child;a!==null;)wm(e,t,a),a=a.sibling}function wm(e,t,a){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(Ia,a)}catch{}switch(a.tag){case 26:pt||Ha(a,t),on(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:pt||Ha(a,t);var l=tt,r=$t;Vn(a.type)&&(tt=a.stateNode,$t=!1),on(e,t,a),rs(a.stateNode),tt=l,$t=r;break;case 5:pt||Ha(a,t);case 6:if(l=tt,r=$t,tt=null,on(e,t,a),tt=l,$t=r,tt!==null)if($t)try{(tt.nodeType===9?tt.body:tt.nodeName==="HTML"?tt.ownerDocument.body:tt).removeChild(a.stateNode)}catch(o){Ye(a,t,o)}else try{tt.removeChild(a.stateNode)}catch(o){Ye(a,t,o)}break;case 18:tt!==null&&($t?(e=tt,hp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),hi(e)):hp(tt,a.stateNode));break;case 4:l=tt,r=$t,tt=a.stateNode.containerInfo,$t=!0,on(e,t,a),tt=l,$t=r;break;case 0:case 11:case 14:case 15:Dn(2,a,t),pt||Dn(4,a,t),on(e,t,a);break;case 1:pt||(Ha(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&mm(a,t,l)),on(e,t,a);break;case 21:on(e,t,a);break;case 22:pt=(l=pt)||a.memoizedState!==null,on(e,t,a),pt=l;break;default:on(e,t,a)}}function Sm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{hi(e)}catch(a){Ye(t,t.return,a)}}}function jm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{hi(e)}catch(a){Ye(t,t.return,a)}}function hg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new vm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new vm),t;default:throw Error(u(435,e.tag))}}function pr(e,t){var a=hg(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var r=Sg.bind(null,e,l);l.then(r,r)}})}function Vt(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var r=a[l],o=e,h=t,x=h;e:for(;x!==null;){switch(x.tag){case 27:if(Vn(x.type)){tt=x.stateNode,$t=!1;break e}break;case 5:tt=x.stateNode,$t=!1;break e;case 3:case 4:tt=x.stateNode.containerInfo,$t=!0;break e}x=x.return}if(tt===null)throw Error(u(160));wm(o,h,r),tt=null,$t=!1,o=r.alternate,o!==null&&(o.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_m(t,e),t=t.sibling}var Ea=null;function _m(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Vt(t,e),Yt(e),l&4&&(Dn(3,e,e.return),Fi(3,e),Dn(5,e,e.return));break;case 1:Vt(t,e),Yt(e),l&512&&(pt||a===null||Ha(a,a.return)),l&64&&cn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var r=Ea;if(Vt(t,e),Yt(e),l&512&&(pt||a===null||Ha(a,a.return)),l&4){var o=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,r=r.ownerDocument||r;t:switch(l){case"title":o=r.getElementsByTagName("title")[0],(!o||o[Ni]||o[Nt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=r.createElement(l),r.head.insertBefore(o,r.querySelector("head > title"))),kt(o,l,a),o[Nt]=e,St(o),l=o;break e;case"link":var h=_p("link","href",r).get(l+(a.href||""));if(h){for(var x=0;x<h.length;x++)if(o=h[x],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)){h.splice(x,1);break t}}o=r.createElement(l),kt(o,l,a),r.head.appendChild(o);break;case"meta":if(h=_p("meta","content",r).get(l+(a.content||""))){for(x=0;x<h.length;x++)if(o=h[x],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)){h.splice(x,1);break t}}o=r.createElement(l),kt(o,l,a),r.head.appendChild(o);break;default:throw Error(u(468,l))}o[Nt]=e,St(o),l=o}e.stateNode=l}else Np(r,e.type,e.stateNode);else e.stateNode=jp(r,l,e.memoizedProps);else o!==l?(o===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):o.count--,l===null?Np(r,e.type,e.stateNode):jp(r,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Xc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Vt(t,e),Yt(e),l&512&&(pt||a===null||Ha(a,a.return)),a!==null&&l&4&&Xc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Vt(t,e),Yt(e),l&512&&(pt||a===null||Ha(a,a.return)),e.flags&32){r=e.stateNode;try{Ul(r,"")}catch(ae){Ye(e,e.return,ae)}}l&4&&e.stateNode!=null&&(r=e.memoizedProps,Xc(e,r,a!==null?a.memoizedProps:r)),l&1024&&(Ic=!0);break;case 6:if(Vt(t,e),Yt(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(ae){Ye(e,e.return,ae)}}break;case 3:if(Tr=null,r=Ea,Ea=kr(t.containerInfo),Vt(t,e),Ea=r,Yt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{hi(t.containerInfo)}catch(ae){Ye(e,e.return,ae)}Ic&&(Ic=!1,Nm(e));break;case 4:l=Ea,Ea=kr(e.stateNode.containerInfo),Vt(t,e),Yt(e),Ea=l;break;case 12:Vt(t,e),Yt(e);break;case 31:Vt(t,e),Yt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,pr(e,l)));break;case 13:Vt(t,e),Yt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(yr=et()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,pr(e,l)));break;case 22:r=e.memoizedState!==null;var S=a!==null&&a.memoizedState!==null,k=cn,z=pt;if(cn=k||r,pt=z||S,Vt(t,e),pt=z,cn=k,Yt(e),l&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(a===null||S||cn||pt||vl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){S=a=t;try{if(o=S.stateNode,r)h=o.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{x=S.stateNode;var Y=S.memoizedProps.style,T=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;x.style.display=T==null||typeof T=="boolean"?"":(""+T).trim()}}catch(ae){Ye(S,S.return,ae)}}}else if(t.tag===6){if(a===null){S=t;try{S.stateNode.nodeValue=r?"":S.memoizedProps}catch(ae){Ye(S,S.return,ae)}}}else if(t.tag===18){if(a===null){S=t;try{var M=S.stateNode;r?mp(M,!0):mp(S.stateNode,!1)}catch(ae){Ye(S,S.return,ae)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,pr(e,a))));break;case 19:Vt(t,e),Yt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,pr(e,l)));break;case 30:break;case 21:break;default:Vt(t,e),Yt(e)}}function Yt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(xm(l)){a=l;break}l=l.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var r=a.stateNode,o=Kc(e);mr(e,o,r);break;case 5:var h=a.stateNode;a.flags&32&&(Ul(h,""),a.flags&=-33);var x=Kc(e);mr(e,x,h);break;case 3:case 4:var S=a.stateNode.containerInfo,k=Kc(e);Jc(e,k,S);break;default:throw Error(u(161))}}catch(z){Ye(e,e.return,z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Nm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Nm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function dn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)gm(e,t.alternate,t),t=t.sibling}function vl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Dn(4,t,t.return),vl(t);break;case 1:Ha(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&mm(t,t.return,a),vl(t);break;case 27:rs(t.stateNode);case 26:case 5:Ha(t,t.return),vl(t);break;case 22:t.memoizedState===null&&vl(t);break;case 30:vl(t);break;default:vl(t)}e=e.sibling}}function fn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,r=e,o=t,h=o.flags;switch(o.tag){case 0:case 11:case 15:fn(r,o,a),Fi(4,o);break;case 1:if(fn(r,o,a),l=o,r=l.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(k){Ye(l,l.return,k)}if(l=o,r=l.updateQueue,r!==null){var x=l.stateNode;try{var S=r.shared.hiddenCallbacks;if(S!==null)for(r.shared.hiddenCallbacks=null,r=0;r<S.length;r++)ah(S[r],x)}catch(k){Ye(l,l.return,k)}}a&&h&64&&hm(o),Wi(o,o.return);break;case 27:ym(o);case 26:case 5:fn(r,o,a),a&&l===null&&h&4&&pm(o),Wi(o,o.return);break;case 12:fn(r,o,a);break;case 31:fn(r,o,a),a&&h&4&&Sm(r,o);break;case 13:fn(r,o,a),a&&h&4&&jm(r,o);break;case 22:o.memoizedState===null&&fn(r,o,a),Wi(o,o.return);break;case 30:break;default:fn(r,o,a)}t=t.sibling}}function Fc(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&&Bi(a))}function Wc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Bi(e))}function Ra(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Am(e,t,a,l),t=t.sibling}function Am(e,t,a,l){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Ra(e,t,a,l),r&2048&&Fi(9,t);break;case 1:Ra(e,t,a,l);break;case 3:Ra(e,t,a,l),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Bi(e)));break;case 12:if(r&2048){Ra(e,t,a,l),e=t.stateNode;try{var o=t.memoizedProps,h=o.id,x=o.onPostCommit;typeof x=="function"&&x(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(S){Ye(t,t.return,S)}}else Ra(e,t,a,l);break;case 31:Ra(e,t,a,l);break;case 13:Ra(e,t,a,l);break;case 23:break;case 22:o=t.stateNode,h=t.alternate,t.memoizedState!==null?o._visibility&2?Ra(e,t,a,l):Pi(e,t):o._visibility&2?Ra(e,t,a,l):(o._visibility|=2,ai(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Fc(h,t);break;case 24:Ra(e,t,a,l),r&2048&&Wc(t.alternate,t);break;default:Ra(e,t,a,l)}}function ai(e,t,a,l,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,h=t,x=a,S=l,k=h.flags;switch(h.tag){case 0:case 11:case 15:ai(o,h,x,S,r),Fi(8,h);break;case 23:break;case 22:var z=h.stateNode;h.memoizedState!==null?z._visibility&2?ai(o,h,x,S,r):Pi(o,h):(z._visibility|=2,ai(o,h,x,S,r)),r&&k&2048&&Fc(h.alternate,h);break;case 24:ai(o,h,x,S,r),r&&k&2048&&Wc(h.alternate,h);break;default:ai(o,h,x,S,r)}t=t.sibling}}function Pi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,r=l.flags;switch(l.tag){case 22:Pi(a,l),r&2048&&Fc(l.alternate,l);break;case 24:Pi(a,l),r&2048&&Wc(l.alternate,l);break;default:Pi(a,l)}t=t.sibling}}var es=8192;function ni(e,t,a){if(e.subtreeFlags&es)for(e=e.child;e!==null;)Em(e,t,a),e=e.sibling}function Em(e,t,a){switch(e.tag){case 26:ni(e,t,a),e.flags&es&&e.memoizedState!==null&&Pg(a,Ea,e.memoizedState,e.memoizedProps);break;case 5:ni(e,t,a);break;case 3:case 4:var l=Ea;Ea=kr(e.stateNode.containerInfo),ni(e,t,a),Ea=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=es,es=16777216,ni(e,t,a),es=l):ni(e,t,a));break;default:ni(e,t,a)}}function Rm(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 ts(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];jt=l,Cm(l,e)}Rm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)km(e),e=e.sibling}function km(e){switch(e.tag){case 0:case 11:case 15:ts(e),e.flags&2048&&Dn(9,e,e.return);break;case 3:ts(e);break;case 12:ts(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,xr(e)):ts(e);break;default:ts(e)}}function xr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];jt=l,Cm(l,e)}Rm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Dn(8,t,t.return),xr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,xr(t));break;default:xr(t)}e=e.sibling}}function Cm(e,t){for(;jt!==null;){var a=jt;switch(a.tag){case 0:case 11:case 15:Dn(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Bi(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,jt=l;else e:for(a=e;jt!==null;){l=jt;var r=l.sibling,o=l.return;if(bm(l),l===a){jt=null;break e}if(r!==null){r.return=o,jt=r;break e}jt=o}}}var mg={getCacheForType:function(e){var t=Et(ft),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Et(ft).controller.signal}},pg=typeof WeakMap=="function"?WeakMap:Map,Be=0,Je=null,Se=null,_e=0,Ve=0,ea=null,Un=!1,li=!1,Pc=!1,hn=0,ut=0,zn=0,gl=0,eo=0,ta=0,ii=0,as=null,Zt=null,to=!1,yr=0,Tm=0,vr=1/0,gr=null,Bn=null,vt=0,qn=null,si=null,mn=0,ao=0,no=null,Om=null,ns=0,lo=null;function aa(){return(Be&2)!==0&&_e!==0?_e&-_e:L.T!==null?oo():Xd()}function Mm(){if(ta===0)if((_e&536870912)===0||Te){var e=Mt;Mt<<=1,(Mt&3932160)===0&&(Mt=262144),ta=e}else ta=536870912;return e=Wt.current,e!==null&&(e.flags|=32),ta}function Gt(e,t,a){(e===Je&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)&&(ri(e,0),Hn(e,_e,ta,!1)),_i(e,a),((Be&2)===0||e!==Je)&&(e===Je&&((Be&2)===0&&(gl|=a),ut===4&&Hn(e,_e,ta,!1)),$a(e))}function Lm(e,t,a){if((Be&6)!==0)throw Error(u(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||O(e,t),r=l?vg(e,t):so(e,t,!0),o=l;do{if(r===0){li&&!l&&Hn(e,t,0,!1);break}else{if(a=e.current.alternate,o&&!xg(a)){r=so(e,t,!1),o=!1;continue}if(r===2){if(o=t,e.errorRecoveryDisabledLanes&o)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var x=e;r=as;var S=x.current.memoizedState.isDehydrated;if(S&&(ri(x,h).flags|=256),h=so(x,h,!1),h!==2){if(Pc&&!S){x.errorRecoveryDisabledLanes|=o,gl|=o,r=4;break e}o=Zt,Zt=r,o!==null&&(Zt===null?Zt=o:Zt.push.apply(Zt,o))}r=h}if(o=!1,r!==2)continue}}if(r===1){ri(e,0),Hn(e,t,0,!0);break}e:{switch(l=e,o=r,o){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:Hn(l,t,ta,!Un);break e;case 2:Zt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(r=yr+300-et(),10<r)){if(Hn(l,t,ta,!Un),kl(l,0,!0)!==0)break e;mn=t,l.timeoutHandle=dp(Dm.bind(null,l,a,Zt,gr,to,t,ta,gl,ii,Un,o,"Throttled",-0,0),r);break e}Dm(l,a,Zt,gr,to,t,ta,gl,ii,Un,o,null,-0,0)}}break}while(!0);$a(e)}function Dm(e,t,a,l,r,o,h,x,S,k,z,Y,T,M){if(e.timeoutHandle=-1,Y=t.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Wa},Em(t,o,Y);var ae=(o&62914560)===o?yr-et():(o&4194048)===o?Tm-et():0;if(ae=e0(Y,ae),ae!==null){mn=o,e.cancelPendingCommit=ae(Ym.bind(null,e,t,o,a,l,r,h,x,S,z,Y,null,T,M)),Hn(e,o,h,!k);return}}Ym(e,t,o,a,l,r,h,x,S)}function xg(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var r=a[l],o=r.getSnapshot;r=r.value;try{if(!It(o(),r))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 Hn(e,t,a,l){t&=~eo,t&=~gl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var r=t;0<r;){var o=31-G(r),h=1<<o;l[o]=-1,r&=~h}a!==0&&Zd(e,a,t)}function br(){return(Be&6)===0?(ls(0),!1):!0}function io(){if(Se!==null){if(Ve===0)var e=Se.return;else e=Se,an=ol=null,wc(e),Fl=null,Hi=0,e=Se;for(;e!==null;)fm(e.alternate,e),e=e.return;Se=null}}function ri(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Ug(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),mn=0,io(),Je=e,Se=a=en(e.current,null),_e=t,Ve=0,ea=null,Un=!1,li=O(e,t),Pc=!1,ii=ta=eo=gl=zn=ut=0,Zt=as=null,to=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var r=31-G(l),o=1<<r;t|=e[r],l&=~o}return hn=t,$s(),a}function Um(e,t){ve=null,L.H=Ki,t===Il||t===Js?(t=Wf(),Ve=3):t===cc?(t=Wf(),Ve=4):Ve=t===zc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ea=t,Se===null&&(ut=1,cr(e,oa(t,e.current)))}function zm(){var e=Wt.current;return e===null?!0:(_e&4194048)===_e?ma===null:(_e&62914560)===_e||(_e&536870912)!==0?e===ma:!1}function Bm(){var e=L.H;return L.H=Ki,e===null?Ki:e}function qm(){var e=L.A;return L.A=mg,e}function wr(){ut=4,Un||(_e&4194048)!==_e&&Wt.current!==null||(li=!0),(zn&134217727)===0&&(gl&134217727)===0||Je===null||Hn(Je,_e,ta,!1)}function so(e,t,a){var l=Be;Be|=2;var r=Bm(),o=qm();(Je!==e||_e!==t)&&(gr=null,ri(e,t)),t=!1;var h=ut;e:do try{if(Ve!==0&&Se!==null){var x=Se,S=ea;switch(Ve){case 8:io(),h=6;break e;case 3:case 2:case 9:case 6:Wt.current===null&&(t=!0);var k=Ve;if(Ve=0,ea=null,ui(e,x,S,k),a&&li){h=0;break e}break;default:k=Ve,Ve=0,ea=null,ui(e,x,S,k)}}yg(),h=ut;break}catch(z){Um(e,z)}while(!0);return t&&e.shellSuspendCounter++,an=ol=null,Be=l,L.H=r,L.A=o,Se===null&&(Je=null,_e=0,$s()),h}function yg(){for(;Se!==null;)Hm(Se)}function vg(e,t){var a=Be;Be|=2;var l=Bm(),r=qm();Je!==e||_e!==t?(gr=null,vr=et()+500,ri(e,t)):li=O(e,t);e:do try{if(Ve!==0&&Se!==null){t=Se;var o=ea;t:switch(Ve){case 1:Ve=0,ea=null,ui(e,t,o,1);break;case 2:case 9:if(If(o)){Ve=0,ea=null,$m(t);break}t=function(){Ve!==2&&Ve!==9||Je!==e||(Ve=7),$a(e)},o.then(t,t);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:If(o)?(Ve=0,ea=null,$m(t)):(Ve=0,ea=null,ui(e,t,o,7));break;case 5:var h=null;switch(Se.tag){case 26:h=Se.memoizedState;case 5:case 27:var x=Se;if(h?Ap(h):x.stateNode.complete){Ve=0,ea=null;var S=x.sibling;if(S!==null)Se=S;else{var k=x.return;k!==null?(Se=k,Sr(k)):Se=null}break t}}Ve=0,ea=null,ui(e,t,o,5);break;case 6:Ve=0,ea=null,ui(e,t,o,6);break;case 8:io(),ut=6;break e;default:throw Error(u(462))}}gg();break}catch(z){Um(e,z)}while(!0);return an=ol=null,L.H=l,L.A=r,Be=a,Se!==null?0:(Je=null,_e=0,$s(),ut)}function gg(){for(;Se!==null&&!Ka();)Hm(Se)}function Hm(e){var t=om(e.alternate,e,hn);e.memoizedProps=e.pendingProps,t===null?Sr(e):Se=t}function $m(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=lm(a,t,t.pendingProps,t.type,void 0,_e);break;case 11:t=lm(a,t,t.pendingProps,t.type.render,t.ref,_e);break;case 5:wc(t);default:fm(a,t),t=Se=qf(t,hn),t=om(a,t,hn)}e.memoizedProps=e.pendingProps,t===null?Sr(e):Se=t}function ui(e,t,a,l){an=ol=null,wc(t),Fl=null,Hi=0;var r=t.return;try{if(rg(e,r,t,a,_e)){ut=1,cr(e,oa(a,e.current)),Se=null;return}}catch(o){if(r!==null)throw Se=r,o;ut=1,cr(e,oa(a,e.current)),Se=null;return}t.flags&32768?(Te||l===1?e=!0:li||(_e&536870912)!==0?e=!1:(Un=e=!0,(l===2||l===9||l===3||l===6)&&(l=Wt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Vm(t,e)):Sr(t)}function Sr(e){var t=e;do{if((t.flags&32768)!==0){Vm(t,Un);return}e=t.return;var a=og(t.alternate,t,hn);if(a!==null){Se=a;return}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);ut===0&&(ut=5)}function Vm(e,t){do{var a=dg(e.alternate,e);if(a!==null){a.flags&=32767,Se=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Se=e;return}Se=e=a}while(e!==null);ut=6,Se=null}function Ym(e,t,a,l,r,o,h,x,S){e.cancelPendingCommit=null;do jr();while(vt!==0);if((Be&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(o=t.lanes|t.childLanes,o|=Ku,Wy(e,a,o,h,x,S),e===Je&&(Se=Je=null,_e=0),si=t,qn=e,mn=a,ao=o,no=r,Om=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,jg(Ja,function(){return Km(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=L.T,L.T=null,r=Z.p,Z.p=2,h=Be,Be|=4;try{fg(e,t,a)}finally{Be=h,Z.p=r,L.T=l}}vt=1,Zm(),Gm(),Qm()}}function Zm(){if(vt===1){vt=0;var e=qn,t=si,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=L.T,L.T=null;var l=Z.p;Z.p=2;var r=Be;Be|=4;try{_m(t,e);var o=go,h=Cf(e.containerInfo),x=o.focusedElem,S=o.selectionRange;if(h!==x&&x&&x.ownerDocument&&kf(x.ownerDocument.documentElement,x)){if(S!==null&&Yu(x)){var k=S.start,z=S.end;if(z===void 0&&(z=k),"selectionStart"in x)x.selectionStart=k,x.selectionEnd=Math.min(z,x.value.length);else{var Y=x.ownerDocument||document,T=Y&&Y.defaultView||window;if(T.getSelection){var M=T.getSelection(),ae=x.textContent.length,fe=Math.min(S.start,ae),Xe=S.end===void 0?fe:Math.min(S.end,ae);!M.extend&&fe>Xe&&(h=Xe,Xe=fe,fe=h);var A=Rf(x,fe),_=Rf(x,Xe);if(A&&_&&(M.rangeCount!==1||M.anchorNode!==A.node||M.anchorOffset!==A.offset||M.focusNode!==_.node||M.focusOffset!==_.offset)){var R=Y.createRange();R.setStart(A.node,A.offset),M.removeAllRanges(),fe>Xe?(M.addRange(R),M.extend(_.node,_.offset)):(R.setEnd(_.node,_.offset),M.addRange(R))}}}}for(Y=[],M=x;M=M.parentNode;)M.nodeType===1&&Y.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<Y.length;x++){var q=Y[x];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}Dr=!!vo,go=vo=null}finally{Be=r,Z.p=l,L.T=a}}e.current=t,vt=2}}function Gm(){if(vt===2){vt=0;var e=qn,t=si,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=L.T,L.T=null;var l=Z.p;Z.p=2;var r=Be;Be|=4;try{gm(e,t.alternate,t)}finally{Be=r,Z.p=l,L.T=a}}vt=3}}function Qm(){if(vt===4||vt===3){vt=0,Sn();var e=qn,t=si,a=mn,l=Om;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?vt=5:(vt=0,si=qn=null,Xm(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Bn=null),_u(a),t=t.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(Ia,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=L.T,r=Z.p,Z.p=2,L.T=null;try{for(var o=e.onRecoverableError,h=0;h<l.length;h++){var x=l[h];o(x.value,{componentStack:x.stack})}}finally{L.T=t,Z.p=r}}(mn&3)!==0&&jr(),$a(e),r=e.pendingLanes,(a&261930)!==0&&(r&42)!==0?e===lo?ns++:(ns=0,lo=e):ns=0,ls(0)}}function Xm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Bi(t)))}function jr(){return Zm(),Gm(),Qm(),Km()}function Km(){if(vt!==5)return!1;var e=qn,t=ao;ao=0;var a=_u(mn),l=L.T,r=Z.p;try{Z.p=32>a?32:a,L.T=null,a=no,no=null;var o=qn,h=mn;if(vt=0,si=qn=null,mn=0,(Be&6)!==0)throw Error(u(331));var x=Be;if(Be|=4,km(o.current),Am(o,o.current,h,a),Be=x,ls(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(Ia,o)}catch{}return!0}finally{Z.p=r,L.T=l,Xm(e,t)}}function Jm(e,t,a){t=oa(a,t),t=Uc(e.stateNode,t,2),e=On(e,t,2),e!==null&&(_i(e,2),$a(e))}function Ye(e,t,a){if(e.tag===3)Jm(e,e,a);else for(;t!==null;){if(t.tag===3){Jm(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Bn===null||!Bn.has(l))){e=oa(a,e),a=Ih(2),l=On(t,a,2),l!==null&&(Fh(a,l,t,e),_i(l,2),$a(l));break}}t=t.return}}function ro(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new pg;var r=new Set;l.set(t,r)}else r=l.get(t),r===void 0&&(r=new Set,l.set(t,r));r.has(a)||(Pc=!0,r.add(a),e=bg.bind(null,e,t,a),t.then(e,e))}function bg(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Je===e&&(_e&a)===a&&(ut===4||ut===3&&(_e&62914560)===_e&&300>et()-yr?(Be&2)===0&&ri(e,0):eo|=a,ii===_e&&(ii=0)),$a(e)}function Im(e,t){t===0&&(t=Ke()),e=rl(e,t),e!==null&&(_i(e,t),$a(e))}function wg(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Im(e,a)}function Sg(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),Im(e,a)}function jg(e,t){return Ua(e,t)}var _r=null,ci=null,uo=!1,Nr=!1,co=!1,$n=0;function $a(e){e!==ci&&e.next===null&&(ci===null?_r=ci=e:ci=ci.next=e),Nr=!0,uo||(uo=!0,Ng())}function ls(e,t){if(!co&&Nr){co=!0;do for(var a=!1,l=_r;l!==null;){if(e!==0){var r=l.pendingLanes;if(r===0)var o=0;else{var h=l.suspendedLanes,x=l.pingedLanes;o=(1<<31-G(42|e)+1)-1,o&=r&~(h&~x),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(a=!0,ep(l,o))}else o=_e,o=kl(l,l===Je?o:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(o&3)===0||O(l,o)||(a=!0,ep(l,o));l=l.next}while(a);co=!1}}function _g(){Fm()}function Fm(){Nr=uo=!1;var e=0;$n!==0&&Dg()&&(e=$n);for(var t=et(),a=null,l=_r;l!==null;){var r=l.next,o=Wm(l,t);o===0?(l.next=null,a===null?_r=r:a.next=r,r===null&&(ci=a)):(a=l,(e!==0||(o&3)!==0)&&(Nr=!0)),l=r}vt!==0&&vt!==5||ls(e),$n!==0&&($n=0)}function Wm(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var h=31-G(o),x=1<<h,S=r[h];S===-1?((x&a)===0||(x&l)!==0)&&(r[h]=re(x,t)):S<=t&&(e.expiredLanes|=x),o&=~x}if(t=Je,a=_e,a=kl(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Ot(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||O(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&Ot(l),_u(a)){case 2:case 8:a=tl;break;case 32:a=Ja;break;case 268435456:a=wt;break;default:a=Ja}return l=Pm.bind(null,e),a=Ua(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&Ot(l),e.callbackPriority=2,e.callbackNode=null,2}function Pm(e,t){if(vt!==0&&vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(jr()&&e.callbackNode!==a)return null;var l=_e;return l=kl(e,e===Je?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Lm(e,l,t),Wm(e,et()),e.callbackNode!=null&&e.callbackNode===a?Pm.bind(null,e):null)}function ep(e,t){if(jr())return null;Lm(e,t,!0)}function Ng(){zg(function(){(Be&6)!==0?Ua(el,_g):Fm()})}function oo(){if($n===0){var e=Kl;e===0&&(e=jn,jn<<=1,(jn&261888)===0&&(jn=256)),$n=e}return $n}function tp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ms(""+e)}function ap(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 Ag(e,t,a,l,r){if(t==="submit"&&a&&a.stateNode===r){var o=tp((r[qt]||null).action),h=l.submitter;h&&(t=(t=h[qt]||null)?tp(t.formAction):h.getAttribute("formAction"),t!==null&&(o=t,h=null));var x=new zs("action","action",null,l,r);e.push({event:x,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if($n!==0){var S=h?ap(r,h):new FormData(r);Cc(a,{pending:!0,data:S,method:r.method,action:o},null,S)}}else typeof o=="function"&&(x.preventDefault(),S=h?ap(r,h):new FormData(r),Cc(a,{pending:!0,data:S,method:r.method,action:o},o,S))},currentTarget:r}]})}}for(var fo=0;fo<Xu.length;fo++){var ho=Xu[fo],Eg=ho.toLowerCase(),Rg=ho[0].toUpperCase()+ho.slice(1);Aa(Eg,"on"+Rg)}Aa(Mf,"onAnimationEnd"),Aa(Lf,"onAnimationIteration"),Aa(Df,"onAnimationStart"),Aa("dblclick","onDoubleClick"),Aa("focusin","onFocus"),Aa("focusout","onBlur"),Aa(Zv,"onTransitionRun"),Aa(Gv,"onTransitionStart"),Aa(Qv,"onTransitionCancel"),Aa(Uf,"onTransitionEnd"),Ll("onMouseEnter",["mouseout","mouseover"]),Ll("onMouseLeave",["mouseout","mouseover"]),Ll("onPointerEnter",["pointerout","pointerover"]),Ll("onPointerLeave",["pointerout","pointerover"]),nl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),nl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),nl("onBeforeInput",["compositionend","keypress","textInput","paste"]),nl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),nl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),nl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var is="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(" "),kg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(is));function np(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],r=l.event;l=l.listeners;e:{var o=void 0;if(t)for(var h=l.length-1;0<=h;h--){var x=l[h],S=x.instance,k=x.currentTarget;if(x=x.listener,S!==o&&r.isPropagationStopped())break e;o=x,r.currentTarget=k;try{o(r)}catch(z){Hs(z)}r.currentTarget=null,o=S}else for(h=0;h<l.length;h++){if(x=l[h],S=x.instance,k=x.currentTarget,x=x.listener,S!==o&&r.isPropagationStopped())break e;o=x,r.currentTarget=k;try{o(r)}catch(z){Hs(z)}r.currentTarget=null,o=S}}}}function je(e,t){var a=t[Nu];a===void 0&&(a=t[Nu]=new Set);var l=e+"__bubble";a.has(l)||(lp(t,e,2,!1),a.add(l))}function mo(e,t,a){var l=0;t&&(l|=4),lp(a,e,l,t)}var Ar="_reactListening"+Math.random().toString(36).slice(2);function po(e){if(!e[Ar]){e[Ar]=!0,Id.forEach(function(a){a!=="selectionchange"&&(kg.has(a)||mo(a,!1,e),mo(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ar]||(t[Ar]=!0,mo("selectionchange",!1,t))}}function lp(e,t,a,l){switch(Mp(t)){case 2:var r=n0;break;case 8:r=l0;break;default:r=Co}a=r.bind(null,t,a,e),r=void 0,!Lu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),l?r!==void 0?e.addEventListener(t,a,{capture:!0,passive:r}):e.addEventListener(t,a,!0):r!==void 0?e.addEventListener(t,a,{passive:r}):e.addEventListener(t,a,!1)}function xo(e,t,a,l,r){var o=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var h=l.tag;if(h===3||h===4){var x=l.stateNode.containerInfo;if(x===r)break;if(h===4)for(h=l.return;h!==null;){var S=h.tag;if((S===3||S===4)&&h.stateNode.containerInfo===r)return;h=h.return}for(;x!==null;){if(h=Tl(x),h===null)return;if(S=h.tag,S===5||S===6||S===26||S===27){l=o=h;continue e}x=x.parentNode}}l=l.return}cf(function(){var k=o,z=Ou(a),Y=[];e:{var T=zf.get(e);if(T!==void 0){var M=zs,ae=e;switch(e){case"keypress":if(Ds(a)===0)break e;case"keydown":case"keyup":M=Sv;break;case"focusin":ae="focus",M=Bu;break;case"focusout":ae="blur",M=Bu;break;case"beforeblur":case"afterblur":M=Bu;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":M=ff;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=ov;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=Nv;break;case Mf:case Lf:case Df:M=hv;break;case Uf:M=Ev;break;case"scroll":case"scrollend":M=uv;break;case"wheel":M=kv;break;case"copy":case"cut":case"paste":M=pv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=mf;break;case"toggle":case"beforetoggle":M=Tv}var fe=(t&4)!==0,Xe=!fe&&(e==="scroll"||e==="scrollend"),A=fe?T!==null?T+"Capture":null:T;fe=[];for(var _=k,R;_!==null;){var q=_;if(R=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||R===null||A===null||(q=Ei(_,A),q!=null&&fe.push(ss(_,q,R))),Xe)break;_=_.return}0<fe.length&&(T=new M(T,ae,null,a,z),Y.push({event:T,listeners:fe}))}}if((t&7)===0){e:{if(T=e==="mouseover"||e==="pointerover",M=e==="mouseout"||e==="pointerout",T&&a!==Tu&&(ae=a.relatedTarget||a.fromElement)&&(Tl(ae)||ae[Cl]))break e;if((M||T)&&(T=z.window===z?z:(T=z.ownerDocument)?T.defaultView||T.parentWindow:window,M?(ae=a.relatedTarget||a.toElement,M=k,ae=ae?Tl(ae):null,ae!==null&&(Xe=f(ae),fe=ae.tag,ae!==Xe||fe!==5&&fe!==27&&fe!==6)&&(ae=null)):(M=null,ae=k),M!==ae)){if(fe=ff,q="onMouseLeave",A="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(fe=mf,q="onPointerLeave",A="onPointerEnter",_="pointer"),Xe=M==null?T:Ai(M),R=ae==null?T:Ai(ae),T=new fe(q,_+"leave",M,a,z),T.target=Xe,T.relatedTarget=R,q=null,Tl(z)===k&&(fe=new fe(A,_+"enter",ae,a,z),fe.target=R,fe.relatedTarget=Xe,q=fe),Xe=q,M&&ae)t:{for(fe=Cg,A=M,_=ae,R=0,q=A;q;q=fe(q))R++;q=0;for(var ue=_;ue;ue=fe(ue))q++;for(;0<R-q;)A=fe(A),R--;for(;0<q-R;)_=fe(_),q--;for(;R--;){if(A===_||_!==null&&A===_.alternate){fe=A;break t}A=fe(A),_=fe(_)}fe=null}else fe=null;M!==null&&ip(Y,T,M,fe,!1),ae!==null&&Xe!==null&&ip(Y,Xe,ae,fe,!0)}}e:{if(T=k?Ai(k):window,M=T.nodeName&&T.nodeName.toLowerCase(),M==="select"||M==="input"&&T.type==="file")var Ue=Sf;else if(bf(T))if(jf)Ue=$v;else{Ue=qv;var ie=Bv}else M=T.nodeName,!M||M.toLowerCase()!=="input"||T.type!=="checkbox"&&T.type!=="radio"?k&&Cu(k.elementType)&&(Ue=Sf):Ue=Hv;if(Ue&&(Ue=Ue(e,k))){wf(Y,Ue,a,z);break e}ie&&ie(e,T,k),e==="focusout"&&k&&T.type==="number"&&k.memoizedProps.value!=null&&ku(T,"number",T.value)}switch(ie=k?Ai(k):window,e){case"focusin":(bf(ie)||ie.contentEditable==="true")&&(Hl=ie,Zu=k,Di=null);break;case"focusout":Di=Zu=Hl=null;break;case"mousedown":Gu=!0;break;case"contextmenu":case"mouseup":case"dragend":Gu=!1,Tf(Y,a,z);break;case"selectionchange":if(Yv)break;case"keydown":case"keyup":Tf(Y,a,z)}var be;if(Hu)e:{switch(e){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else ql?vf(e,a)&&(Ne="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ne="onCompositionStart");Ne&&(pf&&a.locale!=="ko"&&(ql||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&ql&&(be=of()):(Nn=z,Du="value"in Nn?Nn.value:Nn.textContent,ql=!0)),ie=Er(k,Ne),0<ie.length&&(Ne=new hf(Ne,e,null,a,z),Y.push({event:Ne,listeners:ie}),be?Ne.data=be:(be=gf(a),be!==null&&(Ne.data=be)))),(be=Mv?Lv(e,a):Dv(e,a))&&(Ne=Er(k,"onBeforeInput"),0<Ne.length&&(ie=new hf("onBeforeInput","beforeinput",null,a,z),Y.push({event:ie,listeners:Ne}),ie.data=be)),Ag(Y,e,k,a,z)}np(Y,t)})}function ss(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Er(e,t){for(var a=t+"Capture",l=[];e!==null;){var r=e,o=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||o===null||(r=Ei(e,a),r!=null&&l.unshift(ss(e,r,o)),r=Ei(e,t),r!=null&&l.push(ss(e,r,o))),e.tag===3)return l;e=e.return}return[]}function Cg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ip(e,t,a,l,r){for(var o=t._reactName,h=[];a!==null&&a!==l;){var x=a,S=x.alternate,k=x.stateNode;if(x=x.tag,S!==null&&S===l)break;x!==5&&x!==26&&x!==27||k===null||(S=k,r?(k=Ei(a,o),k!=null&&h.unshift(ss(a,k,S))):r||(k=Ei(a,o),k!=null&&h.push(ss(a,k,S)))),a=a.return}h.length!==0&&e.push({event:t,listeners:h})}var Tg=/\r\n?/g,Og=/\u0000|\uFFFD/g;function sp(e){return(typeof e=="string"?e:""+e).replace(Tg,`
49
+ `).replace(Og,"")}function rp(e,t){return t=sp(t),sp(e)===t}function Qe(e,t,a,l,r,o){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Ul(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Ul(e,""+l);break;case"className":Ts(e,"class",l);break;case"tabIndex":Ts(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ts(e,a,l);break;case"style":rf(e,l,o);break;case"data":if(t!=="object"){Ts(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Ms(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof o=="function"&&(a==="formAction"?(t!=="input"&&Qe(e,t,"name",r.name,r,null),Qe(e,t,"formEncType",r.formEncType,r,null),Qe(e,t,"formMethod",r.formMethod,r,null),Qe(e,t,"formTarget",r.formTarget,r,null)):(Qe(e,t,"encType",r.encType,r,null),Qe(e,t,"method",r.method,r,null),Qe(e,t,"target",r.target,r,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Ms(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Wa);break;case"onScroll":l!=null&&je("scroll",e);break;case"onScrollEnd":l!=null&&je("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=Ms(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":je("beforetoggle",e),je("toggle",e),Cs(e,"popover",l);break;case"xlinkActuate":Fa(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Fa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Fa(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Fa(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Fa(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Fa(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Fa(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Fa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Fa(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Cs(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=sv.get(a)||a,Cs(e,a,l))}}function yo(e,t,a,l,r,o){switch(a){case"style":rf(e,l,o);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"children":typeof l=="string"?Ul(e,l):(typeof l=="number"||typeof l=="bigint")&&Ul(e,""+l);break;case"onScroll":l!=null&&je("scroll",e);break;case"onScrollEnd":l!=null&&je("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Wa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(r=a.endsWith("Capture"),t=a.slice(2,r?a.length-7:void 0),o=e[qt]||null,o=o!=null?o[a]:null,typeof o=="function"&&e.removeEventListener(t,o,r),typeof l=="function")){typeof o!="function"&&o!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,r);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):Cs(e,a,l)}}}function kt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",e),je("load",e);var l=!1,r=!1,o;for(o in a)if(a.hasOwnProperty(o)){var h=a[o];if(h!=null)switch(o){case"src":l=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Qe(e,t,o,h,a,null)}}r&&Qe(e,t,"srcSet",a.srcSet,a,null),l&&Qe(e,t,"src",a.src,a,null);return;case"input":je("invalid",e);var x=o=h=r=null,S=null,k=null;for(l in a)if(a.hasOwnProperty(l)){var z=a[l];if(z!=null)switch(l){case"name":r=z;break;case"type":h=z;break;case"checked":S=z;break;case"defaultChecked":k=z;break;case"value":o=z;break;case"defaultValue":x=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(u(137,t));break;default:Qe(e,t,l,z,a,null)}}af(e,o,x,S,k,h,r,!1);return;case"select":je("invalid",e),l=h=o=null;for(r in a)if(a.hasOwnProperty(r)&&(x=a[r],x!=null))switch(r){case"value":o=x;break;case"defaultValue":h=x;break;case"multiple":l=x;default:Qe(e,t,r,x,a,null)}t=o,a=h,e.multiple=!!l,t!=null?Dl(e,!!l,t,!1):a!=null&&Dl(e,!!l,a,!0);return;case"textarea":je("invalid",e),o=r=l=null;for(h in a)if(a.hasOwnProperty(h)&&(x=a[h],x!=null))switch(h){case"value":l=x;break;case"defaultValue":r=x;break;case"children":o=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(u(91));break;default:Qe(e,t,h,x,a,null)}lf(e,l,r,o);return;case"option":for(S in a)if(a.hasOwnProperty(S)&&(l=a[S],l!=null))switch(S){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Qe(e,t,S,l,a,null)}return;case"dialog":je("beforetoggle",e),je("toggle",e),je("cancel",e),je("close",e);break;case"iframe":case"object":je("load",e);break;case"video":case"audio":for(l=0;l<is.length;l++)je(is[l],e);break;case"image":je("error",e),je("load",e);break;case"details":je("toggle",e);break;case"embed":case"source":case"link":je("error",e),je("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(k in a)if(a.hasOwnProperty(k)&&(l=a[k],l!=null))switch(k){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Qe(e,t,k,l,a,null)}return;default:if(Cu(t)){for(z in a)a.hasOwnProperty(z)&&(l=a[z],l!==void 0&&yo(e,t,z,l,a,void 0));return}}for(x in a)a.hasOwnProperty(x)&&(l=a[x],l!=null&&Qe(e,t,x,l,a,null))}function Mg(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,o=null,h=null,x=null,S=null,k=null,z=null;for(M in a){var Y=a[M];if(a.hasOwnProperty(M)&&Y!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":S=Y;default:l.hasOwnProperty(M)||Qe(e,t,M,null,l,Y)}}for(var T in l){var M=l[T];if(Y=a[T],l.hasOwnProperty(T)&&(M!=null||Y!=null))switch(T){case"type":o=M;break;case"name":r=M;break;case"checked":k=M;break;case"defaultChecked":z=M;break;case"value":h=M;break;case"defaultValue":x=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(u(137,t));break;default:M!==Y&&Qe(e,t,T,M,l,Y)}}Ru(e,h,x,S,k,z,o,r);return;case"select":M=h=x=T=null;for(o in a)if(S=a[o],a.hasOwnProperty(o)&&S!=null)switch(o){case"value":break;case"multiple":M=S;default:l.hasOwnProperty(o)||Qe(e,t,o,null,l,S)}for(r in l)if(o=l[r],S=a[r],l.hasOwnProperty(r)&&(o!=null||S!=null))switch(r){case"value":T=o;break;case"defaultValue":x=o;break;case"multiple":h=o;default:o!==S&&Qe(e,t,r,o,l,S)}t=x,a=h,l=M,T!=null?Dl(e,!!a,T,!1):!!l!=!!a&&(t!=null?Dl(e,!!a,t,!0):Dl(e,!!a,a?[]:"",!1));return;case"textarea":M=T=null;for(x in a)if(r=a[x],a.hasOwnProperty(x)&&r!=null&&!l.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Qe(e,t,x,null,l,r)}for(h in l)if(r=l[h],o=a[h],l.hasOwnProperty(h)&&(r!=null||o!=null))switch(h){case"value":T=r;break;case"defaultValue":M=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(u(91));break;default:r!==o&&Qe(e,t,h,r,l,o)}nf(e,T,M);return;case"option":for(var ae in a)if(T=a[ae],a.hasOwnProperty(ae)&&T!=null&&!l.hasOwnProperty(ae))switch(ae){case"selected":e.selected=!1;break;default:Qe(e,t,ae,null,l,T)}for(S in l)if(T=l[S],M=a[S],l.hasOwnProperty(S)&&T!==M&&(T!=null||M!=null))switch(S){case"selected":e.selected=T&&typeof T!="function"&&typeof T!="symbol";break;default:Qe(e,t,S,T,l,M)}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 fe in a)T=a[fe],a.hasOwnProperty(fe)&&T!=null&&!l.hasOwnProperty(fe)&&Qe(e,t,fe,null,l,T);for(k in l)if(T=l[k],M=a[k],l.hasOwnProperty(k)&&T!==M&&(T!=null||M!=null))switch(k){case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(u(137,t));break;default:Qe(e,t,k,T,l,M)}return;default:if(Cu(t)){for(var Xe in a)T=a[Xe],a.hasOwnProperty(Xe)&&T!==void 0&&!l.hasOwnProperty(Xe)&&yo(e,t,Xe,void 0,l,T);for(z in l)T=l[z],M=a[z],!l.hasOwnProperty(z)||T===M||T===void 0&&M===void 0||yo(e,t,z,T,l,M);return}}for(var A in a)T=a[A],a.hasOwnProperty(A)&&T!=null&&!l.hasOwnProperty(A)&&Qe(e,t,A,null,l,T);for(Y in l)T=l[Y],M=a[Y],!l.hasOwnProperty(Y)||T===M||T==null&&M==null||Qe(e,t,Y,T,l,M)}function up(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Lg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var r=a[l],o=r.transferSize,h=r.initiatorType,x=r.duration;if(o&&x&&up(h)){for(h=0,x=r.responseEnd,l+=1;l<a.length;l++){var S=a[l],k=S.startTime;if(k>x)break;var z=S.transferSize,Y=S.initiatorType;z&&up(Y)&&(S=S.responseEnd,h+=z*(S<x?1:(x-k)/(S-k)))}if(--l,t+=8*(o+h)/(r.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 vo=null,go=null;function Rr(e){return e.nodeType===9?e:e.ownerDocument}function cp(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 op(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 bo(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 wo=null;function Dg(){var e=window.event;return e&&e.type==="popstate"?e===wo?!1:(wo=e,!0):(wo=null,!1)}var dp=typeof setTimeout=="function"?setTimeout:void 0,Ug=typeof clearTimeout=="function"?clearTimeout:void 0,fp=typeof Promise=="function"?Promise:void 0,zg=typeof queueMicrotask=="function"?queueMicrotask:typeof fp<"u"?function(e){return fp.resolve(null).then(e).catch(Bg)}:dp;function Bg(e){setTimeout(function(){throw e})}function Vn(e){return e==="head"}function hp(e,t){var a=t,l=0;do{var r=a.nextSibling;if(e.removeChild(a),r&&r.nodeType===8)if(a=r.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(r),hi(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")rs(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,rs(a);for(var o=a.firstChild;o;){var h=o.nextSibling,x=o.nodeName;o[Ni]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&o.rel.toLowerCase()==="stylesheet"||a.removeChild(o),o=h}}else a==="body"&&rs(e.ownerDocument.body);a=r}while(a);hi(t)}function mp(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function So(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":So(a),Au(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function qg(e,t,a,l){for(;e.nodeType===1;){var r=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Ni])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!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=pa(e.nextSibling),e===null)break}return null}function Hg(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=pa(e.nextSibling),e===null))return null;return e}function pp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=pa(e.nextSibling),e===null))return null;return e}function jo(e){return e.data==="$?"||e.data==="$~"}function _o(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function $g(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function pa(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 No=null;function xp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return pa(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function yp(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 vp(e,t,a){switch(t=Rr(a),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function rs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Au(e)}var xa=new Map,gp=new Set;function kr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var pn=Z.d;Z.d={f:Vg,r:Yg,D:Zg,C:Gg,L:Qg,m:Xg,X:Jg,S:Kg,M:Ig};function Vg(){var e=pn.f(),t=br();return e||t}function Yg(e){var t=Ol(e);t!==null&&t.tag===5&&t.type==="form"?Uh(t):pn.r(e)}var oi=typeof document>"u"?null:document;function bp(e,t,a){var l=oi;if(l&&typeof t=="string"&&t){var r=ua(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),gp.has(r)||(gp.add(r),e={rel:e,crossOrigin:a,href:t},l.querySelector(r)===null&&(t=l.createElement("link"),kt(t,"link",e),St(t),l.head.appendChild(t)))}}function Zg(e){pn.D(e),bp("dns-prefetch",e,null)}function Gg(e,t){pn.C(e,t),bp("preconnect",e,t)}function Qg(e,t,a){pn.L(e,t,a);var l=oi;if(l&&e&&t){var r='link[rel="preload"][as="'+ua(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+ua(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+ua(a.imageSizes)+'"]')):r+='[href="'+ua(e)+'"]';var o=r;switch(t){case"style":o=di(e);break;case"script":o=fi(e)}xa.has(o)||(e=N({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),xa.set(o,e),l.querySelector(r)!==null||t==="style"&&l.querySelector(us(o))||t==="script"&&l.querySelector(cs(o))||(t=l.createElement("link"),kt(t,"link",e),St(t),l.head.appendChild(t)))}}function Xg(e,t){pn.m(e,t);var a=oi;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+ua(l)+'"][href="'+ua(e)+'"]',o=r;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=fi(e)}if(!xa.has(o)&&(e=N({rel:"modulepreload",href:e},t),xa.set(o,e),a.querySelector(r)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(cs(o)))return}l=a.createElement("link"),kt(l,"link",e),St(l),a.head.appendChild(l)}}}function Kg(e,t,a){pn.S(e,t,a);var l=oi;if(l&&e){var r=Ml(l).hoistableStyles,o=di(e);t=t||"default";var h=r.get(o);if(!h){var x={loading:0,preload:null};if(h=l.querySelector(us(o)))x.loading=5;else{e=N({rel:"stylesheet",href:e,"data-precedence":t},a),(a=xa.get(o))&&Ao(e,a);var S=h=l.createElement("link");St(S),kt(S,"link",e),S._p=new Promise(function(k,z){S.onload=k,S.onerror=z}),S.addEventListener("load",function(){x.loading|=1}),S.addEventListener("error",function(){x.loading|=2}),x.loading|=4,Cr(h,t,l)}h={type:"stylesheet",instance:h,count:1,state:x},r.set(o,h)}}}function Jg(e,t){pn.X(e,t);var a=oi;if(a&&e){var l=Ml(a).hoistableScripts,r=fi(e),o=l.get(r);o||(o=a.querySelector(cs(r)),o||(e=N({src:e,async:!0},t),(t=xa.get(r))&&Eo(e,t),o=a.createElement("script"),St(o),kt(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},l.set(r,o))}}function Ig(e,t){pn.M(e,t);var a=oi;if(a&&e){var l=Ml(a).hoistableScripts,r=fi(e),o=l.get(r);o||(o=a.querySelector(cs(r)),o||(e=N({src:e,async:!0,type:"module"},t),(t=xa.get(r))&&Eo(e,t),o=a.createElement("script"),St(o),kt(o,"link",e),a.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},l.set(r,o))}}function wp(e,t,a,l){var r=(r=xe.current)?kr(r):null;if(!r)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=di(a.href),a=Ml(r).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=di(a.href);var o=Ml(r).hoistableStyles,h=o.get(e);if(h||(r=r.ownerDocument||r,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,h),(o=r.querySelector(us(e)))&&!o._p&&(h.instance=o,h.state.loading=5),xa.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},xa.set(e,a),o||Fg(r,e,a,h.state))),t&&l===null)throw Error(u(528,""));return h}if(t&&l!==null)throw Error(u(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=fi(a),a=Ml(r).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function di(e){return'href="'+ua(e)+'"'}function us(e){return'link[rel="stylesheet"]['+e+"]"}function Sp(e){return N({},e,{"data-precedence":e.precedence,precedence:null})}function Fg(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),kt(t,"link",a),St(t),e.head.appendChild(t))}function fi(e){return'[src="'+ua(e)+'"]'}function cs(e){return"script[async]"+e}function jp(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+ua(a.href)+'"]');if(l)return t.instance=l,St(l),l;var r=N({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),St(l),kt(l,"style",r),Cr(l,a.precedence,e),t.instance=l;case"stylesheet":r=di(a.href);var o=e.querySelector(us(r));if(o)return t.state.loading|=4,t.instance=o,St(o),o;l=Sp(a),(r=xa.get(r))&&Ao(l,r),o=(e.ownerDocument||e).createElement("link"),St(o);var h=o;return h._p=new Promise(function(x,S){h.onload=x,h.onerror=S}),kt(o,"link",l),t.state.loading|=4,Cr(o,a.precedence,e),t.instance=o;case"script":return o=fi(a.src),(r=e.querySelector(cs(o)))?(t.instance=r,St(r),r):(l=a,(r=xa.get(o))&&(l=N({},a),Eo(l,r)),e=e.ownerDocument||e,r=e.createElement("script"),St(r),kt(r,"link",l),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Cr(l,a.precedence,e));return t.instance}function Cr(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=l.length?l[l.length-1]:null,o=r,h=0;h<l.length;h++){var x=l[h];if(x.dataset.precedence===t)o=x;else if(o!==r)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Ao(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Eo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Tr=null;function _p(e,t,a){if(Tr===null){var l=new Map,r=Tr=new Map;r.set(a,l)}else r=Tr,l=r.get(a),l||(l=new Map,r.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),r=0;r<a.length;r++){var o=a[r];if(!(o[Ni]||o[Nt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var h=o.getAttribute(t)||"";h=e+h;var x=l.get(h);x?x.push(o):l.set(h,[o])}}return l}function Np(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Wg(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 Ap(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Pg(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var r=di(l.href),o=t.querySelector(us(r));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Or.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=o,St(o);return}o=t.ownerDocument||t,l=Sp(l),(r=xa.get(r))&&Ao(l,r),o=o.createElement("link"),St(o);var h=o;h._p=new Promise(function(x,S){h.onload=x,h.onerror=S}),kt(o,"link",l),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=Or.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Ro=0;function e0(e,t){return e.stylesheets&&e.count===0&&Lr(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Lr(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Ro===0&&(Ro=62500*Lg());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Lr(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Ro?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(r)}}:null}function Or(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Lr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Mr=null;function Lr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Mr=new Map,t.forEach(t0,e),Mr=null,Or.call(e))}function t0(e,t){if(!(t.state.loading&4)){var a=Mr.get(e);if(a)var l=a.get(null);else{a=new Map,Mr.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<r.length;o++){var h=r[o];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(a.set(h.dataset.precedence,h),l=h)}l&&a.set(null,l)}r=t.instance,h=r.getAttribute("data-precedence"),o=a.get(h)||l,o===l&&a.set(null,r),a.set(h,r),this.count++,l=Or.bind(this),r.addEventListener("load",l),r.addEventListener("error",l),o?o.parentNode.insertBefore(r,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var os={$$typeof:W,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function a0(e,t,a,l,r,o,h,x,S){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=Jt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jt(0),this.hiddenUpdates=Jt(null),this.identifierPrefix=l,this.onUncaughtError=r,this.onCaughtError=o,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function Ep(e,t,a,l,r,o,h,x,S,k,z,Y){return e=new a0(e,t,a,h,S,k,z,Y,x),t=1,o===!0&&(t|=24),o=Ft(3,null,null,t),e.current=o,o.stateNode=e,t=sc(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:l,isDehydrated:a,cache:t},oc(o),e}function Rp(e){return e?(e=Yl,e):Yl}function kp(e,t,a,l,r,o){r=Rp(r),l.context===null?l.context=r:l.pendingContext=r,l=Tn(t),l.payload={element:a},o=o===void 0?null:o,o!==null&&(l.callback=o),a=On(e,l,t),a!==null&&(Gt(a,e,t),Vi(a,e,t))}function Cp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function ko(e,t){Cp(e,t),(e=e.alternate)&&Cp(e,t)}function Tp(e){if(e.tag===13||e.tag===31){var t=rl(e,67108864);t!==null&&Gt(t,e,67108864),ko(e,67108864)}}function Op(e){if(e.tag===13||e.tag===31){var t=aa();t=ju(t);var a=rl(e,t);a!==null&&Gt(a,e,t),ko(e,t)}}var Dr=!0;function n0(e,t,a,l){var r=L.T;L.T=null;var o=Z.p;try{Z.p=2,Co(e,t,a,l)}finally{Z.p=o,L.T=r}}function l0(e,t,a,l){var r=L.T;L.T=null;var o=Z.p;try{Z.p=8,Co(e,t,a,l)}finally{Z.p=o,L.T=r}}function Co(e,t,a,l){if(Dr){var r=To(l);if(r===null)xo(e,t,l,Ur,a),Lp(e,l);else if(s0(r,e,t,a,l))l.stopPropagation();else if(Lp(e,l),t&4&&-1<i0.indexOf(e)){for(;r!==null;){var o=Ol(r);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var h=za(o.pendingLanes);if(h!==0){var x=o;for(x.pendingLanes|=2,x.entangledLanes|=2;h;){var S=1<<31-G(h);x.entanglements[1]|=S,h&=~S}$a(o),(Be&6)===0&&(vr=et()+500,ls(0))}}break;case 31:case 13:x=rl(o,2),x!==null&&Gt(x,o,2),br(),ko(o,2)}if(o=To(l),o===null&&xo(e,t,l,Ur,a),o===r)break;r=o}r!==null&&l.stopPropagation()}else xo(e,t,l,null,a)}}function To(e){return e=Ou(e),Oo(e)}var Ur=null;function Oo(e){if(Ur=null,e=Tl(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=m(t),e!==null)return e;e=null}else if(a===31){if(e=y(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 Ur=e,null}function Mp(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(it()){case el:return 2;case tl:return 8;case Ja:case al:return 32;case wt:return 268435456;default:return 32}default:return 32}}var Mo=!1,Yn=null,Zn=null,Gn=null,ds=new Map,fs=new Map,Qn=[],i0="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 Lp(e,t){switch(e){case"focusin":case"focusout":Yn=null;break;case"dragenter":case"dragleave":Zn=null;break;case"mouseover":case"mouseout":Gn=null;break;case"pointerover":case"pointerout":ds.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":fs.delete(t.pointerId)}}function hs(e,t,a,l,r,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:o,targetContainers:[r]},t!==null&&(t=Ol(t),t!==null&&Tp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function s0(e,t,a,l,r){switch(t){case"focusin":return Yn=hs(Yn,e,t,a,l,r),!0;case"dragenter":return Zn=hs(Zn,e,t,a,l,r),!0;case"mouseover":return Gn=hs(Gn,e,t,a,l,r),!0;case"pointerover":var o=r.pointerId;return ds.set(o,hs(ds.get(o)||null,e,t,a,l,r)),!0;case"gotpointercapture":return o=r.pointerId,fs.set(o,hs(fs.get(o)||null,e,t,a,l,r)),!0}return!1}function Dp(e){var t=Tl(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=m(a),t!==null){e.blockedOn=t,Kd(e.priority,function(){Op(a)});return}}else if(t===31){if(t=y(a),t!==null){e.blockedOn=t,Kd(e.priority,function(){Op(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 zr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=To(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Tu=l,a.target.dispatchEvent(l),Tu=null}else return t=Ol(a),t!==null&&Tp(t),e.blockedOn=a,!1;t.shift()}return!0}function Up(e,t,a){zr(e)&&a.delete(t)}function r0(){Mo=!1,Yn!==null&&zr(Yn)&&(Yn=null),Zn!==null&&zr(Zn)&&(Zn=null),Gn!==null&&zr(Gn)&&(Gn=null),ds.forEach(Up),fs.forEach(Up)}function Br(e,t){e.blockedOn===t&&(e.blockedOn=null,Mo||(Mo=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,r0)))}var qr=null;function zp(e){qr!==e&&(qr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){qr===e&&(qr=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],r=e[t+2];if(typeof l!="function"){if(Oo(l||a)===null)continue;break}var o=Ol(a);o!==null&&(e.splice(t,3),t-=3,Cc(o,{pending:!0,data:r,method:a.method,action:l},l,r))}}))}function hi(e){function t(S){return Br(S,e)}Yn!==null&&Br(Yn,e),Zn!==null&&Br(Zn,e),Gn!==null&&Br(Gn,e),ds.forEach(t),fs.forEach(t);for(var a=0;a<Qn.length;a++){var l=Qn[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Qn.length&&(a=Qn[0],a.blockedOn===null);)Dp(a),a.blockedOn===null&&Qn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var r=a[l],o=a[l+1],h=r[qt]||null;if(typeof o=="function")h||zp(a);else if(h){var x=null;if(o&&o.hasAttribute("formAction")){if(r=o,h=o[qt]||null)x=h.formAction;else if(Oo(r)!==null)continue}else x=h.action;typeof x=="function"?a[l+1]=x:(a.splice(l,3),l-=3),zp(a)}}}function Bp(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(h){return r=h})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),l||setTimeout(a,20)}function a(){if(!l&&!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 l=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function Lo(e){this._internalRoot=e}Hr.prototype.render=Lo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,l=aa();kp(a,l,e,t,null,null)},Hr.prototype.unmount=Lo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;kp(e.current,2,null,e,null,null),br(),t[Cl]=null}};function Hr(e){this._internalRoot=e}Hr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xd();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Qn.length&&t!==0&&t<Qn[a].priority;a++);Qn.splice(a,0,e),a===0&&Dp(e)}};var qp=i.version;if(qp!=="19.2.7")throw Error(u(527,qp,"19.2.7"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=v(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var u0={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $r=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$r.isDisabled&&$r.supportsFiber)try{Ia=$r.inject(u0),_t=$r}catch{}}return ps.createRoot=function(e,t){if(!d(e))throw Error(u(299));var a=!1,l="",r=Qh,o=Xh,h=Kh;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Ep(e,1,!1,null,null,a,l,null,r,o,h,Bp),e[Cl]=t.current,po(e),new Lo(t)},ps.hydrateRoot=function(e,t,a){if(!d(e))throw Error(u(299));var l=!1,r="",o=Qh,h=Xh,x=Kh,S=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(r=a.identifierPrefix),a.onUncaughtError!==void 0&&(o=a.onUncaughtError),a.onCaughtError!==void 0&&(h=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError),a.formState!==void 0&&(S=a.formState)),t=Ep(e,1,!0,t,a??null,l,r,S,o,h,x,Bp),t.context=Rp(null),a=t.current,l=aa(),l=ju(l),r=Tn(l),r.callback=null,On(a,r,l),a=l,t.current.lanes=a,_i(t,a),$a(t),e[Cl]=t.current,po(e),new Hr(t)},ps.version="19.2.7",ps}var Jp;function v0(){if(Jp)return zo.exports;Jp=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),zo.exports=y0(),zo.exports}var g0=v0();/**
50
+ * react-router v7.18.4
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 _d=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Yx=/^[\\/]{2}/;function b0(n,i){return i+n.replace(/\\/g,"/")}var Ip="popstate";function Fp(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function w0(n={}){function i(u,d){var v;let f=(v=d.state)==null?void 0:v.masked,{pathname:m,search:y,hash:g}=f||u.location;return sd("",{pathname:m,search:y,hash:g},d.state&&d.state.usr||null,d.state&&d.state.key||"default",f?{pathname:u.location.pathname,search:u.location.search,hash:u.location.hash}:void 0)}function s(u,d){return typeof d=="string"?d:wl(d)}return j0(i,s,null,n)}function at(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function Sa(n,i){if(!n){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function S0(){return Math.random().toString(36).substring(2,10)}function Wp(n,i){return{usr:n.state,key:n.key,idx:i,masked:n.mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function sd(n,i,s=null,u,d){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof i=="string"?bi(i):i,state:s,key:i&&i.key||u||S0(),mask:d}}function wl({pathname:n="/",search:i="",hash:s=""}){return i&&i!=="?"&&(n+=i.charAt(0)==="?"?i:"?"+i),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function bi(n){let i={};if(n){let s=n.indexOf("#");s>=0&&(i.hash=n.substring(s),n=n.substring(0,s));let u=n.indexOf("?");u>=0&&(i.search=n.substring(u),n=n.substring(0,u)),n&&(i.pathname=n)}return i}function j0(n,i,s,u={}){let{window:d=document.defaultView,v5Compat:f=!1}=u,m=d.history,y="POP",g=null,v=b();v==null&&(v=0,m.replaceState({...m.state,idx:v},""));function b(){return(m.state||{idx:null}).idx}function N(){y="POP";let D=b(),B=D==null?null:D-v;v=D,g&&g({action:y,location:V.location,delta:B})}function U(D,B){y="PUSH";let Q=Fp(D)?D:sd(V.location,D,B);v=b()+1;let W=Wp(Q,v),oe=V.createHref(Q.mask||Q);try{m.pushState(W,"",oe)}catch(J){if(J instanceof DOMException&&J.name==="DataCloneError")throw J;d.location.assign(oe)}f&&g&&g({action:y,location:V.location,delta:1})}function K(D,B){y="REPLACE";let Q=Fp(D)?D:sd(V.location,D,B);v=b();let W=Wp(Q,v),oe=V.createHref(Q.mask||Q);m.replaceState(W,"",oe),f&&g&&g({action:y,location:V.location,delta:0})}function C(D){return _0(d,D)}let V={get action(){return y},get location(){return n(d,m)},listen(D){if(g)throw new Error("A history only accepts one active listener");return d.addEventListener(Ip,N),g=D,()=>{d.removeEventListener(Ip,N),g=null}},createHref(D){return i(d,D)},createURL:C,encodeLocation(D){let B=C(D);return{pathname:B.pathname,search:B.search,hash:B.hash}},push:U,replace:K,go(D){return m.go(D)}};return V}function _0(n,i,s=!1){let u="http://localhost";n&&(u=n.location.origin!=="null"?n.location.origin:n.location.href),at(u,"No window.location.(origin|href) available to create URL");let d=typeof i=="string"?i:wl(i);return d=d.replace(/ $/,"%20"),!s&&Yx.test(d)&&(d=u+d),new URL(d,u)}function Zx(n,i,s="/"){return N0(n,i,s,!1)}function N0(n,i,s,u,d){let f=typeof i=="string"?bi(i):i,m=gn(f.pathname||"/",s);if(m==null)return null;let y=A0(n),g=null,v=z0(m);for(let b=0;g==null&&b<y.length;++b)g=U0(y[b],v,u);return g}function A0(n){let i=Gx(n);return E0(i),i}function Gx(n,i=[],s=[],u="",d=!1){let f=(m,y,g=d,v)=>{let b={relativePath:v===void 0?m.path||"":v,caseSensitive:m.caseSensitive===!0,childrenIndex:y,route:m};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(u)&&g)return;at(b.relativePath.startsWith(u),`Absolute route path "${b.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(u.length)}let N=Oa([u,b.relativePath]),U=s.concat(b);m.children&&m.children.length>0&&(at(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${N}".`),Gx(m.children,i,U,N,g)),!(m.path==null&&!m.index)&&i.push({path:N,score:L0(N,m.index),routesMeta:U.map((K,C)=>{let[V,D]=Kx(K.relativePath,K.caseSensitive,C===U.length-1);return{...K,matcher:V,compiledParams:D}})})};return n.forEach((m,y)=>{var g;if(m.path===""||!((g=m.path)!=null&&g.includes("?")))f(m,y);else for(let v of Qx(m.path))f(m,y,!0,v)}),i}function Qx(n){let i=n.split("/");if(i.length===0)return[];let[s,...u]=i,d=s.endsWith("?"),f=s.replace(/\?$/,"");if(u.length===0)return d?[f,""]:[f];let m=Qx(u.join("/")),y=[];return y.push(...m.map(g=>g===""?f:[f,g].join("/"))),d&&y.push(...m),y.map(g=>n.startsWith("/")&&g===""?"/":g)}function E0(n){n.sort((i,s)=>i.score!==s.score?s.score-i.score:D0(i.routesMeta.map(u=>u.childrenIndex),s.routesMeta.map(u=>u.childrenIndex)))}var R0=/^:[\w-]+$/,k0=3,C0=2,T0=1,O0=10,M0=-2,Pp=n=>n==="*";function L0(n,i){let s=n.split("/"),u=s.length;return s.some(Pp)&&(u+=M0),i&&(u+=C0),s.filter(d=>!Pp(d)).reduce((d,f)=>d+(R0.test(f)?k0:f===""?T0:O0),u)}function D0(n,i){return n.length===i.length&&n.slice(0,-1).every((u,d)=>u===i[d])?n[n.length-1]-i[i.length-1]:0}function U0(n,i,s=!1){let{routesMeta:u}=n,d={},f="/",m=[];for(let y=0;y<u.length;++y){let g=u[y],v=y===u.length-1,b=f==="/"?i:i.slice(f.length)||"/",N={path:g.relativePath,caseSensitive:g.caseSensitive,end:v},U=g.matcher&&g.compiledParams?Xx(N,b,g.matcher,g.compiledParams):Wr(N,b),K=g.route;if(!U&&v&&s&&!u[u.length-1].route.index&&(U=Wr({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},b)),!U)return null;Object.assign(d,U.params),m.push({params:d,pathname:Oa([f,U.pathname]),pathnameBase:H0(Oa([f,U.pathnameBase])),route:K}),U.pathnameBase!=="/"&&(f=Oa([f,U.pathnameBase]))}return m}function Wr(n,i){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[s,u]=Kx(n.path,n.caseSensitive,n.end);return Xx(n,i,s,u)}function Xx(n,i,s,u){let d=i.match(s);if(!d)return null;let f=d[0],m=yi(f,1),y=d.slice(1);return{params:u.reduce((v,{paramName:b,isOptional:N},U)=>{if(b==="*"){let C=y[U]||"";m=yi(f.slice(0,f.length-C.length),1)}const K=y[U];return N&&!K?v[b]=void 0:v[b]=(K||"").replace(/%2F/g,"/"),v},{}),pathname:f,pathnameBase:m,pattern:n}}function Kx(n,i=!1,s=!0){Sa(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let u=[],d="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,y,g,v,b)=>{if(u.push({paramName:y,isOptional:g!=null}),g){let N=b.charAt(v+m.length);return N&&N!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(u.push({paramName:"*"}),d+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?d+="\\/*$":n!==""&&n!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,i?void 0:"i"),u]}function z0(n){try{return n.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return Sa(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),n}}function gn(n,i){if(i==="/")return n;if(!n.toLowerCase().startsWith(i.toLowerCase()))return null;let s=i.endsWith("/")?i.length-1:i.length,u=n.charAt(s);return u&&u!=="/"?null:n.slice(s)||"/"}function B0(n,i="/"){let{pathname:s,search:u="",hash:d=""}=typeof n=="string"?bi(n):n,f;return s?(s=Jx(s),s.startsWith("/")||s.startsWith("\\")?f=ex(s.substring(1),"/"):f=ex(s,i)):f=i,{pathname:f,search:$0(u),hash:V0(d)}}function ex(n,i){let s=yi(i).split("/");return n.split("/").forEach(d=>{d===".."?s.length>1&&s.pop():d!=="."&&s.push(d)}),s.length>1?s.join("/"):"/"}function $o(n,i,s,u){return`Cannot include a '${n}' character in a manually specified \`to.${i}\` field [${JSON.stringify(u)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function q0(n){return n.filter((i,s)=>s===0||i.route.path&&i.route.path.length>0)}function Nd(n){let i=q0(n);return i.map((s,u)=>u===i.length-1?s.pathname:s.pathnameBase)}function hu(n,i,s,u=!1){let d;typeof n=="string"?d=bi(n):(d={...n},at(!d.pathname||!d.pathname.includes("?"),$o("?","pathname","search",d)),at(!d.pathname||!d.pathname.includes("#"),$o("#","pathname","hash",d)),at(!d.search||!d.search.includes("#"),$o("#","search","hash",d)));let f=n===""||d.pathname==="",m=f?"/":d.pathname,y;if(m==null)y=s;else{let N=i.length-1;if(!u&&m.startsWith("..")){let U=m.split("/");for(;U[0]==="..";)U.shift(),N-=1;d.pathname=U.join("/")}y=N>=0?i[N]:"/"}let g=B0(d,y),v=m&&m!=="/"&&m.endsWith("/"),b=(f||m===".")&&s.endsWith("/");return!g.pathname.endsWith("/")&&(v||b)&&(g.pathname+="/"),g}var Jx=n=>n.replace(/[\\/]{2,}/g,"/"),Oa=n=>Jx(n.join("/"));function yi(n,i=0){let s=n.length;for(;s>i&&n.charCodeAt(s-1)===47;)s--;return s===n.length?n:n.slice(0,s)}var H0=n=>yi(n).replace(/^\/*/,"/"),$0=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,V0=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Y0=class{constructor(n,i,s,u=!1){this.status=n,this.statusText=i||"",this.internal=u,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function Z0(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function G0(n){let i=n.map(s=>s.route.path).filter(Boolean);return Oa(i)||"/"}var Ix=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Fx(n,i){let s=n;if(typeof s!="string"||!_d.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let u=s,d=!1;if(Ix)try{let f=new URL(window.location.href),m=Yx.test(s)?new URL(b0(s,f.protocol)):new URL(s),y=gn(m.pathname,i);m.origin===f.origin&&y!=null?s=y+m.search+m.hash:d=!0}catch{Sa(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:d,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var tx=new URL("http://localhost");function Ad(n){if(n.createURL)return n.createURL("/");try{return new URL(n.createHref("/"),tx)}catch{return tx}}function Vo(n,i){return n.origin===i.origin&&(n.origin!=="null"||n.protocol===i.protocol&&n.host===i.host)}function Q0(n,i){if(n.startsWith("//"))return!0;let s=i.protocol.toLowerCase();return n.toLowerCase().startsWith(s)?i.host===""||n.slice(s.length).startsWith("//"):!1}function Ed(n,i,s,u){let d=null;try{d=n==null?null:new URL(n,s)}catch{}let f=new URL(i,s),m=d!=null&&!Vo(d,s),y=!Vo(f,s);if(u==="reject"){if(m||y)throw new Error("External navigation is not allowed")}else if(y&&(d==null||!Q0(n,d)||!Vo(d,f)))throw new Error("External navigation is not allowed")}var Wx=["POST","PUT","PATCH","DELETE"];new Set(Wx);var X0=["GET",...Wx];new Set(X0);var K0=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function J0(n){try{return K0.includes(new URL(n).protocol)}catch{return!1}}var wi=w.createContext(null);wi.displayName="DataRouter";var mu=w.createContext(null);mu.displayName="DataRouterState";var Px=w.createContext(!1);function I0(){return w.useContext(Px)}var ey=w.createContext({isTransitioning:!1});ey.displayName="ViewTransition";var F0=w.createContext(new Map);F0.displayName="Fetchers";var W0=w.createContext(null);W0.displayName="Await";var la=w.createContext(null);la.displayName="Navigation";var Rs=w.createContext(null);Rs.displayName="Location";var La=w.createContext({outlet:null,matches:[],isDataRoute:!1});La.displayName="Route";var Rd=w.createContext(null);Rd.displayName="RouteError";var ty="REACT_ROUTER_ERROR",P0="REDIRECT",eb="ROUTE_ERROR_RESPONSE";function tb(n){if(n.startsWith(`${ty}:${P0}:{`))try{let i=JSON.parse(n.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function ab(n){if(n.startsWith(`${ty}:${eb}:{`))try{let i=JSON.parse(n.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new Y0(i.status,i.statusText,i.data)}catch{}}function nb(n,{relative:i}={}){at(Si(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:u}=w.useContext(la),{hash:d,pathname:f,search:m}=ks(n,{relative:i}),y=f;return s!=="/"&&(y=f==="/"?s:Oa([s,f])),u.createHref({pathname:y,search:m,hash:d})}function Si(){return w.useContext(Rs)!=null}function Da(){return at(Si(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(Rs).location}var ay="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ny(n){w.useContext(la).static||w.useLayoutEffect(n)}function kd(){let{isDataRoute:n}=w.useContext(La);return n?yb():lb()}function lb(){at(Si(),"useNavigate() may be used only in the context of a <Router> component.");let n=w.useContext(wi),{basename:i,navigator:s}=w.useContext(la),{matches:u}=w.useContext(La),{pathname:d}=Da(),f=JSON.stringify(Nd(u)),m=w.useRef(!1);return ny(()=>{m.current=!0}),w.useCallback((g,v={})=>{if(Sa(m.current,ay),!m.current)return;if(typeof g=="number"){s.go(g);return}let b=hu(g,JSON.parse(f),d,v.relative==="path");n==null&&i!=="/"&&(b.pathname=b.pathname==="/"?i:Oa([i,b.pathname])),Ed(typeof g=="string"?g:wl(g),s.createHref(b),Ad(s),"reject"),(v.replace?s.replace:s.push)(b,v.state,v)},[i,s,f,d,n])}w.createContext(null);function ib(){let{matches:n}=w.useContext(La),i=n[n.length-1];return(i==null?void 0:i.params)??{}}function ks(n,{relative:i}={}){let{matches:s}=w.useContext(La),{pathname:u}=Da(),d=JSON.stringify(Nd(s));return w.useMemo(()=>hu(n,JSON.parse(d),u,i==="path"),[n,d,u,i])}function sb(n,i){return ly(n,i)}function ly(n,i,s){var D;at(Si(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=w.useContext(la),{matches:d}=w.useContext(La),f=d[d.length-1],m=f?f.params:{},y=f?f.pathname:"/",g=f?f.pathnameBase:"/",v=f&&f.route;{let B=v&&v.path||"";sy(y,!v||B.endsWith("*")||B.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${B}">) 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="${B}"> to <Route path="${B==="/"?"*":`${B}/*`}">.`)}let b=Da(),N;if(i){let B=typeof i=="string"?bi(i):i;at(g==="/"||((D=B.pathname)==null?void 0:D.startsWith(g)),`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 "${g}" but pathname "${B.pathname}" was given in the \`location\` prop.`),N=B}else N=b;let U=N.pathname||"/",K=U;if(g!=="/"){let B=g.replace(/^\//,"").split("/");K="/"+U.replace(/^\//,"").split("/").slice(B.length).join("/")}let C=s&&s.state.matches.length?s.state.matches.map(B=>Object.assign(B,{route:s.manifest[B.route.id]||B.route})):Zx(n,{pathname:K});Sa(v||C!=null,`No routes matched location "${N.pathname}${N.search}${N.hash}" `),Sa(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${N.pathname}${N.search}${N.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 V=db(C&&C.map(B=>Object.assign({},B,{params:Object.assign({},m,B.params),pathname:Oa([g,u.encodeLocation?u.encodeLocation(B.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:B.pathname]),pathnameBase:B.pathnameBase==="/"?g:Oa([g,u.encodeLocation?u.encodeLocation(B.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:B.pathnameBase])})),d,s);return i&&V?w.createElement(Rs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...N},navigationType:"POP"}},V):V}function rb(){let n=xb(),i=Z0(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,u="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:u},f={padding:"2px 4px",backgroundColor:u},m=null;return console.error("Error handled by React Router default ErrorBoundary:",n),m=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:f},"ErrorBoundary")," or"," ",w.createElement("code",{style:f},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},i),s?w.createElement("pre",{style:d},s):null,m)}var ub=w.createElement(rb,null),iy=class extends w.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){this.props.onError?this.props.onError(n,i):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const s=ab(n.digest);s&&(n=s)}let i=n!==void 0?w.createElement(La.Provider,{value:this.props.routeContext},w.createElement(Rd.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?w.createElement(cb,{error:n},i):i}};iy.contextType=Px;var Yo=new WeakMap;function cb({children:n,error:i}){let{basename:s,navigator:u}=w.useContext(la);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let d=tb(i.digest);if(d){let f=Yo.get(i);if(f)throw f;let m=Fx(d.location,s),y=m.absoluteURL||m.to;if(Ed(d.location,y,Ad(u),"allow-explicit"),J0(y))throw new Error("Invalid redirect location");if(Ix&&!Yo.get(i))if(m.isExternal||d.reloadDocument)window.location.href=y;else{const g=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:d.replace}));throw Yo.set(i,g),g}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${y}`})}}return n}function ob({routeContext:n,match:i,children:s}){let u=w.useContext(wi);return u&&u.static&&u.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=i.route.id),w.createElement(La.Provider,{value:n},s)}function db(n,i=[],s){let u=s==null?void 0:s.state;if(n==null){if(!u)return null;if(u.errors)n=u.matches;else if(i.length===0&&!u.initialized&&u.matches.length>0)n=u.matches;else return null}let d=n,f=u==null?void 0:u.errors;if(f!=null){let b=d.findIndex(N=>N.route.id&&(f==null?void 0:f[N.route.id])!==void 0);at(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),d=d.slice(0,Math.min(d.length,b+1))}let m=!1,y=-1;if(s&&u){m=u.renderFallback;for(let b=0;b<d.length;b++){let N=d[b];if((N.route.HydrateFallback||N.route.hydrateFallbackElement)&&(y=b),N.route.id){let{loaderData:U,errors:K}=u,C=N.route.loader&&!U.hasOwnProperty(N.route.id)&&(!K||K[N.route.id]===void 0);if(N.route.lazy||C){s.isStatic&&(m=!0),y>=0?d=d.slice(0,y+1):d=[d[0]];break}}}}let g=s==null?void 0:s.onError,v=u&&g?(b,N)=>{var U,K;g(b,{location:u.location,params:((K=(U=u.matches)==null?void 0:U[0])==null?void 0:K.params)??{},pattern:G0(u.matches),errorInfo:N})}:void 0;return d.reduceRight((b,N,U)=>{let K,C=!1,V=null,D=null;u&&(K=f&&N.route.id?f[N.route.id]:void 0,V=N.route.errorElement||ub,m&&(y<0&&U===0?(sy("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,D=null):y===U&&(C=!0,D=N.route.hydrateFallbackElement||null)));let B=i.concat(d.slice(0,U+1)),Q=()=>{let W;return K?W=V:C?W=D:N.route.Component?W=w.createElement(N.route.Component,null):N.route.element?W=N.route.element:W=b,w.createElement(ob,{match:N,routeContext:{outlet:b,matches:B,isDataRoute:u!=null},children:W})};return u&&(N.route.ErrorBoundary||N.route.errorElement||U===0)?w.createElement(iy,{location:u.location,revalidation:u.revalidation,component:V,error:K,children:Q(),routeContext:{outlet:null,matches:B,isDataRoute:!0},onError:v}):Q()},null)}function Cd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fb(n){let i=w.useContext(wi);return at(i,Cd(n)),i}function hb(n){let i=w.useContext(mu);return at(i,Cd(n)),i}function mb(n){let i=w.useContext(La);return at(i,Cd(n)),i}function Td(n){let i=mb(n),s=i.matches[i.matches.length-1];return at(s.route.id,`${n} can only be used on routes that contain a unique "id"`),s.route.id}function pb(){return Td("useRouteId")}function xb(){var u;let n=w.useContext(Rd),i=hb("useRouteError"),s=Td("useRouteError");return n!==void 0?n:(u=i.errors)==null?void 0:u[s]}function yb(){let{router:n}=fb("useNavigate"),i=Td("useNavigate"),s=w.useRef(!1);return ny(()=>{s.current=!0}),w.useCallback(async(d,f={})=>{Sa(s.current,ay),s.current&&(typeof d=="number"?await n.navigate(d):await n.navigate(d,{fromRouteId:i,...f}))},[n,i])}var ax={};function sy(n,i,s){!i&&!ax[n]&&(ax[n]=!0,Sa(!1,s))}w.memo(vb);function vb({routes:n,manifest:i,future:s,state:u,isStatic:d,onError:f}){return ly(n,void 0,{manifest:i,state:u,isStatic:d,onError:f})}function ry({to:n,replace:i,state:s,relative:u}){at(Si(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d,navigator:f}=w.useContext(la);Sa(!d,"<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}=w.useContext(La),{pathname:y}=Da(),g=kd(),v=hu(n,Nd(m),y,u==="path");Ed(typeof n=="string"?n:wl(n),f.createHref(v),Ad(f),"reject");let b=JSON.stringify(v);return w.useEffect(()=>{g(JSON.parse(b),{replace:i,state:s,relative:u})},[g,b,u,i,s]),null}function bl(n){at(!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 gb({basename:n="/",children:i=null,location:s,navigationType:u="POP",navigator:d,static:f=!1,useTransitions:m}){at(!Si(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let y=n.replace(/^\/*/,"/"),g=w.useMemo(()=>({basename:y,navigator:d,static:f,useTransitions:m,future:{}}),[y,d,f,m]);typeof s=="string"&&(s=bi(s));let{pathname:v="/",search:b="",hash:N="",state:U=null,key:K="default",mask:C}=s,V=w.useMemo(()=>{let D=gn(v,y);return D==null?null:{location:{pathname:D,search:b,hash:N,state:U,key:K,mask:C},navigationType:u}},[y,v,b,N,U,K,u,C]);return Sa(V!=null,`<Router basename="${y}"> is not able to match the URL "${v}${b}${N}" because it does not start with the basename, so the <Router> won't render anything.`),V==null?null:w.createElement(la.Provider,{value:g},w.createElement(Rs.Provider,{children:i,value:V}))}function bb({children:n,location:i}){return sb(rd(n),i)}function rd(n,i=[]){let s=[];return w.Children.forEach(n,(u,d)=>{if(!w.isValidElement(u))return;let f=[...i,d];if(u.type===w.Fragment){s.push.apply(s,rd(u.props.children,f));return}at(u.type===bl,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),at(!u.props.index||!u.props.children,"An index route cannot have child routes.");let m={id:u.props.id||f.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(m.children=rd(u.props.children,f)),s.push(m)}),s}var Kr="get",Jr="application/x-www-form-urlencoded";function pu(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function wb(n){return pu(n)&&n.tagName.toLowerCase()==="button"}function Sb(n){return pu(n)&&n.tagName.toLowerCase()==="form"}function jb(n){return pu(n)&&n.tagName.toLowerCase()==="input"}function _b(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Nb(n,i){return n.button===0&&(!i||i==="_self")&&!_b(n)}function ud(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((i,s)=>{let u=n[s];return i.concat(Array.isArray(u)?u.map(d=>[s,d]):[[s,u]])},[]))}function Ab(n,i){let s=ud(n);return i&&i.forEach((u,d)=>{s.has(d)||i.getAll(d).forEach(f=>{s.append(d,f)})}),s}var Vr=null;function Eb(){if(Vr===null)try{new FormData(document.createElement("form"),0),Vr=!1}catch{Vr=!0}return Vr}var Rb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Zo(n){return n!=null&&!Rb.has(n)?(Sa(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Jr}"`),null):n}function kb(n,i){let s,u,d,f,m;if(Sb(n)){let y=n.getAttribute("action");u=y?gn(y,i):null,s=n.getAttribute("method")||Kr,d=Zo(n.getAttribute("enctype"))||Jr,f=new FormData(n)}else if(wb(n)||jb(n)&&(n.type==="submit"||n.type==="image")){let y=n.form;if(y==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=n.getAttribute("formaction")||y.getAttribute("action");if(u=g?gn(g,i):null,s=n.getAttribute("formmethod")||y.getAttribute("method")||Kr,d=Zo(n.getAttribute("formenctype"))||Zo(y.getAttribute("enctype"))||Jr,f=new FormData(y,n),!Eb()){let{name:v,type:b,value:N}=n;if(b==="image"){let U=v?`${v}.`:"";f.append(`${U}x`,"0"),f.append(`${U}y`,"0")}else v&&f.append(v,N)}}else{if(pu(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=Kr,u=null,d=Jr,m=n}return f&&d==="text/plain"&&(m=f,f=void 0),{action:u,method:s.toLowerCase(),encType:d,formData:f,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Od(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function uy(n,i,s,u){let d=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return s?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${u}`:d.pathname=`${d.pathname}.${u}`:d.pathname==="/"?d.pathname=`_root.${u}`:i&&gn(d.pathname,i)==="/"?d.pathname=`${yi(i)}/_root.${u}`:d.pathname=`${yi(d.pathname)}.${u}`,d}async function Cb(n,i){if(n.id in i)return i[n.id];try{let s=await import(n.module);return i[n.id]=s,s}catch(s){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Tb(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Ob(n,i,s){let u=await Promise.all(n.map(async d=>{let f=i.routes[d.route.id];if(f){let m=await Cb(f,s);return m.links?m.links():[]}return[]}));return Ub(u.flat(1).filter(Tb).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function nx(n,i,s,u,d,f){let m=(g,v)=>s[v]?g.route.id!==s[v].route.id:!0,y=(g,v)=>{var b;return s[v].pathname!==g.pathname||((b=s[v].route.path)==null?void 0:b.endsWith("*"))&&s[v].params["*"]!==g.params["*"]};return f==="assets"?i.filter((g,v)=>m(g,v)||y(g,v)):f==="data"?i.filter((g,v)=>{var N;let b=u.routes[g.route.id];if(!b||!b.hasLoader)return!1;if(m(g,v)||y(g,v))return!0;if(g.route.shouldRevalidate){let U=g.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((N=s[0])==null?void 0:N.params)||{},nextUrl:new URL(n,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof U=="boolean")return U}return!0}):[]}function Mb(n,i,{includeHydrateFallback:s}={}){return Lb(n.map(u=>{let d=i.routes[u.route.id];if(!d)return[];let f=[d.module];return d.clientActionModule&&(f=f.concat(d.clientActionModule)),d.clientLoaderModule&&(f=f.concat(d.clientLoaderModule)),s&&d.hydrateFallbackModule&&(f=f.concat(d.hydrateFallbackModule)),d.imports&&(f=f.concat(d.imports)),f}).flat(1))}function Lb(n){return[...new Set(n)]}function Db(n){let i={},s=Object.keys(n).sort();for(let u of s)i[u]=n[u];return i}function Ub(n,i){let s=new Set;return new Set(i),n.reduce((u,d)=>{let f=JSON.stringify(Db(d));return s.has(f)||(s.add(f),u.push({key:f,link:d})),u},[])}function Md(){let n=w.useContext(wi);return Od(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function zb(){let n=w.useContext(mu);return Od(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Ld=w.createContext(void 0);Ld.displayName="FrameworkContext";function xu(){let n=w.useContext(Ld);return Od(n,"You must render this element inside a <HydratedRouter> element"),n}function Bb(n,i){let s=w.useContext(Ld),[u,d]=w.useState(!1),[f,m]=w.useState(!1),{onFocus:y,onBlur:g,onMouseEnter:v,onMouseLeave:b,onTouchStart:N}=i,U=w.useRef(null);w.useEffect(()=>{if(n==="render"&&m(!0),n==="viewport"){let V=B=>{B.forEach(Q=>{m(Q.isIntersecting)})},D=new IntersectionObserver(V,{threshold:.5});return U.current&&D.observe(U.current),()=>{D.disconnect()}}},[n]),w.useEffect(()=>{if(u){let V=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(V)}}},[u]);let K=()=>{d(!0)},C=()=>{d(!1),m(!1)};return s?n!=="intent"?[f,U,{}]:[f,U,{onFocus:xs(y,K),onBlur:xs(g,C),onMouseEnter:xs(v,K),onMouseLeave:xs(b,C),onTouchStart:xs(N,K)}]:[!1,U,{}]}function xs(n,i){return s=>{n&&n(s),s.defaultPrevented||i(s)}}function qb({page:n,...i}){let s=I0(),{nonce:u}=xu(),{router:d}=Md(),f=w.useMemo(()=>Zx(d.routes,n,d.basename),[d.routes,n,d.basename]);return f?(i.nonce==null&&u&&(i={...i,nonce:u}),s?w.createElement($b,{page:n,matches:f,...i}):w.createElement(Vb,{page:n,matches:f,...i})):null}function Hb(n){let{manifest:i,routeModules:s}=xu(),[u,d]=w.useState([]);return w.useEffect(()=>{let f=!1;return Ob(n,i,s).then(m=>{f||d(m)}),()=>{f=!0}},[n,i,s]),u}function $b({page:n,matches:i,...s}){let u=Da(),{future:d}=xu(),{basename:f}=Md(),m=w.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let y=uy(n,f,d.v8_trailingSlashAwareDataRequests,"rsc"),g=!1,v=[];for(let b of i)typeof b.route.shouldRevalidate=="function"?g=!0:v.push(b.route.id);return g&&v.length>0&&y.searchParams.set("_routes",v.join(",")),[y.pathname+y.search]},[f,d.v8_trailingSlashAwareDataRequests,n,u,i]);return w.createElement(w.Fragment,null,m.map(y=>w.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...s})))}function Vb({page:n,matches:i,...s}){let u=Da(),{future:d,manifest:f,routeModules:m}=xu(),{basename:y}=Md(),{loaderData:g,matches:v}=zb(),b=w.useMemo(()=>nx(n,i,v,f,u,"data"),[n,i,v,f,u]),N=w.useMemo(()=>nx(n,i,v,f,u,"assets"),[n,i,v,f,u]),U=w.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let V=new Set,D=!1;if(i.forEach(Q=>{var oe;let W=f.routes[Q.route.id];!W||!W.hasLoader||(!b.some(J=>J.route.id===Q.route.id)&&Q.route.id in g&&((oe=m[Q.route.id])!=null&&oe.shouldRevalidate)||W.hasClientLoader?D=!0:V.add(Q.route.id))}),V.size===0)return[];let B=uy(n,y,d.v8_trailingSlashAwareDataRequests,"data");return D&&V.size>0&&B.searchParams.set("_routes",i.filter(Q=>V.has(Q.route.id)).map(Q=>Q.route.id).join(",")),[B.pathname+B.search]},[y,d.v8_trailingSlashAwareDataRequests,g,u,f,b,i,n,m]),K=w.useMemo(()=>Mb(N,f),[N,f]),C=Hb(N);return w.createElement(w.Fragment,null,U.map(V=>w.createElement("link",{key:V,rel:"prefetch",as:"fetch",href:V,...s})),K.map(V=>w.createElement("link",{key:V,rel:"modulepreload",href:V,...s})),C.map(({key:V,link:D})=>w.createElement("link",{key:V,nonce:s.nonce,...D,crossOrigin:D.crossOrigin??s.crossOrigin})))}function Yb(...n){return i=>{n.forEach(s=>{typeof s=="function"?s(i):s!=null&&(s.current=i)})}}var Zb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Zb&&(window.__reactRouterVersion="7.18.4")}catch{}function Gb({basename:n,children:i,useTransitions:s,window:u}){let d=w.useRef();d.current==null&&(d.current=w0({window:u,v5Compat:!0}));let f=d.current,[m,y]=w.useState({action:f.action,location:f.location}),g=w.useCallback(v=>{s===!1?y(v):w.startTransition(()=>y(v))},[s]);return w.useLayoutEffect(()=>f.listen(g),[f,g]),w.createElement(gb,{basename:n,children:i,location:m.location,navigationType:m.action,navigator:f,useTransitions:s})}var ja=w.forwardRef(function({onClick:i,discover:s="render",prefetch:u="none",relative:d,reloadDocument:f,replace:m,mask:y,state:g,target:v,to:b,preventScrollReset:N,viewTransition:U,defaultShouldRevalidate:K,...C},V){let{basename:D,navigator:B,useTransitions:Q}=w.useContext(la),W=typeof b=="string"&&_d.test(b),oe=Fx(b,D);b=oe.to;let J=nb(b,{relative:d}),Ee=Da(),I=null;if(y){let Ie=hu(y,[],Ee.mask?Ee.mask.pathname:"/",!0);D!=="/"&&(Ie.pathname=Ie.pathname==="/"?D:Oa([D,Ie.pathname])),I=B.createHref(Ie)}let[ge,He,yt]=Bb(u,C),dt=Kb(b,{replace:m,mask:y,state:g,target:v,preventScrollReset:N,relative:d,viewTransition:U,defaultShouldRevalidate:K,useTransitions:Q});function Pe(Ie){i&&i(Ie),Ie.defaultPrevented||dt(Ie)}let Tt=!(oe.isExternal||f),gt=w.createElement("a",{...C,...yt,href:(Tt?I:void 0)||oe.absoluteURL||J,onClick:Tt?Pe:i,ref:Yb(V,He),target:v,"data-discover":!W&&s==="render"?"true":void 0});return ge&&!W?w.createElement(w.Fragment,null,gt,w.createElement(qb,{page:J})):gt});ja.displayName="Link";var Ir=w.forwardRef(function({"aria-current":i="page",caseSensitive:s=!1,className:u="",end:d=!1,style:f,to:m,viewTransition:y,children:g,...v},b){let N=ks(m,{relative:v.relative}),U=Da(),K=w.useContext(mu),{navigator:C,basename:V}=w.useContext(la),D=K!=null&&Pb(N)&&y===!0,B=C.encodeLocation?C.encodeLocation(N).pathname:N.pathname,Q=U.pathname,W=K&&K.navigation&&K.navigation.location?K.navigation.location.pathname:null;s||(Q=Q.toLowerCase(),W=W?W.toLowerCase():null,B=B.toLowerCase()),W&&V&&(W=gn(W,V)||W);const oe=B!=="/"&&B.endsWith("/")?B.length-1:B.length;let J=Q===B||!d&&Q.startsWith(B)&&Q.charAt(oe)==="/",Ee=W!=null&&(W===B||!d&&W.startsWith(B)&&W.charAt(B.length)==="/"),I={isActive:J,isPending:Ee,isTransitioning:D},ge=J?i:void 0,He;typeof u=="function"?He=u(I):He=[u,J?"active":null,Ee?"pending":null,D?"transitioning":null].filter(Boolean).join(" ");let yt=typeof f=="function"?f(I):f;return w.createElement(ja,{...v,"aria-current":ge,className:He,ref:b,style:yt,to:m,viewTransition:y},typeof g=="function"?g(I):g)});Ir.displayName="NavLink";var Qb=w.forwardRef(({discover:n="render",fetcherKey:i,navigate:s,reloadDocument:u,replace:d,state:f,method:m=Kr,action:y,onSubmit:g,relative:v,preventScrollReset:b,viewTransition:N,defaultShouldRevalidate:U,...K},C)=>{let{useTransitions:V}=w.useContext(la),D=Fb(),B=Wb(y,{relative:v}),Q=m.toLowerCase()==="get"?"get":"post",W=typeof y=="string"&&_d.test(y),oe=J=>{if(g&&g(J),J.defaultPrevented)return;J.preventDefault();let Ee=J.nativeEvent.submitter,I=(Ee==null?void 0:Ee.getAttribute("formmethod"))||m,ge=()=>D(Ee||J.currentTarget,{fetcherKey:i,method:I,navigate:s,replace:d,state:f,relative:v,preventScrollReset:b,viewTransition:N,defaultShouldRevalidate:U});V&&s!==!1?w.startTransition(()=>ge()):ge()};return w.createElement("form",{ref:C,method:Q,action:B,onSubmit:u?g:oe,...K,"data-discover":!W&&n==="render"?"true":void 0})});Qb.displayName="Form";function Xb(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function cy(n){let i=w.useContext(wi);return at(i,Xb(n)),i}function Kb(n,{target:i,replace:s,mask:u,state:d,preventScrollReset:f,relative:m,viewTransition:y,defaultShouldRevalidate:g,useTransitions:v}={}){let b=kd(),N=Da(),U=ks(n,{relative:m});return w.useCallback(K=>{if(Nb(K,i)){K.preventDefault();let C=s!==void 0?s:wl(N)===wl(U),V=()=>b(n,{replace:C,mask:u,state:d,preventScrollReset:f,relative:m,viewTransition:y,defaultShouldRevalidate:g});v?w.startTransition(()=>V()):V()}},[N,b,U,s,u,d,i,n,f,m,y,g,v])}function oy(n){Sa(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let i=w.useRef(ud(n)),s=w.useRef(!1),u=Da(),d=w.useMemo(()=>Ab(u.search,s.current?null:i.current),[u.search]),f=kd(),m=w.useCallback((y,g)=>{const v=ud(typeof y=="function"?y(new URLSearchParams(d)):y);s.current=!0,f("?"+v,g)},[f,d]);return[d,m]}var Jb=0,Ib=()=>`__${String(++Jb)}__`;function Fb(){let{router:n}=cy("useSubmit"),{basename:i}=w.useContext(la),s=pb(),u=n.fetch,d=n.navigate;return w.useCallback(async(f,m={})=>{let{action:y,method:g,encType:v,formData:b,body:N}=kb(f,i);if(m.navigate===!1){let U=m.fetcherKey||Ib();await u(U,s,m.action||y,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:b,body:N,formMethod:m.method||g,formEncType:m.encType||v,flushSync:m.flushSync})}else await d(m.action||y,{defaultShouldRevalidate:m.defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:b,body:N,formMethod:m.method||g,formEncType:m.encType||v,replace:m.replace,state:m.state,fromRouteId:s,flushSync:m.flushSync,viewTransition:m.viewTransition})},[u,d,i,s])}function Wb(n,{relative:i}={}){let{basename:s}=w.useContext(la),u=w.useContext(La);at(u,"useFormAction must be used inside a RouteContext");let[d]=u.matches.slice(-1),f={...ks(n||".",{relative:i})},m=Da();if(n==null){f.search=m.search;let y=new URLSearchParams(f.search),g=y.getAll("index");if(g.some(b=>b==="")){y.delete("index"),g.filter(N=>N).forEach(N=>y.append("index",N));let b=y.toString();f.search=b?`?${b}`:""}}return(!n||n===".")&&d.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(f.pathname=f.pathname==="/"?s:Oa([s,f.pathname])),wl(f)}function Pb(n,{relative:i}={}){let s=w.useContext(ey);at(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=cy("useViewTransitionState"),d=ks(n,{relative:i});if(!s.isTransitioning)return!1;let f=gn(s.currentLocation.pathname,u)||s.currentLocation.pathname,m=gn(s.nextLocation.pathname,u)||s.nextLocation.pathname;return Wr(d.pathname,m)!=null||Wr(d.pathname,f)!=null}var De;(function(n){n.assertEqual=d=>{};function i(d){}n.assertIs=i;function s(d){throw new Error}n.assertNever=s,n.arrayToEnum=d=>{const f={};for(const m of d)f[m]=m;return f},n.getValidEnumValues=d=>{const f=n.objectKeys(d).filter(y=>typeof d[d[y]]!="number"),m={};for(const y of f)m[y]=d[y];return n.objectValues(m)},n.objectValues=d=>n.objectKeys(d).map(function(f){return d[f]}),n.objectKeys=typeof Object.keys=="function"?d=>Object.keys(d):d=>{const f=[];for(const m in d)Object.prototype.hasOwnProperty.call(d,m)&&f.push(m);return f},n.find=(d,f)=>{for(const m of d)if(f(m))return m},n.isInteger=typeof Number.isInteger=="function"?d=>Number.isInteger(d):d=>typeof d=="number"&&Number.isFinite(d)&&Math.floor(d)===d;function u(d,f=" | "){return d.map(m=>typeof m=="string"?`'${m}'`:m).join(f)}n.joinValues=u,n.jsonStringifyReplacer=(d,f)=>typeof f=="bigint"?f.toString():f})(De||(De={}));var lx;(function(n){n.mergeShapes=(i,s)=>({...i,...s})})(lx||(lx={}));const te=De.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Jn=n=>{switch(typeof n){case"undefined":return te.undefined;case"string":return te.string;case"number":return Number.isNaN(n)?te.nan:te.number;case"boolean":return te.boolean;case"function":return te.function;case"bigint":return te.bigint;case"symbol":return te.symbol;case"object":return Array.isArray(n)?te.array:n===null?te.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?te.promise:typeof Map<"u"&&n instanceof Map?te.map:typeof Set<"u"&&n instanceof Set?te.set:typeof Date<"u"&&n instanceof Date?te.date:te.object;default:return te.unknown}},X=De.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class bn extends Error{get errors(){return this.issues}constructor(i){super(),this.issues=[],this.addIssue=u=>{this.issues=[...this.issues,u]},this.addIssues=(u=[])=>{this.issues=[...this.issues,...u]};const s=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,s):this.__proto__=s,this.name="ZodError",this.issues=i}format(i){const s=i||function(f){return f.message},u={_errors:[]},d=f=>{for(const m of f.issues)if(m.code==="invalid_union")m.unionErrors.map(d);else if(m.code==="invalid_return_type")d(m.returnTypeError);else if(m.code==="invalid_arguments")d(m.argumentsError);else if(m.path.length===0)u._errors.push(s(m));else{let y=u,g=0;for(;g<m.path.length;){const v=m.path[g];g===m.path.length-1?(y[v]=y[v]||{_errors:[]},y[v]._errors.push(s(m))):y[v]=y[v]||{_errors:[]},y=y[v],g++}}};return d(this),u}static assert(i){if(!(i instanceof bn))throw new Error(`Not a ZodError: ${i}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,De.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(i=s=>s.message){const s={},u=[];for(const d of this.issues)if(d.path.length>0){const f=d.path[0];s[f]=s[f]||[],s[f].push(i(d))}else u.push(i(d));return{formErrors:u,fieldErrors:s}}get formErrors(){return this.flatten()}}bn.create=n=>new bn(n);const cd=(n,i)=>{let s;switch(n.code){case X.invalid_type:n.received===te.undefined?s="Required":s=`Expected ${n.expected}, received ${n.received}`;break;case X.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(n.expected,De.jsonStringifyReplacer)}`;break;case X.unrecognized_keys:s=`Unrecognized key(s) in object: ${De.joinValues(n.keys,", ")}`;break;case X.invalid_union:s="Invalid input";break;case X.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${De.joinValues(n.options)}`;break;case X.invalid_enum_value:s=`Invalid enum value. Expected ${De.joinValues(n.options)}, received '${n.received}'`;break;case X.invalid_arguments:s="Invalid function arguments";break;case X.invalid_return_type:s="Invalid function return type";break;case X.invalid_date:s="Invalid date";break;case X.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(s=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(s=`${s} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?s=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?s=`Invalid input: must end with "${n.validation.endsWith}"`:De.assertNever(n.validation):n.validation!=="regex"?s=`Invalid ${n.validation}`:s="Invalid";break;case X.too_small:n.type==="array"?s=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?s=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?s=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="bigint"?s=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?s=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:s="Invalid input";break;case X.too_big:n.type==="array"?s=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?s=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?s=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?s=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?s=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:s="Invalid input";break;case X.custom:s="Invalid input";break;case X.invalid_intersection_types:s="Intersection results could not be merged";break;case X.not_multiple_of:s=`Number must be a multiple of ${n.multipleOf}`;break;case X.not_finite:s="Number must be finite";break;default:s=i.defaultError,De.assertNever(n)}return{message:s}};let e1=cd;function t1(){return e1}const a1=n=>{const{data:i,path:s,errorMaps:u,issueData:d}=n,f=[...s,...d.path||[]],m={...d,path:f};if(d.message!==void 0)return{...d,path:f,message:d.message};let y="";const g=u.filter(v=>!!v).slice().reverse();for(const v of g)y=v(m,{data:i,defaultError:y}).message;return{...d,path:f,message:y}};function P(n,i){const s=t1(),u=a1({issueData:i,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,s,s===cd?void 0:cd].filter(d=>!!d)});n.common.issues.push(u)}class Dt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(i,s){const u=[];for(const d of s){if(d.status==="aborted")return me;d.status==="dirty"&&i.dirty(),u.push(d.value)}return{status:i.value,value:u}}static async mergeObjectAsync(i,s){const u=[];for(const d of s){const f=await d.key,m=await d.value;u.push({key:f,value:m})}return Dt.mergeObjectSync(i,u)}static mergeObjectSync(i,s){const u={};for(const d of s){const{key:f,value:m}=d;if(f.status==="aborted"||m.status==="aborted")return me;f.status==="dirty"&&i.dirty(),m.status==="dirty"&&i.dirty(),f.value!=="__proto__"&&(typeof m.value<"u"||d.alwaysSet)&&(u[f.value]=m.value)}return{status:i.value,value:u}}}const me=Object.freeze({status:"aborted"}),vs=n=>({status:"dirty",value:n}),_a=n=>({status:"valid",value:n}),ix=n=>n.status==="aborted",sx=n=>n.status==="dirty",vi=n=>n.status==="valid",Pr=n=>typeof Promise<"u"&&n instanceof Promise;var se;(function(n){n.errToObj=i=>typeof i=="string"?{message:i}:i||{},n.toString=i=>typeof i=="string"?i:i==null?void 0:i.message})(se||(se={}));class Ga{constructor(i,s,u,d){this._cachedPath=[],this.parent=i,this.data=s,this._path=u,this._key=d}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const rx=(n,i)=>{if(vi(i))return{success:!0,data:i.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const s=new bn(n.common.issues);return this._error=s,this._error}}};function we(n){if(!n)return{};const{errorMap:i,invalid_type_error:s,required_error:u,description:d}=n;if(i&&(s||u))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return i?{errorMap:i,description:d}:{errorMap:(m,y)=>{const{message:g}=n;return m.code==="invalid_enum_value"?{message:g??y.defaultError}:typeof y.data>"u"?{message:g??u??y.defaultError}:m.code!=="invalid_type"?{message:y.defaultError}:{message:g??s??y.defaultError}},description:d}}class Ae{get description(){return this._def.description}_getType(i){return Jn(i.data)}_getOrReturnCtx(i,s){return s||{common:i.parent.common,data:i.data,parsedType:Jn(i.data),schemaErrorMap:this._def.errorMap,path:i.path,parent:i.parent}}_processInputParams(i){return{status:new Dt,ctx:{common:i.parent.common,data:i.data,parsedType:Jn(i.data),schemaErrorMap:this._def.errorMap,path:i.path,parent:i.parent}}}_parseSync(i){const s=this._parse(i);if(Pr(s))throw new Error("Synchronous parse encountered promise.");return s}_parseAsync(i){const s=this._parse(i);return Promise.resolve(s)}parse(i,s){const u=this.safeParse(i,s);if(u.success)return u.data;throw u.error}safeParse(i,s){const u={common:{issues:[],async:(s==null?void 0:s.async)??!1,contextualErrorMap:s==null?void 0:s.errorMap},path:(s==null?void 0:s.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:i,parsedType:Jn(i)},d=this._parseSync({data:i,path:u.path,parent:u});return rx(u,d)}"~validate"(i){var u,d;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:i,parsedType:Jn(i)};if(!this["~standard"].async)try{const f=this._parseSync({data:i,path:[],parent:s});return vi(f)?{value:f.value}:{issues:s.common.issues}}catch(f){(d=(u=f==null?void 0:f.message)==null?void 0:u.toLowerCase())!=null&&d.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:i,path:[],parent:s}).then(f=>vi(f)?{value:f.value}:{issues:s.common.issues})}async parseAsync(i,s){const u=await this.safeParseAsync(i,s);if(u.success)return u.data;throw u.error}async safeParseAsync(i,s){const u={common:{issues:[],contextualErrorMap:s==null?void 0:s.errorMap,async:!0},path:(s==null?void 0:s.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:i,parsedType:Jn(i)},d=this._parse({data:i,path:u.path,parent:u}),f=await(Pr(d)?d:Promise.resolve(d));return rx(u,f)}refine(i,s){const u=d=>typeof s=="string"||typeof s>"u"?{message:s}:typeof s=="function"?s(d):s;return this._refinement((d,f)=>{const m=i(d),y=()=>f.addIssue({code:X.custom,...u(d)});return typeof Promise<"u"&&m instanceof Promise?m.then(g=>g?!0:(y(),!1)):m?!0:(y(),!1)})}refinement(i,s){return this._refinement((u,d)=>i(u)?!0:(d.addIssue(typeof s=="function"?s(u,d):s),!1))}_refinement(i){return new Al({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:i}})}superRefine(i){return this._refinement(i)}constructor(i){this.spa=this.safeParseAsync,this._def=i,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:s=>this["~validate"](s)}}optional(){return vn.create(this,this._def)}nullable(){return El.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Za.create(this)}promise(){return iu.create(this,this._def)}or(i){return tu.create([this,i],this._def)}and(i){return au.create(this,i,this._def)}transform(i){return new Al({...we(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:i}})}default(i){const s=typeof i=="function"?i:()=>i;return new su({...we(this._def),innerType:this,defaultValue:s,typeName:pe.ZodDefault})}brand(){return new my({typeName:pe.ZodBranded,type:this,...we(this._def)})}catch(i){const s=typeof i=="function"?i:()=>i;return new ru({...we(this._def),innerType:this,catchValue:s,typeName:pe.ZodCatch})}describe(i){const s=this.constructor;return new s({...this._def,description:i})}pipe(i){return Ud.create(this,i)}readonly(){return uu.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const n1=/^c[^\s-]{8,}$/i,l1=/^[0-9a-z]+$/,i1=/^[0-9A-HJKMNP-TV-Z]{26}$/i,s1=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,r1=/^[a-z0-9_-]{21}$/i,u1=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,c1=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,o1=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,d1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Go;const f1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,h1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,m1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,p1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,x1=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,y1=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dy="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",v1=new RegExp(`^${dy}$`);function fy(n){let i="[0-5]\\d";n.precision?i=`${i}\\.\\d{${n.precision}}`:n.precision==null&&(i=`${i}(\\.\\d+)?`);const s=n.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${i})${s}`}function g1(n){return new RegExp(`^${fy(n)}$`)}function b1(n){let i=`${dy}T${fy(n)}`;const s=[];return s.push(n.local?"Z?":"Z"),n.offset&&s.push("([+-]\\d{2}:?\\d{2})"),i=`${i}(${s.join("|")})`,new RegExp(`^${i}$`)}function w1(n,i){return!!((i==="v4"||!i)&&f1.test(n)||(i==="v6"||!i)&&m1.test(n))}function S1(n,i){if(!u1.test(n))return!1;try{const[s]=n.split(".");if(!s)return!1;const u=s.replace(/-/g,"+").replace(/_/g,"/").padEnd(s.length+(4-s.length%4)%4,"="),d=JSON.parse(atob(u));return!(typeof d!="object"||d===null||"typ"in d&&(d==null?void 0:d.typ)!=="JWT"||!d.alg||i&&d.alg!==i)}catch{return!1}}function j1(n,i){return!!((i==="v4"||!i)&&h1.test(n)||(i==="v6"||!i)&&p1.test(n))}class Va extends Ae{_parse(i){if(this._def.coerce&&(i.data=String(i.data)),this._getType(i)!==te.string){const f=this._getOrReturnCtx(i);return P(f,{code:X.invalid_type,expected:te.string,received:f.parsedType}),me}const u=new Dt;let d;for(const f of this._def.checks)if(f.kind==="min")i.data.length<f.value&&(d=this._getOrReturnCtx(i,d),P(d,{code:X.too_small,minimum:f.value,type:"string",inclusive:!0,exact:!1,message:f.message}),u.dirty());else if(f.kind==="max")i.data.length>f.value&&(d=this._getOrReturnCtx(i,d),P(d,{code:X.too_big,maximum:f.value,type:"string",inclusive:!0,exact:!1,message:f.message}),u.dirty());else if(f.kind==="length"){const m=i.data.length>f.value,y=i.data.length<f.value;(m||y)&&(d=this._getOrReturnCtx(i,d),m?P(d,{code:X.too_big,maximum:f.value,type:"string",inclusive:!0,exact:!0,message:f.message}):y&&P(d,{code:X.too_small,minimum:f.value,type:"string",inclusive:!0,exact:!0,message:f.message}),u.dirty())}else if(f.kind==="email")o1.test(i.data)||(d=this._getOrReturnCtx(i,d),P(d,{validation:"email",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="emoji")Go||(Go=new RegExp(d1,"u")),Go.test(i.data)||(d=this._getOrReturnCtx(i,d),P(d,{validation:"emoji",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="uuid")s1.test(i.data)||(d=this._getOrReturnCtx(i,d),P(d,{validation:"uuid",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="nanoid")r1.test(i.data)||(d=this._getOrReturnCtx(i,d),P(d,{validation:"nanoid",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="cuid")n1.test(i.data)||(d=this._getOrReturnCtx(i,d),P(d,{validation:"cuid",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="cuid2")l1.test(i.data)||(d=this._getOrReturnCtx(i,d),P(d,{validation:"cuid2",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="ulid")i1.test(i.data)||(d=this._getOrReturnCtx(i,d),P(d,{validation:"ulid",code:X.invalid_string,message:f.message}),u.dirty());else if(f.kind==="url")try{new URL(i.data)}catch{d=this._getOrReturnCtx(i,d),P(d,{validation:"url",code:X.invalid_string,message:f.message}),u.dirty()}else f.kind==="regex"?(f.regex.lastIndex=0,f.regex.test(i.data)||(d=this._getOrReturnCtx(i,d),P(d,{validation:"regex",code:X.invalid_string,message:f.message}),u.dirty())):f.kind==="trim"?i.data=i.data.trim():f.kind==="includes"?i.data.includes(f.value,f.position)||(d=this._getOrReturnCtx(i,d),P(d,{code:X.invalid_string,validation:{includes:f.value,position:f.position},message:f.message}),u.dirty()):f.kind==="toLowerCase"?i.data=i.data.toLowerCase():f.kind==="toUpperCase"?i.data=i.data.toUpperCase():f.kind==="startsWith"?i.data.startsWith(f.value)||(d=this._getOrReturnCtx(i,d),P(d,{code:X.invalid_string,validation:{startsWith:f.value},message:f.message}),u.dirty()):f.kind==="endsWith"?i.data.endsWith(f.value)||(d=this._getOrReturnCtx(i,d),P(d,{code:X.invalid_string,validation:{endsWith:f.value},message:f.message}),u.dirty()):f.kind==="datetime"?b1(f).test(i.data)||(d=this._getOrReturnCtx(i,d),P(d,{code:X.invalid_string,validation:"datetime",message:f.message}),u.dirty()):f.kind==="date"?v1.test(i.data)||(d=this._getOrReturnCtx(i,d),P(d,{code:X.invalid_string,validation:"date",message:f.message}),u.dirty()):f.kind==="time"?g1(f).test(i.data)||(d=this._getOrReturnCtx(i,d),P(d,{code:X.invalid_string,validation:"time",message:f.message}),u.dirty()):f.kind==="duration"?c1.test(i.data)||(d=this._getOrReturnCtx(i,d),P(d,{validation:"duration",code:X.invalid_string,message:f.message}),u.dirty()):f.kind==="ip"?w1(i.data,f.version)||(d=this._getOrReturnCtx(i,d),P(d,{validation:"ip",code:X.invalid_string,message:f.message}),u.dirty()):f.kind==="jwt"?S1(i.data,f.alg)||(d=this._getOrReturnCtx(i,d),P(d,{validation:"jwt",code:X.invalid_string,message:f.message}),u.dirty()):f.kind==="cidr"?j1(i.data,f.version)||(d=this._getOrReturnCtx(i,d),P(d,{validation:"cidr",code:X.invalid_string,message:f.message}),u.dirty()):f.kind==="base64"?x1.test(i.data)||(d=this._getOrReturnCtx(i,d),P(d,{validation:"base64",code:X.invalid_string,message:f.message}),u.dirty()):f.kind==="base64url"?y1.test(i.data)||(d=this._getOrReturnCtx(i,d),P(d,{validation:"base64url",code:X.invalid_string,message:f.message}),u.dirty()):De.assertNever(f);return{status:u.value,value:i.data}}_regex(i,s,u){return this.refinement(d=>i.test(d),{validation:s,code:X.invalid_string,...se.errToObj(u)})}_addCheck(i){return new Va({...this._def,checks:[...this._def.checks,i]})}email(i){return this._addCheck({kind:"email",...se.errToObj(i)})}url(i){return this._addCheck({kind:"url",...se.errToObj(i)})}emoji(i){return this._addCheck({kind:"emoji",...se.errToObj(i)})}uuid(i){return this._addCheck({kind:"uuid",...se.errToObj(i)})}nanoid(i){return this._addCheck({kind:"nanoid",...se.errToObj(i)})}cuid(i){return this._addCheck({kind:"cuid",...se.errToObj(i)})}cuid2(i){return this._addCheck({kind:"cuid2",...se.errToObj(i)})}ulid(i){return this._addCheck({kind:"ulid",...se.errToObj(i)})}base64(i){return this._addCheck({kind:"base64",...se.errToObj(i)})}base64url(i){return this._addCheck({kind:"base64url",...se.errToObj(i)})}jwt(i){return this._addCheck({kind:"jwt",...se.errToObj(i)})}ip(i){return this._addCheck({kind:"ip",...se.errToObj(i)})}cidr(i){return this._addCheck({kind:"cidr",...se.errToObj(i)})}datetime(i){return typeof i=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:i}):this._addCheck({kind:"datetime",precision:typeof(i==null?void 0:i.precision)>"u"?null:i==null?void 0:i.precision,offset:(i==null?void 0:i.offset)??!1,local:(i==null?void 0:i.local)??!1,...se.errToObj(i==null?void 0:i.message)})}date(i){return this._addCheck({kind:"date",message:i})}time(i){return typeof i=="string"?this._addCheck({kind:"time",precision:null,message:i}):this._addCheck({kind:"time",precision:typeof(i==null?void 0:i.precision)>"u"?null:i==null?void 0:i.precision,...se.errToObj(i==null?void 0:i.message)})}duration(i){return this._addCheck({kind:"duration",...se.errToObj(i)})}regex(i,s){return this._addCheck({kind:"regex",regex:i,...se.errToObj(s)})}includes(i,s){return this._addCheck({kind:"includes",value:i,position:s==null?void 0:s.position,...se.errToObj(s==null?void 0:s.message)})}startsWith(i,s){return this._addCheck({kind:"startsWith",value:i,...se.errToObj(s)})}endsWith(i,s){return this._addCheck({kind:"endsWith",value:i,...se.errToObj(s)})}min(i,s){return this._addCheck({kind:"min",value:i,...se.errToObj(s)})}max(i,s){return this._addCheck({kind:"max",value:i,...se.errToObj(s)})}length(i,s){return this._addCheck({kind:"length",value:i,...se.errToObj(s)})}nonempty(i){return this.min(1,se.errToObj(i))}trim(){return new Va({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Va({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Va({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(i=>i.kind==="datetime")}get isDate(){return!!this._def.checks.find(i=>i.kind==="date")}get isTime(){return!!this._def.checks.find(i=>i.kind==="time")}get isDuration(){return!!this._def.checks.find(i=>i.kind==="duration")}get isEmail(){return!!this._def.checks.find(i=>i.kind==="email")}get isURL(){return!!this._def.checks.find(i=>i.kind==="url")}get isEmoji(){return!!this._def.checks.find(i=>i.kind==="emoji")}get isUUID(){return!!this._def.checks.find(i=>i.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(i=>i.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(i=>i.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(i=>i.kind==="cuid2")}get isULID(){return!!this._def.checks.find(i=>i.kind==="ulid")}get isIP(){return!!this._def.checks.find(i=>i.kind==="ip")}get isCIDR(){return!!this._def.checks.find(i=>i.kind==="cidr")}get isBase64(){return!!this._def.checks.find(i=>i.kind==="base64")}get isBase64url(){return!!this._def.checks.find(i=>i.kind==="base64url")}get minLength(){let i=null;for(const s of this._def.checks)s.kind==="min"&&(i===null||s.value>i)&&(i=s.value);return i}get maxLength(){let i=null;for(const s of this._def.checks)s.kind==="max"&&(i===null||s.value<i)&&(i=s.value);return i}}Va.create=n=>new Va({checks:[],typeName:pe.ZodString,coerce:(n==null?void 0:n.coerce)??!1,...we(n)});function _1(n,i){const s=(n.toString().split(".")[1]||"").length,u=(i.toString().split(".")[1]||"").length,d=s>u?s:u,f=Number.parseInt(n.toFixed(d).replace(".","")),m=Number.parseInt(i.toFixed(d).replace(".",""));return f%m/10**d}class Sl extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(i){if(this._def.coerce&&(i.data=Number(i.data)),this._getType(i)!==te.number){const f=this._getOrReturnCtx(i);return P(f,{code:X.invalid_type,expected:te.number,received:f.parsedType}),me}let u;const d=new Dt;for(const f of this._def.checks)f.kind==="int"?De.isInteger(i.data)||(u=this._getOrReturnCtx(i,u),P(u,{code:X.invalid_type,expected:"integer",received:"float",message:f.message}),d.dirty()):f.kind==="min"?(f.inclusive?i.data<f.value:i.data<=f.value)&&(u=this._getOrReturnCtx(i,u),P(u,{code:X.too_small,minimum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),d.dirty()):f.kind==="max"?(f.inclusive?i.data>f.value:i.data>=f.value)&&(u=this._getOrReturnCtx(i,u),P(u,{code:X.too_big,maximum:f.value,type:"number",inclusive:f.inclusive,exact:!1,message:f.message}),d.dirty()):f.kind==="multipleOf"?_1(i.data,f.value)!==0&&(u=this._getOrReturnCtx(i,u),P(u,{code:X.not_multiple_of,multipleOf:f.value,message:f.message}),d.dirty()):f.kind==="finite"?Number.isFinite(i.data)||(u=this._getOrReturnCtx(i,u),P(u,{code:X.not_finite,message:f.message}),d.dirty()):De.assertNever(f);return{status:d.value,value:i.data}}gte(i,s){return this.setLimit("min",i,!0,se.toString(s))}gt(i,s){return this.setLimit("min",i,!1,se.toString(s))}lte(i,s){return this.setLimit("max",i,!0,se.toString(s))}lt(i,s){return this.setLimit("max",i,!1,se.toString(s))}setLimit(i,s,u,d){return new Sl({...this._def,checks:[...this._def.checks,{kind:i,value:s,inclusive:u,message:se.toString(d)}]})}_addCheck(i){return new Sl({...this._def,checks:[...this._def.checks,i]})}int(i){return this._addCheck({kind:"int",message:se.toString(i)})}positive(i){return this._addCheck({kind:"min",value:0,inclusive:!1,message:se.toString(i)})}negative(i){return this._addCheck({kind:"max",value:0,inclusive:!1,message:se.toString(i)})}nonpositive(i){return this._addCheck({kind:"max",value:0,inclusive:!0,message:se.toString(i)})}nonnegative(i){return this._addCheck({kind:"min",value:0,inclusive:!0,message:se.toString(i)})}multipleOf(i,s){return this._addCheck({kind:"multipleOf",value:i,message:se.toString(s)})}finite(i){return this._addCheck({kind:"finite",message:se.toString(i)})}safe(i){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:se.toString(i)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:se.toString(i)})}get minValue(){let i=null;for(const s of this._def.checks)s.kind==="min"&&(i===null||s.value>i)&&(i=s.value);return i}get maxValue(){let i=null;for(const s of this._def.checks)s.kind==="max"&&(i===null||s.value<i)&&(i=s.value);return i}get isInt(){return!!this._def.checks.find(i=>i.kind==="int"||i.kind==="multipleOf"&&De.isInteger(i.value))}get isFinite(){let i=null,s=null;for(const u of this._def.checks){if(u.kind==="finite"||u.kind==="int"||u.kind==="multipleOf")return!0;u.kind==="min"?(s===null||u.value>s)&&(s=u.value):u.kind==="max"&&(i===null||u.value<i)&&(i=u.value)}return Number.isFinite(s)&&Number.isFinite(i)}}Sl.create=n=>new Sl({checks:[],typeName:pe.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...we(n)});class jl extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(i){if(this._def.coerce)try{i.data=BigInt(i.data)}catch{return this._getInvalidInput(i)}if(this._getType(i)!==te.bigint)return this._getInvalidInput(i);let u;const d=new Dt;for(const f of this._def.checks)f.kind==="min"?(f.inclusive?i.data<f.value:i.data<=f.value)&&(u=this._getOrReturnCtx(i,u),P(u,{code:X.too_small,type:"bigint",minimum:f.value,inclusive:f.inclusive,message:f.message}),d.dirty()):f.kind==="max"?(f.inclusive?i.data>f.value:i.data>=f.value)&&(u=this._getOrReturnCtx(i,u),P(u,{code:X.too_big,type:"bigint",maximum:f.value,inclusive:f.inclusive,message:f.message}),d.dirty()):f.kind==="multipleOf"?i.data%f.value!==BigInt(0)&&(u=this._getOrReturnCtx(i,u),P(u,{code:X.not_multiple_of,multipleOf:f.value,message:f.message}),d.dirty()):De.assertNever(f);return{status:d.value,value:i.data}}_getInvalidInput(i){const s=this._getOrReturnCtx(i);return P(s,{code:X.invalid_type,expected:te.bigint,received:s.parsedType}),me}gte(i,s){return this.setLimit("min",i,!0,se.toString(s))}gt(i,s){return this.setLimit("min",i,!1,se.toString(s))}lte(i,s){return this.setLimit("max",i,!0,se.toString(s))}lt(i,s){return this.setLimit("max",i,!1,se.toString(s))}setLimit(i,s,u,d){return new jl({...this._def,checks:[...this._def.checks,{kind:i,value:s,inclusive:u,message:se.toString(d)}]})}_addCheck(i){return new jl({...this._def,checks:[...this._def.checks,i]})}positive(i){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:se.toString(i)})}negative(i){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:se.toString(i)})}nonpositive(i){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:se.toString(i)})}nonnegative(i){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:se.toString(i)})}multipleOf(i,s){return this._addCheck({kind:"multipleOf",value:i,message:se.toString(s)})}get minValue(){let i=null;for(const s of this._def.checks)s.kind==="min"&&(i===null||s.value>i)&&(i=s.value);return i}get maxValue(){let i=null;for(const s of this._def.checks)s.kind==="max"&&(i===null||s.value<i)&&(i=s.value);return i}}jl.create=n=>new jl({checks:[],typeName:pe.ZodBigInt,coerce:(n==null?void 0:n.coerce)??!1,...we(n)});class eu extends Ae{_parse(i){if(this._def.coerce&&(i.data=!!i.data),this._getType(i)!==te.boolean){const u=this._getOrReturnCtx(i);return P(u,{code:X.invalid_type,expected:te.boolean,received:u.parsedType}),me}return _a(i.data)}}eu.create=n=>new eu({typeName:pe.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...we(n)});class gi extends Ae{_parse(i){if(this._def.coerce&&(i.data=new Date(i.data)),this._getType(i)!==te.date){const f=this._getOrReturnCtx(i);return P(f,{code:X.invalid_type,expected:te.date,received:f.parsedType}),me}if(Number.isNaN(i.data.getTime())){const f=this._getOrReturnCtx(i);return P(f,{code:X.invalid_date}),me}const u=new Dt;let d;for(const f of this._def.checks)f.kind==="min"?i.data.getTime()<f.value&&(d=this._getOrReturnCtx(i,d),P(d,{code:X.too_small,message:f.message,inclusive:!0,exact:!1,minimum:f.value,type:"date"}),u.dirty()):f.kind==="max"?i.data.getTime()>f.value&&(d=this._getOrReturnCtx(i,d),P(d,{code:X.too_big,message:f.message,inclusive:!0,exact:!1,maximum:f.value,type:"date"}),u.dirty()):De.assertNever(f);return{status:u.value,value:new Date(i.data.getTime())}}_addCheck(i){return new gi({...this._def,checks:[...this._def.checks,i]})}min(i,s){return this._addCheck({kind:"min",value:i.getTime(),message:se.toString(s)})}max(i,s){return this._addCheck({kind:"max",value:i.getTime(),message:se.toString(s)})}get minDate(){let i=null;for(const s of this._def.checks)s.kind==="min"&&(i===null||s.value>i)&&(i=s.value);return i!=null?new Date(i):null}get maxDate(){let i=null;for(const s of this._def.checks)s.kind==="max"&&(i===null||s.value<i)&&(i=s.value);return i!=null?new Date(i):null}}gi.create=n=>new gi({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:pe.ZodDate,...we(n)});class ux extends Ae{_parse(i){if(this._getType(i)!==te.symbol){const u=this._getOrReturnCtx(i);return P(u,{code:X.invalid_type,expected:te.symbol,received:u.parsedType}),me}return _a(i.data)}}ux.create=n=>new ux({typeName:pe.ZodSymbol,...we(n)});class od extends Ae{_parse(i){if(this._getType(i)!==te.undefined){const u=this._getOrReturnCtx(i);return P(u,{code:X.invalid_type,expected:te.undefined,received:u.parsedType}),me}return _a(i.data)}}od.create=n=>new od({typeName:pe.ZodUndefined,...we(n)});class dd extends Ae{_parse(i){if(this._getType(i)!==te.null){const u=this._getOrReturnCtx(i);return P(u,{code:X.invalid_type,expected:te.null,received:u.parsedType}),me}return _a(i.data)}}dd.create=n=>new dd({typeName:pe.ZodNull,...we(n)});class cx extends Ae{constructor(){super(...arguments),this._any=!0}_parse(i){return _a(i.data)}}cx.create=n=>new cx({typeName:pe.ZodAny,...we(n)});class fd extends Ae{constructor(){super(...arguments),this._unknown=!0}_parse(i){return _a(i.data)}}fd.create=n=>new fd({typeName:pe.ZodUnknown,...we(n)});class Wn extends Ae{_parse(i){const s=this._getOrReturnCtx(i);return P(s,{code:X.invalid_type,expected:te.never,received:s.parsedType}),me}}Wn.create=n=>new Wn({typeName:pe.ZodNever,...we(n)});class ox extends Ae{_parse(i){if(this._getType(i)!==te.undefined){const u=this._getOrReturnCtx(i);return P(u,{code:X.invalid_type,expected:te.void,received:u.parsedType}),me}return _a(i.data)}}ox.create=n=>new ox({typeName:pe.ZodVoid,...we(n)});class Za extends Ae{_parse(i){const{ctx:s,status:u}=this._processInputParams(i),d=this._def;if(s.parsedType!==te.array)return P(s,{code:X.invalid_type,expected:te.array,received:s.parsedType}),me;if(d.exactLength!==null){const m=s.data.length>d.exactLength.value,y=s.data.length<d.exactLength.value;(m||y)&&(P(s,{code:m?X.too_big:X.too_small,minimum:y?d.exactLength.value:void 0,maximum:m?d.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:d.exactLength.message}),u.dirty())}if(d.minLength!==null&&s.data.length<d.minLength.value&&(P(s,{code:X.too_small,minimum:d.minLength.value,type:"array",inclusive:!0,exact:!1,message:d.minLength.message}),u.dirty()),d.maxLength!==null&&s.data.length>d.maxLength.value&&(P(s,{code:X.too_big,maximum:d.maxLength.value,type:"array",inclusive:!0,exact:!1,message:d.maxLength.message}),u.dirty()),s.common.async)return Promise.all([...s.data].map((m,y)=>d.type._parseAsync(new Ga(s,m,s.path,y)))).then(m=>Dt.mergeArray(u,m));const f=[...s.data].map((m,y)=>d.type._parseSync(new Ga(s,m,s.path,y)));return Dt.mergeArray(u,f)}get element(){return this._def.type}min(i,s){return new Za({...this._def,minLength:{value:i,message:se.toString(s)}})}max(i,s){return new Za({...this._def,maxLength:{value:i,message:se.toString(s)}})}length(i,s){return new Za({...this._def,exactLength:{value:i,message:se.toString(s)}})}nonempty(i){return this.min(1,i)}}Za.create=(n,i)=>new Za({type:n,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray,...we(i)});function pi(n){if(n instanceof xt){const i={};for(const s in n.shape){const u=n.shape[s];i[s]=vn.create(pi(u))}return new xt({...n._def,shape:()=>i})}else return n instanceof Za?new Za({...n._def,type:pi(n.element)}):n instanceof vn?vn.create(pi(n.unwrap())):n instanceof El?El.create(pi(n.unwrap())):n instanceof _l?_l.create(n.items.map(i=>pi(i))):n}class xt extends Ae{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const i=this._def.shape(),s=De.objectKeys(i);return this._cached={shape:i,keys:s},this._cached}_parse(i){if(this._getType(i)!==te.object){const v=this._getOrReturnCtx(i);return P(v,{code:X.invalid_type,expected:te.object,received:v.parsedType}),me}const{status:u,ctx:d}=this._processInputParams(i),{shape:f,keys:m}=this._getCached(),y=[];if(!(this._def.catchall instanceof Wn&&this._def.unknownKeys==="strip"))for(const v in d.data)m.includes(v)||y.push(v);const g=[];for(const v of m){const b=f[v],N=d.data[v];g.push({key:{status:"valid",value:v},value:b._parse(new Ga(d,N,d.path,v)),alwaysSet:v in d.data})}if(this._def.catchall instanceof Wn){const v=this._def.unknownKeys;if(v==="passthrough")for(const b of y)g.push({key:{status:"valid",value:b},value:{status:"valid",value:d.data[b]}});else if(v==="strict")y.length>0&&(P(d,{code:X.unrecognized_keys,keys:y}),u.dirty());else if(v!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const v=this._def.catchall;for(const b of y){const N=d.data[b];g.push({key:{status:"valid",value:b},value:v._parse(new Ga(d,N,d.path,b)),alwaysSet:b in d.data})}}return d.common.async?Promise.resolve().then(async()=>{const v=[];for(const b of g){const N=await b.key,U=await b.value;v.push({key:N,value:U,alwaysSet:b.alwaysSet})}return v}).then(v=>Dt.mergeObjectSync(u,v)):Dt.mergeObjectSync(u,g)}get shape(){return this._def.shape()}strict(i){return se.errToObj,new xt({...this._def,unknownKeys:"strict",...i!==void 0?{errorMap:(s,u)=>{var f,m;const d=((m=(f=this._def).errorMap)==null?void 0:m.call(f,s,u).message)??u.defaultError;return s.code==="unrecognized_keys"?{message:se.errToObj(i).message??d}:{message:d}}}:{}})}strip(){return new xt({...this._def,unknownKeys:"strip"})}passthrough(){return new xt({...this._def,unknownKeys:"passthrough"})}extend(i){return new xt({...this._def,shape:()=>({...this._def.shape(),...i})})}merge(i){return new xt({unknownKeys:i._def.unknownKeys,catchall:i._def.catchall,shape:()=>({...this._def.shape(),...i._def.shape()}),typeName:pe.ZodObject})}setKey(i,s){return this.augment({[i]:s})}catchall(i){return new xt({...this._def,catchall:i})}pick(i){const s={};for(const u of De.objectKeys(i))i[u]&&this.shape[u]&&(s[u]=this.shape[u]);return new xt({...this._def,shape:()=>s})}omit(i){const s={};for(const u of De.objectKeys(this.shape))i[u]||(s[u]=this.shape[u]);return new xt({...this._def,shape:()=>s})}deepPartial(){return pi(this)}partial(i){const s={};for(const u of De.objectKeys(this.shape)){const d=this.shape[u];i&&!i[u]?s[u]=d:s[u]=d.optional()}return new xt({...this._def,shape:()=>s})}required(i){const s={};for(const u of De.objectKeys(this.shape))if(i&&!i[u])s[u]=this.shape[u];else{let f=this.shape[u];for(;f instanceof vn;)f=f._def.innerType;s[u]=f}return new xt({...this._def,shape:()=>s})}keyof(){return hy(De.objectKeys(this.shape))}}xt.create=(n,i)=>new xt({shape:()=>n,unknownKeys:"strip",catchall:Wn.create(),typeName:pe.ZodObject,...we(i)});xt.strictCreate=(n,i)=>new xt({shape:()=>n,unknownKeys:"strict",catchall:Wn.create(),typeName:pe.ZodObject,...we(i)});xt.lazycreate=(n,i)=>new xt({shape:n,unknownKeys:"strip",catchall:Wn.create(),typeName:pe.ZodObject,...we(i)});class tu extends Ae{_parse(i){const{ctx:s}=this._processInputParams(i),u=this._def.options;function d(f){for(const y of f)if(y.result.status==="valid")return y.result;for(const y of f)if(y.result.status==="dirty")return s.common.issues.push(...y.ctx.common.issues),y.result;const m=f.map(y=>new bn(y.ctx.common.issues));return P(s,{code:X.invalid_union,unionErrors:m}),me}if(s.common.async)return Promise.all(u.map(async f=>{const m={...s,common:{...s.common,issues:[]},parent:null};return{result:await f._parseAsync({data:s.data,path:s.path,parent:m}),ctx:m}})).then(d);{let f;const m=[];for(const g of u){const v={...s,common:{...s.common,issues:[]},parent:null},b=g._parseSync({data:s.data,path:s.path,parent:v});if(b.status==="valid")return b;b.status==="dirty"&&!f&&(f={result:b,ctx:v}),v.common.issues.length&&m.push(v.common.issues)}if(f)return s.common.issues.push(...f.ctx.common.issues),f.result;const y=m.map(g=>new bn(g));return P(s,{code:X.invalid_union,unionErrors:y}),me}}get options(){return this._def.options}}tu.create=(n,i)=>new tu({options:n,typeName:pe.ZodUnion,...we(i)});const yn=n=>n instanceof md?yn(n.schema):n instanceof Al?yn(n.innerType()):n instanceof lu?[n.value]:n instanceof Nl?n.options:n instanceof pd?De.objectValues(n.enum):n instanceof su?yn(n._def.innerType):n instanceof od?[void 0]:n instanceof dd?[null]:n instanceof vn?[void 0,...yn(n.unwrap())]:n instanceof El?[null,...yn(n.unwrap())]:n instanceof my||n instanceof uu?yn(n.unwrap()):n instanceof ru?yn(n._def.innerType):[];class Dd extends Ae{_parse(i){const{ctx:s}=this._processInputParams(i);if(s.parsedType!==te.object)return P(s,{code:X.invalid_type,expected:te.object,received:s.parsedType}),me;const u=this.discriminator,d=s.data[u],f=this.optionsMap.get(d);return f?s.common.async?f._parseAsync({data:s.data,path:s.path,parent:s}):f._parseSync({data:s.data,path:s.path,parent:s}):(P(s,{code:X.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[u]}),me)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(i,s,u){const d=new Map;for(const f of s){const m=yn(f.shape[i]);if(!m.length)throw new Error(`A discriminator value for key \`${i}\` could not be extracted from all schema options`);for(const y of m){if(d.has(y))throw new Error(`Discriminator property ${String(i)} has duplicate value ${String(y)}`);d.set(y,f)}}return new Dd({typeName:pe.ZodDiscriminatedUnion,discriminator:i,options:s,optionsMap:d,...we(u)})}}function hd(n,i){const s=Jn(n),u=Jn(i);if(n===i)return{valid:!0,data:n};if(s===te.object&&u===te.object){const d=De.objectKeys(i),f=De.objectKeys(n).filter(y=>d.indexOf(y)!==-1),m={...n,...i};for(const y of f){const g=hd(n[y],i[y]);if(!g.valid)return{valid:!1};m[y]=g.data}return{valid:!0,data:m}}else if(s===te.array&&u===te.array){if(n.length!==i.length)return{valid:!1};const d=[];for(let f=0;f<n.length;f++){const m=n[f],y=i[f],g=hd(m,y);if(!g.valid)return{valid:!1};d.push(g.data)}return{valid:!0,data:d}}else return s===te.date&&u===te.date&&+n==+i?{valid:!0,data:n}:{valid:!1}}class au extends Ae{_parse(i){const{status:s,ctx:u}=this._processInputParams(i),d=(f,m)=>{if(ix(f)||ix(m))return me;const y=hd(f.value,m.value);return y.valid?((sx(f)||sx(m))&&s.dirty(),{status:s.value,value:y.data}):(P(u,{code:X.invalid_intersection_types}),me)};return u.common.async?Promise.all([this._def.left._parseAsync({data:u.data,path:u.path,parent:u}),this._def.right._parseAsync({data:u.data,path:u.path,parent:u})]).then(([f,m])=>d(f,m)):d(this._def.left._parseSync({data:u.data,path:u.path,parent:u}),this._def.right._parseSync({data:u.data,path:u.path,parent:u}))}}au.create=(n,i,s)=>new au({left:n,right:i,typeName:pe.ZodIntersection,...we(s)});class _l extends Ae{_parse(i){const{status:s,ctx:u}=this._processInputParams(i);if(u.parsedType!==te.array)return P(u,{code:X.invalid_type,expected:te.array,received:u.parsedType}),me;if(u.data.length<this._def.items.length)return P(u,{code:X.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&u.data.length>this._def.items.length&&(P(u,{code:X.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),s.dirty());const f=[...u.data].map((m,y)=>{const g=this._def.items[y]||this._def.rest;return g?g._parse(new Ga(u,m,u.path,y)):null}).filter(m=>!!m);return u.common.async?Promise.all(f).then(m=>Dt.mergeArray(s,m)):Dt.mergeArray(s,f)}get items(){return this._def.items}rest(i){return new _l({...this._def,rest:i})}}_l.create=(n,i)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new _l({items:n,typeName:pe.ZodTuple,rest:null,...we(i)})};class nu extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(i){const{status:s,ctx:u}=this._processInputParams(i);if(u.parsedType!==te.object)return P(u,{code:X.invalid_type,expected:te.object,received:u.parsedType}),me;const d=[],f=this._def.keyType,m=this._def.valueType;for(const y in u.data)d.push({key:f._parse(new Ga(u,y,u.path,y)),value:m._parse(new Ga(u,u.data[y],u.path,y)),alwaysSet:y in u.data});return u.common.async?Dt.mergeObjectAsync(s,d):Dt.mergeObjectSync(s,d)}get element(){return this._def.valueType}static create(i,s,u){return s instanceof Ae?new nu({keyType:i,valueType:s,typeName:pe.ZodRecord,...we(u)}):new nu({keyType:Va.create(),valueType:i,typeName:pe.ZodRecord,...we(s)})}}class dx extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(i){const{status:s,ctx:u}=this._processInputParams(i);if(u.parsedType!==te.map)return P(u,{code:X.invalid_type,expected:te.map,received:u.parsedType}),me;const d=this._def.keyType,f=this._def.valueType,m=[...u.data.entries()].map(([y,g],v)=>({key:d._parse(new Ga(u,y,u.path,[v,"key"])),value:f._parse(new Ga(u,g,u.path,[v,"value"]))}));if(u.common.async){const y=new Map;return Promise.resolve().then(async()=>{for(const g of m){const v=await g.key,b=await g.value;if(v.status==="aborted"||b.status==="aborted")return me;(v.status==="dirty"||b.status==="dirty")&&s.dirty(),y.set(v.value,b.value)}return{status:s.value,value:y}})}else{const y=new Map;for(const g of m){const v=g.key,b=g.value;if(v.status==="aborted"||b.status==="aborted")return me;(v.status==="dirty"||b.status==="dirty")&&s.dirty(),y.set(v.value,b.value)}return{status:s.value,value:y}}}}dx.create=(n,i,s)=>new dx({valueType:i,keyType:n,typeName:pe.ZodMap,...we(s)});class _s extends Ae{_parse(i){const{status:s,ctx:u}=this._processInputParams(i);if(u.parsedType!==te.set)return P(u,{code:X.invalid_type,expected:te.set,received:u.parsedType}),me;const d=this._def;d.minSize!==null&&u.data.size<d.minSize.value&&(P(u,{code:X.too_small,minimum:d.minSize.value,type:"set",inclusive:!0,exact:!1,message:d.minSize.message}),s.dirty()),d.maxSize!==null&&u.data.size>d.maxSize.value&&(P(u,{code:X.too_big,maximum:d.maxSize.value,type:"set",inclusive:!0,exact:!1,message:d.maxSize.message}),s.dirty());const f=this._def.valueType;function m(g){const v=new Set;for(const b of g){if(b.status==="aborted")return me;b.status==="dirty"&&s.dirty(),v.add(b.value)}return{status:s.value,value:v}}const y=[...u.data.values()].map((g,v)=>f._parse(new Ga(u,g,u.path,v)));return u.common.async?Promise.all(y).then(g=>m(g)):m(y)}min(i,s){return new _s({...this._def,minSize:{value:i,message:se.toString(s)}})}max(i,s){return new _s({...this._def,maxSize:{value:i,message:se.toString(s)}})}size(i,s){return this.min(i,s).max(i,s)}nonempty(i){return this.min(1,i)}}_s.create=(n,i)=>new _s({valueType:n,minSize:null,maxSize:null,typeName:pe.ZodSet,...we(i)});class md extends Ae{get schema(){return this._def.getter()}_parse(i){const{ctx:s}=this._processInputParams(i);return this._def.getter()._parse({data:s.data,path:s.path,parent:s})}}md.create=(n,i)=>new md({getter:n,typeName:pe.ZodLazy,...we(i)});class lu extends Ae{_parse(i){if(i.data!==this._def.value){const s=this._getOrReturnCtx(i);return P(s,{received:s.data,code:X.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:i.data}}get value(){return this._def.value}}lu.create=(n,i)=>new lu({value:n,typeName:pe.ZodLiteral,...we(i)});function hy(n,i){return new Nl({values:n,typeName:pe.ZodEnum,...we(i)})}class Nl extends Ae{_parse(i){if(typeof i.data!="string"){const s=this._getOrReturnCtx(i),u=this._def.values;return P(s,{expected:De.joinValues(u),received:s.parsedType,code:X.invalid_type}),me}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(i.data)){const s=this._getOrReturnCtx(i),u=this._def.values;return P(s,{received:s.data,code:X.invalid_enum_value,options:u}),me}return _a(i.data)}get options(){return this._def.values}get enum(){const i={};for(const s of this._def.values)i[s]=s;return i}get Values(){const i={};for(const s of this._def.values)i[s]=s;return i}get Enum(){const i={};for(const s of this._def.values)i[s]=s;return i}extract(i,s=this._def){return Nl.create(i,{...this._def,...s})}exclude(i,s=this._def){return Nl.create(this.options.filter(u=>!i.includes(u)),{...this._def,...s})}}Nl.create=hy;class pd extends Ae{_parse(i){const s=De.getValidEnumValues(this._def.values),u=this._getOrReturnCtx(i);if(u.parsedType!==te.string&&u.parsedType!==te.number){const d=De.objectValues(s);return P(u,{expected:De.joinValues(d),received:u.parsedType,code:X.invalid_type}),me}if(this._cache||(this._cache=new Set(De.getValidEnumValues(this._def.values))),!this._cache.has(i.data)){const d=De.objectValues(s);return P(u,{received:u.data,code:X.invalid_enum_value,options:d}),me}return _a(i.data)}get enum(){return this._def.values}}pd.create=(n,i)=>new pd({values:n,typeName:pe.ZodNativeEnum,...we(i)});class iu extends Ae{unwrap(){return this._def.type}_parse(i){const{ctx:s}=this._processInputParams(i);if(s.parsedType!==te.promise&&s.common.async===!1)return P(s,{code:X.invalid_type,expected:te.promise,received:s.parsedType}),me;const u=s.parsedType===te.promise?s.data:Promise.resolve(s.data);return _a(u.then(d=>this._def.type.parseAsync(d,{path:s.path,errorMap:s.common.contextualErrorMap})))}}iu.create=(n,i)=>new iu({type:n,typeName:pe.ZodPromise,...we(i)});class Al extends Ae{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(i){const{status:s,ctx:u}=this._processInputParams(i),d=this._def.effect||null,f={addIssue:m=>{P(u,m),m.fatal?s.abort():s.dirty()},get path(){return u.path}};if(f.addIssue=f.addIssue.bind(f),d.type==="preprocess"){const m=d.transform(u.data,f);if(u.common.async)return Promise.resolve(m).then(async y=>{if(s.value==="aborted")return me;const g=await this._def.schema._parseAsync({data:y,path:u.path,parent:u});return g.status==="aborted"?me:g.status==="dirty"||s.value==="dirty"?vs(g.value):g});{if(s.value==="aborted")return me;const y=this._def.schema._parseSync({data:m,path:u.path,parent:u});return y.status==="aborted"?me:y.status==="dirty"||s.value==="dirty"?vs(y.value):y}}if(d.type==="refinement"){const m=y=>{const g=d.refinement(y,f);if(u.common.async)return Promise.resolve(g);if(g instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return y};if(u.common.async===!1){const y=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});return y.status==="aborted"?me:(y.status==="dirty"&&s.dirty(),m(y.value),{status:s.value,value:y.value})}else return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then(y=>y.status==="aborted"?me:(y.status==="dirty"&&s.dirty(),m(y.value).then(()=>({status:s.value,value:y.value}))))}if(d.type==="transform")if(u.common.async===!1){const m=this._def.schema._parseSync({data:u.data,path:u.path,parent:u});if(!vi(m))return me;const y=d.transform(m.value,f);if(y instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:s.value,value:y}}else return this._def.schema._parseAsync({data:u.data,path:u.path,parent:u}).then(m=>vi(m)?Promise.resolve(d.transform(m.value,f)).then(y=>({status:s.value,value:y})):me);De.assertNever(d)}}Al.create=(n,i,s)=>new Al({schema:n,typeName:pe.ZodEffects,effect:i,...we(s)});Al.createWithPreprocess=(n,i,s)=>new Al({schema:i,effect:{type:"preprocess",transform:n},typeName:pe.ZodEffects,...we(s)});class vn extends Ae{_parse(i){return this._getType(i)===te.undefined?_a(void 0):this._def.innerType._parse(i)}unwrap(){return this._def.innerType}}vn.create=(n,i)=>new vn({innerType:n,typeName:pe.ZodOptional,...we(i)});class El extends Ae{_parse(i){return this._getType(i)===te.null?_a(null):this._def.innerType._parse(i)}unwrap(){return this._def.innerType}}El.create=(n,i)=>new El({innerType:n,typeName:pe.ZodNullable,...we(i)});class su extends Ae{_parse(i){const{ctx:s}=this._processInputParams(i);let u=s.data;return s.parsedType===te.undefined&&(u=this._def.defaultValue()),this._def.innerType._parse({data:u,path:s.path,parent:s})}removeDefault(){return this._def.innerType}}su.create=(n,i)=>new su({innerType:n,typeName:pe.ZodDefault,defaultValue:typeof i.default=="function"?i.default:()=>i.default,...we(i)});class ru extends Ae{_parse(i){const{ctx:s}=this._processInputParams(i),u={...s,common:{...s.common,issues:[]}},d=this._def.innerType._parse({data:u.data,path:u.path,parent:{...u}});return Pr(d)?d.then(f=>({status:"valid",value:f.status==="valid"?f.value:this._def.catchValue({get error(){return new bn(u.common.issues)},input:u.data})})):{status:"valid",value:d.status==="valid"?d.value:this._def.catchValue({get error(){return new bn(u.common.issues)},input:u.data})}}removeCatch(){return this._def.innerType}}ru.create=(n,i)=>new ru({innerType:n,typeName:pe.ZodCatch,catchValue:typeof i.catch=="function"?i.catch:()=>i.catch,...we(i)});class fx extends Ae{_parse(i){if(this._getType(i)!==te.nan){const u=this._getOrReturnCtx(i);return P(u,{code:X.invalid_type,expected:te.nan,received:u.parsedType}),me}return{status:"valid",value:i.data}}}fx.create=n=>new fx({typeName:pe.ZodNaN,...we(n)});class my extends Ae{_parse(i){const{ctx:s}=this._processInputParams(i),u=s.data;return this._def.type._parse({data:u,path:s.path,parent:s})}unwrap(){return this._def.type}}class Ud extends Ae{_parse(i){const{status:s,ctx:u}=this._processInputParams(i);if(u.common.async)return(async()=>{const f=await this._def.in._parseAsync({data:u.data,path:u.path,parent:u});return f.status==="aborted"?me:f.status==="dirty"?(s.dirty(),vs(f.value)):this._def.out._parseAsync({data:f.value,path:u.path,parent:u})})();{const d=this._def.in._parseSync({data:u.data,path:u.path,parent:u});return d.status==="aborted"?me:d.status==="dirty"?(s.dirty(),{status:"dirty",value:d.value}):this._def.out._parseSync({data:d.value,path:u.path,parent:u})}}static create(i,s){return new Ud({in:i,out:s,typeName:pe.ZodPipeline})}}class uu extends Ae{_parse(i){const s=this._def.innerType._parse(i),u=d=>(vi(d)&&(d.value=Object.freeze(d.value)),d);return Pr(s)?s.then(d=>u(d)):u(s)}unwrap(){return this._def.innerType}}uu.create=(n,i)=>new uu({innerType:n,typeName:pe.ZodReadonly,...we(i)});var pe;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(pe||(pe={}));const p=Va.create,E=Sl.create;jl.create;const qe=eu.create;gi.create;const py=fd.create;Wn.create;const ne=Za.create,$=xt.create,N1=tu.create,xy=Dd.create;au.create;_l.create;const Ns=nu.create,Ta=lu.create,de=Nl.create;iu.create;vn.create;El.create;const hx={string:(n=>Va.create({...n,coerce:!0})),number:(n=>Sl.create({...n,coerce:!0})),boolean:(n=>eu.create({...n,coerce:!0})),bigint:(n=>jl.create({...n,coerce:!0})),date:(n=>gi.create({...n,coerce:!0}))},A1=me,E1=p().regex(/^github\.com\/[^/]+\/[^/]+$/,"Expected github.com/<owner>/<repo>"),R1=/^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?$/;function k1(n){const i=n.trim();return i?!!(i.startsWith("/")||i.startsWith("~")||i.startsWith(".")||/^[A-Za-z]:[\\/]/.test(i)||i.startsWith("\\\\")):!1}function zd(n){const i=n.trim();if(!i)throw new Error("Repository is required");if(k1(i))throw new Error("Local filesystem paths are no longer accepted. Pass a GitHub URL or owner/repo (e.g. https://github.com/acme/app or acme/app).");let s,u;const d=R1.exec(i);if(d&&!i.includes("://")&&!i.toLowerCase().includes("github.com"))s=d[1],u=d[2];else{let m=i;/^[a-z][a-z0-9+.-]*:\/\//i.test(m)||(m.startsWith("git@")?m=m.replace(/^git@([^:]+):/,"https://$1/"):m=`https://${m}`);let y;try{y=new URL(m)}catch{throw new Error(`Unrecognized GitHub repository reference: ${n}`)}if(!/^([^.]+\.)?github\.com$/i.test(y.hostname))throw new Error(`Only github.com repositories are supported (got host ${y.hostname})`);const g=y.pathname.replace(/^\/+|\/+$/g,"").split("/");if(g.length<2||!g[0]||!g[1])throw new Error(`Unrecognized GitHub repository reference: ${n}`);s=g[0],u=g[1].replace(/\.git$/i,"")}if(!s||!u||s.includes("..")||u.includes(".."))throw new Error(`Unrecognized GitHub repository reference: ${n}`);const f=E1.parse(`github.com/${s}/${u}`);return{owner:s,repo:u,identity:f,cloneUrl:`https://github.com/${s}/${u}.git`}}const yy=p().min(1).transform((n,i)=>{try{return zd(n).identity}catch(s){return i.addIssue({code:X.custom,message:s.message}),A1}}),vy="repo:",C1=de(["resolved","unresolved","conflict","invalid"]),T1=$({status:C1,repository:p().optional(),sourceLabel:p().optional(),labels:ne(p()).optional(),error:p().optional()});function O1(n){return n?n.filter(i=>i.toLowerCase().startsWith(vy)):[]}const M1=100,L1=$({label:p(),repository:p()});$({mappings:ne(L1).max(M1+1)});function gy(n){const i=O1(n);if(i.length===0)return{status:"unresolved",labels:[]};if(i.length>1)return{status:"conflict",labels:[...i]};const s=i[0],u=s.slice(vy.length).trim();if(!u)return{status:"invalid",labels:[s],error:"Repository label has no value"};try{return{status:"resolved",repository:zd(u).identity,sourceLabel:s,labels:[s]}}catch(d){return{status:"invalid",labels:[s],error:d.message}}}const Ut=de(["claude_code","cursor_local","codex_local","muse_code"]),Ma=$({maxTurns:E().positive().nullable().optional(),maxBudgetUsd:E().positive().nullable().optional()}),by=$({plan:Ma.optional(),execute:Ma.optional(),reflect:Ma.optional()});function Fr(n){if(!(n!=null&&n.trim()))return null;try{const i=Ma.parse(JSON.parse(n));return i.maxTurns==null&&i.maxBudgetUsd==null?null:i}catch{return null}}function D1(n){return!n||n.maxTurns==null&&n.maxBudgetUsd==null?null:JSON.stringify(n)}const Bd=de(["developer","reviewer","legacy"]),U1=de(["queued","running","done","failed","timed_out","cancelled"]);$({id:p().uuid(),issueId:p().uuid(),role:Bd,round:E().int().min(1),agentId:p().uuid().nullable(),runtime:Ut.nullable(),model:p().nullable(),budgetJson:p().nullable(),worktreePath:p().nullable(),inputSha:p().nullable(),status:U1,sessionRef:p().nullable(),logPath:p().nullable(),exitCode:E().int().nullable(),errorJson:p().nullable(),metadataJson:p().nullable(),profileSnapshotJson:p().nullable(),processPid:E().int().nullable(),processOwner:p().nullable(),processStartedAt:p().nullable(),createdAt:p(),startedAt:p().nullable(),heartbeatAt:p().nullable(),completedAt:p().nullable(),updatedAt:p()});$({issueId:p().uuid(),role:Bd,round:E().int().min(1),agentId:p().uuid().nullable(),runtime:Ut.nullable(),model:p().nullable().optional(),budgetJson:p().nullable().optional(),inputSha:p().nullable().optional(),metadataJson:p().nullable().optional(),profileSnapshotJson:p().nullable().optional()});const z1=$({worktreeWrite:qe(),publishReview:qe(),outboundMutation:qe(),resolveHumanAction:qe()}),wy=$({worktreeWrite:qe().optional(),outboundMutation:qe().optional()}).strict(),yu=de(["low","medium","high"]);$({version:Ta(1),agentId:p().nullable(),role:Bd,runtime:Ut.nullable(),model:p().nullable(),effort:yu.nullable().default(null),budgetJson:p().nullable(),permissionPolicy:z1,deckId:p().nullable(),purpose:p().nullable(),capturedAt:p()});const Sy="auto",B1="muse-spark-1.3-contributor",q1=$({code:de(["cli_missing","runtime_auth","runtime_unknown","runtime_capability","cursor_keychain","usage_capped","deck_offline","deck_unauthorized","workspace_missing","deck_missing","mcp_not_registered","github_cli_missing","github_auth","github_unreachable"]),message:p()}),H1=$({id:p().uuid(),name:p(),runtime:Ut,workspaceRoot:p().nullable(),deckId:p().uuid().nullable(),deckName:p().nullable(),playbookId:p().nullable(),defaultPlanModel:p().nullable(),defaultExecuteModel:p().nullable(),defaultPlanBudgetJson:p().nullable(),defaultExecuteBudgetJson:p().nullable(),defaultModel:p().nullable(),defaultEffort:yu.nullable(),defaultBudgetJson:p().nullable(),purpose:p().nullable(),playbookIdsJson:p().nullable(),externalMemoryRefsJson:p().nullable(),permissionPolicyJson:p().nullable(),isBuiltin:qe(),createdAt:p(),updatedAt:p()}),jy=H1.extend({healthy:qe(),issues:ne(q1)});$({name:p().min(1),runtime:Ut,deckId:p().uuid(),defaultModel:p().nullable().optional(),defaultEffort:yu.nullable().optional(),defaultBudget:Ma.nullable().optional(),purpose:p().nullable().optional(),permissionPolicy:wy.nullable().optional()});$({name:p().min(1).optional(),runtime:Ut.optional(),deckId:p().uuid().nullable().optional(),defaultModel:p().nullable().optional(),defaultEffort:yu.nullable().optional(),defaultBudget:Ma.nullable().optional(),purpose:p().nullable().optional(),permissionPolicy:wy.nullable().optional()});$({agents:ne(jy),issueCount:E()});function mx(n){return n.defaultModel??n.defaultExecuteModel??n.defaultPlanModel??null}function $1(n){const i=Fr(n.defaultBudgetJson)??Fr(n.defaultExecuteBudgetJson)??Fr(n.defaultPlanBudgetJson);return D1(i)}const V1=de(["slack_message","email","service_tool_call"]),Y1=$({target:p().min(1).max(120),body:p().min(1).max(4e3)}),Z1=$({serviceName:p().min(1).max(120),toolName:p().min(1).max(120),arguments:Ns(py())}),G1=$({actionType:V1,summary:Y1,toolCall:Z1}),Q1=de(["pending","sent","rejected"]);$({draft:G1,status:Q1,sentAt:p().optional(),rejectedAt:p().optional(),bodyMismatch:qe().optional(),deliveryAttempts:E().int().min(0).default(0)});$({draftArtifactId:p().uuid(),sentAt:p(),toolResult:Ns(py()),permalink:p().url().optional()});const X1=$({failure_summary:p().min(1),user_feedback_excerpt:p().min(1),corrected_output_hint:p().optional()}),K1=xy("op",[$({op:Ta("add_item"),section:p().min(1),text:p().min(1)}),$({op:Ta("amend_item"),section:p().min(1),anchor:p().min(1),text:p().min(1)}),$({op:Ta("remove_item"),section:p().min(1),anchor:p().min(1)}),$({op:Ta("set_triggers"),triggers:ne(p())}),$({op:Ta("rewrite_body"),text:p()})]);$({rationale:p().min(1),ops:ne(K1).min(1),evidence:X1.optional()});const J1=de(["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"]),I1=de(["human","developer","reviewer","system"]),_y=de(["manual","linear","agent"]),F1=$({id:p().uuid(),source:_y,externalId:p().nullable(),externalLabel:p().nullable(),externalUrl:p().nullable(),title:p(),description:p().nullable(),acceptanceCriteria:p().nullable(),repo:p(),baseBranch:p(),status:J1,currentOwner:I1,currentIntent:p().nullable(),developerAgentId:p().uuid().nullable(),reviewerAgentId:p().uuid().nullable(),maxReviewRounds:E().int().min(1),currentRound:E().int().min(1),maxInfraAttempts:E().int().min(0),infraAttempts:E().int().min(0),branch:p().nullable(),baseSha:p().nullable(),headSha:p().nullable(),prNumber:E().int().nullable(),prUrl:p().nullable(),autoMerge:qe(),createdAt:p(),updatedAt:p()});$({title:p().min(1),description:p().optional(),acceptanceCriteria:p().optional(),repo:yy,baseBranch:p().min(1).default("main"),developerAgentId:p().uuid(),reviewerAgentId:p().uuid(),maxReviewRounds:E().int().min(1).default(3),maxInfraAttempts:E().int().min(0).default(3),autoMerge:qe().default(!1),source:_y.default("manual"),externalId:p().optional(),externalLabel:p().optional(),externalUrl:p().optional(),enqueue:qe().default(!0)});$({title:p().min(1).optional(),description:p().nullable().optional(),acceptanceCriteria:p().nullable().optional(),repo:yy.optional(),baseBranch:p().min(1).optional(),developerAgentId:p().uuid().optional(),reviewerAgentId:p().uuid().optional(),maxReviewRounds:E().int().min(1).optional(),maxInfraAttempts:E().int().min(0).optional(),autoMerge:qe().optional()});const px={ready:["developing","closed"],developing:["developing","reviewing","needs_human","closed"],reviewing:["reviewing","repairing","final_review","needs_human","closed"],repairing:["repairing","reviewing","needs_human","closed"],needs_human:["developing","reviewing","repairing","final_review","done","closed"],final_review:["final_review","done","repairing","needs_human","closed"],done:[],closed:[]};Object.keys(px).filter(n=>px[n].length===0);const W1=de(["enqueued","already_queued","not_queued"]);F1.extend({created:qe(),queue:W1,priorPasses:E().int().min(0)});$({id:p(),issueId:p().nullable(),workerSessionId:p().nullable(),kind:p(),contentJson:p().nullable(),blobPath:p().nullable(),author:de(["human","agent","system"]),createdAt:p()});const P1=de(["authentication_configuration","provider_capacity_rate_limit","agent_cli_crash","tool_test_timeout","coordinator_crash","validation_failure","publish_git_failure","agent_deck_unavailable","host_sleep_liveness","unknown"]),ew=de(["task","infrastructure","unknown"]),tw=de(["high","medium","low"]),aw=de(["outcome_kind","session_error","spawn_log","workflow_event","recovery"]),nw=de(["exact","inferred"]),xd=$({code:P1,domain:ew,primary:qe(),confidence:tw,evidenceSource:aw,occurredAt:p().nullable(),eventCursor:E().int().nullable(),rawReason:p(),sessionId:p().nullable(),logPath:p().nullable(),eventId:p().nullable(),eventType:p().nullable(),quality:nw}),lw=de(["commit","verification_receipt","branch_pushed"]),iw=de(["sampler","salvage","session_end"]),qd=de(["worktree","commit","verification_receipt","publish_only"]);$({kind:lw,observedSha:p().nullable(),observedAt:p(),origin:iw.nullable(),inputSha:p().nullable(),samplingPrecisionMs:E().int().nullable(),branch:p().nullable()});$({kinds:ne(qd),retryReason:p().nullable()});const sw=de(["done","closed","migrated"]);$({id:p().uuid(),issueId:p().uuid(),workflowVersion:p(),startedAt:p(),completedAt:p().nullable(),outcome:sw.nullable()});const rw=de(["issue.created","issue.reassigned","workflow.started","worker.started","worker.completed","worker.failed","worker.deferred","worktree.ready","deck.connected","brief.resolved","branch.pushed","checks.started","pull_request.opened","pull_request.updated","checks.completed","review.submitted","repair.started","guidance.added","task_snapshot.refreshed","human_action.requested","human_action.resolved","final_review.requested","issue.completed","issue.closed","queue.enqueued","queue.wait_reason_changed","queue.admitted","queue.removed","agent.started","agent.completed","host.suspended","checkpoint.observed","retry.reused","legacy.imported"]);$({id:p().uuid(),issueId:p().uuid(),workflowInstanceId:p().uuid().nullable(),workerSessionId:p().uuid().nullable(),type:rw,actorType:de(["human","developer","reviewer","system"]),actorRef:p().nullable(),stage:p(),round:E().int().nullable(),payloadJson:p().nullable(),artifactRef:p().nullable(),idempotencyKey:p().nullable(),causationEventId:p().uuid().nullable(),ts:p()});const uw=de(["product_scope_decision","policy_escalation","attempts_exhausted","final_review","deck_interaction_required","reflection_interaction_required","outbound_delivery_interaction_required"]),cw=de(["open","resolved"]);$({id:p().uuid(),issueId:p().uuid().nullable(),runId:p().uuid().nullable(),workflowInstanceId:p().uuid().nullable(),actionType:uw,reason:p(),question:p(),evidenceJson:p().nullable(),responseOptionsJson:p().nullable(),continuationPreviewJson:p().nullable(),requestId:p().nullable(),status:cw,resolutionJson:p().nullable(),resolvedBy:p().nullable(),requestedAt:p(),resolvedAt:p().nullable()});const ow=de(["blocking","non_blocking"]),dw=de(["open","resolved","recurring","superseded"]);$({id:p().uuid(),issueId:p().uuid(),fingerprint:p(),severity:ow,title:p(),rationale:p(),evidenceRef:p().nullable(),file:p().nullable(),line:E().int().nullable(),status:dw,firstRound:E().int().min(1),lastRound:E().int().min(1)});$({id:p().uuid(),issueId:p().uuid(),workerSessionId:p().uuid(),role:de(["developer","reviewer","legacy"]),runtime:p().nullable(),tokensIn:E().int().nullable(),tokensOut:E().int().nullable(),costUsd:E().nullable(),durationMs:E().int().nullable(),ts:p(),model:p().nullable().optional()});const fw=$({available:Ta(!0)}),hw=$({available:Ta(!1),until:p(),reason:p()});xy("available",[fw,hw]);const Hd=de(["supported_protocol","observed_event","experimental_api","unavailable"]),vu=de(["unsupported","missing","expired","unparsable","stale"]),mw=de(["five_hour","weekly"]),pw=$({windowKey:p().min(1),providerBucket:p().min(1),durationMinutes:E().int().positive().nullable(),displayLabel:p().min(1),usedValue:E().nullable(),usedUnit:p().nullable(),remainingPercent:E().min(0).max(100).nullable(),resetAt:p().nullable(),observedAt:p(),freshUntil:p().nullable(),expiresAt:p().nullable(),source:Hd,unavailableReason:vu.nullable(),criticalRole:mw.nullable()}),xw=$({runtime:Ut,windows:ne(pw),unavailableReason:vu.nullable()});$({runtimes:ne(xw),generatedAt:p()});$({configured:qe(),cycleStart:p().nullable(),cycleEnd:p().nullable(),spendValue:E().nullable(),spendUnit:p().nullable(),hardLimitValue:E().nullable(),hardLimitUnit:p().nullable(),memberCount:E().nullable(),memberLimitOverrideCount:E().nullable(),usagePeriodStart:p().nullable(),usagePeriodEnd:p().nullable(),usageSpendValue:E().nullable(),usageSpendUnit:p().nullable(),source:Hd,unavailableReason:vu.nullable(),observedAt:p().nullable(),generatedAt:p()});$({enabled:qe(),configured:qe(),cycleLabel:p().nullable(),cycleStart:p().nullable(),cycleEnd:p().nullable(),usageValue:E().nullable(),usageUnit:p().nullable(),remainingPercent:E().min(0).max(100).nullable(),source:Hd,unavailableReason:vu.nullable(),observedAt:p().nullable(),generatedAt:p()});function Ny(n,i=Date.now()){if(n.remainingPercent===null||n.source==="unavailable"||n.unavailableReason!==null)return!1;if(n.resetAt!==null){const s=Date.parse(n.resetAt);if(!Number.isFinite(s)||s<=i)return!1}if(n.freshUntil!==null){const s=Date.parse(n.freshUntil);if(!Number.isFinite(s)||s<=i)return!1}if(n.expiresAt!==null){const s=Date.parse(n.expiresAt);if(!Number.isFinite(s)||s<=i)return!1}if(n.observedAt){const s=Date.parse(n.observedAt);if(!Number.isFinite(s)||s>i+6e4)return!1}return!0}const yw=de(["queued","admitted","removed"]),vw=$({id:p().uuid(),issueId:p().uuid(),position:E().int(),enqueuedAt:p(),state:yw,waitReason:p().nullable(),waitReasonAt:p().nullable()});vw.extend({title:p().optional(),issueStatus:p().optional()});$({issueId:p().uuid()});const gw=N1([Ta("top"),Ta("bottom"),$({before:p().uuid()}).strict(),$({after:p().uuid()}).strict()]);$({to:gw});const bw=2;$({maxActiveIssues:E().int().min(1).max(bw)});$({active:E().int().min(0),waiting:E().int().min(0),limit:E().int().min(0),maxActiveIssues:E().int().min(1),ceiling:E().int().min(0),options:ne(E().int().min(1)),overCap:qe()});const na=de(["exact","inferred","unavailable"]),gu=$({quality:na,reasons:ne(p())}),Ay=de(["queue_wait","coordinator_setup","agent_process","coordinator_validation_publish","coordinator_work"]),js=$({phase:Ay,startMs:E().int().nullable(),endMs:E().int().nullable(),durationMs:E().int().nullable(),quality:na,reasons:ne(p()),sessionId:p().nullable(),startCursor:E().int().nullable(),endCursor:E().int().nullable()}),ww=gu.extend({phase:Ay,durationMs:E().int().nullable(),rawCount:E().int(),known:E().int(),total:E().int()}),Ey=$({kind:de(["admission_dependency_wait","runtime_health_preflight","unexplained_silence","human_wait"]),startMs:E().int().nullable(),endMs:E().int().nullable(),durationMs:E().int().nullable(),quality:na,reasons:ne(p()),category:p().nullable(),sessionId:p().nullable()}),Xt=gu.extend({value:E().nullable(),known:E().int(),total:E().int()}),Ya=gu.extend({p50:E().nullable(),p95:E().nullable(),n:E().int()}),Sw=$({sessionId:p(),role:p(),runtime:p().nullable(),model:p().nullable(),status:p(),round:E().int(),publishOnly:qe(),setup:js,agentProcess:js,validationPublish:js,spawnEnvelopeMs:E().int().nullable(),spawnEnvelopeQuality:na,spawnEnvelopeReasons:ne(p()),failureCauses:ne(xd),reuseKinds:ne(qd).optional(),silence:ne(Ey),silenceQuality:na,silenceReasons:ne(p()),tokensIn:E().int().nullable(),tokensOut:E().int().nullable(),costUsd:E().nullable(),usageDurationMs:E().int().nullable(),usageQuality:na,usageReasons:ne(p())}),jw=$({kind:p().nullable(),observedSha:p().nullable(),msSinceWorkflowStart:E().int().nullable(),quality:na,reasons:ne(p())}),_w=$({attempts:E().int(),retries:E().int(),cold:E().int(),reused:E().int(),unknown:E().int(),publishOnly:E().int(),reuseRate:E().nullable(),preservedKinds:ne(qd).optional(),quality:na,reasons:ne(p())}),Nw=$({rounds:E().int(),verdicts:E().int(),changeRequests:E().int(),changeRequestRate:E().nullable(),quality:na,reasons:ne(p())});$({issueId:p(),elapsed:js,rawIntervals:ne(js),unionedDurations:ne(ww),exclusiveTotalMs:E().int().nullable(),exclusiveTotalQuality:na,exclusiveTotalReasons:ne(p()),nested:ne(Ey),attempts:ne(Sw),primaryFailure:xd.nullable(),primaryFailureQuality:na,primaryFailureReasons:ne(p()),consequenceCauses:ne(xd),waste:$({failedAttempts:E().int(),publishOnlyAttempts:E().int(),runtimeMs:Xt,tokensIn:Xt,tokensOut:Xt,costUsd:Xt}),firstCheckpoint:jw,retry:_w,reviewer:Nw,humanWaitMs:E().int().nullable(),humanWaitQuality:na,humanWaitReasons:ne(p()),interventionCount:E().int(),coverage:$({duration:Xt,tokens:Xt,cost:Xt})});$({from:p().nullable().default(null),to:p().nullable().default(null),role:p().nullable().default(null),runtime:p().nullable().default(null),model:p().nullable().default(null),status:p().nullable().default(null),repo:p().nullable().default(null),limit:E().int().min(1).max(200).default(50),offset:E().int().min(0).default(0)});const Qo=gu.extend({numerator:E().int(),denominator:E().int(),rate:E().nullable()}),Xo=$({key:p(),attempts:E().int(),successes:E().int(),successRate:E().nullable(),retries:E().int(),retryRate:E().nullable(),wallTimeMs:Ya});$({window:$({from:p(),to:p(),defaultApplied:qe()}),pagination:$({limit:E().int(),offset:E().int(),totalIssues:E().int()}),issueIds:ne(p()),phaseWallTime:Ns(p(),Ya),attemptSuccess:Qo,issueSuccess:Qo,primaryFailures:ne($({code:p(),count:E().int(),rate:E().nullable()})),primaryFailureDenominator:E().int(),waste:$({failedAttempts:E().int(),runtimeMs:Xt,tokensIn:Xt,tokensOut:Xt,costUsd:Xt}),checkpointLatencyMs:Ya,retryReuse:Qo,reviewer:$({rounds:E().int(),verdicts:E().int(),changeRequests:E().int(),changeRequestRate:E().nullable(),quality:na,reasons:ne(p())}),humanInterventions:$({totalActions:E().int(),issuesWithIntervention:E().int(),humanWaitMs:Ya}),byRole:ne(Xo),byRuntime:ne(Xo),byModel:ne(Xo),coverage:$({duration:Xt,tokens:Xt,cost:Xt})});const Aw=100,Ry=25,ky=5,Ew=de(["developer","reviewer","legacy"]),Rw=de(["authentication_configuration","provider_capacity_rate_limit","agent_cli_crash","tool_test_timeout","coordinator_crash","validation_failure","publish_git_failure","agent_deck_unavailable","host_sleep_liveness","unknown"]),kw=de(["task","infrastructure","unknown"]);$({from:p().optional(),to:p().optional(),repo:p().optional(),role:Ew.optional(),runtime:p().optional(),model:p().optional(),status:p().optional(),page:hx.number().int().min(1).default(1),limit:hx.number().int().min(1).max(Aw).default(Ry)});const Cy=de(["exact","inferred","unavailable"]),ya=$({sum:E().nullable(),known:E().int().min(0),total:E().int().min(0),quality:Cy,reasons:ne(p())}),Ko=$({key:p(),issues:E().int().min(0),attempts:E().int().min(0),issueSuccess:E().nullable(),issueSuccessDenominator:E().int().min(0),attemptSuccess:E().nullable(),attemptSuccessDenominator:E().int().min(0),sessionWallMs:Ya,spawnEnvelopeMs:Ya,retryRate:E().nullable(),tokensIn:ya,tokensOut:ya,costUsd:ya,durationMs:ya,failedDurationMs:ya,failedTokensIn:ya,failedTokensOut:ya,failedCostUsd:ya}),Cw=$({code:Rw,domain:kw,count:E().int().min(0),share:E().nullable(),issueIds:ne(p()),issueTotal:E().int().min(0)}),Tw=$({id:p(),title:p(),status:p(),repo:p(),attempts:E().int().min(0),updatedAt:p()}),Ow=$({window:$({from:p(),to:p()}),filters:$({repo:p().nullable(),role:p().nullable(),runtime:p().nullable(),model:p().nullable(),status:ne(p())}),summary:$({issues:E().int().min(0),closedIssues:E().int().min(0),issueSuccess:E().nullable(),attempts:E().int().min(0),terminalAttempts:E().int().min(0),attemptSuccess:E().nullable(),retryRate:E().nullable(),retryExtraAttempts:E().int().min(0),reuseRate:E().nullable(),reuseDenominator:E().int().min(0),humanWaitMs:E().int().min(0),humanWaitQuality:Cy,interventions:E().int().min(0),avgReviewerRounds:E().nullable(),reviewedIssues:E().int().min(0),changeRequestRate:E().nullable(),sessionWallMs:Ya,spawnEnvelopeMs:Ya,checkpointMs:Ya,phaseWallMs:ne($({phase:p(),stat:Ya})),failedDurationMs:ya,failedTokensIn:ya,failedTokensOut:ya,failedCostUsd:ya}),byRole:ne(Ko),byRuntime:ne(Ko),byModel:ne(Ko),failures:ne(Cw),issues:ne(Tw),pagination:$({page:E().int().min(1),limit:E().int().min(1),total:E().int().min(0),totalPages:E().int().min(0)}),meta:$({generatedAt:p(),partial:qe(),partialReasons:ne(p())})});function Ty(n){const i=new URLSearchParams;for(const[s,u]of Object.entries(n)){if(u==null)continue;const d=String(u).trim();d&&(s==="page"&&d==="1"||s==="limit"&&d===String(Ry)||i.set(s,d))}return i.sort(),i.toString()}function Kn(n,i){return n.sum===null||n.known===0?"Unavailable":n.known<n.total?`${i(n.sum)} (${n.known}/${n.total} known)`:i(n.sum)}function Oy(n){return n<ky?`n=${n} (sparse)`:`n=${n}`}function yd(n){return n<ky}function xx(n,i){if(n.n===0||n.p50===null&&n.p95===null)return"Unavailable";const s=u=>u===null?"–":i(u);return`P50 ${s(n.p50)} · P95 ${s(n.p95)} (${Oy(n.n)})`}function gs(n){return`$${n.toFixed(2)}`}function Ze(n){return n.toLocaleString("en-US")}function Mw(n){if(!Number.isFinite(n))return Ze(n);const i=Math.abs(n);if(i<1e3)return Ze(n);const s=u=>u>=100?String(Math.round(u)):u.toFixed(1).replace(/\.0$/,"");return i<1e6?`${s(n/1e3)}K`:`${s(n/1e6)}M`}function Qt(n){if(n<1e3)return`${Math.round(n)} ms`;const i=n/1e3;if(i<60)return`${i.toFixed(1)} s`;const s=Math.floor(i/60),u=Math.round(i%60);return s<60?`${s}m ${u}s`:`${Math.floor(s/60)}h ${s%60}m`}function bu(n){return n===null||!Number.isFinite(n)?"Unavailable":`${(n*100).toFixed(1)}%`}const Lw=de(["queued","plan_pending","plan_approved","running","review","done","failed","cancelled"]),My=de(["code","communication","email","research","content","other"]),Dw=de(["task_snapshot","draft_plan","approved_plan","plan_triage","plan_answers","acceptance_criteria","transcript","stream_trace","usage","agent_session","execution_result","diff","pr","email_draft","slack_draft","service_draft","document","research_brief","deliverable","feedback","playbook_patch","reflect_status","linear_sync","send_receipt","result_qa"]),wu=de(["plan","execute","reflect","qa"]),Ly=de(["retry","approve"]);$({patchId:p(),playbookId:p().optional(),playbookTitle:p().optional(),rationale:p().optional(),status:Ta("proposed"),trigger:Ly,dashboardUrl:p().optional()});$({status:de(["pending","completed","failed","skipped"]),trigger:Ly,error:p().optional()});const Uw=$({type:de(["system","human","context","thinking","assistant","tool","rate_limit","result"]),text:p(),toolName:p().optional()});$({phase:wu,runtime:Ut,entries:ne(Uw)});const zw=$({phase:wu,runtime:Ut,totalCostUsd:E().optional(),inputTokens:E().optional(),outputTokens:E().optional(),cacheReadTokens:E().optional(),cacheWriteTokens:E().optional(),durationMs:E().optional(),model:p().optional(),numTurns:E().optional(),maxTurns:E().optional(),maxBudgetUsd:E().optional()}),Bw=$({label:p(),usage:zw,maxTurns:E().optional(),maxBudgetUsd:E().optional()});$({lines:ne(Bw),total:$({totalCostUsd:E(),inputTokens:E(),outputTokens:E(),durationMs:E(),numTurns:E()})});$({phase:wu,runtime:Ut,sessionId:p()});$({phase:wu,exitCode:E(),resultText:p().optional(),isError:qe().optional(),blocker:$({summary:p().optional()}).optional()});$({path:p(),title:p(),markdown:p()});$({markdown:p(),sessionId:p().optional()});const qw=de(["manual","linear"]);$({id:p(),title:p(),description:p().optional(),url:p().optional()});const xn=$({id:p().uuid(),source:qw,externalId:p().nullable(),externalLabel:p().nullable(),taskCategory:My,title:p(),description:p().nullable(),repo:p().nullable(),artifactWorkspace:p().nullable(),agentId:p().uuid().nullable(),agentName:p().nullable(),deckId:p().nullable(),deckName:p().nullable(),playbookId:p().nullable(),runtime:Ut.nullable(),planModel:p().nullable(),executeModel:p().nullable(),status:Lw,lineageId:p().uuid().nullable(),acceptanceCriteria:p().nullable(),approvalGatesJson:p().nullable(),budgetJson:p().nullable(),createdAt:p(),updatedAt:p()});$({id:p().uuid(),runId:p().uuid(),kind:Dw,contentJson:p().nullable(),blobPath:p().nullable(),author:de(["human","agent","system"]),createdAt:p()});$({id:p().uuid(),runId:p().uuid(),type:p(),payloadJson:p().nullable(),ts:p()});$({title:p().min(1),description:p().optional(),taskCategory:My.default("other"),repo:p().optional(),artifactWorkspace:p().optional(),acceptanceCriteria:p().optional(),status:de(["queued","plan_pending","plan_approved"]).default("plan_pending"),agentId:p().uuid(),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),budget:by.optional()});$({runtime:Ut,deckId:p().uuid().optional(),playbookId:p().optional(),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),budget:by.optional()});$({planMarkdown:p(),approve:qe().default(!1),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),planBudget:Ma.nullable().optional(),executeBudget:Ma.nullable().optional()});$({runtime:Ut.optional(),deckId:p().uuid().optional(),playbookId:p().optional(),executeModel:p().nullable().optional(),executeBudget:Ma.nullable().optional()});$({feedback:p().min(1),planModel:p().nullable().optional(),executeModel:p().nullable().optional(),executeBudget:Ma.nullable().optional()});$({outboundBody:p().min(1).max(4e3).optional()});$({id:p(),identifier:p(),title:p(),description:p().optional(),url:p(),state:p().optional(),labels:ne(p()).optional(),teamId:p().optional(),repoResolution:T1.optional()});$({stateFilter:ne(p()),teamId:p().nullable(),assigneeMe:qe(),syncEnabled:qe()});$({host:p(),port:E().int().min(1).max(65535),envOverride:qe()});const Hw=de(["UNAUTHORIZED","DECK_UNAVAILABLE"]);$({connected:qe(),apiUrl:p(),mcpUrl:p(),deckCount:E().optional(),envOverride:qe(),error:p().optional(),deckAccessError:Hw.optional(),deckAccessErrorMessage:p().optional()});$({agentId:p().uuid().optional(),autoAgent:qe().optional(),planModel:p().nullable().optional()}).refine(n=>n.agentId!==void 0||n.autoAgent===!0,{message:"Provide agentId or autoAgent: true"});$({planModel:p().nullable().optional(),planBudget:Ma.nullable().optional(),feedback:p().optional(),editedMarkdown:p().optional()});const $w=$({id:p(),label:p()});$({runtime:Ut,models:ne($w),source:de(["live","fallback"])});$({planReviewCount:E(),resultReviewCount:E(),maxConcurrent:E(),planningActiveRuns:ne(xn),planningQueuedRuns:ne(xn),runningRuns:ne(xn),waitingExecution:ne(xn),resultReviewRuns:ne(xn),recentDone:ne(xn),awaitingPlanReview:ne(xn),awaitingAnswerRuns:ne(xn),openQuestionCounts:Ns(p(),E()),pendingSendCounts:Ns(p(),E()),sentRunIds:ne(p()).optional(),autoApprovedRunIds:ne(p()),runs:ne(xn),agentDeckOnline:qe(),agents:ne(jy),agentIssueCount:E()});const Dy=new Map,Jo=new Map;function vd(n){return Dy.get(n)??null}function Vw(n,i){i.models.length!==0&&Dy.set(n,i)}function Yw(n,i){const s=vd(n);if(s)return Promise.resolve(s);const u=Jo.get(n);if(u)return u;const d=i().then(f=>(Vw(n,f),f)).finally(()=>Jo.delete(n));return Jo.set(n,d),d}const Oe="";async function nt(n){const i=await n.text();try{const s=JSON.parse(i),u=s.error??s.message;if(typeof u=="string"&&u.trim())return u.replace(/^Error:\s*/i,"")}catch{}return i}async function Zw(){const n=await fetch(`${Oe}/api/intake/linear`);if(!n.ok)throw new Error(await n.text());return(await n.json()).candidates??[]}async function Gw(n){const i=await fetch(`${Oe}/api/intake/linear/lookup?q=${encodeURIComponent(n)}`),s=await i.json().catch(()=>({}));if(!i.ok)throw new Error(s.error??`Lookup failed (${i.status})`);if(!s.candidate)throw new Error("Linear issue not found");return s.candidate}async function Qw(){const n=await fetch(`${Oe}/api/settings/repository-mappings`);if(!n.ok)throw new Error(await nt(n));return(await n.json()).mappings??[]}async function Xw(n){const i=await fetch(`${Oe}/api/settings/repository-mappings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({mappings:n})});if(!i.ok)throw new Error(await nt(i));return(await i.json()).mappings??[]}async function Kw(){const n=await fetch(`${Oe}/api/agents`);if(!n.ok)throw new Error("Failed to fetch agents");return n.json()}async function Jw(n){const i=await fetch(`${Oe}/api/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!i.ok)throw new Error(await i.text());return i.json()}async function Iw(n,i){const s=await fetch(`${Oe}/api/agents/${n}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(await s.text());return s.json()}async function Fw(n){const i=await fetch(`${Oe}/api/agents/${n}`,{method:"DELETE"});if(!i.ok)throw new Error(await i.text())}async function Ww(n,i){return Yw(n,async()=>{const u=await fetch(`${Oe}/api/runtimes/${n}/models`);if(!u.ok)throw new Error(await u.text());return u.json()})}async function Uy(){const n=await fetch(`${Oe}/api/runtime-capacity`);if(!n.ok)throw new Error(await n.text());return n.json()}async function zy(){const n=await fetch(`${Oe}/api/agent-deck/status`);if(!n.ok)throw new Error(await n.text());return n.json()}async function Pw(){try{const n=await fetch(`${Oe}/api/agent-deck/decks`),i=await n.json().catch(()=>null);return n.ok?{ok:!0,decks:(i==null?void 0:i.data)??[]}:{ok:!1,code:i==null?void 0:i.code,message:(i==null?void 0:i.error)??`Agent Deck error (${n.status})`}}catch(n){return{ok:!1,message:n instanceof Error?n.message:String(n)}}}async function e2(n){var u,d,f;const i=new URLSearchParams;(u=n.q)!=null&&u.trim()&&i.set("q",n.q.trim()),(d=n.status)!=null&&d.trim()&&i.set("status",n.status.trim()),(f=n.repo)!=null&&f.trim()&&i.set("repo",n.repo.trim()),n.needsAttention&&i.set("needsAttention","1"),i.set("page",String(n.page&&n.page>1?Math.floor(n.page):1)),i.sort();const s=await fetch(`${Oe}/api/issues?${i.toString()}`);if(!s.ok)throw new Error(await nt(s));return s.json()}async function t2(){const n=await fetch(`${Oe}/api/issues/recent-repos`);if(!n.ok)throw new Error(await nt(n));return(await n.json()).repos??[]}async function By(n){const i=await fetch(`${Oe}/api/issues/${n}`);if(!i.ok)throw new Error(await nt(i));return i.json()}async function a2(n){const i=await fetch(`${Oe}/api/issues/${n}/execution-analysis`);if(!i.ok)throw new Error(await nt(i));return i.json()}async function n2(n){const i=await fetch(`${Oe}/api/issues/${n}/evidence`);if(!i.ok)throw new Error(await nt(i));return i.json()}async function l2(n,i){const s=await fetch(`${Oe}/api/issues/${n}/artifacts/${i}/trace`);if(!s.ok)throw new Error(await nt(s));return s.json()}async function i2(n){const i=await fetch(`${Oe}/api/issues`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!i.ok)throw new Error(await nt(i));return i.json()}async function gd(n,i){const s=await fetch(`${Oe}/api/issues/${n}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(i)});if(!s.ok)throw new Error(await nt(s));return s.json()}async function qy(n){const i=await fetch(`${Oe}/api/issues/${n}/start`,{method:"POST"});if(!i.ok)throw new Error(await nt(i));return i.json()}async function Hy(n){const i=await fetch(`${Oe}/api/issues/${n}/execute`,{method:"POST"});if(!i.ok)throw new Error(await nt(i));return i.json()}async function s2(n,i="web"){const s=await fetch(`${Oe}/api/issues/${n}/abort`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({resolvedBy:i})});if(!s.ok)throw new Error(await nt(s));return s.json()}async function r2(n,i="web"){const s=await fetch(`${Oe}/api/issues/${n}/close`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({closedBy:i})});if(!s.ok)throw new Error(await nt(s));return s.json()}async function u2(n){const i=await fetch(`${Oe}/api/queue`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({issueId:n})});if(!i.ok)throw new Error(await nt(i));return i.json()}async function $y(n){const i=await fetch(`${Oe}/api/queue/${n}`,{method:"DELETE"});if(!i.ok)throw new Error(await nt(i));return i.json()}async function Yr(n,i){const s=await fetch(`${Oe}/api/queue/${n}/move`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({to:i})});if(!s.ok)throw new Error(await nt(s));return s.json()}async function Io(){const n=await fetch(`${Oe}/api/queue`);if(!n.ok)throw new Error(await nt(n));return n.json()}async function c2(){const n=await fetch(`${Oe}/api/queue/status`);if(!n.ok)throw new Error(await nt(n));return n.json()}async function o2(n){const i=await fetch(`${Oe}/api/queue/settings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({maxActiveIssues:n})});if(!i.ok)throw new Error(await nt(i));return i.json()}async function d2(n,i){const s=await fetch(`${Oe}/api/issues/${n}/guidance`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({markdown:i})});if(!s.ok)throw new Error(await nt(s));return s.json()}async function f2(n){const i=Ty(n),s=await fetch(`${Oe}/api/execution-report${i?`?${i}`:""}`);if(!s.ok)throw new Error(await nt(s));const u=await s.json(),d=Ow.safeParse(u);if(!d.success)throw new Error(`Unexpected report shape: ${d.error.message}`);return d.data}async function h2(){const n=await fetch(`${Oe}/api/human-actions`);if(!n.ok)throw new Error(await nt(n));return n.json()}async function Vy(n,i,s,u){const d=await fetch(`${Oe}/api/human-actions/${n}/resolve`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(u!=null&&u.trim()?{resolvedBy:i,choice:s,note:u.trim()}:{resolvedBy:i,choice:s})});if(!d.ok)throw new Error(await nt(d));return d.json()}function m2(n){return n||Sy}function p2({runtime:n,label:i,value:s,onChange:u,defaultModelId:d,disabled:f,compact:m}){const y=vd(n),[g,v]=w.useState((y==null?void 0:y.models)??[]),[b,N]=w.useState((y==null?void 0:y.source)??"fallback"),[U,K]=w.useState(!y);w.useEffect(()=>{const D=vd(n);if(D){v(D.models),N(D.source),K(!1);return}K(!0),Ww(n).then(B=>{v(B.models),N(B.source)}).catch(()=>v([])).finally(()=>K(!1))},[n]);const C=w.useMemo(()=>{var D,B;if(n==="cursor_local"){const Q=m2(d);return((D=g.find(W=>W.id===Q))==null?void 0:D.label)??"Auto (subscription pool)"}return d?((B=g.find(Q=>Q.id===d))==null?void 0:B.label)??d:"runtime default"},[n,d,g]),V=n==="cursor_local"?U?"Loading models…":`Agent default (${C})`:U?"Loading models…":`Default (${C})`;return c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:i}),c.jsxs("select",{className:"field text-sm",disabled:f||U,value:s,onChange:D=>u(D.target.value),children:[c.jsx("option",{value:"",children:V}),g.map(D=>c.jsx("option",{value:D.id,children:D.label},D.id))]}),n==="cursor_local"&&!U&&!m&&c.jsx("p",{className:"text-xs text-white/40",children:"Auto and Composer use your Cursor subscription pool. Other models draw API credits."}),b==="fallback"&&g.length>0&&!U&&n==="cursor_local"&&!m&&c.jsx("p",{className:"text-xs text-white/40",children:"Run cursor-agent login to load the full model list."})]})}function yx(n){const i={};return n.allowWorktreeWrite||(i.worktreeWrite=!1),Object.keys(i).length?i:null}function x2(n){let i={};try{n!=null&&n.trim()&&(i=JSON.parse(n))}catch{i={}}return{allowWorktreeWrite:i.worktreeWrite!==!1}}function vx({value:n,onChange:i,agentDeckOnline:s,disabled:u}){const[d,f]=w.useState([]),[m,y]=w.useState(null);w.useEffect(()=>{Pw().then(b=>{b.ok?(f(b.decks),y(null)):(f([]),y(b.message))})},[]);const g=b=>i({...n,...b}),v=n.runtime==="codex_local"||n.runtime==="claude_code";return c.jsxs("div",{className:"space-y-2",children:[c.jsx("div",{className:"font-ui-display text-base uppercase tracking-wide text-[#92E4DD]",children:"Agent"}),c.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Runtime (required)"}),c.jsxs("select",{className:"field",disabled:u,value:n.runtime,onChange:b=>{const N=b.target.value;g({runtime:N,defaultModel:N==="cursor_local"?Sy:N==="muse_code"?B1:"",defaultEffort:N==="cursor_local"||N==="muse_code"?"":n.defaultEffort})},children:[c.jsx("option",{value:"claude_code",children:"Claude Code (claude -p)"}),c.jsx("option",{value:"cursor_local",children:"Cursor local (cursor-agent -p)"}),c.jsx("option",{value:"codex_local",children:"Codex local (codex exec)"}),c.jsx("option",{value:"muse_code",children:"Muse Code (muse exec) — developer only, trial"})]}),c.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Agent Deck (required)"}),c.jsxs("select",{className:"field",disabled:u||!s||!!m,value:n.deckId,onChange:b=>g({deckId:b.target.value}),required:!0,children:[c.jsx("option",{value:"",disabled:!!n.deckId,children:s?m?"Agent Deck error — see below":"Select a deck…":"Agent Deck offline"}),d.map(b=>c.jsxs("option",{value:b.id,children:["◆ ",b.name]},b.id))]}),s&&m&&c.jsx("p",{className:"text-xs text-amber-300/90",children:m}),c.jsxs("div",{className:"pt-2 mt-2 border-t border-white/10 space-y-2",children:[c.jsx("div",{className:"font-ui-display text-xs uppercase tracking-wide text-white/40",children:"Issue-centric session defaults"}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Purpose (optional)"}),c.jsx("input",{className:"field text-sm",placeholder:"e.g. backend refactors on the payments service",disabled:u,value:n.purpose,onChange:b=>g({purpose:b.target.value})})]}),c.jsxs("div",{className:`grid gap-2 ${v?"grid-cols-2":"grid-cols-1"}`,children:[c.jsx(p2,{runtime:n.runtime,label:"Default model",value:n.defaultModel,onChange:b=>g({defaultModel:b}),disabled:u,compact:!0}),v&&c.jsxs("label",{className:"space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Reasoning effort"}),c.jsxs("select",{className:"field text-sm",disabled:u,value:n.defaultEffort,onChange:b=>g({defaultEffort:b.target.value}),children:[c.jsx("option",{value:"",children:"Runtime default"}),c.jsx("option",{value:"low",children:"Low"}),c.jsx("option",{value:"medium",children:"Medium"}),c.jsx("option",{value:"high",children:"High"})]})]})]}),n.runtime==="muse_code"&&c.jsx("p",{className:"text-xs text-white/40",children:"Developer role only — keep a Claude or Codex agent as the reviewer. Contributor-tier content may be used for product improvement; use it on non-sensitive tickets."}),n.runtime==="cursor_local"&&c.jsx("p",{className:"text-xs text-white/40",children:"Cursor has no separate effort flag — put effort in the model id if needed (e.g. parameterized `[effort=high]`)."}),c.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[c.jsxs("label",{className:"space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Max turns"}),c.jsx("input",{className:"field text-sm",type:"number",min:1,placeholder:"none",disabled:u,value:n.defaultBudget.maxTurns,onChange:b=>g({defaultBudget:{...n.defaultBudget,maxTurns:b.target.value}})})]}),c.jsxs("label",{className:"space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Max $ / session"}),c.jsx("input",{className:"field text-sm",type:"number",min:0,step:"0.1",placeholder:"none",disabled:u,value:n.defaultBudget.maxBudgetUsd,onChange:b=>g({defaultBudget:{...n.defaultBudget,maxBudgetUsd:b.target.value}})})]})]}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Developer capabilities"}),c.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-sm text-white/70",children:c.jsxs("label",{className:"flex items-center gap-1.5",children:[c.jsx("input",{type:"checkbox",disabled:u,checked:n.allowWorktreeWrite,onChange:b=>g({allowWorktreeWrite:b.target.checked})}),"Write files"]})}),c.jsx("p",{className:"text-xs text-white/40",children:"Unchecking runs the developer read-only (no Write/Edit/Bash grant), same as a reviewer. There is no separate push / open-PR toggle — a session with file-write access can already push and open PRs, and no mechanism here can restrict just that without also removing write access."})]})]})]})}function wa(n){return n==="claude_code"?"Claude":n==="cursor_local"?"Cursor":n==="codex_local"?"Codex":n==="muse_code"?"Muse Code":"No agent"}function y2(){return{maxTurns:"",maxBudgetUsd:""}}function gx(n){const i=n.maxTurns.trim()?Number(n.maxTurns):null,s=n.maxBudgetUsd.trim()?Number(n.maxBudgetUsd):null;return i==null&&s==null||i!=null&&(!Number.isFinite(i)||i<=0)||s!=null&&(!Number.isFinite(s)||s<=0)?null:{maxTurns:i,maxBudgetUsd:s}}function v2(n){const i=Fr(n);return{maxTurns:(i==null?void 0:i.maxTurns)!=null?String(i.maxTurns):"",maxBudgetUsd:(i==null?void 0:i.maxBudgetUsd)!=null?String(i.maxBudgetUsd):""}}function ys({children:n,className:i="",title:s}){return c.jsx("span",{title:s,className:`inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium uppercase tracking-wide border ${i}`,children:n})}function Zr(n,i){const s=n.find(d=>d.runtime===i);if(!s)return{ok:!1,detail:"no agent"};const u=s.issues.find(d=>d.code==="cli_missing"||d.code==="runtime_auth"||d.code==="runtime_unknown"||d.code==="runtime_capability"||d.code==="cursor_keychain");return u?{ok:!1,detail:u.message}:{ok:!0,detail:"CLI ready"}}function g2(n){const i=n.flatMap(s=>s.issues).find(s=>s.code==="github_cli_missing"||s.code==="github_auth"||s.code==="github_unreachable");return i?{ok:!1,detail:i.message}:n.length===0?{ok:!1,detail:"no agent"}:{ok:!0,detail:"gh ready"}}function mi({ok:n}){return c.jsx("span",{className:`inline-block w-1.5 h-1.5 rounded-full shrink-0 ${n?"bg-emerald-400":"bg-amber-400"}`,"aria-hidden":!0})}function b2({agents:n,agentDeckOnline:i}){const[s,u]=w.useState(null);w.useEffect(()=>{zy().then(b=>u(b.mcpUrl)).catch(()=>u(null))},[i]);const d=Zr(n,"claude_code"),f=Zr(n,"cursor_local"),m=Zr(n,"codex_local"),y=n.some(b=>b.runtime==="muse_code")?Zr(n,"muse_code"):null,g=g2(n),v=n.flatMap(b=>b.issues).find(b=>b.code==="mcp_not_registered");return c.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-x-4 gap-y-1.5 text-xs text-white/45",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Connections"}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:d.detail,children:[c.jsx(mi,{ok:d.ok}),c.jsx("span",{className:d.ok?"text-white/55":"text-amber-200/90",children:"Claude"})]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:f.detail,children:[c.jsx(mi,{ok:f.ok}),c.jsx("span",{className:f.ok?"text-white/55":"text-amber-200/90",children:"Cursor"})]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:m.detail,children:[c.jsx(mi,{ok:m.ok}),c.jsx("span",{className:m.ok?"text-white/55":"text-amber-200/90",children:"Codex"})]}),y&&c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:y.detail,children:[c.jsx(mi,{ok:y.ok}),c.jsx("span",{className:y.ok?"text-white/55":"text-amber-200/90",children:"Muse Code"})]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:g.detail,children:[c.jsx(mi,{ok:g.ok}),c.jsx("span",{className:g.ok?"text-white/55":"text-amber-200/90",children:"GitHub"})]}),c.jsxs("span",{className:"inline-flex items-center gap-1.5",title:(v==null?void 0:v.message)??(s?`MCP ${s}`:"Agent Deck optional"),children:[c.jsx(mi,{ok:i&&!v}),c.jsxs("span",{className:i&&!v?"text-[#92E4DD]/80":v?"text-amber-200/90":"text-white/35",children:["Agent Deck MCP",i?v?" (setup needed)":"":" (optional)"]})]})]})}const $d={unsupported:"not reported by provider",missing:"no data yet",expired:"expired",unparsable:"provider data unparsable",stale:"stale"};function w2(n){return n<10?"critical":n<30?"warning":"normal"}const S2={critical:"font-bold text-red-400",warning:"text-yellow-400",normal:"font-medium"},j2=new Set(["claude_code","codex_local","muse_code"]),_2="billing_cycle",N2="1M",A2="5H",E2="1W";function bx(n,i,s,u){if(n!==null)return Yy(n,i,null);const d=s??"missing";return{key:u,label:i,kind:"unknown",reason:d,title:`${i}: N/A (${$d[d]})`}}function Yy(n,i,s){if(n.unavailableReason===null&&n.remainingPercent!==null){const d=n.remainingPercent,f=n.resetAt?`, resets ${new Date(n.resetAt).toLocaleString()}`:"",m=s?`, ${s}`:"";return{key:n.windowKey,label:i,kind:"known",remaining:Math.round(d),rawRemaining:d,title:`${i}: ${Math.round(d)}% remaining${m}${f}`}}const u=n.unavailableReason??"missing";return{key:n.windowKey,label:i,kind:"unknown",reason:u,title:`${i}: N/A (${$d[u]})`}}function R2(n){if(n.runtime==="cursor_local"){const i=n.windows.find(s=>s.windowKey===_2)??null;return i===null?[]:[Yy(i,N2,"current billing cycle")]}if(j2.has(n.runtime)){const i=n.windows.find(u=>u.criticalRole==="five_hour")??null,s=n.windows.find(u=>u.criticalRole==="weekly")??null;return[bx(i,A2,n.unavailableReason,"missing-5H"),bx(s,E2,n.unavailableReason,"missing-1W")]}return[]}function k2({row:n}){const i=n.kind==="known";return c.jsxs("span",{"data-testid":`capacity-window-${n.key}`,"data-reason":n.kind==="unknown"?n.reason:void 0,title:n.title,className:`inline-flex items-center gap-1 rounded border px-1.5 py-0.5 whitespace-nowrap ${i?"border-white/15 bg-white/5 text-white/70":"border-white/10 bg-transparent text-white/35"}`,children:[c.jsx("span",{className:"text-white/40",children:n.label}),n.kind==="known"?(()=>{const s=w2(n.rawRemaining);return c.jsxs("span",{"data-severity":s,className:S2[s],children:[n.remaining,"%"]})})():c.jsx("span",{children:"N/A"})]})}function C2({data:n}){return n.runtimes.length===0?null:c.jsxs("div",{"data-testid":"runtime-capacity-strip",className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Runtime capacity"}),n.runtimes.map(i=>{const s=R2(i);return c.jsxs("span",{"data-testid":`capacity-entry-${i.runtime}`,className:"inline-flex min-w-0 flex-wrap items-center gap-1.5",children:[c.jsx("span",{className:"shrink-0 whitespace-nowrap font-medium text-white/55",children:wa(i.runtime)}),s.length===0?c.jsx("span",{"data-testid":`capacity-entry-${i.runtime}-na`,"data-reason":i.unavailableReason??"missing",title:`N/A (${$d[i.unavailableReason??"missing"]})`,className:"whitespace-nowrap text-white/35",children:"N/A"}):s.map(u=>c.jsx(k2,{row:u},u.key))]},i.runtime)})]})}function T2({refreshTick:n}){const[i,s]=w.useState(null);return w.useEffect(()=>{let u=!1;return Uy().then(d=>{u||s(d)}).catch(()=>{u||s(null)}),()=>{u=!0}},[n]),i?c.jsx(C2,{data:i}):null}const O2="data:image/svg+xml,%3csvg%20viewBox='0%200%20248%20248'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20aria-hidden='true'%3e%3cpath%20d='M52.4285%20162.873L98.7844%20136.879L99.5485%20134.602L98.7844%20133.334H96.4921L88.7237%20132.862L62.2346%20132.153L39.3113%20131.207L17.0249%20130.026L11.4214%20128.844L6.2%20121.873L6.7094%20118.447L11.4214%20115.257L18.171%20115.847L33.0711%20116.911L55.485%20118.447L71.6586%20119.392L95.728%20121.873H99.5485L100.058%20120.337L98.7844%20119.392L97.7656%20118.447L74.5877%20102.732L49.4995%2086.1905L36.3823%2076.62L29.3779%2071.7757L25.8121%2067.2858L24.2839%2057.3608L30.6515%2050.2716L39.3113%2050.8623L41.4763%2051.4531L50.2636%2058.1879L68.9842%2072.7209L93.4357%2090.6804L97.0015%2093.6343L98.4374%2092.6652L98.6571%2091.9801L97.0015%2089.2625L83.757%2065.2772L69.621%2040.8192L63.2534%2030.6579L61.5978%2024.632C60.9565%2022.1032%2060.579%2020.0111%2060.579%2017.4246L67.8381%207.49965L71.9133%206.19995L81.7193%207.49965L85.7946%2011.0443L91.9074%2024.9865L101.714%2046.8451L116.996%2076.62L121.453%2085.4816L123.873%2093.6343L124.764%2096.1155H126.292V94.6976L127.566%2077.9197L129.858%2057.3608L132.15%2030.8942L132.915%2023.4505L136.608%2014.4708L143.994%209.62643L149.725%2012.344L154.437%2019.0788L153.8%2023.4505L150.998%2041.6463L145.522%2070.1215L141.957%2089.2625H143.994L146.414%2086.7813L156.093%2074.0206L172.266%2053.698L179.398%2045.6635L187.803%2036.802L193.152%2032.5484H203.34L210.726%2043.6549L207.415%2055.1159L196.972%2068.3492L188.312%2079.5739L175.896%2096.2095L168.191%20109.585L168.882%20110.689L170.738%20110.53L198.755%20104.504L213.91%20101.787L231.994%2098.7149L240.144%20102.496L241.036%20106.395L237.852%20114.311L218.495%20119.037L195.826%20123.645L162.07%20131.592L161.696%20131.893L162.137%20132.547L177.36%20133.925L183.855%20134.279H199.774L229.447%20136.524L237.215%20141.605L241.8%20147.867L241.036%20152.711L229.065%20158.737L213.019%20154.956L175.45%20145.977L162.587%20142.787H160.805V143.85L171.502%20154.366L191.242%20172.089L215.82%20195.011L217.094%20200.682L213.91%20205.172L210.599%20204.699L188.949%20188.394L180.544%20181.069L161.696%20165.118H160.422V166.772L164.752%20173.152L187.803%20207.771L188.949%20218.405L187.294%20221.832L181.308%20223.959L174.813%20222.777L161.187%20203.754L147.305%20182.486L136.098%20163.345L134.745%20164.2L128.075%20235.42L125.019%20239.082L117.887%20241.8L111.902%20237.31L108.718%20229.984L111.902%20215.452L115.722%20196.547L118.779%20181.541L121.58%20162.873L123.291%20156.636L123.14%20156.219L121.773%20156.449L107.699%20175.752L86.304%20204.699L69.3663%20222.777L65.291%20224.431L58.2867%20220.768L58.9235%20214.27L62.8713%20208.48L86.304%20178.705L100.44%20160.155L109.551%20149.507L109.462%20147.967L108.959%20147.924L46.6977%20188.512L35.6182%20189.93L30.7788%20185.44L31.4156%20178.115L33.7079%20175.752L52.4285%20162.873Z'%20fill='%23D97757'/%3e%3c/svg%3e",M2="/assets/codex-YZSpL-SB.png",L2="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20aria-hidden='true'%3e%3cpath%20fill='%23EDEDED'%20d='M11.503.131%201.891%205.678a.84.84%200%200%200-.42.726v11.188c0%20.3.162.575.42.724l9.609%205.55a1%201%200%200%200%20.998%200l9.61-5.55a.84.84%200%200%200%20.42-.724V6.404a.84.84%200%200%200-.42-.726L12.497.131a1.01%201.01%200%200%200-.996%200M2.657%206.338h18.55c.263%200%20.43.287.297.515L12.23%2022.918c-.062.107-.229.064-.229-.06V12.335a.59.59%200%200%200-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23'/%3e%3c/svg%3e",D2="/assets/muse-CtdcC6ve.svg";function Su({src:n,className:i}){return c.jsx("span",{className:`inline-flex items-center justify-center rounded-lg bg-white/[0.04] ${i??"h-8 w-8"}`,children:c.jsx("img",{src:n,alt:"",className:"h-[70%] w-[70%] object-contain",draggable:!1})})}function U2({className:n="h-8 w-8"}){return c.jsx(Su,{src:O2,className:n})}function z2({className:n="h-8 w-8"}){return c.jsx(Su,{src:L2,className:n})}function B2({className:n="h-8 w-8"}){return c.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,"aria-hidden":!0,children:[c.jsx("rect",{width:"32",height:"32",rx:"8",fill:"white",fillOpacity:"0.06"}),c.jsx("circle",{cx:"16",cy:"13",r:"4.5",stroke:"#92E4DD",strokeWidth:"1.75"}),c.jsx("path",{d:"M8.5 24.5c1.2-3.5 3.8-5.5 7.5-5.5s6.3 2 7.5 5.5",stroke:"#92E4DD",strokeWidth:"1.75",strokeLinecap:"round"})]})}function q2({className:n="h-8 w-8"}){return c.jsx(Su,{src:M2,className:n})}function H2({className:n="h-8 w-8"}){return c.jsx(Su,{src:D2,className:n})}function Zy({runtime:n,className:i="h-8 w-8 shrink-0"}){return n==="claude_code"?c.jsx(U2,{className:i}):n==="cursor_local"?c.jsx(z2,{className:i}):n==="codex_local"?c.jsx(q2,{className:i}):n==="muse_code"?c.jsx(H2,{className:i}):c.jsx(B2,{className:i})}const Gr=()=>({runtime:"claude_code",deckId:"",purpose:"",defaultModel:"",defaultEffort:"",defaultBudget:y2(),allowWorktreeWrite:!0});function $2({agents:n,agentDeckOnline:i,onRefresh:s}){const[u,d]=w.useState(!1),[f,m]=w.useState(""),[y,g]=w.useState(Gr()),[v,b]=w.useState(!1),[N,U]=w.useState(null),[K,C]=w.useState(""),[V,D]=w.useState(Gr()),B=async I=>{if(I.preventDefault(),!(!f.trim()||!y.deckId)){b(!0);try{const ge={name:f.trim(),runtime:y.runtime,deckId:y.deckId,defaultModel:y.defaultModel.trim()||null,defaultEffort:y.defaultEffort||null,defaultBudget:gx(y.defaultBudget),purpose:y.purpose.trim()||null,permissionPolicy:yx(y)};await Jw(ge),m(""),g(Gr()),d(!1),s()}catch(ge){alert(String(ge))}finally{b(!1)}}},Q=I=>{U(I.id),C(I.name),D({runtime:I.runtime,deckId:I.deckId??"",purpose:I.purpose??"",defaultModel:mx(I)??"",defaultEffort:I.defaultEffort??"",defaultBudget:v2($1(I)),...x2(I.permissionPolicyJson)})},W=()=>{U(null),D(Gr())},oe=async I=>{if(!(!K.trim()||!V.deckId)){b(!0);try{const ge={name:K.trim(),runtime:V.runtime,deckId:V.deckId,defaultModel:V.defaultModel.trim()||null,defaultEffort:V.defaultEffort||null,defaultBudget:gx(V.defaultBudget),purpose:V.purpose.trim()||null,permissionPolicy:yx(V)};await Iw(I.id,ge),W(),s()}catch(ge){alert(String(ge))}finally{b(!1)}}},J=async I=>{if(confirm(`Delete agent "${I.name}"?`)){b(!0);try{await Fw(I.id),s()}catch(ge){alert(String(ge))}finally{b(!1)}}},Ee=n.filter(I=>!I.healthy).length;return c.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4 max-w-6xl mx-auto w-full",children:[c.jsxs("div",{className:"mb-6 flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("h1",{className:"heading-page",children:"Agents"}),c.jsx("p",{className:"text-sm text-white/50 mt-1",children:"Saved execution profiles — pick one when creating an issue instead of configuring each task"}),c.jsxs("p",{className:"text-sm text-white/45 mt-2",children:[n.length," agent",n.length===1?"":"s",Ee>0&&c.jsxs("span",{className:"text-red-400 ml-2",children:["· ",Ee," need",Ee===1?"s":""," attention"]})]})]}),c.jsx(b2,{agents:n,agentDeckOnline:i})]}),c.jsx("div",{className:"mb-4 overflow-x-auto space-y-2",children:c.jsx(T2,{})}),c.jsx("div",{className:"space-y-3 mb-6",children:n.map(I=>{const ge=mx(I);return c.jsxs("div",{className:"panel flex flex-col sm:flex-row sm:items-start gap-3 justify-between",children:[c.jsxs("div",{className:"flex gap-3 min-w-0 flex-1",children:[c.jsx(Zy,{runtime:I.runtime}),c.jsxs("div",{className:"space-y-2 min-w-0 flex-1",children:[c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c.jsx("span",{className:"text-lg font-semibold text-[#E8F6F4]",children:I.name}),!I.healthy&&c.jsx(ys,{className:"bg-red-500/15 text-red-300 border-red-400/30 normal-case",children:"Needs fix"})]}),c.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[c.jsx(ys,{className:"bg-white/5 text-white/55 border-white/15 normal-case",children:wa(I.runtime)}),I.deckName?c.jsxs(ys,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case",children:["◆ ",I.deckName]}):c.jsx(ys,{className:"bg-white/5 text-white/40 border-white/10 normal-case",children:"No deck"}),ge&&c.jsx(ys,{className:"bg-white/5 text-white/50 border-white/10 normal-case truncate max-w-[10rem]",title:ge,children:ge})]}),N===I.id&&c.jsxs("div",{className:"space-y-3 pt-2 border-t border-white/10",children:[c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Name"}),c.jsx("input",{className:"field text-sm",value:K,onChange:He=>C(He.target.value)})]}),c.jsx(vx,{value:V,onChange:D,agentDeckOnline:i}),c.jsxs("div",{className:"flex gap-2 pt-1",children:[c.jsx("button",{type:"button",disabled:v||!K.trim()||!V.deckId,onClick:()=>oe(I),className:"btn-gold text-sm px-3 py-1.5",children:"Save"}),c.jsx("button",{type:"button",onClick:W,className:"btn-ghost text-sm px-3 py-1.5",children:"Cancel"})]})]}),I.issues.length>0&&c.jsx("ul",{className:"text-sm text-red-300/90 space-y-1",children:I.issues.map((He,yt)=>c.jsxs("li",{children:["· ",He.message]},yt))})]})]}),c.jsxs("div",{className:"flex gap-2 shrink-0",children:[N!==I.id&&c.jsx("button",{type:"button",disabled:v,onClick:()=>Q(I),className:"btn-ghost text-sm px-3 py-1.5",children:"Edit"}),c.jsx("button",{type:"button",disabled:v,onClick:()=>J(I),className:"btn-ghost text-sm px-3 py-1.5",children:"Delete"})]})]},I.id)})}),u?c.jsxs("form",{onSubmit:B,className:"panel space-y-3",children:[c.jsx("h2",{className:"heading-panel",children:"New Agent"}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Name"}),c.jsx("input",{className:"field",placeholder:"e.g. Claude · Work",value:f,onChange:I=>m(I.target.value)})]}),c.jsx(vx,{value:y,onChange:g,agentDeckOnline:i}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"submit",disabled:v||!f.trim()||!y.deckId,className:"btn-gold px-4 py-2",children:v?"Saving…":"Create agent"}),c.jsx("button",{type:"button",onClick:()=>d(!1),className:"btn-ghost px-4 py-2",children:"Cancel"})]})]}):c.jsx("button",{type:"button",onClick:()=>d(!0),className:"btn-gold px-4 py-2",children:"Add agent"})]})}function V2(n){try{return zd(n).identity}catch{return null}}function Y2(n,i){return n!=="linear"||!i?null:i.repoResolution??gy(i.labels)}function Z2(n,i){if(!i)return n;const s=i.repoResolution??gy(i.labels);return s.status==="resolved"&&s.repository?s.repository:n}function G2(n,i){var u;const s=Y2(n,i);if(!s)return null;if(s.status==="conflict")return`Conflicting repo: labels (${(s.labels??[]).join(", ")}) — kept the current repository. Fix the labels in Linear or type a repository below.`;if(s.status==="invalid"){const d=((u=s.labels)==null?void 0:u[0])??"repo:",f=s.error?` — ${s.error}`:"";return`Invalid repository label ${d}${f}. Kept the current repository — fix the label in Linear or type a repository below.`}return null}function wx(n){return n.title.trim().length>0&&V2(n.repo)!=null&&n.developerAgentId.length>0&&n.reviewerAgentId.length>0}const Q2=["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"],X2={q:"",status:"",repo:"",needsAttention:!1};function Vd(n){return n.startsWith("?")?n.slice(1):n}function Sx(n){var s,u,d;const i=new URLSearchParams(Vd(n));return{q:((s=i.get("q"))==null?void 0:s.trim())??"",status:((u=i.get("status"))==null?void 0:u.trim())??"",repo:((d=i.get("repo"))==null?void 0:d.trim())??"",needsAttention:i.get("needsAttention")==="1"||i.get("needsAttention")==="true"}}function K2(n){const i=new URLSearchParams(Vd(n)),s=g=>{var b;const v=(b=i.get(g))==null?void 0:b.trim();return v||void 0},u={},d=s("q");d!==void 0&&(u.q=d);const f=s("status");f!==void 0&&(u.status=f);const m=s("repo");m!==void 0&&(u.repo=m),(i.get("needsAttention")==="1"||i.get("needsAttention")==="true")&&(u.needsAttention=!0);const y=Number(i.get("page"));return Number.isInteger(y)&&y>=1&&(u.page=y),u}function J2(n){var s,u,d;const i=new URLSearchParams;return(s=n.q)!=null&&s.trim()&&i.set("q",n.q.trim()),(u=n.status)!=null&&u.trim()&&i.set("status",n.status.trim()),(d=n.repo)!=null&&d.trim()&&i.set("repo",n.repo.trim()),n.needsAttention&&i.set("needsAttention","1"),n.page!==void 0&&Number.isInteger(n.page)&&n.page>1&&i.set("page",String(n.page)),i.sort(),i.toString()}function I2(n){const i={};return n.q.trim()&&(i.q=n.q.trim()),n.status.trim()&&(i.status=n.status.trim()),n.repo.trim()&&(i.repo=n.repo.trim()),n.needsAttention&&(i.needsAttention=!0),i}function F2(n,i){const s=new URLSearchParams(Vd(n));return i<=1?s.delete("page"):s.set("page",String(Math.floor(i))),s.sort(),s.toString()}function jx(n){if(n.total===0)return"No issues match these filters";const i=(n.page-1)*n.limit+1,s=Math.min(n.total,n.page*n.limit);return`Showing ${i}–${s} of ${n.total} issues`}function _x(n){return n.totalPages<=1?"":`Page ${n.page} of ${n.totalPages}`}function Nx(n){return!!(n.q||n.status||n.repo||n.needsAttention)}const W2={ready:"bg-white/10 text-white/70 border-white/20",developing:"bg-cyber-violet/20 text-cyber-violet-light border-cyber-violet/40",reviewing:"bg-cyber-gold/20 text-[#E8DC7A] border-cyber-gold/40",repairing:"bg-cyber-violet/25 text-cyber-violet-light border-cyber-violet/50",final_review:"bg-amber-500/20 text-amber-300 border-amber-400/40",needs_human:"bg-red-500/20 text-red-300 border-red-400/40",done:"bg-cyber-teal/20 text-cyber-teal border-cyber-teal/40",closed:"bg-white/5 text-white/40 border-white/10"},P2={ready:"Ready",developing:"Developing",reviewing:"Reviewing",repairing:"Repairing",final_review:"Final review",needs_human:"Needs human",done:"Done",closed:"Closed"};function Gy({status:n}){return c.jsx("span",{className:`text-xs leading-none px-2 py-1 rounded border tabular-nums ${W2[n]}`,children:P2[n]})}function Qy({value:n,onChange:i,recentRepos:s=[],id:u}){return c.jsxs("div",{className:"space-y-1",children:[s.length>0&&c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:s.includes(n)?n:"",onChange:d=>{d.target.value&&i(d.target.value)},"aria-label":"Recent repositories",children:[c.jsx("option",{value:"",children:"Recent repositories…"}),s.map(d=>c.jsx("option",{value:d,children:d},d))]}),c.jsx("input",{id:u,className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",placeholder:"GitHub URL or owner/repo",value:n,onChange:d=>i(d.target.value)})]})}function eS(){return{label:"",repository:""}}function tS(n){const i=new Set;for(const s of n){const u=s.label.trim();if(!u)return"Labels must not be empty";if(u.length>100)return`Label "${u}" must be 1–100 characters`;const d=u.toLowerCase();if(i.has(d))return`Duplicate label "${u}"`;if(i.add(d),!s.repository.trim())return`Repository for "${u}" must not be empty`}return n.length>100?"At most 100 mappings are allowed":null}function aS({recentRepos:n=[],initialMappings:i,loadMappings:s=Qw,saveMappings:u=Xw,onClose:d}){const[f,m]=w.useState(i??[]),[y,g]=w.useState(i!==void 0),[v,b]=w.useState(null),[N,U]=w.useState(null),[K,C]=w.useState(!1);w.useEffect(()=>{if(i!==void 0)return;let B=!0;return s().then(Q=>{B&&(m(Q),g(!0))}).catch(Q=>{B&&(b(String(Q)),g(!0))}),()=>{B=!1}},[i,s]);const V=(B,Q)=>{m(W=>W.map((oe,J)=>J===B?{...oe,...Q}:oe))},D=async()=>{b(null),U(null);const B=tS(f);if(B){b(B);return}C(!0);try{const Q=await u(f.map(W=>({label:W.label.trim(),repository:W.repository})));m(Q),U(Q.length===0?"Mappings cleared":`Saved ${Q.length} mapping${Q.length===1?"":"s"}`)}catch(Q){b(String(Q))}finally{C(!1)}};return c.jsxs("div",{className:"rounded border border-white/10 bg-black/20 px-3 py-2 space-y-2","aria-label":"Repository mappings",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("p",{className:"text-xs text-white/60",children:"Repository mappings"}),d&&c.jsx("button",{type:"button",className:"text-xs text-white/50 hover:text-white",onClick:d,children:"Close"})]}),y?f.length===0?c.jsx("p",{className:"text-xs text-white/40",children:"No mappings yet — add one to prefill the Repository field from a Linear label."}):f.map((B,Q)=>c.jsxs("div",{className:"flex gap-2 items-start","data-testid":"mapping-row",children:[c.jsx("input",{className:"w-40 shrink-0 bg-black/30 border border-white/10 rounded px-2 py-1.5 text-sm",placeholder:"Linear label","aria-label":`Linear label for mapping ${Q+1}`,value:B.label,onChange:W=>V(Q,{label:W.target.value})}),c.jsx("div",{className:"flex-1 min-w-0",children:c.jsx(Qy,{value:B.repository,onChange:W=>V(Q,{repository:W}),recentRepos:n})}),c.jsx("button",{type:"button",className:"shrink-0 text-xs text-white/50 hover:text-white px-1 py-1.5",onClick:()=>m(W=>W.filter((oe,J)=>J!==Q)),children:"Remove"})]},Q)):c.jsx("p",{className:"text-xs text-white/40",children:"Loading…"}),v&&c.jsx("p",{className:"text-xs text-red-300","data-testid":"mappings-error",children:v}),N&&c.jsx("p",{className:"text-xs text-teal-200/80",children:N}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded border border-white/15 text-white/70 hover:text-white",onClick:()=>m(B=>[...B,eS()]),children:"Add mapping"}),c.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded border border-teal/40 text-teal disabled:opacity-50",disabled:K||!y,onClick:()=>void D(),children:K?"Saving…":"Save changes"})]})]})}function Xy(n){return n.issues.some(i=>i.code==="usage_capped")}function Ky(n){return[...n].sort((i,s)=>Number(s.healthy)-Number(i.healthy))}function Fn(n){var u;const i=`${n.name} · ${wa(n.runtime)}`,s=[];if(!n.healthy){const d=((u=n.issues[0])==null?void 0:u.message)??"unhealthy";s.push(`NEEDS FIX: ${d}`)}return Xy(n)&&s.push("USAGE CAPPED"),s.length>0?`${i} — ${s.join(" · ")}`:i}function cu(n){var i;return n?n.healthy?Xy(n)?"Usage capped — admission will refuse until the cap lifts":null:((i=n.issues[0])==null?void 0:i.message)??"Agent is unhealthy":null}function nS({agents:n,initialDeveloperId:i,initialReviewerId:s,busy:u,onSave:d,onCancel:f}){var D,B;const[m,y]=w.useState(i??""),[g,v]=w.useState(s??""),b=Ky(n),N=n.find(Q=>Q.id===m),U=n.find(Q=>Q.id===g),K=cu(N),C=cu(U),V=m===(i??"")&&g===(s??"");return c.jsxs("div",{className:"p-3 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[c.jsx("p",{className:"text-xs text-white/50",children:"Reassign agents — queue position is kept, the wait reason is rechecked, and the change is recorded on the timeline."}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Developer"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:m,disabled:u,title:N?`${N.name} · ${wa(N.runtime)}${N.healthy?" · healthy":` · ${((D=N.issues[0])==null?void 0:D.message)??"unhealthy"}`}`:"Pick a developer agent",onChange:Q=>y(Q.target.value),children:[c.jsx("option",{value:"",children:"Developer agent…"}),b.map(Q=>c.jsx("option",{value:Q.id,title:Fn(Q),children:(Q.healthy?"● ":"○ ")+Fn(Q)},Q.id))]}),K&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:K})]}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Reviewer"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:g,disabled:u,title:U?`${U.name} · ${wa(U.runtime)}${U.healthy?" · healthy":` · ${((B=U.issues[0])==null?void 0:B.message)??"unhealthy"}`}`:"Pick a reviewer agent",onChange:Q=>v(Q.target.value),children:[c.jsx("option",{value:"",children:"Reviewer agent…"}),b.map(Q=>Q.runtime==="muse_code"?c.jsx("option",{value:Q.id,disabled:!0,title:"Muse Code cannot be a reviewer (developer role only)",children:`○ ${Q.name} · ${wa(Q.runtime)} — reviewer not supported`},Q.id):c.jsx("option",{value:Q.id,title:Fn(Q),children:(Q.healthy?"● ":"○ ")+Fn(Q)},Q.id))]}),C&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:C})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 py-1.5 text-sm disabled:opacity-50",disabled:u||!m||!g||V,title:"Save via the issue PATCH contract — keeps queue position and rechecks the wait reason",onClick:()=>d(m,g),children:"Save agents"}),c.jsx("button",{type:"button",className:"px-4 py-1.5 text-sm text-white/60 hover:text-white disabled:opacity-50",disabled:u,onClick:f,children:"Cancel"})]})]})}function ou({className:n="w-3.5 h-3.5"}){return c.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor",className:n,"aria-hidden":!0,children:c.jsx("path",{fillRule:"evenodd",d:"M8.982 1.566a1.13 1.13 0 0 0-1.964 0L.165 13.233c-.457.778.091 1.767.982 1.767h13.706c.891 0 1.439-.99.982-1.767L8.982 1.566zM8 5.697a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 5.697zm0 7.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"})})}const lS={final_review:"Final review",attempts_exhausted:"Attempts exhausted",policy_escalation:"Policy escalation",product_scope_decision:"Product scope decision",deck_interaction_required:"Agent Deck interaction required",reflection_interaction_required:"Reflection interaction required",outbound_delivery_interaction_required:"Outbound delivery interaction required"};function iS(n){return lS[n]??n}function bd(n){if(!n)return null;try{return JSON.parse(n)}catch{return null}}function Jy(n){const i=bd(n.responseOptionsJson);return Array.isArray(i)?i.filter(s=>typeof(s==null?void 0:s.choice)=="string"&&typeof(s==null?void 0:s.label)=="string"):[]}function sS(n){var f;const i=[],s=bd(n.evidenceJson),u=bd(n.continuationPreviewJson);if((f=s==null?void 0:s.review)!=null&&f.verdict){const m=Array.isArray(s.review.findings)?s.review.findings.length:0;i.push(`Reviewer verdict: ${s.review.verdict}${m?` · ${m} finding(s)`:""}`)}(s!=null&&s.serviceId||s!=null&&s.toolName)&&i.push(`Delivery: ${[s.serviceId,s.toolName].filter(Boolean).join(" · ")}`);const d=s==null?void 0:s.pushDivergence;if(d&&typeof d.localSha=="string"&&typeof d.remoteSha=="string"){const m=typeof d.branch=="string"?d.branch:"the branch",y=typeof d.ahead=="number"?` (+${d.ahead})`:"",g=typeof d.behind=="number"?` (+${d.behind})`:"";i.push(`Push: local ${d.localSha}${y} · origin/${m} ${d.remoteSha}${g}`),typeof d.observedRemoteSha=="string"&&d.observedRemoteSha!==d.remoteSha&&i.push(`Remote moved: origin/${m} is now at ${d.observedRemoteSha}`),typeof d.lastLeaseError=="string"&&d.lastLeaseError&&i.push(`Last lease attempt: ${d.lastLeaseError}`)}return u!=null&&u.resumeRole&&i.push(`Continuation: resumes as ${u.resumeRole}${u.resumeHeadSha?` at ${u.resumeHeadSha.slice(0,8)}`:""}`),i}function rS(n){return n==="close"||n==="reject"||n==="abort"}function Iy({options:n,disabled:i,onChoose:s}){return n.length===0?null:c.jsx("div",{className:"flex flex-wrap gap-2",children:n.map(u=>c.jsx("button",{type:"button",className:`${rS(u.choice)?"btn-ghost-danger":"btn-gold"} px-3 py-1 text-xs disabled:opacity-50`,disabled:i,onClick:()=>s(u.choice),children:u.label},u.choice))})}function uS({actions:n,busyActionId:i,onResolve:s}){return n.length===0?null:c.jsxs("div",{className:"mb-4 rounded border border-red-400/30 bg-red-500/10",children:[c.jsxs("div",{className:"px-4 py-2 flex items-center gap-2 border-b border-red-400/20",children:[c.jsx(ou,{className:"w-4 h-4 shrink-0 text-red-300"}),c.jsxs("span",{className:"font-ui-display text-sm font-medium text-red-200",children:[n.length," ",n.length===1?"item needs":"items need"," your attention"]})]}),c.jsx("div",{className:"divide-y divide-white/5",children:n.map(u=>{const d=iS(u.actionType),f=sS(u);if(u.issueId)return c.jsxs(ja,{to:`/issues/${u.issueId}`,className:"block w-full text-left px-4 py-2 hover:bg-white/5 transition-colors",children:[c.jsx("span",{className:"text-xs uppercase tracking-wide text-red-300/80",children:d}),c.jsx("span",{className:"text-sm text-white/80 ml-2",children:u.question})]},u.id);const m=Jy(u);return c.jsxs("div",{className:"px-4 py-3 space-y-1.5",children:[c.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[c.jsx("span",{className:"text-xs uppercase tracking-wide text-red-300/80",children:d}),c.jsx("span",{className:"text-xs text-white/35 shrink-0",children:new Date(u.requestedAt).toLocaleString()})]}),c.jsx("p",{className:"text-sm text-white/85",children:u.question}),u.reason&&u.reason!==u.question&&c.jsx("p",{className:"text-xs text-white/50",children:u.reason}),f.map(y=>c.jsx("p",{className:"text-xs text-white/50",children:y},y)),m.length>0?c.jsx(Iy,{options:m,disabled:i===u.id,onChoose:y=>s(u.id,y)}):c.jsxs("p",{className:"text-xs text-amber-200/80",children:["This item declares no response options — resolve it from the CLI (",c.jsx("code",{children:"agent-dealer action"}),")."]})]},u.id)})})]})}const cS="web";function oS(n){const i=Date.now()-new Date(n).getTime(),s=Math.floor(i/6e4);if(s<1)return"just now";if(s<60)return`${s}m ago`;const u=Math.floor(s/60);return u<24?`${u}h ago`:`${Math.floor(u/24)}d ago`}function dS(n){var u;if(!(n!=null&&n.trim()))return;const i=n.match(/##\s*Acceptance criteria\s*\n([\s\S]*?)(?=\n##\s|$)/i);return((u=i==null?void 0:i[1])==null?void 0:u.trim())||void 0}function fS({agents:n,humanActions:i,onHumanActionsChanged:s}){const[u,d]=w.useState(null),[f,m]=w.useState(null),[y,g]=oy(),v=y.toString(),b=K2(v),N=w.useRef(b);N.current=b;const[U,K]=w.useState(()=>Sx(v)),[C,V]=w.useState(!1),D=Nx(b),[B,Q]=w.useState(!1),[W,oe]=w.useState(!1),[J,Ee]=w.useState("manual"),[I,ge]=w.useState([]),[He,yt]=w.useState(""),[dt,Pe]=w.useState(""),[Tt,gt]=w.useState(!1),[Ie,L]=w.useState([]),[Z,ce]=w.useState(""),[Re,ke]=w.useState(""),[j,H]=w.useState("main"),[F,ee]=w.useState(""),[le,xe]=w.useState(""),[he,Me]=w.useState(""),[$e,Na]=w.useState(""),[zt,ia]=w.useState(!0),[Qa,Le]=w.useState(null),[bt,Xa]=w.useState([]),[lt,Pn]=w.useState(null),[wn,Ua]=w.useState(!1),[Ot,Ka]=w.useState(null),[Sn,et]=w.useState(null),it=I.find(O=>O.id===He)??null,el=J==="linear"&&it!=null,tl=G2(J,it),Ja=wx({title:Z,repo:Re,developerAgentId:he,reviewerAgentId:$e}),al=O=>{e2(O).then(d).catch(re=>Le(String(re)))},wt=()=>{al(N.current),Io().then(Xa).catch(()=>{}),c2().then(Pn).catch(()=>{})},ji=async O=>{Ua(!0),Le(null);try{const re=await o2(O);Pn(re),wt()}catch(re){Le(String(re))}finally{Ua(!1)}},Rl=async O=>{et(O),Le(null);try{const re=await By(O);Ka({issueId:O,developerAgentId:re.issue.developerAgentId,reviewerAgentId:re.issue.reviewerAgentId})}catch(re){Le(String(re))}finally{et(null)}},Ia=async(O,re)=>{if(Ot){et(Ot.issueId);try{await gd(Ot.issueId,{developerAgentId:O,reviewerAgentId:re}),Ka(null),wt()}catch(Ke){Ka(null),Le(String(Ke)),wt()}finally{et(null)}}},_t=async O=>{et(O),Le(null);try{await qy(O),wt()}catch(re){Le(String(re))}finally{et(null)}},Kt=async O=>{et(O),Le(null);try{await Hy(O),wt()}catch(re){Le(String(re)),wt()}finally{et(null)}},G=O=>{const re=J2(I2(O));g(re?Object.fromEntries(new URLSearchParams(re)):{})},Ce=()=>{K(X2),g({})},st=O=>{const re=F2(v,O);g(re?Object.fromEntries(new URLSearchParams(re)):{})},Bt=O=>K(re=>({...re,...O})),jn=async(O,re,Ke)=>{m(O),Le(null);try{await Vy(O,cS,re,Ke),s(),wt()}catch(Jt){Le(String(Jt))}finally{m(null)}};w.useEffect(()=>{K(Sx(v))},[v]),w.useEffect(()=>{al(N.current),Io().then(Xa).catch(()=>{});const O=setInterval(()=>{al(N.current),Io().then(Xa).catch(()=>{})},5e3);return()=>clearInterval(O)},[v]),w.useEffect(()=>{B&&(t2().then(L).catch(()=>L([])),J==="linear"&&Zw().then(ge).catch(O=>Le(`Linear inbox: ${String(O)}`)))},[B,J]),w.useEffect(()=>{it&&(ce(`${it.identifier}: ${it.title}`),ee(it.description??""),xe(dS(it.description)??""),ke(O=>Z2(O,it)))},[it]);const Mt=()=>{ce(""),ke(""),ee(""),xe(""),yt(""),Pe(""),ia(!0),H("main")},sa=O=>{ge(re=>[O,...re.filter(Ke=>Ke.id!==O.id)]),yt(O.id),Pe(O.identifier)},za=async()=>{const O=dt.trim();if(!O){Le("Paste a Linear id (e.g. NOT-103) or issue URL");return}gt(!0),Le(null);try{const re=await Gw(O);sa(re)}catch(re){Le(`Linear lookup: ${String(re)}`)}finally{gt(!1)}},kl=async()=>{if(!wx({title:Z,repo:Re,developerAgentId:he,reviewerAgentId:$e})){Le("Title, GitHub repository, developer, and reviewer are required");return}try{await i2({title:Z.trim(),repo:Re.trim(),baseBranch:j.trim()||"main",description:F.trim()||void 0,acceptanceCriteria:le.trim()||void 0,developerAgentId:he,reviewerAgentId:$e,maxReviewRounds:3,maxInfraAttempts:3,autoMerge:zt,source:J==="linear"&&it?"linear":"manual",externalId:it==null?void 0:it.id,externalLabel:it==null?void 0:it.identifier,externalUrl:it==null?void 0:it.url}),Q(!1),Mt(),wt()}catch(O){Le(String(O))}};return c.jsxs("div",{className:"flex-1 min-h-0 px-6 py-4 w-full overflow-y-auto",children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsx("h2",{className:"font-ui-display text-lg font-semibold text-white/90",children:"Issues"}),c.jsx("button",{type:"button",className:"btn-gold px-4",onClick:()=>Q(O=>!O),children:"New issue"})]}),Qa&&c.jsx("p",{className:"text-sm text-red-300 mb-3",children:Qa}),B&&c.jsxs("div",{className:"mb-4 p-4 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[c.jsxs("p",{className:"text-xs text-white/50",children:["Workflow:"," ",c.jsxs("span",{className:"text-white/75",children:["developer → reviewer → ",zt?"auto-merge on approve":"final human review"]}),"."]}),c.jsxs("div",{className:"flex gap-2 text-sm",children:[c.jsx("button",{type:"button",className:`font-ui-display px-3 py-1 rounded border ${J==="manual"?"border-teal/50 text-teal":"border-white/10 text-white/50"}`,onClick:()=>{Ee("manual"),yt("")},children:"Manual"}),c.jsx("button",{type:"button",className:`font-ui-display px-3 py-1 rounded border ${J==="linear"?"border-teal/50 text-teal":"border-white/10 text-white/50"}`,onClick:()=>Ee("linear"),children:"From Linear"})]}),J==="linear"&&c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{className:"flex-1 bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",placeholder:"NOT-103 or Linear URL",value:dt,onChange:O=>Pe(O.target.value),onKeyDown:O=>{O.key==="Enter"&&(O.preventDefault(),za())}}),c.jsx("button",{type:"button",className:"font-ui-display px-3 py-2 rounded border border-teal/40 text-teal text-sm disabled:opacity-50",disabled:Tt||!dt.trim(),onClick:()=>void za(),children:Tt?"…":"Lookup"})]}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:He,onChange:O=>{const re=O.target.value;yt(re);const Ke=I.find(Jt=>Jt.id===re);Ke&&Pe(Ke.identifier)},children:[c.jsx("option",{value:"",children:"Or pick from open inbox…"}),I.map(O=>c.jsxs("option",{value:O.id,children:[O.identifier,": ",O.title]},O.id))]})]}),c.jsx("input",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm disabled:opacity-60",placeholder:"Title",value:Z,disabled:el,onChange:O=>ce(O.target.value)}),c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm disabled:opacity-60",rows:3,placeholder:"Problem statement / description",value:F,disabled:el,onChange:O=>ee(O.target.value)}),c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",rows:3,placeholder:"Acceptance criteria",value:le,onChange:O=>xe(O.target.value)}),c.jsxs("div",{className:"flex gap-2 items-stretch",children:[c.jsxs("div",{className:"flex-1 space-y-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"text-xs text-white/50",children:"Repository"}),c.jsx("button",{type:"button","aria-label":"Configure repository mappings",title:"Configure repository mappings","aria-expanded":W,onClick:()=>oe(O=>!O),className:"text-white/40 hover:text-white shrink-0 rounded focus-visible:outline focus-visible:outline-2 focus-visible:outline-cyber-teal/45",children:c.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[c.jsx("path",{d:"M8 5.2a2.8 2.8 0 1 0 0 5.6 2.8 2.8 0 0 0 0-5.6Z",stroke:"currentColor",strokeWidth:"1.3"}),c.jsx("path",{d:"M8 1.5v1.7M8 12.8v1.7M1.5 8h1.7M12.8 8h1.7M3.4 3.4l1.2 1.2M11.4 11.4l1.2 1.2M12.6 3.4l-1.2 1.2M4.6 11.4l-1.2 1.2",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]})})]}),c.jsx(Qy,{value:Re,onChange:ke,recentRepos:Ie}),W&&c.jsx(aS,{recentRepos:Ie,onClose:()=>oe(!1)}),tl&&c.jsx("p",{className:"text-xs text-amber-200/80","data-testid":"repo-label-warning",children:tl})]}),c.jsx("input",{className:"w-32 bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",placeholder:"Base (seed)",title:"Seed only — managed GitHub clones use the remote default at first checkout",value:j,onChange:O=>H(O.target.value)})]}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:he,onChange:O=>Me(O.target.value),children:[c.jsx("option",{value:"",children:"Developer agent…"}),n.map(O=>c.jsx("option",{value:O.id,children:O.name},O.id))]}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:$e,onChange:O=>Na(O.target.value),children:[c.jsx("option",{value:"",children:"Reviewer agent…"}),n.map(O=>c.jsx("option",{value:O.id,children:O.name},O.id))]}),c.jsxs("label",{className:"flex items-center gap-2 text-sm text-white/70 cursor-pointer",children:[c.jsx("input",{type:"checkbox",checked:zt,onChange:O=>ia(O.target.checked),className:"accent-[#C4B643]"}),"Auto-merge when reviewer approves (skip final human review)"]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 disabled:opacity-40",disabled:!Ja,title:Ja?void 0:"Title, GitHub repository, developer, and reviewer are required",onClick:kl,children:J==="linear"?"Kick from Linear":"Create"}),c.jsx("button",{type:"button",className:"font-ui-display px-4 py-2 text-sm text-white/60 hover:text-white",onClick:()=>{Q(!1),Mt()},children:"Cancel"})]})]}),(bt.length>0||lt)&&c.jsxs("div",{className:"mb-4 rounded border border-cyber-teal/25 bg-cyber-teal/5",children:[c.jsxs("div",{className:"px-4 py-2 border-b border-cyber-teal/20 flex items-center justify-between gap-3",children:[c.jsx("span",{className:"font-ui-display text-sm font-medium text-cyber-teal",children:"Admission queue"}),c.jsx("span",{className:"flex items-center gap-2 text-xs text-white/40",children:lt?c.jsxs(c.Fragment,{children:[c.jsxs("span",{children:[lt.active," active · ",lt.waiting," waiting · limit"," ",lt.limit,lt.overCap?" · over capacity":""]}),lt.options.length>0?c.jsxs("label",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"text-white/35",children:"limit"}),c.jsx("select",{className:"bg-black/30 border border-white/10 rounded px-1.5 py-0.5 text-xs text-white/80 disabled:opacity-50",value:lt.options.includes(lt.maxActiveIssues)?lt.maxActiveIssues:lt.limit,disabled:wn,title:lt.ceiling<2?`Capped by the worker/spawn ceiling (${lt.ceiling})`:"How many issues may execute in parallel (max one per repository)",onChange:O=>void ji(Number(O.target.value)),children:lt.options.map(O=>c.jsx("option",{value:O,children:O},O))})]}):c.jsxs("span",{title:`Capped by the worker/spawn ceiling (${lt.ceiling})`,children:["max ",lt.ceiling]})]}):c.jsxs("span",{children:[bt.length," waiting · sequential"]})})]}),c.jsx("div",{className:"divide-y divide-white/5",children:bt.map((O,re)=>c.jsxs("div",{children:[c.jsxs("div",{className:"px-4 py-2 flex items-start gap-3",children:[c.jsx("span",{className:"text-xs text-white/35 w-5 shrink-0 pt-0.5",children:O.position}),c.jsxs(ja,{to:`/issues/${O.issueId}`,className:"flex-1 min-w-0 text-left hover:text-cyber-teal",children:[c.jsx("span",{className:"text-sm text-white/85 truncate block",children:O.title??O.issueId.slice(0,8)}),O.waitReason?c.jsx("span",{className:"text-xs text-amber-200/80 block mt-0.5",children:O.waitReason}):c.jsxs("span",{className:"text-xs text-white/35 block mt-0.5",children:[O.issueStatus??"queued"," · next up"]})]}),c.jsxs("div",{className:"flex items-center gap-2 shrink-0 flex-wrap justify-end",children:[c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:Sn===O.issueId,title:"Change the developer/reviewer agents — keeps queue position and rechecks the wait reason",onClick:()=>void Rl(O.issueId),children:"Edit"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:Sn===O.issueId,title:"Run next — move to the front of the admission queue; runs now if a slot is free, otherwise waits first with a reason",onClick:()=>void _t(O.issueId),children:"Run next"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:Sn===O.issueId,title:"Execute now — start immediately, skipping queue order; refuses (changing nothing) when capacity, readiness, blockers, or agent health prevents it",onClick:()=>void Kt(O.issueId),children:"Execute now"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:re===0,title:"Move to top",onClick:()=>{Yr(O.issueId,"top").then(wt).catch(Ke=>Le(String(Ke)))},children:"Top"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:re===0,title:"Move up",onClick:()=>{const Ke=bt[re-1];Ke&&Yr(O.issueId,{before:Ke.issueId}).then(wt).catch(Jt=>Le(String(Jt)))},children:"↑"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:re===bt.length-1,title:"Move down",onClick:()=>{const Ke=bt[re+1];Ke&&Yr(O.issueId,{after:Ke.issueId}).then(wt).catch(Jt=>Le(String(Jt)))},children:"↓"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-cyber-teal disabled:opacity-30",disabled:re===bt.length-1,title:"Move to bottom",onClick:()=>{Yr(O.issueId,"bottom").then(wt).catch(Ke=>Le(String(Ke)))},children:"Bottom"}),c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/40 hover:text-white",onClick:()=>{$y(O.issueId).then(wt).catch(Ke=>Le(String(Ke)))},children:"Remove"})]})]}),(Ot==null?void 0:Ot.issueId)===O.issueId&&c.jsx("div",{className:"px-4 pb-3 pl-12",children:c.jsx(nS,{agents:n,initialDeveloperId:Ot.developerAgentId,initialReviewerId:Ot.reviewerAgentId,busy:Sn===O.issueId,onSave:(Ke,Jt)=>void Ia(Ke,Jt),onCancel:()=>Ka(null)})})]},O.id))})]}),c.jsx(uS,{actions:i,busyActionId:f,onResolve:(O,re)=>void jn(O,re)}),c.jsxs("div",{className:"mb-4 rounded border border-white/10 bg-panel-elevated/60",children:[c.jsxs("button",{type:"button","aria-expanded":C,"aria-controls":"issues-filter-form",onClick:()=>V(O=>!O),className:"w-full flex items-center gap-2 px-4 py-2.5 text-sm text-white/70 hover:text-white",children:[c.jsx("span",{"aria-hidden":"true",className:"text-xs text-white/40 w-3 shrink-0",children:C?"▾":"▸"}),c.jsx("span",{className:"font-ui-display",children:C?"Hide filters":"Show filters"}),D&&c.jsx("span",{"data-testid":"filters-active-indicator",title:"The issue list is filtered",className:"text-xs px-2 py-0.5 rounded-full border border-[#C4B643]/50 text-[#C4B643]",children:"Filtered"})]}),C&&c.jsx("form",{id:"issues-filter-form","aria-label":"Issues filters",className:"px-4 pb-4",onSubmit:O=>{O.preventDefault(),G(U)},children:c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"block text-xs text-white/50 mb-1",children:"Search"}),c.jsx("input",{type:"text",placeholder:"Title or label (e.g. NOT-175)",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:U.q,onChange:O=>Bt({q:O.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"block text-xs text-white/50 mb-1",children:"Status"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:U.status,onChange:O=>Bt({status:O.target.value}),children:[c.jsx("option",{value:"",children:"All statuses"}),Q2.map(O=>c.jsx("option",{value:O,children:O},O))]})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"block text-xs text-white/50 mb-1",children:"Repository"}),c.jsx("input",{type:"text",placeholder:"github.com/owner/repo",title:"Exact repository identity",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:U.repo,onChange:O=>Bt({repo:O.target.value})})]}),c.jsx("div",{className:"flex items-end gap-2",children:c.jsxs("label",{className:"flex items-center gap-2 text-sm text-white/70 cursor-pointer pb-2",children:[c.jsx("input",{type:"checkbox",checked:U.needsAttention,onChange:O=>Bt({needsAttention:O.target.checked}),className:"accent-[#C4B643]"}),"Needs attention"]})}),c.jsxs("div",{className:"flex items-end gap-2 sm:col-span-2 lg:col-span-4",children:[c.jsx("button",{type:"submit",className:"btn-gold px-4",children:"Apply"}),c.jsx("button",{type:"button",className:"px-4 py-2 text-sm text-white/60 hover:text-white",onClick:Ce,children:"Reset"})]})]})})]}),u===null?c.jsx("p",{className:"text-white/50 text-sm",children:"Loading…"}):u.total===0&&!Nx(b)?c.jsx("p",{className:"text-white/45 text-sm",children:"No issues yet — create one to get started."}):u.total===0?c.jsxs("div",{className:"rounded border border-white/10 bg-panel-elevated/40 px-4 py-3",children:[c.jsx("p",{className:"text-white/45 text-sm",children:jx(u)}),c.jsx("button",{type:"button",className:"mt-2 px-3 py-1.5 text-sm rounded border border-white/15 text-white/70 hover:text-white",onClick:Ce,children:"Reset filters"})]}):c.jsxs("div",{children:[c.jsx("div",{className:"flex justify-end mb-2",children:c.jsxs("p",{className:"text-xs text-white/40 tabular-nums",children:[jx(u),_x(u)?` · ${_x(u)}`:""]})}),c.jsx("div",{className:"space-y-2",children:u.issues.map(O=>{const re=bt.find(Ke=>Ke.issueId===O.id);return c.jsxs(ja,{to:`/issues/${O.id}`,className:"w-full text-left flex items-center gap-3 px-4 py-3 rounded border border-white/10 bg-panel-elevated/40 hover:bg-panel-elevated/70 transition-colors",children:[O.hasOpenHumanAction&&c.jsx(ou,{className:"w-4 h-4 shrink-0 text-red-400"}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:"text-sm font-medium text-white/90 truncate",children:O.title}),re!=null&&re.waitReason?c.jsx("p",{className:"text-xs text-amber-200/80 truncate",title:re.waitReason,children:re.waitReason}):O.currentIntent&&c.jsx("p",{className:"text-xs text-white/50 truncate",children:O.currentIntent})]}),c.jsx("span",{className:"text-xs text-white/40 capitalize shrink-0",children:O.currentOwner}),re&&c.jsxs("span",{className:"text-xs px-2 py-0.5 rounded border border-cyber-teal/40 text-cyber-teal shrink-0",title:re.waitReason??"Next up for admission",children:["Queued #",re.position]}),c.jsx(Gy,{status:O.status}),c.jsx("span",{className:"text-xs text-white/35 shrink-0 w-16 text-right",children:oS(O.updatedAt)})]},O.id)})}),u.totalPages>1&&c.jsxs("nav",{"aria-label":"Issues pages",className:"mt-3 flex items-center gap-2",children:[c.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded border border-white/15 text-white/70 hover:text-white disabled:opacity-40",disabled:u.page<=1,onClick:()=>st(u.page-1),children:"Previous"}),c.jsxs("span",{className:"text-xs text-white/45 tabular-nums",children:["Page ",u.page," of ",u.totalPages]}),c.jsx("button",{type:"button",className:"px-3 py-1.5 text-sm rounded border border-white/15 text-white/70 hover:text-white disabled:opacity-40",disabled:u.page>=u.totalPages,onClick:()=>st(u.page+1),children:"Next"})]})]})]})}const hS=["developer","reviewer","legacy"],Ax=["claude_code","cursor_local","codex_local"],mS=["ready","developing","reviewing","repairing","final_review","needs_human","done","closed"];function xi(n,i){return n.n===0||n.p50===null&&n.p95===null?{available:!1,p50Text:null,p95Text:null,sampleText:"n=0",sampleTitle:"No observations in this cohort",sparse:!0}:{available:!0,p50Text:n.p50===null?null:i(n.p50),p95Text:n.p95===null?null:i(n.p95),sampleText:Oy(n.n),sampleTitle:`Sample size ${n.n}${yd(n.n)?" — fewer than 5 observations, compare with care":""}`,sparse:yd(n.n)}}function va(n,i,s){if(n.sum===null||n.known===0)return{available:!1,valueText:"N/A",exactText:null,noteText:null,noteTitle:null,incomplete:n.known<n.total};const u=i(n.sum),d=s!=null&&s.compact?Mw(n.sum):u,f=n.known<n.total;return{available:!0,valueText:d,exactText:s!=null&&s.compact?u:null,noteText:f?`${Ze(n.known)}/${Ze(n.total)} known`:null,noteTitle:f?"Partial sample — missing provider metadata is excluded, never zero":null,incomplete:f}}function As(n,i,s){return n===null||i===0?{available:!1,valueText:"N/A",evidenceCounts:null,evidenceNoun:null,title:`No ${s} in this cohort`}:{available:!0,valueText:bu(n),evidenceCounts:`${Ze(Math.round(n*i))}/${Ze(i)}`,evidenceNoun:s,title:`Exact share over ${i} ${s}`}}function Ex(n,i,s){const u=As(n,i,s);return u.available?{text:`${u.valueText} (${u.evidenceCounts} ${u.evidenceNoun})`,title:u.title}:{text:u.valueText,title:u.title}}function Fo(n){const i=Ex(n.issueSuccess,n.issueSuccessDenominator,"closed"),s=Ex(n.attemptSuccess,n.attemptSuccessDenominator,"terminal attempts");return{key:n.key,issuesText:Ze(n.issues),attemptsText:Ze(n.attempts),issueSuccessText:i.text,issueSuccessTitle:i.title,attemptSuccessText:s.text,attemptSuccessTitle:s.title,issueSuccessDisplay:As(n.issueSuccess,n.issueSuccessDenominator,"closed"),attemptSuccessDisplay:As(n.attemptSuccess,n.attemptSuccessDenominator,"terminal attempts"),wallText:xx(n.sessionWallMs,Qt),envelopeText:xx(n.spawnEnvelopeMs,Qt),retryText:n.retryRate===null?"N/A":bu(n.retryRate),retryTitle:"Extra attempts after a terminal attempt in the same issue/role/round ÷ attempts",tokensInText:Kn(n.tokensIn,Ze),tokensOutText:Kn(n.tokensOut,Ze),costText:Kn(n.costUsd,gs),costIncomplete:n.costUsd.known<n.costUsd.total,durationText:Kn(n.durationMs,Qt),failedCostText:Kn(n.failedCostUsd,gs),failedTokensText:`${Kn(n.failedTokensIn,Ze)} in · ${Kn(n.failedTokensOut,Ze)} out`,failedDurationText:Kn(n.failedDurationMs,Qt),wall:xi(n.sessionWallMs,Qt),envelope:xi(n.spawnEnvelopeMs,Qt),tokensIn:va(n.tokensIn,Ze,{compact:!0}),tokensOut:va(n.tokensOut,Ze,{compact:!0}),cost:va(n.costUsd,gs),duration:va(n.durationMs,Qt),failedCost:va(n.failedCostUsd,gs),failedTokensIn:va(n.failedTokensIn,Ze,{compact:!0}),failedTokensOut:va(n.failedTokensOut,Ze,{compact:!0}),failedDuration:va(n.failedDurationMs,Qt),failedIncomplete:n.failedCostUsd.known<n.failedCostUsd.total||n.failedTokensIn.known<n.failedTokensIn.total||n.failedTokensOut.known<n.failedTokensOut.total||n.failedDurationMs.known<n.failedDurationMs.total,sparse:n.attempts>0&&yd(n.attempts)}}function pS(n,i){const s=n.code==="unknown";return{code:n.code,domain:n.domain,countText:Ze(n.count),shareText:n.share===null?"N/A":bu(n.share),shareTitle:i>0?`${Ze(n.count)} of ${Ze(i)} issues with a failed attempt`:"No issues with a failed attempt in scope",isUnknown:s,blurb:s?"Ambiguous evidence — not promoted to a specific cause.":`Primary cause · ${n.domain} domain`,displayCode:s?"Cause not recorded":n.code,displayNote:s?"Needs more evidence":`Primary cause · ${n.domain} domain`,issueIds:n.issueIds,hiddenIssueCount:Math.max(0,n.issueTotal-n.issueIds.length)}}function xS(n){const i=n.reduce((s,u)=>s+u.count,0);return n.map(s=>pS(s,i))}function yS(n){return`/issues/${n}`}function Rx(n,i){if(n!=null&&n.trim()&&/^\d{4}-\d{2}-\d{2}$/.test(n.trim()))return i?`${n.trim()}T23:59:59.999Z`:`${n.trim()}T00:00:00.000Z`}function kx(n){if(!n)return"";const i=n.match(/^(\d{4}-\d{2}-\d{2})/);return i?i[1]:""}function Cx(n){const i=new URLSearchParams(n.startsWith("?")?n.slice(1):n),s=u=>{var d;return((d=i.get(u))==null?void 0:d.trim())??""};return{fromDate:kx(s("from")),toDate:kx(s("to")),repo:s("repo"),role:s("role"),runtime:s("runtime"),model:s("model"),status:s("status")}}function vS(n){const i=new URLSearchParams(n.startsWith("?")?n.slice(1):n),s=d=>{var m;const f=(m=i.get(d))==null?void 0:m.trim();return f||void 0},u={};for(const d of["from","to","repo","role","runtime","model","status"]){const f=s(d);f!==void 0&&(u[d]=f)}return u}function gS(n,i,s){const u=new URLSearchParams(n.startsWith("?")?n.slice(1):n);u.set(i,s),u.delete("page"),u.delete("limit"),u.sort();const d=u.toString();return`/reports/execution${d?`?${d}`:""}`}function bS(n){return{from:Rx(n.fromDate,!1),to:Rx(n.toDate,!0),repo:n.repo.trim()||void 0,role:n.role||void 0,runtime:n.runtime.trim()||void 0,model:n.model.trim()||void 0,status:n.status.trim()||void 0}}function Wo(n){return n===null?"N/A":bu(n)}function ka({label:n,value:i,valueTitle:s,note:u}){return c.jsxs("div",{className:"rounded border border-white/10 bg-panel-elevated/60 px-4 py-3",children:[c.jsx("p",{className:"font-ui-display text-xs uppercase tracking-wide text-white/40",children:n}),c.jsx("div",{className:"mt-1 font-mono text-lg font-semibold text-white/90 tabular-nums",title:s,children:i}),u&&c.jsx("div",{className:"mt-0.5 font-ui-display text-xs text-white/40",children:u})]})}function du({display:n,compact:i}){if(!n.available)return c.jsx("span",{className:"font-mono text-white/45",title:n.title,children:"N/A"});const s=i?"font-mono text-sm font-medium text-white/85 tabular-nums leading-tight whitespace-nowrap":"font-mono text-base sm:text-lg font-semibold text-white/90 tabular-nums leading-tight whitespace-nowrap";return c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-2",title:n.title,children:[c.jsx("span",{className:s,"aria-label":n.title,children:n.valueText}),c.jsxs("span",{className:"font-ui-display min-w-0 break-words text-xs text-white/40",children:["(",c.jsx("span",{className:"font-mono tabular-nums",children:n.evidenceCounts})," ",n.evidenceNoun,")"]})]})}function bs({display:n,compact:i}){if(!n.available)return c.jsx("span",{className:"font-mono text-white/45",children:"N/A"});const s=i?"font-ui-display text-[11px] uppercase tracking-wide text-white/40":"font-ui-display text-xs uppercase tracking-wide text-white/40",u=i?"font-mono text-sm font-medium text-white/85 tabular-nums":"font-mono text-base font-semibold text-white/90 tabular-nums";return c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-3 gap-y-0.5",children:[c.jsxs("span",{className:"inline-flex items-baseline gap-x-1.5",children:[c.jsx("span",{className:s,children:"P50"}),c.jsx("span",{className:u,children:n.p50Text??"N/A"})]}),c.jsxs("span",{className:"inline-flex items-baseline gap-x-1.5",children:[c.jsx("span",{className:s,children:"P95"}),c.jsx("span",{className:u,children:n.p95Text??"N/A"})]}),c.jsx("span",{className:"font-ui-display text-xs text-white/40",title:n.sampleTitle,children:n.sampleText})]})}function ga({display:n,compact:i}){if(!n.available)return c.jsx("span",{className:"font-mono text-white/45",children:"N/A"});const s=n.exactText??n.valueText,u=i?"font-mono text-sm font-medium text-white/85 tabular-nums":"font-mono text-base font-semibold text-white/90 tabular-nums";return c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-2",children:[c.jsx("span",{className:u,title:s,"aria-label":s,children:n.valueText}),n.noteText&&c.jsx("span",{className:"font-ui-display text-xs text-white/40",title:n.noteTitle??void 0,children:n.noteText})]})}function Po({caption:n,dimension:i,rows:s,cohortLink:u}){return s.length===0?c.jsxs("div",{className:"rounded border border-white/10 bg-panel-elevated/60 px-4 py-3",children:[c.jsx("h4",{className:"font-ui-display text-sm font-medium text-white/80",children:n}),c.jsx("p",{className:"font-ui-display mt-1 text-sm text-white/45",children:"No attempts in this dimension for these filters."})]}):c.jsx("div",{className:"rounded border border-white/10 bg-panel-elevated/60 overflow-x-auto",children:c.jsxs("table",{className:"w-full min-w-[1440px] text-sm",children:[c.jsxs("caption",{className:"sr-only",children:[n," — sorted by name, never by cost"]}),c.jsx("thead",{children:c.jsxs("tr",{className:"font-ui-display text-left text-xs uppercase tracking-wide text-white/40 border-b border-white/10",children:[c.jsx("th",{scope:"col",className:"px-4 py-2 font-medium",children:n}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Issues"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Attempts"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Issue success"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Attempt success"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Session wall P50/P95"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Retry rate"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Tokens in"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Tokens out"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Cost"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Duration"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Failed cost"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Failed tokens"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Failed runtime"})]})}),c.jsx("tbody",{className:"divide-y divide-white/5",children:s.map(d=>c.jsxs("tr",{className:"tabular-nums",children:[c.jsxs("th",{scope:"row",className:"px-4 py-2 text-left font-mono font-medium text-white/85",children:[u?c.jsx(ja,{to:u(i,d.key),className:"text-cyber-teal hover:underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-cyber-teal/45",title:`Filter the report to ${i} ${d.key}`,children:d.key}):d.key,d.sparse&&c.jsx("span",{className:"font-ui-display ml-2 text-xs font-normal text-amber-200/80",title:"Fewer than 5 attempts — compare with care",children:"sparse"})]}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:d.issuesText}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:d.attemptsText}),c.jsx("td",{className:"px-3 py-2 text-white/75",title:d.issueSuccessTitle,children:c.jsx(du,{display:d.issueSuccessDisplay,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",title:d.attemptSuccessTitle,children:c.jsx(du,{display:d.attemptSuccessDisplay,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(bs,{display:d.wall,compact:!0})}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",title:d.retryTitle,children:d.retryText}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ga,{display:d.tokensIn,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ga,{display:d.tokensOut,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ga,{display:d.cost,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ga,{display:d.duration,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ga,{display:d.failedCost,compact:!0})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-1.5",children:[c.jsx(ga,{display:d.failedTokensIn,compact:!0}),c.jsx("span",{className:"font-ui-display text-xs text-white/40",children:"in"}),c.jsx("span",{className:"font-ui-display text-xs text-white/40",children:"·"}),c.jsx(ga,{display:d.failedTokensOut,compact:!0}),c.jsx("span",{className:"font-ui-display text-xs text-white/40",children:"out"})]})}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(ga,{display:d.failedDuration,compact:!0})})]},d.key))})]})})}const wS={fromDate:"",toDate:"",repo:"",role:"",runtime:"",model:"",status:""};function SS({loading:n,error:i,report:s,onRetry:u,cohortLink:d}){const f=(s==null?void 0:s.summary)??null,m=w.useMemo(()=>s?xS(s.failures):[],[s]),y=w.useMemo(()=>s?s.failures.reduce((g,v)=>g+v.count,0):0,[s]);return c.jsxs("div",{"aria-live":"polite",children:[n&&c.jsx("p",{role:"status",className:"text-sm text-white/50",children:"Loading execution report…"}),!n&&i&&c.jsxs("div",{className:"rounded border border-red-400/30 bg-red-500/10 px-4 py-3",role:"alert",children:[c.jsxs("p",{className:"font-ui-display text-sm text-red-200",children:["Couldn’t load the execution report: ",i]}),c.jsx("button",{type:"button",className:"font-ui-display mt-2 px-3 py-1.5 text-sm rounded border border-red-300/40 text-red-100 hover:bg-red-500/20",onClick:u,children:"Retry"})]}),!n&&!i&&s&&f&&c.jsxs("div",{className:"space-y-6",children:[s.meta.partial&&c.jsxs("div",{className:"rounded border border-amber-300/30 bg-amber-400/10 px-4 py-3",children:[c.jsx("p",{className:"font-ui-display text-sm text-amber-100 font-medium",children:"Partial metadata"}),c.jsx("ul",{className:"font-ui-display mt-1 list-disc list-inside text-sm text-amber-100/80",children:s.meta.partialReasons.map(g=>c.jsx("li",{children:g},g))})]}),f.issues===0?c.jsx("p",{className:"font-ui-display text-sm text-white/45",children:"No issues match these filters in this window. Widen the date range or clear filters."}):c.jsxs(c.Fragment,{children:[c.jsx("section",{"aria-label":"Summary",children:c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-3",children:[c.jsx(ka,{label:"Issue success",value:c.jsx(du,{display:As(f.issueSuccess,f.closedIssues,"closed")}),valueTitle:`done / (done + closed), denominator ${f.closedIssues}`,note:`${Ze(f.issues)} issues · ${Ze(f.closedIssues)} closed`}),c.jsx(ka,{label:"Attempt success",value:c.jsx(du,{display:As(f.attemptSuccess,f.terminalAttempts,"terminal")}),valueTitle:`done sessions / terminal sessions, denominator ${f.terminalAttempts}`,note:`${Ze(f.attempts)} attempts · ${Ze(f.terminalAttempts)} terminal`}),c.jsx(ka,{label:"Retry rate",value:Wo(f.retryRate),valueTitle:`${f.retryExtraAttempts} extra attempts after a terminal attempt in the same issue/role/round ÷ ${f.attempts} attempts`,note:`Reuse rate ${Wo(f.reuseRate)} over ${Ze(f.reuseDenominator)} reviewer sessions with input SHA`}),c.jsx(ka,{label:"Human wait",value:Qt(f.humanWaitMs),note:`${Ze(f.interventions)} interventions`}),c.jsx(ka,{label:"Session wall P50/P95",value:c.jsx(bs,{display:xi(f.sessionWallMs,Qt)}),note:"Session bookkeeping proxy — never CLI runtime"}),c.jsx(ka,{label:"Spawn envelope P50/P95",value:c.jsx(bs,{display:xi(f.spawnEnvelopeMs,Qt)}),note:"Coordinator-measured; includes slot wait + post-exit work"}),c.jsx(ka,{label:"Checkpoint latency P50/P95",value:c.jsx(bs,{display:xi(f.checkpointMs,Qt)}),note:"Session start → first heartbeat"}),c.jsx(ka,{label:"Reviewer rounds (avg)",value:f.avgReviewerRounds===null?"N/A":f.avgReviewerRounds.toFixed(1),note:`Change-request rate ${Wo(f.changeRequestRate)} over ${Ze(f.reviewedIssues)} reviewed`})]})}),c.jsxs("section",{"aria-label":"Failed-attempt waste",children:[c.jsx("h3",{className:"font-ui-display text-sm font-medium text-white/80 mb-2",children:"Failed-attempt waste (known values only)"}),c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[c.jsx(ka,{label:"Failed cost",value:c.jsx(ga,{display:va(f.failedCostUsd,gs)})}),c.jsx(ka,{label:"Failed tokens",value:c.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-2",children:[c.jsx(ga,{display:va(f.failedTokensIn,Ze,{compact:!0})}),c.jsx("span",{className:"font-ui-display text-xs font-normal text-white/40",children:"in"}),c.jsx("span",{className:"font-ui-display text-xs font-normal text-white/40",children:"·"}),c.jsx(ga,{display:va(f.failedTokensOut,Ze,{compact:!0})}),c.jsx("span",{className:"font-ui-display text-xs font-normal text-white/40",children:"out"})]})}),c.jsx(ka,{label:"Failed runtime",value:c.jsx(ga,{display:va(f.failedDurationMs,Qt)})})]})]}),c.jsxs("section",{"aria-label":"Phase wall time",children:[c.jsx("h3",{className:"font-ui-display text-sm font-medium text-white/80 mb-2",children:"Phase wall time"}),c.jsx("p",{className:"font-ui-display text-xs text-white/40 mb-2",children:"Composed from the execution-analysis read model over the same issues: exact when agent start/complete events are recorded, inferred usage-envelope backfill otherwise. Rows without evidence read N/A — never a guess. See per-row reasons."}),c.jsx("div",{className:"rounded border border-white/10 bg-panel-elevated/60 overflow-x-auto",children:c.jsxs("table",{className:"w-full min-w-[560px] text-sm",children:[c.jsx("caption",{className:"sr-only",children:"Exclusive phase wall times. Boundaries without defensible evidence are N/A."}),c.jsx("thead",{children:c.jsxs("tr",{className:"font-ui-display text-left text-xs uppercase tracking-wide text-white/40 border-b border-white/10",children:[c.jsx("th",{scope:"col",className:"px-4 py-2 font-medium",children:"Phase"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"P50 / P95"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Why"})]})}),c.jsx("tbody",{className:"divide-y divide-white/5",children:f.phaseWallMs.map(g=>c.jsxs("tr",{className:"tabular-nums",children:[c.jsx("th",{scope:"row",className:"px-4 py-2 text-left font-mono font-medium text-white/85",children:g.phase}),c.jsx("td",{className:"px-3 py-2 text-white/75",children:c.jsx(bs,{display:xi(g.stat,Qt),compact:!0})}),c.jsx("td",{className:"font-ui-display px-3 py-2 text-xs text-white/45",children:g.stat.reasons.join(", ")})]},g.phase))})]})})]}),c.jsxs("section",{"aria-label":"Comparisons",className:"space-y-4",children:[c.jsxs("h3",{className:"font-ui-display text-sm font-medium text-white/80",children:["Comparisons ",c.jsx("span",{className:"font-normal text-white/40",children:"— sorted by name, never by cost"})]}),c.jsx(Po,{caption:"By role",dimension:"role",rows:s.byRole.map(Fo),cohortLink:d}),c.jsx(Po,{caption:"By runtime",dimension:"runtime",rows:s.byRuntime.map(Fo),cohortLink:d}),c.jsx(Po,{caption:"By model",dimension:"model",rows:s.byModel.map(Fo),cohortLink:d})]}),c.jsxs("section",{"aria-label":"Why attempts failed",children:[c.jsx("h3",{className:"font-ui-display text-sm font-medium text-white/80 mb-2",children:"Why attempts failed"}),c.jsxs("p",{className:"font-ui-display text-xs text-white/40 mb-2",children:["Each issue with a failed attempt is counted once using its primary actionable cause, and may later have recovered. Share is over"," ",Ze(y)," failed ",y===1?"issue":"issues"," in scope."]}),m.length===0?c.jsx("p",{className:"font-ui-display text-sm text-white/45",children:"No failed attempts in this window."}):c.jsx("div",{className:"rounded border border-white/10 bg-panel-elevated/60 overflow-x-auto",children:c.jsxs("table",{className:"w-full min-w-[560px] text-sm",children:[c.jsx("caption",{className:"sr-only",children:"Why attempts failed: each issue counted once by primary cause. Cause not recorded is its own bucket and is never promoted."}),c.jsx("thead",{children:c.jsxs("tr",{className:"font-ui-display text-left text-xs uppercase tracking-wide text-white/40 border-b border-white/10",children:[c.jsx("th",{scope:"col",className:"px-4 py-2 font-medium",children:"Failure"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Domain"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Issues"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Share"}),c.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Example issues"})]})}),c.jsx("tbody",{className:"divide-y divide-white/5",children:m.map(g=>c.jsxs("tr",{className:g.isUnknown?"bg-amber-400/5 tabular-nums":"tabular-nums",children:[c.jsxs("th",{scope:"row",className:"px-4 py-2 text-left text-white/85",children:[c.jsx("span",{className:"font-ui-display block font-medium",title:g.code,children:g.displayCode}),c.jsx("span",{className:`font-ui-display block text-xs font-normal ${g.isUnknown?"text-amber-200/90":"text-white/40"}`,children:g.displayNote})]}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:g.domain}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",children:g.countText}),c.jsx("td",{className:"px-3 py-2 font-mono text-white/75",title:g.shareTitle,children:g.shareText}),c.jsx("td",{className:"px-3 py-2",children:c.jsxs("span",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[g.issueIds.map(v=>c.jsx(ja,{to:yS(v),className:"text-cyber-teal hover:underline font-mono text-xs",children:v.slice(0,8)},v)),g.hiddenIssueCount>0&&c.jsxs("span",{className:"font-ui-display text-xs text-white/40",children:["+",g.hiddenIssueCount," more"]})]})})]},g.code))})]})})]})]})]})]})}function jS(){const[n,i]=oy(),s=n.toString(),u=w.useMemo(()=>vS(s),[s]),[d,f]=w.useState(()=>Cx(s)),[m,y]=w.useState(null),[g,v]=w.useState(!0),[b,N]=w.useState(null),[U,K]=w.useState(0);w.useEffect(()=>{f(Cx(s))},[s]),w.useEffect(()=>{let D=!1;return v(!0),N(null),f2(u).then(B=>{D||(y(B),v(!1))}).catch(B=>{D||(N(B instanceof Error?B.message:String(B)),v(!1))}),()=>{D=!0}},[s,U]);const C=D=>{const B=Ty(bS(D));i(B?Object.fromEntries(new URLSearchParams(B)):{})},V=D=>f(B=>({...B,...D}));return c.jsxs("div",{className:"flex-1 min-h-0 px-6 py-4 w-full overflow-y-auto",children:[c.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-2 mb-1",children:[c.jsx("h2",{className:"font-ui-display text-lg font-semibold text-white/90",children:"Execution report"}),m&&c.jsxs("p",{className:"font-ui-display text-xs text-white/40",children:["Window ",new Date(m.window.from).toLocaleDateString()," –"," ",new Date(m.window.to).toLocaleDateString()," · generated"," ",new Date(m.meta.generatedAt).toLocaleTimeString()]})]}),c.jsx("p",{className:"font-ui-display text-sm text-white/50 mb-4",children:"Reliability, latency, retry waste, and metadata coverage by role, runtime, and model. Missing cost/token data reads as N/A — never as zero."}),c.jsx("form",{"aria-label":"Report filters",className:"mb-4 p-4 rounded border border-white/10 bg-panel-elevated/60",onSubmit:D=>{D.preventDefault(),C(d)},children:c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"From"}),c.jsx("input",{type:"date",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.fromDate,onChange:D=>V({fromDate:D.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"To"}),c.jsx("input",{type:"date",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.toDate,onChange:D=>V({toDate:D.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Repository"}),c.jsx("input",{type:"text",placeholder:"github.com/owner/repo",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.repo,onChange:D=>V({repo:D.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Role"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.role,onChange:D=>V({role:D.target.value}),children:[c.jsx("option",{value:"",children:"All roles"}),hS.map(D=>c.jsx("option",{value:D,children:D},D))]})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Runtime"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.runtime,onChange:D=>{V({runtime:D.target.value})},children:[c.jsx("option",{value:"",children:"All runtimes"}),Ax.map(D=>c.jsx("option",{value:D,children:D},D)),c.jsx("option",{value:"unknown",children:"unknown (missing metadata)"}),d.runtime&&!Ax.includes(d.runtime)&&c.jsxs("option",{value:d.runtime,children:[d.runtime," (from URL)"]})]})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Model"}),c.jsx("input",{type:"text",placeholder:"Any model",className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.model,onChange:D=>V({model:D.target.value})})]}),c.jsxs("label",{className:"block text-sm",children:[c.jsx("span",{className:"font-ui-display block text-xs text-white/50 mb-1",children:"Issue status"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2",value:d.status,onChange:D=>V({status:D.target.value}),children:[c.jsx("option",{value:"",children:"All statuses"}),mS.map(D=>c.jsx("option",{value:D,children:D},D))]})]}),c.jsxs("div",{className:"flex items-end gap-2",children:[c.jsx("button",{type:"submit",className:"btn-gold px-4",children:"Apply"}),c.jsx("button",{type:"button",className:"font-ui-display px-4 py-2 text-sm text-white/60 hover:text-white",onClick:()=>{f(wS),i({})},children:"Reset"})]})]})}),c.jsx(SS,{loading:g,error:b,report:m,onRetry:()=>K(D=>D+1),cohortLink:(D,B)=>gS(s,D,B)})]})}function Tx(n,i){var d;if(!n)return"Not assigned";const s=i.find(f=>f.id===n);if(!s)return"Unavailable — profile removed";const u=`${s.name} · ${wa(s.runtime)}`;return s.healthy?u:`${u} (unhealthy: ${((d=s.issues[0])==null?void 0:d.message)??"needs attention"})`}function Ox(n,i){var u;if(!n)return;const s=i.find(d=>d.id===n);return s?`${s.name} · ${wa(s.runtime)}${s.healthy?" · healthy":` · ${((u=s.issues[0])==null?void 0:u.message)??"unhealthy"}`}`:`Configured profile ${n} is not on record (deleted?)`}function _S({agents:n,initialRepo:i,initialDeveloperId:s,initialReviewerId:u,busy:d,onSave:f,onCancel:m}){var W,oe;const[y,g]=w.useState(i),[v,b]=w.useState(s??""),[N,U]=w.useState(u??""),K=Ky(n),C=n.find(J=>J.id===v),V=n.find(J=>J.id===N),D=cu(C),B=cu(V),Q=y.trim()===i&&v===(s??"")&&N===(u??"");return c.jsxs("div",{className:"p-3 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[c.jsx("p",{className:"text-xs text-white/50",children:"Edit configuration — repository, developer, and reviewer save together. Queue position is kept, readiness and the wait reason are rechecked, and the change is recorded on the timeline."}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Repository"}),c.jsx("input",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:y,disabled:d,placeholder:"GitHub URL or owner/repo",title:"GitHub URL or owner/repo — normalized to github.com/owner/repo, same validation as issue creation",onChange:J=>g(J.target.value)})]}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Developer"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:v,disabled:d,title:C?`${C.name} · ${wa(C.runtime)}${C.healthy?" · healthy":` · ${((W=C.issues[0])==null?void 0:W.message)??"unhealthy"}`}`:"Pick a developer agent",onChange:J=>b(J.target.value),children:[c.jsx("option",{value:"",children:"Developer agent…"}),K.map(J=>c.jsx("option",{value:J.id,title:Fn(J),children:(J.healthy?"● ":"○ ")+Fn(J)},J.id))]}),D&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:D})]}),c.jsxs("label",{className:"block space-y-1",children:[c.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Reviewer"}),c.jsxs("select",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:N,disabled:d,title:V?`${V.name} · ${wa(V.runtime)}${V.healthy?" · healthy":` · ${((oe=V.issues[0])==null?void 0:oe.message)??"unhealthy"}`}`:"Pick a reviewer agent",onChange:J=>U(J.target.value),children:[c.jsx("option",{value:"",children:"Reviewer agent…"}),K.map(J=>J.runtime==="muse_code"?c.jsx("option",{value:J.id,disabled:!0,title:"Muse Code cannot be a reviewer (developer role only)",children:`○ ${J.name} · ${wa(J.runtime)} — reviewer not supported`},J.id):c.jsx("option",{value:J.id,title:Fn(J),children:(J.healthy?"● ":"○ ")+Fn(J)},J.id))]}),B&&c.jsx("span",{className:"text-xs text-amber-200/80 block",children:B})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 py-1.5 text-sm disabled:opacity-50",disabled:d||!y.trim()||!v||!N||Q,title:"Save via the issue PATCH contract — keeps queue position, rechecks readiness and the wait reason",onClick:()=>f(y.trim(),v,N),children:"Save configuration"}),c.jsx("button",{type:"button",className:"px-4 py-1.5 text-sm text-white/60 hover:text-white disabled:opacity-50",disabled:d,onClick:m,children:"Cancel"})]})]})}function NS({issue:n,agents:i,canEdit:s,editing:u,busy:d,onBeginEdit:f,onSave:m,onCancel:y}){return c.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-white/[0.03] space-y-1.5",children:[c.jsx("p",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Configuration"}),c.jsxs("p",{className:"text-sm text-white/85",title:`Exact repository identity: ${n.repo}`,children:[c.jsx("span",{className:"text-white/45",children:"Repository "}),n.repo]}),c.jsxs("p",{className:"text-sm text-white/85",title:Ox(n.developerAgentId,i),children:[c.jsx("span",{className:"text-white/45",children:"Developer "}),Tx(n.developerAgentId,i)]}),c.jsxs("p",{className:"text-sm text-white/85",title:Ox(n.reviewerAgentId,i),children:[c.jsx("span",{className:"text-white/45",children:"Reviewer "}),Tx(n.reviewerAgentId,i)]}),s&&!u&&c.jsx("button",{type:"button",className:"text-xs text-cyber-teal hover:underline disabled:opacity-50",disabled:d,onClick:f,children:"Edit configuration"}),s&&u&&c.jsx(_S,{agents:i,initialRepo:n.repo,initialDeveloperId:n.developerAgentId,initialReviewerId:n.reviewerAgentId,busy:d,onSave:m,onCancel:y})]})}function Qr(n){return n==="developer"?"Developer":n==="reviewer"?"Reviewer":"Worker"}const ed={"issue.created":()=>"Issue created","issue.reassigned":()=>"Configuration updated","workflow.started":()=>"Workflow started","worker.started":n=>`${Qr(n.actorType)} started${n.round?` (round ${n.round})`:""}`,"worker.completed":n=>`${Qr(n.actorType)} finished${n.round?` (round ${n.round})`:""}`,"worker.failed":n=>`${Qr(n.actorType)} failed${n.round?` (round ${n.round})`:""}`,"worker.deferred":n=>{var i;return((i=ws(n.payloadJson))==null?void 0:i.outcome)==="deck_unavailable"?`Waiting for Agent Deck${n.round?` (round ${n.round})`:""}`:`${Qr(n.actorType)} deferred${n.round?` (round ${n.round})`:""}`},"worktree.ready":()=>"Worktree ready","deck.connected":()=>"Deck connected","brief.resolved":()=>"Brief resolved","branch.pushed":()=>"Branch pushed","checks.started":()=>"Checks started","pull_request.opened":()=>"Developer opened the PR","pull_request.updated":()=>"Developer updated the PR","checks.completed":()=>"Checks completed","review.submitted":()=>"Reviewer submitted a review","repair.started":n=>`Repair round ${n.round??"?"} started`,"guidance.added":()=>"Guidance added","task_snapshot.refreshed":()=>"Task snapshot refreshed","human_action.requested":()=>"Human action requested","human_action.resolved":()=>"Human action resolved","final_review.requested":()=>"Final review requested","issue.completed":()=>"Issue completed","issue.closed":()=>"Issue closed"};function ws(n){if(!n)return null;try{return JSON.parse(n)}catch{return null}}const AS={approved:"text-cyber-teal",changes_requested:"text-amber-300",escalated:"text-red-300"};function ES({e:n}){var i;if(n.type==="pull_request.opened"||n.type==="pull_request.updated"){const s=ws(n.payloadJson);return n.artifactRef?c.jsxs("a",{href:n.artifactRef,target:"_blank",rel:"noreferrer",className:"text-sm text-cyber-teal hover:underline",children:["PR ",s!=null&&s.prNumber?`#${s.prNumber}`:""," ",s!=null&&s.branch?`(${s.branch})`:""]}):null}if(n.type==="review.submitted"){const s=ws(n.payloadJson);return s?c.jsxs("span",{className:"text-sm",children:[c.jsx("span",{className:AS[s.verdict]??"text-white/70",children:s.verdict.replace("_"," ")}),(i=s.findings)!=null&&i.length?` · ${s.findings.length} finding(s)`:""]}):null}if(n.type==="guidance.added"){const s=ws(n.payloadJson);return s!=null&&s.markdown?c.jsxs("span",{className:"text-sm text-white/55 italic",children:["— ",s.markdown]}):null}if(n.type==="worker.started"||n.type==="worker.completed"||n.type==="worker.failed"||n.type==="worker.deferred"||n.type==="worktree.ready"||n.type==="deck.connected"||n.type==="brief.resolved"||n.type==="branch.pushed"||n.type==="checks.started"||n.type==="checks.completed"){const s=ws(n.payloadJson);if(!s)return null;const u=[];return s.runtime&&u.push(s.runtime),s.model&&u.push(s.model),s.sessionId&&u.push(s.sessionId.slice(0,8)),s.worktreePath&&u.push(s.worktreePath),s.resolution&&u.push(s.resolution),s.branch&&u.push(s.branch),s.commitsAhead!=null&&u.push(`${s.commitsAhead} ahead`),s.snapshot&&u.push(s.snapshot),(n.type==="worker.deferred"||n.type==="worker.failed")&&(s.reason&&u.push(s.reason),n.type==="worker.deferred"&&s.until&&u.push(`until ${new Date(s.until).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`)),u.length===0?null:c.jsxs("span",{className:"text-xs text-white/40",children:["· ",u.join(" · ")]})}return null}function RS(n){var i;return((i=ed[n.type])==null?void 0:i.call(ed,n))??n.type}const Mx={human:"You",system:"System",developer:"Developer",reviewer:"Reviewer"},kS={human:"bg-cyber-teal/15 text-cyber-teal",system:"bg-white/10 text-white/50",developer:"bg-cyber-violet/20 text-cyber-violet-light",reviewer:"bg-[#C4B643]/25 text-[#E8DC7A]"};function CS(n){return n.actorRef?`${Mx[n.actorType]} · ${n.actorRef}`:Mx[n.actorType]}function TS({events:n}){return n.length===0?c.jsx("p",{className:"text-white/40 text-sm",children:"No activity yet."}):c.jsx("div",{className:"space-y-1",children:n.map(i=>c.jsxs("div",{className:"flex items-baseline gap-3 py-1.5 border-b border-white/5 last:border-0",children:[c.jsx("span",{className:"text-xs text-white/35 w-20 shrink-0 tabular-nums",children:new Date(i.ts).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),c.jsx("span",{className:`text-[11px] leading-none px-1.5 py-0.5 rounded shrink-0 ${kS[i.actorType]}`,children:CS(i)}),c.jsx("span",{className:"text-sm text-white/80",children:RS(i)}),c.jsx(ES,{e:i})]},i.id))})}function Ca(n){if(n==null||!Number.isFinite(n))return null;if(n<1e3)return"<1s";const i=Math.round(n/1e3);if(i<60)return`${i}s`;const s=Math.floor(i/60);if(s<60){const f=i%60;return f===0?`${s}m`:`${s}m ${f}s`}const u=Math.floor(s/60),d=s%60;return d===0?`${u}h`:`${u}h ${d}m`}function Lx(n){return n==null||!Number.isFinite(n)?null:`${Math.round(n).toLocaleString("en-US")} tokens`}function OS(n){return n==null||!Number.isFinite(n)?null:`$${n.toFixed(2)}`}const MS={queue_wait:"Queue / admission wait",coordinator_setup:"Setup",agent_process:"Agent process",coordinator_validation_publish:"Validation / publish",coordinator_work:"Coordinator work"},Dx={model_provider_wait:"Silent · waiting on model provider",tool_or_subprocess_in_flight:"Silent · tool/subprocess in flight",host_suspended:"Silent · host suspended",no_structured_output:"Silent · no structured output yet",unknown:"Silent · unknown cause"},wd={worktree:"worktree",commit:"commit",verification_receipt:"verification receipt",publish_only:"publish-only result"},LS=new Set(["failed","timed_out","error"]);function Yd(n){return n.replace(/_/g," ")}function Es(n,i){const s=`Evidence quality: ${n}`;return i.length>0?`${s} — ${i.join(", ")}`:s}function ba({quality:n,reasons:i}){return c.jsxs("span",{className:`text-[11px] tabular-nums ${n==="exact"?"text-white/60":n==="inferred"?"text-amber-300/90":"text-white/60 italic"}`,title:Es(n,i),children:["· ",n,i.length>0&&c.jsxs("span",{className:"sr-only",children:[" (",i.join(", "),")"]})]})}function In({reasons:n}){const i=n.length>0?n.join(", "):"no reason recorded";return c.jsxs("span",{className:"text-white/45 italic",title:`Unavailable — ${i}`,children:["Unavailable",c.jsxs("span",{className:"text-[11px]",children:[" — ",i]})]})}function Xr({covered:n,format:i,unit:s}){if(n.value==null)return c.jsx(In,{reasons:n.reasons});const u=n.known<n.total;return c.jsxs("span",{title:`${Es(n.quality,n.reasons)} · known ${n.known} of ${n.total} ${s}`,children:[i(n.value),c.jsx(ba,{quality:n.quality,reasons:n.reasons}),u&&c.jsxs("span",{className:"text-[11px] text-white/60",title:`Known for ${n.known} of ${n.total} ${s}`,children:[" ","(known ",n.known," of ",n.total,")"]})]})}function Ux({cause:n,primary:i}){return c.jsxs("div",{className:i?"p-2.5 rounded border border-red-400/30 bg-red-500/10 space-y-1":"p-2 rounded border border-white/10 bg-white/[0.02] space-y-1",children:[c.jsxs("p",{className:i?"text-sm font-medium text-red-200":"text-xs text-white/60",children:[i?"First failure: ":"Consequence: ",Yd(n.code)]}),c.jsx("p",{className:i?"text-sm text-white/85 whitespace-pre-wrap break-words":"text-xs text-white/55 whitespace-pre-wrap break-words",children:n.rawReason}),c.jsxs("p",{className:"text-[11px] text-white/60",title:Es(n.quality==="exact"?"exact":"inferred",[`evidence: ${n.evidenceSource}`,`confidence: ${n.confidence}`]),children:[n.domain," · ",n.confidence," confidence · via ",n.evidenceSource.replace(/_/g," ")," · ",n.quality,n.occurredAt?` · ${new Date(n.occurredAt).toLocaleString()}`:""]})]})}function DS({interval:n}){const i=Dx[n.category??"unknown"]??Dx.unknown,s=Ca(n.durationMs),u=n.category==="host_suspended";return c.jsxs("li",{className:`flex flex-wrap items-baseline gap-x-2 gap-y-0.5 py-1 border-b border-white/5 last:border-0 ${u?"text-amber-200/90":"text-white/70"}`,children:[c.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded border shrink-0 ${u?"border-amber-400/40 bg-amber-500/10":"border-white/15 bg-white/5"}`,title:u?"Overlapping durable host-sleep evidence split this gap — the host was suspended, not the agent.":"Observational gap with no new structured activity — not a diagnosis of what the agent was doing.",children:i}),c.jsx("span",{className:"text-xs tabular-nums",children:s??c.jsx(In,{reasons:n.reasons})}),c.jsx(ba,{quality:n.quality,reasons:n.reasons})]})}function US({attempt:n}){const i=n.reuseKinds;return i===void 0?c.jsx("span",{className:"ml-2 text-[11px] px-1.5 py-0.5 rounded border border-white/15 bg-white/5 text-white/60 italic",title:"Reuse unknown for this retry — no reuse evidence recorded.",children:"reuse unknown"}):i.length===0?c.jsx("span",{className:"ml-2 text-[11px] px-1.5 py-0.5 rounded border border-white/15 bg-white/5 text-white/60",title:"Cold retry — no prior worktree, commit, or verification was reused.",children:"cold retry"}):c.jsx(c.Fragment,{children:i.map(s=>c.jsxs("span",{className:"ml-2 text-[11px] px-1.5 py-0.5 rounded border border-cyber-teal/40 bg-cyber-teal/10 text-cyber-teal",title:`This retry preserved the prior ${wd[s]??s} instead of starting cold.`,children:["reused ",wd[s]??s]},s))})}function zS({attempt:n,isRetry:i}){const s=Ca(n.setup.durationMs),u=Ca(n.agentProcess.durationMs),d=Ca(n.validationPublish.durationMs),f=i&&n.role==="developer";return c.jsxs("li",{className:"py-1.5 border-b border-white/5 last:border-0 space-y-0.5",children:[c.jsxs("p",{className:"text-sm text-white/85",children:[c.jsx("span",{className:"capitalize",children:n.role}),c.jsxs("span",{className:"text-white/45",children:[n.runtime?` · ${n.runtime}`:"",n.model?` · ${n.model}`:"",` · round ${n.round} · ${n.status}`]}),n.publishOnly&&c.jsx("span",{className:"ml-2 text-[11px] px-1.5 py-0.5 rounded border border-cyber-violet/40 bg-cyber-violet/10 text-cyber-violet-light",title:"Publish-only attempt: no agent process ran — the coordinator published prior work.",children:"publish-only"}),f&&!n.publishOnly&&c.jsx(US,{attempt:n})]}),c.jsxs("p",{className:"text-xs text-white/50 tabular-nums",children:[c.jsxs("span",{title:s?void 0:`Setup unavailable — ${n.setup.reasons.join(", ")||"no reason recorded"}`,children:["Setup ",s??c.jsxs("span",{className:"italic",children:["Unavailable — ",n.setup.reasons.join(", ")||"no reason recorded"]})]}),c.jsx(ba,{quality:n.setup.quality,reasons:n.setup.reasons})," · ",c.jsxs("span",{title:u?void 0:`Agent process unavailable — ${n.agentProcess.reasons.join(", ")||"no reason recorded"}`,children:["Agent ",u??c.jsxs("span",{className:"italic",children:["Unavailable — ",n.agentProcess.reasons.join(", ")||"no reason recorded"]})]}),c.jsx(ba,{quality:n.agentProcess.quality,reasons:n.agentProcess.reasons})," · ",c.jsxs("span",{title:d?void 0:`Validation/publish unavailable — ${n.validationPublish.reasons.join(", ")||"no reason recorded"}`,children:["Validation/publish ",d??c.jsxs("span",{className:"italic",children:["Unavailable — ",n.validationPublish.reasons.join(", ")||"no reason recorded"]})]}),c.jsx(ba,{quality:n.validationPublish.quality,reasons:n.validationPublish.reasons})]}),n.failureCauses.length>0&&c.jsxs("p",{className:"text-[11px] text-white/60",children:["Failures: ",n.failureCauses.map(m=>Yd(m.code)).join(", ")]})]})}function BS({analysis:n}){const i=Ca(n.elapsed.durationMs),s=Ca(n.exclusiveTotalMs),u=Ca(n.firstCheckpoint.msSinceWorkflowStart),d=n.nested.filter(C=>C.kind!=="unexplained_silence"),f=n.attempts.flatMap(C=>C.silence),m=n.attempts.length>0&&n.attempts.every(C=>C.silence.length===0&&C.silenceQuality==="unavailable"),y=n.attempts.filter(C=>C.silence.length===0&&C.silenceQuality==="unavailable"),g=n.waste.failedAttempts>0||n.waste.publishOnlyAttempts>0||n.attempts.some(C=>C.failureCauses.length>0||LS.has(C.status)),v=Ca(n.humanWaitMs),b=n.retry.reuseRate==null?null:`${Math.round(n.retry.reuseRate*100)}% reused`,U=(n.retry.preservedKinds??[]).map(C=>wd[C]??C),K=n.waste.failedAttempts>0||n.waste.publishOnlyAttempts>0;return c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{children:[c.jsxs("p",{className:"text-sm text-white/85 tabular-nums",children:["Elapsed ",i??c.jsx(In,{reasons:n.elapsed.reasons}),c.jsx(ba,{quality:n.elapsed.quality,reasons:n.elapsed.reasons})]}),c.jsxs("p",{className:"text-xs text-white/45 tabular-nums",title:"Unioned top-level phases with overlaps removed (human wait excluded). Nested waits below explain phases — they are never added to this total.",children:["Exclusive phase total ",s??c.jsx(In,{reasons:n.exclusiveTotalReasons}),c.jsx(ba,{quality:n.exclusiveTotalQuality,reasons:n.exclusiveTotalReasons}),c.jsx("span",{children:" · overlaps unioned, not summed"})]})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Phase breakdown"}),c.jsx("ul",{children:n.unionedDurations.map(C=>{const V=Ca(C.durationMs);return c.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-2 py-0.5 text-sm",children:[c.jsx("span",{className:"text-white/70 w-36 shrink-0",children:MS[C.phase]??C.phase}),c.jsx("span",{className:"text-white/85 tabular-nums",children:V??c.jsx(In,{reasons:C.reasons})}),c.jsx(ba,{quality:C.quality,reasons:C.reasons}),C.known<C.total&&c.jsxs("span",{className:"text-[11px] text-white/60",children:["(known ",C.known," of ",C.total,")"]})]},C.phase)})}),c.jsxs("p",{className:"text-xs text-white/45 tabular-nums mt-1",children:["Human wait ",v??c.jsx(In,{reasons:n.humanWaitReasons}),c.jsx(ba,{quality:n.humanWaitQuality,reasons:n.humanWaitReasons}),c.jsx("span",{title:"Human wait is tracked separately — it never adds to the phase total.",children:" · never additive"})]}),d.length>0&&c.jsx("ul",{className:"mt-1",children:d.map((C,V)=>c.jsxs("li",{className:"text-xs text-white/50 tabular-nums",children:[c.jsxs("span",{title:"Nested drill-down: explains its parent phase, never adds to the total.",children:["↳ ",C.kind==="human_wait"?"Human wait":C.category??C.kind]})," ",Ca(C.durationMs)??c.jsx(In,{reasons:C.reasons}),c.jsx(ba,{quality:C.quality,reasons:C.reasons})]},V))})]}),c.jsxs("div",{children:[c.jsxs("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:["Attempts (",n.attempts.length,")"]}),n.attempts.length===0?c.jsx("p",{className:"text-xs text-white/45 italic",children:"No attempts recorded yet."}):c.jsx("ul",{children:n.attempts.map((C,V)=>c.jsx(zS,{attempt:C,isRetry:V>0},C.sessionId))})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Failure"}),n.primaryFailure?c.jsxs("div",{className:"space-y-1.5",children:[c.jsx(Ux,{cause:n.primaryFailure,primary:!0}),n.consequenceCauses.length>0&&c.jsx("div",{className:"space-y-1 opacity-80",children:n.consequenceCauses.map((C,V)=>c.jsx(Ux,{cause:C,primary:!1},`${C.code}-${V}`))})]}):g?c.jsxs("p",{className:"text-sm text-white/60 italic",title:Es("unavailable",n.primaryFailureReasons),children:["Unknown — ",n.primaryFailureReasons.join(", ")||"no failure evidence recorded"]}):c.jsx("p",{className:"text-sm text-white/45",children:"No failure recorded."})]}),c.jsxs("div",{children:[c.jsxs("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:["Retry waste (",n.waste.failedAttempts," failed attempt",n.waste.failedAttempts===1?"":"s",")"]}),K?c.jsxs("p",{className:"text-sm text-white/85 flex flex-wrap gap-x-3 gap-y-0.5 tabular-nums",children:[c.jsxs("span",{title:"Failed-attempt agent-process time over known values only",children:["Runtime ",c.jsx(Xr,{covered:n.waste.runtimeMs,format:C=>Ca(Math.round(C))??"?",unit:"attempts"})]}),c.jsxs("span",{title:"Failed-attempt input tokens over known values only",children:["In ",c.jsx(Xr,{covered:n.waste.tokensIn,format:C=>Lx(C)??"?",unit:"attempts"})]}),c.jsxs("span",{title:"Failed-attempt output tokens over known values only",children:["Out ",c.jsx(Xr,{covered:n.waste.tokensOut,format:C=>Lx(C)??"?",unit:"attempts"})]}),c.jsxs("span",{title:"Failed-attempt known cost over known values only",children:["Cost ",c.jsx(Xr,{covered:n.waste.costUsd,format:C=>OS(C)??"?",unit:"attempts"})]})]}):c.jsx("p",{className:"text-sm text-white/45",children:"No failed attempts — no retry waste."})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"First checkpoint"}),n.firstCheckpoint.msSinceWorkflowStart==null&&n.firstCheckpoint.kind==null?c.jsxs("p",{className:"text-sm text-white/60 italic",title:Es(n.firstCheckpoint.quality,n.firstCheckpoint.reasons),children:["Unavailable — ",n.firstCheckpoint.reasons.join(", ")||"no checkpoint recorded"]}):c.jsxs("p",{className:"text-sm text-white/85 tabular-nums",children:[n.firstCheckpoint.kind?Yd(n.firstCheckpoint.kind):"Checkpoint",n.firstCheckpoint.observedSha?` · ${n.firstCheckpoint.observedSha.slice(0,12)}`:"",u?` · ${u} after workflow start`:"",c.jsx(ba,{quality:n.firstCheckpoint.quality,reasons:n.firstCheckpoint.reasons})]})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Retry reuse"}),c.jsxs("div",{className:"flex flex-wrap gap-1.5",role:"group","aria-label":"Retry reuse summary",children:[c.jsxs("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-cyber-teal/40 bg-cyber-teal/10 text-cyber-teal",title:"Retries that preserved prior work — a reused worktree, commit, or verification receipt.",children:["Reused ",n.retry.reused]}),c.jsxs("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-white/15 bg-white/5 text-white/60",title:"Retries that started cold — no prior worktree, commit, or verification was reused.",children:["Cold ",n.retry.cold]}),n.retry.unknown>0&&c.jsxs("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-white/15 bg-white/5 text-white/60 italic",title:`Unknown reuse for ${n.retry.unknown} retr${n.retry.unknown===1?"y":"ies"} — ${n.retry.reasons.join(", ")||"no reuse evidence"}.`,children:["Unknown ",n.retry.unknown]}),n.retry.publishOnly>0&&c.jsxs("span",{className:"text-[11px] px-1.5 py-0.5 rounded border border-cyber-violet/40 bg-cyber-violet/10 text-cyber-violet-light",title:"Publish-only retries ran no agent process — the coordinator published already-verified work.",children:["Publish-only ",n.retry.publishOnly]}),c.jsxs("span",{className:"text-[11px] text-white/60 tabular-nums self-center",children:[n.retry.retries===0?"No retries":b??c.jsx(In,{reasons:n.retry.reasons}),c.jsx(ba,{quality:n.retry.quality,reasons:n.retry.reasons})]})]}),c.jsx("p",{className:"text-[11px] text-white/60 mt-0.5",children:n.retry.retries===0?"No retries — nothing to preserve.":U.length>0?`Preserved: ${U.join(", ")}.`:n.retry.unknown>0?`Preservation unknown for ${n.retry.unknown} retr${n.retry.unknown===1?"y":"ies"} — no reuse evidence.`:"No prior work preserved — every retry started cold."})]}),c.jsxs("div",{children:[c.jsx("h4",{className:"text-xs text-white/45 uppercase tracking-wide mb-1",children:"Silence"}),c.jsx("p",{className:"text-[11px] text-white/60 mb-1",children:"Silence is observational — gaps with no new structured activity. It describes what was observed, never a diagnosis."}),f.length===0?m?c.jsx("p",{className:"text-sm text-white/60 italic",children:"Unknown — silence cannot be derived without agent-process bounds."}):c.jsx("p",{className:"text-sm text-white/45",children:"No silence observed."}):c.jsxs(c.Fragment,{children:[c.jsx("ul",{"aria-label":"Observed silence intervals",children:f.map((C,V)=>c.jsx(DS,{interval:C},V))}),y.length>0&&c.jsx("ul",{"aria-label":"Attempts with unknown silence",className:"mt-1",children:y.map(C=>c.jsxs("li",{className:"text-[11px] text-white/60 italic py-0.5",children:["Silence unknown for attempt ",C.sessionId.length>12?`${C.sessionId.slice(0,8)}…`:C.sessionId," —"," ",C.silenceReasons.join(", ")||"no silence evidence recorded"]},C.sessionId))})]})]})]})}function qS({issueId:n}){const[i,s]=w.useState(null),[u,d]=w.useState(null),[f,m]=w.useState(!0);return w.useEffect(()=>{s(null),d(null),m(!0);let y=!1;return a2(n).then(g=>{y||(s(g),m(!1))}).catch(g=>{y||(/not found/i.test(String(g))?(s(null),d(null)):d(String(g).replace(/^Error:\s*/i,"")),m(!1))}),()=>{y=!0}},[n]),c.jsxs("section",{"aria-labelledby":"execution-analysis-heading",className:"mb-4 p-3 rounded border border-white/10 bg-white/[0.03]",children:[c.jsx("h3",{id:"execution-analysis-heading",className:"font-ui-display text-sm font-medium text-white/85 mb-2",children:"Execution analysis"}),f&&c.jsx("p",{className:"text-xs text-white/40",children:"Loading execution analysis…"}),!f&&u&&c.jsx("p",{className:"text-xs text-red-300",children:u}),!f&&!u&&!i&&c.jsx("p",{className:"text-xs text-white/45",children:"No execution analysis yet — start the workflow to see where time goes."}),!f&&!u&&i&&c.jsx(BS,{analysis:i})]})}const HS="web";function $S(n){try{const i=JSON.parse(n);return typeof i.text=="string"?i.text:JSON.stringify(i,null,2)}catch{return n}}function td(n){const i=Math.floor(n/6e4);return i<60?`${i}m`:`${Math.floor(i/60)}h ${i%60}m`}function VS(n){if(!n)return"no heartbeat yet";const i=Math.max(0,Math.floor((Date.now()-new Date(n).getTime())/1e3));return i<5?"just now":i<60?`${i}s ago`:`${Math.floor(i/60)}m ago`}function Ss(n){if(!n)return null;const i=n.split(/[/\\]/).filter(Boolean);return i.length<=2?n:i.slice(-2).join("/")}function ad(n){var i;return[n.branch,n.tipLabel,(i=n.worktree)!=null&&i.path?Ss(n.worktree.path):null].filter(Boolean).join(" · ")}function nd(n){var i;return[n.restartRisk?"restart risk":null,(i=n.worktree)!=null&&i.preserved?"dirty worktree preserved":null].filter(Boolean).map(s=>` · ${s}`).join("")}function ld(n){var i;return!!(n.restartRisk||(i=n.worktree)!=null&&i.preserved)}function YS(n,i){return!n||!i?!1:n===i?!0:n.includes(i)}function ZS({busy:n,onConfirm:i,onCancel:s}){return c.jsxs("div",{className:"mt-2 p-3 rounded border border-red-400/30 bg-red-500/10 space-y-2",children:[c.jsx("p",{className:"text-sm text-white/90 font-medium",children:"Close this issue?"}),c.jsx("p",{className:"text-sm text-white/70",children:"It will not execute. Any queue entry will be removed. History is retained and can be found as closed work — filter the Issues list by status closed or open this page directly."}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"px-4 py-1.5 text-sm rounded border border-red-400/50 text-red-200 hover:bg-red-500/20 disabled:opacity-50",disabled:n,onClick:i,children:"Close issue"}),c.jsx("button",{type:"button",className:"font-ui-display px-4 py-1.5 text-sm text-white/60 hover:text-white",onClick:s,children:"Keep issue"})]})]})}function GS(n){const i=n.humanActions.find(s=>s.status==="open");if(i)return i.question;switch(n.issue.currentOwner){case"developer":return"Waiting on the developer";case"reviewer":return"Waiting on the reviewer";case"human":return"Waiting on you";default:return n.issue.status==="done"||n.issue.status==="closed"?"Complete":"Idle"}}function QS({issueId:n,detail:i,agents:s,onHumanActionsChanged:u,refresh:d,onError:f}){var Kt;const[m,y]=w.useState(null),[g,v]=w.useState({}),[b,N]=w.useState(""),[U,K]=w.useState(!1),[C,V]=w.useState(""),[D,B]=w.useState(""),[Q,W]=w.useState(""),[oe,J]=w.useState(!1),[Ee,I]=w.useState(null),[ge,He]=w.useState(!1),[yt,dt]=w.useState(!1),[Pe,Tt]=w.useState(null),[gt,Ie]=w.useState({}),L=G=>f(String(G)),{issue:Z,timeline:ce,humanActions:Re,usageSummary:ke,readiness:j,humanWaitMs:H,interventionCount:F,latestWorkflowInstance:ee,activeWorkerSession:le,liveProgress:xe,latestSessionFailure:he,branchTipStatus:Me,queued:$e,queueEntry:Na}=i,zt=s.find(G=>G.id===Z.developerAgentId),ia=zt&&!zt.healthy,Qa=((Kt=zt==null?void 0:zt.issues[0])==null?void 0:Kt.message)??"Developer agent is unhealthy",Le=ee?new Date(ee.completedAt??Date.now()).getTime()-new Date(ee.startedAt).getTime():0,bt=Re.filter(G=>G.status==="open"),Xa=j.ok===!1||bt.some(G=>G.actionType==="product_scope_decision"),lt=ee!=null&&ee.completedAt===null,Pn=Z.status==="ready"&&!lt,wn=Z.status==="ready"&&!lt,Ua=le&&le.status==="running"&&(Z.status==="developing"||Z.status==="reviewing"||Z.status==="repairing"),Ot=!!he&&!Ua,Ka=async()=>{b.trim()&&(await d2(n,b),N(""),d())},Sn=()=>{V(Z.title),B(Z.description??""),W(Z.acceptanceCriteria??""),K(!0)},et=async()=>{J(!0),f(null);try{await gd(n,{title:C.trim()||void 0,description:D.trim()||null,acceptanceCriteria:Q.trim()||null}),K(!1),d()}catch(G){L(G)}finally{J(!1)}},it=async()=>{J(!0),f(null);try{const G=await qy(n);I(G.state==="admitted"?null:`Queued at position ${G.position}${G.waitReason?` — ${G.waitReason}`:""}`),d()}catch(G){L(G)}finally{J(!1)}},el=async()=>{J(!0),f(null);try{await u2(n),d()}catch(G){L(G)}finally{J(!1)}},tl=async()=>{J(!0),f(null);try{await Hy(n),I(null),He(!1),d()}catch(G){L(G),d()}finally{J(!1)}},Ja=async(G,Ce,st)=>{J(!0),f(null);try{await gd(n,{repo:G,developerAgentId:Ce,reviewerAgentId:st}),He(!1),d()}catch(Bt){He(!1),L(Bt),d()}finally{J(!1)}},al=async()=>{J(!0),f(null);try{await $y(n),d()}catch(G){L(G)}finally{J(!1)}},wt=async()=>{J(!0),f(null);try{await r2(n),dt(!1),Tt("Issue closed — it will not execute. History is retained and can be found as closed work."),d()}catch(G){L(G)}finally{J(!1)}},ji=async()=>{if(confirm("Abort this workflow? The current worker will stop and the issue will close. History and evidence are kept.")){J(!0),f(null);try{await s2(n),d()}catch(G){L(G)}finally{J(!1)}}},Rl=async(G,Ce,st)=>{J(!0),f(null);try{await Vy(G,HS,Ce,st),u(),d()}catch(Bt){L(Bt)}finally{J(!1)}},Ia=()=>{m||n2(n).then(y).catch(G=>L(G))},_t=G=>{g[G]||(v(Ce=>({...Ce,[G]:{content:"",loading:!0}})),l2(n,G).then(Ce=>v(st=>({...st,[G]:{content:Ce.content,loading:!1}}))).catch(Ce=>v(st=>({...st,[G]:{content:"",loading:!1,error:String(Ce)}}))))};return c.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-4",children:c.jsxs("div",{className:"max-w-3xl",children:[c.jsx(ja,{to:"/issues",className:"font-ui-display inline-block text-sm text-white/50 hover:text-white mb-3",children:"← Issues"}),c.jsxs("div",{className:"flex items-start justify-between gap-4 mb-4",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-lg font-semibold text-white/90",children:Z.title}),c.jsxs("p",{className:"text-xs text-white/45 mt-1",children:["Owner: ",c.jsx("span",{className:"capitalize",children:Z.currentOwner}),Z.currentIntent?` · ${Z.currentIntent}`:""]}),c.jsxs("div",{className:"flex flex-wrap gap-3 mt-2 text-xs text-white/40",children:[Z.prUrl&&c.jsxs("a",{href:Z.prUrl,target:"_blank",rel:"noreferrer",className:"text-cyber-teal hover:underline",children:["PR #",Z.prNumber]}),Z.externalUrl&&c.jsx("a",{href:Z.externalUrl,target:"_blank",rel:"noreferrer",className:"text-cyber-teal hover:underline",children:Z.externalLabel??"External link"}),c.jsxs("span",{children:["Round ",Z.currentRound,"/",Z.maxReviewRounds]}),c.jsxs("span",{children:["Infra attempts ",Z.infraAttempts,"/",Z.maxInfraAttempts]}),c.jsxs("span",{title:"Wall-clock time from workflow start to completion (or now)",children:[td(Le)," elapsed"]}),c.jsxs("span",{title:`${ke.totalTokensIn} in / ${ke.totalTokensOut} out tokens`,children:["$",ke.totalCostUsd.toFixed(2)]}),H>0&&c.jsxs("span",{title:"Time spent waiting on a human, excluding autonomous processing",children:[td(H)," human wait"]}),F>0&&c.jsxs("span",{children:[F," intervention",F===1?"":"s"]})]})]}),c.jsx(Gy,{status:Z.status})]}),Pe&&c.jsx("div",{className:"mb-4 p-3 rounded border border-white/15 bg-white/[0.04]",children:c.jsx("p",{className:"text-sm text-white/85",children:Pe})}),c.jsx(NS,{issue:Z,agents:s,canEdit:wn,editing:ge,busy:oe,onBeginEdit:()=>He(!0),onSave:(G,Ce,st)=>void Ja(G,Ce,st),onCancel:()=>He(!1)}),c.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-panel-elevated/40 flex items-start justify-between gap-3",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-xs text-white/45",children:"Next"}),c.jsx("p",{className:"text-sm text-white/85",children:GS(i)})]}),lt&&c.jsx("button",{type:"button",className:"btn-ghost-danger px-3 py-1.5 text-xs shrink-0 disabled:cursor-not-allowed disabled:opacity-60",disabled:oe,onClick:ji,children:"Abort workflow"})]}),Na&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-cyber-teal/30 bg-cyber-teal/5",children:[c.jsxs("p",{className:"text-xs text-cyber-teal font-medium uppercase tracking-wide",children:["Queued · position ",Na.position]}),c.jsx("p",{className:"text-sm text-white/80 mt-0.5",children:Na.waitReason??"Next up — starts as soon as the coordinator ticks"})]}),Ua&&le&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-cyber-teal/35 bg-cyber-teal/5 space-y-1.5",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-cyber-teal animate-pulse","aria-hidden":!0}),c.jsx("p",{className:"text-xs text-cyber-teal font-medium uppercase tracking-wide",children:"Running now"})]}),c.jsxs("p",{className:"text-sm text-white/90",children:[c.jsx("span",{className:"capitalize",children:le.role}),le.runtime?` · ${le.runtime}`:"",le.model?` · ${le.model}`:"",` · round ${le.round}`]}),c.jsxs("p",{className:"text-sm text-[#C4B643] truncate",title:xe??Z.currentIntent??"session started",children:["Last progress: ",xe??Z.currentIntent??"session started"]}),Me&&c.jsxs("p",{className:`text-xs ${ld(Me)?"text-amber-300":"text-white/55"}`,title:ad(Me),children:["Branch tip: ",Me.tipLabel,nd(Me)]}),xe&&Z.currentIntent&&!/session running/i.test(Z.currentIntent)&&!YS(Z.currentIntent,xe)&&c.jsx("p",{className:"text-xs text-white/45 truncate",title:Z.currentIntent,children:Z.currentIntent}),c.jsxs("p",{className:"text-xs text-white/45",children:["Heartbeat ",VS(le.heartbeatAt),Ss(le.worktreePath)?` · ${Ss(le.worktreePath)}`:""]}),le.logPath&&c.jsxs("p",{className:"text-xs text-white/40 font-mono break-all",title:le.logPath,children:["Log: ",Ss(le.logPath)??le.logPath]})]}),Ot&&he&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-red-400/30 bg-red-500/10 space-y-1.5",children:[c.jsx("p",{className:"text-xs text-red-300 font-medium uppercase tracking-wide",children:"Latest session failure"}),c.jsx("p",{className:"text-sm text-white/90 whitespace-pre-wrap break-words",children:he.reason}),c.jsxs("p",{className:"text-xs text-white/45",children:[he.role?c.jsx("span",{className:"capitalize",children:he.role}):"Worker",he.outcome?` · ${he.outcome}`:"",` · ${new Date(he.when).toLocaleString()}`,` · infra ${he.infraAttempts}/${he.maxInfraAttempts}`]}),Me&&c.jsxs("p",{className:`text-xs ${ld(Me)?"text-amber-300":"text-white/55"}`,title:ad(Me),children:["Branch tip: ",Me.tipLabel,nd(Me)]}),he.logPath&&c.jsxs("p",{className:"text-xs text-white/40 font-mono break-all",title:he.logPath,children:["Log: ",Ss(he.logPath)??he.logPath]})]}),Me&&!Ua&&!Ot&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-white/[0.03] space-y-1",children:[c.jsx("p",{className:"text-xs text-white/45 uppercase tracking-wide",children:"Branch tip"}),c.jsxs("p",{className:`text-sm ${ld(Me)?"text-amber-300":"text-white/80"}`,title:ad(Me),children:[Me.tipLabel,nd(Me)]})]}),!j.ok&&!bt.some(G=>G.actionType==="product_scope_decision")&&c.jsx("div",{className:"mb-4 p-3 rounded border border-amber-400/30 bg-amber-500/10",children:c.jsxs("p",{className:"text-xs text-amber-300 font-medium",children:["Not startable yet — missing: ",j.missing.join(", ")]})}),bt.length>0&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-red-400/30 bg-red-500/10 space-y-2",children:[c.jsx("p",{className:"text-xs text-red-300 font-medium",children:"Human action needed"}),bt.map(G=>{const Ce=G.actionType==="product_scope_decision";return c.jsxs("div",{className:"space-y-1",children:[c.jsx("p",{className:"text-sm text-white/80",children:G.question}),Ce?j.ok&&c.jsxs("div",{className:"space-y-1",children:[c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm text-white/85 placeholder:text-white/30",rows:2,placeholder:"Decision note (optional) — shown to the next developer round",value:gt[G.id]??"",disabled:oe,onChange:st=>Ie(Bt=>({...Bt,[G.id]:st.target.value}))}),c.jsx("button",{type:"button",className:"btn-gold px-3 py-1 text-xs",disabled:oe,onClick:()=>Rl(G.id,"resume",gt[G.id]),children:"Resume"})]}):c.jsx(Iy,{options:Jy(G),disabled:oe,onChoose:st=>Rl(G.id,st)})]},G.id)})]}),Xa&&!U&&c.jsx("button",{type:"button",className:"font-ui-display mb-4 text-xs text-cyber-teal hover:underline",onClick:Sn,children:"Edit title / description / acceptance criteria"}),U&&c.jsxs("div",{className:"mb-4 p-3 rounded border border-white/10 bg-panel-elevated/60 space-y-2",children:[c.jsx("input",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",value:C,onChange:G=>V(G.target.value),placeholder:"Title"}),c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",rows:2,value:D,onChange:G=>B(G.target.value),placeholder:"Description"}),c.jsx("textarea",{className:"w-full bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",rows:2,value:Q,onChange:G=>W(G.target.value),placeholder:"Acceptance criteria"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 py-1.5 text-sm",disabled:oe,onClick:et,children:"Save"}),c.jsx("button",{type:"button",className:"font-ui-display px-4 py-1.5 text-sm text-white/60 hover:text-white",onClick:()=>K(!1),children:"Cancel"})]})]}),(Z.status==="ready"||Z.status==="needs_human"&&bt.length===0)&&c.jsxs("div",{className:"mb-4 space-y-2",children:[ia&&c.jsxs("p",{className:"text-sm text-amber-200/90",children:["Fix before Start: ",Qa]}),Ee&&c.jsx("p",{className:"text-sm text-amber-200/90",children:Ee}),c.jsxs("div",{className:"flex flex-wrap gap-2",children:[c.jsx("button",{type:"button",className:"btn-gold px-4 py-2 disabled:opacity-50",disabled:!j.ok||oe||!!ia,title:ia?Qa:"Run next — move to the front of the admission queue; runs now if a slot is free, otherwise waits first with a reason",onClick:it,children:"Run next"}),c.jsx("button",{type:"button",className:"px-4 py-2 text-sm border border-cyber-teal/40 rounded text-cyber-teal hover:bg-cyber-teal/10 disabled:opacity-50",disabled:!j.ok||oe||!!ia,title:ia?Qa:"Execute now — start immediately, skipping queue order; refuses (changing nothing) when capacity, readiness, blockers, or agent health prevents it",onClick:tl,children:"Execute now"}),$e?c.jsx("button",{type:"button",className:"font-ui-display px-4 py-2 text-sm border border-white/15 rounded text-white/60 hover:text-white disabled:opacity-50",disabled:oe,onClick:al,children:"Remove from queue"}):c.jsx("button",{type:"button",className:"font-ui-display px-4 py-2 text-sm border border-white/15 rounded text-white/80 hover:border-cyber-teal/50 hover:text-cyber-teal disabled:opacity-50",disabled:oe||lt,title:"Add to queue — append to the end of the admission queue; does not start anything now",onClick:el,children:"Add to queue"})]}),$e&&wn&&!ge&&c.jsx("p",{className:"text-xs text-white/40",children:"Queued — edit repository / agents from the Configuration section above; position is kept."})]}),c.jsx(qS,{issueId:n}),c.jsx("div",{className:"border-t border-white/10 pt-3",children:c.jsx(TS,{events:ce})}),c.jsxs("div",{className:"mt-4 flex gap-2",children:[c.jsx("input",{className:"flex-1 bg-black/30 border border-white/10 rounded px-3 py-2 text-sm",placeholder:"Guide this issue…",value:b,onChange:G=>N(G.target.value),onKeyDown:G=>G.key==="Enter"&&Ka()}),c.jsx("button",{type:"button",className:"btn-gold px-4",onClick:Ka,children:"Send"})]}),Pn&&c.jsxs("details",{className:"mt-6",children:[c.jsx("summary",{className:"text-xs text-white/45 cursor-pointer hover:text-white/70",children:"More actions"}),c.jsxs("div",{className:"mt-2 space-y-2",children:[c.jsx("p",{className:"text-xs text-white/45",children:"Remove from queue means do not run yet — the issue stays ready and can run later. Close issue means this work is no longer needed — it will never execute."}),yt?c.jsx(ZS,{busy:oe,onConfirm:()=>void wt(),onCancel:()=>dt(!1)}):c.jsx("button",{type:"button",className:"font-ui-display text-xs text-white/50 hover:text-red-300 underline underline-offset-2 disabled:opacity-50",disabled:oe,title:"Retire this issue without running it — removes any queue entry, keeps history as closed work",onClick:()=>dt(!0),children:"Close issue"})]})]}),c.jsxs("details",{className:"mt-6",onToggle:G=>G.currentTarget.open&&Ia(),children:[c.jsx("summary",{className:"text-xs text-white/45 cursor-pointer hover:text-white/70",children:"Evidence & raw trace"}),m?c.jsxs("div",{className:"mt-2 space-y-3 text-xs text-white/60",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-white/45 mb-1",children:"Worker sessions"}),m.workerSessions.map(G=>{const Ce=m.usageEvents.filter(Mt=>Mt.workerSessionId===G.id),st=Ce.reduce((Mt,sa)=>Mt+(sa.costUsd??0),0),Bt=Ce.reduce((Mt,sa)=>Mt+(sa.tokensIn??0),0),jn=Ce.reduce((Mt,sa)=>Mt+(sa.tokensOut??0),0);return c.jsxs("p",{children:[G.role," round ",G.round," · ",G.status,G.startedAt&&G.completedAt?` · ${td(new Date(G.completedAt).getTime()-new Date(G.startedAt).getTime())}`:"",Ce.length>0?` · $${st.toFixed(3)} · ${Bt}→${jn} tok`:""]},G.id)}),m.workerSessions.length===0&&c.jsx("p",{className:"text-white/35",children:"None yet."})]}),c.jsxs("div",{children:[c.jsx("p",{className:"text-white/45 mb-1",children:"Artifacts"}),m.artifacts.map(G=>{const Ce=g[G.id];return c.jsxs("details",{className:"mb-1.5",onToggle:st=>st.currentTarget.open&&G.blobPath&&_t(G.id),children:[c.jsxs("summary",{className:"cursor-pointer hover:text-white/80",children:[G.kind," · ",new Date(G.createdAt).toLocaleString()]}),c.jsxs("div",{className:"mt-1 pl-3 border-l border-white/10 space-y-1",children:[G.contentJson&&c.jsx("pre",{className:"whitespace-pre-wrap break-words text-white/55",children:$S(G.contentJson)}),G.blobPath&&c.jsxs("div",{children:[c.jsxs("p",{className:"text-white/40",children:["Raw trace: ",G.blobPath]}),(Ce==null?void 0:Ce.loading)&&c.jsx("p",{className:"text-white/35",children:"Loading trace…"}),(Ce==null?void 0:Ce.error)&&c.jsx("p",{className:"text-red-300/80",children:Ce.error}),Ce&&!Ce.loading&&!Ce.error&&c.jsx("pre",{className:"mt-1 max-h-64 overflow-y-auto whitespace-pre-wrap break-words text-white/50 bg-black/20 rounded p-2",children:Ce.content||"(empty)"})]}),!G.contentJson&&!G.blobPath&&c.jsx("p",{className:"text-white/35",children:"No content recorded."})]})]},G.id)}),m.artifacts.length===0&&c.jsx("p",{className:"text-white/35",children:"None yet."})]})]}):c.jsx("p",{className:"text-xs text-white/40 mt-2",children:"Loading…"})]})]})})}function XS({issueId:n,agents:i,onHumanActionsChanged:s}){const[u,d]=w.useState(null),[f,m]=w.useState(null),[y,g]=w.useState(!1),v=()=>By(n).then(b=>{d(b),m(null),g(!1)}).catch(b=>{const N=String(b).replace(/^Error:\s*/i,"").trim();/^not found$/i.test(N)?(g(!0),m(null),d(null)):(m(N),g(!1))});return w.useEffect(()=>{d(null),m(null),g(!1),v();const b=setInterval(v,4e3);return()=>clearInterval(b)},[n]),y?c.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-10",children:c.jsxs("div",{className:"max-w-md space-y-3",children:[c.jsx("h2",{className:"text-lg font-semibold text-white/90",children:"Issue not found"}),c.jsx("p",{className:"text-sm text-white/55",children:"No issue exists for this ID — it may have been deleted, or the link is wrong."}),c.jsx(ja,{to:"/issues",className:"font-ui-display inline-block text-sm text-cyber-teal hover:underline",children:"← Back to Issues"})]})}):f?c.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-6 space-y-3",children:[c.jsx("p",{className:"text-red-300 text-sm",children:f}),c.jsx(ja,{to:"/issues",className:"font-ui-display inline-block text-sm text-cyber-teal hover:underline",children:"← Back to Issues"})]}):u?c.jsx(QS,{issueId:n,detail:u,agents:i,onHumanActionsChanged:s,refresh:v,onError:b=>m(b)},n):c.jsx("div",{className:"p-6 text-white/50 text-sm",children:"Loading…"})}function KS(){return c.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-10",children:c.jsxs("div",{className:"max-w-md space-y-3",children:[c.jsx("h2",{className:"font-ui-display text-lg font-semibold text-white/90",children:"Page not found"}),c.jsx("p",{className:"text-sm text-white/55",children:"That URL is not a destination in Agent Dealer."}),c.jsx(ja,{to:"/issues",className:"font-ui-display inline-block text-sm text-cyber-teal hover:underline",children:"← Back to Issues"})]})})}function JS(){return c.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0 overflow-hidden","aria-hidden":!0,children:[c.jsx("div",{className:"absolute top-16 left-12",children:c.jsx("div",{className:"ambient-orb ambient-orb-a w-[26rem] h-[26rem] rounded-full bg-cyan-500/10 blur-3xl"})}),c.jsx("div",{className:"absolute bottom-20 right-12",children:c.jsx("div",{className:"ambient-orb ambient-orb-b w-[26rem] h-[26rem] rounded-full bg-pink-500/10 blur-3xl"})}),c.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",children:c.jsx("div",{className:"ambient-orb ambient-orb-c w-[22rem] h-[22rem] rounded-full bg-blue-500/[0.07] blur-3xl"})})]})}function IS({className:n="w-5 h-5"}){return c.jsxs("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:n,"aria-hidden":!0,children:[c.jsx("circle",{cx:"6.75",cy:"6.25",r:"3.25"}),c.jsx("circle",{cx:"13.5",cy:"6.75",r:"2.85",opacity:"0.85"}),c.jsx("path",{d:"M1.75 16v-1.1c0-2.35 1.928-4.25 4.3-4.25 1.16 0 2.21.456 3 1.2.79-.744 1.84-1.2 3-1.2 2.372 0 4.3 1.9 4.3 4.25V16H1.75z"})]})}const FS="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAN5UlEQVR4AeydXagdVxmGF7loIKSpN/WHttqKktpAvWkVoRctp4gRtf4QbxRrREEb0wtRGkRovLCmKC1Y641CFGpBCtpIsVfHRvAm5KpIrMGfCCJUa8GmTWl6k+5nznlPvzOZ2Xtmz5o1a/Z8Ie/+vjU/a6351nPe/Xv22bFr185LLq9BbAZ2BP/nFeihAg5WD0X1LkNwsJyCXirgYPVSVu/UwXIGeqmAg9VLWTPsNPGUHKzEBZ/KcA7WVFY68XU6WIkLPpXhHKyprHTi63SwEhc89nDv37cndpdR+nOwopQxfScA9dDRfQGRM4O1ew+Fd3/wVtLB5WANtgTLDQxEwITI6eXoDz8dHvjrmbB2+J6ZDrFpcDlYgy9BswkAETAhcnvWnlfOBsS2G2aOlYNrOVisRsYCImBC5HVTveb5327tWjs8vGs5WFvLkVcCRMCEyO3szu/ea5tFjmMhGjm4loPFSmQkIAImRG6nBlDPvedbAZHbfeQ5uZaDxYpkICACJkRupwREwIR+c3w9fPu9+8LRb/7aHlLkOBaiMbRrOViswoACImBC5HYqVUCt/+jR4pBnz5wPqGiYm1xcy8F6c1GSZkAETIjcDj4PKHvcL574l20WuRyLxpCu5WCxAgkFRMCEyO3QTYHSOTgWUlvx2gyeITpYWo2eIxABEyK3w7UFyp5b5Vr27nAo13Kw7Cr1kAMRMCFyO0QXoNQPjoXUVhzatRwsrUTkCETAhMht9zGAsv3l6FoOll2hCDkQARMit13GBkp941hIbcUhXcvB0ip0jEAETIjcdtcXUHaM3Fwra7Bs4XLNgQiYELmdZwqgNB6OhdRWHMq1HCytQMsIRMCEyO3pKYGy4+bkWg6WXZkGORABEyK3pwwFlOaAYyG1FYdwLQdL1V8QgQiYELk93AJ16dyt4R2PXxNueXm/PSRZnotrOVgLlhyIgAmR28MtULw5/NID58LuP11ZHHLj9bcFVDQS3uBYqDxkatdysMorsNkGImBC5Jubi1AGik8b8ObwiWeOFft1c9cdR5QmjTm4loNVWnIgAiZEbnfXAaVj/vLPPwakNo6F1E4VcSxUHi+la7UDqzzTFWsDE2oLlC2Du9ZGNRysjTrU3sqliOdOnQ7c5dUePNuBY6FZWvzHsVDRSHiDY6HykKlcy8EylT91+l2mtZHy+SZEq+knBdy1gn+jH8DgKPcdfCp85AOPh4uv3symbbIfQ2nyGzA4FlIn9I/UThVxLFQeL4VrTdqxWGyAQhQfGF564XOk24RjITa6a1GFxZokWGWgHjz+sYC4C3vtws0r5Vp1CPTtWpMCqw4onIoFIKJVcC2e2fIMF3FtVjwRQdpW4cLatXScBFiLgLLVS+lad3/2urD+xIcCENg5dMnpC5gQue2Lx49/3/Odyt9LbPLY0fa1KF9psNoApULhWKhP1xJQXzhwbTHs3QeuK2KXGyACJkRu++IB/DeOngl/OPnxcOncLXbXVh7btVYSrGWA2qrwLDk7ewW9j8daV139y/Dhj34vCKjZUMV/QEBFo+UN5wETIrenCyigIseNr/jPznDFf3faw7bymK61UmB1BUoVfnLzPb9YrvX8ha+Fd960P1x19WMa4rLY1rWACJgQue0QiIAJkWsfToyu3HyjXNsVY7rWSoAVCygVmHji5LHQ1bXKd3n0WyfgQHX7tZ1jgAmRazsRiIAJkbOtrFSuNWqw+gBKC9HVtVj08l0effNsjO9gINK2muda9AdMiNyeB0TAhMjtvnKOY6G+XWuUYPUJlF2ILq718u69oQoe+mf7v9/+CdJtAhhkN9IGJkRu9wERMCFyu29ensK1RgVWKqC0KMu4Ft+m95XHfh6+PFMVPLyCj4ALaSxFuRYQARMi134iEAETImdbG+FYqE/XGgVYqYGyi9TGtQQUD4Lpg0VH5FZ677EKPCACJkRuz6MvYELkdl/bvG/XyhqsIYHSQrVxLQHFx2t+9vkvhp/OVPVpThwL4VhIYyn2CZTGwLFQX66VJVg5AKUFIDZ1LY4VUP84dZpm8R1WVe4i1+KxWHFgxQ3n4U6IvOKQTpv6dK2swMoNKK1aU9fS8eVY51rv+9sPggArnwNIfQGlsXAs1IdrZQFWrkBpAYi4FndbiLaVhaPq1WsgQfYccu4OiUOqL9caFKwxAKVFx7V4O+SFHQc2NplbAEFs4nEWzwzJrZ7983nbrM0Bl9e5fvz0rtpjYu7AsVBs1xoErDEBZRcR1+JNXBbfbievcy0eiPMMr+rFUs6T6BOgfvfi7eGhr34/6DGa9vcZ+3CtpGCNFSgtahvX+tSX7iz+zg1QAZf6KMcyUDyTTAkV88GxUEzXSgLW2IGi+NIi19rzytnAg/Kv779w2eesgAjRF9E61BBAMQ8ptmv1CtYqAaUFWORaQAVcOp4oiACJF0WJussbGijmh3AsFMu1egFrFYGi+NI819IxRAsUOdt4dshjqFyAYk5STNeKCtaqA6UFmOdaHANEuBIiZ5t9NT71YyjGbyIcC8VwrShg5QFUk9LFO6bKtYAImBC5Riu/Gq/tOcZYrtUJrCkCJRisawERMCFyHTPGiGOhrq61FFhTBsrCgms99/vXKn/rxR5X9Wq83Z9bHsO1WoHlQG1HANd6+MHPBB4/ofVHfrL9gM1W3avxm7uzCzgW6uJajcByoOavPc/wEN9EA2BVR0/NteaC5UBVITJ/2/ojj1YeMDXXqgTLgapko9FGXkpw1yp9jVFkoBotxCoeNCXXqlu/wrEsUOQ82+HbV3gAV3eib6+vwKRc695DlYUowGIPQBHR3utvI7g6VGAqrrV2+J7KKhVg4UxIRwAZUttj+wpM3bUKsCgbL4oRpaG+o1zjr0KcsmttgYVjIS0ojoXU9ti+AlN2rS2wKJu7FlWIq0m41qxk5cda28DCsdDsuOI/joWKht8sVYGputY2sKicuxZViKsputZlYOFYSKXFsZDaHttXYIqudRlYlM1diyrE1dRcqxIsHAuptDgWUttj+wpMzbUqwaJs7lpUIa6m5Fq1YOFYSKXFsZDaHttXIJ1rtZ9b2zMwHr5yoOobmPl0Ry1YDMTJRMlfjVcllo+r4lqvv+1iePHO/4XX33pxqxgApV8cmQsWjoV0Jo6F1PbYvgJjdy2+8ETfXCioLFBcH1WZCxYHuGtRhbgao2tZoPg0LBWpAortaCFYOBbiYIRjIXLXchXgp5pFqTp77XD155uqjk2xrS1QmtNCsDjQXYsqxFXurrUsUKpSI7BwLKSTcCyktsf2FcjVtboCpUo0AouD3bWowtKqPDEn14oFlC60MVg4FtKJOBZS22P7CuTgWrGBUhUag8UJ7lpUIa6Gcq2+gFJ1WoGFYyGdjGMhtT22r0Bq1+obKFWgFVic5K5FFeIqhWulAkqVaQ0WjoXUAY6F1PbYvgJ9ulZqoHT1rcHiRHctqhBXsV1rKKBUlaXAwrGQOsGxkNpjiLnNMZZrDQ2U6roUWJzsrkUV4qqLa+UClCqyNFg4FlJHOBZS22P7CizjWrkBpateGiw6cNeiCnHV1LVyBUrV6AQWjoXUGY6F1PbYvgKLXCt3oHTFncCiE3ctqhBX81yLvzXd5PNQcWfUvrfOYOFYSEPjWEhtj+0rMM+16I3PcukjwBzLttzUGSwuKIpr0ZFrqwJVrjUGoHQBUcDCsZA6xbGQ2h7bVYDaHbjp/qDfgBkTULrSKGDRmbsWVegmgLrv4FMB0RNf7537XR7zrFI0sHAspEEoElLbY30FqBMwIY7i+1/R0796OOlfWmXsWIoGFhNy16IKzVUHlP0Bbd5bXkdGBYuCIF0ihUNqe9yoADXBnRBbcCdka8f2MSsqWBTCXYsqVGsKQOnK54ClQ9pFfuqQzqKYSO0pRq4fd0JcP+6EbJ3YvkqKDhbFcdeiCiFMEaiNKy/9yRNt7Br5SUTqhwIjtVc9cq24E+JacSdka8L2VVYvjkXBpuhaDhQrv6HewOKnE20Ms3G3QOHVXqXIdeFOiOvCnZC9frZPSb2BRRFX3bUcKFa5Wr2CxU8s0tAsBFJ7rJFrwJ0Q14A7IXutbB+L+phnr2Ax4VVyLQeKFW2m3sHipxhpOiwOUnsMkfniToj54k7IXhfbXW9WoHewGGqsruVAsXrLKQlY/GQjTZEFQ2rnFpkb7oSYG+6E7DWw3VVfgSRgMfwYXOuTdxwJx7/7/63PQwETcqBYwXZKBhaLgzQ9XAGpPWQUUHfdfiQwR2BC5EPOa8xjJwOLIpVd68Ybhv3b09kCRbFGrqRg4QBINcMhlKeMDlT/1U4KFpdTdi0Wme0pxFg8hgJoAOfuDpGnGH9KYyQHi0VEKjKLrLyv6ED1Vdn6fpODxVRSuZYDRbWH0SBg4VhIlxzbtSxQJ04eCwfvf0vwuzxVO00cBCwurQ/XqgLqyWeOMZwrcQUGAwvHQrreLq7VP1CapcemFRgMLCbY1bUcKKqYpwYFC8dCKk1T13KgVLF846BgUZY2ruVAUbFxaHCwcCykclW5lgOl6ownDg4WpapzLQeK6oxTWYCFYyGVENfSWy96HcpfNlB1xhGzAItSlV1rAVCc4sq4AtmAhWMhBypjWlpMLRuwmDNvu/hdHpUYv7ICa/zl9CtQBRwsVcJj1Ao4WFHL6Z2pAg6WKuExagWigRV1Vt7Z6CvgYI1+CfO8AAcrz3UZ/awcrNEvYZ4X4GDluS6jn5WDNfolzPMCHKw81yXjWTWb2hsAAAD//0DhVxwAAAAGSURBVAMA8NLI/5AoLlwAAAAASUVORK5CYII=";function WS({className:n="",size:i=36}){return c.jsx("img",{src:FS,alt:"",width:i,height:i,className:`shrink-0 object-contain ${n}`,"aria-hidden":!0,draggable:!1})}const fu={unsupported:"not reported by provider",missing:"no data yet",expired:"expired",unparsable:"provider data unparsable",stale:"stale"},zx="5H",Bx="1W",PS=new Set(["claude_code","codex_local","muse_code"]),ej="billing_cycle",tj="1M",aj=new Set(Ut.options);function nj(n){return{fiveHour:n.find(i=>i.criticalRole==="five_hour")??null,weekly:n.find(i=>i.criticalRole==="weekly")??null}}function Fy(n,i,s){if(n.unavailableReason!==null)return n.unavailableReason;if(n.remainingPercent===null||n.source==="unavailable")return s??"missing";if(n.resetAt!==null){const u=Date.parse(n.resetAt);if(!Number.isFinite(u)||u<=i)return"expired"}if(n.freshUntil!==null){const u=Date.parse(n.freshUntil);if(!Number.isFinite(u)||u<=i)return"stale"}if(n.expiresAt!==null){const u=Date.parse(n.expiresAt);if(!Number.isFinite(u)||u<=i)return"expired"}if(n.observedAt){const u=Date.parse(n.observedAt);if(!Number.isFinite(u)||u>i+6e4)return"stale"}return s??"missing"}function qx(n,i,s,u,d=null){if(Ny(n,i)){const f=Math.round(n.remainingPercent??0),m=n.resetAt?`, resets ${new Date(n.resetAt).toLocaleString()}`:"",y=d?`, ${d}`:"";return`${u}: ${f}% available (${100-f}% used${y}${m})`}return`${u}: N/A (${fu[Fy(n,i,s)]})`}function Sd(n,i,s,u,d,f=null){if(Ny(n,s)){const y=n.remainingPercent??0;return{key:n.windowKey,label:d,kind:"known",remaining:Math.round(y),rawRemaining:y,detail:qx(n,s,i.unavailableReason,d,f),isCritical:u}}const m=Fy(n,s,i.unavailableReason);return{key:n.windowKey,label:d,kind:"unknown",reason:m,detail:qx(n,s,i.unavailableReason,d,f),isCritical:u}}function Hx(n,i){const s=i.unavailableReason??"missing";return{key:`missing:${n}`,label:n,kind:"unknown",reason:s,detail:`${n}: N/A (${fu[s]})`,isCritical:!0}}function lj(n,i,s){return Sd(n,i,s,!0,tj,"current billing cycle")}function ij(n,i=Date.now()){return n.runtimes.map(s=>{const u=wa(s.runtime),d=s.runtime;if(s.runtime==="cursor_local"){const f=s.windows.find(y=>y.windowKey===ej)??null;if(f===null)return{runtime:u,runtimeKey:d,windows:[],exhausted:!1,detail:`N/A (${fu[s.unavailableReason??"missing"]})`};const m=lj(f,s,i);return{runtime:u,runtimeKey:d,windows:[m],exhausted:m.kind==="known"&&m.rawRemaining===0,detail:m.detail}}if(PS.has(s.runtime)){const{fiveHour:f,weekly:m}=nj(s.windows),y=f!==null?Sd(f,s,i,!0,zx):Hx(zx,s),g=m!==null?Sd(m,s,i,!0,Bx):Hx(Bx,s),v=[y,g],b=v.some(U=>U.kind==="known"&&U.rawRemaining===0),N=v.map(U=>U.detail).join("; ");return{runtime:u,runtimeKey:d,windows:v,exhausted:b,detail:N}}return{runtime:u,runtimeKey:d,windows:[],exhausted:!1,detail:`N/A (${fu[s.unavailableReason??"missing"]})`}})}function $x(n){return n.exhausted?`${n.runtime} exhausted — a capacity window is at 0%: ${n.detail}`:`${n.runtime}: ${n.detail}`}function sj({state:n,nowMs:i}){if(n.status==="loading")return c.jsxs("span",{"data-testid":"topbar-capacity","data-status":"loading",title:"Agent capacity is loading",className:"inline-flex min-w-0 max-w-full flex-wrap items-center gap-x-2 gap-y-1 whitespace-nowrap text-xs text-white/40",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Capacity"}),c.jsx("span",{"aria-live":"polite",children:"loading…"})]});if(n.status==="unavailable")return c.jsxs("span",{"data-testid":"topbar-capacity","data-status":"unavailable",title:"Agent capacity is unavailable — the capacity read failed",className:"inline-flex min-w-0 max-w-full flex-wrap items-center gap-x-2 gap-y-1 whitespace-nowrap text-xs text-white/40",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Capacity"}),c.jsx("span",{children:"unavailable"})]});const s=ij(n.data,i),u=s.length===0||s.every(d=>!d.windows.some(f=>f.kind==="known"));return c.jsxs("span",{"data-testid":"topbar-capacity","data-status":u?"unknown":"ready",title:s.length===0?"Agent capacity: no runtime accounts reported":s.map($x).join(" · "),className:"inline-flex min-w-0 max-w-full flex-wrap items-center gap-x-3 gap-y-1 text-xs",children:[c.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Capacity"}),s.length===0?c.jsx("span",{className:"whitespace-nowrap text-white/35",children:"N/A"}):s.map(d=>{const f=d.windows.some(m=>m.kind==="known");return c.jsxs("span",{"data-testid":`topbar-capacity-${d.runtime}`,"data-known":f?"true":"false","data-exhausted":d.exhausted?"true":"false",title:$x(d),role:"group","aria-label":`${aj.has(d.runtimeKey)?d.runtime:"Unknown runtime"} capacity`,className:d.exhausted?"inline-flex items-center gap-1.5 whitespace-nowrap rounded border border-red-400/40 bg-red-500/10 px-1.5 py-0.5":"inline-flex items-center gap-1.5 whitespace-nowrap",children:[c.jsx(Zy,{runtime:d.runtimeKey,className:"h-4 w-4 shrink-0"}),d.windows.length===0?c.jsx("span",{className:"text-white/35",children:"N/A"}):c.jsx("span",{className:"inline-flex flex-col leading-tight",children:d.windows.map(m=>c.jsxs("span",{"data-window":m.label,"data-window-known":m.kind==="known"?"true":"false",className:"inline-flex items-center gap-1 whitespace-nowrap tabular-nums",children:[c.jsx("span",{className:"text-white/40",children:m.label}),m.kind==="known"?c.jsxs("span",{className:m.isCritical&&m.rawRemaining===0?"font-medium text-red-300":"font-medium text-white/75",children:[m.remaining,"%"]}):c.jsx("span",{className:"text-white/35",children:"N/A"})]},m.key))})]},d.runtime)})]})}const Vx=5e3;function id({isActive:n}){return`font-ui-display px-3 py-2 text-base rounded ${n?"bg-cyber-teal/20 text-cyber-teal":"text-white/60 hover:text-white"}`}function rj({agents:n,onHumanActionsChanged:i}){const{issueId:s}=ib();return s?c.jsx(XS,{issueId:s,agents:n,onHumanActionsChanged:i},s):c.jsx(ry,{to:"/issues",replace:!0})}function uj({openHumanActionCount:n,agentCount:i,agentIssueCount:s,capacity:u={status:"loading"}}){return c.jsxs("header",{className:"px-6 py-4 border-b border-white/10 flex flex-wrap gap-4 items-center justify-between glass-header shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-6",children:[c.jsxs(ja,{to:"/issues",className:"flex items-center gap-3 text-left rounded hover:opacity-90 transition-opacity focus-visible:outline focus-visible:outline-2 focus-visible:outline-cyber-teal/45","aria-label":"AgentDealer — go to Issues",title:"AgentDealer — go to Issues",children:[c.jsx(WS,{size:40}),c.jsxs("div",{children:[c.jsx("h1",{className:"font-mono text-xl font-bold sm:text-2xl",style:{background:"linear-gradient(to right, #C4B643, #D4C760)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:"AgentDealer"}),c.jsx("p",{className:"text-sm text-cyber-teal",children:"One issue, one durable coordination record"})]})]}),c.jsxs("nav",{className:"flex gap-1",children:[c.jsxs(Ir,{to:"/issues",className:id,children:["Issues",n>0&&c.jsxs("span",{className:"ml-1.5 inline-flex items-center gap-0.5 font-mono text-xs leading-none bg-red-500/20 text-red-300 px-1.5 py-0.5 rounded tabular-nums border border-red-400/30 align-middle",title:`${n} open human action${n===1?"":"s"}`,children:[c.jsx(ou,{className:"w-3 h-3 shrink-0"}),n]})]}),c.jsx(Ir,{to:"/reports/execution",className:id,children:"Reports"})]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 min-w-0",children:[c.jsx(sj,{state:u}),c.jsxs(Ir,{to:"/agents",className:({isActive:d})=>`${id({isActive:d})} inline-flex items-center gap-1.5 transition-colors`,"aria-label":"Agents",title:"Agents",children:[c.jsx(IS,{className:"w-6 h-6 shrink-0"}),c.jsx("span",{children:"Agents"}),i>0&&c.jsx("span",{className:"font-mono text-xs leading-none bg-white/10 text-white/55 px-1.5 py-0.5 rounded tabular-nums border border-white/10",title:`${i} configured agent${i===1?"":"s"}`,children:i}),s>0&&c.jsxs("span",{className:"inline-flex items-center gap-0.5 font-mono text-xs leading-none bg-red-500/20 text-red-300 px-1.5 py-0.5 rounded tabular-nums border border-red-400/30",title:`${s} need${s===1?"s":""} attention`,children:[c.jsx(ou,{className:"w-3 h-3 shrink-0"}),s]})]})]})]})}function cj(){const[n,i]=w.useState([]),[s,u]=w.useState(0),[d,f]=w.useState(!1),[m,y]=w.useState([]),[g,v]=w.useState({status:"loading"}),b=w.useCallback(()=>{Kw().then(({agents:C,issueCount:V})=>{i(C),u(V)}).catch(console.error),zy().then(C=>f(C.connected)).catch(()=>f(!1)),Uy().then(C=>v({status:"ready",data:C})).catch(()=>v({status:"unavailable"}))},[]),N=w.useCallback(()=>h2().then(y).catch(()=>{}),[]);w.useEffect(()=>{b();const C=setInterval(b,Vx);return()=>clearInterval(C)},[b]),w.useEffect(()=>{N();const C=setInterval(()=>void N(),Vx);return()=>clearInterval(C)},[N]);const U=m.length,K=n.length;return c.jsxs(c.Fragment,{children:[c.jsx(JS,{}),c.jsxs("div",{className:"relative z-10 min-h-screen flex flex-col",children:[c.jsx(uj,{openHumanActionCount:U,agentCount:K,agentIssueCount:s,capacity:g}),c.jsx("main",{className:"flex-1 flex overflow-hidden",children:c.jsxs(bb,{children:[c.jsx(bl,{path:"/",element:c.jsx(ry,{to:"/issues",replace:!0})}),c.jsx(bl,{path:"/issues",element:c.jsx(fS,{agents:n,humanActions:m,onHumanActionsChanged:N})}),c.jsx(bl,{path:"/issues/:issueId",element:c.jsx(rj,{agents:n,onHumanActionsChanged:N})}),c.jsx(bl,{path:"/agents",element:c.jsx($2,{agents:n,agentDeckOnline:d,onRefresh:b})}),c.jsx(bl,{path:"/reports/execution",element:c.jsx(jS,{})}),c.jsx(bl,{path:"*",element:c.jsx(KS,{})})]})})]})]})}function oj(){return typeof document>"u"?Promise.resolve():document.fonts.load('13px "Monaco"').then(()=>{}).catch(()=>{})}oj();g0.createRoot(document.getElementById("root")).render(c.jsx(w.StrictMode,{children:c.jsx(Gb,{children:c.jsx(cj,{})})}));