loki-mode 10.11.2 → 11.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/actions/issue-to-pr/action.yml +17 -0
- package/SKILL.md +2 -2
- package/VERSION +1 -1
- package/autonomy/lib/backlog.py +1 -1
- package/autonomy/lib/workspace.py +1 -1
- package/autonomy/loki +5 -8
- package/bin/loki +21 -18
- package/dashboard/__init__.py +1 -1
- package/docs/AGENT-CHANGE-RECEIPT.md +47 -0
- package/docs/CLI-REFERENCE.md +1 -1
- package/docs/INSTALLATION.md +1 -1
- package/docs/v10/DEPS.md +1 -0
- package/docs/v10/FAILURE-CLASSES.md +8 -0
- package/docs/v10/GUIDE.md +17 -22
- package/docs/v10/PROGRESS.md +25 -0
- package/docs/v10/RELEASE-11.md +77 -0
- package/docs/v11/C1-multi-user-sso.md +30 -0
- package/docs/v11/C10-the-8090-teardown.md +28 -0
- package/docs/v11/C11-mcp-modern.md +16 -0
- package/docs/v11/C2-hosted-runner.md +30 -0
- package/docs/v11/C3-reproducible-environments.md +30 -0
- package/docs/v11/C4-bitbucket-azure.md +29 -0
- package/docs/v11/C5-open-local-models.md +29 -0
- package/docs/v11/C6-secrets-handling.md +31 -0
- package/docs/v11/C7-windows.md +30 -0
- package/docs/v11/C8-public-benchmark.md +30 -0
- package/docs/v11/C9-opt-in-telemetry.md +33 -0
- package/docs/v11/README.md +32 -0
- package/loki-ts/dist/loki.js +696 -682
- package/mcp/__init__.py +1 -1
- package/package.json +3 -2
- package/packages/control-plane/dist/ask-tools-server.js +41169 -0
- package/packages/control-plane/dist/server.js +2080 -980
- package/packages/control-plane/package.json +1 -1
- package/packages/control-plane/src/ask/invoke.ts +42 -0
- package/packages/control-plane/src/ask/policy.ts +65 -0
- package/packages/control-plane/src/ask/prompt.ts +38 -0
- package/packages/control-plane/src/ask/store.ts +88 -0
- package/packages/control-plane/src/ask/worker.ts +136 -0
- package/packages/control-plane/src/db/fixture-cleanup.ts +24 -10
- package/packages/control-plane/src/server/app.ts +13 -6
- package/packages/control-plane/src/server/ingest.ts +6 -1
- package/packages/control-plane/src/server/reconcile.ts +33 -0
- package/packages/control-plane/src/server/repos.ts +37 -3
- package/packages/control-plane/src/server/routes/ask.ts +139 -0
- package/packages/control-plane/src/server/routes/cost.ts +19 -0
- package/packages/control-plane/src/server/routes/doctor.ts +67 -0
- package/packages/control-plane/src/server/routes/index.ts +7 -3
- package/packages/control-plane/src/server/routes/stream.ts +22 -11
- package/packages/control-plane/src/server/runs.ts +27 -0
- package/packages/control-plane/src/server/spawn.ts +19 -6
- package/packages/control-plane/ui/dist/assets/index-CxZWgwie.css +1 -0
- package/packages/control-plane/ui/dist/assets/index-DcBJXjCJ.js +190 -0
- package/packages/control-plane/ui/dist/index.html +2 -2
- package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
- package/web-app/dist/assets/{AdminPage-CmgIgBFY.js → AdminPage-DT071AJt.js} +1 -1
- package/web-app/dist/assets/{Avatar-Dm3ypJzh.js → Avatar-BlrQe1qX.js} +1 -1
- package/web-app/dist/assets/{Badge-0siYUwAA.js → Badge-lTUHjeos.js} +1 -1
- package/web-app/dist/assets/{Button-EMKQXvZe.js → Button-GewN0tNc.js} +1 -1
- package/web-app/dist/assets/{CockpitPage-Z60eDvJ9.js → CockpitPage-DrO_gIsU.js} +1 -1
- package/web-app/dist/assets/{ComparePage-D4L7nViy.js → ComparePage-DONALZcu.js} +1 -1
- package/web-app/dist/assets/{ErrorBoundary--v9DugrJ.js → ErrorBoundary-C6ZKmMc3.js} +1 -1
- package/web-app/dist/assets/{EvidenceReceiptPanel-CA866XsM.js → EvidenceReceiptPanel-BKd4DLj6.js} +1 -1
- package/web-app/dist/assets/{GitHubIssuesPanel-Bi6FJmR2.js → GitHubIssuesPanel-A6lIpXXR.js} +1 -1
- package/web-app/dist/assets/{GitHubPRsPanel-CgSfcWOg.js → GitHubPRsPanel-pR1qVGFE.js} +1 -1
- package/web-app/dist/assets/{HomePage-BxQtk9Ec.js → HomePage-bWv4-4k6.js} +2 -2
- package/web-app/dist/assets/{LoginPage-CCSxWlFA.js → LoginPage-D15fkL9Y.js} +1 -1
- package/web-app/dist/assets/{MagicPage-B4eYm0jJ.js → MagicPage-i6SBuJQM.js} +1 -1
- package/web-app/dist/assets/{MetricsPage-Bp4Hh0p2.js → MetricsPage-CUmjtIoG.js} +1 -1
- package/web-app/dist/assets/{NotFoundPage-DTXk_JK4.js → NotFoundPage-ChmAJkSz.js} +1 -1
- package/web-app/dist/assets/{ProjectPage-6S1v0GHS.js → ProjectPage-CjNXA3Nw.js} +3 -3
- package/web-app/dist/assets/{ProjectsPage-9foqEwG2.js → ProjectsPage-Bz2RXP8-.js} +1 -1
- package/web-app/dist/assets/{SettingsPage-CWOG_hhD.js → SettingsPage-BOPmXS7a.js} +1 -1
- package/web-app/dist/assets/{ShowcasePage-Du9LYlao.js → ShowcasePage-DD7bQm3F.js} +1 -1
- package/web-app/dist/assets/{SystemSettingsPage-BQconaDX.js → SystemSettingsPage-CT3PgCUq.js} +1 -1
- package/web-app/dist/assets/{TeamsPage-_NsqtVmC.js → TeamsPage-BavvjzSJ.js} +1 -1
- package/web-app/dist/assets/{TemplatesPage-DyTEGBpR.js → TemplatesPage-DEG8i3uW.js} +1 -1
- package/web-app/dist/assets/{TerminalOutput-XHOYTpky.js → TerminalOutput-CBYzxa0B.js} +1 -1
- package/web-app/dist/assets/{activity-B9KiMdEs.js → activity-DlboSvUU.js} +1 -1
- package/web-app/dist/assets/{bell-Oe4lG6kK.js → bell-CJeJkmKT.js} +1 -1
- package/web-app/dist/assets/{bot-D86Qmxfy.js → bot-uzIrJnZD.js} +1 -1
- package/web-app/dist/assets/{check-BvW6_ni0.js → check-Bewu2Iay.js} +1 -1
- package/web-app/dist/assets/{chevron-left-DYA62-3g.js → chevron-left-DEysJM-t.js} +1 -1
- package/web-app/dist/assets/{circle-alert-CHW8ye4p.js → circle-alert-CPLcNoq8.js} +1 -1
- package/web-app/dist/assets/{clock-QbQ2XfbM.js → clock-ByRncQBl.js} +1 -1
- package/web-app/dist/assets/{cloud-ylzrY7eL.js → cloud-DHYxCPZZ.js} +1 -1
- package/web-app/dist/assets/{code-xml-DdKKw2Y9.js → code-xml-BuzWGPzB.js} +1 -1
- package/web-app/dist/assets/{database-BLY_OWs3.js → database-BWEwDMiP.js} +1 -1
- package/web-app/dist/assets/{dollar-sign-CsFIa1e2.js → dollar-sign-CGmUPUwE.js} +1 -1
- package/web-app/dist/assets/{file-code-corner-Df4nyrCW.js → file-code-corner-CDBuJZyI.js} +1 -1
- package/web-app/dist/assets/{file-plus-_MWEY2WY.js → file-plus-CdZblpEV.js} +1 -1
- package/web-app/dist/assets/{globe-Dpc7QU9m.js → globe-Cowwu6Ai.js} +1 -1
- package/web-app/dist/assets/{hammer-B-PldT0c.js → hammer-DnLoK-ns.js} +1 -1
- package/web-app/dist/assets/{index-gq0R3j-o.js → index-D2lNcBZ2.js} +3 -3
- package/web-app/dist/assets/{layers-BjcNwHLZ.js → layers-Rx4mi5c5.js} +1 -1
- package/web-app/dist/assets/{loader-circle-CoTgcqkV.js → loader-circle-DvFfixiL.js} +1 -1
- package/web-app/dist/assets/{lock-JEI8O6TS.js → lock-BBme3oKq.js} +1 -1
- package/web-app/dist/assets/{package-CXWkNS40.js → package-CMetrH6c.js} +1 -1
- package/web-app/dist/assets/{plus-CRK4U5b0.js → plus-DVVns7YI.js} +1 -1
- package/web-app/dist/assets/{refresh-cw-CrzWr4cw.js → refresh-cw-BwxSxRvP.js} +1 -1
- package/web-app/dist/assets/{rotate-ccw-DV7UZyUw.js → rotate-ccw-B3bQkZTK.js} +1 -1
- package/web-app/dist/assets/{scroll-text-CXEqRrXU.js → scroll-text-YtUOGO66.js} +1 -1
- package/web-app/dist/assets/{server-CDFfFP10.js → server-CtsspPXY.js} +1 -1
- package/web-app/dist/assets/{shield-alert-B5EC_m6_.js → shield-alert-DPXb3JfQ.js} +1 -1
- package/web-app/dist/assets/{thumbs-up-BeLDemd2.js → thumbs-up-BLCEqoJv.js} +1 -1
- package/web-app/dist/assets/{trash-2-B7kS86-0.js → trash-2-DzG9BsOq.js} +1 -1
- package/web-app/dist/assets/{trending-down-BGvuLayo.js → trending-down-DbcPLKOe.js} +1 -1
- package/web-app/dist/assets/{trending-up-BkPM2tiK.js → trending-up-B2QEVmFq.js} +1 -1
- package/web-app/dist/assets/{upload-CXVI0GRU.js → upload-CzVHQcht.js} +1 -1
- package/web-app/dist/assets/{usePolling-CMGMVsMA.js → usePolling-ceGuFnBH.js} +1 -1
- package/web-app/dist/assets/{user-DPcXNtfj.js → user-qYglqMMb.js} +1 -1
- package/web-app/dist/index.html +1 -1
- package/autonomy/lib/engine10-legacy-notice.txt +0 -3
- package/packages/control-plane/ui/dist/assets/index-BinL6h3i.css +0 -1
- package/packages/control-plane/ui/dist/assets/index-D27veKDf.js +0 -152
|
@@ -0,0 +1,190 @@
|
|
|
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 m of d)if(m.type==="childList")for(const p of m.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&c(p)}).observe(document,{childList:!0,subtree:!0});function o(d){const m={};return d.integrity&&(m.integrity=d.integrity),d.referrerPolicy&&(m.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?m.credentials="include":d.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function c(d){if(d.ep)return;d.ep=!0;const m=o(d);fetch(d.href,m)}})();var Jo={exports:{}},Ki={};/**
|
|
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 u0;function Ix(){if(u0)return Ki;u0=1;var i=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(c,d,m){var p=null;if(m!==void 0&&(p=""+m),d.key!==void 0&&(p=""+d.key),"key"in d){m={};for(var g in d)g!=="key"&&(m[g]=d[g])}else m=d;return d=m.ref,{$$typeof:i,type:c,key:p,ref:d!==void 0?d:null,props:m}}return Ki.Fragment=r,Ki.jsx=o,Ki.jsxs=o,Ki}var r0;function Fx(){return r0||(r0=1,Jo.exports=Ix()),Jo.exports}var u=Fx(),Io={exports:{}},Ji={},Fo={exports:{}},Wo={};/**
|
|
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 c0;function Wx(){return c0||(c0=1,(function(i){function r(V,X){var it=V.length;V.push(X);t:for(;0<it;){var wt=it-1>>>1,Tt=V[wt];if(0<d(Tt,X))V[wt]=X,V[it]=Tt,it=wt;else break t}}function o(V){return V.length===0?null:V[0]}function c(V){if(V.length===0)return null;var X=V[0],it=V.pop();if(it!==X){V[0]=it;t:for(var wt=0,Tt=V.length,tl=Tt>>>1;wt<tl;){var Sl=2*(wt+1)-1,_n=V[Sl],S=Sl+1,k=V[S];if(0>d(_n,it))S<Tt&&0>d(k,_n)?(V[wt]=k,V[S]=it,wt=S):(V[wt]=_n,V[Sl]=it,wt=Sl);else if(S<Tt&&0>d(k,it))V[wt]=k,V[S]=it,wt=S;else break t}}return X}function d(V,X){var it=V.sortIndex-X.sortIndex;return it!==0?it:V.id-X.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;i.unstable_now=function(){return m.now()}}else{var p=Date,g=p.now();i.unstable_now=function(){return p.now()-g}}var b=[],y=[],R=1,v=null,A=3,B=!1,Q=!1,nt=!1,L=!1,$=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function H(V){for(var X=o(y);X!==null;){if(X.callback===null)c(y);else if(X.startTime<=V)c(y),X.sortIndex=X.expirationTime,r(b,X);else break;X=o(y)}}function Y(V){if(nt=!1,H(V),!Q)if(o(b)!==null)Q=!0,ot||(ot=!0,at());else{var X=o(y);X!==null&&Jt(Y,X.startTime-V)}}var ot=!1,P=-1,tt=5,qt=-1;function et(){return L?!0:!(i.unstable_now()-qt<tt)}function xt(){if(L=!1,ot){var V=i.unstable_now();qt=V;var X=!0;try{t:{Q=!1,nt&&(nt=!1,I(P),P=-1),B=!0;var it=A;try{e:{for(H(V),v=o(b);v!==null&&!(v.expirationTime>V&&et());){var wt=v.callback;if(typeof wt=="function"){v.callback=null,A=v.priorityLevel;var Tt=wt(v.expirationTime<=V);if(V=i.unstable_now(),typeof Tt=="function"){v.callback=Tt,H(V),X=!0;break e}v===o(b)&&c(b),H(V)}else c(b);v=o(b)}if(v!==null)X=!0;else{var tl=o(y);tl!==null&&Jt(Y,tl.startTime-V),X=!1}}break t}finally{v=null,A=it,B=!1}X=void 0}}finally{X?at():ot=!1}}}var at;if(typeof M=="function")at=function(){M(xt)};else if(typeof MessageChannel<"u"){var Qt=new MessageChannel,ee=Qt.port2;Qt.port1.onmessage=xt,at=function(){ee.postMessage(null)}}else at=function(){$(xt,0)};function Jt(V,X){P=$(function(){V(i.unstable_now())},X)}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"):tt=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 X=3;break;default:X=A}var it=A;A=X;try{return V()}finally{A=it}},i.unstable_requestPaint=function(){L=!0},i.unstable_runWithPriority=function(V,X){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var it=A;A=V;try{return X()}finally{A=it}},i.unstable_scheduleCallback=function(V,X,it){var wt=i.unstable_now();switch(typeof it=="object"&&it!==null?(it=it.delay,it=typeof it=="number"&&0<it?wt+it:wt):it=wt,V){case 1:var Tt=-1;break;case 2:Tt=250;break;case 5:Tt=1073741823;break;case 4:Tt=1e4;break;default:Tt=5e3}return Tt=it+Tt,V={id:R++,callback:X,priorityLevel:V,startTime:it,expirationTime:Tt,sortIndex:-1},it>wt?(V.sortIndex=it,r(y,V),o(b)===null&&V===o(y)&&(nt?(I(P),P=-1):nt=!0,Jt(Y,it-wt))):(V.sortIndex=Tt,r(b,V),Q||B||(Q=!0,ot||(ot=!0,at()))),V},i.unstable_shouldYield=et,i.unstable_wrapCallback=function(V){var X=A;return function(){var it=A;A=X;try{return V.apply(this,arguments)}finally{A=it}}}})(Wo)),Wo}var o0;function Px(){return o0||(o0=1,Fo.exports=Wx()),Fo.exports}var Po={exports:{}},ut={};/**
|
|
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 f0;function t1(){if(f0)return ut;f0=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"),m=Symbol.for("react.consumer"),p=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),A=Symbol.for("react.view_transition"),B=Symbol.iterator;function Q(S){return S===null||typeof S!="object"?null:(S=B&&S[B]||S["@@iterator"],typeof S=="function"?S:null)}var nt={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L=Object.assign,$={};function I(S,k,F){this.props=S,this.context=k,this.refs=$,this.updater=F||nt}I.prototype.isReactComponent={},I.prototype.setState=function(S,k){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,k,"setState")},I.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function M(){}M.prototype=I.prototype;function H(S,k,F){this.props=S,this.context=k,this.refs=$,this.updater=F||nt}var Y=H.prototype=new M;Y.constructor=H,L(Y,I.prototype),Y.isPureReactComponent=!0;var ot=Array.isArray;function P(){}var tt={H:null,A:null,T:null,S:null},qt=Object.prototype.hasOwnProperty;function et(S,k,F){var W=F.ref;return{$$typeof:i,type:S,key:k,ref:W!==void 0?W:null,props:F}}function xt(S,k){return et(S.type,k,S.props)}function at(S){return typeof S=="object"&&S!==null&&S.$$typeof===i}function Qt(S){var k={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(F){return k[F]})}var ee=/\/+/g;function Jt(S,k){return typeof S=="object"&&S!==null&&S.key!=null?Qt(""+S.key):k.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(P,P):(S.status="pending",S.then(function(k){S.status==="pending"&&(S.status="fulfilled",S.value=k)},function(k){S.status==="pending"&&(S.status="rejected",S.reason=k)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function X(S,k,F,W,vt){var bt=typeof S;(bt==="undefined"||bt==="boolean")&&(S=null);var St=!1;if(S===null)St=!0;else switch(bt){case"bigint":case"string":case"number":St=!0;break;case"object":switch(S.$$typeof){case i:case r:St=!0;break;case R:return St=S._init,X(St(S._payload),k,F,W,vt)}}if(St)return vt=vt(S),St=W===""?"."+Jt(S,0):W,ot(vt)?(F="",St!=null&&(F=St.replace(ee,"$&/")+"/"),X(vt,k,F,"",function(_l){return _l})):vt!=null&&(at(vt)&&(vt=xt(vt,F+(vt.key==null||S&&S.key===vt.key?"":(""+vt.key).replace(ee,"$&/")+"/")+St)),k.push(vt)),1;St=0;var K=W===""?".":W+":";if(ot(S))for(var st=0;st<S.length;st++)W=S[st],bt=K+Jt(W,st),St+=X(W,k,F,bt,vt);else if(st=Q(S),typeof st=="function")for(S=st.call(S),st=0;!(W=S.next()).done;)W=W.value,bt=K+Jt(W,st++),St+=X(W,k,F,bt,vt);else if(bt==="object"){if(typeof S.then=="function")return X(V(S),k,F,W,vt);throw k=String(S),Error("Objects are not valid as a React child (found: "+(k==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":k)+"). If you meant to render a collection of children, use an array instead.")}return St}function it(S,k,F){if(S==null)return S;var W=[],vt=0;return X(S,W,"","",function(bt){return k.call(F,bt,vt++)}),W}function wt(S){if(S._status===-1){var k=S._result,F=k();F.then(function(W){(S._status===0||S._status===-1)&&(S._status=1,S._result=W,F.status===void 0&&(F.status="fulfilled",F.value=W))},function(W){(S._status===0||S._status===-1)&&(S._status=2,S._result=W,F.status===void 0&&(F.status="rejected",F.reason=W))}),S._status===-1&&(S._status=0,S._result=F)}if(S._status===1)return S._result.default;throw S._result}var Tt=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var k=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(k))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)};function tl(S){var k=tt.T,F={};F.types=k!==null?k.types:null,tt.T=F;try{var W=S(),vt=tt.S;vt!==null&&vt(F,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(P,Tt)}catch(bt){Tt(bt)}finally{k!==null&&F.types!==null&&(k.types=F.types),tt.T=k}}function Sl(S){var k=tt.T;if(k!==null){var F=k.types;F===null?k.types=[S]:F.indexOf(S)===-1&&F.push(S)}else tl(Sl.bind(null,S))}var _n={map:it,forEach:function(S,k,F){it(S,function(){k.apply(this,arguments)},F)},count:function(S){var k=0;return it(S,function(){k++}),k},toArray:function(S){return it(S,function(k){return k})||[]},only:function(S){if(!at(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return ut.Activity=v,ut.Children=_n,ut.Component=I,ut.Fragment=o,ut.Profiler=d,ut.PureComponent=H,ut.StrictMode=c,ut.Suspense=b,ut.ViewTransition=A,ut.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=tt,ut.__COMPILER_RUNTIME={__proto__:null,c:function(S){return tt.H.useMemoCache(S)}},ut.addTransitionType=Sl,ut.cache=function(S){return function(){return S.apply(null,arguments)}},ut.cacheSignal=function(){return null},ut.cloneElement=function(S,k,F){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var W=L({},S.props),vt=S.key;if(k!=null)for(bt in k.key!==void 0&&(vt=""+k.key),k)!qt.call(k,bt)||bt==="key"||bt==="__self"||bt==="__source"||bt==="ref"&&k.ref===void 0||(W[bt]=k[bt]);var bt=arguments.length-2;if(bt===1)W.children=F;else if(1<bt){for(var St=Array(bt),K=0;K<bt;K++)St[K]=arguments[K+2];W.children=St}return et(S.type,vt,W)},ut.createContext=function(S){return S={$$typeof:p,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:m,_context:S},S},ut.createElement=function(S,k,F){var W,vt={},bt=null;if(k!=null)for(W in k.key!==void 0&&(bt=""+k.key),k)qt.call(k,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(vt[W]=k[W]);var St=arguments.length-2;if(St===1)vt.children=F;else if(1<St){for(var K=Array(St),st=0;st<St;st++)K[st]=arguments[st+2];vt.children=K}if(S&&S.defaultProps)for(W in St=S.defaultProps,St)vt[W]===void 0&&(vt[W]=St[W]);return et(S,bt,vt)},ut.createRef=function(){return{current:null}},ut.forwardRef=function(S){return{$$typeof:g,render:S}},ut.isValidElement=at,ut.lazy=function(S){return{$$typeof:R,_payload:{_status:-1,_result:S},_init:wt}},ut.memo=function(S,k){return{$$typeof:y,type:S,compare:k===void 0?null:k}},ut.startTransition=tl,ut.unstable_useCacheRefresh=function(){return tt.H.useCacheRefresh()},ut.use=function(S){return tt.H.use(S)},ut.useActionState=function(S,k,F){return tt.H.useActionState(S,k,F)},ut.useCallback=function(S,k){return tt.H.useCallback(S,k)},ut.useContext=function(S){return tt.H.useContext(S)},ut.useDebugValue=function(){},ut.useDeferredValue=function(S,k){return tt.H.useDeferredValue(S,k)},ut.useEffect=function(S,k){return tt.H.useEffect(S,k)},ut.useEffectEvent=function(S){return tt.H.useEffectEvent(S)},ut.useId=function(){return tt.H.useId()},ut.useImperativeHandle=function(S,k,F){return tt.H.useImperativeHandle(S,k,F)},ut.useInsertionEffect=function(S,k){return tt.H.useInsertionEffect(S,k)},ut.useLayoutEffect=function(S,k){return tt.H.useLayoutEffect(S,k)},ut.useMemo=function(S,k){return tt.H.useMemo(S,k)},ut.useOptimistic=function(S,k){return tt.H.useOptimistic(S,k)},ut.useReducer=function(S,k,F){return tt.H.useReducer(S,k,F)},ut.useRef=function(S){return tt.H.useRef(S)},ut.useState=function(S){return tt.H.useState(S)},ut.useSyncExternalStore=function(S,k,F){return tt.H.useSyncExternalStore(S,k,F)},ut.useTransition=function(){return tt.H.useTransition()},ut.version="19.3.0",ut}var d0;function _f(){return d0||(d0=1,Po.exports=t1()),Po.exports}var tf={exports:{}},he={};/**
|
|
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 h0;function e1(){if(h0)return he;h0=1;var i=_f();function r(R){var v="https://react.dev/errors/"+R;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var A=2;A<arguments.length;A++)v+="&args[]="+encodeURIComponent(arguments[A])}return"Minified React error #"+R+"; visit "+v+" 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"),m=Symbol.for("react.recoverable"),p=Symbol.for("react.optimistic_key");function g(R,v,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:v,implementation:A}}var b=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(R,v){if(R==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return he.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,he.browser=function(R){return{$$typeof:m,_reason:R}},he.createPortal=function(R,v){var A=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(r(299));return g(R,v,null,A)},he.flushSync=function(R){var v=b.T,A=c.p;try{if(b.T=null,c.p=2,R)return R()}finally{b.T=v,c.p=A,c.d.f()}},he.preconnect=function(R,v){typeof R=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,c.d.C(R,v))},he.prefetchDNS=function(R){typeof R=="string"&&c.d.D(R)},he.preinit=function(R,v){if(typeof R=="string"&&v&&typeof v.as=="string"){var A=v.as,B=y(A,v.crossOrigin),Q=typeof v.integrity=="string"?v.integrity:void 0,nt=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;A==="style"?c.d.S(R,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:B,integrity:Q,fetchPriority:nt}):A==="script"&&c.d.X(R,{crossOrigin:B,integrity:Q,fetchPriority:nt,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},he.preinitModule=function(R,v){if(typeof R=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var A=y(v.as,v.crossOrigin);c.d.M(R,{crossOrigin:A,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0})}}else v==null&&c.d.M(R)},he.preload=function(R,v){if(typeof R=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var A=v.as,B=y(A,v.crossOrigin);c.d.L(R,A,{crossOrigin:B,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},he.preloadModule=function(R,v){if(typeof R=="string")if(v){var A=y(v.as,v.crossOrigin);c.d.m(R,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:A,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0})}else c.d.m(R)},he.requestFormReset=function(R){c.d.r(R)},he.unstable_batchedUpdates=function(R,v){return R(v)},he.useFormState=function(R,v,A){return b.H.useFormState(R,v,A)},he.useFormStatus=function(){return b.H.useHostTransitionStatus()},he.version="19.3.0",he}var m0;function l1(){if(m0)return tf.exports;m0=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(),tf.exports=e1(),tf.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 p0;function n1(){if(p0)return Ji;p0=1;var i=Px(),r=_f(),o=l1();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 m(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(m(t)!==t)throw Error(c(188))}function y(t){var e=t.alternate;if(!e){if(e=m(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,h=a.child;h;){if(h===l){f=!0,l=a,n=s;break}if(h===n){f=!0,n=a,l=s;break}h=h.sibling}if(!f){for(h=s.child;h;){if(h===l){f=!0,l=s,n=a;break}if(h===n){f=!0,n=s,l=a;break}h=h.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 v(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)&&v(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 Q(t){var e=[null,null],l=A(t);return l===null||nt(e,t,l.child,{foundSelf:!1}),e}function nt(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)&&nt(t,e,l.child,n))return!0;l=l.sibling}return!1}function L(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,I=null;function M(t,e,l){return t===l?!0:t===e?($=t,!0):!1}function H(t,e,l){return t===l?(I=t,!1):t===e?(I!==null&&($=t),!0):!1}function Y(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 ot(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 P=Object.assign,tt=Symbol.for("react.element"),qt=Symbol.for("react.transitional.element"),et=Symbol.for("react.portal"),xt=Symbol.for("react.fragment"),at=Symbol.for("react.strict_mode"),Qt=Symbol.for("react.profiler"),ee=Symbol.for("react.consumer"),Jt=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),it=Symbol.for("react.suspense_list"),wt=Symbol.for("react.memo"),Tt=Symbol.for("react.lazy"),tl=Symbol.for("react.activity"),Sl=Symbol.for("react.legacy_hidden"),_n=Symbol.for("react.memo_cache_sentinel"),S=Symbol.for("react.view_transition"),k=Symbol.for("react.recoverable"),F=Symbol.iterator;function W(t){return t===null||typeof t!="object"?null:(t=F&&t[F]||t["@@iterator"],typeof t=="function"?t:null)}var vt=Symbol.for("react.client.reference");function bt(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 xt:return"Fragment";case Qt:return"Profiler";case at:return"StrictMode";case X:return"Suspense";case it:return"SuspenseList";case tl:return"Activity";case S:return"ViewTransition"}if(typeof t=="object")switch(t.$$typeof){case et:return"Portal";case Jt:return t.displayName||"Context";case ee: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 wt:return e=t.displayName||null,e!==null?e:bt(t.type)||"Memo";case Tt:e=t._payload,t=t._init;try{return bt(t(e))}catch{}}return null}var St=Array.isArray,K=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,st=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_l={pending:!1,data:null,method:null,action:null},hr=[],Pn=-1;function rl(t){return{current:t}}function se(t){0>Pn||(t.current=hr[Pn],hr[Pn]=null,Pn--)}function Mt(t,e){Pn++,hr[Pn]=t.current,t.current=e}var cl=rl(null),ti=rl(null),$l=rl(null),ds=rl(null);function hs(t,e){switch(Mt($l,e),Mt(ti,t),Mt(cl,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?gp(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=gp(e),t=yp(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}se(cl),Mt(cl,t)}function ta(){se(cl),se(ti),se($l)}function mr(t){var e=t.memoizedState;e!==null&&($a._currentValue=e.memoizedState,Mt(ds,t)),e=cl.current;var l=yp(e,t.type);e!==l&&(Mt(ti,t),Mt(cl,l))}function ms(t){ti.current===t&&(se(cl),se(ti)),ds.current===t&&(se(ds),$a._currentValue=_l)}var pr,Hf;function Yl(t){if(pr===void 0)try{throw Error()}catch(l){var e=l.stack.trim().match(/\n( *(at )?)/);pr=e&&e[1]||"",Hf=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+pr+t+Hf}var gr=!1;function yr(t,e){if(!t||gr)return"";gr=!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(q){var _=q}Reflect.construct(t,[],D)}else{try{D.call()}catch(q){_=q}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(q){_=q}(D=t())&&typeof D.catch=="function"&&D.catch(function(){})}}catch(q){if(q&&_&&typeof q.stack=="string")return[q.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],h=s[1];if(f&&h){var x=f.split(`
|
|
44
|
+
`),T=h.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{gr=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?Yl(l):""}function ty(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 yr(t.type,!1);case 11:return yr(t.type.render,!1);case 1:return yr(t.type,!0);case 31:return Yl("Activity");case 30:return Yl("ViewTransition");default:return""}}function Lf(t){try{var e="",l=null;do e+=ty(t,l),l=t,t=t.return;while(t);return e}catch(n){return`
|
|
47
|
+
Error generating stack: `+n.message+`
|
|
48
|
+
`+n.stack}}var vr=Object.prototype.hasOwnProperty,xr=i.unstable_scheduleCallback,br=i.unstable_cancelCallback,ey=i.unstable_shouldYield,ly=i.unstable_requestPaint,we=i.unstable_now,ny=i.unstable_getCurrentPriorityLevel,Bf=i.unstable_ImmediatePriority,qf=i.unstable_UserBlockingPriority,ps=i.unstable_NormalPriority,ay=i.unstable_LowPriority,$f=i.unstable_IdlePriority,iy=i.log,sy=i.unstable_setDisableYieldValue,ei=null,De=null;function Vl(t){if(typeof iy=="function"&&sy(t),De&&typeof De.setStrictMode=="function")try{De.setStrictMode(ei,t)}catch{}}var Me=Math.clz32?Math.clz32:cy,uy=Math.log,ry=Math.LN2;function cy(t){return t>>>=0,t===0?32:31-(uy(t)/ry|0)|0}var gs=256,ys=262144,vs=4194304;function En(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 xs(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 h=n&134217727;return h!==0?(n=h&~s,n!==0?a=En(n):(f&=h,f!==0?a=En(f):l||(l=h&~t,l!==0&&(a=En(l))))):(h=n&~s,h!==0?a=En(h):f!==0?a=En(f):l||(l=n&~t,l!==0&&(a=En(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 li(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Yf(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-Me(l),a=1<<n;e|=t[n],l&=~a}return e}function oy(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 Vf(){var t=vs;return vs<<=1,(vs&62914560)===0&&(vs=4194304),t}function jr(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function ni(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function fy(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 h=t.entanglements,x=t.expirationTimes,T=t.hiddenUpdates;for(l=f&~l;0<l;){var C=31-Me(l),D=1<<C;h[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&&Gf(t,n,0),s!==0&&a===0&&t.tag!==0&&(t.suspendedLanes|=s&~(f&~e))}function Gf(t,e,l){t.pendingLanes|=e,t.suspendedLanes&=~e;var n=31-Me(e);t.entangledLanes|=e,t.entanglements[n]=t.entanglements[n]|1073741824|l&261930}function Qf(t,e){var l=t.entangledLanes|=e;for(t=t.entanglements;l;){var n=31-Me(l),a=1<<n;a&e|t[n]&e&&(t[n]|=e),l&=~a}}function Xf(t,e){var l=e&-e;return l=(l&42)!==0?1:Sr(l),(l&(t.suspendedLanes|e))!==0?0:l}function Sr(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 _r(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Zf(){var t=st.p;return t!==0?t:(t=window.event,t===void 0?32:t0(t.type))}function Kf(t,e){var l=st.p;try{return st.p=t,e()}finally{st.p=l}}var El=Math.random().toString(36).slice(2),ue="__reactFiber$"+El,Ee="__reactProps$"+El,ea="__reactContainer$"+El,Jf="__reactEvents$"+El,dy="__reactListeners$"+El,hy="__reactHandles$"+El,If="__reactResources$"+El,ai="__reactMarker$"+El,bs="__reactLoad$"+El;function js(t){delete t[ue],delete t[Ee],delete t[dy],delete t[hy]}function Tn(t){var e;if(e=t[ue])return e;for(var l=t.parentNode;l;){if(e=l[ea]||l[ue]){if(l=e.alternate,e.child!==null||l!==null&&l.child!==null)for(t=Mp(t);t!==null;){if(l=t[ue])return l;t=Mp(t)}return e}t=l,l=t.parentNode}return null}function la(t){if(t=t[ue]||t[ea]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function ii(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(c(33))}function na(t){var e=t[If];return e||(e=t[If]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function le(t){t[ai]=!0}function Ff(t){t[bs]=void 0}var Wf=new Set,Pf={};function Nn(t,e){aa(t,e),aa(t+"Capture",e)}function aa(t,e){for(Pf[t]=e,t=0;t<e.length;t++)Wf.add(e[t])}var my=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]*$"),td={},ed={};function py(t){return vr.call(ed,t)?!0:vr.call(td,t)?!1:my.test(t)?ed[t]=!0:(td[t]=!0,!1)}var jt=!1;function ld(){var t=jt;return jt=!1,t}function Ss(t,e,l){if(py(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 _s(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 nd(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function gy(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 Er(t){if(!t._valueTracker){var e=nd(t)?"checked":"value";t._valueTracker=gy(t,e,""+t[e])}}function ad(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var l=e.getValue(),n="";return t&&(n=nd(t)?t.checked?"true":"false":t.value),t=n,t!==l?(e.setValue(t),!0):!1}var yy=/[\n"\\]/g;function Ve(t){return t.replace(yy,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Tr(t,e,l,n,a,s,f,h){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?Nr(t,Ue(t.value)):Nr(t,Ue(e)):l!=null?Nr(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"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?t.name=""+Ue(h):t.removeAttribute("name")}function id(t,e,l,n,a,s,f,h){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)){Er(t);return}l=l!=null?""+Ue(l):"",e=e!=null?""+Ue(e):l,h||e===t.value||(t.value=e),t.defaultValue=e}n=n??a,n=typeof n!="function"&&typeof n!="symbol"&&!!n,t.checked=h?t.checked:!!n,t.defaultChecked=!!n,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(t.name=f),Er(t)}function Nr(t,e){t.defaultValue!==""+e&&(t.defaultValue=""+e)}function ia(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 sd(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 ud(t,e,l,n){if(e==null){if(n!=null){if(l!=null)throw Error(c(92));if(St(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),Er(t)}function sa(t,e){if(e){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=e;return}}t.textContent=e}var vy=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 rd(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||vy.has(e)?e==="float"?t.cssFloat=l:t[e]=(""+l).trim():t[e]=l+"px"}function cd(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]="",jt=!0);for(var a in e)n=e[a],e.hasOwnProperty(a)&&l[a]!==n&&(rd(t,a,n),jt=!0)}else for(var s in e)e.hasOwnProperty(s)&&rd(t,s,e[s])}function Rr(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 xy=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"]]),by=/^[\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 Es(t){return by.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function ol(){}var zr=null;function Or(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ua=null,ra=null;function od(t){var e=la(t);if(e&&(t=e.stateNode)){var l=t[Ee]||null;t:switch(t=e.stateNode,e.type){case"input":if(Tr(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="'+Ve(""+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));Tr(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&&ad(n)}break t;case"textarea":sd(t,l.value,l.defaultValue);break t;case"select":e=l.value,e!=null&&ia(t,!!l.multiple,e,!1)}}}var Cr=!1;function fd(t,e,l){if(Cr)return t(e,l);Cr=!0;try{var n=t(e);return n}finally{if(Cr=!1,(ua!==null||ra!==null)&&(Eu(),ua&&(e=ua,t=ra,ra=ua=null,od(e),t)))for(e=0;e<t.length;e++)od(t[e])}}function si(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"),Ar=!1;if(Nl)try{var ui={};Object.defineProperty(ui,"passive",{get:function(){Ar=!0}}),window.addEventListener("test",ui,ui),window.removeEventListener("test",ui,ui)}catch{Ar=!1}var Gl=null,wr=null,Ts=null;function dd(){if(Ts)return Ts;var t,e=wr,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 Ts=a.slice(t,1<n?1-n:void 0)}function Ns(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 Rs(){return!0}function hd(){return!1}function ve(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 h in t)t.hasOwnProperty(h)&&(l=t[h],this[h]=l?l(s):s[h]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Rs:hd,this.isPropagationStopped=hd,this}return P(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=Rs)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Rs)},persist:function(){},isPersistent:Rs}),e}var Ql={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zs=ve(Ql),ri=P({},Ql,{view:0,detail:0}),jy=ve(ri),Dr,Mr,ci,Os=P({},ri,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kr,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!==ci&&(ci&&t.type==="mousemove"?(Dr=t.screenX-ci.screenX,Mr=t.screenY-ci.screenY):Mr=Dr=0,ci=t),Dr)},movementY:function(t){return"movementY"in t?t.movementY:Mr}}),md=ve(Os),Sy=P({},Os,{dataTransfer:0}),_y=ve(Sy),Ey=P({},ri,{relatedTarget:0}),Ur=ve(Ey),Ty=P({},Ql,{animationName:0,elapsedTime:0,pseudoElement:0}),Ny=ve(Ty),Ry=P({},Ql,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),zy=ve(Ry),Oy=P({},Ql,{data:0}),pd=ve(Oy),Cy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ay={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"},wy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dy(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=wy[t])?!!e[t]:!1}function kr(){return Dy}var My=P({},ri,{key:function(t){if(t.key){var e=Cy[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Ns(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Ay[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kr,charCode:function(t){return t.type==="keypress"?Ns(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Ns(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Uy=ve(My),ky=P({},Os,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gd=ve(ky),Hy=P({},Ql,{submitter:0}),Ly=ve(Hy),By=P({},ri,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kr}),qy=ve(By),$y=P({},Ql,{propertyName:0,elapsedTime:0,pseudoElement:0}),Yy=ve($y),Vy=P({},Os,{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}),Gy=ve(Vy),Qy=P({},Ql,{newState:0,oldState:0,source:0}),Xy=ve(Qy),Zy=[9,13,27,32],Hr=Nl&&"CompositionEvent"in window,oi=null;Nl&&"documentMode"in document&&(oi=document.documentMode);var Ky=Nl&&"TextEvent"in window&&!oi,yd=Nl&&(!Hr||oi&&8<oi&&11>=oi),vd=" ",xd=!1;function bd(t,e){switch(t){case"keyup":return Zy.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jd(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ca=!1;function Jy(t,e){switch(t){case"compositionend":return jd(e);case"keypress":return e.which!==32?null:(xd=!0,vd);case"textInput":return t=e.data,t===vd&&xd?null:t;default:return null}}function Iy(t,e){if(ca)return t==="compositionend"||!Hr&&bd(t,e)?(t=dd(),Ts=wr=Gl=null,ca=!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 yd&&e.locale!=="ko"?null:e.data;default:return null}}var Fy={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 Sd(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Fy[t.type]:e==="textarea"}function _d(t,e,l,n){ua?ra?ra.push(n):ra=[n]:ua=n,e=Cu(e,"onChange"),0<e.length&&(l=new zs("onChange","change",null,l,n),t.push({event:l,listeners:e}))}var fi=null,di=null;function Wy(t){op(t,0)}function Cs(t){var e=ii(t);if(ad(e))return t}function Ed(t,e){if(t==="change")return e}var Td=!1;if(Nl){var Lr;if(Nl){var Br="oninput"in document;if(!Br){var Nd=document.createElement("div");Nd.setAttribute("oninput","return;"),Br=typeof Nd.oninput=="function"}Lr=Br}else Lr=!1;Td=Lr&&(!document.documentMode||9<document.documentMode)}function Rd(){fi&&(fi.detachEvent("onpropertychange",zd),di=fi=null)}function zd(t){if(t.propertyName==="value"&&Cs(di)){var e=[];_d(e,di,t,Or(t)),fd(Wy,e)}}function Py(t,e,l){t==="focusin"?(Rd(),fi=e,di=l,fi.attachEvent("onpropertychange",zd)):t==="focusout"&&Rd()}function tv(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Cs(di)}function ev(t,e){if(t==="click")return Cs(e)}function lv(t,e){if(t==="input"||t==="change")return Cs(e)}function nv(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ke=typeof Object.is=="function"?Object.is:nv;function hi(t,e){if(ke(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(!vr.call(e,a)||!ke(t[a],e[a]))return!1}return!0}function qr(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 Od(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Cd(t,e){var l=Od(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=Od(l)}}function Ad(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Ad(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function wd(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=qr(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=qr(t.document)}return e}function $r(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 av=Nl&&"documentMode"in document&&11>=document.documentMode,oa=null,Yr=null,mi=null,Vr=!1;function Dd(t,e,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Vr||oa==null||oa!==qr(n)||(n=oa,"selectionStart"in n&&$r(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}),mi&&hi(mi,n)||(mi=n,n=Cu(Yr,"onSelect"),0<n.length&&(e=new zs("onSelect","select",null,e,l),t.push({event:e,listeners:n}),e.target=oa)))}function Rn(t,e){var l={};return l[t.toLowerCase()]=e.toLowerCase(),l["Webkit"+t]="webkit"+e,l["Moz"+t]="moz"+e,l}var fa={animationend:Rn("Animation","AnimationEnd"),animationiteration:Rn("Animation","AnimationIteration"),animationstart:Rn("Animation","AnimationStart"),transitionrun:Rn("Transition","TransitionRun"),transitionstart:Rn("Transition","TransitionStart"),transitioncancel:Rn("Transition","TransitionCancel"),transitionend:Rn("Transition","TransitionEnd")},Gr={},Md={};Nl&&(Md=document.createElement("div").style,"AnimationEvent"in window||(delete fa.animationend.animation,delete fa.animationiteration.animation,delete fa.animationstart.animation),"TransitionEvent"in window||delete fa.transitionend.transition);function zn(t){if(Gr[t])return Gr[t];if(!fa[t])return t;var e=fa[t],l;for(l in e)if(e.hasOwnProperty(l)&&l in Md)return Gr[t]=e[l];return t}var Ud=zn("animationend"),kd=zn("animationiteration"),Hd=zn("animationstart"),iv=zn("transitionrun"),sv=zn("transitionstart"),uv=zn("transitioncancel"),Ld=zn("transitionend"),Bd=new Map,Qr="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(" ");Qr.push("scrollEnd");function el(t,e){Bd.set(t,e),Nn(e,[t])}var rv=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=rv++;return t="_"+t+"t_"+l.toString(32)+"_",e.autoName=t}function qd(t){if(t==null||typeof t=="string")return t;var e=null,l=Aa;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=qd(t),e=qd(e),e==null?t==="auto"?null:t:e==="auto"?null:e}var As=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)},Ge=[],da=0,Xr=0;function ws(){for(var t=da,e=Xr=da=0;e<t;){var l=Ge[e];Ge[e++]=null;var n=Ge[e];Ge[e++]=null;var a=Ge[e];Ge[e++]=null;var s=Ge[e];if(Ge[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&&$d(l,a,s)}}function Ds(t,e,l,n){Ge[da++]=t,Ge[da++]=e,Ge[da++]=l,Ge[da++]=n,Xr|=n,t.lanes|=n,t=t.alternate,t!==null&&(t.lanes|=n)}function Zr(t,e,l,n){return Ds(t,e,l,n),Ms(t)}function On(t,e){return Ds(t,null,null,e),Ms(t)}function $d(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-Me(l),t=s.hiddenUpdates,n=t[a],n===null?t[a]=[e]:n.push(e),e.lane=l|536870912),s):null}function Ms(t){if(50<ki)throw ki=0,_u=null,Error(c(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var ha={};function cv(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 cv(t,e,l,n)}function Kr(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 Yd(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 Us(t,e,l,n,a,s){var f=0;if(n=t,typeof n=="function")Kr(n)&&(f=1);else if(typeof n=="string")f=Hx(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 xt:return Cn(l.children,a,s,e);case at:f=8,a|=24;break;case Qt:return t=Te(12,l,e,a|2),t.elementType=Qt,t.lanes=s,t;case X:return t=Te(13,l,e,a),t.elementType=X,t.lanes=s,t;case it:return t=Te(19,l,e,a),t.elementType=it,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 Jt:f=10;break t;case ee:f=9;break t;case V:f=11;break t;case wt:f=14;break t;case Tt: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 Cn(t,e,l,n){return t=Te(7,t,n,e),t.lanes=l,t}function Jr(t,e,l){return t=Te(6,t,null,e),t.lanes=l,t}function Vd(t){var e=Te(18,null,null,0);return e.stateNode=t,e}function Ir(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 Gd=new WeakMap;function Qe(t,e){if(typeof t=="object"&&t!==null){var l=Gd.get(t);return l!==void 0?l:(e={value:t,source:e,stack:Lf(e)},Gd.set(t,e),e)}return{value:t,source:e,stack:Lf(e)}}var ma=[],pa=0,ks=null,pi=0,Xe=[],Ze=0,Xl=null,fl=1,dl="";function Cl(t,e){ma[pa++]=pi,ma[pa++]=ks,ks=t,pi=e}function Qd(t,e,l){Xe[Ze++]=fl,Xe[Ze++]=dl,Xe[Ze++]=Xl,Xl=t;var n=fl;t=dl;var a=32-Me(n)-1;n&=~(1<<a),l+=1;var s=32-Me(e)+a;if(30<s){var f=a-a%5;s=(n&(1<<f)-1).toString(32),n>>=f,a-=f,fl=1<<32-Me(e)+a|l<<a|n,dl=s+t}else fl=1<<s|l<<a|n,dl=t}function Hs(t){t.return!==null&&(Cl(t,1),Qd(t,1,0))}function Fr(t){for(;t===ks;)ks=ma[--pa],ma[pa]=null,pi=ma[--pa],ma[pa]=null;for(;t===Xl;)Xl=Xe[--Ze],Xe[Ze]=null,dl=Xe[--Ze],Xe[Ze]=null,fl=Xe[--Ze],Xe[Ze]=null}function Xd(t,e){Xe[Ze++]=fl,Xe[Ze++]=dl,Xe[Ze++]=Xl,fl=e.id,dl=e.overflow,Xl=t}var ne=null,Ut=null,ft=!1,Zl=null,Ke=!1,Wr=Error(c(519));function Kl(t){var e=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw gi(Qe(e,t)),Wr}function Zd(t){var e=t.stateNode,l=t.type,n=t.memoizedProps;switch(e[ue]=t,e[Ee]=n,l){case"dialog":ht("cancel",e),ht("close",e);break;case"iframe":case"object":case"embed":ht("load",e);break;case"video":case"audio":for(l=0;l<Li.length;l++)ht(Li[l],e);break;case"source":ht("error",e);break;case"img":case"image":case"link":ht("error",e),ht("load",e);break;case"details":ht("toggle",e);break;case"input":ht("invalid",e),id(e,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":ht("invalid",e);break;case"textarea":ht("invalid",e),ud(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||mp(e.textContent,l)?(n.popover!=null&&(ht("beforetoggle",e),ht("toggle",e)),n.onScroll!=null&&ht("scroll",e),n.onScrollEnd!=null&&ht("scrollend",e),n.onClick!=null&&(e.onclick=ol),e=!0):e=!1,e||Kl(t,!0)}function Ls(t){for(ne=t.return;ne;)switch(ne.tag){case 5:case 31:case 13:Ke=!1;return;case 27:case 3:Ke=!0;return;default:ne=ne.return}}function ga(t){if(t!==ne)return!1;if(!ft)return Ls(t),ft=!0,!1;var e=t.tag,l;if((l=e!==3&&e!==27)&&((l=e===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||Oo(t.type,t.memoizedProps)),l=!l),l&&Ut&&Kl(t),Ls(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(c(317));Ut=Dp(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(c(317));Ut=Dp(t)}else e===27?(e=Ut,fn(t.type)?(t=Lo,Lo=null,Ut=t):Ut=e):Ut=ne?Ie(t.stateNode.nextSibling):null;return!0}function An(){Ut=ne=null,ft=!1}function Pr(){var t=Zl;return t!==null&&(ze===null?ze=t:ze.push.apply(ze,t),Zl=null),t}function gi(t){Zl===null?Zl=[t]:Zl.push(t)}var tc=rl(null),wn=null,Al=null;function Jl(t,e,l){Mt(tc,e._currentValue),e._currentValue=l}function wl(t){t._currentValue=tc.current,se(tc)}function Bs(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 ec(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 h=s;s=a;for(var x=0;x<e.length;x++)if(h.context===e[x]){s.lanes|=l,h=s.alternate,h!==null&&(h.lanes|=l),Bs(s.return,l,t),n||(f=null);break t}s=h.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),Bs(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),Bs(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 Dn(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 h=a.type;ke(a.pendingProps.value,f.value)||(t!==null?t.push(h):t=[h])}}else if(a===ds.current){if(f=a.alternate,f===null)throw Error(c(387));f.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(t!==null?t.push($a):t=[$a])}a=a.return}return t!==null&&ec(e,t,l,n),e.flags|=262144,t!==null}function qs(t){for(t=t.firstContext;t!==null;){if(!ke(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Mn(t){wn=t,Al=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function re(t){return Kd(wn,t)}function $s(t,e){return wn===null&&Mn(t),Kd(t,e)}function Kd(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 ov=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()})}},fv=i.unstable_scheduleCallback,dv=i.unstable_NormalPriority,It={$$typeof:Jt,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function lc(){return{controller:new ov,data:new Map,refCount:0}}function yi(t){t.refCount--,t.refCount===0&&fv(dv,function(){t.controller.abort()})}function Jd(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 vi=null;function hv(t){var e=t.transitionTypes;return t.transitionTypes=null,e}var xi=null,nc=0,Un=0,ya=null;function mv(t,e){if(xi===null){var l=xi=[];nc=0,Un=bo(),ya={status:"pending",value:void 0,then:function(n){l.push(n)}}}return nc++,e.then(Id,Id),e}function Id(){if(--nc===0&&(vi=null,xi!==null)){ya!==null&&(ya.status="fulfilled");var t=xi;xi=null,Un=0,ya=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function pv(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 Fd=K.S;K.S=function(t,e){if(Vm=we(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&mv(t,e),vi!==null)for(var l=Ua;l!==null;)Jd(l,vi),l=l.next;if(l=t.types,l!==null){for(var n=Ua;n!==null;)Jd(n,l),n=n.next;if(Un!==0){n=vi,n===null&&(n=vi=[]);for(var a=0;a<l.length;a++){var s=l[a];n.indexOf(s)===-1&&n.push(s)}}}Fd!==null&&Fd(t,e)};var kn=rl(null);function ac(){var t=kn.current;return t!==null?t:Dt.pooledCache}function Ys(t,e){e===null?Mt(kn,kn.current):Mt(kn,e.pool)}function Wd(){var t=ac();return t===null?null:{parent:It._currentValue,pool:t}}var va=Error(c(460)),ic=Error(c(474)),Vs=Error(c(542)),Gs={then:function(){}};function Pd(t){return t=t.status,t==="fulfilled"||t==="rejected"}function th(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,lh(t),t===void 0&&!("reason"in e)?Error(c(600)):t;default:if(typeof e.status=="string")e.then(ol,ol);else{if(t=Dt,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,lh(t),t}throw Ln=e,va}}function Hn(t){try{var e=t._init;return e(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ln=l,va):l}}var Ln=null;function eh(){if(Ln===null)throw Error(c(459));var t=Ln;return Ln=null,t}function lh(t){if(t===va||t===Vs)throw Error(c(483))}var xa=null,bi=0;function Qs(t){var e=bi;return bi+=1,xa===null&&(xa=[]),th(xa,t,e)}function Il(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function Xs(t,e){throw e.$$typeof===tt?Error(c(525)):(t=Object.prototype.toString.call(e),Error(c(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function nh(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 h(E,j,z,w){return j===null||j.tag!==6?(j=Jr(z,E.mode,w),j.return=E,j):(j=a(j,z),j.return=E,j)}function x(E,j,z,w){var G=z.type;return G===xt?(E=C(E,j,z.props.children,w,z.key),Il(E,z),E):j!==null&&(j.elementType===G||typeof G=="object"&&G!==null&&G.$$typeof===Tt&&Hn(G)===j.type)?(j=a(j,z.props),Il(j,z),j.return=E,j):(j=Us(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=Ir(z,E.mode,w),j.return=E,j):(j=a(j,z.children||[]),j.return=E,j)}function C(E,j,z,w,G){return j===null||j.tag!==7?(j=Cn(z,E.mode,w,G),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=Jr(""+j,E.mode,z),j.return=E,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case qt:return z=Us(j.type,j.key,j.props,null,E.mode,z),Il(z,j),z.return=E,z;case et:return j=Ir(j,E.mode,z),j.return=E,j;case Tt:return j=Hn(j),D(E,j,z)}if(St(j)||W(j))return j=Cn(j,E.mode,z,null),j.return=E,j;if(typeof j.then=="function")return D(E,Qs(j),z);if(j.$$typeof===Jt)return D(E,$s(E,j),z);Xs(E,j)}return null}function _(E,j,z,w){var G=j!==null?j.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return G!==null?null:h(E,j,""+z,w);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case qt:return z.key===G?x(E,j,z,w):null;case et:return z.key===G?T(E,j,z,w):null;case Tt:return z=Hn(z),_(E,j,z,w)}if(St(z)||W(z))return G!==null?null:C(E,j,z,w,null);if(typeof z.then=="function")return _(E,j,Qs(z),w);if(z.$$typeof===Jt)return _(E,j,$s(E,z),w);Xs(E,z)}return null}function O(E,j,z,w,G){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return E=E.get(z)||null,h(j,E,""+w,G);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case qt:return E=E.get(w.key===null?z:w.key)||null,x(j,E,w,G);case et:return E=E.get(w.key===null?z:w.key)||null,T(j,E,w,G);case Tt:return w=Hn(w),O(E,j,z,w,G)}if(St(w)||W(w))return E=E.get(z)||null,C(j,E,w,G,null);if(typeof w.then=="function")return O(E,j,z,Qs(w),G);if(w.$$typeof===Jt)return O(E,j,z,$s(j,w),G);Xs(j,w)}return null}function q(E,j,z,w){for(var G=null,pt=null,J=j,lt=j=0,Pt=null;J!==null&<<z.length;lt++){J.index>lt?(Pt=J,J=null):Pt=J.sibling;var yt=_(E,J,z[lt],w);if(yt===null){J===null&&(J=Pt);break}t&&J&&yt.alternate===null&&e(E,J),j=s(yt,j,lt),pt===null?G=yt:pt.sibling=yt,pt=yt,J=Pt}if(lt===z.length)return l(E,J),ft&&Cl(E,lt),G;if(J===null){for(;lt<z.length;lt++)J=D(E,z[lt],w),J!==null&&(j=s(J,j,lt),pt===null?G=J:pt.sibling=J,pt=J);return ft&&Cl(E,lt),G}for(J=n(J);lt<z.length;lt++)Pt=O(J,E,lt,z[lt],w),Pt!==null&&(t&&(yt=Pt.alternate,yt!==null&&J.delete(yt.key===null?lt:yt.key)),j=s(Pt,j,lt),pt===null?G=Pt:pt.sibling=Pt,pt=Pt);return t&&J.forEach(function(gn){return e(E,gn)}),ft&&Cl(E,lt),G}function Z(E,j,z,w){if(z==null)throw Error(c(151));for(var G=null,pt=null,J=j,lt=j=0,Pt=null,yt=z.next();J!==null&&!yt.done;lt++,yt=z.next()){J.index>lt?(Pt=J,J=null):Pt=J.sibling;var gn=_(E,J,yt.value,w);if(gn===null){J===null&&(J=Pt);break}t&&J&&gn.alternate===null&&e(E,J),j=s(gn,j,lt),pt===null?G=gn:pt.sibling=gn,pt=gn,J=Pt}if(yt.done)return l(E,J),ft&&Cl(E,lt),G;if(J===null){for(;!yt.done;lt++,yt=z.next())yt=D(E,yt.value,w),yt!==null&&(j=s(yt,j,lt),pt===null?G=yt:pt.sibling=yt,pt=yt);return ft&&Cl(E,lt),G}for(J=n(J);!yt.done;lt++,yt=z.next())yt=O(J,E,lt,yt.value,w),yt!==null&&(t&&(Pt=yt.alternate,Pt!==null&&J.delete(Pt.key===null?lt:Pt.key)),j=s(yt,j,lt),pt===null?G=yt:pt.sibling=yt,pt=yt);return t&&J.forEach(function(Jx){return e(E,Jx)}),ft&&Cl(E,lt),G}function ct(E,j,z,w){if(typeof z=="object"&&z!==null&&z.type===xt&&z.key===null&&z.props.ref===void 0&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case qt:t:{for(var G=z.key;j!==null;){if(j.key===G){if(G=z.type,G===xt){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===G||typeof G=="object"&&G!==null&&G.$$typeof===Tt&&Hn(G)===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===xt?(w=Cn(z.props.children,E.mode,w,z.key),Il(w,z),w.return=E,E=w):(w=Us(z.type,z.key,z.props,null,E.mode,w),Il(w,z),w.return=E,E=w)}return f(E);case et:t:{for(G=z.key;j!==null;){if(j.key===G)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=Ir(z,E.mode,w),w.return=E,E=w}return f(E);case Tt:return z=Hn(z),ct(E,j,z,w)}if(St(z))return q(E,j,z,w);if(W(z)){if(G=W(z),typeof G!="function")throw Error(c(150));return z=G.call(z),Z(E,j,z,w)}if(typeof z.then=="function")return ct(E,j,Qs(z),w);if(z.$$typeof===Jt)return ct(E,j,$s(E,z),w);Xs(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=Jr(z,E.mode,w),w.return=E,E=w),f(E)):l(E,j)}return function(E,j,z,w){try{bi=0;var G=ct(E,j,z,w);return xa=null,G}catch(J){if(J===va||J===Vs)throw J;var pt=Te(29,J,null,E.mode);return pt.lanes=w,pt.return=E,pt}finally{}}}var Bn=nh(!0),ah=nh(!1),Fl=!1;function sc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function uc(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,(_t&2)!==0){var a=n.pending;return a===null?e.next=e:(e.next=a.next,a.next=e),n.pending=e,e=Ms(t),$d(t,null,l),e}return Ds(t,n,e,l),Ms(t)}function ji(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,Qf(t,l)}}function rc(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 cc=!1;function Si(){if(cc){var t=ya;if(t!==null)throw t}}function _i(t,e,l,n){cc=!1;var a=t.updateQueue;Fl=!1;var s=a.firstBaseUpdate,f=a.lastBaseUpdate,h=a.shared.pending;if(h!==null){a.shared.pending=null;var x=h,T=x.next;x.next=null,f===null?s=T:f.next=T,f=x;var C=t.alternate;C!==null&&(C=C.updateQueue,h=C.lastBaseUpdate,h!==f&&(h===null?C.firstBaseUpdate=T:h.next=T,C.lastBaseUpdate=x))}if(s!==null){var D=a.baseState;f=0,C=T=x=null,h=s;do{var _=h.lane&-536870913,O=_!==h.lane;if(O?(mt&_)===_:(n&_)===_){_!==0&&_===Un&&(cc=!0),C!==null&&(C=C.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});t:{var q=t,Z=h;_=e;var ct=l;switch(Z.tag){case 1:if(q=Z.payload,typeof q=="function"){D=q.call(ct,D,_);break t}D=q;break t;case 3:q.flags=q.flags&-65537|128;case 0:if(q=Z.payload,_=typeof q=="function"?q.call(ct,D,_):q,_==null)break t;D=P({},D,_);break t;case 2:Fl=!0}}_=h.callback,_!==null&&(t.flags|=64,O&&(t.flags|=8192),O=a.callbacks,O===null?a.callbacks=[_]:O.push(_))}else O={lane:_,tag:h.tag,payload:h.payload,callback:h.callback,next:null},C===null?(T=C=O,x=D):C=C.next=O,f|=_;if(h=h.next,h===null){if(h=a.shared.pending,h===null)break;O=h,h=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 ih(t,e){if(typeof t!="function")throw Error(c(191,t));t.call(e)}function sh(t,e){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)ih(l[t],e)}var tn=rl(null),Zs=rl(0);function uh(t,e){t=Hl,Mt(Zs,t),Mt(tn,e),Hl=t|e.baseLanes}function oc(){Mt(Zs,Hl),Mt(tn,tn.current)}function fc(){Hl=Zs.current,se(tn),se(Zs)}var ce=rl(null),ye=null;function en(t){var e=t.alternate;Mt(oe,oe.current&1),Mt(ce,t),ye===null&&(e===null||tn.current!==null||e.memoizedState!==null)&&(ye=t)}function dc(t){Mt(oe,oe.current),Mt(ce,t),ye===null&&(ye=t)}function rh(t){t.tag===22?(Mt(oe,oe.current),Mt(ce,t),ye===null&&(ye=t)):ln()}function ln(){Mt(oe,oe.current),Mt(ce,ce.current)}function He(t){se(ce),ye===t&&(ye=null),se(oe)}var oe=rl(0);function Ei(t,e){Mt(ce,ce.current),Mt(oe,e)}function hc(t){se(oe),se(ce),ye===t&&(ye=null)}function Ks(t){for(var e=t;e!==null;){if(e.tag===13){var l=e.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||ko(l)||Ho(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,rt=null,At=null,Ft=null,Js=!1,ba=!1,qn=!1,Is=0,Ti=0,ja=null,gv=0;function Xt(){throw Error(c(321))}function mc(t,e){if(e===null)return!1;for(var l=0;l<e.length&&l<t.length;l++)if(!ke(t[l],e[l]))return!1;return!0}function pc(t,e,l,n,a,s){return Dl=s,rt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,K.H=t===null||t.memoizedState===null?Qh:Xh,qn=!1,s=l(n,a),qn=!1,ba&&(s=oh(e,l,n,a)),ch(t),s}function ch(t){K.H=nu;var e=At!==null&&At.next!==null;if(Dl=0,Ft=At=rt=null,Js=!1,Ti=0,ja=null,e)throw Error(c(300));t===null||Wt||(t=t.dependencies,t!==null&&qs(t)&&(Wt=!0))}function oh(t,e,l,n){rt=t;var a=0;do{if(ba&&(ja=null),Ti=0,ba=!1,25<=a)throw Error(c(301));if(a+=1,Ft=At=null,t.updateQueue!=null){var s=t.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}K.H=Ev,s=e(l,n)}while(ba);return s}function yv(){var t=K.H,e=t.useState()[0];return e=typeof e.then=="function"?Ni(e):e,t=t.useState()[0],(At!==null?At.memoizedState:null)!==t&&(rt.flags|=1024),e}function gc(){var t=Is!==0;return Is=0,t}function yc(t,e,l){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~l}function vc(t){if(Js){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}Js=!1}Dl=0,Ft=At=rt=null,ba=!1,Ti=Is=0,ja=null}function xe(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ft===null?rt.memoizedState=Ft=t:Ft=Ft.next=t,Ft}function Kt(){if(At===null){var t=rt.alternate;t=t!==null?t.memoizedState:null}else t=At.next;var e=Ft===null?rt.memoizedState:Ft.next;if(e!==null)Ft=e,At=t;else{if(t===null)throw rt.alternate===null?Error(c(467)):Error(c(310));At=t,t={memoizedState:At.memoizedState,baseState:At.baseState,baseQueue:At.baseQueue,queue:At.queue,next:null},Ft===null?rt.memoizedState=Ft=t:Ft=Ft.next=t}return Ft}function Fs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ni(t){var e=Ti;return Ti+=1,ja===null&&(ja=[]),t=th(ja,t,e),e=rt,(Ft===null?e.memoizedState:Ft.next)===null&&(e=e.alternate,K.H=e===null||e.memoizedState===null?Qh:Xh),t}function Ws(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Ni(t);if(t.$$typeof===k)return;if(t.$$typeof===Jt)return re(t)}throw Error(c(438,String(t)))}function xc(t){var e=null,l=rt.updateQueue;if(l!==null&&(e=l.memoCache),e==null){var n=rt.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=Fs(),rt.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]=_n;return e.index++,l}function Ml(t,e){return typeof e=="function"?e(t):e}function Ps(t){var e=Kt();return bc(e,At,t)}function bc(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 h=f=null,x=null,T=e,C=!1;do{var D=T.lane&-536870913;if(D!==T.lane?(mt&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?(h=x=D,f=s):x=x.next=D,rt.lanes|=_,un|=_;D=T.action,qn&&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?(h=x=_,f=s):x=x.next=_,rt.lanes|=D,un|=D;T=T.next}while(T!==null&&T!==e);if(x===null?f=s:x.next=h,!ke(s,t.memoizedState)&&(Wt=!0,C&&(l=ya,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 jc(t){var e=Kt(),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);ke(s,e.memoizedState)||(Wt=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),l.lastRenderedState=s}return[s,n]}function fh(t,e,l){var n=rt,a=Kt(),s=ft;if(s){if(l===void 0)throw Error(c(407));l=l()}else l=e();var f=!ke((At||a).memoizedState,l);if(f&&(a.memoizedState=l,Wt=!0),a=a.queue,Ec(mh.bind(null,n,a,t),[t]),t=a.getSnapshot!==e||f||Ft!==null&&(Ft.memoizedState.tag&1)!==0,Sa(t?9:8,{destroy:void 0},hh.bind(null,n,a,l,e),null),t){if(n.flags|=2048,Dt===null)throw Error(c(349));s||(Dl&127)!==0||dh(n,e,l)}return l}function dh(t,e,l){t.flags|=16384,t={getSnapshot:e,value:l},e=rt.updateQueue,e===null?(e=Fs(),rt.updateQueue=e,e.stores=[t]):(l=e.stores,l===null?e.stores=[t]:l.push(t))}function hh(t,e,l,n){e.value=l,e.getSnapshot=n,ph(e)&&gh(t)}function mh(t,e,l){return l(function(){ph(e)&&gh(t)})}function ph(t){var e=t.getSnapshot;t=t.value;try{var l=e();return!ke(t,l)}catch{return!0}}function gh(t){var e=On(t,2);e!==null&&Oe(e,t,2)}function Sc(t){var e=xe();if(typeof t=="function"){var l=t;if(t=l(),qn){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 yh(t,e,l,n){return t.baseState=l,bc(t,At,typeof n=="function"?n:Ml)}function vv(t,e,l,n,a){if(lu(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)}};K.T!==null?l(!0):s.isTransition=!1,n(s),l=e.pending,l===null?(s.next=e.pending=s,vh(e,s)):(s.next=l.next,e.pending=l.next=s)}}function vh(t,e){var l=e.action,n=e.payload,a=t.state;if(e.isTransition){var s=K.T,f={};f.types=s!==null?s.types:null,K.T=f;try{var h=l(a,n),x=K.S;x!==null&&x(f,h),xh(t,e,h)}catch(T){_c(t,e,T)}finally{s!==null&&f.types!==null&&(s.types=f.types),K.T=s}}else try{s=l(a,n),xh(t,e,s)}catch(T){_c(t,e,T)}}function xh(t,e,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){bh(t,e,n)},function(n){return _c(t,e,n)}):bh(t,e,l)}function bh(t,e,l){e.status="fulfilled",e.value=l,jh(e),t.state=l,e=t.pending,e!==null&&(l=e.next,l===e?t.pending=null:(l=l.next,e.next=l,vh(t,l)))}function _c(t,e,l){var n=t.pending;if(t.pending=null,n!==null){n=n.next;do e.status="rejected",e.reason=l,jh(e),e=e.next;while(e!==n)}t.action=null}function jh(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function Sh(t,e){return e}function _h(t,e){if(ft){var l=Dt.formState;if(l!==null){t:{var n=rt;if(ft){if(Ut){e:{for(var a=Ut,s=Ke;a.nodeType!==8;){if(!s){a=null;break e}if(a=Ie(a.nextSibling),a===null){a=null;break e}}s=a.data,a=s==="F!"||s==="F"?a:null}if(a){Ut=Ie(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:Sh,lastRenderedState:e},l.queue=n,l=Yh.bind(null,rt,n),n.dispatch=l,n=Sc(!1),s=Oc.bind(null,rt,!1,n.queue),n=xe(),a={state:e,dispatch:null,action:t,pending:null},n.queue=a,l=vv.bind(null,rt,a,s,l),a.dispatch=l,n.memoizedState=t,[e,l,!1]}function Eh(t){var e=Kt();return Th(e,At,t)}function Th(t,e,l){if(e=bc(t,e,Sh)[0],t=Ps(Ml)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var n=Ni(e)}catch(f){throw f===va?Vs:f}else n=e;e=Kt();var a=e.queue,s=a.dispatch;return l!==e.memoizedState&&(rt.flags|=2048,Sa(9,{destroy:void 0},xv.bind(null,a,l),null)),[n,s,t]}function xv(t,e){t.action=e}function Nh(t){var e=Kt(),l=At;if(l!==null)return Th(e,l,t);Kt(),e=e.memoizedState,l=Kt();var n=l.queue.dispatch;return l.memoizedState=t,[e,n,!1]}function Sa(t,e,l,n){return t={tag:t,create:l,deps:n,inst:e,next:null},e=rt.updateQueue,e===null&&(e=Fs(),rt.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 Rh(){return Kt().memoizedState}function tu(t,e,l,n){var a=xe();rt.flags|=t,a.memoizedState=Sa(1|e,{destroy:void 0},l,n===void 0?null:n)}function eu(t,e,l,n){var a=Kt();n=n===void 0?null:n;var s=a.memoizedState.inst;At!==null&&n!==null&&mc(n,At.memoizedState.deps)?a.memoizedState=Sa(e,s,l,n):(rt.flags|=t,a.memoizedState=Sa(1|e,s,l,n))}function zh(t,e){tu(8390656,8,t,e)}function Ec(t,e){eu(2048,8,t,e)}function bv(t){rt.flags|=4;var e=rt.updateQueue;if(e===null)e=Fs(),rt.updateQueue=e,e.events=[t];else{var l=e.events;l===null?e.events=[t]:l.push(t)}}function Oh(t){var e=Kt().memoizedState;return bv({ref:e,nextImpl:t}),function(){if((_t&2)!==0)throw Error(c(440));return e.impl.apply(void 0,arguments)}}function Ch(t,e){return eu(4,2,t,e)}function Ah(t,e){return eu(4,4,t,e)}function wh(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 Dh(t,e,l){l=l!=null?l.concat([t]):null,eu(4,4,wh.bind(null,e,t),l)}function Tc(){}function Mh(t,e){var l=Kt();e=e===void 0?null:e;var n=l.memoizedState;return e!==null&&mc(e,n[1])?n[0]:(l.memoizedState=[t,e],t)}function Uh(t,e){var l=Kt();e=e===void 0?null:e;var n=l.memoizedState;if(e!==null&&mc(e,n[1]))return n[0];if(n=t(),qn){Vl(!0);try{t()}finally{Vl(!1)}}return l.memoizedState=[n,e],n}function Nc(t,e,l){return l===void 0||(Dl&1073741824)!==0&&(mt&261930)===0?t.memoizedState=e:(t.memoizedState=l,t=Qm(),rt.lanes|=t,un|=t,l)}function kh(t,e,l,n){return ke(l,e)?l:tn.current!==null?(t=Nc(t,l,n),ke(t,e)||(Wt=!0),t):(Dl&106)===0||(Dl&1073741824)!==0&&(mt&261930)===0?(Wt=!0,t.memoizedState=l):(t=Qm(),rt.lanes|=t,un|=t,e)}function Hh(t,e,l,n,a){var s=st.p;st.p=s!==0&&8>s?s:8;var f=K.T,h={};h.types=f!==null?f.types:null,K.T=h,Oc(t,!1,e,l);try{var x=a(),T=K.S;if(T!==null&&T(h,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var C=pv(x,n);Ri(t,e,C,$e(t))}else Ri(t,e,n,$e(t))}catch(D){Ri(t,e,{then:function(){},status:"rejected",reason:D},$e())}finally{st.p=s,f!==null&&h.types!==null&&(f.types=h.types),K.T=f}}function jv(){}function Rc(t,e,l,n){if(t.tag!==5)throw Error(c(476));var a=Lh(t).queue;Hh(t,a,e,_l,l===null?jv:function(){return Bh(t),l(n)})}function Lh(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 Bh(t){var e=Lh(t);e.next===null&&(e=t.alternate.memoizedState),Ri(t,e.next.queue,{},$e())}function zc(){return re($a)}function qh(){return Kt().memoizedState}function $h(){return Kt().memoizedState}function Sv(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=$e();t=Wl(l);var n=Pl(e,t,l);n!==null&&(Oe(n,e,l),ji(n,e,l)),e={cache:lc()},t.payload=e;return}e=e.return}}function _v(t,e,l){var n=$e();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},lu(t)?Vh(e,l):(l=Zr(t,e,l,n),l!==null&&(Oe(l,t,n),Gh(l,e,n)))}function Yh(t,e,l){var n=$e();Ri(t,e,l,n)}function Ri(t,e,l,n){var a={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(lu(t))Vh(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,h=s(f,l);if(a.hasEagerState=!0,a.eagerState=h,ke(h,f))return Ds(t,e,a,0),Dt===null&&ws(),!1}catch{}finally{}if(l=Zr(t,e,a,n),l!==null)return Oe(l,t,n),Gh(l,e,n),!0}return!1}function Oc(t,e,l,n){if(n={lane:2,revertLane:bo(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},lu(t)){if(e)throw Error(c(479))}else e=Zr(t,l,n,2),e!==null&&Oe(e,t,2)}function lu(t){var e=t.alternate;return t===rt||e!==null&&e===rt}function Vh(t,e){ba=Js=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function Gh(t,e,l){if((l&4194048)!==0){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,Qf(t,l)}}var nu={readContext:re,use:Ws,useCallback:Xt,useContext:Xt,useEffect:Xt,useImperativeHandle:Xt,useLayoutEffect:Xt,useInsertionEffect:Xt,useMemo:Xt,useReducer:Xt,useRef:Xt,useState:Xt,useDebugValue:Xt,useDeferredValue:Xt,useTransition:Xt,useSyncExternalStore:Xt,useId:Xt,useHostTransitionStatus:Xt,useFormState:Xt,useActionState:Xt,useOptimistic:Xt,useMemoCache:Xt,useCacheRefresh:Xt,useEffectEvent:Xt},Qh={readContext:re,use:Ws,useCallback:function(t,e){return xe().memoizedState=[t,e===void 0?null:e],t},useContext:re,useEffect:zh,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,tu(4194308,4,wh.bind(null,e,t),l)},useLayoutEffect:function(t,e){return tu(4194308,4,t,e)},useInsertionEffect:function(t,e){tu(4,2,t,e)},useMemo:function(t,e){var l=xe();e=e===void 0?null:e;var n=t();if(qn){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(qn){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=_v.bind(null,rt,t),[n.memoizedState,t]},useRef:function(t){var e=xe();return t={current:t},e.memoizedState=t},useState:function(t){t=Sc(t);var e=t.queue,l=Yh.bind(null,rt,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:Tc,useDeferredValue:function(t,e){var l=xe();return Nc(l,t,e)},useTransition:function(){var t=Sc(!1);return t=Hh.bind(null,rt,t.queue,!0,!1),xe().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var n=rt,a=xe();if(ft){if(l===void 0)throw Error(c(407));l=l()}else{if(l=e(),Dt===null)throw Error(c(349));(mt&127)!==0||dh(n,e,l)}a.memoizedState=l;var s={value:l,getSnapshot:e};return a.queue=s,zh(mh.bind(null,n,s,t),[t]),n.flags|=2048,Sa(9,{destroy:void 0},hh.bind(null,n,s,l,e),null),l},useId:function(){var t=xe(),e=Dt.identifierPrefix;if(ft){var l=dl,n=fl;l=(n&~(1<<32-Me(n)-1)).toString(32)+l,e="_"+e+"R_"+l,l=Is++,0<l&&(e+="H"+l.toString(32)),e+="_"}else l=gv++,e="_"+e+"r_"+l.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:zc,useFormState:_h,useActionState:_h,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=Oc.bind(null,rt,!0,l),l.dispatch=e,[t,e]},useMemoCache:xc,useCacheRefresh:function(){return xe().memoizedState=Sv.bind(null,rt)},useEffectEvent:function(t){var e=xe(),l={impl:t};return e.memoizedState=l,function(){if((_t&2)!==0)throw Error(c(440));return l.impl.apply(void 0,arguments)}}},Xh={readContext:re,use:Ws,useCallback:Mh,useContext:re,useEffect:Ec,useImperativeHandle:Dh,useInsertionEffect:Ch,useLayoutEffect:Ah,useMemo:Uh,useReducer:Ps,useRef:Rh,useState:function(){return Ps(Ml)},useDebugValue:Tc,useDeferredValue:function(t,e){var l=Kt();return kh(l,At.memoizedState,t,e)},useTransition:function(){var t=Ps(Ml)[0],e=Kt().memoizedState;return[typeof t=="boolean"?t:Ni(t),e]},useSyncExternalStore:fh,useId:qh,useHostTransitionStatus:zc,useFormState:Eh,useActionState:Eh,useOptimistic:function(t,e){var l=Kt();return yh(l,At,t,e)},useMemoCache:xc,useCacheRefresh:$h,useEffectEvent:Oh},Ev={readContext:re,use:Ws,useCallback:Mh,useContext:re,useEffect:Ec,useImperativeHandle:Dh,useInsertionEffect:Ch,useLayoutEffect:Ah,useMemo:Uh,useReducer:jc,useRef:Rh,useState:function(){return jc(Ml)},useDebugValue:Tc,useDeferredValue:function(t,e){var l=Kt();return At===null?Nc(l,t,e):kh(l,At.memoizedState,t,e)},useTransition:function(){var t=jc(Ml)[0],e=Kt().memoizedState;return[typeof t=="boolean"?t:Ni(t),e]},useSyncExternalStore:fh,useId:qh,useHostTransitionStatus:zc,useFormState:Nh,useActionState:Nh,useOptimistic:function(t,e){var l=Kt();return At!==null?yh(l,At,t,e):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:xc,useCacheRefresh:$h,useEffectEvent:Oh};function Cc(t,e,l,n){e=t.memoizedState,l=l(n,e),l=l==null?e:P({},e,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var Ac={enqueueSetState:function(t,e,l){t=t._reactInternals;var n=$e(),a=Wl(n);a.payload=e,l!=null&&(a.callback=l),e=Pl(t,a,n),e!==null&&(Oe(e,t,n),ji(e,t,n))},enqueueReplaceState:function(t,e,l){t=t._reactInternals;var n=$e(),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),ji(e,t,n))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var l=$e(),n=Wl(l);n.tag=2,e!=null&&(n.callback=e),e=Pl(t,n,l),e!==null&&(Oe(e,t,l),ji(e,t,l))}};function Zh(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?!hi(l,n)||!hi(a,s):!0}function Kh(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&&Ac.enqueueReplaceState(e,e.state,null)}function $n(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=P({},l));for(var a in t)l[a]===void 0&&(l[a]=t[a])}return l}function Jh(t){As(t)}function Ih(t){console.error(t)}function Fh(t){As(t)}function au(t,e){try{var l=t.onUncaughtError;l(e.value,{componentStack:e.stack})}catch(n){setTimeout(function(){throw n})}}function Wh(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 wc(t,e,l){return l=Wl(l),l.tag=3,l.payload={element:null},l.callback=function(){au(t,e)},l}function Ph(t){return t=Wl(t),t.tag=3,t}function tm(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(){Wh(e,l,n)}}var f=l.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(t.callback=function(){Wh(e,l,n),typeof a!="function"&&(rn===null?rn=new Set([this]):rn.add(this));var h=n.stack;this.componentDidCatch(n.value,{componentStack:h!==null?h:""})})}function Tv(t,e,l,n,a){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(e=l.alternate,e!==null&&Dn(e,l,a,!0),l=ce.current,l!==null){switch(l.tag){case 31:case 13:case 19:return ye===null?Tu():l.alternate===null&&Zt===0&&(Zt=3),l.flags&=-257,l.flags|=65536,l.lanes=a,n===Gs?l.flags|=16384:(e=l.updateQueue,e===null?l.updateQueue=new Set([n]):e.add(n),yo(t,n,a)),!1;case 22:return l.flags|=65536,n===Gs?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)),yo(t,n,a)),!1}throw Error(c(435,l.tag))}return yo(t,n,a),Tu(),!1}if(ft)return e=ce.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=a,n!==Wr&&(t=Error(c(422),{cause:n}),gi(Qe(t,l)))):(n!==Wr&&(e=Error(c(423),{cause:n}),gi(Qe(e,l))),t=t.current.alternate,t.flags|=65536,a&=-a,t.lanes|=a,n=Qe(n,l),a=wc(t.stateNode,n,a),rc(t,a),Zt!==4&&(Zt=2)),!1;var s=Error(c(520),{cause:n});if(s=Qe(s,l),Ui===null?Ui=[s]:Ui.push(s),Zt!==4&&(Zt=2),e===null)return!0;n=Qe(n,l),l=e;do{switch(l.tag){case 3:return l.flags|=65536,t=a&-a,l.lanes|=t,t=wc(l.stateNode,n,t),rc(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=Ph(a),tm(a,t,l,n),rc(l,a),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var Dc=Error(c(461)),Wt=!1;function te(t,e,l,n){e.child=t===null?ah(e,null,l,n):Bn(e,t.child,l,n)}function em(t,e,l,n,a){l=l.render;var s=e.ref;if("ref"in n){var f={};for(var h in n)h!=="ref"&&(f[h]=n[h])}else f=n;return Mn(e),n=pc(t,e,l,f,s,a),h=gc(),t!==null&&!Wt?(yc(t,e,a),Ul(t,e,a)):(ft&&h&&Hs(e),e.flags|=1,te(t,e,n,a),e.child)}function lm(t,e,l,n,a){if(t===null){var s=l.type;return typeof s=="function"&&!Kr(s)&&s.defaultProps===void 0&&l.compare===null?(e.tag=15,e.type=s,nm(t,e,s,n,a)):(t=Us(l.type,null,n,e,e.mode,a),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!$c(t,a)){var f=s.memoizedProps;if(l=l.compare,l=l!==null?l:hi,l(f,n)&&t.ref===e.ref)return Ul(t,e,a)}return e.flags|=1,t=Ol(s,n),t.ref=e.ref,t.return=e,e.child=t}function nm(t,e,l,n,a){if(t!==null){var s=t.memoizedProps;if(hi(s,n)&&t.ref===e.ref)if(Wt=!1,e.pendingProps=n=s,$c(t,a))(t.flags&131072)!==0&&(Wt=!0);else return e.lanes=t.lanes,Ul(t,e,a)}return Mc(t,e,l,n,a)}function am(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 im(t,e,s,l,n)}if((l&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ys(e,s!==null?s.cachePool:null),s!==null?uh(e,s):oc(),rh(e);else return n=e.lanes=536870912,im(t,e,s!==null?s.baseLanes|l:l,l,n)}else s!==null?(Ys(e,s.cachePool),uh(e,s),ln(),e.memoizedState=null):(t!==null&&Ys(e,null),oc(),ln());return te(t,e,a,l),e.child}function zi(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function im(t,e,l,n,a){var s=ac();return s=s===null?null:{parent:It._currentValue,pool:s},e.memoizedState={baseLanes:l,cachePool:s},t!==null&&Ys(e,null),oc(),rh(e),t!==null&&Dn(t,e,n,!0),e.childLanes=a,null}function iu(t,e){return e=su({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function sm(t,e,l){return Bn(e,t.child,null,l),t=iu(e,e.pendingProps),t.flags|=2,He(e),e.memoizedState=null,t}function Nv(t,e,l){var n=e.pendingProps,a=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(ft){if(n.mode==="hidden")return t=iu(e,n),e.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},zi(null,t);if(dc(e),(t=Ut)?(t=wp(t,Ke),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=Vd(t),l.return=e,e.child=l,ne=e,Ut=null)):t=null,t===null)throw Kl(e);return e.lanes=536870912,null}return iu(e,n)}var s=t.memoizedState;if(s!==null){var f=s.dehydrated;if(dc(e),a)if(e.flags&256)e.flags&=-257,e=sm(t,e,l);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(c(558));else if(Wt||Dn(t,e,l,!1),a=(l&t.childLanes)!==0,Wt||a){if(tn.current===null){if(n=Dt,n!==null&&(f=Xf(n,l),f!==0&&f!==s.retryLane))throw s.retryLane=f,On(t,f),Oe(n,t,f),Dc;Tu()}e=sm(t,e,l)}else t=s.treeContext,Ut=Ie(f.nextSibling),ne=e,ft=!0,Zl=null,Ke=!1,t!==null&&Xd(e,t),e=iu(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 _a(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 Mc(t,e,l,n,a){return Mn(e),l=pc(t,e,l,n,void 0,a),n=gc(),t!==null&&!Wt?(yc(t,e,a),Ul(t,e,a)):(ft&&n&&Hs(e),e.flags|=1,te(t,e,l,a),e.child)}function um(t,e,l,n,a,s){return Mn(e),e.updateQueue=null,l=oh(e,n,l,a),ch(t),n=gc(),t!==null&&!Wt?(yc(t,e,s),Ul(t,e,s)):(ft&&n&&Hs(e),e.flags|=1,te(t,e,l,s),e.child)}function rm(t,e,l,n,a){if(Mn(e),e.stateNode===null){var s=ha,f=l.contextType;typeof f=="object"&&f!==null&&(s=re(f)),s=new l(n,s),e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Ac,e.stateNode=s,s._reactInternals=e,s=e.stateNode,s.props=n,s.state=e.memoizedState,s.refs={},sc(e),f=l.contextType,s.context=typeof f=="object"&&f!==null?re(f):ha,s.state=e.memoizedState,f=l.getDerivedStateFromProps,typeof f=="function"&&(Cc(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&&Ac.enqueueReplaceState(s,s.state,null),_i(e,n,s,a),Si(),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308),n=!0}else if(t===null){s=e.stateNode;var h=e.memoizedProps,x=$n(l,h);s.props=x;var T=s.context,C=l.contextType;f=ha,typeof C=="object"&&C!==null&&(f=re(C));var D=l.getDerivedStateFromProps;C=typeof D=="function"||typeof s.getSnapshotBeforeUpdate=="function",h=e.pendingProps!==h,C||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(h||T!==f)&&Kh(e,s,n,f),Fl=!1;var _=e.memoizedState;s.state=_,_i(e,n,s,a),Si(),T=e.memoizedState,h||_!==T||Fl?(typeof D=="function"&&(Cc(e,l,D,n),T=e.memoizedState),(x=Fl||Zh(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,uc(t,e),f=e.memoizedProps,C=$n(l,f),s.props=C,D=e.pendingProps,_=s.context,T=l.contextType,x=ha,typeof T=="object"&&T!==null&&(x=re(T)),h=l.getDerivedStateFromProps,(T=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(f!==D||_!==x)&&Kh(e,s,n,x),Fl=!1,_=e.memoizedState,s.state=_,_i(e,n,s,a),Si();var O=e.memoizedState;f!==D||_!==O||Fl||t!==null&&t.dependencies!==null&&qs(t.dependencies)?(typeof h=="function"&&(Cc(e,l,h,n),O=e.memoizedState),(C=Fl||Zh(e,l,C,n,_,O,x)||t!==null&&t.dependencies!==null&&qs(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,_a(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=Bn(e,t.child,null,a),e.child=Bn(e,null,l,a)):te(t,e,l,a),e.memoizedState=s.state,t=e.child):t=Ul(t,e,a),t}function cm(t,e,l,n){return An(),e.flags|=256,te(t,e,l,n),e.child}var Uc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kc(t){return{baseLanes:t,cachePool:Wd()}}function Hc(t,e,l){return t=t!==null?t.childLanes&~l:0,e&&(t|=qe),t}function om(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:(oe.current&2)!==0),f&&(a=!0,e.flags&=-129),f=(e.flags&32)!==0,e.flags&=-33,t===null){if(ft){if(a?en(e):ln(),(t=Ut)?(t=wp(t,Ke),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=Vd(t),l.return=e,e.child=l,ne=e,Ut=null)):t=null,t===null)throw Kl(e);return Ho(t)?e.lanes=32:e.lanes=536870912,null}return s=n.children,n=n.fallback,a?(ln(),a=e.mode,s=su({mode:"hidden",children:s},a),n=Cn(n,a,l,null),s.return=e,n.return=e,s.sibling=n,e.child=s,n=e.child,n.memoizedState=kc(l),n.childLanes=Hc(t,f,l),e.memoizedState=Uc,zi(null,n)):(en(e),Lc(e,s))}var h=t.memoizedState;if(h!==null){var x=h.dehydrated;if(x!==null)return Rv(t,e,s,f,n,x,h,l)}return a?(ln(),a=n.fallback,s=e.mode,h=t.child,x=h.sibling,n=Ol(h,{mode:"hidden",children:n.children}),n.subtreeFlags=h.subtreeFlags&1206910976,x!==null?a=Ol(x,a):(a=Cn(a,s,l,null),a.flags|=2),a.return=e,n.return=e,n.sibling=a,e.child=n,zi(null,n),n=e.child,a=t.child.memoizedState,a===null?a=kc(l):(s=a.cachePool,s!==null?(h=It._currentValue,s=s.parent!==h?{parent:h,pool:h}:s):s=Wd(),a={baseLanes:a.baseLanes|l,cachePool:s}),n.memoizedState=a,n.childLanes=Hc(t,f,l),e.memoizedState=Uc,zi(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 Lc(t,e){return e=su({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function su(t,e){return t=Te(22,t,null,e),t.lanes=0,t}function uu(t,e,l){return Bn(e,t.child,null,l),t=Lc(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Rv(t,e,l,n,a,s,f,h){if(l)return e.flags&256?(en(e),e.flags&=-257,uu(t,e,h)):e.memoizedState!==null?(ln(),e.child=t.child,e.flags|=128,null):(ln(),s=a.fallback,f=e.mode,a=su({mode:"visible",children:a.children},f),s=Cn(s,f,h,null),s.flags|=2,a.return=e,s.return=e,a.sibling=s,e.child=a,Bn(e,t.child,null,h),a=e.child,a.memoizedState=kc(h),a.childLanes=Hc(t,n,h),e.memoizedState=Uc,zi(null,a));if(en(e),Ho(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,gi({value:a,source:null,stack:null})),uu(t,e,h)}if(Wt||Dn(t,e,h,!1),n=(h&t.childLanes)!==0,Wt||n){if(tn.current!==null)return uu(t,e,h);if(n=Dt,n!==null&&(a=Xf(n,h),a!==0&&a!==f.retryLane))throw f.retryLane=a,On(t,a),Oe(n,t,a),Dc;return ko(s)||Tu(),uu(t,e,h)}return ko(s)?(e.flags|=192,e.child=t.child,null):(t=f.treeContext,Ut=Ie(s.nextSibling),ne=e,ft=!0,Zl=null,Ke=!1,t!==null&&Xd(e,t),e=Lc(e,a.children),e.flags|=134221824,e)}function fm(t,e,l){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Bs(t.return,e,l)}function dm(t){for(var e=null;t!==null;){var l=t.alternate;l!==null&&Ks(l)===null&&(e=t),t=t.sibling}return e}function ru(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 Bc(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 qc(t,e,l){var n=e.pendingProps,a=n.revealOrder,s=n.tail;n=n.children;var f=oe.current;if(e.flags&128)return Ei(e,f),null;var h=(f&2)!==0;if(h?(f=f&1|2,e.flags|=128):f&=1,Ei(e,f),a==="backwards"&&t!==null?(Bc(t),te(t,e,n,l),Bc(t)):te(t,e,n,l),n=ft?pi:0,!h&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&fm(t,l,e);else if(t.tag===19)fm(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=dm(e.child),l===null?(a=e.child,e.child=null):(a=l.sibling,l.sibling=null,Bc(e)),ru(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&&Ks(t)===null){e.child=a;break}t=a.sibling,a.sibling=l,l=a,a=t}ru(e,!0,l,null,s,n);break;case"together":ru(e,!1,null,null,void 0,n);break;case"independent":e.memoizedState=null;break;default:l=dm(e.child),l===null?(a=e.child,e.child=null):(a=l.sibling,l.sibling=null),ru(e,!1,a,l,s,n)}return e.child}function hm(t,e,l){var n=e.pendingProps;return Jl(e,e.type,n.value),te(t,e,n.children,l),e.child}function Ul(t,e,l){if(t!==null&&(e.dependencies=t.dependencies),un|=e.lanes,(l&e.childLanes)===0)if(t!==null){if(Dn(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 $c(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&qs(t)))}function zv(t,e,l){switch(e.tag){case 3:hs(e,e.stateNode.containerInfo),Jl(e,It,t.memoizedState.cache),An();break;case 27:case 5:mr(e);break;case 4:hs(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,dc(e),null;break;case 13:var n=e.memoizedState;if(n!==null){if(n.dehydrated!==null)return en(e),e.flags|=128,null;n=Dn(t,e,l,!1);var a=e.child.childLanes;return n||(l&a)!==0?om(t,e,l):(en(e),t=Ul(t,e,l),t!==null?t.sibling:null)}en(e);break;case 19:if(e.flags&128)return qc(t,e,l);if(a=(t.flags&128)!==0,n=(l&e.childLanes)!==0,n||(Dn(t,e,l,!1),n=(l&e.childLanes)!==0),a){if(n)return qc(t,e,l);e.flags|=128}if(a=e.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Ei(e,oe.current),n)break;return null;case 22:return e.lanes=0,am(t,e,l,e.pendingProps);case 24:Jl(e,It,t.memoizedState.cache)}return Ul(t,e,l)}function mm(t,e,l){if(t!==null)if(t.memoizedProps!==e.pendingProps)Wt=!0;else{if(!$c(t,l)&&(e.flags&128)===0)return Wt=!1,zv(t,e,l);Wt=(t.flags&131072)!==0}else Wt=!1,ft&&(e.flags&1048576)!==0&&Qd(e,pi,e.index);switch(e.lanes=0,e.tag){case 16:t:{var n=e.pendingProps;if(t=Hn(e.elementType),e.type=t,typeof t=="function")Kr(t)?(n=$n(t,n),e.tag=1,e=rm(null,e,t,n,l)):(e.tag=0,e=Mc(null,e,t,n,l));else{if(t!=null){var a=t.$$typeof;if(a===V){e.tag=11,e=em(null,e,t,n,l);break t}else if(a===wt){e.tag=14,e=lm(null,e,t,n,l);break t}else if(a===Jt){e.tag=10,e.type=t,e=hm(null,e,l);break t}}throw e=bt(t)||t,Error(c(306,e,""))}}return e;case 0:return Mc(t,e,e.type,e.pendingProps,l);case 1:return n=e.type,a=$n(n,e.pendingProps),rm(t,e,n,a,l);case 3:t:{if(hs(e,e.stateNode.containerInfo),t===null)throw Error(c(387));n=e.pendingProps;var s=e.memoizedState;a=s.element,uc(t,e),_i(e,n,null,l);var f=e.memoizedState;if(n=f.cache,Jl(e,It,n),n!==s.cache&&ec(e,[It],l,!0),Si(),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=cm(t,e,n,l);break t}else if(n!==a){a=Qe(Error(c(424)),e),gi(a),e=cm(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(Ut=Ie(t.firstChild),ne=e,ft=!0,Zl=null,Ke=!0,l=ah(e,null,n,l),e.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(An(),n===a){e=Ul(t,e,l);break t}te(t,e,n,l)}e=e.child}return e;case 26:return _a(t,e),t===null?(l=Bp(e.type,null,e.pendingProps,null))?e.memoizedState=l:ft||(e.stateNode=vp(e.type,e.pendingProps,$l.current,e)):e.memoizedState=Bp(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return mr(e),t===null&&ft&&(n=e.stateNode=Up(e.type,e.pendingProps,$l.current),ne=e,Ke=!0,a=Ut,fn(e.type)?(Lo=a,Ut=Ie(n.firstChild)):Ut=a),te(t,e,e.pendingProps.children,l),_a(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&ft&&((a=n=Ut)&&(n=Sx(n,e.type,e.pendingProps,Ke),n!==null?(e.stateNode=n,ne=e,Ut=Ie(n.firstChild),Ke=!1,a=!0):a=!1),a||Kl(e)),mr(e),a=e.type,s=e.pendingProps,f=t!==null?t.memoizedProps:null,n=s.children,Oo(a,s)?n=null:f!==null&&Oo(a,f)&&(e.flags|=32),e.memoizedState!==null&&(a=pc(t,e,yv,null,null,l),$a._currentValue=a),_a(t,e),te(t,e,n,l),e.child;case 6:return t===null&&ft&&((t=l=Ut)&&(l=_x(l,e.pendingProps,Ke),l!==null?(e.stateNode=l,ne=e,Ut=null,t=!0):t=!1),t||Kl(e)),null;case 13:return om(t,e,l);case 4:return hs(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Bn(e,null,n,l):te(t,e,n,l),e.child;case 11:return em(t,e,e.type,e.pendingProps,l);case 7:return n=e.pendingProps,_a(t,e),te(t,e,n,l),e.child;case 8:return te(t,e,e.pendingProps.children,l),e.child;case 12:return te(t,e,e.pendingProps.children,l),e.child;case 10:return hm(t,e,l);case 9:return a=e.type._context,n=e.pendingProps.children,Mn(e),a=re(a),n=n(a),e.flags|=1,te(t,e,n,l),e.child;case 14:return lm(t,e,e.type,e.pendingProps,l);case 15:return nm(t,e,e.type,e.pendingProps,l);case 19:return qc(t,e,l);case 31:return Nv(t,e,l);case 22:return am(t,e,l,e.pendingProps);case 24:return Mn(e),n=re(It),t===null?(a=ac(),a===null&&(a=Dt,s=lc(),a.pooledCache=s,s.refCount++,s!==null&&(a.pooledCacheLanes|=l),a=s),e.memoizedState={parent:n,cache:a},sc(e),Jl(e,It,a)):((t.lanes&l)!==0&&(uc(t,e),_i(e,null,null,l),Si()),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,It,n)):(n=s.cache,Jl(e,It,n),n!==a.cache&&ec(e,[It],l,!0))),te(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:ft&&Hs(e),t!==null&&t.memoizedProps.name!==n.name?e.flags|=4194816:_a(t,e),te(t,e,n.children,l),e.child;case 29:throw e.pendingProps}throw Error(c(156,e.tag))}function kl(t){t.flags|=4}function Yc(t,e,l,n,a){var s;if((s=(t.mode&32)!==0)&&(s=l===null?Vp(e,n):Vp(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(Jm())t.flags|=8192;else throw Ln=Gs,ic}else t.flags&=-16777217}function pm(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Gp(e))if(Jm())t.flags|=8192;else throw Ln=Gs,ic}function cu(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?Vf():536870912,t.lanes|=e,za|=e)}function Oi(t,e){if(!ft)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 kt(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 Ov(t,e,l){var n=e.pendingProps;switch(Fr(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return kt(e),null;case 1:return kt(e),null;case 3:return l=e.stateNode,n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),wl(It),ta(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(ga(e)?kl(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Pr())),kt(e),null;case 26:var a=e.type,s=e.memoizedState;return t===null?(kl(e),s!==null?(kt(e),pm(e,s)):(kt(e),Yc(e,a,null,n,l))):s?s!==t.memoizedState?(kl(e),kt(e),pm(e,s)):(kt(e),e.flags&=-16777217):(t=t.memoizedProps,t!==n&&kl(e),kt(e),Yc(e,a,t,n,l)),null;case 27:if(ms(e),l=$l.current,a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&kl(e);else{if(!n){if(e.stateNode===null)throw Error(c(166));return kt(e),e.subtreeFlags&=-33554433,null}t=cl.current,ga(e)?Zd(e):(t=Up(a,n,l),e.stateNode=t,kl(e))}return kt(e),e.subtreeFlags&=-33554433,null;case 5:if(ms(e),a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&kl(e);else{if(!n){if(e.stateNode===null)throw Error(c(166));return kt(e),e.subtreeFlags&=-33554433,null}if(s=cl.current,ga(e))Zd(e);else{var f=qi($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[ue]=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(de(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&&kl(e)}}return kt(e),e.subtreeFlags&=-33554433,Yc(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,l),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==n&&kl(e);else{if(typeof n!="string"&&e.stateNode===null)throw Error(c(166));if(t=$l.current,ga(e)){if(t=e.stateNode,l=e.memoizedProps,n=null,a=ne,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}t[ue]=e,t=!!(t.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||mp(t.nodeValue,l)),t||Kl(e,!0)}else t=qi(t).createTextNode(n),t[ue]=e,e.stateNode=t}return kt(e),null;case 31:if(l=e.memoizedState,t===null||t.memoizedState!==null){if(n=ga(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[ue]=e}else An(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;kt(e),t=!1}else l=Pr(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return e.flags&256?(He(e),e):(He(e),null);if((e.flags&128)!==0)throw Error(c(558))}return kt(e),null;case 13:if(n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=ga(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[ue]=e}else An(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;kt(e),a=!1}else a=Pr(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return e.flags&256?(He(e),e):(He(e),null)}return He(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),cu(e,e.updateQueue),kt(e),null);case 4:return ta(),t===null&&Eo(e.stateNode.containerInfo),e.flags|=67108864,kt(e),null;case 10:return wl(e.type),kt(e),null;case 19:if(hc(e),n=e.memoizedState,n===null)return kt(e),null;if(a=(e.flags&128)!==0,s=n.rendering,s===null)if(a)Oi(n,!1);else{if(Zt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(s=Ks(t),s!==null){for(e.flags|=128,Oi(n,!1),t=s.updateQueue,e.updateQueue=t,cu(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)Yd(l,t),l=l.sibling;return Ei(e,oe.current&1|2),ft&&Cl(e,n.treeForkCount),e.child}t=t.sibling}n.tail!==null&&we()>ju&&(e.flags|=128,a=!0,Oi(n,!1),e.lanes=4194304)}else{if(!a)if(t=Ks(s),t!==null){if(e.flags|=128,a=!0,t=t.updateQueue,e.updateQueue=t,cu(e,t),Oi(n,!0),n.tail===null&&n.tailMode!=="collapsed"&&n.tailMode!=="visible"&&!s.alternate&&!ft)return kt(e),null}else 2*we()-n.renderingStartTime>ju&&l!==536870912&&(e.flags|=128,a=!0,Oi(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=we(),t.sibling=null,s=oe.current,s=a?s&1|2:s&1,n.tailMode==="visible"||n.tailMode==="collapsed"||!l||ft?Ei(e,s):(l=s,Mt(ce,e),Mt(oe,l),ye===null&&(ye=e)),ft&&Cl(e,n.treeForkCount),t}return kt(e),null;case 22:case 23:return He(e),fc(),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&&(kt(e),e.subtreeFlags&6&&(e.flags|=8192)):kt(e),l=e.updateQueue,l!==null&&cu(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&&se(kn),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),wl(It),kt(e),null;case 25:return null;case 30:return e.flags|=33554432,kt(e),null}throw Error(c(156,e.tag))}function Cv(t,e){switch(Fr(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return wl(It),ta(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return ms(e),null;case 31:if(e.memoizedState!==null){if(He(e),e.alternate===null)throw Error(c(340));An()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(He(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(c(340));An()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return hc(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 ta(),null;case 10:return wl(e.type),null;case 22:case 23:return He(e),fc(),t!==null&&se(kn),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return wl(It),null;case 25:return null;default:return null}}function gm(t,e){switch(Fr(e),e.tag){case 3:wl(It),ta();break;case 26:case 27:case 5:ms(e);break;case 4:ta();break;case 31:e.memoizedState!==null&&He(e);break;case 13:He(e);break;case 19:hc(e);break;case 10:wl(e.type);break;case 22:case 23:He(e),fc(),t!==null&&se(kn);break;case 24:wl(It)}}function Ci(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(h){Ot(e,e.return,h)}}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,h=f.destroy;if(h!==void 0){f.destroy=void 0,a=e;var x=l,T=h;try{T()}catch(C){Ot(a,x,C)}}}n=n.next}while(n!==s)}}catch(C){Ot(e,e.return,C)}}function ym(t){var e=t.updateQueue;if(e!==null){var l=t.stateNode;try{sh(e,l)}catch(n){Ot(t,t.return,n)}}}function vm(t,e,l){l.props=$n(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(n){Ot(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=Tp(s)),n=a.ref;break;case 7:if(t.stateNode===null){var f=new Ye(t);v(t.child,!1,bx,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(h){Ot(t,e,h)}}function fe(t,e){var l=t.ref,n=t.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(a){Ot(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){Ot(t,e,a)}else l.current=null}function ou(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++)Ap(t.stateNode,e[l])}function xm(t){for(var e=t.return;e!==null&&(Gc(e)&&Ap(t.stateNode,e.stateNode),!Vc(e));)e=e.return}function Ai(t){for(var e=t.return;e!==null&&(Gc(e)&&jx(t.stateNode,e.stateNode),!Vc(e));)e=e.return}function Vc(t){return t.tag===5||t.tag===3||t.tag===27}function Gc(t){return t&&t.tag===7&&t.stateNode!==null}function Qc(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){Ot(t,t.return,a)}}function Xc(t,e,l){try{var n=t.stateNode;lx(n,t.type,l,e),n[Ee]=e}catch(a){Ot(t,t.return,a)}}function bm(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&fn(t.type)||t.tag===4}function Zc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||bm(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 Kc(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)),ou(t,n),jt=!0;else if(a!==4&&(a===27&&(ou(t,n),n=null,fn(t.type)&&(l=t.stateNode,e=null)),t=t.child,t!==null))for(Kc(t,e,l,n),t=t.sibling;t!==null;)Kc(t,e,l,n),t=t.sibling}function fu(t,e,l,n){var a=t.tag;if(a===5||a===6)a=t.stateNode,e?l.insertBefore(a,e):l.appendChild(a),ou(t,n),jt=!0;else if(a!==4&&(a===27&&(ou(t,n),n=null,fn(t.type)&&(l=t.stateNode)),t=t.child,t!==null))for(fu(t,e,l,n),t=t.sibling;t!==null;)fu(t,e,l,n),t=t.sibling}function jm(t){var e=t.stateNode,l=t.memoizedProps;try{for(var n=t.type,a=e.attributes;a.length;)e.removeAttributeNode(a[0]);de(e,n,l),e[ue]=t,e[Ee]=l}catch(s){Ot(t,t.return,s)}}var du=!1,Le=null;function Sm(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(du=!0)}var ml=null;function _m(){var t=ml;return ml=null,t}var Ne=0;function Ea(t,e,l,n,a){return Ne=0,Em(t.child,e,l,n,a)}function Em(t,e,l,n,a){for(var s=!1;t!==null;){if(t.tag===5){var f=t.stateNode;if(n!==null){var h=wo(f);n.push(h),h.view&&(s=!0)}else s||wo(f).view&&(s=!0);du=!0,_p(f,Ne===0?e:e+"_"+Ne,l),Ne++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&a||Em(t.child,e,l,n,a)&&(s=!0));t=t.sibling}return s}function pl(t,e){for(;t!==null;)t.tag===5?Ep(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&e||pl(t.child,e)),t=t.sibling}function hu(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(hu(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"&&(Ea(t,l,e,null,!1)||pl(t.child,!1))}t=t.sibling}}function Jc(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"?Ea(t,a,s,null,!1)?(hu(t),l.paired||e||wa(t,n.onEnter)):pl(t.child,!1):hu(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Jc(t,e),t=t.sibling;else hu(t)}function Ic(t){if(Le!==null&&Le.size!==0){var e=Le;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"&&(Ea(t,n,s,null,!1)?(s=t.stateNode,a.paired=s,s.paired=a,wa(t,l.onShare)):pl(t.child,!1)),e.delete(n),e.size===0)break}}}Ic(t)}t=t.sibling}}}function Fc(t){if(t.tag===30){var e=t.memoizedProps,l=Rl(e,t.stateNode),n=Le!==null?Le.get(l):void 0,a=zl(e.default,n!==void 0?e.share:e.exit);a!=="none"&&(Ea(t,l,a,null,!1)?n!==void 0?(a=t.stateNode,n.paired=a,a.paired=n,Le.delete(l),wa(t,e.onShare)):wa(t,e.onExit):pl(t.child,!1)),Le!==null&&Ic(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Fc(t),t=t.sibling;else Le!==null&&Ic(t)}function Tm(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"&&Ea(t,l,e,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&Tm(t);t=t.sibling}}function Wc(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))}Wc(t)}t=t.sibling}}function mu(t){if(t.tag===30)t.stateNode.paired=null,pl(t.child,!1),Wc(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)mu(t),t=t.sibling;else Wc(t)}function Nm(t){for(t=t.child;t!==null;)t.tag===30?pl(t.child,!1):(t.subtreeFlags&33554432)!==0&&Nm(t),t=t.sibling}function Pc(t,e,l,n,a,s,f){for(var h=!1;e!==null;){if(e.tag===5){var x=e.stateNode;if(s!==null&&Ne<s.length){var T=s[Ne],C=wo(x);(T.view||C.view)&&(h=!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&&_p(x,Ne===0?l:l+"_"+Ne,a),h&&(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:Pc(t,e.child,l,n,a,s,f)&&(h=!0));e=e.sibling}return h}function Rm(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 h=t.child;Ne=0,a=Pc(n,h,a,a,s,f,!1),(t.flags&4)!==0&&a&&wa(t,l.onUpdate)}else(t.subtreeFlags&33554432)!==0&&Rm(t);t=t.sibling}}var ae=!1,Nt=!1,gl=!1,to=!1,zm=typeof WeakSet=="function"?WeakSet:Set,ie=null,yl=!1,wi=!1,pu=!1,eo=!1;function Av(t,e,l){if(t=t.containerInfo,Ro=Ya,t=wd(t),$r(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 h=0,x=-1,T=-1,C=0,D=0,_=t,O=null;e:for(;;){for(var q;_!==n||s!==0&&_.nodeType!==3||(x=h+s),_!==f||a!==0&&_.nodeType!==3||(T=h+a),_.nodeType===3&&(h+=_.nodeValue.length),(q=_.firstChild)!==null;)O=_,_=q;for(;;){if(_===t)break e;if(O===n&&++C===s&&(x=h),O===f&&++D===a&&(T=h),(q=_.nextSibling)!==null)break;_=O,O=_.parentNode}_=q}n=x===-1||T===-1?null:{start:x,end:T}}else n=null}n=n||{start:0,end:0}}else n=null;for(zo={focusedElem:t,selectionRange:n},Ya=!1,l=(l&335544064)===l,ie=e,e=l?9270:1024;ie!==null;){if(t=ie,l&&(n=t.deletions,n!==null))for(s=0;s<n.length;s++)l&&Fc(n[s]);if(t.alternate===null&&(t.flags&2)!==0)l&&Sm(t),gu(l);else{if(t.tag===22){if(n=t.alternate,t.memoizedState!==null){n!==null&&n.memoizedState===null&&l&&Fc(n),gu(l);continue}else if(n!==null&&n.memoizedState!==null){l&&Sm(t),gu(l);continue}}n=t.child,(t.subtreeFlags&e)!==0&&n!==null?(n.return=t,ie=n):(l&&Tm(t),gu(l))}}Le=null}function gu(t){for(;ie!==null;){var e=ie,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=$n(e.type,a);l=s.getSnapshotBeforeUpdate(f,n),s.__reactInternalSnapshotBeforeUpdate=l}catch(h){Ot(e,e.return,h)}}break;case 3:if((a&1024)!==0){if(n=e.stateNode.containerInfo,l=n.nodeType,l===9)Uo(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Uo(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"&&Ea(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,ie=n;break}ie=e.return}}function Om(t,e,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:vl(t,l),n&4&&Ci(5,l);break;case 1:if(vl(t,l),n&4)if(t=l.stateNode,e===null)try{t.componentDidMount()}catch(f){Ot(l,l.return,f)}else{var a=$n(l.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(a,e,t.__reactInternalSnapshotBeforeUpdate)}catch(f){Ot(l,l.return,f)}}n&64&&ym(l),n&512&&hl(l,l.return);break;case 3:if(vl(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{sh(t,e)}catch(f){Ot(l,l.return,f)}}break;case 27:e===null&&n&4&&jm(l);case 26:case 5:vl(t,l),e===null&&n&4&&Qc(l),n&512&&hl(l,l.return);break;case 12:vl(t,l);break;case 31:vl(t,l),n&4&&Dm(t,l);break;case 13:vl(t,l),n&4&&Mm(t,l),n&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=Vv.bind(null,l),Ex(t,l))));break;case 22:if(n=l.memoizedState!==null||ae,!n){var s=e!==null&&e.memoizedState!==null||Nt;e=ae,a=Nt,ae=n,(Nt=s)&&!a?(n=2,(l.subtreeFlags&8772)!==0&&(n|=1),al(t,l,n)):vl(t,l),ae=e,Nt=a}break;case 30:vl(t,l),n&512&&hl(l,l.return);break;case 7:n&512&&hl(l,l.return);default:vl(t,l)}}function lo(t,e){for(t=t.child;t!==null;)Cm(t,e),t=t.sibling}function Cm(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){Ot(t,t.return,x)}no(t,e);break;case 6:try{t.stateNode.nodeValue=e?"":t.memoizedProps,jt=!0}catch(x){Ot(t,t.return,x)}break;case 18:try{var h=t.stateNode;e?Sp(h,!0):Sp(t.stateNode,!1)}catch(x){Ot(t,t.return,x)}break;case 22:case 23:t.memoizedState===null&&lo(t,e);break;default:lo(t,e)}}function no(t,e){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){t:{var l=t,n=e;switch(l.tag){case 4:Cm(l,n);break t;case 22:l.memoizedState===null&&no(l,n);break t;default:no(l,n)}}t=t.sibling}}function Am(t){var e=t.alternate;e!==null&&(t.alternate=null,Am(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&js(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 $t=null,Re=!1;function ll(t,e,l){for(l=l.child;l!==null;)wm(t,e,l),l=l.sibling}function wm(t,e,l){if(De&&typeof De.onCommitFiberUnmount=="function")try{De.onCommitFiberUnmount(ei,l)}catch{}switch(l.tag){case 26:Nt||fe(l,e),ll(t,e,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!Nt&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Nt||fe(l,e),Ai(l);var n=$t,a=Re;fn(l.type)&&($t=l.stateNode,Re=!1),ll(t,e,l),kp(l.stateNode,l.type,l.memoizedProps),$t=n,Re=a;break;case 5:Nt||fe(l,e),Ai(l);case 6:if(l.tag===6&&Ai(l),n=$t,a=Re,$t=null,ll(t,e,l),$t=n,Re=a,$t!==null)if(Re)try{($t.nodeType===9?$t.body:$t.nodeName==="HTML"?$t.ownerDocument.body:$t).removeChild(l.stateNode),jt=!0}catch(s){Ot(l,e,s)}else try{$t.removeChild(l.stateNode),jt=!0}catch(s){Ot(l,e,s)}break;case 18:$t!==null&&(Re?(t=$t,jp(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Va(t)):jp($t,l.stateNode));break;case 4:n=$t,a=Re,$t=l.stateNode.containerInfo,Re=!0,ll(t,e,l),$t=n,Re=a;break;case 0:case 11:case 14:case 15:nn(2,l,e),Nt||nn(4,l,e),ll(t,e,l);break;case 1:Nt||(fe(l,e),n=l.stateNode,typeof n.componentWillUnmount=="function"&&vm(l,e,n)),ll(t,e,l);break;case 21:ll(t,e,l);break;case 22:Nt=(n=Nt)||l.memoizedState!==null,ll(t,e,l),Nt=n;break;case 30:fe(l,e),ll(t,e,l);break;case 7:Nt||fe(l,e),ll(t,e,l);break;default:ll(t,e,l)}}function Dm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Va(t)}catch(l){Ot(e,e.return,l)}}}function Mm(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Va(t)}catch(l){Ot(e,e.return,l)}}function wv(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new zm),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new zm),e;default:throw Error(c(435,t.tag))}}function yu(t,e){var l=wv(t);e.forEach(function(n){if(!l.has(n)){l.add(n);var a=Gv.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,h=e,x=h;t:for(;x!==null;){switch(x.tag){case 27:if(fn(x.type)){$t=x.stateNode,Re=!1;break t}break;case 5:$t=x.stateNode,Re=!1;break t;case 3:case 4:$t=x.stateNode.containerInfo,Re=!0;break t}x=x.return}if($t===null)throw Error(c(160));wm(f,h,s),$t=null,Re=!1,f=s.alternate,f!==null&&(f.return=null),s.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)Um(e,t,l),e=e.sibling}var nl=null;function Um(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),Ci(3,t),nn(5,t,t.return));break;case 1:be(e,t,l),je(t),a&512&&(Nt||n===null||fe(n,n.return)),a&64&&ae&&(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&&(Nt||n===null||fe(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(ae)t.stateNode=vp(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[ai]||n[ue]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=a.createElement(e),a.head.insertBefore(n,a.querySelector("head > title"))),de(n,e,l),n[ue]=t,le(n),e=n;break t;case"link":if(s=Yp("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),de(n,e,l),a.head.appendChild(n);break;case"meta":if(s=Yp("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),de(n,e,l),a.head.appendChild(n);break;default:throw Error(c(468,e))}n[ue]=t,le(n),e=n}t.stateNode=e}else ae||Yo(s,t.type,t.stateNode);else t.stateNode=$p(s,l,t.memoizedProps);else a!==l?(a===null?(e=n.stateNode,e===null||Nt||e.parentNode.removeChild(e)):a.count--,l===null?ae||Yo(s,t.type,t.stateNode):$p(s,l,t.memoizedProps)):l===null&&t.stateNode!==null&&Xc(t,t.memoizedProps,n.memoizedProps);break;case 27:be(e,t,l),je(t),a&512&&(Nt||n===null||fe(n,n.return)),n!==null&&a&4&&Xc(t,t.memoizedProps,n.memoizedProps);break;case 5:if(s=gl,gl=!1,be(e,t,l),gl=s,je(t),a&512&&(Nt||n===null||fe(n,n.return)),t.flags&32){e=t.stateNode;try{sa(e,""),jt=!0}catch(C){Ot(t,t.return,C)}}a&4&&t.stateNode!=null&&(e=t.memoizedProps,Xc(t,e,n!==null?n.memoizedProps:e)),a&1024&&(to=!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,jt=!0}catch(C){Ot(t,t.return,C)}}break;case 3:if(jt=!1,wu=null,s=nl,nl=$i(e.containerInfo),be(e,t,l),nl=s,je(t),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Va(e.containerInfo)}catch(C){Ot(t,t.return,C)}to&&(to=!1,km(t)),jt=!1;break;case 4:a=gl,gl=ae,n=ld(),s=nl,nl=$i(t.stateNode.containerInfo),be(e,t,l),je(t),nl=s,jt&&wi&&(pu=!0),jt=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,yu(t,e)));break;case 13:be(e,t,l),je(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(bu=we()),a&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,yu(t,e)));break;case 22:s=t.memoizedState!==null,f=n!==null&&n.memoizedState!==null;var h=ae,x=Nt,T=gl;ae=h||s,gl=T||s,Nt=x||f,be(e,t,l),Nt=x,gl=T,ae=h,je(t),a&8192&&(e=t.stateNode,e._visibility=s?e._visibility&-2:e._visibility|1,!s||n===null||f||ae||Nt||(e=f||Nt,l=ae,n=Nt,ae=s||ae,Nt=e,an(t,2),ae=l,Nt=n),!s&&gl||lo(t,s)),a&4&&(e=t.updateQueue,e!==null&&(l=e.retryQueue,l!==null&&(e.retryQueue=null,yu(t,l))));break;case 19:be(e,t,l),je(t),a&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,yu(t,e)));break;case 30:a&512&&(Nt||n===null||fe(n,n.return)),a=ld(),s=wi,f=(l&335544064)===l,h=t.memoizedProps,wi=f&&zl(h.default,h.update)!=="none",be(e,t,l),je(t),f&&n!==null&&jt&&(t.flags|=4),wi=s,jt=a;break;case 21:break;case 7:a&512&&(Nt||n===null||fe(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(bm(n)){l=n;break}n=n.return}n=null;for(var a=t.return;a!==null;){if(Gc(a)){var s=a.stateNode;n===null?n=[s]:n.push(s)}if(Vc(a))break;a=a.return}var f=n;if(l==null)throw Error(c(160));switch(l.tag){case 27:var h=l.stateNode,x=Zc(t);fu(t,x,h,f);break;case 5:var T=l.stateNode;l.flags&32&&(sa(T,""),l.flags&=-33);var C=Zc(t);fu(t,C,T,f);break;case 3:case 4:var D=l.stateNode.containerInfo,_=Zc(t);Kc(t,_,D,f);break;default:throw Error(c(161))}}catch(O){Ot(t,t.return,O)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function km(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;km(e),e.tag===5&&e.flags&1024&&(e=e.stateNode,Ya=!0,e.reset(),Ya=!1),t=t.sibling}}function Ta(t,e){if(e.subtreeFlags&9270)for(e=e.child;e!==null;)Hm(e,t),e=e.sibling;else Rm(e)}function Hm(t,e){var l=t.alternate;if(l===null)Jc(t,!1);else switch(t.tag){case 3:if(eo=yl=!1,_m(),Ta(e,t),!yl&&!pu){if(t=ml,t!==null)for(var n=0;n<t.length;n+=3){l=t[n];var a=t[n+1];Ep(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"})),eo=!0}ml=null;break;case 5:Ta(e,t);break;case 4:n=yl,yl=!1,Ta(e,t),yl&&(pu=!0),yl=n;break;case 22:t.memoizedState===null&&(l.memoizedState!==null?Jc(t,!1):Ta(e,t));break;case 30:n=yl,a=_m(),yl=!1,Ta(e,t),yl&&(t.flags|=4);var s=t.memoizedProps,f=t.stateNode;e=Rl(s,f),f=Rl(l.memoizedProps,f);var h=zl(s.default,s.update);h==="none"?e=!1:(s=l.memoizedState,l.memoizedState=null,l=t.child,Ne=0,e=Pc(t,l,e,f,h,s,!0),Ne!==(s===null?0:s.length)&&(t.flags|=32)),(t.flags&4)!==0&&e?(wa(t,t.memoizedProps.onUpdate),ml=a):a!==null&&(a.push.apply(a,ml),ml=a),yl=(t.flags&32)!==0?!0:n;break;default:Ta(e,t)}}function vl(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)Om(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:fe(l,l.return);var a=l.stateNode;typeof a.componentWillUnmount=="function"&&vm(l,l.return,a),an(l,n);break;case 27:(n&2)!==0&&kp(l.stateNode,l.type,l.memoizedProps);case 5:fe(l,l.return),l.tag!==5&&l.tag!==27||Ai(l),an(l,n);break;case 6:Ai(l);break;case 26:fe(l,l.return),a=l.stateNode,l.memoizedState!==null||a===null||Nt||a.parentNode.removeChild(a),an(l,n);break;case 22:l.memoizedState===null&&an(l,n);break;case 30:fe(l,l.return),an(l,n);break;case 7:fe(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,h=(l&1)!==0;switch(s.tag){case 0:case 11:case 15:al(a,s,l),Ci(4,s);break;case 1:if(al(a,s,l),n=s,a=n.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(C){Ot(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++)ih(T[a],x)}catch(C){Ot(n,n.return,C)}}h&&f&64&&ym(s),hl(s,s.return);break;case 27:(l&2)!==0&&jm(s);case 5:s.tag!==5&&s.tag!==27||xm(s),al(a,s,l),h&&n===null&&f&4&&Qc(s),hl(s,s.return);break;case 6:xm(s);break;case 26:x=s.stateNode,s.memoizedState!==null||x===null||ae||Yo($i(x.ownerDocument),s.type,x),al(a,s,l),h&&n===null&&f&4&&Qc(s),hl(s,s.return);break;case 12:al(a,s,l);break;case 31:al(a,s,l),h&&f&4&&Dm(a,s);break;case 13:al(a,s,l),h&&f&4&&Mm(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 ao(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&&yi(l))}function io(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&yi(t))}function Je(t,e,l,n){var a=(l&335544064)===l;if(e.subtreeFlags&(a?10262:10256))for(e=e.child;e!==null;)Lm(t,e,l,n),e=e.sibling;else a&&Nm(e)}function Lm(t,e,l,n){var a=(l&335544064)===l;a&&e.alternate===null&&e.return!==null&&e.return.alternate!==null&&mu(e);var s=e.flags;switch(e.tag){case 0:case 11:case 15:Je(t,e,l,n),s&2048&&Ci(9,e);break;case 1:Je(t,e,l,n);break;case 3:Je(t,e,l,n),a&&eo&&(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&&yi(s)));break;case 12:if(s&2048){Je(t,e,l,n),s=e.stateNode;try{var f=e.memoizedProps,h=f.id,x=f.onPostCommit;typeof x=="function"&&x(h,e.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(T){Ot(e,e.return,T)}}else Je(t,e,l,n);break;case 31:Je(t,e,l,n);break;case 13:Je(t,e,l,n);break;case 23:break;case 22:f=e.stateNode,h=e.alternate,e.memoizedState!==null?(a&&h!==null&&h.memoizedState===null&&mu(h),f._visibility&2?Je(t,e,l,n):Di(t,e)):(a&&h!==null&&h.memoizedState!==null&&mu(e),f._visibility&2?Je(t,e,l,n):(f._visibility|=2,Na(t,e,l,n,(e.subtreeFlags&10256)!==0||!1))),s&2048&&ao(h,e);break;case 24:Je(t,e,l,n),s&2048&&io(e.alternate,e);break;case 30:a&&(s=e.alternate,s!==null&&(pl(s.child,!0),pl(e.child,!0))),Je(t,e,l,n);break;default:Je(t,e,l,n)}}function Na(t,e,l,n,a){for(a=a&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var s=t,f=e,h=l,x=n,T=f.flags;switch(f.tag){case 0:case 11:case 15:Na(s,f,h,x,a),Ci(8,f);break;case 23:break;case 22:var C=f.stateNode;f.memoizedState!==null?C._visibility&2?Na(s,f,h,x,a):Di(s,f):(C._visibility|=2,Na(s,f,h,x,a)),a&&T&2048&&ao(f.alternate,f);break;case 24:Na(s,f,h,x,a),a&&T&2048&&io(f.alternate,f);break;default:Na(s,f,h,x,a)}e=e.sibling}}function Di(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:Di(l,n),a&2048&&ao(n.alternate,n);break;case 24:Di(l,n),a&2048&&io(n.alternate,n);break;default:Di(l,n)}e=e.sibling}}var Yn=8192;function Vn(t,e,l){if(t.subtreeFlags&Yn)for(t=t.child;t!==null;)Bm(t,e,l),t=t.sibling}function Bm(t,e,l){switch(t.tag){case 26:Vn(t,e,l),t.flags&Yn&&(t.memoizedState!==null?Lx(l,nl,t.memoizedState,t.memoizedProps):(t=t.stateNode,(e&335544128)===e&&Xp(l,t)));break;case 5:Vn(t,e,l),t.flags&Yn&&(t=t.stateNode,(e&335544128)===e&&Xp(l,t));break;case 3:case 4:var n=nl;nl=$i(t.stateNode.containerInfo),Vn(t,e,l),nl=n;break;case 22:t.memoizedState===null&&(n=t.alternate,n!==null&&n.memoizedState!==null?(n=Yn,Yn=16777216,Vn(t,e,l),Yn=n):Vn(t,e,l));break;case 30:if((t.flags&Yn)!==0&&(n=t.memoizedProps.name,n!=null&&n!=="auto")){var a=t.stateNode;a.paired=null,Le===null&&(Le=new Map),Le.set(n,a)}Vn(t,e,l);break;default:Vn(t,e,l)}}function qm(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 Mi(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];ie=n,Ym(n,t)}qm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)$m(t),t=t.sibling}function $m(t){switch(t.tag){case 0:case 11:case 15:Mi(t),t.flags&2048&&nn(9,t,t.return);break;case 3:Mi(t);break;case 12:Mi(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,vu(t)):Mi(t);break;default:Mi(t)}}function vu(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];ie=n,Ym(n,t)}qm(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:nn(8,e,e.return),vu(e);break;case 22:l=e.stateNode,l._visibility&2&&(l._visibility&=-3,vu(e));break;default:vu(e)}t=t.sibling}}function Ym(t,e){for(;ie!==null;){var l=ie;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:yi(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,ie=n;else t:for(l=t;ie!==null;){n=ie;var a=n.sibling,s=n.return;if(Am(n),n===l){ie=null;break t}if(a!==null){a.return=s,ie=a;break t}ie=s}}}var Dv={getCacheForType:function(t){var e=re(It),l=e.data.get(t);return l===void 0&&(l=t(),e.data.set(t,l)),l},cacheSignal:function(){return re(It).controller.signal}},Mv=typeof WeakMap=="function"?WeakMap:Map,_t=0,Dt=null,dt=null,mt=0,zt=0,Be=null,sn=!1,Ra=!1,so=!1,Hl=0,Zt=0,un=0,Gn=0,xu=0,qe=0,za=0,Ui=null,ze=null,uo=!1,bu=0,Vm=0,ju=1/0,Su=null,rn=null,Vt=0,il=null,Qn=null,xl=0,ro=0,co=null,Gm=null,Oa=null,Ca=null,Aa=null,ki=0,_u=null;function $e(){return(_t&2)!==0&&mt!==0?mt&-mt:K.T!==null?bo():Zf()}function Qm(){if(qe===0)if((mt&536870912)===0||ft){var t=ys;ys<<=1,(ys&3932160)===0&&(ys=262144),qe=t}else qe=536870912;return t=ce.current,t!==null&&(t.flags|=32),qe}function wa(t,e){if(e!=null){var l=t.stateNode,n=l.ref;n===null&&(n=l.ref=Tp(Rl(t.memoizedProps,l))),Ca===null&&(Ca=[]),Ca.push(e.bind(null,n))}}function Oe(t,e,l){(t===Dt&&(zt===2||zt===9)||t.cancelPendingCommit!==null)&&(Da(t,0),cn(t,mt,qe,!1)),ni(t,l),((_t&2)===0||t!==Dt)&&(t===Dt&&((_t&2)===0&&(Gn|=l),Zt===4&&cn(t,mt,qe,!1)),bl(t))}function Xm(t,e,l){if((_t&6)!==0)throw Error(c(327));var n=!l&&(e&127)===0&&(e&t.expiredLanes)===0||li(t,e),a=n?Hv(t,e):fo(t,e,!0),s=n;do{if(a===0){Ra&&!n&&cn(t,e,0,!1);break}else{if(l=t.current.alternate,s&&!Uv(l)){a=fo(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 h=t;a=Ui;var x=h.current.memoizedState.isDehydrated;if(x&&(Da(h,f).flags|=256),f=fo(h,f,!1),f!==2&&f!==6){if(so&&!x){h.errorRecoveryDisabledLanes|=s,Gn|=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){Da(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,qe,!sn);break t;case 2:ze=null;break;case 3:case 5:break;default:throw Error(c(329))}if((e&62914560)===e&&(a=bu+300-we(),10<a)){if(cn(n,e,qe,!sn),xs(n,0,!0)!==0)break t;xl=e,n.timeoutHandle=Ao(Zm.bind(null,n,l,ze,Su,uo,e,qe,Gn,za,sn,s,"Throttled",-0,0),a);break t}Zm(n,l,ze,Su,uo,e,qe,Gn,za,sn,s,null,-0,0)}}break}while(!0);bl(t)}function Zm(t,e,l,n,a,s,f,h,x,T,C,D,_,O){t.timeoutHandle=-1;var q=e.subtreeFlags,Z=(s&335544064)===s;if(D=null,(Z||q&8192||(q&16785408)===16785408)&&(D={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ol},Le=null,Bm(e,s,D),Z&&(q=D,Z=t.containerInfo,Z=(Z.nodeType===9?Z:Z.ownerDocument).__reactViewTransition,Z!=null&&(q.count++,q.waitingForViewTransition=!0,q=Gi.bind(q),Z.finished.then(q,q))),q=(s&62914560)===s?bu-we():(s&4194048)===s?Vm-we():0,q=Bx(D,q),q!==null)){xl=s,t.cancelPendingCommit=q(ep.bind(null,t,e,s,l,n,a,f,h,x,T,C,D,null,_,O)),cn(t,s,f,!T);return}ep(t,e,s,l,n,a,f,h,x,T,C,D)}function Uv(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(!ke(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=Yf(t,e),e&=~xu,e&=~Gn,t.suspendedLanes|=e,t.pingedLanes&=~e,n&&(t.warmLanes|=e),n=t.expirationTimes;for(var a=e;0<a;){var s=31-Me(a),f=1<<s;n[s]=-1,a&=~f}l!==0&&Gf(t,l,e)}function Eu(){return(_t&6)===0?(Hi(0),!1):!0}function oo(){if(dt!==null){if(zt===0)var t=dt.return;else t=dt,Al=wn=null,vc(t),xa=null,bi=0,t=dt;for(;t!==null;)gm(t.alternate,t),t=t.return;dt=null}}function Da(t,e){var l=t.timeoutHandle;return l!==-1&&(t.timeoutHandle=-1,ix(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),xl=0,oo(),Dt=t,dt=l=Ol(t.current,null),mt=e,zt=0,Be=null,sn=!1,Ra=li(t,e),so=!1,za=qe=xu=Gn=un=Zt=0,ze=Ui=null,uo=!1,Hl=Yf(t,e),ws(),l}function Km(t,e){rt=null,K.H=nu,e===va||e===Vs?(e=eh(),zt=3):e===ic?(e=eh(),zt=4):zt=e===Dc?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,Be=e,dt===null&&(Zt=1,au(t,Qe(e,t.current)))}function Jm(){var t=ce.current;return t===null?!0:(mt&4194048)===mt?ye===null:(mt&62914560)===mt||(mt&536870912)!==0?t===ye:!1}function Im(){var t=K.H;return K.H=nu,t===null?nu:t}function Fm(){var t=K.A;return K.A=Dv,t}function Tu(){Zt=4,sn||(mt&4194048)!==mt&&ce.current!==null||(Ra=!0),(un&134217727)===0&&(Gn&134217727)===0||Dt===null||cn(Dt,mt,qe,!1)}function fo(t,e,l){var n=_t;_t|=2;var a=Im(),s=Fm();(Dt!==t||mt!==e)&&(Su=null,Da(t,e)),e=!1;var f=Zt;t:do try{if(zt!==0&&dt!==null){var h=dt,x=Be;switch(zt){case 8:oo(),f=6;break t;case 3:case 2:case 9:case 6:ce.current===null&&(e=!0);var T=zt;if(zt=0,Be=null,Ma(t,h,x,T),l&&Ra){f=0;break t}break;default:T=zt,zt=0,Be=null,Ma(t,h,x,T)}}kv(),f=Zt;break}catch(C){Km(t,C)}while(!0);return e&&t.shellSuspendCounter++,Al=wn=null,_t=n,K.H=a,K.A=s,dt===null&&(Dt=null,mt=0,ws()),f}function kv(){for(;dt!==null;)Wm(dt)}function Hv(t,e){var l=_t;_t|=2;var n=Im(),a=Fm();Dt!==t||mt!==e?(Su=null,ju=we()+500,Da(t,e)):Ra=li(t,e);t:do try{if(zt!==0&&dt!==null){e=dt;var s=Be;e:switch(zt){case 1:zt=0,Be=null,Ma(t,e,s,1);break;case 2:case 9:if(Pd(s)){zt=0,Be=null,Pm(e);break}e=function(){zt!==2&&zt!==9||Dt!==t||(zt=7),bl(t)},s.then(e,e);break t;case 3:zt=7;break t;case 4:zt=5;break t;case 7:Pd(s)?(zt=0,Be=null,Pm(e)):(zt=0,Be=null,Ma(t,e,s,7));break;case 5:var f=null;switch(dt.tag){case 26:f=dt.memoizedState;case 5:case 27:var h=dt;if(f?Gp(f):h.stateNode.complete){zt=0,Be=null;var x=h.sibling;if(x!==null)dt=x;else{var T=h.return;T!==null?(dt=T,Nu(T)):dt=null}break e}}zt=0,Be=null,Ma(t,e,s,5);break;case 6:zt=0,Be=null,Ma(t,e,s,6);break;case 8:oo(),Zt=6;break t;default:throw Error(c(462))}}Lv();break}catch(C){Km(t,C)}while(!0);return Al=wn=null,K.H=n,K.A=a,_t=l,dt!==null?0:(Dt=null,mt=0,ws(),Zt)}function Lv(){for(;dt!==null&&!ey();)Wm(dt)}function Wm(t){var e=mm(t.alternate,t,Hl);t.memoizedProps=t.pendingProps,e===null?Nu(t):dt=e}function Pm(t){var e=t,l=e.alternate;switch(e.tag){case 15:case 0:e=um(l,e,e.pendingProps,e.type,void 0,mt);break;case 11:e=um(l,e,e.pendingProps,e.type.render,e.ref,mt);break;case 5:vc(e);var n=e;n===ne&&(ft?(Ls(n),n.tag===5&&n.stateNode!=null&&(Ut=n.stateNode)):(Ls(n),ft=!0));default:gm(l,e),e=dt=Yd(e,Hl),e=mm(l,e,Hl)}t.memoizedProps=t.pendingProps,e===null?Nu(t):dt=e}function Ma(t,e,l,n){Al=wn=null,vc(e),xa=null,bi=0;var a=e.return;try{if(Tv(t,a,e,l,mt)){Zt=1,au(t,Qe(l,t.current)),dt=null;return}}catch(s){if(a!==null)throw dt=a,s;Zt=1,au(t,Qe(l,t.current)),dt=null;return}e.flags&32768?(ft||n===1?t=!0:Ra||(mt&536870912)!==0?t=!1:(sn=t=!0,(n===2||n===9||n===3||n===6)&&(n=ce.current,n!==null&&n.tag===13&&(n.flags|=16384))),tp(e,t)):Nu(e)}function Nu(t){var e=t;do{if((e.flags&32768)!==0){tp(e,sn);return}t=e.return;var l=Ov(e.alternate,e,Hl);if(l!==null){dt=l;return}if(e=e.sibling,e!==null){dt=e;return}dt=e=t}while(e!==null);Zt===0&&(Zt=5)}function tp(t,e){do{var l=Cv(t.alternate,t);if(l!==null){l.flags&=32767,dt=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!e&&(t=t.sibling,t!==null)){dt=t;return}dt=t=l}while(t!==null);Zt=6,dt=null}function ep(t,e,l,n,a,s,f,h,x,T,C,D){t.cancelPendingCommit=null;do Ru();while(Vt!==0);if((_t&6)!==0)throw Error(c(327));if(e!==null){if(e===t.current)throw Error(c(177));t===Dt&&(dt=Dt=null,mt=0),Qn=e,il=t,xl=l,co=a,Gm=n,Bv(t,e,l,f,h,x,D)}}function Bv(t,e,l,n,a,s,f){var h=e.lanes|e.childLanes;if(ro=h,h|=Xr,fy(t,l,h,n,a,s),Ca=null,(l&335544064)===l?(Aa=hv(t),n=10262):(Aa=null,n=10256),(e.subtreeFlags&n)!==0||(e.flags&n)!==0?(t.callbackNode=null,t.callbackPriority=0,Qv(ps,function(){return go(),null})):(t.callbackNode=null,t.callbackPriority=0),du=!1,n=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||n){n=K.T,K.T=null,a=st.p,st.p=2,s=_t,_t|=4;try{Av(t,e,l)}finally{_t=s,st.p=a,K.T=n}}Vt=1,du?Oa=fx(f,t.containerInfo,Aa,ho,mo,$v,po,go,qv):(ho(),mo(),po())}function qv(t){if(Vt!==0){var e=il.onRecoverableError;e(t,{componentStack:null})}}function $v(){Vt===3&&(Vt=0,Hm(Qn,il),Vt=4)}function ho(){if(Vt===1){Vt=0;var t=il,e=Qn,l=xl,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=K.T,K.T=null;var a=st.p;st.p=2;var s=_t;_t|=4;try{wi=pu=!1,Um(e,t,l),l=zo;var f=wd(t.containerInfo),h=l.focusedElem,x=l.selectionRange;if(f!==h&&h&&h.ownerDocument&&Ad(h.ownerDocument.documentElement,h)){if(x!==null&&$r(h)){var T=x.start,C=x.end;if(C===void 0&&(C=T),"selectionStart"in h)h.selectionStart=T,h.selectionEnd=Math.min(C,h.value.length);else{var D=h.ownerDocument||document,_=D&&D.defaultView||window;if(_.getSelection){var O=_.getSelection(),q=h.textContent.length,Z=Math.min(x.start,q),ct=x.end===void 0?Z:Math.min(x.end,q);!O.extend&&Z>ct&&(f=ct,ct=Z,Z=f);var E=Cd(h,Z),j=Cd(h,ct);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(),Z>ct?(O.addRange(z),O.extend(j.node,j.offset)):(z.setEnd(j.node,j.offset),O.addRange(z))}}}}for(D=[],O=h;O=O.parentNode;)O.nodeType===1&&D.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<D.length;h++){var w=D[h];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}Ya=!!Ro,zo=Ro=null}finally{_t=s,st.p=a,K.T=n}}t.current=e,Vt=2}}function mo(){if(Vt===2){Vt=0;var t=il,e=Qn,l=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||l){l=K.T,K.T=null;var n=st.p;st.p=2;var a=_t;_t|=4;try{Om(t,e.alternate,e)}finally{_t=a,st.p=n,K.T=l}}Vt=3}}function po(){if(Vt===4||Vt===3){Vt=0;var t=Oa;Oa=null,ly();var e=il,l=Qn,n=xl,a=Gm,s=(n&335544064)===n?10262:10256;if((l.subtreeFlags&s)!==0||(l.flags&s)!==0?Vt=5:(Vt=0,Qn=il=null,lp(e,e.pendingLanes)),s=e.pendingLanes,s===0&&(rn=null),_r(n),l=l.stateNode,De&&typeof De.onCommitFiberRoot=="function")try{De.onCommitFiberRoot(ei,l,void 0,(l.current.flags&128)===128)}catch{}if(a!==null){l=K.T,s=st.p,st.p=2,K.T=null;try{for(var f=e.onRecoverableError,h=0;h<a.length;h++){var x=a[h];f(x.value,{componentStack:x.stack})}}finally{K.T=l,st.p=s}}if(a=Ca,f=Aa,Aa=null,a!==null&&(Ca=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&&Ru(),bl(e),s=e.pendingLanes,(n&261930)!==0&&(s&42)!==0?e===_u?ki++:(ki=0,_u=e):(ki=0,_u=null),Hi(0)}}function lp(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,yi(e)))}function Ru(){return Oa!==null&&(Oa.skipTransition(),Oa=null),ho(),mo(),po(),go()}function go(){if(Vt!==5)return!1;var t=il,e=ro;ro=0;var l=_r(xl),n=K.T,a=st.p;try{st.p=32>l?32:l,K.T=null,l=co,co=null;var s=il,f=xl;if(Vt=0,Qn=il=null,xl=0,(_t&6)!==0)throw Error(c(331));var h=_t;if(_t|=4,$m(s.current),Lm(s,s.current,f,l),_t=h,Hi(0,!1),De&&typeof De.onPostCommitFiberRoot=="function")try{De.onPostCommitFiberRoot(ei,s)}catch{}return!0}finally{st.p=a,K.T=n,lp(t,e)}}function np(t,e,l){e=Qe(l,e),e=wc(t.stateNode,e,2),t=Pl(t,e,2),t!==null&&(ni(t,2),bl(t))}function Ot(t,e,l){if(t.tag===3)np(t,t,l);else for(;e!==null;){if(e.tag===3){np(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=Qe(l,t),l=Ph(2),n=Pl(e,l,2),n!==null&&(tm(l,n,e,t),ni(n,2),bl(n));break}}e=e.return}}function yo(t,e,l){var n=t.pingCache;if(n===null){n=t.pingCache=new Mv;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)||(so=!0,a.add(l),t=Yv.bind(null,t,e,l),e.then(t,t))}function Yv(t,e,l){var n=t.pingCache;n!==null&&n.delete(e),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Dt===t&&(mt&l)===l&&((Zt===4||Zt===3&&(mt&62914560)===mt&&300>we()-bu)&&(_t&2)===0?Da(t,0):xu|=l,za===mt&&(za=0)),bl(t)}function ap(t,e){e===0&&(e=Vf()),t=On(t,e),t!==null&&(ni(t,e),bl(t))}function Vv(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),ap(t,l)}function Gv(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),ap(t,l)}function Qv(t,e){return xr(t,e)}var Ua=null,ka=null,vo=!1,zu=!1,xo=!1,on=0;function bl(t){t!==ka&&t.next===null&&(ka===null?Ua=ka=t:ka=ka.next=t),zu=!0,vo||(vo=!0,Zv())}function Hi(t,e){if(!xo&&zu){xo=!0;do for(var l=!1,n=Ua;n!==null;){if(t!==0){var a=n.pendingLanes;if(a===0)var s=0;else{var f=n.suspendedLanes,h=n.pingedLanes;s=(1<<31-Me(42|t)+1)-1,s&=a&~(f&~h),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(l=!0,rp(n,s))}else s=mt,s=xs(n,n===Dt?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(s&3)===0||li(n,s)||(l=!0,rp(n,s));n=n.next}while(l);xo=!1}}function Xv(){ip()}function ip(){zu=vo=!1;var t=0;on!==0&&ax()&&(t=on);for(var e=we(),l=null,n=Ua;n!==null;){var a=n.next,s=sp(n,e);s===0?(n.next=null,l===null?Ua=a:l.next=a,a===null&&(ka=l)):(l=n,(t!==0||(s&3)!==0)&&(zu=!0)),n=a}Vt!==0&&Vt!==5||Hi(t),on!==0&&(on=0)}function sp(t,e){for(var l=t.suspendedLanes,n=t.pingedLanes,a=t.expirationTimes,s=t.pendingLanes&-62914561;0<s;){var f=31-Me(s),h=1<<f,x=a[f];x===-1?((h&l)===0||(h&n)!==0)&&(a[f]=oy(h,e)):x<=e&&(t.expiredLanes|=h),s&=~h}if(e=Dt,l=mt,l=xs(t,t===e?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n=t.callbackNode,l===0||t===e&&(zt===2||zt===9)||t.cancelPendingCommit!==null)return n!==null&&n!==null&&br(n),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||li(t,l)){if(e=l&-l,e===t.callbackPriority)return e;switch(n!==null&&br(n),_r(l)){case 2:case 8:l=qf;break;case 32:l=ps;break;case 268435456:l=$f;break;default:l=ps}return n=up.bind(null,t),l=xr(l,n),t.callbackPriority=e,t.callbackNode=l,e}return n!==null&&n!==null&&br(n),t.callbackPriority=2,t.callbackNode=null,2}function up(t,e){if(Vt!==0&&Vt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(Ru()&&t.callbackNode!==l)return null;var n=mt;return n=xs(t,t===Dt?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n===0?null:(Xm(t,n,e),sp(t,we()),t.callbackNode!=null&&t.callbackNode===l?up.bind(null,t):null)}function rp(t,e){if(Ru())return null;Xm(t,e,!0)}function Zv(){sx(function(){(_t&6)!==0?xr(Bf,Xv):ip()})}function bo(){if(on===0){var t=Un;t===0&&(t=gs,gs<<=1,(gs&261888)===0&&(gs=256)),on=t}return on}function cp(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Es(t)}function Kv(t,e,l,n,a){if(e==="submit"&&l&&l.stateNode===a){var s=cp((a[Ee]||null).action),f=n.submitter;f&&(e=(e=f[Ee]||null)?cp(e.formAction):f.getAttribute("formAction"),e!==null&&(s=e,f=null));var h=new zs("action","action",null,n,a);t.push({event:h,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(on!==0){var x=new FormData(a,f);Rc(l,{pending:!0,data:x,method:a.method,action:s},null,x)}}else typeof s=="function"&&(h.preventDefault(),x=new FormData(a,f),Rc(l,{pending:!0,data:x,method:a.method,action:s},s,x))},currentTarget:a}]})}}for(var jo=0;jo<Qr.length;jo++){var So=Qr[jo],Jv=So.toLowerCase(),Iv=So[0].toUpperCase()+So.slice(1);el(Jv,"on"+Iv)}el(Ud,"onAnimationEnd"),el(kd,"onAnimationIteration"),el(Hd,"onAnimationStart"),el("dblclick","onDoubleClick"),el("focusin","onFocus"),el("focusout","onBlur"),el(iv,"onTransitionRun"),el(sv,"onTransitionStart"),el(uv,"onTransitionCancel"),el(Ld,"onTransitionEnd"),aa("onMouseEnter",["mouseout","mouseover"]),aa("onMouseLeave",["mouseout","mouseover"]),aa("onPointerEnter",["pointerout","pointerover"]),aa("onPointerLeave",["pointerout","pointerover"]),Nn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Nn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Nn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Nn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Nn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Nn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Li="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Fv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Li));function op(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 h=n[f],x=h.instance,T=h.currentTarget;if(h=h.listener,x!==s&&a.isPropagationStopped())break t;s=h,a.currentTarget=T;try{s(a)}catch(C){As(C)}a.currentTarget=null,s=x}else for(f=0;f<n.length;f++){if(h=n[f],x=h.instance,T=h.currentTarget,h=h.listener,x!==s&&a.isPropagationStopped())break t;s=h,a.currentTarget=T;try{s(a)}catch(C){As(C)}a.currentTarget=null,s=x}}}}function ht(t,e){var l=e[Jf];l===void 0&&(l=e[Jf]=new Set);var n=t+"__bubble";l.has(n)||(fp(e,t,2,!1),l.add(n))}function _o(t,e,l){var n=0;e&&(n|=4),fp(l,t,n,e)}var Ou="_reactListening"+Math.random().toString(36).slice(2);function Eo(t){if(!t[Ou]){t[Ou]=!0,Wf.forEach(function(l){l!=="selectionchange"&&(Fv.has(l)||_o(l,!1,t),_o(l,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Ou]||(e[Ou]=!0,_o("selectionchange",!1,e))}}function fp(t,e,l,n){switch(t0(e)){case 2:var a=Vx;break;case 8:a=Gx;break;default:a=Go}l=a.bind(null,e,l,t),a=void 0,!Ar||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 To(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 h=n.stateNode.containerInfo;if(h===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(;h!==null;){if(f=Tn(h),f===null)return;if(x=f.tag,x===5||x===6||x===26||x===27){n=s=f;continue t}h=h.parentNode}}n=n.return}fd(function(){var T=s,C=Or(l),D=[];t:{var _=Bd.get(t);if(_!==void 0){var O=zs,q=t;switch(t){case"keypress":if(Ns(l)===0)break t;case"keydown":case"keyup":O=Uy;break;case"focusin":q="focus",O=Ur;break;case"focusout":q="blur",O=Ur;break;case"beforeblur":case"afterblur":O=Ur;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=md;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=_y;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=qy;break;case Ud:case kd:case Hd:O=Ny;break;case Ld:O=Yy;break;case"scroll":case"scrollend":O=jy;break;case"wheel":O=Gy;break;case"copy":case"cut":case"paste":O=zy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=gd;break;case"submit":O=Ly;break;case"toggle":case"beforetoggle":O=Xy}var Z=(e&4)!==0,ct=!Z&&(t==="scroll"||t==="scrollend"),E=Z?_!==null?_+"Capture":null:_;Z=[];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=si(j,E),w!=null&&Z.push(Bi(j,w,z))),ct)break;j=j.return}0<Z.length&&(_=new O(_,q,null,l,C),D.push({event:_,listeners:Z}))}}if((e&7)===0){t:{if(O=t==="mouseover"||t==="pointerover",_=t==="mouseout"||t==="pointerout",O&&l!==zr&&(q=l.relatedTarget||l.fromElement)&&(Tn(q)||q[ea]))break t;(_||O)&&(q=C.window===C?C:(O=C.ownerDocument)?O.defaultView||O.parentWindow:window,_?(O=l.relatedTarget||l.toElement,_=T,O=O?Tn(O):null,O!==null&&(ct=m(O),Z=O.tag,O!==ct||Z!==5&&Z!==27&&Z!==6)&&(O=null)):(_=null,O=T),_!==O&&(Z=md,w="onMouseLeave",E="onMouseEnter",j="mouse",(t==="pointerout"||t==="pointerover")&&(Z=gd,w="onPointerLeave",E="onPointerEnter",j="pointer"),ct=_==null?q:ii(_),z=O==null?q:ii(O),q=new Z(w,j+"leave",_,l,C),q.target=ct,q.relatedTarget=z,w=null,Tn(C)===T&&(Z=new Z(E,j+"enter",O,l,C),Z.target=z,Z.relatedTarget=ct,w=Z),ct=w,Z=_&&O?ot(_,O,Wv):null,_!==null&&dp(D,q,_,Z,!1),O!==null&&ct!==null&&dp(D,ct,O,Z,!0)))}t:{if(_=T?ii(T):window,O=_.nodeName&&_.nodeName.toLowerCase(),O==="select"||O==="input"&&_.type==="file")var G=Ed;else if(Sd(_))if(Td)G=lv;else{G=tv;var pt=Py}else O=_.nodeName,!O||O.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?T&&Rr(T.elementType)&&(G=Ed):G=ev;if(G&&(G=G(t,T))){_d(D,G,l,C);break t}pt&&pt(t,_,T)}switch(pt=T?ii(T):window,t){case"focusin":(Sd(pt)||pt.contentEditable==="true")&&(oa=pt,Yr=T,mi=null);break;case"focusout":mi=Yr=oa=null;break;case"mousedown":Vr=!0;break;case"contextmenu":case"mouseup":case"dragend":Vr=!1,Dd(D,l,C);break;case"selectionchange":if(av)break;case"keydown":case"keyup":Dd(D,l,C)}var J;if(Hr)t:{switch(t){case"compositionstart":var lt="onCompositionStart";break t;case"compositionend":lt="onCompositionEnd";break t;case"compositionupdate":lt="onCompositionUpdate";break t}lt=void 0}else ca?bd(t,l)&&(lt="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(lt="onCompositionStart");lt&&(yd&&l.locale!=="ko"&&(ca||lt!=="onCompositionStart"?lt==="onCompositionEnd"&&ca&&(J=dd()):(Gl=C,wr="value"in Gl?Gl.value:Gl.textContent,ca=!0)),pt=Cu(T,lt),0<pt.length&&(lt=new pd(lt,t,null,l,C),D.push({event:lt,listeners:pt}),J?lt.data=J:(J=jd(l),J!==null&&(lt.data=J)))),(J=Ky?Jy(t,l):Iy(t,l))&&(lt=Cu(T,"onBeforeInput"),0<lt.length&&(pt=new pd("onBeforeInput","beforeinput",null,l,C),D.push({event:pt,listeners:lt}),pt.data=J)),Kv(D,t,T,l,C)}op(D,e)})}function Bi(t,e,l){return{instance:t,listener:e,currentTarget:l}}function Cu(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=si(t,l),a!=null&&n.unshift(Bi(t,a,s)),a=si(t,e),a!=null&&n.push(Bi(t,a,s))),t.tag===3)return n;t=t.return}return[]}function Wv(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function dp(t,e,l,n,a){for(var s=e._reactName,f=[];l!==null&&l!==n;){var h=l,x=h.alternate,T=h.stateNode;if(h=h.tag,x!==null&&x===n)break;h!==5&&h!==26&&h!==27||T===null||(x=T,a?(T=si(l,s),T!=null&&f.unshift(Bi(l,T,x))):a||(T=si(l,s),T!=null&&f.push(Bi(l,T,x)))),l=l.return}f.length!==0&&t.push({event:e,listeners:f})}var Pv=/\r\n?/g,tx=/\u0000|\uFFFD/g;function hp(t){return(typeof t=="string"?t:""+t).replace(Pv,`
|
|
49
|
+
`).replace(tx,"")}function mp(t,e){return e=hp(e),hp(t)===e}function Ct(t,e,l,n,a,s){switch(l){case"children":if(typeof n=="string")e==="body"||e==="textarea"&&n===""||sa(t,n);else if(typeof n=="number"||typeof n=="bigint")e!=="body"&&sa(t,""+n);else return;break;case"className":_s(t,"class",n);break;case"tabIndex":_s(t,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":_s(t,l,n);break;case"style":cd(t,n,s);return;case"data":if(e!=="object"){_s(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=Es(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"&&Ct(t,e,"name",a.name,a,null),Ct(t,e,"formEncType",a.formEncType,a,null),Ct(t,e,"formMethod",a.formMethod,a,null),Ct(t,e,"formTarget",a.formTarget,a,null)):(Ct(t,e,"encType",a.encType,a,null),Ct(t,e,"method",a.method,a,null),Ct(t,e,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(l);break}n=Es(n),t.setAttribute(l,n);break;case"onClick":n!=null&&(t.onclick=ol);return;case"onScroll":n!=null&&ht("scroll",t);return;case"onScrollEnd":n!=null&&ht("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=Es(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":ht("beforetoggle",t),ht("toggle",t),Ss(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":Ss(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=xy.get(l)||l,Ss(t,l,n);else return}jt=!0}function No(t,e,l,n,a,s){switch(l){case"style":cd(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")sa(t,n);else if(typeof n=="number"||typeof n=="bigint")sa(t,""+n);else return;break;case"onScroll":n!=null&&ht("scroll",t);return;case"onScrollEnd":n!=null&&ht("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(!Pf.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}jt=!0,l in t?t[l]=n:n===!0?t.setAttribute(l,""):Ss(t,l,n)}return}jt=!0}function de(t,e,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ht("error",t),ht("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:Ct(t,e,s,f,l,null)}}a&&Ct(t,e,"srcSet",l.srcSet,l,null),n&&Ct(t,e,"src",l.src,l,null);return;case"input":ht("invalid",t);var h=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":h=C;break;case"children":case"dangerouslySetInnerHTML":if(C!=null)throw Error(c(137,e));break;default:Ct(t,e,n,C,l,null)}}id(t,s,h,x,T,f,a,!1);return;case"select":ht("invalid",t),n=f=s=null;for(a in l)if(l.hasOwnProperty(a)&&(h=l[a],h!=null))switch(a){case"value":s=h;break;case"defaultValue":f=h;break;case"multiple":n=h;default:Ct(t,e,a,h,l,null)}e=s,l=f,t.multiple=!!n,e!=null?ia(t,!!n,e,!1):l!=null&&ia(t,!!n,l,!0);return;case"textarea":ht("invalid",t),s=a=n=null;for(f in l)if(l.hasOwnProperty(f)&&(h=l[f],h!=null))switch(f){case"value":n=h;break;case"defaultValue":a=h;break;case"children":s=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(c(91));break;default:Ct(t,e,f,h,l,null)}ud(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:Ct(t,e,x,n,l,null)}return;case"dialog":ht("beforetoggle",t),ht("toggle",t),ht("cancel",t),ht("close",t);break;case"iframe":case"object":ht("load",t);break;case"video":case"audio":for(n=0;n<Li.length;n++)ht(Li[n],t);break;case"image":ht("error",t),ht("load",t);break;case"details":ht("toggle",t);break;case"embed":case"source":case"link":ht("error",t),ht("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:Ct(t,e,T,n,l,null)}return;default:if(Rr(e)){for(C in l)l.hasOwnProperty(C)&&(n=l[C],n!==void 0&&No(t,e,C,n,l,void 0));return}}for(h in l)l.hasOwnProperty(h)&&(n=l[h],n!=null&&Ct(t,e,h,n,l,null))}var ex={};function lx(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,h=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)||Ct(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&&(jt=!0),s=O;break;case"name":O!==D&&(jt=!0),a=O;break;case"checked":O!==D&&(jt=!0),T=O;break;case"defaultChecked":O!==D&&(jt=!0),C=O;break;case"value":O!==D&&(jt=!0),f=O;break;case"defaultValue":O!==D&&(jt=!0),h=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(c(137,e));break;default:O!==D&&Ct(t,e,_,O,n,D)}}Tr(t,f,h,x,T,C,s,a);return;case"select":O=f=h=_=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)||Ct(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&&(jt=!0),_=s;break;case"defaultValue":s!==x&&(jt=!0),h=s;break;case"multiple":s!==x&&(jt=!0),f=s;default:s!==x&&Ct(t,e,a,s,n,x)}e=h,l=f,n=O,_!=null?ia(t,!!l,_,!1):!!n!=!!l&&(e!=null?ia(t,!!l,e,!0):ia(t,!!l,l?[]:"",!1));return;case"textarea":O=_=null;for(h in l)if(a=l[h],l.hasOwnProperty(h)&&a!=null&&!n.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:Ct(t,e,h,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&&(jt=!0),_=a;break;case"defaultValue":a!==s&&(jt=!0),O=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(c(91));break;default:a!==s&&Ct(t,e,f,a,n,s)}sd(t,_,O);return;case"option":for(var q in l)if(_=l[q],l.hasOwnProperty(q)&&_!=null&&!n.hasOwnProperty(q))switch(q){case"selected":t.selected=!1;break;default:Ct(t,e,q,null,n,_)}for(x in n)if(_=n[x],O=l[x],n.hasOwnProperty(x)&&_!==O&&(_!=null||O!=null))switch(x){case"selected":_!==O&&(jt=!0),t.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:Ct(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 Z in l)_=l[Z],l.hasOwnProperty(Z)&&_!=null&&!n.hasOwnProperty(Z)&&Ct(t,e,Z,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:Ct(t,e,T,_,n,O)}return;default:if(Rr(e)){for(var ct in l)_=l[ct],l.hasOwnProperty(ct)&&_!==void 0&&!n.hasOwnProperty(ct)&&No(t,e,ct,void 0,n,_);for(C in n)_=n[C],O=l[C],!n.hasOwnProperty(C)||_===O||_===void 0&&O===void 0||No(t,e,C,_,n,O);return}}for(var E in l)_=l[E],l.hasOwnProperty(E)&&_!=null&&!n.hasOwnProperty(E)&&Ct(t,e,E,null,n,_);for(D in n)_=n[D],O=l[D],!n.hasOwnProperty(D)||_===O||_==null&&O==null||Ct(t,e,D,_,n,O)}function pp(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function nx(){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,h=a.duration;if(s&&h&&pp(f)){for(f=0,h=a.responseEnd,n+=1;n<l.length;n++){var x=l[n],T=x.startTime;if(T>h)break;var C=x.transferSize,D=x.initiatorType;C&&pp(D)&&(x=x.responseEnd,f+=C*(x<h?1:(h-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 Ro=null,zo=null;function qi(t){return t.nodeType===9?t:t.ownerDocument}function gp(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 yp(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 vp(t,e,l,n){return l=qi(l).createElement(t),l[ue]=n,l[Ee]=e,de(l,t,e),le(l),l}function Oo(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 Co=null;function ax(){var t=window.event;return t&&t.type==="popstate"?t===Co?!1:(Co=t,!0):(Co=null,!1)}var Ao=typeof setTimeout=="function"?setTimeout:void 0,ix=typeof clearTimeout=="function"?clearTimeout:void 0,xp=typeof Promise=="function"?Promise:void 0,bp=typeof requestAnimationFrame=="function"?requestAnimationFrame:Ao,sx=typeof queueMicrotask=="function"?queueMicrotask:typeof xp<"u"?function(t){return xp.resolve(null).then(t).catch(ux)}:Ao;function ux(t){setTimeout(function(){throw t})}function fn(t){return t==="head"}function jp(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),Va(e);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")Bo(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,Bo(l);for(var s=l.firstChild;s;){var f=s.nextSibling,h=s.nodeName;s[ai]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&s.rel.toLowerCase()==="stylesheet"||l.removeChild(s),s=f}}else l==="body"&&Bo(t.ownerDocument.body);l=a}while(l);Va(e)}function Sp(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 _p(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 Ep(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 rx(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 wo(t){var e=t.getBoundingClientRect(),l=getComputedStyle(t);return rx(e,l,t)}function cx(t){return t.documentElement.clientHeight}function ox(t){this.addEventListener("load",t),this.addEventListener("error",t)}function fx(t,e,l,n,a,s,f,h,x){var T=e.nodeType===9?e:e.ownerDocument;try{var C=T.startViewTransition({update:function(){var _=T.defaultView,O=_.navigation&&_.navigation.transition,q=T.fonts.status;n();var Z=[];if(q==="loaded"&&(cx(T),T.fonts.status==="loading"&&Z.push(T.fonts.ready)),q=Z.length,t!==null)for(var ct=t.suspenseyImages,E=0,j=0;j<ct.length;j++){var z=ct[j];if(!z.complete){var w=z.getBoundingClientRect();if(0<w.bottom&&0<w.right&&w.top<_.innerHeight&&w.left<_.innerWidth){if(E+=Qp(z),E>Du){Z.length=q;break}z=new Promise(ox.bind(z)),Z.push(z)}}}if(0<Z.length)return _=Promise.race([Promise.all(Z),new Promise(function(G){return setTimeout(G,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 q=_[O],Z=q.effect,ct=Z.pseudoElement;if(ct!=null&&ct.startsWith("::view-transition")){D.push(q),q=Z.getKeyframes();for(var E=ct=void 0,j=!0,z=0;z<q.length;z++){var w=q[z],G=w.width;if(ct===void 0)ct=G;else if(ct!==G){j=!1;break}if(G=w.height,E===void 0)E=G;else if(E!==G){j=!1;break}delete w.width,delete w.height,w.transform==="none"&&delete w.transform}j&&ct!==void 0&&E!==void 0&&(Z.setKeyframes(q),j=getComputedStyle(Z.target,Z.pseudoElement),j.width!==ct||j.height!==E)&&(j=q[0],j.width=ct,j.height=E,j=q[q.length-1],j.width=ct,j.height=E,Z.setKeyframes(q))}}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),h()}),C}catch{return n(),a(),f(),null}}function Xn(t,e){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+e+")"}Xn.prototype.animate=function(t,e){return e=typeof e=="number"?{duration:e}:P({},e),e.pseudoElement=this._selector,this._scope.animate(t,e)},Xn.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},Xn.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Tp(t){return{name:t,group:new Xn("group",t),imagePair:new Xn("image-pair",t),old:new Xn("old",t),new:new Xn("new",t)}}function Ye(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}Ye.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(Rp(s,t,e,l)===-1){var f=this,h=e;l!=null&&typeof l!="boolean"&&l.once===!0&&(h=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=Ha(l),s.push({type:t,listener:e,optionsOrUseCapture:l,attachedListener:h,cleanup:a}),v(this._fragmentFiber.child,!1,dx,t,h,n)}this._eventListeners=s}};function dx(t,e,l,n){return L(t).addEventListener(e,l,n),!1}Ye.prototype.removeEventListener=function(t,e,l){var n=this._eventListeners;if(n!==null&&(e=Rp(n,t,e,l),e!==-1)){var a=n[e];l=a.attachedListener;var s=a.cleanup;a=Ha(a.optionsOrUseCapture),v(this._fragmentFiber.child,!1,hx,t,l,a),n.splice(e,1),s!==null&&s()}};function hx(t,e,l,n){return L(t).removeEventListener(e,l,n),!1}function Ha(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function Np(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function Rp(t,e,l,n){if(t.length===0)return-1;n=Np(n);for(var a=0;a<t.length;a++){var s=t[a];if(s.type===e&&s.listener===l&&Np(s.optionsOrUseCapture)===n)return a}return-1}Ye.prototype.dispatchEvent=function(t){var e=A(this._fragmentFiber);if(e===null)return!0;e=L(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,Ha(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,Ha(s.optionsOrUseCapture));return e.removeChild(n),t}return e.dispatchEvent(t)},Ye.prototype.focus=function(t){v(this._fragmentFiber.child,!0,zp,t,void 0,void 0)};function zp(t,e){return t.tag===6?!1:(t=L(t),Tx(t,e))}Ye.prototype.focusLast=function(t){var e=[];v(this._fragmentFiber.child,!0,Do,e,void 0,void 0);for(var l=e.length-1;0<=l&&!zp(e[l],t);l--);};function Do(t,e){return e.push(t),!1}Ye.prototype.blur=function(){var t=A(this._fragmentFiber);t!==null&&(t=L(t),t=qi(t).activeElement,t!==null&&v(this._fragmentFiber.child,!1,mx,t,void 0,void 0))};function mx(t,e){return t.tag===6?!1:(t=L(t),t===e||t.contains(e)?(e.blur(),!0):!1)}Ye.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),v(this._fragmentFiber.child,!1,px,t,void 0,void 0)};function px(t,e){return t.tag===6||(t=L(t),e.observe(t)),!1}Ye.prototype.unobserveUsing=function(t){var e=this._observers;if(e!==null&&e.has(t)){e.delete(t),v(this._fragmentFiber.child,!1,gx,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 gx(t,e){return t.tag===6||(t=L(t),e.unobserve(t)),!1}var sl=[],Mo=!1;function yx(t,e,l){sl.push({fragmentInstance:t,observer:e,instance:l}),Mo||(Mo=!0,Nx(function(){Mo=!1;var n=sl;sl=[];for(var a=0;a<n.length;a++){var s=n[a];s.observer.unobserve(s.instance)}}))}Ye.prototype.getClientRects=function(){var t=[];return v(this._fragmentFiber.child,!1,vx,t,void 0,void 0),t};function vx(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=L(t),e.push.apply(e,t.getClientRects());return!1}Ye.prototype.getRootNode=function(t){var e=A(this._fragmentFiber);return e===null?this:L(e).getRootNode(t)},Ye.prototype.compareDocumentPosition=function(t){var e=A(this._fragmentFiber);if(e===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];v(this._fragmentFiber.child,!1,Do,l,void 0,void 0);var n=L(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=Q(e)[1],l===null?a=Node.DOCUMENT_POSITION_PRECEDING:(t=L(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=L(l[0]),a=L(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),h=a.compareDocumentPosition(t),x=f&Node.DOCUMENT_POSITION_CONTAINED_BY||h&Node.DOCUMENT_POSITION_CONTAINED_BY;return h=n&&s&&f&Node.DOCUMENT_POSITION_FOLLOWING&&h&Node.DOCUMENT_POSITION_PRECEDING,e=n&&e===t||s&&a===t||x||h?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||xx(e,this._fragmentFiber,l[0],l[l.length-1],t)?e:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function xx(t,e,l,n,a){var s=Tn(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=ot(l,s,Y),e===null?e=!1:(v(e,!0,M,s,l),s=$,$=null,e=s!==null)),e):t&Node.DOCUMENT_POSITION_FOLLOWING?((e=!!s)&&!(e=s===n)&&(e=ot(n,s,Y),e===null?e=!1:(v(e,!0,H,s,n),s=$,I=$=null,e=s!==null)),e):!1}function Op(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)}Ye.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(c(566));var e=[];v(this._fragmentFiber.child,!1,Do,e,void 0,void 0);var l=t!==!1;if(e.length===0){var n=Q(this._fragmentFiber);if(n=l?n[1]||n[0]||A(this._fragmentFiber):n[0]||n[1],n===null)return;if(n.tag===6){t=L(n),Op(t,l);return}if(n=L(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=L(a),Op(a,l)):L(a).scrollIntoView(t),n+=l?-1:1}};function bx(t,e){return t=L(t),Cp(t,e),!1}function Cp(t,e){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(e)}function Ap(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,Ha(a.optionsOrUseCapture))}t.nodeType!==3&&(l=e._observers,l!==null&&l.forEach(function(s){for(var f=0,h=0;h<sl.length;h++){var x=sl[h];(x.fragmentInstance!==e||x.observer!==s||x.instance!==t)&&(sl[f++]=x)}sl.length=f,s.observe(t)}),Cp(t,e))}function jx(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,Ha(a.optionsOrUseCapture))}t.nodeType!==3&&(l=e._observers,l!==null&&l.forEach(function(s){typeof s.rootMargin=="string"?yx(e,s,t):s.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(e))}function Uo(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":Uo(l),js(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function Sx(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[ai])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=Ie(t.nextSibling),t===null)break}return null}function _x(t,e,l){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Ie(t.nextSibling),t===null))return null;return t}function wp(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Ie(t.nextSibling),t===null))return null;return t}function ko(t){return t.data==="$?"||t.data==="$~"}function Ho(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Ex(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 Ie(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 Lo=null;function Dp(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(e===0)return Ie(t.nextSibling);e--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||e++}t=t.nextSibling}return null}function Mp(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 Tx(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 Nx(t){bp(function(){bp(function(e){return t(e)})})}function Up(t,e,l){switch(e=qi(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 kp(t,e,l){for(var n in l){var a=l[n];l.hasOwnProperty(n)&&a!=null&&Ct(t,e,n,null,ex,a)}l.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===ol&&(t.onclick=null),js(t)}function Bo(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);js(t)}var Fe=new Map,Hp=new Set;function $i(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=st.d;st.d={f:Rx,r:zx,D:Ox,C:Cx,L:Ax,m:wx,X:Mx,S:Dx,M:Ux};function Rx(){var t=Ll.f(),e=Eu();return t||e}function zx(t){var e=la(t);e!==null&&e.tag===5&&e.type==="form"?Bh(e):Ll.r(t)}var La=typeof document>"u"?null:document;function Lp(t,e,l){var n=La;if(n&&typeof e=="string"&&e){var a=Ve(e);a='link[rel="'+t+'"][href="'+a+'"]',typeof l=="string"&&(a+='[crossorigin="'+l+'"]'),Hp.has(a)||(Hp.add(a),t={rel:t,crossOrigin:l,href:e},n.querySelector(a)===null&&(e=n.createElement("link"),de(e,"link",t),le(e),n.head.appendChild(e)))}}function Ox(t){Ll.D(t),Lp("dns-prefetch",t,null)}function Cx(t,e){Ll.C(t,e),Lp("preconnect",t,e)}function Ax(t,e,l){Ll.L(t,e,l);var n=La;if(n&&t&&e){var a='link[rel="preload"][as="'+Ve(e)+'"]';e==="image"&&l&&l.imageSrcSet?(a+='[imagesrcset="'+Ve(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(a+='[imagesizes="'+Ve(l.imageSizes)+'"]')):a+='[href="'+Ve(t)+'"]';var s=a;switch(e){case"style":s=Ba(t);break;case"script":s=qa(t)}if(!(Fe.has(s)||(t=P({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),Fe.set(s,t),n.querySelector(a)!==null||e==="style"&&n.querySelector(Yi(s))||e==="script"&&n.querySelector(Vi(s))))){var f=n.createElement("link");de(f,"link",t),e==="style"&&(f[bs]=!0,f.onload=f.onerror=function(){Ff(f)}),le(f),n.head.appendChild(f)}}}function wx(t,e){Ll.m(t,e);var l=La;if(l&&t){var n=e&&typeof e.as=="string"?e.as:"script",a='link[rel="modulepreload"][as="'+Ve(n)+'"][href="'+Ve(t)+'"]',s=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=qa(t)}if(!Fe.has(s)&&(t=P({rel:"modulepreload",href:t},e),Fe.set(s,t),l.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Vi(s)))return}n=l.createElement("link"),de(n,"link",t),le(n),l.head.appendChild(n)}}}function Dx(t,e,l){Ll.S(t,e,l);var n=La;if(n&&t){var a=na(n).hoistableStyles,s=Ba(t);e=e||"default";var f=a.get(s);if(!f){var h={loading:0,preload:null};if(f=n.querySelector(Yi(s)))h.loading=5;else{t=P({rel:"stylesheet",href:t,"data-precedence":e},l),(l=Fe.get(s))&&qo(t,l);var x=f=n.createElement("link");le(x),de(x,"link",t),x._p=new Promise(function(T,C){x.onload=T,x.onerror=C}),x.addEventListener("load",function(){h.loading|=1}),x.addEventListener("error",function(){h.loading|=2}),h.loading|=4,Au(f,e,n)}f={type:"stylesheet",instance:f,count:1,state:h},a.set(s,f)}}}function Mx(t,e){Ll.X(t,e);var l=La;if(l&&t){var n=na(l).hoistableScripts,a=qa(t),s=n.get(a);s||(s=l.querySelector(Vi(a)),s||(t=P({src:t,async:!0},e),(e=Fe.get(a))&&$o(t,e),s=l.createElement("script"),le(s),de(s,"link",t),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},n.set(a,s))}}function Ux(t,e){Ll.M(t,e);var l=La;if(l&&t){var n=na(l).hoistableScripts,a=qa(t),s=n.get(a);s||(s=l.querySelector(Vi(a)),s||(t=P({src:t,async:!0,type:"module"},e),(e=Fe.get(a))&&$o(t,e),s=l.createElement("script"),le(s),de(s,"link",t),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},n.set(a,s))}}function Bp(t,e,l,n){var a=(a=$l.current)?$i(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=Ba(l.href),e=na(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=Ba(l.href);var s=na(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(Yi(t)))?s._p||(f.instance=s,f.state.loading=5):(s=Fe.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},Fe.set(t,s)),kx(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=qa(l),e=na(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 Ba(t){return'href="'+Ve(t)+'"'}function Yi(t){return'link[rel="stylesheet"]['+t+"]"}function qp(t){return P({},t,{"data-precedence":t.precedence,precedence:null})}function kx(t,e,l,n){if(e=t.querySelector('link[rel="preload"][as="style"]['+e+"]")){if(e[bs]!==!0){n.loading=1;return}}else e=t.createElement("link"),e[bs]=!0,e.onload=e.onerror=Ff.bind(null,e),de(e,"link",l),le(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 qa(t){return'[src="'+Ve(t)+'"]'}function Vi(t){return"script[async]"+t}function $p(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var n=t.querySelector('style[data-href~="'+Ve(l.href)+'"]');if(n)return e.instance=n,le(n),n;var a=P({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(t.ownerDocument||t).createElement("style"),le(n),de(n,"style",a),Au(n,l.precedence,t),e.instance=n;case"stylesheet":a=Ba(l.href);var s=t.querySelector(Yi(a));if(s)return e.state.loading|=4,e.instance=s,le(s),s;n=qp(l),(a=Fe.get(a))&&qo(n,a),s=(t.ownerDocument||t).createElement("link"),le(s);var f=s;return f._p=new Promise(function(h,x){f.onload=h,f.onerror=x}),de(s,"link",n),e.state.loading|=4,Au(s,l.precedence,t),e.instance=s;case"script":return s=qa(l.src),(a=t.querySelector(Vi(s)))?(e.instance=a,le(a),a):(n=l,(a=Fe.get(s))&&(n=P({},l),$o(n,a)),t=t.ownerDocument||t,a=t.createElement("script"),le(a),de(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,Au(n,l.precedence,t));return e.instance}function Au(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 h=n[f];if(h.dataset.precedence===e)s=h;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 qo(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function $o(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var wu=null;function Yp(t,e,l){if(wu===null){var n=new Map,a=wu=new Map;a.set(l,n)}else a=wu,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[ai]||s[ue]||t==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var f=s.getAttribute(e)||"";f=t+f;var h=n.get(f);h?h.push(s):n.set(f,[s])}}return n}function Yo(t,e,l){t=t.ownerDocument||t,t.head.insertBefore(l,e==="title"?t.querySelector("head > title"):null)}function Hx(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 Vp(t,e){return t==="img"&&e.src!=null&&e.src!==""&&e.onLoad==null&&e.loading!=="lazy"}function Gp(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Qp(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Xp(t,e){typeof e.decode=="function"&&(t.imgCount++,e.complete||(t.imgBytes+=Qp(e),t.suspenseyImages.push(e)),t=qx.bind(t),e.decode().then(t,t))}function Lx(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=Ba(n.href),s=e.querySelector(Yi(a));if(s){e=s._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Gi.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=s,le(s);return}s=e.ownerDocument||e,n=qp(n),(a=Fe.get(a))&&qo(n,a),s=s.createElement("link"),le(s);var f=s;f._p=new Promise(function(h,x){f.onload=h,f.onerror=x}),de(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=Gi.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var Du=0;function Bx(t,e){return t.stylesheets&&t.count===0&&Uu(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var n=setTimeout(function(){if(t.stylesheets&&Uu(t,t.stylesheets),t.unsuspend){var s=t.unsuspend;t.unsuspend=null,s()}},6e4+e);0<t.imgBytes&&Du===0&&(Du=62500*nx());var a=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Uu(t,t.stylesheets),t.unsuspend)){var s=t.unsuspend;t.unsuspend=null,s()}},(t.imgBytes>Du?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function Zp(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)Uu(t,t.stylesheets);else if(t.unsuspend){var e=t.unsuspend;t.unsuspend=null,e()}}}function Gi(){this.count--,Zp(this)}function qx(){this.imgCount--,Zp(this)}var Mu=null;function Uu(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Mu=new Map,e.forEach($x,t),Mu=null,Gi.call(t))}function $x(t,e){if(!(e.state.loading&4)){var l=Mu.get(t);if(l)var n=l.get(null);else{l=new Map,Mu.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=Gi.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 $a={$$typeof:Jt,Provider:null,Consumer:null,_currentValue:_l,_currentValue2:_l,_threadCount:0};function Yx(t,e,l,n,a,s,f,h,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=jr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jr(0),this.hiddenUpdates=jr(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 Kp(t,e,l,n,a,s,f,h,x,T,C,D){return t=new Yx(t,e,l,f,x,T,C,D,h),e=1,s===!0&&(e|=24),s=Te(3,null,null,e),t.current=s,s.stateNode=t,e=lc(),e.refCount++,t.pooledCache=e,e.refCount++,s.memoizedState={element:n,isDehydrated:l,cache:e},sc(s),t}function Jp(t){return t?(t=ha,t):ha}function Ip(t,e,l,n,a,s){a=Jp(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),ji(l,t,e))}function Fp(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<e?l:e}}function Vo(t,e){Fp(t,e),(t=t.alternate)&&Fp(t,e)}function Wp(t){if(t.tag===13||t.tag===31){var e=On(t,67108864);e!==null&&Oe(e,t,67108864),Vo(t,67108864)}}function Pp(t){if(t.tag===13||t.tag===31){var e=$e();e=Sr(e);var l=On(t,e);l!==null&&Oe(l,t,e),Vo(t,e)}}var Ya=!0;function Vx(t,e,l,n){var a=K.T;K.T=null;var s=st.p;try{st.p=2,Go(t,e,l,n)}finally{st.p=s,K.T=a}}function Gx(t,e,l,n){var a=K.T;K.T=null;var s=st.p;try{st.p=8,Go(t,e,l,n)}finally{st.p=s,K.T=a}}function Go(t,e,l,n){if(Ya){var a=Qo(n);if(a===null)To(t,e,n,ku,l),e0(t,n);else if(Xx(a,t,e,l,n))n.stopPropagation();else if(e0(t,n),e&4&&-1<Qx.indexOf(t)){for(;a!==null;){var s=la(a);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var f=En(s.pendingLanes);if(f!==0){var h=s;for(h.pendingLanes|=2,h.entangledLanes|=2;f;){var x=1<<31-Me(f);h.entanglements[1]|=x,f&=~x}bl(s),(_t&6)===0&&(ju=we()+500,Hi(0))}}break;case 31:case 13:h=On(s,2),h!==null&&Oe(h,s,2),Eu(),Vo(s,2)}if(s=Qo(n),s===null&&To(t,e,n,ku,l),s===a)break;a=s}a!==null&&n.stopPropagation()}else To(t,e,n,null,l)}}function Qo(t){return t=Or(t),Xo(t)}var ku=null;function Xo(t){if(ku=null,t=Tn(t),t!==null){var e=m(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 ku=t,null}function t0(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(ny()){case Bf:return 2;case qf:return 8;case ps:case ay:return 32;case $f:return 268435456;default:return 32}default:return 32}}var Zo=!1,dn=null,hn=null,mn=null,Qi=new Map,Xi=new Map,pn=[],Qx="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 e0(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":Qi.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xi.delete(e.pointerId)}}function Zi(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=la(e),e!==null&&Wp(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,a!==null&&e.indexOf(a)===-1&&e.push(a),t)}function Xx(t,e,l,n,a){switch(e){case"focusin":return dn=Zi(dn,t,e,l,n,a),!0;case"dragenter":return hn=Zi(hn,t,e,l,n,a),!0;case"mouseover":return mn=Zi(mn,t,e,l,n,a),!0;case"pointerover":var s=a.pointerId;return Qi.set(s,Zi(Qi.get(s)||null,t,e,l,n,a)),!0;case"gotpointercapture":return s=a.pointerId,Xi.set(s,Zi(Xi.get(s)||null,t,e,l,n,a)),!0}return!1}function l0(t){var e=Tn(t.target);if(e!==null){var l=m(e);if(l!==null){if(e=l.tag,e===13){if(e=p(l),e!==null){t.blockedOn=e,Kf(t.priority,function(){Pp(l)});return}}else if(e===31){if(e=g(l),e!==null){t.blockedOn=e,Kf(t.priority,function(){Pp(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 Hu(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var l=Qo(t.nativeEvent);if(l===null){l=t.nativeEvent;var n=new l.constructor(l.type,l);zr=n,l.target.dispatchEvent(n),zr=null}else return e=la(l),e!==null&&Wp(e),t.blockedOn=l,!1;e.shift()}return!0}function n0(t,e,l){Hu(t)&&l.delete(e)}function Zx(){Zo=!1,dn!==null&&Hu(dn)&&(dn=null),hn!==null&&Hu(hn)&&(hn=null),mn!==null&&Hu(mn)&&(mn=null),Qi.forEach(n0),Xi.forEach(n0)}function Lu(t,e){t.blockedOn===e&&(t.blockedOn=null,Zo||(Zo=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Zx)))}var Bu=null;function a0(t){Bu!==t&&(Bu=t,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Bu===t&&(Bu=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(Xo(n||l)===null)continue;break}var s=la(l);s!==null&&(t.splice(e,3),e-=3,Rc(s,{pending:!0,data:a,method:l.method,action:n},n,a))}}))}function Va(t){function e(x){return Lu(x,t)}dn!==null&&Lu(dn,t),hn!==null&&Lu(hn,t),mn!==null&&Lu(mn,t),Qi.forEach(e),Xi.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);)l0(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||a0(l);else if(f){var h=null;if(s&&s.hasAttribute("formAction")){if(a=s,f=s[Ee]||null)h=f.formAction;else if(Xo(a)!==null)continue}else h=f.action;typeof h=="function"?l[n+1]=h:(l.splice(n,3),n-=3),a0(l)}}}function i0(){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 Ko(t){this._internalRoot=t}qu.prototype.render=Ko.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(c(409));var l=e.current,n=$e();Ip(l,n,t,e,null,null)},qu.prototype.unmount=Ko.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Ip(t.current,2,null,t,null,null),Eu(),e[ea]=null}};function qu(t){this._internalRoot=t}qu.prototype.unstable_scheduleHydration=function(t){if(t){var e=Zf();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&&l0(t)}};var s0=r.version;if(s0!=="19.3.0")throw Error(c(527,s0,"19.3.0"));st.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=y(e),t=t!==null?R(t):null,t=t===null?null:t.stateNode,t};var Kx={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:K,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$u.isDisabled&&$u.supportsFiber)try{ei=$u.inject(Kx),De=$u}catch{}}return Ji.createRoot=function(t,e){if(!d(t))throw Error(c(299));var l=!1,n="",a=Jh,s=Ih,f=Fh;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=Kp(t,1,!1,null,null,l,n,null,a,s,f,i0),t[ea]=e.current,Eo(t),new Ko(e)},Ji.hydrateRoot=function(t,e,l){if(!d(t))throw Error(c(299));var n=!1,a="",s=Jh,f=Ih,h=Fh,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&&(h=l.onRecoverableError),l.formState!==void 0&&(x=l.formState)),e=Kp(t,1,!0,e,l??null,n,a,x,s,f,h,i0),e.context=Jp(null),l=e.current,n=$e(),n=Sr(n),a=Wl(n),a.callback=null,Pl(l,a,n),l=n,e.current.lanes=l,ni(e,l),bl(e),t[ea]=e.current,Eo(t),new qu(e)},Ji.version="19.3.0",Ji}var g0;function a1(){if(g0)return Io.exports;g0=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(),Io.exports=n1(),Io.exports}var i1=a1(),N=_f();/**
|
|
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 Y0=(...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 s1=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 u1=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 y0=i=>{const r=u1(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 r1={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 c1=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 o1=N.forwardRef(({color:i="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:c,className:d="",children:m,iconNode:p,...g},b)=>N.createElement("svg",{ref:b,...r1,width:r,height:r,stroke:i,strokeWidth:c?Number(o)*24/Number(r):o,className:Y0("lucide",d),...!m&&!c1(g)&&{"aria-hidden":"true"},...g},[...p.map(([y,R])=>N.createElement(y,R)),...Array.isArray(m)?m:[m]]));/**
|
|
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},m)=>N.createElement(o1,{ref:m,iconNode:r,className:Y0(`lucide-${s1(y0(i))}`,`lucide-${i}`,c),...d}));return o.displayName=y0(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 f1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],d1=ge("chevron-down",f1);/**
|
|
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 h1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],m1=ge("chevron-right",h1);/**
|
|
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 p1=[["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"}]],Ef=ge("external-link",p1);/**
|
|
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 g1=[["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"}]],y1=ge("folder-git-2",g1);/**
|
|
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 v1=[["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"}]],V0=ge("git-pull-request",v1);/**
|
|
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 x1=[["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"}]],b1=ge("layout-dashboard",x1);/**
|
|
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 j1=[["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"}]],S1=ge("list-checks",j1);/**
|
|
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 _1=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],E1=ge("menu",_1);/**
|
|
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 T1=[["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"}]],N1=ge("message-circle-question-mark",T1);/**
|
|
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 R1=[["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"}]],z1=ge("message-square",R1);/**
|
|
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 O1=[["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"}]],C1=ge("moon",O1);/**
|
|
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 A1=[["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"}]],w1=ge("receipt-text",A1);/**
|
|
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 D1=[["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"}]],v0=ge("rotate-ccw",D1);/**
|
|
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 M1=[["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"}]],U1=ge("settings",M1);/**
|
|
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 k1=[["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"}]],H1=ge("shield-check",k1);/**
|
|
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 L1=[["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"}]],B1=ge("sun",L1);/**
|
|
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 q1=[["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"}]],x0=ge("triangle-alert",q1),G0={label:"Unverified (signature not checked)",tone:"warn"},b0={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:G0,TAMPERED:{label:"Tampered",tone:"bad"},RUNNING:{label:"Running",tone:"neutral"}},$1=/^(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(b0[o])return b0[o];if($1.test(o))return{label:"Stopped (budget)",tone:"warn"};if(/_?\(SIGNATURE_NOT_CHECKED\)$/.test(o)||/_?\(UNATTESTED\)$/.test(o))return G0;const c=r.replace(/[_-]+/g," ").replace(/\s+/g," ").toLowerCase();return{label:c.charAt(0).toUpperCase()+c.slice(1),tone:"neutral"}}const Y1=/\u001b\[[0-9;?]*[ -/]*[@-~]|\u001b\][^\u0007\u001b]*(?:\u0007|\u001b\\)|\u001b[@-Z\\-_]/g,V1=/\[\d{1,3}(?:;\d{1,3})*m/g;function Fu(i){return typeof i!="string"?"":i.replace(Y1,"").replace(V1,"").replace(/\u001b/g,"")}function Pe(i){const r=Math.abs(i);return`$${r===0?"0.000":r<.01?i.toFixed(3):i.toFixed(2)}`}const j0=new Set(["VERIFIED","ALREADY_SATISFIED"]),nr=i=>{if(i.tampered)return"TAMPERED";if(typeof i.verdict!="string")return i.verdict;const r=i.verdict.trim().toUpperCase();return i.attested===!1?j0.has(r)?"UNVERIFIED":`${i.verdict} (unattested)`:j0.has(r)?i.sig_checked===!1?`${r} (signature not checked)`:r:i.verdict},is=()=>globalThis.LOKI_CONTROL_BASE??"",S0="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(S0,decodeURIComponent(o[1])),(r=globalThis.history)==null||r.replaceState(null,"",globalThis.location.pathname+globalThis.location.search)),sessionStorage.getItem(S0)}catch{return null}}const ss=(i={})=>{const r=_e();return r?{...i,authorization:`Bearer ${r}`}:i};async function us(i){const r=await fetch(`${is()}${i}`,{headers:ss()});if(!r.ok)throw new Error(`${i}: HTTP ${r.status}`);return await r.json()}const G1=()=>us("/health");function In(i={}){const r=new URLSearchParams;for(const[c,d]of Object.entries(i))d&&r.set(c,d);const o=r.toString();return us(`/v1/runs${o?`?${o}`:""}`)}function ar(i,r){return us(`/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}`)}async function Q0(i,r,o){const c=await fetch(`${is()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}/answer`,{method:"POST",headers:ss({"content-type":"application/json"}),body:JSON.stringify({answer:o})}),d=await c.json();if(!c.ok)throw new Error(d.error??`HTTP ${c.status}`);return{path:d.path??"",resume:d.resume??""}}async function Q1(i,r){const o=await fetch(`${is()}${i}`,{method:"POST",headers:ss({"content-type":"application/json"}),body:JSON.stringify(r)}),c=await o.json().catch(()=>({}));if(!o.ok)throw new Error(c.error??`HTTP ${o.status}`);return c}const X1=()=>Q1("/v1/import",{}),Z1=()=>us("/v1/repos");function X0(i,r=3e3){const o=new AbortController,c=d=>new Promise(m=>{const p=setTimeout(m,d);o.signal.addEventListener("abort",()=>{clearTimeout(p),m()},{once:!0})});return(async()=>{for(;!o.signal.aborted;){try{const d=await fetch(`${is()}/v1/stream`,{headers:ss({accept:"text/event-stream"}),signal:o.signal});if(d.ok&&d.body){const m=d.body.getReader(),p=new TextDecoder;let g="";for(;;){const{value:b,done:y}=await m.read();if(y)break;g+=p.decode(b,{stream:!0});const R=g.split(`
|
|
175
|
+
|
|
176
|
+
`);g=R.pop()??"",R.some(v=>/^event: run$/m.test(v))&&i()}}}catch{}await c(r)}})(),()=>o.abort()}async function K1(i,r){const o=await fetch(`${is()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}`,{method:"DELETE",headers:ss({"content-type":"application/json"})}),c=await o.json().catch(()=>({}));if(!o.ok)throw new Error(c.error??`HTTP ${o.status}`);return{ok:!0,removed:c.removed??{runs:0,events:0,sources:0},remaining_runs:c.remaining_runs??0}}const J1=()=>us("/v1/doctor"),U=i=>`var(--cp-${i})`,I1=(...i)=>i.filter(Boolean).join(" ")||void 0,Z0={success:U("success-muted"),warning:U("warning-muted"),error:U("error-muted"),info:U("info-muted"),neutral:U("bg-3")},K0={success:U("success-ink"),warning:U("warning-ink"),error:U("error-ink"),info:U("info-ink"),neutral:U("text-2")};function Gt({interactive:i,compact:r,style:o,className:c,children:d,...m}){return u.jsx("div",{...m,"data-cp":"card","data-interactive":i?"true":void 0,className:I1("cp-card",c),style:{background:U("card"),border:`1px solid ${U("border")}`,borderRadius:U("radius-lg"),padding:r?10:16,transition:`transform ${U("dur-fast")} ${U("ease")}, box-shadow ${U("dur-fast")} ${U("ease")}`,...i?{cursor:"pointer",boxShadow:U("shadow-sm")}:null,...o},children:d})}function Kn({label:i,value:r,icon:o,trend:c,trendTone:d="neutral",series:m,compact:p}){const g=m&&m.length>1?m:null;let b=null;if(g){const y=Math.min(...g),R=Math.max(...g),v=R-y||1,A=g.map((B,Q)=>`${Q?"L":"M"}${(Q/(g.length-1)*80).toFixed(1)} ${(22-(B-y)/v*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:U("accent"),strokeWidth:1.5})})}return u.jsxs(Gt,{"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:U("accent-muted"),color:U("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:U("text-sm"),color:U("text-2")},children:i}),u.jsx("div",{style:{fontFamily:U("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:Z0[d],color:K0[d]},children:c}):null,b]})}const F1={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"},Et={VERIFIED:"VERIFIED",PARTIAL:"PARTIAL",FAILED:"FAILED",SPEC_CONFLICT:"SPEC_CONFLICT",TAMPERED:"TAMPERED",UNVERIFIED:"UNVERIFIED",VERIFIED_UNCHECKED:"VERIFIED (signature not checked)",RUNNING:"running"},W1=[Et.VERIFIED,Et.VERIFIED_UNCHECKED,Et.UNVERIFIED,Et.TAMPERED,Et.PARTIAL,Et.FAILED,Et.SPEC_CONFLICT];function jl(i){var r;return i?i.tampered===!0||i.integrity===Et.TAMPERED||((r=i.receipt)==null?void 0:r.verdict)===Et.TAMPERED||i.verdict===Et.TAMPERED?Et.TAMPERED:nr({verdict:i.verdict??null,tampered:!1,attested:i.attested??void 0,sig_checked:i.sig_checked??void 0}):null}const as=i=>jl(i)===Et.VERIFIED;function Lt({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:U("radius-full"),fontSize:U("text-xs"),textTransform:"uppercase",letterSpacing:"0.025em",fontWeight:500,background:Z0[i],color:K0[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 Ja({verdict:i,run:r,style:o}){const c=r?jl(r):i??null;return c?u.jsx(Lt,{tone:F1[c]??"neutral",pulse:c===Et.RUNNING,"data-verdict":c,title:o?Ae(c).label:void 0,style:o,children:Ae(c).label}):u.jsx(Lt,{pulse:!0,style:o,children:"running"})}const P1={active:U("success-fill"),idle:U("text-muted"),paused:U("warning-fill"),error:U("error-fill")};function tb({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:P1[i]}})}const eb={primary:{background:U("accent-solid"),color:"#ffffff",border:"1px solid transparent"},secondary:{background:U("bg-3"),color:U("text"),border:`1px solid ${U("border")}`},ghost:{background:"transparent",color:U("text-2"),border:"1px solid transparent"},danger:{background:U("error"),color:"#ffffff",border:"1px solid transparent"}};function gt({variant:i="primary",size:r="md",style:o,type:c="button",...d}){const m=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:m,borderRadius:U("radius-full"),fontSize:U(r==="sm"?"text-base":"text-md"),fontWeight:500,cursor:d.disabled?"not-allowed":"pointer",opacity:d.disabled?.5:1,...eb[i],...o}})}const J0={background:U("bg-3"),border:`1px solid ${U("border")}`,borderRadius:U("radius-md"),padding:"8px 12px",fontSize:U("text-md"),color:U("text"),width:"100%",fontFamily:"inherit"};function Fn({style:i,onFocus:r,onBlur:o,...c}){const[d,m]=N.useState(!1);return u.jsx("input",{...c,"data-cp":"input",onFocus:p=>{m(!0),r==null||r(p)},onBlur:p=>{m(!1),o==null||o(p)},style:{...J0,...d?{borderColor:U("accent"),boxShadow:U("focus"),outline:"none"}:null,...i}})}function I0({style:i,onFocus:r,onBlur:o,...c}){const[d,m]=N.useState(!1);return u.jsx("textarea",{...c,"data-cp":"textarea",onFocus:p=>{m(!0),r==null||r(p)},onBlur:p=>{m(!1),o==null||o(p)},style:{...J0,resize:"vertical",...d?{borderColor:U("accent"),boxShadow:U("focus"),outline:"none"}:null,...i}})}function mf({label:i,value:r,icon:o,options:c,onSelect:d}){const[m,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?m:void 0,"aria-controls":c&&m?g:void 0,onClick:()=>c&&p(b=>!b),style:{display:"inline-flex",alignItems:"center",gap:6,borderRadius:999,padding:"4px 10px",fontSize:U("text-base"),background:U("card"),border:`1px solid ${U("border")}`,color:U("text"),cursor:"pointer"},children:[o,u.jsx("span",{style:{color:U("text-2")},children:i}),r?u.jsx("span",{style:{fontWeight:500},children:r}):null]}),c&&m?u.jsx("div",{id:g,role:"menu",style:{position:"absolute",top:"100%",left:0,marginTop:4,minWidth:140,zIndex:400,background:U("bg"),border:`1px solid ${U("border")}`,borderRadius:U("radius-lg"),boxShadow:U("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:U("radius-md"),background:"transparent",border:0,color:U("text"),fontSize:U("text-base"),cursor:"pointer"},children:b.label},b.value))}):null]})}function Wn({columns:i,rows:r,caption:o}){return u.jsx(Gt,{style:{padding:0,overflow:"auto"},children:u.jsxs("table",{"data-cp":"table",style:{width:"100%",borderCollapse:"collapse",fontSize:U("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:U("text-sm"),fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em",color:U("text-2"),background:U("bg-3")},children:c},c))})}),u.jsx("tbody",{children:r.map((c,d)=>u.jsx("tr",{style:{borderTop:`1px solid ${U("border-light")}`},children:c.map((m,p)=>u.jsx("td",{style:{padding:"10px 14px"},children:m},p))},d))})]})})}function Wu({active:i,icon:r,children:o,href:c,onClick:d}){const m={position:"relative",display:"flex",alignItems:"center",gap:8,padding:"8px 12px",borderRadius:U("radius-nav"),fontSize:U("text-md"),fontWeight:500,textDecoration:"none",cursor:"pointer",border:0,width:"100%",textAlign:"left",background:i?U("accent-glow"):"transparent",color:U(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:U("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:m,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:m,children:p})}function lb({children:i}){return u.jsx("div",{"data-cp":"group-head",style:{fontSize:9.5,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.09em",color:U("text-subtle"),padding:"4px 12px 5px"},children:i})}function nb({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"?U("bg-3"):r.status==="neutral"?U("text-muted"):U(`${r.status}-fill`),border:`1px solid ${U("border")}`}}),o<i.length-1?u.jsx("span",{style:{flex:1,width:1,background:U("border")}}):null]}),u.jsxs("span",{style:{fontSize:U("text-base")},children:[r.label,r.duration?u.jsx("span",{style:{marginLeft:8,fontFamily:U("font-mono"),color:U("text-2")},children:r.duration}):null]})]},`${r.label}-${o}`))})}function Rt({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:U("text-2")},children:[u.jsx("div",{style:{fontFamily:U("font-serif"),fontSize:U("text-2xl"),color:U("text")},children:i}),r?u.jsx("div",{style:{marginTop:8,fontSize:U("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 ${U("border")}`,borderTopColor:U("accent")}})}function F0(i,r){const o=N.useRef(null);return N.useEffect(()=>{var m;if(!i)return;const c=document.activeElement;(m=o.current)==null||m.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 ab({open:i,title:r,onClose:o,children:c}){const d=F0(i,o),m=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":m,tabIndex:-1,"data-cp":"dialog",onClick:p=>p.stopPropagation(),style:{width:"min(480px, 92vw)",background:U("bg"),color:U("text"),border:`1px solid ${U("border")}`,borderRadius:U("radius-lg"),boxShadow:U("shadow-lg"),padding:20},children:[u.jsx("h2",{id:m,style:{margin:"0 0 12px",fontFamily:U("font-serif"),fontWeight:400,fontSize:"1.15rem"},children:r}),c]})}):null}function ib({open:i,title:r,onClose:o,side:c="right",children:d}){const m=F0(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:m,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:U("bg"),color:U("text"),borderLeft:c==="right"?`1px solid ${U("border")}`:void 0,borderRight:c==="left"?`1px solid ${U("border")}`:void 0,boxShadow:U("shadow-lg"),padding:16,overflow:"auto"},children:[u.jsx("h2",{id:p,style:{margin:"0 0 12px",fontFamily:U("font-serif"),fontWeight:400,fontSize:"1.15rem"},children:r}),d]})}):null}function sb({children:i}){return u.jsx("kbd",{"data-cp":"kbd",style:{fontFamily:U("font-mono"),fontSize:U("text-sm"),padding:"1px 5px",borderRadius:U("radius-md"),background:U("bg-3"),border:`1px solid ${U("border")}`,color:U("text-2")},children:i})}const bn="unmeasured",_0=3e3,ub=["intake","plan","Wall","implement","verify","seal","PR"];function rb(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,y=g.ended_at?Date.parse(g.ended_at):g.status==="started"?r:NaN,R=Number.isNaN(b)||Number.isNaN(y)?null:Math.max(0,(y-b)/1e3),v=g.status==="started"?"running":g.status==="completed"?"done":"failed";return{name:p,status:v,elapsed_s:R}},m=ub.map(p=>d(p,c(p)));for(const p of i)o.has(p)||m.push(d(p.stage,p));return m}const cb=i=>i===null?bn:i>=60?`${Math.floor(i/60)}m ${Math.floor(i%60)}s`:`${i.toFixed(1)}s`,W0=i=>i.cost_usd!==null&&i.cost_usd!==void 0?Pe(i.cost_usd):i.partial_usd?`at least ${Pe(i.partial_usd)} (rest ${bn})`:bn;function Tf(i,r,o){const[c,d]=N.useState({data:null,error:null});return N.useEffect(()=>{let m=!0,p;const g=()=>i().then(b=>{m&&(d({data:b,error:null}),o(b)&&(p=setTimeout(g,_0)))},b=>{m&&(d(y=>({data:y.data,error:b.message})),p=setTimeout(g,_0))});return g(),()=>{m=!1,clearTimeout(p)}},r),c}const ob=i=>!!i&&!!i.version&&!!i.installed_version&&i.version!==i.installed_version&&i.installed_version!=="unknown";function P0(){const{data:i}=Tf(()=>G1().catch(()=>null),[],()=>!0);return ob(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 Zn="rounded border border-slate-200 p-4 dark:border-slate-800",fb={pending:"text-slate-400",running:"text-sky-600 dark:text-sky-400",done:"text-emerald-600 dark:text-emerald-400",failed:"text-red-600"},db=i=>i&&/^https?:\/\//.test(i)?i:null;function tg({source:i,run:r}){const{data:o,error:c}=Tf(()=>ar(i,r),[i,r],y=>y.status==="running"),[,d]=N.useState(0),m=(o==null?void 0:o.status)==="running";if(N.useEffect(()=>{if(!m)return;const y=setInterval(()=>d(R=>R+1),1e3);return()=>clearInterval(y)},[m]),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=rb(o.stages??[],Date.now()),g=o.files_touched??[],b=db(o.pr_url);return u.jsxs("section",{"data-testid":"live-run",className:"space-y-4",children:[u.jsx(P0,{}),u.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[u.jsx("h1",{className:"text-xl font-semibold",children:m?"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:Zn,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(y=>u.jsxs("li",{"data-testid":"live-stage","data-status":y.status,className:"flex flex-wrap items-center justify-between gap-x-4",children:[u.jsx("span",{className:"font-medium",children:y.name}),u.jsxs("span",{className:fb[y.status],children:[y.status,", ",y.status==="pending"?"not started":cb(y.elapsed_s),", limit ",bn]})]},y.name))})]}),u.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[u.jsxs("div",{className:Zn,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:Zn,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:W0(o)})]}),u.jsxs("div",{className:Zn,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})]})]}),!m&&u.jsxs("div",{"data-testid":"live-outcome",className:Zn,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 hb(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 m of i){const p=m.started_at?Date.parse(m.started_at):NaN;Number.isNaN(p)||(p>=c&&d.today++,p>=c-6*864e5&&d.week++);const g=jl(m);g===Et.VERIFIED?d.verified++:g===Et.VERIFIED_UNCHECKED?d.unchecked++:g===Et.PARTIAL?d.partial++:g===Et.FAILED?d.failed++:g?d.other++:d.running++,m.cost_usd!==null&&m.cost_usd!==void 0?d.costUsd+=m.cost_usd:(d.unmeasuredRuns++,d.costUsd+=m.partial_usd??0),m.pr_url&&d.prsOpened++}return d.last=[...i].sort((m,p)=>Date.parse(p.started_at??"")-Date.parse(m.started_at??"")).slice(0,10),d}function Bl({id:i,label:r,value:o}){return u.jsxs("div",{className:Zn,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 mb({runs:i,now:r=Date.now()}){const o=hb(i,r),c=o.unmeasuredRuns===0?`${Pe(o.costUsd)}`:`${Pe(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:Et.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:Et.PARTIAL,value:String(o.partial)}),u.jsx(Bl,{id:"ov-failed",label:Et.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:Zn,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",", ",W0(d)]})]},`${d.source_id}/${d.run_id}`))})]})]})}function eg({fallback:i,overview:r}){const{data:o}=Tf(()=>In(),[],d=>d.runs.some(m=>m.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(tg,{source:c.source_id,run:c.run_id}):u.jsxs(u.Fragment,{children:[u.jsx(P0,{}),u.jsx(mb,{runs:o.runs})]})}const ir=new Map,pf=new Set;let lg=0;const ng=()=>{lg++;for(const i of pf)i()};function Ce(i){ir.set(i.id,i),ng()}function E0(i){ir.delete(i)&&ng()}const ag=()=>[...ir.values()],pb=()=>ag().filter(i=>i.inSettings),ig=i=>(pf.add(i),()=>{pf.delete(i)}),Pu=()=>lg;function rs(i){const o=(i.replace(/^#/,"").split("?")[0]??"").replace(/\/+$/,"");return o===""?"/":o.startsWith("/")?o:`/${o}`}function gb(i,r){const o=i.split("/").filter(Boolean),c=r.split("/").filter(Boolean);if(o.length!==c.length)return null;const d={};for(let m=0;m<o.length;m++){const p=o[m];if(p.startsWith(":"))try{d[p.slice(1)]=decodeURIComponent(c[m])}catch{return null}else if(p!==c[m])return null}return d}function yb(i){const r=rs(i);let o=null;for(const c of ir.values()){const d=gb(c.path,r);if(!d)continue;const m=c.path.split("/").filter(p=>p&&!p.startsWith(":")).length;(!o||m>o.score)&&(o={page:c,params:d,score:m})}return o?{page:o.page,params:o.params}:null}async function vb(i){const r=globalThis.LOKI_CONTROL_BASE??"",o=_e(),c=await fetch(`${r}/v1/stats/cost?group=${i}`,{headers:o?{authorization:`Bearer ${o}`}:{}});if(!c.ok)throw new Error(`/v1/stats/cost: HTTP ${c.status}`);return await c.json()}const Jn=Pe,Yu=i=>i.toLocaleString("en-US"),T0=[{value:"day",label:"Day"},{value:"model",label:"Model"},{value:"repo",label:"Repo"},{value:"provider",label:"Provider"}];function xb({budget:i}){const r=o=>`${o} run${o===1?"":"s"}`;return u.jsxs(Gt,{"data-testid":"cost-budget",style:{display:"flex",flexDirection:"column",gap:6},children:[u.jsxs("div",{"data-testid":"cost-budget-subscription",children:[u.jsx(Lt,{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(Lt,{tone:"warning",children:"API-key runs"})," ",Jn(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 bb({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 ${Jn(i.measured_usd)}, partial ${Jn(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 jb(){const[i,r]=N.useState("day"),[o,c]=N.useState(null),[d,m]=N.useState(null);if(N.useEffect(()=>{let y=!0;return c(null),m(null),vb(i).then(R=>{y&&c(R)},R=>{y&&m(R.message)}),()=>{y=!1}},[i]),d)return u.jsx(Rt,{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(y=>y.measured_usd+y.partial_usd)),b=T0.find(y=>y.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(xb,{budget:o.budget}),u.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:12},children:[u.jsx(Kn,{label:"Measured",value:u.jsx("span",{"data-testid":"cost-measured",children:Jn(p.measured_usd)}),trend:`${p.measured_runs} runs`,trendTone:"success"}),u.jsx(Kn,{label:"Partial (priced sessions only)",value:u.jsx("span",{"data-testid":"cost-partial",children:Jn(p.partial_usd)}),trend:`${p.partial_runs} runs`,trendTone:"warning"}),u.jsx(Kn,{label:"Unmeasured",value:u.jsxs("span",{"data-testid":"cost-unmeasured",children:[p.unmeasured_runs," runs"]}),trend:"not measured"}),u.jsx(Kn,{label:"Tokens in / out",value:u.jsxs("span",{"data-testid":"cost-tokens",children:[Yu(p.input_tokens)," / ",Yu(p.output_tokens)]})})]}),u.jsx("div",{children:u.jsx(mf,{label:"Group by",value:b,options:T0,onSelect:y=>r(y)})}),o.rows.length===0?u.jsx(Rt,{title:"No runs yet",hint:"Cost appears here once a run has been ingested."}):u.jsx(Wn,{caption:`Cost by ${b}`,columns:[b,"Runs","Measured","Partial","Unmeasured","Tokens in","Tokens out","Spend"],rows:o.rows.map(y=>[y[i]??"unknown",y.runs,y.measured_runs?Jn(y.measured_usd):"not measured",y.partial_runs?`${Jn(y.partial_usd)} (partial)`:"none",y.unmeasured_runs?`${y.unmeasured_runs} not measured`:"none",Yu(y.input_tokens),Yu(y.output_tokens),u.jsx(bb,{row:y,max:g},"bar")])})]})}const Sb={id:"cost",path:"/cost",title:"Cost and usage",component:jb},_b=()=>globalThis.LOKI_CONTROL_BASE??"";async function sg(i,r,o){const c=_e(),d={"content-type":"application/json"};c&&(d.authorization=`Bearer ${c}`);const m=await fetch(`${_b()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}/${o}`,{method:"POST",headers:d,body:"{}"}),p=await m.json().catch(()=>({}));if(!m.ok)throw new Error(p.error??`HTTP ${m.status}`)}const Eb={stop:"Stopping...",retry:"Retrying...",resume:"Resuming..."},Tb={stop:"Stop signal sent.",retry:"Retry started as a new run.",resume:"Resume started."};function Nb({source:i,run:r,status:o,ownRules:c,onChanged:d}){const[m,p]=N.useState(!1),[g,b]=N.useState(null),[y,R]=N.useState(!1),[v,A]=N.useState(!1),[B,Q]=N.useState(null),nt=o.trim().toUpperCase(),L=g==="stop"||y,$=!L&&(g==="resume"||v||nt==="RUNNING"),I=nt==="BLOCKED"&&!$&&!L&&!c,M=async H=>{if(!g){p(!1),Q(null),b(H);try{await sg(i,r,H),H==="stop"&&R(!0),H==="resume"&&A(!0),Q({tone:"ok",text:Tb[H]}),d==null||d()}catch(Y){Q({tone:"error",text:Y.message})}finally{b(null)}}};return u.jsxs("div",{"data-testid":"run-controls","data-state":L?"stopping":$?"running":nt.toLowerCase(),style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[$&&!g&&!m?u.jsx(gt,{variant:"danger",size:"sm",onClick:()=>p(!0),children:"Stop"}):null,m?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(gt,{variant:"danger",size:"sm",onClick:()=>void M("stop"),children:"Confirm stop"}),u.jsx(gt,{variant:"ghost",size:"sm",onClick:()=>p(!1),children:"Cancel"})]}):null,I&&!g?u.jsx(gt,{size:"sm",onClick:()=>void M("resume"),children:"Resume"}):null,!$&&!L&&!g&&nt!==""?u.jsx(gt,{variant:c?"primary":"secondary",size:"sm",onClick:()=>void M("retry"),children:"Retry"}):null,g?u.jsx("span",{role:"status",children:Eb[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 Nf extends Error{constructor(r,o){super(o),this.status=r}}const ug=()=>globalThis.LOKI_CONTROL_BASE??"",rg=()=>{const i=_e();return i?{authorization:`Bearer ${i}`}:{}};async function cg(i){const r=await fetch(`${ug()}/v1/runs`,{method:"POST",headers:{"content-type":"application/json",...rg()},body:JSON.stringify(i)}),o=await r.json().catch(()=>({}));if(!r.ok)throw new Nf(r.status,o.error??`HTTP ${r.status}`);return o}const Rb=async()=>(await Z1()).repos;async function zb(i){const r=await fetch(`${ug()}/v1/repos/issues?repo=${encodeURIComponent(i)}`,{headers:rg()}),o=await r.json().catch(()=>({}));if(!r.ok)throw new Nf(r.status,o.error??`HTTP ${r.status}`);return o.issues??[]}const og=()=>globalThis.LOKI_CONTROL_BASE??"",fg=(i={})=>{const r=_e();return r?{...i,authorization:`Bearer ${r}`}:i};async function dg(i,r){const o=await fetch(`${og()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}/verify`,{method:"POST",headers:fg({"content-type":"application/json"}),body:"{}"}),c=await o.json().catch(()=>({}));if(!o.ok)throw new Error(c.error??`HTTP ${o.status}`);return c}async function Ob(){const i=await fetch(`${og()}/v1/keys`,{headers:fg()});if(i.status===404)return null;if(!i.ok)throw new Error(`/v1/keys: HTTP ${i.status}`);return await i.json()}function Cb(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++,as(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 Rf=()=>globalThis.LOKI_CONTROL_BASE??"",zf=()=>{const i=_e();return i?{authorization:`Bearer ${i}`}:{}},Of=(i,r)=>`/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}`;async function hg(i,r,o){try{const c=await fetch(`${Rf()}${Of(i,r)}/artifact/${o}`,{headers:zf()});return c.ok?await c.text():null}catch{return null}}async function Ab(i,r,o=-1){const c=[];try{for(let d=o,m=0;m<200;m++){const p=d>=0?`?after=${d}&limit=1000`:"?limit=1000",g=await fetch(`${Rf()}${Of(i,r)}/events${p}`,{headers:zf()});if(!g.ok)break;const b=await g.json(),y=b.events??[];if(c.push(...y),!b.has_more||y.length===0)break;d=y[y.length-1].seq}}catch{}return c}function wb(i,r){const o=i.split(`
|
|
177
|
+
|
|
178
|
+
`),c=o.pop()??"";for(const d of o){const m=d.split(`
|
|
179
|
+
`).filter(p=>p.startsWith("data:")).map(p=>p.slice(5).trim()).join("");if(!(!m||!/^event: event$/m.test(d)))try{r(JSON.parse(m))}catch{}}return c}async function Db(i,r,o,c,d){try{const m=await fetch(`${Rf()}${Of(i,r)}/stream?after=${o()}`,{headers:{...zf(),accept:"text/event-stream"},signal:d});if(!m.ok||!m.body)return;const p=m.body.getReader(),g=new TextDecoder;let b="";for(;;){const{done:y,value:R}=await p.read();if(y)return;b=wb(b+g.decode(R,{stream:!0}),c)}}catch{}}const N0=i=>i&&typeof i=="object"?i:{},R0=i=>typeof i=="number"&&Number.isFinite(i)?i:null,ul=i=>typeof i=="string"&&i?i:null,ef=i=>{const r=i?Date.parse(i):NaN;return Number.isNaN(r)?null:r};function Mb(i){const r=[],o=new Map,c=new Map,d=new Map,m=new Set;for(const g of i){const b=N0(g.data),y=g.stage??"";if(g.type==="session.started"&&y&&m.add(y),g.type==="session.started"&&y&&ul(b.model)&&d.set(y,ul(b.model)),g.type==="cost"&&y){const R=c.get(y)??{usd:0,unmeasured:!1,seen:!1},v=R0(b.usd);R.seen=!0,v===null?R.unmeasured=!0:R.usd+=v,c.set(y,R),ul(b.model)&&!d.has(y)&&d.set(y,ul(b.model))}}const p=g=>{const b=c.get(g);return!b&&!m.has(g)&&!d.has(g)?"no-session":b&&b.seen&&!b.unmeasured?b.usd:null};for(const g of i){const b=N0(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 y={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:ef(g.ts)};o.set(g.stage,y),r.push(y)}else if((g.type==="stage.skipped"||g.type==="stage.failed")&&g.stage){const y=o.get(g.stage),R=ul(b.reason)??(g.type==="stage.skipped"?"no reason recorded":null),v=g.type==="stage.skipped"?"skipped":"failed";y?Object.assign(y,{outcome:v,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:v,detail:R??void 0}),o.delete(g.stage)}else if(g.type==="stage.completed"&&g.stage){const y=o.get(g.stage),R=R0(b.duration_s)??((y==null?void 0:y.startedMs)!=null&&ef(g.ts)!=null?(ef(g.ts)-y.startedMs)/1e3:null),v=ul(b.skipped_reason)??ul(b.reason),A=b.skipped===!0?"skipped":"completed";y?Object.assign(y,{duration_s:R,outcome:A,model:d.get(g.stage)??y.model,cost_usd:p(g.stage),detail:v??void 0}):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:v??void 0}),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}const pe="unmeasured",Ub={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:"Checked the run against its time budget",seal:"Signed a receipt with the diff hash","deep-verify":"Full suite and secret scan after the PR opens"};function kb(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}`;const o=Ub[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 Hb(i){const r=i?Date.parse(i):NaN;return Number.isNaN(r)?null:new Date(r).toISOString().slice(11,19)}function Lb(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 Bb(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 qb(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 mg(i){return typeof i!="number"?pe: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 $b(i,r){const o=i?Lb(i):[];return o.length?{files:o,source:"patch"}:r&&r.files.length?{files:r.files.map(c=>({...c,kind:"modified"})),source:"git"}:null}const Yb=i=>i&&typeof i=="object"?i:{},Vu=i=>typeof i=="string"&&i.trim()?i.trim():null,lf=(i,r=120)=>i.length>r?`${i.slice(0,r-3)}...`:i,Vb=/time ?limit|timed out|time budget|over cap/i;function Gb(i){const r=new Map,o=[];let c=0;for(const g of i){const b=Yb(g.data);if(g.type==="test.result"){const y=Vu(b.name);y&&r.set(y,{result:String(b.result??""),why:Vu(b.first_error)??Vu(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 y=Vu(b.reason);y&&g.stage!=="fix"?o.push(`${g.stage}: ${lf(y)}`):y&&Vb.test(y)&&c++}}const d=[],m=[...r].filter(([,g])=>g.result==="fail");m.length&&d.push(`verify: ${m.slice(0,3).map(([g,b])=>b.why?`${g} ${lf(b.why,90)}`:`${g} failed`).join("; ")}${m.length>3?`; ${m.length-3} more`:""}`);const p=[...r].filter(([,g])=>g.result==="not_run");!m.length&&p.length&&d.push(`verify: ${p.slice(0,3).map(([g,b])=>b.why?`${g} not run (${lf(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 Za=i=>i&&typeof i=="object"&&!Array.isArray(i)?i:{},Ka=i=>typeof i=="string"&&i.trim()?i.trim():null,ql=(i,r)=>{for(const o of r){const c=Ka(i[o]);if(c)return c}return null},Qb={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"},pg=i=>{const r=Za(i),o=typeof i=="string"?i:Ka(r.result)??Ka(r.status)??Ka(r.outcome);return o?Qb[o.toLowerCase()]??null:null},gg=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 Xb(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=Za(r.git),c=Za(r.diff),d=Array.isArray(r.checks)?r.checks:Array.isArray(r.tests)?r.tests:null,m=!d&&r.checks&&typeof r.checks=="object"?Object.values(Za(r.checks)):null,p=d??m;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?gg(p.map(pg)):null}}function Zb(i){let r=null,o=null;const c=new Map;for(const d of i){const m=Za(d.data);if(d.type==="stage.completed"&&d.stage==="commit"&&(r=ql(m,["head_sha"])??r),o=ql(m,["base_sha"])??o,d.type==="test.result"){const p=Ka(m.name);p&&c.set(p,pg(m))}}return{verdict:null,diffSha:null,base:o,head:r,checks:c.size?gg([...c.values()]):null}}function Kb(i,r){if(i===void 0)return{facts:{verdict:null,diffSha:null,base:null,head:null,checks:null},state:"loading"};const o=Xb(i);return o?{facts:o,state:"read"}:{facts:Zb(r),state:"unreachable"}}function nf(i,r){return r==="read"?pe:r==="loading"?"loading":"receipt file not reachable from this Control Plane"}const Jb="Loki's own rules stopped this run (fixed in 10.10.3). Retry on the latest version.";function af(i){return Ae(i.verdict?nr(i)??i.verdict:null)}function Ib(i){var c;const r=i.verdict?nr(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?Fu(`The receipt did not pass the integrity check: ${o}`):i.stop_reason?Fu(i.stop_reason).replace(/\s+/g," ").trim():null}function Fb(i){const r=i.find(m=>m.type==="stage.completed"&&m.stage==="implement"),o=Ka(Za(r==null?void 0:r.data).spec_conflict_reason),c=Gb(i.map(m=>({type:m.type,stage:m.stage,data:m.data}))),d=[o,c].filter(m=>!!m);return d.length?d.join(`
|
|
181
|
+
|
|
182
|
+
`):null}const Wb=pe,Pb={good:"success",warn:"warning",bad:"error",neutral:"neutral"};function Ju({verdict:i,label:r,tone:o,testid:c}){const d=r?{label:r,tone:o??"neutral"}:Ae(i);return u.jsx(Lt,{tone:Pb[d.tone],pulse:d.label==="Running","data-testid":c,style:{textTransform:"none",letterSpacing:0},children:d.label})}function tj(i){return i.cost_usd!==null&&i.cost_usd!==void 0?Pe(i.cost_usd):i.partial_usd?`at least ${Pe(i.partial_usd)} (${i.measured_sessions} of ${i.total_sessions} sessions measured)`:Wb}function ej(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 lj(i,r){const[o,c]=N.useState([]),d=N.useRef(-1);return N.useEffect(()=>{const m=new AbortController;d.current=-1;const p=g=>{const b=g.filter(y=>y.seq>d.current);b.length&&(d.current=b[b.length-1].seq,c(y=>[...y,...b].slice(-2e3)))};return(async()=>{for(p(await Ab(i,r));!m.signal.aborted;)await Db(i,r,()=>d.current,g=>p([g]),m.signal),m.signal.aborted||await new Promise(g=>setTimeout(g,3e3))})(),()=>m.abort()},[i,r]),o}function sf(i,r,o){const[c,d]=N.useState(void 0);return N.useEffect(()=>{let m=!0;return hg(i,r,o).then(p=>{m&&d(p)}),()=>{m=!1}},[i,r,o]),c}const gf={completed:"var(--cp-term-green)",running:"var(--cp-term-purple)",failed:"var(--cp-term-red)",skipped:"var(--cp-term-amber)"},nj=i=>gf[i==="started"?"running":i]??"var(--cp-term-dim)";function Qa({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 aj({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(Qa,{color:nj(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 ij({events:i,awaiting:r}){const o=Mb(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.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:Hb(c.ts)??pe}),u.jsxs("span",{style:{display:"flex",alignItems:"flex-start",gap:6,fontFamily:"var(--cp-font-mono)",color:gf[c.outcome]??"var(--cp-term-lilac)"},children:[u.jsx("span",{style:{marginTop:6},children:u.jsx(Qa,{color:gf[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:kb(c)}),d?u.jsxs("span",{className:"cp-tl-meta",children:[u.jsx("span",{"data-testid":"tl-duration",children:typeof c.duration_s=="number"?mg(c.duration_s):c.outcome==="running"?"running":pe}),u.jsx("span",{"data-testid":"tl-model",children:c.model??(c.cost_usd==="no-session"?"-":pe)}),u.jsx("span",{"data-testid":"tl-cost",children:c.cost_usd==="no-session"?"-":c.cost_usd===null?pe:Pe(c.cost_usd)})]}):null]},c.key)})})}const sj={display:"flex",flexDirection:"column",gap:10};function Wa({title:i,meta:r,children:o,testid:c}){return u.jsxs(Gt,{"data-testid":c,style:sj,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 uj({d:i,patch:r}){const o=$b(r,i.diff_stat),c=i.files_touched??[],d=(o==null?void 0:o.files)??null,m=(d==null?void 0:d.reduce((y,R)=>y+(R.added??0),0))??0,p=(d==null?void 0:d.reduce((y,R)=>y+(R.removed??0),0))??0,g={added:["+","var(--cp-success-ink)"],deleted:["-","var(--cp-error-ink)"],modified:["~","var(--cp-warning-ink)"]},b=(y,R)=>y===null?"binary":`${R}${y}`;return u.jsx(Wa,{title:"Changed files",testid:"run-diff",meta:d&&d.length?`${d.length} files, +${m} -${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(y=>u.jsxs("li",{"data-testid":"changed-file",style:{display:"flex",gap:10,padding:"3px 0"},children:[u.jsx("span",{style:{color:g[y.kind][1],width:12},children:g[y.kind][0]}),u.jsx("span",{className:"cp-trunc",style:{flex:1},title:y.path,children:y.path}),u.jsx("span",{style:{color:"var(--cp-success-ink)"},children:b(y.added,"+")}),u.jsx("span",{style:{color:"var(--cp-error-ink)"},children:y.removed===null?"":b(y.removed,"-")})]},y.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(y=>u.jsxs("li",{"data-testid":"changed-file",className:"cp-trunc",title:y,children:[y," ",u.jsxs("span",{style:{color:"var(--cp-text-muted)"},children:["(line counts ",pe,")"]})]},y))}):u.jsx("span",{"data-testid":"changed-files-unmeasured",children:r===void 0?u.jsx(Bt,{label:"Loading diff"}):`Changed files ${pe}: no diff or commit range could be read for this run.`})})}function Ga({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 rj({d:i,source:r,run:o,receipt:c,receiptJson:d,events:m}){var H,Y,ot,P;const[p,g]=N.useState({busy:!1}),[b,y]=N.useState(!1),R=((H=i.receipt)==null?void 0:H.sha256)??null,{facts:v,state:A}=Kb(d,m),B=async()=>{g({busy:!0});try{g({busy:!1,res:await dg(r,o)})}catch(tt){g({busy:!1,error:tt.message})}},Q=v.base??(A==="read"?null:((Y=i.diff_stat)==null?void 0:Y.base)??null),nt=v.head??(A==="read"?null:((ot=i.diff_stat)==null?void 0:ot.head)??null),L=(tt,qt)=>tt?tt.slice(0,qt):nf(null,A),$=v.verdict??((P=i.receipt)==null?void 0:P.verdict)??null,I=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=v.checks;return u.jsxs(Wa,{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(Ga,{k:"Verdict",testid:"rr-verdict",children:$?`receipt says ${Ae($).label}`:nf(null,A)}),u.jsx(Ga,{k:"Diff hash",testid:"rr-diff",children:u.jsx("code",{title:v.diffSha??void 0,children:L(v.diffSha,16)})}),u.jsx(Ga,{k:"Base",testid:"rr-base",children:u.jsx("code",{title:Q??void 0,children:L(Q,12)})}),u.jsx(Ga,{k:"Head",testid:"rr-head",children:u.jsx("code",{title:nt??void 0,children:L(nt,12)})}),u.jsx(Ga,{k:"Signature",testid:"rr-sig",children:I}),u.jsx(Ga,{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`:""}`:nf(null,A)})]}),u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[u.jsxs(gt,{variant:"secondary",size:"sm","data-testid":"run-verify",disabled:!R||p.busy,onClick:()=>void B(),children:[u.jsx(H1,{size:13,"aria-hidden":"true"})," ",p.busy?"Verifying":"Verify"]}),u.jsx(gt,{variant:"ghost",size:"sm","data-testid":"receipt-raw-toggle","aria-pressed":b,onClick:()=>y(tt=>!tt),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(Ju,{verdict:p.res.verdict})," ",Fu(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 cj({d:i}){return u.jsx(Wa,{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=Bb(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(Lt,{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 oj({source:i,run:r,question:o,onSent:c}){const[d,m]=N.useState(""),[p,g]=N.useState({busy:!1}),b=async()=>{g({busy:!0});try{await Q0(i,r,d.trim()),g({busy:!1,sent:!0}),c()}catch(y){g({busy:!1,error:y.message})}};return u.jsxs(Wa,{title:"Needs your answer",testid:"run-reply-card",meta:u.jsx(N1,{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(I0,{"aria-label":"Your reply",rows:3,value:d,onChange:y=>m(y.target.value),disabled:p.busy||p.sent}),u.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[u.jsx(gt,{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 fj({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(Ef,{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 ",pe,": 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(Wa,{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(V0,{size:14,"aria-hidden":"true"}),r]})})}function dj({source:i,run:r,slot:o,renderSlot:c}){const[d,m]=N.useState(null),[p,g]=N.useState(null),[b,y]=N.useState(!1),[R,v]=N.useState(!1),[A,B]=N.useState({busy:!1}),[Q,nt]=N.useState({busy:!1}),L=lj(i,r),$=sf(i,r,"diff.patch"),I=sf(i,r,"receipt.md"),M=sf(i,r,"receipt.json"),H=N.useCallback(()=>{ar(i,r).then(X=>{m(X),g(null)},X=>g(X.message))},[i,r]),Y=!d||d.status==="running"||d.verdict===null;if(N.useEffect(()=>{if(H(),!Y)return;const X=setInterval(H,4e3);return()=>clearInterval(X)},[H,Y]),p&&!d)return u.jsx(Rt,{title:"Run not available",hint:p});if(!d)return u.jsx(Bt,{label:"Loading run"});const ot=d.title??d.issue_ref??d.origin_repo??`Title ${pe}`,P=!!d.verdict&&af(d).label==="Tampered",tt=!!d.blocked_question&&!P,qt=d.status==="running"||d.verdict===null&&!d.ended_at,et=qb(d.stages),xt=qt?null:Ib(d),at=xt?Fb(L):null,Qt=!qt&&!P&&d.own_rules_block===!0,ee=!qt&&!!d.issue_ref,Jt=async()=>{B({busy:!0});try{await sg(i,r,"retry"),B({busy:!1,msg:"Retry started as a new run."}),H()}catch(X){B({busy:!1,msg:X.message,error:!0})}},V=async()=>{nt({busy:!0});try{await cg({target:d.issue_ref}),nt({busy:!1,msg:"Started a new run."})}catch(X){nt({busy:!1,msg:X.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??`repo ${pe}`,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:ot})]}),tt?u.jsx(Ju,{verdict:"BLOCKED",testid:"run-outcome"}):d.verdict?u.jsx(Ju,{label:af(d).label,tone:af(d).tone,testid:"run-outcome"}):u.jsx(Ju,{verdict:null,testid:"run-outcome"}),u.jsx("span",{"data-testid":"run-elapsed",style:{fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-base)"},children:mg(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:tj(d)}),u.jsxs("span",{"data-testid":"run-header-slot",style:{display:"inline-flex",gap:8},children:[o,c?c(Qt?{...d,blocked_question:null}:d,H):null]}),c?null:u.jsxs(gt,{variant:Qt?"primary":"secondary",size:"sm","data-testid":"run-retry",disabled:!ee||Q.busy,title:qt?"The run is still in progress":d.issue_ref?"Start this issue again":`No issue reference recorded ${pe}`,onClick:()=>void V(),children:[u.jsx(v0,{size:13,"aria-hidden":"true"})," Retry"]}),Q.msg?u.jsx("span",{role:Q.error?"alert":"status","data-testid":"run-retry-msg",style:{color:Q.error?"var(--cp-error-ink)":"var(--cp-text-2)",fontSize:"var(--cp-text-base)"},children:Q.msg}):null]}),Qt?u.jsxs(Wa,{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:Jb}),u.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[u.jsxs(gt,{"data-testid":"run-own-rules-retry",disabled:A.busy,onClick:()=>void Jt(),children:[u.jsx(v0,{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,xt&&!Qt?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:"})," ",xt]}),at?u.jsx(gt,{variant:"ghost",size:"sm","data-testid":"run-why-raw-toggle","aria-pressed":R,onClick:()=>v(X=>!X),children:R?"Hide raw":"Show raw"}):null,R&&at?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:at}):null]}):null,tt&&!Qt&&d.blocked_question?u.jsx(oj,{source:i,run:r,question:Fu(d.blocked_question),onSent:H}):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(uj,{d,patch:$}),u.jsx(rj,{d,source:i,run:r,receipt:I,receiptJson:M,events:L})]}),u.jsxs("div",{"data-testid":"run-aside",style:{display:"flex",flexDirection:"column",gap:16,minWidth:0},children:[u.jsx(cj,{d}),u.jsx(fj,{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(Qa,{color:"#FF5F57"}),u.jsx(Qa,{color:"#FEBC2E"}),u.jsx(Qa,{color:"#28C840"})]}),u.jsxs("span",{className:"cp-trunc",children:["Control Plane / ",d.model??`model ${pe}`]}),u.jsx("span",{children:d.provider??`provider ${pe}`})]}),u.jsxs("div",{className:"cp-term-body",children:[u.jsx(aj,{d}),u.jsx("div",{className:"cp-term-main",children:u.jsx(ij,{events:L,awaiting:qt})})]}),u.jsxs("div",{className:"cp-term-foot",children:[u.jsx("span",{"data-testid":"run-progress",children:et.m?`stage ${et.n} / ${et.m}`:`stage ${pe}`}),qt?u.jsxs("span",{"data-testid":"run-live",style:{display:"inline-flex",alignItems:"center",gap:8,color:"var(--cp-term-green)"},children:[u.jsx(Qa,{color:"var(--cp-term-green)",pulse:!0})," live"]}):u.jsx("span",{"data-testid":"run-ended",children:d.ended_at?"run ended":`end time ${pe}`})]})]}),u.jsxs("div",{children:[u.jsx(gt,{variant:"ghost",size:"sm","data-testid":"run-raw-toggle","aria-pressed":b,onClick:()=>y(X=>!X),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:L.length===0?u.jsx("div",{children:"No events yet."}):L.map(X=>u.jsx("div",{children:`${X.seq} ${ej(X)}`},X.seq))})]}):null]})]})}function hj(){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 mj({source:i,run:r,slot:o,renderSlot:c}){const d=i&&r?{source:i,run:r}:hj();return d?u.jsx(dj,{source:d.source,run:d.run,slot:o,renderSlot:c}):u.jsx(Rt,{title:"No run selected",hint:"Open a run from Home or Runs."})}const yg={id:"run",path:"/runs/:source/:run",title:"Run",component:mj},vg="loki-theme",tr=new Set,pj=()=>{try{const i=localStorage.getItem(vg);return i==="light"||i==="dark"?i:null}catch{return null}},xg=()=>{try{return typeof globalThis.matchMedia=="function"?globalThis.matchMedia("(prefers-color-scheme: dark)"):null}catch{return null}},bg=()=>{const i=xg();return i?i.matches?"dark":"light":"dark"};let sr=pj(),cs=sr??bg();function ur(i=cs){var o;const r=(o=globalThis.document)==null?void 0:o.documentElement;r&&(sr?r.setAttribute("data-theme",i):r.removeAttribute("data-theme"),r.classList.toggle("dark",i==="dark"))}function gj(i){cs=i,sr=i;try{localStorage.setItem(vg,i)}catch{}ur(i);for(const r of tr)r()}const er=()=>gj(cs==="dark"?"light":"dark");var Ku,$0;($0=(Ku=xg())==null?void 0:Ku.addEventListener)==null||$0.call(Ku,"change",()=>{if(!sr){cs=bg(),ur();for(const i of tr)i()}});function jg(){return N.useSyncExternalStore(i=>(tr.add(i),()=>{tr.delete(i)}),()=>cs,()=>"dark")}const yj="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",vj="loki start owner/repo#N";function Sg(){const[i,r]=N.useState(null),[o,c]=N.useState(!1),d=async()=>{c(!0);try{const m=await X1();r(m.failed.length?{ok:!1,text:`Imported ${m.runs} runs; ${m.failed.length} failed.`}:{ok:!0,text:m.runs===0?"No runs found in this folder.":`Imported ${m.runs} runs. Reload to see them.`})}catch(m){r({ok:!1,text:m.message})}c(!1)};return u.jsxs("div",{children:[u.jsx("button",{type:"button","data-testid":"import-runs",disabled:o,onClick:d,className:yj,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 Cf(){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(Sg,{})}),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:vj})]})}function xj(){const i=jg();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(gt,{variant:"secondary",onClick:er,children:i==="dark"?"Switch to light theme":"Switch to dark theme"}),u.jsx("div",{className:"mt-6",children:u.jsx(Sg,{})})]})}let _g={open:!1,preset:null};const yf=new Set,Eg=i=>{_g=i;for(const r of yf)r()},Ia=(i=null)=>Eg({open:!0,preset:i}),z0=()=>Eg({open:!1,preset:null}),O0=()=>_g,bj=()=>N.useSyncExternalStore(i=>(yf.add(i),()=>{yf.delete(i)}),O0,O0),jj=()=>globalThis.LOKI_CONTROL_BASE??"",Sj=10;async function _j(){const i=[];let r=null;for(let o=0;o<Sj;o++){const c=_e(),d=new URLSearchParams({limit:"200"});r&&d.set("cursor",r);const m=await fetch(`${jj()}/v1/runs?${d}`,{headers:c?{authorization:`Bearer ${c}`}:{}});if(!m.ok)throw new Error(`/v1/runs: HTTP ${m.status}`);const p=await m.json();if(i.push(...p.runs),r=p.next_cursor,!r)break}return i}function rr(i=!0){const[r,o]=N.useState({runs:null,error:null}),c=N.useCallback(()=>{_j().then(d=>o({runs:d,error:null}),d=>o(m=>({runs:m.runs,error:d.message})))},[]);return N.useEffect(()=>(c(),i?X0(c):void 0),[c,i]),r}const Tg=864e5,Ej=14,Xa=i=>{const r=Date.parse(i.started_at??i.last_event_at??"");return Number.isNaN(r)?-1/0:r},os=i=>`#/runs/${encodeURIComponent(i.source_id)}/${encodeURIComponent(i.run_id)}`,Sn=i=>i.status==="running"||!i.verdict&&!i.ended_at?null:nr(i),Af=i=>Ae(Sn(i)),Tj=i=>Sn(i)===null,cr=i=>(Sn(i)??"").trim().toUpperCase(),Nj=i=>["SPEC_CONFLICT","BLOCKED"].includes(cr(i)),Rj=i=>cr(i)==="PARTIAL",zj=i=>cr(i)==="VERIFIED",Oj=i=>!Tj(i),C0=i=>{var r;return((r=i.title)==null?void 0:r.trim())||i.issue_ref||"Untitled task"};function or(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 m=[...d].sort((b,y)=>Xa(y)-Xa(b)),p=m[0],g=m.find(b=>{var y;return(y=b.title)==null?void 0:y.trim()});o.push({key:c,title:C0(g||p),repo:p.origin_repo,ref:p.issue_ref,attempts:m,latest:p})}return o.sort((c,d)=>Xa(d.latest)-Xa(c.latest))}function Cj(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 ${Af(i.latest).label}`}function wf(i){return typeof i.cost_usd=="number"?Pe(i.cost_usd):i.partial_usd?`${Pe(i.partial_usd)}+`:null}function Ng(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 Pa(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 Rg(i,r){const o=i.filter(m=>Nj(m.latest)),c=i.filter(m=>Rj(m.latest)),d=i.filter(m=>m.latest.pr_url&&["VERIFIED","ALREADY_SATISFIED"].includes(cr(m.latest))&&r-Xa(m.latest)<=Ej*Tg);return{blocked:o,partial:c,prs:d}}function Aj(i,r,o){const c=i.filter(b=>Xa(b)>=o-7*Tg),d=c.filter(Oj),m=d.filter(zj),p=c.filter(b=>typeof b.cost_usd=="number"),g=Rg(r,o);return{runsWeek:c.length,finishedWeek:d.length,verifiedWeek:m.length,verifiedShare:d.length?m.length/d.length:null,costWeek:p.length?p.reduce((b,y)=>b+(y.cost_usd??0),0):null,costPartial:p.length<c.length,needsYou:g.blocked.length+g.partial.length+g.prs.length}}const wj={good:"success",warn:"warning",bad:"error",neutral:"neutral"};function fs({verdict:i}){const r=Ae(i);return u.jsx(Lt,{tone:wj[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"},Dj={...Se,textAlign:"left",fontSize:"var(--cp-text-sm)",fontWeight:500,color:"var(--cp-text-muted)",borderBottom:"1px solid var(--cp-border)"},Wi={color:"var(--cp-text-muted)",fontSize:"var(--cp-text-sm)"},zg={color:"var(--cp-text)",textDecoration:"none"};function fr({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(Ef,{size:12,"aria-hidden":"true"})]})}function Mj({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:os(i),style:{...zg,color:"var(--cp-accent)"},children:"Attempt"})}),u.jsx("td",{style:Se}),u.jsx("td",{style:Se,children:u.jsx(fs,{verdict:Sn(i)})}),u.jsx("td",{style:Se,children:u.jsx(fr,{run:i})}),u.jsx("td",{style:Se,children:wf(i)}),u.jsx("td",{style:Se,children:Ng(i)}),u.jsx("td",{style:{...Se,...Wi},children:Pa(i,r)})]})}function Uj({g:i,now:r}){const[o,c]=N.useState(!1),d=i.attempts.length>1,m=Cj(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(d1,{size:14,"aria-hidden":"true"}):u.jsx(m1,{size:14,"aria-hidden":"true"})}):u.jsx("span",{style:{width:18}}),u.jsxs("div",{style:{minWidth:0},children:[u.jsx("a",{href:os(p),"data-testid":"issue-title",style:zg,children:i.title}),m?u.jsx("div",{"data-testid":"group-summary",style:Wi,children:m}):i.ref?u.jsx("div",{style:Wi,children:i.ref}):null]})]})}),u.jsx("td",{style:{...Se,...Wi},children:i.repo}),u.jsx("td",{style:Se,children:u.jsx(fs,{verdict:Sn(p)})}),u.jsx("td",{style:Se,children:u.jsx(fr,{run:p})}),u.jsx("td",{style:Se,children:wf(p)}),u.jsx("td",{style:Se,children:Ng(p)}),u.jsx("td",{style:{...Se,...Wi},children:Pa(p,r)})]}),d&&o?i.attempts.map(g=>u.jsx(Mj,{run:g,now:r},`${g.source_id}/${g.run_id}`)):null]})}const kj={outcome:"",repo:"",q:""};function Hj(i,r){const o=r.q.trim().toLowerCase();return i.filter(c=>!(r.outcome&&Af(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 Lj({runs:i,now:r=Date.now()}){const[o,c]=N.useState(kj),d=N.useMemo(()=>or(i),[i]),m=N.useMemo(()=>Hj(d,o),[d,o]),p=N.useMemo(()=>[...new Set(d.map(y=>Af(y.latest).label))].sort(),[d]),g=N.useMemo(()=>[...new Set(d.map(y=>y.repo).filter(y=>!!y))].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(Fn,{"aria-label":"Search runs",placeholder:"Search issues",value:o.q,onChange:y=>c({...o,q:y.target.value}),style:{maxWidth:220}}),u.jsx("span",{"data-testid":"filter-outcome",children:u.jsx(mf,{label:"Outcome",value:o.outcome||"All",options:[{value:"",label:"All"},...p.map(y=>({value:y,label:y}))],onSelect:y=>c({...o,outcome:y})})}),u.jsx("span",{"data-testid":"filter-repo",children:u.jsx(mf,{label:"Repo",value:o.repo||"All",options:[{value:"",label:"All"},...g.map(y=>({value:y,label:y}))],onSelect:y=>c({...o,repo:y})})}),u.jsx(gt,{"data-testid":"new-run-button",onClick:()=>Ia(),children:"New run"})]}),i.length===0?u.jsx(Cf,{}):m.length===0?u.jsx(Rt,{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(Gt,{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(y=>u.jsx("th",{scope:"col",style:Dj,children:y},y))})}),u.jsx("tbody",{children:m.map(y=>u.jsx(Uj,{g:y,now:r},y.key))})]})})]})}function Bj(){const{runs:i,error:r}=rr();return i===null?r?u.jsx(Rt,{title:"Could not load runs",hint:r}):u.jsx(Bt,{label:"Loading runs"}):u.jsx(Lj,{runs:i})}const qj={id:"runs",path:"/runs",title:"Runs",component:Bj,inSettings:!1},$j=12,jn={color:"var(--cp-text-muted)",fontSize:"var(--cp-text-sm)"},Df={fontFamily:"var(--cp-font-serif)",fontWeight:400,fontSize:"var(--cp-text-xl)",margin:0};function Yj(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":`${Pe(i.costWeek)}${i.costPartial?"+":""}`},{id:"kpi-needs",label:"Needs you",value:String(i.needsYou)}]}function uf({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:os(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(fr,{run:d.latest}),u.jsx("span",{style:jn,children:Pa(d.latest,o)})]},d.key))]})}function Vj({groups:i,now:r}){const o=N.useMemo(()=>Rg(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:Df,children:"Needs you"}),u.jsx(Gt,{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(uf,{testid:"inbox-blocked",title:"Runs waiting for your answer",items:o.blocked,now:r}),u.jsx(uf,{testid:"inbox-partial",title:"Partly verified, review",items:o.partial,now:r}),u.jsx(uf,{testid:"inbox-prs",title:"Pull requests to review",items:o.prs,now:r})]})})]})}function Gj({groups:i,now:r}){const o=i.slice(0,$j);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:{...Df,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(Cf,{}):u.jsx(Gt,{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:os(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(fs,{verdict:Sn(c.latest)}),u.jsx("span",{style:{...jn,minWidth:64,textAlign:"right"},children:Pa(c.latest,r)})]},c.key))})]})}const Qj={pass:"success",warn:"warning",fail:"error"},Xj={pass:"Pass",warn:"Warning",fail:"Failing"};function Zj({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:Df,children:"Getting started"}),u.jsx(Gt,{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(Lt,{tone:Qj[c.status],children:Xj[c.status]}),u.jsx("span",{style:{flex:1,minWidth:0},children:c.name}),u.jsx("span",{style:jn,children:c.detail})]},c.name))})]})}function Kj({runs:i,now:r=Date.now(),doctor:o=null}){const c=N.useMemo(()=>or(i),[i]),d=N.useMemo(()=>Yj(Aj(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(gt,{"data-testid":"new-run-button",onClick:()=>Ia(),children:"New run"})]}),u.jsx("div",{"data-testid":"kpis",style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:16},children:d.map(m=>u.jsx("div",{"data-testid":m.id,children:u.jsx(Kn,{label:m.label,value:m.value,trend:m.trend})},m.id))}),u.jsx(Zj,{doctor:o,noRuns:i.length===0}),u.jsx(Vj,{groups:c,now:r}),u.jsx(Gj,{groups:c,now:r})]})}function Jj(){const{runs:i,error:r}=rr(),[o,c]=N.useState(null);return N.useEffect(()=>{let d=!0;return J1().then(m=>d&&c(m),m=>d&&c({error:m.message})),()=>{d=!1}},[]),i===null?r?u.jsx(Rt,{title:"Could not load runs",hint:r}):u.jsx(Bt,{label:"Loading overview"}):u.jsx(Kj,{runs:i,doctor:o})}const Ij={id:"home",path:"/home",title:"Overview",component:Jj};function Fj(i){return i.verdict?as(i)?"verified":"notproven":i.pr_url?"pr":i.status==="running"||i.started_at?"running":"issue"}const A0={issue:"Issue",running:"Running",pr:"PR open",verified:"Verified",notproven:"Not proven"};function Wj({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(Gt,{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(Ja,{run:i}):i.pr_url?u.jsx(Lt,{tone:"info",children:i.pr_draft?"draft PR":"PR open"}):i.status==="running"?u.jsx(Ja,{verdict:Et.RUNNING}):u.jsx(Lt,{children:"queued"}),i.current_stage&&!i.verdict?u.jsx(Lt,{children:i.current_stage}):null]})]})})}function Ii({id:i,runs:r}){return u.jsxs("section",{"data-testid":`lane-${i}`,"aria-label":A0[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:A0[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(Wj,{r:o},`${o.source_id}/${o.run_id}`))]})}function Gu({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 Pj(){const[i,r]=N.useState(null),[o,c]=N.useState(null),d=N.useCallback(()=>{In().then(p=>{r(p.runs),c(null)}).catch(p=>c(p.message))},[]);if(N.useEffect(()=>(d(),X0(d)),[d]),o&&!i)return u.jsx(Rt,{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(Rt,{title:"No runs yet",hint:"Start a run and it will appear here."});const m=p=>i.filter(g=>Fj(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(Gu,{id:"issue",children:u.jsx(Ii,{id:"issue",runs:m("issue")})}),u.jsx(Gu,{id:"running",children:u.jsx(Ii,{id:"running",runs:m("running")})}),u.jsx(Gu,{id:"pr",children:u.jsx(Ii,{id:"pr",runs:m("pr")})}),u.jsxs(Gu,{id:"done",children:[u.jsx(Ii,{id:"verified",runs:m("verified")}),u.jsx(Ii,{id:"notproven",runs:m("notproven")})]})]})]})}const tS={id:"work",path:"/work",title:"Work",component:()=>u.jsx(Pj,{})},Qu=i=>`${i.source_id}/${i.run_id}`;function eS(){const[i,r]=N.useState(null),[o,c]=N.useState(null),[d,m]=N.useState({}),[p,g]=N.useState(void 0);N.useEffect(()=>{let A=!0;return In().then(B=>A&&r(B.runs),B=>A&&c(B.message)),Ob().then(B=>A&&g(B),()=>A&&g(null)),()=>{A=!1}},[]);const b=async A=>{m(B=>({...B,[Qu(A)]:"pending"}));try{const B=await dg(A.source_id,A.run_id);m(Q=>({...Q,[Qu(A)]:B}))}catch(B){m(Q=>({...Q,[Qu(A)]:{error:B.message}}))}};if(o)return u.jsx(Rt,{title:"Receipts unavailable",hint:o});if(!i)return u.jsx(Bt,{label:"Loading receipts"});const y=i.filter(A=>A.verdict),R=Cb(y),v=y.length?Math.round(y.filter(A=>as(A)).length/y.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(Kn,{label:`Verified rate (${y.length} finished run${y.length===1?"":"s"}, by run outcome)`,value:v===null?"not measured":`${v}%`,series:R.map(A=>A.rate),trend:R.length>1?`${R.length} days`:void 0}),u.jsxs(Gt,{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]})]})]})]}),y.length===0?u.jsx(Rt,{title:"No finished runs yet",hint:"A receipt appears here when a run completes."}):u.jsx(Wn,{caption:"Receipts",columns:["Run","Outcome","Started","Verify"],rows:y.map(A=>{const B=d[Qu(A)];return[u.jsx("span",{style:{fontFamily:"var(--cp-font-mono)"},children:A.run_id},"run"),u.jsx(Ja,{run:A},"out"),A.started_at??"not measured",u.jsxs("span",{style:{display:"inline-flex",gap:8,alignItems:"center"},children:[u.jsx(gt,{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(Lt,{tone:"error","data-testid":"verify-result",children:B.error}):u.jsxs("span",{"data-testid":"verify-result","data-verdict":B.verdict,children:[u.jsx(Ja,{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 lS={id:"receipts",path:"/receipts",title:"Receipts",component:eS},We={padding:"12px 14px",verticalAlign:"top"},Og={...We,textAlign:"left",fontSize:"var(--cp-text-sm)",fontWeight:500,color:"var(--cp-text-muted)",borderBottom:"1px solid var(--cp-border)"},vf={color:"var(--cp-text-muted)",fontSize:"var(--cp-text-sm)"},Cg={fontFamily:"var(--cp-font-serif)",fontWeight:400,fontSize:"var(--cp-text-2xl)",margin:0};function nS({runs:i,now:r=Date.now()}){const o=N.useMemo(()=>or(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:Cg,children:"Pull requests"}),o.length===0?u.jsx(Rt,{title:"No pull requests yet",hint:"A run that opens a PR lists it here."}):u.jsx(Gt,{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:Og,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:We,children:u.jsx("a",{href:os(d),style:{color:"var(--cp-text)",textDecoration:"none"},children:c.title})}),u.jsx("td",{style:{...We,...vf},children:c.repo}),u.jsx("td",{style:We,children:u.jsx(fs,{verdict:Sn(d)})}),u.jsx("td",{style:We,children:u.jsx(fr,{run:d})}),u.jsx("td",{style:{...We,...vf},children:Pa(d,r)})]},c.key))})]})})]})}function aS(){const{runs:i,error:r}=rr();return i===null?r?u.jsx(Rt,{title:"Could not load pull requests",hint:r}):u.jsx(Bt,{label:"Loading pull requests"}):u.jsx(nS,{runs:i})}function iS(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"),m=or(c);return{repo:o,issues:m.length,runs:c.length,latest:m[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 sS({runs:i,now:r=Date.now()}){const o=N.useMemo(()=>iS(i),[i]);return u.jsxs("section",{"data-testid":"repos-page",style:{display:"flex",flexDirection:"column",gap:20},children:[u.jsx("h1",{style:Cg,children:"Repos"}),o.length===0?u.jsx(Rt,{title:"No repos yet",hint:"Repos appear once a run has recorded its origin."}):u.jsx(Gt,{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:Og,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:We,children:c.repo}),u.jsx("td",{style:We,children:c.issues}),u.jsx("td",{style:We,children:c.runs}),u.jsx("td",{style:We,children:u.jsx(fs,{verdict:Sn(c.latest)})}),u.jsx("td",{style:We,children:wf({...c.latest,cost_usd:c.cost,partial_usd:0})}),u.jsx("td",{style:{...We,...vf},children:Pa(c.latest,r)})]},c.repo))})]})})]})}function uS(){const{runs:i,error:r}=rr();return i===null?r?u.jsx(Rt,{title:"Could not load repos",hint:r}):u.jsx(Bt,{label:"Loading repos"}):u.jsx(sS,{runs:i})}const rS={id:"pulls",path:"/pulls",title:"Pull requests",component:aS},cS={id:"repos",path:"/repos",title:"Repos",component:uS};class dr extends Error{constructor(r,o){super(o),this.status=r}}const Ag=()=>globalThis.LOKI_CONTROL_BASE??"",wg=(i={})=>{const r=_e();return r?{...i,authorization:`Bearer ${r}`}:i};async function Mf(i,r){const o=await fetch(`${Ag()}${i}`,{...r,headers:wg(r!=null&&r.body?{"content-type":"application/json"}:{})}),c=await o.json().catch(()=>({}));if(!o.ok)throw new dr(o.status,c.error??`HTTP ${o.status}`);return c}const oS=async()=>(await Mf("/v1/ask/threads")).threads,fS=i=>Mf(`/v1/ask/threads/${encodeURIComponent(i)}`),Dg=i=>Mf("/v1/ask",{method:"POST",body:JSON.stringify(i)});function dS(i){var d,m;const r=i.split(`
|
|
183
|
+
|
|
184
|
+
`),o=r.pop()??"",c=[];for(const p of r){const g=(m=(d=/^event: (.+)$/m.exec(p))==null?void 0:d[1])==null?void 0:m.trim(),b=p.split(`
|
|
185
|
+
`).filter(R=>R.startsWith("data:")).map(R=>R.slice(5).replace(/^ /,"")).join(`
|
|
186
|
+
`);if(!g)continue;let y={};try{y=b?JSON.parse(b):{}}catch{continue}g==="delta"?c.push({type:"delta",text:String(y.text??"")}):g==="tool_use"?c.push({type:"tool_use",name:String(y.name??"")}):g==="result"?c.push({type:"result",text:String(y.text??""),isError:y.isError===!0}):g==="error"?c.push({type:"error",message:String(y.message??"error")}):g==="done"&&c.push({type:"done",status:String(y.status??"")})}return{events:c,rest:o}}async function hS(i,r,o){const c=await fetch(`${Ag()}/v1/ask/messages/${encodeURIComponent(i)}/stream`,{headers:wg({accept:"text/event-stream"}),signal:o});if(!c.ok||!c.body)throw new dr(c.status,`HTTP ${c.status}`);const d=c.body.getReader(),m=new TextDecoder;let p="";for(;;){const{value:g,done:b}=await d.read();if(b)break;p+=m.decode(g,{stream:!0});const{events:y,rest:R}=dS(p);p=R;for(const v of y)r(v)}}const mS=/Start a run on ([A-Za-z0-9][A-Za-z0-9._-]*\/[A-Za-z0-9._-]+#[1-9][0-9]*)\?/g;function pS(i){return[...new Set([...i.matchAll(mS)].map(r=>r[1]))]}let lr={enabled:!1,checked:!1,threads:[],error:null};const xf=new Set,rf=i=>{lr=i;for(const r of xf)r()},ls=()=>lr;async function Uf(){try{rf({enabled:!0,checked:!0,threads:await oS(),error:null})}catch(i){i instanceof dr&&i.status===404?rf({enabled:!1,checked:!0,threads:[],error:null}):rf({...lr,enabled:lr.enabled,checked:!0,error:i instanceof Error?i.message:"could not reach the control service"})}}function Mg(){const i=N.useSyncExternalStore(r=>(xf.add(r),()=>{xf.delete(r)}),ls,ls);return N.useEffect(()=>{ls().checked||Uf()},[]),i}const Ug=["done","complete","completed","error","failed","cancelled","canceled"],kg={color:"var(--cp-text-muted)",fontSize:"var(--cp-text-sm)"},gS=i=>{location.hash=`#/ask/${encodeURIComponent(i)}`};function yS({text:i}){const r=pS(i);return r.length===0?null:u.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginTop:10},children:r.map(o=>u.jsxs(gt,{variant:"secondary",size:"sm","data-testid":"offer-run",onClick:()=>Ia(o),children:["Start a run on ",o,"?"]},o))})}function vS({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:kg,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&&!Ug.includes(i.status)&&i.text===""&&!r?u.jsx(Bt,{label:"Loki is answering"}):null,o?null:u.jsx(yS,{text:i.text})]})}function Hg({busy:i,onSend:r,placeholder:o}){const[c,d]=N.useState(""),m=()=>{const p=c.trim();!p||i||(r(p),d(""))};return u.jsxs("form",{onSubmit:p=>{p.preventDefault(),m()},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(),m())},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(gt,{type:"submit","data-testid":"ask-send",disabled:i||c.trim()==="",children:"Ask"})]})}const Iu=i=>i instanceof dr&&i.status===404?"Ask Loki is not available on this control service.":i instanceof Error?i.message:"could not reach the control service";function xS(){return u.jsx(Rt,{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 bS({id:i}){var L;const[r,o]=N.useState(null),[c,d]=N.useState(null),[m,p]=N.useState({}),[g,b]=N.useState(!1),y=N.useRef(new Set),R=N.useRef(!0),v=N.useRef(null),A=N.useCallback(($,I)=>{o(M=>M&&{...M,messages:M.messages.map(H=>H.id===$?I(H):H)})},[]),B=N.useCallback($=>{if(y.current.has($))return;y.current.add($),b(!0),hS($,M=>{R.current&&(M.type==="delta"?A($,H=>({...H,status:"streaming",text:H.text+M.text})):M.type==="tool_use"?p(H=>({...H,[$]:M.name})):M.type==="result"?A($,H=>M.isError?{...H,error:M.text}:H.text===""?{...H,text:M.text}:H):M.type==="error"?A($,H=>({...H,status:"error",error:M.message})):M.type==="done"&&A($,H=>({...H,status:H.status==="error"?"error":M.status||"done"})))}).catch(M=>R.current&&A($,H=>({...H,status:"error",error:Iu(M)}))).finally(()=>{y.current.delete($),R.current&&(p(M=>{const{[$]:H,...Y}=M;return Y}),b(y.current.size>0),Uf())})},[A]),Q=N.useCallback(()=>{fS(i).then($=>{if(R.current){o($),d(null);for(const I of $.messages)I.role==="assistant"&&!Ug.includes(I.status)&&B(I.id)}},$=>R.current&&d(Iu($)))},[i,B]);N.useEffect(()=>(R.current=!0,o(null),d(null),Q(),()=>{R.current=!1}),[Q]),N.useEffect(()=>{var $,I;(I=($=v.current)==null?void 0:$.scrollIntoView)==null||I.call($,{block:"end"})},[r==null?void 0:r.messages.length,(L=r==null?void 0:r.messages.at(-1))==null?void 0:L.text]);const nt=$=>{d(null),Dg({question:$,thread_id:i}).then(()=>Q(),I=>d(Iu(I)))};return c&&!r?u.jsx(Rt,{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(vS,{m:$,tool:m[$.id]},$.id)),u.jsx("div",{ref:v})]}),c?u.jsx("p",{role:"alert","data-testid":"ask-error",style:{margin:0,color:"var(--cp-error)"},children:c}):null,u.jsx(Hg,{busy:g,onSend:nt,placeholder:"Ask a follow-up"})]}):u.jsx(Bt,{label:"Loading thread"})}function jS(){const[i,r]=N.useState(!1),[o,c]=N.useState(null),d=m=>{r(!0),c(null),Dg({question:m}).then(p=>{Uf(),gS(p.thread_id)},p=>{c(Iu(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:{...kg,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(Hg,{busy:i,onSend:d,placeholder:"What do you want to know?"})]})}function Lg({id:i}){const r=Mg();return r.checked?r.enabled?i?u.jsx(bS,{id:i},i):u.jsx(jS,{}):r.error?u.jsx(Rt,{title:"Could not reach Ask Loki",hint:r.error}):u.jsx(xS,{}):u.jsx(Bt,{label:"Checking Ask Loki"})}const SS={id:"ask",path:"/ask",title:"Ask Loki",component:()=>u.jsx(Lg,{})},_S={id:"ask-thread",path:"/ask/:id",title:"Ask Loki thread",component:({params:i})=>u.jsx(Lg,{id:i.id})};async function ES(){const i=globalThis.LOKI_CONTROL_BASE??"",r=_e(),o=await fetch(`${i}/v1/providers`,{headers:r?{authorization:`Bearer ${r}`}:{}});if(!o.ok)throw new Error(`HTTP ${o.status}`);return await o.json()}const TS=i=>i.probe==="timeout"?"installed, version probe timed out":i.installed?i.version?`installed, ${i.version}`:"installed, version not reported":"not installed";function NS(){const[i,r]=N.useState(null),[o,c]=N.useState(null);if(N.useEffect(()=>{let m=!0;return ES().then(p=>m&&r(p)).catch(p=>m&&c(p instanceof Error?p.message:String(p))),()=>{m=!1}},[]),o)return u.jsx(Rt,{title:"Could not load providers",hint:o});if(!i)return u.jsx(Bt,{label:"Detecting provider CLIs"});const d=i.providers.map(m=>[u.jsxs("span",{style:{display:"inline-flex",gap:8,alignItems:"center"},children:[u.jsx(tb,{state:m.installed?"active":"idle",label:m.installed?"installed":"not installed"}),u.jsx("strong",{children:m.id}),m.deprecated?u.jsx(Lt,{tone:"warning",children:"deprecated"}):null]},"n"),TS(m),m.auth_present?u.jsx(Lt,{tone:"success",children:"auth present"},"a"):u.jsx(Lt,{tone:"neutral",children:"no auth env set"},"a"),m.auth_env_names.length?`${m.auth_env_set.length?m.auth_env_set.join(", "):"none"} (of ${m.auth_env_names.join(", ")})`:"not measured",m.tiers.planning??"not measured",m.tiers.development??"not measured",m.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(Wn,{caption:"Provider CLIs",columns:["Provider","CLI","Auth","Env vars set","Planning","Development","Fast"],rows:d}),u.jsx(Gt,{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 RS={id:"models",path:"/models",title:"Models and providers",component:NS,inSettings:!0},zS=new Set(["that","this","with","from","when","should","must","will","have","into","then","than","each","which","their","there","about"]),Pi=i=>new Set((i.toLowerCase().match(/[a-z0-9]{4,}/g)??[]).filter(r=>!zS.has(r))),Fi=(i,r)=>{for(const o of i)if(r.has(o))return!0;return!1},cf=i=>Pi(i.replace(/[/.]/g," "));function of(i){if(i===null)return null;try{return JSON.parse(i)}catch{return null}}function OS(i){const r=i&&typeof i=="object"?i:{},c=(typeof r.body=="string"?r.body:"").split(/\r?\n/),d=c.map(b=>{var y,R;return(R=(y=/^\s*[-*]\s*\[[ xX]\]\s*(.+)$/.exec(b))==null?void 0:y[1])==null?void 0:R.trim()}).filter(b=>!!b);if(d.length)return{list:d,source:"checklist"};const m=[];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 y=/^\s*(?:[-*]|\d+[.)])\s+(.+)$/.exec(b);y!=null&&y[1]&&m.push(y[1].trim())}if(m.length)return{list:m,source:"checklist"};const g=typeof r.title=="string"?r.title.trim():"";return g?{list:[g],source:"title"}:{list:[],source:"none"}}function CS(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 m=d.replace(/^\s*(?:[-*]|\d+[.)])\s*/,"").trim();m&&c.push({text:m,files:[],checks:[]});continue}if(d&&typeof d=="object"){const m=d,p=[m.title,m.step,m.description,m.text].find(y=>typeof y=="string"&&y.trim()!=="");if(!p)continue;const g=Array.isArray(m.files)?m.files.filter(y=>typeof y=="string"):[],b=Array.isArray(m.checks)?m.checks.filter(y=>typeof y=="string"):[];c.push({text:p.trim(),files:g,checks:b,...typeof m.criterion=="string"?{criterion:m.criterion}:{}})}}return c}function AS(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 wS(i,r){return i?jl({...i,verdict:i.verdict??(r==null?void 0:r.verdict)??null}):null}function DS(i){var v,A,B,Q,nt;const{list:r,source:o}=OS(i.issue),c=CS(i.plan),d=((v=i.receipt)==null?void 0:v.checks)??[],m=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=m===Et.VERIFIED&&(p==null||p===Et.VERIFIED),b=[...new Set([...i.changedFiles,...((nt=(Q=i.receipt)==null?void 0:Q.wall)==null?void 0:nt.files)??[]])],y=new Set;return{rows:r.map(L=>{const $=Pi(L),I=c.filter(at=>at.criterion?at.criterion.trim()===L:Fi($,Pi(at.text))),M=new Set;for(const at of I){for(const ee of at.files)M.add(ee);const Qt=Pi(at.text);for(const ee of b)Fi(Qt,cf(ee))&&M.add(ee)}for(const at of b)Fi($,cf(at))&&M.add(at);const H=[...M];H.forEach(at=>y.add(at));const Y=at=>at.name.trim().toLowerCase(),ot=at=>!!Y(at)&&(L.toLowerCase().includes(Y(at))||I.some(Qt=>Qt.text.toLowerCase().includes(Y(at))||Qt.checks.some(ee=>ee.trim().toLowerCase()===Y(at)))),P=d.filter(at=>{const Qt=Pi(`${at.name} ${at.cmd??""}`);return ot(at)||Fi($,Qt)||H.some(ee=>Fi(cf(ee),Qt))}),tt=P.filter(ot),qt=P.filter(at=>!ot(at));let et="not proven",xt=null;return i.receipt?tt.some(at=>at.result==="fail")?(et="failed",xt="a linked check failed"):tt.length===0?xt=qt.length?"link inferred":"no check linked to this criterion":tt.every(at=>at.result==="pass")?g?et="proven":xt=`verdict is ${m!==Et.VERIFIED?m??"unknown (run record unavailable)":p}`:xt="a linked check did not run":xt="no receipt for this run",{criterion:L,steps:I.map(at=>at.text),files:H,evidence:tt,inferred:qt,status:et,note:xt}}),unmapped_files:b.filter(L=>!y.has(L)),criteria_source:o}}async function MS(i,r,o,c){const[d,m,p,g]=await Promise.all(["issue.json","plan.json","receipt.json","diff.patch"].map(v=>hg(i,r,v))),b=of(p??null),y=of(d??null),R=of(m??null);return{matrix:DS({issue:y,plan:R,receipt:b,changedFiles:AS(g??null),run:c}),stages:o,verdict:wS(c,b),have:{issue:y!==null,plan:R!==null,receipt:b!==null}}}const US={proven:"success",failed:"error","not proven":"warning"},ts={fontFamily:"var(--cp-font-mono)",fontSize:12,wordBreak:"break-all"},ff=u.jsx("span",{style:{color:"var(--cp-text-2)"},children:"none"});function Bg({params:i}){const r=i.source,o=i.run;return!r||!o?u.jsx(kS,{}):u.jsx(HS,{source:r,run:o})}function kS(){const[i,r]=N.useState(null),[o,c]=N.useState(null);return N.useEffect(()=>{let d=!0;return In().then(m=>d&&r(m.runs),m=>d&&c(m.message)),()=>{d=!1}},[]),o?u.jsx(Rt,{title:"Plans unavailable",hint:o}):i?i.length?u.jsx("div",{"data-testid":"plans-picker",children:u.jsx(Wn,{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:ts,"data-testid":"plans-pick",children:d.run_id},"a"),d.verdict?u.jsx(Ja,{run:d},"v"):"running",d.started_at??"not measured"])})}):u.jsx(Rt,{title:"No runs yet",hint:"Start a run to see its plan and traceability here."}):u.jsx(Bt,{label:"Loading runs"})}function HS({source:i,run:r}){var R;const[o,c]=N.useState(null),[d,m]=N.useState(null);if(N.useEffect(()=>{let v=!0;return c(null),(async()=>{const A=await ar(i,r).catch(()=>null);return MS(i,r,(A==null?void 0:A.stages)??null,A)})().then(A=>v&&c(A),A=>v&&m(A.message)),()=>{v=!1}},[i,r]),d)return u.jsx(Rt,{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(v=>!g[v]),y=p.rows.filter(v=>v.status==="proven").length;return u.jsxs("div",{"data-testid":"plans",style:{display:"flex",flexDirection:"column",gap:16},children:[u.jsxs(Gt,{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?`${y} 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(v=>`${v}.json`).join(", ")]}):null]}),(R=o.stages)!=null&&R.length?u.jsx(nb,{stages:o.stages.map(v=>({label:v.stage,status:v.status==="completed"?"success":v.status==="failed"?"error":"pending"}))}):null,p.rows.length===0?u.jsx(Rt,{title:"No requirements found",hint:"issue.json has no title or acceptance criteria for this run."}):u.jsx(Wn,{caption:"Traceability matrix",columns:["Requirement","Plan step","Files changed","Evidence","Verdict"],rows:p.rows.map(v=>[v.criterion,v.steps.length?u.jsx("ol",{style:{margin:0,paddingLeft:16},children:v.steps.map(A=>u.jsx("li",{children:A},A))},"s"):ff,v.files.length?u.jsx("div",{style:ts,children:v.files.map(A=>u.jsx("div",{children:A},A))},"f"):ff,v.evidence.length||v.inferred.length?u.jsxs("div",{children:[v.evidence.map(A=>u.jsxs("div",{style:ts,children:[A.result,": ",A.name]},A.name)),v.inferred.map(A=>u.jsxs("div",{"data-testid":"inferred-hint",style:{...ts,color:"var(--cp-text-2)"},children:["inferred, not recorded: ",A.result,": ",A.name]},`i-${A.name}`))]},"e"):ff,u.jsxs("span",{"data-testid":"row-status","data-status":v.status,children:[u.jsx(Lt,{tone:US[v.status],children:v.status==="not proven"?v.note==="link inferred"?"NOT PROVEN (link inferred)":"NOT PROVEN":v.status.toUpperCase()}),v.note?u.jsx("div",{style:{color:"var(--cp-text-2)",fontSize:12},children:v.note}):null]},"v")])}),p.unmapped_files.length?u.jsxs(Gt,{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:ts,children:p.unmapped_files.map(v=>u.jsx("div",{children:v},v))})]}):null]})}const LS={id:"plans",path:"/plans/:source/:run",title:"Plans",component:Bg},BS={id:"plans-picker",path:"/plans",title:"Plans",component:Bg},qg=()=>globalThis.LOKI_CONTROL_BASE??"",bf=i=>{const r=_e();return{...i?{"content-type":"application/json"}:{},...r?{authorization:`Bearer ${r}`}:{}}};async function w0(i,r){const o=await fetch(`${qg()}${i}`,r),c=await o.json().catch(()=>({}));if(!o.ok)throw new Error(c.error??`HTTP ${o.status}`);return c}async function qS(i){const r=await fetch(`${qg()}/v1/merge/run`,{method:"POST",headers:bf(!0),body:JSON.stringify({dryRun:i})}),o=await r.json().catch(()=>null);if(!o||!Array.isArray(o.lines))throw new Error((o==null?void 0:o.error)??`HTTP ${r.status}`);return{ok:!1,ran:!1,dryRun:i,exit:null,...o,lines:o.lines}}function Xu(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 $S(){const[i,r]=N.useState(null),[o,c]=N.useState(null),[d,m]=N.useState(""),[p,g]=N.useState(!1),[b,y]=N.useState(null),[R,v]=N.useState(null),[A,B]=N.useState(!1),[Q,nt]=N.useState(null),L=N.useCallback(async()=>{try{const Y=await w0("/v1/merge/queue",{headers:bf(!1)});Y.measured?(r(Y.queue),c(null)):(r(null),c(Y.error??"not measured"))}catch(Y){r(null),c(Y instanceof Error?Y.message:String(Y))}},[]);N.useEffect(()=>{L()},[L]);const $=/^[0-9]{1,7}$/.test(d.trim()),I=async()=>{g(!0),y(null);try{await w0("/v1/merge/queue",{method:"POST",headers:bf(!0),body:JSON.stringify({prs:[d.trim()]})}),y({tone:"success",text:`Queued PR #${d.trim()}`}),m(""),await L()}catch(Y){y({tone:"error",text:Y instanceof Error?Y.message:String(Y)})}g(!1)},M=async Y=>{g(!0),y(null),B(!1);try{const ot=await qS(Y);Y?(v(ot),nt(null)):(nt(ot),v(null)),await L()}catch(ot){y({tone:"error",text:ot instanceof Error?ot.message:String(ot)})}g(!1)},H=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(Gt,{children:u.jsxs("div",{style:{display:"grid",gap:8},children:[u.jsx("strong",{children:"Queue"}),o?u.jsx(Rt,{title:"Queue not measured",hint:o}):i===null?u.jsx(Bt,{label:"Reading the queue"}):H?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(Y=>u.jsxs("li",{children:["PR #",Y]},Y))}),u.jsxs("div",{style:{display:"flex",gap:8},children:[u.jsx(Fn,{"aria-label":"PR number",inputMode:"numeric",placeholder:"PR number",value:d,onChange:Y=>m(Y.target.value.replace(/[^0-9]/g,"").slice(0,7))}),u.jsx(gt,{variant:"secondary",disabled:!$||p,onClick:I,children:"Add"})]})]})}),u.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[u.jsx(gt,{variant:"secondary",disabled:p||H||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(gt,{variant:"danger",disabled:p,onClick:()=>M(!1),children:"Confirm merge"}),u.jsx(gt,{variant:"ghost",onClick:()=>B(!1),children:"Cancel"})]}):u.jsx(gt,{disabled:p||H||i===null,onClick:()=>B(!0),children:"Merge queue"}),p?u.jsx(Bt,{label:"Working"}):null]}),b?u.jsx(Lt,{tone:b.tone,children:b.text}):null,R?u.jsxs(Gt,{children:[u.jsx("strong",{children:"Plan (dry run, nothing changed)"}),Xu(R)?u.jsx("p",{role:"alert",style:{margin:"4px 0"},children:Xu(R)}):null,u.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap"},children:R.lines.join(`
|
|
187
|
+
`)||"not measured"})]}):null,Q?u.jsxs(Gt,{children:[u.jsx("strong",{children:"Merge result"})," ",u.jsx(Lt,{tone:Q.ok?"success":"warning",children:Q.ok?"all merged":Q.partial||!Q.ran?"partial result":"some PRs left in queue"}),Xu(Q)?u.jsx("p",{role:"alert",style:{margin:"4px 0"},children:Xu(Q)}):null,u.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap"},children:Q.lines.join(`
|
|
188
|
+
`)})]}):null]})}const YS={id:"merge",path:"/merge",title:"Merge queue",component:$S},VS=()=>globalThis.LOKI_CONTROL_BASE??"",GS=i=>i==="low"?"success":i==="medium"?"warning":i==="high"||i==="critical"?"error":"neutral";function QS(){const[i,r]=N.useState("pr"),[o,c]=N.useState(""),[d,m]=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)),y=async()=>{m(!0);const R=i==="staged"?"staged=1":`${i}=${encodeURIComponent(o)}`;try{const v=_e(),A=await fetch(`${VS()}/v1/review/risk?${R}`,{headers:v?{authorization:`Bearer ${v}`}:{}}),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(v){g({measured:!1,reason:v instanceof Error?v.message:String(v)})}m(!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(Fn,{"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(gt,{disabled:!b||d,onClick:y,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(Kn,{label:"Risk score",value:`${p.score}/100`}),u.jsx(Lt,{tone:GS(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(Wn,{caption:"Risk factors",columns:["Factor","Points","Detail"],rows:p.factors.map(R=>[R.factor,`${R.points}/${R.max}`,R.detail])})]}):p?u.jsxs(Gt,{children:[u.jsx("strong",{children:"Risk score: not measured"}),u.jsx("br",{}),u.jsx("small",{children:p.reason??"no reason reported"})]}):null]})}const XS={id:"risk",path:"/risk",title:"PR risk",component:QS},$g=()=>globalThis.LOKI_CONTROL_BASE??"",Yg=(i={})=>{const r=_e();return r?{...i,authorization:`Bearer ${r}`}:i};class Fa extends Error{constructor(r,o,c){super(r),this.status=o,this.details=c}}async function Vg(){const i=await fetch(`${$g()}/v1/config`,{headers:Yg()}),r=await i.json().catch(()=>({}));if(!i.ok)throw new Fa(r.error??`HTTP ${i.status}`,i.status,[]);return{exists:!!r.exists,etag:r.etag??"",config:r.config??{},errors:r.errors??[]}}async function Gg(i,r){const o=await fetch(`${$g()}/v1/config`,{method:"PUT",headers:Yg({"content-type":"application/json","if-match":r}),body:JSON.stringify({config:i})}),c=await o.json().catch(()=>({}));if(!o.ok)throw new Fa(c.error??`HTTP ${o.status}`,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 Yt=i=>`var(--cp-${i})`,ZS=[{id:"provider",title:"Provider",hint:"Default provider. A CLI flag or LOKI_PROVIDER overrides it.",fields:[{path:["provider"],label:"Provider",kind:"select",options:["claude","codex","cline","aider","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"}]}],yn=i=>typeof i=="object"&&i!==null&&!Array.isArray(i);function Zu(i){const r={},o=yn(i)&&yn(i.workspaces)?i.workspaces:{};for(const[c,d]of Object.entries(o))yn(d)&&(yn(d.integration)&&"command"in d.integration&&(r[`${c} integration command`]=String(d.integration.command)),Array.isArray(d.repos)&&d.repos.forEach((m,p)=>{yn(m)&&"setup"in m&&(r[`${c} setup for repo ${p+1}`]=String(m.setup))}));return r}const KS=(i,r)=>r.reduce((o,c)=>yn(o)?o[c]:void 0,i);function Qg(i,r,o){const c={...i},[d,...m]=r;if(d===void 0)return c;if(m.length===0)return o===void 0?delete c[d]:c[d]=o,c;const p=Qg(yn(c[d])?c[d]:{},m,o);return Object.keys(p).length===0?delete c[d]:c[d]=p,c}function JS(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 IS(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 yn(c)?{value:c}:{error:`${i.label} must be a JSON object`}}catch{return{error:`${i.label} is not valid JSON`}}return{value:o}}function FS({section:i,state:r,onSave:o}){const c=i.fields.map(L=>JS(L,KS(r.config,L.path))),[d,m]=N.useState(c),[p,g]=N.useState([]),[b,y]=N.useState(!1),[R,v]=N.useState(!1),A=N.useId(),B=JSON.stringify(c);N.useEffect(()=>{m(c),g([])},[B]);const Q=d.some((L,$)=>L!==c[$]),nt=async()=>{const L=[];let $=r.config;if(i.fields.forEach((I,M)=>{const H=IS(I,d[M]??"");H.error?L.push(H.error):$=Qg($,I.path,H.value)}),L.length){g(L);return}if(JSON.stringify(Zu($))!==JSON.stringify(Zu(r.config))){g(["Edit shell commands in loki.yaml directly"]);return}y(!0),g([]),v(!1);try{await o($),v(!0)}catch(I){g(I instanceof Fa?[I.message,...I.details]:[I.message])}finally{y(!1)}};return u.jsxs(Gt,{"data-testid":`settings-${i.id}`,"aria-labelledby":`${A}-h`,children:[u.jsx("h2",{id:`${A}-h`,style:{margin:0,fontFamily:Yt("font-serif"),fontWeight:400,fontSize:Yt("text-xl")},children:i.title}),u.jsx("p",{style:{margin:"4px 0 12px",color:Yt("text-2"),fontSize:Yt("text-md")},children:i.hint}),u.jsx("div",{style:{display:"grid",gap:12},children:i.fields.map((L,$)=>{const I=`${A}-${$}`,M=Y=>{v(!1),m(ot=>ot.map((P,tt)=>tt===$?Y:P))},H={id:I,value:d[$]??"","data-field":L.path.join(".")};return u.jsxs("div",{children:[u.jsx("label",{htmlFor:I,style:{display:"block",fontSize:Yt("text-md"),marginBottom:4},children:L.label}),L.kind==="select"?u.jsxs("select",{...H,onChange:Y=>M(Y.target.value),style:{padding:"8px 10px",borderRadius:Yt("radius-md"),border:`1px solid ${Yt("border")}`,background:Yt("bg"),color:Yt("text"),font:"inherit"},children:[u.jsx("option",{value:"",children:"Not set"}),L.options.map(Y=>u.jsx("option",{value:Y,children:Y},Y))]}):L.kind==="lines"||L.kind==="json"?u.jsx(I0,{...H,rows:L.kind==="json"?8:4,spellCheck:!1,onChange:Y=>M(Y.target.value),style:L.kind==="json"?{fontFamily:Yt("font-mono")}:void 0}):u.jsx(Fn,{...H,type:L.kind==="number"?"number":"text",step:L.kind==="number"?"any":void 0,autoComplete:"off",spellCheck:!1,placeholder:L.kind==="env"?"ENV_VAR_NAME":void 0,onChange:Y=>M(Y.target.value),style:L.kind==="env"?{fontFamily:Yt("font-mono")}:void 0}),L.hint?u.jsx("div",{style:{color:Yt("text-3"),fontSize:Yt("text-base"),marginTop:4},children:L.hint}):null]},L.path.join("."))})}),i.id==="workspaces"&&Object.keys(Zu(r.config)).length?u.jsxs("div",{"data-testid":"settings-shell-readonly",style:{marginTop:12},children:[u.jsx("div",{style:{fontSize:Yt("text-md"),marginBottom:4},children:"Shell commands (read only, edit in loki.yaml directly)"}),u.jsx("ul",{style:{margin:0,paddingLeft:18,fontFamily:Yt("font-mono"),fontSize:Yt("text-base"),color:Yt("text-2")},children:Object.entries(Zu(r.config)).map(([L,$])=>u.jsxs("li",{children:[L,": ",$]},L))})]}):null,p.length?u.jsx("ul",{role:"alert","data-testid":"settings-problems",style:{margin:"12px 0 0",paddingLeft:18,color:Yt("error"),fontSize:Yt("text-md")},children:p.map(L=>u.jsx("li",{children:L},L))}):null,u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:12},children:[u.jsx(gt,{disabled:!Q||b,onClick:nt,children:b?"Saving":"Save"}),R&&!Q?u.jsx(Lt,{tone:"success",children:"Saved"}):null]})]})}function WS(){const[i,r]=N.useState(null),[o,c]=N.useState(null),d=()=>{c(null),Vg().then(r,p=>c(p.message))};if(N.useEffect(d,[]),o)return u.jsx(Rt,{title:"Configuration unavailable",hint:o,action:u.jsx(gt,{variant:"secondary",onClick:d,children:"Retry"})});if(!i)return u.jsx(Bt,{label:"Loading configuration"});const m=async p=>{try{const g=await Gg(p,i.etag);r({exists:!0,etag:g.etag,config:g.config,errors:[]})}catch(g){throw g instanceof Fa&&g.status===409?new Fa("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:Yt("font-serif"),fontWeight:400,fontSize:Yt("text-2xl")},children:"Configuration"}),u.jsxs("p",{style:{margin:"4px 0 0",color:Yt("text-2"),fontSize:Yt("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(Gt,{"data-testid":"config-file-errors",role:"alert",style:{borderColor:Yt("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,ZS.map(p=>u.jsx(FS,{section:p,state:i,onSave:m},p.id)),u.jsx("div",{children:u.jsx(gt,{variant:"ghost",size:"sm",onClick:d,children:"Reload from disk"})})]})}const PS={id:"settings-config",path:"/settings/config",title:"Configuration",component:WS,inSettings:!0},df=i=>typeof i=="object"&&i!==null&&!Array.isArray(i),es=i=>i.replace(/[\\/]+$/,"").split(/[\\/]/).pop()??i;function t2(i){const r=df(i)&&df(i.workspaces)?i.workspaces:{};return Object.entries(r).map(([o,c])=>({name:o,def:df(c)?c:{}}))}const e2=(i,r)=>{const o=r.origin_repo;return o?i.repo&&(o===i.repo||o.endsWith(`/${i.repo}`)||es(o)===es(i.repo))?!0:!!i.path&&es(o)===es(i.path):!1},D0=i=>i.started_at??"";function l2(i,r){return t2(i).map(({name:o,def:c})=>{const d=(Array.isArray(c.repos)?c.repos:[]).map(b=>{const y=r.filter(R=>e2(b,R)).sort((R,v)=>D0(v).localeCompare(D0(R)));return{name:b.repo??(b.path?es(b.path):"unnamed"),path:b.path??null,after:Array.isArray(b.after)?b.after:[],shell:typeof b.setup=="string",latest:y[0]??null,runs:y.length}}),m=d.filter(b=>b.latest),p=d.length&&m.length===d.length?{total:d.length,verified:m.filter(b=>as(b.latest)).length,failed:m.filter(b=>b.latest.verdict!==null&&!as(b.latest)).length,running:m.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 Xg=()=>globalThis.LOKI_CONTROL_BASE??"",n2=()=>{const i=_e();return i?{"content-type":"application/json",authorization:`Bearer ${i}`}:{"content-type":"application/json"}};async function a2(){const i=_e(),r=await fetch(`${Xg()}/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 i2(i,r){const o=await fetch(`${Xg()}/v1/runs`,{method:"POST",headers:n2(),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 s2({name:i}){const[r,o]=N.useState(""),[c,d]=N.useState(null),[m,p]=N.useState(!1),g=async()=>{p(!0),d(null);try{const b=await i2(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(Fn,{"aria-label":`Target for ${i}`,placeholder:"owner/repo#123 or a short task",value:r,onChange:b=>o(b.target.value)}),u.jsx(gt,{disabled:m||!r.trim(),onClick:g,children:"Run workspace"})]}),c?u.jsxs("div",{role:c.ok?"status":"alert",children:[u.jsx(Lt,{tone:c.ok?"success":"error",children:c.ok?"started":"refused"})," ",c.text]}):null]})}function u2({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(Ja,{run:o.latest},"v"):u.jsx(Lt,{tone:"neutral",pulse:!0,children:"running"},"v"):"not measured",o.latest?String(o.runs):"not measured"]);return u.jsx(Gt,{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(Lt,{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(Wn,{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(s2,{name:i.name})]})})}function r2(){const[i,r]=N.useState(null),[o,c]=N.useState([]),[d,m]=N.useState(null);return N.useEffect(()=>{let p=!0;return(async()=>{try{const{config:g,errors:b}=await a2();let y=[];try{y=(await In()).runs}catch{}p&&(r(l2(g,y)),c(b))}catch(g){p&&m(g instanceof Error?g.message:String(g))}})(),()=>{p=!1}},[]),d?u.jsx(Rt,{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(Lt,{tone:"warning",children:"loki.yaml has problems"})," ",o.join("; ")]}):null,i.map(p=>u.jsx(u2,{w:p},p.name))]}):u.jsx(Rt,{title:"No workspaces",hint:"Define workspaces in loki.yaml to run a group of repos together."}):u.jsx(Bt,{label:"Loading workspaces"})}const c2={id:"workspaces",path:"/workspaces",title:"Workspaces",component:r2},o2=()=>globalThis.LOKI_CONTROL_BASE??"";async function f2(){const i=_e(),r=await fetch(`${o2()}/v1/integrations`,{headers:i?{authorization:`Bearer ${i}`}:{}});if(!r.ok)throw new Error(`HTTP ${r.status}`);return(await r.json()).integrations}const d2=i=>typeof i=="object"&&i!==null&&!Array.isArray(i);function Zg(i,r,o){const[c,...d]=r;return c===void 0?i:{...i,[c]:d.length?Zg(d2(i[c])?i[c]:{},d,o):o}}const h2={connected:"success",not_connected:"neutral",not_measured:"neutral"},m2={connected:"connected",not_connected:"not connected",not_measured:"not measured"};function p2({row:i,onChanged:r}){const[o,c]=N.useState(i.env_name??""),[d,m]=N.useState(!1),[p,g]=N.useState(null),b=/^[A-Z_][A-Z0-9_]*$/.test(o),y=async()=>{if(!(!i.config_path||!b)){m(!0),g(null);try{const R=await Vg();await Gg(Zg(R.config,i.config_path.split("."),o),R.etag),g(`Saved ${o} to loki.yaml`),r()}catch(R){g(R instanceof Fa?[R.message,...R.details].join(": "):R.message)}finally{m(!1)}}};return u.jsxs(Gt,{"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(Lt,{tone:h2[i.status],children:m2[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(Fn,{"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(gt,{onClick:y,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 g2(){const[i,r]=N.useState(null),[o,c]=N.useState(null),d=N.useCallback(()=>{f2().then(r).catch(m=>c(m instanceof Error?m.message:String(m)))},[]);return N.useEffect(d,[d]),o?u.jsx(Rt,{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(m=>u.jsx(p2,{row:m,onChanged:d},m.id))]}):u.jsx(Bt,{label:"Probing integrations"})}const y2={id:"integrations",path:"/integrations",title:"Integrations",component:g2,inSettings:!0},v2=yg.component,M0={...yg,component:({params:i})=>u.jsx(v2,{source:i.source,run:i.run,renderSlot:(r,o)=>u.jsx(Nb,{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 U0(i){const r=i.component;return{...i,component:()=>u.jsx(r,{})}}function x2(){E0("run-detail"),E0("new-run"),Ce(U0({...Ij,path:"/"})),Ce({...M0,id:"run-short",path:"/r/:source/:run"}),Ce(M0),Ce(LS),Ce(BS),Ce(SS),Ce(_S);for(const i of[Sb,tS,lS,qj,rS,cS,RS,YS,XS,PS,c2,y2])Ce(U0(i))}let jf=null;function k0(i){jf=i}function b2(){return jf?(jf(),!0):!1}const j2=8,S2=()=>[{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"}],_2=i=>i.filter(r=>!r.path.includes(":")).map(r=>({id:`page:${r.id}`,kind:"Pages",label:r.title,hint:r.path,to:r.path})),H0=i=>{const r=Date.parse(i.started_at??i.last_event_at??"");return Number.isNaN(r)?0:r},E2=i=>[...i].sort((r,o)=>H0(o)-H0(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)}`}}),T2=(i,r)=>{const o=`${i.label} ${i.hint??""}`.toLowerCase();return r.split(/\s+/).filter(Boolean).every(c=>o.includes(c))};function N2(i,r,o,c){const d=i.trim().toLowerCase(),m=p=>d?p.filter(g=>T2(g,d)):p;return[...m(c),...m(r),...m(o).slice(0,j2)]}const me=i=>`var(--cp-${i})`,R2=i=>{location.hash=`#${i}`};function z2(){const[i,r]=N.useState(!1),[o,c]=N.useState(""),[d,m]=N.useState(0),[p,g]=N.useState([]),[b,y]=N.useState(null),R=N.useRef(null),v=N.useId(),A=N.useSyncExternalStore(ig,Pu,Pu),B=()=>{r(!1),c(""),m(0)};N.useEffect(()=>(k0(()=>r(M=>!M)),()=>k0(null)),[]),N.useEffect(()=>{if(!i)return;let M=!0;return y(null),In().then(H=>{M&&g(H.runs)},H=>{M&&y(H.message)}),queueMicrotask(()=>{var H;return(H=R.current)==null?void 0:H.focus()}),()=>{M=!1}},[i]),N.useEffect(()=>{const M=H=>{const Y=H.metaKey||H.ctrlKey,ot=H.key.toLowerCase();H.key==="Escape"&&i?(H.preventDefault(),B()):Y&&!H.shiftKey&&ot==="n"?(H.preventDefault(),Ia(),i&&B()):Y&&H.shiftKey&&ot==="d"&&(H.preventDefault(),er())};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[i]);const Q=N.useMemo(()=>N2(o,_2(ag().filter(M=>ls().enabled||!M.id.startsWith("ask"))),E2(p),S2()),[o,p,A]),nt=Math.min(d,Math.max(0,Q.length-1)),L=M=>{M.action==="toggle-theme"?er():M.action==="new-run"?Ia():M.to&&R2(M.to),B()},$=M=>{if(M.key==="ArrowDown")M.preventDefault(),m(Q.length?(nt+1)%Q.length:0);else if(M.key==="ArrowUp")M.preventDefault(),m(Q.length?(nt-1+Q.length)%Q.length:0);else if(M.key==="Home")M.preventDefault(),m(0);else if(M.key==="End")M.preventDefault(),m(Math.max(0,Q.length-1));else if(M.key==="Enter"&&!(M.metaKey||M.ctrlKey)){M.preventDefault();const H=Q[nt];H&&L(H)}};if(!i)return null;let I="";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:me("bg"),color:me("text"),border:`1px solid ${me("border")}`,borderRadius:me("radius-lg"),boxShadow:me("shadow-lg"),overflow:"hidden",fontFamily:me("font-sans")},children:[u.jsx("input",{ref:R,role:"combobox","aria-expanded":"true","aria-controls":v,"aria-autocomplete":"list","aria-label":"Search pages, runs and actions","aria-activedescendant":Q[nt]?`${v}-${nt}`:void 0,value:o,onChange:M=>{c(M.target.value),m(0)},onKeyDown:$,placeholder:"Search pages, runs, actions",style:{width:"100%",boxSizing:"border-box",padding:"14px 16px",background:"transparent",color:me("text"),border:"none",borderBottom:`1px solid ${me("border")}`,outline:"none",fontSize:"1rem"}}),u.jsx("ul",{id:v,role:"listbox","aria-label":"Results",style:{listStyle:"none",margin:0,padding:6,maxHeight:"50vh",overflowY:"auto"},children:Q.map((M,H)=>{const Y=M.kind!==I?M.kind:null;return I=M.kind,u.jsxs("li",{role:"presentation",children:[Y&&u.jsx("div",{role:"presentation",style:{padding:"8px 10px 4px",fontSize:me("text-sm"),color:me("text-2")},children:Y}),u.jsxs("div",{id:`${v}-${H}`,role:"option","aria-selected":H===nt,onMouseMove:()=>m(H),onClick:()=>L(M),style:{display:"flex",justifyContent:"space-between",gap:12,padding:"8px 10px",borderRadius:me("radius-md"),cursor:"pointer",background:H===nt?me("bg-3"):"transparent"},children:[u.jsx("span",{children:M.label}),M.hint&&u.jsx("span",{style:{color:me("text-2"),fontSize:me("text-sm")},children:M.hint.startsWith("Cmd")?u.jsx(sb,{children:M.hint}):M.hint})]})]},M.id)})}),Q.length===0&&u.jsx("p",{role:"status",style:{margin:0,padding:"14px 16px",color:me("text-2")},children:"No matches"}),b&&u.jsxs("p",{role:"alert",style:{margin:0,padding:"8px 16px",color:me("error"),fontSize:me("text-sm")},children:["Recent runs not loaded: ",b]})]})})}const O2=/^https:\/\/github\.com\/([A-Za-z0-9][A-Za-z0-9._-]*)\/([A-Za-z0-9._-]+)\/issues\/([1-9][0-9]*)\/?$/,C2=/^([A-Za-z0-9][A-Za-z0-9._-]*)\/([A-Za-z0-9._-]+)#([1-9][0-9]*)$/;function A2(i){const r=i.trim(),o=O2.exec(r);return o?`${o[1]}/${o[2]}#${o[3]}`:r}function L0(i){return i instanceof Nf?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?`The control service does not offer this: ${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 hf={display:"flex",flexDirection:"column",gap:4,fontSize:"var(--cp-text-sm)",color:"var(--cp-text-muted)"},w2={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 D2({preset:i,onDone:r}){const[o,c]=N.useState(null),[d,m]=N.useState(null),[p,g]=N.useState(""),[b,y]=N.useState({state:"idle"}),[R,v]=N.useState(null),[A,B]=N.useState(""),[Q,nt]=N.useState(!1),[L,$]=N.useState(!1),[I,M]=N.useState(null),H=N.useRef(!1),Y=i?C2.exec(i):null;N.useEffect(()=>{let et=!0;return Rb().then(xt=>{et&&(c(xt),Y&&(xt.includes(Y[2])?(g(Y[2]),nt(!0)):M(`${Y[1]}/${Y[2]} is not a registered repo, so a run cannot start from here.`)))},xt=>et&&m(xt.message)),()=>{et=!1}},[]),N.useEffect(()=>{if(!p||Y)return;let et=!0;return y({state:"loading"}),v(null),zb(p).then(xt=>et&&y({state:"ok",list:xt}),xt=>et&&y({state:"error",message:L0(xt)})),()=>{et=!1}},[p]);const ot=Y?i:R?A2(R.url):A.trim(),P=p!==""&&ot!=="",tt=Y||R?ot:`"${ot}"`,qt=async()=>{if(!(H.current||!P)){H.current=!0,$(!0),M(null);try{await cg({target:ot,repo:p}),r(),location.hash="#/runs"}catch(et){M(L0(et)),$(!1)}finally{H.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."}):Q?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:tt})," in ",u.jsx("strong",{children:p}),"?"]}),I?u.jsx("p",{role:"alert","data-testid":"picker-error",style:{margin:0,color:"var(--cp-error)"},children:I}):null,u.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[u.jsx(gt,{variant:"ghost",onClick:Y?r:()=>nt(!1),children:Y?"Cancel":"Back"}),u.jsx(gt,{"data-testid":"confirm-start",disabled:L||!P,onClick:()=>void qt(),children:"Start run"})]})]}):u.jsxs("form",{"data-testid":"picker",style:{display:"flex",flexDirection:"column",gap:16},onSubmit:et=>{et.preventDefault(),P&&nt(!0)},children:[u.jsxs("label",{style:hf,children:["Repo",u.jsxs("select",{"aria-label":"Repo","data-testid":"picker-repo",value:p,onChange:et=>g(et.target.value),onInput:et=>g(et.target.value),style:w2,children:[u.jsx("option",{value:"",children:"Choose a registered repo"}),o.map(et=>u.jsx("option",{value:et,children:et},et))]})]}),p?u.jsxs("div",{style:hf,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(et=>u.jsxs("li",{role:"option","aria-selected":(R==null?void 0:R.number)===et.number,"data-testid":"issue-option",onClick:()=>{v(et),B("")},style:{padding:"8px 10px",cursor:"pointer",color:"var(--cp-text)",background:(R==null?void 0:R.number)===et.number?"var(--cp-accent-glow)":"transparent",fontSize:"var(--cp-text-md)"},children:[u.jsxs("span",{style:{color:"var(--cp-text-muted)"},children:["#",et.number]})," ",et.title]},et.number))}):null]}):null,p?u.jsxs("label",{style:hf,children:["Or describe a task",u.jsx(Fn,{"aria-label":"Task","data-testid":"picker-task",value:A,maxLength:500,placeholder:"A short task for this repo",onChange:et=>{B(et.target.value),et.target.value&&v(null)}})]}):null,I?u.jsx("p",{role:"alert","data-testid":"picker-error",style:{margin:0,color:"var(--cp-error)"},children:I}):null,u.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"},children:[u.jsx(gt,{variant:"ghost",onClick:r,children:"Cancel"}),u.jsx(gt,{type:"submit","data-testid":"picker-continue",disabled:!P,children:"Review"})]})]})}function M2(){const{open:i,preset:r}=bj();return u.jsx(ab,{open:i,title:"New run",onClose:z0,children:u.jsx(D2,{preset:r,onDone:z0},r??"pick")})}function U2({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 Ht=i=>`var(--cp-${i})`;function k2(){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 H2=[{href:"#/",label:"Overview",icon:u.jsx(b1,{size:14,"aria-hidden":"true"}),match:i=>i==="/"||i==="/home"},{href:"#/runs",label:"Runs",icon:u.jsx(S1,{size:14,"aria-hidden":"true"}),match:i=>i==="/runs"||i.startsWith("/runs/")||i.startsWith("/r/")},{href:"#/pulls",label:"Pull requests",icon:u.jsx(V0,{size:14,"aria-hidden":"true"}),match:i=>i==="/pulls"},{href:"#/repos",label:"Repos",icon:u.jsx(y1,{size:14,"aria-hidden":"true"}),match:i=>i==="/repos"},{href:"#/receipts",label:"Receipts",icon:u.jsx(w1,{size:14,"aria-hidden":"true"}),match:i=>i.startsWith("/receipts")}];function L2({activePath:i,onNavigate:r}){const o=Mg();return o.enabled?u.jsxs("section",{"data-testid":"ask-history","aria-label":"Ask Loki",style:{marginTop:16},children:[u.jsx(lb,{children:"Ask Loki"}),u.jsx(Wu,{href:"#/ask",active:i==="/ask",icon:u.jsx(z1,{size:14,"aria-hidden":"true"}),onClick:r,children:"New question"}),o.threads.map(c=>{const d=`#/ask/${encodeURIComponent(c.id)}`,m=rs(d)===i;return u.jsx("a",{"data-testid":"ask-thread-link",href:d,title:c.title,"aria-current":m?"page":void 0,onClick:r,style:{display:"block",padding:"6px 12px",borderRadius:Ht("radius-nav"),textDecoration:"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:Ht("text-md"),color:Ht(m?"accent":"text"),background:m?Ht("accent-glow"):"transparent"},children:c.title},c.id)})]}):null}function B2(){const i=jg(),r=i==="dark"?"light":"dark";return u.jsxs("button",{type:"button","data-testid":"theme-toggle",onClick:er,"aria-label":`Switch to ${r} theme`,style:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"7px 12px",marginTop:2,border:0,borderRadius:Ht("radius-nav"),background:"transparent",color:Ht("text-2"),cursor:"pointer",fontSize:Ht("text-md"),fontFamily:"inherit"},children:[i==="dark"?u.jsx(B1,{size:14,"aria-hidden":"true"}):u.jsx(C1,{size:14,"aria-hidden":"true"}),i==="dark"?"Light theme":"Dark theme"]})}function B0({hash:i,onNavigate:r}){const o=rs(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:Ht("text")},children:[u.jsx(U2,{active:!1}),u.jsx("span",{style:{fontFamily:Ht("font-serif"),fontSize:Ht("text-2xl")},children:"Loki Mode"})]}),u.jsx("div",{style:{padding:"0 12px 12px"},children:u.jsx(gt,{"data-testid":"sidebar-new-run",style:{width:"100%"},onClick:()=>{r==null||r(),Ia()},children:"New run"})}),u.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"0 8px"},children:[u.jsx("div",{"data-testid":"nav-links",children:H2.map(c=>u.jsx(Wu,{href:c.href,active:c.match(o),icon:c.icon,onClick:r,children:c.label},c.href))}),u.jsx(L2,{activePath:o,onNavigate:r})]}),u.jsxs("div",{style:{padding:8,borderTop:`1px solid ${Ht("border")}`},children:[u.jsx(Wu,{href:"#/settings",active:o.startsWith("/settings"),icon:u.jsx(U1,{size:14,"aria-hidden":"true"}),onClick:r,children:"Settings"}),u.jsx(B2,{})]})]})}const q2={width:Ht("sidebar-w"),flexShrink:0,flexDirection:"column",height:"100vh",position:"sticky",top:0,paddingTop:16,background:Ht("glass"),borderRight:`1px solid ${Ht("glass-border")}`,boxShadow:Ht("glass-shadow")};function $2({path:i}){const r=pb();if(r.length===0)return u.jsx(Rt,{title:"No settings available"});const o=r.find(d=>rs(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:Ht("font-serif"),fontWeight:400,fontSize:Ht("text-2xl"),margin:"0 0 12px 12px"},children:"Settings"}),r.map(d=>u.jsx(Wu,{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 Y2({hash:i}){N.useSyncExternalStore(ig,Pu,Pu);const r=rs(i);if(r==="/settings"||r.startsWith("/settings/"))return u.jsx($2,{path:r});const o=yb(i);if(!o)return u.jsx(Rt,{title:"Page not found",hint:u.jsx("a",{href:"#/",style:{color:Ht("accent")},children:"Back to home"})});const c=o.page.component;return u.jsx(c,{params:o.params})}function V2(){const i=k2(),[r,o]=N.useState(!1);return N.useEffect(()=>{ur()},[]),N.useEffect(()=>{const c=d=>{if(!(d.metaKey||d.ctrlKey))return;const m=d.key.toLowerCase();m==="k"&&ls().enabled?(d.preventDefault(),location.hash="#/ask"):(m==="k"||m==="/")&&b2()&&d.preventDefault()};return addEventListener("keydown",c),()=>removeEventListener("keydown",c)},[]),u.jsxs("div",{"data-testid":"app-shell",className:"flex min-h-screen",style:{background:Ht("bg"),color:Ht("text"),fontFamily:Ht("font-sans")},children:[u.jsx("nav",{"data-testid":"nav","aria-label":"Main",className:"hidden md:flex",style:q2,children:u.jsx(B0,{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 ${Ht("border")}`},children:[u.jsx(gt,{variant:"ghost","aria-label":"Open navigation","data-testid":"open-drawer",onClick:()=>o(!0),children:u.jsx(E1,{size:16,"aria-hidden":"true"})}),u.jsx("span",{style:{fontFamily:Ht("font-serif"),fontSize:Ht("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(Y2,{hash:i})})]}),u.jsx(M2,{}),u.jsx(ib,{open:r,title:"Loki Mode",side:"left",onClose:()=>o(!1),children:u.jsx("div",{style:{display:"flex",flexDirection:"column",minHeight:"80vh"},children:u.jsx(B0,{hash:i,onNavigate:()=>o(!1)})})})]})}const xn="not recorded";function Kg(i){return i.cost_usd!==null&&i.cost_usd!==void 0?Pe(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 G2=i=>i.started_at&&i.ended_at?(Date.parse(i.ended_at)-Date.parse(i.started_at))/1e3:null,Jg=i=>typeof i=="number"?`${i.toFixed(1)}s`:xn,Ig=i=>i?i.replace("T"," ").replace(/\.\d+Z$/,"Z"):xn,Q2={[Et.VERIFIED]:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-300 ring-emerald-500/30",[Et.PARTIAL]:"bg-amber-500/15 text-amber-700 dark:text-amber-300 ring-amber-500/30",[Et.FAILED]:"bg-red-500/15 text-red-700 dark:text-red-300 ring-red-500/30",[Et.TAMPERED]:"bg-red-600/20 text-red-700 dark:text-red-300 ring-red-600/50",[Et.VERIFIED_UNCHECKED]:"bg-sky-500/15 text-sky-700 dark:text-sky-300 ring-sky-500/30",[Et.UNVERIFIED]:"bg-amber-500/15 text-amber-700 dark:text-amber-300 ring-amber-500/30",[Et.SPEC_CONFLICT]:"bg-violet-500/15 text-violet-700 dark:text-violet-300 ring-violet-500/30"};function Sf({verdict:i,run:r}){const o=r?jl(r):i??null,c=o?Q2[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 Fg({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(Ef,{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 q0=3e3;function Wg(i,r,o){const[c,d]=N.useState({data:null,error:null});return N.useEffect(()=>{let m=!0,p;d({data:null,error:null});const g=()=>i().then(b=>{m&&(d({data:b,error:null}),o!=null&&o(b)&&(p=setTimeout(g,q0)))},b=>{m&&(d(y=>({data:y.data,error:b.message})),o&&(p=setTimeout(g,q0)))});return g(),()=>{m=!1,clearTimeout(p)}},r),c}const vn=i=>i.status==="running";function Pg({run:i}){const[r]=N.useState(()=>({at:Date.now(),s:i.elapsed_s??0})),[,o]=N.useState(0),c=vn(i);N.useEffect(()=>{if(!c)return;const m=setInterval(()=>o(p=>p+1),1e3);return()=>clearInterval(m)},[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 X2({onOpen:i}){const[r,o]=N.useState(""),[c,d]=N.useState(""),[m,p]=N.useState(""),{data:g,error:b}=Wg(()=>In({verdict:r,repo:c,since:m?`${m}T00:00:00Z`:""}),[r,c,m],v=>v.runs.some(vn)),y=!!(r||c||m),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:v=>o(v.target.value),children:[u.jsx("option",{value:"",children:"All"}),W1.map(v=>u.jsx("option",{value:v,children:Ae(v).label},v))]})]}),u.jsxs("label",{className:"flex flex-col gap-1",children:["Repo",u.jsx("input",{"aria-label":"Repo",className:R,value:c,onChange:v=>d(v.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:m,onChange:v=>p(v.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&&(y?u.jsx("p",{children:"No runs match these filters."}):u.jsx(Cf,{})),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(v=>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(Sf,{run:v})}),u.jsx("td",{className:"p-2 font-mono text-xs",children:u.jsx("a",{href:`#/runs/${encodeURIComponent(v.source_id)}/${encodeURIComponent(v.run_id)}`,onClick:()=>i==null?void 0:i(v),className:"inline-block break-all py-2 text-sky-600 hover:underline md:py-0 dark:text-sky-400",children:v.run_id})}),u.jsx("td",{className:"hidden p-2 md:table-cell",children:v.origin_repo??xn}),u.jsx("td",{className:"hidden p-2 md:table-cell",children:Ig(v.started_at)}),u.jsx("td",{className:"p-2 text-xs","data-testid":"progress",children:vn(v)?u.jsxs(u.Fragment,{children:[v.current_stage??"starting",", ",u.jsx(Pg,{run:v}),", ",(v.files_touched??[]).length," files"]}):""}),u.jsx("td",{className:"p-2","data-testid":"cost",children:Kg(v)}),u.jsx("td",{className:"p-2",children:u.jsx(Fg,{url:v.pr_url})})]},`${v.source_id}/${v.run_id}`))})]})})]})}function ns({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 Z2({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":Jg(G2(r))})]},r.stage))})}function K2({source:i,run:r,question:o}){const[c,d]=N.useState(""),[m,p]=N.useState(null),g=async()=>{try{const b=await Q0(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(ns,{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"}),m&&u.jsx("p",{role:m.ok?"status":"alert",className:`mt-2 break-all text-sm ${m.ok?"text-emerald-600":"text-red-600"}`,children:m.text})]})}function J2({source:i,run:r}){const[o,c]=N.useState(!1),[d,m]=N.useState(!1),[p,g]=N.useState(null),b=async()=>{m(!0),g(null);try{await K1(i,r),location.hash="#/runs"}catch(R){g(R.message),m(!1)}},y="min-h-11 rounded px-4 py-2 text-sm md:min-h-0 md:px-3 md:py-1";return u.jsxs(ns,{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:`${y} 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:`${y} border border-slate-300 dark:border-slate-700`,children:"Cancel"})]})]}):u.jsx("button",{type:"button","data-testid":"remove-run",onClick:()=>c(!0),className:`${y} 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 I2({source:i,run:r}){const{data:o,error:c}=Wg(()=>ar(i,r),[i,r],vn);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(Sf,{run:d}),d.tampered&&u.jsxs("span",{className:"inline-flex items-center gap-1 text-sm text-red-600",children:[u.jsx(x0,{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(x0,{size:14}),"conflicting events ingested"]})]}),u.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[u.jsx(ns,{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:Ig(d.started_at)}),vn(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:vn(d)?"Elapsed":"Wall time"}),u.jsx("dd",{children:vn(d)?u.jsx(Pg,{run:d}):Jg(d.wall_s)}),vn(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:Kg(d)}),u.jsx("dt",{className:"text-slate-500",children:"PR"}),u.jsx("dd",{children:u.jsx(Fg,{url:d.pr_url})})]})}),u.jsx(ns,{title:"Stage timeline",children:u.jsx(Z2,{stages:o.stages})})]}),o.blocked_question&&u.jsx(K2,{source:i,run:r,question:o.blocked_question}),u.jsx(ns,{title:"Receipt",children:u.jsxs("div",{className:"space-y-3 text-sm",children:[o.receipt?u.jsxs("p",{children:["Receipt verdict: ",u.jsx(Sf,{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(m=>u.jsx("li",{"data-testid":"not-proven",children:m},m))})]})]})}),u.jsx(J2,{source:i,run:r})]})}const kf=u.jsx(X2,{});Ce({id:"home",path:"/",title:"Home",component:()=>u.jsx(eg,{fallback:kf})});Ce({id:"overview",path:"/overview",title:"Overview",component:()=>u.jsx(eg,{overview:!0,fallback:kf})});Ce({id:"runs",path:"/runs",title:"Runs",component:()=>kf});Ce({id:"run-detail",path:"/runs/:source/:run",title:"Run",component:({params:i})=>u.jsx(I2,{source:i.source,run:i.run})});Ce({id:"live-run",path:"/live/:source/:run",title:"Live run",component:({params:i})=>u.jsx(tg,{source:i.source,run:i.run})});Ce({id:"settings-general",path:"/settings/general",title:"General",inSettings:!0,component:xj});x2();function F2(){return u.jsxs(u.Fragment,{children:[u.jsx(V2,{}),u.jsx(z2,{})]})}ur();i1.createRoot(document.getElementById("root")).render(u.jsx(F2,{}));
|