loki-mode 11.145.0 → 11.147.0

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 (78) hide show
  1. package/SKILL.md +2 -2
  2. package/VERSION +1 -1
  3. package/autonomy/lib/secret-scan.sh +7 -2
  4. package/autonomy/verify.sh +7 -2
  5. package/dashboard/__init__.py +1 -1
  6. package/docs/CLI-REFERENCE.md +1 -1
  7. package/docs/INSTALLATION.md +1 -1
  8. package/loki-ts/dist/loki.js +1899 -1846
  9. package/mcp/__init__.py +1 -1
  10. package/package.json +2 -2
  11. package/packages/control-plane/dist/ask-tools-server.js +10 -1
  12. package/packages/control-plane/dist/server.js +1072 -423
  13. package/packages/control-plane/src/server/routes/index.ts +2 -1
  14. package/packages/control-plane/src/server/routes/workspace.ts +126 -0
  15. package/packages/control-plane/src/server/runs.ts +8 -0
  16. package/packages/control-plane/ui/dist/assets/index-CWUisTer.css +1 -0
  17. package/packages/control-plane/ui/dist/assets/index-CwNcWbo3.js +151 -0
  18. package/packages/control-plane/ui/dist/index.html +2 -2
  19. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  20. package/web-app/dist/assets/{AdminPage-Dtrte_9h.js → AdminPage-BMvwexjQ.js} +1 -1
  21. package/web-app/dist/assets/{Avatar-BqDxz5Iw.js → Avatar-CfkC79c3.js} +1 -1
  22. package/web-app/dist/assets/{Badge-BGX45Lnh.js → Badge-CQqH4Hem.js} +1 -1
  23. package/web-app/dist/assets/{Button-DVr538c3.js → Button-4UdYP24d.js} +1 -1
  24. package/web-app/dist/assets/{CockpitPage-CIODjzWx.js → CockpitPage-C7LEbCrM.js} +1 -1
  25. package/web-app/dist/assets/{ComparePage-DSaexpQe.js → ComparePage-Ve1BS_x2.js} +1 -1
  26. package/web-app/dist/assets/{ErrorBoundary-CnkNmsIK.js → ErrorBoundary-Cl9od_1B.js} +1 -1
  27. package/web-app/dist/assets/{EvidenceReceiptPanel-BOYje705.js → EvidenceReceiptPanel-5eTo3MR7.js} +1 -1
  28. package/web-app/dist/assets/{GitHubIssuesPanel-D-obZbg0.js → GitHubIssuesPanel-ChxzVbJj.js} +1 -1
  29. package/web-app/dist/assets/{GitHubPRsPanel-BDP6UPrV.js → GitHubPRsPanel-DMyctO75.js} +1 -1
  30. package/web-app/dist/assets/{HomePage-CyuUJmkD.js → HomePage-XkiUsK0I.js} +2 -2
  31. package/web-app/dist/assets/{LoginPage-CwzpHE77.js → LoginPage-Do4AESUj.js} +1 -1
  32. package/web-app/dist/assets/{MagicPage-B-2U-xDs.js → MagicPage-tQT4NhvK.js} +1 -1
  33. package/web-app/dist/assets/{MetricsPage-cNfnAqIP.js → MetricsPage-BRpQ5j9b.js} +1 -1
  34. package/web-app/dist/assets/{NotFoundPage-Bnja4u7t.js → NotFoundPage-CClAf7lp.js} +1 -1
  35. package/web-app/dist/assets/{ProjectPage-DxKwokda.js → ProjectPage-Bm_5mzNw.js} +3 -3
  36. package/web-app/dist/assets/{ProjectsPage-D0HElwG2.js → ProjectsPage-BEqNV5uq.js} +1 -1
  37. package/web-app/dist/assets/{SettingsPage-cKZTmoDV.js → SettingsPage-B-3niEp-.js} +1 -1
  38. package/web-app/dist/assets/{ShowcasePage-COCzMSj2.js → ShowcasePage-Bgmf8L36.js} +1 -1
  39. package/web-app/dist/assets/{SystemSettingsPage-DpEdU35g.js → SystemSettingsPage-B2r4ns1l.js} +1 -1
  40. package/web-app/dist/assets/{TeamsPage-CRa-oR3c.js → TeamsPage-CFnggeui.js} +1 -1
  41. package/web-app/dist/assets/{TemplatesPage-CqVQ2RrJ.js → TemplatesPage-A_4uAZY6.js} +1 -1
  42. package/web-app/dist/assets/{TerminalOutput-77EBpy6w.js → TerminalOutput-BoEdnm-M.js} +1 -1
  43. package/web-app/dist/assets/{activity-CwYJMGXJ.js → activity-BOSpWO2W.js} +1 -1
  44. package/web-app/dist/assets/{bell-D7tpnhHd.js → bell-IyUIduRQ.js} +1 -1
  45. package/web-app/dist/assets/{bot-BGEMExhD.js → bot-BM1VS3XN.js} +1 -1
  46. package/web-app/dist/assets/{check-DXYfUB9x.js → check-DaoAoVE6.js} +1 -1
  47. package/web-app/dist/assets/{chevron-left-fmjoQGhm.js → chevron-left-D5iMrc40.js} +1 -1
  48. package/web-app/dist/assets/{circle-alert-Bg5XeK2P.js → circle-alert-DR3HNYeA.js} +1 -1
  49. package/web-app/dist/assets/{clock-CsKyZSPS.js → clock-DOc4LATU.js} +1 -1
  50. package/web-app/dist/assets/{cloud-Bd60jog4.js → cloud-Dks7qs40.js} +1 -1
  51. package/web-app/dist/assets/{code-xml-Ctl0DdWZ.js → code-xml-CMdkWBY9.js} +1 -1
  52. package/web-app/dist/assets/{database-ziASlG1B.js → database-CFaZAV5h.js} +1 -1
  53. package/web-app/dist/assets/{dollar-sign-Bo2f3aLO.js → dollar-sign-3r252MtY.js} +1 -1
  54. package/web-app/dist/assets/{file-code-corner-BZCY8u6u.js → file-code-corner-BdfoBM6Q.js} +1 -1
  55. package/web-app/dist/assets/{file-plus-DZX_AwtZ.js → file-plus-DWgk1WFy.js} +1 -1
  56. package/web-app/dist/assets/{globe-BqP4Lntz.js → globe-CQs1OPNS.js} +1 -1
  57. package/web-app/dist/assets/{hammer-KMjpooTk.js → hammer-BvKxwbdj.js} +1 -1
  58. package/web-app/dist/assets/{index-B_8pnUwl.js → index-DymFh2L1.js} +3 -3
  59. package/web-app/dist/assets/{layers-Bdkz5DFw.js → layers-lcbVWAxC.js} +1 -1
  60. package/web-app/dist/assets/{loader-circle-BV_0L7bg.js → loader-circle-VSOQj5_P.js} +1 -1
  61. package/web-app/dist/assets/{lock-DhK1z1dB.js → lock-c6R6zJnw.js} +1 -1
  62. package/web-app/dist/assets/{package-De8MCdUa.js → package-DELuK13T.js} +1 -1
  63. package/web-app/dist/assets/{plus-BQbDrNgm.js → plus-d2vcE9IO.js} +1 -1
  64. package/web-app/dist/assets/{refresh-cw-BQ2ezlqR.js → refresh-cw-BzJ6JHvZ.js} +1 -1
  65. package/web-app/dist/assets/{rotate-ccw-EuVYh2XK.js → rotate-ccw-CYKipckB.js} +1 -1
  66. package/web-app/dist/assets/{scroll-text-BcrL2UnM.js → scroll-text-DDzufCS2.js} +1 -1
  67. package/web-app/dist/assets/{server-dpdGPXDc.js → server-BPIwN9NB.js} +1 -1
  68. package/web-app/dist/assets/{shield-alert-B2AnkpV_.js → shield-alert-PoaTr3PN.js} +1 -1
  69. package/web-app/dist/assets/{thumbs-up-Zock-j5_.js → thumbs-up-Bb7o5Vke.js} +1 -1
  70. package/web-app/dist/assets/{trash-2-B9zGFCn0.js → trash-2-BT9DxpYE.js} +1 -1
  71. package/web-app/dist/assets/{trending-down-DWQW56VW.js → trending-down-BG2q1nVM.js} +1 -1
  72. package/web-app/dist/assets/{trending-up--6mzkyyP.js → trending-up-DI1UcsKN.js} +1 -1
  73. package/web-app/dist/assets/{upload-CNxdXaU0.js → upload-ZC7osdna.js} +1 -1
  74. package/web-app/dist/assets/{usePolling-CVHCrC_t.js → usePolling-T5CvoNTb.js} +1 -1
  75. package/web-app/dist/assets/{user-CuL3zj1a.js → user-BBesY7Dg.js} +1 -1
  76. package/web-app/dist/index.html +1 -1
  77. package/packages/control-plane/ui/dist/assets/index-DeSVrWgd.css +0 -1
  78. package/packages/control-plane/ui/dist/assets/index-Dy80VLtj.js +0 -190
@@ -1,190 +0,0 @@
1
- (function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const h of d)if(h.type==="childList")for(const p of h.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&c(p)}).observe(document,{childList:!0,subtree:!0});function o(d){const h={};return d.integrity&&(h.integrity=d.integrity),d.referrerPolicy&&(h.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?h.credentials="include":d.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function c(d){if(d.ep)return;d.ep=!0;const h=o(d);fetch(d.href,h)}})();var Wo={exports:{}},Wi={};/**
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 o0;function n1(){if(o0)return Wi;o0=1;var i=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(c,d,h){var p=null;if(h!==void 0&&(p=""+h),d.key!==void 0&&(p=""+d.key),"key"in d){h={};for(var g in d)g!=="key"&&(h[g]=d[g])}else h=d;return d=h.ref,{$$typeof:i,type:c,key:p,ref:d!==void 0?d:null,props:h}}return Wi.Fragment=r,Wi.jsx=o,Wi.jsxs=o,Wi}var f0;function a1(){return f0||(f0=1,Wo.exports=n1()),Wo.exports}var u=a1(),Po={exports:{}},Pi={},tf={exports:{}},ef={};/**
10
- * @license React
11
- * scheduler.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 d0;function i1(){return d0||(d0=1,(function(i){function r(V,nt){var Z=V.length;V.push(nt);t:for(;0<Z;){var At=Z-1>>>1,_t=V[At];if(0<d(_t,nt))V[At]=nt,V[Z]=_t,Z=At;else break t}}function o(V){return V.length===0?null:V[0]}function c(V){if(V.length===0)return null;var nt=V[0],Z=V.pop();if(Z!==nt){V[0]=Z;t:for(var At=0,_t=V.length,tl=_t>>>1;At<tl;){var Sl=2*(At+1)-1,En=V[Sl],S=Sl+1,U=V[S];if(0>d(En,Z))S<_t&&0>d(U,En)?(V[At]=U,V[S]=Z,At=S):(V[At]=En,V[Sl]=Z,At=Sl);else if(S<_t&&0>d(U,Z))V[At]=U,V[S]=Z,At=S;else break t}}return nt}function d(V,nt){var Z=V.sortIndex-nt.sortIndex;return Z!==0?Z:V.id-nt.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;i.unstable_now=function(){return h.now()}}else{var p=Date,g=p.now();i.unstable_now=function(){return p.now()-g}}var b=[],v=[],R=1,y=null,A=3,B=!1,G=!1,lt=!1,H=!1,$=typeof setTimeout=="function"?setTimeout:null,tt=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function L(V){for(var nt=o(v);nt!==null;){if(nt.callback===null)c(v);else if(nt.startTime<=V)c(v),nt.sortIndex=nt.expirationTime,r(b,nt);else break;nt=o(v)}}function Q(V){if(lt=!1,L(V),!G)if(o(b)!==null)G=!0,ct||(ct=!0,q());else{var nt=o(v);nt!==null&&It(Q,nt.startTime-V)}}var ct=!1,I=-1,et=5,Vt=-1;function Dt(){return H?!0:!(i.unstable_now()-Vt<et)}function Ht(){if(H=!1,ct){var V=i.unstable_now();Vt=V;var nt=!0;try{t:{G=!1,lt&&(lt=!1,tt(I),I=-1),B=!0;var Z=A;try{e:{for(L(V),y=o(b);y!==null&&!(y.expirationTime>V&&Dt());){var At=y.callback;if(typeof At=="function"){y.callback=null,A=y.priorityLevel;var _t=At(y.expirationTime<=V);if(V=i.unstable_now(),typeof _t=="function"){y.callback=_t,L(V),nt=!0;break e}y===o(b)&&c(b),L(V)}else c(b);y=o(b)}if(y!==null)nt=!0;else{var tl=o(v);tl!==null&&It(Q,tl.startTime-V),nt=!1}}break t}finally{y=null,A=Z,B=!1}nt=void 0}}finally{nt?q():ct=!1}}}var q;if(typeof M=="function")q=function(){M(Ht)};else if(typeof MessageChannel<"u"){var Nt=new MessageChannel,Xt=Nt.port2;Nt.port1.onmessage=Ht,q=function(){Xt.postMessage(null)}}else q=function(){$(Ht,0)};function It(V,nt){I=$(function(){V(i.unstable_now())},nt)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(V){V.callback=null},i.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):et=0<V?Math.floor(1e3/V):5},i.unstable_getCurrentPriorityLevel=function(){return A},i.unstable_next=function(V){switch(A){case 1:case 2:case 3:var nt=3;break;default:nt=A}var Z=A;A=nt;try{return V()}finally{A=Z}},i.unstable_requestPaint=function(){H=!0},i.unstable_runWithPriority=function(V,nt){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var Z=A;A=V;try{return nt()}finally{A=Z}},i.unstable_scheduleCallback=function(V,nt,Z){var At=i.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?At+Z:At):Z=At,V){case 1:var _t=-1;break;case 2:_t=250;break;case 5:_t=1073741823;break;case 4:_t=1e4;break;default:_t=5e3}return _t=Z+_t,V={id:R++,callback:nt,priorityLevel:V,startTime:Z,expirationTime:_t,sortIndex:-1},Z>At?(V.sortIndex=Z,r(v,V),o(b)===null&&V===o(v)&&(lt?(tt(I),I=-1):lt=!0,It(Q,Z-At))):(V.sortIndex=_t,r(b,V),G||B||(G=!0,ct||(ct=!0,q()))),V},i.unstable_shouldYield=Dt,i.unstable_wrapCallback=function(V){var nt=A;return function(){var Z=A;A=nt;try{return V.apply(this,arguments)}finally{A=Z}}}})(ef)),ef}var h0;function s1(){return h0||(h0=1,tf.exports=i1()),tf.exports}var lf={exports:{}},st={};/**
18
- * @license React
19
- * react.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 m0;function u1(){if(m0)return st;m0=1;var i=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),p=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),A=Symbol.for("react.view_transition"),B=Symbol.iterator;function G(S){return S===null||typeof S!="object"?null:(S=B&&S[B]||S["@@iterator"],typeof S=="function"?S:null)}var lt={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,$={};function tt(S,U,W){this.props=S,this.context=U,this.refs=$,this.updater=W||lt}tt.prototype.isReactComponent={},tt.prototype.setState=function(S,U){if(typeof S!="object"&&typeof S!="function"&&S!=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,S,U,"setState")},tt.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function M(){}M.prototype=tt.prototype;function L(S,U,W){this.props=S,this.context=U,this.refs=$,this.updater=W||lt}var Q=L.prototype=new M;Q.constructor=L,H(Q,tt.prototype),Q.isPureReactComponent=!0;var ct=Array.isArray;function I(){}var et={H:null,A:null,T:null,S:null},Vt=Object.prototype.hasOwnProperty;function Dt(S,U,W){var P=W.ref;return{$$typeof:i,type:S,key:U,ref:P!==void 0?P:null,props:W}}function Ht(S,U){return Dt(S.type,U,S.props)}function q(S){return typeof S=="object"&&S!==null&&S.$$typeof===i}function Nt(S){var U={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(W){return U[W]})}var Xt=/\/+/g;function It(S,U){return typeof S=="object"&&S!==null&&S.key!=null?Nt(""+S.key):U.toString(36)}function V(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(I,I):(S.status="pending",S.then(function(U){S.status==="pending"&&(S.status="fulfilled",S.value=U)},function(U){S.status==="pending"&&(S.status="rejected",S.reason=U)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function nt(S,U,W,P,vt){var yt=typeof S;(yt==="undefined"||yt==="boolean")&&(S=null);var bt=!1;if(S===null)bt=!0;else switch(yt){case"bigint":case"string":case"number":bt=!0;break;case"object":switch(S.$$typeof){case i:case r:bt=!0;break;case R:return bt=S._init,nt(bt(S._payload),U,W,P,vt)}}if(bt)return vt=vt(S),bt=P===""?"."+It(S,0):P,ct(vt)?(W="",bt!=null&&(W=bt.replace(Xt,"$&/")+"/"),nt(vt,U,W,"",function(_l){return _l})):vt!=null&&(q(vt)&&(vt=Ht(vt,W+(vt.key==null||S&&S.key===vt.key?"":(""+vt.key).replace(Xt,"$&/")+"/")+bt)),U.push(vt)),1;bt=0;var J=P===""?".":P+":";if(ct(S))for(var it=0;it<S.length;it++)P=S[it],yt=J+It(P,it),bt+=nt(P,U,W,yt,vt);else if(it=G(S),typeof it=="function")for(S=it.call(S),it=0;!(P=S.next()).done;)P=P.value,yt=J+It(P,it++),bt+=nt(P,U,W,yt,vt);else if(yt==="object"){if(typeof S.then=="function")return nt(V(S),U,W,P,vt);throw U=String(S),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return bt}function Z(S,U,W){if(S==null)return S;var P=[],vt=0;return nt(S,P,"","",function(yt){return U.call(W,yt,vt++)}),P}function At(S){if(S._status===-1){var U=S._result,W=U();W.then(function(P){(S._status===0||S._status===-1)&&(S._status=1,S._result=P,W.status===void 0&&(W.status="fulfilled",W.value=P))},function(P){(S._status===0||S._status===-1)&&(S._status=2,S._result=P,W.status===void 0&&(W.status="rejected",W.reason=P))}),S._status===-1&&(S._status=0,S._result=W)}if(S._status===1)return S._result.default;throw S._result}var _t=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)};function tl(S){var U=et.T,W={};W.types=U!==null?U.types:null,et.T=W;try{var P=S(),vt=et.S;vt!==null&&vt(W,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(I,_t)}catch(yt){_t(yt)}finally{U!==null&&W.types!==null&&(U.types=W.types),et.T=U}}function Sl(S){var U=et.T;if(U!==null){var W=U.types;W===null?U.types=[S]:W.indexOf(S)===-1&&W.push(S)}else tl(Sl.bind(null,S))}var En={map:Z,forEach:function(S,U,W){Z(S,function(){U.apply(this,arguments)},W)},count:function(S){var U=0;return Z(S,function(){U++}),U},toArray:function(S){return Z(S,function(U){return U})||[]},only:function(S){if(!q(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return st.Activity=y,st.Children=En,st.Component=tt,st.Fragment=o,st.Profiler=d,st.PureComponent=L,st.StrictMode=c,st.Suspense=b,st.ViewTransition=A,st.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=et,st.__COMPILER_RUNTIME={__proto__:null,c:function(S){return et.H.useMemoCache(S)}},st.addTransitionType=Sl,st.cache=function(S){return function(){return S.apply(null,arguments)}},st.cacheSignal=function(){return null},st.cloneElement=function(S,U,W){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var P=H({},S.props),vt=S.key;if(U!=null)for(yt in U.key!==void 0&&(vt=""+U.key),U)!Vt.call(U,yt)||yt==="key"||yt==="__self"||yt==="__source"||yt==="ref"&&U.ref===void 0||(P[yt]=U[yt]);var yt=arguments.length-2;if(yt===1)P.children=W;else if(1<yt){for(var bt=Array(yt),J=0;J<yt;J++)bt[J]=arguments[J+2];P.children=bt}return Dt(S.type,vt,P)},st.createContext=function(S){return S={$$typeof:p,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:h,_context:S},S},st.createElement=function(S,U,W){var P,vt={},yt=null;if(U!=null)for(P in U.key!==void 0&&(yt=""+U.key),U)Vt.call(U,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(vt[P]=U[P]);var bt=arguments.length-2;if(bt===1)vt.children=W;else if(1<bt){for(var J=Array(bt),it=0;it<bt;it++)J[it]=arguments[it+2];vt.children=J}if(S&&S.defaultProps)for(P in bt=S.defaultProps,bt)vt[P]===void 0&&(vt[P]=bt[P]);return Dt(S,yt,vt)},st.createRef=function(){return{current:null}},st.forwardRef=function(S){return{$$typeof:g,render:S}},st.isValidElement=q,st.lazy=function(S){return{$$typeof:R,_payload:{_status:-1,_result:S},_init:At}},st.memo=function(S,U){return{$$typeof:v,type:S,compare:U===void 0?null:U}},st.startTransition=tl,st.unstable_useCacheRefresh=function(){return et.H.useCacheRefresh()},st.use=function(S){return et.H.use(S)},st.useActionState=function(S,U,W){return et.H.useActionState(S,U,W)},st.useCallback=function(S,U){return et.H.useCallback(S,U)},st.useContext=function(S){return et.H.useContext(S)},st.useDebugValue=function(){},st.useDeferredValue=function(S,U){return et.H.useDeferredValue(S,U)},st.useEffect=function(S,U){return et.H.useEffect(S,U)},st.useEffectEvent=function(S){return et.H.useEffectEvent(S)},st.useId=function(){return et.H.useId()},st.useImperativeHandle=function(S,U,W){return et.H.useImperativeHandle(S,U,W)},st.useInsertionEffect=function(S,U){return et.H.useInsertionEffect(S,U)},st.useLayoutEffect=function(S,U){return et.H.useLayoutEffect(S,U)},st.useMemo=function(S,U){return et.H.useMemo(S,U)},st.useOptimistic=function(S,U){return et.H.useOptimistic(S,U)},st.useReducer=function(S,U,W){return et.H.useReducer(S,U,W)},st.useRef=function(S){return et.H.useRef(S)},st.useState=function(S){return et.H.useState(S)},st.useSyncExternalStore=function(S,U,W){return et.H.useSyncExternalStore(S,U,W)},st.useTransition=function(){return et.H.useTransition()},st.version="19.3.0",st}var p0;function Nf(){return p0||(p0=1,lf.exports=u1()),lf.exports}var nf={exports:{}},me={};/**
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 g0;function r1(){if(g0)return me;g0=1;var i=Nf();function r(R){var y="https://react.dev/errors/"+R;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var A=2;A<arguments.length;A++)y+="&args[]="+encodeURIComponent(arguments[A])}return"Minified React error #"+R+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var c={d:{f:o,r:function(){throw Error(r(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},d=Symbol.for("react.portal"),h=Symbol.for("react.recoverable"),p=Symbol.for("react.optimistic_key");function g(R,y,A){var B=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:B==null?null:B===p?p:""+B,children:R,containerInfo:y,implementation:A}}var b=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(R,y){if(R==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return me.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,me.browser=function(R){return{$$typeof:h,_reason:R}},me.createPortal=function(R,y){var A=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(r(299));return g(R,y,null,A)},me.flushSync=function(R){var y=b.T,A=c.p;try{if(b.T=null,c.p=2,R)return R()}finally{b.T=y,c.p=A,c.d.f()}},me.preconnect=function(R,y){typeof R=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,c.d.C(R,y))},me.prefetchDNS=function(R){typeof R=="string"&&c.d.D(R)},me.preinit=function(R,y){if(typeof R=="string"&&y&&typeof y.as=="string"){var A=y.as,B=v(A,y.crossOrigin),G=typeof y.integrity=="string"?y.integrity:void 0,lt=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;A==="style"?c.d.S(R,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:B,integrity:G,fetchPriority:lt}):A==="script"&&c.d.X(R,{crossOrigin:B,integrity:G,fetchPriority:lt,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},me.preinitModule=function(R,y){if(typeof R=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var A=v(y.as,y.crossOrigin);c.d.M(R,{crossOrigin:A,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0})}}else y==null&&c.d.M(R)},me.preload=function(R,y){if(typeof R=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var A=y.as,B=v(A,y.crossOrigin);c.d.L(R,A,{crossOrigin:B,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},me.preloadModule=function(R,y){if(typeof R=="string")if(y){var A=v(y.as,y.crossOrigin);c.d.m(R,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:A,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0})}else c.d.m(R)},me.requestFormReset=function(R){c.d.r(R)},me.unstable_batchedUpdates=function(R,y){return R(y)},me.useFormState=function(R,y,A){return b.H.useFormState(R,y,A)},me.useFormStatus=function(){return b.H.useHostTransitionStatus()},me.version="19.3.0",me}var v0;function c1(){if(v0)return nf.exports;v0=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(r){console.error(r)}}return i(),nf.exports=r1(),nf.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 y0;function o1(){if(y0)return Pi;y0=1;var i=s1(),r=Nf(),o=c1();function c(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)e+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function h(t){for(var e=t,l=e;l&&!l.alternate;)e=l,(e.flags&4098)!==0&&(t=e.return),l=e.return;for(;e.return;)e=e.return;return e.tag===3?t:null}function p(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function g(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function b(t){if(h(t)!==t)throw Error(c(188))}function v(t){var e=t.alternate;if(!e){if(e=h(t),e===null)throw Error(c(188));return e!==t?null:t}for(var l=t,n=e;;){var a=l.return;if(a===null)break;var s=a.alternate;if(s===null){if(n=a.return,n!==null){l=n;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===l)return b(a),t;if(s===n)return b(a),e;s=s.sibling}throw Error(c(188))}if(l.return!==n.return)l=a,n=s;else{for(var f=!1,m=a.child;m;){if(m===l){f=!0,l=a,n=s;break}if(m===n){f=!0,n=a,l=s;break}m=m.sibling}if(!f){for(m=s.child;m;){if(m===l){f=!0,l=s,n=a;break}if(m===n){f=!0,n=s,l=a;break}m=m.sibling}if(!f)throw Error(c(189))}}if(l.alternate!==n)throw Error(c(190))}if(l.tag!==3)throw Error(c(188));return l.stateNode.current===l?t:e}function R(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=R(t),e!==null)return e;t=t.sibling}return null}function y(t,e,l,n,a,s){for(;t!==null;){if((t.tag===5||t.tag===27||t.tag===6)&&l(t,n,a,s)||(t.tag!==22||t.memoizedState===null)&&(e||t.tag!==5&&t.tag!==27)&&y(t.child,e,l,n,a,s))return!0;t=t.sibling}return!1}function A(t){for(t=t.return;t!==null;){if(t.tag===3||t.tag===5||t.tag===27)return t;t=t.return}return null}function B(t){var e=!1;for(t=t.return;t!==null&&(t.tag===4&&(e=!0),!(t.tag===3||t.tag===5||t.tag===27));)t=t.return;return e}function G(t){var e=[null,null],l=A(t);return l===null||lt(e,t,l.child,{foundSelf:!1}),e}function lt(t,e,l,n){for(;l!==null;){if(l===e)n.foundSelf=!0;else if(l.tag===5||l.tag===27||l.tag===6){if(n.foundSelf)return t[1]=l,!0;t[0]=l}else if((l.tag!==22||l.memoizedState===null)&&lt(t,e,l.child,n))return!0;l=l.sibling}return!1}function H(t){switch(t.tag){case 5:case 27:case 6:return t.stateNode;case 3:return t.stateNode.containerInfo;default:throw Error(c(559))}}var $=null,tt=null;function M(t,e,l){return t===l?!0:t===e?($=t,!0):!1}function L(t,e,l){return t===l?(tt=t,!1):t===e?(tt!==null&&($=t),!0):!1}function Q(t){if(t===null)return null;do t=t===null?null:t.return;while(t&&t.tag!==5&&t.tag!==27&&t.tag!==3);return t||null}function ct(t,e,l){for(var n=0,a=t;a;a=l(a))n++;a=0;for(var s=e;s;s=l(s))a++;for(;0<n-a;)t=l(t),n--;for(;0<a-n;)e=l(e),a--;for(;n--;){if(t===e||e!==null&&t===e.alternate)return t;t=l(t),e=l(e)}return null}var I=Object.assign,et=Symbol.for("react.element"),Vt=Symbol.for("react.transitional.element"),Dt=Symbol.for("react.portal"),Ht=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),Nt=Symbol.for("react.profiler"),Xt=Symbol.for("react.consumer"),It=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),nt=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),At=Symbol.for("react.memo"),_t=Symbol.for("react.lazy"),tl=Symbol.for("react.activity"),Sl=Symbol.for("react.legacy_hidden"),En=Symbol.for("react.memo_cache_sentinel"),S=Symbol.for("react.view_transition"),U=Symbol.for("react.recoverable"),W=Symbol.iterator;function P(t){return t===null||typeof t!="object"?null:(t=W&&t[W]||t["@@iterator"],typeof t=="function"?t:null)}var vt=Symbol.for("react.client.reference");function yt(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===vt?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Ht:return"Fragment";case Nt:return"Profiler";case q:return"StrictMode";case nt:return"Suspense";case Z:return"SuspenseList";case tl:return"Activity";case S:return"ViewTransition"}if(typeof t=="object")switch(t.$$typeof){case Dt:return"Portal";case It:return t.displayName||"Context";case Xt:return(t._context.displayName||"Context")+".Consumer";case V:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case At:return e=t.displayName||null,e!==null?e:yt(t.type)||"Memo";case _t:e=t._payload,t=t._init;try{return yt(t(e))}catch{}}return null}var bt=Array.isArray,J=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,it=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_l={pending:!1,data:null,method:null,action:null},gr=[],ea=-1;function rl(t){return{current:t}}function ue(t){0>ea||(t.current=gr[ea],gr[ea]=null,ea--)}function Mt(t,e){ea++,gr[ea]=t.current,t.current=e}var cl=rl(null),ai=rl(null),$l=rl(null),ps=rl(null);function gs(t,e){switch(Mt($l,e),Mt(ai,t),Mt(cl,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?xp(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=xp(e),t=bp(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}ue(cl),Mt(cl,t)}function la(){ue(cl),ue(ai),ue($l)}function vr(t){var e=t.memoizedState;e!==null&&(Va._currentValue=e.memoizedState,Mt(ps,t)),e=cl.current;var l=bp(e,t.type);e!==l&&(Mt(ai,t),Mt(cl,l))}function vs(t){ai.current===t&&(ue(cl),ue(ai)),ps.current===t&&(ue(ps),Va._currentValue=_l)}var yr,qf;function Yl(t){if(yr===void 0)try{throw Error()}catch(l){var e=l.stack.trim().match(/\n( *(at )?)/);yr=e&&e[1]||"",qf=-1<l.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+yr+t+qf}var xr=!1;function br(t,e){if(!t||xr)return"";xr=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(e){var D=function(){throw Error()};if(Object.defineProperty(D.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(D,[])}catch(Y){var _=Y}Reflect.construct(t,[],D)}else{try{D.call()}catch(Y){_=Y}D=!1;try{var O=Object.getOwnPropertyDescriptor(t.prototype,"props");Object.defineProperty(t.prototype,"props",{configurable:!0,set:function(){throw Error()}}),D=!0,new t}finally{D&&(O!==void 0?Object.defineProperty(t.prototype,"props",O):delete t.prototype.props)}}}else{try{throw Error()}catch(Y){_=Y}(D=t())&&typeof D.catch=="function"&&D.catch(function(){})}}catch(Y){if(Y&&_&&typeof Y.stack=="string")return[Y.stack,_.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=n.DetermineComponentFrameRoot(),f=s[0],m=s[1];if(f&&m){var x=f.split(`
44
- `),T=m.split(`
45
- `);for(a=n=0;n<x.length&&!x[n].includes("DetermineComponentFrameRoot");)n++;for(;a<T.length&&!T[a].includes("DetermineComponentFrameRoot");)a++;if(n===x.length||a===T.length)for(n=x.length-1,a=T.length-1;1<=n&&0<=a&&x[n]!==T[a];)a--;for(;1<=n&&0<=a;n--,a--)if(x[n]!==T[a]){if(n!==1||a!==1)do if(n--,a--,0>a||x[n]!==T[a]){var C=`
46
- `+x[n].replace(" at new "," at ");return t.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",t.displayName)),C}while(1<=n&&0<=a);break}}}finally{xr=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?Yl(l):""}function uv(t,e){switch(t.tag){case 26:case 27:case 5:return Yl(t.type);case 16:return Yl("Lazy");case 13:return t.child!==e&&e!==null?Yl("Suspense Fallback"):Yl("Suspense");case 19:return Yl("SuspenseList");case 0:case 15:return br(t.type,!1);case 11:return br(t.type.render,!1);case 1:return br(t.type,!0);case 31:return Yl("Activity");case 30:return Yl("ViewTransition");default:return""}}function $f(t){try{var e="",l=null;do e+=uv(t,l),l=t,t=t.return;while(t);return e}catch(n){return`
47
- Error generating stack: `+n.message+`
48
- `+n.stack}}var jr=Object.prototype.hasOwnProperty,Sr=i.unstable_scheduleCallback,_r=i.unstable_cancelCallback,rv=i.unstable_shouldYield,cv=i.unstable_requestPaint,De=i.unstable_now,ov=i.unstable_getCurrentPriorityLevel,Yf=i.unstable_ImmediatePriority,Vf=i.unstable_UserBlockingPriority,ys=i.unstable_NormalPriority,fv=i.unstable_LowPriority,Gf=i.unstable_IdlePriority,dv=i.log,hv=i.unstable_setDisableYieldValue,ii=null,Me=null;function Vl(t){if(typeof dv=="function"&&hv(t),Me&&typeof Me.setStrictMode=="function")try{Me.setStrictMode(ii,t)}catch{}}var ke=Math.clz32?Math.clz32:gv,mv=Math.log,pv=Math.LN2;function gv(t){return t>>>=0,t===0?32:31-(mv(t)/pv|0)|0}var xs=256,bs=262144,js=4194304;function Tn(t){var e=t&42;if(e!==0)return e;switch(t&-t){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 t&-t;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ss(t,e,l){var n=t.pendingLanes;if(n===0)return 0;var a=0,s=t.suspendedLanes,f=t.pingedLanes;t=t.warmLanes;var m=n&134217727;return m!==0?(n=m&~s,n!==0?a=Tn(n):(f&=m,f!==0?a=Tn(f):l||(l=m&~t,l!==0&&(a=Tn(l))))):(m=n&~s,m!==0?a=Tn(m):f!==0?a=Tn(f):l||(l=n&~t,l!==0&&(a=Tn(l)))),a===0?0:e!==0&&e!==a&&(e&s)===0&&(s=a&-a,l=e&-e,s>=l||s===32&&(l&4194048)!==0)?e:a}function si(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Qf(t,e){(e&8)!==0&&(e|=e&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=e;0<l;){var n=31-ke(l),a=1<<n;e|=t[n],l&=~a}return e}function vv(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 Xf(){var t=js;return js<<=1,(js&62914560)===0&&(js=4194304),t}function Er(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function ui(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function yv(t,e,l,n,a,s){var f=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var m=t.entanglements,x=t.expirationTimes,T=t.hiddenUpdates;for(l=f&~l;0<l;){var C=31-ke(l),D=1<<C;m[C]=0,x[C]=-1;var _=T[C];if(_!==null)for(T[C]=null,C=0;C<_.length;C++){var O=_[C];O!==null&&(O.lane&=-536870913)}l&=~D}n!==0&&Zf(t,n,0),s!==0&&a===0&&t.tag!==0&&(t.suspendedLanes|=s&~(f&~e))}function Zf(t,e,l){t.pendingLanes|=e,t.suspendedLanes&=~e;var n=31-ke(e);t.entangledLanes|=e,t.entanglements[n]=t.entanglements[n]|1073741824|l&261930}function Kf(t,e){var l=t.entangledLanes|=e;for(t=t.entanglements;l;){var n=31-ke(l),a=1<<n;a&e|t[n]&e&&(t[n]|=e),l&=~a}}function Jf(t,e){var l=e&-e;return l=(l&42)!==0?1:Tr(l),(l&(t.suspendedLanes|e))!==0?0:l}function Tr(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Nr(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function If(){var t=it.p;return t!==0?t:(t=window.event,t===void 0?32:n0(t.type))}function Ff(t,e){var l=it.p;try{return it.p=t,e()}finally{it.p=l}}var El=Math.random().toString(36).slice(2),re="__reactFiber$"+El,Ee="__reactProps$"+El,na="__reactContainer$"+El,Wf="__reactEvents$"+El,xv="__reactListeners$"+El,bv="__reactHandles$"+El,Pf="__reactResources$"+El,ri="__reactMarker$"+El,_s="__reactLoad$"+El;function Es(t){delete t[re],delete t[Ee],delete t[xv],delete t[bv]}function Nn(t){var e;if(e=t[re])return e;for(var l=t.parentNode;l;){if(e=l[na]||l[re]){if(l=e.alternate,e.child!==null||l!==null&&l.child!==null)for(t=Hp(t);t!==null;){if(l=t[re])return l;t=Hp(t)}return e}t=l,l=t.parentNode}return null}function aa(t){if(t=t[re]||t[na]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function ci(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(c(33))}function ia(t){var e=t[Pf];return e||(e=t[Pf]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function ne(t){t[ri]=!0}function td(t){t[_s]=void 0}var ed=new Set,ld={};function Rn(t,e){sa(t,e),sa(t+"Capture",e)}function sa(t,e){for(ld[t]=e,t=0;t<e.length;t++)ed.add(e[t])}var jv=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]*$"),nd={},ad={};function Sv(t){return jr.call(ad,t)?!0:jr.call(nd,t)?!1:jv.test(t)?ad[t]=!0:(nd[t]=!0,!1)}var xt=!1;function id(){var t=xt;return xt=!1,t}function Ts(t,e,l){if(Sv(e))if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var n=e.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,l)}}function Ns(t,e,l){if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,l)}}function Tl(t,e,l,n){if(n===null)t.removeAttribute(l);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(e,l,n)}}function Ue(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function sd(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function _v(t,e,l){var n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return a.call(this)},set:function(f){l=""+f,s.call(this,f)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(f){l=""+f},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Rr(t){if(!t._valueTracker){var e=sd(t)?"checked":"value";t._valueTracker=_v(t,e,""+t[e])}}function ud(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var l=e.getValue(),n="";return t&&(n=sd(t)?t.checked?"true":"false":t.value),t=n,t!==l?(e.setValue(t),!0):!1}var Ev=/[\n"\\]/g;function Ge(t){return t.replace(Ev,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function zr(t,e,l,n,a,s,f,m){t.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?t.type=f:t.removeAttribute("type"),e!=null?f==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Ue(e)):t.value!==""+Ue(e)&&(t.value=""+Ue(e)):f!=="submit"&&f!=="reset"||t.removeAttribute("value"),e!=null?f==="number"&&t.value==e?Or(t,Ue(t.value)):Or(t,Ue(e)):l!=null?Or(t,Ue(l)):n!=null&&t.removeAttribute("value"),a==null&&s!=null&&(t.defaultChecked=!!s),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?t.name=""+Ue(m):t.removeAttribute("name")}function rd(t,e,l,n,a,s,f,m){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(t.type=s),e!=null||l!=null){if(!(s!=="submit"&&s!=="reset"||e!=null)){Rr(t);return}l=l!=null?""+Ue(l):"",e=e!=null?""+Ue(e):l,m||e===t.value||(t.value=e),t.defaultValue=e}n=n??a,n=typeof n!="function"&&typeof n!="symbol"&&!!n,t.checked=m?t.checked:!!n,t.defaultChecked=!!n,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(t.name=f),Rr(t)}function Or(t,e){t.defaultValue!==""+e&&(t.defaultValue=""+e)}function ua(t,e,l,n){if(t=t.options,e){e={};for(var a=0;a<l.length;a++)e["$"+l[a]]=!0;for(l=0;l<t.length;l++)a=e.hasOwnProperty("$"+t[l].value),t[l].selected!==a&&(t[l].selected=a),a&&n&&(t[l].defaultSelected=!0)}else{for(l=""+Ue(l),e=null,a=0;a<t.length;a++){if(t[a].value===l){t[a].selected=!0,n&&(t[a].defaultSelected=!0);return}e!==null||t[a].disabled||(e=t[a])}e!==null&&(e.selected=!0)}}function cd(t,e,l){if(e!=null&&(e=""+Ue(e),e!==t.value&&(t.value=e),l==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=l!=null?""+Ue(l):""}function od(t,e,l,n){if(e==null){if(n!=null){if(l!=null)throw Error(c(92));if(bt(n)){if(1<n.length)throw Error(c(93));n=n[0]}l=n}l==null&&(l=""),e=l}l=Ue(e),t.defaultValue=l,n=t.textContent,n===l&&n!==""&&n!==null&&(t.value=n),Rr(t)}function ra(t,e){if(e){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=e;return}}t.textContent=e}var Tv=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 fd(t,e,l){var n=e.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?n?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":n?t.setProperty(e,l):typeof l!="number"||l===0||Tv.has(e)?e==="float"?t.cssFloat=l:t[e]=(""+l).trim():t[e]=l+"px"}function dd(t,e,l){if(e!=null&&typeof e!="object")throw Error(c(62));if(t=t.style,l!=null){for(var n in l)!l.hasOwnProperty(n)||e!=null&&e.hasOwnProperty(n)||(n.indexOf("--")===0?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="",xt=!0);for(var a in e)n=e[a],e.hasOwnProperty(a)&&l[a]!==n&&(fd(t,a,n),xt=!0)}else for(var s in e)e.hasOwnProperty(s)&&fd(t,s,e[s])}function Cr(t){if(t.indexOf("-")===-1)return!1;switch(t){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 Nv=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"],["maskType","mask-type"],["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 Rs(t){return Rv.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function ol(){}var Ar=null;function wr(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ca=null,oa=null;function hd(t){var e=aa(t);if(e&&(t=e.stateNode)){var l=t[Ee]||null;t:switch(t=e.stateNode,e.type){case"input":if(zr(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),e=l.name,l.type==="radio"&&e!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Ge(""+e)+'"][type="radio"]'),e=0;e<l.length;e++){var n=l[e];if(n!==t&&n.form===t.form){var a=n[Ee]||null;if(!a)throw Error(c(90));zr(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(e=0;e<l.length;e++)n=l[e],n.form===t.form&&ud(n)}break t;case"textarea":cd(t,l.value,l.defaultValue);break t;case"select":e=l.value,e!=null&&ua(t,!!l.multiple,e,!1)}}}var Dr=!1;function md(t,e,l){if(Dr)return t(e,l);Dr=!0;try{var n=t(e);return n}finally{if(Dr=!1,(ca!==null||oa!==null)&&(Ru(),ca&&(e=ca,t=oa,oa=ca=null,hd(e),t)))for(e=0;e<t.length;e++)hd(t[e])}}function oi(t,e){var l=t.stateNode;if(l===null)return null;var n=l[Ee]||null;if(n===null)return null;l=n[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break t;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(c(231,e,typeof l));return l}var Nl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mr=!1;if(Nl)try{var fi={};Object.defineProperty(fi,"passive",{get:function(){Mr=!0}}),window.addEventListener("test",fi,fi),window.removeEventListener("test",fi,fi)}catch{Mr=!1}var Gl=null,kr=null,zs=null;function pd(){if(zs)return zs;var t,e=kr,l=e.length,n,a="value"in Gl?Gl.value:Gl.textContent,s=a.length;for(t=0;t<l&&e[t]===a[t];t++);var f=l-t;for(n=1;n<=f&&e[l-n]===a[s-n];n++);return zs=a.slice(t,1<n?1-n:void 0)}function Os(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Cs(){return!0}function gd(){return!1}function ye(t){function e(l,n,a,s,f){this._reactName=l,this._targetInst=a,this.type=n,this.nativeEvent=s,this.target=f,this.currentTarget=null;for(var m in t)t.hasOwnProperty(m)&&(l=t[m],this[m]=l?l(s):s[m]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Cs:gd,this.isPropagationStopped=gd,this}return I(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Cs)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Cs)},persist:function(){},isPersistent:Cs}),e}var Ql={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},As=ye(Ql),di=I({},Ql,{view:0,detail:0}),zv=ye(di),Ur,Hr,hi,ws=I({},di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Br,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==hi&&(hi&&t.type==="mousemove"?(Ur=t.screenX-hi.screenX,Hr=t.screenY-hi.screenY):Hr=Ur=0,hi=t),Ur)},movementY:function(t){return"movementY"in t?t.movementY:Hr}}),vd=ye(ws),Ov=I({},ws,{dataTransfer:0}),Cv=ye(Ov),Av=I({},di,{relatedTarget:0}),Lr=ye(Av),wv=I({},Ql,{animationName:0,elapsedTime:0,pseudoElement:0}),Dv=ye(wv),Mv=I({},Ql,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),kv=ye(Mv),Uv=I({},Ql,{data:0}),yd=ye(Uv),Hv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Lv={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"},Bv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qv(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Bv[t])?!!e[t]:!1}function Br(){return qv}var $v=I({},di,{key:function(t){if(t.key){var e=Hv[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Os(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Lv[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Br,charCode:function(t){return t.type==="keypress"?Os(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Os(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Yv=ye($v),Vv=I({},ws,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xd=ye(Vv),Gv=I({},Ql,{submitter:0}),Qv=ye(Gv),Xv=I({},di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Br}),Zv=ye(Xv),Kv=I({},Ql,{propertyName:0,elapsedTime:0,pseudoElement:0}),Jv=ye(Kv),Iv=I({},ws,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Fv=ye(Iv),Wv=I({},Ql,{newState:0,oldState:0,source:0}),Pv=ye(Wv),ty=[9,13,27,32],qr=Nl&&"CompositionEvent"in window,mi=null;Nl&&"documentMode"in document&&(mi=document.documentMode);var ey=Nl&&"TextEvent"in window&&!mi,bd=Nl&&(!qr||mi&&8<mi&&11>=mi),jd=" ",Sd=!1;function _d(t,e){switch(t){case"keyup":return ty.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ed(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var fa=!1;function ly(t,e){switch(t){case"compositionend":return Ed(e);case"keypress":return e.which!==32?null:(Sd=!0,jd);case"textInput":return t=e.data,t===jd&&Sd?null:t;default:return null}}function ny(t,e){if(fa)return t==="compositionend"||!qr&&_d(t,e)?(t=pd(),zs=kr=Gl=null,fa=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return bd&&e.locale!=="ko"?null:e.data;default:return null}}var ay={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 Td(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!ay[t.type]:e==="textarea"}function Nd(t,e,l,n){ca?oa?oa.push(n):oa=[n]:ca=n,e=Du(e,"onChange"),0<e.length&&(l=new As("onChange","change",null,l,n),t.push({event:l,listeners:e}))}var pi=null,gi=null;function iy(t){hp(t,0)}function Ds(t){var e=ci(t);if(ud(e))return t}function Rd(t,e){if(t==="change")return e}var zd=!1;if(Nl){var $r;if(Nl){var Yr="oninput"in document;if(!Yr){var Od=document.createElement("div");Od.setAttribute("oninput","return;"),Yr=typeof Od.oninput=="function"}$r=Yr}else $r=!1;zd=$r&&(!document.documentMode||9<document.documentMode)}function Cd(){pi&&(pi.detachEvent("onpropertychange",Ad),gi=pi=null)}function Ad(t){if(t.propertyName==="value"&&Ds(gi)){var e=[];Nd(e,gi,t,wr(t)),md(iy,e)}}function sy(t,e,l){t==="focusin"?(Cd(),pi=e,gi=l,pi.attachEvent("onpropertychange",Ad)):t==="focusout"&&Cd()}function uy(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ds(gi)}function ry(t,e){if(t==="click")return Ds(e)}function cy(t,e){if(t==="input"||t==="change")return Ds(e)}function oy(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var He=typeof Object.is=="function"?Object.is:oy;function vi(t,e){if(He(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var l=Object.keys(t),n=Object.keys(e);if(l.length!==n.length)return!1;for(n=0;n<l.length;n++){var a=l[n];if(!jr.call(e,a)||!He(t[a],e[a]))return!1}return!0}function Vr(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function wd(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Dd(t,e){var l=wd(t);t=0;for(var n;l;){if(l.nodeType===3){if(n=t+l.textContent.length,t<=e&&n>=e)return{node:l,offset:e-t};t=n}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=wd(l)}}function Md(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Md(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function kd(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Vr(t.document);e instanceof t.HTMLIFrameElement;){try{var l=typeof e.contentWindow.location.href=="string"}catch{l=!1}if(l)t=e.contentWindow;else break;e=Vr(t.document)}return e}function Gr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var fy=Nl&&"documentMode"in document&&11>=document.documentMode,da=null,Qr=null,yi=null,Xr=!1;function Ud(t,e,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Xr||da==null||da!==Vr(n)||(n=da,"selectionStart"in n&&Gr(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),yi&&vi(yi,n)||(yi=n,n=Du(Qr,"onSelect"),0<n.length&&(e=new As("onSelect","select",null,e,l),t.push({event:e,listeners:n}),e.target=da)))}function zn(t,e){var l={};return l[t.toLowerCase()]=e.toLowerCase(),l["Webkit"+t]="webkit"+e,l["Moz"+t]="moz"+e,l}var ha={animationend:zn("Animation","AnimationEnd"),animationiteration:zn("Animation","AnimationIteration"),animationstart:zn("Animation","AnimationStart"),transitionrun:zn("Transition","TransitionRun"),transitionstart:zn("Transition","TransitionStart"),transitioncancel:zn("Transition","TransitionCancel"),transitionend:zn("Transition","TransitionEnd")},Zr={},Hd={};Nl&&(Hd=document.createElement("div").style,"AnimationEvent"in window||(delete ha.animationend.animation,delete ha.animationiteration.animation,delete ha.animationstart.animation),"TransitionEvent"in window||delete ha.transitionend.transition);function On(t){if(Zr[t])return Zr[t];if(!ha[t])return t;var e=ha[t],l;for(l in e)if(e.hasOwnProperty(l)&&l in Hd)return Zr[t]=e[l];return t}var Ld=On("animationend"),Bd=On("animationiteration"),qd=On("animationstart"),dy=On("transitionrun"),hy=On("transitionstart"),my=On("transitioncancel"),$d=On("transitionend"),Yd=new Map,Kr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");Kr.push("scrollEnd");function el(t,e){Yd.set(t,e),Rn(e,[t])}var py=0;function Rl(t,e){if(t.name!=null&&t.name!=="auto")return t.name;if(e.autoName!==null)return e.autoName;t=il.identifierPrefix;var l=py++;return t="_"+t+"t_"+l.toString(32)+"_",e.autoName=t}function Vd(t){if(t==null||typeof t=="string")return t;var e=null,l=Da;if(l!==null)for(var n=0;n<l.length;n++){var a=t[l[n]];if(a!=null){if(a==="none")return"none";e=e==null?a:e+(" "+a)}}return e??t.default}function zl(t,e){return t=Vd(t),e=Vd(e),e==null?t==="auto"?null:t:e==="auto"?null:e}var Ms=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Qe=[],ma=0,Jr=0;function ks(){for(var t=ma,e=Jr=ma=0;e<t;){var l=Qe[e];Qe[e++]=null;var n=Qe[e];Qe[e++]=null;var a=Qe[e];Qe[e++]=null;var s=Qe[e];if(Qe[e++]=null,n!==null&&a!==null){var f=n.pending;f===null?a.next=a:(a.next=f.next,f.next=a),n.pending=a}s!==0&&Gd(l,a,s)}}function Us(t,e,l,n){Qe[ma++]=t,Qe[ma++]=e,Qe[ma++]=l,Qe[ma++]=n,Jr|=n,t.lanes|=n,t=t.alternate,t!==null&&(t.lanes|=n)}function Ir(t,e,l,n){return Us(t,e,l,n),Hs(t)}function Cn(t,e){return Us(t,null,null,e),Hs(t)}function Gd(t,e,l){t.lanes|=l;var n=t.alternate;n!==null&&(n.lanes|=l);for(var a=!1,s=t.return;s!==null;)s.childLanes|=l,n=s.alternate,n!==null&&(n.childLanes|=l),s.tag===22&&(t=s.stateNode,t===null||t._visibility&1||(a=!0)),t=s,s=s.return;return t.tag===3?(s=t.stateNode,a&&e!==null&&(a=31-ke(l),t=s.hiddenUpdates,n=t[a],n===null?t[a]=[e]:n.push(e),e.lane=l|536870912),s):null}function Hs(t){if(50<qi)throw qi=0,Nu=null,Error(c(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var pa={};function gy(t,e,l,n){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Te(t,e,l,n){return new gy(t,e,l,n)}function Fr(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ol(t,e){var l=t.alternate;return l===null?(l=Te(t.tag,e,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=e,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&1206910976,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,e=t.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function Qd(t,e){t.flags&=1206910978;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,e=l.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function Ls(t,e,l,n,a,s){var f=0;if(n=t,typeof n=="function")Fr(n)&&(f=1);else if(typeof n=="string")f=Gx(t,l,cl.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(n){case tl:return t=Te(31,l,e,a),t.elementType=tl,t.lanes=s,t;case Ht:return An(l.children,a,s,e);case q:f=8,a|=24;break;case Nt:return t=Te(12,l,e,a|2),t.elementType=Nt,t.lanes=s,t;case nt:return t=Te(13,l,e,a),t.elementType=nt,t.lanes=s,t;case Z:return t=Te(19,l,e,a),t.elementType=Z,t.lanes=s,t;case Sl:case S:return t=a|32,t=Te(30,l,e,t),t.elementType=S,t.lanes=s,t.stateNode={autoName:null,paired:null,clones:null,ref:null},t;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case It:f=10;break t;case Xt:f=9;break t;case V:f=11;break t;case At:f=14;break t;case _t:f=16,n=null;break t}f=29,l=Error(c(130,t===null?"null":typeof t,"")),n=null}return e=Te(f,l,e,a),e.elementType=t,e.type=n,e.lanes=s,e}function An(t,e,l,n){return t=Te(7,t,n,e),t.lanes=l,t}function Wr(t,e,l){return t=Te(6,t,null,e),t.lanes=l,t}function Xd(t){var e=Te(18,null,null,0);return e.stateNode=t,e}function Pr(t,e,l){return e=Te(4,t.children!==null?t.children:[],t.key,e),e.lanes=l,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var Zd=new WeakMap;function Xe(t,e){if(typeof t=="object"&&t!==null){var l=Zd.get(t);return l!==void 0?l:(e={value:t,source:e,stack:$f(e)},Zd.set(t,e),e)}return{value:t,source:e,stack:$f(e)}}var ga=[],va=0,Bs=null,xi=0,Ze=[],Ke=0,Xl=null,fl=1,dl="";function Cl(t,e){ga[va++]=xi,ga[va++]=Bs,Bs=t,xi=e}function Kd(t,e,l){Ze[Ke++]=fl,Ze[Ke++]=dl,Ze[Ke++]=Xl,Xl=t;var n=fl;t=dl;var a=32-ke(n)-1;n&=~(1<<a),l+=1;var s=32-ke(e)+a;if(30<s){var f=a-a%5;s=(n&(1<<f)-1).toString(32),n>>=f,a-=f,fl=1<<32-ke(e)+a|l<<a|n,dl=s+t}else fl=1<<s|l<<a|n,dl=t}function qs(t){t.return!==null&&(Cl(t,1),Kd(t,1,0))}function tc(t){for(;t===Bs;)Bs=ga[--va],ga[va]=null,xi=ga[--va],ga[va]=null;for(;t===Xl;)Xl=Ze[--Ke],Ze[Ke]=null,dl=Ze[--Ke],Ze[Ke]=null,fl=Ze[--Ke],Ze[Ke]=null}function Jd(t,e){Ze[Ke++]=fl,Ze[Ke++]=dl,Ze[Ke++]=Xl,fl=e.id,dl=e.overflow,Xl=t}var ae=null,kt=null,ot=!1,Zl=null,Je=!1,ec=Error(c(519));function Kl(t){var e=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw bi(Xe(e,t)),ec}function Id(t){var e=t.stateNode,l=t.type,n=t.memoizedProps;switch(e[re]=t,e[Ee]=n,l){case"dialog":dt("cancel",e),dt("close",e);break;case"iframe":case"object":case"embed":dt("load",e);break;case"video":case"audio":for(l=0;l<Yi.length;l++)dt(Yi[l],e);break;case"source":dt("error",e);break;case"img":case"image":case"link":dt("error",e),dt("load",e);break;case"details":dt("toggle",e);break;case"input":dt("invalid",e),rd(e,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":dt("invalid",e);break;case"textarea":dt("invalid",e),od(e,n.value,n.defaultValue,n.children)}l=n.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||e.textContent===""+l||n.suppressHydrationWarning===!0||vp(e.textContent,l)?(n.popover!=null&&(dt("beforetoggle",e),dt("toggle",e)),n.onScroll!=null&&dt("scroll",e),n.onScrollEnd!=null&&dt("scrollend",e),n.onClick!=null&&(e.onclick=ol),e=!0):e=!1,e||Kl(t,!0)}function $s(t){for(ae=t.return;ae;)switch(ae.tag){case 5:case 31:case 13:Je=!1;return;case 27:case 3:Je=!0;return;default:ae=ae.return}}function ya(t){if(t!==ae)return!1;if(!ot)return $s(t),ot=!0,!1;var e=t.tag,l;if((l=e!==3&&e!==27)&&((l=e===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||wo(t.type,t.memoizedProps)),l=!l),l&&kt&&Kl(t),$s(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(c(317));kt=Up(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(c(317));kt=Up(t)}else e===27?(e=kt,fn(t.type)?(t=$o,$o=null,kt=t):kt=e):kt=ae?Fe(t.stateNode.nextSibling):null;return!0}function wn(){kt=ae=null,ot=!1}function lc(){var t=Zl;return t!==null&&(ze===null?ze=t:ze.push.apply(ze,t),Zl=null),t}function bi(t){Zl===null?Zl=[t]:Zl.push(t)}var nc=rl(null),Dn=null,Al=null;function Jl(t,e,l){Mt(nc,e._currentValue),e._currentValue=l}function wl(t){t._currentValue=nc.current,ue(nc)}function Ys(t,e,l){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===l)break;t=t.return}}function ac(t,e,l,n){var a=t.child;for(a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){var f=a.child;s=s.firstContext;t:for(;s!==null;){var m=s;s=a;for(var x=0;x<e.length;x++)if(m.context===e[x]){s.lanes|=l,m=s.alternate,m!==null&&(m.lanes|=l),Ys(s.return,l,t),n||(f=null);break t}s=m.next}}else if(a.tag===18){if(f=a.return,f===null)throw Error(c(341));f.lanes|=l,s=f.alternate,s!==null&&(s.lanes|=l),Ys(f,l,t),f=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=l,f=a.alternate,f!==null&&(f.lanes|=l),Ys(a.return,l,t),f=a.child,f=f!==null?f.sibling:null):f=a.child;if(f!==null)f.return=a;else for(f=a;f!==null;){if(f===t){f=null;break}if(a=f.sibling,a!==null){a.return=f.return,f=a;break}f=f.return}a=f}}function Mn(t,e,l,n){t=null;for(var a=e,s=!1;a!==null;){if(!s){if((a.flags&524288)!==0)s=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var f=a.alternate;if(f===null)throw Error(c(387));if(f=f.memoizedProps,f!==null){var m=a.type;He(a.pendingProps.value,f.value)||(t!==null?t.push(m):t=[m])}}else if(a===ps.current){if(f=a.alternate,f===null)throw Error(c(387));f.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(t!==null?t.push(Va):t=[Va])}a=a.return}return t!==null&&ac(e,t,l,n),e.flags|=262144,t!==null}function Vs(t){for(t=t.firstContext;t!==null;){if(!He(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function kn(t){Dn=t,Al=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function ce(t){return Fd(Dn,t)}function Gs(t,e){return Dn===null&&kn(t),Fd(t,e)}function Fd(t,e){var l=e._currentValue;if(e={context:e,memoizedValue:l,next:null},Al===null){if(t===null)throw Error(c(308));Al=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Al=Al.next=e;return l}var vy=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(l,n){t.push(n)}};this.abort=function(){e.aborted=!0,t.forEach(function(l){return l()})}},yy=i.unstable_scheduleCallback,xy=i.unstable_NormalPriority,Ft={$$typeof:It,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ic(){return{controller:new vy,data:new Map,refCount:0}}function ji(t){t.refCount--,t.refCount===0&&yy(xy,function(){t.controller.abort()})}function Wd(t,e){if((t.pendingLanes&4194048)!==0){var l=t.transitionTypes;for(l===null&&(l=t.transitionTypes=[]),t=0;t<e.length;t++){var n=e[t];l.indexOf(n)===-1&&l.push(n)}}}var Si=null;function by(t){var e=t.transitionTypes;return t.transitionTypes=null,e}var _i=null,sc=0,Un=0,xa=null;function jy(t,e){if(_i===null){var l=_i=[];sc=0,Un=_o(),xa={status:"pending",value:void 0,then:function(n){l.push(n)}}}return sc++,e.then(Pd,Pd),e}function Pd(){if(--sc===0&&(Si=null,_i!==null)){xa!==null&&(xa.status="fulfilled");var t=_i;_i=null,Un=0,xa=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function Sy(t,e){var l=[],n={status:"pending",value:null,reason:null,then:function(a){l.push(a)}};return t.then(function(){n.status="fulfilled",n.value=e;for(var a=0;a<l.length;a++)(0,l[a])(e)},function(a){for(n.status="rejected",n.reason=a,a=0;a<l.length;a++)(0,l[a])(void 0)}),n}var th=J.S;J.S=function(t,e){if(Xm=De(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&jy(t,e),Si!==null)for(var l=Ha;l!==null;)Wd(l,Si),l=l.next;if(l=t.types,l!==null){for(var n=Ha;n!==null;)Wd(n,l),n=n.next;if(Un!==0){n=Si,n===null&&(n=Si=[]);for(var a=0;a<l.length;a++){var s=l[a];n.indexOf(s)===-1&&n.push(s)}}}th!==null&&th(t,e)};var Hn=rl(null);function uc(){var t=Hn.current;return t!==null?t:wt.pooledCache}function Qs(t,e){e===null?Mt(Hn,Hn.current):Mt(Hn,e.pool)}function eh(){var t=uc();return t===null?null:{parent:Ft._currentValue,pool:t}}var ba=Error(c(460)),rc=Error(c(474)),Xs=Error(c(542)),Zs={then:function(){}};function lh(t){return t=t.status,t==="fulfilled"||t==="rejected"}function nh(t,e,l){switch(l=t[l],l===void 0?t.push(e):l!==e&&(e.then(ol,ol),e=l),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,ih(t),t===void 0&&!("reason"in e)?Error(c(600)):t;default:if(typeof e.status=="string")e.then(ol,ol);else{if(t=wt,t!==null&&100<t.shellSuspendCounter)throw Error(c(482));t=e,t.status="pending",t.then(function(n){if(e.status==="pending"){var a=e;a.status="fulfilled",a.value=n}},function(n){if(e.status==="pending"){var a=e;a.status="rejected",a.reason=n}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,ih(t),t}throw Bn=e,ba}}function Ln(t){try{var e=t._init;return e(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Bn=l,ba):l}}var Bn=null;function ah(){if(Bn===null)throw Error(c(459));var t=Bn;return Bn=null,t}function ih(t){if(t===ba||t===Xs)throw Error(c(483))}var ja=null,Ei=0;function Ks(t){var e=Ei;return Ei+=1,ja===null&&(ja=[]),nh(ja,t,e)}function Il(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function Js(t,e){throw e.$$typeof===et?Error(c(525)):(t=Object.prototype.toString.call(e),Error(c(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function sh(t){function e(E,j){if(t){var z=E.deletions;z===null?(E.deletions=[j],E.flags|=16):z.push(j)}}function l(E,j){if(!t)return null;for(;j!==null;)e(E,j),j=j.sibling;return null}function n(E){for(var j=new Map;E!==null;)E.key===null?j.set(E.index,E):j.set(E.key,E),E=E.sibling;return j}function a(E,j){return E=Ol(E,j),E.index=0,E.sibling=null,E}function s(E,j,z){return E.index=z,t?(z=E.alternate,z!==null?(z=z.index,z<j?(E.flags|=2,j):z):(E.flags|=134217730,j)):(E.flags|=1048576,j)}function f(E){return t&&E.alternate===null&&(E.flags|=134217730),E}function m(E,j,z,w){return j===null||j.tag!==6?(j=Wr(z,E.mode,w),j.return=E,j):(j=a(j,z),j.return=E,j)}function x(E,j,z,w){var X=z.type;return X===Ht?(E=C(E,j,z.props.children,w,z.key),Il(E,z),E):j!==null&&(j.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===_t&&Ln(X)===j.type)?(j=a(j,z.props),Il(j,z),j.return=E,j):(j=Ls(z.type,z.key,z.props,null,E.mode,w),Il(j,z),j.return=E,j)}function T(E,j,z,w){return j===null||j.tag!==4||j.stateNode.containerInfo!==z.containerInfo||j.stateNode.implementation!==z.implementation?(j=Pr(z,E.mode,w),j.return=E,j):(j=a(j,z.children||[]),j.return=E,j)}function C(E,j,z,w,X){return j===null||j.tag!==7?(j=An(z,E.mode,w,X),j.return=E,j):(j=a(j,z),j.return=E,j)}function D(E,j,z){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=Wr(""+j,E.mode,z),j.return=E,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Vt:return z=Ls(j.type,j.key,j.props,null,E.mode,z),Il(z,j),z.return=E,z;case Dt:return j=Pr(j,E.mode,z),j.return=E,j;case _t:return j=Ln(j),D(E,j,z)}if(bt(j)||P(j))return j=An(j,E.mode,z,null),j.return=E,j;if(typeof j.then=="function")return D(E,Ks(j),z);if(j.$$typeof===It)return D(E,Gs(E,j),z);Js(E,j)}return null}function _(E,j,z,w){var X=j!==null?j.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return X!==null?null:m(E,j,""+z,w);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case Vt:return z.key===X?x(E,j,z,w):null;case Dt:return z.key===X?T(E,j,z,w):null;case _t:return z=Ln(z),_(E,j,z,w)}if(bt(z)||P(z))return X!==null?null:C(E,j,z,w,null);if(typeof z.then=="function")return _(E,j,Ks(z),w);if(z.$$typeof===It)return _(E,j,Gs(E,z),w);Js(E,z)}return null}function O(E,j,z,w,X){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return E=E.get(z)||null,m(j,E,""+w,X);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Vt:return E=E.get(w.key===null?z:w.key)||null,x(j,E,w,X);case Dt:return E=E.get(w.key===null?z:w.key)||null,T(j,E,w,X);case _t:return w=Ln(w),O(E,j,z,w,X)}if(bt(w)||P(w))return E=E.get(z)||null,C(j,E,w,X,null);if(typeof w.then=="function")return O(E,j,z,Ks(w),X);if(w.$$typeof===It)return O(E,j,z,Gs(j,w),X);Js(j,w)}return null}function Y(E,j,z,w){for(var X=null,mt=null,F=j,at=j=0,te=null;F!==null&&at<z.length;at++){F.index>at?(te=F,F=null):te=F.sibling;var gt=_(E,F,z[at],w);if(gt===null){F===null&&(F=te);break}t&&F&&gt.alternate===null&&e(E,F),j=s(gt,j,at),mt===null?X=gt:mt.sibling=gt,mt=gt,F=te}if(at===z.length)return l(E,F),ot&&Cl(E,at),X;if(F===null){for(;at<z.length;at++)F=D(E,z[at],w),F!==null&&(j=s(F,j,at),mt===null?X=F:mt.sibling=F,mt=F);return ot&&Cl(E,at),X}for(F=n(F);at<z.length;at++)te=O(F,E,at,z[at],w),te!==null&&(t&&(gt=te.alternate,gt!==null&&F.delete(gt.key===null?at:gt.key)),j=s(te,j,at),mt===null?X=te:mt.sibling=te,mt=te);return t&&F.forEach(function(gn){return e(E,gn)}),ot&&Cl(E,at),X}function K(E,j,z,w){if(z==null)throw Error(c(151));for(var X=null,mt=null,F=j,at=j=0,te=null,gt=z.next();F!==null&&!gt.done;at++,gt=z.next()){F.index>at?(te=F,F=null):te=F.sibling;var gn=_(E,F,gt.value,w);if(gn===null){F===null&&(F=te);break}t&&F&&gn.alternate===null&&e(E,F),j=s(gn,j,at),mt===null?X=gn:mt.sibling=gn,mt=gn,F=te}if(gt.done)return l(E,F),ot&&Cl(E,at),X;if(F===null){for(;!gt.done;at++,gt=z.next())gt=D(E,gt.value,w),gt!==null&&(j=s(gt,j,at),mt===null?X=gt:mt.sibling=gt,mt=gt);return ot&&Cl(E,at),X}for(F=n(F);!gt.done;at++,gt=z.next())gt=O(F,E,at,gt.value,w),gt!==null&&(t&&(te=gt.alternate,te!==null&&F.delete(te.key===null?at:te.key)),j=s(gt,j,at),mt===null?X=gt:mt.sibling=gt,mt=gt);return t&&F.forEach(function(l1){return e(E,l1)}),ot&&Cl(E,at),X}function rt(E,j,z,w){if(typeof z=="object"&&z!==null&&z.type===Ht&&z.key===null&&z.props.ref===void 0&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case Vt:t:{for(var X=z.key;j!==null;){if(j.key===X){if(X=z.type,X===Ht){if(j.tag===7){l(E,j.sibling),w=a(j,z.props.children),Il(w,z),w.return=E,E=w;break t}}else if(j.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===_t&&Ln(X)===j.type){l(E,j.sibling),w=a(j,z.props),Il(w,z),w.return=E,E=w;break t}l(E,j);break}else e(E,j);j=j.sibling}z.type===Ht?(w=An(z.props.children,E.mode,w,z.key),Il(w,z),w.return=E,E=w):(w=Ls(z.type,z.key,z.props,null,E.mode,w),Il(w,z),w.return=E,E=w)}return f(E);case Dt:t:{for(X=z.key;j!==null;){if(j.key===X)if(j.tag===4&&j.stateNode.containerInfo===z.containerInfo&&j.stateNode.implementation===z.implementation){l(E,j.sibling),w=a(j,z.children||[]),w.return=E,E=w;break t}else{l(E,j);break}else e(E,j);j=j.sibling}w=Pr(z,E.mode,w),w.return=E,E=w}return f(E);case _t:return z=Ln(z),rt(E,j,z,w)}if(bt(z))return Y(E,j,z,w);if(P(z)){if(X=P(z),typeof X!="function")throw Error(c(150));return z=X.call(z),K(E,j,z,w)}if(typeof z.then=="function")return rt(E,j,Ks(z),w);if(z.$$typeof===It)return rt(E,j,Gs(E,z),w);Js(E,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,j!==null&&j.tag===6?(l(E,j.sibling),w=a(j,z),w.return=E,E=w):(l(E,j),w=Wr(z,E.mode,w),w.return=E,E=w),f(E)):l(E,j)}return function(E,j,z,w){try{Ei=0;var X=rt(E,j,z,w);return ja=null,X}catch(F){if(F===ba||F===Xs)throw F;var mt=Te(29,F,null,E.mode);return mt.lanes=w,mt.return=E,mt}finally{}}}var qn=sh(!0),uh=sh(!1),Fl=!1;function cc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function oc(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Wl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Pl(t,e,l){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,(jt&2)!==0){var a=n.pending;return a===null?e.next=e:(e.next=a.next,a.next=e),n.pending=e,e=Hs(t),Gd(t,null,l),e}return Us(t,n,e,l),Hs(t)}function Ti(t,e,l){if(e=e.updateQueue,e!==null&&(e=e.shared,(l&4194048)!==0)){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,Kf(t,l)}}function fc(t,e){var l=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var a=null,s=null;if(l=l.firstBaseUpdate,l!==null){do{var f={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};s===null?a=s=f:s=s.next=f,l=l.next}while(l!==null);s===null?a=s=e:s=s.next=e}else a=s=e;l={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:s,shared:n.shared,callbacks:n.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=e:t.next=e,l.lastBaseUpdate=e}var dc=!1;function Ni(){if(dc){var t=xa;if(t!==null)throw t}}function Ri(t,e,l,n){dc=!1;var a=t.updateQueue;Fl=!1;var s=a.firstBaseUpdate,f=a.lastBaseUpdate,m=a.shared.pending;if(m!==null){a.shared.pending=null;var x=m,T=x.next;x.next=null,f===null?s=T:f.next=T,f=x;var C=t.alternate;C!==null&&(C=C.updateQueue,m=C.lastBaseUpdate,m!==f&&(m===null?C.firstBaseUpdate=T:m.next=T,C.lastBaseUpdate=x))}if(s!==null){var D=a.baseState;f=0,C=T=x=null,m=s;do{var _=m.lane&-536870913,O=_!==m.lane;if(O?(ht&_)===_:(n&_)===_){_!==0&&_===Un&&(dc=!0),C!==null&&(C=C.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});t:{var Y=t,K=m;_=e;var rt=l;switch(K.tag){case 1:if(Y=K.payload,typeof Y=="function"){D=Y.call(rt,D,_);break t}D=Y;break t;case 3:Y.flags=Y.flags&-65537|128;case 0:if(Y=K.payload,_=typeof Y=="function"?Y.call(rt,D,_):Y,_==null)break t;D=I({},D,_);break t;case 2:Fl=!0}}_=m.callback,_!==null&&(t.flags|=64,O&&(t.flags|=8192),O=a.callbacks,O===null?a.callbacks=[_]:O.push(_))}else O={lane:_,tag:m.tag,payload:m.payload,callback:m.callback,next:null},C===null?(T=C=O,x=D):C=C.next=O,f|=_;if(m=m.next,m===null){if(m=a.shared.pending,m===null)break;O=m,m=O.next,O.next=null,a.lastBaseUpdate=O,a.shared.pending=null}}while(!0);C===null&&(x=D),a.baseState=x,a.firstBaseUpdate=T,a.lastBaseUpdate=C,s===null&&(a.shared.lanes=0),un|=f,t.lanes=f,t.memoizedState=D}}function rh(t,e){if(typeof t!="function")throw Error(c(191,t));t.call(e)}function ch(t,e){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)rh(l[t],e)}var tn=rl(null),Is=rl(0);function oh(t,e){t=Hl,Mt(Is,t),Mt(tn,e),Hl=t|e.baseLanes}function hc(){Mt(Is,Hl),Mt(tn,tn.current)}function mc(){Hl=Is.current,ue(tn),ue(Is)}var oe=rl(null),ve=null;function en(t){var e=t.alternate;Mt(fe,fe.current&1),Mt(oe,t),ve===null&&(e===null||tn.current!==null||e.memoizedState!==null)&&(ve=t)}function pc(t){Mt(fe,fe.current),Mt(oe,t),ve===null&&(ve=t)}function fh(t){t.tag===22?(Mt(fe,fe.current),Mt(oe,t),ve===null&&(ve=t)):ln()}function ln(){Mt(fe,fe.current),Mt(oe,oe.current)}function Le(t){ue(oe),ve===t&&(ve=null),ue(fe)}var fe=rl(0);function zi(t,e){Mt(oe,oe.current),Mt(fe,e)}function gc(t){ue(fe),ue(oe),ve===t&&(ve=null)}function Fs(t){for(var e=t;e!==null;){if(e.tag===13){var l=e.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Bo(l)||qo(l)))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!=="independent"){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Dl=0,ut=null,Ct=null,Wt=null,Ws=!1,Sa=!1,$n=!1,Ps=0,Oi=0,_a=null,_y=0;function Zt(){throw Error(c(321))}function vc(t,e){if(e===null)return!1;for(var l=0;l<e.length&&l<t.length;l++)if(!He(t[l],e[l]))return!1;return!0}function yc(t,e,l,n,a,s){return Dl=s,ut=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,J.H=t===null||t.memoizedState===null?Kh:Jh,$n=!1,s=l(n,a),$n=!1,Sa&&(s=hh(e,l,n,a)),dh(t),s}function dh(t){J.H=su;var e=Ct!==null&&Ct.next!==null;if(Dl=0,Wt=Ct=ut=null,Ws=!1,Oi=0,_a=null,e)throw Error(c(300));t===null||Pt||(t=t.dependencies,t!==null&&Vs(t)&&(Pt=!0))}function hh(t,e,l,n){ut=t;var a=0;do{if(Sa&&(_a=null),Oi=0,Sa=!1,25<=a)throw Error(c(301));if(a+=1,Wt=Ct=null,t.updateQueue!=null){var s=t.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}J.H=Ay,s=e(l,n)}while(Sa);return s}function Ey(){var t=J.H,e=t.useState()[0];return e=typeof e.then=="function"?Ci(e):e,t=t.useState()[0],(Ct!==null?Ct.memoizedState:null)!==t&&(ut.flags|=1024),e}function xc(){var t=Ps!==0;return Ps=0,t}function bc(t,e,l){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~l}function jc(t){if(Ws){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}Ws=!1}Dl=0,Wt=Ct=ut=null,Sa=!1,Oi=Ps=0,_a=null}function xe(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Wt===null?ut.memoizedState=Wt=t:Wt=Wt.next=t,Wt}function Jt(){if(Ct===null){var t=ut.alternate;t=t!==null?t.memoizedState:null}else t=Ct.next;var e=Wt===null?ut.memoizedState:Wt.next;if(e!==null)Wt=e,Ct=t;else{if(t===null)throw ut.alternate===null?Error(c(467)):Error(c(310));Ct=t,t={memoizedState:Ct.memoizedState,baseState:Ct.baseState,baseQueue:Ct.baseQueue,queue:Ct.queue,next:null},Wt===null?ut.memoizedState=Wt=t:Wt=Wt.next=t}return Wt}function tu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ci(t){var e=Oi;return Oi+=1,_a===null&&(_a=[]),t=nh(_a,t,e),e=ut,(Wt===null?e.memoizedState:Wt.next)===null&&(e=e.alternate,J.H=e===null||e.memoizedState===null?Kh:Jh),t}function eu(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Ci(t);if(t.$$typeof===U)return;if(t.$$typeof===It)return ce(t)}throw Error(c(438,String(t)))}function Sc(t){var e=null,l=ut.updateQueue;if(l!==null&&(e=l.memoCache),e==null){var n=ut.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(e={data:n.data.map(function(a){return a.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),l===null&&(l=tu(),ut.updateQueue=l),l.memoCache=e,l=e.data[e.index],l===void 0)for(l=e.data[e.index]=Array(t),n=0;n<t;n++)l[n]=En;return e.index++,l}function Ml(t,e){return typeof e=="function"?e(t):e}function lu(t){var e=Jt();return _c(e,Ct,t)}function _c(t,e,l){var n=t.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=l;var a=t.baseQueue,s=n.pending;if(s!==null){if(a!==null){var f=a.next;a.next=s.next,s.next=f}e.baseQueue=a=s,n.pending=null}if(s=t.baseState,a===null)t.memoizedState=s;else{e=a.next;var m=f=null,x=null,T=e,C=!1;do{var D=T.lane&-536870913;if(D!==T.lane?(ht&D)===D:(Dl&D)===D){var _=T.revertLane;if(_===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null}),D===Un&&(C=!0);else if((Dl&_)===_){T=T.next,_===Un&&(C=!0);continue}else D={lane:0,revertLane:T.revertLane,gesture:null,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null},x===null?(m=x=D,f=s):x=x.next=D,ut.lanes|=_,un|=_;D=T.action,$n&&l(s,D),s=T.hasEagerState?T.eagerState:l(s,D)}else _={lane:D,revertLane:T.revertLane,gesture:T.gesture,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null},x===null?(m=x=_,f=s):x=x.next=_,ut.lanes|=D,un|=D;T=T.next}while(T!==null&&T!==e);if(x===null?f=s:x.next=m,!He(s,t.memoizedState)&&(Pt=!0,C&&(l=xa,l!==null)))throw l;t.memoizedState=s,t.baseState=f,t.baseQueue=x,n.lastRenderedState=s}return a===null&&(n.lanes=0),[t.memoizedState,n.dispatch]}function Ec(t){var e=Jt(),l=e.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=t;var n=l.dispatch,a=l.pending,s=e.memoizedState;if(a!==null){l.pending=null;var f=a=a.next;do s=t(s,f.action),f=f.next;while(f!==a);He(s,e.memoizedState)||(Pt=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),l.lastRenderedState=s}return[s,n]}function mh(t,e,l){var n=ut,a=Jt(),s=ot;if(s){if(l===void 0)throw Error(c(407));l=l()}else l=e();var f=!He((Ct||a).memoizedState,l);if(f&&(a.memoizedState=l,Pt=!0),a=a.queue,Rc(vh.bind(null,n,a,t),[t]),t=a.getSnapshot!==e||f||Wt!==null&&(Wt.memoizedState.tag&1)!==0,Ea(t?9:8,{destroy:void 0},gh.bind(null,n,a,l,e),null),t){if(n.flags|=2048,wt===null)throw Error(c(349));s||(Dl&127)!==0||ph(n,e,l)}return l}function ph(t,e,l){t.flags|=16384,t={getSnapshot:e,value:l},e=ut.updateQueue,e===null?(e=tu(),ut.updateQueue=e,e.stores=[t]):(l=e.stores,l===null?e.stores=[t]:l.push(t))}function gh(t,e,l,n){e.value=l,e.getSnapshot=n,yh(e)&&xh(t)}function vh(t,e,l){return l(function(){yh(e)&&xh(t)})}function yh(t){var e=t.getSnapshot;t=t.value;try{var l=e();return!He(t,l)}catch{return!0}}function xh(t){var e=Cn(t,2);e!==null&&Oe(e,t,2)}function Tc(t){var e=xe();if(typeof t=="function"){var l=t;if(t=l(),$n){Vl(!0);try{l()}finally{Vl(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:t},e}function bh(t,e,l,n){return t.baseState=l,_c(t,Ct,typeof n=="function"?n:Ml)}function Ty(t,e,l,n,a){if(iu(t))throw Error(c(485));if(t=e.action,t!==null){var s={payload:a,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){s.listeners.push(f)}};J.T!==null?l(!0):s.isTransition=!1,n(s),l=e.pending,l===null?(s.next=e.pending=s,jh(e,s)):(s.next=l.next,e.pending=l.next=s)}}function jh(t,e){var l=e.action,n=e.payload,a=t.state;if(e.isTransition){var s=J.T,f={};f.types=s!==null?s.types:null,J.T=f;try{var m=l(a,n),x=J.S;x!==null&&x(f,m),Sh(t,e,m)}catch(T){Nc(t,e,T)}finally{s!==null&&f.types!==null&&(s.types=f.types),J.T=s}}else try{s=l(a,n),Sh(t,e,s)}catch(T){Nc(t,e,T)}}function Sh(t,e,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){_h(t,e,n)},function(n){return Nc(t,e,n)}):_h(t,e,l)}function _h(t,e,l){e.status="fulfilled",e.value=l,Eh(e),t.state=l,e=t.pending,e!==null&&(l=e.next,l===e?t.pending=null:(l=l.next,e.next=l,jh(t,l)))}function Nc(t,e,l){var n=t.pending;if(t.pending=null,n!==null){n=n.next;do e.status="rejected",e.reason=l,Eh(e),e=e.next;while(e!==n)}t.action=null}function Eh(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function Th(t,e){return e}function Nh(t,e){if(ot){var l=wt.formState;if(l!==null){t:{var n=ut;if(ot){if(kt){e:{for(var a=kt,s=Je;a.nodeType!==8;){if(!s){a=null;break e}if(a=Fe(a.nextSibling),a===null){a=null;break e}}s=a.data,a=s==="F!"||s==="F"?a:null}if(a){kt=Fe(a.nextSibling),n=a.data==="F!";break t}}Kl(n)}n=!1}n&&(e=l[0])}}return l=xe(),l.memoizedState=l.baseState=e,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Th,lastRenderedState:e},l.queue=n,l=Qh.bind(null,ut,n),n.dispatch=l,n=Tc(!1),s=wc.bind(null,ut,!1,n.queue),n=xe(),a={state:e,dispatch:null,action:t,pending:null},n.queue=a,l=Ty.bind(null,ut,a,s,l),a.dispatch=l,n.memoizedState=t,[e,l,!1]}function Rh(t){var e=Jt();return zh(e,Ct,t)}function zh(t,e,l){if(e=_c(t,e,Th)[0],t=lu(Ml)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var n=Ci(e)}catch(f){throw f===ba?Xs:f}else n=e;e=Jt();var a=e.queue,s=a.dispatch;return l!==e.memoizedState&&(ut.flags|=2048,Ea(9,{destroy:void 0},Ny.bind(null,a,l),null)),[n,s,t]}function Ny(t,e){t.action=e}function Oh(t){var e=Jt(),l=Ct;if(l!==null)return zh(e,l,t);Jt(),e=e.memoizedState,l=Jt();var n=l.queue.dispatch;return l.memoizedState=t,[e,n,!1]}function Ea(t,e,l,n){return t={tag:t,create:l,deps:n,inst:e,next:null},e=ut.updateQueue,e===null&&(e=tu(),ut.updateQueue=e),l=e.lastEffect,l===null?e.lastEffect=t.next=t:(n=l.next,l.next=t,t.next=n,e.lastEffect=t),t}function Ch(){return Jt().memoizedState}function nu(t,e,l,n){var a=xe();ut.flags|=t,a.memoizedState=Ea(1|e,{destroy:void 0},l,n===void 0?null:n)}function au(t,e,l,n){var a=Jt();n=n===void 0?null:n;var s=a.memoizedState.inst;Ct!==null&&n!==null&&vc(n,Ct.memoizedState.deps)?a.memoizedState=Ea(e,s,l,n):(ut.flags|=t,a.memoizedState=Ea(1|e,s,l,n))}function Ah(t,e){nu(8390656,8,t,e)}function Rc(t,e){au(2048,8,t,e)}function Ry(t){ut.flags|=4;var e=ut.updateQueue;if(e===null)e=tu(),ut.updateQueue=e,e.events=[t];else{var l=e.events;l===null?e.events=[t]:l.push(t)}}function wh(t){var e=Jt().memoizedState;return Ry({ref:e,nextImpl:t}),function(){if((jt&2)!==0)throw Error(c(440));return e.impl.apply(void 0,arguments)}}function Dh(t,e){return au(4,2,t,e)}function Mh(t,e){return au(4,4,t,e)}function kh(t,e){if(typeof e=="function"){t=t();var l=e(t);return function(){typeof l=="function"?l():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Uh(t,e,l){l=l!=null?l.concat([t]):null,au(4,4,kh.bind(null,e,t),l)}function zc(){}function Hh(t,e){var l=Jt();e=e===void 0?null:e;var n=l.memoizedState;return e!==null&&vc(e,n[1])?n[0]:(l.memoizedState=[t,e],t)}function Lh(t,e){var l=Jt();e=e===void 0?null:e;var n=l.memoizedState;if(e!==null&&vc(e,n[1]))return n[0];if(n=t(),$n){Vl(!0);try{t()}finally{Vl(!1)}}return l.memoizedState=[n,e],n}function Oc(t,e,l){return l===void 0||(Dl&1073741824)!==0&&(ht&261930)===0?t.memoizedState=e:(t.memoizedState=l,t=Km(),ut.lanes|=t,un|=t,l)}function Bh(t,e,l,n){return He(l,e)?l:tn.current!==null?(t=Oc(t,l,n),He(t,e)||(Pt=!0),t):(Dl&106)===0||(Dl&1073741824)!==0&&(ht&261930)===0?(Pt=!0,t.memoizedState=l):(t=Km(),ut.lanes|=t,un|=t,e)}function qh(t,e,l,n,a){var s=it.p;it.p=s!==0&&8>s?s:8;var f=J.T,m={};m.types=f!==null?f.types:null,J.T=m,wc(t,!1,e,l);try{var x=a(),T=J.S;if(T!==null&&T(m,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var C=Sy(x,n);Ai(t,e,C,Ye(t))}else Ai(t,e,n,Ye(t))}catch(D){Ai(t,e,{then:function(){},status:"rejected",reason:D},Ye())}finally{it.p=s,f!==null&&m.types!==null&&(f.types=m.types),J.T=f}}function zy(){}function Cc(t,e,l,n){if(t.tag!==5)throw Error(c(476));var a=$h(t).queue;qh(t,a,e,_l,l===null?zy:function(){return Yh(t),l(n)})}function $h(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:_l,baseState:_l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:_l},next:null};var l={};return e.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:l},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Yh(t){var e=$h(t);e.next===null&&(e=t.alternate.memoizedState),Ai(t,e.next.queue,{},Ye())}function Ac(){return ce(Va)}function Vh(){return Jt().memoizedState}function Gh(){return Jt().memoizedState}function Oy(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=Ye();t=Wl(l);var n=Pl(e,t,l);n!==null&&(Oe(n,e,l),Ti(n,e,l)),e={cache:ic()},t.payload=e;return}e=e.return}}function Cy(t,e,l){var n=Ye();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},iu(t)?Xh(e,l):(l=Ir(t,e,l,n),l!==null&&(Oe(l,t,n),Zh(l,e,n)))}function Qh(t,e,l){var n=Ye();Ai(t,e,l,n)}function Ai(t,e,l,n){var a={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(iu(t))Xh(e,a);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var f=e.lastRenderedState,m=s(f,l);if(a.hasEagerState=!0,a.eagerState=m,He(m,f))return Us(t,e,a,0),wt===null&&ks(),!1}catch{}finally{}if(l=Ir(t,e,a,n),l!==null)return Oe(l,t,n),Zh(l,e,n),!0}return!1}function wc(t,e,l,n){if(n={lane:2,revertLane:_o(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},iu(t)){if(e)throw Error(c(479))}else e=Ir(t,l,n,2),e!==null&&Oe(e,t,2)}function iu(t){var e=t.alternate;return t===ut||e!==null&&e===ut}function Xh(t,e){Sa=Ws=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function Zh(t,e,l){if((l&4194048)!==0){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,Kf(t,l)}}var su={readContext:ce,use:eu,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useLayoutEffect:Zt,useInsertionEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useSyncExternalStore:Zt,useId:Zt,useHostTransitionStatus:Zt,useFormState:Zt,useActionState:Zt,useOptimistic:Zt,useMemoCache:Zt,useCacheRefresh:Zt,useEffectEvent:Zt},Kh={readContext:ce,use:eu,useCallback:function(t,e){return xe().memoizedState=[t,e===void 0?null:e],t},useContext:ce,useEffect:Ah,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,nu(4194308,4,kh.bind(null,e,t),l)},useLayoutEffect:function(t,e){return nu(4194308,4,t,e)},useInsertionEffect:function(t,e){nu(4,2,t,e)},useMemo:function(t,e){var l=xe();e=e===void 0?null:e;var n=t();if($n){Vl(!0);try{t()}finally{Vl(!1)}}return l.memoizedState=[n,e],n},useReducer:function(t,e,l){var n=xe();if(l!==void 0){var a=l(e);if($n){Vl(!0);try{l(e)}finally{Vl(!1)}}}else a=e;return n.memoizedState=n.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},n.queue=t,t=t.dispatch=Cy.bind(null,ut,t),[n.memoizedState,t]},useRef:function(t){var e=xe();return t={current:t},e.memoizedState=t},useState:function(t){t=Tc(t);var e=t.queue,l=Qh.bind(null,ut,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:zc,useDeferredValue:function(t,e){var l=xe();return Oc(l,t,e)},useTransition:function(){var t=Tc(!1);return t=qh.bind(null,ut,t.queue,!0,!1),xe().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var n=ut,a=xe();if(ot){if(l===void 0)throw Error(c(407));l=l()}else{if(l=e(),wt===null)throw Error(c(349));(ht&127)!==0||ph(n,e,l)}a.memoizedState=l;var s={value:l,getSnapshot:e};return a.queue=s,Ah(vh.bind(null,n,s,t),[t]),n.flags|=2048,Ea(9,{destroy:void 0},gh.bind(null,n,s,l,e),null),l},useId:function(){var t=xe(),e=wt.identifierPrefix;if(ot){var l=dl,n=fl;l=(n&~(1<<32-ke(n)-1)).toString(32)+l,e="_"+e+"R_"+l,l=Ps++,0<l&&(e+="H"+l.toString(32)),e+="_"}else l=_y++,e="_"+e+"r_"+l.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:Ac,useFormState:Nh,useActionState:Nh,useOptimistic:function(t){var e=xe();e.memoizedState=e.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=l,e=wc.bind(null,ut,!0,l),l.dispatch=e,[t,e]},useMemoCache:Sc,useCacheRefresh:function(){return xe().memoizedState=Oy.bind(null,ut)},useEffectEvent:function(t){var e=xe(),l={impl:t};return e.memoizedState=l,function(){if((jt&2)!==0)throw Error(c(440));return l.impl.apply(void 0,arguments)}}},Jh={readContext:ce,use:eu,useCallback:Hh,useContext:ce,useEffect:Rc,useImperativeHandle:Uh,useInsertionEffect:Dh,useLayoutEffect:Mh,useMemo:Lh,useReducer:lu,useRef:Ch,useState:function(){return lu(Ml)},useDebugValue:zc,useDeferredValue:function(t,e){var l=Jt();return Bh(l,Ct.memoizedState,t,e)},useTransition:function(){var t=lu(Ml)[0],e=Jt().memoizedState;return[typeof t=="boolean"?t:Ci(t),e]},useSyncExternalStore:mh,useId:Vh,useHostTransitionStatus:Ac,useFormState:Rh,useActionState:Rh,useOptimistic:function(t,e){var l=Jt();return bh(l,Ct,t,e)},useMemoCache:Sc,useCacheRefresh:Gh,useEffectEvent:wh},Ay={readContext:ce,use:eu,useCallback:Hh,useContext:ce,useEffect:Rc,useImperativeHandle:Uh,useInsertionEffect:Dh,useLayoutEffect:Mh,useMemo:Lh,useReducer:Ec,useRef:Ch,useState:function(){return Ec(Ml)},useDebugValue:zc,useDeferredValue:function(t,e){var l=Jt();return Ct===null?Oc(l,t,e):Bh(l,Ct.memoizedState,t,e)},useTransition:function(){var t=Ec(Ml)[0],e=Jt().memoizedState;return[typeof t=="boolean"?t:Ci(t),e]},useSyncExternalStore:mh,useId:Vh,useHostTransitionStatus:Ac,useFormState:Oh,useActionState:Oh,useOptimistic:function(t,e){var l=Jt();return Ct!==null?bh(l,Ct,t,e):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:Sc,useCacheRefresh:Gh,useEffectEvent:wh};function Dc(t,e,l,n){e=t.memoizedState,l=l(n,e),l=l==null?e:I({},e,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var Mc={enqueueSetState:function(t,e,l){t=t._reactInternals;var n=Ye(),a=Wl(n);a.payload=e,l!=null&&(a.callback=l),e=Pl(t,a,n),e!==null&&(Oe(e,t,n),Ti(e,t,n))},enqueueReplaceState:function(t,e,l){t=t._reactInternals;var n=Ye(),a=Wl(n);a.tag=1,a.payload=e,l!=null&&(a.callback=l),e=Pl(t,a,n),e!==null&&(Oe(e,t,n),Ti(e,t,n))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var l=Ye(),n=Wl(l);n.tag=2,e!=null&&(n.callback=e),e=Pl(t,n,l),e!==null&&(Oe(e,t,l),Ti(e,t,l))}};function Ih(t,e,l,n,a,s,f){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,s,f):e.prototype&&e.prototype.isPureReactComponent?!vi(l,n)||!vi(a,s):!0}function Fh(t,e,l,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(l,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(l,n),e.state!==t&&Mc.enqueueReplaceState(e,e.state,null)}function Yn(t,e){var l=e;if("ref"in e){l={};for(var n in e)n!=="ref"&&(l[n]=e[n])}if(t=t.defaultProps){l===e&&(l=I({},l));for(var a in t)l[a]===void 0&&(l[a]=t[a])}return l}function Wh(t){Ms(t)}function Ph(t){console.error(t)}function tm(t){Ms(t)}function uu(t,e){try{var l=t.onUncaughtError;l(e.value,{componentStack:e.stack})}catch(n){setTimeout(function(){throw n})}}function em(t,e,l){try{var n=t.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function kc(t,e,l){return l=Wl(l),l.tag=3,l.payload={element:null},l.callback=function(){uu(t,e)},l}function lm(t){return t=Wl(t),t.tag=3,t}function nm(t,e,l,n){var a=l.type.getDerivedStateFromError;if(typeof a=="function"){var s=n.value;t.payload=function(){return a(s)},t.callback=function(){em(e,l,n)}}var f=l.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(t.callback=function(){em(e,l,n),typeof a!="function"&&(rn===null?rn=new Set([this]):rn.add(this));var m=n.stack;this.componentDidCatch(n.value,{componentStack:m!==null?m:""})})}function wy(t,e,l,n,a){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(e=l.alternate,e!==null&&Mn(e,l,a,!0),l=oe.current,l!==null){switch(l.tag){case 31:case 13:case 19:return ve===null?zu():l.alternate===null&&Kt===0&&(Kt=3),l.flags&=-257,l.flags|=65536,l.lanes=a,n===Zs?l.flags|=16384:(e=l.updateQueue,e===null?l.updateQueue=new Set([n]):e.add(n),bo(t,n,a)),!1;case 22:return l.flags|=65536,n===Zs?l.flags|=16384:(e=l.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([n])},l.updateQueue=e):(l=e.retryQueue,l===null?e.retryQueue=new Set([n]):l.add(n)),bo(t,n,a)),!1}throw Error(c(435,l.tag))}return bo(t,n,a),zu(),!1}if(ot)return e=oe.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=a,n!==ec&&(t=Error(c(422),{cause:n}),bi(Xe(t,l)))):(n!==ec&&(e=Error(c(423),{cause:n}),bi(Xe(e,l))),t=t.current.alternate,t.flags|=65536,a&=-a,t.lanes|=a,n=Xe(n,l),a=kc(t.stateNode,n,a),fc(t,a),Kt!==4&&(Kt=2)),!1;var s=Error(c(520),{cause:n});if(s=Xe(s,l),Bi===null?Bi=[s]:Bi.push(s),Kt!==4&&(Kt=2),e===null)return!0;n=Xe(n,l),l=e;do{switch(l.tag){case 3:return l.flags|=65536,t=a&-a,l.lanes|=t,t=kc(l.stateNode,n,t),fc(l,t),!1;case 1:if(e=l.type,s=l.stateNode,(l.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(rn===null||!rn.has(s))))return l.flags|=65536,a&=-a,l.lanes|=a,a=lm(a),nm(a,t,l,n),fc(l,a),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var Uc=Error(c(461)),Pt=!1;function ee(t,e,l,n){e.child=t===null?uh(e,null,l,n):qn(e,t.child,l,n)}function am(t,e,l,n,a){l=l.render;var s=e.ref;if("ref"in n){var f={};for(var m in n)m!=="ref"&&(f[m]=n[m])}else f=n;return kn(e),n=yc(t,e,l,f,s,a),m=xc(),t!==null&&!Pt?(bc(t,e,a),kl(t,e,a)):(ot&&m&&qs(e),e.flags|=1,ee(t,e,n,a),e.child)}function im(t,e,l,n,a){if(t===null){var s=l.type;return typeof s=="function"&&!Fr(s)&&s.defaultProps===void 0&&l.compare===null?(e.tag=15,e.type=s,sm(t,e,s,n,a)):(t=Ls(l.type,null,n,e,e.mode,a),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!Gc(t,a)){var f=s.memoizedProps;if(l=l.compare,l=l!==null?l:vi,l(f,n)&&t.ref===e.ref)return kl(t,e,a)}return e.flags|=1,t=Ol(s,n),t.ref=e.ref,t.return=e,e.child=t}function sm(t,e,l,n,a){if(t!==null){var s=t.memoizedProps;if(vi(s,n)&&t.ref===e.ref)if(Pt=!1,e.pendingProps=n=s,Gc(t,a))(t.flags&131072)!==0&&(Pt=!0);else return e.lanes=t.lanes,kl(t,e,a)}return Hc(t,e,l,n,a)}function um(t,e,l,n){var a=n.children,s=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((e.flags&128)!==0){if(s=s!==null?s.baseLanes|l:l,t!==null){for(n=e.child=t.child,a=0;n!==null;)a=a|n.lanes|n.childLanes,n=n.sibling;n=a&~s}else n=0,e.child=null;return rm(t,e,s,l,n)}if((l&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&Qs(e,s!==null?s.cachePool:null),s!==null?oh(e,s):hc(),fh(e);else return n=e.lanes=536870912,rm(t,e,s!==null?s.baseLanes|l:l,l,n)}else s!==null?(Qs(e,s.cachePool),oh(e,s),ln(),e.memoizedState=null):(t!==null&&Qs(e,null),hc(),ln());return ee(t,e,a,l),e.child}function wi(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function rm(t,e,l,n,a){var s=uc();return s=s===null?null:{parent:Ft._currentValue,pool:s},e.memoizedState={baseLanes:l,cachePool:s},t!==null&&Qs(e,null),hc(),fh(e),t!==null&&Mn(t,e,n,!0),e.childLanes=a,null}function ru(t,e){return e=cu({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function cm(t,e,l){return qn(e,t.child,null,l),t=ru(e,e.pendingProps),t.flags|=2,Le(e),e.memoizedState=null,t}function Dy(t,e,l){var n=e.pendingProps,a=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(ot){if(n.mode==="hidden")return t=ru(e,n),e.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},wi(null,t);if(pc(e),(t=kt)?(t=kp(t,Je),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Xl!==null?{id:fl,overflow:dl}:null,retryLane:536870912,hydrationErrors:null},l=Xd(t),l.return=e,e.child=l,ae=e,kt=null)):t=null,t===null)throw Kl(e);return e.lanes=536870912,null}return ru(e,n)}var s=t.memoizedState;if(s!==null){var f=s.dehydrated;if(pc(e),a)if(e.flags&256)e.flags&=-257,e=cm(t,e,l);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(c(558));else if(Pt||Mn(t,e,l,!1),a=(l&t.childLanes)!==0,Pt||a){if(tn.current===null){if(n=wt,n!==null&&(f=Jf(n,l),f!==0&&f!==s.retryLane))throw s.retryLane=f,Cn(t,f),Oe(n,t,f),Uc;zu()}e=cm(t,e,l)}else t=s.treeContext,kt=Fe(f.nextSibling),ae=e,ot=!0,Zl=null,Je=!1,t!==null&&Jd(e,t),e=ru(e,n),e.flags|=134221824;return e}return t=Ol(t.child,{mode:n.mode,children:n.children}),t.ref=e.ref,e.child=t,t.return=e,t}function Ta(t,e){var l=e.ref;if(l===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(c(284));(t===null||t.ref!==l)&&(e.flags|=4194816)}}function Hc(t,e,l,n,a){return kn(e),l=yc(t,e,l,n,void 0,a),n=xc(),t!==null&&!Pt?(bc(t,e,a),kl(t,e,a)):(ot&&n&&qs(e),e.flags|=1,ee(t,e,l,a),e.child)}function om(t,e,l,n,a,s){return kn(e),e.updateQueue=null,l=hh(e,n,l,a),dh(t),n=xc(),t!==null&&!Pt?(bc(t,e,s),kl(t,e,s)):(ot&&n&&qs(e),e.flags|=1,ee(t,e,l,s),e.child)}function fm(t,e,l,n,a){if(kn(e),e.stateNode===null){var s=pa,f=l.contextType;typeof f=="object"&&f!==null&&(s=ce(f)),s=new l(n,s),e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Mc,e.stateNode=s,s._reactInternals=e,s=e.stateNode,s.props=n,s.state=e.memoizedState,s.refs={},cc(e),f=l.contextType,s.context=typeof f=="object"&&f!==null?ce(f):pa,s.state=e.memoizedState,f=l.getDerivedStateFromProps,typeof f=="function"&&(Dc(e,l,f,n),s.state=e.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(f=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),f!==s.state&&Mc.enqueueReplaceState(s,s.state,null),Ri(e,n,s,a),Ni(),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308),n=!0}else if(t===null){s=e.stateNode;var m=e.memoizedProps,x=Yn(l,m);s.props=x;var T=s.context,C=l.contextType;f=pa,typeof C=="object"&&C!==null&&(f=ce(C));var D=l.getDerivedStateFromProps;C=typeof D=="function"||typeof s.getSnapshotBeforeUpdate=="function",m=e.pendingProps!==m,C||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(m||T!==f)&&Fh(e,s,n,f),Fl=!1;var _=e.memoizedState;s.state=_,Ri(e,n,s,a),Ni(),T=e.memoizedState,m||_!==T||Fl?(typeof D=="function"&&(Dc(e,l,D,n),T=e.memoizedState),(x=Fl||Ih(e,l,x,n,_,T,f))?(C||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(e.flags|=4194308)):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=T),s.props=n,s.state=T,s.context=f,n=x):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{s=e.stateNode,oc(t,e),f=e.memoizedProps,C=Yn(l,f),s.props=C,D=e.pendingProps,_=s.context,T=l.contextType,x=pa,typeof T=="object"&&T!==null&&(x=ce(T)),m=l.getDerivedStateFromProps,(T=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(f!==D||_!==x)&&Fh(e,s,n,x),Fl=!1,_=e.memoizedState,s.state=_,Ri(e,n,s,a),Ni();var O=e.memoizedState;f!==D||_!==O||Fl||t!==null&&t.dependencies!==null&&Vs(t.dependencies)?(typeof m=="function"&&(Dc(e,l,m,n),O=e.memoizedState),(C=Fl||Ih(e,l,C,n,_,O,x)||t!==null&&t.dependencies!==null&&Vs(t.dependencies))?(T||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,O,x),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,O,x)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof s.componentDidUpdate!="function"||f===t.memoizedProps&&_===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||f===t.memoizedProps&&_===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=O),s.props=n,s.state=O,s.context=x,n=C):(typeof s.componentDidUpdate!="function"||f===t.memoizedProps&&_===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||f===t.memoizedProps&&_===t.memoizedState||(e.flags|=1024),n=!1)}return s=n,Ta(t,e),n=(e.flags&128)!==0,s||n?(s=e.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:s.render(),e.flags|=1,t!==null&&n?(e.child=qn(e,t.child,null,a),e.child=qn(e,null,l,a)):ee(t,e,l,a),e.memoizedState=s.state,t=e.child):t=kl(t,e,a),t}function dm(t,e,l,n){return wn(),e.flags|=256,ee(t,e,l,n),e.child}var Lc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bc(t){return{baseLanes:t,cachePool:eh()}}function qc(t,e,l){return t=t!==null?t.childLanes&~l:0,e&&(t|=$e),t}function hm(t,e,l){var n=e.pendingProps,a=!1,s=(e.flags&128)!==0,f;if((f=s)||(f=t!==null&&t.memoizedState===null?!1:(fe.current&2)!==0),f&&(a=!0,e.flags&=-129),f=(e.flags&32)!==0,e.flags&=-33,t===null){if(ot){if(a?en(e):ln(),(t=kt)?(t=kp(t,Je),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Xl!==null?{id:fl,overflow:dl}:null,retryLane:536870912,hydrationErrors:null},l=Xd(t),l.return=e,e.child=l,ae=e,kt=null)):t=null,t===null)throw Kl(e);return qo(t)?e.lanes=32:e.lanes=536870912,null}return s=n.children,n=n.fallback,a?(ln(),a=e.mode,s=cu({mode:"hidden",children:s},a),n=An(n,a,l,null),s.return=e,n.return=e,s.sibling=n,e.child=s,n=e.child,n.memoizedState=Bc(l),n.childLanes=qc(t,f,l),e.memoizedState=Lc,wi(null,n)):(en(e),$c(e,s))}var m=t.memoizedState;if(m!==null){var x=m.dehydrated;if(x!==null)return My(t,e,s,f,n,x,m,l)}return a?(ln(),a=n.fallback,s=e.mode,m=t.child,x=m.sibling,n=Ol(m,{mode:"hidden",children:n.children}),n.subtreeFlags=m.subtreeFlags&1206910976,x!==null?a=Ol(x,a):(a=An(a,s,l,null),a.flags|=2),a.return=e,n.return=e,n.sibling=a,e.child=n,wi(null,n),n=e.child,a=t.child.memoizedState,a===null?a=Bc(l):(s=a.cachePool,s!==null?(m=Ft._currentValue,s=s.parent!==m?{parent:m,pool:m}:s):s=eh(),a={baseLanes:a.baseLanes|l,cachePool:s}),n.memoizedState=a,n.childLanes=qc(t,f,l),e.memoizedState=Lc,wi(t.child,n)):(en(e),l=t.child,t=l.sibling,l=Ol(l,{mode:"visible",children:n.children}),l.return=e,l.sibling=null,t!==null&&(f=e.deletions,f===null?(e.deletions=[t],e.flags|=16):f.push(t)),e.child=l,e.memoizedState=null,l)}function $c(t,e){return e=cu({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function cu(t,e){return t=Te(22,t,null,e),t.lanes=0,t}function ou(t,e,l){return qn(e,t.child,null,l),t=$c(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function My(t,e,l,n,a,s,f,m){if(l)return e.flags&256?(en(e),e.flags&=-257,ou(t,e,m)):e.memoizedState!==null?(ln(),e.child=t.child,e.flags|=128,null):(ln(),s=a.fallback,f=e.mode,a=cu({mode:"visible",children:a.children},f),s=An(s,f,m,null),s.flags|=2,a.return=e,s.return=e,a.sibling=s,e.child=a,qn(e,t.child,null,m),a=e.child,a.memoizedState=Bc(m),a.childLanes=qc(t,n,m),e.memoizedState=Lc,wi(null,a));if(en(e),qo(s)){if(n=s.nextSibling&&s.nextSibling.dataset,n)var x=n.dgst;return n=x,n!==""&&(a=Error(c(419)),a.stack="",a.digest=n,bi({value:a,source:null,stack:null})),ou(t,e,m)}if(Pt||Mn(t,e,m,!1),n=(m&t.childLanes)!==0,Pt||n){if(tn.current!==null)return ou(t,e,m);if(n=wt,n!==null&&(a=Jf(n,m),a!==0&&a!==f.retryLane))throw f.retryLane=a,Cn(t,a),Oe(n,t,a),Uc;return Bo(s)||zu(),ou(t,e,m)}return Bo(s)?(e.flags|=192,e.child=t.child,null):(t=f.treeContext,kt=Fe(s.nextSibling),ae=e,ot=!0,Zl=null,Je=!1,t!==null&&Jd(e,t),e=$c(e,a.children),e.flags|=134221824,e)}function mm(t,e,l){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Ys(t.return,e,l)}function pm(t){for(var e=null;t!==null;){var l=t.alternate;l!==null&&Fs(l)===null&&(e=t),t=t.sibling}return e}function fu(t,e,l,n,a,s){var f=t.memoizedState;f===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:a,treeForkCount:s}:(f.isBackwards=e,f.rendering=null,f.renderingStartTime=0,f.last=n,f.tail=l,f.tailMode=a,f.treeForkCount=s)}function Yc(t){var e=t.child;for(t.child=null;e!==null;){var l=e.sibling;e.sibling=t.child,t.child=e,e=l}}function Vc(t,e,l){var n=e.pendingProps,a=n.revealOrder,s=n.tail;n=n.children;var f=fe.current;if(e.flags&128)return zi(e,f),null;var m=(f&2)!==0;if(m?(f=f&1|2,e.flags|=128):f&=1,zi(e,f),a==="backwards"&&t!==null?(Yc(t),ee(t,e,n,l),Yc(t)):ee(t,e,n,l),n=ot?xi:0,!m&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&mm(t,l,e);else if(t.tag===19)mm(t,l,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(a){case"backwards":l=pm(e.child),l===null?(a=e.child,e.child=null):(a=l.sibling,l.sibling=null,Yc(e)),fu(e,!0,a,null,s,n);break;case"unstable_legacy-backwards":for(l=null,a=e.child,e.child=null;a!==null;){if(t=a.alternate,t!==null&&Fs(t)===null){e.child=a;break}t=a.sibling,a.sibling=l,l=a,a=t}fu(e,!0,l,null,s,n);break;case"together":fu(e,!1,null,null,void 0,n);break;case"independent":e.memoizedState=null;break;default:l=pm(e.child),l===null?(a=e.child,e.child=null):(a=l.sibling,l.sibling=null),fu(e,!1,a,l,s,n)}return e.child}function gm(t,e,l){var n=e.pendingProps;return Jl(e,e.type,n.value),ee(t,e,n.children,l),e.child}function kl(t,e,l){if(t!==null&&(e.dependencies=t.dependencies),un|=e.lanes,(l&e.childLanes)===0)if(t!==null){if(Mn(t,e,l,!1),(l&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(c(153));if(e.child!==null){for(t=e.child,l=Ol(t,t.pendingProps),e.child=l,l.return=e;t.sibling!==null;)t=t.sibling,l=l.sibling=Ol(t,t.pendingProps),l.return=e;l.sibling=null}return e.child}function Gc(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&Vs(t)))}function ky(t,e,l){switch(e.tag){case 3:gs(e,e.stateNode.containerInfo),Jl(e,Ft,t.memoizedState.cache),wn();break;case 27:case 5:vr(e);break;case 4:gs(e,e.stateNode.containerInfo);break;case 10:Jl(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,pc(e),null;break;case 13:var n=e.memoizedState;if(n!==null){if(n.dehydrated!==null)return en(e),e.flags|=128,null;n=Mn(t,e,l,!1);var a=e.child.childLanes;return n||(l&a)!==0?hm(t,e,l):(en(e),t=kl(t,e,l),t!==null?t.sibling:null)}en(e);break;case 19:if(e.flags&128)return Vc(t,e,l);if(a=(t.flags&128)!==0,n=(l&e.childLanes)!==0,n||(Mn(t,e,l,!1),n=(l&e.childLanes)!==0),a){if(n)return Vc(t,e,l);e.flags|=128}if(a=e.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),zi(e,fe.current),n)break;return null;case 22:return e.lanes=0,um(t,e,l,e.pendingProps);case 24:Jl(e,Ft,t.memoizedState.cache)}return kl(t,e,l)}function vm(t,e,l){if(t!==null)if(t.memoizedProps!==e.pendingProps)Pt=!0;else{if(!Gc(t,l)&&(e.flags&128)===0)return Pt=!1,ky(t,e,l);Pt=(t.flags&131072)!==0}else Pt=!1,ot&&(e.flags&1048576)!==0&&Kd(e,xi,e.index);switch(e.lanes=0,e.tag){case 16:t:{var n=e.pendingProps;if(t=Ln(e.elementType),e.type=t,typeof t=="function")Fr(t)?(n=Yn(t,n),e.tag=1,e=fm(null,e,t,n,l)):(e.tag=0,e=Hc(null,e,t,n,l));else{if(t!=null){var a=t.$$typeof;if(a===V){e.tag=11,e=am(null,e,t,n,l);break t}else if(a===At){e.tag=14,e=im(null,e,t,n,l);break t}else if(a===It){e.tag=10,e.type=t,e=gm(null,e,l);break t}}throw e=yt(t)||t,Error(c(306,e,""))}}return e;case 0:return Hc(t,e,e.type,e.pendingProps,l);case 1:return n=e.type,a=Yn(n,e.pendingProps),fm(t,e,n,a,l);case 3:t:{if(gs(e,e.stateNode.containerInfo),t===null)throw Error(c(387));n=e.pendingProps;var s=e.memoizedState;a=s.element,oc(t,e),Ri(e,n,null,l);var f=e.memoizedState;if(n=f.cache,Jl(e,Ft,n),n!==s.cache&&ac(e,[Ft],l,!0),Ni(),n=f.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:f.cache},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){e=dm(t,e,n,l);break t}else if(n!==a){a=Xe(Error(c(424)),e),bi(a),e=dm(t,e,n,l);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(kt=Fe(t.firstChild),ae=e,ot=!0,Zl=null,Je=!0,l=uh(e,null,n,l),e.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(wn(),n===a){e=kl(t,e,l);break t}ee(t,e,n,l)}e=e.child}return e;case 26:return Ta(t,e),t===null?(l=Yp(e.type,null,e.pendingProps,null))?e.memoizedState=l:ot||(e.stateNode=jp(e.type,e.pendingProps,$l.current,e)):e.memoizedState=Yp(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return vr(e),t===null&&ot&&(n=e.stateNode=Lp(e.type,e.pendingProps,$l.current),ae=e,Je=!0,a=kt,fn(e.type)?($o=a,kt=Fe(n.firstChild)):kt=a),ee(t,e,e.pendingProps.children,l),Ta(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&ot&&((a=n=kt)&&(n=Ox(n,e.type,e.pendingProps,Je),n!==null?(e.stateNode=n,ae=e,kt=Fe(n.firstChild),Je=!1,a=!0):a=!1),a||Kl(e)),vr(e),a=e.type,s=e.pendingProps,f=t!==null?t.memoizedProps:null,n=s.children,wo(a,s)?n=null:f!==null&&wo(a,f)&&(e.flags|=32),e.memoizedState!==null&&(a=yc(t,e,Ey,null,null,l),Va._currentValue=a),Ta(t,e),ee(t,e,n,l),e.child;case 6:return t===null&&ot&&((t=l=kt)&&(l=Cx(l,e.pendingProps,Je),l!==null?(e.stateNode=l,ae=e,kt=null,t=!0):t=!1),t||Kl(e)),null;case 13:return hm(t,e,l);case 4:return gs(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=qn(e,null,n,l):ee(t,e,n,l),e.child;case 11:return am(t,e,e.type,e.pendingProps,l);case 7:return n=e.pendingProps,Ta(t,e),ee(t,e,n,l),e.child;case 8:return ee(t,e,e.pendingProps.children,l),e.child;case 12:return ee(t,e,e.pendingProps.children,l),e.child;case 10:return gm(t,e,l);case 9:return a=e.type._context,n=e.pendingProps.children,kn(e),a=ce(a),n=n(a),e.flags|=1,ee(t,e,n,l),e.child;case 14:return im(t,e,e.type,e.pendingProps,l);case 15:return sm(t,e,e.type,e.pendingProps,l);case 19:return Vc(t,e,l);case 31:return Dy(t,e,l);case 22:return um(t,e,l,e.pendingProps);case 24:return kn(e),n=ce(Ft),t===null?(a=uc(),a===null&&(a=wt,s=ic(),a.pooledCache=s,s.refCount++,s!==null&&(a.pooledCacheLanes|=l),a=s),e.memoizedState={parent:n,cache:a},cc(e),Jl(e,Ft,a)):((t.lanes&l)!==0&&(oc(t,e),Ri(e,null,null,l),Ni()),a=t.memoizedState,s=e.memoizedState,a.parent!==n?(a={parent:n,cache:n},e.memoizedState=a,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=a),Jl(e,Ft,n)):(n=s.cache,Jl(e,Ft,n),n!==a.cache&&ac(e,[Ft],l,!0))),ee(t,e,e.pendingProps.children,l),e.child;case 30:return e.stateNode===null&&(e.stateNode={autoName:null,paired:null,clones:null,ref:null}),n=e.pendingProps,n.name!=null&&n.name!=="auto"?e.flags|=t===null?18882560:18874368:ot&&qs(e),t!==null&&t.memoizedProps.name!==n.name?e.flags|=4194816:Ta(t,e),ee(t,e,n.children,l),e.child;case 29:throw e.pendingProps}throw Error(c(156,e.tag))}function Ul(t){t.flags|=4}function Qc(t,e,l,n,a){var s;if((s=(t.mode&32)!==0)&&(s=l===null?Xp(e,n):Xp(e,n)&&(n.src!==l.src||n.srcSet!==l.srcSet)),s){if(t.flags|=16777216,(a&335544128)===a)if(t.stateNode.complete)t.flags|=8192;else if(Wm())t.flags|=8192;else throw Bn=Zs,rc}else t.flags&=-16777217}function ym(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Zp(e))if(Wm())t.flags|=8192;else throw Bn=Zs,rc}function du(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?Xf():536870912,t.lanes|=e,Ca|=e)}function Di(t,e){if(!ot)switch(t.tailMode){case"visible":break;case"collapsed":for(var l=t.tail,n=null;l!==null;)l.alternate!==null&&(n=l),l=l.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null;break;default:for(e=t.tail,l=null;e!==null;)e.alternate!==null&&(l=e),e=e.sibling;l===null?t.tail=null:l.sibling=null}}function Ut(t){var e=t.alternate!==null&&t.alternate.child===t.child,l=0,n=0;if(e)for(var a=t.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags&1206910976,n|=a.flags&1206910976,a.return=t,a=a.sibling;else for(a=t.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=t,a=a.sibling;return t.subtreeFlags|=n,t.childLanes=l,e}function Uy(t,e,l){var n=e.pendingProps;switch(tc(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ut(e),null;case 1:return Ut(e),null;case 3:return l=e.stateNode,n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),wl(Ft),la(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(ya(e)?Ul(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,lc())),Ut(e),null;case 26:var a=e.type,s=e.memoizedState;return t===null?(Ul(e),s!==null?(Ut(e),ym(e,s)):(Ut(e),Qc(e,a,null,n,l))):s?s!==t.memoizedState?(Ul(e),Ut(e),ym(e,s)):(Ut(e),e.flags&=-16777217):(t=t.memoizedProps,t!==n&&Ul(e),Ut(e),Qc(e,a,t,n,l)),null;case 27:if(vs(e),l=$l.current,a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&Ul(e);else{if(!n){if(e.stateNode===null)throw Error(c(166));return Ut(e),e.subtreeFlags&=-33554433,null}t=cl.current,ya(e)?Id(e):(t=Lp(a,n,l),e.stateNode=t,Ul(e))}return Ut(e),e.subtreeFlags&=-33554433,null;case 5:if(vs(e),a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&Ul(e);else{if(!n){if(e.stateNode===null)throw Error(c(166));return Ut(e),e.subtreeFlags&=-33554433,null}if(s=cl.current,ya(e))Id(e);else{var f=Gi($l.current);switch(s){case 1:s=f.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:s=f.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":s=f.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":s=f.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":s=f.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof n.is=="string"?f.createElement("select",{is:n.is}):f.createElement("select"),n.multiple?s.multiple=!0:n.size&&(s.size=n.size);break;default:s=typeof n.is=="string"?f.createElement(a,{is:n.is}):f.createElement(a)}}s[re]=e,s[Ee]=n;t:for(f=e.child;f!==null;){if(f.tag===5||f.tag===6)s.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break t;for(;f.sibling===null;){if(f.return===null||f.return===e)break t;f=f.return}f.sibling.return=f.return,f=f.sibling}e.stateNode=s;t:switch(he(s,a,n),a){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break t;case"img":n=!0;break t;default:n=!1}n&&Ul(e)}}return Ut(e),e.subtreeFlags&=-33554433,Qc(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,l),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==n&&Ul(e);else{if(typeof n!="string"&&e.stateNode===null)throw Error(c(166));if(t=$l.current,ya(e)){if(t=e.stateNode,l=e.memoizedProps,n=null,a=ae,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}t[re]=e,t=!!(t.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||vp(t.nodeValue,l)),t||Kl(e,!0)}else t=Gi(t).createTextNode(n),t[re]=e,e.stateNode=t}return Ut(e),null;case 31:if(l=e.memoizedState,t===null||t.memoizedState!==null){if(n=ya(e),l!==null){if(t===null){if(!n)throw Error(c(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(c(557));t[re]=e}else wn(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Ut(e),t=!1}else l=lc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return e.flags&256?(Le(e),e):(Le(e),null);if((e.flags&128)!==0)throw Error(c(558))}return Ut(e),null;case 13:if(n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=ya(e),n!==null&&n.dehydrated!==null){if(t===null){if(!a)throw Error(c(318));if(a=e.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(c(317));a[re]=e}else wn(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Ut(e),a=!1}else a=lc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return e.flags&256?(Le(e),e):(Le(e),null)}return Le(e),(e.flags&128)!==0?(e.lanes=l,e):(l=n!==null,t=t!==null&&t.memoizedState!==null,l&&(n=e.child,a=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(a=n.alternate.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==a&&(n.flags|=2048)),l!==t&&l&&(e.child.flags|=8192),du(e,e.updateQueue),Ut(e),null);case 4:return la(),t===null&&Ro(e.stateNode.containerInfo),e.flags|=67108864,Ut(e),null;case 10:return wl(e.type),Ut(e),null;case 19:if(gc(e),n=e.memoizedState,n===null)return Ut(e),null;if(a=(e.flags&128)!==0,s=n.rendering,s===null)if(a)Di(n,!1);else{if(Kt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(s=Fs(t),s!==null){for(e.flags|=128,Di(n,!1),t=s.updateQueue,e.updateQueue=t,du(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)Qd(l,t),l=l.sibling;return zi(e,fe.current&1|2),ot&&Cl(e,n.treeForkCount),e.child}t=t.sibling}n.tail!==null&&De()>Eu&&(e.flags|=128,a=!0,Di(n,!1),e.lanes=4194304)}else{if(!a)if(t=Fs(s),t!==null){if(e.flags|=128,a=!0,t=t.updateQueue,e.updateQueue=t,du(e,t),Di(n,!0),n.tail===null&&n.tailMode!=="collapsed"&&n.tailMode!=="visible"&&!s.alternate&&!ot)return Ut(e),null}else 2*De()-n.renderingStartTime>Eu&&l!==536870912&&(e.flags|=128,a=!0,Di(n,!1),e.lanes=4194304);n.isBackwards?(s.sibling=e.child,e.child=s):(t=n.last,t!==null?t.sibling=s:e.child=s,n.last=s)}if(n.tail!==null){t=n.tail;t:{for(l=t;l!==null;){if(l.alternate!==null){l=!1;break t}l=l.sibling}l=!0}return n.rendering=t,n.tail=t.sibling,n.renderingStartTime=De(),t.sibling=null,s=fe.current,s=a?s&1|2:s&1,n.tailMode==="visible"||n.tailMode==="collapsed"||!l||ot?zi(e,s):(l=s,Mt(oe,e),Mt(fe,l),ve===null&&(ve=e)),ot&&Cl(e,n.treeForkCount),t}return Ut(e),null;case 22:case 23:return Le(e),mc(),n=e.memoizedState!==null,t!==null?t.memoizedState!==null!==n&&(e.flags|=8192):n&&(e.flags|=8192),n?(l&536870912)!==0&&(e.flags&128)===0&&(Ut(e),e.subtreeFlags&6&&(e.flags|=8192)):Ut(e),l=e.updateQueue,l!==null&&du(e,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),n=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),n!==l&&(e.flags|=2048),t!==null&&ue(Hn),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),wl(Ft),Ut(e),null;case 25:return null;case 30:return e.flags|=33554432,Ut(e),null}throw Error(c(156,e.tag))}function Hy(t,e){switch(tc(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return wl(Ft),la(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return vs(e),null;case 31:if(e.memoizedState!==null){if(Le(e),e.alternate===null)throw Error(c(340));wn()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(Le(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(c(340));wn()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return gc(e),t=e.flags,t&65536?(e.flags=t&-65537|128,t=e.memoizedState,t!==null&&(t.rendering=null,t.tail=null),e.flags|=4,e):null;case 4:return la(),null;case 10:return wl(e.type),null;case 22:case 23:return Le(e),mc(),t!==null&&ue(Hn),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return wl(Ft),null;case 25:return null;default:return null}}function xm(t,e){switch(tc(e),e.tag){case 3:wl(Ft),la();break;case 26:case 27:case 5:vs(e);break;case 4:la();break;case 31:e.memoizedState!==null&&Le(e);break;case 13:Le(e);break;case 19:gc(e);break;case 10:wl(e.type);break;case 22:case 23:Le(e),mc(),t!==null&&ue(Hn);break;case 24:wl(Ft)}}function Mi(t,e){try{var l=e.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var a=n.next;l=a;do{if((l.tag&t)===t){n=void 0;var s=l.create,f=l.inst;n=s(),f.destroy=n}l=l.next}while(l!==a)}}catch(m){zt(e,e.return,m)}}function nn(t,e,l){try{var n=e.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var s=a.next;n=s;do{if((n.tag&t)===t){var f=n.inst,m=f.destroy;if(m!==void 0){f.destroy=void 0,a=e;var x=l,T=m;try{T()}catch(C){zt(a,x,C)}}}n=n.next}while(n!==s)}}catch(C){zt(e,e.return,C)}}function bm(t){var e=t.updateQueue;if(e!==null){var l=t.stateNode;try{ch(e,l)}catch(n){zt(t,t.return,n)}}}function jm(t,e,l){l.props=Yn(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(n){zt(t,e,n)}}function hl(t,e){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var n=t.stateNode;break;case 30:var a=t.stateNode,s=Rl(t.memoizedProps,a);(a.ref===null||a.ref.name!==s)&&(a.ref=zp(s)),n=a.ref;break;case 7:if(t.stateNode===null){var f=new Ve(t);y(t.child,!1,Rx,f,void 0,void 0),t.stateNode=f}n=t.stateNode;break;default:n=t.stateNode}typeof l=="function"?t.refCleanup=l(n):l.current=n}}catch(m){zt(t,e,m)}}function de(t,e){var l=t.ref,n=t.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(a){zt(t,e,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(a){zt(t,e,a)}else l.current=null}function hu(t,e){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&e!==null)for(var l=0;l<e.length;l++)Mp(t.stateNode,e[l])}function Sm(t){for(var e=t.return;e!==null&&(Zc(e)&&Mp(t.stateNode,e.stateNode),!Xc(e));)e=e.return}function ki(t){for(var e=t.return;e!==null&&(Zc(e)&&zx(t.stateNode,e.stateNode),!Xc(e));)e=e.return}function Xc(t){return t.tag===5||t.tag===3||t.tag===27}function Zc(t){return t&&t.tag===7&&t.stateNode!==null}function Kc(t){var e=t.type,l=t.memoizedProps,n=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break t;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(a){zt(t,t.return,a)}}function Jc(t,e,l){try{var n=t.stateNode;cx(n,t.type,l,e),n[Ee]=e}catch(a){zt(t,t.return,a)}}function _m(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&fn(t.type)||t.tag===4}function Ic(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||_m(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&fn(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Fc(t,e,l,n){var a=t.tag;if(a===5||a===6)a=t.stateNode,e?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(a,e):(e=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,e.appendChild(a),l=l._reactRootContainer,l!=null||e.onclick!==null||(e.onclick=ol)),hu(t,n),xt=!0;else if(a!==4&&(a===27&&(hu(t,n),n=null,fn(t.type)&&(l=t.stateNode,e=null)),t=t.child,t!==null))for(Fc(t,e,l,n),t=t.sibling;t!==null;)Fc(t,e,l,n),t=t.sibling}function mu(t,e,l,n){var a=t.tag;if(a===5||a===6)a=t.stateNode,e?l.insertBefore(a,e):l.appendChild(a),hu(t,n),xt=!0;else if(a!==4&&(a===27&&(hu(t,n),n=null,fn(t.type)&&(l=t.stateNode)),t=t.child,t!==null))for(mu(t,e,l,n),t=t.sibling;t!==null;)mu(t,e,l,n),t=t.sibling}function Em(t){var e=t.stateNode,l=t.memoizedProps;try{for(var n=t.type,a=e.attributes;a.length;)e.removeAttributeNode(a[0]);he(e,n,l),e[re]=t,e[Ee]=l}catch(s){zt(t,t.return,s)}}var pu=!1,Be=null;function Tm(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(pu=!0)}var ml=null;function Nm(){var t=ml;return ml=null,t}var Ne=0;function Na(t,e,l,n,a){return Ne=0,Rm(t.child,e,l,n,a)}function Rm(t,e,l,n,a){for(var s=!1;t!==null;){if(t.tag===5){var f=t.stateNode;if(n!==null){var m=ko(f);n.push(m),m.view&&(s=!0)}else s||ko(f).view&&(s=!0);pu=!0,Np(f,Ne===0?e:e+"_"+Ne,l),Ne++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&a||Rm(t.child,e,l,n,a)&&(s=!0));t=t.sibling}return s}function pl(t,e){for(;t!==null;)t.tag===5?Rp(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&e||pl(t.child,e)),t=t.sibling}function gu(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(gu(t),t.tag===30&&(t.flags&18874368)!==0&&t.stateNode.paired)){var e=t.memoizedProps;if(e.name==null||e.name==="auto")throw Error(c(544));var l=e.name;e=zl(e.default,e.share),e!=="none"&&(Na(t,l,e,null,!1)||pl(t.child,!1))}t=t.sibling}}function Wc(t,e){if(t.tag===30){var l=t.stateNode,n=t.memoizedProps,a=Rl(n,l),s=zl(n.default,l.paired?n.share:n.enter);s!=="none"?Na(t,a,s,null,!1)?(gu(t),l.paired||e||Ma(t,n.onEnter)):pl(t.child,!1):gu(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Wc(t,e),t=t.sibling;else gu(t)}function Pc(t){if(Be!==null&&Be.size!==0){var e=Be;if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var l=t.memoizedProps,n=l.name;if(n!=null&&n!=="auto"){var a=e.get(n);if(a!==void 0){var s=zl(l.default,l.share);if(s!=="none"&&(Na(t,n,s,null,!1)?(s=t.stateNode,a.paired=s,s.paired=a,Ma(t,l.onShare)):pl(t.child,!1)),e.delete(n),e.size===0)break}}}Pc(t)}t=t.sibling}}}function to(t){if(t.tag===30){var e=t.memoizedProps,l=Rl(e,t.stateNode),n=Be!==null?Be.get(l):void 0,a=zl(e.default,n!==void 0?e.share:e.exit);a!=="none"&&(Na(t,l,a,null,!1)?n!==void 0?(a=t.stateNode,n.paired=a,a.paired=n,Be.delete(l),Ma(t,e.onShare)):Ma(t,e.onExit):pl(t.child,!1)),Be!==null&&Pc(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)to(t),t=t.sibling;else Be!==null&&Pc(t)}function zm(t){for(t=t.child;t!==null;){if(t.tag===30){var e=t.memoizedProps,l=Rl(e,t.stateNode);e=zl(e.default,e.update),t.flags&=-5,e!=="none"&&Na(t,l,e,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&zm(t);t=t.sibling}}function eo(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var e=t.stateNode;e.paired!==null&&(e.paired=null,pl(t.child,!1))}eo(t)}t=t.sibling}}function vu(t){if(t.tag===30)t.stateNode.paired=null,pl(t.child,!1),eo(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)vu(t),t=t.sibling;else eo(t)}function Om(t){for(t=t.child;t!==null;)t.tag===30?pl(t.child,!1):(t.subtreeFlags&33554432)!==0&&Om(t),t=t.sibling}function lo(t,e,l,n,a,s,f){for(var m=!1;e!==null;){if(e.tag===5){var x=e.stateNode;if(s!==null&&Ne<s.length){var T=s[Ne],C=ko(x);(T.view||C.view)&&(m=!0);var D;if(D=(t.flags&4)===0)if(C.clip)D=!0;else{D=T.rect;var _=C.rect;D=D.y!==_.y||D.x!==_.x||D.height!==_.height||D.width!==_.width}D&&(t.flags|=4),C.abs?C=!T.abs:(T=T.rect,C=C.rect,C=T.height!==C.height||T.width!==C.width),C&&(t.flags|=32)}else t.flags|=32;(t.flags&4)!==0&&Np(x,Ne===0?l:l+"_"+Ne,a),m&&(t.flags&4)!==0||(ml===null&&(ml=[]),ml.push(x,Ne===0?n:n+"_"+Ne,e.memoizedProps)),Ne++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&f?t.flags|=e.flags&32:lo(t,e.child,l,n,a,s,f)&&(m=!0));e=e.sibling}return m}function Cm(t,e){for(t=t.child;t!==null;){if(t.tag===30){var l=t.memoizedProps,n=t.stateNode,a=Rl(l,n),s=zl(l.default,l.update),f;f=t.memoizedState,t.memoizedState=null,n=t;var m=t.child;Ne=0,a=lo(n,m,a,a,s,f,!1),(t.flags&4)!==0&&a&&Ma(t,l.onUpdate)}else(t.subtreeFlags&33554432)!==0&&Cm(t);t=t.sibling}}var ie=!1,Et=!1,gl=!1,no=!1,Am=typeof WeakSet=="function"?WeakSet:Set,se=null,vl=!1,Ui=!1,yu=!1,ao=!1;function Ly(t,e,l){if(t=t.containerInfo,Co=Ga,t=kd(t),Gr(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var s=a.anchorOffset,f=a.focusNode;a=a.focusOffset;try{n.nodeType,f.nodeType}catch{n=null;break t}var m=0,x=-1,T=-1,C=0,D=0,_=t,O=null;e:for(;;){for(var Y;_!==n||s!==0&&_.nodeType!==3||(x=m+s),_!==f||a!==0&&_.nodeType!==3||(T=m+a),_.nodeType===3&&(m+=_.nodeValue.length),(Y=_.firstChild)!==null;)O=_,_=Y;for(;;){if(_===t)break e;if(O===n&&++C===s&&(x=m),O===f&&++D===a&&(T=m),(Y=_.nextSibling)!==null)break;_=O,O=_.parentNode}_=Y}n=x===-1||T===-1?null:{start:x,end:T}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ao={focusedElem:t,selectionRange:n},Ga=!1,l=(l&335544064)===l,se=e,e=l?9270:1024;se!==null;){if(t=se,l&&(n=t.deletions,n!==null))for(s=0;s<n.length;s++)l&&to(n[s]);if(t.alternate===null&&(t.flags&2)!==0)l&&Tm(t),xu(l);else{if(t.tag===22){if(n=t.alternate,t.memoizedState!==null){n!==null&&n.memoizedState===null&&l&&to(n),xu(l);continue}else if(n!==null&&n.memoizedState!==null){l&&Tm(t),xu(l);continue}}n=t.child,(t.subtreeFlags&e)!==0&&n!==null?(n.return=t,se=n):(l&&zm(t),xu(l))}}Be=null}function xu(t){for(;se!==null;){var e=se,l=t,n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 15:break;case 1:if((a&1024)!==0&&n!==null){l=void 0,a=n.memoizedProps,n=n.memoizedState;var s=e.stateNode;try{var f=Yn(e.type,a);l=s.getSnapshotBeforeUpdate(f,n),s.__reactInternalSnapshotBeforeUpdate=l}catch(m){zt(e,e.return,m)}}break;case 3:if((a&1024)!==0){if(n=e.stateNode.containerInfo,l=n.nodeType,l===9)Lo(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Lo(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:l&&n!==null&&(l=Rl(n.memoizedProps,n.stateNode),a=e.memoizedProps,a=zl(a.default,a.update),a!=="none"&&Na(n,l,a,n.memoizedState=[],!0));break;default:if((a&1024)!==0)throw Error(c(163))}if(n=e.sibling,n!==null){n.return=e.return,se=n;break}se=e.return}}function wm(t,e,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:yl(t,l),n&4&&Mi(5,l);break;case 1:if(yl(t,l),n&4)if(t=l.stateNode,e===null)try{t.componentDidMount()}catch(f){zt(l,l.return,f)}else{var a=Yn(l.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(a,e,t.__reactInternalSnapshotBeforeUpdate)}catch(f){zt(l,l.return,f)}}n&64&&bm(l),n&512&&hl(l,l.return);break;case 3:if(yl(t,l),n&64&&(t=l.updateQueue,t!==null)){if(e=null,l.child!==null)switch(l.child.tag){case 27:case 5:e=l.child.stateNode;break;case 1:e=l.child.stateNode}try{ch(t,e)}catch(f){zt(l,l.return,f)}}break;case 27:e===null&&n&4&&Em(l);case 26:case 5:yl(t,l),e===null&&n&4&&Kc(l),n&512&&hl(l,l.return);break;case 12:yl(t,l);break;case 31:yl(t,l),n&4&&Um(t,l);break;case 13:yl(t,l),n&4&&Hm(t,l),n&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=Iy.bind(null,l),Ax(t,l))));break;case 22:if(n=l.memoizedState!==null||ie,!n){var s=e!==null&&e.memoizedState!==null||Et;e=ie,a=Et,ie=n,(Et=s)&&!a?(n=2,(l.subtreeFlags&8772)!==0&&(n|=1),al(t,l,n)):yl(t,l),ie=e,Et=a}break;case 30:yl(t,l),n&512&&hl(l,l.return);break;case 7:n&512&&hl(l,l.return);default:yl(t,l)}}function io(t,e){for(t=t.child;t!==null;)Dm(t,e),t=t.sibling}function Dm(t,e){switch(t.tag){case 5:case 26:try{var l=t.stateNode;if(e){var n=l.style;typeof n.setProperty=="function"?n.setProperty("display","none","important"):n.display="none"}else{var a=t.stateNode,s=t.memoizedProps.style,f=s!=null&&s.hasOwnProperty("display")?s.display:null;a.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(x){zt(t,t.return,x)}so(t,e);break;case 6:try{t.stateNode.nodeValue=e?"":t.memoizedProps,xt=!0}catch(x){zt(t,t.return,x)}break;case 18:try{var m=t.stateNode;e?Tp(m,!0):Tp(t.stateNode,!1)}catch(x){zt(t,t.return,x)}break;case 22:case 23:t.memoizedState===null&&io(t,e);break;default:io(t,e)}}function so(t,e){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){t:{var l=t,n=e;switch(l.tag){case 4:Dm(l,n);break t;case 22:l.memoizedState===null&&so(l,n);break t;default:so(l,n)}}t=t.sibling}}function Mm(t){var e=t.alternate;e!==null&&(t.alternate=null,Mm(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&Es(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var qt=null,Re=!1;function ll(t,e,l){for(l=l.child;l!==null;)km(t,e,l),l=l.sibling}function km(t,e,l){if(Me&&typeof Me.onCommitFiberUnmount=="function")try{Me.onCommitFiberUnmount(ii,l)}catch{}switch(l.tag){case 26:Et||de(l,e),ll(t,e,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!Et&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Et||de(l,e),ki(l);var n=qt,a=Re;fn(l.type)&&(qt=l.stateNode,Re=!1),ll(t,e,l),Bp(l.stateNode,l.type,l.memoizedProps),qt=n,Re=a;break;case 5:Et||de(l,e),ki(l);case 6:if(l.tag===6&&ki(l),n=qt,a=Re,qt=null,ll(t,e,l),qt=n,Re=a,qt!==null)if(Re)try{(qt.nodeType===9?qt.body:qt.nodeName==="HTML"?qt.ownerDocument.body:qt).removeChild(l.stateNode),xt=!0}catch(s){zt(l,e,s)}else try{qt.removeChild(l.stateNode),xt=!0}catch(s){zt(l,e,s)}break;case 18:qt!==null&&(Re?(t=qt,Ep(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Qa(t)):Ep(qt,l.stateNode));break;case 4:n=qt,a=Re,qt=l.stateNode.containerInfo,Re=!0,ll(t,e,l),qt=n,Re=a;break;case 0:case 11:case 14:case 15:nn(2,l,e),Et||nn(4,l,e),ll(t,e,l);break;case 1:Et||(de(l,e),n=l.stateNode,typeof n.componentWillUnmount=="function"&&jm(l,e,n)),ll(t,e,l);break;case 21:ll(t,e,l);break;case 22:Et=(n=Et)||l.memoizedState!==null,ll(t,e,l),Et=n;break;case 30:de(l,e),ll(t,e,l);break;case 7:Et||de(l,e),ll(t,e,l);break;default:ll(t,e,l)}}function Um(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Qa(t)}catch(l){zt(e,e.return,l)}}}function Hm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Qa(t)}catch(l){zt(e,e.return,l)}}function By(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new Am),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new Am),e;default:throw Error(c(435,t.tag))}}function bu(t,e){var l=By(t);e.forEach(function(n){if(!l.has(n)){l.add(n);var a=Fy.bind(null,t,n);n.then(a,a)}})}function be(t,e,l){var n=e.deletions;if(n!==null)for(var a=0;a<n.length;a++){var s=n[a],f=t,m=e,x=m;t:for(;x!==null;){switch(x.tag){case 27:if(fn(x.type)){qt=x.stateNode,Re=!1;break t}break;case 5:qt=x.stateNode,Re=!1;break t;case 3:case 4:qt=x.stateNode.containerInfo,Re=!0;break t}x=x.return}if(qt===null)throw Error(c(160));km(f,m,s),qt=null,Re=!1,f=s.alternate,f!==null&&(f.return=null),s.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)Lm(e,t,l),e=e.sibling}var nl=null;function Lm(t,e,l){var n=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(a&4&&(n=t.updateQueue,n=n!==null?n.events:null,n!==null))for(var s=0;s<n.length;s++){var f=n[s];f.ref.impl=f.nextImpl}be(e,t,l),je(t),a&4&&(nn(3,t,t.return),Mi(3,t),nn(5,t,t.return));break;case 1:be(e,t,l),je(t),a&512&&(Et||n===null||de(n,n.return)),a&64&&ie&&(t=t.updateQueue,t!==null&&(e=t.callbacks,e!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?e:l.concat(e))));break;case 26:if(s=nl,be(e,t,l),je(t),a&512&&(Et||n===null||de(n,n.return)),a&4)if(a=n!==null?n.memoizedState:null,l=t.memoizedState,n===null)if(l===null)if(t.stateNode===null)if(ie)t.stateNode=jp(t.type,t.memoizedProps,e.containerInfo,t);else{t:{e=t.type,l=t.memoizedProps,a=s.ownerDocument||s;e:switch(e){case"title":n=a.getElementsByTagName("title")[0],(!n||n[ri]||n[re]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=a.createElement(e),a.head.insertBefore(n,a.querySelector("head > title"))),he(n,e,l),n[re]=t,ne(n),e=n;break t;case"link":if(s=Qp("link","href",a).get(e+(l.href||""))){for(f=0;f<s.length;f++)if(n=s[f],n.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&n.getAttribute("rel")===(l.rel==null?null:l.rel)&&n.getAttribute("title")===(l.title==null?null:l.title)&&n.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){s.splice(f,1);break e}}n=a.createElement(e),he(n,e,l),a.head.appendChild(n);break;case"meta":if(s=Qp("meta","content",a).get(e+(l.content||""))){for(f=0;f<s.length;f++)if(n=s[f],n.getAttribute("content")===(l.content==null?null:""+l.content)&&n.getAttribute("name")===(l.name==null?null:l.name)&&n.getAttribute("property")===(l.property==null?null:l.property)&&n.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&n.getAttribute("charset")===(l.charSet==null?null:l.charSet)){s.splice(f,1);break e}}n=a.createElement(e),he(n,e,l),a.head.appendChild(n);break;default:throw Error(c(468,e))}n[re]=t,ne(n),e=n}t.stateNode=e}else ie||Qo(s,t.type,t.stateNode);else t.stateNode=Gp(s,l,t.memoizedProps);else a!==l?(a===null?(e=n.stateNode,e===null||Et||e.parentNode.removeChild(e)):a.count--,l===null?ie||Qo(s,t.type,t.stateNode):Gp(s,l,t.memoizedProps)):l===null&&t.stateNode!==null&&Jc(t,t.memoizedProps,n.memoizedProps);break;case 27:be(e,t,l),je(t),a&512&&(Et||n===null||de(n,n.return)),n!==null&&a&4&&Jc(t,t.memoizedProps,n.memoizedProps);break;case 5:if(s=gl,gl=!1,be(e,t,l),gl=s,je(t),a&512&&(Et||n===null||de(n,n.return)),t.flags&32){e=t.stateNode;try{ra(e,""),xt=!0}catch(C){zt(t,t.return,C)}}a&4&&t.stateNode!=null&&(e=t.memoizedProps,Jc(t,e,n!==null?n.memoizedProps:e)),a&1024&&(no=!0);break;case 6:if(be(e,t,l),je(t),a&4){if(t.stateNode===null)throw Error(c(162));e=t.memoizedProps,l=t.stateNode;try{l.nodeValue=e,xt=!0}catch(C){zt(t,t.return,C)}}break;case 3:if(xt=!1,ku=null,s=nl,nl=Qi(e.containerInfo),be(e,t,l),nl=s,je(t),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Qa(e.containerInfo)}catch(C){zt(t,t.return,C)}no&&(no=!1,Bm(t)),xt=!1;break;case 4:a=gl,gl=ie,n=id(),s=nl,nl=Qi(t.stateNode.containerInfo),be(e,t,l),je(t),nl=s,xt&&Ui&&(yu=!0),xt=n,gl=a;break;case 12:be(e,t,l),je(t);break;case 31:be(e,t,l),je(t),a&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,bu(t,e)));break;case 13:be(e,t,l),je(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(_u=De()),a&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,bu(t,e)));break;case 22:s=t.memoizedState!==null,f=n!==null&&n.memoizedState!==null;var m=ie,x=Et,T=gl;ie=m||s,gl=T||s,Et=x||f,be(e,t,l),Et=x,gl=T,ie=m,je(t),a&8192&&(e=t.stateNode,e._visibility=s?e._visibility&-2:e._visibility|1,!s||n===null||f||ie||Et||(e=f||Et,l=ie,n=Et,ie=s||ie,Et=e,an(t,2),ie=l,Et=n),!s&&gl||io(t,s)),a&4&&(e=t.updateQueue,e!==null&&(l=e.retryQueue,l!==null&&(e.retryQueue=null,bu(t,l))));break;case 19:be(e,t,l),je(t),a&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,bu(t,e)));break;case 30:a&512&&(Et||n===null||de(n,n.return)),a=id(),s=Ui,f=(l&335544064)===l,m=t.memoizedProps,Ui=f&&zl(m.default,m.update)!=="none",be(e,t,l),je(t),f&&n!==null&&xt&&(t.flags|=4),Ui=s,xt=a;break;case 21:break;case 7:a&512&&(Et||n===null||de(n,n.return)),n&&n.stateNode!==null&&(n.stateNode._fragmentFiber=t);default:be(e,t,l),je(t)}}function je(t){var e=t.flags;if(e&2){try{for(var l,n=t.return;n!==null;){if(_m(n)){l=n;break}n=n.return}n=null;for(var a=t.return;a!==null;){if(Zc(a)){var s=a.stateNode;n===null?n=[s]:n.push(s)}if(Xc(a))break;a=a.return}var f=n;if(l==null)throw Error(c(160));switch(l.tag){case 27:var m=l.stateNode,x=Ic(t);mu(t,x,m,f);break;case 5:var T=l.stateNode;l.flags&32&&(ra(T,""),l.flags&=-33);var C=Ic(t);mu(t,C,T,f);break;case 3:case 4:var D=l.stateNode.containerInfo,_=Ic(t);Fc(t,_,D,f);break;default:throw Error(c(161))}}catch(O){zt(t,t.return,O)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Bm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;Bm(e),e.tag===5&&e.flags&1024&&(e=e.stateNode,Ga=!0,e.reset(),Ga=!1),t=t.sibling}}function Ra(t,e){if(e.subtreeFlags&9270)for(e=e.child;e!==null;)qm(e,t),e=e.sibling;else Cm(e)}function qm(t,e){var l=t.alternate;if(l===null)Wc(t,!1);else switch(t.tag){case 3:if(ao=vl=!1,Nm(),Ra(e,t),!vl&&!yu){if(t=ml,t!==null)for(var n=0;n<t.length;n+=3){l=t[n];var a=t[n+1];Rp(l,t[n+2]),l=l.ownerDocument.documentElement,l!==null&&l.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+a+")"})}t=e.containerInfo,t=t.nodeType===9?t.documentElement:t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName===""&&(t.style.viewTransitionName="none",t.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),t.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),ao=!0}ml=null;break;case 5:Ra(e,t);break;case 4:n=vl,vl=!1,Ra(e,t),vl&&(yu=!0),vl=n;break;case 22:t.memoizedState===null&&(l.memoizedState!==null?Wc(t,!1):Ra(e,t));break;case 30:n=vl,a=Nm(),vl=!1,Ra(e,t),vl&&(t.flags|=4);var s=t.memoizedProps,f=t.stateNode;e=Rl(s,f),f=Rl(l.memoizedProps,f);var m=zl(s.default,s.update);m==="none"?e=!1:(s=l.memoizedState,l.memoizedState=null,l=t.child,Ne=0,e=lo(t,l,e,f,m,s,!0),Ne!==(s===null?0:s.length)&&(t.flags|=32)),(t.flags&4)!==0&&e?(Ma(t,t.memoizedProps.onUpdate),ml=a):a!==null&&(a.push.apply(a,ml),ml=a),vl=(t.flags&32)!==0?!0:n;break;default:Ra(e,t)}}function yl(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)wm(t,e.alternate,e),e=e.sibling}function an(t,e){for(t=t.child;t!==null;){var l=t,n=e;switch(l.tag){case 0:case 11:case 14:case 15:nn(4,l,l.return),an(l,n);break;case 1:de(l,l.return);var a=l.stateNode;typeof a.componentWillUnmount=="function"&&jm(l,l.return,a),an(l,n);break;case 27:(n&2)!==0&&Bp(l.stateNode,l.type,l.memoizedProps);case 5:de(l,l.return),l.tag!==5&&l.tag!==27||ki(l),an(l,n);break;case 6:ki(l);break;case 26:de(l,l.return),a=l.stateNode,l.memoizedState!==null||a===null||Et||a.parentNode.removeChild(a),an(l,n);break;case 22:l.memoizedState===null&&an(l,n);break;case 30:de(l,l.return),an(l,n);break;case 7:de(l,l.return);default:an(l,n)}t=t.sibling}}function al(t,e,l){for(l=(e.subtreeFlags&8772)!==0?l:l&-2,e=e.child;e!==null;){var n=e.alternate,a=t,s=e,f=s.flags,m=(l&1)!==0;switch(s.tag){case 0:case 11:case 15:al(a,s,l),Mi(4,s);break;case 1:if(al(a,s,l),n=s,a=n.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(C){zt(n,n.return,C)}if(n=s,a=n.updateQueue,a!==null){var x=n.stateNode;try{var T=a.shared.hiddenCallbacks;if(T!==null)for(a.shared.hiddenCallbacks=null,a=0;a<T.length;a++)rh(T[a],x)}catch(C){zt(n,n.return,C)}}m&&f&64&&bm(s),hl(s,s.return);break;case 27:(l&2)!==0&&Em(s);case 5:s.tag!==5&&s.tag!==27||Sm(s),al(a,s,l),m&&n===null&&f&4&&Kc(s),hl(s,s.return);break;case 6:Sm(s);break;case 26:x=s.stateNode,s.memoizedState!==null||x===null||ie||Qo(Qi(x.ownerDocument),s.type,x),al(a,s,l),m&&n===null&&f&4&&Kc(s),hl(s,s.return);break;case 12:al(a,s,l);break;case 31:al(a,s,l),m&&f&4&&Um(a,s);break;case 13:al(a,s,l),m&&f&4&&Hm(a,s);break;case 22:s.memoizedState===null&&al(a,s,l),hl(s,s.return);break;case 30:al(a,s,l),hl(s,s.return);break;case 7:hl(s,s.return);default:al(a,s,l)}e=e.sibling}}function uo(t,e){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&ji(l))}function ro(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&ji(t))}function Ie(t,e,l,n){var a=(l&335544064)===l;if(e.subtreeFlags&(a?10262:10256))for(e=e.child;e!==null;)$m(t,e,l,n),e=e.sibling;else a&&Om(e)}function $m(t,e,l,n){var a=(l&335544064)===l;a&&e.alternate===null&&e.return!==null&&e.return.alternate!==null&&vu(e);var s=e.flags;switch(e.tag){case 0:case 11:case 15:Ie(t,e,l,n),s&2048&&Mi(9,e);break;case 1:Ie(t,e,l,n);break;case 3:Ie(t,e,l,n),a&&ao&&(t=t.containerInfo,t=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,t.style.viewTransitionName==="root"&&(t.style.viewTransitionName=""),t=t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName==="none"&&(t.style.viewTransitionName="")),s&2048&&(s=null,e.alternate!==null&&(s=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==s&&(e.refCount++,s!=null&&ji(s)));break;case 12:if(s&2048){Ie(t,e,l,n),s=e.stateNode;try{var f=e.memoizedProps,m=f.id,x=f.onPostCommit;typeof x=="function"&&x(m,e.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(T){zt(e,e.return,T)}}else Ie(t,e,l,n);break;case 31:Ie(t,e,l,n);break;case 13:Ie(t,e,l,n);break;case 23:break;case 22:f=e.stateNode,m=e.alternate,e.memoizedState!==null?(a&&m!==null&&m.memoizedState===null&&vu(m),f._visibility&2?Ie(t,e,l,n):Hi(t,e)):(a&&m!==null&&m.memoizedState!==null&&vu(e),f._visibility&2?Ie(t,e,l,n):(f._visibility|=2,za(t,e,l,n,(e.subtreeFlags&10256)!==0||!1))),s&2048&&uo(m,e);break;case 24:Ie(t,e,l,n),s&2048&&ro(e.alternate,e);break;case 30:a&&(s=e.alternate,s!==null&&(pl(s.child,!0),pl(e.child,!0))),Ie(t,e,l,n);break;default:Ie(t,e,l,n)}}function za(t,e,l,n,a){for(a=a&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var s=t,f=e,m=l,x=n,T=f.flags;switch(f.tag){case 0:case 11:case 15:za(s,f,m,x,a),Mi(8,f);break;case 23:break;case 22:var C=f.stateNode;f.memoizedState!==null?C._visibility&2?za(s,f,m,x,a):Hi(s,f):(C._visibility|=2,za(s,f,m,x,a)),a&&T&2048&&uo(f.alternate,f);break;case 24:za(s,f,m,x,a),a&&T&2048&&ro(f.alternate,f);break;default:za(s,f,m,x,a)}e=e.sibling}}function Hi(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var l=t,n=e,a=n.flags;switch(n.tag){case 22:Hi(l,n),a&2048&&uo(n.alternate,n);break;case 24:Hi(l,n),a&2048&&ro(n.alternate,n);break;default:Hi(l,n)}e=e.sibling}}var Vn=8192;function Gn(t,e,l){if(t.subtreeFlags&Vn)for(t=t.child;t!==null;)Ym(t,e,l),t=t.sibling}function Ym(t,e,l){switch(t.tag){case 26:Gn(t,e,l),t.flags&Vn&&(t.memoizedState!==null?Qx(l,nl,t.memoizedState,t.memoizedProps):(t=t.stateNode,(e&335544128)===e&&Jp(l,t)));break;case 5:Gn(t,e,l),t.flags&Vn&&(t=t.stateNode,(e&335544128)===e&&Jp(l,t));break;case 3:case 4:var n=nl;nl=Qi(t.stateNode.containerInfo),Gn(t,e,l),nl=n;break;case 22:t.memoizedState===null&&(n=t.alternate,n!==null&&n.memoizedState!==null?(n=Vn,Vn=16777216,Gn(t,e,l),Vn=n):Gn(t,e,l));break;case 30:if((t.flags&Vn)!==0&&(n=t.memoizedProps.name,n!=null&&n!=="auto")){var a=t.stateNode;a.paired=null,Be===null&&(Be=new Map),Be.set(n,a)}Gn(t,e,l);break;default:Gn(t,e,l)}}function Vm(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function Li(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var n=e[l];se=n,Qm(n,t)}Vm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Gm(t),t=t.sibling}function Gm(t){switch(t.tag){case 0:case 11:case 15:Li(t),t.flags&2048&&nn(9,t,t.return);break;case 3:Li(t);break;case 12:Li(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,ju(t)):Li(t);break;default:Li(t)}}function ju(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var n=e[l];se=n,Qm(n,t)}Vm(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:nn(8,e,e.return),ju(e);break;case 22:l=e.stateNode,l._visibility&2&&(l._visibility&=-3,ju(e));break;default:ju(e)}t=t.sibling}}function Qm(t,e){for(;se!==null;){var l=se;switch(l.tag){case 0:case 11:case 15:nn(8,l,e);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var n=l.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:ji(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,se=n;else t:for(l=t;se!==null;){n=se;var a=n.sibling,s=n.return;if(Mm(n),n===l){se=null;break t}if(a!==null){a.return=s,se=a;break t}se=s}}}var qy={getCacheForType:function(t){var e=ce(Ft),l=e.data.get(t);return l===void 0&&(l=t(),e.data.set(t,l)),l},cacheSignal:function(){return ce(Ft).controller.signal}},$y=typeof WeakMap=="function"?WeakMap:Map,jt=0,wt=null,ft=null,ht=0,Rt=0,qe=null,sn=!1,Oa=!1,co=!1,Hl=0,Kt=0,un=0,Qn=0,Su=0,$e=0,Ca=0,Bi=null,ze=null,oo=!1,_u=0,Xm=0,Eu=1/0,Tu=null,rn=null,Gt=0,il=null,Xn=null,xl=0,fo=0,ho=null,Zm=null,Aa=null,wa=null,Da=null,qi=0,Nu=null;function Ye(){return(jt&2)!==0&&ht!==0?ht&-ht:J.T!==null?_o():If()}function Km(){if($e===0)if((ht&536870912)===0||ot){var t=bs;bs<<=1,(bs&3932160)===0&&(bs=262144),$e=t}else $e=536870912;return t=oe.current,t!==null&&(t.flags|=32),$e}function Ma(t,e){if(e!=null){var l=t.stateNode,n=l.ref;n===null&&(n=l.ref=zp(Rl(t.memoizedProps,l))),wa===null&&(wa=[]),wa.push(e.bind(null,n))}}function Oe(t,e,l){(t===wt&&(Rt===2||Rt===9)||t.cancelPendingCommit!==null)&&(ka(t,0),cn(t,ht,$e,!1)),ui(t,l),((jt&2)===0||t!==wt)&&(t===wt&&((jt&2)===0&&(Qn|=l),Kt===4&&cn(t,ht,$e,!1)),bl(t))}function Jm(t,e,l){if((jt&6)!==0)throw Error(c(327));var n=!l&&(e&127)===0&&(e&t.expiredLanes)===0||si(t,e),a=n?Gy(t,e):po(t,e,!0),s=n;do{if(a===0){Oa&&!n&&cn(t,e,0,!1);break}else{if(l=t.current.alternate,s&&!Yy(l)){a=po(t,e,!1),s=!1;continue}if(a===2){if(s=e,t.errorRecoveryDisabledLanes&s)var f=0;else f=t.pendingLanes&-536870913,f=f!==0?f:f&536870912?536870912:0;if(f!==0){e=f;t:{var m=t;a=Bi;var x=m.current.memoizedState.isDehydrated;if(x&&(ka(m,f).flags|=256),f=po(m,f,!1),f!==2&&f!==6){if(co&&!x){m.errorRecoveryDisabledLanes|=s,Qn|=s,a=4;break t}s=ze,ze=a,s!==null&&(ze===null?ze=s:ze.push.apply(ze,s))}a=f}if(s=!1,a!==2)continue}}if(a===1){ka(t,0),cn(t,e,0,!0);break}t:{switch(n=t,s=a,s){case 0:case 1:throw Error(c(345));case 4:if((e&4194048)!==e&&(e&62914560)!==e)break;case 6:cn(n,e,$e,!sn);break t;case 2:ze=null;break;case 3:case 5:break;default:throw Error(c(329))}if((e&62914560)===e&&(a=_u+300-De(),10<a)){if(cn(n,e,$e,!sn),Ss(n,0,!0)!==0)break t;xl=e,n.timeoutHandle=Mo(Im.bind(null,n,l,ze,Tu,oo,e,$e,Qn,Ca,sn,s,"Throttled",-0,0),a);break t}Im(n,l,ze,Tu,oo,e,$e,Qn,Ca,sn,s,null,-0,0)}}break}while(!0);bl(t)}function Im(t,e,l,n,a,s,f,m,x,T,C,D,_,O){t.timeoutHandle=-1;var Y=e.subtreeFlags,K=(s&335544064)===s;if(D=null,(K||Y&8192||(Y&16785408)===16785408)&&(D={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ol},Be=null,Ym(e,s,D),K&&(Y=D,K=t.containerInfo,K=(K.nodeType===9?K:K.ownerDocument).__reactViewTransition,K!=null&&(Y.count++,Y.waitingForViewTransition=!0,Y=Ki.bind(Y),K.finished.then(Y,Y))),Y=(s&62914560)===s?_u-De():(s&4194048)===s?Xm-De():0,Y=Xx(D,Y),Y!==null)){xl=s,t.cancelPendingCommit=Y(ap.bind(null,t,e,s,l,n,a,f,m,x,T,C,D,null,_,O)),cn(t,s,f,!T);return}ap(t,e,s,l,n,a,f,m,x,T,C,D)}function Yy(t){for(var e=t;;){var l=e.tag;if((l===0||l===11||l===15)&&e.flags&16384&&(l=e.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var n=0;n<l.length;n++){var a=l[n],s=a.getSnapshot;a=a.value;try{if(!He(s(),a))return!1}catch{return!1}}if(l=e.child,e.subtreeFlags&16384&&l!==null)l.return=e,e=l;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function cn(t,e,l,n){e=Qf(t,e),e&=~Su,e&=~Qn,t.suspendedLanes|=e,t.pingedLanes&=~e,n&&(t.warmLanes|=e),n=t.expirationTimes;for(var a=e;0<a;){var s=31-ke(a),f=1<<s;n[s]=-1,a&=~f}l!==0&&Zf(t,l,e)}function Ru(){return(jt&6)===0?($i(0),!1):!0}function mo(){if(ft!==null){if(Rt===0)var t=ft.return;else t=ft,Al=Dn=null,jc(t),ja=null,Ei=0,t=ft;for(;t!==null;)xm(t.alternate,t),t=t.return;ft=null}}function ka(t,e){var l=t.timeoutHandle;return l!==-1&&(t.timeoutHandle=-1,dx(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),xl=0,mo(),wt=t,ft=l=Ol(t.current,null),ht=e,Rt=0,qe=null,sn=!1,Oa=si(t,e),co=!1,Ca=$e=Su=Qn=un=Kt=0,ze=Bi=null,oo=!1,Hl=Qf(t,e),ks(),l}function Fm(t,e){ut=null,J.H=su,e===ba||e===Xs?(e=ah(),Rt=3):e===rc?(e=ah(),Rt=4):Rt=e===Uc?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,qe=e,ft===null&&(Kt=1,uu(t,Xe(e,t.current)))}function Wm(){var t=oe.current;return t===null?!0:(ht&4194048)===ht?ve===null:(ht&62914560)===ht||(ht&536870912)!==0?t===ve:!1}function Pm(){var t=J.H;return J.H=su,t===null?su:t}function tp(){var t=J.A;return J.A=qy,t}function zu(){Kt=4,sn||(ht&4194048)!==ht&&oe.current!==null||(Oa=!0),(un&134217727)===0&&(Qn&134217727)===0||wt===null||cn(wt,ht,$e,!1)}function po(t,e,l){var n=jt;jt|=2;var a=Pm(),s=tp();(wt!==t||ht!==e)&&(Tu=null,ka(t,e)),e=!1;var f=Kt;t:do try{if(Rt!==0&&ft!==null){var m=ft,x=qe;switch(Rt){case 8:mo(),f=6;break t;case 3:case 2:case 9:case 6:oe.current===null&&(e=!0);var T=Rt;if(Rt=0,qe=null,Ua(t,m,x,T),l&&Oa){f=0;break t}break;default:T=Rt,Rt=0,qe=null,Ua(t,m,x,T)}}Vy(),f=Kt;break}catch(C){Fm(t,C)}while(!0);return e&&t.shellSuspendCounter++,Al=Dn=null,jt=n,J.H=a,J.A=s,ft===null&&(wt=null,ht=0,ks()),f}function Vy(){for(;ft!==null;)ep(ft)}function Gy(t,e){var l=jt;jt|=2;var n=Pm(),a=tp();wt!==t||ht!==e?(Tu=null,Eu=De()+500,ka(t,e)):Oa=si(t,e);t:do try{if(Rt!==0&&ft!==null){e=ft;var s=qe;e:switch(Rt){case 1:Rt=0,qe=null,Ua(t,e,s,1);break;case 2:case 9:if(lh(s)){Rt=0,qe=null,lp(e);break}e=function(){Rt!==2&&Rt!==9||wt!==t||(Rt=7),bl(t)},s.then(e,e);break t;case 3:Rt=7;break t;case 4:Rt=5;break t;case 7:lh(s)?(Rt=0,qe=null,lp(e)):(Rt=0,qe=null,Ua(t,e,s,7));break;case 5:var f=null;switch(ft.tag){case 26:f=ft.memoizedState;case 5:case 27:var m=ft;if(f?Zp(f):m.stateNode.complete){Rt=0,qe=null;var x=m.sibling;if(x!==null)ft=x;else{var T=m.return;T!==null?(ft=T,Ou(T)):ft=null}break e}}Rt=0,qe=null,Ua(t,e,s,5);break;case 6:Rt=0,qe=null,Ua(t,e,s,6);break;case 8:mo(),Kt=6;break t;default:throw Error(c(462))}}Qy();break}catch(C){Fm(t,C)}while(!0);return Al=Dn=null,J.H=n,J.A=a,jt=l,ft!==null?0:(wt=null,ht=0,ks(),Kt)}function Qy(){for(;ft!==null&&!rv();)ep(ft)}function ep(t){var e=vm(t.alternate,t,Hl);t.memoizedProps=t.pendingProps,e===null?Ou(t):ft=e}function lp(t){var e=t,l=e.alternate;switch(e.tag){case 15:case 0:e=om(l,e,e.pendingProps,e.type,void 0,ht);break;case 11:e=om(l,e,e.pendingProps,e.type.render,e.ref,ht);break;case 5:jc(e);var n=e;n===ae&&(ot?($s(n),n.tag===5&&n.stateNode!=null&&(kt=n.stateNode)):($s(n),ot=!0));default:xm(l,e),e=ft=Qd(e,Hl),e=vm(l,e,Hl)}t.memoizedProps=t.pendingProps,e===null?Ou(t):ft=e}function Ua(t,e,l,n){Al=Dn=null,jc(e),ja=null,Ei=0;var a=e.return;try{if(wy(t,a,e,l,ht)){Kt=1,uu(t,Xe(l,t.current)),ft=null;return}}catch(s){if(a!==null)throw ft=a,s;Kt=1,uu(t,Xe(l,t.current)),ft=null;return}e.flags&32768?(ot||n===1?t=!0:Oa||(ht&536870912)!==0?t=!1:(sn=t=!0,(n===2||n===9||n===3||n===6)&&(n=oe.current,n!==null&&n.tag===13&&(n.flags|=16384))),np(e,t)):Ou(e)}function Ou(t){var e=t;do{if((e.flags&32768)!==0){np(e,sn);return}t=e.return;var l=Uy(e.alternate,e,Hl);if(l!==null){ft=l;return}if(e=e.sibling,e!==null){ft=e;return}ft=e=t}while(e!==null);Kt===0&&(Kt=5)}function np(t,e){do{var l=Hy(t.alternate,t);if(l!==null){l.flags&=32767,ft=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!e&&(t=t.sibling,t!==null)){ft=t;return}ft=t=l}while(t!==null);Kt=6,ft=null}function ap(t,e,l,n,a,s,f,m,x,T,C,D){t.cancelPendingCommit=null;do Cu();while(Gt!==0);if((jt&6)!==0)throw Error(c(327));if(e!==null){if(e===t.current)throw Error(c(177));t===wt&&(ft=wt=null,ht=0),Xn=e,il=t,xl=l,ho=a,Zm=n,Xy(t,e,l,f,m,x,D)}}function Xy(t,e,l,n,a,s,f){var m=e.lanes|e.childLanes;if(fo=m,m|=Jr,yv(t,l,m,n,a,s),wa=null,(l&335544064)===l?(Da=by(t),n=10262):(Da=null,n=10256),(e.subtreeFlags&n)!==0||(e.flags&n)!==0?(t.callbackNode=null,t.callbackPriority=0,Wy(ys,function(){return xo(),null})):(t.callbackNode=null,t.callbackPriority=0),pu=!1,n=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||n){n=J.T,J.T=null,a=it.p,it.p=2,s=jt,jt|=4;try{Ly(t,e,l)}finally{jt=s,it.p=a,J.T=n}}Gt=1,pu?Aa=yx(f,t.containerInfo,Da,go,vo,Ky,yo,xo,Zy):(go(),vo(),yo())}function Zy(t){if(Gt!==0){var e=il.onRecoverableError;e(t,{componentStack:null})}}function Ky(){Gt===3&&(Gt=0,qm(Xn,il),Gt=4)}function go(){if(Gt===1){Gt=0;var t=il,e=Xn,l=xl,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=J.T,J.T=null;var a=it.p;it.p=2;var s=jt;jt|=4;try{Ui=yu=!1,Lm(e,t,l),l=Ao;var f=kd(t.containerInfo),m=l.focusedElem,x=l.selectionRange;if(f!==m&&m&&m.ownerDocument&&Md(m.ownerDocument.documentElement,m)){if(x!==null&&Gr(m)){var T=x.start,C=x.end;if(C===void 0&&(C=T),"selectionStart"in m)m.selectionStart=T,m.selectionEnd=Math.min(C,m.value.length);else{var D=m.ownerDocument||document,_=D&&D.defaultView||window;if(_.getSelection){var O=_.getSelection(),Y=m.textContent.length,K=Math.min(x.start,Y),rt=x.end===void 0?K:Math.min(x.end,Y);!O.extend&&K>rt&&(f=rt,rt=K,K=f);var E=Dd(m,K),j=Dd(m,rt);if(E&&j&&(O.rangeCount!==1||O.anchorNode!==E.node||O.anchorOffset!==E.offset||O.focusNode!==j.node||O.focusOffset!==j.offset)){var z=D.createRange();z.setStart(E.node,E.offset),O.removeAllRanges(),K>rt?(O.addRange(z),O.extend(j.node,j.offset)):(z.setEnd(j.node,j.offset),O.addRange(z))}}}}for(D=[],O=m;O=O.parentNode;)O.nodeType===1&&D.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<D.length;m++){var w=D[m];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}Ga=!!Co,Ao=Co=null}finally{jt=s,it.p=a,J.T=n}}t.current=e,Gt=2}}function vo(){if(Gt===2){Gt=0;var t=il,e=Xn,l=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||l){l=J.T,J.T=null;var n=it.p;it.p=2;var a=jt;jt|=4;try{wm(t,e.alternate,e)}finally{jt=a,it.p=n,J.T=l}}Gt=3}}function yo(){if(Gt===4||Gt===3){Gt=0;var t=Aa;Aa=null,cv();var e=il,l=Xn,n=xl,a=Zm,s=(n&335544064)===n?10262:10256;if((l.subtreeFlags&s)!==0||(l.flags&s)!==0?Gt=5:(Gt=0,Xn=il=null,ip(e,e.pendingLanes)),s=e.pendingLanes,s===0&&(rn=null),Nr(n),l=l.stateNode,Me&&typeof Me.onCommitFiberRoot=="function")try{Me.onCommitFiberRoot(ii,l,void 0,(l.current.flags&128)===128)}catch{}if(a!==null){l=J.T,s=it.p,it.p=2,J.T=null;try{for(var f=e.onRecoverableError,m=0;m<a.length;m++){var x=a[m];f(x.value,{componentStack:x.stack})}}finally{J.T=l,it.p=s}}if(a=wa,f=Da,Da=null,a!==null&&(wa=null,f===null&&(f=[]),t!==null))for(x=0;x<a.length;x++)l=(0,a[x])(f),l!==void 0&&t.finished.finally(l);(xl&3)!==0&&Cu(),bl(e),s=e.pendingLanes,(n&261930)!==0&&(s&42)!==0?e===Nu?qi++:(qi=0,Nu=e):(qi=0,Nu=null),$i(0)}}function ip(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,ji(e)))}function Cu(){return Aa!==null&&(Aa.skipTransition(),Aa=null),go(),vo(),yo(),xo()}function xo(){if(Gt!==5)return!1;var t=il,e=fo;fo=0;var l=Nr(xl),n=J.T,a=it.p;try{it.p=32>l?32:l,J.T=null,l=ho,ho=null;var s=il,f=xl;if(Gt=0,Xn=il=null,xl=0,(jt&6)!==0)throw Error(c(331));var m=jt;if(jt|=4,Gm(s.current),$m(s,s.current,f,l),jt=m,$i(0,!1),Me&&typeof Me.onPostCommitFiberRoot=="function")try{Me.onPostCommitFiberRoot(ii,s)}catch{}return!0}finally{it.p=a,J.T=n,ip(t,e)}}function sp(t,e,l){e=Xe(l,e),e=kc(t.stateNode,e,2),t=Pl(t,e,2),t!==null&&(ui(t,2),bl(t))}function zt(t,e,l){if(t.tag===3)sp(t,t,l);else for(;e!==null;){if(e.tag===3){sp(e,t,l);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(rn===null||!rn.has(n))){t=Xe(l,t),l=lm(2),n=Pl(e,l,2),n!==null&&(nm(l,n,e,t),ui(n,2),bl(n));break}}e=e.return}}function bo(t,e,l){var n=t.pingCache;if(n===null){n=t.pingCache=new $y;var a=new Set;n.set(e,a)}else a=n.get(e),a===void 0&&(a=new Set,n.set(e,a));a.has(l)||(co=!0,a.add(l),t=Jy.bind(null,t,e,l),e.then(t,t))}function Jy(t,e,l){var n=t.pingCache;n!==null&&n.delete(e),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,wt===t&&(ht&l)===l&&((Kt===4||Kt===3&&(ht&62914560)===ht&&300>De()-_u)&&(jt&2)===0?ka(t,0):Su|=l,Ca===ht&&(Ca=0)),bl(t)}function up(t,e){e===0&&(e=Xf()),t=Cn(t,e),t!==null&&(ui(t,e),bl(t))}function Iy(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),up(t,l)}function Fy(t,e){var l=0;switch(t.tag){case 31:case 13:var n=t.stateNode,a=t.memoizedState;a!==null&&(l=a.retryLane);break;case 19:n=t.stateNode;break;case 22:n=t.stateNode._retryCache;break;default:throw Error(c(314))}n!==null&&n.delete(e),up(t,l)}function Wy(t,e){return Sr(t,e)}var Ha=null,La=null,jo=!1,Au=!1,So=!1,on=0;function bl(t){t!==La&&t.next===null&&(La===null?Ha=La=t:La=La.next=t),Au=!0,jo||(jo=!0,tx())}function $i(t,e){if(!So&&Au){So=!0;do for(var l=!1,n=Ha;n!==null;){if(t!==0){var a=n.pendingLanes;if(a===0)var s=0;else{var f=n.suspendedLanes,m=n.pingedLanes;s=(1<<31-ke(42|t)+1)-1,s&=a&~(f&~m),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(l=!0,fp(n,s))}else s=ht,s=Ss(n,n===wt?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(s&3)===0||si(n,s)||(l=!0,fp(n,s));n=n.next}while(l);So=!1}}function Py(){rp()}function rp(){Au=jo=!1;var t=0;on!==0&&fx()&&(t=on);for(var e=De(),l=null,n=Ha;n!==null;){var a=n.next,s=cp(n,e);s===0?(n.next=null,l===null?Ha=a:l.next=a,a===null&&(La=l)):(l=n,(t!==0||(s&3)!==0)&&(Au=!0)),n=a}Gt!==0&&Gt!==5||$i(t),on!==0&&(on=0)}function cp(t,e){for(var l=t.suspendedLanes,n=t.pingedLanes,a=t.expirationTimes,s=t.pendingLanes&-62914561;0<s;){var f=31-ke(s),m=1<<f,x=a[f];x===-1?((m&l)===0||(m&n)!==0)&&(a[f]=vv(m,e)):x<=e&&(t.expiredLanes|=m),s&=~m}if(e=wt,l=ht,l=Ss(t,t===e?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n=t.callbackNode,l===0||t===e&&(Rt===2||Rt===9)||t.cancelPendingCommit!==null)return n!==null&&n!==null&&_r(n),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||si(t,l)){if(e=l&-l,e===t.callbackPriority)return e;switch(n!==null&&_r(n),Nr(l)){case 2:case 8:l=Vf;break;case 32:l=ys;break;case 268435456:l=Gf;break;default:l=ys}return n=op.bind(null,t),l=Sr(l,n),t.callbackPriority=e,t.callbackNode=l,e}return n!==null&&n!==null&&_r(n),t.callbackPriority=2,t.callbackNode=null,2}function op(t,e){if(Gt!==0&&Gt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(Cu()&&t.callbackNode!==l)return null;var n=ht;return n=Ss(t,t===wt?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n===0?null:(Jm(t,n,e),cp(t,De()),t.callbackNode!=null&&t.callbackNode===l?op.bind(null,t):null)}function fp(t,e){if(Cu())return null;Jm(t,e,!0)}function tx(){hx(function(){(jt&6)!==0?Sr(Yf,Py):rp()})}function _o(){if(on===0){var t=Un;t===0&&(t=xs,xs<<=1,(xs&261888)===0&&(xs=256)),on=t}return on}function dp(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Rs(t)}function ex(t,e,l,n,a){if(e==="submit"&&l&&l.stateNode===a){var s=dp((a[Ee]||null).action),f=n.submitter;f&&(e=(e=f[Ee]||null)?dp(e.formAction):f.getAttribute("formAction"),e!==null&&(s=e,f=null));var m=new As("action","action",null,n,a);t.push({event:m,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(on!==0){var x=new FormData(a,f);Cc(l,{pending:!0,data:x,method:a.method,action:s},null,x)}}else typeof s=="function"&&(m.preventDefault(),x=new FormData(a,f),Cc(l,{pending:!0,data:x,method:a.method,action:s},s,x))},currentTarget:a}]})}}for(var Eo=0;Eo<Kr.length;Eo++){var To=Kr[Eo],lx=To.toLowerCase(),nx=To[0].toUpperCase()+To.slice(1);el(lx,"on"+nx)}el(Ld,"onAnimationEnd"),el(Bd,"onAnimationIteration"),el(qd,"onAnimationStart"),el("dblclick","onDoubleClick"),el("focusin","onFocus"),el("focusout","onBlur"),el(dy,"onTransitionRun"),el(hy,"onTransitionStart"),el(my,"onTransitionCancel"),el($d,"onTransitionEnd"),sa("onMouseEnter",["mouseout","mouseover"]),sa("onMouseLeave",["mouseout","mouseover"]),sa("onPointerEnter",["pointerout","pointerover"]),sa("onPointerLeave",["pointerout","pointerover"]),Rn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Rn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Rn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Rn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Rn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Rn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yi="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(" "),ax=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Yi));function hp(t,e){e=(e&4)!==0;for(var l=0;l<t.length;l++){var n=t[l],a=n.event;n=n.listeners;t:{var s=void 0;if(e)for(var f=n.length-1;0<=f;f--){var m=n[f],x=m.instance,T=m.currentTarget;if(m=m.listener,x!==s&&a.isPropagationStopped())break t;s=m,a.currentTarget=T;try{s(a)}catch(C){Ms(C)}a.currentTarget=null,s=x}else for(f=0;f<n.length;f++){if(m=n[f],x=m.instance,T=m.currentTarget,m=m.listener,x!==s&&a.isPropagationStopped())break t;s=m,a.currentTarget=T;try{s(a)}catch(C){Ms(C)}a.currentTarget=null,s=x}}}}function dt(t,e){var l=e[Wf];l===void 0&&(l=e[Wf]=new Set);var n=t+"__bubble";l.has(n)||(mp(e,t,2,!1),l.add(n))}function No(t,e,l){var n=0;e&&(n|=4),mp(l,t,n,e)}var wu="_reactListening"+Math.random().toString(36).slice(2);function Ro(t){if(!t[wu]){t[wu]=!0,ed.forEach(function(l){l!=="selectionchange"&&(ax.has(l)||No(l,!1,t),No(l,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[wu]||(e[wu]=!0,No("selectionchange",!1,e))}}function mp(t,e,l,n){switch(n0(e)){case 2:var a=Ix;break;case 8:a=Fx;break;default:a=Zo}l=a.bind(null,e,l,t),a=void 0,!Mr||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(a=!0),n?a!==void 0?t.addEventListener(e,l,{capture:!0,passive:a}):t.addEventListener(e,l,!0):a!==void 0?t.addEventListener(e,l,{passive:a}):t.addEventListener(e,l,!1)}function zo(t,e,l,n,a){var s=n;if((e&1)===0&&(e&2)===0&&n!==null)t:for(;;){if(n===null)return;var f=n.tag;if(f===3||f===4){var m=n.stateNode.containerInfo;if(m===a)break;if(f===4)for(f=n.return;f!==null;){var x=f.tag;if((x===3||x===4)&&f.stateNode.containerInfo===a)return;f=f.return}for(;m!==null;){if(f=Nn(m),f===null)return;if(x=f.tag,x===5||x===6||x===26||x===27){n=s=f;continue t}m=m.parentNode}}n=n.return}md(function(){var T=s,C=wr(l),D=[];t:{var _=Yd.get(t);if(_!==void 0){var O=As,Y=t;switch(t){case"keypress":if(Os(l)===0)break t;case"keydown":case"keyup":O=Yv;break;case"focusin":Y="focus",O=Lr;break;case"focusout":Y="blur",O=Lr;break;case"beforeblur":case"afterblur":O=Lr;break;case"click":if(l.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=vd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=Cv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=Zv;break;case Ld:case Bd:case qd:O=Dv;break;case $d:O=Jv;break;case"scroll":case"scrollend":O=zv;break;case"wheel":O=Fv;break;case"copy":case"cut":case"paste":O=kv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=xd;break;case"submit":O=Qv;break;case"toggle":case"beforetoggle":O=Pv}var K=(e&4)!==0,rt=!K&&(t==="scroll"||t==="scrollend"),E=K?_!==null?_+"Capture":null:_;K=[];for(var j=T,z;j!==null;){var w=j;if(z=w.stateNode,w=w.tag,w!==5&&w!==26&&w!==27||z===null||E===null||(w=oi(j,E),w!=null&&K.push(Vi(j,w,z))),rt)break;j=j.return}0<K.length&&(_=new O(_,Y,null,l,C),D.push({event:_,listeners:K}))}}if((e&7)===0){t:{if(O=t==="mouseover"||t==="pointerover",_=t==="mouseout"||t==="pointerout",O&&l!==Ar&&(Y=l.relatedTarget||l.fromElement)&&(Nn(Y)||Y[na]))break t;(_||O)&&(Y=C.window===C?C:(O=C.ownerDocument)?O.defaultView||O.parentWindow:window,_?(O=l.relatedTarget||l.toElement,_=T,O=O?Nn(O):null,O!==null&&(rt=h(O),K=O.tag,O!==rt||K!==5&&K!==27&&K!==6)&&(O=null)):(_=null,O=T),_!==O&&(K=vd,w="onMouseLeave",E="onMouseEnter",j="mouse",(t==="pointerout"||t==="pointerover")&&(K=xd,w="onPointerLeave",E="onPointerEnter",j="pointer"),rt=_==null?Y:ci(_),z=O==null?Y:ci(O),Y=new K(w,j+"leave",_,l,C),Y.target=rt,Y.relatedTarget=z,w=null,Nn(C)===T&&(K=new K(E,j+"enter",O,l,C),K.target=z,K.relatedTarget=rt,w=K),rt=w,K=_&&O?ct(_,O,ix):null,_!==null&&pp(D,Y,_,K,!1),O!==null&&rt!==null&&pp(D,rt,O,K,!0)))}t:{if(_=T?ci(T):window,O=_.nodeName&&_.nodeName.toLowerCase(),O==="select"||O==="input"&&_.type==="file")var X=Rd;else if(Td(_))if(zd)X=cy;else{X=uy;var mt=sy}else O=_.nodeName,!O||O.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?T&&Cr(T.elementType)&&(X=Rd):X=ry;if(X&&(X=X(t,T))){Nd(D,X,l,C);break t}mt&&mt(t,_,T)}switch(mt=T?ci(T):window,t){case"focusin":(Td(mt)||mt.contentEditable==="true")&&(da=mt,Qr=T,yi=null);break;case"focusout":yi=Qr=da=null;break;case"mousedown":Xr=!0;break;case"contextmenu":case"mouseup":case"dragend":Xr=!1,Ud(D,l,C);break;case"selectionchange":if(fy)break;case"keydown":case"keyup":Ud(D,l,C)}var F;if(qr)t:{switch(t){case"compositionstart":var at="onCompositionStart";break t;case"compositionend":at="onCompositionEnd";break t;case"compositionupdate":at="onCompositionUpdate";break t}at=void 0}else fa?_d(t,l)&&(at="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(at="onCompositionStart");at&&(bd&&l.locale!=="ko"&&(fa||at!=="onCompositionStart"?at==="onCompositionEnd"&&fa&&(F=pd()):(Gl=C,kr="value"in Gl?Gl.value:Gl.textContent,fa=!0)),mt=Du(T,at),0<mt.length&&(at=new yd(at,t,null,l,C),D.push({event:at,listeners:mt}),F?at.data=F:(F=Ed(l),F!==null&&(at.data=F)))),(F=ey?ly(t,l):ny(t,l))&&(at=Du(T,"onBeforeInput"),0<at.length&&(mt=new yd("onBeforeInput","beforeinput",null,l,C),D.push({event:mt,listeners:at}),mt.data=F)),ex(D,t,T,l,C)}hp(D,e)})}function Vi(t,e,l){return{instance:t,listener:e,currentTarget:l}}function Du(t,e){for(var l=e+"Capture",n=[];t!==null;){var a=t,s=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||s===null||(a=oi(t,l),a!=null&&n.unshift(Vi(t,a,s)),a=oi(t,e),a!=null&&n.push(Vi(t,a,s))),t.tag===3)return n;t=t.return}return[]}function ix(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function pp(t,e,l,n,a){for(var s=e._reactName,f=[];l!==null&&l!==n;){var m=l,x=m.alternate,T=m.stateNode;if(m=m.tag,x!==null&&x===n)break;m!==5&&m!==26&&m!==27||T===null||(x=T,a?(T=oi(l,s),T!=null&&f.unshift(Vi(l,T,x))):a||(T=oi(l,s),T!=null&&f.push(Vi(l,T,x)))),l=l.return}f.length!==0&&t.push({event:e,listeners:f})}var sx=/\r\n?/g,ux=/\u0000|\uFFFD/g;function gp(t){return(typeof t=="string"?t:""+t).replace(sx,`
49
- `).replace(ux,"")}function vp(t,e){return e=gp(e),gp(t)===e}function Ot(t,e,l,n,a,s){switch(l){case"children":if(typeof n=="string")e==="body"||e==="textarea"&&n===""||ra(t,n);else if(typeof n=="number"||typeof n=="bigint")e!=="body"&&ra(t,""+n);else return;break;case"className":Ns(t,"class",n);break;case"tabIndex":Ns(t,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Ns(t,l,n);break;case"style":dd(t,n,s);return;case"data":if(e!=="object"){Ns(t,"data",n);break}case"src":case"href":if(n===""&&(e!=="a"||l!=="href")){t.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(l);break}n=Rs(n),t.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="function"){t.setAttribute(l,"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 s=="function"&&(l==="formAction"?(e!=="input"&&Ot(t,e,"name",a.name,a,null),Ot(t,e,"formEncType",a.formEncType,a,null),Ot(t,e,"formMethod",a.formMethod,a,null),Ot(t,e,"formTarget",a.formTarget,a,null)):(Ot(t,e,"encType",a.encType,a,null),Ot(t,e,"method",a.method,a,null),Ot(t,e,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(l);break}n=Rs(n),t.setAttribute(l,n);break;case"onClick":n!=null&&(t.onclick=ol);return;case"onScroll":n!=null&&dt("scroll",t);return;case"onScrollEnd":n!=null&&dt("scrollend",t);return;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(c(60));(s!=null?s.__html:void 0)!==l&&(t.innerHTML=l)}}break;case"multiple":t.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":t.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){t.removeAttribute("xlink:href");break}l=Rs(n),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,n):t.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":n===!0?t.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,n):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?t.setAttribute(l,n):t.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?t.removeAttribute(l):t.setAttribute(l,n);break;case"popover":dt("beforetoggle",t),dt("toggle",t),Ts(t,"popover",n);break;case"xlinkActuate":Tl(t,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Tl(t,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Tl(t,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Tl(t,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Tl(t,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Tl(t,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Tl(t,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Tl(t,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Tl(t,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Ts(t,"is",n);break;case"innerText":case"textContent":return;default:if(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")l=Nv.get(l)||l,Ts(t,l,n);else return}xt=!0}function Oo(t,e,l,n,a,s){switch(l){case"style":dd(t,n,s);return;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(c(60));(s!=null?s.__html:void 0)!==l&&(t.innerHTML=l)}}break;case"children":if(typeof n=="string")ra(t,n);else if(typeof n=="number"||typeof n=="bigint")ra(t,""+n);else return;break;case"onScroll":n!=null&&dt("scroll",t);return;case"onScrollEnd":n!=null&&dt("scrollend",t);return;case"onClick":n!=null&&(t.onclick=ol);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!ld.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(a=l.endsWith("Capture"),s=l.slice(2,a?l.length-7:void 0),e=t[Ee]||null,e=e!=null?e[l]:null,typeof e=="function"&&t.removeEventListener(s,e,a),typeof n=="function")){typeof e!="function"&&e!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(s,n,a);break t}xt=!0,l in t?t[l]=n:n===!0?t.setAttribute(l,""):Ts(t,l,n)}return}xt=!0}function he(t,e,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":dt("error",t),dt("load",t);var n=!1,a=!1,s;for(s in l)if(l.hasOwnProperty(s)){var f=l[s];if(f!=null)switch(s){case"src":n=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,e));default:Ot(t,e,s,f,l,null)}}a&&Ot(t,e,"srcSet",l.srcSet,l,null),n&&Ot(t,e,"src",l.src,l,null);return;case"input":dt("invalid",t);var m=s=f=a=null,x=null,T=null;for(n in l)if(l.hasOwnProperty(n)){var C=l[n];if(C!=null)switch(n){case"name":a=C;break;case"type":f=C;break;case"checked":x=C;break;case"defaultChecked":T=C;break;case"value":s=C;break;case"defaultValue":m=C;break;case"children":case"dangerouslySetInnerHTML":if(C!=null)throw Error(c(137,e));break;default:Ot(t,e,n,C,l,null)}}rd(t,s,m,x,T,f,a,!1);return;case"select":dt("invalid",t),n=f=s=null;for(a in l)if(l.hasOwnProperty(a)&&(m=l[a],m!=null))switch(a){case"value":s=m;break;case"defaultValue":f=m;break;case"multiple":n=m;default:Ot(t,e,a,m,l,null)}e=s,l=f,t.multiple=!!n,e!=null?ua(t,!!n,e,!1):l!=null&&ua(t,!!n,l,!0);return;case"textarea":dt("invalid",t),s=a=n=null;for(f in l)if(l.hasOwnProperty(f)&&(m=l[f],m!=null))switch(f){case"value":n=m;break;case"defaultValue":a=m;break;case"children":s=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(c(91));break;default:Ot(t,e,f,m,l,null)}od(t,n,a,s);return;case"option":for(x in l)if(l.hasOwnProperty(x)&&(n=l[x],n!=null))switch(x){case"selected":t.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:Ot(t,e,x,n,l,null)}return;case"dialog":dt("beforetoggle",t),dt("toggle",t),dt("cancel",t),dt("close",t);break;case"iframe":case"object":dt("load",t);break;case"video":case"audio":for(n=0;n<Yi.length;n++)dt(Yi[n],t);break;case"image":dt("error",t),dt("load",t);break;case"details":dt("toggle",t);break;case"embed":case"source":case"link":dt("error",t),dt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(T in l)if(l.hasOwnProperty(T)&&(n=l[T],n!=null))switch(T){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,e));default:Ot(t,e,T,n,l,null)}return;default:if(Cr(e)){for(C in l)l.hasOwnProperty(C)&&(n=l[C],n!==void 0&&Oo(t,e,C,n,l,void 0));return}}for(m in l)l.hasOwnProperty(m)&&(n=l[m],n!=null&&Ot(t,e,m,n,l,null))}var rx={};function cx(t,e,l,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,s=null,f=null,m=null,x=null,T=null,C=null;for(O in l){var D=l[O];if(l.hasOwnProperty(O)&&D!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":x=D;default:n.hasOwnProperty(O)||Ot(t,e,O,null,n,D)}}for(var _ in n){var O=n[_];if(D=l[_],n.hasOwnProperty(_)&&(O!=null||D!=null))switch(_){case"type":O!==D&&(xt=!0),s=O;break;case"name":O!==D&&(xt=!0),a=O;break;case"checked":O!==D&&(xt=!0),T=O;break;case"defaultChecked":O!==D&&(xt=!0),C=O;break;case"value":O!==D&&(xt=!0),f=O;break;case"defaultValue":O!==D&&(xt=!0),m=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(c(137,e));break;default:O!==D&&Ot(t,e,_,O,n,D)}}zr(t,f,m,x,T,C,s,a);return;case"select":O=f=m=_=null;for(s in l)if(x=l[s],l.hasOwnProperty(s)&&x!=null)switch(s){case"value":break;case"multiple":O=x;default:n.hasOwnProperty(s)||Ot(t,e,s,null,n,x)}for(a in n)if(s=n[a],x=l[a],n.hasOwnProperty(a)&&(s!=null||x!=null))switch(a){case"value":s!==x&&(xt=!0),_=s;break;case"defaultValue":s!==x&&(xt=!0),m=s;break;case"multiple":s!==x&&(xt=!0),f=s;default:s!==x&&Ot(t,e,a,s,n,x)}e=m,l=f,n=O,_!=null?ua(t,!!l,_,!1):!!n!=!!l&&(e!=null?ua(t,!!l,e,!0):ua(t,!!l,l?[]:"",!1));return;case"textarea":O=_=null;for(m in l)if(a=l[m],l.hasOwnProperty(m)&&a!=null&&!n.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:Ot(t,e,m,null,n,a)}for(f in n)if(a=n[f],s=l[f],n.hasOwnProperty(f)&&(a!=null||s!=null))switch(f){case"value":a!==s&&(xt=!0),_=a;break;case"defaultValue":a!==s&&(xt=!0),O=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(c(91));break;default:a!==s&&Ot(t,e,f,a,n,s)}cd(t,_,O);return;case"option":for(var Y in l)if(_=l[Y],l.hasOwnProperty(Y)&&_!=null&&!n.hasOwnProperty(Y))switch(Y){case"selected":t.selected=!1;break;default:Ot(t,e,Y,null,n,_)}for(x in n)if(_=n[x],O=l[x],n.hasOwnProperty(x)&&_!==O&&(_!=null||O!=null))switch(x){case"selected":_!==O&&(xt=!0),t.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:Ot(t,e,x,_,n,O)}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 K in l)_=l[K],l.hasOwnProperty(K)&&_!=null&&!n.hasOwnProperty(K)&&Ot(t,e,K,null,n,_);for(T in n)if(_=n[T],O=l[T],n.hasOwnProperty(T)&&_!==O&&(_!=null||O!=null))switch(T){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(c(137,e));break;default:Ot(t,e,T,_,n,O)}return;default:if(Cr(e)){for(var rt in l)_=l[rt],l.hasOwnProperty(rt)&&_!==void 0&&!n.hasOwnProperty(rt)&&Oo(t,e,rt,void 0,n,_);for(C in n)_=n[C],O=l[C],!n.hasOwnProperty(C)||_===O||_===void 0&&O===void 0||Oo(t,e,C,_,n,O);return}}for(var E in l)_=l[E],l.hasOwnProperty(E)&&_!=null&&!n.hasOwnProperty(E)&&Ot(t,e,E,null,n,_);for(D in n)_=n[D],O=l[D],!n.hasOwnProperty(D)||_===O||_==null&&O==null||Ot(t,e,D,_,n,O)}function yp(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ox(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var a=l[n],s=a.transferSize,f=a.initiatorType,m=a.duration;if(s&&m&&yp(f)){for(f=0,m=a.responseEnd,n+=1;n<l.length;n++){var x=l[n],T=x.startTime;if(T>m)break;var C=x.transferSize,D=x.initiatorType;C&&yp(D)&&(x=x.responseEnd,f+=C*(x<m?1:(m-T)/(x-T)))}if(--n,e+=8*(s+f)/(a.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Co=null,Ao=null;function Gi(t){return t.nodeType===9?t:t.ownerDocument}function xp(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function bp(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function jp(t,e,l,n){return l=Gi(l).createElement(t),l[re]=n,l[Ee]=e,he(l,t,e),ne(l),l}function wo(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Do=null;function fx(){var t=window.event;return t&&t.type==="popstate"?t===Do?!1:(Do=t,!0):(Do=null,!1)}var Mo=typeof setTimeout=="function"?setTimeout:void 0,dx=typeof clearTimeout=="function"?clearTimeout:void 0,Sp=typeof Promise=="function"?Promise:void 0,_p=typeof requestAnimationFrame=="function"?requestAnimationFrame:Mo,hx=typeof queueMicrotask=="function"?queueMicrotask:typeof Sp<"u"?function(t){return Sp.resolve(null).then(t).catch(mx)}:Mo;function mx(t){setTimeout(function(){throw t})}function fn(t){return t==="head"}function Ep(t,e){var l=e,n=0;do{var a=l.nextSibling;if(t.removeChild(l),a&&a.nodeType===8)if(l=a.data,l==="/$"||l==="/&"){if(n===0){t.removeChild(a),Qa(e);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")Yo(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,Yo(l);for(var s=l.firstChild;s;){var f=s.nextSibling,m=s.nodeName;s[ri]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&s.rel.toLowerCase()==="stylesheet"||l.removeChild(s),s=f}}else l==="body"&&Yo(t.ownerDocument.body);l=a}while(l);Qa(e)}function Tp(t,e){var l=t;t=0;do{var n=l.nextSibling;if(l.nodeType===1?e?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(e?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=n}while(l)}function Np(t,e,l){if(e=CSS.escape(e)!==e?"r-"+btoa(e).replace(/=/g,""):e,t.style.viewTransitionName=e,l!=null&&(t.style.viewTransitionClass=l),l=getComputedStyle(t),l.display==="inline"){if(e=t.getClientRects(),e.length===1)var n=1;else for(var a=n=0;a<e.length;a++){var s=e[a];0<s.width&&0<s.height&&n++}n===1&&(t=t.style,t.display=e.length===1?"inline-block":"block",t.marginTop="-"+l.paddingTop,t.marginBottom="-"+l.paddingBottom)}}function Rp(t,e){t=t.style,e=e.style;var l=e!=null?e.hasOwnProperty("viewTransitionName")?e.viewTransitionName:e.hasOwnProperty("view-transition-name")?e["view-transition-name"]:null:null;t.viewTransitionName=l==null||typeof l=="boolean"?"":(""+l).trim(),l=e!=null?e.hasOwnProperty("viewTransitionClass")?e.viewTransitionClass:e.hasOwnProperty("view-transition-class")?e["view-transition-class"]:null:null,t.viewTransitionClass=l==null||typeof l=="boolean"?"":(""+l).trim(),t.display==="inline-block"&&(e==null?t.display=t.margin="":(l=e.display,t.display=l==null||typeof l=="boolean"?"":l,l=e.margin,l!=null?t.margin=l:(l=e.hasOwnProperty("marginTop")?e.marginTop:e["margin-top"],t.marginTop=l==null||typeof l=="boolean"?"":l,e=e.hasOwnProperty("marginBottom")?e.marginBottom:e["margin-bottom"],t.marginBottom=e==null||typeof e=="boolean"?"":e)))}function px(t,e,l){return l=l.ownerDocument.defaultView,{rect:t,abs:e.position==="absolute"||e.position==="fixed",clip:e.clipPath!=="none"||e.overflow!=="visible"||e.filter!=="none"||e.mask!=="none"||e.mask!=="none"||e.borderRadius!=="0px",view:0<=t.bottom&&0<=t.right&&t.top<=l.innerHeight&&t.left<=l.innerWidth}}function ko(t){var e=t.getBoundingClientRect(),l=getComputedStyle(t);return px(e,l,t)}function gx(t){return t.documentElement.clientHeight}function vx(t){this.addEventListener("load",t),this.addEventListener("error",t)}function yx(t,e,l,n,a,s,f,m,x){var T=e.nodeType===9?e:e.ownerDocument;try{var C=T.startViewTransition({update:function(){var _=T.defaultView,O=_.navigation&&_.navigation.transition,Y=T.fonts.status;n();var K=[];if(Y==="loaded"&&(gx(T),T.fonts.status==="loading"&&K.push(T.fonts.ready)),Y=K.length,t!==null)for(var rt=t.suspenseyImages,E=0,j=0;j<rt.length;j++){var z=rt[j];if(!z.complete){var w=z.getBoundingClientRect();if(0<w.bottom&&0<w.right&&w.top<_.innerHeight&&w.left<_.innerWidth){if(E+=Kp(z),E>Uu){K.length=Y;break}z=new Promise(vx.bind(z)),K.push(z)}}}if(0<K.length)return _=Promise.race([Promise.all(K),new Promise(function(X){return setTimeout(X,500)})]).then(a,a),(O?Promise.allSettled([O.finished,_]):_).then(s,s);if(a(),O)return O.finished.then(s,s);s()},types:l});T.__reactViewTransition=C;var D=[];return C.ready.then(function(){for(var _=T.documentElement.getAnimations({subtree:!0}),O=0;O<_.length;O++){var Y=_[O],K=Y.effect,rt=K.pseudoElement;if(rt!=null&&rt.startsWith("::view-transition")){D.push(Y),Y=K.getKeyframes();for(var E=rt=void 0,j=!0,z=0;z<Y.length;z++){var w=Y[z],X=w.width;if(rt===void 0)rt=X;else if(rt!==X){j=!1;break}if(X=w.height,E===void 0)E=X;else if(E!==X){j=!1;break}delete w.width,delete w.height,w.transform==="none"&&delete w.transform}j&&rt!==void 0&&E!==void 0&&(K.setKeyframes(Y),j=getComputedStyle(K.target,K.pseudoElement),j.width!==rt||j.height!==E)&&(j=Y[0],j.width=rt,j.height=E,j=Y[Y.length-1],j.width=rt,j.height=E,K.setKeyframes(Y))}}f()},function(_){T.__reactViewTransition===C&&(T.__reactViewTransition=null);try{if(typeof _=="object"&&_!==null)switch(_.name){case"InvalidStateError":(_.message==="View transition was skipped because document visibility state is hidden."||_.message==="Skipping view transition because document visibility state has become hidden."||_.message==="Skipping view transition because viewport size changed."||_.message==="Transition was aborted because of invalid state")&&(_=null)}_!==null&&x(_)}finally{n(),a(),f()}}),C.finished.finally(function(){for(var _=0;_<D.length;_++)D[_].cancel();T.__reactViewTransition===C&&(T.__reactViewTransition=null),m()}),C}catch{return n(),a(),f(),null}}function Zn(t,e){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+e+")"}Zn.prototype.animate=function(t,e){return e=typeof e=="number"?{duration:e}:I({},e),e.pseudoElement=this._selector,this._scope.animate(t,e)},Zn.prototype.getAnimations=function(){for(var t=this._scope,e=this._selector,l=t.getAnimations({subtree:!0}),n=[],a=0;a<l.length;a++){var s=l[a].effect;s!==null&&s.target===t&&s.pseudoElement===e&&n.push(l[a])}return n},Zn.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function zp(t){return{name:t,group:new Zn("group",t),imagePair:new Zn("image-pair",t),old:new Zn("old",t),new:new Zn("new",t)}}function Ve(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}Ve.prototype.addEventListener=function(t,e,l){var n=null,a=null;if(!(l!=null&&typeof l!="boolean"&&(n=l.signal||null,n!==null&&n.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var s=this._eventListeners;if(Cp(s,t,e,l)===-1){var f=this,m=e;l!=null&&typeof l!="boolean"&&l.once===!0&&(m=function(x){f.removeEventListener(t,e,l),typeof e=="function"?e.call(this,x):e.handleEvent(x)}),n!==null&&(a=f.removeEventListener.bind(f,t,e,l),n.addEventListener("abort",a,{once:!0}),a=n.removeEventListener.bind(n,"abort",a)),n=Ba(l),s.push({type:t,listener:e,optionsOrUseCapture:l,attachedListener:m,cleanup:a}),y(this._fragmentFiber.child,!1,xx,t,m,n)}this._eventListeners=s}};function xx(t,e,l,n){return H(t).addEventListener(e,l,n),!1}Ve.prototype.removeEventListener=function(t,e,l){var n=this._eventListeners;if(n!==null&&(e=Cp(n,t,e,l),e!==-1)){var a=n[e];l=a.attachedListener;var s=a.cleanup;a=Ba(a.optionsOrUseCapture),y(this._fragmentFiber.child,!1,bx,t,l,a),n.splice(e,1),s!==null&&s()}};function bx(t,e,l,n){return H(t).removeEventListener(e,l,n),!1}function Ba(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function Op(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function Cp(t,e,l,n){if(t.length===0)return-1;n=Op(n);for(var a=0;a<t.length;a++){var s=t[a];if(s.type===e&&s.listener===l&&Op(s.optionsOrUseCapture)===n)return a}return-1}Ve.prototype.dispatchEvent=function(t){var e=A(this._fragmentFiber);if(e===null)return!0;e=H(e);var l=this._eventListeners;if(l!==null&&0<l.length||!t.bubbles){var n=e.nodeType===9?e.createComment(""):document.createTextNode("");if(l)for(var a=0;a<l.length;a++){var s=l[a];n.addEventListener(s.type,s.attachedListener,Ba(s.optionsOrUseCapture))}if(e.appendChild(n),t=n.dispatchEvent(t),l)for(a=0;a<l.length;a++)s=l[a],n.removeEventListener(s.type,s.attachedListener,Ba(s.optionsOrUseCapture));return e.removeChild(n),t}return e.dispatchEvent(t)},Ve.prototype.focus=function(t){y(this._fragmentFiber.child,!0,Ap,t,void 0,void 0)};function Ap(t,e){return t.tag===6?!1:(t=H(t),wx(t,e))}Ve.prototype.focusLast=function(t){var e=[];y(this._fragmentFiber.child,!0,Uo,e,void 0,void 0);for(var l=e.length-1;0<=l&&!Ap(e[l],t);l--);};function Uo(t,e){return e.push(t),!1}Ve.prototype.blur=function(){var t=A(this._fragmentFiber);t!==null&&(t=H(t),t=Gi(t).activeElement,t!==null&&y(this._fragmentFiber.child,!1,jx,t,void 0,void 0))};function jx(t,e){return t.tag===6?!1:(t=H(t),t===e||t.contains(e)?(e.blur(),!0):!1)}Ve.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),y(this._fragmentFiber.child,!1,Sx,t,void 0,void 0)};function Sx(t,e){return t.tag===6||(t=H(t),e.observe(t)),!1}Ve.prototype.unobserveUsing=function(t){var e=this._observers;if(e!==null&&e.has(t)){e.delete(t),y(this._fragmentFiber.child,!1,_x,t,void 0,void 0);for(var l=e=0;l<sl.length;l++){var n=sl[l];n.fragmentInstance===this&&n.observer===t?t.unobserve(n.instance):sl[e++]=n}sl.length=e}};function _x(t,e){return t.tag===6||(t=H(t),e.unobserve(t)),!1}var sl=[],Ho=!1;function Ex(t,e,l){sl.push({fragmentInstance:t,observer:e,instance:l}),Ho||(Ho=!0,Dx(function(){Ho=!1;var n=sl;sl=[];for(var a=0;a<n.length;a++){var s=n[a];s.observer.unobserve(s.instance)}}))}Ve.prototype.getClientRects=function(){var t=[];return y(this._fragmentFiber.child,!1,Tx,t,void 0,void 0),t};function Tx(t,e){if(t.tag===6){t=t.stateNode;var l=t.ownerDocument.createRange();l.selectNodeContents(t),e.push.apply(e,l.getClientRects())}else t=H(t),e.push.apply(e,t.getClientRects());return!1}Ve.prototype.getRootNode=function(t){var e=A(this._fragmentFiber);return e===null?this:H(e).getRootNode(t)},Ve.prototype.compareDocumentPosition=function(t){var e=A(this._fragmentFiber);if(e===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];y(this._fragmentFiber.child,!1,Uo,l,void 0,void 0);var n=H(e);if(l.length===0){if(l=n,B(this._fragmentFiber)){t:{for(e=this._fragmentFiber.return;e!==null;){if(e.tag===4){e=e.stateNode.containerInfo;break t}if(e.tag===3||e.tag===5||e.tag===27)break;e=e.return}e=null}e!=null&&(l=e)}e=this._fragmentFiber;var a=n=l.compareDocumentPosition(t);return l===t?a=Node.DOCUMENT_POSITION_CONTAINS:n&Node.DOCUMENT_POSITION_CONTAINED_BY&&(l=G(e)[1],l===null?a=Node.DOCUMENT_POSITION_PRECEDING:(t=H(l).compareDocumentPosition(t),a=t===0||t&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),a|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}e=H(l[0]),a=H(l[l.length-1]);var s=B(this._fragmentFiber)?e.parentElement:n;if(s==null)return Node.DOCUMENT_POSITION_DISCONNECTED;n=s.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY,s=s.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY;var f=e.compareDocumentPosition(t),m=a.compareDocumentPosition(t),x=f&Node.DOCUMENT_POSITION_CONTAINED_BY||m&Node.DOCUMENT_POSITION_CONTAINED_BY;return m=n&&s&&f&Node.DOCUMENT_POSITION_FOLLOWING&&m&Node.DOCUMENT_POSITION_PRECEDING,e=n&&e===t||s&&a===t||x||m?Node.DOCUMENT_POSITION_CONTAINED_BY:!n&&e===t||!s&&a===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:f,e&Node.DOCUMENT_POSITION_DISCONNECTED||e&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Nx(e,this._fragmentFiber,l[0],l[l.length-1],t)?e:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Nx(t,e,l,n,a){var s=Nn(a);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!s)t:{for(;s!==null;){if(s.tag===7&&(s===e||s.alternate===e)){l=!0;break t}s=s.return}l=!1}return l}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(s===null)return s=a.ownerDocument,a===s||a===s.documentElement||a===s.body;t:{for(s=e,e=A(e);s!==null;){if(!(s.tag!==5&&s.tag!==3&&s.tag!==27||s!==e&&s.alternate!==e)){s=!0;break t}s=s.return}s=!1}return s}return t&Node.DOCUMENT_POSITION_PRECEDING?((e=!!s)&&!(e=s===l)&&(e=ct(l,s,Q),e===null?e=!1:(y(e,!0,M,s,l),s=$,$=null,e=s!==null)),e):t&Node.DOCUMENT_POSITION_FOLLOWING?((e=!!s)&&!(e=s===n)&&(e=ct(n,s,Q),e===null?e=!1:(y(e,!0,L,s,n),s=$,tt=$=null,e=s!==null)),e):!1}function wp(t,e){var l=t.ownerDocument.createRange();l.selectNodeContents(t),t=l.getBoundingClientRect(),window.scrollTo(window.scrollX+t.left,e?window.scrollY+t.top:window.scrollY+t.bottom-window.innerHeight)}Ve.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(c(566));var e=[];y(this._fragmentFiber.child,!1,Uo,e,void 0,void 0);var l=t!==!1;if(e.length===0){var n=G(this._fragmentFiber);if(n=l?n[1]||n[0]||A(this._fragmentFiber):n[0]||n[1],n===null)return;if(n.tag===6){t=H(n),wp(t,l);return}if(n=H(n),n.nodeType!==9){if(n.nodeType===11){l="host"in n?n.host:null,l!==null&&l.scrollIntoView(t);return}n.scrollIntoView(t)}}for(n=l?e.length-1:0;n!==(l?-1:e.length);){var a=e[n];a.tag===6?(a=H(a),wp(a,l)):H(a).scrollIntoView(t),n+=l?-1:1}};function Rx(t,e){return t=H(t),Dp(t,e),!1}function Dp(t,e){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(e)}function Mp(t,e){var l=e._eventListeners;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n];t.addEventListener(a.type,a.attachedListener,Ba(a.optionsOrUseCapture))}t.nodeType!==3&&(l=e._observers,l!==null&&l.forEach(function(s){for(var f=0,m=0;m<sl.length;m++){var x=sl[m];(x.fragmentInstance!==e||x.observer!==s||x.instance!==t)&&(sl[f++]=x)}sl.length=f,s.observe(t)}),Dp(t,e))}function zx(t,e){var l=e._eventListeners;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n];t.removeEventListener(a.type,a.attachedListener,Ba(a.optionsOrUseCapture))}t.nodeType!==3&&(l=e._observers,l!==null&&l.forEach(function(s){typeof s.rootMargin=="string"?Ex(e,s,t):s.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(e))}function Lo(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var l=e;switch(e=e.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Lo(l),Es(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function Ox(t,e,l,n){for(;t.nodeType===1;){var a=l;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!n&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(n){if(!t[ri])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(s=t.getAttribute("rel"),s==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(s!==a.rel||t.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||t.getAttribute("title")!==(a.title==null?null:a.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(s=t.getAttribute("src"),(s!==(a.src==null?null:a.src)||t.getAttribute("type")!==(a.type==null?null:a.type)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&s&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var s=a.name==null?null:""+a.name;if(a.type==="hidden"&&t.getAttribute("name")===s)return t}else return t;if(t=Fe(t.nextSibling),t===null)break}return null}function Cx(t,e,l){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Fe(t.nextSibling),t===null))return null;return t}function kp(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Fe(t.nextSibling),t===null))return null;return t}function Bo(t){return t.data==="$?"||t.data==="$~"}function qo(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Ax(t,e){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||l.readyState!=="loading")e();else{var n=function(){e(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),t._reactRetry=n}}function Fe(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var $o=null;function Up(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(e===0)return Fe(t.nextSibling);e--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||e++}t=t.nextSibling}return null}function Hp(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(e===0)return t;e--}else l!=="/$"&&l!=="/&"||e++}t=t.previousSibling}return null}function wx(t,e){function l(){n=!0}if(t.ownerDocument.activeElement===t)return!0;var n=!1;try{t.ownerDocument.addEventListener("focus",l,!0),(t.focus||HTMLElement.prototype.focus).call(t,e)}finally{t.ownerDocument.removeEventListener("focus",l,!0)}return n}function Dx(t){_p(function(){_p(function(e){return t(e)})})}function Lp(t,e,l){switch(e=Gi(l),t){case"html":if(t=e.documentElement,!t)throw Error(c(452));return t;case"head":if(t=e.head,!t)throw Error(c(453));return t;case"body":if(t=e.body,!t)throw Error(c(454));return t;default:throw Error(c(451))}}function Bp(t,e,l){for(var n in l){var a=l[n];l.hasOwnProperty(n)&&a!=null&&Ot(t,e,n,null,rx,a)}l.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===ol&&(t.onclick=null),Es(t)}function Yo(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);Es(t)}var We=new Map,qp=new Set;function Qi(t){if(typeof t.getRootNode=="function"){var e=t.getRootNode();if(e.nodeType===9||e.nodeType===11)return e}return t.nodeType===9?t:t.ownerDocument}var Ll=it.d;it.d={f:Mx,r:kx,D:Ux,C:Hx,L:Lx,m:Bx,X:$x,S:qx,M:Yx};function Mx(){var t=Ll.f(),e=Ru();return t||e}function kx(t){var e=aa(t);e!==null&&e.tag===5&&e.type==="form"?Yh(e):Ll.r(t)}var qa=typeof document>"u"?null:document;function $p(t,e,l){var n=qa;if(n&&typeof e=="string"&&e){var a=Ge(e);a='link[rel="'+t+'"][href="'+a+'"]',typeof l=="string"&&(a+='[crossorigin="'+l+'"]'),qp.has(a)||(qp.add(a),t={rel:t,crossOrigin:l,href:e},n.querySelector(a)===null&&(e=n.createElement("link"),he(e,"link",t),ne(e),n.head.appendChild(e)))}}function Ux(t){Ll.D(t),$p("dns-prefetch",t,null)}function Hx(t,e){Ll.C(t,e),$p("preconnect",t,e)}function Lx(t,e,l){Ll.L(t,e,l);var n=qa;if(n&&t&&e){var a='link[rel="preload"][as="'+Ge(e)+'"]';e==="image"&&l&&l.imageSrcSet?(a+='[imagesrcset="'+Ge(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(a+='[imagesizes="'+Ge(l.imageSizes)+'"]')):a+='[href="'+Ge(t)+'"]';var s=a;switch(e){case"style":s=$a(t);break;case"script":s=Ya(t)}if(!(We.has(s)||(t=I({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),We.set(s,t),n.querySelector(a)!==null||e==="style"&&n.querySelector(Xi(s))||e==="script"&&n.querySelector(Zi(s))))){var f=n.createElement("link");he(f,"link",t),e==="style"&&(f[_s]=!0,f.onload=f.onerror=function(){td(f)}),ne(f),n.head.appendChild(f)}}}function Bx(t,e){Ll.m(t,e);var l=qa;if(l&&t){var n=e&&typeof e.as=="string"?e.as:"script",a='link[rel="modulepreload"][as="'+Ge(n)+'"][href="'+Ge(t)+'"]',s=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Ya(t)}if(!We.has(s)&&(t=I({rel:"modulepreload",href:t},e),We.set(s,t),l.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Zi(s)))return}n=l.createElement("link"),he(n,"link",t),ne(n),l.head.appendChild(n)}}}function qx(t,e,l){Ll.S(t,e,l);var n=qa;if(n&&t){var a=ia(n).hoistableStyles,s=$a(t);e=e||"default";var f=a.get(s);if(!f){var m={loading:0,preload:null};if(f=n.querySelector(Xi(s)))m.loading=5;else{t=I({rel:"stylesheet",href:t,"data-precedence":e},l),(l=We.get(s))&&Vo(t,l);var x=f=n.createElement("link");ne(x),he(x,"link",t),x._p=new Promise(function(T,C){x.onload=T,x.onerror=C}),x.addEventListener("load",function(){m.loading|=1}),x.addEventListener("error",function(){m.loading|=2}),m.loading|=4,Mu(f,e,n)}f={type:"stylesheet",instance:f,count:1,state:m},a.set(s,f)}}}function $x(t,e){Ll.X(t,e);var l=qa;if(l&&t){var n=ia(l).hoistableScripts,a=Ya(t),s=n.get(a);s||(s=l.querySelector(Zi(a)),s||(t=I({src:t,async:!0},e),(e=We.get(a))&&Go(t,e),s=l.createElement("script"),ne(s),he(s,"link",t),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},n.set(a,s))}}function Yx(t,e){Ll.M(t,e);var l=qa;if(l&&t){var n=ia(l).hoistableScripts,a=Ya(t),s=n.get(a);s||(s=l.querySelector(Zi(a)),s||(t=I({src:t,async:!0,type:"module"},e),(e=We.get(a))&&Go(t,e),s=l.createElement("script"),ne(s),he(s,"link",t),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},n.set(a,s))}}function Yp(t,e,l,n){var a=(a=$l.current)?Qi(a):null;if(!a)throw Error(c(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=$a(l.href),e=ia(a).hoistableStyles,n=e.get(l),n||(n={type:"style",instance:null,count:0,state:null},e.set(l,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=$a(l.href);var s=ia(a).hoistableStyles,f=s.get(t);if(f||(a=a.ownerDocument||a,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(t,f),(s=a.querySelector(Xi(t)))?s._p||(f.instance=s,f.state.loading=5):(s=We.get(t),s||(s={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},We.set(t,s)),Vx(a,t,s,f.state))),e&&n===null)throw Error(c(528,""));return f}if(e&&n!==null)throw Error(c(529,""));return null;case"script":return e=l.async,l=l.src,typeof l=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(l=Ya(l),e=ia(a).hoistableScripts,n=e.get(l),n||(n={type:"script",instance:null,count:0,state:null},e.set(l,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,t))}}function $a(t){return'href="'+Ge(t)+'"'}function Xi(t){return'link[rel="stylesheet"]['+t+"]"}function Vp(t){return I({},t,{"data-precedence":t.precedence,precedence:null})}function Vx(t,e,l,n){if(e=t.querySelector('link[rel="preload"][as="style"]['+e+"]")){if(e[_s]!==!0){n.loading=1;return}}else e=t.createElement("link"),e[_s]=!0,e.onload=e.onerror=td.bind(null,e),he(e,"link",l),ne(e),t.head.appendChild(e);n.preload=e,e.addEventListener("load",function(){return n.loading|=1}),e.addEventListener("error",function(){return n.loading|=2})}function Ya(t){return'[src="'+Ge(t)+'"]'}function Zi(t){return"script[async]"+t}function Gp(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var n=t.querySelector('style[data-href~="'+Ge(l.href)+'"]');if(n)return e.instance=n,ne(n),n;var a=I({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(t.ownerDocument||t).createElement("style"),ne(n),he(n,"style",a),Mu(n,l.precedence,t),e.instance=n;case"stylesheet":a=$a(l.href);var s=t.querySelector(Xi(a));if(s)return e.state.loading|=4,e.instance=s,ne(s),s;n=Vp(l),(a=We.get(a))&&Vo(n,a),s=(t.ownerDocument||t).createElement("link"),ne(s);var f=s;return f._p=new Promise(function(m,x){f.onload=m,f.onerror=x}),he(s,"link",n),e.state.loading|=4,Mu(s,l.precedence,t),e.instance=s;case"script":return s=Ya(l.src),(a=t.querySelector(Zi(s)))?(e.instance=a,ne(a),a):(n=l,(a=We.get(s))&&(n=I({},l),Go(n,a)),t=t.ownerDocument||t,a=t.createElement("script"),ne(a),he(a,"link",n),t.head.appendChild(a),e.instance=a);case"void":return null;default:throw Error(c(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(n=e.instance,e.state.loading|=4,Mu(n,l.precedence,t));return e.instance}function Mu(t,e,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,s=a,f=0;f<n.length;f++){var m=n[f];if(m.dataset.precedence===e)s=m;else if(s!==a)break}s?s.parentNode.insertBefore(t,s.nextSibling):(e=l.nodeType===9?l.head:l,e.insertBefore(t,e.firstChild))}function Vo(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function Go(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var ku=null;function Qp(t,e,l){if(ku===null){var n=new Map,a=ku=new Map;a.set(l,n)}else a=ku,n=a.get(l),n||(n=new Map,a.set(l,n));if(n.has(t))return n;for(n.set(t,null),l=l.getElementsByTagName(t),a=0;a<l.length;a++){var s=l[a];if(!(s[ri]||s[re]||t==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var f=s.getAttribute(e)||"";f=t+f;var m=n.get(f);m?m.push(s):n.set(f,[s])}}return n}function Qo(t,e,l){t=t.ownerDocument||t,t.head.insertBefore(l,e==="title"?t.querySelector("head > title"):null)}function Gx(t,e,l){if(l===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Xp(t,e){return t==="img"&&e.src!=null&&e.src!==""&&e.onLoad==null&&e.loading!=="lazy"}function Zp(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Kp(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Jp(t,e){typeof e.decode=="function"&&(t.imgCount++,e.complete||(t.imgBytes+=Kp(e),t.suspenseyImages.push(e)),t=Zx.bind(t),e.decode().then(t,t))}function Qx(t,e,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var a=$a(n.href),s=e.querySelector(Xi(a));if(s){e=s._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Ki.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=s,ne(s);return}s=e.ownerDocument||e,n=Vp(n),(a=We.get(a))&&Vo(n,a),s=s.createElement("link"),ne(s);var f=s;f._p=new Promise(function(m,x){f.onload=m,f.onerror=x}),he(s,"link",n),l.instance=s}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,e),(e=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=Ki.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var Uu=0;function Xx(t,e){return t.stylesheets&&t.count===0&&Lu(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var n=setTimeout(function(){if(t.stylesheets&&Lu(t,t.stylesheets),t.unsuspend){var s=t.unsuspend;t.unsuspend=null,s()}},6e4+e);0<t.imgBytes&&Uu===0&&(Uu=62500*ox());var a=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Lu(t,t.stylesheets),t.unsuspend)){var s=t.unsuspend;t.unsuspend=null,s()}},(t.imgBytes>Uu?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function Ip(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)Lu(t,t.stylesheets);else if(t.unsuspend){var e=t.unsuspend;t.unsuspend=null,e()}}}function Ki(){this.count--,Ip(this)}function Zx(){this.imgCount--,Ip(this)}var Hu=null;function Lu(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Hu=new Map,e.forEach(Kx,t),Hu=null,Ki.call(t))}function Kx(t,e){if(!(e.state.loading&4)){var l=Hu.get(t);if(l)var n=l.get(null);else{l=new Map,Hu.set(t,l);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<a.length;s++){var f=a[s];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(l.set(f.dataset.precedence,f),n=f)}n&&l.set(null,n)}a=e.instance,f=a.getAttribute("data-precedence"),s=l.get(f)||n,s===n&&l.set(null,a),l.set(f,a),this.count++,n=Ki.bind(this),a.addEventListener("load",n),a.addEventListener("error",n),s?s.parentNode.insertBefore(a,s.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(a,t.firstChild)),e.state.loading|=4}}var Va={$$typeof:It,Provider:null,Consumer:null,_currentValue:_l,_currentValue2:_l,_threadCount:0};function Jx(t,e,l,n,a,s,f,m,x){this.tag=1,this.containerInfo=t,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=Er(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Er(0),this.hiddenUpdates=Er(null),this.identifierPrefix=n,this.onUncaughtError=a,this.onCaughtError=s,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.transitionTypes=null,this.incompleteTransitions=new Map}function Fp(t,e,l,n,a,s,f,m,x,T,C,D){return t=new Jx(t,e,l,f,x,T,C,D,m),e=1,s===!0&&(e|=24),s=Te(3,null,null,e),t.current=s,s.stateNode=t,e=ic(),e.refCount++,t.pooledCache=e,e.refCount++,s.memoizedState={element:n,isDehydrated:l,cache:e},cc(s),t}function Wp(t){return t?(t=pa,t):pa}function Pp(t,e,l,n,a,s){a=Wp(a),n.context===null?n.context=a:n.pendingContext=a,n=Wl(e),n.payload={element:l},s=s===void 0?null:s,s!==null&&(n.callback=s),l=Pl(t,n,e),l!==null&&(Oe(l,t,e),Ti(l,t,e))}function t0(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<e?l:e}}function Xo(t,e){t0(t,e),(t=t.alternate)&&t0(t,e)}function e0(t){if(t.tag===13||t.tag===31){var e=Cn(t,67108864);e!==null&&Oe(e,t,67108864),Xo(t,67108864)}}function l0(t){if(t.tag===13||t.tag===31){var e=Ye();e=Tr(e);var l=Cn(t,e);l!==null&&Oe(l,t,e),Xo(t,e)}}var Ga=!0;function Ix(t,e,l,n){var a=J.T;J.T=null;var s=it.p;try{it.p=2,Zo(t,e,l,n)}finally{it.p=s,J.T=a}}function Fx(t,e,l,n){var a=J.T;J.T=null;var s=it.p;try{it.p=8,Zo(t,e,l,n)}finally{it.p=s,J.T=a}}function Zo(t,e,l,n){if(Ga){var a=Ko(n);if(a===null)zo(t,e,n,Bu,l),a0(t,n);else if(Px(a,t,e,l,n))n.stopPropagation();else if(a0(t,n),e&4&&-1<Wx.indexOf(t)){for(;a!==null;){var s=aa(a);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var f=Tn(s.pendingLanes);if(f!==0){var m=s;for(m.pendingLanes|=2,m.entangledLanes|=2;f;){var x=1<<31-ke(f);m.entanglements[1]|=x,f&=~x}bl(s),(jt&6)===0&&(Eu=De()+500,$i(0))}}break;case 31:case 13:m=Cn(s,2),m!==null&&Oe(m,s,2),Ru(),Xo(s,2)}if(s=Ko(n),s===null&&zo(t,e,n,Bu,l),s===a)break;a=s}a!==null&&n.stopPropagation()}else zo(t,e,n,null,l)}}function Ko(t){return t=wr(t),Jo(t)}var Bu=null;function Jo(t){if(Bu=null,t=Nn(t),t!==null){var e=h(t);if(e===null)t=null;else{var l=e.tag;if(l===13){if(t=p(e),t!==null)return t;t=null}else if(l===31){if(t=g(e),t!==null)return t;t=null}else if(l===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return Bu=t,null}function n0(t){switch(t){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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ov()){case Yf:return 2;case Vf:return 8;case ys:case fv:return 32;case Gf:return 268435456;default:return 32}default:return 32}}var Io=!1,dn=null,hn=null,mn=null,Ji=new Map,Ii=new Map,pn=[],Wx="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 a0(t,e){switch(t){case"focusin":case"focusout":dn=null;break;case"dragenter":case"dragleave":hn=null;break;case"mouseover":case"mouseout":mn=null;break;case"pointerover":case"pointerout":Ji.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ii.delete(e.pointerId)}}function Fi(t,e,l,n,a,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:l,eventSystemFlags:n,nativeEvent:s,targetContainers:[a]},e!==null&&(e=aa(e),e!==null&&e0(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,a!==null&&e.indexOf(a)===-1&&e.push(a),t)}function Px(t,e,l,n,a){switch(e){case"focusin":return dn=Fi(dn,t,e,l,n,a),!0;case"dragenter":return hn=Fi(hn,t,e,l,n,a),!0;case"mouseover":return mn=Fi(mn,t,e,l,n,a),!0;case"pointerover":var s=a.pointerId;return Ji.set(s,Fi(Ji.get(s)||null,t,e,l,n,a)),!0;case"gotpointercapture":return s=a.pointerId,Ii.set(s,Fi(Ii.get(s)||null,t,e,l,n,a)),!0}return!1}function i0(t){var e=Nn(t.target);if(e!==null){var l=h(e);if(l!==null){if(e=l.tag,e===13){if(e=p(l),e!==null){t.blockedOn=e,Ff(t.priority,function(){l0(l)});return}}else if(e===31){if(e=g(l),e!==null){t.blockedOn=e,Ff(t.priority,function(){l0(l)});return}}else if(e===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function qu(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var l=Ko(t.nativeEvent);if(l===null){l=t.nativeEvent;var n=new l.constructor(l.type,l);Ar=n,l.target.dispatchEvent(n),Ar=null}else return e=aa(l),e!==null&&e0(e),t.blockedOn=l,!1;e.shift()}return!0}function s0(t,e,l){qu(t)&&l.delete(e)}function t1(){Io=!1,dn!==null&&qu(dn)&&(dn=null),hn!==null&&qu(hn)&&(hn=null),mn!==null&&qu(mn)&&(mn=null),Ji.forEach(s0),Ii.forEach(s0)}function $u(t,e){t.blockedOn===e&&(t.blockedOn=null,Io||(Io=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,t1)))}var Yu=null;function u0(t){Yu!==t&&(Yu=t,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Yu===t&&(Yu=null);for(var e=0;e<t.length;e+=3){var l=t[e],n=t[e+1],a=t[e+2];if(typeof n!="function"){if(Jo(n||l)===null)continue;break}var s=aa(l);s!==null&&(t.splice(e,3),e-=3,Cc(s,{pending:!0,data:a,method:l.method,action:n},n,a))}}))}function Qa(t){function e(x){return $u(x,t)}dn!==null&&$u(dn,t),hn!==null&&$u(hn,t),mn!==null&&$u(mn,t),Ji.forEach(e),Ii.forEach(e);for(var l=0;l<pn.length;l++){var n=pn[l];n.blockedOn===t&&(n.blockedOn=null)}for(;0<pn.length&&(l=pn[0],l.blockedOn===null);)i0(l),l.blockedOn===null&&pn.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var a=l[n],s=l[n+1],f=a[Ee]||null;if(typeof s=="function")f||u0(l);else if(f){var m=null;if(s&&s.hasAttribute("formAction")){if(a=s,f=s[Ee]||null)m=f.formAction;else if(Jo(a)!==null)continue}else m=f.action;typeof m=="function"?l[n+1]=m:(l.splice(n,3),n-=3),u0(l)}}}function r0(){function t(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(f){return a=f})},focusReset:"manual",scroll:"manual"})}function e(){a!==null&&(a(),a=null),n||setTimeout(l,20)}function l(){if(!n&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,a=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),a!==null&&(a(),a=null)}}}function Fo(t){this._internalRoot=t}Vu.prototype.render=Fo.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(c(409));var l=e.current,n=Ye();Pp(l,n,t,e,null,null)},Vu.prototype.unmount=Fo.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Pp(t.current,2,null,t,null,null),Ru(),e[na]=null}};function Vu(t){this._internalRoot=t}Vu.prototype.unstable_scheduleHydration=function(t){if(t){var e=If();t={blockedOn:null,target:t,priority:e};for(var l=0;l<pn.length&&e!==0&&e<pn[l].priority;l++);pn.splice(l,0,t),l===0&&i0(t)}};var c0=r.version;if(c0!=="19.3.0")throw Error(c(527,c0,"19.3.0"));it.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(c(188)):(t=Object.keys(t).join(","),Error(c(268,t)));return t=v(e),t=t!==null?R(t):null,t=t===null?null:t.stateNode,t};var e1={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:J,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gu.isDisabled&&Gu.supportsFiber)try{ii=Gu.inject(e1),Me=Gu}catch{}}return Pi.createRoot=function(t,e){if(!d(t))throw Error(c(299));var l=!1,n="",a=Wh,s=Ph,f=tm;return e!=null&&(e.unstable_strictMode===!0&&(l=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onUncaughtError!==void 0&&(a=e.onUncaughtError),e.onCaughtError!==void 0&&(s=e.onCaughtError),e.onRecoverableError!==void 0&&(f=e.onRecoverableError)),e=Fp(t,1,!1,null,null,l,n,null,a,s,f,r0),t[na]=e.current,Ro(t),new Fo(e)},Pi.hydrateRoot=function(t,e,l){if(!d(t))throw Error(c(299));var n=!1,a="",s=Wh,f=Ph,m=tm,x=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(a=l.identifierPrefix),l.onUncaughtError!==void 0&&(s=l.onUncaughtError),l.onCaughtError!==void 0&&(f=l.onCaughtError),l.onRecoverableError!==void 0&&(m=l.onRecoverableError),l.formState!==void 0&&(x=l.formState)),e=Fp(t,1,!0,e,l??null,n,a,x,s,f,m,r0),e.context=Wp(null),l=e.current,n=Ye(),n=Tr(n),a=Wl(n),a.callback=null,Pl(l,a,n),l=n,e.current.lanes=l,ui(e,l),bl(e),t[na]=e.current,Ro(t),new Vu(e)},Pi.version="19.3.0",Pi}var x0;function f1(){if(x0)return Po.exports;x0=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(r){console.error(r)}}return i(),Po.exports=o1(),Po.exports}var d1=f1(),N=Nf();/**
50
- * @license lucide-react v0.577.0 - ISC
51
- *
52
- * This source code is licensed under the ISC license.
53
- * See the LICENSE file in the root directory of this source tree.
54
- */const K0=(...i)=>i.filter((r,o,c)=>!!r&&r.trim()!==""&&c.indexOf(r)===o).join(" ").trim();/**
55
- * @license lucide-react v0.577.0 - ISC
56
- *
57
- * This source code is licensed under the ISC license.
58
- * See the LICENSE file in the root directory of this source tree.
59
- */const h1=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
60
- * @license lucide-react v0.577.0 - ISC
61
- *
62
- * This source code is licensed under the ISC license.
63
- * See the LICENSE file in the root directory of this source tree.
64
- */const m1=i=>i.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,c)=>c?c.toUpperCase():o.toLowerCase());/**
65
- * @license lucide-react v0.577.0 - ISC
66
- *
67
- * This source code is licensed under the ISC license.
68
- * See the LICENSE file in the root directory of this source tree.
69
- */const b0=i=>{const r=m1(i);return r.charAt(0).toUpperCase()+r.slice(1)};/**
70
- * @license lucide-react v0.577.0 - ISC
71
- *
72
- * This source code is licensed under the ISC license.
73
- * See the LICENSE file in the root directory of this source tree.
74
- */var p1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
75
- * @license lucide-react v0.577.0 - ISC
76
- *
77
- * This source code is licensed under the ISC license.
78
- * See the LICENSE file in the root directory of this source tree.
79
- */const g1=i=>{for(const r in i)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};/**
80
- * @license lucide-react v0.577.0 - ISC
81
- *
82
- * This source code is licensed under the ISC license.
83
- * See the LICENSE file in the root directory of this source tree.
84
- */const v1=N.forwardRef(({color:i="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:c,className:d="",children:h,iconNode:p,...g},b)=>N.createElement("svg",{ref:b,...p1,width:r,height:r,stroke:i,strokeWidth:c?Number(o)*24/Number(r):o,className:K0("lucide",d),...!h&&!g1(g)&&{"aria-hidden":"true"},...g},[...p.map(([v,R])=>N.createElement(v,R)),...Array.isArray(h)?h:[h]]));/**
85
- * @license lucide-react v0.577.0 - ISC
86
- *
87
- * This source code is licensed under the ISC license.
88
- * See the LICENSE file in the root directory of this source tree.
89
- */const ge=(i,r)=>{const o=N.forwardRef(({className:c,...d},h)=>N.createElement(v1,{ref:h,iconNode:r,className:K0(`lucide-${h1(b0(i))}`,`lucide-${i}`,c),...d}));return o.displayName=b0(i),o};/**
90
- * @license lucide-react v0.577.0 - ISC
91
- *
92
- * This source code is licensed under the ISC license.
93
- * See the LICENSE file in the root directory of this source tree.
94
- */const y1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],x1=ge("chevron-down",y1);/**
95
- * @license lucide-react v0.577.0 - ISC
96
- *
97
- * This source code is licensed under the ISC license.
98
- * See the LICENSE file in the root directory of this source tree.
99
- */const b1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],j1=ge("chevron-right",b1);/**
100
- * @license lucide-react v0.577.0 - ISC
101
- *
102
- * This source code is licensed under the ISC license.
103
- * See the LICENSE file in the root directory of this source tree.
104
- */const S1=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Rf=ge("external-link",S1);/**
105
- * @license lucide-react v0.577.0 - ISC
106
- *
107
- * This source code is licensed under the ISC license.
108
- * See the LICENSE file in the root directory of this source tree.
109
- */const _1=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],E1=ge("folder-git-2",_1);/**
110
- * @license lucide-react v0.577.0 - ISC
111
- *
112
- * This source code is licensed under the ISC license.
113
- * See the LICENSE file in the root directory of this source tree.
114
- */const T1=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],J0=ge("git-pull-request",T1);/**
115
- * @license lucide-react v0.577.0 - ISC
116
- *
117
- * This source code is licensed under the ISC license.
118
- * See the LICENSE file in the root directory of this source tree.
119
- */const N1=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],R1=ge("layout-dashboard",N1);/**
120
- * @license lucide-react v0.577.0 - ISC
121
- *
122
- * This source code is licensed under the ISC license.
123
- * See the LICENSE file in the root directory of this source tree.
124
- */const z1=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],O1=ge("list-checks",z1);/**
125
- * @license lucide-react v0.577.0 - ISC
126
- *
127
- * This source code is licensed under the ISC license.
128
- * See the LICENSE file in the root directory of this source tree.
129
- */const C1=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],A1=ge("menu",C1);/**
130
- * @license lucide-react v0.577.0 - ISC
131
- *
132
- * This source code is licensed under the ISC license.
133
- * See the LICENSE file in the root directory of this source tree.
134
- */const w1=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],D1=ge("message-circle-question-mark",w1);/**
135
- * @license lucide-react v0.577.0 - ISC
136
- *
137
- * This source code is licensed under the ISC license.
138
- * See the LICENSE file in the root directory of this source tree.
139
- */const M1=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],k1=ge("message-square",M1);/**
140
- * @license lucide-react v0.577.0 - ISC
141
- *
142
- * This source code is licensed under the ISC license.
143
- * See the LICENSE file in the root directory of this source tree.
144
- */const U1=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],H1=ge("moon",U1);/**
145
- * @license lucide-react v0.577.0 - ISC
146
- *
147
- * This source code is licensed under the ISC license.
148
- * See the LICENSE file in the root directory of this source tree.
149
- */const L1=[["path",{d:"M13 16H8",key:"wsln4y"}],["path",{d:"M14 8H8",key:"1l3xfs"}],["path",{d:"M16 12H8",key:"1fr5h0"}],["path",{d:"M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z",key:"ycz6yz"}]],B1=ge("receipt-text",L1);/**
150
- * @license lucide-react v0.577.0 - ISC
151
- *
152
- * This source code is licensed under the ISC license.
153
- * See the LICENSE file in the root directory of this source tree.
154
- */const q1=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],j0=ge("rotate-ccw",q1);/**
155
- * @license lucide-react v0.577.0 - ISC
156
- *
157
- * This source code is licensed under the ISC license.
158
- * See the LICENSE file in the root directory of this source tree.
159
- */const $1=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Y1=ge("settings",$1);/**
160
- * @license lucide-react v0.577.0 - ISC
161
- *
162
- * This source code is licensed under the ISC license.
163
- * See the LICENSE file in the root directory of this source tree.
164
- */const V1=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],G1=ge("shield-check",V1);/**
165
- * @license lucide-react v0.577.0 - ISC
166
- *
167
- * This source code is licensed under the ISC license.
168
- * See the LICENSE file in the root directory of this source tree.
169
- */const Q1=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],X1=ge("sun",Q1);/**
170
- * @license lucide-react v0.577.0 - ISC
171
- *
172
- * This source code is licensed under the ISC license.
173
- * See the LICENSE file in the root directory of this source tree.
174
- */const Z1=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],S0=ge("triangle-alert",Z1),I0={label:"Unverified (signature not checked)",tone:"warn"},_0={VERIFIED:{label:"Verified",tone:"good"},PARTIAL:{label:"Partly verified",tone:"warn"},FAILED:{label:"Failed",tone:"bad"},BLOCKED:{label:"Needs your answer",tone:"warn"},SPEC_CONFLICT:{label:"Needs your answer",tone:"warn"},ALREADY_SATISFIED:{label:"Already done",tone:"good"},UNVERIFIED:I0,TAMPERED:{label:"Tampered",tone:"bad"},RUNNING:{label:"Running",tone:"neutral"}},K1=/^(BUDGET|COST_CAP|CAP_REACHED|OVER_BUDGET|STOPPED_BUDGET)/;function Ae(i){if(typeof i!="string"||!i.trim())return{label:"Running",tone:"neutral"};const r=i.trim(),o=r.toUpperCase().replace(/[\s-]+/g,"_");if(_0[o])return _0[o];if(K1.test(o))return{label:"Stopped (budget)",tone:"warn"};if(/_?\(SIGNATURE_NOT_CHECKED\)$/.test(o)||/_?\(UNATTESTED\)$/.test(o))return I0;const c=r.replace(/[_-]+/g," ").replace(/\s+/g," ").toLowerCase();return{label:c.charAt(0).toUpperCase()+c.slice(1),tone:"neutral"}}const J1=/\u001b\[[0-9;?]*[ -/]*[@-~]|\u001b\][^\u0007\u001b]*(?:\u0007|\u001b\\)|\u001b[@-Z\\-_]/g,I1=/\[\d{1,3}(?:;\d{1,3})*m/g;function tr(i){return typeof i!="string"?"":i.replace(J1,"").replace(I1,"").replace(/\u001b/g,"")}function we(i){const r=Math.abs(i);return`$${r===0?"0.000":r<.01?i.toFixed(3):i.toFixed(2)}`}const E0=new Set(["VERIFIED","ALREADY_SATISFIED"]),sr=i=>{if(i.tampered)return"TAMPERED";if(typeof i.verdict!="string")return i.verdict;const r=i.verdict.trim().toUpperCase();return i.attested===!1?E0.has(r)?"UNVERIFIED":`${i.verdict} (unattested)`:E0.has(r)?i.sig_checked===!1?`${r} (signature not checked)`:r:i.verdict},ti=()=>globalThis.LOKI_CONTROL_BASE??"",T0="loki-control-token";function _e(){var i,r;try{const o=/[#&]token=([^&]+)/.exec(((i=globalThis.location)==null?void 0:i.hash)??"");return o!=null&&o[1]&&(sessionStorage.setItem(T0,decodeURIComponent(o[1])),(r=globalThis.history)==null||r.replaceState(null,"",globalThis.location.pathname+globalThis.location.search)),sessionStorage.getItem(T0)}catch{return null}}const ei=(i={})=>{const r=_e();return r?{...i,authorization:`Bearer ${r}`}:i};class F1 extends Error{constructor(r,o){super(o),this.status=r}}const N0="Run `loki control serve` to restart it, then reload this page.";async function Sn(i,r){if(r&&i!==404)return r;if(i===404||i===405){try{const o=await(await fetch(`${ti()}/health`,{headers:ei()})).json();if(o.version&&o.installed_version&&o.installed_version!=="unknown"&&o.version!==o.installed_version)return`This control service is out of date (running ${o.version}, installed ${o.installed_version}) and does not know this action. ${N0}`}catch{}return`The control service did not recognise this request${r?` (${r})`:""}. It is probably an older version still running. ${N0}`}return i===401?"The control service needs a sign-in token. Open the link printed by `loki control serve`.":i===403?"The control service refused this request. Open it from the machine that runs the service.":i>=500?"The control service hit an error. Try again, and check the terminal running `loki control serve` if it keeps happening.":"The control service could not complete this request. Reload this page and try again."}async function Fn(i){if(i.ok)return;const r=await i.clone().json().catch(()=>({}));throw new F1(i.status,await Sn(i.status,typeof r.error=="string"?r.error:void 0))}async function os(i){const r=await fetch(`${ti()}${i}`,{headers:ei()});return await Fn(r),await r.json()}const W1=()=>os("/health");function Wn(i={}){const r=new URLSearchParams;for(const[c,d]of Object.entries(i))d&&r.set(c,d);const o=r.toString();return os(`/v1/runs${o?`?${o}`:""}`)}function ur(i,r){return os(`/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}`)}async function F0(i,r,o){const c=await fetch(`${ti()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}/answer`,{method:"POST",headers:ei({"content-type":"application/json"}),body:JSON.stringify({answer:o})});await Fn(c);const d=await c.json();return{path:d.path??"",resume:d.resume??""}}async function P1(i,r){const o=await fetch(`${ti()}${i}`,{method:"POST",headers:ei({"content-type":"application/json"}),body:JSON.stringify(r)});return await Fn(o),await o.json().catch(()=>({}))}const tb=()=>P1("/v1/import",{}),eb=()=>os("/v1/repos");function W0(i,r=3e3){const o=new AbortController,c=d=>new Promise(h=>{const p=setTimeout(h,d);o.signal.addEventListener("abort",()=>{clearTimeout(p),h()},{once:!0})});return(async()=>{for(;!o.signal.aborted;){try{const d=await fetch(`${ti()}/v1/stream`,{headers:ei({accept:"text/event-stream"}),signal:o.signal});if(d.ok&&d.body){const h=d.body.getReader(),p=new TextDecoder;let g="";for(;;){const{value:b,done:v}=await h.read();if(v)break;g+=p.decode(b,{stream:!0});const R=g.split(`
175
-
176
- `);g=R.pop()??"",R.some(y=>/^event: run$/m.test(y))&&i()}}}catch{}await c(r)}})(),()=>o.abort()}async function lb(i,r){const o=await fetch(`${ti()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}`,{method:"DELETE",headers:ei({"content-type":"application/json"})});await Fn(o);const c=await o.json().catch(()=>({}));return{ok:!0,removed:c.removed??{runs:0,events:0,sources:0},remaining_runs:c.remaining_runs??0}}const nb=()=>os("/v1/doctor"),k=i=>`var(--cp-${i})`,ab=(...i)=>i.filter(Boolean).join(" ")||void 0,P0={success:k("success-muted"),warning:k("warning-muted"),error:k("error-muted"),info:k("info-muted"),neutral:k("bg-3")},tg={success:k("success-ink"),warning:k("warning-ink"),error:k("error-ink"),info:k("info-ink"),neutral:k("text-2")};function Qt({interactive:i,compact:r,style:o,className:c,children:d,...h}){return u.jsx("div",{...h,"data-cp":"card","data-interactive":i?"true":void 0,className:ab("cp-card",c),style:{background:k("card"),border:`1px solid ${k("border")}`,borderRadius:k("radius-lg"),padding:r?10:16,transition:`transform ${k("dur-fast")} ${k("ease")}, box-shadow ${k("dur-fast")} ${k("ease")}`,...i?{cursor:"pointer",boxShadow:k("shadow-sm")}:null,...o},children:d})}function Jn({label:i,value:r,icon:o,trend:c,trendTone:d="neutral",series:h,compact:p}){const g=h&&h.length>1?h:null;let b=null;if(g){const v=Math.min(...g),R=Math.max(...g),y=R-v||1,A=g.map((B,G)=>`${G?"L":"M"}${(G/(g.length-1)*80).toFixed(1)} ${(22-(B-v)/y*20).toFixed(1)}`).join(" ");b=u.jsx("svg",{"data-cp":"sparkline",width:80,height:24,viewBox:"0 0 80 24","aria-hidden":"true",children:u.jsx("path",{d:A,fill:"none",stroke:k("accent"),strokeWidth:1.5})})}return u.jsxs(Qt,{"data-cp-kind":"kpi",style:{padding:p?"10px 12px":"14px 16px",display:"flex",gap:10,alignItems:"center"},children:[o?u.jsx("span",{style:{width:28,height:28,borderRadius:6,background:k("accent-muted"),color:k("accent"),display:"inline-flex",alignItems:"center",justifyContent:"center"},children:o}):null,u.jsxs("div",{style:{flex:1,minWidth:0},children:[u.jsx("div",{style:{fontSize:k("text-sm"),color:k("text-2")},children:i}),u.jsx("div",{style:{fontFamily:k("font-mono"),fontSize:p?20:28,fontWeight:500,lineHeight:1.2},children:r})]}),c?u.jsx("span",{style:{fontSize:11,borderRadius:3,padding:"1px 6px",background:P0[d],color:tg[d]},children:c}):null,b]})}const ib={VERIFIED:"success",PARTIAL:"warning",FAILED:"error",SPEC_CONFLICT:"info",BLOCKED:"info",running:"neutral",TAMPERED:"error",UNSIGNED:"warning",NOT_VERIFIED:"warning",UNCHECKED:"warning",UNVERIFIED:"warning","VERIFIED (signature not checked)":"info"},St={VERIFIED:"VERIFIED",PARTIAL:"PARTIAL",FAILED:"FAILED",SPEC_CONFLICT:"SPEC_CONFLICT",TAMPERED:"TAMPERED",UNVERIFIED:"UNVERIFIED",VERIFIED_UNCHECKED:"VERIFIED (signature not checked)",RUNNING:"running"},sb=[St.VERIFIED,St.VERIFIED_UNCHECKED,St.UNVERIFIED,St.TAMPERED,St.PARTIAL,St.FAILED,St.SPEC_CONFLICT];function jl(i){var r;return i?i.tampered===!0||i.integrity===St.TAMPERED||((r=i.receipt)==null?void 0:r.verdict)===St.TAMPERED||i.verdict===St.TAMPERED?St.TAMPERED:sr({verdict:i.verdict??null,tampered:!1,attested:i.attested??void 0,sig_checked:i.sig_checked??void 0}):null}const cs=i=>jl(i)===St.VERIFIED;function Yt({tone:i="neutral",pulse:r,children:o,...c}){return u.jsxs("span",{...c,"data-cp":"badge","data-tone":i,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 10px",borderRadius:k("radius-full"),fontSize:k("text-xs"),textTransform:"uppercase",letterSpacing:"0.025em",fontWeight:500,background:P0[i],color:tg[i],...c.style},children:[r?u.jsx("span",{className:"cp-pulse","aria-hidden":"true",style:{width:6,height:6,borderRadius:"50%",background:"currentColor"}}):null,o]})}function Fa({verdict:i,run:r,style:o}){const c=r?jl(r):i??null;return c?u.jsx(Yt,{tone:ib[c]??"neutral",pulse:c===St.RUNNING,"data-verdict":c,title:o?Ae(c).label:void 0,style:o,children:Ae(c).label}):u.jsx(Yt,{pulse:!0,style:o,children:"running"})}const ub={active:k("success-fill"),idle:k("text-muted"),paused:k("warning-fill"),error:k("error-fill")};function rb({state:i="idle",label:r}){return u.jsx("span",{role:"img","aria-label":r??i,"data-cp":"status-dot","data-state":i,className:i==="active"?"cp-pulse":void 0,style:{display:"inline-block",width:12,height:6,borderRadius:2,background:ub[i]}})}const cb={primary:{background:k("accent-solid"),color:"#ffffff",border:"1px solid transparent"},secondary:{background:k("bg-3"),color:k("text"),border:`1px solid ${k("border")}`},ghost:{background:"transparent",color:k("text-2"),border:"1px solid transparent"},danger:{background:k("error"),color:"#ffffff",border:"1px solid transparent"}};function pt({variant:i="primary",size:r="md",style:o,type:c="button",...d}){const h=r==="sm"?"4px 12px":r==="lg"?"12px 24px":"8px 18px";return u.jsx("button",{...d,type:c,"data-cp":"button","data-variant":i,"data-size":r,style:{padding:h,borderRadius:k("radius-full"),fontSize:k(r==="sm"?"text-base":"text-md"),fontWeight:500,cursor:d.disabled?"not-allowed":"pointer",opacity:d.disabled?.5:1,...cb[i],...o}})}const eg={background:k("bg-3"),border:`1px solid ${k("border")}`,borderRadius:k("radius-md"),padding:"8px 12px",fontSize:k("text-md"),color:k("text"),width:"100%",fontFamily:"inherit"};function Pn({style:i,onFocus:r,onBlur:o,...c}){const[d,h]=N.useState(!1);return u.jsx("input",{...c,"data-cp":"input",onFocus:p=>{h(!0),r==null||r(p)},onBlur:p=>{h(!1),o==null||o(p)},style:{...eg,...d?{borderColor:k("accent"),boxShadow:k("focus"),outline:"none"}:null,...i}})}function lg({style:i,onFocus:r,onBlur:o,...c}){const[d,h]=N.useState(!1);return u.jsx("textarea",{...c,"data-cp":"textarea",onFocus:p=>{h(!0),r==null||r(p)},onBlur:p=>{h(!1),o==null||o(p)},style:{...eg,resize:"vertical",...d?{borderColor:k("accent"),boxShadow:k("focus"),outline:"none"}:null,...i}})}function vf({label:i,value:r,icon:o,options:c,onSelect:d}){const[h,p]=N.useState(!1),g=N.useId();return u.jsxs("span",{style:{position:"relative",display:"inline-block"},children:[u.jsxs("button",{type:"button","data-cp":"chip","aria-haspopup":c?"menu":void 0,"aria-expanded":c?h:void 0,"aria-controls":c&&h?g:void 0,onClick:()=>c&&p(b=>!b),style:{display:"inline-flex",alignItems:"center",gap:6,borderRadius:999,padding:"4px 10px",fontSize:k("text-base"),background:k("card"),border:`1px solid ${k("border")}`,color:k("text"),cursor:"pointer"},children:[o,u.jsx("span",{style:{color:k("text-2")},children:i}),r?u.jsx("span",{style:{fontWeight:500},children:r}):null]}),c&&h?u.jsx("div",{id:g,role:"menu",style:{position:"absolute",top:"100%",left:0,marginTop:4,minWidth:140,zIndex:400,background:k("bg"),border:`1px solid ${k("border")}`,borderRadius:k("radius-lg"),boxShadow:k("shadow-lg"),padding:4},children:c.map(b=>u.jsx("button",{role:"menuitem",type:"button",onClick:()=>{d==null||d(b.value),p(!1)},style:{display:"block",width:"100%",textAlign:"left",padding:"6px 10px",borderRadius:k("radius-md"),background:"transparent",border:0,color:k("text"),fontSize:k("text-base"),cursor:"pointer"},children:b.label},b.value))}):null]})}function ta({columns:i,rows:r,caption:o}){return u.jsx(Qt,{style:{padding:0,overflow:"auto"},children:u.jsxs("table",{"data-cp":"table",style:{width:"100%",borderCollapse:"collapse",fontSize:k("text-base")},children:[o?u.jsx("caption",{style:{position:"absolute",left:-9999},children:o}):null,u.jsx("thead",{children:u.jsx("tr",{children:i.map(c=>u.jsx("th",{scope:"col",style:{textAlign:"left",padding:"10px 14px",fontSize:k("text-sm"),fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em",color:k("text-2"),background:k("bg-3")},children:c},c))})}),u.jsx("tbody",{children:r.map((c,d)=>u.jsx("tr",{style:{borderTop:`1px solid ${k("border-light")}`},children:c.map((h,p)=>u.jsx("td",{style:{padding:"10px 14px"},children:h},p))},d))})]})})}function er({active:i,icon:r,children:o,href:c,onClick:d}){const h={position:"relative",display:"flex",alignItems:"center",gap:8,padding:"8px 12px",borderRadius:k("radius-nav"),fontSize:k("text-md"),fontWeight:500,textDecoration:"none",cursor:"pointer",border:0,width:"100%",textAlign:"left",background:i?k("accent-glow"):"transparent",color:k(i?"accent-ink":"text-2")},p=u.jsxs(u.Fragment,{children:[i?u.jsx("span",{"data-cp":"nav-bar","aria-hidden":"true",style:{position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",width:3,height:16,borderRadius:2,background:k("accent")}}):null,r,u.jsx("span",{children:o})]});return c?u.jsx("a",{"data-cp":"nav-item","data-active":i?"true":void 0,"aria-current":i?"page":void 0,href:c,onClick:d,style:h,children:p}):u.jsx("button",{type:"button","data-cp":"nav-item","data-active":i?"true":void 0,"aria-current":i?"page":void 0,onClick:d,style:h,children:p})}function ob({children:i}){return u.jsx("div",{"data-cp":"group-head",style:{fontSize:9.5,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.09em",color:k("text-subtle"),padding:"4px 12px 5px"},children:i})}function fb({stages:i}){return u.jsx("ol",{"data-cp":"timeline",style:{listStyle:"none",margin:0,padding:0},children:i.map((r,o)=>u.jsxs("li",{"data-status":r.status,style:{display:"flex",gap:10,position:"relative",paddingBottom:o===i.length-1?0:14},children:[u.jsxs("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[u.jsx("span",{style:{width:10,height:10,borderRadius:"50%",background:r.status==="pending"?k("bg-3"):r.status==="neutral"?k("text-muted"):k(`${r.status}-fill`),border:`1px solid ${k("border")}`}}),o<i.length-1?u.jsx("span",{style:{flex:1,width:1,background:k("border")}}):null]}),u.jsxs("span",{style:{fontSize:k("text-base")},children:[r.label,r.duration?u.jsx("span",{style:{marginLeft:8,fontFamily:k("font-mono"),color:k("text-2")},children:r.duration}):null]})]},`${r.label}-${o}`))})}function Tt({title:i,hint:r,action:o}){return u.jsxs("div",{"data-cp":"empty-state",style:{textAlign:"center",padding:"var(--cp-space-3xl) var(--cp-space-xl)",color:k("text-2")},children:[u.jsx("div",{style:{fontFamily:k("font-serif"),fontSize:k("text-2xl"),color:k("text")},children:i}),r?u.jsx("div",{style:{marginTop:8,fontSize:k("text-md")},children:r}):null,o?u.jsx("div",{style:{marginTop:16},children:o}):null]})}function Bt({size:i=16,label:r="Loading"}){return u.jsx("span",{role:"status","aria-label":r,"data-cp":"spinner",className:"cp-spinner",style:{display:"inline-block",width:i,height:i,borderRadius:"50%",border:`2px solid ${k("border")}`,borderTopColor:k("accent")}})}function ng(i,r){const o=N.useRef(null);return N.useEffect(()=>{var h;if(!i)return;const c=document.activeElement;(h=o.current)==null||h.focus();const d=p=>{p.key==="Escape"&&r()};return document.addEventListener("keydown",d),()=>{var p;document.removeEventListener("keydown",d),(p=c==null?void 0:c.focus)==null||p.call(c)}},[i,r]),o}function db({open:i,title:r,onClose:o,children:c}){const d=ng(i,o),h=N.useId();return i?u.jsx("div",{"data-cp":"dialog-backdrop",onClick:o,style:{position:"fixed",inset:0,zIndex:300,background:"rgba(0,0,0,0.4)",display:"flex",alignItems:"center",justifyContent:"center"},children:u.jsxs("div",{ref:d,role:"dialog","aria-modal":"true","aria-labelledby":h,tabIndex:-1,"data-cp":"dialog",onClick:p=>p.stopPropagation(),style:{width:"min(480px, 92vw)",background:k("bg"),color:k("text"),border:`1px solid ${k("border")}`,borderRadius:k("radius-lg"),boxShadow:k("shadow-lg"),padding:20},children:[u.jsx("h2",{id:h,style:{margin:"0 0 12px",fontFamily:k("font-serif"),fontWeight:400,fontSize:"1.15rem"},children:r}),c]})}):null}function hb({open:i,title:r,onClose:o,side:c="right",children:d}){const h=ng(i,o),p=N.useId();return i?u.jsx("div",{"data-cp":"drawer-backdrop",onClick:o,style:{position:"fixed",inset:0,zIndex:300,background:"rgba(0,0,0,0.3)"},children:u.jsxs("aside",{ref:h,role:"dialog","aria-modal":"true","aria-labelledby":p,tabIndex:-1,"data-cp":"drawer","data-side":c,onClick:g=>g.stopPropagation(),style:{position:"absolute",top:0,bottom:0,[c]:0,width:"min(var(--cp-detail-w, 288px), 92vw)",background:k("bg"),color:k("text"),borderLeft:c==="right"?`1px solid ${k("border")}`:void 0,borderRight:c==="left"?`1px solid ${k("border")}`:void 0,boxShadow:k("shadow-lg"),padding:16,overflow:"auto"},children:[u.jsx("h2",{id:p,style:{margin:"0 0 12px",fontFamily:k("font-serif"),fontWeight:400,fontSize:"1.15rem"},children:r}),d]})}):null}function mb({children:i}){return u.jsx("kbd",{"data-cp":"kbd",style:{fontFamily:k("font-mono"),fontSize:k("text-sm"),padding:"1px 5px",borderRadius:k("radius-md"),background:k("bg-3"),border:`1px solid ${k("border")}`,color:k("text-2")},children:i})}const bn="unmeasured",R0=3e3,pb=["intake","plan","Wall","implement","verify","seal","PR"];function gb(i,r){const o=new Set,c=p=>i.find(g=>!o.has(g)&&g.stage.toLowerCase().includes(p.toLowerCase())),d=(p,g)=>{if(!g)return{name:p,status:"pending",elapsed_s:null};o.add(g);const b=g.started_at?Date.parse(g.started_at):NaN,v=g.ended_at?Date.parse(g.ended_at):g.status==="started"?r:NaN,R=Number.isNaN(b)||Number.isNaN(v)?null:Math.max(0,(v-b)/1e3),y=g.status==="started"?"running":g.status==="completed"?"done":"failed";return{name:p,status:y,elapsed_s:R}},h=pb.map(p=>d(p,c(p)));for(const p of i)o.has(p)||h.push(d(p.stage,p));return h}const vb=i=>i===null?bn:i>=60?`${Math.floor(i/60)}m ${Math.floor(i%60)}s`:`${i.toFixed(1)}s`,ag=i=>i.cost_usd!==null&&i.cost_usd!==void 0?we(i.cost_usd):i.partial_usd?`at least ${we(i.partial_usd)} (rest ${bn})`:bn;function zf(i,r,o){const[c,d]=N.useState({data:null,error:null});return N.useEffect(()=>{let h=!0,p;const g=()=>i().then(b=>{h&&(d({data:b,error:null}),o(b)&&(p=setTimeout(g,R0)))},b=>{h&&(d(v=>({data:v.data,error:b.message})),p=setTimeout(g,R0))});return g(),()=>{h=!1,clearTimeout(p)}},r),c}const yb=i=>!!i&&!!i.version&&!!i.installed_version&&i.version!==i.installed_version&&i.installed_version!=="unknown";function ig(){const{data:i}=zf(()=>W1().catch(()=>null),[],()=>!0);return yb(i)?u.jsxs("p",{role:"status","data-testid":"cp-out-of-date",className:"rounded border border-amber-400 bg-amber-50 p-3 text-sm text-amber-900 dark:bg-amber-950 dark:text-amber-200",children:["Control Plane is out of date, restarting. Run ",u.jsx("code",{children:"loki control serve"})," if it does not come back (running ",i.version,", installed ",i.installed_version,")."]}):null}const Kn="rounded border border-slate-200 p-4 dark:border-slate-800",xb={pending:"text-slate-400",running:"text-sky-600 dark:text-sky-400",done:"text-emerald-600 dark:text-emerald-400",failed:"text-red-600"},bb=i=>i&&/^https?:\/\//.test(i)?i:null;function sg({source:i,run:r}){const{data:o,error:c}=zf(()=>ur(i,r),[i,r],v=>v.status==="running"),[,d]=N.useState(0),h=(o==null?void 0:o.status)==="running";if(N.useEffect(()=>{if(!h)return;const v=setInterval(()=>d(R=>R+1),1e3);return()=>clearInterval(v)},[h]),c&&!o)return u.jsxs("p",{role:"alert",className:"text-red-600",children:["Could not load run: ",c]});if(!o)return u.jsx("p",{className:"text-slate-500",children:"Loading run"});const p=gb(o.stages??[],Date.now()),g=o.files_touched??[],b=bb(o.pr_url);return u.jsxs("section",{"data-testid":"live-run",className:"space-y-4",children:[u.jsx(ig,{}),u.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[u.jsx("h1",{className:"text-xl font-semibold",children:h?"Live run":"Run finished"}),u.jsx("span",{className:"break-all font-mono text-xs text-slate-500",children:o.run_id})]}),u.jsxs("div",{className:Kn,children:[u.jsx("h2",{className:"mb-2 text-sm font-semibold uppercase text-slate-500",children:"Stages"}),u.jsx("ol",{className:"space-y-2 text-sm",children:p.map(v=>u.jsxs("li",{"data-testid":"live-stage","data-status":v.status,className:"flex flex-wrap items-center justify-between gap-x-4",children:[u.jsx("span",{className:"font-medium",children:v.name}),u.jsxs("span",{className:xb[v.status],children:[v.status,", ",v.status==="pending"?"not started":vb(v.elapsed_s),", limit ",bn]})]},v.name))})]}),u.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[u.jsxs("div",{className:Kn,children:[u.jsx("h2",{className:"mb-1 text-sm font-semibold uppercase text-slate-500",children:"Diff"}),u.jsxs("p",{"data-testid":"live-diff",children:[g.length," files, +/- ",bn]})]}),u.jsxs("div",{className:Kn,children:[u.jsx("h2",{className:"mb-1 text-sm font-semibold uppercase text-slate-500",children:"Cost so far"}),u.jsx("p",{"data-testid":"live-cost",children:ag(o)})]}),u.jsxs("div",{className:Kn,children:[u.jsx("h2",{className:"mb-1 text-sm font-semibold uppercase text-slate-500",children:"Model"}),u.jsx("p",{"data-testid":"live-model",children:o.model??bn})]})]}),!h&&u.jsxs("div",{"data-testid":"live-outcome",className:Kn,children:[u.jsx("h2",{className:"mb-1 text-sm font-semibold uppercase text-slate-500",children:"Outcome"}),u.jsx("p",{className:`text-lg font-medium${o.tampered?" text-red-600":""}`,children:Ae(jl(o)).label}),u.jsxs("p",{className:"mt-1 flex flex-wrap gap-4 text-sm",children:[b?u.jsx("a",{"data-testid":"live-pr",href:b,target:"_blank",rel:"noreferrer",className:"text-sky-600 hover:underline dark:text-sky-400",children:"Pull request"}):u.jsx("span",{"data-testid":"live-pr",className:"text-slate-500",children:"no PR"}),o.receipt?u.jsxs("a",{"data-testid":"live-receipt",href:`#/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}`,className:"text-sky-600 hover:underline dark:text-sky-400",children:["Receipt",o.receipt.signed?" (signed)":" (unsigned)"]}):u.jsx("span",{"data-testid":"live-receipt",className:"text-slate-500",children:"no receipt"})]})]}),u.jsx("a",{href:"#/overview",className:"inline-block py-2 text-sm text-sky-600 hover:underline dark:text-sky-400",children:"Overview"})]})}function jb(i,r){const o=new Date(r);o.setUTCHours(0,0,0,0);const c=o.getTime(),d={today:0,week:0,verified:0,unchecked:0,partial:0,failed:0,other:0,running:0,costUsd:0,unmeasuredRuns:0,prsOpened:0,last:[]};for(const h of i){const p=h.started_at?Date.parse(h.started_at):NaN;Number.isNaN(p)||(p>=c&&d.today++,p>=c-6*864e5&&d.week++);const g=jl(h);g===St.VERIFIED?d.verified++:g===St.VERIFIED_UNCHECKED?d.unchecked++:g===St.PARTIAL?d.partial++:g===St.FAILED?d.failed++:g?d.other++:d.running++,h.cost_usd!==null&&h.cost_usd!==void 0?d.costUsd+=h.cost_usd:(d.unmeasuredRuns++,d.costUsd+=h.partial_usd??0),h.pr_url&&d.prsOpened++}return d.last=[...i].sort((h,p)=>Date.parse(p.started_at??"")-Date.parse(h.started_at??"")).slice(0,10),d}function Bl({id:i,label:r,value:o}){return u.jsxs("div",{className:Kn,children:[u.jsx("div",{className:"text-xs uppercase text-slate-500",children:r}),u.jsx("div",{"data-testid":i,className:"mt-1 text-lg font-semibold",children:o})]})}function Sb({runs:i,now:r=Date.now()}){const o=jb(i,r),c=o.unmeasuredRuns===0?`${we(o.costUsd)}`:`${we(o.costUsd)} measured, ${o.unmeasuredRuns} run${o.unmeasuredRuns===1?"":"s"} ${bn}`;return u.jsxs("section",{"data-testid":"overview",className:"space-y-4",children:[u.jsx("h1",{className:"text-xl font-semibold",children:"Overview"}),u.jsxs("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[u.jsx(Bl,{id:"ov-today",label:"Runs today",value:String(o.today)}),u.jsx(Bl,{id:"ov-week",label:"Runs, last 7 days",value:String(o.week)}),u.jsx(Bl,{id:"ov-verified",label:St.VERIFIED,value:String(o.verified)}),u.jsx(Bl,{id:"ov-unchecked",label:"Signature not checked",value:String(o.unchecked)}),u.jsx(Bl,{id:"ov-partial",label:St.PARTIAL,value:String(o.partial)}),u.jsx(Bl,{id:"ov-failed",label:St.FAILED,value:String(o.failed)}),u.jsx(Bl,{id:"ov-cost",label:"Total cost",value:c}),u.jsx(Bl,{id:"ov-pr-opened",label:"PRs opened",value:String(o.prsOpened)}),u.jsx(Bl,{id:"ov-pr-merged",label:"PRs merged",value:bn})]}),u.jsxs("div",{className:Kn,children:[u.jsx("h2",{className:"mb-2 text-sm font-semibold uppercase text-slate-500",children:"Last 10 runs"}),u.jsx("ul",{className:"space-y-1 text-sm",children:o.last.map(d=>u.jsxs("li",{"data-testid":"ov-run",className:"flex flex-wrap justify-between gap-x-4",children:[u.jsx("a",{href:`#/runs/${encodeURIComponent(d.source_id)}/${encodeURIComponent(d.run_id)}`,className:"break-all py-1 font-mono text-xs text-sky-600 hover:underline dark:text-sky-400",children:d.run_id}),u.jsxs("span",{className:d.tampered?"text-red-600":void 0,children:[jl(d)??"in progress",", ",ag(d)]})]},`${d.source_id}/${d.run_id}`))})]})]})}function ug({fallback:i,overview:r}){const{data:o}=zf(()=>Wn(),[],d=>d.runs.some(h=>h.status==="running"));if(!o)return u.jsx("p",{className:"text-slate-500",children:"Loading runs"});if(o.runs.length===0)return u.jsx(u.Fragment,{children:i});const c=o.runs.find(d=>d.status==="running");return c&&!r?u.jsx(sg,{source:c.source_id,run:c.run_id}):u.jsxs(u.Fragment,{children:[u.jsx(ig,{}),u.jsx(Sb,{runs:o.runs})]})}const rr=new Map,yf=new Set;let rg=0;const cg=()=>{rg++;for(const i of yf)i()};function Ce(i){rr.set(i.id,i),cg()}function z0(i){rr.delete(i)&&cg()}const og=()=>[...rr.values()],_b=()=>og().filter(i=>i.inSettings),fg=i=>(yf.add(i),()=>{yf.delete(i)}),lr=()=>rg;function fs(i){const o=(i.replace(/^#/,"").split("?")[0]??"").replace(/\/+$/,"");return o===""?"/":o.startsWith("/")?o:`/${o}`}function Eb(i,r){const o=i.split("/").filter(Boolean),c=r.split("/").filter(Boolean);if(o.length!==c.length)return null;const d={};for(let h=0;h<o.length;h++){const p=o[h];if(p.startsWith(":"))try{d[p.slice(1)]=decodeURIComponent(c[h])}catch{return null}else if(p!==c[h])return null}return d}function Tb(i){const r=fs(i);let o=null;for(const c of rr.values()){const d=Eb(c.path,r);if(!d)continue;const h=c.path.split("/").filter(p=>p&&!p.startsWith(":")).length;(!o||h>o.score)&&(o={page:c,params:d,score:h})}return o?{page:o.page,params:o.params}:null}async function Nb(i){const r=globalThis.LOKI_CONTROL_BASE??"",o=_e(),c=await fetch(`${r}/v1/stats/cost?group=${i}`,{headers:o?{authorization:`Bearer ${o}`}:{}});return await Fn(c),await c.json()}const In=we,ts=i=>i.toLocaleString("en-US"),O0=[{value:"day",label:"Day"},{value:"model",label:"Model"},{value:"repo",label:"Repo"},{value:"provider",label:"Provider"}];function Rb({budget:i}){const r=o=>`${o} run${o===1?"":"s"}`;return u.jsxs(Qt,{"data-testid":"cost-budget",style:{display:"flex",flexDirection:"column",gap:6},children:[u.jsxs("div",{"data-testid":"cost-budget-subscription",children:[u.jsx(Yt,{tone:"info",children:"Subscription runs"})," ","no cap (",r(i.subscription_runs),"): usage counts against your plan limits, no dollar figure is measured."]}),u.jsxs("div",{"data-testid":"cost-budget-api",children:[u.jsx(Yt,{tone:"warning",children:"API-key runs"})," ",In(i.api_key_default_cap_usd)," cap per run by default (",r(i.api_key_runs),"); ",u.jsx("code",{children:"--max-cost"})," and loki.yaml ",u.jsx("code",{children:"budgets.per_run"})," override it."]})]})}function zb({row:i,max:r}){const o=c=>r>0?`${c/r*100}%`:"0%";return u.jsxs("div",{"data-testid":"cost-bar",role:"img","aria-label":`measured ${In(i.measured_usd)}, partial ${In(i.partial_usd)}`,style:{display:"flex",height:8,minWidth:120,background:"var(--cp-bg-3)",borderRadius:4,overflow:"hidden"},children:[u.jsx("span",{"data-part":"measured",style:{width:o(i.measured_usd),background:"var(--cp-accent)"}}),u.jsx("span",{"data-part":"partial",style:{width:o(i.partial_usd),background:"var(--cp-warning-fill)"}})]})}function Ob(){const[i,r]=N.useState("day"),[o,c]=N.useState(null),[d,h]=N.useState(null);if(N.useEffect(()=>{let v=!0;return c(null),h(null),Nb(i).then(R=>{v&&c(R)},R=>{v&&h(R.message)}),()=>{v=!1}},[i]),d)return u.jsx(Tt,{title:"Cost unavailable",hint:d});if(!o)return u.jsx(Bt,{label:"Loading cost"});const p=o.totals,g=Math.max(0,...o.rows.map(v=>v.measured_usd+v.partial_usd)),b=O0.find(v=>v.value===i).label;return u.jsxs("div",{"data-testid":"cost-page",style:{display:"flex",flexDirection:"column",gap:16},children:[u.jsx("h1",{style:{margin:0,fontFamily:"var(--cp-font-serif)",fontWeight:400},children:"Cost and usage"}),u.jsx(Rb,{budget:o.budget}),u.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:12},children:[u.jsx(Jn,{label:"Measured",value:u.jsx("span",{"data-testid":"cost-measured",children:In(p.measured_usd)}),trend:`${p.measured_runs} runs`,trendTone:"success"}),u.jsx(Jn,{label:"Partial (priced sessions only)",value:u.jsx("span",{"data-testid":"cost-partial",children:In(p.partial_usd)}),trend:`${p.partial_runs} runs`,trendTone:"warning"}),u.jsx(Jn,{label:"Unmeasured",value:u.jsxs("span",{"data-testid":"cost-unmeasured",children:[p.unmeasured_runs," runs"]}),trend:"not measured"}),u.jsx(Jn,{label:"Tokens in (incl. cache) / out",value:u.jsxs("span",{"data-testid":"cost-tokens",children:[ts(p.input_tokens)," / ",ts(p.output_tokens)]}),trend:p.token_sessions_total?`partial: ${p.token_sessions} of ${p.token_sessions_total} sessions`:void 0,trendTone:"warning"})]}),u.jsx("div",{children:u.jsx(vf,{label:"Group by",value:b,options:O0,onSelect:v=>r(v)})}),o.rows.length===0?u.jsx(Tt,{title:"No runs yet",hint:"Cost appears here once a run has been ingested."}):u.jsx(ta,{caption:`Cost by ${b}`,columns:[b,"Runs","Measured","Partial","Unmeasured","Tokens in (incl. cache)","Tokens out","Spend"],rows:o.rows.map(v=>[v[i]??"unknown",v.runs,v.measured_runs?In(v.measured_usd):"not measured",v.partial_runs?`${In(v.partial_usd)} (partial)`:"none",v.unmeasured_runs?`${v.unmeasured_runs} not measured`:"none",v.token_sessions_total?`${ts(v.input_tokens)} (partial: ${v.token_sessions} of ${v.token_sessions_total} sessions)`:ts(v.input_tokens),ts(v.output_tokens),u.jsx(zb,{row:v,max:g},"bar")])})]})}const Cb={id:"cost",path:"/cost",title:"Cost and usage",component:Ob},Ab=()=>globalThis.LOKI_CONTROL_BASE??"";async function dg(i,r,o){const c=_e(),d={"content-type":"application/json"};c&&(d.authorization=`Bearer ${c}`);const h=await fetch(`${Ab()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}/${o}`,{method:"POST",headers:d,body:"{}"}),p=await h.json().catch(()=>({}));if(!h.ok)throw new Error(p.error??`HTTP ${h.status}`)}const wb={stop:"Stopping...",retry:"Retrying...",resume:"Resuming..."},Db={stop:"Stop signal sent.",retry:"Retry started as a new run.",resume:"Resume started."};function Mb({source:i,run:r,status:o,ownRules:c,onChanged:d}){const[h,p]=N.useState(!1),[g,b]=N.useState(null),[v,R]=N.useState(!1),[y,A]=N.useState(!1),[B,G]=N.useState(null),lt=o.trim().toUpperCase(),H=g==="stop"||v,$=!H&&(g==="resume"||y||lt==="RUNNING"),tt=lt==="BLOCKED"&&!$&&!H&&!c,M=async L=>{if(!g){p(!1),G(null),b(L);try{await dg(i,r,L),L==="stop"&&R(!0),L==="resume"&&A(!0),G({tone:"ok",text:Db[L]}),d==null||d()}catch(Q){G({tone:"error",text:Q.message})}finally{b(null)}}};return u.jsxs("div",{"data-testid":"run-controls","data-state":H?"stopping":$?"running":lt.toLowerCase(),style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[$&&!g&&!h?u.jsx(pt,{variant:"danger",size:"sm",onClick:()=>p(!0),children:"Stop"}):null,h?u.jsxs("span",{"data-testid":"stop-confirm",role:"group","aria-label":"Confirm stop",style:{display:"flex",gap:8,alignItems:"center"},children:[u.jsx("span",{children:"Stop this run?"}),u.jsx(pt,{variant:"danger",size:"sm",onClick:()=>void M("stop"),children:"Confirm stop"}),u.jsx(pt,{variant:"ghost",size:"sm",onClick:()=>p(!1),children:"Cancel"})]}):null,tt&&!g?u.jsx(pt,{size:"sm",onClick:()=>void M("resume"),children:"Resume"}):null,!$&&!H&&!g&&lt!==""?u.jsx(pt,{variant:c?"primary":"secondary",size:"sm",onClick:()=>void M("retry"),children:"Retry"}):null,g?u.jsx("span",{role:"status",children:wb[g]}):null,!g&&B?u.jsx("span",{role:B.tone==="error"?"alert":"status",style:B.tone==="error"?{color:"var(--cp-error)"}:void 0,children:B.text}):null]})}class Of extends Error{constructor(r,o){super(o),this.status=r}}const hg=()=>globalThis.LOKI_CONTROL_BASE??"",mg=()=>{const i=_e();return i?{authorization:`Bearer ${i}`}:{}};async function pg(i){const r=await fetch(`${hg()}/v1/runs`,{method:"POST",headers:{"content-type":"application/json",...mg()},body:JSON.stringify(i)}),o=await r.json().catch(()=>({}));if(!r.ok)throw new Of(r.status,await Sn(r.status,o.error));return o}const kb=async()=>(await eb()).repos;async function Ub(i){const r=await fetch(`${hg()}/v1/repos/issues?repo=${encodeURIComponent(i)}`,{headers:mg()}),o=await r.json().catch(()=>({}));if(!r.ok)throw new Of(r.status,await Sn(r.status,o.error));return o.issues??[]}const gg=()=>globalThis.LOKI_CONTROL_BASE??"",vg=(i={})=>{const r=_e();return r?{...i,authorization:`Bearer ${r}`}:i};async function yg(i,r){const o=await fetch(`${gg()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}/verify`,{method:"POST",headers:vg({"content-type":"application/json"}),body:"{}"}),c=await o.json().catch(()=>({}));if(!o.ok)throw new Error(await Sn(o.status,c.error));return c}async function Hb(){const i=await fetch(`${gg()}/v1/keys`,{headers:vg()});return i.status===404?null:(i.ok||await Fn(i),await i.json())}function Lb(i){const r=new Map;for(const o of i){if(!o.verdict||!o.started_at)continue;const c=o.started_at.slice(0,10),d=r.get(c)??{v:0,n:0};d.n++,cs(o)&&d.v++,r.set(c,d)}return[...r.entries()].sort(([o],[c])=>o<c?-1:1).map(([o,c])=>({day:o,rate:c.v/c.n,total:c.n}))}const Cf=()=>globalThis.LOKI_CONTROL_BASE??"",Af=()=>{const i=_e();return i?{authorization:`Bearer ${i}`}:{}},wf=(i,r)=>`/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}`;async function xg(i,r,o){try{const c=await fetch(`${Cf()}${wf(i,r)}/artifact/${o}`,{headers:Af()});return c.ok?await c.text():null}catch{return null}}async function Bb(i,r,o=-1){const c=[];try{for(let d=o,h=0;h<200;h++){const p=d>=0?`?after=${d}&limit=1000`:"?limit=1000",g=await fetch(`${Cf()}${wf(i,r)}/events${p}`,{headers:Af()});if(!g.ok)break;const b=await g.json(),v=b.events??[];if(c.push(...v),!b.has_more||v.length===0)break;d=v[v.length-1].seq}}catch{}return c}function qb(i,r){const o=i.split(`
177
-
178
- `),c=o.pop()??"";for(const d of o){const h=d.split(`
179
- `).filter(p=>p.startsWith("data:")).map(p=>p.slice(5).trim()).join("");if(!(!h||!/^event: event$/m.test(d)))try{r(JSON.parse(h))}catch{}}return c}async function $b(i,r,o,c,d){try{const h=await fetch(`${Cf()}${wf(i,r)}/stream?after=${o()}`,{headers:{...Af(),accept:"text/event-stream"},signal:d});if(!h.ok||!h.body)return;const p=h.body.getReader(),g=new TextDecoder;let b="";for(;;){const{done:v,value:R}=await p.read();if(v)return;b=qb(b+g.decode(R,{stream:!0}),c)}}catch{}}const af=i=>i&&typeof i=="object"?i:{},C0=i=>typeof i=="number"&&Number.isFinite(i)?i:null,ul=i=>typeof i=="string"&&i?i:null,sf=i=>{const r=i?Date.parse(i):NaN;return Number.isNaN(r)?null:r};function bg(i){const r=[],o=new Map,c=new Map,d=new Map,h=new Set;for(const g of i){const b=af(g.data),v=g.stage??"";if(g.type==="session.started"&&v&&h.add(v),g.type==="session.started"&&v&&ul(b.model)&&d.set(v,ul(b.model)),g.type==="cost"&&v){const R=c.get(v)??{usd:0,unmeasured:!1,seen:!1},y=C0(b.usd);R.seen=!0,y===null?R.unmeasured=!0:R.usd+=y,c.set(v,R),ul(b.model)&&!d.has(v)&&d.set(v,ul(b.model))}}const p=g=>{const b=c.get(g);return!b&&!h.has(g)&&!d.has(g)?"no-session":b&&b.seen&&!b.unmeasured?b.usd:null};for(const g of i){const b=af(g.data);if(g.type==="run.started")r.push({key:`s${g.seq}`,ts:g.ts??null,kind:"run",label:"Run started",duration_s:null,model:ul(b.model),cost_usd:null,outcome:"started",detail:ul(b.issue_ref)??void 0});else if(g.type==="stage.started"&&g.stage){const v={key:`s${g.seq}`,ts:g.ts??null,kind:"stage",label:g.stage,duration_s:null,model:d.get(g.stage)??null,cost_usd:p(g.stage),outcome:"running",startedMs:sf(g.ts)};o.set(g.stage,v),r.push(v)}else if((g.type==="stage.skipped"||g.type==="stage.failed")&&g.stage){const v=o.get(g.stage),R=ul(b.reason)??(g.type==="stage.skipped"?"no reason recorded":null),y=g.type==="stage.skipped"?"skipped":"failed";v?Object.assign(v,{outcome:y,detail:R??void 0,cost_usd:p(g.stage)}):r.push({key:`s${g.seq}`,ts:g.ts??null,kind:"stage",label:g.stage,duration_s:null,model:null,cost_usd:p(g.stage),outcome:y,detail:R??void 0}),o.delete(g.stage)}else if(g.type==="stage.completed"&&g.stage){const v=o.get(g.stage),R=C0(b.duration_s)??((v==null?void 0:v.startedMs)!=null&&sf(g.ts)!=null?(sf(g.ts)-v.startedMs)/1e3:null),y=ul(b.skipped_reason)??ul(b.reason),A=b.skipped===!0?"skipped":"completed",B=Array.isArray(b.files)?b.files.length:void 0,G=Array.isArray(b.changed_files)?b.changed_files.filter($=>typeof $=="string"):void 0,lt=Array.isArray(b.checks)?b.checks.map(af):void 0,H=lt?{pass:lt.filter($=>$.result==="pass").length,fail:lt.filter($=>$.result==="fail").length}:void 0;v?Object.assign(v,{duration_s:R,outcome:A,model:d.get(g.stage)??v.model,cost_usd:p(g.stage),detail:y??void 0,files:B,changed_files:G,tests:H}):r.push({key:`s${g.seq}`,ts:g.ts??null,kind:"stage",label:g.stage,duration_s:R,model:d.get(g.stage)??null,cost_usd:p(g.stage),outcome:A,detail:y??void 0,files:B}),o.delete(g.stage)}else g.type==="pr.opened"?r.push({key:`s${g.seq}`,ts:g.ts??null,kind:"pr",label:"Pull request opened",duration_s:null,model:null,cost_usd:null,outcome:b.draft===!0?"draft":"opened",detail:ul(b.url)??void 0}):g.type==="receipt.sealed"?r.push({key:`s${g.seq}`,ts:g.ts??null,kind:"receipt",label:"Receipt sealed",duration_s:null,model:null,cost_usd:null,outcome:b.signed===!0?"signed":"unsigned"}):g.type==="run.completed"&&r.push({key:`s${g.seq}`,ts:g.ts??null,kind:"verdict",label:"Run completed",duration_s:null,model:null,cost_usd:null,outcome:ul(b.verdict)??"no verdict"})}return r}function Yb(i){return bg(i).filter(r=>r.kind==="stage").map(r=>({stage:r.label,outcome:r.outcome,changed_files:r.changed_files??null,tests:r.tests??null,cost_usd:r.cost_usd}))}const le="unmeasured",Vb={intake:"Read the issue and its comments",plan:"Named the files and tests in scope",implement:"Edited the code in an isolated worktree",fix:"Fixed what the failing checks reported",verify:"Ran the repo tests against the change",commit:"Committed the change to the run branch",wall:"Wrote acceptance checks",seal:"Signed a receipt with the diff hash","deep-verify":"Full suite and secret scan after the PR opens"};function Gb(i){const r=i.detail?` (${i.detail})`:"";if(i.kind==="run")return`Run started${i.detail?` for ${i.detail}`:""}`;if(i.kind==="pr")return`Opened a ${i.outcome==="draft"?"draft ":""}pull request${r}`;if(i.kind==="receipt")return`Sealed the receipt, ${i.outcome}`;if(i.kind==="verdict")return`Run finished: ${i.outcome==="no verdict"?i.outcome:Ae(i.outcome).label}`;if(i.label==="wall"){if(i.outcome==="skipped")return"Wall skipped: no checks written";if(i.outcome==="completed"&&typeof i.files=="number")return`Wrote acceptance checks (${i.files} ${i.files===1?"file":"files"})`}const o=Vb[i.label]??`Stage ${i.label}`;return i.outcome==="failed"?`${o}: failed${r}`:i.outcome==="skipped"?`${o}: skipped${r}`:i.outcome==="running"?`${o}: in progress`:`${o}${r}`}function Qb(i){const r=i?Date.parse(i):NaN;return Number.isNaN(r)?null:new Date(r).toISOString().slice(11,19)}function Xb(i){const r=[];let o=null;for(const c of i.split(`
180
- `)){const d=/^diff --git a\/(.+?) b\/(.+)$/.exec(c);if(d){o={path:d[2],added:0,removed:0,kind:"modified"},r.push(o);continue}if(o)if(c.startsWith("new file mode"))o.kind="added";else if(c.startsWith("deleted file mode"))o.kind="deleted";else{if(c.startsWith("+++")||c.startsWith("---"))continue;c.startsWith("+")?o.added++:c.startsWith("-")&&o.removed++}}return r}function Zb(i){const r=/^\s*\[([^\]]{1,40})\]\s*(.*)$/.exec(i);if(r)return{owner:r[1],text:r[2]};const o=/^(.*?)[\s,;(-]*\(?owner[:\s]+([A-Za-z0-9_@./-]{1,40})\)?\s*$/i.exec(i);return o?{owner:o[2],text:o[1]}:{owner:null,text:i}}function Kb(i){const r=i.length,o=i.some(d=>d.status==="started"),c=i.filter(d=>d.status!=="started").length;return{n:Math.min(r,c+(o?1:0)),m:r,running:o}}function jg(i){return typeof i!="number"?le:i>=3600?`${Math.floor(i/3600)}h ${Math.floor(i%3600/60)}m`:i>=60?`${Math.floor(i/60)}m ${Math.floor(i%60)}s`:`${i.toFixed(1)}s`}function Jb(i,r){const o=i?Xb(i):[];return o.length?{files:o,source:"patch"}:r&&r.files.length?{files:r.files.map(c=>({...c,kind:"modified"})),source:"git"}:null}const Ib=i=>i&&typeof i=="object"?i:{},Qu=i=>typeof i=="string"&&i.trim()?i.trim():null,uf=(i,r=120)=>i.length>r?`${i.slice(0,r-3)}...`:i,Fb=/time ?limit|timed out|time budget|over cap/i;function Wb(i){const r=new Map,o=[];let c=0;for(const g of i){const b=Ib(g.data);if(g.type==="test.result"){const v=Qu(b.name);v&&r.set(v,{result:String(b.result??""),why:Qu(b.first_error)??Qu(b.reason)})}else if(g.type==="stage.completed"&&g.stage==="fix"&&b.killed===!0)c++;else if((g.type==="stage.failed"||g.type==="stage.skipped")&&g.stage){const v=Qu(b.reason);v&&g.stage!=="fix"?o.push(`${g.stage}: ${uf(v)}`):v&&Fb.test(v)&&c++}}const d=[],h=[...r].filter(([,g])=>g.result==="fail");h.length&&d.push(`verify: ${h.slice(0,3).map(([g,b])=>b.why?`${g} ${uf(b.why,90)}`:`${g} failed`).join("; ")}${h.length>3?`; ${h.length-3} more`:""}`);const p=[...r].filter(([,g])=>g.result==="not_run");!h.length&&p.length&&d.push(`verify: ${p.slice(0,3).map(([g,b])=>b.why?`${g} not run (${uf(b.why,60)})`:`${g} not run`).join("; ")}`);for(const g of o.slice(0,2))d.some(b=>b.includes(g))||d.push(g);return c&&d.push(`${c} fix round${c===1?"":"s"} hit time limits`),d.length?d.join("; "):null}const Ja=i=>i&&typeof i=="object"&&!Array.isArray(i)?i:{},Ia=i=>typeof i=="string"&&i.trim()?i.trim():null,ql=(i,r)=>{for(const o of r){const c=Ia(i[o]);if(c)return c}return null},Pb={pass:"pass",passed:"pass",ok:"pass",success:"pass",flaky:"pass",fail:"fail",failed:"fail",failure:"fail",error:"fail",not_run:"not_run",skipped:"not_run",skip:"not_run"},Sg=i=>{const r=Ja(i),o=typeof i=="string"?i:Ia(r.result)??Ia(r.status)??Ia(r.outcome);return o?Pb[o.toLowerCase()]??null:null},_g=i=>({total:i.length,pass:i.filter(r=>r==="pass").length,fail:i.filter(r=>r==="fail").length,notRun:i.filter(r=>r==="not_run").length});function tj(i){if(!i)return null;let r;try{const g=JSON.parse(i);if(!g||typeof g!="object"||Array.isArray(g))return null;r=g}catch{return null}const o=Ja(r.git),c=Ja(r.diff),d=Array.isArray(r.checks)?r.checks:Array.isArray(r.tests)?r.tests:null,h=!d&&r.checks&&typeof r.checks=="object"?Object.values(Ja(r.checks)):null,p=d??h;return{verdict:ql(r,["verdict","result","outcome"]),diffSha:ql(r,["diff_sha256","diff_hash","diff_sha"])??ql(c,["sha256","hash"]),base:ql(r,["base_sha","base","base_commit"])??ql(o,["base","base_sha"]),head:ql(r,["head_sha","head","head_commit"])??ql(o,["head","head_sha"]),checks:p?_g(p.map(Sg)):null}}function ej(i){let r=null,o=null;const c=new Map;for(const d of i){const h=Ja(d.data);if(d.type==="stage.completed"&&d.stage==="commit"&&(r=ql(h,["head_sha"])??r),o=ql(h,["base_sha"])??o,d.type==="test.result"){const p=Ia(h.name);p&&c.set(p,Sg(h))}}return{verdict:null,diffSha:null,base:o,head:r,checks:c.size?_g([...c.values()]):null}}function lj(i,r){if(i===void 0)return{facts:{verdict:null,diffSha:null,base:null,head:null,checks:null},state:"loading"};const o=tj(i);return o?{facts:o,state:"read"}:{facts:ej(r),state:"unreachable"}}function rf(i,r){return r==="read"?le:r==="loading"?"loading":"receipt file not reachable from this Control Plane"}const nj="Loki's own rules stopped this run (fixed in 10.10.3). Retry on the latest version.";function cf(i){return Ae(i.verdict?sr(i)??i.verdict:null)}function aj(i){var c;const r=i.verdict?sr(i)??i.verdict:null;if(!r)return null;const o=(c=i.integrity_reasons)==null?void 0:c[0];return(r==="TAMPERED"||r==="UNVERIFIED")&&o?tr(`The receipt did not pass the integrity check: ${o}`):i.stop_reason?tr(i.stop_reason).replace(/\s+/g," ").trim():null}function ij(i){const r=h=>[...i].reverse().map(p=>p.type==="stage.completed"&&p.stage===h?Ia(Ja(p.data).spec_conflict_reason):null).find(p=>!!p)??null,o=r("fix")??r("implement"),c=Wb(i.map(h=>({type:h.type,stage:h.stage,data:h.data}))),d=[o,c].filter(h=>!!h);return d.length?d.join(`
181
-
182
- `):null}const sj=le,uj={good:"success",warn:"warning",bad:"error",neutral:"neutral"};function Wu({verdict:i,label:r,tone:o,testid:c}){const d=r?{label:r,tone:o??"neutral"}:Ae(i);return u.jsx(Yt,{tone:uj[d.tone],pulse:d.label==="Running","data-testid":c,style:{textTransform:"none",letterSpacing:0},children:d.label})}function A0(i){return i.token_sessions!=null&&i.total_sessions>0&&i.token_sessions<i.total_sessions?`partial: ${i.token_sessions} of ${i.total_sessions} sessions`:null}function rj(i){return i.cost_usd!==null&&i.cost_usd!==void 0?we(i.cost_usd):i.partial_usd?`at least ${we(i.partial_usd)} (${i.measured_sessions} of ${i.total_sessions} sessions measured)`:sj}function cj(i){const r=i.data,o=r==null?"":typeof r=="string"?r:JSON.stringify(r);return[i.type,i.stage,o.length>160?`${o.slice(0,160)}...`:o].filter(Boolean).join(" ")}function oj(i,r){const[o,c]=N.useState([]),d=N.useRef(-1);return N.useEffect(()=>{const h=new AbortController;d.current=-1;const p=g=>{const b=g.filter(v=>v.seq>d.current);b.length&&(d.current=b[b.length-1].seq,c(v=>[...v,...b].slice(-2e3)))};return(async()=>{for(p(await Bb(i,r));!h.signal.aborted;)await $b(i,r,()=>d.current,g=>p([g]),h.signal),h.signal.aborted||await new Promise(g=>setTimeout(g,3e3))})(),()=>h.abort()},[i,r]),o}function of(i,r,o){const[c,d]=N.useState(void 0);return N.useEffect(()=>{let h=!0;return xg(i,r,o).then(p=>{h&&d(p)}),()=>{h=!1}},[i,r,o]),c}const xf={completed:"var(--cp-term-green)",running:"var(--cp-term-purple)",failed:"var(--cp-term-red)",skipped:"var(--cp-term-amber)"},fj=i=>xf[i==="started"?"running":i]??"var(--cp-term-dim)";function Za({color:i,pulse:r}){return u.jsx("span",{"aria-hidden":"true",className:r?"cp-pulse":void 0,style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:i,flexShrink:0}})}function dj({d:i}){return u.jsxs("aside",{className:"cp-term-side","data-testid":"run-stages","aria-label":"Stages",children:[u.jsx("div",{style:{color:"var(--cp-term-dim)",marginBottom:10,textTransform:"uppercase",letterSpacing:"0.12em",fontSize:10},children:"Stages"}),i.stages.length===0?u.jsx("div",{style:{color:"var(--cp-term-muted)"},children:"no stages recorded yet"}):null,i.stages.map((r,o)=>u.jsxs("div",{"data-testid":"run-stage","data-status":r.status,style:{display:"flex",alignItems:"center",gap:8,padding:"4px 0",color:r.status==="started"?"var(--cp-term-lilac)":"var(--cp-term-text)"},children:[u.jsx(Za,{color:fj(r.status),pulse:r.status==="started"}),u.jsx("span",{className:"cp-trunc",style:{flex:1},children:r.stage}),r.reason?u.jsx("span",{"data-testid":"run-stage-reason",className:"cp-trunc",style:{maxWidth:80,color:"var(--cp-term-muted)"},title:r.reason,children:r.reason}):r.status==="skipped"?u.jsx("span",{"data-testid":"run-stage-reason",style:{color:"var(--cp-term-muted)"},children:"no reason recorded"}):null]},`${r.stage}-${o}`))]})}function hj({events:i}){const r=Yb(i),[o,c]=N.useState(0);if(r.length===0)return null;const d=Math.min(o,r.length-1),h=r[d],p=h.changed_files?h.changed_files.length?h.changed_files.join(", "):"none":le,g=h.tests?`${h.tests.pass} pass, ${h.tests.fail} fail`:le,b=h.cost_usd==="no-session"?"-":h.cost_usd===null?le:we(h.cost_usd);return u.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,marginBottom:8},children:[u.jsx("input",{"data-testid":"run-scrubber",type:"range",min:0,max:r.length-1,step:1,value:d,"aria-label":"Replay stage",onChange:v=>c(Number(v.target.value))}),u.jsxs("div",{"data-testid":"run-scrubber-step","aria-live":"polite",style:{fontFamily:"var(--cp-font-mono)",fontSize:12,color:"var(--cp-term-text)"},children:[d+1,"/",r.length," ",h.stage," (",h.outcome,") | files ",p," | tests ",g," | cost ",b]})]})}function mj({events:i,awaiting:r}){const o=bg(i);return o.length===0?u.jsx("div",{"data-testid":"run-timeline",style:{color:"var(--cp-term-muted)",fontSize:12},children:r?"Waiting for the first event":"No events recorded for this run."}):u.jsxs(u.Fragment,{children:[u.jsx(hj,{events:i}),u.jsx("ol",{"data-testid":"run-timeline","aria-live":"polite",style:{listStyle:"none",margin:0,padding:0},children:o.map(c=>{const d=c.kind==="stage";return u.jsxs("li",{className:"cp-tl-row","data-testid":"timeline-line","data-outcome":c.outcome,children:[u.jsx("span",{"data-testid":"tl-time",style:{fontFamily:"var(--cp-font-mono)",color:"var(--cp-term-dim)"},children:Qb(c.ts)??le}),u.jsxs("span",{style:{display:"flex",alignItems:"flex-start",gap:6,fontFamily:"var(--cp-font-mono)",color:xf[c.outcome]??"var(--cp-term-lilac)"},children:[u.jsx("span",{style:{marginTop:6},children:u.jsx(Za,{color:xf[c.outcome]??"var(--cp-term-purple)",pulse:c.outcome==="running"})}),u.jsx("strong",{"data-testid":"tl-label",className:"cp-trunc",style:{fontWeight:500},children:c.label})]}),u.jsx("span",{"data-testid":"tl-desc",style:{color:"var(--cp-term-text)"},children:Gb(c)}),d?u.jsxs("span",{className:"cp-tl-meta",children:[u.jsx("span",{"data-testid":"tl-duration",children:typeof c.duration_s=="number"?jg(c.duration_s):c.outcome==="running"?"running":le}),u.jsx("span",{"data-testid":"tl-model",children:c.model??(c.cost_usd==="no-session"?"-":le)}),u.jsx("span",{"data-testid":"tl-cost",children:c.cost_usd==="no-session"?"-":c.cost_usd===null?le:we(c.cost_usd)})]}):null]},c.key)})})]})}const pj={display:"flex",flexDirection:"column",gap:10};function li({title:i,meta:r,children:o,testid:c}){return u.jsxs(Qt,{"data-testid":c,style:pj,children:[u.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,flexWrap:"wrap"},children:[u.jsx("h2",{className:"cp-display",style:{margin:0,fontSize:18},children:i}),r?u.jsx("span",{style:{color:"var(--cp-text-muted)",fontSize:"var(--cp-text-base)"},children:r}):null]}),o]})}function gj({d:i,patch:r}){const o=Jb(r,i.diff_stat),c=i.files_touched??[],d=(o==null?void 0:o.files)??null,h=(d==null?void 0:d.reduce((v,R)=>v+(R.added??0),0))??0,p=(d==null?void 0:d.reduce((v,R)=>v+(R.removed??0),0))??0,g={added:["+","var(--cp-success-ink)"],deleted:["-","var(--cp-error-ink)"],modified:["~","var(--cp-warning-ink)"]},b=(v,R)=>v===null?"binary":`${R}${v}`;return u.jsx(li,{title:"Changed files",testid:"run-diff",meta:d&&d.length?`${d.length} files, +${h} -${p}${(o==null?void 0:o.source)==="git"?" (from the receipt's commit range)":""}`:c.length?`${c.length} files touched`:void 0,children:d&&d.length?u.jsx("ul",{style:{listStyle:"none",margin:0,padding:0,fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-base)"},children:d.map(v=>u.jsxs("li",{"data-testid":"changed-file",style:{display:"flex",gap:10,padding:"3px 0"},children:[u.jsx("span",{style:{color:g[v.kind][1],width:12},children:g[v.kind][0]}),u.jsx("span",{className:"cp-trunc",style:{flex:1},title:v.path,children:v.path}),u.jsx("span",{style:{color:"var(--cp-success-ink)"},children:b(v.added,"+")}),u.jsx("span",{style:{color:"var(--cp-error-ink)"},children:v.removed===null?"":b(v.removed,"-")})]},v.path))}):c.length?u.jsx("ul",{style:{listStyle:"none",margin:0,padding:0,fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-base)"},children:c.map(v=>u.jsxs("li",{"data-testid":"changed-file",className:"cp-trunc",title:v,children:[v," ",u.jsxs("span",{style:{color:"var(--cp-text-muted)"},children:["(line counts ",le,")"]})]},v))}):u.jsx("span",{"data-testid":"changed-files-unmeasured",children:r===void 0?u.jsx(Bt,{label:"Loading diff"}):`Changed files ${le}: no diff or commit range could be read for this run.`})})}function Xa({k:i,children:r,testid:o}){return u.jsxs("div",{"data-testid":o,style:{display:"flex",gap:12,alignItems:"baseline",padding:"3px 0",borderBottom:"1px solid var(--cp-border)"},children:[u.jsx("span",{style:{width:120,flexShrink:0,color:"var(--cp-text-muted)"},children:i}),u.jsx("span",{style:{minWidth:0,overflowWrap:"anywhere"},children:r})]})}function vj({d:i,source:r,run:o,receipt:c,receiptJson:d,events:h}){var L,Q,ct,I;const[p,g]=N.useState({busy:!1}),[b,v]=N.useState(!1),R=((L=i.receipt)==null?void 0:L.sha256)??null,{facts:y,state:A}=lj(d,h),B=async()=>{g({busy:!0});try{g({busy:!1,res:await yg(r,o)})}catch(et){g({busy:!1,error:et.message})}},G=y.base??(A==="read"?null:((Q=i.diff_stat)==null?void 0:Q.base)??null),lt=y.head??(A==="read"?null:((ct=i.diff_stat)==null?void 0:ct.head)??null),H=(et,Vt)=>et?et.slice(0,Vt):rf(null,A),$=y.verdict??((I=i.receipt)==null?void 0:I.verdict)??null,tt=i.receipt?i.receipt.signed?i.sig_checked?"signed, signature checked":"signed, signature not checked":"unsigned":"no receipt sealed in the run's events",M=y.checks;return u.jsxs(li,{title:"Evidence and receipt",testid:"run-receipt",meta:R?`sha256 ${R.slice(0,16)}`:"no receipt",children:[u.jsxs("div",{"data-testid":"receipt-rows",style:{display:"flex",flexDirection:"column",fontSize:"var(--cp-text-base)"},children:[u.jsx(Xa,{k:"Verdict",testid:"rr-verdict",children:$?`receipt says ${Ae($).label}`:rf(null,A)}),u.jsx(Xa,{k:"Diff hash",testid:"rr-diff",children:u.jsx("code",{title:y.diffSha??void 0,children:H(y.diffSha,16)})}),u.jsx(Xa,{k:"Base",testid:"rr-base",children:u.jsx("code",{title:G??void 0,children:H(G,12)})}),u.jsx(Xa,{k:"Head",testid:"rr-head",children:u.jsx("code",{title:lt??void 0,children:H(lt,12)})}),u.jsx(Xa,{k:"Signature",testid:"rr-sig",children:tt}),u.jsx(Xa,{k:"Checks run",testid:"rr-checks",children:M?M.total===0?"none recorded":`${M.total} run: ${M.pass} passed, ${M.fail} failed${M.notRun?`, ${M.notRun} not run`:""}`:rf(null,A)})]}),u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[u.jsxs(pt,{variant:"secondary",size:"sm","data-testid":"run-verify",disabled:!R||p.busy,onClick:()=>void B(),children:[u.jsx(G1,{size:13,"aria-hidden":"true"})," ",p.busy?"Verifying":"Verify"]}),u.jsx(pt,{variant:"ghost",size:"sm","data-testid":"receipt-raw-toggle","aria-pressed":b,onClick:()=>v(et=>!et),children:b?"Hide raw":"Show raw"}),R?null:u.jsx("span",{style:{color:"var(--cp-text-muted)"},children:"No receipt to verify."}),p.res?u.jsxs("span",{"data-testid":"run-verify-result",role:"status",children:[u.jsx(Wu,{verdict:p.res.verdict})," ",tr(p.res.reasons[0]??"")]}):null,p.error?u.jsx("span",{role:"alert","data-testid":"run-verify-error",style:{color:"var(--cp-error-ink)"},children:p.error}):null]}),b?c===void 0?u.jsx(Bt,{label:"Loading receipt"}):c===null?u.jsx("div",{"data-testid":"receipt-raw",children:"Receipt text not available for this run."}):u.jsx("pre",{"data-testid":"receipt-raw",style:{margin:0,whiteSpace:"pre-wrap",fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-sm)",maxHeight:280,overflow:"auto",color:"var(--cp-text-2)"},children:c}):null]})}function yj({d:i}){return u.jsx(li,{title:"NOT PROVEN",testid:"run-not-proven",meta:i.not_proven.length?`${i.not_proven.length} item${i.not_proven.length===1?"":"s"}`:void 0,children:i.not_proven.length?u.jsx("ul",{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:8},children:i.not_proven.map((r,o)=>{const c=Zb(r);return u.jsxs("li",{"data-testid":"not-proven-item",style:{display:"flex",gap:10,alignItems:"flex-start",justifyContent:"space-between"},children:[u.jsx("span",{style:{minWidth:0},children:c.text}),c.owner?u.jsxs(Yt,{tone:"info","data-testid":"not-proven-owner",style:{flexShrink:0,textTransform:"none"},children:["owner: ",c.owner]}):null]},o)})}):u.jsx("span",{children:i.verdict?"Nothing listed as not proven.":"Not known until the run finishes."})})}function xj({source:i,run:r,question:o,onSent:c}){const[d,h]=N.useState(""),[p,g]=N.useState({busy:!1}),b=async()=>{g({busy:!0});try{await F0(i,r,d.trim()),g({busy:!1,sent:!0}),c()}catch(v){g({busy:!1,error:v.message})}};return u.jsxs(li,{title:"Needs your answer",testid:"run-reply-card",meta:u.jsx(D1,{size:16,"aria-hidden":"true"}),children:[u.jsx("div",{children:o}),u.jsxs("div",{"data-testid":"run-reply",style:{display:"flex",flexDirection:"column",gap:8},children:[u.jsx(lg,{"aria-label":"Your reply",rows:3,value:d,onChange:v=>h(v.target.value),disabled:p.busy||p.sent}),u.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[u.jsx(pt,{onClick:b,disabled:!d.trim()||p.busy||p.sent,children:"Send reply"}),p.sent?u.jsx("span",{role:"status",children:"Reply saved. Resume the run to continue."}):null,p.error?u.jsx("span",{role:"alert",style:{color:"var(--cp-error-ink)"},children:p.error}):null]})]})]})}function bj({d:i}){let r;return i.pr_url?r=/^https?:\/\//.test(i.pr_url)?u.jsxs("a",{href:i.pr_url,target:"_blank",rel:"noreferrer",style:{color:"var(--cp-accent-ink)",wordBreak:"break-all"},children:[i.pr_url," ",u.jsx(Rf,{size:12,"aria-hidden":"true"})]}):u.jsx("span",{children:i.pr_url}):i.verdict?Ae(i.verdict).tone==="good"?r=u.jsxs("span",{children:["No PR opened ",le,": the run recorded no PR address."]}):r=u.jsxs("span",{children:["No PR opened: the run ended as ",Ae(i.verdict).label.toLowerCase(),", and a PR opens only after the run verifies."]}):r=u.jsx("span",{children:"No PR yet: the run is still in progress."}),u.jsx(li,{title:"Pull request",testid:"run-pr",meta:i.pr_draft?"draft":void 0,children:u.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[u.jsx(J0,{size:14,"aria-hidden":"true"}),r]})})}function jj({source:i,run:r,slot:o,renderSlot:c}){const[d,h]=N.useState(null),[p,g]=N.useState(null),[b,v]=N.useState(!1),[R,y]=N.useState(!1),[A,B]=N.useState({busy:!1}),[G,lt]=N.useState({busy:!1}),H=oj(i,r),$=of(i,r,"diff.patch"),tt=of(i,r,"receipt.md"),M=of(i,r,"receipt.json"),L=tt===void 0||M===void 0?void 0:tt??M,Q=N.useCallback(()=>{ur(i,r).then(Z=>{h(Z),g(null)},Z=>g(Z.message))},[i,r]),ct=!d||d.status==="running"||d.verdict===null;if(N.useEffect(()=>{if(Q(),!ct)return;const Z=setInterval(Q,4e3);return()=>clearInterval(Z)},[Q,ct]),p&&!d)return u.jsx(Tt,{title:"Run not available",hint:p});if(!d)return u.jsx(Bt,{label:"Loading run"});const I=d.title??d.issue_ref??d.origin_repo??`Title ${le}`,et=!!d.verdict&&cf(d).label==="Tampered",Vt=!!d.blocked_question&&!et,Dt=d.status==="running"||d.verdict===null&&!d.ended_at,Ht=Kb(d.stages),q=Dt?null:aj(d),Nt=q?ij(H):null,Xt=!Dt&&!et&&d.own_rules_block===!0,It=!Dt&&!!d.issue_ref,V=async()=>{B({busy:!0});try{await dg(i,r,"retry"),B({busy:!1,msg:"Retry started as a new run."}),Q()}catch(Z){B({busy:!1,msg:Z.message,error:!0})}},nt=async()=>{lt({busy:!0});try{await pg({target:d.issue_ref}),lt({busy:!1,msg:"Started a new run."})}catch(Z){lt({busy:!1,msg:Z.message,error:!0})}};return u.jsxs("section",{"data-testid":"run-thread",style:{maxWidth:1100,margin:"0 auto",padding:"8px 0 32px",display:"flex",flexDirection:"column",gap:20},children:[u.jsxs("header",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:12},children:[u.jsxs("div",{style:{flex:"1 1 320px",minWidth:0},children:[u.jsxs("div",{className:"cp-eyebrow",children:[d.origin_repo??d.source_id,d.issue_ref&&d.title?` / ${d.issue_ref}`:""]}),u.jsx("h1",{"data-testid":"run-title",className:"cp-display",style:{margin:"4px 0 0",fontSize:30,overflowWrap:"anywhere"},children:I})]}),Vt?u.jsx(Wu,{verdict:"BLOCKED",testid:"run-outcome"}):d.verdict?u.jsx(Wu,{label:cf(d).label,tone:cf(d).tone,testid:"run-outcome"}):u.jsx(Wu,{verdict:null,testid:"run-outcome"}),u.jsx("span",{"data-testid":"run-elapsed",style:{fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-base)"},children:jg(d.elapsed_s??d.wall_s)}),u.jsx("span",{"data-testid":"run-cost",style:{fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-base)"},children:rj(d)}),A0(d)&&u.jsxs("span",{"data-testid":"run-tokens-partial",style:{fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-sm, 12px)"},children:["tokens ",A0(d)]}),u.jsxs("span",{"data-testid":"run-header-slot",style:{display:"inline-flex",gap:8},children:[o,c?c(Xt?{...d,blocked_question:null}:d,Q):null]}),c?null:u.jsxs(pt,{variant:Xt?"primary":"secondary",size:"sm","data-testid":"run-retry",disabled:!It||G.busy,title:Dt?"The run is still in progress":d.issue_ref?"Start this issue again":`No issue reference recorded ${le}`,onClick:()=>void nt(),children:[u.jsx(j0,{size:13,"aria-hidden":"true"})," Retry"]}),G.msg?u.jsx("span",{role:G.error?"alert":"status","data-testid":"run-retry-msg",style:{color:G.error?"var(--cp-error-ink)":"var(--cp-text-2)",fontSize:"var(--cp-text-base)"},children:G.msg}):null]}),Xt?u.jsxs(li,{title:"Loki's own rules stopped this run",testid:"run-own-rules",children:[u.jsx("p",{"data-testid":"run-own-rules-text",style:{margin:0},children:nj}),u.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[u.jsxs(pt,{"data-testid":"run-own-rules-retry",disabled:A.busy,onClick:()=>void V(),children:[u.jsx(j0,{size:13,"aria-hidden":"true"})," Retry"]}),A.msg?u.jsx("span",{role:A.error?"alert":"status",style:{color:A.error?"var(--cp-error-ink)":"var(--cp-text-2)"},children:A.msg}):null]})]}):null,q&&!Xt?u.jsxs("div",{style:{margin:"-8px 0 0"},children:[u.jsxs("p",{"data-testid":"run-why",style:{margin:0,fontSize:"var(--cp-text-md)",color:"var(--cp-text-2)",overflowWrap:"anywhere"},children:[u.jsx("strong",{style:{color:"var(--cp-text)"},children:"Why:"})," ",q]}),Nt?u.jsx(pt,{variant:"ghost",size:"sm","data-testid":"run-why-raw-toggle","aria-pressed":R,onClick:()=>y(Z=>!Z),children:R?"Hide raw":"Show raw"}):null,R&&Nt?u.jsx("pre",{"data-testid":"run-why-raw",style:{margin:"6px 0 0",whiteSpace:"pre-wrap",overflowWrap:"anywhere",fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-sm)",maxHeight:280,overflow:"auto",color:"var(--cp-text-2)"},children:Nt}):null]}):null,Vt&&!Xt&&d.blocked_question?u.jsx(xj,{source:i,run:r,question:tr(d.blocked_question),onSent:Q}):null,u.jsxs("div",{"data-testid":"run-summary",style:{display:"grid",gap:16,gridTemplateColumns:"repeat(auto-fit, minmax(min(100%, 440px), 1fr))",alignItems:"start"},children:[u.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16,minWidth:0},children:[u.jsx(gj,{d,patch:$}),u.jsx(vj,{d,source:i,run:r,receipt:L,receiptJson:M,events:H})]}),u.jsxs("div",{"data-testid":"run-aside",style:{display:"flex",flexDirection:"column",gap:16,minWidth:0},children:[u.jsx(yj,{d}),u.jsx(bj,{d})]})]}),u.jsxs("div",{className:"cp-term","data-testid":"run-panel",children:[u.jsxs("div",{className:"cp-term-bar",children:[u.jsxs("span",{style:{display:"inline-flex",gap:6},"aria-hidden":"true",children:[u.jsx(Za,{color:"#FF5F57"}),u.jsx(Za,{color:"#FEBC2E"}),u.jsx(Za,{color:"#28C840"})]}),u.jsxs("span",{className:"cp-trunc",children:["Control Plane / ",d.model??`model ${le}`]}),u.jsx("span",{"data-testid":"run-active-stage",children:Dt?`now: ${d.current_stage??"starting"}`:d.provider??`provider ${le}`})]}),u.jsxs("div",{className:"cp-term-body",children:[u.jsx(dj,{d}),u.jsx("div",{className:"cp-term-main",children:u.jsx(mj,{events:H,awaiting:Dt})})]}),u.jsxs("div",{className:"cp-term-foot",children:[u.jsx("span",{"data-testid":"run-progress",children:Ht.m?`stage ${Ht.n} / ${Ht.m}`:`stage ${le}`}),Dt?u.jsxs("span",{"data-testid":"run-live",style:{display:"inline-flex",alignItems:"center",gap:8,color:"var(--cp-term-green)"},children:[u.jsx(Za,{color:"var(--cp-term-green)",pulse:!0})," live"]}):u.jsx("span",{"data-testid":"run-ended",children:d.ended_at?"run ended":`end time ${le}`})]})]}),u.jsxs("div",{children:[u.jsx(pt,{variant:"ghost",size:"sm","data-testid":"run-raw-toggle","aria-pressed":b,onClick:()=>v(Z=>!Z),children:b?"Hide raw":"Show raw"}),b?u.jsxs("div",{"data-testid":"run-log",style:{marginTop:8},children:[u.jsx("pre",{"data-testid":"run-raw-json",style:{margin:0,padding:12,borderRadius:12,background:"var(--cp-term-bg)",color:"var(--cp-term-text)",fontFamily:"var(--cp-font-mono)",fontSize:11,maxHeight:360,overflow:"auto",whiteSpace:"pre-wrap"},children:JSON.stringify(d,null,2)}),u.jsx("div",{role:"log",style:{marginTop:8,maxHeight:280,overflow:"auto",fontFamily:"var(--cp-font-mono)",fontSize:11,color:"var(--cp-text-2)"},children:H.length===0?u.jsx("div",{children:"No events yet."}):H.map(Z=>u.jsx("div",{children:`${Z.seq} ${cj(Z)}`},Z.seq))})]}):null]})]})}function Sj(){var r,o;const i=/\/runs?\/([^/]+)\/([^/?#]+)/.exec(((r=globalThis.location)==null?void 0:r.pathname)??"")??/#\/runs?\/([^/]+)\/([^/?#]+)/.exec(((o=globalThis.location)==null?void 0:o.hash)??"");return i?{source:decodeURIComponent(i[1]),run:decodeURIComponent(i[2])}:null}function _j({source:i,run:r,slot:o,renderSlot:c}){const d=i&&r?{source:i,run:r}:Sj();return d?u.jsx(jj,{source:d.source,run:d.run,slot:o,renderSlot:c}):u.jsx(Tt,{title:"No run selected",hint:"Open a run from Home or Runs."})}const Eg={id:"run",path:"/runs/:source/:run",title:"Run",component:_j},Tg="loki-theme",nr=new Set,Ej=()=>{try{const i=localStorage.getItem(Tg);return i==="light"||i==="dark"?i:null}catch{return null}},Ng=()=>{try{return typeof globalThis.matchMedia=="function"?globalThis.matchMedia("(prefers-color-scheme: dark)"):null}catch{return null}},Rg=()=>{const i=Ng();return i?i.matches?"dark":"light":"dark"};let cr=Ej(),ds=cr??Rg();function or(i=ds){var o;const r=(o=globalThis.document)==null?void 0:o.documentElement;r&&(cr?r.setAttribute("data-theme",i):r.removeAttribute("data-theme"),r.classList.toggle("dark",i==="dark"))}function Tj(i){ds=i,cr=i;try{localStorage.setItem(Tg,i)}catch{}or(i);for(const r of nr)r()}const ar=()=>Tj(ds==="dark"?"light":"dark");var Fu,Z0;(Z0=(Fu=Ng())==null?void 0:Fu.addEventListener)==null||Z0.call(Fu,"change",()=>{if(!cr){ds=Rg(),or();for(const i of nr)i()}});function zg(){return N.useSyncExternalStore(i=>(nr.add(i),()=>{nr.delete(i)}),()=>ds,()=>"dark")}const Nj="min-h-11 rounded bg-sky-700 px-4 py-2 text-sm text-white disabled:opacity-50 md:min-h-0 md:px-3 md:py-1",Rj="loki start owner/repo#N";function Og(){const[i,r]=N.useState(null),[o,c]=N.useState(!1),d=async()=>{c(!0);try{const h=await tb();r(h.failed.length?{ok:!1,text:`Imported ${h.runs} runs; ${h.failed.length} failed.`}:{ok:!0,text:h.runs===0?"No runs found in this folder.":`Imported ${h.runs} runs. Reload to see them.`})}catch(h){r({ok:!1,text:h.message})}c(!1)};return u.jsxs("div",{children:[u.jsx("button",{type:"button","data-testid":"import-runs",disabled:o,onClick:d,className:Nj,children:"Import runs from this folder"}),i&&u.jsx("p",{role:i.ok?"status":"alert",className:`mt-2 text-sm ${i.ok?"text-emerald-600":"text-red-600"}`,children:i.text})]})}function Df(){return u.jsxs("div",{"data-testid":"empty-state",className:"rounded border border-dashed border-slate-300 p-8 text-center dark:border-slate-700",children:[u.jsx("p",{className:"text-lg font-medium",children:"No runs yet"}),u.jsx("div",{className:"mt-4 flex justify-center",children:u.jsx(Og,{})}),u.jsx("p",{className:"mt-6 text-sm text-slate-600 dark:text-slate-400",children:"Or start your first run from a terminal:"}),u.jsx("code",{className:"mt-2 inline-block rounded bg-slate-200 px-2 py-1 text-sm dark:bg-slate-800",children:Rj})]})}function zj(){const i=zg();return u.jsxs("section",{children:[u.jsx("h2",{className:"mb-4 text-xl",style:{fontFamily:"var(--cp-font-serif)",fontWeight:400},children:"General"}),u.jsx("p",{className:"mb-2 text-sm",style:{color:"var(--cp-text-2)"},children:"Appearance"}),u.jsx(pt,{variant:"secondary",onClick:ar,children:i==="dark"?"Switch to light theme":"Switch to dark theme"}),u.jsx("div",{className:"mt-6",children:u.jsx(Og,{})})]})}let Cg={open:!1,preset:null};const bf=new Set,Ag=i=>{Cg=i;for(const r of bf)r()},Wa=(i=null)=>Ag({open:!0,preset:i}),w0=()=>Ag({open:!1,preset:null}),D0=()=>Cg,Oj=()=>N.useSyncExternalStore(i=>(bf.add(i),()=>{bf.delete(i)}),D0,D0),Cj=()=>globalThis.LOKI_CONTROL_BASE??"",Aj=10;async function wj(){const i=[];let r=null;for(let o=0;o<Aj;o++){const c=_e(),d=new URLSearchParams({limit:"200"});r&&d.set("cursor",r);const h=await fetch(`${Cj()}/v1/runs?${d}`,{headers:c?{authorization:`Bearer ${c}`}:{}});if(!h.ok)throw new Error(`/v1/runs: HTTP ${h.status}`);const p=await h.json();if(i.push(...p.runs),r=p.next_cursor,!r)break}return i}function fr(i=!0){const[r,o]=N.useState({runs:null,error:null}),c=N.useCallback(()=>{wj().then(d=>o({runs:d,error:null}),d=>o(h=>({runs:h.runs,error:d.message})))},[]);return N.useEffect(()=>(c(),i?W0(c):void 0),[c,i]),r}const wg=864e5,Dj=14,Ka=i=>{const r=Date.parse(i.started_at??i.last_event_at??"");return Number.isNaN(r)?-1/0:r},hs=i=>`#/runs/${encodeURIComponent(i.source_id)}/${encodeURIComponent(i.run_id)}`,_n=i=>i.status==="running"||!i.verdict&&!i.ended_at?null:sr(i),Mf=i=>Ae(_n(i)),Mj=i=>_n(i)===null,dr=i=>(_n(i)??"").trim().toUpperCase(),kj=i=>["SPEC_CONFLICT","BLOCKED"].includes(dr(i)),Uj=i=>dr(i)==="PARTIAL",Hj=i=>dr(i)==="VERIFIED",Lj=i=>!Mj(i),M0=i=>{var r;return((r=i.title)==null?void 0:r.trim())||i.issue_ref||"Untitled task"};function hr(i){const r=new Map;for(const c of i){const d=c.issue_ref?`${c.origin_repo??""}|${c.issue_ref}`:`${c.source_id}/${c.run_id}`;r.set(d,[...r.get(d)??[],c])}const o=[];for(const[c,d]of r){const h=[...d].sort((b,v)=>Ka(v)-Ka(b)),p=h[0],g=h.find(b=>{var v;return(v=b.title)==null?void 0:v.trim()});o.push({key:c,title:M0(g||p),repo:p.origin_repo,ref:p.issue_ref,attempts:h,latest:p})}return o.sort((c,d)=>Ka(d.latest)-Ka(c.latest))}function Bj(i){return i.attempts.length<2?null:`${i.ref?i.ref.includes("/")?i.ref.split("/").slice(1).join("/"):i.ref:i.title}, ${i.attempts.length} attempts, latest ${Mf(i.latest).label}`}function kf(i){return typeof i.cost_usd=="number"?we(i.cost_usd):i.partial_usd?`${we(i.partial_usd)}+`:null}function Dg(i){const r=i.wall_s??i.elapsed_s;return typeof r!="number"||!Number.isFinite(r)?null:r<60?`${Math.round(r)}s`:r<3600?`${Math.floor(r/60)}m ${Math.round(r%60)}s`:`${Math.floor(r/3600)}h ${Math.floor(r%3600/60)}m`}function ni(i,r){const o=Date.parse(i.started_at??i.last_event_at??"");if(Number.isNaN(o))return null;const c=Math.max(0,Math.round((r-o)/1e3));return c<60?"just now":c<3600?`${Math.floor(c/60)}m ago`:c<86400?`${Math.floor(c/3600)}h ago`:`${Math.floor(c/86400)}d ago`}function Mg(i,r){const o=i.filter(h=>kj(h.latest)),c=i.filter(h=>Uj(h.latest)),d=i.filter(h=>h.latest.pr_url&&["VERIFIED","ALREADY_SATISFIED"].includes(dr(h.latest))&&r-Ka(h.latest)<=Dj*wg);return{blocked:o,partial:c,prs:d}}function qj(i,r,o){const c=i.filter(b=>Ka(b)>=o-7*wg),d=c.filter(Lj),h=d.filter(Hj),p=c.filter(b=>typeof b.cost_usd=="number"),g=Mg(r,o);return{runsWeek:c.length,finishedWeek:d.length,verifiedWeek:h.length,verifiedShare:d.length?h.length/d.length:null,costWeek:p.length?p.reduce((b,v)=>b+(v.cost_usd??0),0):null,avgCostWeek:p.length?p.reduce((b,v)=>b+(v.cost_usd??0),0)/p.length:null,pricedWeek:p.length,costPartial:p.length<c.length,needsYou:g.blocked.length+g.partial.length+g.prs.length}}const $j={good:"success",warn:"warning",bad:"error",neutral:"neutral"};function ms({verdict:i}){const r=Ae(i);return u.jsx(Yt,{tone:$j[r.tone],pulse:r.label==="Running","data-outcome":r.label,style:{textTransform:"none",letterSpacing:0,whiteSpace:"nowrap"},children:r.label})}const Se={padding:"12px 14px",verticalAlign:"top"},Yj={...Se,textAlign:"left",fontSize:"var(--cp-text-sm)",fontWeight:500,color:"var(--cp-text-muted)",borderBottom:"1px solid var(--cp-border)"},ns={color:"var(--cp-text-muted)",fontSize:"var(--cp-text-sm)"},kg={color:"var(--cp-text)",textDecoration:"none"};function mr({run:i}){if(!i.pr_url)return null;const r=/\/pull\/(\d+)/.exec(i.pr_url);return u.jsxs("a",{href:i.pr_url,target:"_blank",rel:"noreferrer",style:{color:"var(--cp-accent)",display:"inline-flex",gap:4,alignItems:"center",textDecoration:"none"},children:[r?`PR #${r[1]}`:"PR",u.jsx(Rf,{size:12,"aria-hidden":"true"})]})}function Vj({run:i,now:r}){return u.jsxs("tr",{"data-testid":"attempt-row",style:{background:"var(--cp-bg-3)"},children:[u.jsx("td",{style:{...Se,paddingLeft:40},children:u.jsx("a",{href:hs(i),style:{...kg,color:"var(--cp-accent)"},children:"Attempt"})}),u.jsx("td",{style:Se}),u.jsx("td",{style:Se,children:u.jsx(ms,{verdict:_n(i)})}),u.jsx("td",{style:Se,children:u.jsx(mr,{run:i})}),u.jsx("td",{style:Se,children:kf(i)}),u.jsx("td",{style:Se,children:Dg(i)}),u.jsx("td",{style:{...Se,...ns},children:ni(i,r)})]})}function Gj({g:i,now:r}){const[o,c]=N.useState(!1),d=i.attempts.length>1,h=Bj(i),p=i.latest;return u.jsxs(N.Fragment,{children:[u.jsxs("tr",{"data-testid":"issue-row","data-attempts":i.attempts.length,style:{borderTop:"1px solid var(--cp-border-light)"},children:[u.jsx("td",{style:Se,children:u.jsxs("div",{style:{display:"flex",gap:8,alignItems:"flex-start"},children:[d?u.jsx("button",{type:"button","data-testid":"expand","aria-expanded":o,"aria-label":o?"Hide attempts":"Show attempts",onClick:()=>c(g=>!g),style:{background:"none",border:0,padding:2,cursor:"pointer",color:"var(--cp-text-muted)"},children:o?u.jsx(x1,{size:14,"aria-hidden":"true"}):u.jsx(j1,{size:14,"aria-hidden":"true"})}):u.jsx("span",{style:{width:18}}),u.jsxs("div",{style:{minWidth:0},children:[u.jsx("a",{href:hs(p),"data-testid":"issue-title",style:kg,children:i.title}),h?u.jsx("div",{"data-testid":"group-summary",style:ns,children:h}):i.ref?u.jsx("div",{style:ns,children:i.ref}):null]})]})}),u.jsx("td",{style:{...Se,...ns},children:i.repo}),u.jsx("td",{style:Se,children:u.jsx(ms,{verdict:_n(p)})}),u.jsx("td",{style:Se,children:u.jsx(mr,{run:p})}),u.jsx("td",{style:Se,children:kf(p)}),u.jsx("td",{style:Se,children:Dg(p)}),u.jsx("td",{style:{...Se,...ns},children:ni(p,r)})]}),d&&o?i.attempts.map(g=>u.jsx(Vj,{run:g,now:r},`${g.source_id}/${g.run_id}`)):null]})}const Qj={outcome:"",repo:"",q:""};function Xj(i,r){const o=r.q.trim().toLowerCase();return i.filter(c=>!(r.outcome&&Mf(c.latest).label!==r.outcome||r.repo&&c.repo!==r.repo||o&&![c.title,c.ref,c.repo].some(d=>(d??"").toLowerCase().includes(o))))}function Zj({runs:i,now:r=Date.now()}){const[o,c]=N.useState(Qj),d=N.useMemo(()=>hr(i),[i]),h=N.useMemo(()=>Xj(d,o),[d,o]),p=N.useMemo(()=>[...new Set(d.map(v=>Mf(v.latest).label))].sort(),[d]),g=N.useMemo(()=>[...new Set(d.map(v=>v.repo).filter(v=>!!v))].sort(),[d]),b=o.outcome!==""||o.repo!==""||o.q!=="";return u.jsxs("section",{"data-testid":"runs-page",style:{display:"flex",flexDirection:"column",gap:20},children:[u.jsxs("header",{style:{display:"flex",flexWrap:"wrap",gap:12,alignItems:"center"},children:[u.jsx("h1",{style:{fontFamily:"var(--cp-font-serif)",fontWeight:400,fontSize:"var(--cp-text-2xl)",margin:0,marginRight:"auto"},children:"Runs"}),u.jsx(Pn,{"aria-label":"Search runs",placeholder:"Search issues",value:o.q,onChange:v=>c({...o,q:v.target.value}),style:{maxWidth:220}}),u.jsx("span",{"data-testid":"filter-outcome",children:u.jsx(vf,{label:"Outcome",value:o.outcome||"All",options:[{value:"",label:"All"},...p.map(v=>({value:v,label:v}))],onSelect:v=>c({...o,outcome:v})})}),u.jsx("span",{"data-testid":"filter-repo",children:u.jsx(vf,{label:"Repo",value:o.repo||"All",options:[{value:"",label:"All"},...g.map(v=>({value:v,label:v}))],onSelect:v=>c({...o,repo:v})})}),u.jsx(pt,{"data-testid":"new-run-button",onClick:()=>Wa(),children:"New run"})]}),i.length===0?u.jsx(Df,{}):h.length===0?u.jsx(Tt,{title:b?"No runs match these filters":"No runs yet",hint:b?"Clear a filter or the search to see more.":"Use New run to start one from a registered repo."}):u.jsx(Qt,{style:{padding:0,overflow:"auto"},children:u.jsxs("table",{"data-testid":"runs-table",style:{width:"100%",borderCollapse:"collapse",fontSize:"var(--cp-text-base)"},children:[u.jsx("thead",{children:u.jsx("tr",{children:["Issue","Repo","Outcome","PR","Cost","Duration","When"].map(v=>u.jsx("th",{scope:"col",style:Yj,children:v},v))})}),u.jsx("tbody",{children:h.map(v=>u.jsx(Gj,{g:v,now:r},v.key))})]})})]})}function Kj(){const{runs:i,error:r}=fr();return i===null?r?u.jsx(Tt,{title:"Could not load runs",hint:r}):u.jsx(Bt,{label:"Loading runs"}):u.jsx(Zj,{runs:i})}const Jj={id:"runs",path:"/runs",title:"Runs",component:Kj,inSettings:!1},Ij=12,jn={color:"var(--cp-text-muted)",fontSize:"var(--cp-text-sm)"},Uf={fontFamily:"var(--cp-font-serif)",fontWeight:400,fontSize:"var(--cp-text-xl)",margin:0};function Fj(i){const r=i.verifiedShare===null?"No finished runs":`${Math.round(i.verifiedShare*100)}%`;return[{id:"kpi-runs",label:"Runs this week",value:String(i.runsWeek)},{id:"kpi-verified",label:"Verified share",value:r,trend:i.finishedWeek?`${i.verifiedWeek} of ${i.finishedWeek} finished`:void 0},{id:"kpi-cost",label:"Cost this week",value:i.costWeek===null?"No priced runs":`${we(i.costWeek)}${i.costPartial?"+":""}`,trend:i.avgCostWeek===null?void 0:`avg ${we(i.avgCostWeek)} across ${i.pricedWeek} priced`},{id:"kpi-needs",label:"Needs you",value:String(i.needsYou)}]}function ff({title:i,items:r,now:o,testid:c}){return r.length===0?null:u.jsxs("div",{"data-testid":c,children:[u.jsxs("div",{style:{...jn,fontWeight:500,padding:"10px 16px 4px"},children:[i," (",r.length,")"]}),r.map(d=>u.jsxs("div",{"data-testid":"inbox-row",style:{display:"flex",gap:12,alignItems:"center",padding:"10px 16px",borderTop:"1px solid var(--cp-border-light)"},children:[u.jsx("a",{href:hs(d.latest),style:{flex:1,minWidth:0,color:"var(--cp-text)",textDecoration:"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.title}),d.repo?u.jsx("span",{style:jn,children:d.repo}):null,u.jsx(mr,{run:d.latest}),u.jsx("span",{style:jn,children:ni(d.latest,o)})]},d.key))]})}function Wj({groups:i,now:r}){const o=N.useMemo(()=>Mg(i,r),[i,r]),c=o.blocked.length+o.partial.length+o.prs.length===0;return u.jsxs("section",{"data-testid":"needs-you","aria-label":"Needs you",style:{display:"flex",flexDirection:"column",gap:12},children:[u.jsx("h2",{style:Uf,children:"Needs you"}),u.jsx(Qt,{style:{padding:0},children:c?u.jsx("p",{"data-testid":"needs-you-empty",style:{...jn,margin:0,padding:16},children:"Nothing is waiting on you."}):u.jsxs(u.Fragment,{children:[u.jsx(ff,{testid:"inbox-blocked",title:"Runs waiting for your answer",items:o.blocked,now:r}),u.jsx(ff,{testid:"inbox-partial",title:"Partly verified, review",items:o.partial,now:r}),u.jsx(ff,{testid:"inbox-prs",title:"Pull requests to review",items:o.prs,now:r})]})})]})}function Pj({groups:i,now:r}){const o=i.slice(0,Ij);return u.jsxs("section",{"data-testid":"latest-by-issue","aria-label":"Latest by issue",style:{display:"flex",flexDirection:"column",gap:12},children:[u.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:12},children:[u.jsx("h2",{style:{...Uf,marginRight:"auto"},children:"Latest by issue"}),i.length>o.length?u.jsx("a",{href:"#/runs",style:{color:"var(--cp-accent)",fontSize:"var(--cp-text-sm)"},children:"All runs"}):null]}),o.length===0?u.jsx(Df,{}):u.jsx(Qt,{style:{padding:0},children:o.map((c,d)=>u.jsxs("div",{"data-testid":"latest-row",style:{display:"flex",gap:12,alignItems:"center",padding:"12px 16px",borderTop:d?"1px solid var(--cp-border-light)":void 0},children:[u.jsx("a",{href:hs(c.latest),style:{flex:1,minWidth:0,color:"var(--cp-text)",textDecoration:"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c.title}),c.repo?u.jsx("span",{style:jn,children:c.repo}):null,u.jsx(ms,{verdict:_n(c.latest)}),u.jsx("span",{style:{...jn,minWidth:64,textAlign:"right"},children:ni(c.latest,r)})]},c.key))})]})}const tS={pass:"success",warn:"warning",fail:"error"},eS={pass:"Pass",warn:"Warning",fail:"Failing"};function lS({doctor:i,noRuns:r}){if(!i)return null;const o="checks"in i&&i.checks.some(c=>c.status!=="pass");return!("error"in i)&&!o&&!r?null:u.jsxs("section",{"data-testid":"getting-started","aria-label":"Getting started",style:{display:"flex",flexDirection:"column",gap:12},children:[u.jsx("h2",{style:Uf,children:"Getting started"}),u.jsx(Qt,{style:{padding:0},children:"error"in i?u.jsxs("p",{"data-testid":"getting-started-error",role:"alert",style:{...jn,margin:0,padding:16},children:["Could not run the setup checks: ",i.error]}):i.checks.map((c,d)=>u.jsxs("div",{"data-testid":"doctor-check","data-status":c.status,style:{display:"flex",gap:12,alignItems:"center",padding:"10px 16px",borderTop:d?"1px solid var(--cp-border-light)":void 0},children:[u.jsx(Yt,{tone:tS[c.status],children:eS[c.status]}),u.jsx("span",{style:{flex:1,minWidth:0},children:c.name}),u.jsx("span",{style:jn,children:c.detail})]},c.name))})]})}function nS({runs:i,now:r=Date.now(),doctor:o=null}){const c=N.useMemo(()=>hr(i),[i]),d=N.useMemo(()=>Fj(qj(i,c,r)),[i,c,r]);return u.jsxs("div",{"data-testid":"overview",style:{display:"flex",flexDirection:"column",gap:32,maxWidth:960},children:[u.jsxs("header",{style:{display:"flex",alignItems:"center",gap:12},children:[u.jsx("h1",{style:{fontFamily:"var(--cp-font-serif)",fontWeight:400,fontSize:"var(--cp-text-2xl)",margin:0,marginRight:"auto"},children:"Overview"}),u.jsx(pt,{"data-testid":"new-run-button",onClick:()=>Wa(),children:"New run"})]}),u.jsx("div",{"data-testid":"kpis",style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:16},children:d.map(h=>u.jsx("div",{"data-testid":h.id,children:u.jsx(Jn,{label:h.label,value:h.value,trend:h.trend})},h.id))}),u.jsx(lS,{doctor:o,noRuns:i.length===0}),u.jsx(Wj,{groups:c,now:r}),u.jsx(Pj,{groups:c,now:r})]})}function aS(){const{runs:i,error:r}=fr(),[o,c]=N.useState(null);return N.useEffect(()=>{let d=!0;return nb().then(h=>d&&c(h),h=>d&&c({error:h.message})),()=>{d=!1}},[]),i===null?r?u.jsx(Tt,{title:"Could not load runs",hint:r}):u.jsx(Bt,{label:"Loading overview"}):u.jsx(nS,{runs:i,doctor:o})}const iS={id:"home",path:"/home",title:"Overview",component:aS};function sS(i){return i.verdict?cs(i)?"verified":"notproven":i.pr_url?"pr":i.status==="running"||i.started_at?"running":"issue"}const k0={issue:"Issue",running:"Running",pr:"PR open",verified:"Verified",notproven:"Not proven"};function uS({r:i}){const r=i.issue_ref??i.run_id;return u.jsx("a",{href:`#/runs/${encodeURIComponent(i.source_id)}/${encodeURIComponent(i.run_id)}`,"data-testid":"board-card","data-run":i.run_id,style:{textDecoration:"none",color:"inherit"},children:u.jsxs(Qt,{interactive:!0,compact:!0,children:[u.jsx("div",{style:{fontWeight:600,fontSize:"var(--cp-text-md)",overflowWrap:"anywhere"},children:r}),u.jsx("div",{style:{color:"var(--cp-text-muted)",fontSize:"var(--cp-text-xs)",marginTop:2},children:i.origin_repo??"repo not recorded"}),u.jsxs("div",{style:{display:"flex",gap:6,marginTop:8,flexWrap:"wrap",alignItems:"center"},children:[i.verdict?u.jsx(Fa,{run:i}):i.pr_url?u.jsx(Yt,{tone:"info",children:i.pr_draft?"draft PR":"PR open"}):i.status==="running"?u.jsx(Fa,{verdict:St.RUNNING}):u.jsx(Yt,{children:"queued"}),i.current_stage&&!i.verdict?u.jsx(Yt,{children:i.current_stage}):null]})]})})}function es({id:i,runs:r}){return u.jsxs("section",{"data-testid":`lane-${i}`,"aria-label":k0[i],style:{display:"flex",flexDirection:"column",gap:8},children:[u.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"var(--cp-text-xs)",color:"var(--cp-text-2)",textTransform:"uppercase",letterSpacing:"0.05em"},children:[u.jsx("span",{children:k0[i]}),u.jsx("span",{children:r.length})]}),r.length===0?u.jsx("div",{style:{color:"var(--cp-text-muted)",fontSize:"var(--cp-text-xs)"},children:"none"}):r.map(o=>u.jsx(uS,{r:o},`${o.source_id}/${o.run_id}`))]})}function Xu({id:i,children:r}){return u.jsx("div",{"data-testid":`col-${i}`,style:{background:"var(--cp-bg-2)",borderRadius:"var(--cp-radius-lg)",padding:10,display:"flex",flexDirection:"column",gap:16,minWidth:220},children:r})}function rS(){const[i,r]=N.useState(null),[o,c]=N.useState(null),d=N.useCallback(()=>{Wn().then(p=>{r(p.runs),c(null)}).catch(p=>c(p.message))},[]);if(N.useEffect(()=>(d(),W0(d)),[d]),o&&!i)return u.jsx(Tt,{title:"Could not load runs",hint:o});if(!i)return u.jsx("div",{style:{padding:24},children:u.jsx(Bt,{label:"Loading runs"})});if(i.length===0)return u.jsx(Tt,{title:"No runs yet",hint:"Start a run and it will appear here."});const h=p=>i.filter(g=>sS(g)===p);return u.jsxs("div",{style:{padding:24},children:[u.jsx("h1",{style:{fontFamily:"var(--cp-font-serif)",fontSize:"var(--cp-text-2xl)",margin:"0 0 16px"},children:"Work"}),u.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:12,alignItems:"start"},children:[u.jsx(Xu,{id:"issue",children:u.jsx(es,{id:"issue",runs:h("issue")})}),u.jsx(Xu,{id:"running",children:u.jsx(es,{id:"running",runs:h("running")})}),u.jsx(Xu,{id:"pr",children:u.jsx(es,{id:"pr",runs:h("pr")})}),u.jsxs(Xu,{id:"done",children:[u.jsx(es,{id:"verified",runs:h("verified")}),u.jsx(es,{id:"notproven",runs:h("notproven")})]})]})]})}const cS={id:"work",path:"/work",title:"Work",component:()=>u.jsx(rS,{})},Zu=i=>`${i.source_id}/${i.run_id}`;function oS(){const[i,r]=N.useState(null),[o,c]=N.useState(null),[d,h]=N.useState({}),[p,g]=N.useState(void 0);N.useEffect(()=>{let A=!0;return Wn().then(B=>A&&r(B.runs),B=>A&&c(B.message)),Hb().then(B=>A&&g(B),()=>A&&g(null)),()=>{A=!1}},[]);const b=async A=>{h(B=>({...B,[Zu(A)]:"pending"}));try{const B=await yg(A.source_id,A.run_id);h(G=>({...G,[Zu(A)]:B}))}catch(B){h(G=>({...G,[Zu(A)]:{error:B.message}}))}};if(o)return u.jsx(Tt,{title:"Receipts unavailable",hint:o});if(!i)return u.jsx(Bt,{label:"Loading receipts"});const v=i.filter(A=>A.verdict),R=Lb(v),y=v.length?Math.round(v.filter(A=>cs(A)).length/v.length*100):null;return u.jsxs("div",{"data-testid":"receipts",style:{display:"flex",flexDirection:"column",gap:16},children:[u.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(240px, 1fr))",gap:12},children:[u.jsx(Jn,{label:`Verified rate (${v.length} finished run${v.length===1?"":"s"}, by run outcome)`,value:y===null?"not measured":`${y}%`,series:R.map(A=>A.rate),trend:R.length>1?`${R.length} days`:void 0}),u.jsxs(Qt,{style:{padding:"14px 16px"},"data-testid":"public-key",children:[u.jsx("div",{style:{fontSize:"var(--cp-text-sm)",color:"var(--cp-text-2)"},children:"Public key (Ed25519)"}),p===void 0?u.jsx(Bt,{size:12}):p===null?u.jsx("div",{children:"not measured: no signing key on this machine yet"}):u.jsxs("div",{style:{fontFamily:"var(--cp-font-mono)",fontSize:12,wordBreak:"break-all"},children:[u.jsxs("div",{"data-testid":"key-kid",children:["kid ",p.kid]}),u.jsxs("div",{"data-testid":"key-x",children:["x ",p.x]})]})]})]}),v.length===0?u.jsx(Tt,{title:"No finished runs yet",hint:"A receipt appears here when a run completes."}):u.jsx(ta,{caption:"Receipts",columns:["Run","Outcome","Started","Verify"],rows:v.map(A=>{const B=d[Zu(A)];return[u.jsx("span",{style:{fontFamily:"var(--cp-font-mono)"},children:A.run_id},"run"),u.jsx(Fa,{run:A},"out"),A.started_at??"not measured",u.jsxs("span",{style:{display:"inline-flex",gap:8,alignItems:"center"},children:[u.jsx(pt,{size:"sm",variant:"secondary",disabled:B==="pending",onClick:()=>void b(A),"data-testid":"verify-btn",children:B==="pending"?"Verifying":"Verify"}),B&&B!=="pending"?"error"in B?u.jsx(Yt,{tone:"error","data-testid":"verify-result",children:B.error}):u.jsxs("span",{"data-testid":"verify-result","data-verdict":B.verdict,children:[u.jsx(Fa,{run:{verdict:B.verdict,tampered:A.tampered}}),B.reasons[0]?u.jsx("span",{style:{marginLeft:8,color:"var(--cp-text-2)",fontSize:12},children:B.reasons[0]}):null]}):null]},"v")]})})]})}const fS={id:"receipts",path:"/receipts",title:"Receipts",component:oS},Pe={padding:"12px 14px",verticalAlign:"top"},Ug={...Pe,textAlign:"left",fontSize:"var(--cp-text-sm)",fontWeight:500,color:"var(--cp-text-muted)",borderBottom:"1px solid var(--cp-border)"},jf={color:"var(--cp-text-muted)",fontSize:"var(--cp-text-sm)"},Hg={fontFamily:"var(--cp-font-serif)",fontWeight:400,fontSize:"var(--cp-text-2xl)",margin:0};function dS({runs:i,now:r=Date.now()}){const o=N.useMemo(()=>hr(i).filter(c=>c.attempts.some(d=>d.pr_url)).map(c=>({g:c,r:c.attempts.find(d=>d.pr_url)})),[i]);return u.jsxs("section",{"data-testid":"prs-page",style:{display:"flex",flexDirection:"column",gap:20},children:[u.jsx("h1",{style:Hg,children:"Pull requests"}),o.length===0?u.jsx(Tt,{title:"No pull requests yet",hint:"A run that opens a PR lists it here."}):u.jsx(Qt,{style:{padding:0,overflow:"auto"},children:u.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:"var(--cp-text-base)"},children:[u.jsx("thead",{children:u.jsx("tr",{children:["Issue","Repo","Outcome","PR","When"].map(c=>u.jsx("th",{scope:"col",style:Ug,children:c},c))})}),u.jsx("tbody",{children:o.map(({g:c,r:d})=>u.jsxs("tr",{"data-testid":"pr-row",style:{borderTop:"1px solid var(--cp-border-light)"},children:[u.jsx("td",{style:Pe,children:u.jsx("a",{href:hs(d),style:{color:"var(--cp-text)",textDecoration:"none"},children:c.title})}),u.jsx("td",{style:{...Pe,...jf},children:c.repo}),u.jsx("td",{style:Pe,children:u.jsx(ms,{verdict:_n(d)})}),u.jsx("td",{style:Pe,children:u.jsx(mr,{run:d})}),u.jsx("td",{style:{...Pe,...jf},children:ni(d,r)})]},c.key))})]})})]})}function hS(){const{runs:i,error:r}=fr();return i===null?r?u.jsx(Tt,{title:"Could not load pull requests",hint:r}):u.jsx(Bt,{label:"Loading pull requests"}):u.jsx(dS,{runs:i})}function mS(i){const r=new Map;for(const o of i)o.origin_repo&&r.set(o.origin_repo,[...r.get(o.origin_repo)??[],o]);return[...r].map(([o,c])=>{const d=c.filter(p=>typeof p.cost_usd=="number"),h=hr(c);return{repo:o,issues:h.length,runs:c.length,latest:h[0].latest,cost:d.length?d.reduce((p,g)=>p+(g.cost_usd??0),0):null}}).sort((o,c)=>Date.parse(c.latest.started_at??"")-Date.parse(o.latest.started_at??""))}function pS({runs:i,now:r=Date.now()}){const o=N.useMemo(()=>mS(i),[i]);return u.jsxs("section",{"data-testid":"repos-page",style:{display:"flex",flexDirection:"column",gap:20},children:[u.jsx("h1",{style:Hg,children:"Repos"}),o.length===0?u.jsx(Tt,{title:"No repos yet",hint:"Repos appear once a run has recorded its origin."}):u.jsx(Qt,{style:{padding:0,overflow:"auto"},children:u.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:"var(--cp-text-base)"},children:[u.jsx("thead",{children:u.jsx("tr",{children:["Repo","Issues","Runs","Latest outcome","Cost","Last run"].map(c=>u.jsx("th",{scope:"col",style:Ug,children:c},c))})}),u.jsx("tbody",{children:o.map(c=>u.jsxs("tr",{"data-testid":"repo-row",style:{borderTop:"1px solid var(--cp-border-light)"},children:[u.jsx("td",{style:Pe,children:c.repo}),u.jsx("td",{style:Pe,children:c.issues}),u.jsx("td",{style:Pe,children:c.runs}),u.jsx("td",{style:Pe,children:u.jsx(ms,{verdict:_n(c.latest)})}),u.jsx("td",{style:Pe,children:kf({...c.latest,cost_usd:c.cost,partial_usd:0})}),u.jsx("td",{style:{...Pe,...jf},children:ni(c.latest,r)})]},c.repo))})]})})]})}function gS(){const{runs:i,error:r}=fr();return i===null?r?u.jsx(Tt,{title:"Could not load repos",hint:r}):u.jsx(Bt,{label:"Loading repos"}):u.jsx(pS,{runs:i})}const vS={id:"pulls",path:"/pulls",title:"Pull requests",component:hS},yS={id:"repos",path:"/repos",title:"Repos",component:gS};class pr extends Error{constructor(r,o){super(o),this.status=r}}const Lg=()=>globalThis.LOKI_CONTROL_BASE??"",Bg=(i={})=>{const r=_e();return r?{...i,authorization:`Bearer ${r}`}:i};async function Hf(i,r){const o=await fetch(`${Lg()}${i}`,{...r,headers:Bg(r!=null&&r.body?{"content-type":"application/json"}:{})}),c=await o.json().catch(()=>({}));if(!o.ok)throw new pr(o.status,c.error??`HTTP ${o.status}`);return c}const xS=async()=>(await Hf("/v1/ask/threads")).threads,bS=i=>Hf(`/v1/ask/threads/${encodeURIComponent(i)}`),qg=i=>Hf("/v1/ask",{method:"POST",body:JSON.stringify(i)});function jS(i){var d,h;const r=i.split(`
183
-
184
- `),o=r.pop()??"",c=[];for(const p of r){const g=(h=(d=/^event: (.+)$/m.exec(p))==null?void 0:d[1])==null?void 0:h.trim(),b=p.split(`
185
- `).filter(R=>R.startsWith("data:")).map(R=>R.slice(5).replace(/^ /,"")).join(`
186
- `);if(!g)continue;let v={};try{v=b?JSON.parse(b):{}}catch{continue}g==="delta"?c.push({type:"delta",text:String(v.text??"")}):g==="tool_use"?c.push({type:"tool_use",name:String(v.name??"")}):g==="result"?c.push({type:"result",text:String(v.text??""),isError:v.isError===!0}):g==="error"?c.push({type:"error",message:String(v.message??"error")}):g==="done"&&c.push({type:"done",status:String(v.status??"")})}return{events:c,rest:o}}async function SS(i,r,o){const c=await fetch(`${Lg()}/v1/ask/messages/${encodeURIComponent(i)}/stream`,{headers:Bg({accept:"text/event-stream"}),signal:o});if(!c.ok||!c.body)throw new pr(c.status,`HTTP ${c.status}`);const d=c.body.getReader(),h=new TextDecoder;let p="";for(;;){const{value:g,done:b}=await d.read();if(b)break;p+=h.decode(g,{stream:!0});const{events:v,rest:R}=jS(p);p=R;for(const y of v)r(y)}}const _S=/Start a run on ([A-Za-z0-9][A-Za-z0-9._-]*\/[A-Za-z0-9._-]+#[1-9][0-9]*)\?/g;function ES(i){return[...new Set([...i.matchAll(_S)].map(r=>r[1]))]}let ir={enabled:!1,checked:!1,threads:[],error:null};const Sf=new Set,df=i=>{ir=i;for(const r of Sf)r()},us=()=>ir;async function Lf(){try{df({enabled:!0,checked:!0,threads:await xS(),error:null})}catch(i){i instanceof pr&&i.status===404?df({enabled:!1,checked:!0,threads:[],error:null}):df({...ir,enabled:ir.enabled,checked:!0,error:i instanceof Error?i.message:"could not reach the control service"})}}function $g(){const i=N.useSyncExternalStore(r=>(Sf.add(r),()=>{Sf.delete(r)}),us,us);return N.useEffect(()=>{us().checked||Lf()},[]),i}const Yg=["done","complete","completed","error","failed","cancelled","canceled"],Vg={color:"var(--cp-text-muted)",fontSize:"var(--cp-text-sm)"},TS=i=>{location.hash=`#/ask/${encodeURIComponent(i)}`};function NS({text:i}){const r=ES(i);return r.length===0?null:u.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginTop:10},children:r.map(o=>u.jsxs(pt,{variant:"secondary",size:"sm","data-testid":"offer-run",onClick:()=>Wa(o),children:["Start a run on ",o,"?"]},o))})}function RS({m:i,tool:r}){const o=i.role==="user";return u.jsxs("div",{"data-testid":o?"ask-user":"ask-assistant","data-status":i.status,style:{alignSelf:o?"flex-end":"stretch",maxWidth:o?"80%":"100%",padding:o?"10px 14px":"4px 0",borderRadius:"var(--cp-radius-lg)",background:o?"var(--cp-bg-3)":"transparent",color:"var(--cp-text)",fontSize:"var(--cp-text-md)",lineHeight:1.6,whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:[i.text,!o&&r?u.jsxs("div",{"data-testid":"ask-tool",style:Vg,children:["Using ",r]}):null,i.error?u.jsx("div",{role:"alert","data-testid":"ask-message-error",style:{color:"var(--cp-error)",marginTop:6},children:i.error}):null,!o&&!Yg.includes(i.status)&&i.text===""&&!r?u.jsx(Bt,{label:"Loki is answering"}):null,o?null:u.jsx(NS,{text:i.text})]})}function Gg({busy:i,onSend:r,placeholder:o}){const[c,d]=N.useState(""),h=()=>{const p=c.trim();!p||i||(r(p),d(""))};return u.jsxs("form",{onSubmit:p=>{p.preventDefault(),h()},style:{display:"flex",gap:8,alignItems:"flex-end"},children:[u.jsx("textarea",{"aria-label":"Ask Loki","data-testid":"ask-input",rows:2,value:c,placeholder:o,maxLength:4e3,disabled:i,onChange:p=>d(p.target.value),onKeyDown:p=>{p.key==="Enter"&&!p.shiftKey&&!p.nativeEvent.isComposing&&(p.preventDefault(),h())},style:{flex:1,resize:"vertical",padding:"10px 12px",borderRadius:"var(--cp-radius-md)",border:"1px solid var(--cp-border)",background:"var(--cp-bg)",color:"var(--cp-text)",font:"inherit",fontSize:"var(--cp-text-md)"}}),u.jsx(pt,{type:"submit","data-testid":"ask-send",disabled:i||c.trim()==="",children:"Ask"})]})}const Pu=i=>i instanceof pr&&i.status===404?"Ask Loki is not available on this control service.":i instanceof Error?i.message:"could not reach the control service";function zS(){return u.jsx(Tt,{title:"Ask Loki is off",hint:"This control service was started without LOKI_CP_ASK, so there is nothing to ask. Set LOKI_CP_ASK=1 and restart it."})}function OS({id:i}){var H;const[r,o]=N.useState(null),[c,d]=N.useState(null),[h,p]=N.useState({}),[g,b]=N.useState(!1),v=N.useRef(new Set),R=N.useRef(!0),y=N.useRef(null),A=N.useCallback(($,tt)=>{o(M=>M&&{...M,messages:M.messages.map(L=>L.id===$?tt(L):L)})},[]),B=N.useCallback($=>{if(v.current.has($))return;v.current.add($),b(!0),SS($,M=>{R.current&&(M.type==="delta"?A($,L=>({...L,status:"streaming",text:L.text+M.text})):M.type==="tool_use"?p(L=>({...L,[$]:M.name})):M.type==="result"?A($,L=>M.isError?{...L,error:M.text}:L.text===""?{...L,text:M.text}:L):M.type==="error"?A($,L=>({...L,status:"error",error:M.message})):M.type==="done"&&A($,L=>({...L,status:L.status==="error"?"error":M.status||"done"})))}).catch(M=>R.current&&A($,L=>({...L,status:"error",error:Pu(M)}))).finally(()=>{v.current.delete($),R.current&&(p(M=>{const{[$]:L,...Q}=M;return Q}),b(v.current.size>0),Lf())})},[A]),G=N.useCallback(()=>{bS(i).then($=>{if(R.current){o($),d(null);for(const tt of $.messages)tt.role==="assistant"&&!Yg.includes(tt.status)&&B(tt.id)}},$=>R.current&&d(Pu($)))},[i,B]);N.useEffect(()=>(R.current=!0,o(null),d(null),G(),()=>{R.current=!1}),[G]),N.useEffect(()=>{var $,tt;(tt=($=y.current)==null?void 0:$.scrollIntoView)==null||tt.call($,{block:"end"})},[r==null?void 0:r.messages.length,(H=r==null?void 0:r.messages.at(-1))==null?void 0:H.text]);const lt=$=>{d(null),qg({question:$,thread_id:i}).then(()=>G(),tt=>d(Pu(tt)))};return c&&!r?u.jsx(Tt,{title:"Could not open this thread",hint:c}):r?u.jsxs("section",{"data-testid":"ask-thread",style:{display:"flex",flexDirection:"column",gap:20,maxWidth:760,margin:"0 auto"},children:[u.jsx("h1",{style:{fontFamily:"var(--cp-font-serif)",fontWeight:400,fontSize:"var(--cp-text-2xl)",margin:0},children:r.thread.title}),u.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[r.messages.map($=>u.jsx(RS,{m:$,tool:h[$.id]},$.id)),u.jsx("div",{ref:y})]}),c?u.jsx("p",{role:"alert","data-testid":"ask-error",style:{margin:0,color:"var(--cp-error)"},children:c}):null,u.jsx(Gg,{busy:g,onSend:lt,placeholder:"Ask a follow-up"})]}):u.jsx(Bt,{label:"Loading thread"})}function CS(){const[i,r]=N.useState(!1),[o,c]=N.useState(null),d=h=>{r(!0),c(null),qg({question:h}).then(p=>{Lf(),TS(p.thread_id)},p=>{c(Pu(p)),r(!1)})};return u.jsxs("section",{"data-testid":"ask-new",style:{display:"flex",flexDirection:"column",gap:20,maxWidth:760,margin:"12vh auto 0"},children:[u.jsx("h1",{style:{fontFamily:"var(--cp-font-serif)",fontWeight:400,fontSize:"var(--cp-text-3xl, 2rem)",margin:0},children:"Ask Loki"}),u.jsx("p",{style:{...Vg,margin:0},children:"Ask about your runs, repos and issues. Loki answers from what it can read and never starts a run without your confirmation."}),o?u.jsx("p",{role:"alert","data-testid":"ask-error",style:{margin:0,color:"var(--cp-error)"},children:o}):null,u.jsx(Gg,{busy:i,onSend:d,placeholder:"What do you want to know?"})]})}function Qg({id:i}){const r=$g();return r.checked?r.enabled?i?u.jsx(OS,{id:i},i):u.jsx(CS,{}):r.error?u.jsx(Tt,{title:"Could not reach Ask Loki",hint:r.error}):u.jsx(zS,{}):u.jsx(Bt,{label:"Checking Ask Loki"})}const AS={id:"ask",path:"/ask",title:"Ask Loki",component:()=>u.jsx(Qg,{})},wS={id:"ask-thread",path:"/ask/:id",title:"Ask Loki thread",component:({params:i})=>u.jsx(Qg,{id:i.id})};async function DS(){const i=globalThis.LOKI_CONTROL_BASE??"",r=_e(),o=await fetch(`${i}/v1/providers`,{headers:r?{authorization:`Bearer ${r}`}:{}});return await Fn(o),await o.json()}const MS=i=>i.probe==="timeout"?"installed, version probe timed out":i.installed?i.version?`installed, ${i.version}`:"installed, version not reported":"not installed";function kS(){const[i,r]=N.useState(null),[o,c]=N.useState(null);if(N.useEffect(()=>{let h=!0;return DS().then(p=>h&&r(p)).catch(p=>h&&c(p instanceof Error?p.message:String(p))),()=>{h=!1}},[]),o)return u.jsx(Tt,{title:"Could not load providers",hint:o});if(!i)return u.jsx(Bt,{label:"Detecting provider CLIs"});const d=i.providers.map(h=>[u.jsxs("span",{style:{display:"inline-flex",gap:8,alignItems:"center"},children:[u.jsx(rb,{state:h.installed?"active":"idle",label:h.installed?"installed":"not installed"}),u.jsx("strong",{children:h.id})]},"n"),MS(h),h.auth_present?u.jsx(Yt,{tone:"success",children:"auth present"},"a"):u.jsx(Yt,{tone:"neutral",children:"no auth env set"},"a"),h.auth_env_names.length?`${h.auth_env_set.length?h.auth_env_set.join(", "):"none"} (of ${h.auth_env_names.join(", ")})`:"not measured",h.tiers.planning??"not measured",h.tiers.development??"not measured",h.tiers.fast??"not measured"]);return u.jsxs("div",{style:{display:"grid",gap:16},children:[u.jsx("h1",{style:{margin:0,fontSize:"var(--cp-text-xl, 20px)"},children:"Models and providers"}),u.jsx(ta,{caption:"Provider CLIs",columns:["Provider","CLI","Auth","Env vars set","Planning","Development","Fast"],rows:d}),u.jsx(Qt,{compact:!0,children:u.jsxs("small",{children:["Auth shows only whether an environment variable is set, never its value. Model tiers come from the catalog",i.catalog_updated?` (updated ${i.catalog_updated})`:"",". Version probes stop after ",i.probe_timeout_ms," ms."]})})]})}const US={id:"models",path:"/models",title:"Models and providers",component:kS,inSettings:!0},HS=new Set(["that","this","with","from","when","should","must","will","have","into","then","than","each","which","their","there","about"]),as=i=>new Set((i.toLowerCase().match(/[a-z0-9]{4,}/g)??[]).filter(r=>!HS.has(r))),ls=(i,r)=>{for(const o of i)if(r.has(o))return!0;return!1},hf=i=>as(i.replace(/[/.]/g," "));function mf(i){if(i===null)return null;try{return JSON.parse(i)}catch{return null}}function LS(i){const r=i&&typeof i=="object"?i:{},c=(typeof r.body=="string"?r.body:"").split(/\r?\n/),d=c.map(b=>{var v,R;return(R=(v=/^\s*[-*]\s*\[[ xX]\]\s*(.+)$/.exec(b))==null?void 0:v[1])==null?void 0:R.trim()}).filter(b=>!!b);if(d.length)return{list:d,source:"checklist"};const h=[];let p=!1;for(const b of c)if(/^\s*#{1,6}\s/.test(b)||/^\s*\*\*[^*]+\*\*:?\s*$/.test(b))p=/accept|requirement|criteri|expected|done when/i.test(b);else if(p){const v=/^\s*(?:[-*]|\d+[.)])\s+(.+)$/.exec(b);v!=null&&v[1]&&h.push(v[1].trim())}if(h.length)return{list:h,source:"checklist"};const g=typeof r.title=="string"?r.title.trim():"";return g?{list:[g],source:"title"}:{list:[],source:"none"}}function BS(i){const r=i,o=Array.isArray(i)?i:Array.isArray(r==null?void 0:r.steps)?r.steps:Array.isArray(r==null?void 0:r.plan)?r.plan:typeof(r==null?void 0:r.plan)=="string"?r.plan.split(/\r?\n/).filter(d=>d.trim()):[],c=[];for(const d of o){if(typeof d=="string"){const h=d.replace(/^\s*(?:[-*]|\d+[.)])\s*/,"").trim();h&&c.push({text:h,files:[],checks:[]});continue}if(d&&typeof d=="object"){const h=d,p=[h.title,h.step,h.description,h.text].find(v=>typeof v=="string"&&v.trim()!=="");if(!p)continue;const g=Array.isArray(h.files)?h.files.filter(v=>typeof v=="string"):[],b=Array.isArray(h.checks)?h.checks.filter(v=>typeof v=="string"):[];c.push({text:p.trim(),files:g,checks:b,...typeof h.criterion=="string"?{criterion:h.criterion}:{}})}}return c}function qS(i){if(!i)return[];const r=new Set;for(const o of i.matchAll(/^diff --git a\/(.+?) b\/(.+)$/gm))r.add(o[2]);return[...r]}function $S(i,r){return i?jl({...i,verdict:i.verdict??(r==null?void 0:r.verdict)??null}):null}function YS(i){var y,A,B,G,lt;const{list:r,source:o}=LS(i.issue),c=BS(i.plan),d=((y=i.receipt)==null?void 0:y.checks)??[],h=i.run?jl({...i.run,verdict:i.run.verdict??((A=i.receipt)==null?void 0:A.verdict)??null}):null,p=(B=i.receipt)==null?void 0:B.verdict,g=h===St.VERIFIED&&(p==null||p===St.VERIFIED),b=[...new Set([...i.changedFiles,...((lt=(G=i.receipt)==null?void 0:G.wall)==null?void 0:lt.files)??[]])],v=new Set;return{rows:r.map(H=>{const $=as(H),tt=c.filter(q=>q.criterion?q.criterion.trim()===H:ls($,as(q.text))),M=new Set;for(const q of tt){for(const Xt of q.files)M.add(Xt);const Nt=as(q.text);for(const Xt of b)ls(Nt,hf(Xt))&&M.add(Xt)}for(const q of b)ls($,hf(q))&&M.add(q);const L=[...M];L.forEach(q=>v.add(q));const Q=q=>q.name.trim().toLowerCase(),ct=q=>!!Q(q)&&(H.toLowerCase().includes(Q(q))||tt.some(Nt=>Nt.text.toLowerCase().includes(Q(q))||Nt.checks.some(Xt=>Xt.trim().toLowerCase()===Q(q)))),I=d.filter(q=>{const Nt=as(`${q.name} ${q.cmd??""}`);return ct(q)||ls($,Nt)||L.some(Xt=>ls(hf(Xt),Nt))}),et=I.filter(ct),Vt=I.filter(q=>!ct(q));let Dt="not proven",Ht=null;return i.receipt?et.some(q=>q.result==="fail")?(Dt="failed",Ht="a linked check failed"):et.length===0?Ht=Vt.length?"link inferred":"no check linked to this criterion":et.every(q=>q.result==="pass")?g?Dt="proven":Ht=`verdict is ${h!==St.VERIFIED?h??"unknown (run record unavailable)":p}`:Ht="a linked check did not run":Ht="no receipt for this run",{criterion:H,steps:tt.map(q=>q.text),files:L,evidence:et,inferred:Vt,status:Dt,note:Ht}}),unmapped_files:b.filter(H=>!v.has(H)),criteria_source:o}}async function VS(i,r,o,c){const[d,h,p,g]=await Promise.all(["issue.json","plan.json","receipt.json","diff.patch"].map(y=>xg(i,r,y))),b=mf(p??null),v=mf(d??null),R=mf(h??null);return{matrix:YS({issue:v,plan:R,receipt:b,changedFiles:qS(g??null),run:c}),stages:o,verdict:$S(c,b),have:{issue:v!==null,plan:R!==null,receipt:b!==null}}}const GS={proven:"success",failed:"error","not proven":"warning"},is={fontFamily:"var(--cp-font-mono)",fontSize:12,wordBreak:"break-all"},pf=u.jsx("span",{style:{color:"var(--cp-text-2)"},children:"none"});function Xg({params:i}){const r=i.source,o=i.run;return!r||!o?u.jsx(QS,{}):u.jsx(XS,{source:r,run:o})}function QS(){const[i,r]=N.useState(null),[o,c]=N.useState(null);return N.useEffect(()=>{let d=!0;return Wn().then(h=>d&&r(h.runs),h=>d&&c(h.message)),()=>{d=!1}},[]),o?u.jsx(Tt,{title:"Plans unavailable",hint:o}):i?i.length?u.jsx("div",{"data-testid":"plans-picker",children:u.jsx(ta,{caption:"Pick a run",columns:["Run","Outcome","Started"],rows:i.map(d=>[u.jsx("a",{href:`#/plans/${encodeURIComponent(d.source_id)}/${encodeURIComponent(d.run_id)}`,style:is,"data-testid":"plans-pick",children:d.run_id},"a"),d.verdict?u.jsx(Fa,{run:d},"v"):"running",d.started_at??"not measured"])})}):u.jsx(Tt,{title:"No runs yet",hint:"Start a run to see its plan and traceability here."}):u.jsx(Bt,{label:"Loading runs"})}function XS({source:i,run:r}){var R;const[o,c]=N.useState(null),[d,h]=N.useState(null);if(N.useEffect(()=>{let y=!0;return c(null),(async()=>{const A=await ur(i,r).catch(()=>null);return VS(i,r,(A==null?void 0:A.stages)??null,A)})().then(A=>y&&c(A),A=>y&&h(A.message)),()=>{y=!1}},[i,r]),d)return u.jsx(Tt,{title:"Plan unavailable",hint:d});if(!o)return u.jsx(Bt,{label:"Loading plan"});const{matrix:p,have:g}=o,b=["issue","plan","receipt"].filter(y=>!g[y]),v=p.rows.filter(y=>y.status==="proven").length;return u.jsxs("div",{"data-testid":"plans",style:{display:"flex",flexDirection:"column",gap:16},children:[u.jsxs(Qt,{style:{padding:"14px 16px"},children:[u.jsx("div",{style:{fontFamily:"var(--cp-font-mono)"},children:r}),u.jsxs("div",{"data-testid":"plans-summary",style:{color:"var(--cp-text-2)"},children:[p.rows.length?`${v} of ${p.rows.length} criteria proven`:"not measured: no criteria",o.verdict?` - verdict ${Ae(o.verdict).label}`:g.receipt?" - verdict unavailable":" - no receipt"]}),b.length?u.jsxs("div",{"data-testid":"plans-missing",style:{color:"var(--cp-text-2)"},children:["not available: ",b.map(y=>`${y}.json`).join(", ")]}):null]}),(R=o.stages)!=null&&R.length?u.jsx(fb,{stages:o.stages.map(y=>({label:y.stage,status:y.status==="completed"?"success":y.status==="failed"?"error":"pending"}))}):null,p.rows.length===0?u.jsx(Tt,{title:"No requirements found",hint:"issue.json has no title or acceptance criteria for this run."}):u.jsx(ta,{caption:"Traceability matrix",columns:["Requirement","Plan step","Files changed","Evidence","Verdict"],rows:p.rows.map(y=>[y.criterion,y.steps.length?u.jsx("ol",{style:{margin:0,paddingLeft:16},children:y.steps.map(A=>u.jsx("li",{children:A},A))},"s"):pf,y.files.length?u.jsx("div",{style:is,children:y.files.map(A=>u.jsx("div",{children:A},A))},"f"):pf,y.evidence.length||y.inferred.length?u.jsxs("div",{children:[y.evidence.map(A=>u.jsxs("div",{style:is,children:[A.result,": ",A.name]},A.name)),y.inferred.map(A=>u.jsxs("div",{"data-testid":"inferred-hint",style:{...is,color:"var(--cp-text-2)"},children:["inferred, not recorded: ",A.result,": ",A.name]},`i-${A.name}`))]},"e"):pf,u.jsxs("span",{"data-testid":"row-status","data-status":y.status,children:[u.jsx(Yt,{tone:GS[y.status],children:y.status==="not proven"?y.note==="link inferred"?"NOT PROVEN (link inferred)":"NOT PROVEN":y.status.toUpperCase()}),y.note?u.jsx("div",{style:{color:"var(--cp-text-2)",fontSize:12},children:y.note}):null]},"v")])}),p.unmapped_files.length?u.jsxs(Qt,{style:{padding:"14px 16px"},"data-testid":"plans-unmapped",children:[u.jsx("div",{style:{color:"var(--cp-text-2)"},children:"Changed files not tied to any requirement"}),u.jsx("div",{style:is,children:p.unmapped_files.map(y=>u.jsx("div",{children:y},y))})]}):null]})}const ZS={id:"plans",path:"/plans/:source/:run",title:"Plans",component:Xg},KS={id:"plans-picker",path:"/plans",title:"Plans",component:Xg},Zg=()=>globalThis.LOKI_CONTROL_BASE??"",_f=i=>{const r=_e();return{...i?{"content-type":"application/json"}:{},...r?{authorization:`Bearer ${r}`}:{}}};async function U0(i,r){const o=await fetch(`${Zg()}${i}`,r),c=await o.json().catch(()=>({}));if(!o.ok)throw new Error(await Sn(o.status,c.error));return c}async function JS(i){const r=await fetch(`${Zg()}/v1/merge/run`,{method:"POST",headers:_f(!0),body:JSON.stringify({dryRun:i})}),o=await r.json().catch(()=>null);if(!o||!Array.isArray(o.lines))throw new Error(await Sn(r.status,o==null?void 0:o.error));return{ok:!1,ran:!1,dryRun:i,exit:null,...o,lines:o.lines}}function Ku(i){if(i.ran&&!i.partial&&!i.error)return null;const r=i.error??"the run did not finish cleanly";return i.timedOut?`Partial outcome: ${r}. Lines below show what completed before it stopped. PRs listed as merged are already merged, but the queue file is only rewritten when a run finishes, so they may still appear in the queue; PRs not listed may still be queued.`:`${i.partial?"Partial outcome":"Not completed"}: ${r}. Lines below show what completed before it stopped; PRs not listed as merged may still be queued.`}function IS(){const[i,r]=N.useState(null),[o,c]=N.useState(null),[d,h]=N.useState(""),[p,g]=N.useState(!1),[b,v]=N.useState(null),[R,y]=N.useState(null),[A,B]=N.useState(!1),[G,lt]=N.useState(null),H=N.useCallback(async()=>{try{const Q=await U0("/v1/merge/queue",{headers:_f(!1)});Q.measured?(r(Q.queue),c(null)):(r(null),c(Q.error??"not measured"))}catch(Q){r(null),c(Q instanceof Error?Q.message:String(Q))}},[]);N.useEffect(()=>{H()},[H]);const $=/^[0-9]{1,7}$/.test(d.trim()),tt=async()=>{g(!0),v(null);try{await U0("/v1/merge/queue",{method:"POST",headers:_f(!0),body:JSON.stringify({prs:[d.trim()]})}),v({tone:"success",text:`Queued PR #${d.trim()}`}),h(""),await H()}catch(Q){v({tone:"error",text:Q instanceof Error?Q.message:String(Q)})}g(!1)},M=async Q=>{g(!0),v(null),B(!1);try{const ct=await JS(Q);Q?(y(ct),lt(null)):(lt(ct),y(null)),await H()}catch(ct){v({tone:"error",text:ct instanceof Error?ct.message:String(ct)})}g(!1)},L=i!==null&&i.length===0;return u.jsxs("div",{style:{display:"grid",gap:16,maxWidth:720},children:[u.jsx("h1",{style:{margin:0,fontSize:"var(--cp-text-xl, 20px)"},children:"Merge queue"}),u.jsx(Qt,{children:u.jsxs("div",{style:{display:"grid",gap:8},children:[u.jsx("strong",{children:"Queue"}),o?u.jsx(Tt,{title:"Queue not measured",hint:o}):i===null?u.jsx(Bt,{label:"Reading the queue"}):L?u.jsx("small",{children:"The merge queue is empty."}):u.jsx("ol",{"aria-label":"Queued pull requests",style:{margin:0,paddingLeft:20},children:i.map(Q=>u.jsxs("li",{children:["PR #",Q]},Q))}),u.jsxs("div",{style:{display:"flex",gap:8},children:[u.jsx(Pn,{"aria-label":"PR number",inputMode:"numeric",placeholder:"PR number",value:d,onChange:Q=>h(Q.target.value.replace(/[^0-9]/g,"").slice(0,7))}),u.jsx(pt,{variant:"secondary",disabled:!$||p,onClick:tt,children:"Add"})]})]})}),u.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[u.jsx(pt,{variant:"secondary",disabled:p||L||i===null,onClick:()=>M(!0),children:"Preview"}),A?u.jsxs("span",{role:"alertdialog","aria-label":"Confirm merge",style:{display:"inline-flex",gap:8,alignItems:"center"},children:[u.jsx("small",{children:"Squash-merge each PR whose checks are green, one at a time. This cannot be undone."}),u.jsx(pt,{variant:"danger",disabled:p,onClick:()=>M(!1),children:"Confirm merge"}),u.jsx(pt,{variant:"ghost",onClick:()=>B(!1),children:"Cancel"})]}):u.jsx(pt,{disabled:p||L||i===null,onClick:()=>B(!0),children:"Merge queue"}),p?u.jsx(Bt,{label:"Working"}):null]}),b?u.jsx(Yt,{tone:b.tone,children:b.text}):null,R?u.jsxs(Qt,{children:[u.jsx("strong",{children:"Plan (dry run, nothing changed)"}),Ku(R)?u.jsx("p",{role:"alert",style:{margin:"4px 0"},children:Ku(R)}):null,u.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap"},children:R.lines.join(`
187
- `)||"not measured"})]}):null,G?u.jsxs(Qt,{children:[u.jsx("strong",{children:"Merge result"})," ",u.jsx(Yt,{tone:G.ok?"success":"warning",children:G.ok?"all merged":G.partial||!G.ran?"partial result":"some PRs left in queue"}),Ku(G)?u.jsx("p",{role:"alert",style:{margin:"4px 0"},children:Ku(G)}):null,u.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap"},children:G.lines.join(`
188
- `)})]}):null]})}const FS={id:"merge",path:"/merge",title:"Merge queue",component:IS},WS=()=>globalThis.LOKI_CONTROL_BASE??"",PS=i=>i==="low"?"success":i==="medium"?"warning":i==="high"||i==="critical"?"error":"neutral";function t2(){const[i,r]=N.useState("pr"),[o,c]=N.useState(""),[d,h]=N.useState(!1),[p,g]=N.useState(null),b=i==="staged"||(i==="pr"?/^[0-9]{1,7}$/.test(o):/^[A-Za-z0-9._/][A-Za-z0-9._/-]{0,99}$/.test(o)),v=async()=>{h(!0);const R=i==="staged"?"staged=1":`${i}=${encodeURIComponent(o)}`;try{const y=_e(),A=await fetch(`${WS()}/v1/review/risk?${R}`,{headers:y?{authorization:`Bearer ${y}`}:{}}),B=await A.json().catch(()=>null);g(A.ok&&B&&B.measured===!0&&typeof B.score=="number"?B:{measured:!1,reason:(B==null?void 0:B.error)??(B==null?void 0:B.reason)??`HTTP ${A.status}`})}catch(y){g({measured:!1,reason:y instanceof Error?y.message:String(y)})}h(!1)};return u.jsxs("div",{style:{display:"grid",gap:16,maxWidth:720},children:[u.jsx("h1",{style:{margin:0,fontSize:"var(--cp-text-xl, 20px)"},children:"PR risk"}),u.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",alignItems:"center"},children:[u.jsxs("select",{"aria-label":"Diff source",value:i,onChange:R=>{r(R.target.value),c(""),g(null)},children:[u.jsx("option",{value:"pr",children:"Pull request"}),u.jsx("option",{value:"staged",children:"Staged changes"}),u.jsx("option",{value:"since",children:"Since a ref"})]}),i!=="staged"?u.jsx(Pn,{"aria-label":i==="pr"?"PR number":"Git ref",placeholder:i==="pr"?"PR number":"HEAD~5",value:o,onChange:R=>c(R.target.value)}):null,u.jsx(pt,{disabled:!b||d,onClick:v,children:"Measure risk"}),d?u.jsx(Bt,{label:"Scoring"}):null]}),p&&p.measured?u.jsxs(u.Fragment,{children:[u.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[u.jsx(Jn,{label:"Risk score",value:`${p.score}/100`}),u.jsx(Yt,{tone:PS(p.level),children:p.level}),u.jsx("small",{children:p.source}),u.jsx("small",{children:typeof p.files=="number"?`${p.files} files`:"files: not measured"})]}),u.jsx(ta,{caption:"Risk factors",columns:["Factor","Points","Detail"],rows:p.factors.map(R=>[R.factor,`${R.points}/${R.max}`,R.detail])})]}):p?u.jsxs(Qt,{children:[u.jsx("strong",{children:"Risk score: not measured"}),u.jsx("br",{}),u.jsx("small",{children:p.reason??"no reason reported"})]}):null]})}const e2={id:"risk",path:"/risk",title:"PR risk",component:t2},Kg=()=>globalThis.LOKI_CONTROL_BASE??"",Jg=(i={})=>{const r=_e();return r?{...i,authorization:`Bearer ${r}`}:i};class Pa extends Error{constructor(r,o,c){super(r),this.status=o,this.details=c}}async function Ig(){const i=await fetch(`${Kg()}/v1/config`,{headers:Jg()}),r=await i.json().catch(()=>({}));if(!i.ok)throw new Pa(await Sn(i.status,r.error),i.status,[]);return{exists:!!r.exists,etag:r.etag??"",config:r.config??{},errors:r.errors??[]}}async function Fg(i,r){const o=await fetch(`${Kg()}/v1/config`,{method:"PUT",headers:Jg({"content-type":"application/json","if-match":r}),body:JSON.stringify({config:i})}),c=await o.json().catch(()=>({}));if(!o.ok)throw new Pa(await Sn(o.status,c.error),o.status,c.errors??(c.paths?c.paths.map(d=>`${d}: looks like a secret`):[]));return{etag:c.etag??r,config:c.config??i}}const $t=i=>`var(--cp-${i})`,l2=[{id:"provider",title:"Provider",hint:"Default provider. A CLI flag or LOKI_PROVIDER overrides it.",fields:[{path:["provider"],label:"Provider",kind:"select",options:["claude","opencode"]}]},{id:"models",title:"Models",hint:"Model names passed to the provider.",fields:[{path:["models","default"],label:"Default model",kind:"text"},{path:["models","cheap"],label:"Cheap model",kind:"text"}]},{id:"git",title:"Git",hint:"Name of the environment variable that holds your GitHub token. The token itself is never stored here.",fields:[{path:["git","token_env"],label:"Token variable name",kind:"env",hint:"For example GITHUB_TOKEN"}]},{id:"repos",title:"Repos",hint:"owner/repo, one per line. The UI offers these and headless runs may target them.",fields:[{path:["repos"],label:"Repos",kind:"lines"}]},{id:"concurrency",title:"Concurrency",hint:"Backlog runs in parallel, 1 to 32 (default 2).",fields:[{path:["concurrency"],label:"Parallel runs",kind:"number"}]},{id:"budgets",title:"Budgets",hint:"USD caps. Leave blank for no cap.",fields:[{path:["budgets","per_run_usd"],label:"Per run (USD)",kind:"number"},{path:["budgets","per_day_usd"],label:"Per day (USD)",kind:"number"}]},{id:"knowledge_sources",title:"Knowledge sources",hint:"Local paths of knowledge to give runs, one per line.",fields:[{path:["knowledge_sources"],label:"Paths",kind:"lines"}]},{id:"workspaces",title:"Workspaces",hint:"Named groups of repos for cross-repo runs. Edited as JSON; the server validates it against the schema.",fields:[{path:["workspaces"],label:"Workspaces (JSON)",kind:"json"}]},{id:"notifications",title:"Notifications",hint:"Name of the environment variable that holds the Slack webhook URL. The URL itself is never stored here.",fields:[{path:["notifications","slack_webhook_env"],label:"Webhook variable name",kind:"env",hint:"For example SLACK_WEBHOOK_URL"}]}],vn=i=>typeof i=="object"&&i!==null&&!Array.isArray(i);function Ju(i){const r={},o=vn(i)&&vn(i.workspaces)?i.workspaces:{};for(const[c,d]of Object.entries(o))vn(d)&&(vn(d.integration)&&"command"in d.integration&&(r[`${c} integration command`]=String(d.integration.command)),Array.isArray(d.repos)&&d.repos.forEach((h,p)=>{vn(h)&&"setup"in h&&(r[`${c} setup for repo ${p+1}`]=String(h.setup))}));return r}const n2=(i,r)=>r.reduce((o,c)=>vn(o)?o[c]:void 0,i);function Wg(i,r,o){const c={...i},[d,...h]=r;if(d===void 0)return c;if(h.length===0)return o===void 0?delete c[d]:c[d]=o,c;const p=Wg(vn(c[d])?c[d]:{},h,o);return Object.keys(p).length===0?delete c[d]:c[d]=p,c}function a2(i,r){return r==null?"":i.kind==="lines"?Array.isArray(r)?r.join(`
189
- `):"":i.kind==="json"?JSON.stringify(r,null,2):String(r)}function i2(i,r){const o=r.trim();if(o==="")return{value:void 0};if(i.kind==="number"){const c=Number(o);return Number.isFinite(c)?{value:c}:{error:`${i.label} must be a number`}}if(i.kind==="lines")return{value:o.split(`
190
- `).map(c=>c.trim()).filter(Boolean)};if(i.kind==="json")try{const c=JSON.parse(o);return vn(c)?{value:c}:{error:`${i.label} must be a JSON object`}}catch{return{error:`${i.label} is not valid JSON`}}return{value:o}}function s2({section:i,state:r,onSave:o}){const c=i.fields.map(H=>a2(H,n2(r.config,H.path))),[d,h]=N.useState(c),[p,g]=N.useState([]),[b,v]=N.useState(!1),[R,y]=N.useState(!1),A=N.useId(),B=JSON.stringify(c);N.useEffect(()=>{h(c),g([])},[B]);const G=d.some((H,$)=>H!==c[$]),lt=async()=>{const H=[];let $=r.config;if(i.fields.forEach((tt,M)=>{const L=i2(tt,d[M]??"");L.error?H.push(L.error):$=Wg($,tt.path,L.value)}),H.length){g(H);return}if(JSON.stringify(Ju($))!==JSON.stringify(Ju(r.config))){g(["Edit shell commands in loki.yaml directly"]);return}v(!0),g([]),y(!1);try{await o($),y(!0)}catch(tt){g(tt instanceof Pa?[tt.message,...tt.details]:[tt.message])}finally{v(!1)}};return u.jsxs(Qt,{"data-testid":`settings-${i.id}`,"aria-labelledby":`${A}-h`,children:[u.jsx("h2",{id:`${A}-h`,style:{margin:0,fontFamily:$t("font-serif"),fontWeight:400,fontSize:$t("text-xl")},children:i.title}),u.jsx("p",{style:{margin:"4px 0 12px",color:$t("text-2"),fontSize:$t("text-md")},children:i.hint}),u.jsx("div",{style:{display:"grid",gap:12},children:i.fields.map((H,$)=>{const tt=`${A}-${$}`,M=Q=>{y(!1),h(ct=>ct.map((I,et)=>et===$?Q:I))},L={id:tt,value:d[$]??"","data-field":H.path.join(".")};return u.jsxs("div",{children:[u.jsx("label",{htmlFor:tt,style:{display:"block",fontSize:$t("text-md"),marginBottom:4},children:H.label}),H.kind==="select"?u.jsxs("select",{...L,onChange:Q=>M(Q.target.value),style:{padding:"8px 10px",borderRadius:$t("radius-md"),border:`1px solid ${$t("border")}`,background:$t("bg"),color:$t("text"),font:"inherit"},children:[u.jsx("option",{value:"",children:"Not set"}),H.options.map(Q=>u.jsx("option",{value:Q,children:Q},Q))]}):H.kind==="lines"||H.kind==="json"?u.jsx(lg,{...L,rows:H.kind==="json"?8:4,spellCheck:!1,onChange:Q=>M(Q.target.value),style:H.kind==="json"?{fontFamily:$t("font-mono")}:void 0}):u.jsx(Pn,{...L,type:H.kind==="number"?"number":"text",step:H.kind==="number"?"any":void 0,autoComplete:"off",spellCheck:!1,placeholder:H.kind==="env"?"ENV_VAR_NAME":void 0,onChange:Q=>M(Q.target.value),style:H.kind==="env"?{fontFamily:$t("font-mono")}:void 0}),H.hint?u.jsx("div",{style:{color:$t("text-3"),fontSize:$t("text-base"),marginTop:4},children:H.hint}):null]},H.path.join("."))})}),i.id==="workspaces"&&Object.keys(Ju(r.config)).length?u.jsxs("div",{"data-testid":"settings-shell-readonly",style:{marginTop:12},children:[u.jsx("div",{style:{fontSize:$t("text-md"),marginBottom:4},children:"Shell commands (read only, edit in loki.yaml directly)"}),u.jsx("ul",{style:{margin:0,paddingLeft:18,fontFamily:$t("font-mono"),fontSize:$t("text-base"),color:$t("text-2")},children:Object.entries(Ju(r.config)).map(([H,$])=>u.jsxs("li",{children:[H,": ",$]},H))})]}):null,p.length?u.jsx("ul",{role:"alert","data-testid":"settings-problems",style:{margin:"12px 0 0",paddingLeft:18,color:$t("error"),fontSize:$t("text-md")},children:p.map(H=>u.jsx("li",{children:H},H))}):null,u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:12},children:[u.jsx(pt,{disabled:!G||b,onClick:lt,children:b?"Saving":"Save"}),R&&!G?u.jsx(Yt,{tone:"success",children:"Saved"}):null]})]})}function u2(){const[i,r]=N.useState(null),[o,c]=N.useState(null),d=()=>{c(null),Ig().then(r,p=>c(p.message))};if(N.useEffect(d,[]),o)return u.jsx(Tt,{title:"Configuration unavailable",hint:o,action:u.jsx(pt,{variant:"secondary",onClick:d,children:"Retry"})});if(!i)return u.jsx(Bt,{label:"Loading configuration"});const h=async p=>{try{const g=await Fg(p,i.etag);r({exists:!0,etag:g.etag,config:g.config,errors:[]})}catch(g){throw g instanceof Pa&&g.status===409?new Pa("loki.yaml changed on disk since it was loaded. Reload to see the latest, then apply your edit again.",409,[]):g}};return u.jsxs("div",{"data-testid":"config-settings",style:{display:"grid",gap:16,maxWidth:720},children:[u.jsxs("div",{children:[u.jsx("h1",{style:{margin:0,fontFamily:$t("font-serif"),fontWeight:400,fontSize:$t("text-2xl")},children:"Configuration"}),u.jsxs("p",{style:{margin:"4px 0 0",color:$t("text-2"),fontSize:$t("text-md")},children:[i.exists?"Edits loki.yaml in this repo. Comments are kept.":"No loki.yaml in this repo yet. Saving a section creates it."," ","Credentials are environment variable names, never values."]})]}),i.errors.length?u.jsxs(Qt,{"data-testid":"config-file-errors",role:"alert",style:{borderColor:$t("error")},children:[u.jsx("strong",{children:"The current loki.yaml has problems"}),u.jsx("ul",{style:{margin:"6px 0 0",paddingLeft:18},children:i.errors.map(p=>u.jsx("li",{children:p},p))})]}):null,l2.map(p=>u.jsx(s2,{section:p,state:i,onSave:h},p.id)),u.jsx("div",{children:u.jsx(pt,{variant:"ghost",size:"sm",onClick:d,children:"Reload from disk"})})]})}const r2={id:"settings-config",path:"/settings/config",title:"Configuration",component:u2,inSettings:!0},gf=i=>typeof i=="object"&&i!==null&&!Array.isArray(i),ss=i=>i.replace(/[\\/]+$/,"").split(/[\\/]/).pop()??i;function c2(i){const r=gf(i)&&gf(i.workspaces)?i.workspaces:{};return Object.entries(r).map(([o,c])=>({name:o,def:gf(c)?c:{}}))}const o2=(i,r)=>{const o=r.origin_repo;return o?i.repo&&(o===i.repo||o.endsWith(`/${i.repo}`)||ss(o)===ss(i.repo))?!0:!!i.path&&ss(o)===ss(i.path):!1},H0=i=>i.started_at??"";function f2(i,r){return c2(i).map(({name:o,def:c})=>{const d=(Array.isArray(c.repos)?c.repos:[]).map(b=>{const v=r.filter(R=>o2(b,R)).sort((R,y)=>H0(y).localeCompare(H0(R)));return{name:b.repo??(b.path?ss(b.path):"unnamed"),path:b.path??null,after:Array.isArray(b.after)?b.after:[],shell:typeof b.setup=="string",latest:v[0]??null,runs:v.length}}),h=d.filter(b=>b.latest),p=d.length&&h.length===d.length?{total:d.length,verified:h.filter(b=>cs(b.latest)).length,failed:h.filter(b=>b.latest.verdict!==null&&!cs(b.latest)).length,running:h.filter(b=>b.latest.verdict===null).length}:null,g=!!c.integration&&typeof c.integration.command=="string";return{name:o,repos:d,shell:g||d.some(b=>b.shell),integrationShell:g,status:p}})}const Pg=()=>globalThis.LOKI_CONTROL_BASE??"",d2=()=>{const i=_e();return i?{"content-type":"application/json",authorization:`Bearer ${i}`}:{"content-type":"application/json"}};async function h2(){const i=_e(),r=await fetch(`${Pg()}/v1/config`,{headers:i?{authorization:`Bearer ${i}`}:{}});if(!r.ok)throw new Error(`/v1/config: HTTP ${r.status}`);const o=await r.json();return{config:o.config??{},errors:o.errors??[]}}async function m2(i,r){const o=await fetch(`${Pg()}/v1/runs`,{method:"POST",headers:d2(),body:JSON.stringify({workspace:i,target:r})}),c=await o.json().catch(()=>({}));if(!o.ok)throw new Error(c.error??`HTTP ${o.status}`);return{pid:c.pid??0,command:c.command??""}}function p2({name:i}){const[r,o]=N.useState(""),[c,d]=N.useState(null),[h,p]=N.useState(!1),g=async()=>{p(!0),d(null);try{const b=await m2(i,r.trim());d({ok:!0,text:`Started: ${b.command} (pid ${b.pid})`})}catch(b){d({ok:!1,text:b instanceof Error?b.message:String(b)})}finally{p(!1)}};return u.jsxs("div",{style:{display:"grid",gap:8},children:[u.jsxs("div",{style:{display:"flex",gap:8},children:[u.jsx(Pn,{"aria-label":`Target for ${i}`,placeholder:"owner/repo#123 or a short task",value:r,onChange:b=>o(b.target.value)}),u.jsx(pt,{disabled:h||!r.trim(),onClick:g,children:"Run workspace"})]}),c?u.jsxs("div",{role:c.ok?"status":"alert",children:[u.jsx(Yt,{tone:c.ok?"success":"error",children:c.ok?"started":"refused"})," ",c.text]}):null]})}function g2({w:i}){const r=i.repos.map(o=>[u.jsx("strong",{children:o.name},"n"),o.path??"not measured",o.after.length?o.after.join(", "):"none",o.latest?o.latest.verdict?u.jsx(Fa,{run:o.latest},"v"):u.jsx(Yt,{tone:"neutral",pulse:!0,children:"running"},"v"):"not measured",o.latest?String(o.runs):"not measured"]);return u.jsx(Qt,{children:u.jsxs("div",{style:{display:"grid",gap:12},children:[u.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[u.jsx("h2",{style:{margin:0,fontSize:16},children:i.name}),i.shell?u.jsx(Yt,{tone:"warning",children:"read-only: runs shell commands"}):null,u.jsx("span",{style:{marginLeft:"auto"},children:i.status?`Group: ${i.status.verified} of ${i.status.total} verified`+(i.status.failed?`, ${i.status.failed} not verified`:"")+(i.status.running?`, ${i.status.running} running`:""):"Group status: not measured"})]}),i.repos.length?u.jsx(ta,{caption:`Repos in ${i.name}`,columns:["Repo","Path","After","Latest run","Runs"],rows:r}):u.jsx("div",{children:"No repos listed"}),i.shell?u.jsx("div",{children:"Edit shell commands in loki.yaml; the UI never changes them."}):null,u.jsx(p2,{name:i.name})]})})}function v2(){const[i,r]=N.useState(null),[o,c]=N.useState([]),[d,h]=N.useState(null);return N.useEffect(()=>{let p=!0;return(async()=>{try{const{config:g,errors:b}=await h2();let v=[];try{v=(await Wn()).runs}catch{}p&&(r(f2(g,v)),c(b))}catch(g){p&&h(g instanceof Error?g.message:String(g))}})(),()=>{p=!1}},[]),d?u.jsx(Tt,{title:"Could not load workspaces",hint:d}):i?i.length?u.jsxs("div",{style:{display:"grid",gap:16},children:[o.length?u.jsxs("div",{role:"alert",children:[u.jsx(Yt,{tone:"warning",children:"loki.yaml has problems"})," ",o.join("; ")]}):null,i.map(p=>u.jsx(g2,{w:p},p.name))]}):u.jsx(Tt,{title:"No workspaces",hint:"Define workspaces in loki.yaml to run a group of repos together."}):u.jsx(Bt,{label:"Loading workspaces"})}const y2={id:"workspaces",path:"/workspaces",title:"Workspaces",component:v2},x2=()=>globalThis.LOKI_CONTROL_BASE??"";async function b2(){const i=_e(),r=await fetch(`${x2()}/v1/integrations`,{headers:i?{authorization:`Bearer ${i}`}:{}});if(!r.ok)throw new Error(`HTTP ${r.status}`);return(await r.json()).integrations}const j2=i=>typeof i=="object"&&i!==null&&!Array.isArray(i);function tv(i,r,o){const[c,...d]=r;return c===void 0?i:{...i,[c]:d.length?tv(j2(i[c])?i[c]:{},d,o):o}}const S2={connected:"success",not_connected:"neutral",not_measured:"neutral"},_2={connected:"connected",not_connected:"not connected",not_measured:"not measured"};function E2({row:i,onChanged:r}){const[o,c]=N.useState(i.env_name??""),[d,h]=N.useState(!1),[p,g]=N.useState(null),b=/^[A-Z_][A-Z0-9_]*$/.test(o),v=async()=>{if(!(!i.config_path||!b)){h(!0),g(null);try{const R=await Ig();await Fg(tv(R.config,i.config_path.split("."),o),R.etag),g(`Saved ${o} to loki.yaml`),r()}catch(R){g(R instanceof Pa?[R.message,...R.details].join(": "):R.message)}finally{h(!1)}}};return u.jsxs(Qt,{"data-testid":`integration-${i.id}`,children:[u.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",justifyContent:"space-between"},children:[u.jsx("strong",{children:i.label}),u.jsx(Yt,{tone:S2[i.status],children:_2[i.status]})]}),u.jsx("p",{style:{margin:"4px 0 8px",color:"var(--cp-text-2)",fontSize:"var(--cp-text-md)"},children:i.detail}),i.config_path?u.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[u.jsx(Pn,{"aria-label":`${i.label} variable name`,value:o,placeholder:"ENV_VAR_NAME",autoComplete:"off",spellCheck:!1,onChange:R=>{c(R.target.value.trim()),g(null)},style:{fontFamily:"var(--cp-font-mono)"}}),u.jsx(pt,{onClick:v,disabled:d||!b||o===i.env_name,children:d?"Saving":"Connect"})]}):u.jsx("small",{style:{color:"var(--cp-text-3)"},children:i.id==="mcp"?"Managed in .mcp.json.":"loki.yaml has no setting for this service yet."}),i.config_path&&o&&!b?u.jsx("small",{role:"alert",children:"Use an environment variable name such as GITHUB_TOKEN, never the secret itself."}):null,p?u.jsx("small",{role:"status",style:{display:"block",marginTop:4},children:p}):null]})}function T2(){const[i,r]=N.useState(null),[o,c]=N.useState(null),d=N.useCallback(()=>{b2().then(r).catch(h=>c(h instanceof Error?h.message:String(h)))},[]);return N.useEffect(d,[d]),o?u.jsx(Tt,{title:"Could not load integrations",hint:o}):i?u.jsxs("div",{style:{display:"grid",gap:16},children:[u.jsx("h1",{style:{margin:0,fontSize:"var(--cp-text-xl, 20px)"},children:"Integrations"}),u.jsx("small",{style:{color:"var(--cp-text-3)"},children:"Status shows whether an environment variable is set or a CLI is signed in, never its value. Connect stores the variable name in loki.yaml."}),i.map(h=>u.jsx(E2,{row:h,onChanged:d},h.id))]}):u.jsx(Bt,{label:"Probing integrations"})}const N2={id:"integrations",path:"/integrations",title:"Integrations",component:T2,inSettings:!0},R2=Eg.component,L0={...Eg,component:({params:i})=>u.jsx(R2,{source:i.source,run:i.run,renderSlot:(r,o)=>u.jsx(Mb,{source:i.source,run:i.run,status:r.blocked_question?"BLOCKED":r.status==="running"||r.verdict===null?"running":r.verdict??r.status??"",onChanged:o})})};function B0(i){const r=i.component;return{...i,component:()=>u.jsx(r,{})}}function z2(){z0("run-detail"),z0("new-run"),Ce(B0({...iS,path:"/"})),Ce({...L0,id:"run-short",path:"/r/:source/:run"}),Ce(L0),Ce(ZS),Ce(KS),Ce(AS),Ce(wS);for(const i of[Cb,cS,fS,Jj,vS,yS,US,FS,e2,r2,y2,N2])Ce(B0(i))}let Ef=null;function q0(i){Ef=i}function O2(){return Ef?(Ef(),!0):!1}const C2=8,A2=()=>[{id:"action:new-run",kind:"Actions",label:"New run",hint:"Cmd+N",action:"new-run"},{id:"action:toggle-theme",kind:"Actions",label:"Toggle theme",hint:"Cmd+Shift+D",action:"toggle-theme"}],w2=i=>i.filter(r=>!r.path.includes(":")).map(r=>({id:`page:${r.id}`,kind:"Pages",label:r.title,hint:r.path,to:r.path})),$0=i=>{const r=Date.parse(i.started_at??i.last_event_at??"");return Number.isNaN(r)?0:r},D2=i=>[...i].sort((r,o)=>$0(o)-$0(r)).map(r=>{var o;return{id:`run:${r.source_id}/${r.run_id}`,kind:"Runs",label:((o=r.title)==null?void 0:o.trim())||r.issue_ref||"Untitled task",hint:[r.origin_repo,jl(r)?Ae(jl(r)).label:r.status].filter(Boolean).join(" / ")||void 0,to:`/runs/${encodeURIComponent(r.source_id)}/${encodeURIComponent(r.run_id)}`}}),M2=(i,r)=>{const o=`${i.label} ${i.hint??""}`.toLowerCase();return r.split(/\s+/).filter(Boolean).every(c=>o.includes(c))};function k2(i,r,o,c){const d=i.trim().toLowerCase(),h=p=>d?p.filter(g=>M2(g,d)):p;return[...h(c),...h(r),...h(o).slice(0,C2)]}const pe=i=>`var(--cp-${i})`,U2=i=>{location.hash=`#${i}`};function H2(){const[i,r]=N.useState(!1),[o,c]=N.useState(""),[d,h]=N.useState(0),[p,g]=N.useState([]),[b,v]=N.useState(null),R=N.useRef(null),y=N.useId(),A=N.useSyncExternalStore(fg,lr,lr),B=()=>{r(!1),c(""),h(0)};N.useEffect(()=>(q0(()=>r(M=>!M)),()=>q0(null)),[]),N.useEffect(()=>{if(!i)return;let M=!0;return v(null),Wn().then(L=>{M&&g(L.runs)},L=>{M&&v(L.message)}),queueMicrotask(()=>{var L;return(L=R.current)==null?void 0:L.focus()}),()=>{M=!1}},[i]),N.useEffect(()=>{const M=L=>{const Q=L.metaKey||L.ctrlKey,ct=L.key.toLowerCase();L.key==="Escape"&&i?(L.preventDefault(),B()):Q&&!L.shiftKey&&ct==="n"?(L.preventDefault(),Wa(),i&&B()):Q&&L.shiftKey&&ct==="d"&&(L.preventDefault(),ar())};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[i]);const G=N.useMemo(()=>k2(o,w2(og().filter(M=>us().enabled||!M.id.startsWith("ask"))),D2(p),A2()),[o,p,A]),lt=Math.min(d,Math.max(0,G.length-1)),H=M=>{M.action==="toggle-theme"?ar():M.action==="new-run"?Wa():M.to&&U2(M.to),B()},$=M=>{if(M.key==="ArrowDown")M.preventDefault(),h(G.length?(lt+1)%G.length:0);else if(M.key==="ArrowUp")M.preventDefault(),h(G.length?(lt-1+G.length)%G.length:0);else if(M.key==="Home")M.preventDefault(),h(0);else if(M.key==="End")M.preventDefault(),h(Math.max(0,G.length-1));else if(M.key==="Enter"&&!(M.metaKey||M.ctrlKey)){M.preventDefault();const L=G[lt];L&&H(L)}};if(!i)return null;let tt="";return u.jsx("div",{"data-testid":"palette-backdrop",onClick:B,style:{position:"fixed",inset:0,zIndex:400,background:"rgba(0,0,0,0.4)",display:"flex",justifyContent:"center",alignItems:"flex-start",paddingTop:"14vh"},children:u.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":"Command palette",onClick:M=>M.stopPropagation(),style:{width:"min(560px, 92vw)",background:pe("bg"),color:pe("text"),border:`1px solid ${pe("border")}`,borderRadius:pe("radius-lg"),boxShadow:pe("shadow-lg"),overflow:"hidden",fontFamily:pe("font-sans")},children:[u.jsx("input",{ref:R,role:"combobox","aria-expanded":"true","aria-controls":y,"aria-autocomplete":"list","aria-label":"Search pages, runs and actions","aria-activedescendant":G[lt]?`${y}-${lt}`:void 0,value:o,onChange:M=>{c(M.target.value),h(0)},onKeyDown:$,placeholder:"Search pages, runs, actions",style:{width:"100%",boxSizing:"border-box",padding:"14px 16px",background:"transparent",color:pe("text"),border:"none",borderBottom:`1px solid ${pe("border")}`,outline:"none",fontSize:"1rem"}}),u.jsx("ul",{id:y,role:"listbox","aria-label":"Results",style:{listStyle:"none",margin:0,padding:6,maxHeight:"50vh",overflowY:"auto"},children:G.map((M,L)=>{const Q=M.kind!==tt?M.kind:null;return tt=M.kind,u.jsxs("li",{role:"presentation",children:[Q&&u.jsx("div",{role:"presentation",style:{padding:"8px 10px 4px",fontSize:pe("text-sm"),color:pe("text-2")},children:Q}),u.jsxs("div",{id:`${y}-${L}`,role:"option","aria-selected":L===lt,onMouseMove:()=>h(L),onClick:()=>H(M),style:{display:"flex",justifyContent:"space-between",gap:12,padding:"8px 10px",borderRadius:pe("radius-md"),cursor:"pointer",background:L===lt?pe("bg-3"):"transparent"},children:[u.jsx("span",{children:M.label}),M.hint&&u.jsx("span",{style:{color:pe("text-2"),fontSize:pe("text-sm")},children:M.hint.startsWith("Cmd")?u.jsx(mb,{children:M.hint}):M.hint})]})]},M.id)})}),G.length===0&&u.jsx("p",{role:"status",style:{margin:0,padding:"14px 16px",color:pe("text-2")},children:"No matches"}),b&&u.jsxs("p",{role:"alert",style:{margin:0,padding:"8px 16px",color:pe("error"),fontSize:pe("text-sm")},children:["Recent runs not loaded: ",b]})]})})}const L2=/^https:\/\/github\.com\/([A-Za-z0-9][A-Za-z0-9._-]*)\/([A-Za-z0-9._-]+)\/issues\/([1-9][0-9]*)\/?$/,B2=/^([A-Za-z0-9][A-Za-z0-9._-]*)\/([A-Za-z0-9._-]+)#([1-9][0-9]*)$/;function q2(i){const r=i.trim(),o=L2.exec(r);return o?`${o[1]}/${o[2]}#${o[3]}`:r}const $2=["haiku","sonnet","opus"],Y2={haiku:"haiku: fastest, may be less accurate"},Y0=i=>Y2[i]??null;function V0(i){return i instanceof Of?i.status===400?`The server refused this run: ${i.message}`:i.status===403?`Not allowed: ${i.message}. Starting runs works only from the machine running the control service.`:i.status===404?i.message:i.status===409?`${i.message}. Wait for it to finish, or pick another repo.`:i.message:i instanceof Error?i.message:"could not reach the control service"}const Iu={display:"flex",flexDirection:"column",gap:4,fontSize:"var(--cp-text-sm)",color:"var(--cp-text-muted)"},G0={padding:"8px 10px",borderRadius:"var(--cp-radius-md)",border:"1px solid var(--cp-border)",background:"var(--cp-bg)",color:"var(--cp-text)",font:"inherit",fontSize:"var(--cp-text-md)"};function V2({preset:i,onDone:r}){const[o,c]=N.useState(null),[d,h]=N.useState(null),[p,g]=N.useState(""),[b,v]=N.useState({state:"idle"}),[R,y]=N.useState(null),[A,B]=N.useState(""),[G,lt]=N.useState(""),[H,$]=N.useState(!1),[tt,M]=N.useState(!1),[L,Q]=N.useState(null),ct=N.useRef(!1),I=i?B2.exec(i):null;N.useEffect(()=>{let q=!0;return kb().then(Nt=>{q&&(c(Nt),I&&(Nt.includes(I[2])?(g(I[2]),$(!0)):Q(`${I[1]}/${I[2]} is not a registered repo, so a run cannot start from here.`)))},Nt=>q&&h(Nt.message)),()=>{q=!1}},[]),N.useEffect(()=>{if(!p||I)return;let q=!0;return v({state:"loading"}),y(null),Ub(p).then(Nt=>q&&v({state:"ok",list:Nt}),Nt=>q&&v({state:"error",message:V0(Nt)})),()=>{q=!1}},[p]);const et=I?i:R?q2(R.url):A.trim(),Vt=p!==""&&et!=="",Dt=I||R?et:`"${et}"`,Ht=async()=>{if(!(ct.current||!Vt)){ct.current=!0,M(!0),Q(null);try{await pg(G?{target:et,repo:p,model:G}:{target:et,repo:p}),r(),location.hash="#/runs"}catch(q){Q(V0(q)),M(!1)}finally{ct.current=!1}}};return d?u.jsxs("p",{role:"alert","data-testid":"picker-error",style:{color:"var(--cp-error)"},children:["Could not load registered repos: ",d]}):o===null?u.jsx(Bt,{label:"Loading repos"}):o.length===0?u.jsx("p",{"data-testid":"picker-no-repos",style:{color:"var(--cp-text-muted)"},children:"No registered repos. Run loki in a repo once so it appears here."}):H?u.jsxs("div",{"data-testid":"confirm-step",style:{display:"flex",flexDirection:"column",gap:16},children:[u.jsxs("p",{"data-testid":"confirm-text",style:{margin:0,fontSize:"var(--cp-text-md)"},children:["Start a run on ",u.jsx("strong",{children:Dt})," in ",u.jsx("strong",{children:p}),"?"]}),L?u.jsx("p",{role:"alert","data-testid":"picker-error",style:{margin:0,color:"var(--cp-error)"},children:L}):null,u.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[u.jsx(pt,{variant:"ghost",onClick:I?r:()=>$(!1),children:I?"Cancel":"Back"}),u.jsx(pt,{"data-testid":"confirm-start",disabled:tt||!Vt,onClick:()=>void Ht(),children:"Start run"})]})]}):u.jsxs("form",{"data-testid":"picker",style:{display:"flex",flexDirection:"column",gap:16},onSubmit:q=>{q.preventDefault(),Vt&&$(!0)},children:[u.jsxs("label",{style:Iu,children:["Repo",u.jsxs("select",{"aria-label":"Repo","data-testid":"picker-repo",value:p,onChange:q=>g(q.target.value),onInput:q=>g(q.target.value),style:G0,children:[u.jsx("option",{value:"",children:"Choose a registered repo"}),o.map(q=>u.jsx("option",{value:q,children:q},q))]})]}),u.jsx("a",{href:"#/repos","data-testid":"picker-browse",onClick:r,style:{color:"var(--cp-accent)",fontSize:"var(--cp-text-sm)",alignSelf:"flex-start"},children:"Browse repos"}),u.jsxs("label",{style:Iu,children:["Model",u.jsxs("select",{"aria-label":"Model","data-testid":"picker-model",value:G,onChange:q=>lt(q.target.value),onInput:q=>lt(q.target.value),style:G0,children:[u.jsx("option",{value:"",children:"Project default"}),$2.map(q=>u.jsx("option",{value:q,children:q},q))]}),Y0(G)?u.jsx("span",{"data-testid":"model-note",children:Y0(G)}):null]}),p?u.jsxs("div",{style:Iu,children:["Open issues",b.state==="loading"?u.jsx(Bt,{label:"Loading issues"}):null,b.state==="error"?u.jsxs("p",{role:"alert","data-testid":"issues-error",style:{margin:0,color:"var(--cp-error)"},children:["Could not load issues: ",b.message]}):null,b.state==="ok"&&b.list.length===0?u.jsx("p",{"data-testid":"issues-empty",style:{margin:0},children:"No open issues in this repo."}):null,b.state==="ok"&&b.list.length>0?u.jsx("ul",{role:"listbox","aria-label":"Open issues",style:{listStyle:"none",margin:0,padding:0,maxHeight:220,overflowY:"auto",border:"1px solid var(--cp-border)",borderRadius:"var(--cp-radius-md)"},children:b.list.map(q=>u.jsxs("li",{role:"option","aria-selected":(R==null?void 0:R.number)===q.number,"data-testid":"issue-option",onClick:()=>{y(q),B("")},style:{padding:"8px 10px",cursor:"pointer",color:"var(--cp-text)",background:(R==null?void 0:R.number)===q.number?"var(--cp-accent-glow)":"transparent",fontSize:"var(--cp-text-md)"},children:[u.jsxs("span",{style:{color:"var(--cp-text-muted)"},children:["#",q.number]})," ",q.title]},q.number))}):null]}):null,p?u.jsxs("label",{style:Iu,children:["Or describe a task",u.jsx(Pn,{"aria-label":"Task","data-testid":"picker-task",value:A,maxLength:500,placeholder:"A short task for this repo",onChange:q=>{B(q.target.value),q.target.value&&y(null)}})]}):null,L?u.jsx("p",{role:"alert","data-testid":"picker-error",style:{margin:0,color:"var(--cp-error)"},children:L}):null,u.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[u.jsx(pt,{variant:"ghost",onClick:r,children:"Cancel"}),u.jsx(pt,{type:"submit","data-testid":"picker-continue",disabled:!Vt,children:"Review"})]})]})}function G2(){const{open:i,preset:r}=Oj();return u.jsx(db,{open:i,title:"New run",onClose:w0,children:u.jsx(V2,{preset:r,onDone:w0},r??"pick")})}function Q2({active:i=!1,size:r=26}){const o=i?"var(--cp-accent)":"var(--cp-text)";return u.jsxs("svg",{"data-testid":"mascot","data-state":i?"active":"idle",role:"img","aria-label":i?"Loki, working":"Loki",width:r,height:r,viewBox:"0 0 32 32",children:[u.jsx("rect",{x:"3",y:"4",width:"26",height:"22",rx:"6",fill:"var(--cp-card)",stroke:"var(--cp-accent)",strokeWidth:"2"}),u.jsx("path",{d:"M3 10h26",stroke:"var(--cp-accent)",strokeWidth:"1.5",opacity:"0.5"}),u.jsx("circle",{cx:"12",cy:"17",r:"2",fill:o}),u.jsx("circle",{cx:"20",cy:"17",r:"2",fill:o}),u.jsx("path",{d:"M12.5 21.5c2 1.6 5 1.6 7 0",fill:"none",stroke:"var(--cp-text)",strokeWidth:"1.5",strokeLinecap:"round"}),u.jsx("path",{d:"M10 26v3M22 26v3",stroke:"var(--cp-accent)",strokeWidth:"2",strokeLinecap:"round"})]})}const Lt=i=>`var(--cp-${i})`;function X2(){var o;const[i,r]=N.useState(((o=globalThis.location)==null?void 0:o.hash)??"");return N.useEffect(()=>{const c=()=>r(location.hash);return c(),addEventListener("hashchange",c),()=>removeEventListener("hashchange",c)},[]),i}const Z2=[{href:"#/",label:"Overview",icon:u.jsx(R1,{size:14,"aria-hidden":"true"}),match:i=>i==="/"||i==="/home"},{href:"#/runs",label:"Runs",icon:u.jsx(O1,{size:14,"aria-hidden":"true"}),match:i=>i==="/runs"||i.startsWith("/runs/")||i.startsWith("/r/")},{href:"#/pulls",label:"Pull requests",icon:u.jsx(J0,{size:14,"aria-hidden":"true"}),match:i=>i==="/pulls"},{href:"#/repos",label:"Repos",icon:u.jsx(E1,{size:14,"aria-hidden":"true"}),match:i=>i==="/repos"},{href:"#/receipts",label:"Receipts",icon:u.jsx(B1,{size:14,"aria-hidden":"true"}),match:i=>i.startsWith("/receipts")}];function K2({activePath:i,onNavigate:r}){const o=$g();return o.enabled?u.jsxs("section",{"data-testid":"ask-history","aria-label":"Ask Loki",style:{marginTop:16},children:[u.jsx(ob,{children:"Ask Loki"}),u.jsx(er,{href:"#/ask",active:i==="/ask",icon:u.jsx(k1,{size:14,"aria-hidden":"true"}),onClick:r,children:"New question"}),o.threads.map(c=>{const d=`#/ask/${encodeURIComponent(c.id)}`,h=fs(d)===i;return u.jsx("a",{"data-testid":"ask-thread-link",href:d,title:c.title,"aria-current":h?"page":void 0,onClick:r,style:{display:"block",padding:"6px 12px",borderRadius:Lt("radius-nav"),textDecoration:"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:Lt("text-md"),color:Lt(h?"accent":"text"),background:h?Lt("accent-glow"):"transparent"},children:c.title},c.id)})]}):null}function J2(){const i=zg(),r=i==="dark"?"light":"dark";return u.jsxs("button",{type:"button","data-testid":"theme-toggle",onClick:ar,"aria-label":`Switch to ${r} theme`,style:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"7px 12px",marginTop:2,border:0,borderRadius:Lt("radius-nav"),background:"transparent",color:Lt("text-2"),cursor:"pointer",fontSize:Lt("text-md"),fontFamily:"inherit"},children:[i==="dark"?u.jsx(X1,{size:14,"aria-hidden":"true"}):u.jsx(H1,{size:14,"aria-hidden":"true"}),i==="dark"?"Light theme":"Dark theme"]})}function Q0({hash:i,onNavigate:r}){const o=fs(i);return u.jsxs(u.Fragment,{children:[u.jsxs("a",{href:"#/",onClick:r,style:{display:"flex",alignItems:"center",gap:8,padding:"4px 12px 12px",textDecoration:"none",color:Lt("text")},children:[u.jsx(Q2,{active:!1}),u.jsx("span",{style:{fontFamily:Lt("font-serif"),fontSize:Lt("text-2xl")},children:"Loki Mode"})]}),u.jsx("div",{style:{padding:"0 12px 12px"},children:u.jsx(pt,{"data-testid":"sidebar-new-run",style:{width:"100%"},onClick:()=>{r==null||r(),Wa()},children:"New run"})}),u.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"0 8px"},children:[u.jsx("div",{"data-testid":"nav-links",children:Z2.map(c=>u.jsx(er,{href:c.href,active:c.match(o),icon:c.icon,onClick:r,children:c.label},c.href))}),u.jsx(K2,{activePath:o,onNavigate:r})]}),u.jsxs("div",{style:{padding:8,borderTop:`1px solid ${Lt("border")}`},children:[u.jsx(er,{href:"#/settings",active:o.startsWith("/settings"),icon:u.jsx(Y1,{size:14,"aria-hidden":"true"}),onClick:r,children:"Settings"}),u.jsx(J2,{})]})]})}const I2={width:Lt("sidebar-w"),flexShrink:0,flexDirection:"column",height:"100vh",position:"sticky",top:0,paddingTop:16,background:Lt("glass"),borderRight:`1px solid ${Lt("glass-border")}`,boxShadow:Lt("glass-shadow")};function F2({path:i}){const r=_b();if(r.length===0)return u.jsx(Tt,{title:"No settings available"});const o=r.find(d=>fs(d.path)===i)??r[0],c=o.component;return u.jsxs("div",{"data-testid":"settings-area",style:{display:"flex",flexWrap:"wrap",gap:24},children:[u.jsxs("nav",{"aria-label":"Settings","data-testid":"settings-nav",style:{width:200,flexShrink:0},children:[u.jsx("h1",{style:{fontFamily:Lt("font-serif"),fontWeight:400,fontSize:Lt("text-2xl"),margin:"0 0 12px 12px"},children:"Settings"}),r.map(d=>u.jsx(er,{href:`#${d.path}`,active:d.id===o.id,children:d.title},d.id))]}),u.jsx("div",{style:{flex:1,minWidth:0},children:u.jsx(c,{params:{}})})]})}function W2({hash:i}){N.useSyncExternalStore(fg,lr,lr);const r=fs(i);if(r==="/settings"||r.startsWith("/settings/"))return u.jsx(F2,{path:r});const o=Tb(i);if(!o)return u.jsx(Tt,{title:"Page not found",hint:u.jsx("a",{href:"#/",style:{color:Lt("accent")},children:"Back to home"})});const c=o.page.component;return u.jsx(c,{params:o.params})}function P2(){const i=X2(),[r,o]=N.useState(!1);return N.useEffect(()=>{or()},[]),N.useEffect(()=>{const c=d=>{if(!(d.metaKey||d.ctrlKey))return;const h=d.key.toLowerCase();h==="k"&&us().enabled?(d.preventDefault(),location.hash="#/ask"):(h==="k"||h==="/")&&O2()&&d.preventDefault()};return addEventListener("keydown",c),()=>removeEventListener("keydown",c)},[]),u.jsxs("div",{"data-testid":"app-shell",className:"flex min-h-screen",style:{background:Lt("bg"),color:Lt("text"),fontFamily:Lt("font-sans")},children:[u.jsx("nav",{"data-testid":"nav","aria-label":"Main",className:"hidden md:flex",style:I2,children:u.jsx(Q0,{hash:i})}),u.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[u.jsxs("header",{className:"flex items-center gap-2 p-2 md:hidden",style:{borderBottom:`1px solid ${Lt("border")}`},children:[u.jsx(pt,{variant:"ghost","aria-label":"Open navigation","data-testid":"open-drawer",onClick:()=>o(!0),children:u.jsx(A1,{size:16,"aria-hidden":"true"})}),u.jsx("span",{style:{fontFamily:Lt("font-serif"),fontSize:Lt("text-xl")},children:"Loki Mode"})]}),u.jsx("main",{"data-testid":"outlet",className:"min-w-0 flex-1 overflow-x-auto p-3 md:p-6",style:{maxWidth:"100%"},children:u.jsx(W2,{hash:i})})]}),u.jsx(G2,{}),u.jsx(hb,{open:r,title:"Loki Mode",side:"left",onClose:()=>o(!1),children:u.jsx("div",{style:{display:"flex",flexDirection:"column",minHeight:"80vh"},children:u.jsx(Q0,{hash:i,onNavigate:()=>o(!1)})})})]})}const xn="not recorded";function ev(i){return i.cost_usd!==null&&i.cost_usd!==void 0?we(i.cost_usd):i.total_sessions>0&&i.measured_sessions<i.total_sessions?`unpriced (${i.measured_sessions} of ${i.total_sessions} sessions priced)`:"unpriced"}const t_=i=>i.started_at&&i.ended_at?(Date.parse(i.ended_at)-Date.parse(i.started_at))/1e3:null,lv=i=>typeof i=="number"?`${i.toFixed(1)}s`:xn,nv=i=>i?i.replace("T"," ").replace(/\.\d+Z$/,"Z"):xn,e_={[St.VERIFIED]:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-300 ring-emerald-500/30",[St.PARTIAL]:"bg-amber-500/15 text-amber-700 dark:text-amber-300 ring-amber-500/30",[St.FAILED]:"bg-red-500/15 text-red-700 dark:text-red-300 ring-red-500/30",[St.TAMPERED]:"bg-red-600/20 text-red-700 dark:text-red-300 ring-red-600/50",[St.VERIFIED_UNCHECKED]:"bg-sky-500/15 text-sky-700 dark:text-sky-300 ring-sky-500/30",[St.UNVERIFIED]:"bg-amber-500/15 text-amber-700 dark:text-amber-300 ring-amber-500/30",[St.SPEC_CONFLICT]:"bg-violet-500/15 text-violet-700 dark:text-violet-300 ring-violet-500/30"};function Tf({verdict:i,run:r}){const o=r?jl(r):i??null,c=o?e_[o]??"bg-slate-500/15 text-slate-600 dark:text-slate-300 ring-slate-500/30":"bg-slate-500/15 text-slate-600 dark:text-slate-300 ring-slate-500/30";return u.jsx("span",{"data-testid":"verdict",className:`inline-block rounded px-2 py-0.5 text-xs font-medium ring-1 ${c}`,children:o??"in progress"})}function av({url:i}){return i?/^https?:\/\//.test(i)?u.jsxs("a",{href:i,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-sky-600 hover:underline dark:text-sky-400",children:["PR ",u.jsx(Rf,{size:12})]}):u.jsx("span",{className:"break-all font-mono text-xs",title:"local origin, no web URL",children:i}):u.jsx("span",{className:"text-slate-500",children:"no PR"})}const X0=3e3;function iv(i,r,o){const[c,d]=N.useState({data:null,error:null});return N.useEffect(()=>{let h=!0,p;d({data:null,error:null});const g=()=>i().then(b=>{h&&(d({data:b,error:null}),o!=null&&o(b)&&(p=setTimeout(g,X0)))},b=>{h&&(d(v=>({data:v.data,error:b.message})),o&&(p=setTimeout(g,X0)))});return g(),()=>{h=!1,clearTimeout(p)}},r),c}const yn=i=>i.status==="running";function sv({run:i}){const[r]=N.useState(()=>({at:Date.now(),s:i.elapsed_s??0})),[,o]=N.useState(0),c=yn(i);N.useEffect(()=>{if(!c)return;const h=setInterval(()=>o(p=>p+1),1e3);return()=>clearInterval(h)},[c]);const d=c?Math.max(i.elapsed_s??0,r.s+(Date.now()-r.at)/1e3):i.elapsed_s??i.wall_s;return u.jsx("span",{"data-testid":"elapsed",children:typeof d=="number"?`${Math.floor(d)}s`:xn})}function l_({onOpen:i}){const[r,o]=N.useState(""),[c,d]=N.useState(""),[h,p]=N.useState(""),{data:g,error:b}=iv(()=>Wn({verdict:r,repo:c,since:h?`${h}T00:00:00Z`:""}),[r,c,h],y=>y.runs.some(yn)),v=!!(r||c||h),R="rounded border border-slate-300 bg-white px-2 py-2 text-sm md:py-1 dark:border-slate-700 dark:bg-slate-900";return u.jsxs("section",{children:[u.jsx("h1",{className:"mb-4 text-xl font-semibold",children:"Runs"}),u.jsxs("div",{className:"mb-4 grid grid-cols-1 gap-3 text-sm sm:flex sm:flex-wrap sm:items-end",children:[u.jsxs("label",{className:"flex flex-col gap-1",children:["Verdict",u.jsxs("select",{"aria-label":"Verdict",className:R,value:r,onChange:y=>o(y.target.value),children:[u.jsx("option",{value:"",children:"All"}),sb.map(y=>u.jsx("option",{value:y,children:Ae(y).label},y))]})]}),u.jsxs("label",{className:"flex flex-col gap-1",children:["Repo",u.jsx("input",{"aria-label":"Repo",className:R,value:c,onChange:y=>d(y.target.value),placeholder:"owner/name"})]}),u.jsxs("label",{className:"flex flex-col gap-1",children:["Since",u.jsx("input",{"aria-label":"Since",type:"date",className:R,value:h,onChange:y=>p(y.target.value)})]})]}),b&&u.jsxs("p",{role:"alert",className:"text-red-600",children:["Could not load runs: ",b]}),!g&&!b&&u.jsx("p",{className:"text-slate-500",children:"Loading runs"}),g&&g.runs.length===0&&(v?u.jsx("p",{children:"No runs match these filters."}):u.jsx(Df,{})),g&&g.runs.length>0&&u.jsx("div",{className:"overflow-x-auto rounded border border-slate-200 dark:border-slate-800",children:u.jsxs("table",{className:"w-full text-left text-sm",children:[u.jsx("thead",{className:"bg-slate-100 text-xs uppercase text-slate-500 dark:bg-slate-900",children:u.jsxs("tr",{children:[u.jsx("th",{className:"p-2",children:"Verdict"}),u.jsx("th",{className:"p-2",children:"Run"}),u.jsx("th",{className:"hidden p-2 md:table-cell",children:"Repo"}),u.jsx("th",{className:"hidden p-2 md:table-cell",children:"Started"}),u.jsx("th",{className:"p-2",children:"Progress"}),u.jsx("th",{className:"p-2",children:"Cost"}),u.jsx("th",{className:"p-2",children:"PR"})]})}),u.jsx("tbody",{children:g.runs.map(y=>u.jsxs("tr",{"data-testid":"run-row",className:"border-t border-slate-200 dark:border-slate-800",children:[u.jsx("td",{className:"p-2",children:u.jsx(Tf,{run:y})}),u.jsx("td",{className:"p-2 font-mono text-xs",children:u.jsx("a",{href:`#/runs/${encodeURIComponent(y.source_id)}/${encodeURIComponent(y.run_id)}`,onClick:()=>i==null?void 0:i(y),className:"inline-block break-all py-2 text-sky-600 hover:underline md:py-0 dark:text-sky-400",children:y.run_id})}),u.jsx("td",{className:"hidden p-2 md:table-cell",children:y.origin_repo??xn}),u.jsx("td",{className:"hidden p-2 md:table-cell",children:nv(y.started_at)}),u.jsx("td",{className:"p-2 text-xs","data-testid":"progress",children:yn(y)?u.jsxs(u.Fragment,{children:[y.current_stage??"starting",", ",u.jsx(sv,{run:y}),", ",(y.files_touched??[]).length," files"]}):""}),u.jsx("td",{className:"p-2","data-testid":"cost",children:ev(y)}),u.jsx("td",{className:"p-2",children:u.jsx(av,{url:y.pr_url})})]},`${y.source_id}/${y.run_id}`))})]})})]})}function rs({title:i,children:r}){return u.jsxs("div",{className:"rounded border border-slate-200 p-4 dark:border-slate-800",children:[u.jsx("h2",{className:"mb-2 text-sm font-semibold uppercase text-slate-500",children:i}),r]})}function n_({stages:i}){return i.length===0?u.jsx("p",{className:"text-slate-500",children:"No stages ingested for this run."}):u.jsx("ol",{className:"space-y-1 text-sm",children:i.map(r=>u.jsxs("li",{"data-testid":"stage",className:"flex items-center justify-between gap-4",children:[u.jsx("span",{className:"font-medium",children:r.stage}),u.jsx("span",{className:"text-slate-500",children:r.status==="started"?"running":lv(t_(r))})]},r.stage))})}function a_({source:i,run:r,question:o}){const[c,d]=N.useState(""),[h,p]=N.useState(null),g=async()=>{try{const b=await F0(i,r,c);p({ok:!0,text:`Saved to ${b.path}. Resume: ${b.resume}`})}catch(b){p({ok:!1,text:b.message})}};return u.jsxs(rs,{title:"Blocked: your answer is needed",children:[u.jsx("p",{"data-testid":"blocked-question",className:"mb-2 text-sm",children:o}),u.jsx("textarea",{"data-testid":"answer-input","aria-label":"Answer",maxLength:4e3,value:c,onChange:b=>d(b.target.value),className:"w-full rounded border border-slate-300 p-2 text-sm dark:border-slate-700 dark:bg-slate-900",rows:3}),u.jsx("button",{type:"button","data-testid":"answer-submit",disabled:c.trim()==="",onClick:g,className:"mt-2 min-h-11 rounded bg-sky-600 px-4 py-2 text-sm md:min-h-0 md:px-3 md:py-1 text-white disabled:opacity-50",children:"Submit answer"}),h&&u.jsx("p",{role:h.ok?"status":"alert",className:`mt-2 break-all text-sm ${h.ok?"text-emerald-600":"text-red-600"}`,children:h.text})]})}function i_({source:i,run:r}){const[o,c]=N.useState(!1),[d,h]=N.useState(!1),[p,g]=N.useState(null),b=async()=>{h(!0),g(null);try{await lb(i,r),location.hash="#/runs"}catch(R){g(R.message),h(!1)}},v="min-h-11 rounded px-4 py-2 text-sm md:min-h-0 md:px-3 md:py-1";return u.jsxs(rs,{title:"Remove run",children:[o?u.jsxs("div",{className:"space-y-2 text-sm",children:[u.jsx("p",{"data-testid":"remove-confirm-text",children:"Permanently delete this run and its events from the local control database? This cannot be undone."}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("button",{type:"button","data-testid":"remove-confirm",disabled:d,onClick:b,className:`${v} bg-red-600 text-white disabled:opacity-50`,children:d?"Removing":"Yes, remove"}),u.jsx("button",{type:"button","data-testid":"remove-cancel",disabled:d,onClick:()=>{c(!1),g(null)},className:`${v} border border-slate-300 dark:border-slate-700`,children:"Cancel"})]})]}):u.jsx("button",{type:"button","data-testid":"remove-run",onClick:()=>c(!0),className:`${v} border border-red-500/50 text-red-600`,children:"Remove"}),p&&u.jsxs("p",{role:"alert","data-testid":"remove-error",className:"mt-2 break-all text-sm text-red-600",children:["Could not remove run: ",p]})]})}function s_({source:i,run:r}){const{data:o,error:c}=iv(()=>ur(i,r),[i,r],yn);if(c)return u.jsxs("p",{role:"alert",className:"text-red-600",children:["Could not load run: ",c]});if(!o)return u.jsx("p",{className:"text-slate-500",children:"Loading run"});const d=o;return u.jsxs("section",{className:"space-y-4",children:[u.jsx("a",{href:"#/runs",className:"text-sm text-sky-600 hover:underline dark:text-sky-400",children:"Back to runs"}),u.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[u.jsx("h1",{className:"font-mono text-lg font-semibold",children:d.run_id}),u.jsx(Tf,{run:d}),d.tampered&&u.jsxs("span",{className:"inline-flex items-center gap-1 text-sm text-red-600",children:[u.jsx(S0,{size:14}),"event log tampered"]}),d.conflict&&u.jsxs("span",{className:"inline-flex items-center gap-1 text-sm text-amber-600",children:[u.jsx(S0,{size:14}),"conflicting events ingested"]})]}),u.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[u.jsx(rs,{title:"Summary",children:u.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-sm",children:[u.jsx("dt",{className:"text-slate-500",children:"Repo"}),u.jsx("dd",{children:d.origin_repo??xn}),u.jsx("dt",{className:"text-slate-500",children:"Issue"}),u.jsx("dd",{children:d.issue_ref??xn}),u.jsx("dt",{className:"text-slate-500",children:"Provider"}),u.jsx("dd",{children:d.provider??xn}),u.jsx("dt",{className:"text-slate-500",children:"Model"}),u.jsx("dd",{children:d.model??xn}),u.jsx("dt",{className:"text-slate-500",children:"Started"}),u.jsx("dd",{children:nv(d.started_at)}),yn(d)&&u.jsxs(u.Fragment,{children:[u.jsx("dt",{className:"text-slate-500",children:"Current stage"}),u.jsx("dd",{"data-testid":"current-stage",children:d.current_stage??"starting"})]}),u.jsx("dt",{className:"text-slate-500",children:yn(d)?"Elapsed":"Wall time"}),u.jsx("dd",{children:yn(d)?u.jsx(sv,{run:d}):lv(d.wall_s)}),yn(d)&&u.jsxs(u.Fragment,{children:[u.jsx("dt",{className:"text-slate-500",children:"Files touched"}),u.jsx("dd",{"data-testid":"files-touched",children:(d.files_touched??[]).join(", ")||"none yet"})]}),u.jsx("dt",{className:"text-slate-500",children:"Cost"}),u.jsx("dd",{"data-testid":"cost",children:ev(d)}),u.jsx("dt",{className:"text-slate-500",children:"PR"}),u.jsx("dd",{children:u.jsx(av,{url:d.pr_url})})]})}),u.jsx(rs,{title:"Stage timeline",children:u.jsx(n_,{stages:o.stages})})]}),o.blocked_question&&u.jsx(a_,{source:i,run:r,question:o.blocked_question}),u.jsx(rs,{title:"Receipt",children:u.jsxs("div",{className:"space-y-3 text-sm",children:[o.receipt?u.jsxs("p",{children:["Receipt verdict: ",u.jsx(Tf,{run:{verdict:o.receipt.verdict,tampered:d.tampered,attested:d.attested,sig_checked:d.sig_checked}})," ",u.jsx("span",{className:"ml-2 font-mono text-xs text-slate-500",children:o.receipt.sha256})]}):u.jsx("p",{className:"text-slate-500",children:"No receipt ingested for this run."}),u.jsxs("div",{children:[u.jsx("h3",{className:"font-medium",children:"NOT PROVEN"}),o.not_proven.length===0?u.jsx("p",{className:"text-slate-500",children:"Nothing listed as not proven."}):u.jsx("ul",{className:"list-disc pl-5",children:o.not_proven.map(h=>u.jsx("li",{"data-testid":"not-proven",children:h},h))})]})]})}),u.jsx(i_,{source:i,run:r})]})}const Bf=u.jsx(l_,{});Ce({id:"home",path:"/",title:"Home",component:()=>u.jsx(ug,{fallback:Bf})});Ce({id:"overview",path:"/overview",title:"Overview",component:()=>u.jsx(ug,{overview:!0,fallback:Bf})});Ce({id:"runs",path:"/runs",title:"Runs",component:()=>Bf});Ce({id:"run-detail",path:"/runs/:source/:run",title:"Run",component:({params:i})=>u.jsx(s_,{source:i.source,run:i.run})});Ce({id:"live-run",path:"/live/:source/:run",title:"Live run",component:({params:i})=>u.jsx(sg,{source:i.source,run:i.run})});Ce({id:"settings-general",path:"/settings/general",title:"General",inSettings:!0,component:zj});z2();function u_(){return u.jsxs(u.Fragment,{children:[u.jsx(P2,{}),u.jsx(H2,{})]})}or();d1.createRoot(document.getElementById("root")).render(u.jsx(u_,{}));