loki-mode 10.10.1 → 10.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/SKILL.md +2 -2
  2. package/VERSION +1 -1
  3. package/dashboard/__init__.py +1 -1
  4. package/docs/CLI-REFERENCE.md +1 -1
  5. package/docs/INSTALLATION.md +1 -1
  6. package/docs/v10/FAILURE-CLASSES.md +5 -2
  7. package/docs/v10/GUARDS.md +18 -0
  8. package/loki-ts/dist/loki.js +570 -570
  9. package/mcp/__init__.py +1 -1
  10. package/package.json +1 -1
  11. package/packages/control-plane/dist/server.js +364 -125
  12. package/packages/control-plane/ui/dist/assets/index-BinL6h3i.css +1 -0
  13. package/packages/control-plane/ui/dist/assets/index-BrA22FUs.js +152 -0
  14. package/packages/control-plane/ui/dist/index.html +2 -2
  15. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  16. package/web-app/dist/assets/{AdminPage-B8RjG3sy.js → AdminPage-BvbxMtZO.js} +1 -1
  17. package/web-app/dist/assets/{Avatar-Dttmvqc-.js → Avatar-Dc7Scg02.js} +1 -1
  18. package/web-app/dist/assets/{Badge-Bvyp8VrD.js → Badge-BmVuOqbM.js} +1 -1
  19. package/web-app/dist/assets/{Button-DtY5ZrZw.js → Button-DvzqhxRU.js} +1 -1
  20. package/web-app/dist/assets/{CockpitPage-B2gbOwRp.js → CockpitPage-D8AZo7Ha.js} +1 -1
  21. package/web-app/dist/assets/{ComparePage-CHi5nZTU.js → ComparePage-NmqaTXDz.js} +1 -1
  22. package/web-app/dist/assets/{ErrorBoundary-BUuTj-OQ.js → ErrorBoundary-PGl8Kzoq.js} +1 -1
  23. package/web-app/dist/assets/{EvidenceReceiptPanel-C5aOn4ES.js → EvidenceReceiptPanel-2NY4n9gv.js} +1 -1
  24. package/web-app/dist/assets/{GitHubIssuesPanel-isVxxHXb.js → GitHubIssuesPanel-DBO_LHHM.js} +1 -1
  25. package/web-app/dist/assets/{GitHubPRsPanel-DtDpxyQl.js → GitHubPRsPanel-K7m9uJ1N.js} +1 -1
  26. package/web-app/dist/assets/{HomePage-Casf-LUB.js → HomePage-qNQzAJxM.js} +2 -2
  27. package/web-app/dist/assets/{LoginPage-DvB78691.js → LoginPage-esu3OK65.js} +1 -1
  28. package/web-app/dist/assets/{MagicPage-DU6hmbnC.js → MagicPage-CCdVvXrA.js} +1 -1
  29. package/web-app/dist/assets/{MetricsPage-DcPwzoS8.js → MetricsPage-bEvugU2t.js} +1 -1
  30. package/web-app/dist/assets/{NotFoundPage-Bs6WxAZ8.js → NotFoundPage-BlEjQ1wX.js} +1 -1
  31. package/web-app/dist/assets/{ProjectPage-RBIqC-DJ.js → ProjectPage-Bnug_Yzv.js} +3 -3
  32. package/web-app/dist/assets/{ProjectsPage-CogXD7jM.js → ProjectsPage-M8r1vfpn.js} +1 -1
  33. package/web-app/dist/assets/{SettingsPage-pAyJAfPt.js → SettingsPage-NqAJpB48.js} +1 -1
  34. package/web-app/dist/assets/{ShowcasePage-D6bT2bDd.js → ShowcasePage-8FggxL1P.js} +1 -1
  35. package/web-app/dist/assets/{SystemSettingsPage-CE8xiJRh.js → SystemSettingsPage-3Sz3kFOO.js} +1 -1
  36. package/web-app/dist/assets/{TeamsPage-wMS55TDT.js → TeamsPage-nV-6vdWM.js} +1 -1
  37. package/web-app/dist/assets/{TemplatesPage-COJNVQqu.js → TemplatesPage-Brbc_VR9.js} +1 -1
  38. package/web-app/dist/assets/{TerminalOutput-Cc2XASxd.js → TerminalOutput-D1yta5ac.js} +1 -1
  39. package/web-app/dist/assets/{activity-C6eHFDjL.js → activity-oEeKuqFe.js} +1 -1
  40. package/web-app/dist/assets/{bell-BJpVYj4n.js → bell-3NJtqBRR.js} +1 -1
  41. package/web-app/dist/assets/{bot-BwRVVUQL.js → bot-CuvJZ6x1.js} +1 -1
  42. package/web-app/dist/assets/{check-CGDwoKy8.js → check-n4289IZw.js} +1 -1
  43. package/web-app/dist/assets/{chevron-left-CF2Nilj6.js → chevron-left-CmQeio7h.js} +1 -1
  44. package/web-app/dist/assets/{circle-alert-D0RyRec1.js → circle-alert-CmmVW-Pd.js} +1 -1
  45. package/web-app/dist/assets/{clock-xeF3gW0W.js → clock-QFqk7GlA.js} +1 -1
  46. package/web-app/dist/assets/{cloud-D5Sy69ZZ.js → cloud-BNkSokmq.js} +1 -1
  47. package/web-app/dist/assets/{code-xml-C6-5Ql9I.js → code-xml-nWeketqj.js} +1 -1
  48. package/web-app/dist/assets/{database-BSjG1_z0.js → database-C83MXTmJ.js} +1 -1
  49. package/web-app/dist/assets/{dollar-sign-FnDR2QUu.js → dollar-sign-Blg6TO4y.js} +1 -1
  50. package/web-app/dist/assets/{file-code-corner-BiOK9vR6.js → file-code-corner-Tk11oUzm.js} +1 -1
  51. package/web-app/dist/assets/{file-plus-3WALQDEE.js → file-plus-DF_eyA6I.js} +1 -1
  52. package/web-app/dist/assets/{globe-vUdUrQqp.js → globe-D5hDqqmn.js} +1 -1
  53. package/web-app/dist/assets/{hammer-0VwHUEpa.js → hammer-C2hm9lzl.js} +1 -1
  54. package/web-app/dist/assets/{index-BMKIwteZ.js → index-pMxOIwXq.js} +3 -3
  55. package/web-app/dist/assets/{layers-C6q8kzST.js → layers-XWQKGXg0.js} +1 -1
  56. package/web-app/dist/assets/{loader-circle-B4Tz724d.js → loader-circle-BRuvorm2.js} +1 -1
  57. package/web-app/dist/assets/{lock-yxvEA65n.js → lock-BSGvQf5v.js} +1 -1
  58. package/web-app/dist/assets/{package-BpKD0Ot0.js → package-3FJYUYgJ.js} +1 -1
  59. package/web-app/dist/assets/{plus-Ibqx_Vo9.js → plus-CeIx6g9P.js} +1 -1
  60. package/web-app/dist/assets/{refresh-cw-C9auyvi-.js → refresh-cw-ChutW42g.js} +1 -1
  61. package/web-app/dist/assets/{rotate-ccw-2cEiXm6O.js → rotate-ccw-BdSjUAk-.js} +1 -1
  62. package/web-app/dist/assets/{scroll-text-BPAWML-w.js → scroll-text-BjFqxpw3.js} +1 -1
  63. package/web-app/dist/assets/{server-CZh6B1zx.js → server-C7UEKdol.js} +1 -1
  64. package/web-app/dist/assets/{shield-alert-CivolUIx.js → shield-alert-DY8fpEs7.js} +1 -1
  65. package/web-app/dist/assets/{thumbs-up-BP9covEH.js → thumbs-up-Cz1san1g.js} +1 -1
  66. package/web-app/dist/assets/{trash-2-BCDfTcNx.js → trash-2-D2MvGYeP.js} +1 -1
  67. package/web-app/dist/assets/{trending-down-5LypivXh.js → trending-down-CxO3OYOB.js} +1 -1
  68. package/web-app/dist/assets/{trending-up-DNt4SFdk.js → trending-up-DCHKPJLe.js} +1 -1
  69. package/web-app/dist/assets/{upload-DBmHbY6y.js → upload-CdPJpSHC.js} +1 -1
  70. package/web-app/dist/assets/{usePolling-DOPZcbUL.js → usePolling-DAH6K3ST.js} +1 -1
  71. package/web-app/dist/assets/{user-BQTJJDCG.js → user-Byyt01W4.js} +1 -1
  72. package/web-app/dist/index.html +1 -1
  73. package/packages/control-plane/ui/dist/assets/index-BQbFv65M.css +0 -1
  74. package/packages/control-plane/ui/dist/assets/index-NAMkcA9N.js +0 -165
@@ -1,165 +0,0 @@
1
- (function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))f(d);new MutationObserver(d=>{for(const p of d)if(p.type==="childList")for(const m of p.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&f(m)}).observe(document,{childList:!0,subtree:!0});function o(d){const p={};return d.integrity&&(p.integrity=d.integrity),d.referrerPolicy&&(p.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?p.credentials="include":d.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function f(d){if(d.ep)return;d.ep=!0;const p=o(d);fetch(d.href,p)}})();var Ro={exports:{}},Lu={};/**
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 E0;function ax(){if(E0)return Lu;E0=1;var i=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(f,d,p){var m=null;if(p!==void 0&&(m=""+p),d.key!==void 0&&(m=""+d.key),"key"in d){p={};for(var y in d)y!=="key"&&(p[y]=d[y])}else p=d;return d=p.ref,{$$typeof:i,type:f,key:m,ref:d!==void 0?d:null,props:p}}return Lu.Fragment=r,Lu.jsx=o,Lu.jsxs=o,Lu}var N0;function ux(){return N0||(N0=1,Ro.exports=ax()),Ro.exports}var s=ux(),Co={exports:{}},Yu={},Ao={exports:{}},Do={};/**
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 z0;function ix(){return z0||(z0=1,(function(i){function r(Y,tt){var et=Y.length;Y.push(tt);t:for(;0<et;){var Rt=et-1>>>1,jt=Y[Rt];if(0<d(jt,tt))Y[Rt]=tt,Y[et]=jt,et=Rt;else break t}}function o(Y){return Y.length===0?null:Y[0]}function f(Y){if(Y.length===0)return null;var tt=Y[0],et=Y.pop();if(et!==tt){Y[0]=et;t:for(var Rt=0,jt=Y.length,Fe=jt>>>1;Rt<Fe;){var Sl=2*(Rt+1)-1,_n=Y[Sl],S=Sl+1,B=Y[S];if(0>d(_n,et))S<jt&&0>d(B,_n)?(Y[Rt]=B,Y[S]=et,Rt=S):(Y[Rt]=_n,Y[Sl]=et,Rt=Sl);else if(S<jt&&0>d(B,et))Y[Rt]=B,Y[S]=et,Rt=S;else break t}}return tt}function d(Y,tt){var et=Y.sortIndex-tt.sortIndex;return et!==0?et:Y.id-tt.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;i.unstable_now=function(){return p.now()}}else{var m=Date,y=m.now();i.unstable_now=function(){return m.now()-y}}var x=[],E=[],N=1,v=null,A=3,U=!1,X=!1,P=!1,q=!1,k=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function Q(Y){for(var tt=o(E);tt!==null;){if(tt.callback===null)f(E);else if(tt.startTime<=Y)f(E),tt.sortIndex=tt.expirationTime,r(x,tt);else break;tt=o(E)}}function K(Y){if(P=!1,Q(Y),!X)if(o(x)!==null)X=!0,Tt||(Tt=!0,at());else{var tt=o(E);tt!==null&&Ft(K,tt.startTime-Y)}}var Tt=!1,ut=-1,rt=5,Ne=-1;function fe(){return q?!0:!(i.unstable_now()-Ne<rt)}function Kt(){if(q=!1,Tt){var Y=i.unstable_now();Ne=Y;var tt=!0;try{t:{X=!1,P&&(P=!1,G(ut),ut=-1),U=!0;var et=A;try{e:{for(Q(Y),v=o(x);v!==null&&!(v.expirationTime>Y&&fe());){var Rt=v.callback;if(typeof Rt=="function"){v.callback=null,A=v.priorityLevel;var jt=Rt(v.expirationTime<=Y);if(Y=i.unstable_now(),typeof jt=="function"){v.callback=jt,Q(Y),tt=!0;break e}v===o(x)&&f(x),Q(Y)}else f(x);v=o(x)}if(v!==null)tt=!0;else{var Fe=o(E);Fe!==null&&Ft(K,Fe.startTime-Y),tt=!1}}break t}finally{v=null,A=et,U=!1}tt=void 0}}finally{tt?at():Tt=!1}}}var at;if(typeof H=="function")at=function(){H(Kt)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,he=de.port2;de.port1.onmessage=Kt,at=function(){he.postMessage(null)}}else at=function(){k(Kt,0)};function Ft(Y,tt){ut=k(function(){Y(i.unstable_now())},tt)}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(Y){Y.callback=null},i.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):rt=0<Y?Math.floor(1e3/Y):5},i.unstable_getCurrentPriorityLevel=function(){return A},i.unstable_next=function(Y){switch(A){case 1:case 2:case 3:var tt=3;break;default:tt=A}var et=A;A=tt;try{return Y()}finally{A=et}},i.unstable_requestPaint=function(){q=!0},i.unstable_runWithPriority=function(Y,tt){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var et=A;A=Y;try{return tt()}finally{A=et}},i.unstable_scheduleCallback=function(Y,tt,et){var Rt=i.unstable_now();switch(typeof et=="object"&&et!==null?(et=et.delay,et=typeof et=="number"&&0<et?Rt+et:Rt):et=Rt,Y){case 1:var jt=-1;break;case 2:jt=250;break;case 5:jt=1073741823;break;case 4:jt=1e4;break;default:jt=5e3}return jt=et+jt,Y={id:N++,callback:tt,priorityLevel:Y,startTime:et,expirationTime:jt,sortIndex:-1},et>Rt?(Y.sortIndex=et,r(E,Y),o(x)===null&&Y===o(E)&&(P?(G(ut),ut=-1):P=!0,Ft(K,et-Rt))):(Y.sortIndex=jt,r(x,Y),X||U||(X=!0,Tt||(Tt=!0,at()))),Y},i.unstable_shouldYield=fe,i.unstable_wrapCallback=function(Y){var tt=A;return function(){var et=A;A=tt;try{return Y.apply(this,arguments)}finally{A=et}}}})(Do)),Do}var O0;function sx(){return O0||(O0=1,Ao.exports=ix()),Ao.exports}var Mo={exports:{}},nt={};/**
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 R0;function cx(){if(R0)return nt;R0=1;var i=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),m=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),E=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),A=Symbol.for("react.view_transition"),U=Symbol.iterator;function X(S){return S===null||typeof S!="object"?null:(S=U&&S[U]||S["@@iterator"],typeof S=="function"?S:null)}var P={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},q=Object.assign,k={};function G(S,B,I){this.props=S,this.context=B,this.refs=k,this.updater=I||P}G.prototype.isReactComponent={},G.prototype.setState=function(S,B){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,B,"setState")},G.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function H(){}H.prototype=G.prototype;function Q(S,B,I){this.props=S,this.context=B,this.refs=k,this.updater=I||P}var K=Q.prototype=new H;K.constructor=Q,q(K,G.prototype),K.isPureReactComponent=!0;var Tt=Array.isArray;function ut(){}var rt={H:null,A:null,T:null,S:null},Ne=Object.prototype.hasOwnProperty;function fe(S,B,I){var F=I.ref;return{$$typeof:i,type:S,key:B,ref:F!==void 0?F:null,props:I}}function Kt(S,B){return fe(S.type,B,S.props)}function at(S){return typeof S=="object"&&S!==null&&S.$$typeof===i}function de(S){var B={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(I){return B[I]})}var he=/\/+/g;function Ft(S,B){return typeof S=="object"&&S!==null&&S.key!=null?de(""+S.key):B.toString(36)}function Y(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(ut,ut):(S.status="pending",S.then(function(B){S.status==="pending"&&(S.status="fulfilled",S.value=B)},function(B){S.status==="pending"&&(S.status="rejected",S.reason=B)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function tt(S,B,I,F,gt){var vt=typeof S;(vt==="undefined"||vt==="boolean")&&(S=null);var xt=!1;if(S===null)xt=!0;else switch(vt){case"bigint":case"string":case"number":xt=!0;break;case"object":switch(S.$$typeof){case i:case r:xt=!0;break;case N:return xt=S._init,tt(xt(S._payload),B,I,F,gt)}}if(xt)return gt=gt(S),xt=F===""?"."+Ft(S,0):F,Tt(gt)?(I="",xt!=null&&(I=xt.replace(he,"$&/")+"/"),tt(gt,B,I,"",function(jl){return jl})):gt!=null&&(at(gt)&&(gt=Kt(gt,I+(gt.key==null||S&&S.key===gt.key?"":(""+gt.key).replace(he,"$&/")+"/")+xt)),B.push(gt)),1;xt=0;var Z=F===""?".":F+":";if(Tt(S))for(var lt=0;lt<S.length;lt++)F=S[lt],vt=Z+Ft(F,lt),xt+=tt(F,B,I,vt,gt);else if(lt=X(S),typeof lt=="function")for(S=lt.call(S),lt=0;!(F=S.next()).done;)F=F.value,vt=Z+Ft(F,lt++),xt+=tt(F,B,I,vt,gt);else if(vt==="object"){if(typeof S.then=="function")return tt(Y(S),B,I,F,gt);throw B=String(S),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return xt}function et(S,B,I){if(S==null)return S;var F=[],gt=0;return tt(S,F,"","",function(vt){return B.call(I,vt,gt++)}),F}function Rt(S){if(S._status===-1){var B=S._result,I=B();I.then(function(F){(S._status===0||S._status===-1)&&(S._status=1,S._result=F,I.status===void 0&&(I.status="fulfilled",I.value=F))},function(F){(S._status===0||S._status===-1)&&(S._status=2,S._result=F,I.status===void 0&&(I.status="rejected",I.reason=F))}),S._status===-1&&(S._status=0,S._result=I)}if(S._status===1)return S._result.default;throw S._result}var jt=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=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(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)};function Fe(S){var B=rt.T,I={};I.types=B!==null?B.types:null,rt.T=I;try{var F=S(),gt=rt.S;gt!==null&&gt(I,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(ut,jt)}catch(vt){jt(vt)}finally{B!==null&&I.types!==null&&(B.types=I.types),rt.T=B}}function Sl(S){var B=rt.T;if(B!==null){var I=B.types;I===null?B.types=[S]:I.indexOf(S)===-1&&I.push(S)}else Fe(Sl.bind(null,S))}var _n={map:et,forEach:function(S,B,I){et(S,function(){B.apply(this,arguments)},I)},count:function(S){var B=0;return et(S,function(){B++}),B},toArray:function(S){return et(S,function(B){return B})||[]},only:function(S){if(!at(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return nt.Activity=v,nt.Children=_n,nt.Component=G,nt.Fragment=o,nt.Profiler=d,nt.PureComponent=Q,nt.StrictMode=f,nt.Suspense=x,nt.ViewTransition=A,nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=rt,nt.__COMPILER_RUNTIME={__proto__:null,c:function(S){return rt.H.useMemoCache(S)}},nt.addTransitionType=Sl,nt.cache=function(S){return function(){return S.apply(null,arguments)}},nt.cacheSignal=function(){return null},nt.cloneElement=function(S,B,I){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var F=q({},S.props),gt=S.key;if(B!=null)for(vt in B.key!==void 0&&(gt=""+B.key),B)!Ne.call(B,vt)||vt==="key"||vt==="__self"||vt==="__source"||vt==="ref"&&B.ref===void 0||(F[vt]=B[vt]);var vt=arguments.length-2;if(vt===1)F.children=I;else if(1<vt){for(var xt=Array(vt),Z=0;Z<vt;Z++)xt[Z]=arguments[Z+2];F.children=xt}return fe(S.type,gt,F)},nt.createContext=function(S){return S={$$typeof:m,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:p,_context:S},S},nt.createElement=function(S,B,I){var F,gt={},vt=null;if(B!=null)for(F in B.key!==void 0&&(vt=""+B.key),B)Ne.call(B,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(gt[F]=B[F]);var xt=arguments.length-2;if(xt===1)gt.children=I;else if(1<xt){for(var Z=Array(xt),lt=0;lt<xt;lt++)Z[lt]=arguments[lt+2];gt.children=Z}if(S&&S.defaultProps)for(F in xt=S.defaultProps,xt)gt[F]===void 0&&(gt[F]=xt[F]);return fe(S,vt,gt)},nt.createRef=function(){return{current:null}},nt.forwardRef=function(S){return{$$typeof:y,render:S}},nt.isValidElement=at,nt.lazy=function(S){return{$$typeof:N,_payload:{_status:-1,_result:S},_init:Rt}},nt.memo=function(S,B){return{$$typeof:E,type:S,compare:B===void 0?null:B}},nt.startTransition=Fe,nt.unstable_useCacheRefresh=function(){return rt.H.useCacheRefresh()},nt.use=function(S){return rt.H.use(S)},nt.useActionState=function(S,B,I){return rt.H.useActionState(S,B,I)},nt.useCallback=function(S,B){return rt.H.useCallback(S,B)},nt.useContext=function(S){return rt.H.useContext(S)},nt.useDebugValue=function(){},nt.useDeferredValue=function(S,B){return rt.H.useDeferredValue(S,B)},nt.useEffect=function(S,B){return rt.H.useEffect(S,B)},nt.useEffectEvent=function(S){return rt.H.useEffectEvent(S)},nt.useId=function(){return rt.H.useId()},nt.useImperativeHandle=function(S,B,I){return rt.H.useImperativeHandle(S,B,I)},nt.useInsertionEffect=function(S,B){return rt.H.useInsertionEffect(S,B)},nt.useLayoutEffect=function(S,B){return rt.H.useLayoutEffect(S,B)},nt.useMemo=function(S,B){return rt.H.useMemo(S,B)},nt.useOptimistic=function(S,B){return rt.H.useOptimistic(S,B)},nt.useReducer=function(S,B,I){return rt.H.useReducer(S,B,I)},nt.useRef=function(S){return rt.H.useRef(S)},nt.useState=function(S){return rt.H.useState(S)},nt.useSyncExternalStore=function(S,B,I){return rt.H.useSyncExternalStore(S,B,I)},nt.useTransition=function(){return rt.H.useTransition()},nt.version="19.3.0",nt}var C0;function Zo(){return C0||(C0=1,Mo.exports=cx()),Mo.exports}var wo={exports:{}},re={};/**
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 A0;function rx(){if(A0)return re;A0=1;var i=Zo();function r(N){var v="https://react.dev/errors/"+N;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 #"+N+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var f={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"),p=Symbol.for("react.recoverable"),m=Symbol.for("react.optimistic_key");function y(N,v,A){var U=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:U==null?null:U===m?m:""+U,children:N,containerInfo:v,implementation:A}}var x=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function E(N,v){if(N==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return re.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=f,re.browser=function(N){return{$$typeof:p,_reason:N}},re.createPortal=function(N,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 y(N,v,null,A)},re.flushSync=function(N){var v=x.T,A=f.p;try{if(x.T=null,f.p=2,N)return N()}finally{x.T=v,f.p=A,f.d.f()}},re.preconnect=function(N,v){typeof N=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,f.d.C(N,v))},re.prefetchDNS=function(N){typeof N=="string"&&f.d.D(N)},re.preinit=function(N,v){if(typeof N=="string"&&v&&typeof v.as=="string"){var A=v.as,U=E(A,v.crossOrigin),X=typeof v.integrity=="string"?v.integrity:void 0,P=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;A==="style"?f.d.S(N,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:U,integrity:X,fetchPriority:P}):A==="script"&&f.d.X(N,{crossOrigin:U,integrity:X,fetchPriority:P,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},re.preinitModule=function(N,v){if(typeof N=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var A=E(v.as,v.crossOrigin);f.d.M(N,{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&&f.d.M(N)},re.preload=function(N,v){if(typeof N=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var A=v.as,U=E(A,v.crossOrigin);f.d.L(N,A,{crossOrigin:U,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})}},re.preloadModule=function(N,v){if(typeof N=="string")if(v){var A=E(v.as,v.crossOrigin);f.d.m(N,{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 f.d.m(N)},re.requestFormReset=function(N){f.d.r(N)},re.unstable_batchedUpdates=function(N,v){return N(v)},re.useFormState=function(N,v,A){return x.H.useFormState(N,v,A)},re.useFormStatus=function(){return x.H.useHostTransitionStatus()},re.version="19.3.0",re}var D0;function ox(){if(D0)return wo.exports;D0=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(),wo.exports=rx(),wo.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 M0;function fx(){if(M0)return Yu;M0=1;var i=sx(),r=Zo(),o=ox();function f(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 p(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 m(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 y(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 x(t){if(p(t)!==t)throw Error(f(188))}function E(t){var e=t.alternate;if(!e){if(e=p(t),e===null)throw Error(f(188));return e!==t?null:t}for(var l=t,n=e;;){var a=l.return;if(a===null)break;var u=a.alternate;if(u===null){if(n=a.return,n!==null){l=n;continue}break}if(a.child===u.child){for(u=a.child;u;){if(u===l)return x(a),t;if(u===n)return x(a),e;u=u.sibling}throw Error(f(188))}if(l.return!==n.return)l=a,n=u;else{for(var c=!1,h=a.child;h;){if(h===l){c=!0,l=a,n=u;break}if(h===n){c=!0,n=a,l=u;break}h=h.sibling}if(!c){for(h=u.child;h;){if(h===l){c=!0,l=u,n=a;break}if(h===n){c=!0,n=u,l=a;break}h=h.sibling}if(!c)throw Error(f(189))}}if(l.alternate!==n)throw Error(f(190))}if(l.tag!==3)throw Error(f(188));return l.stateNode.current===l?t:e}function N(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=N(t),e!==null)return e;t=t.sibling}return null}function v(t,e,l,n,a,u){for(;t!==null;){if((t.tag===5||t.tag===27||t.tag===6)&&l(t,n,a,u)||(t.tag!==22||t.memoizedState===null)&&(e||t.tag!==5&&t.tag!==27)&&v(t.child,e,l,n,a,u))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 U(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 X(t){var e=[null,null],l=A(t);return l===null||P(e,t,l.child,{foundSelf:!1}),e}function P(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)&&P(t,e,l.child,n))return!0;l=l.sibling}return!1}function q(t){switch(t.tag){case 5:case 27:case 6:return t.stateNode;case 3:return t.stateNode.containerInfo;default:throw Error(f(559))}}var k=null,G=null;function H(t,e,l){return t===l?!0:t===e?(k=t,!0):!1}function Q(t,e,l){return t===l?(G=t,!1):t===e?(G!==null&&(k=t),!0):!1}function K(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 Tt(t,e,l){for(var n=0,a=t;a;a=l(a))n++;a=0;for(var u=e;u;u=l(u))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 ut=Object.assign,rt=Symbol.for("react.element"),Ne=Symbol.for("react.transitional.element"),fe=Symbol.for("react.portal"),Kt=Symbol.for("react.fragment"),at=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),he=Symbol.for("react.consumer"),Ft=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),tt=Symbol.for("react.suspense"),et=Symbol.for("react.suspense_list"),Rt=Symbol.for("react.memo"),jt=Symbol.for("react.lazy"),Fe=Symbol.for("react.activity"),Sl=Symbol.for("react.legacy_hidden"),_n=Symbol.for("react.memo_cache_sentinel"),S=Symbol.for("react.view_transition"),B=Symbol.for("react.recoverable"),I=Symbol.iterator;function F(t){return t===null||typeof t!="object"?null:(t=I&&t[I]||t["@@iterator"],typeof t=="function"?t:null)}var gt=Symbol.for("react.client.reference");function vt(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===gt?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Kt:return"Fragment";case de:return"Profiler";case at:return"StrictMode";case tt:return"Suspense";case et:return"SuspenseList";case Fe:return"Activity";case S:return"ViewTransition"}if(typeof t=="object")switch(t.$$typeof){case fe:return"Portal";case Ft:return t.displayName||"Context";case he:return(t._context.displayName||"Context")+".Consumer";case Y:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Rt:return e=t.displayName||null,e!==null?e:vt(t.type)||"Memo";case jt:e=t._payload,t=t._init;try{return vt(t(e))}catch{}}return null}var xt=Array.isArray,Z=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,lt=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,jl={pending:!1,data:null,method:null,action:null},Zs=[],In=-1;function sl(t){return{current:t}}function le(t){0>In||(t.current=Zs[In],Zs[In]=null,In--)}function At(t,e){In++,Zs[In]=t.current,t.current=e}var cl=sl(null),Xa=sl(null),Gl=sl(null),Fu=sl(null);function Wu(t,e){switch(At(Gl,e),At(Xa,t),At(cl,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?wm(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=wm(e),t=Um(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}le(cl),At(cl,t)}function Fn(){le(cl),le(Xa),le(Gl)}function Ks(t){var e=t.memoizedState;e!==null&&(ka._currentValue=e.memoizedState,At(Fu,t)),e=cl.current;var l=Um(e,t.type);e!==l&&(At(Xa,t),At(cl,l))}function Pu(t){Xa.current===t&&(le(cl),le(Xa)),Fu.current===t&&(le(Fu),ka._currentValue=jl)}var Js,tf;function $l(t){if(Js===void 0)try{throw Error()}catch(l){var e=l.stack.trim().match(/\n( *(at )?)/);Js=e&&e[1]||"",tf=-1<l.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+Js+t+tf}var Is=!1;function Fs(t,e){if(!t||Is)return"";Is=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(e){var M=function(){throw Error()};if(Object.defineProperty(M.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(M,[])}catch(L){var j=L}Reflect.construct(t,[],M)}else{try{M.call()}catch(L){j=L}M=!1;try{var O=Object.getOwnPropertyDescriptor(t.prototype,"props");Object.defineProperty(t.prototype,"props",{configurable:!0,set:function(){throw Error()}}),M=!0,new t}finally{M&&(O!==void 0?Object.defineProperty(t.prototype,"props",O):delete t.prototype.props)}}}else{try{throw Error()}catch(L){j=L}(M=t())&&typeof M.catch=="function"&&M.catch(function(){})}}catch(L){if(L&&j&&typeof L.stack=="string")return[L.stack,j.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 u=n.DetermineComponentFrameRoot(),c=u[0],h=u[1];if(c&&h){var g=c.split(`
44
- `),T=h.split(`
45
- `);for(a=n=0;n<g.length&&!g[n].includes("DetermineComponentFrameRoot");)n++;for(;a<T.length&&!T[a].includes("DetermineComponentFrameRoot");)a++;if(n===g.length||a===T.length)for(n=g.length-1,a=T.length-1;1<=n&&0<=a&&g[n]!==T[a];)a--;for(;1<=n&&0<=a;n--,a--)if(g[n]!==T[a]){if(n!==1||a!==1)do if(n--,a--,0>a||g[n]!==T[a]){var C=`
46
- `+g[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{Is=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?$l(l):""}function cg(t,e){switch(t.tag){case 26:case 27:case 5:return $l(t.type);case 16:return $l("Lazy");case 13:return t.child!==e&&e!==null?$l("Suspense Fallback"):$l("Suspense");case 19:return $l("SuspenseList");case 0:case 15:return Fs(t.type,!1);case 11:return Fs(t.type.render,!1);case 1:return Fs(t.type,!0);case 31:return $l("Activity");case 30:return $l("ViewTransition");default:return""}}function ef(t){try{var e="",l=null;do e+=cg(t,l),l=t,t=t.return;while(t);return e}catch(n){return`
47
- Error generating stack: `+n.message+`
48
- `+n.stack}}var Ws=Object.prototype.hasOwnProperty,Ps=i.unstable_scheduleCallback,tc=i.unstable_cancelCallback,rg=i.unstable_shouldYield,og=i.unstable_requestPaint,ze=i.unstable_now,fg=i.unstable_getCurrentPriorityLevel,lf=i.unstable_ImmediatePriority,nf=i.unstable_UserBlockingPriority,ti=i.unstable_NormalPriority,dg=i.unstable_LowPriority,af=i.unstable_IdlePriority,hg=i.log,mg=i.unstable_setDisableYieldValue,Za=null,Oe=null;function Ql(t){if(typeof hg=="function"&&mg(t),Oe&&typeof Oe.setStrictMode=="function")try{Oe.setStrictMode(Za,t)}catch{}}var Re=Math.clz32?Math.clz32:vg,pg=Math.log,gg=Math.LN2;function vg(t){return t>>>=0,t===0?32:31-(pg(t)/gg|0)|0}var ei=256,li=262144,ni=4194304;function Tn(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&-t;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function ai(t,e,l){var n=t.pendingLanes;if(n===0)return 0;var a=0,u=t.suspendedLanes,c=t.pingedLanes;t=t.warmLanes;var h=n&134217727;return h!==0?(n=h&~u,n!==0?a=Tn(n):(c&=h,c!==0?a=Tn(c):l||(l=h&~t,l!==0&&(a=Tn(l))))):(h=n&~u,h!==0?a=Tn(h):c!==0?a=Tn(c):l||(l=n&~t,l!==0&&(a=Tn(l)))),a===0?0:e!==0&&e!==a&&(e&u)===0&&(u=a&-a,l=e&-e,u>=l||u===32&&(l&4194048)!==0)?e:a}function Ka(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function uf(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-Re(l),a=1<<n;e|=t[n],l&=~a}return e}function yg(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 sf(){var t=ni;return ni<<=1,(ni&62914560)===0&&(ni=4194304),t}function ec(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function Ja(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function xg(t,e,l,n,a,u){var c=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,g=t.expirationTimes,T=t.hiddenUpdates;for(l=c&~l;0<l;){var C=31-Re(l),M=1<<C;h[C]=0,g[C]=-1;var j=T[C];if(j!==null)for(T[C]=null,C=0;C<j.length;C++){var O=j[C];O!==null&&(O.lane&=-536870913)}l&=~M}n!==0&&cf(t,n,0),u!==0&&a===0&&t.tag!==0&&(t.suspendedLanes|=u&~(c&~e))}function cf(t,e,l){t.pendingLanes|=e,t.suspendedLanes&=~e;var n=31-Re(e);t.entangledLanes|=e,t.entanglements[n]=t.entanglements[n]|1073741824|l&261930}function rf(t,e){var l=t.entangledLanes|=e;for(t=t.entanglements;l;){var n=31-Re(l),a=1<<n;a&e|t[n]&e&&(t[n]|=e),l&=~a}}function of(t,e){var l=e&-e;return l=(l&42)!==0?1:lc(l),(l&(t.suspendedLanes|e))!==0?0:l}function lc(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 nc(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function ff(){var t=lt.p;return t!==0?t:(t=window.event,t===void 0?32:y0(t.type))}function df(t,e){var l=lt.p;try{return lt.p=t,e()}finally{lt.p=l}}var _l=Math.random().toString(36).slice(2),ne="__reactFiber$"+_l,be="__reactProps$"+_l,Wn="__reactContainer$"+_l,hf="__reactEvents$"+_l,bg="__reactListeners$"+_l,Sg="__reactHandles$"+_l,mf="__reactResources$"+_l,Ia="__reactMarker$"+_l,ui="__reactLoad$"+_l;function ii(t){delete t[ne],delete t[be],delete t[bg],delete t[Sg]}function En(t){var e;if(e=t[ne])return e;for(var l=t.parentNode;l;){if(e=l[Wn]||l[ne]){if(l=e.alternate,e.child!==null||l!==null&&l.child!==null)for(t=Wm(t);t!==null;){if(l=t[ne])return l;t=Wm(t)}return e}t=l,l=t.parentNode}return null}function Pn(t){if(t=t[ne]||t[Wn]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function Fa(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(f(33))}function ta(t){var e=t[mf];return e||(e=t[mf]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Wt(t){t[Ia]=!0}function pf(t){t[ui]=void 0}var gf=new Set,vf={};function Nn(t,e){ea(t,e),ea(t+"Capture",e)}function ea(t,e){for(vf[t]=e,t=0;t<e.length;t++)gf.add(e[t])}var jg=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]*$"),yf={},xf={};function _g(t){return Ws.call(xf,t)?!0:Ws.call(yf,t)?!1:jg.test(t)?xf[t]=!0:(yf[t]=!0,!1)}var yt=!1;function bf(){var t=yt;return yt=!1,t}function si(t,e,l){if(_g(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 ci(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 Ce(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Sf(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Tg(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,u=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return a.call(this)},set:function(c){l=""+c,u.call(this,c)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(c){l=""+c},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function ac(t){if(!t._valueTracker){var e=Sf(t)?"checked":"value";t._valueTracker=Tg(t,e,""+t[e])}}function jf(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var l=e.getValue(),n="";return t&&(n=Sf(t)?t.checked?"true":"false":t.value),t=n,t!==l?(e.setValue(t),!0):!1}var Eg=/[\n"\\]/g;function Ve(t){return t.replace(Eg,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function uc(t,e,l,n,a,u,c,h){t.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?t.type=c:t.removeAttribute("type"),e!=null?c==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Ce(e)):t.value!==""+Ce(e)&&(t.value=""+Ce(e)):c!=="submit"&&c!=="reset"||t.removeAttribute("value"),e!=null?c==="number"&&t.value==e?ic(t,Ce(t.value)):ic(t,Ce(e)):l!=null?ic(t,Ce(l)):n!=null&&t.removeAttribute("value"),a==null&&u!=null&&(t.defaultChecked=!!u),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?t.name=""+Ce(h):t.removeAttribute("name")}function _f(t,e,l,n,a,u,c,h){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.type=u),e!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||e!=null)){ac(t);return}l=l!=null?""+Ce(l):"",e=e!=null?""+Ce(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,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(t.name=c),ac(t)}function ic(t,e){t.defaultValue!==""+e&&(t.defaultValue=""+e)}function la(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=""+Ce(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 Tf(t,e,l){if(e!=null&&(e=""+Ce(e),e!==t.value&&(t.value=e),l==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=l!=null?""+Ce(l):""}function Ef(t,e,l,n){if(e==null){if(n!=null){if(l!=null)throw Error(f(92));if(xt(n)){if(1<n.length)throw Error(f(93));n=n[0]}l=n}l==null&&(l=""),e=l}l=Ce(e),t.defaultValue=l,n=t.textContent,n===l&&n!==""&&n!==null&&(t.value=n),ac(t)}function na(t,e){if(e){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=e;return}}t.textContent=e}var Ng=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 Nf(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||Ng.has(e)?e==="float"?t.cssFloat=l:t[e]=(""+l).trim():t[e]=l+"px"}function zf(t,e,l){if(e!=null&&typeof e!="object")throw Error(f(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]="",yt=!0);for(var a in e)n=e[a],e.hasOwnProperty(a)&&l[a]!==n&&(Nf(t,a,n),yt=!0)}else for(var u in e)e.hasOwnProperty(u)&&Nf(t,u,e[u])}function sc(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 zg=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"]]),Og=/^[\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 ri(t){return Og.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function rl(){}var cc=null;function rc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var aa=null,ua=null;function Of(t){var e=Pn(t);if(e&&(t=e.stateNode)){var l=t[be]||null;t:switch(t=e.stateNode,e.type){case"input":if(uc(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[be]||null;if(!a)throw Error(f(90));uc(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&&jf(n)}break t;case"textarea":Tf(t,l.value,l.defaultValue);break t;case"select":e=l.value,e!=null&&la(t,!!l.multiple,e,!1)}}}var oc=!1;function Rf(t,e,l){if(oc)return t(e,l);oc=!0;try{var n=t(e);return n}finally{if(oc=!1,(aa!==null||ua!==null)&&(rs(),aa&&(e=aa,t=ua,ua=aa=null,Of(e),t)))for(e=0;e<t.length;e++)Of(t[e])}}function Wa(t,e){var l=t.stateNode;if(l===null)return null;var n=l[be]||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(f(231,e,typeof l));return l}var El=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fc=!1;if(El)try{var Pa={};Object.defineProperty(Pa,"passive",{get:function(){fc=!0}}),window.addEventListener("test",Pa,Pa),window.removeEventListener("test",Pa,Pa)}catch{fc=!1}var Xl=null,dc=null,oi=null;function Cf(){if(oi)return oi;var t,e=dc,l=e.length,n,a="value"in Xl?Xl.value:Xl.textContent,u=a.length;for(t=0;t<l&&e[t]===a[t];t++);var c=l-t;for(n=1;n<=c&&e[l-n]===a[u-n];n++);return oi=a.slice(t,1<n?1-n:void 0)}function fi(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 di(){return!0}function Af(){return!1}function pe(t){function e(l,n,a,u,c){this._reactName=l,this._targetInst=a,this.type=n,this.nativeEvent=u,this.target=c,this.currentTarget=null;for(var h in t)t.hasOwnProperty(h)&&(l=t[h],this[h]=l?l(u):u[h]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?di:Af,this.isPropagationStopped=Af,this}return ut(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=di)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=di)},persist:function(){},isPersistent:di}),e}var Zl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hi=pe(Zl),tu=ut({},Zl,{view:0,detail:0}),Rg=pe(tu),hc,mc,eu,mi=ut({},tu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gc,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!==eu&&(eu&&t.type==="mousemove"?(hc=t.screenX-eu.screenX,mc=t.screenY-eu.screenY):mc=hc=0,eu=t),hc)},movementY:function(t){return"movementY"in t?t.movementY:mc}}),Df=pe(mi),Cg=ut({},mi,{dataTransfer:0}),Ag=pe(Cg),Dg=ut({},tu,{relatedTarget:0}),pc=pe(Dg),Mg=ut({},Zl,{animationName:0,elapsedTime:0,pseudoElement:0}),wg=pe(Mg),Ug=ut({},Zl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Hg=pe(Ug),Bg=ut({},Zl,{data:0}),Mf=pe(Bg),kg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qg={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"},Lg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Yg(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Lg[t])?!!e[t]:!1}function gc(){return Yg}var Vg=ut({},tu,{key:function(t){if(t.key){var e=kg[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=fi(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?qg[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gc,charCode:function(t){return t.type==="keypress"?fi(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?fi(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Gg=pe(Vg),$g=ut({},mi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wf=pe($g),Qg=ut({},Zl,{submitter:0}),Xg=pe(Qg),Zg=ut({},tu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gc}),Kg=pe(Zg),Jg=ut({},Zl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ig=pe(Jg),Fg=ut({},mi,{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}),Wg=pe(Fg),Pg=ut({},Zl,{newState:0,oldState:0,source:0}),tv=pe(Pg),ev=[9,13,27,32],vc=El&&"CompositionEvent"in window,lu=null;El&&"documentMode"in document&&(lu=document.documentMode);var lv=El&&"TextEvent"in window&&!lu,Uf=El&&(!vc||lu&&8<lu&&11>=lu),Hf=" ",Bf=!1;function kf(t,e){switch(t){case"keyup":return ev.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qf(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ia=!1;function nv(t,e){switch(t){case"compositionend":return qf(e);case"keypress":return e.which!==32?null:(Bf=!0,Hf);case"textInput":return t=e.data,t===Hf&&Bf?null:t;default:return null}}function av(t,e){if(ia)return t==="compositionend"||!vc&&kf(t,e)?(t=Cf(),oi=dc=Xl=null,ia=!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 Uf&&e.locale!=="ko"?null:e.data;default:return null}}var uv={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Lf(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!uv[t.type]:e==="textarea"}function Yf(t,e,l,n){aa?ua?ua.push(n):ua=[n]:aa=n,e=ps(e,"onChange"),0<e.length&&(l=new hi("onChange","change",null,l,n),t.push({event:l,listeners:e}))}var nu=null,au=null;function iv(t){Om(t,0)}function pi(t){var e=Fa(t);if(jf(e))return t}function Vf(t,e){if(t==="change")return e}var Gf=!1;if(El){var yc;if(El){var xc="oninput"in document;if(!xc){var $f=document.createElement("div");$f.setAttribute("oninput","return;"),xc=typeof $f.oninput=="function"}yc=xc}else yc=!1;Gf=yc&&(!document.documentMode||9<document.documentMode)}function Qf(){nu&&(nu.detachEvent("onpropertychange",Xf),au=nu=null)}function Xf(t){if(t.propertyName==="value"&&pi(au)){var e=[];Yf(e,au,t,rc(t)),Rf(iv,e)}}function sv(t,e,l){t==="focusin"?(Qf(),nu=e,au=l,nu.attachEvent("onpropertychange",Xf)):t==="focusout"&&Qf()}function cv(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return pi(au)}function rv(t,e){if(t==="click")return pi(e)}function ov(t,e){if(t==="input"||t==="change")return pi(e)}function fv(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ae=typeof Object.is=="function"?Object.is:fv;function uu(t,e){if(Ae(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(!Ws.call(e,a)||!Ae(t[a],e[a]))return!1}return!0}function bc(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 Zf(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Kf(t,e){var l=Zf(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=Zf(l)}}function Jf(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Jf(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function If(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=bc(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=bc(t.document)}return e}function Sc(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 dv=El&&"documentMode"in document&&11>=document.documentMode,sa=null,jc=null,iu=null,_c=!1;function Ff(t,e,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;_c||sa==null||sa!==bc(n)||(n=sa,"selectionStart"in n&&Sc(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}),iu&&uu(iu,n)||(iu=n,n=ps(jc,"onSelect"),0<n.length&&(e=new hi("onSelect","select",null,e,l),t.push({event:e,listeners:n}),e.target=sa)))}function zn(t,e){var l={};return l[t.toLowerCase()]=e.toLowerCase(),l["Webkit"+t]="webkit"+e,l["Moz"+t]="moz"+e,l}var ca={animationend:zn("Animation","AnimationEnd"),animationiteration:zn("Animation","AnimationIteration"),animationstart:zn("Animation","AnimationStart"),transitionrun:zn("Transition","TransitionRun"),transitionstart:zn("Transition","TransitionStart"),transitioncancel:zn("Transition","TransitionCancel"),transitionend:zn("Transition","TransitionEnd")},Tc={},Wf={};El&&(Wf=document.createElement("div").style,"AnimationEvent"in window||(delete ca.animationend.animation,delete ca.animationiteration.animation,delete ca.animationstart.animation),"TransitionEvent"in window||delete ca.transitionend.transition);function On(t){if(Tc[t])return Tc[t];if(!ca[t])return t;var e=ca[t],l;for(l in e)if(e.hasOwnProperty(l)&&l in Wf)return Tc[t]=e[l];return t}var Pf=On("animationend"),td=On("animationiteration"),ed=On("animationstart"),hv=On("transitionrun"),mv=On("transitionstart"),pv=On("transitioncancel"),ld=On("transitionend"),nd=new Map,Ec="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(" ");Ec.push("scrollEnd");function We(t,e){nd.set(t,e),Nn(e,[t])}var gv=0;function Nl(t,e){if(t.name!=null&&t.name!=="auto")return t.name;if(e.autoName!==null)return e.autoName;t=ll.identifierPrefix;var l=gv++;return t="_"+t+"t_"+l.toString(32)+"_",e.autoName=t}function ad(t){if(t==null||typeof t=="string")return t;var e=null,l=Oa;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=ad(t),e=ad(e),e==null?t==="auto"?null:t:e==="auto"?null:e}var gi=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=[],ra=0,Nc=0;function vi(){for(var t=ra,e=Nc=ra=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 u=Ge[e];if(Ge[e++]=null,n!==null&&a!==null){var c=n.pending;c===null?a.next=a:(a.next=c.next,c.next=a),n.pending=a}u!==0&&ud(l,a,u)}}function yi(t,e,l,n){Ge[ra++]=t,Ge[ra++]=e,Ge[ra++]=l,Ge[ra++]=n,Nc|=n,t.lanes|=n,t=t.alternate,t!==null&&(t.lanes|=n)}function zc(t,e,l,n){return yi(t,e,l,n),xi(t)}function Rn(t,e){return yi(t,null,null,e),xi(t)}function ud(t,e,l){t.lanes|=l;var n=t.alternate;n!==null&&(n.lanes|=l);for(var a=!1,u=t.return;u!==null;)u.childLanes|=l,n=u.alternate,n!==null&&(n.childLanes|=l),u.tag===22&&(t=u.stateNode,t===null||t._visibility&1||(a=!0)),t=u,u=u.return;return t.tag===3?(u=t.stateNode,a&&e!==null&&(a=31-Re(l),t=u.hiddenUpdates,n=t[a],n===null?t[a]=[e]:n.push(e),e.lane=l|536870912),u):null}function xi(t){if(50<Ou)throw Ou=0,cs=null,Error(f(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var oa={};function vv(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 Se(t,e,l,n){return new vv(t,e,l,n)}function Oc(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ol(t,e){var l=t.alternate;return l===null?(l=Se(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 id(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 bi(t,e,l,n,a,u){var c=0;if(n=t,typeof n=="function")Oc(n)&&(c=1);else if(typeof n=="string")c=Qy(t,l,cl.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(n){case Fe:return t=Se(31,l,e,a),t.elementType=Fe,t.lanes=u,t;case Kt:return Cn(l.children,a,u,e);case at:c=8,a|=24;break;case de:return t=Se(12,l,e,a|2),t.elementType=de,t.lanes=u,t;case tt:return t=Se(13,l,e,a),t.elementType=tt,t.lanes=u,t;case et:return t=Se(19,l,e,a),t.elementType=et,t.lanes=u,t;case Sl:case S:return t=a|32,t=Se(30,l,e,t),t.elementType=S,t.lanes=u,t.stateNode={autoName:null,paired:null,clones:null,ref:null},t;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case Ft:c=10;break t;case he:c=9;break t;case Y:c=11;break t;case Rt:c=14;break t;case jt:c=16,n=null;break t}c=29,l=Error(f(130,t===null?"null":typeof t,"")),n=null}return e=Se(c,l,e,a),e.elementType=t,e.type=n,e.lanes=u,e}function Cn(t,e,l,n){return t=Se(7,t,n,e),t.lanes=l,t}function Rc(t,e,l){return t=Se(6,t,null,e),t.lanes=l,t}function sd(t){var e=Se(18,null,null,0);return e.stateNode=t,e}function Cc(t,e,l){return e=Se(4,t.children!==null?t.children:[],t.key,e),e.lanes=l,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var cd=new WeakMap;function $e(t,e){if(typeof t=="object"&&t!==null){var l=cd.get(t);return l!==void 0?l:(e={value:t,source:e,stack:ef(e)},cd.set(t,e),e)}return{value:t,source:e,stack:ef(e)}}var fa=[],da=0,Si=null,su=0,Qe=[],Xe=0,Kl=null,ol=1,fl="";function Rl(t,e){fa[da++]=su,fa[da++]=Si,Si=t,su=e}function rd(t,e,l){Qe[Xe++]=ol,Qe[Xe++]=fl,Qe[Xe++]=Kl,Kl=t;var n=ol;t=fl;var a=32-Re(n)-1;n&=~(1<<a),l+=1;var u=32-Re(e)+a;if(30<u){var c=a-a%5;u=(n&(1<<c)-1).toString(32),n>>=c,a-=c,ol=1<<32-Re(e)+a|l<<a|n,fl=u+t}else ol=1<<u|l<<a|n,fl=t}function ji(t){t.return!==null&&(Rl(t,1),rd(t,1,0))}function Ac(t){for(;t===Si;)Si=fa[--da],fa[da]=null,su=fa[--da],fa[da]=null;for(;t===Kl;)Kl=Qe[--Xe],Qe[Xe]=null,fl=Qe[--Xe],Qe[Xe]=null,ol=Qe[--Xe],Qe[Xe]=null}function od(t,e){Qe[Xe++]=ol,Qe[Xe++]=fl,Qe[Xe++]=Kl,ol=e.id,fl=e.overflow,Kl=t}var Pt=null,Dt=null,ct=!1,Jl=null,Ze=!1,Dc=Error(f(519));function Il(t){var e=Error(f(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cu($e(e,t)),Dc}function fd(t){var e=t.stateNode,l=t.type,n=t.memoizedProps;switch(e[ne]=t,e[be]=n,l){case"dialog":ft("cancel",e),ft("close",e);break;case"iframe":case"object":case"embed":ft("load",e);break;case"video":case"audio":for(l=0;l<Cu.length;l++)ft(Cu[l],e);break;case"source":ft("error",e);break;case"img":case"image":case"link":ft("error",e),ft("load",e);break;case"details":ft("toggle",e);break;case"input":ft("invalid",e),_f(e,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":ft("invalid",e);break;case"textarea":ft("invalid",e),Ef(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||Dm(e.textContent,l)?(n.popover!=null&&(ft("beforetoggle",e),ft("toggle",e)),n.onScroll!=null&&ft("scroll",e),n.onScrollEnd!=null&&ft("scrollend",e),n.onClick!=null&&(e.onclick=rl),e=!0):e=!1,e||Il(t,!0)}function _i(t){for(Pt=t.return;Pt;)switch(Pt.tag){case 5:case 31:case 13:Ze=!1;return;case 27:case 3:Ze=!0;return;default:Pt=Pt.return}}function ha(t){if(t!==Pt)return!1;if(!ct)return _i(t),ct=!0,!1;var e=t.tag,l;if((l=e!==3&&e!==27)&&((l=e===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||co(t.type,t.memoizedProps)),l=!l),l&&Dt&&Il(t),_i(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(f(317));Dt=Fm(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(f(317));Dt=Fm(t)}else e===27?(e=Dt,hn(t.type)?(t=yo,yo=null,Dt=t):Dt=e):Dt=Pt?Je(t.stateNode.nextSibling):null;return!0}function An(){Dt=Pt=null,ct=!1}function Mc(){var t=Jl;return t!==null&&(Te===null?Te=t:Te.push.apply(Te,t),Jl=null),t}function cu(t){Jl===null?Jl=[t]:Jl.push(t)}var wc=sl(null),Dn=null,Cl=null;function Fl(t,e,l){At(wc,e._currentValue),e._currentValue=l}function Al(t){t._currentValue=wc.current,le(wc)}function Ti(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 Uc(t,e,l,n){var a=t.child;for(a!==null&&(a.return=t);a!==null;){var u=a.dependencies;if(u!==null){var c=a.child;u=u.firstContext;t:for(;u!==null;){var h=u;u=a;for(var g=0;g<e.length;g++)if(h.context===e[g]){u.lanes|=l,h=u.alternate,h!==null&&(h.lanes|=l),Ti(u.return,l,t),n||(c=null);break t}u=h.next}}else if(a.tag===18){if(c=a.return,c===null)throw Error(f(341));c.lanes|=l,u=c.alternate,u!==null&&(u.lanes|=l),Ti(c,l,t),c=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=l,c=a.alternate,c!==null&&(c.lanes|=l),Ti(a.return,l,t),c=a.child,c=c!==null?c.sibling:null):c=a.child;if(c!==null)c.return=a;else for(c=a;c!==null;){if(c===t){c=null;break}if(a=c.sibling,a!==null){a.return=c.return,c=a;break}c=c.return}a=c}}function Mn(t,e,l,n){t=null;for(var a=e,u=!1;a!==null;){if(!u){if((a.flags&524288)!==0)u=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var c=a.alternate;if(c===null)throw Error(f(387));if(c=c.memoizedProps,c!==null){var h=a.type;Ae(a.pendingProps.value,c.value)||(t!==null?t.push(h):t=[h])}}else if(a===Fu.current){if(c=a.alternate,c===null)throw Error(f(387));c.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(t!==null?t.push(ka):t=[ka])}a=a.return}return t!==null&&Uc(e,t,l,n),e.flags|=262144,t!==null}function Ei(t){for(t=t.firstContext;t!==null;){if(!Ae(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function wn(t){Dn=t,Cl=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function ae(t){return dd(Dn,t)}function Ni(t,e){return Dn===null&&wn(t),dd(t,e)}function dd(t,e){var l=e._currentValue;if(e={context:e,memoizedValue:l,next:null},Cl===null){if(t===null)throw Error(f(308));Cl=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Cl=Cl.next=e;return l}var yv=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()})}},xv=i.unstable_scheduleCallback,bv=i.unstable_NormalPriority,$t={$$typeof:Ft,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Hc(){return{controller:new yv,data:new Map,refCount:0}}function ru(t){t.refCount--,t.refCount===0&&xv(bv,function(){t.controller.abort()})}function hd(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 ou=null;function Sv(t){var e=t.transitionTypes;return t.transitionTypes=null,e}var fu=null,Bc=0,Un=0,ma=null;function jv(t,e){if(fu===null){var l=fu=[];Bc=0,Un=Pr(),ma={status:"pending",value:void 0,then:function(n){l.push(n)}}}return Bc++,e.then(md,md),e}function md(){if(--Bc===0&&(ou=null,fu!==null)){ma!==null&&(ma.status="fulfilled");var t=fu;fu=null,Un=0,ma=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function _v(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 pd=Z.S;Z.S=function(t,e){if(sm=ze(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&jv(t,e),ou!==null)for(var l=Da;l!==null;)hd(l,ou),l=l.next;if(l=t.types,l!==null){for(var n=Da;n!==null;)hd(n,l),n=n.next;if(Un!==0){n=ou,n===null&&(n=ou=[]);for(var a=0;a<l.length;a++){var u=l[a];n.indexOf(u)===-1&&n.push(u)}}}pd!==null&&pd(t,e)};var Hn=sl(null);function kc(){var t=Hn.current;return t!==null?t:Ct.pooledCache}function zi(t,e){e===null?At(Hn,Hn.current):At(Hn,e.pool)}function gd(){var t=kc();return t===null?null:{parent:$t._currentValue,pool:t}}var pa=Error(f(460)),qc=Error(f(474)),Oi=Error(f(542)),Ri={then:function(){}};function vd(t){return t=t.status,t==="fulfilled"||t==="rejected"}function yd(t,e,l){switch(l=t[l],l===void 0?t.push(e):l!==e&&(e.then(rl,rl),e=l),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,bd(t),t===void 0&&!("reason"in e)?Error(f(600)):t;default:if(typeof e.status=="string")e.then(rl,rl);else{if(t=Ct,t!==null&&100<t.shellSuspendCounter)throw Error(f(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,bd(t),t}throw kn=e,pa}}function Bn(t){try{var e=t._init;return e(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(kn=l,pa):l}}var kn=null;function xd(){if(kn===null)throw Error(f(459));var t=kn;return kn=null,t}function bd(t){if(t===pa||t===Oi)throw Error(f(483))}var ga=null,du=0;function Ci(t){var e=du;return du+=1,ga===null&&(ga=[]),yd(ga,t,e)}function Wl(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function Ai(t,e){throw e.$$typeof===rt?Error(f(525)):(t=Object.prototype.toString.call(e),Error(f(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function Sd(t){function e(_,b){if(t){var z=_.deletions;z===null?(_.deletions=[b],_.flags|=16):z.push(b)}}function l(_,b){if(!t)return null;for(;b!==null;)e(_,b),b=b.sibling;return null}function n(_){for(var b=new Map;_!==null;)_.key===null?b.set(_.index,_):b.set(_.key,_),_=_.sibling;return b}function a(_,b){return _=Ol(_,b),_.index=0,_.sibling=null,_}function u(_,b,z){return _.index=z,t?(z=_.alternate,z!==null?(z=z.index,z<b?(_.flags|=2,b):z):(_.flags|=134217730,b)):(_.flags|=1048576,b)}function c(_){return t&&_.alternate===null&&(_.flags|=134217730),_}function h(_,b,z,D){return b===null||b.tag!==6?(b=Rc(z,_.mode,D),b.return=_,b):(b=a(b,z),b.return=_,b)}function g(_,b,z,D){var V=z.type;return V===Kt?(_=C(_,b,z.props.children,D,z.key),Wl(_,z),_):b!==null&&(b.elementType===V||typeof V=="object"&&V!==null&&V.$$typeof===jt&&Bn(V)===b.type)?(b=a(b,z.props),Wl(b,z),b.return=_,b):(b=bi(z.type,z.key,z.props,null,_.mode,D),Wl(b,z),b.return=_,b)}function T(_,b,z,D){return b===null||b.tag!==4||b.stateNode.containerInfo!==z.containerInfo||b.stateNode.implementation!==z.implementation?(b=Cc(z,_.mode,D),b.return=_,b):(b=a(b,z.children||[]),b.return=_,b)}function C(_,b,z,D,V){return b===null||b.tag!==7?(b=Cn(z,_.mode,D,V),b.return=_,b):(b=a(b,z),b.return=_,b)}function M(_,b,z){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return b=Rc(""+b,_.mode,z),b.return=_,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Ne:return z=bi(b.type,b.key,b.props,null,_.mode,z),Wl(z,b),z.return=_,z;case fe:return b=Cc(b,_.mode,z),b.return=_,b;case jt:return b=Bn(b),M(_,b,z)}if(xt(b)||F(b))return b=Cn(b,_.mode,z,null),b.return=_,b;if(typeof b.then=="function")return M(_,Ci(b),z);if(b.$$typeof===Ft)return M(_,Ni(_,b),z);Ai(_,b)}return null}function j(_,b,z,D){var V=b!==null?b.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return V!==null?null:h(_,b,""+z,D);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case Ne:return z.key===V?g(_,b,z,D):null;case fe:return z.key===V?T(_,b,z,D):null;case jt:return z=Bn(z),j(_,b,z,D)}if(xt(z)||F(z))return V!==null?null:C(_,b,z,D,null);if(typeof z.then=="function")return j(_,b,Ci(z),D);if(z.$$typeof===Ft)return j(_,b,Ni(_,z),D);Ai(_,z)}return null}function O(_,b,z,D,V){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return _=_.get(z)||null,h(b,_,""+D,V);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case Ne:return _=_.get(D.key===null?z:D.key)||null,g(b,_,D,V);case fe:return _=_.get(D.key===null?z:D.key)||null,T(b,_,D,V);case jt:return D=Bn(D),O(_,b,z,D,V)}if(xt(D)||F(D))return _=_.get(z)||null,C(b,_,D,V,null);if(typeof D.then=="function")return O(_,b,z,Ci(D),V);if(D.$$typeof===Ft)return O(_,b,z,Ni(b,D),V);Ai(b,D)}return null}function L(_,b,z,D){for(var V=null,ht=null,J=b,W=b=0,Zt=null;J!==null&&W<z.length;W++){J.index>W?(Zt=J,J=null):Zt=J.sibling;var mt=j(_,J,z[W],D);if(mt===null){J===null&&(J=Zt);break}t&&J&&mt.alternate===null&&e(_,J),b=u(mt,b,W),ht===null?V=mt:ht.sibling=mt,ht=mt,J=Zt}if(W===z.length)return l(_,J),ct&&Rl(_,W),V;if(J===null){for(;W<z.length;W++)J=M(_,z[W],D),J!==null&&(b=u(J,b,W),ht===null?V=J:ht.sibling=J,ht=J);return ct&&Rl(_,W),V}for(J=n(J);W<z.length;W++)Zt=O(J,_,W,z[W],D),Zt!==null&&(t&&(mt=Zt.alternate,mt!==null&&J.delete(mt.key===null?W:mt.key)),b=u(Zt,b,W),ht===null?V=Zt:ht.sibling=Zt,ht=Zt);return t&&J.forEach(function(yn){return e(_,yn)}),ct&&Rl(_,W),V}function $(_,b,z,D){if(z==null)throw Error(f(151));for(var V=null,ht=null,J=b,W=b=0,Zt=null,mt=z.next();J!==null&&!mt.done;W++,mt=z.next()){J.index>W?(Zt=J,J=null):Zt=J.sibling;var yn=j(_,J,mt.value,D);if(yn===null){J===null&&(J=Zt);break}t&&J&&yn.alternate===null&&e(_,J),b=u(yn,b,W),ht===null?V=yn:ht.sibling=yn,ht=yn,J=Zt}if(mt.done)return l(_,J),ct&&Rl(_,W),V;if(J===null){for(;!mt.done;W++,mt=z.next())mt=M(_,mt.value,D),mt!==null&&(b=u(mt,b,W),ht===null?V=mt:ht.sibling=mt,ht=mt);return ct&&Rl(_,W),V}for(J=n(J);!mt.done;W++,mt=z.next())mt=O(J,_,W,mt.value,D),mt!==null&&(t&&(Zt=mt.alternate,Zt!==null&&J.delete(Zt.key===null?W:Zt.key)),b=u(mt,b,W),ht===null?V=mt:ht.sibling=mt,ht=mt);return t&&J.forEach(function(nx){return e(_,nx)}),ct&&Rl(_,W),V}function st(_,b,z,D){if(typeof z=="object"&&z!==null&&z.type===Kt&&z.key===null&&z.props.ref===void 0&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case Ne:t:{for(var V=z.key;b!==null;){if(b.key===V){if(V=z.type,V===Kt){if(b.tag===7){l(_,b.sibling),D=a(b,z.props.children),Wl(D,z),D.return=_,_=D;break t}}else if(b.elementType===V||typeof V=="object"&&V!==null&&V.$$typeof===jt&&Bn(V)===b.type){l(_,b.sibling),D=a(b,z.props),Wl(D,z),D.return=_,_=D;break t}l(_,b);break}else e(_,b);b=b.sibling}z.type===Kt?(D=Cn(z.props.children,_.mode,D,z.key),Wl(D,z),D.return=_,_=D):(D=bi(z.type,z.key,z.props,null,_.mode,D),Wl(D,z),D.return=_,_=D)}return c(_);case fe:t:{for(V=z.key;b!==null;){if(b.key===V)if(b.tag===4&&b.stateNode.containerInfo===z.containerInfo&&b.stateNode.implementation===z.implementation){l(_,b.sibling),D=a(b,z.children||[]),D.return=_,_=D;break t}else{l(_,b);break}else e(_,b);b=b.sibling}D=Cc(z,_.mode,D),D.return=_,_=D}return c(_);case jt:return z=Bn(z),st(_,b,z,D)}if(xt(z))return L(_,b,z,D);if(F(z)){if(V=F(z),typeof V!="function")throw Error(f(150));return z=V.call(z),$(_,b,z,D)}if(typeof z.then=="function")return st(_,b,Ci(z),D);if(z.$$typeof===Ft)return st(_,b,Ni(_,z),D);Ai(_,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,b!==null&&b.tag===6?(l(_,b.sibling),D=a(b,z),D.return=_,_=D):(l(_,b),D=Rc(z,_.mode,D),D.return=_,_=D),c(_)):l(_,b)}return function(_,b,z,D){try{du=0;var V=st(_,b,z,D);return ga=null,V}catch(J){if(J===pa||J===Oi)throw J;var ht=Se(29,J,null,_.mode);return ht.lanes=D,ht.return=_,ht}finally{}}}var qn=Sd(!0),jd=Sd(!1),Pl=!1;function Lc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yc(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 tn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function en(t,e,l){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,(bt&2)!==0){var a=n.pending;return a===null?e.next=e:(e.next=a.next,a.next=e),n.pending=e,e=xi(t),ud(t,null,l),e}return yi(t,n,e,l),xi(t)}function hu(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,rf(t,l)}}function Vc(t,e){var l=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var a=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var c={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?a=u=c:u=u.next=c,l=l.next}while(l!==null);u===null?a=u=e:u=u.next=e}else a=u=e;l={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:u,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 Gc=!1;function mu(){if(Gc){var t=ma;if(t!==null)throw t}}function pu(t,e,l,n){Gc=!1;var a=t.updateQueue;Pl=!1;var u=a.firstBaseUpdate,c=a.lastBaseUpdate,h=a.shared.pending;if(h!==null){a.shared.pending=null;var g=h,T=g.next;g.next=null,c===null?u=T:c.next=T,c=g;var C=t.alternate;C!==null&&(C=C.updateQueue,h=C.lastBaseUpdate,h!==c&&(h===null?C.firstBaseUpdate=T:h.next=T,C.lastBaseUpdate=g))}if(u!==null){var M=a.baseState;c=0,C=T=g=null,h=u;do{var j=h.lane&-536870913,O=j!==h.lane;if(O?(dt&j)===j:(n&j)===j){j!==0&&j===Un&&(Gc=!0),C!==null&&(C=C.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});t:{var L=t,$=h;j=e;var st=l;switch($.tag){case 1:if(L=$.payload,typeof L=="function"){M=L.call(st,M,j);break t}M=L;break t;case 3:L.flags=L.flags&-65537|128;case 0:if(L=$.payload,j=typeof L=="function"?L.call(st,M,j):L,j==null)break t;M=ut({},M,j);break t;case 2:Pl=!0}}j=h.callback,j!==null&&(t.flags|=64,O&&(t.flags|=8192),O=a.callbacks,O===null?a.callbacks=[j]:O.push(j))}else O={lane:j,tag:h.tag,payload:h.payload,callback:h.callback,next:null},C===null?(T=C=O,g=M):C=C.next=O,c|=j;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&&(g=M),a.baseState=g,a.firstBaseUpdate=T,a.lastBaseUpdate=C,u===null&&(a.shared.lanes=0),rn|=c,t.lanes=c,t.memoizedState=M}}function _d(t,e){if(typeof t!="function")throw Error(f(191,t));t.call(e)}function Td(t,e){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)_d(l[t],e)}var ln=sl(null),Di=sl(0);function Ed(t,e){t=Hl,At(Di,t),At(ln,e),Hl=t|e.baseLanes}function $c(){At(Di,Hl),At(ln,ln.current)}function Qc(){Hl=Di.current,le(ln),le(Di)}var ue=sl(null),me=null;function nn(t){var e=t.alternate;At(ie,ie.current&1),At(ue,t),me===null&&(e===null||ln.current!==null||e.memoizedState!==null)&&(me=t)}function Xc(t){At(ie,ie.current),At(ue,t),me===null&&(me=t)}function Nd(t){t.tag===22?(At(ie,ie.current),At(ue,t),me===null&&(me=t)):an()}function an(){At(ie,ie.current),At(ue,ue.current)}function De(t){le(ue),me===t&&(me=null),le(ie)}var ie=sl(0);function gu(t,e){At(ue,ue.current),At(ie,e)}function Zc(t){le(ie),le(ue),me===t&&(me=null)}function Mi(t){for(var e=t;e!==null;){if(e.tag===13){var l=e.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||go(l)||vo(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,it=null,Ot=null,Qt=null,wi=!1,va=!1,Ln=!1,Ui=0,vu=0,ya=null,Tv=0;function Yt(){throw Error(f(321))}function Kc(t,e){if(e===null)return!1;for(var l=0;l<e.length&&l<t.length;l++)if(!Ae(t[l],e[l]))return!1;return!0}function Jc(t,e,l,n,a,u){return Dl=u,it=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Z.H=t===null||t.memoizedState===null?rh:oh,Ln=!1,u=l(n,a),Ln=!1,va&&(u=Od(e,l,n,a)),zd(t),u}function zd(t){Z.H=Vi;var e=Ot!==null&&Ot.next!==null;if(Dl=0,Qt=Ot=it=null,wi=!1,vu=0,ya=null,e)throw Error(f(300));t===null||Xt||(t=t.dependencies,t!==null&&Ei(t)&&(Xt=!0))}function Od(t,e,l,n){it=t;var a=0;do{if(va&&(ya=null),vu=0,va=!1,25<=a)throw Error(f(301));if(a+=1,Qt=Ot=null,t.updateQueue!=null){var u=t.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}Z.H=Dv,u=e(l,n)}while(va);return u}function Ev(){var t=Z.H,e=t.useState()[0];return e=typeof e.then=="function"?yu(e):e,t=t.useState()[0],(Ot!==null?Ot.memoizedState:null)!==t&&(it.flags|=1024),e}function Ic(){var t=Ui!==0;return Ui=0,t}function Fc(t,e,l){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~l}function Wc(t){if(wi){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}wi=!1}Dl=0,Qt=Ot=it=null,va=!1,vu=Ui=0,ya=null}function ge(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Qt===null?it.memoizedState=Qt=t:Qt=Qt.next=t,Qt}function Gt(){if(Ot===null){var t=it.alternate;t=t!==null?t.memoizedState:null}else t=Ot.next;var e=Qt===null?it.memoizedState:Qt.next;if(e!==null)Qt=e,Ot=t;else{if(t===null)throw it.alternate===null?Error(f(467)):Error(f(310));Ot=t,t={memoizedState:Ot.memoizedState,baseState:Ot.baseState,baseQueue:Ot.baseQueue,queue:Ot.queue,next:null},Qt===null?it.memoizedState=Qt=t:Qt=Qt.next=t}return Qt}function Hi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yu(t){var e=vu;return vu+=1,ya===null&&(ya=[]),t=yd(ya,t,e),e=it,(Qt===null?e.memoizedState:Qt.next)===null&&(e=e.alternate,Z.H=e===null||e.memoizedState===null?rh:oh),t}function Bi(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return yu(t);if(t.$$typeof===B)return;if(t.$$typeof===Ft)return ae(t)}throw Error(f(438,String(t)))}function Pc(t){var e=null,l=it.updateQueue;if(l!==null&&(e=l.memoCache),e==null){var n=it.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=Hi(),it.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 ki(t){var e=Gt();return tr(e,Ot,t)}function tr(t,e,l){var n=t.queue;if(n===null)throw Error(f(311));n.lastRenderedReducer=l;var a=t.baseQueue,u=n.pending;if(u!==null){if(a!==null){var c=a.next;a.next=u.next,u.next=c}e.baseQueue=a=u,n.pending=null}if(u=t.baseState,a===null)t.memoizedState=u;else{e=a.next;var h=c=null,g=null,T=e,C=!1;do{var M=T.lane&-536870913;if(M!==T.lane?(dt&M)===M:(Dl&M)===M){var j=T.revertLane;if(j===0)g!==null&&(g=g.next={lane:0,revertLane:0,gesture:null,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null}),M===Un&&(C=!0);else if((Dl&j)===j){T=T.next,j===Un&&(C=!0);continue}else M={lane:0,revertLane:T.revertLane,gesture:null,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null},g===null?(h=g=M,c=u):g=g.next=M,it.lanes|=j,rn|=j;M=T.action,Ln&&l(u,M),u=T.hasEagerState?T.eagerState:l(u,M)}else j={lane:M,revertLane:T.revertLane,gesture:T.gesture,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null},g===null?(h=g=j,c=u):g=g.next=j,it.lanes|=M,rn|=M;T=T.next}while(T!==null&&T!==e);if(g===null?c=u:g.next=h,!Ae(u,t.memoizedState)&&(Xt=!0,C&&(l=ma,l!==null)))throw l;t.memoizedState=u,t.baseState=c,t.baseQueue=g,n.lastRenderedState=u}return a===null&&(n.lanes=0),[t.memoizedState,n.dispatch]}function er(t){var e=Gt(),l=e.queue;if(l===null)throw Error(f(311));l.lastRenderedReducer=t;var n=l.dispatch,a=l.pending,u=e.memoizedState;if(a!==null){l.pending=null;var c=a=a.next;do u=t(u,c.action),c=c.next;while(c!==a);Ae(u,e.memoizedState)||(Xt=!0),e.memoizedState=u,e.baseQueue===null&&(e.baseState=u),l.lastRenderedState=u}return[u,n]}function Rd(t,e,l){var n=it,a=Gt(),u=ct;if(u){if(l===void 0)throw Error(f(407));l=l()}else l=e();var c=!Ae((Ot||a).memoizedState,l);if(c&&(a.memoizedState=l,Xt=!0),a=a.queue,ar(Dd.bind(null,n,a,t),[t]),t=a.getSnapshot!==e||c||Qt!==null&&(Qt.memoizedState.tag&1)!==0,xa(t?9:8,{destroy:void 0},Ad.bind(null,n,a,l,e),null),t){if(n.flags|=2048,Ct===null)throw Error(f(349));u||(Dl&127)!==0||Cd(n,e,l)}return l}function Cd(t,e,l){t.flags|=16384,t={getSnapshot:e,value:l},e=it.updateQueue,e===null?(e=Hi(),it.updateQueue=e,e.stores=[t]):(l=e.stores,l===null?e.stores=[t]:l.push(t))}function Ad(t,e,l,n){e.value=l,e.getSnapshot=n,Md(e)&&wd(t)}function Dd(t,e,l){return l(function(){Md(e)&&wd(t)})}function Md(t){var e=t.getSnapshot;t=t.value;try{var l=e();return!Ae(t,l)}catch{return!0}}function wd(t){var e=Rn(t,2);e!==null&&Ee(e,t,2)}function lr(t){var e=ge();if(typeof t=="function"){var l=t;if(t=l(),Ln){Ql(!0);try{l()}finally{Ql(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:t},e}function Ud(t,e,l,n){return t.baseState=l,tr(t,Ot,typeof n=="function"?n:Ml)}function Nv(t,e,l,n,a){if(Yi(t))throw Error(f(485));if(t=e.action,t!==null){var u={payload:a,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){u.listeners.push(c)}};Z.T!==null?l(!0):u.isTransition=!1,n(u),l=e.pending,l===null?(u.next=e.pending=u,Hd(e,u)):(u.next=l.next,e.pending=l.next=u)}}function Hd(t,e){var l=e.action,n=e.payload,a=t.state;if(e.isTransition){var u=Z.T,c={};c.types=u!==null?u.types:null,Z.T=c;try{var h=l(a,n),g=Z.S;g!==null&&g(c,h),Bd(t,e,h)}catch(T){nr(t,e,T)}finally{u!==null&&c.types!==null&&(u.types=c.types),Z.T=u}}else try{u=l(a,n),Bd(t,e,u)}catch(T){nr(t,e,T)}}function Bd(t,e,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){kd(t,e,n)},function(n){return nr(t,e,n)}):kd(t,e,l)}function kd(t,e,l){e.status="fulfilled",e.value=l,qd(e),t.state=l,e=t.pending,e!==null&&(l=e.next,l===e?t.pending=null:(l=l.next,e.next=l,Hd(t,l)))}function nr(t,e,l){var n=t.pending;if(t.pending=null,n!==null){n=n.next;do e.status="rejected",e.reason=l,qd(e),e=e.next;while(e!==n)}t.action=null}function qd(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function Ld(t,e){return e}function Yd(t,e){if(ct){var l=Ct.formState;if(l!==null){t:{var n=it;if(ct){if(Dt){e:{for(var a=Dt,u=Ze;a.nodeType!==8;){if(!u){a=null;break e}if(a=Je(a.nextSibling),a===null){a=null;break e}}u=a.data,a=u==="F!"||u==="F"?a:null}if(a){Dt=Je(a.nextSibling),n=a.data==="F!";break t}}Il(n)}n=!1}n&&(e=l[0])}}return l=ge(),l.memoizedState=l.baseState=e,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ld,lastRenderedState:e},l.queue=n,l=ih.bind(null,it,n),n.dispatch=l,n=lr(!1),u=rr.bind(null,it,!1,n.queue),n=ge(),a={state:e,dispatch:null,action:t,pending:null},n.queue=a,l=Nv.bind(null,it,a,u,l),a.dispatch=l,n.memoizedState=t,[e,l,!1]}function Vd(t){var e=Gt();return Gd(e,Ot,t)}function Gd(t,e,l){if(e=tr(t,e,Ld)[0],t=ki(Ml)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var n=yu(e)}catch(c){throw c===pa?Oi:c}else n=e;e=Gt();var a=e.queue,u=a.dispatch;return l!==e.memoizedState&&(it.flags|=2048,xa(9,{destroy:void 0},zv.bind(null,a,l),null)),[n,u,t]}function zv(t,e){t.action=e}function $d(t){var e=Gt(),l=Ot;if(l!==null)return Gd(e,l,t);Gt(),e=e.memoizedState,l=Gt();var n=l.queue.dispatch;return l.memoizedState=t,[e,n,!1]}function xa(t,e,l,n){return t={tag:t,create:l,deps:n,inst:e,next:null},e=it.updateQueue,e===null&&(e=Hi(),it.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 Qd(){return Gt().memoizedState}function qi(t,e,l,n){var a=ge();it.flags|=t,a.memoizedState=xa(1|e,{destroy:void 0},l,n===void 0?null:n)}function Li(t,e,l,n){var a=Gt();n=n===void 0?null:n;var u=a.memoizedState.inst;Ot!==null&&n!==null&&Kc(n,Ot.memoizedState.deps)?a.memoizedState=xa(e,u,l,n):(it.flags|=t,a.memoizedState=xa(1|e,u,l,n))}function Xd(t,e){qi(8390656,8,t,e)}function ar(t,e){Li(2048,8,t,e)}function Ov(t){it.flags|=4;var e=it.updateQueue;if(e===null)e=Hi(),it.updateQueue=e,e.events=[t];else{var l=e.events;l===null?e.events=[t]:l.push(t)}}function Zd(t){var e=Gt().memoizedState;return Ov({ref:e,nextImpl:t}),function(){if((bt&2)!==0)throw Error(f(440));return e.impl.apply(void 0,arguments)}}function Kd(t,e){return Li(4,2,t,e)}function Jd(t,e){return Li(4,4,t,e)}function Id(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 Fd(t,e,l){l=l!=null?l.concat([t]):null,Li(4,4,Id.bind(null,e,t),l)}function ur(){}function Wd(t,e){var l=Gt();e=e===void 0?null:e;var n=l.memoizedState;return e!==null&&Kc(e,n[1])?n[0]:(l.memoizedState=[t,e],t)}function Pd(t,e){var l=Gt();e=e===void 0?null:e;var n=l.memoizedState;if(e!==null&&Kc(e,n[1]))return n[0];if(n=t(),Ln){Ql(!0);try{t()}finally{Ql(!1)}}return l.memoizedState=[n,e],n}function ir(t,e,l){return l===void 0||(Dl&1073741824)!==0&&(dt&261930)===0?t.memoizedState=e:(t.memoizedState=l,t=rm(),it.lanes|=t,rn|=t,l)}function th(t,e,l,n){return Ae(l,e)?l:ln.current!==null?(t=ir(t,l,n),Ae(t,e)||(Xt=!0),t):(Dl&106)===0||(Dl&1073741824)!==0&&(dt&261930)===0?(Xt=!0,t.memoizedState=l):(t=rm(),it.lanes|=t,rn|=t,e)}function eh(t,e,l,n,a){var u=lt.p;lt.p=u!==0&&8>u?u:8;var c=Z.T,h={};h.types=c!==null?c.types:null,Z.T=h,rr(t,!1,e,l);try{var g=a(),T=Z.S;if(T!==null&&T(h,g),g!==null&&typeof g=="object"&&typeof g.then=="function"){var C=_v(g,n);xu(t,e,C,He(t))}else xu(t,e,n,He(t))}catch(M){xu(t,e,{then:function(){},status:"rejected",reason:M},He())}finally{lt.p=u,c!==null&&h.types!==null&&(c.types=h.types),Z.T=c}}function Rv(){}function sr(t,e,l,n){if(t.tag!==5)throw Error(f(476));var a=lh(t).queue;eh(t,a,e,jl,l===null?Rv:function(){return nh(t),l(n)})}function lh(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:jl,baseState:jl,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:jl},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 nh(t){var e=lh(t);e.next===null&&(e=t.alternate.memoizedState),xu(t,e.next.queue,{},He())}function cr(){return ae(ka)}function ah(){return Gt().memoizedState}function uh(){return Gt().memoizedState}function Cv(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=He();t=tn(l);var n=en(e,t,l);n!==null&&(Ee(n,e,l),hu(n,e,l)),e={cache:Hc()},t.payload=e;return}e=e.return}}function Av(t,e,l){var n=He();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Yi(t)?sh(e,l):(l=zc(t,e,l,n),l!==null&&(Ee(l,t,n),ch(l,e,n)))}function ih(t,e,l){var n=He();xu(t,e,l,n)}function xu(t,e,l,n){var a={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Yi(t))sh(e,a);else{var u=t.alternate;if(t.lanes===0&&(u===null||u.lanes===0)&&(u=e.lastRenderedReducer,u!==null))try{var c=e.lastRenderedState,h=u(c,l);if(a.hasEagerState=!0,a.eagerState=h,Ae(h,c))return yi(t,e,a,0),Ct===null&&vi(),!1}catch{}finally{}if(l=zc(t,e,a,n),l!==null)return Ee(l,t,n),ch(l,e,n),!0}return!1}function rr(t,e,l,n){if(n={lane:2,revertLane:Pr(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Yi(t)){if(e)throw Error(f(479))}else e=zc(t,l,n,2),e!==null&&Ee(e,t,2)}function Yi(t){var e=t.alternate;return t===it||e!==null&&e===it}function sh(t,e){va=wi=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function ch(t,e,l){if((l&4194048)!==0){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,rf(t,l)}}var Vi={readContext:ae,use:Bi,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useLayoutEffect:Yt,useInsertionEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useSyncExternalStore:Yt,useId:Yt,useHostTransitionStatus:Yt,useFormState:Yt,useActionState:Yt,useOptimistic:Yt,useMemoCache:Yt,useCacheRefresh:Yt,useEffectEvent:Yt},rh={readContext:ae,use:Bi,useCallback:function(t,e){return ge().memoizedState=[t,e===void 0?null:e],t},useContext:ae,useEffect:Xd,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,qi(4194308,4,Id.bind(null,e,t),l)},useLayoutEffect:function(t,e){return qi(4194308,4,t,e)},useInsertionEffect:function(t,e){qi(4,2,t,e)},useMemo:function(t,e){var l=ge();e=e===void 0?null:e;var n=t();if(Ln){Ql(!0);try{t()}finally{Ql(!1)}}return l.memoizedState=[n,e],n},useReducer:function(t,e,l){var n=ge();if(l!==void 0){var a=l(e);if(Ln){Ql(!0);try{l(e)}finally{Ql(!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=Av.bind(null,it,t),[n.memoizedState,t]},useRef:function(t){var e=ge();return t={current:t},e.memoizedState=t},useState:function(t){t=lr(t);var e=t.queue,l=ih.bind(null,it,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:ur,useDeferredValue:function(t,e){var l=ge();return ir(l,t,e)},useTransition:function(){var t=lr(!1);return t=eh.bind(null,it,t.queue,!0,!1),ge().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var n=it,a=ge();if(ct){if(l===void 0)throw Error(f(407));l=l()}else{if(l=e(),Ct===null)throw Error(f(349));(dt&127)!==0||Cd(n,e,l)}a.memoizedState=l;var u={value:l,getSnapshot:e};return a.queue=u,Xd(Dd.bind(null,n,u,t),[t]),n.flags|=2048,xa(9,{destroy:void 0},Ad.bind(null,n,u,l,e),null),l},useId:function(){var t=ge(),e=Ct.identifierPrefix;if(ct){var l=fl,n=ol;l=(n&~(1<<32-Re(n)-1)).toString(32)+l,e="_"+e+"R_"+l,l=Ui++,0<l&&(e+="H"+l.toString(32)),e+="_"}else l=Tv++,e="_"+e+"r_"+l.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:cr,useFormState:Yd,useActionState:Yd,useOptimistic:function(t){var e=ge();e.memoizedState=e.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=l,e=rr.bind(null,it,!0,l),l.dispatch=e,[t,e]},useMemoCache:Pc,useCacheRefresh:function(){return ge().memoizedState=Cv.bind(null,it)},useEffectEvent:function(t){var e=ge(),l={impl:t};return e.memoizedState=l,function(){if((bt&2)!==0)throw Error(f(440));return l.impl.apply(void 0,arguments)}}},oh={readContext:ae,use:Bi,useCallback:Wd,useContext:ae,useEffect:ar,useImperativeHandle:Fd,useInsertionEffect:Kd,useLayoutEffect:Jd,useMemo:Pd,useReducer:ki,useRef:Qd,useState:function(){return ki(Ml)},useDebugValue:ur,useDeferredValue:function(t,e){var l=Gt();return th(l,Ot.memoizedState,t,e)},useTransition:function(){var t=ki(Ml)[0],e=Gt().memoizedState;return[typeof t=="boolean"?t:yu(t),e]},useSyncExternalStore:Rd,useId:ah,useHostTransitionStatus:cr,useFormState:Vd,useActionState:Vd,useOptimistic:function(t,e){var l=Gt();return Ud(l,Ot,t,e)},useMemoCache:Pc,useCacheRefresh:uh,useEffectEvent:Zd},Dv={readContext:ae,use:Bi,useCallback:Wd,useContext:ae,useEffect:ar,useImperativeHandle:Fd,useInsertionEffect:Kd,useLayoutEffect:Jd,useMemo:Pd,useReducer:er,useRef:Qd,useState:function(){return er(Ml)},useDebugValue:ur,useDeferredValue:function(t,e){var l=Gt();return Ot===null?ir(l,t,e):th(l,Ot.memoizedState,t,e)},useTransition:function(){var t=er(Ml)[0],e=Gt().memoizedState;return[typeof t=="boolean"?t:yu(t),e]},useSyncExternalStore:Rd,useId:ah,useHostTransitionStatus:cr,useFormState:$d,useActionState:$d,useOptimistic:function(t,e){var l=Gt();return Ot!==null?Ud(l,Ot,t,e):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:Pc,useCacheRefresh:uh,useEffectEvent:Zd};function or(t,e,l,n){e=t.memoizedState,l=l(n,e),l=l==null?e:ut({},e,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var fr={enqueueSetState:function(t,e,l){t=t._reactInternals;var n=He(),a=tn(n);a.payload=e,l!=null&&(a.callback=l),e=en(t,a,n),e!==null&&(Ee(e,t,n),hu(e,t,n))},enqueueReplaceState:function(t,e,l){t=t._reactInternals;var n=He(),a=tn(n);a.tag=1,a.payload=e,l!=null&&(a.callback=l),e=en(t,a,n),e!==null&&(Ee(e,t,n),hu(e,t,n))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var l=He(),n=tn(l);n.tag=2,e!=null&&(n.callback=e),e=en(t,n,l),e!==null&&(Ee(e,t,l),hu(e,t,l))}};function fh(t,e,l,n,a,u,c){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,u,c):e.prototype&&e.prototype.isPureReactComponent?!uu(l,n)||!uu(a,u):!0}function dh(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&&fr.enqueueReplaceState(e,e.state,null)}function Yn(t,e){var l=e;if("ref"in e){l={};for(var n in e)n!=="ref"&&(l[n]=e[n])}if(t=t.defaultProps){l===e&&(l=ut({},l));for(var a in t)l[a]===void 0&&(l[a]=t[a])}return l}function hh(t){gi(t)}function mh(t){console.error(t)}function ph(t){gi(t)}function Gi(t,e){try{var l=t.onUncaughtError;l(e.value,{componentStack:e.stack})}catch(n){setTimeout(function(){throw n})}}function gh(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 dr(t,e,l){return l=tn(l),l.tag=3,l.payload={element:null},l.callback=function(){Gi(t,e)},l}function vh(t){return t=tn(t),t.tag=3,t}function yh(t,e,l,n){var a=l.type.getDerivedStateFromError;if(typeof a=="function"){var u=n.value;t.payload=function(){return a(u)},t.callback=function(){gh(e,l,n)}}var c=l.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(t.callback=function(){gh(e,l,n),typeof a!="function"&&(on===null?on=new Set([this]):on.add(this));var h=n.stack;this.componentDidCatch(n.value,{componentStack:h!==null?h:""})})}function Mv(t,e,l,n,a){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(e=l.alternate,e!==null&&Mn(e,l,a,!0),l=ue.current,l!==null){switch(l.tag){case 31:case 13:case 19:return me===null?os():l.alternate===null&&Vt===0&&(Vt=3),l.flags&=-257,l.flags|=65536,l.lanes=a,n===Ri?l.flags|=16384:(e=l.updateQueue,e===null?l.updateQueue=new Set([n]):e.add(n),Ir(t,n,a)),!1;case 22:return l.flags|=65536,n===Ri?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)),Ir(t,n,a)),!1}throw Error(f(435,l.tag))}return Ir(t,n,a),os(),!1}if(ct)return e=ue.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=a,n!==Dc&&(t=Error(f(422),{cause:n}),cu($e(t,l)))):(n!==Dc&&(e=Error(f(423),{cause:n}),cu($e(e,l))),t=t.current.alternate,t.flags|=65536,a&=-a,t.lanes|=a,n=$e(n,l),a=dr(t.stateNode,n,a),Vc(t,a),Vt!==4&&(Vt=2)),!1;var u=Error(f(520),{cause:n});if(u=$e(u,l),zu===null?zu=[u]:zu.push(u),Vt!==4&&(Vt=2),e===null)return!0;n=$e(n,l),l=e;do{switch(l.tag){case 3:return l.flags|=65536,t=a&-a,l.lanes|=t,t=dr(l.stateNode,n,t),Vc(l,t),!1;case 1:if(e=l.type,u=l.stateNode,(l.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(on===null||!on.has(u))))return l.flags|=65536,a&=-a,l.lanes|=a,a=vh(a),yh(a,t,l,n),Vc(l,a),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var hr=Error(f(461)),Xt=!1;function Jt(t,e,l,n){e.child=t===null?jd(e,null,l,n):qn(e,t.child,l,n)}function xh(t,e,l,n,a){l=l.render;var u=e.ref;if("ref"in n){var c={};for(var h in n)h!=="ref"&&(c[h]=n[h])}else c=n;return wn(e),n=Jc(t,e,l,c,u,a),h=Ic(),t!==null&&!Xt?(Fc(t,e,a),wl(t,e,a)):(ct&&h&&ji(e),e.flags|=1,Jt(t,e,n,a),e.child)}function bh(t,e,l,n,a){if(t===null){var u=l.type;return typeof u=="function"&&!Oc(u)&&u.defaultProps===void 0&&l.compare===null?(e.tag=15,e.type=u,Sh(t,e,u,n,a)):(t=bi(l.type,null,n,e,e.mode,a),t.ref=e.ref,t.return=e,e.child=t)}if(u=t.child,!Sr(t,a)){var c=u.memoizedProps;if(l=l.compare,l=l!==null?l:uu,l(c,n)&&t.ref===e.ref)return wl(t,e,a)}return e.flags|=1,t=Ol(u,n),t.ref=e.ref,t.return=e,e.child=t}function Sh(t,e,l,n,a){if(t!==null){var u=t.memoizedProps;if(uu(u,n)&&t.ref===e.ref)if(Xt=!1,e.pendingProps=n=u,Sr(t,a))(t.flags&131072)!==0&&(Xt=!0);else return e.lanes=t.lanes,wl(t,e,a)}return mr(t,e,l,n,a)}function jh(t,e,l,n){var a=n.children,u=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(u=u!==null?u.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&~u}else n=0,e.child=null;return _h(t,e,u,l,n)}if((l&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&zi(e,u!==null?u.cachePool:null),u!==null?Ed(e,u):$c(),Nd(e);else return n=e.lanes=536870912,_h(t,e,u!==null?u.baseLanes|l:l,l,n)}else u!==null?(zi(e,u.cachePool),Ed(e,u),an(),e.memoizedState=null):(t!==null&&zi(e,null),$c(),an());return Jt(t,e,a,l),e.child}function bu(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function _h(t,e,l,n,a){var u=kc();return u=u===null?null:{parent:$t._currentValue,pool:u},e.memoizedState={baseLanes:l,cachePool:u},t!==null&&zi(e,null),$c(),Nd(e),t!==null&&Mn(t,e,n,!0),e.childLanes=a,null}function $i(t,e){return e=Qi({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function Th(t,e,l){return qn(e,t.child,null,l),t=$i(e,e.pendingProps),t.flags|=2,De(e),e.memoizedState=null,t}function wv(t,e,l){var n=e.pendingProps,a=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(ct){if(n.mode==="hidden")return t=$i(e,n),e.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},bu(null,t);if(Xc(e),(t=Dt)?(t=Im(t,Ze),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Kl!==null?{id:ol,overflow:fl}:null,retryLane:536870912,hydrationErrors:null},l=sd(t),l.return=e,e.child=l,Pt=e,Dt=null)):t=null,t===null)throw Il(e);return e.lanes=536870912,null}return $i(e,n)}var u=t.memoizedState;if(u!==null){var c=u.dehydrated;if(Xc(e),a)if(e.flags&256)e.flags&=-257,e=Th(t,e,l);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(f(558));else if(Xt||Mn(t,e,l,!1),a=(l&t.childLanes)!==0,Xt||a){if(ln.current===null){if(n=Ct,n!==null&&(c=of(n,l),c!==0&&c!==u.retryLane))throw u.retryLane=c,Rn(t,c),Ee(n,t,c),hr;os()}e=Th(t,e,l)}else t=u.treeContext,Dt=Je(c.nextSibling),Pt=e,ct=!0,Jl=null,Ze=!1,t!==null&&od(e,t),e=$i(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 ba(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(f(284));(t===null||t.ref!==l)&&(e.flags|=4194816)}}function mr(t,e,l,n,a){return wn(e),l=Jc(t,e,l,n,void 0,a),n=Ic(),t!==null&&!Xt?(Fc(t,e,a),wl(t,e,a)):(ct&&n&&ji(e),e.flags|=1,Jt(t,e,l,a),e.child)}function Eh(t,e,l,n,a,u){return wn(e),e.updateQueue=null,l=Od(e,n,l,a),zd(t),n=Ic(),t!==null&&!Xt?(Fc(t,e,u),wl(t,e,u)):(ct&&n&&ji(e),e.flags|=1,Jt(t,e,l,u),e.child)}function Nh(t,e,l,n,a){if(wn(e),e.stateNode===null){var u=oa,c=l.contextType;typeof c=="object"&&c!==null&&(u=ae(c)),u=new l(n,u),e.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=fr,e.stateNode=u,u._reactInternals=e,u=e.stateNode,u.props=n,u.state=e.memoizedState,u.refs={},Lc(e),c=l.contextType,u.context=typeof c=="object"&&c!==null?ae(c):oa,u.state=e.memoizedState,c=l.getDerivedStateFromProps,typeof c=="function"&&(or(e,l,c,n),u.state=e.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(c=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),c!==u.state&&fr.enqueueReplaceState(u,u.state,null),pu(e,n,u,a),mu(),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308),n=!0}else if(t===null){u=e.stateNode;var h=e.memoizedProps,g=Yn(l,h);u.props=g;var T=u.context,C=l.contextType;c=oa,typeof C=="object"&&C!==null&&(c=ae(C));var M=l.getDerivedStateFromProps;C=typeof M=="function"||typeof u.getSnapshotBeforeUpdate=="function",h=e.pendingProps!==h,C||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(h||T!==c)&&dh(e,u,n,c),Pl=!1;var j=e.memoizedState;u.state=j,pu(e,n,u,a),mu(),T=e.memoizedState,h||j!==T||Pl?(typeof M=="function"&&(or(e,l,M,n),T=e.memoizedState),(g=Pl||fh(e,l,g,n,j,T,c))?(C||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(e.flags|=4194308)):(typeof u.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=T),u.props=n,u.state=T,u.context=c,n=g):(typeof u.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{u=e.stateNode,Yc(t,e),c=e.memoizedProps,C=Yn(l,c),u.props=C,M=e.pendingProps,j=u.context,T=l.contextType,g=oa,typeof T=="object"&&T!==null&&(g=ae(T)),h=l.getDerivedStateFromProps,(T=typeof h=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(c!==M||j!==g)&&dh(e,u,n,g),Pl=!1,j=e.memoizedState,u.state=j,pu(e,n,u,a),mu();var O=e.memoizedState;c!==M||j!==O||Pl||t!==null&&t.dependencies!==null&&Ei(t.dependencies)?(typeof h=="function"&&(or(e,l,h,n),O=e.memoizedState),(C=Pl||fh(e,l,C,n,j,O,g)||t!==null&&t.dependencies!==null&&Ei(t.dependencies))?(T||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(n,O,g),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(n,O,g)),typeof u.componentDidUpdate=="function"&&(e.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof u.componentDidUpdate!="function"||c===t.memoizedProps&&j===t.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||c===t.memoizedProps&&j===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=O),u.props=n,u.state=O,u.context=g,n=C):(typeof u.componentDidUpdate!="function"||c===t.memoizedProps&&j===t.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||c===t.memoizedProps&&j===t.memoizedState||(e.flags|=1024),n=!1)}return u=n,ba(t,e),n=(e.flags&128)!==0,u||n?(u=e.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:u.render(),e.flags|=1,t!==null&&n?(e.child=qn(e,t.child,null,a),e.child=qn(e,null,l,a)):Jt(t,e,l,a),e.memoizedState=u.state,t=e.child):t=wl(t,e,a),t}function zh(t,e,l,n){return An(),e.flags|=256,Jt(t,e,l,n),e.child}var pr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gr(t){return{baseLanes:t,cachePool:gd()}}function vr(t,e,l){return t=t!==null?t.childLanes&~l:0,e&&(t|=Ue),t}function Oh(t,e,l){var n=e.pendingProps,a=!1,u=(e.flags&128)!==0,c;if((c=u)||(c=t!==null&&t.memoizedState===null?!1:(ie.current&2)!==0),c&&(a=!0,e.flags&=-129),c=(e.flags&32)!==0,e.flags&=-33,t===null){if(ct){if(a?nn(e):an(),(t=Dt)?(t=Im(t,Ze),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Kl!==null?{id:ol,overflow:fl}:null,retryLane:536870912,hydrationErrors:null},l=sd(t),l.return=e,e.child=l,Pt=e,Dt=null)):t=null,t===null)throw Il(e);return vo(t)?e.lanes=32:e.lanes=536870912,null}return u=n.children,n=n.fallback,a?(an(),a=e.mode,u=Qi({mode:"hidden",children:u},a),n=Cn(n,a,l,null),u.return=e,n.return=e,u.sibling=n,e.child=u,n=e.child,n.memoizedState=gr(l),n.childLanes=vr(t,c,l),e.memoizedState=pr,bu(null,n)):(nn(e),yr(e,u))}var h=t.memoizedState;if(h!==null){var g=h.dehydrated;if(g!==null)return Uv(t,e,u,c,n,g,h,l)}return a?(an(),a=n.fallback,u=e.mode,h=t.child,g=h.sibling,n=Ol(h,{mode:"hidden",children:n.children}),n.subtreeFlags=h.subtreeFlags&1206910976,g!==null?a=Ol(g,a):(a=Cn(a,u,l,null),a.flags|=2),a.return=e,n.return=e,n.sibling=a,e.child=n,bu(null,n),n=e.child,a=t.child.memoizedState,a===null?a=gr(l):(u=a.cachePool,u!==null?(h=$t._currentValue,u=u.parent!==h?{parent:h,pool:h}:u):u=gd(),a={baseLanes:a.baseLanes|l,cachePool:u}),n.memoizedState=a,n.childLanes=vr(t,c,l),e.memoizedState=pr,bu(t.child,n)):(nn(e),l=t.child,t=l.sibling,l=Ol(l,{mode:"visible",children:n.children}),l.return=e,l.sibling=null,t!==null&&(c=e.deletions,c===null?(e.deletions=[t],e.flags|=16):c.push(t)),e.child=l,e.memoizedState=null,l)}function yr(t,e){return e=Qi({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function Qi(t,e){return t=Se(22,t,null,e),t.lanes=0,t}function Xi(t,e,l){return qn(e,t.child,null,l),t=yr(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Uv(t,e,l,n,a,u,c,h){if(l)return e.flags&256?(nn(e),e.flags&=-257,Xi(t,e,h)):e.memoizedState!==null?(an(),e.child=t.child,e.flags|=128,null):(an(),u=a.fallback,c=e.mode,a=Qi({mode:"visible",children:a.children},c),u=Cn(u,c,h,null),u.flags|=2,a.return=e,u.return=e,a.sibling=u,e.child=a,qn(e,t.child,null,h),a=e.child,a.memoizedState=gr(h),a.childLanes=vr(t,n,h),e.memoizedState=pr,bu(null,a));if(nn(e),vo(u)){if(n=u.nextSibling&&u.nextSibling.dataset,n)var g=n.dgst;return n=g,n!==""&&(a=Error(f(419)),a.stack="",a.digest=n,cu({value:a,source:null,stack:null})),Xi(t,e,h)}if(Xt||Mn(t,e,h,!1),n=(h&t.childLanes)!==0,Xt||n){if(ln.current!==null)return Xi(t,e,h);if(n=Ct,n!==null&&(a=of(n,h),a!==0&&a!==c.retryLane))throw c.retryLane=a,Rn(t,a),Ee(n,t,a),hr;return go(u)||os(),Xi(t,e,h)}return go(u)?(e.flags|=192,e.child=t.child,null):(t=c.treeContext,Dt=Je(u.nextSibling),Pt=e,ct=!0,Jl=null,Ze=!1,t!==null&&od(e,t),e=yr(e,a.children),e.flags|=134221824,e)}function Rh(t,e,l){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Ti(t.return,e,l)}function Ch(t){for(var e=null;t!==null;){var l=t.alternate;l!==null&&Mi(l)===null&&(e=t),t=t.sibling}return e}function Zi(t,e,l,n,a,u){var c=t.memoizedState;c===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:a,treeForkCount:u}:(c.isBackwards=e,c.rendering=null,c.renderingStartTime=0,c.last=n,c.tail=l,c.tailMode=a,c.treeForkCount=u)}function xr(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 br(t,e,l){var n=e.pendingProps,a=n.revealOrder,u=n.tail;n=n.children;var c=ie.current;if(e.flags&128)return gu(e,c),null;var h=(c&2)!==0;if(h?(c=c&1|2,e.flags|=128):c&=1,gu(e,c),a==="backwards"&&t!==null?(xr(t),Jt(t,e,n,l),xr(t)):Jt(t,e,n,l),n=ct?su:0,!h&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Rh(t,l,e);else if(t.tag===19)Rh(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=Ch(e.child),l===null?(a=e.child,e.child=null):(a=l.sibling,l.sibling=null,xr(e)),Zi(e,!0,a,null,u,n);break;case"unstable_legacy-backwards":for(l=null,a=e.child,e.child=null;a!==null;){if(t=a.alternate,t!==null&&Mi(t)===null){e.child=a;break}t=a.sibling,a.sibling=l,l=a,a=t}Zi(e,!0,l,null,u,n);break;case"together":Zi(e,!1,null,null,void 0,n);break;case"independent":e.memoizedState=null;break;default:l=Ch(e.child),l===null?(a=e.child,e.child=null):(a=l.sibling,l.sibling=null),Zi(e,!1,a,l,u,n)}return e.child}function Ah(t,e,l){var n=e.pendingProps;return Fl(e,e.type,n.value),Jt(t,e,n.children,l),e.child}function wl(t,e,l){if(t!==null&&(e.dependencies=t.dependencies),rn|=e.lanes,(l&e.childLanes)===0)if(t!==null){if(Mn(t,e,l,!1),(l&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(f(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 Sr(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&Ei(t)))}function Hv(t,e,l){switch(e.tag){case 3:Wu(e,e.stateNode.containerInfo),Fl(e,$t,t.memoizedState.cache),An();break;case 27:case 5:Ks(e);break;case 4:Wu(e,e.stateNode.containerInfo);break;case 10:Fl(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,Xc(e),null;break;case 13:var n=e.memoizedState;if(n!==null){if(n.dehydrated!==null)return nn(e),e.flags|=128,null;n=Mn(t,e,l,!1);var a=e.child.childLanes;return n||(l&a)!==0?Oh(t,e,l):(nn(e),t=wl(t,e,l),t!==null?t.sibling:null)}nn(e);break;case 19:if(e.flags&128)return br(t,e,l);if(a=(t.flags&128)!==0,n=(l&e.childLanes)!==0,n||(Mn(t,e,l,!1),n=(l&e.childLanes)!==0),a){if(n)return br(t,e,l);e.flags|=128}if(a=e.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),gu(e,ie.current),n)break;return null;case 22:return e.lanes=0,jh(t,e,l,e.pendingProps);case 24:Fl(e,$t,t.memoizedState.cache)}return wl(t,e,l)}function Dh(t,e,l){if(t!==null)if(t.memoizedProps!==e.pendingProps)Xt=!0;else{if(!Sr(t,l)&&(e.flags&128)===0)return Xt=!1,Hv(t,e,l);Xt=(t.flags&131072)!==0}else Xt=!1,ct&&(e.flags&1048576)!==0&&rd(e,su,e.index);switch(e.lanes=0,e.tag){case 16:t:{var n=e.pendingProps;if(t=Bn(e.elementType),e.type=t,typeof t=="function")Oc(t)?(n=Yn(t,n),e.tag=1,e=Nh(null,e,t,n,l)):(e.tag=0,e=mr(null,e,t,n,l));else{if(t!=null){var a=t.$$typeof;if(a===Y){e.tag=11,e=xh(null,e,t,n,l);break t}else if(a===Rt){e.tag=14,e=bh(null,e,t,n,l);break t}else if(a===Ft){e.tag=10,e.type=t,e=Ah(null,e,l);break t}}throw e=vt(t)||t,Error(f(306,e,""))}}return e;case 0:return mr(t,e,e.type,e.pendingProps,l);case 1:return n=e.type,a=Yn(n,e.pendingProps),Nh(t,e,n,a,l);case 3:t:{if(Wu(e,e.stateNode.containerInfo),t===null)throw Error(f(387));n=e.pendingProps;var u=e.memoizedState;a=u.element,Yc(t,e),pu(e,n,null,l);var c=e.memoizedState;if(n=c.cache,Fl(e,$t,n),n!==u.cache&&Uc(e,[$t],l,!0),mu(),n=c.element,u.isDehydrated)if(u={element:n,isDehydrated:!1,cache:c.cache},e.updateQueue.baseState=u,e.memoizedState=u,e.flags&256){e=zh(t,e,n,l);break t}else if(n!==a){a=$e(Error(f(424)),e),cu(a),e=zh(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(Dt=Je(t.firstChild),Pt=e,ct=!0,Jl=null,Ze=!0,l=jd(e,null,n,l),e.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(An(),n===a){e=wl(t,e,l);break t}Jt(t,e,n,l)}e=e.child}return e;case 26:return ba(t,e),t===null?(l=n0(e.type,null,e.pendingProps,null))?e.memoizedState=l:ct||(e.stateNode=Hm(e.type,e.pendingProps,Gl.current,e)):e.memoizedState=n0(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return Ks(e),t===null&&ct&&(n=e.stateNode=Pm(e.type,e.pendingProps,Gl.current),Pt=e,Ze=!0,a=Dt,hn(e.type)?(yo=a,Dt=Je(n.firstChild)):Dt=a),Jt(t,e,e.pendingProps.children,l),ba(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&ct&&((a=n=Dt)&&(n=Cy(n,e.type,e.pendingProps,Ze),n!==null?(e.stateNode=n,Pt=e,Dt=Je(n.firstChild),Ze=!1,a=!0):a=!1),a||Il(e)),Ks(e),a=e.type,u=e.pendingProps,c=t!==null?t.memoizedProps:null,n=u.children,co(a,u)?n=null:c!==null&&co(a,c)&&(e.flags|=32),e.memoizedState!==null&&(a=Jc(t,e,Ev,null,null,l),ka._currentValue=a),ba(t,e),Jt(t,e,n,l),e.child;case 6:return t===null&&ct&&((t=l=Dt)&&(l=Ay(l,e.pendingProps,Ze),l!==null?(e.stateNode=l,Pt=e,Dt=null,t=!0):t=!1),t||Il(e)),null;case 13:return Oh(t,e,l);case 4:return Wu(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=qn(e,null,n,l):Jt(t,e,n,l),e.child;case 11:return xh(t,e,e.type,e.pendingProps,l);case 7:return n=e.pendingProps,ba(t,e),Jt(t,e,n,l),e.child;case 8:return Jt(t,e,e.pendingProps.children,l),e.child;case 12:return Jt(t,e,e.pendingProps.children,l),e.child;case 10:return Ah(t,e,l);case 9:return a=e.type._context,n=e.pendingProps.children,wn(e),a=ae(a),n=n(a),e.flags|=1,Jt(t,e,n,l),e.child;case 14:return bh(t,e,e.type,e.pendingProps,l);case 15:return Sh(t,e,e.type,e.pendingProps,l);case 19:return br(t,e,l);case 31:return wv(t,e,l);case 22:return jh(t,e,l,e.pendingProps);case 24:return wn(e),n=ae($t),t===null?(a=kc(),a===null&&(a=Ct,u=Hc(),a.pooledCache=u,u.refCount++,u!==null&&(a.pooledCacheLanes|=l),a=u),e.memoizedState={parent:n,cache:a},Lc(e),Fl(e,$t,a)):((t.lanes&l)!==0&&(Yc(t,e),pu(e,null,null,l),mu()),a=t.memoizedState,u=e.memoizedState,a.parent!==n?(a={parent:n,cache:n},e.memoizedState=a,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=a),Fl(e,$t,n)):(n=u.cache,Fl(e,$t,n),n!==a.cache&&Uc(e,[$t],l,!0))),Jt(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:ct&&ji(e),t!==null&&t.memoizedProps.name!==n.name?e.flags|=4194816:ba(t,e),Jt(t,e,n.children,l),e.child;case 29:throw e.pendingProps}throw Error(f(156,e.tag))}function Ul(t){t.flags|=4}function jr(t,e,l,n,a){var u;if((u=(t.mode&32)!==0)&&(u=l===null?s0(e,n):s0(e,n)&&(n.src!==l.src||n.srcSet!==l.srcSet)),u){if(t.flags|=16777216,(a&335544128)===a)if(t.stateNode.complete)t.flags|=8192;else if(hm())t.flags|=8192;else throw kn=Ri,qc}else t.flags&=-16777217}function Mh(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!c0(e))if(hm())t.flags|=8192;else throw kn=Ri,qc}function Ki(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?sf():536870912,t.lanes|=e,Ea|=e)}function Su(t,e){if(!ct)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 Mt(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 Bv(t,e,l){var n=e.pendingProps;switch(Ac(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mt(e),null;case 1:return Mt(e),null;case 3:return l=e.stateNode,n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),Al($t),Fn(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(ha(e)?Ul(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Mc())),Mt(e),null;case 26:var a=e.type,u=e.memoizedState;return t===null?(Ul(e),u!==null?(Mt(e),Mh(e,u)):(Mt(e),jr(e,a,null,n,l))):u?u!==t.memoizedState?(Ul(e),Mt(e),Mh(e,u)):(Mt(e),e.flags&=-16777217):(t=t.memoizedProps,t!==n&&Ul(e),Mt(e),jr(e,a,t,n,l)),null;case 27:if(Pu(e),l=Gl.current,a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&Ul(e);else{if(!n){if(e.stateNode===null)throw Error(f(166));return Mt(e),e.subtreeFlags&=-33554433,null}t=cl.current,ha(e)?fd(e):(t=Pm(a,n,l),e.stateNode=t,Ul(e))}return Mt(e),e.subtreeFlags&=-33554433,null;case 5:if(Pu(e),a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&Ul(e);else{if(!n){if(e.stateNode===null)throw Error(f(166));return Mt(e),e.subtreeFlags&=-33554433,null}if(u=cl.current,ha(e))fd(e);else{var c=Du(Gl.current);switch(u){case 1:u=c.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:u=c.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":u=c.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":u=c.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":u=c.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof n.is=="string"?c.createElement("select",{is:n.is}):c.createElement("select"),n.multiple?u.multiple=!0:n.size&&(u.size=n.size);break;default:u=typeof n.is=="string"?c.createElement(a,{is:n.is}):c.createElement(a)}}u[ne]=e,u[be]=n;t:for(c=e.child;c!==null;){if(c.tag===5||c.tag===6)u.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break t;for(;c.sibling===null;){if(c.return===null||c.return===e)break t;c=c.return}c.sibling.return=c.return,c=c.sibling}e.stateNode=u;t:switch(ce(u,a,n),a){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break t;case"img":n=!0;break t;default:n=!1}n&&Ul(e)}}return Mt(e),e.subtreeFlags&=-33554433,jr(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,l),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==n&&Ul(e);else{if(typeof n!="string"&&e.stateNode===null)throw Error(f(166));if(t=Gl.current,ha(e)){if(t=e.stateNode,l=e.memoizedProps,n=null,a=Pt,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}t[ne]=e,t=!!(t.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||Dm(t.nodeValue,l)),t||Il(e,!0)}else t=Du(t).createTextNode(n),t[ne]=e,e.stateNode=t}return Mt(e),null;case 31:if(l=e.memoizedState,t===null||t.memoizedState!==null){if(n=ha(e),l!==null){if(t===null){if(!n)throw Error(f(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(f(557));t[ne]=e}else An(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Mt(e),t=!1}else l=Mc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return e.flags&256?(De(e),e):(De(e),null);if((e.flags&128)!==0)throw Error(f(558))}return Mt(e),null;case 13:if(n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=ha(e),n!==null&&n.dehydrated!==null){if(t===null){if(!a)throw Error(f(318));if(a=e.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(f(317));a[ne]=e}else An(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Mt(e),a=!1}else a=Mc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return e.flags&256?(De(e),e):(De(e),null)}return De(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),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==a&&(n.flags|=2048)),l!==t&&l&&(e.child.flags|=8192),Ki(e,e.updateQueue),Mt(e),null);case 4:return Fn(),t===null&&no(e.stateNode.containerInfo),e.flags|=67108864,Mt(e),null;case 10:return Al(e.type),Mt(e),null;case 19:if(Zc(e),n=e.memoizedState,n===null)return Mt(e),null;if(a=(e.flags&128)!==0,u=n.rendering,u===null)if(a)Su(n,!1);else{if(Vt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(u=Mi(t),u!==null){for(e.flags|=128,Su(n,!1),t=u.updateQueue,e.updateQueue=t,Ki(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)id(l,t),l=l.sibling;return gu(e,ie.current&1|2),ct&&Rl(e,n.treeForkCount),e.child}t=t.sibling}n.tail!==null&&ze()>is&&(e.flags|=128,a=!0,Su(n,!1),e.lanes=4194304)}else{if(!a)if(t=Mi(u),t!==null){if(e.flags|=128,a=!0,t=t.updateQueue,e.updateQueue=t,Ki(e,t),Su(n,!0),n.tail===null&&n.tailMode!=="collapsed"&&n.tailMode!=="visible"&&!u.alternate&&!ct)return Mt(e),null}else 2*ze()-n.renderingStartTime>is&&l!==536870912&&(e.flags|=128,a=!0,Su(n,!1),e.lanes=4194304);n.isBackwards?(u.sibling=e.child,e.child=u):(t=n.last,t!==null?t.sibling=u:e.child=u,n.last=u)}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=ze(),t.sibling=null,u=ie.current,u=a?u&1|2:u&1,n.tailMode==="visible"||n.tailMode==="collapsed"||!l||ct?gu(e,u):(l=u,At(ue,e),At(ie,l),me===null&&(me=e)),ct&&Rl(e,n.treeForkCount),t}return Mt(e),null;case 22:case 23:return De(e),Qc(),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&&(Mt(e),e.subtreeFlags&6&&(e.flags|=8192)):Mt(e),l=e.updateQueue,l!==null&&Ki(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&&le(Hn),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),Al($t),Mt(e),null;case 25:return null;case 30:return e.flags|=33554432,Mt(e),null}throw Error(f(156,e.tag))}function kv(t,e){switch(Ac(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Al($t),Fn(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Pu(e),null;case 31:if(e.memoizedState!==null){if(De(e),e.alternate===null)throw Error(f(340));An()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(De(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(f(340));An()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Zc(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 Fn(),null;case 10:return Al(e.type),null;case 22:case 23:return De(e),Qc(),t!==null&&le(Hn),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Al($t),null;case 25:return null;default:return null}}function wh(t,e){switch(Ac(e),e.tag){case 3:Al($t),Fn();break;case 26:case 27:case 5:Pu(e);break;case 4:Fn();break;case 31:e.memoizedState!==null&&De(e);break;case 13:De(e);break;case 19:Zc(e);break;case 10:Al(e.type);break;case 22:case 23:De(e),Qc(),t!==null&&le(Hn);break;case 24:Al($t)}}function ju(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 u=l.create,c=l.inst;n=u(),c.destroy=n}l=l.next}while(l!==a)}}catch(h){Nt(e,e.return,h)}}function un(t,e,l){try{var n=e.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var u=a.next;n=u;do{if((n.tag&t)===t){var c=n.inst,h=c.destroy;if(h!==void 0){c.destroy=void 0,a=e;var g=l,T=h;try{T()}catch(C){Nt(a,g,C)}}}n=n.next}while(n!==u)}}catch(C){Nt(e,e.return,C)}}function Uh(t){var e=t.updateQueue;if(e!==null){var l=t.stateNode;try{Td(e,l)}catch(n){Nt(t,t.return,n)}}}function Hh(t,e,l){l.props=Yn(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(n){Nt(t,e,n)}}function dl(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,u=Nl(t.memoizedProps,a);(a.ref===null||a.ref.name!==u)&&(a.ref=Gm(u)),n=a.ref;break;case 7:if(t.stateNode===null){var c=new Be(t);v(t.child,!1,Oy,c,void 0,void 0),t.stateNode=c}n=t.stateNode;break;default:n=t.stateNode}typeof l=="function"?t.refCleanup=l(n):l.current=n}}catch(h){Nt(t,e,h)}}function se(t,e){var l=t.ref,n=t.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(a){Nt(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){Nt(t,e,a)}else l.current=null}function Ji(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++)Jm(t.stateNode,e[l])}function Bh(t){for(var e=t.return;e!==null&&(Tr(e)&&Jm(t.stateNode,e.stateNode),!_r(e));)e=e.return}function _u(t){for(var e=t.return;e!==null&&(Tr(e)&&Ry(t.stateNode,e.stateNode),!_r(e));)e=e.return}function _r(t){return t.tag===5||t.tag===3||t.tag===27}function Tr(t){return t&&t.tag===7&&t.stateNode!==null}function Er(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){Nt(t,t.return,a)}}function Nr(t,e,l){try{var n=t.stateNode;oy(n,t.type,l,e),n[be]=e}catch(a){Nt(t,t.return,a)}}function kh(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&hn(t.type)||t.tag===4}function zr(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||kh(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&&hn(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 Or(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=rl)),Ji(t,n),yt=!0;else if(a!==4&&(a===27&&(Ji(t,n),n=null,hn(t.type)&&(l=t.stateNode,e=null)),t=t.child,t!==null))for(Or(t,e,l,n),t=t.sibling;t!==null;)Or(t,e,l,n),t=t.sibling}function Ii(t,e,l,n){var a=t.tag;if(a===5||a===6)a=t.stateNode,e?l.insertBefore(a,e):l.appendChild(a),Ji(t,n),yt=!0;else if(a!==4&&(a===27&&(Ji(t,n),n=null,hn(t.type)&&(l=t.stateNode)),t=t.child,t!==null))for(Ii(t,e,l,n),t=t.sibling;t!==null;)Ii(t,e,l,n),t=t.sibling}function qh(t){var e=t.stateNode,l=t.memoizedProps;try{for(var n=t.type,a=e.attributes;a.length;)e.removeAttributeNode(a[0]);ce(e,n,l),e[ne]=t,e[be]=l}catch(u){Nt(t,t.return,u)}}var Fi=!1,Me=null;function Lh(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(Fi=!0)}var hl=null;function Yh(){var t=hl;return hl=null,t}var je=0;function Sa(t,e,l,n,a){return je=0,Vh(t.child,e,l,n,a)}function Vh(t,e,l,n,a){for(var u=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(n!==null){var h=fo(c);n.push(h),h.view&&(u=!0)}else u||fo(c).view&&(u=!0);Fi=!0,Ym(c,je===0?e:e+"_"+je,l),je++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&a||Vh(t.child,e,l,n,a)&&(u=!0));t=t.sibling}return u}function ml(t,e){for(;t!==null;)t.tag===5?Vm(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&e||ml(t.child,e)),t=t.sibling}function Wi(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(Wi(t),t.tag===30&&(t.flags&18874368)!==0&&t.stateNode.paired)){var e=t.memoizedProps;if(e.name==null||e.name==="auto")throw Error(f(544));var l=e.name;e=zl(e.default,e.share),e!=="none"&&(Sa(t,l,e,null,!1)||ml(t.child,!1))}t=t.sibling}}function Rr(t,e){if(t.tag===30){var l=t.stateNode,n=t.memoizedProps,a=Nl(n,l),u=zl(n.default,l.paired?n.share:n.enter);u!=="none"?Sa(t,a,u,null,!1)?(Wi(t),l.paired||e||Ra(t,n.onEnter)):ml(t.child,!1):Wi(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Rr(t,e),t=t.sibling;else Wi(t)}function Cr(t){if(Me!==null&&Me.size!==0){var e=Me;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 u=zl(l.default,l.share);if(u!=="none"&&(Sa(t,n,u,null,!1)?(u=t.stateNode,a.paired=u,u.paired=a,Ra(t,l.onShare)):ml(t.child,!1)),e.delete(n),e.size===0)break}}}Cr(t)}t=t.sibling}}}function Ar(t){if(t.tag===30){var e=t.memoizedProps,l=Nl(e,t.stateNode),n=Me!==null?Me.get(l):void 0,a=zl(e.default,n!==void 0?e.share:e.exit);a!=="none"&&(Sa(t,l,a,null,!1)?n!==void 0?(a=t.stateNode,n.paired=a,a.paired=n,Me.delete(l),Ra(t,e.onShare)):Ra(t,e.onExit):ml(t.child,!1)),Me!==null&&Cr(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Ar(t),t=t.sibling;else Me!==null&&Cr(t)}function Gh(t){for(t=t.child;t!==null;){if(t.tag===30){var e=t.memoizedProps,l=Nl(e,t.stateNode);e=zl(e.default,e.update),t.flags&=-5,e!=="none"&&Sa(t,l,e,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&Gh(t);t=t.sibling}}function Dr(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,ml(t.child,!1))}Dr(t)}t=t.sibling}}function Pi(t){if(t.tag===30)t.stateNode.paired=null,ml(t.child,!1),Dr(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Pi(t),t=t.sibling;else Dr(t)}function $h(t){for(t=t.child;t!==null;)t.tag===30?ml(t.child,!1):(t.subtreeFlags&33554432)!==0&&$h(t),t=t.sibling}function Mr(t,e,l,n,a,u,c){for(var h=!1;e!==null;){if(e.tag===5){var g=e.stateNode;if(u!==null&&je<u.length){var T=u[je],C=fo(g);(T.view||C.view)&&(h=!0);var M;if(M=(t.flags&4)===0)if(C.clip)M=!0;else{M=T.rect;var j=C.rect;M=M.y!==j.y||M.x!==j.x||M.height!==j.height||M.width!==j.width}M&&(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&&Ym(g,je===0?l:l+"_"+je,a),h&&(t.flags&4)!==0||(hl===null&&(hl=[]),hl.push(g,je===0?n:n+"_"+je,e.memoizedProps)),je++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&c?t.flags|=e.flags&32:Mr(t,e.child,l,n,a,u,c)&&(h=!0));e=e.sibling}return h}function Qh(t,e){for(t=t.child;t!==null;){if(t.tag===30){var l=t.memoizedProps,n=t.stateNode,a=Nl(l,n),u=zl(l.default,l.update),c;c=t.memoizedState,t.memoizedState=null,n=t;var h=t.child;je=0,a=Mr(n,h,a,a,u,c,!1),(t.flags&4)!==0&&a&&Ra(t,l.onUpdate)}else(t.subtreeFlags&33554432)!==0&&Qh(t);t=t.sibling}}var te=!1,_t=!1,pl=!1,wr=!1,Xh=typeof WeakSet=="function"?WeakSet:Set,ee=null,gl=!1,Tu=!1,ts=!1,Ur=!1;function qv(t,e,l){if(t=t.containerInfo,io=qa,t=If(t),Sc(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 u=a.anchorOffset,c=a.focusNode;a=a.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break t}var h=0,g=-1,T=-1,C=0,M=0,j=t,O=null;e:for(;;){for(var L;j!==n||u!==0&&j.nodeType!==3||(g=h+u),j!==c||a!==0&&j.nodeType!==3||(T=h+a),j.nodeType===3&&(h+=j.nodeValue.length),(L=j.firstChild)!==null;)O=j,j=L;for(;;){if(j===t)break e;if(O===n&&++C===u&&(g=h),O===c&&++M===a&&(T=h),(L=j.nextSibling)!==null)break;j=O,O=j.parentNode}j=L}n=g===-1||T===-1?null:{start:g,end:T}}else n=null}n=n||{start:0,end:0}}else n=null;for(so={focusedElem:t,selectionRange:n},qa=!1,l=(l&335544064)===l,ee=e,e=l?9270:1024;ee!==null;){if(t=ee,l&&(n=t.deletions,n!==null))for(u=0;u<n.length;u++)l&&Ar(n[u]);if(t.alternate===null&&(t.flags&2)!==0)l&&Lh(t),es(l);else{if(t.tag===22){if(n=t.alternate,t.memoizedState!==null){n!==null&&n.memoizedState===null&&l&&Ar(n),es(l);continue}else if(n!==null&&n.memoizedState!==null){l&&Lh(t),es(l);continue}}n=t.child,(t.subtreeFlags&e)!==0&&n!==null?(n.return=t,ee=n):(l&&Gh(t),es(l))}}Me=null}function es(t){for(;ee!==null;){var e=ee,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 u=e.stateNode;try{var c=Yn(e.type,a);l=u.getSnapshotBeforeUpdate(c,n),u.__reactInternalSnapshotBeforeUpdate=l}catch(h){Nt(e,e.return,h)}}break;case 3:if((a&1024)!==0){if(n=e.stateNode.containerInfo,l=n.nodeType,l===9)po(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":po(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=Nl(n.memoizedProps,n.stateNode),a=e.memoizedProps,a=zl(a.default,a.update),a!=="none"&&Sa(n,l,a,n.memoizedState=[],!0));break;default:if((a&1024)!==0)throw Error(f(163))}if(n=e.sibling,n!==null){n.return=e.return,ee=n;break}ee=e.return}}function Zh(t,e,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:vl(t,l),n&4&&ju(5,l);break;case 1:if(vl(t,l),n&4)if(t=l.stateNode,e===null)try{t.componentDidMount()}catch(c){Nt(l,l.return,c)}else{var a=Yn(l.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(a,e,t.__reactInternalSnapshotBeforeUpdate)}catch(c){Nt(l,l.return,c)}}n&64&&Uh(l),n&512&&dl(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{Td(t,e)}catch(c){Nt(l,l.return,c)}}break;case 27:e===null&&n&4&&qh(l);case 26:case 5:vl(t,l),e===null&&n&4&&Er(l),n&512&&dl(l,l.return);break;case 12:vl(t,l);break;case 31:vl(t,l),n&4&&Fh(t,l);break;case 13:vl(t,l),n&4&&Wh(t,l),n&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=Fv.bind(null,l),Dy(t,l))));break;case 22:if(n=l.memoizedState!==null||te,!n){var u=e!==null&&e.memoizedState!==null||_t;e=te,a=_t,te=n,(_t=u)&&!a?(n=2,(l.subtreeFlags&8772)!==0&&(n|=1),el(t,l,n)):vl(t,l),te=e,_t=a}break;case 30:vl(t,l),n&512&&dl(l,l.return);break;case 7:n&512&&dl(l,l.return);default:vl(t,l)}}function Hr(t,e){for(t=t.child;t!==null;)Kh(t,e),t=t.sibling}function Kh(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,u=t.memoizedProps.style,c=u!=null&&u.hasOwnProperty("display")?u.display:null;a.style.display=c==null||typeof c=="boolean"?"":(""+c).trim()}}catch(g){Nt(t,t.return,g)}Br(t,e);break;case 6:try{t.stateNode.nodeValue=e?"":t.memoizedProps,yt=!0}catch(g){Nt(t,t.return,g)}break;case 18:try{var h=t.stateNode;e?Lm(h,!0):Lm(t.stateNode,!1)}catch(g){Nt(t,t.return,g)}break;case 22:case 23:t.memoizedState===null&&Hr(t,e);break;default:Hr(t,e)}}function Br(t,e){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){t:{var l=t,n=e;switch(l.tag){case 4:Kh(l,n);break t;case 22:l.memoizedState===null&&Br(l,n);break t;default:Br(l,n)}}t=t.sibling}}function Jh(t){var e=t.alternate;e!==null&&(t.alternate=null,Jh(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&ii(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 Ut=null,_e=!1;function Pe(t,e,l){for(l=l.child;l!==null;)Ih(t,e,l),l=l.sibling}function Ih(t,e,l){if(Oe&&typeof Oe.onCommitFiberUnmount=="function")try{Oe.onCommitFiberUnmount(Za,l)}catch{}switch(l.tag){case 26:_t||se(l,e),Pe(t,e,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!_t&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:_t||se(l,e),_u(l);var n=Ut,a=_e;hn(l.type)&&(Ut=l.stateNode,_e=!1),Pe(t,e,l),t0(l.stateNode,l.type,l.memoizedProps),Ut=n,_e=a;break;case 5:_t||se(l,e),_u(l);case 6:if(l.tag===6&&_u(l),n=Ut,a=_e,Ut=null,Pe(t,e,l),Ut=n,_e=a,Ut!==null)if(_e)try{(Ut.nodeType===9?Ut.body:Ut.nodeName==="HTML"?Ut.ownerDocument.body:Ut).removeChild(l.stateNode),yt=!0}catch(u){Nt(l,e,u)}else try{Ut.removeChild(l.stateNode),yt=!0}catch(u){Nt(l,e,u)}break;case 18:Ut!==null&&(_e?(t=Ut,qm(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),La(t)):qm(Ut,l.stateNode));break;case 4:n=Ut,a=_e,Ut=l.stateNode.containerInfo,_e=!0,Pe(t,e,l),Ut=n,_e=a;break;case 0:case 11:case 14:case 15:un(2,l,e),_t||un(4,l,e),Pe(t,e,l);break;case 1:_t||(se(l,e),n=l.stateNode,typeof n.componentWillUnmount=="function"&&Hh(l,e,n)),Pe(t,e,l);break;case 21:Pe(t,e,l);break;case 22:_t=(n=_t)||l.memoizedState!==null,Pe(t,e,l),_t=n;break;case 30:se(l,e),Pe(t,e,l);break;case 7:_t||se(l,e),Pe(t,e,l);break;default:Pe(t,e,l)}}function Fh(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{La(t)}catch(l){Nt(e,e.return,l)}}}function Wh(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{La(t)}catch(l){Nt(e,e.return,l)}}function Lv(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new Xh),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new Xh),e;default:throw Error(f(435,t.tag))}}function ls(t,e){var l=Lv(t);e.forEach(function(n){if(!l.has(n)){l.add(n);var a=Wv.bind(null,t,n);n.then(a,a)}})}function ve(t,e,l){var n=e.deletions;if(n!==null)for(var a=0;a<n.length;a++){var u=n[a],c=t,h=e,g=h;t:for(;g!==null;){switch(g.tag){case 27:if(hn(g.type)){Ut=g.stateNode,_e=!1;break t}break;case 5:Ut=g.stateNode,_e=!1;break t;case 3:case 4:Ut=g.stateNode.containerInfo,_e=!0;break t}g=g.return}if(Ut===null)throw Error(f(160));Ih(c,h,u),Ut=null,_e=!1,c=u.alternate,c!==null&&(c.return=null),u.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)Ph(e,t,l),e=e.sibling}var tl=null;function Ph(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 u=0;u<n.length;u++){var c=n[u];c.ref.impl=c.nextImpl}ve(e,t,l),ye(t),a&4&&(un(3,t,t.return),ju(3,t),un(5,t,t.return));break;case 1:ve(e,t,l),ye(t),a&512&&(_t||n===null||se(n,n.return)),a&64&&te&&(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(u=tl,ve(e,t,l),ye(t),a&512&&(_t||n===null||se(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(te)t.stateNode=Hm(t.type,t.memoizedProps,e.containerInfo,t);else{t:{e=t.type,l=t.memoizedProps,a=u.ownerDocument||u;e:switch(e){case"title":n=a.getElementsByTagName("title")[0],(!n||n[Ia]||n[ne]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=a.createElement(e),a.head.insertBefore(n,a.querySelector("head > title"))),ce(n,e,l),n[ne]=t,Wt(n),e=n;break t;case"link":if(u=i0("link","href",a).get(e+(l.href||""))){for(c=0;c<u.length;c++)if(n=u[c],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)){u.splice(c,1);break e}}n=a.createElement(e),ce(n,e,l),a.head.appendChild(n);break;case"meta":if(u=i0("meta","content",a).get(e+(l.content||""))){for(c=0;c<u.length;c++)if(n=u[c],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)){u.splice(c,1);break e}}n=a.createElement(e),ce(n,e,l),a.head.appendChild(n);break;default:throw Error(f(468,e))}n[ne]=t,Wt(n),e=n}t.stateNode=e}else te||jo(u,t.type,t.stateNode);else t.stateNode=u0(u,l,t.memoizedProps);else a!==l?(a===null?(e=n.stateNode,e===null||_t||e.parentNode.removeChild(e)):a.count--,l===null?te||jo(u,t.type,t.stateNode):u0(u,l,t.memoizedProps)):l===null&&t.stateNode!==null&&Nr(t,t.memoizedProps,n.memoizedProps);break;case 27:ve(e,t,l),ye(t),a&512&&(_t||n===null||se(n,n.return)),n!==null&&a&4&&Nr(t,t.memoizedProps,n.memoizedProps);break;case 5:if(u=pl,pl=!1,ve(e,t,l),pl=u,ye(t),a&512&&(_t||n===null||se(n,n.return)),t.flags&32){e=t.stateNode;try{na(e,""),yt=!0}catch(C){Nt(t,t.return,C)}}a&4&&t.stateNode!=null&&(e=t.memoizedProps,Nr(t,e,n!==null?n.memoizedProps:e)),a&1024&&(wr=!0);break;case 6:if(ve(e,t,l),ye(t),a&4){if(t.stateNode===null)throw Error(f(162));e=t.memoizedProps,l=t.stateNode;try{l.nodeValue=e,yt=!0}catch(C){Nt(t,t.return,C)}}break;case 3:if(yt=!1,vs=null,u=tl,tl=Mu(e.containerInfo),ve(e,t,l),tl=u,ye(t),a&4&&n!==null&&n.memoizedState.isDehydrated)try{La(e.containerInfo)}catch(C){Nt(t,t.return,C)}wr&&(wr=!1,tm(t)),yt=!1;break;case 4:a=pl,pl=te,n=bf(),u=tl,tl=Mu(t.stateNode.containerInfo),ve(e,t,l),ye(t),tl=u,yt&&Tu&&(ts=!0),yt=n,pl=a;break;case 12:ve(e,t,l),ye(t);break;case 31:ve(e,t,l),ye(t),a&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,ls(t,e)));break;case 13:ve(e,t,l),ye(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(us=ze()),a&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,ls(t,e)));break;case 22:u=t.memoizedState!==null,c=n!==null&&n.memoizedState!==null;var h=te,g=_t,T=pl;te=h||u,pl=T||u,_t=g||c,ve(e,t,l),_t=g,pl=T,te=h,ye(t),a&8192&&(e=t.stateNode,e._visibility=u?e._visibility&-2:e._visibility|1,!u||n===null||c||te||_t||(e=c||_t,l=te,n=_t,te=u||te,_t=e,sn(t,2),te=l,_t=n),!u&&pl||Hr(t,u)),a&4&&(e=t.updateQueue,e!==null&&(l=e.retryQueue,l!==null&&(e.retryQueue=null,ls(t,l))));break;case 19:ve(e,t,l),ye(t),a&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,ls(t,e)));break;case 30:a&512&&(_t||n===null||se(n,n.return)),a=bf(),u=Tu,c=(l&335544064)===l,h=t.memoizedProps,Tu=c&&zl(h.default,h.update)!=="none",ve(e,t,l),ye(t),c&&n!==null&&yt&&(t.flags|=4),Tu=u,yt=a;break;case 21:break;case 7:a&512&&(_t||n===null||se(n,n.return)),n&&n.stateNode!==null&&(n.stateNode._fragmentFiber=t);default:ve(e,t,l),ye(t)}}function ye(t){var e=t.flags;if(e&2){try{for(var l,n=t.return;n!==null;){if(kh(n)){l=n;break}n=n.return}n=null;for(var a=t.return;a!==null;){if(Tr(a)){var u=a.stateNode;n===null?n=[u]:n.push(u)}if(_r(a))break;a=a.return}var c=n;if(l==null)throw Error(f(160));switch(l.tag){case 27:var h=l.stateNode,g=zr(t);Ii(t,g,h,c);break;case 5:var T=l.stateNode;l.flags&32&&(na(T,""),l.flags&=-33);var C=zr(t);Ii(t,C,T,c);break;case 3:case 4:var M=l.stateNode.containerInfo,j=zr(t);Or(t,j,M,c);break;default:throw Error(f(161))}}catch(O){Nt(t,t.return,O)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function tm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;tm(e),e.tag===5&&e.flags&1024&&(e=e.stateNode,qa=!0,e.reset(),qa=!1),t=t.sibling}}function ja(t,e){if(e.subtreeFlags&9270)for(e=e.child;e!==null;)em(e,t),e=e.sibling;else Qh(e)}function em(t,e){var l=t.alternate;if(l===null)Rr(t,!1);else switch(t.tag){case 3:if(Ur=gl=!1,Yh(),ja(e,t),!gl&&!ts){if(t=hl,t!==null)for(var n=0;n<t.length;n+=3){l=t[n];var a=t[n+1];Vm(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"})),Ur=!0}hl=null;break;case 5:ja(e,t);break;case 4:n=gl,gl=!1,ja(e,t),gl&&(ts=!0),gl=n;break;case 22:t.memoizedState===null&&(l.memoizedState!==null?Rr(t,!1):ja(e,t));break;case 30:n=gl,a=Yh(),gl=!1,ja(e,t),gl&&(t.flags|=4);var u=t.memoizedProps,c=t.stateNode;e=Nl(u,c),c=Nl(l.memoizedProps,c);var h=zl(u.default,u.update);h==="none"?e=!1:(u=l.memoizedState,l.memoizedState=null,l=t.child,je=0,e=Mr(t,l,e,c,h,u,!0),je!==(u===null?0:u.length)&&(t.flags|=32)),(t.flags&4)!==0&&e?(Ra(t,t.memoizedProps.onUpdate),hl=a):a!==null&&(a.push.apply(a,hl),hl=a),gl=(t.flags&32)!==0?!0:n;break;default:ja(e,t)}}function vl(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)Zh(t,e.alternate,e),e=e.sibling}function sn(t,e){for(t=t.child;t!==null;){var l=t,n=e;switch(l.tag){case 0:case 11:case 14:case 15:un(4,l,l.return),sn(l,n);break;case 1:se(l,l.return);var a=l.stateNode;typeof a.componentWillUnmount=="function"&&Hh(l,l.return,a),sn(l,n);break;case 27:(n&2)!==0&&t0(l.stateNode,l.type,l.memoizedProps);case 5:se(l,l.return),l.tag!==5&&l.tag!==27||_u(l),sn(l,n);break;case 6:_u(l);break;case 26:se(l,l.return),a=l.stateNode,l.memoizedState!==null||a===null||_t||a.parentNode.removeChild(a),sn(l,n);break;case 22:l.memoizedState===null&&sn(l,n);break;case 30:se(l,l.return),sn(l,n);break;case 7:se(l,l.return);default:sn(l,n)}t=t.sibling}}function el(t,e,l){for(l=(e.subtreeFlags&8772)!==0?l:l&-2,e=e.child;e!==null;){var n=e.alternate,a=t,u=e,c=u.flags,h=(l&1)!==0;switch(u.tag){case 0:case 11:case 15:el(a,u,l),ju(4,u);break;case 1:if(el(a,u,l),n=u,a=n.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(C){Nt(n,n.return,C)}if(n=u,a=n.updateQueue,a!==null){var g=n.stateNode;try{var T=a.shared.hiddenCallbacks;if(T!==null)for(a.shared.hiddenCallbacks=null,a=0;a<T.length;a++)_d(T[a],g)}catch(C){Nt(n,n.return,C)}}h&&c&64&&Uh(u),dl(u,u.return);break;case 27:(l&2)!==0&&qh(u);case 5:u.tag!==5&&u.tag!==27||Bh(u),el(a,u,l),h&&n===null&&c&4&&Er(u),dl(u,u.return);break;case 6:Bh(u);break;case 26:g=u.stateNode,u.memoizedState!==null||g===null||te||jo(Mu(g.ownerDocument),u.type,g),el(a,u,l),h&&n===null&&c&4&&Er(u),dl(u,u.return);break;case 12:el(a,u,l);break;case 31:el(a,u,l),h&&c&4&&Fh(a,u);break;case 13:el(a,u,l),h&&c&4&&Wh(a,u);break;case 22:u.memoizedState===null&&el(a,u,l),dl(u,u.return);break;case 30:el(a,u,l),dl(u,u.return);break;case 7:dl(u,u.return);default:el(a,u,l)}e=e.sibling}}function kr(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&&ru(l))}function qr(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&ru(t))}function Ke(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&&$h(e)}function lm(t,e,l,n){var a=(l&335544064)===l;a&&e.alternate===null&&e.return!==null&&e.return.alternate!==null&&Pi(e);var u=e.flags;switch(e.tag){case 0:case 11:case 15:Ke(t,e,l,n),u&2048&&ju(9,e);break;case 1:Ke(t,e,l,n);break;case 3:Ke(t,e,l,n),a&&Ur&&(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="")),u&2048&&(u=null,e.alternate!==null&&(u=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==u&&(e.refCount++,u!=null&&ru(u)));break;case 12:if(u&2048){Ke(t,e,l,n),u=e.stateNode;try{var c=e.memoizedProps,h=c.id,g=c.onPostCommit;typeof g=="function"&&g(h,e.alternate===null?"mount":"update",u.passiveEffectDuration,-0)}catch(T){Nt(e,e.return,T)}}else Ke(t,e,l,n);break;case 31:Ke(t,e,l,n);break;case 13:Ke(t,e,l,n);break;case 23:break;case 22:c=e.stateNode,h=e.alternate,e.memoizedState!==null?(a&&h!==null&&h.memoizedState===null&&Pi(h),c._visibility&2?Ke(t,e,l,n):Eu(t,e)):(a&&h!==null&&h.memoizedState!==null&&Pi(e),c._visibility&2?Ke(t,e,l,n):(c._visibility|=2,_a(t,e,l,n,(e.subtreeFlags&10256)!==0||!1))),u&2048&&kr(h,e);break;case 24:Ke(t,e,l,n),u&2048&&qr(e.alternate,e);break;case 30:a&&(u=e.alternate,u!==null&&(ml(u.child,!0),ml(e.child,!0))),Ke(t,e,l,n);break;default:Ke(t,e,l,n)}}function _a(t,e,l,n,a){for(a=a&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var u=t,c=e,h=l,g=n,T=c.flags;switch(c.tag){case 0:case 11:case 15:_a(u,c,h,g,a),ju(8,c);break;case 23:break;case 22:var C=c.stateNode;c.memoizedState!==null?C._visibility&2?_a(u,c,h,g,a):Eu(u,c):(C._visibility|=2,_a(u,c,h,g,a)),a&&T&2048&&kr(c.alternate,c);break;case 24:_a(u,c,h,g,a),a&&T&2048&&qr(c.alternate,c);break;default:_a(u,c,h,g,a)}e=e.sibling}}function Eu(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:Eu(l,n),a&2048&&kr(n.alternate,n);break;case 24:Eu(l,n),a&2048&&qr(n.alternate,n);break;default:Eu(l,n)}e=e.sibling}}var Vn=8192;function Gn(t,e,l){if(t.subtreeFlags&Vn)for(t=t.child;t!==null;)nm(t,e,l),t=t.sibling}function nm(t,e,l){switch(t.tag){case 26:Gn(t,e,l),t.flags&Vn&&(t.memoizedState!==null?Xy(l,tl,t.memoizedState,t.memoizedProps):(t=t.stateNode,(e&335544128)===e&&o0(l,t)));break;case 5:Gn(t,e,l),t.flags&Vn&&(t=t.stateNode,(e&335544128)===e&&o0(l,t));break;case 3:case 4:var n=tl;tl=Mu(t.stateNode.containerInfo),Gn(t,e,l),tl=n;break;case 22:t.memoizedState===null&&(n=t.alternate,n!==null&&n.memoizedState!==null?(n=Vn,Vn=16777216,Gn(t,e,l),Vn=n):Gn(t,e,l));break;case 30:if((t.flags&Vn)!==0&&(n=t.memoizedProps.name,n!=null&&n!=="auto")){var a=t.stateNode;a.paired=null,Me===null&&(Me=new Map),Me.set(n,a)}Gn(t,e,l);break;default:Gn(t,e,l)}}function am(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 Nu(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];ee=n,im(n,t)}am(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)um(t),t=t.sibling}function um(t){switch(t.tag){case 0:case 11:case 15:Nu(t),t.flags&2048&&un(9,t,t.return);break;case 3:Nu(t);break;case 12:Nu(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,ns(t)):Nu(t);break;default:Nu(t)}}function ns(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];ee=n,im(n,t)}am(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:un(8,e,e.return),ns(e);break;case 22:l=e.stateNode,l._visibility&2&&(l._visibility&=-3,ns(e));break;default:ns(e)}t=t.sibling}}function im(t,e){for(;ee!==null;){var l=ee;switch(l.tag){case 0:case 11:case 15:un(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:ru(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,ee=n;else t:for(l=t;ee!==null;){n=ee;var a=n.sibling,u=n.return;if(Jh(n),n===l){ee=null;break t}if(a!==null){a.return=u,ee=a;break t}ee=u}}}var Yv={getCacheForType:function(t){var e=ae($t),l=e.data.get(t);return l===void 0&&(l=t(),e.data.set(t,l)),l},cacheSignal:function(){return ae($t).controller.signal}},Vv=typeof WeakMap=="function"?WeakMap:Map,bt=0,Ct=null,ot=null,dt=0,Et=0,we=null,cn=!1,Ta=!1,Lr=!1,Hl=0,Vt=0,rn=0,$n=0,as=0,Ue=0,Ea=0,zu=null,Te=null,Yr=!1,us=0,sm=0,is=1/0,ss=null,on=null,kt=0,ll=null,Qn=null,yl=0,Vr=0,Gr=null,cm=null,Na=null,za=null,Oa=null,Ou=0,cs=null;function He(){return(bt&2)!==0&&dt!==0?dt&-dt:Z.T!==null?Pr():ff()}function rm(){if(Ue===0)if((dt&536870912)===0||ct){var t=li;li<<=1,(li&3932160)===0&&(li=262144),Ue=t}else Ue=536870912;return t=ue.current,t!==null&&(t.flags|=32),Ue}function Ra(t,e){if(e!=null){var l=t.stateNode,n=l.ref;n===null&&(n=l.ref=Gm(Nl(t.memoizedProps,l))),za===null&&(za=[]),za.push(e.bind(null,n))}}function Ee(t,e,l){(t===Ct&&(Et===2||Et===9)||t.cancelPendingCommit!==null)&&(Ca(t,0),fn(t,dt,Ue,!1)),Ja(t,l),((bt&2)===0||t!==Ct)&&(t===Ct&&((bt&2)===0&&($n|=l),Vt===4&&fn(t,dt,Ue,!1)),xl(t))}function om(t,e,l){if((bt&6)!==0)throw Error(f(327));var n=!l&&(e&127)===0&&(e&t.expiredLanes)===0||Ka(t,e),a=n?Qv(t,e):Qr(t,e,!0),u=n;do{if(a===0){Ta&&!n&&fn(t,e,0,!1);break}else{if(l=t.current.alternate,u&&!Gv(l)){a=Qr(t,e,!1),u=!1;continue}if(a===2){if(u=e,t.errorRecoveryDisabledLanes&u)var c=0;else c=t.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){e=c;t:{var h=t;a=zu;var g=h.current.memoizedState.isDehydrated;if(g&&(Ca(h,c).flags|=256),c=Qr(h,c,!1),c!==2&&c!==6){if(Lr&&!g){h.errorRecoveryDisabledLanes|=u,$n|=u,a=4;break t}u=Te,Te=a,u!==null&&(Te===null?Te=u:Te.push.apply(Te,u))}a=c}if(u=!1,a!==2)continue}}if(a===1){Ca(t,0),fn(t,e,0,!0);break}t:{switch(n=t,u=a,u){case 0:case 1:throw Error(f(345));case 4:if((e&4194048)!==e&&(e&62914560)!==e)break;case 6:fn(n,e,Ue,!cn);break t;case 2:Te=null;break;case 3:case 5:break;default:throw Error(f(329))}if((e&62914560)===e&&(a=us+300-ze(),10<a)){if(fn(n,e,Ue,!cn),ai(n,0,!0)!==0)break t;yl=e,n.timeoutHandle=oo(fm.bind(null,n,l,Te,ss,Yr,e,Ue,$n,Ea,cn,u,"Throttled",-0,0),a);break t}fm(n,l,Te,ss,Yr,e,Ue,$n,Ea,cn,u,null,-0,0)}}break}while(!0);xl(t)}function fm(t,e,l,n,a,u,c,h,g,T,C,M,j,O){t.timeoutHandle=-1;var L=e.subtreeFlags,$=(u&335544064)===u;if(M=null,($||L&8192||(L&16785408)===16785408)&&(M={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:rl},Me=null,nm(e,u,M),$&&(L=M,$=t.containerInfo,$=($.nodeType===9?$:$.ownerDocument).__reactViewTransition,$!=null&&(L.count++,L.waitingForViewTransition=!0,L=Hu.bind(L),$.finished.then(L,L))),L=(u&62914560)===u?us-ze():(u&4194048)===u?sm-ze():0,L=Zy(M,L),L!==null)){yl=u,t.cancelPendingCommit=L(xm.bind(null,t,e,u,l,n,a,c,h,g,T,C,M,null,j,O)),fn(t,u,c,!T);return}xm(t,e,u,l,n,a,c,h,g,T,C,M)}function Gv(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],u=a.getSnapshot;a=a.value;try{if(!Ae(u(),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 fn(t,e,l,n){e=uf(t,e),e&=~as,e&=~$n,t.suspendedLanes|=e,t.pingedLanes&=~e,n&&(t.warmLanes|=e),n=t.expirationTimes;for(var a=e;0<a;){var u=31-Re(a),c=1<<u;n[u]=-1,a&=~c}l!==0&&cf(t,l,e)}function rs(){return(bt&6)===0?(Ru(0),!1):!0}function $r(){if(ot!==null){if(Et===0)var t=ot.return;else t=ot,Cl=Dn=null,Wc(t),ga=null,du=0,t=ot;for(;t!==null;)wh(t.alternate,t),t=t.return;ot=null}}function Ca(t,e){var l=t.timeoutHandle;return l!==-1&&(t.timeoutHandle=-1,hy(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),yl=0,$r(),Ct=t,ot=l=Ol(t.current,null),dt=e,Et=0,we=null,cn=!1,Ta=Ka(t,e),Lr=!1,Ea=Ue=as=$n=rn=Vt=0,Te=zu=null,Yr=!1,Hl=uf(t,e),vi(),l}function dm(t,e){it=null,Z.H=Vi,e===pa||e===Oi?(e=xd(),Et=3):e===qc?(e=xd(),Et=4):Et=e===hr?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,we=e,ot===null&&(Vt=1,Gi(t,$e(e,t.current)))}function hm(){var t=ue.current;return t===null?!0:(dt&4194048)===dt?me===null:(dt&62914560)===dt||(dt&536870912)!==0?t===me:!1}function mm(){var t=Z.H;return Z.H=Vi,t===null?Vi:t}function pm(){var t=Z.A;return Z.A=Yv,t}function os(){Vt=4,cn||(dt&4194048)!==dt&&ue.current!==null||(Ta=!0),(rn&134217727)===0&&($n&134217727)===0||Ct===null||fn(Ct,dt,Ue,!1)}function Qr(t,e,l){var n=bt;bt|=2;var a=mm(),u=pm();(Ct!==t||dt!==e)&&(ss=null,Ca(t,e)),e=!1;var c=Vt;t:do try{if(Et!==0&&ot!==null){var h=ot,g=we;switch(Et){case 8:$r(),c=6;break t;case 3:case 2:case 9:case 6:ue.current===null&&(e=!0);var T=Et;if(Et=0,we=null,Aa(t,h,g,T),l&&Ta){c=0;break t}break;default:T=Et,Et=0,we=null,Aa(t,h,g,T)}}$v(),c=Vt;break}catch(C){dm(t,C)}while(!0);return e&&t.shellSuspendCounter++,Cl=Dn=null,bt=n,Z.H=a,Z.A=u,ot===null&&(Ct=null,dt=0,vi()),c}function $v(){for(;ot!==null;)gm(ot)}function Qv(t,e){var l=bt;bt|=2;var n=mm(),a=pm();Ct!==t||dt!==e?(ss=null,is=ze()+500,Ca(t,e)):Ta=Ka(t,e);t:do try{if(Et!==0&&ot!==null){e=ot;var u=we;e:switch(Et){case 1:Et=0,we=null,Aa(t,e,u,1);break;case 2:case 9:if(vd(u)){Et=0,we=null,vm(e);break}e=function(){Et!==2&&Et!==9||Ct!==t||(Et=7),xl(t)},u.then(e,e);break t;case 3:Et=7;break t;case 4:Et=5;break t;case 7:vd(u)?(Et=0,we=null,vm(e)):(Et=0,we=null,Aa(t,e,u,7));break;case 5:var c=null;switch(ot.tag){case 26:c=ot.memoizedState;case 5:case 27:var h=ot;if(c?c0(c):h.stateNode.complete){Et=0,we=null;var g=h.sibling;if(g!==null)ot=g;else{var T=h.return;T!==null?(ot=T,fs(T)):ot=null}break e}}Et=0,we=null,Aa(t,e,u,5);break;case 6:Et=0,we=null,Aa(t,e,u,6);break;case 8:$r(),Vt=6;break t;default:throw Error(f(462))}}Xv();break}catch(C){dm(t,C)}while(!0);return Cl=Dn=null,Z.H=n,Z.A=a,bt=l,ot!==null?0:(Ct=null,dt=0,vi(),Vt)}function Xv(){for(;ot!==null&&!rg();)gm(ot)}function gm(t){var e=Dh(t.alternate,t,Hl);t.memoizedProps=t.pendingProps,e===null?fs(t):ot=e}function vm(t){var e=t,l=e.alternate;switch(e.tag){case 15:case 0:e=Eh(l,e,e.pendingProps,e.type,void 0,dt);break;case 11:e=Eh(l,e,e.pendingProps,e.type.render,e.ref,dt);break;case 5:Wc(e);var n=e;n===Pt&&(ct?(_i(n),n.tag===5&&n.stateNode!=null&&(Dt=n.stateNode)):(_i(n),ct=!0));default:wh(l,e),e=ot=id(e,Hl),e=Dh(l,e,Hl)}t.memoizedProps=t.pendingProps,e===null?fs(t):ot=e}function Aa(t,e,l,n){Cl=Dn=null,Wc(e),ga=null,du=0;var a=e.return;try{if(Mv(t,a,e,l,dt)){Vt=1,Gi(t,$e(l,t.current)),ot=null;return}}catch(u){if(a!==null)throw ot=a,u;Vt=1,Gi(t,$e(l,t.current)),ot=null;return}e.flags&32768?(ct||n===1?t=!0:Ta||(dt&536870912)!==0?t=!1:(cn=t=!0,(n===2||n===9||n===3||n===6)&&(n=ue.current,n!==null&&n.tag===13&&(n.flags|=16384))),ym(e,t)):fs(e)}function fs(t){var e=t;do{if((e.flags&32768)!==0){ym(e,cn);return}t=e.return;var l=Bv(e.alternate,e,Hl);if(l!==null){ot=l;return}if(e=e.sibling,e!==null){ot=e;return}ot=e=t}while(e!==null);Vt===0&&(Vt=5)}function ym(t,e){do{var l=kv(t.alternate,t);if(l!==null){l.flags&=32767,ot=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!e&&(t=t.sibling,t!==null)){ot=t;return}ot=t=l}while(t!==null);Vt=6,ot=null}function xm(t,e,l,n,a,u,c,h,g,T,C,M){t.cancelPendingCommit=null;do ds();while(kt!==0);if((bt&6)!==0)throw Error(f(327));if(e!==null){if(e===t.current)throw Error(f(177));t===Ct&&(ot=Ct=null,dt=0),Qn=e,ll=t,yl=l,Gr=a,cm=n,Zv(t,e,l,c,h,g,M)}}function Zv(t,e,l,n,a,u,c){var h=e.lanes|e.childLanes;if(Vr=h,h|=Nc,xg(t,l,h,n,a,u),za=null,(l&335544064)===l?(Oa=Sv(t),n=10262):(Oa=null,n=10256),(e.subtreeFlags&n)!==0||(e.flags&n)!==0?(t.callbackNode=null,t.callbackPriority=0,Pv(ti,function(){return Jr(),null})):(t.callbackNode=null,t.callbackPriority=0),Fi=!1,n=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||n){n=Z.T,Z.T=null,a=lt.p,lt.p=2,u=bt,bt|=4;try{qv(t,e,l)}finally{bt=u,lt.p=a,Z.T=n}}kt=1,Fi?Na=xy(c,t.containerInfo,Oa,Xr,Zr,Jv,Kr,Jr,Kv):(Xr(),Zr(),Kr())}function Kv(t){if(kt!==0){var e=ll.onRecoverableError;e(t,{componentStack:null})}}function Jv(){kt===3&&(kt=0,em(Qn,ll),kt=4)}function Xr(){if(kt===1){kt=0;var t=ll,e=Qn,l=yl,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=Z.T,Z.T=null;var a=lt.p;lt.p=2;var u=bt;bt|=4;try{Tu=ts=!1,Ph(e,t,l),l=so;var c=If(t.containerInfo),h=l.focusedElem,g=l.selectionRange;if(c!==h&&h&&h.ownerDocument&&Jf(h.ownerDocument.documentElement,h)){if(g!==null&&Sc(h)){var T=g.start,C=g.end;if(C===void 0&&(C=T),"selectionStart"in h)h.selectionStart=T,h.selectionEnd=Math.min(C,h.value.length);else{var M=h.ownerDocument||document,j=M&&M.defaultView||window;if(j.getSelection){var O=j.getSelection(),L=h.textContent.length,$=Math.min(g.start,L),st=g.end===void 0?$:Math.min(g.end,L);!O.extend&&$>st&&(c=st,st=$,$=c);var _=Kf(h,$),b=Kf(h,st);if(_&&b&&(O.rangeCount!==1||O.anchorNode!==_.node||O.anchorOffset!==_.offset||O.focusNode!==b.node||O.focusOffset!==b.offset)){var z=M.createRange();z.setStart(_.node,_.offset),O.removeAllRanges(),$>st?(O.addRange(z),O.extend(b.node,b.offset)):(z.setEnd(b.node,b.offset),O.addRange(z))}}}}for(M=[],O=h;O=O.parentNode;)O.nodeType===1&&M.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<M.length;h++){var D=M[h];D.element.scrollLeft=D.left,D.element.scrollTop=D.top}}qa=!!io,so=io=null}finally{bt=u,lt.p=a,Z.T=n}}t.current=e,kt=2}}function Zr(){if(kt===2){kt=0;var t=ll,e=Qn,l=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||l){l=Z.T,Z.T=null;var n=lt.p;lt.p=2;var a=bt;bt|=4;try{Zh(t,e.alternate,e)}finally{bt=a,lt.p=n,Z.T=l}}kt=3}}function Kr(){if(kt===4||kt===3){kt=0;var t=Na;Na=null,og();var e=ll,l=Qn,n=yl,a=cm,u=(n&335544064)===n?10262:10256;if((l.subtreeFlags&u)!==0||(l.flags&u)!==0?kt=5:(kt=0,Qn=ll=null,bm(e,e.pendingLanes)),u=e.pendingLanes,u===0&&(on=null),nc(n),l=l.stateNode,Oe&&typeof Oe.onCommitFiberRoot=="function")try{Oe.onCommitFiberRoot(Za,l,void 0,(l.current.flags&128)===128)}catch{}if(a!==null){l=Z.T,u=lt.p,lt.p=2,Z.T=null;try{for(var c=e.onRecoverableError,h=0;h<a.length;h++){var g=a[h];c(g.value,{componentStack:g.stack})}}finally{Z.T=l,lt.p=u}}if(a=za,c=Oa,Oa=null,a!==null&&(za=null,c===null&&(c=[]),t!==null))for(g=0;g<a.length;g++)l=(0,a[g])(c),l!==void 0&&t.finished.finally(l);(yl&3)!==0&&ds(),xl(e),u=e.pendingLanes,(n&261930)!==0&&(u&42)!==0?e===cs?Ou++:(Ou=0,cs=e):(Ou=0,cs=null),Ru(0)}}function bm(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,ru(e)))}function ds(){return Na!==null&&(Na.skipTransition(),Na=null),Xr(),Zr(),Kr(),Jr()}function Jr(){if(kt!==5)return!1;var t=ll,e=Vr;Vr=0;var l=nc(yl),n=Z.T,a=lt.p;try{lt.p=32>l?32:l,Z.T=null,l=Gr,Gr=null;var u=ll,c=yl;if(kt=0,Qn=ll=null,yl=0,(bt&6)!==0)throw Error(f(331));var h=bt;if(bt|=4,um(u.current),lm(u,u.current,c,l),bt=h,Ru(0,!1),Oe&&typeof Oe.onPostCommitFiberRoot=="function")try{Oe.onPostCommitFiberRoot(Za,u)}catch{}return!0}finally{lt.p=a,Z.T=n,bm(t,e)}}function Sm(t,e,l){e=$e(l,e),e=dr(t.stateNode,e,2),t=en(t,e,2),t!==null&&(Ja(t,2),xl(t))}function Nt(t,e,l){if(t.tag===3)Sm(t,t,l);else for(;e!==null;){if(e.tag===3){Sm(e,t,l);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(on===null||!on.has(n))){t=$e(l,t),l=vh(2),n=en(e,l,2),n!==null&&(yh(l,n,e,t),Ja(n,2),xl(n));break}}e=e.return}}function Ir(t,e,l){var n=t.pingCache;if(n===null){n=t.pingCache=new Vv;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)||(Lr=!0,a.add(l),t=Iv.bind(null,t,e,l),e.then(t,t))}function Iv(t,e,l){var n=t.pingCache;n!==null&&n.delete(e),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Ct===t&&(dt&l)===l&&((Vt===4||Vt===3&&(dt&62914560)===dt&&300>ze()-us)&&(bt&2)===0?Ca(t,0):as|=l,Ea===dt&&(Ea=0)),xl(t)}function jm(t,e){e===0&&(e=sf()),t=Rn(t,e),t!==null&&(Ja(t,e),xl(t))}function Fv(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),jm(t,l)}function Wv(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(f(314))}n!==null&&n.delete(e),jm(t,l)}function Pv(t,e){return Ps(t,e)}var Da=null,Ma=null,Fr=!1,hs=!1,Wr=!1,dn=0;function xl(t){t!==Ma&&t.next===null&&(Ma===null?Da=Ma=t:Ma=Ma.next=t),hs=!0,Fr||(Fr=!0,ey())}function Ru(t,e){if(!Wr&&hs){Wr=!0;do for(var l=!1,n=Da;n!==null;){if(t!==0){var a=n.pendingLanes;if(a===0)var u=0;else{var c=n.suspendedLanes,h=n.pingedLanes;u=(1<<31-Re(42|t)+1)-1,u&=a&~(c&~h),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,Nm(n,u))}else u=dt,u=ai(n,n===Ct?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&3)===0||Ka(n,u)||(l=!0,Nm(n,u));n=n.next}while(l);Wr=!1}}function ty(){_m()}function _m(){hs=Fr=!1;var t=0;dn!==0&&dy()&&(t=dn);for(var e=ze(),l=null,n=Da;n!==null;){var a=n.next,u=Tm(n,e);u===0?(n.next=null,l===null?Da=a:l.next=a,a===null&&(Ma=l)):(l=n,(t!==0||(u&3)!==0)&&(hs=!0)),n=a}kt!==0&&kt!==5||Ru(t),dn!==0&&(dn=0)}function Tm(t,e){for(var l=t.suspendedLanes,n=t.pingedLanes,a=t.expirationTimes,u=t.pendingLanes&-62914561;0<u;){var c=31-Re(u),h=1<<c,g=a[c];g===-1?((h&l)===0||(h&n)!==0)&&(a[c]=yg(h,e)):g<=e&&(t.expiredLanes|=h),u&=~h}if(e=Ct,l=dt,l=ai(t,t===e?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n=t.callbackNode,l===0||t===e&&(Et===2||Et===9)||t.cancelPendingCommit!==null)return n!==null&&n!==null&&tc(n),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||Ka(t,l)){if(e=l&-l,e===t.callbackPriority)return e;switch(n!==null&&tc(n),nc(l)){case 2:case 8:l=nf;break;case 32:l=ti;break;case 268435456:l=af;break;default:l=ti}return n=Em.bind(null,t),l=Ps(l,n),t.callbackPriority=e,t.callbackNode=l,e}return n!==null&&n!==null&&tc(n),t.callbackPriority=2,t.callbackNode=null,2}function Em(t,e){if(kt!==0&&kt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(ds()&&t.callbackNode!==l)return null;var n=dt;return n=ai(t,t===Ct?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n===0?null:(om(t,n,e),Tm(t,ze()),t.callbackNode!=null&&t.callbackNode===l?Em.bind(null,t):null)}function Nm(t,e){if(ds())return null;om(t,e,!0)}function ey(){my(function(){(bt&6)!==0?Ps(lf,ty):_m()})}function Pr(){if(dn===0){var t=Un;t===0&&(t=ei,ei<<=1,(ei&261888)===0&&(ei=256)),dn=t}return dn}function zm(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ri(t)}function ly(t,e,l,n,a){if(e==="submit"&&l&&l.stateNode===a){var u=zm((a[be]||null).action),c=n.submitter;c&&(e=(e=c[be]||null)?zm(e.formAction):c.getAttribute("formAction"),e!==null&&(u=e,c=null));var h=new hi("action","action",null,n,a);t.push({event:h,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(dn!==0){var g=new FormData(a,c);sr(l,{pending:!0,data:g,method:a.method,action:u},null,g)}}else typeof u=="function"&&(h.preventDefault(),g=new FormData(a,c),sr(l,{pending:!0,data:g,method:a.method,action:u},u,g))},currentTarget:a}]})}}for(var to=0;to<Ec.length;to++){var eo=Ec[to],ny=eo.toLowerCase(),ay=eo[0].toUpperCase()+eo.slice(1);We(ny,"on"+ay)}We(Pf,"onAnimationEnd"),We(td,"onAnimationIteration"),We(ed,"onAnimationStart"),We("dblclick","onDoubleClick"),We("focusin","onFocus"),We("focusout","onBlur"),We(hv,"onTransitionRun"),We(mv,"onTransitionStart"),We(pv,"onTransitionCancel"),We(ld,"onTransitionEnd"),ea("onMouseEnter",["mouseout","mouseover"]),ea("onMouseLeave",["mouseout","mouseover"]),ea("onPointerEnter",["pointerout","pointerover"]),ea("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 Cu="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(" "),uy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Cu));function Om(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 u=void 0;if(e)for(var c=n.length-1;0<=c;c--){var h=n[c],g=h.instance,T=h.currentTarget;if(h=h.listener,g!==u&&a.isPropagationStopped())break t;u=h,a.currentTarget=T;try{u(a)}catch(C){gi(C)}a.currentTarget=null,u=g}else for(c=0;c<n.length;c++){if(h=n[c],g=h.instance,T=h.currentTarget,h=h.listener,g!==u&&a.isPropagationStopped())break t;u=h,a.currentTarget=T;try{u(a)}catch(C){gi(C)}a.currentTarget=null,u=g}}}}function ft(t,e){var l=e[hf];l===void 0&&(l=e[hf]=new Set);var n=t+"__bubble";l.has(n)||(Rm(e,t,2,!1),l.add(n))}function lo(t,e,l){var n=0;e&&(n|=4),Rm(l,t,n,e)}var ms="_reactListening"+Math.random().toString(36).slice(2);function no(t){if(!t[ms]){t[ms]=!0,gf.forEach(function(l){l!=="selectionchange"&&(uy.has(l)||lo(l,!1,t),lo(l,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[ms]||(e[ms]=!0,lo("selectionchange",!1,e))}}function Rm(t,e,l,n){switch(y0(e)){case 2:var a=Fy;break;case 8:a=Wy;break;default:a=To}l=a.bind(null,e,l,t),a=void 0,!fc||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 ao(t,e,l,n,a){var u=n;if((e&1)===0&&(e&2)===0&&n!==null)t:for(;;){if(n===null)return;var c=n.tag;if(c===3||c===4){var h=n.stateNode.containerInfo;if(h===a)break;if(c===4)for(c=n.return;c!==null;){var g=c.tag;if((g===3||g===4)&&c.stateNode.containerInfo===a)return;c=c.return}for(;h!==null;){if(c=En(h),c===null)return;if(g=c.tag,g===5||g===6||g===26||g===27){n=u=c;continue t}h=h.parentNode}}n=n.return}Rf(function(){var T=u,C=rc(l),M=[];t:{var j=nd.get(t);if(j!==void 0){var O=hi,L=t;switch(t){case"keypress":if(fi(l)===0)break t;case"keydown":case"keyup":O=Gg;break;case"focusin":L="focus",O=pc;break;case"focusout":L="blur",O=pc;break;case"beforeblur":case"afterblur":O=pc;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=Df;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=Ag;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=Kg;break;case Pf:case td:case ed:O=wg;break;case ld:O=Ig;break;case"scroll":case"scrollend":O=Rg;break;case"wheel":O=Wg;break;case"copy":case"cut":case"paste":O=Hg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=wf;break;case"submit":O=Xg;break;case"toggle":case"beforetoggle":O=tv}var $=(e&4)!==0,st=!$&&(t==="scroll"||t==="scrollend"),_=$?j!==null?j+"Capture":null:j;$=[];for(var b=T,z;b!==null;){var D=b;if(z=D.stateNode,D=D.tag,D!==5&&D!==26&&D!==27||z===null||_===null||(D=Wa(b,_),D!=null&&$.push(Au(b,D,z))),st)break;b=b.return}0<$.length&&(j=new O(j,L,null,l,C),M.push({event:j,listeners:$}))}}if((e&7)===0){t:{if(O=t==="mouseover"||t==="pointerover",j=t==="mouseout"||t==="pointerout",O&&l!==cc&&(L=l.relatedTarget||l.fromElement)&&(En(L)||L[Wn]))break t;(j||O)&&(L=C.window===C?C:(O=C.ownerDocument)?O.defaultView||O.parentWindow:window,j?(O=l.relatedTarget||l.toElement,j=T,O=O?En(O):null,O!==null&&(st=p(O),$=O.tag,O!==st||$!==5&&$!==27&&$!==6)&&(O=null)):(j=null,O=T),j!==O&&($=Df,D="onMouseLeave",_="onMouseEnter",b="mouse",(t==="pointerout"||t==="pointerover")&&($=wf,D="onPointerLeave",_="onPointerEnter",b="pointer"),st=j==null?L:Fa(j),z=O==null?L:Fa(O),L=new $(D,b+"leave",j,l,C),L.target=st,L.relatedTarget=z,D=null,En(C)===T&&($=new $(_,b+"enter",O,l,C),$.target=z,$.relatedTarget=st,D=$),st=D,$=j&&O?Tt(j,O,iy):null,j!==null&&Cm(M,L,j,$,!1),O!==null&&st!==null&&Cm(M,st,O,$,!0)))}t:{if(j=T?Fa(T):window,O=j.nodeName&&j.nodeName.toLowerCase(),O==="select"||O==="input"&&j.type==="file")var V=Vf;else if(Lf(j))if(Gf)V=ov;else{V=cv;var ht=sv}else O=j.nodeName,!O||O.toLowerCase()!=="input"||j.type!=="checkbox"&&j.type!=="radio"?T&&sc(T.elementType)&&(V=Vf):V=rv;if(V&&(V=V(t,T))){Yf(M,V,l,C);break t}ht&&ht(t,j,T)}switch(ht=T?Fa(T):window,t){case"focusin":(Lf(ht)||ht.contentEditable==="true")&&(sa=ht,jc=T,iu=null);break;case"focusout":iu=jc=sa=null;break;case"mousedown":_c=!0;break;case"contextmenu":case"mouseup":case"dragend":_c=!1,Ff(M,l,C);break;case"selectionchange":if(dv)break;case"keydown":case"keyup":Ff(M,l,C)}var J;if(vc)t:{switch(t){case"compositionstart":var W="onCompositionStart";break t;case"compositionend":W="onCompositionEnd";break t;case"compositionupdate":W="onCompositionUpdate";break t}W=void 0}else ia?kf(t,l)&&(W="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(W="onCompositionStart");W&&(Uf&&l.locale!=="ko"&&(ia||W!=="onCompositionStart"?W==="onCompositionEnd"&&ia&&(J=Cf()):(Xl=C,dc="value"in Xl?Xl.value:Xl.textContent,ia=!0)),ht=ps(T,W),0<ht.length&&(W=new Mf(W,t,null,l,C),M.push({event:W,listeners:ht}),J?W.data=J:(J=qf(l),J!==null&&(W.data=J)))),(J=lv?nv(t,l):av(t,l))&&(W=ps(T,"onBeforeInput"),0<W.length&&(ht=new Mf("onBeforeInput","beforeinput",null,l,C),M.push({event:ht,listeners:W}),ht.data=J)),ly(M,t,T,l,C)}Om(M,e)})}function Au(t,e,l){return{instance:t,listener:e,currentTarget:l}}function ps(t,e){for(var l=e+"Capture",n=[];t!==null;){var a=t,u=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||u===null||(a=Wa(t,l),a!=null&&n.unshift(Au(t,a,u)),a=Wa(t,e),a!=null&&n.push(Au(t,a,u))),t.tag===3)return n;t=t.return}return[]}function iy(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Cm(t,e,l,n,a){for(var u=e._reactName,c=[];l!==null&&l!==n;){var h=l,g=h.alternate,T=h.stateNode;if(h=h.tag,g!==null&&g===n)break;h!==5&&h!==26&&h!==27||T===null||(g=T,a?(T=Wa(l,u),T!=null&&c.unshift(Au(l,T,g))):a||(T=Wa(l,u),T!=null&&c.push(Au(l,T,g)))),l=l.return}c.length!==0&&t.push({event:e,listeners:c})}var sy=/\r\n?/g,cy=/\u0000|\uFFFD/g;function Am(t){return(typeof t=="string"?t:""+t).replace(sy,`
49
- `).replace(cy,"")}function Dm(t,e){return e=Am(e),Am(t)===e}function zt(t,e,l,n,a,u){switch(l){case"children":if(typeof n=="string")e==="body"||e==="textarea"&&n===""||na(t,n);else if(typeof n=="number"||typeof n=="bigint")e!=="body"&&na(t,""+n);else return;break;case"className":ci(t,"class",n);break;case"tabIndex":ci(t,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":ci(t,l,n);break;case"style":zf(t,n,u);return;case"data":if(e!=="object"){ci(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=ri(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 u=="function"&&(l==="formAction"?(e!=="input"&&zt(t,e,"name",a.name,a,null),zt(t,e,"formEncType",a.formEncType,a,null),zt(t,e,"formMethod",a.formMethod,a,null),zt(t,e,"formTarget",a.formTarget,a,null)):(zt(t,e,"encType",a.encType,a,null),zt(t,e,"method",a.method,a,null),zt(t,e,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(l);break}n=ri(n),t.setAttribute(l,n);break;case"onClick":n!=null&&(t.onclick=rl);return;case"onScroll":n!=null&&ft("scroll",t);return;case"onScrollEnd":n!=null&&ft("scrollend",t);return;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(f(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(f(60));(u!=null?u.__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=ri(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":ft("beforetoggle",t),ft("toggle",t),si(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":si(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=zg.get(l)||l,si(t,l,n);else return}yt=!0}function uo(t,e,l,n,a,u){switch(l){case"style":zf(t,n,u);return;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(f(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(f(60));(u!=null?u.__html:void 0)!==l&&(t.innerHTML=l)}}break;case"children":if(typeof n=="string")na(t,n);else if(typeof n=="number"||typeof n=="bigint")na(t,""+n);else return;break;case"onScroll":n!=null&&ft("scroll",t);return;case"onScrollEnd":n!=null&&ft("scrollend",t);return;case"onClick":n!=null&&(t.onclick=rl);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!vf.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(a=l.endsWith("Capture"),u=l.slice(2,a?l.length-7:void 0),e=t[be]||null,e=e!=null?e[l]:null,typeof e=="function"&&t.removeEventListener(u,e,a),typeof n=="function")){typeof e!="function"&&e!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(u,n,a);break t}yt=!0,l in t?t[l]=n:n===!0?t.setAttribute(l,""):si(t,l,n)}return}yt=!0}function ce(t,e,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ft("error",t),ft("load",t);var n=!1,a=!1,u;for(u in l)if(l.hasOwnProperty(u)){var c=l[u];if(c!=null)switch(u){case"src":n=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(f(137,e));default:zt(t,e,u,c,l,null)}}a&&zt(t,e,"srcSet",l.srcSet,l,null),n&&zt(t,e,"src",l.src,l,null);return;case"input":ft("invalid",t);var h=u=c=a=null,g=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":c=C;break;case"checked":g=C;break;case"defaultChecked":T=C;break;case"value":u=C;break;case"defaultValue":h=C;break;case"children":case"dangerouslySetInnerHTML":if(C!=null)throw Error(f(137,e));break;default:zt(t,e,n,C,l,null)}}_f(t,u,h,g,T,c,a,!1);return;case"select":ft("invalid",t),n=c=u=null;for(a in l)if(l.hasOwnProperty(a)&&(h=l[a],h!=null))switch(a){case"value":u=h;break;case"defaultValue":c=h;break;case"multiple":n=h;default:zt(t,e,a,h,l,null)}e=u,l=c,t.multiple=!!n,e!=null?la(t,!!n,e,!1):l!=null&&la(t,!!n,l,!0);return;case"textarea":ft("invalid",t),u=a=n=null;for(c in l)if(l.hasOwnProperty(c)&&(h=l[c],h!=null))switch(c){case"value":n=h;break;case"defaultValue":a=h;break;case"children":u=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(f(91));break;default:zt(t,e,c,h,l,null)}Ef(t,n,a,u);return;case"option":for(g in l)if(l.hasOwnProperty(g)&&(n=l[g],n!=null))switch(g){case"selected":t.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:zt(t,e,g,n,l,null)}return;case"dialog":ft("beforetoggle",t),ft("toggle",t),ft("cancel",t),ft("close",t);break;case"iframe":case"object":ft("load",t);break;case"video":case"audio":for(n=0;n<Cu.length;n++)ft(Cu[n],t);break;case"image":ft("error",t),ft("load",t);break;case"details":ft("toggle",t);break;case"embed":case"source":case"link":ft("error",t),ft("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(f(137,e));default:zt(t,e,T,n,l,null)}return;default:if(sc(e)){for(C in l)l.hasOwnProperty(C)&&(n=l[C],n!==void 0&&uo(t,e,C,n,l,void 0));return}}for(h in l)l.hasOwnProperty(h)&&(n=l[h],n!=null&&zt(t,e,h,n,l,null))}var ry={};function oy(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,u=null,c=null,h=null,g=null,T=null,C=null;for(O in l){var M=l[O];if(l.hasOwnProperty(O)&&M!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":g=M;default:n.hasOwnProperty(O)||zt(t,e,O,null,n,M)}}for(var j in n){var O=n[j];if(M=l[j],n.hasOwnProperty(j)&&(O!=null||M!=null))switch(j){case"type":O!==M&&(yt=!0),u=O;break;case"name":O!==M&&(yt=!0),a=O;break;case"checked":O!==M&&(yt=!0),T=O;break;case"defaultChecked":O!==M&&(yt=!0),C=O;break;case"value":O!==M&&(yt=!0),c=O;break;case"defaultValue":O!==M&&(yt=!0),h=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(f(137,e));break;default:O!==M&&zt(t,e,j,O,n,M)}}uc(t,c,h,g,T,C,u,a);return;case"select":O=c=h=j=null;for(u in l)if(g=l[u],l.hasOwnProperty(u)&&g!=null)switch(u){case"value":break;case"multiple":O=g;default:n.hasOwnProperty(u)||zt(t,e,u,null,n,g)}for(a in n)if(u=n[a],g=l[a],n.hasOwnProperty(a)&&(u!=null||g!=null))switch(a){case"value":u!==g&&(yt=!0),j=u;break;case"defaultValue":u!==g&&(yt=!0),h=u;break;case"multiple":u!==g&&(yt=!0),c=u;default:u!==g&&zt(t,e,a,u,n,g)}e=h,l=c,n=O,j!=null?la(t,!!l,j,!1):!!n!=!!l&&(e!=null?la(t,!!l,e,!0):la(t,!!l,l?[]:"",!1));return;case"textarea":O=j=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:zt(t,e,h,null,n,a)}for(c in n)if(a=n[c],u=l[c],n.hasOwnProperty(c)&&(a!=null||u!=null))switch(c){case"value":a!==u&&(yt=!0),j=a;break;case"defaultValue":a!==u&&(yt=!0),O=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(f(91));break;default:a!==u&&zt(t,e,c,a,n,u)}Tf(t,j,O);return;case"option":for(var L in l)if(j=l[L],l.hasOwnProperty(L)&&j!=null&&!n.hasOwnProperty(L))switch(L){case"selected":t.selected=!1;break;default:zt(t,e,L,null,n,j)}for(g in n)if(j=n[g],O=l[g],n.hasOwnProperty(g)&&j!==O&&(j!=null||O!=null))switch(g){case"selected":j!==O&&(yt=!0),t.selected=j&&typeof j!="function"&&typeof j!="symbol";break;default:zt(t,e,g,j,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 $ in l)j=l[$],l.hasOwnProperty($)&&j!=null&&!n.hasOwnProperty($)&&zt(t,e,$,null,n,j);for(T in n)if(j=n[T],O=l[T],n.hasOwnProperty(T)&&j!==O&&(j!=null||O!=null))switch(T){case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(f(137,e));break;default:zt(t,e,T,j,n,O)}return;default:if(sc(e)){for(var st in l)j=l[st],l.hasOwnProperty(st)&&j!==void 0&&!n.hasOwnProperty(st)&&uo(t,e,st,void 0,n,j);for(C in n)j=n[C],O=l[C],!n.hasOwnProperty(C)||j===O||j===void 0&&O===void 0||uo(t,e,C,j,n,O);return}}for(var _ in l)j=l[_],l.hasOwnProperty(_)&&j!=null&&!n.hasOwnProperty(_)&&zt(t,e,_,null,n,j);for(M in n)j=n[M],O=l[M],!n.hasOwnProperty(M)||j===O||j==null&&O==null||zt(t,e,M,j,n,O)}function Mm(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function fy(){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],u=a.transferSize,c=a.initiatorType,h=a.duration;if(u&&h&&Mm(c)){for(c=0,h=a.responseEnd,n+=1;n<l.length;n++){var g=l[n],T=g.startTime;if(T>h)break;var C=g.transferSize,M=g.initiatorType;C&&Mm(M)&&(g=g.responseEnd,c+=C*(g<h?1:(h-T)/(g-T)))}if(--n,e+=8*(u+c)/(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 io=null,so=null;function Du(t){return t.nodeType===9?t:t.ownerDocument}function wm(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 Um(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 Hm(t,e,l,n){return l=Du(l).createElement(t),l[ne]=n,l[be]=e,ce(l,t,e),Wt(l),l}function co(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 ro=null;function dy(){var t=window.event;return t&&t.type==="popstate"?t===ro?!1:(ro=t,!0):(ro=null,!1)}var oo=typeof setTimeout=="function"?setTimeout:void 0,hy=typeof clearTimeout=="function"?clearTimeout:void 0,Bm=typeof Promise=="function"?Promise:void 0,km=typeof requestAnimationFrame=="function"?requestAnimationFrame:oo,my=typeof queueMicrotask=="function"?queueMicrotask:typeof Bm<"u"?function(t){return Bm.resolve(null).then(t).catch(py)}:oo;function py(t){setTimeout(function(){throw t})}function hn(t){return t==="head"}function qm(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),La(e);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")xo(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,xo(l);for(var u=l.firstChild;u;){var c=u.nextSibling,h=u.nodeName;u[Ia]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&u.rel.toLowerCase()==="stylesheet"||l.removeChild(u),u=c}}else l==="body"&&xo(t.ownerDocument.body);l=a}while(l);La(e)}function Lm(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 Ym(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 u=e[a];0<u.width&&0<u.height&&n++}n===1&&(t=t.style,t.display=e.length===1?"inline-block":"block",t.marginTop="-"+l.paddingTop,t.marginBottom="-"+l.paddingBottom)}}function Vm(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 gy(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 fo(t){var e=t.getBoundingClientRect(),l=getComputedStyle(t);return gy(e,l,t)}function vy(t){return t.documentElement.clientHeight}function yy(t){this.addEventListener("load",t),this.addEventListener("error",t)}function xy(t,e,l,n,a,u,c,h,g){var T=e.nodeType===9?e:e.ownerDocument;try{var C=T.startViewTransition({update:function(){var j=T.defaultView,O=j.navigation&&j.navigation.transition,L=T.fonts.status;n();var $=[];if(L==="loaded"&&(vy(T),T.fonts.status==="loading"&&$.push(T.fonts.ready)),L=$.length,t!==null)for(var st=t.suspenseyImages,_=0,b=0;b<st.length;b++){var z=st[b];if(!z.complete){var D=z.getBoundingClientRect();if(0<D.bottom&&0<D.right&&D.top<j.innerHeight&&D.left<j.innerWidth){if(_+=r0(z),_>ys){$.length=L;break}z=new Promise(yy.bind(z)),$.push(z)}}}if(0<$.length)return j=Promise.race([Promise.all($),new Promise(function(V){return setTimeout(V,500)})]).then(a,a),(O?Promise.allSettled([O.finished,j]):j).then(u,u);if(a(),O)return O.finished.then(u,u);u()},types:l});T.__reactViewTransition=C;var M=[];return C.ready.then(function(){for(var j=T.documentElement.getAnimations({subtree:!0}),O=0;O<j.length;O++){var L=j[O],$=L.effect,st=$.pseudoElement;if(st!=null&&st.startsWith("::view-transition")){M.push(L),L=$.getKeyframes();for(var _=st=void 0,b=!0,z=0;z<L.length;z++){var D=L[z],V=D.width;if(st===void 0)st=V;else if(st!==V){b=!1;break}if(V=D.height,_===void 0)_=V;else if(_!==V){b=!1;break}delete D.width,delete D.height,D.transform==="none"&&delete D.transform}b&&st!==void 0&&_!==void 0&&($.setKeyframes(L),b=getComputedStyle($.target,$.pseudoElement),b.width!==st||b.height!==_)&&(b=L[0],b.width=st,b.height=_,b=L[L.length-1],b.width=st,b.height=_,$.setKeyframes(L))}}c()},function(j){T.__reactViewTransition===C&&(T.__reactViewTransition=null);try{if(typeof j=="object"&&j!==null)switch(j.name){case"InvalidStateError":(j.message==="View transition was skipped because document visibility state is hidden."||j.message==="Skipping view transition because document visibility state has become hidden."||j.message==="Skipping view transition because viewport size changed."||j.message==="Transition was aborted because of invalid state")&&(j=null)}j!==null&&g(j)}finally{n(),a(),c()}}),C.finished.finally(function(){for(var j=0;j<M.length;j++)M[j].cancel();T.__reactViewTransition===C&&(T.__reactViewTransition=null),h()}),C}catch{return n(),a(),c(),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}:ut({},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 u=l[a].effect;u!==null&&u.target===t&&u.pseudoElement===e&&n.push(l[a])}return n},Xn.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Gm(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 Be(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}Be.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 u=this._eventListeners;if(Qm(u,t,e,l)===-1){var c=this,h=e;l!=null&&typeof l!="boolean"&&l.once===!0&&(h=function(g){c.removeEventListener(t,e,l),typeof e=="function"?e.call(this,g):e.handleEvent(g)}),n!==null&&(a=c.removeEventListener.bind(c,t,e,l),n.addEventListener("abort",a,{once:!0}),a=n.removeEventListener.bind(n,"abort",a)),n=wa(l),u.push({type:t,listener:e,optionsOrUseCapture:l,attachedListener:h,cleanup:a}),v(this._fragmentFiber.child,!1,by,t,h,n)}this._eventListeners=u}};function by(t,e,l,n){return q(t).addEventListener(e,l,n),!1}Be.prototype.removeEventListener=function(t,e,l){var n=this._eventListeners;if(n!==null&&(e=Qm(n,t,e,l),e!==-1)){var a=n[e];l=a.attachedListener;var u=a.cleanup;a=wa(a.optionsOrUseCapture),v(this._fragmentFiber.child,!1,Sy,t,l,a),n.splice(e,1),u!==null&&u()}};function Sy(t,e,l,n){return q(t).removeEventListener(e,l,n),!1}function wa(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function $m(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function Qm(t,e,l,n){if(t.length===0)return-1;n=$m(n);for(var a=0;a<t.length;a++){var u=t[a];if(u.type===e&&u.listener===l&&$m(u.optionsOrUseCapture)===n)return a}return-1}Be.prototype.dispatchEvent=function(t){var e=A(this._fragmentFiber);if(e===null)return!0;e=q(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 u=l[a];n.addEventListener(u.type,u.attachedListener,wa(u.optionsOrUseCapture))}if(e.appendChild(n),t=n.dispatchEvent(t),l)for(a=0;a<l.length;a++)u=l[a],n.removeEventListener(u.type,u.attachedListener,wa(u.optionsOrUseCapture));return e.removeChild(n),t}return e.dispatchEvent(t)},Be.prototype.focus=function(t){v(this._fragmentFiber.child,!0,Xm,t,void 0,void 0)};function Xm(t,e){return t.tag===6?!1:(t=q(t),My(t,e))}Be.prototype.focusLast=function(t){var e=[];v(this._fragmentFiber.child,!0,ho,e,void 0,void 0);for(var l=e.length-1;0<=l&&!Xm(e[l],t);l--);};function ho(t,e){return e.push(t),!1}Be.prototype.blur=function(){var t=A(this._fragmentFiber);t!==null&&(t=q(t),t=Du(t).activeElement,t!==null&&v(this._fragmentFiber.child,!1,jy,t,void 0,void 0))};function jy(t,e){return t.tag===6?!1:(t=q(t),t===e||t.contains(e)?(e.blur(),!0):!1)}Be.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),v(this._fragmentFiber.child,!1,_y,t,void 0,void 0)};function _y(t,e){return t.tag===6||(t=q(t),e.observe(t)),!1}Be.prototype.unobserveUsing=function(t){var e=this._observers;if(e!==null&&e.has(t)){e.delete(t),v(this._fragmentFiber.child,!1,Ty,t,void 0,void 0);for(var l=e=0;l<nl.length;l++){var n=nl[l];n.fragmentInstance===this&&n.observer===t?t.unobserve(n.instance):nl[e++]=n}nl.length=e}};function Ty(t,e){return t.tag===6||(t=q(t),e.unobserve(t)),!1}var nl=[],mo=!1;function Ey(t,e,l){nl.push({fragmentInstance:t,observer:e,instance:l}),mo||(mo=!0,wy(function(){mo=!1;var n=nl;nl=[];for(var a=0;a<n.length;a++){var u=n[a];u.observer.unobserve(u.instance)}}))}Be.prototype.getClientRects=function(){var t=[];return v(this._fragmentFiber.child,!1,Ny,t,void 0,void 0),t};function Ny(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=q(t),e.push.apply(e,t.getClientRects());return!1}Be.prototype.getRootNode=function(t){var e=A(this._fragmentFiber);return e===null?this:q(e).getRootNode(t)},Be.prototype.compareDocumentPosition=function(t){var e=A(this._fragmentFiber);if(e===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var l=[];v(this._fragmentFiber.child,!1,ho,l,void 0,void 0);var n=q(e);if(l.length===0){if(l=n,U(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=X(e)[1],l===null?a=Node.DOCUMENT_POSITION_PRECEDING:(t=q(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=q(l[0]),a=q(l[l.length-1]);var u=U(this._fragmentFiber)?e.parentElement:n;if(u==null)return Node.DOCUMENT_POSITION_DISCONNECTED;n=u.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY,u=u.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY;var c=e.compareDocumentPosition(t),h=a.compareDocumentPosition(t),g=c&Node.DOCUMENT_POSITION_CONTAINED_BY||h&Node.DOCUMENT_POSITION_CONTAINED_BY;return h=n&&u&&c&Node.DOCUMENT_POSITION_FOLLOWING&&h&Node.DOCUMENT_POSITION_PRECEDING,e=n&&e===t||u&&a===t||g||h?Node.DOCUMENT_POSITION_CONTAINED_BY:!n&&e===t||!u&&a===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:c,e&Node.DOCUMENT_POSITION_DISCONNECTED||e&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||zy(e,this._fragmentFiber,l[0],l[l.length-1],t)?e:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function zy(t,e,l,n,a){var u=En(a);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(l=!!u)t:{for(;u!==null;){if(u.tag===7&&(u===e||u.alternate===e)){l=!0;break t}u=u.return}l=!1}return l}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(u===null)return u=a.ownerDocument,a===u||a===u.documentElement||a===u.body;t:{for(u=e,e=A(e);u!==null;){if(!(u.tag!==5&&u.tag!==3&&u.tag!==27||u!==e&&u.alternate!==e)){u=!0;break t}u=u.return}u=!1}return u}return t&Node.DOCUMENT_POSITION_PRECEDING?((e=!!u)&&!(e=u===l)&&(e=Tt(l,u,K),e===null?e=!1:(v(e,!0,H,u,l),u=k,k=null,e=u!==null)),e):t&Node.DOCUMENT_POSITION_FOLLOWING?((e=!!u)&&!(e=u===n)&&(e=Tt(n,u,K),e===null?e=!1:(v(e,!0,Q,u,n),u=k,G=k=null,e=u!==null)),e):!1}function Zm(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)}Be.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(f(566));var e=[];v(this._fragmentFiber.child,!1,ho,e,void 0,void 0);var l=t!==!1;if(e.length===0){var n=X(this._fragmentFiber);if(n=l?n[1]||n[0]||A(this._fragmentFiber):n[0]||n[1],n===null)return;if(n.tag===6){t=q(n),Zm(t,l);return}if(n=q(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=q(a),Zm(a,l)):q(a).scrollIntoView(t),n+=l?-1:1}};function Oy(t,e){return t=q(t),Km(t,e),!1}function Km(t,e){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(e)}function Jm(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,wa(a.optionsOrUseCapture))}t.nodeType!==3&&(l=e._observers,l!==null&&l.forEach(function(u){for(var c=0,h=0;h<nl.length;h++){var g=nl[h];(g.fragmentInstance!==e||g.observer!==u||g.instance!==t)&&(nl[c++]=g)}nl.length=c,u.observe(t)}),Km(t,e))}function Ry(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,wa(a.optionsOrUseCapture))}t.nodeType!==3&&(l=e._observers,l!==null&&l.forEach(function(u){typeof u.rootMargin=="string"?Ey(e,u,t):u.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(e))}function po(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":po(l),ii(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function Cy(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[Ia])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(u=t.getAttribute("rel"),u==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(u!==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(u=t.getAttribute("src"),(u!==(a.src==null?null:a.src)||t.getAttribute("type")!==(a.type==null?null:a.type)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&u&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var u=a.name==null?null:""+a.name;if(a.type==="hidden"&&t.getAttribute("name")===u)return t}else return t;if(t=Je(t.nextSibling),t===null)break}return null}function Ay(t,e,l){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Je(t.nextSibling),t===null))return null;return t}function Im(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Je(t.nextSibling),t===null))return null;return t}function go(t){return t.data==="$?"||t.data==="$~"}function vo(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Dy(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 Je(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 yo=null;function Fm(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(e===0)return Je(t.nextSibling);e--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||e++}t=t.nextSibling}return null}function Wm(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 My(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 wy(t){km(function(){km(function(e){return t(e)})})}function Pm(t,e,l){switch(e=Du(l),t){case"html":if(t=e.documentElement,!t)throw Error(f(452));return t;case"head":if(t=e.head,!t)throw Error(f(453));return t;case"body":if(t=e.body,!t)throw Error(f(454));return t;default:throw Error(f(451))}}function t0(t,e,l){for(var n in l){var a=l[n];l.hasOwnProperty(n)&&a!=null&&zt(t,e,n,null,ry,a)}l.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===rl&&(t.onclick=null),ii(t)}function xo(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);ii(t)}var Ie=new Map,e0=new Set;function Mu(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 Bl=lt.d;lt.d={f:Uy,r:Hy,D:By,C:ky,L:qy,m:Ly,X:Vy,S:Yy,M:Gy};function Uy(){var t=Bl.f(),e=rs();return t||e}function Hy(t){var e=Pn(t);e!==null&&e.tag===5&&e.type==="form"?nh(e):Bl.r(t)}var Ua=typeof document>"u"?null:document;function l0(t,e,l){var n=Ua;if(n&&typeof e=="string"&&e){var a=Ve(e);a='link[rel="'+t+'"][href="'+a+'"]',typeof l=="string"&&(a+='[crossorigin="'+l+'"]'),e0.has(a)||(e0.add(a),t={rel:t,crossOrigin:l,href:e},n.querySelector(a)===null&&(e=n.createElement("link"),ce(e,"link",t),Wt(e),n.head.appendChild(e)))}}function By(t){Bl.D(t),l0("dns-prefetch",t,null)}function ky(t,e){Bl.C(t,e),l0("preconnect",t,e)}function qy(t,e,l){Bl.L(t,e,l);var n=Ua;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 u=a;switch(e){case"style":u=Ha(t);break;case"script":u=Ba(t)}if(!(Ie.has(u)||(t=ut({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),Ie.set(u,t),n.querySelector(a)!==null||e==="style"&&n.querySelector(wu(u))||e==="script"&&n.querySelector(Uu(u))))){var c=n.createElement("link");ce(c,"link",t),e==="style"&&(c[ui]=!0,c.onload=c.onerror=function(){pf(c)}),Wt(c),n.head.appendChild(c)}}}function Ly(t,e){Bl.m(t,e);var l=Ua;if(l&&t){var n=e&&typeof e.as=="string"?e.as:"script",a='link[rel="modulepreload"][as="'+Ve(n)+'"][href="'+Ve(t)+'"]',u=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ba(t)}if(!Ie.has(u)&&(t=ut({rel:"modulepreload",href:t},e),Ie.set(u,t),l.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Uu(u)))return}n=l.createElement("link"),ce(n,"link",t),Wt(n),l.head.appendChild(n)}}}function Yy(t,e,l){Bl.S(t,e,l);var n=Ua;if(n&&t){var a=ta(n).hoistableStyles,u=Ha(t);e=e||"default";var c=a.get(u);if(!c){var h={loading:0,preload:null};if(c=n.querySelector(wu(u)))h.loading=5;else{t=ut({rel:"stylesheet",href:t,"data-precedence":e},l),(l=Ie.get(u))&&bo(t,l);var g=c=n.createElement("link");Wt(g),ce(g,"link",t),g._p=new Promise(function(T,C){g.onload=T,g.onerror=C}),g.addEventListener("load",function(){h.loading|=1}),g.addEventListener("error",function(){h.loading|=2}),h.loading|=4,gs(c,e,n)}c={type:"stylesheet",instance:c,count:1,state:h},a.set(u,c)}}}function Vy(t,e){Bl.X(t,e);var l=Ua;if(l&&t){var n=ta(l).hoistableScripts,a=Ba(t),u=n.get(a);u||(u=l.querySelector(Uu(a)),u||(t=ut({src:t,async:!0},e),(e=Ie.get(a))&&So(t,e),u=l.createElement("script"),Wt(u),ce(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(a,u))}}function Gy(t,e){Bl.M(t,e);var l=Ua;if(l&&t){var n=ta(l).hoistableScripts,a=Ba(t),u=n.get(a);u||(u=l.querySelector(Uu(a)),u||(t=ut({src:t,async:!0,type:"module"},e),(e=Ie.get(a))&&So(t,e),u=l.createElement("script"),Wt(u),ce(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(a,u))}}function n0(t,e,l,n){var a=(a=Gl.current)?Mu(a):null;if(!a)throw Error(f(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Ha(l.href),e=ta(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=Ha(l.href);var u=ta(a).hoistableStyles,c=u.get(t);if(c||(a=a.ownerDocument||a,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,c),(u=a.querySelector(wu(t)))?u._p||(c.instance=u,c.state.loading=5):(u=Ie.get(t),u||(u={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ie.set(t,u)),$y(a,t,u,c.state))),e&&n===null)throw Error(f(528,""));return c}if(e&&n!==null)throw Error(f(529,""));return null;case"script":return e=l.async,l=l.src,typeof l=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(l=Ba(l),e=ta(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(f(444,t))}}function Ha(t){return'href="'+Ve(t)+'"'}function wu(t){return'link[rel="stylesheet"]['+t+"]"}function a0(t){return ut({},t,{"data-precedence":t.precedence,precedence:null})}function $y(t,e,l,n){if(e=t.querySelector('link[rel="preload"][as="style"]['+e+"]")){if(e[ui]!==!0){n.loading=1;return}}else e=t.createElement("link"),e[ui]=!0,e.onload=e.onerror=pf.bind(null,e),ce(e,"link",l),Wt(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 Ba(t){return'[src="'+Ve(t)+'"]'}function Uu(t){return"script[async]"+t}function u0(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,Wt(n),n;var a=ut({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(t.ownerDocument||t).createElement("style"),Wt(n),ce(n,"style",a),gs(n,l.precedence,t),e.instance=n;case"stylesheet":a=Ha(l.href);var u=t.querySelector(wu(a));if(u)return e.state.loading|=4,e.instance=u,Wt(u),u;n=a0(l),(a=Ie.get(a))&&bo(n,a),u=(t.ownerDocument||t).createElement("link"),Wt(u);var c=u;return c._p=new Promise(function(h,g){c.onload=h,c.onerror=g}),ce(u,"link",n),e.state.loading|=4,gs(u,l.precedence,t),e.instance=u;case"script":return u=Ba(l.src),(a=t.querySelector(Uu(u)))?(e.instance=a,Wt(a),a):(n=l,(a=Ie.get(u))&&(n=ut({},l),So(n,a)),t=t.ownerDocument||t,a=t.createElement("script"),Wt(a),ce(a,"link",n),t.head.appendChild(a),e.instance=a);case"void":return null;default:throw Error(f(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(n=e.instance,e.state.loading|=4,gs(n,l.precedence,t));return e.instance}function gs(t,e,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,u=a,c=0;c<n.length;c++){var h=n[c];if(h.dataset.precedence===e)u=h;else if(u!==a)break}u?u.parentNode.insertBefore(t,u.nextSibling):(e=l.nodeType===9?l.head:l,e.insertBefore(t,e.firstChild))}function bo(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function So(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var vs=null;function i0(t,e,l){if(vs===null){var n=new Map,a=vs=new Map;a.set(l,n)}else a=vs,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 u=l[a];if(!(u[Ia]||u[ne]||t==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var c=u.getAttribute(e)||"";c=t+c;var h=n.get(c);h?h.push(u):n.set(c,[u])}}return n}function jo(t,e,l){t=t.ownerDocument||t,t.head.insertBefore(l,e==="title"?t.querySelector("head > title"):null)}function Qy(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 s0(t,e){return t==="img"&&e.src!=null&&e.src!==""&&e.onLoad==null&&e.loading!=="lazy"}function c0(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function r0(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function o0(t,e){typeof e.decode=="function"&&(t.imgCount++,e.complete||(t.imgBytes+=r0(e),t.suspenseyImages.push(e)),t=Ky.bind(t),e.decode().then(t,t))}function Xy(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=Ha(n.href),u=e.querySelector(wu(a));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Hu.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=u,Wt(u);return}u=e.ownerDocument||e,n=a0(n),(a=Ie.get(a))&&bo(n,a),u=u.createElement("link"),Wt(u);var c=u;c._p=new Promise(function(h,g){c.onload=h,c.onerror=g}),ce(u,"link",n),l.instance=u}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,e),(e=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=Hu.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var ys=0;function Zy(t,e){return t.stylesheets&&t.count===0&&bs(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var n=setTimeout(function(){if(t.stylesheets&&bs(t,t.stylesheets),t.unsuspend){var u=t.unsuspend;t.unsuspend=null,u()}},6e4+e);0<t.imgBytes&&ys===0&&(ys=62500*fy());var a=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&bs(t,t.stylesheets),t.unsuspend)){var u=t.unsuspend;t.unsuspend=null,u()}},(t.imgBytes>ys?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function f0(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)bs(t,t.stylesheets);else if(t.unsuspend){var e=t.unsuspend;t.unsuspend=null,e()}}}function Hu(){this.count--,f0(this)}function Ky(){this.imgCount--,f0(this)}var xs=null;function bs(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,xs=new Map,e.forEach(Jy,t),xs=null,Hu.call(t))}function Jy(t,e){if(!(e.state.loading&4)){var l=xs.get(t);if(l)var n=l.get(null);else{l=new Map,xs.set(t,l);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<a.length;u++){var c=a[u];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(l.set(c.dataset.precedence,c),n=c)}n&&l.set(null,n)}a=e.instance,c=a.getAttribute("data-precedence"),u=l.get(c)||n,u===n&&l.set(null,a),l.set(c,a),this.count++,n=Hu.bind(this),a.addEventListener("load",n),a.addEventListener("error",n),u?u.parentNode.insertBefore(a,u.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(a,t.firstChild)),e.state.loading|=4}}var ka={$$typeof:Ft,Provider:null,Consumer:null,_currentValue:jl,_currentValue2:jl,_threadCount:0};function Iy(t,e,l,n,a,u,c,h,g){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=ec(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ec(0),this.hiddenUpdates=ec(null),this.identifierPrefix=n,this.onUncaughtError=a,this.onCaughtError=u,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=g,this.transitionTypes=null,this.incompleteTransitions=new Map}function d0(t,e,l,n,a,u,c,h,g,T,C,M){return t=new Iy(t,e,l,c,g,T,C,M,h),e=1,u===!0&&(e|=24),u=Se(3,null,null,e),t.current=u,u.stateNode=t,e=Hc(),e.refCount++,t.pooledCache=e,e.refCount++,u.memoizedState={element:n,isDehydrated:l,cache:e},Lc(u),t}function h0(t){return t?(t=oa,t):oa}function m0(t,e,l,n,a,u){a=h0(a),n.context===null?n.context=a:n.pendingContext=a,n=tn(e),n.payload={element:l},u=u===void 0?null:u,u!==null&&(n.callback=u),l=en(t,n,e),l!==null&&(Ee(l,t,e),hu(l,t,e))}function p0(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<e?l:e}}function _o(t,e){p0(t,e),(t=t.alternate)&&p0(t,e)}function g0(t){if(t.tag===13||t.tag===31){var e=Rn(t,67108864);e!==null&&Ee(e,t,67108864),_o(t,67108864)}}function v0(t){if(t.tag===13||t.tag===31){var e=He();e=lc(e);var l=Rn(t,e);l!==null&&Ee(l,t,e),_o(t,e)}}var qa=!0;function Fy(t,e,l,n){var a=Z.T;Z.T=null;var u=lt.p;try{lt.p=2,To(t,e,l,n)}finally{lt.p=u,Z.T=a}}function Wy(t,e,l,n){var a=Z.T;Z.T=null;var u=lt.p;try{lt.p=8,To(t,e,l,n)}finally{lt.p=u,Z.T=a}}function To(t,e,l,n){if(qa){var a=Eo(n);if(a===null)ao(t,e,n,Ss,l),x0(t,n);else if(tx(a,t,e,l,n))n.stopPropagation();else if(x0(t,n),e&4&&-1<Py.indexOf(t)){for(;a!==null;){var u=Pn(a);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var c=Tn(u.pendingLanes);if(c!==0){var h=u;for(h.pendingLanes|=2,h.entangledLanes|=2;c;){var g=1<<31-Re(c);h.entanglements[1]|=g,c&=~g}xl(u),(bt&6)===0&&(is=ze()+500,Ru(0))}}break;case 31:case 13:h=Rn(u,2),h!==null&&Ee(h,u,2),rs(),_o(u,2)}if(u=Eo(n),u===null&&ao(t,e,n,Ss,l),u===a)break;a=u}a!==null&&n.stopPropagation()}else ao(t,e,n,null,l)}}function Eo(t){return t=rc(t),No(t)}var Ss=null;function No(t){if(Ss=null,t=En(t),t!==null){var e=p(t);if(e===null)t=null;else{var l=e.tag;if(l===13){if(t=m(e),t!==null)return t;t=null}else if(l===31){if(t=y(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 Ss=t,null}function y0(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(fg()){case lf:return 2;case nf:return 8;case ti:case dg:return 32;case af:return 268435456;default:return 32}default:return 32}}var zo=!1,mn=null,pn=null,gn=null,Bu=new Map,ku=new Map,vn=[],Py="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 x0(t,e){switch(t){case"focusin":case"focusout":mn=null;break;case"dragenter":case"dragleave":pn=null;break;case"mouseover":case"mouseout":gn=null;break;case"pointerover":case"pointerout":Bu.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":ku.delete(e.pointerId)}}function qu(t,e,l,n,a,u){return t===null||t.nativeEvent!==u?(t={blockedOn:e,domEventName:l,eventSystemFlags:n,nativeEvent:u,targetContainers:[a]},e!==null&&(e=Pn(e),e!==null&&g0(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,a!==null&&e.indexOf(a)===-1&&e.push(a),t)}function tx(t,e,l,n,a){switch(e){case"focusin":return mn=qu(mn,t,e,l,n,a),!0;case"dragenter":return pn=qu(pn,t,e,l,n,a),!0;case"mouseover":return gn=qu(gn,t,e,l,n,a),!0;case"pointerover":var u=a.pointerId;return Bu.set(u,qu(Bu.get(u)||null,t,e,l,n,a)),!0;case"gotpointercapture":return u=a.pointerId,ku.set(u,qu(ku.get(u)||null,t,e,l,n,a)),!0}return!1}function b0(t){var e=En(t.target);if(e!==null){var l=p(e);if(l!==null){if(e=l.tag,e===13){if(e=m(l),e!==null){t.blockedOn=e,df(t.priority,function(){v0(l)});return}}else if(e===31){if(e=y(l),e!==null){t.blockedOn=e,df(t.priority,function(){v0(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 js(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var l=Eo(t.nativeEvent);if(l===null){l=t.nativeEvent;var n=new l.constructor(l.type,l);cc=n,l.target.dispatchEvent(n),cc=null}else return e=Pn(l),e!==null&&g0(e),t.blockedOn=l,!1;e.shift()}return!0}function S0(t,e,l){js(t)&&l.delete(e)}function ex(){zo=!1,mn!==null&&js(mn)&&(mn=null),pn!==null&&js(pn)&&(pn=null),gn!==null&&js(gn)&&(gn=null),Bu.forEach(S0),ku.forEach(S0)}function _s(t,e){t.blockedOn===e&&(t.blockedOn=null,zo||(zo=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,ex)))}var Ts=null;function j0(t){Ts!==t&&(Ts=t,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Ts===t&&(Ts=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(No(n||l)===null)continue;break}var u=Pn(l);u!==null&&(t.splice(e,3),e-=3,sr(u,{pending:!0,data:a,method:l.method,action:n},n,a))}}))}function La(t){function e(g){return _s(g,t)}mn!==null&&_s(mn,t),pn!==null&&_s(pn,t),gn!==null&&_s(gn,t),Bu.forEach(e),ku.forEach(e);for(var l=0;l<vn.length;l++){var n=vn[l];n.blockedOn===t&&(n.blockedOn=null)}for(;0<vn.length&&(l=vn[0],l.blockedOn===null);)b0(l),l.blockedOn===null&&vn.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var a=l[n],u=l[n+1],c=a[be]||null;if(typeof u=="function")c||j0(l);else if(c){var h=null;if(u&&u.hasAttribute("formAction")){if(a=u,c=u[be]||null)h=c.formAction;else if(No(a)!==null)continue}else h=c.action;typeof h=="function"?l[n+1]=h:(l.splice(n,3),n-=3),j0(l)}}}function _0(){function t(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(c){return a=c})},focusReset:"manual",scroll:"manual"})}function e(){a!==null&&(a(),a=null),n||setTimeout(l,20)}function l(){if(!n&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.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 Oo(t){this._internalRoot=t}Es.prototype.render=Oo.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(f(409));var l=e.current,n=He();m0(l,n,t,e,null,null)},Es.prototype.unmount=Oo.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;m0(t.current,2,null,t,null,null),rs(),e[Wn]=null}};function Es(t){this._internalRoot=t}Es.prototype.unstable_scheduleHydration=function(t){if(t){var e=ff();t={blockedOn:null,target:t,priority:e};for(var l=0;l<vn.length&&e!==0&&e<vn[l].priority;l++);vn.splice(l,0,t),l===0&&b0(t)}};var T0=r.version;if(T0!=="19.3.0")throw Error(f(527,T0,"19.3.0"));lt.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(f(188)):(t=Object.keys(t).join(","),Error(f(268,t)));return t=E(e),t=t!==null?N(t):null,t=t===null?null:t.stateNode,t};var lx={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:Z,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ns=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ns.isDisabled&&Ns.supportsFiber)try{Za=Ns.inject(lx),Oe=Ns}catch{}}return Yu.createRoot=function(t,e){if(!d(t))throw Error(f(299));var l=!1,n="",a=hh,u=mh,c=ph;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&&(u=e.onCaughtError),e.onRecoverableError!==void 0&&(c=e.onRecoverableError)),e=d0(t,1,!1,null,null,l,n,null,a,u,c,_0),t[Wn]=e.current,no(t),new Oo(e)},Yu.hydrateRoot=function(t,e,l){if(!d(t))throw Error(f(299));var n=!1,a="",u=hh,c=mh,h=ph,g=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(a=l.identifierPrefix),l.onUncaughtError!==void 0&&(u=l.onUncaughtError),l.onCaughtError!==void 0&&(c=l.onCaughtError),l.onRecoverableError!==void 0&&(h=l.onRecoverableError),l.formState!==void 0&&(g=l.formState)),e=d0(t,1,!0,e,l??null,n,a,g,u,c,h,_0),e.context=h0(null),l=e.current,n=He(),n=lc(n),a=tn(n),a.callback=null,en(l,a,n),l=n,e.current.lanes=l,Ja(e,l),xl(e),t[Wn]=e.current,no(t),new Es(e)},Yu.version="19.3.0",Yu}var w0;function dx(){if(w0)return Co.exports;w0=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(),Co.exports=fx(),Co.exports}var hx=dx(),R=Zo();/**
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 fp=(...i)=>i.filter((r,o,f)=>!!r&&r.trim()!==""&&f.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 mx=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 px=i=>i.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,f)=>f?f.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 U0=i=>{const r=px(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 gx={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 vx=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 yx=R.forwardRef(({color:i="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:f,className:d="",children:p,iconNode:m,...y},x)=>R.createElement("svg",{ref:x,...gx,width:r,height:r,stroke:i,strokeWidth:f?Number(o)*24/Number(r):o,className:fp("lucide",d),...!p&&!vx(y)&&{"aria-hidden":"true"},...y},[...m.map(([E,N])=>R.createElement(E,N)),...Array.isArray(p)?p:[p]]));/**
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 Le=(i,r)=>{const o=R.forwardRef(({className:f,...d},p)=>R.createElement(yx,{ref:p,iconNode:r,className:fp(`lucide-${mx(U0(i))}`,`lucide-${i}`,f),...d}));return o.displayName=U0(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 xx=[["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"}]],dp=Le("external-link",xx);/**
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 bx=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],Sx=Le("file-diff",bx);/**
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 jx=[["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"}]],_x=Le("git-pull-request",jx);/**
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 Tx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Ex=Le("info",Tx);/**
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 Nx=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],zx=Le("menu",Nx);/**
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 Ox=[["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"}]],Rx=Le("message-circle-question-mark",Ox);/**
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 Cx=[["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"}]],Ax=Le("moon",Cx);/**
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 Dx=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Mx=Le("plus",Dx);/**
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 wx=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],Uo=Le("scroll-text",wx);/**
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 Ux=[["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"}]],Hx=Le("settings",Ux);/**
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 Bx=[["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"}]],H0=Le("shield-check",Bx);/**
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 kx=[["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"}]],qx=Le("sun",kx);/**
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 Lx=[["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"}]],B0=Le("triangle-alert",Lx);function ul(i){const r=Math.abs(i);return`$${r===0?"0.000":r<.01?i.toFixed(3):i.toFixed(2)}`}const k0=new Set(["VERIFIED","ALREADY_SATISFIED"]),Yx=i=>{if(typeof i.verdict!="string")return i.verdict;const r=i.verdict.trim().toUpperCase();return i.attested===!1?k0.has(r)?"UNVERIFIED":`${i.verdict} (unattested)`:k0.has(r)?i.sig_checked===!1?`${r} (signature not checked)`:r:i.verdict},Ku=()=>globalThis.LOKI_CONTROL_BASE??"",q0="loki-control-token";function xe(){var i,r;try{const o=/[#&]token=([^&]+)/.exec(((i=globalThis.location)==null?void 0:i.hash)??"");return o!=null&&o[1]&&(sessionStorage.setItem(q0,decodeURIComponent(o[1])),(r=globalThis.history)==null||r.replaceState(null,"",globalThis.location.pathname+globalThis.location.search)),sessionStorage.getItem(q0)}catch{return null}}const Ju=(i={})=>{const r=xe();return r?{...i,authorization:`Bearer ${r}`}:i};async function Ko(i){const r=await fetch(`${Ku()}${i}`,{headers:Ju()});if(!r.ok)throw new Error(`${i}: HTTP ${r.status}`);return await r.json()}function Vl(i={}){const r=new URLSearchParams;for(const[f,d]of Object.entries(i))d&&r.set(f,d);const o=r.toString();return Ko(`/v1/runs${o?`?${o}`:""}`)}function Vs(i,r){return Ko(`/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}`)}async function hp(i,r,o){const f=await fetch(`${Ku()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}/answer`,{method:"POST",headers:Ju({"content-type":"application/json"}),body:JSON.stringify({answer:o})}),d=await f.json();if(!f.ok)throw new Error(d.error??`HTTP ${f.status}`);return{path:d.path??"",resume:d.resume??""}}async function mp(i,r){const o=await fetch(`${Ku()}${i}`,{method:"POST",headers:Ju({"content-type":"application/json"}),body:JSON.stringify(r)}),f=await o.json().catch(()=>({}));if(!o.ok)throw new Error(f.error??`HTTP ${o.status}`);return f}const Vx=()=>mp("/v1/import",{}),pp=()=>Ko("/v1/repos");function gp(i,r=3e3){const o=new AbortController,f=d=>new Promise(p=>{const m=setTimeout(p,d);o.signal.addEventListener("abort",()=>{clearTimeout(m),p()},{once:!0})});return(async()=>{for(;!o.signal.aborted;){try{const d=await fetch(`${Ku()}/v1/stream`,{headers:Ju({accept:"text/event-stream"}),signal:o.signal});if(d.ok&&d.body){const p=d.body.getReader(),m=new TextDecoder;let y="";for(;;){const{value:x,done:E}=await p.read();if(E)break;y+=m.decode(x,{stream:!0});const N=y.split(`
155
-
156
- `);y=N.pop()??"",N.some(v=>/^event: run$/m.test(v))&&i()}}}catch{}await f(r)}})(),()=>o.abort()}const Gx=(i,r)=>mp("/v1/start",{target:i,repo:r});async function $x(i,r){const o=await fetch(`${Ku()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}`,{method:"DELETE",headers:Ju({"content-type":"application/json"})}),f=await o.json().catch(()=>({}));if(!o.ok)throw new Error(f.error??`HTTP ${o.status}`);return{ok:!0,removed:f.removed??{runs:0,events:0,sources:0},remaining_runs:f.remaining_runs??0}}const w=i=>`var(--cp-${i})`,Qx=(...i)=>i.filter(Boolean).join(" ")||void 0,vp={success:w("success-muted"),warning:w("warning-muted"),error:w("error-muted"),info:w("info-muted"),neutral:w("bg-3")},Jo={success:w("success-ink"),warning:w("warning-ink"),error:w("error-ink"),info:w("info-ink"),neutral:w("text-2")};function qt({interactive:i,compact:r,style:o,className:f,children:d,...p}){return s.jsx("div",{...p,"data-cp":"card","data-interactive":i?"true":void 0,className:Qx("cp-card",f),style:{background:w("card"),border:`1px solid ${w("border")}`,borderRadius:w("radius-lg"),padding:r?10:16,transition:`transform ${w("dur-fast")} ${w("ease")}, box-shadow ${w("dur-fast")} ${w("ease")}`,...i?{cursor:"pointer",boxShadow:w("shadow-sm")}:null,...o},children:d})}function bl({label:i,value:r,icon:o,trend:f,trendTone:d="neutral",series:p,compact:m}){const y=p&&p.length>1?p:null;let x=null;if(y){const E=Math.min(...y),N=Math.max(...y),v=N-E||1,A=y.map((U,X)=>`${X?"L":"M"}${(X/(y.length-1)*80).toFixed(1)} ${(22-(U-E)/v*20).toFixed(1)}`).join(" ");x=s.jsx("svg",{"data-cp":"sparkline",width:80,height:24,viewBox:"0 0 80 24","aria-hidden":"true",children:s.jsx("path",{d:A,fill:"none",stroke:w("accent"),strokeWidth:1.5})})}return s.jsxs(qt,{"data-cp-kind":"kpi",style:{padding:m?"10px 12px":"14px 16px",display:"flex",gap:10,alignItems:"center"},children:[o?s.jsx("span",{style:{width:28,height:28,borderRadius:6,background:w("accent-muted"),color:w("accent"),display:"inline-flex",alignItems:"center",justifyContent:"center"},children:o}):null,s.jsxs("div",{style:{flex:1,minWidth:0},children:[s.jsx("div",{style:{fontSize:w("text-sm"),color:w("text-2")},children:i}),s.jsx("div",{style:{fontFamily:w("font-mono"),fontSize:m?20:28,fontWeight:500,lineHeight:1.2},children:r})]}),f?s.jsx("span",{style:{fontSize:11,borderRadius:3,padding:"1px 6px",background:vp[d],color:Jo[d]},children:f}):null,x]})}const Xx={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"},pt={VERIFIED:"VERIFIED",PARTIAL:"PARTIAL",FAILED:"FAILED",SPEC_CONFLICT:"SPEC_CONFLICT",BLOCKED:"BLOCKED",TAMPERED:"TAMPERED",UNVERIFIED:"UNVERIFIED",VERIFIED_UNCHECKED:"VERIFIED (signature not checked)",RUNNING:"running"},Zx=[pt.VERIFIED,pt.VERIFIED_UNCHECKED,pt.UNVERIFIED,pt.TAMPERED,pt.PARTIAL,pt.FAILED,pt.SPEC_CONFLICT];function Ye(i){var r;return i?i.tampered===!0||i.integrity===pt.TAMPERED||((r=i.receipt)==null?void 0:r.verdict)===pt.TAMPERED||i.verdict===pt.TAMPERED?pt.TAMPERED:Yx({verdict:i.verdict??null,attested:i.attested??void 0,sig_checked:i.sig_checked??void 0}):null}const Va=i=>Ye(i)===pt.VERIFIED;function wt({tone:i="neutral",pulse:r,children:o,...f}){return s.jsxs("span",{...f,"data-cp":"badge","data-tone":i,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:w("radius-sm"),fontSize:w("text-xs"),textTransform:"uppercase",letterSpacing:"0.025em",fontWeight:500,background:vp[i],color:Jo[i],...f.style},children:[r?s.jsx("span",{className:"cp-pulse","aria-hidden":"true",style:{width:6,height:6,borderRadius:"50%",background:"currentColor"}}):null,o]})}function il({verdict:i,run:r,style:o}){const f=r?Ye(r):i??null;return f?s.jsx(wt,{tone:Xx[f]??"neutral",pulse:f===pt.RUNNING,"data-verdict":f,title:o?f:void 0,style:o,children:f}):s.jsx(wt,{pulse:!0,style:o,children:"running"})}const Kx={active:w("success-fill"),idle:w("text-muted"),paused:w("warning-fill"),error:w("error-fill")};function yp({state:i="idle",label:r}){return s.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:Kx[i]}})}const Jx={primary:{background:w("accent-solid"),color:"#ffffff",border:"1px solid transparent"},secondary:{background:w("bg-3"),color:w("text"),border:`1px solid ${w("border")}`},ghost:{background:"transparent",color:w("text-2"),border:"1px solid transparent"},danger:{background:w("error"),color:"#ffffff",border:"1px solid transparent"}};function Bt({variant:i="primary",size:r="md",style:o,type:f="button",...d}){const p=r==="sm"?"4px 8px":r==="lg"?"12px 18px":"8px 12px";return s.jsx("button",{...d,type:f,"data-cp":"button","data-variant":i,"data-size":r,style:{padding:p,borderRadius:w("radius-md"),fontSize:w(r==="sm"?"text-base":"text-md"),fontWeight:500,cursor:d.disabled?"not-allowed":"pointer",opacity:d.disabled?.5:1,...Jx[i],...o}})}const xp={background:w("bg-3"),border:`1px solid ${w("border")}`,borderRadius:w("radius-md"),padding:"8px 12px",fontSize:w("text-md"),color:w("text"),width:"100%",fontFamily:"inherit"};function Qa({style:i,onFocus:r,onBlur:o,...f}){const[d,p]=R.useState(!1);return s.jsx("input",{...f,"data-cp":"input",onFocus:m=>{p(!0),r==null||r(m)},onBlur:m=>{p(!1),o==null||o(m)},style:{...xp,...d?{borderColor:w("accent"),boxShadow:w("focus"),outline:"none"}:null,...i}})}function bp({style:i,onFocus:r,onBlur:o,...f}){const[d,p]=R.useState(!1);return s.jsx("textarea",{...f,"data-cp":"textarea",onFocus:m=>{p(!0),r==null||r(m)},onBlur:m=>{p(!1),o==null||o(m)},style:{...xp,resize:"vertical",...d?{borderColor:w("accent"),boxShadow:w("focus"),outline:"none"}:null,...i}})}function Zn({label:i,value:r,icon:o,options:f,onSelect:d}){const[p,m]=R.useState(!1),y=R.useId();return s.jsxs("span",{style:{position:"relative",display:"inline-block"},children:[s.jsxs("button",{type:"button","data-cp":"chip","aria-haspopup":f?"menu":void 0,"aria-expanded":f?p:void 0,"aria-controls":f&&p?y:void 0,onClick:()=>f&&m(x=>!x),style:{display:"inline-flex",alignItems:"center",gap:6,borderRadius:999,padding:"4px 10px",fontSize:w("text-base"),background:w("card"),border:`1px solid ${w("border")}`,color:w("text"),cursor:"pointer"},children:[o,s.jsx("span",{style:{color:w("text-2")},children:i}),r?s.jsx("span",{style:{fontWeight:500},children:r}):null]}),f&&p?s.jsx("div",{id:y,role:"menu",style:{position:"absolute",top:"100%",left:0,marginTop:4,minWidth:140,zIndex:400,background:w("bg"),border:`1px solid ${w("border")}`,borderRadius:w("radius-lg"),boxShadow:w("shadow-lg"),padding:4},children:f.map(x=>s.jsx("button",{role:"menuitem",type:"button",onClick:()=>{d==null||d(x.value),m(!1)},style:{display:"block",width:"100%",textAlign:"left",padding:"6px 10px",borderRadius:w("radius-md"),background:"transparent",border:0,color:w("text"),fontSize:w("text-base"),cursor:"pointer"},children:x.label},x.value))}):null]})}function jn({columns:i,rows:r,caption:o}){return s.jsx(qt,{style:{padding:0,overflow:"auto"},children:s.jsxs("table",{"data-cp":"table",style:{width:"100%",borderCollapse:"collapse",fontSize:w("text-base")},children:[o?s.jsx("caption",{style:{position:"absolute",left:-9999},children:o}):null,s.jsx("thead",{children:s.jsx("tr",{children:i.map(f=>s.jsx("th",{scope:"col",style:{textAlign:"left",padding:"10px 14px",fontSize:w("text-sm"),fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em",color:w("text-2"),background:w("bg-3")},children:f},f))})}),s.jsx("tbody",{children:r.map((f,d)=>s.jsx("tr",{style:{borderTop:`1px solid ${w("border-light")}`},children:f.map((p,m)=>s.jsx("td",{style:{padding:"10px 14px"},children:p},m))},d))})]})})}function Sp({active:i,icon:r,children:o,href:f,onClick:d}){const p={position:"relative",display:"flex",alignItems:"center",gap:8,padding:"8px 12px",borderRadius:w("radius-nav"),fontSize:w("text-md"),fontWeight:500,textDecoration:"none",cursor:"pointer",border:0,width:"100%",textAlign:"left",background:i?w("accent-glow"):"transparent",color:w(i?"accent-ink":"text-2")},m=s.jsxs(s.Fragment,{children:[i?s.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:w("accent")}}):null,r,s.jsx("span",{children:o})]});return f?s.jsx("a",{"data-cp":"nav-item","data-active":i?"true":void 0,"aria-current":i?"page":void 0,href:f,onClick:d,style:p,children:m}):s.jsx("button",{type:"button","data-cp":"nav-item","data-active":i?"true":void 0,"aria-current":i?"page":void 0,onClick:d,style:p,children:m})}function Ix({children:i}){return s.jsx("div",{"data-cp":"group-head",style:{fontSize:9.5,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.09em",color:w("text-subtle"),padding:"4px 12px 5px"},children:i})}function Fx({stages:i}){return s.jsx("ol",{"data-cp":"timeline",style:{listStyle:"none",margin:0,padding:0},children:i.map((r,o)=>s.jsxs("li",{"data-status":r.status,style:{display:"flex",gap:10,position:"relative",paddingBottom:o===i.length-1?0:14},children:[s.jsxs("span",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[s.jsx("span",{style:{width:10,height:10,borderRadius:"50%",background:r.status==="pending"?w("bg-3"):r.status==="neutral"?w("text-muted"):w(`${r.status}-fill`),border:`1px solid ${w("border")}`}}),o<i.length-1?s.jsx("span",{style:{flex:1,width:1,background:w("border")}}):null]}),s.jsxs("span",{style:{fontSize:w("text-base")},children:[r.label,r.duration?s.jsx("span",{style:{marginLeft:8,fontFamily:w("font-mono"),color:w("text-2")},children:r.duration}):null]})]},`${r.label}-${o}`))})}function ql({icon:i,title:r,meta:o,children:f,expandable:d,defaultOpen:p}){const[m,y]=R.useState(!!p),x=R.useId();return s.jsxs("div",{"data-cp":"message",style:{display:"flex",gap:12,padding:"8px 0"},children:[s.jsx("span",{style:{width:32,height:32,borderRadius:8,flex:"none",background:w("bg-3"),color:w("text-2"),display:"inline-flex",alignItems:"center",justifyContent:"center"},children:i}),s.jsxs("div",{style:{flex:1,minWidth:0},children:[s.jsx("div",{style:{fontSize:w("text-md")},children:r}),o?s.jsx("div",{style:{fontFamily:w("font-mono"),fontSize:w("text-sm"),color:w("text-2")},children:o}):null,d?s.jsxs(s.Fragment,{children:[s.jsx("button",{type:"button","aria-expanded":m,"aria-controls":x,onClick:()=>y(E=>!E),style:{background:"transparent",border:0,padding:0,marginTop:4,color:w("accent"),fontSize:w("text-base"),cursor:"pointer"},children:m?"Hide details":"Show details"}),m?s.jsx(qt,{id:x,style:{marginTop:6},children:f}):null]}):f]})]})}function Lt({title:i,hint:r,action:o}){return s.jsxs("div",{"data-cp":"empty-state",style:{textAlign:"center",padding:"var(--cp-space-3xl) var(--cp-space-xl)",color:w("text-2")},children:[s.jsx("div",{style:{fontFamily:w("font-serif"),fontSize:w("text-2xl"),color:w("text")},children:i}),r?s.jsx("div",{style:{marginTop:8,fontSize:w("text-md")},children:r}):null,o?s.jsx("div",{style:{marginTop:16},children:o}):null]})}function It({size:i=16,label:r="Loading"}){return s.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 ${w("border")}`,borderTopColor:w("accent")}})}function Wx({tone:i="neutral",children:r,onClose:o}){return s.jsxs("div",{role:i==="error"?"alert":"status","data-cp":"toast","data-tone":i,style:{position:"fixed",right:16,bottom:16,zIndex:600,display:"flex",gap:12,alignItems:"center",background:w("bg"),border:`1px solid ${w("border")}`,borderLeft:`3px solid ${Jo[i]}`,borderRadius:w("radius-lg"),boxShadow:w("shadow-lg"),padding:"10px 14px",fontSize:w("text-md"),color:w("text")},children:[s.jsx("span",{children:r}),o?s.jsx("button",{type:"button","aria-label":"Dismiss",onClick:o,style:{background:"transparent",border:0,color:w("text-2"),cursor:"pointer"},children:"x"}):null]})}function Px(i,r){const o=R.useRef(null);return R.useEffect(()=>{var p;if(!i)return;const f=document.activeElement;(p=o.current)==null||p.focus();const d=m=>{m.key==="Escape"&&r()};return document.addEventListener("keydown",d),()=>{var m;document.removeEventListener("keydown",d),(m=f==null?void 0:f.focus)==null||m.call(f)}},[i,r]),o}function jp({open:i,title:r,onClose:o,side:f="right",children:d}){const p=Px(i,o),m=R.useId();return i?s.jsx("div",{"data-cp":"drawer-backdrop",onClick:o,style:{position:"fixed",inset:0,zIndex:300,background:"rgba(0,0,0,0.3)"},children:s.jsxs("aside",{ref:p,role:"dialog","aria-modal":"true","aria-labelledby":m,tabIndex:-1,"data-cp":"drawer","data-side":f,onClick:y=>y.stopPropagation(),style:{position:"absolute",top:0,bottom:0,[f]:0,width:"min(var(--cp-detail-w, 288px), 92vw)",background:w("bg"),color:w("text"),borderLeft:f==="right"?`1px solid ${w("border")}`:void 0,borderRight:f==="left"?`1px solid ${w("border")}`:void 0,boxShadow:w("shadow-lg"),padding:16,overflow:"auto"},children:[s.jsx("h2",{id:m,style:{margin:"0 0 12px",fontFamily:w("font-serif"),fontWeight:400,fontSize:"1.15rem"},children:r}),d]})}):null}function _p({children:i}){return s.jsx("kbd",{"data-cp":"kbd",style:{fontFamily:w("font-mono"),fontSize:w("text-sm"),padding:"1px 5px",borderRadius:w("radius-md"),background:w("bg-3"),border:`1px solid ${w("border")}`,color:w("text-2")},children:i})}const Yl="unmeasured",L0=3e3,t1=["intake","plan","Wall","implement","verify","seal","PR"];function e1(i,r){const o=new Set,f=m=>i.find(y=>!o.has(y)&&y.stage.toLowerCase().includes(m.toLowerCase())),d=(m,y)=>{if(!y)return{name:m,status:"pending",elapsed_s:null};o.add(y);const x=y.started_at?Date.parse(y.started_at):NaN,E=y.ended_at?Date.parse(y.ended_at):y.status==="started"?r:NaN,N=Number.isNaN(x)||Number.isNaN(E)?null:Math.max(0,(E-x)/1e3),v=y.status==="started"?"running":y.status==="completed"?"done":"failed";return{name:m,status:v,elapsed_s:N}},p=t1.map(m=>d(m,f(m)));for(const m of i)o.has(m)||p.push(d(m.stage,m));return p}const l1=i=>i===null?Yl:i>=60?`${Math.floor(i/60)}m ${Math.floor(i%60)}s`:`${i.toFixed(1)}s`,Tp=i=>i.cost_usd!==null&&i.cost_usd!==void 0?ul(i.cost_usd):i.partial_usd?`at least ${ul(i.partial_usd)} (rest ${Yl})`:Yl;function Ep(i,r,o){const[f,d]=R.useState({data:null,error:null});return R.useEffect(()=>{let p=!0,m;const y=()=>i().then(x=>{p&&(d({data:x,error:null}),o(x)&&(m=setTimeout(y,L0)))},x=>{p&&(d(E=>({data:E.data,error:x.message})),m=setTimeout(y,L0))});return y(),()=>{p=!1,clearTimeout(m)}},r),f}const Kn="rounded border border-slate-200 p-4 dark:border-slate-800",n1={pending:"text-slate-400",running:"text-sky-600 dark:text-sky-400",done:"text-emerald-600 dark:text-emerald-400",failed:"text-red-600"},a1=i=>i&&/^https?:\/\//.test(i)?i:null;function Np({source:i,run:r}){const{data:o,error:f}=Ep(()=>Vs(i,r),[i,r],E=>E.status==="running"),[,d]=R.useState(0),p=(o==null?void 0:o.status)==="running";if(R.useEffect(()=>{if(!p)return;const E=setInterval(()=>d(N=>N+1),1e3);return()=>clearInterval(E)},[p]),f&&!o)return s.jsxs("p",{role:"alert",className:"text-red-600",children:["Could not load run: ",f]});if(!o)return s.jsx("p",{className:"text-slate-500",children:"Loading run"});const m=e1(o.stages??[],Date.now()),y=o.files_touched??[],x=a1(o.pr_url);return s.jsxs("section",{"data-testid":"live-run",className:"space-y-4",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[s.jsx("h1",{className:"text-xl font-semibold",children:p?"Live run":"Run finished"}),s.jsx("span",{className:"break-all font-mono text-xs text-slate-500",children:o.run_id})]}),s.jsxs("div",{className:Kn,children:[s.jsx("h2",{className:"mb-2 text-sm font-semibold uppercase text-slate-500",children:"Stages"}),s.jsx("ol",{className:"space-y-2 text-sm",children:m.map(E=>s.jsxs("li",{"data-testid":"live-stage","data-status":E.status,className:"flex flex-wrap items-center justify-between gap-x-4",children:[s.jsx("span",{className:"font-medium",children:E.name}),s.jsxs("span",{className:n1[E.status],children:[E.status,", ",E.status==="pending"?"not started":l1(E.elapsed_s),", limit ",Yl]})]},E.name))})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[s.jsxs("div",{className:Kn,children:[s.jsx("h2",{className:"mb-1 text-sm font-semibold uppercase text-slate-500",children:"Diff"}),s.jsxs("p",{"data-testid":"live-diff",children:[y.length," files, +/- ",Yl]})]}),s.jsxs("div",{className:Kn,children:[s.jsx("h2",{className:"mb-1 text-sm font-semibold uppercase text-slate-500",children:"Cost so far"}),s.jsx("p",{"data-testid":"live-cost",children:Tp(o)})]}),s.jsxs("div",{className:Kn,children:[s.jsx("h2",{className:"mb-1 text-sm font-semibold uppercase text-slate-500",children:"Model"}),s.jsx("p",{"data-testid":"live-model",children:o.model??Yl})]})]}),!p&&s.jsxs("div",{"data-testid":"live-outcome",className:Kn,children:[s.jsx("h2",{className:"mb-1 text-sm font-semibold uppercase text-slate-500",children:"Outcome"}),s.jsx("p",{className:`text-lg font-medium${o.tampered?" text-red-600":""}`,children:Ye(o)??Yl}),s.jsxs("p",{className:"mt-1 flex flex-wrap gap-4 text-sm",children:[x?s.jsx("a",{"data-testid":"live-pr",href:x,target:"_blank",rel:"noreferrer",className:"text-sky-600 hover:underline dark:text-sky-400",children:"Pull request"}):s.jsx("span",{"data-testid":"live-pr",className:"text-slate-500",children:"no PR"}),o.receipt?s.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)"]}):s.jsx("span",{"data-testid":"live-receipt",className:"text-slate-500",children:"no receipt"})]})]}),s.jsx("a",{href:"#/overview",className:"inline-block py-2 text-sm text-sky-600 hover:underline dark:text-sky-400",children:"Overview"})]})}function u1(i,r){const o=new Date(r);o.setUTCHours(0,0,0,0);const f=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 p of i){const m=p.started_at?Date.parse(p.started_at):NaN;Number.isNaN(m)||(m>=f&&d.today++,m>=f-6*864e5&&d.week++);const y=Ye(p);y===pt.VERIFIED?d.verified++:y===pt.VERIFIED_UNCHECKED?d.unchecked++:y===pt.PARTIAL?d.partial++:y===pt.FAILED?d.failed++:y?d.other++:d.running++,p.cost_usd!==null&&p.cost_usd!==void 0?d.costUsd+=p.cost_usd:(d.unmeasuredRuns++,d.costUsd+=p.partial_usd??0),p.pr_url&&d.prsOpened++}return d.last=[...i].sort((p,m)=>Date.parse(m.started_at??"")-Date.parse(p.started_at??"")).slice(0,10),d}function kl({id:i,label:r,value:o}){return s.jsxs("div",{className:Kn,children:[s.jsx("div",{className:"text-xs uppercase text-slate-500",children:r}),s.jsx("div",{"data-testid":i,className:"mt-1 text-lg font-semibold",children:o})]})}function i1({runs:i,now:r=Date.now()}){const o=u1(i,r),f=o.unmeasuredRuns===0?`${ul(o.costUsd)}`:`${ul(o.costUsd)} measured, ${o.unmeasuredRuns} run${o.unmeasuredRuns===1?"":"s"} ${Yl}`;return s.jsxs("section",{"data-testid":"overview",className:"space-y-4",children:[s.jsx("h1",{className:"text-xl font-semibold",children:"Overview"}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[s.jsx(kl,{id:"ov-today",label:"Runs today",value:String(o.today)}),s.jsx(kl,{id:"ov-week",label:"Runs, last 7 days",value:String(o.week)}),s.jsx(kl,{id:"ov-verified",label:pt.VERIFIED,value:String(o.verified)}),s.jsx(kl,{id:"ov-unchecked",label:"Signature not checked",value:String(o.unchecked)}),s.jsx(kl,{id:"ov-partial",label:pt.PARTIAL,value:String(o.partial)}),s.jsx(kl,{id:"ov-failed",label:pt.FAILED,value:String(o.failed)}),s.jsx(kl,{id:"ov-cost",label:"Total cost",value:f}),s.jsx(kl,{id:"ov-pr-opened",label:"PRs opened",value:String(o.prsOpened)}),s.jsx(kl,{id:"ov-pr-merged",label:"PRs merged",value:Yl})]}),s.jsxs("div",{className:Kn,children:[s.jsx("h2",{className:"mb-2 text-sm font-semibold uppercase text-slate-500",children:"Last 10 runs"}),s.jsx("ul",{className:"space-y-1 text-sm",children:o.last.map(d=>s.jsxs("li",{"data-testid":"ov-run",className:"flex flex-wrap justify-between gap-x-4",children:[s.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}),s.jsxs("span",{className:d.tampered?"text-red-600":void 0,children:[Ye(d)??"in progress",", ",Tp(d)]})]},`${d.source_id}/${d.run_id}`))})]})]})}function zp({fallback:i,overview:r}){const{data:o}=Ep(()=>Vl(),[],d=>d.runs.some(p=>p.status==="running"));if(!o)return s.jsx("p",{className:"text-slate-500",children:"Loading runs"});if(o.runs.length===0)return s.jsx(s.Fragment,{children:i});const f=o.runs.find(d=>d.status==="running");return f&&!r?s.jsx(Np,{source:f.source_id,run:f.run_id}):s.jsx(i1,{runs:o.runs})}const Gs=new Map,Vo=new Set;let Op=0;const Rp=()=>{Op++;for(const i of Vo)i()};function qe(i){Gs.set(i.id,i),Rp()}function Y0(i){Gs.delete(i)&&Rp()}const Cp=()=>[...Gs.values()],s1=()=>Cp().filter(i=>i.inSettings),Ap=i=>(Vo.add(i),()=>{Vo.delete(i)}),Hs=()=>Op;function Ga(i){const o=(i.replace(/^#/,"").split("?")[0]??"").replace(/\/+$/,"");return o===""?"/":o.startsWith("/")?o:`/${o}`}function c1(i,r){const o=i.split("/").filter(Boolean),f=r.split("/").filter(Boolean);if(o.length!==f.length)return null;const d={};for(let p=0;p<o.length;p++){const m=o[p];if(m.startsWith(":"))try{d[m.slice(1)]=decodeURIComponent(f[p])}catch{return null}else if(m!==f[p])return null}return d}function r1(i){const r=Ga(i);let o=null;for(const f of Gs.values()){const d=c1(f.path,r);if(!d)continue;const p=f.path.split("/").filter(m=>m&&!m.startsWith(":")).length;(!o||p>o.score)&&(o={page:f,params:d,score:p})}return o?{page:o.page,params:o.params}:null}async function o1(i){const r=globalThis.LOKI_CONTROL_BASE??"",o=xe(),f=await fetch(`${r}/v1/stats/cost?group=${i}`,{headers:o?{authorization:`Bearer ${o}`}:{}});if(!f.ok)throw new Error(`/v1/stats/cost: HTTP ${f.status}`);return await f.json()}const Jn=ul,zs=i=>i.toLocaleString("en-US"),V0=[{value:"day",label:"Day"},{value:"model",label:"Model"},{value:"repo",label:"Repo"},{value:"provider",label:"Provider"}];function f1({budget:i}){const r=o=>`${o} run${o===1?"":"s"}`;return s.jsxs(qt,{"data-testid":"cost-budget",style:{display:"flex",flexDirection:"column",gap:6},children:[s.jsxs("div",{"data-testid":"cost-budget-subscription",children:[s.jsx(wt,{tone:"info",children:"Subscription runs"})," ","no cap (",r(i.subscription_runs),"): usage counts against your plan limits, no dollar figure is measured."]}),s.jsxs("div",{"data-testid":"cost-budget-api",children:[s.jsx(wt,{tone:"warning",children:"API-key runs"})," ",Jn(i.api_key_default_cap_usd)," cap per run by default (",r(i.api_key_runs),"); ",s.jsx("code",{children:"--max-cost"})," and loki.yaml ",s.jsx("code",{children:"budgets.per_run"})," override it."]})]})}function d1({row:i,max:r}){const o=f=>r>0?`${f/r*100}%`:"0%";return s.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:[s.jsx("span",{"data-part":"measured",style:{width:o(i.measured_usd),background:"var(--cp-accent)"}}),s.jsx("span",{"data-part":"partial",style:{width:o(i.partial_usd),background:"var(--cp-warning-fill)"}})]})}function h1(){const[i,r]=R.useState("day"),[o,f]=R.useState(null),[d,p]=R.useState(null);if(R.useEffect(()=>{let E=!0;return f(null),p(null),o1(i).then(N=>{E&&f(N)},N=>{E&&p(N.message)}),()=>{E=!1}},[i]),d)return s.jsx(Lt,{title:"Cost unavailable",hint:d});if(!o)return s.jsx(It,{label:"Loading cost"});const m=o.totals,y=Math.max(0,...o.rows.map(E=>E.measured_usd+E.partial_usd)),x=V0.find(E=>E.value===i).label;return s.jsxs("div",{"data-testid":"cost-page",style:{display:"flex",flexDirection:"column",gap:16},children:[s.jsx("h1",{style:{margin:0,fontFamily:"var(--cp-font-serif)",fontWeight:400},children:"Cost and usage"}),s.jsx(f1,{budget:o.budget}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:12},children:[s.jsx(bl,{label:"Measured",value:s.jsx("span",{"data-testid":"cost-measured",children:Jn(m.measured_usd)}),trend:`${m.measured_runs} runs`,trendTone:"success"}),s.jsx(bl,{label:"Partial (priced sessions only)",value:s.jsx("span",{"data-testid":"cost-partial",children:Jn(m.partial_usd)}),trend:`${m.partial_runs} runs`,trendTone:"warning"}),s.jsx(bl,{label:"Unmeasured",value:s.jsxs("span",{"data-testid":"cost-unmeasured",children:[m.unmeasured_runs," runs"]}),trend:"not measured"}),s.jsx(bl,{label:"Tokens in / out",value:s.jsxs("span",{"data-testid":"cost-tokens",children:[zs(m.input_tokens)," / ",zs(m.output_tokens)]})})]}),s.jsx("div",{children:s.jsx(Zn,{label:"Group by",value:x,options:V0,onSelect:E=>r(E)})}),o.rows.length===0?s.jsx(Lt,{title:"No runs yet",hint:"Cost appears here once a run has been ingested."}):s.jsx(jn,{caption:`Cost by ${x}`,columns:[x,"Runs","Measured","Partial","Unmeasured","Tokens in","Tokens out","Spend"],rows:o.rows.map(E=>[E[i]??"unknown",E.runs,E.measured_runs?Jn(E.measured_usd):"not measured",E.partial_runs?`${Jn(E.partial_usd)} (partial)`:"none",E.unmeasured_runs?`${E.unmeasured_runs} not measured`:"none",zs(E.input_tokens),zs(E.output_tokens),s.jsx(d1,{row:E,max:y},"bar")])})]})}const m1={id:"cost",path:"/cost",title:"Cost and usage",component:h1},Io=()=>globalThis.LOKI_CONTROL_BASE??"",Fo=()=>{const i=xe();return i?{authorization:`Bearer ${i}`}:{}},Wo=(i,r)=>`/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}`;async function Dp(i,r,o){try{const f=await fetch(`${Io()}${Wo(i,r)}/artifact/${o}`,{headers:Fo()});return f.ok?await f.text():null}catch{return null}}async function p1(i,r,o=-1){const f=[];try{for(let d=o,p=0;p<200;p++){const m=d>=0?`?after=${d}&limit=1000`:"?limit=1000",y=await fetch(`${Io()}${Wo(i,r)}/events${m}`,{headers:Fo()});if(!y.ok)break;const x=await y.json(),E=x.events??[];if(f.push(...E),!x.has_more||E.length===0)break;d=E[E.length-1].seq}}catch{}return f}function g1(i,r){const o=i.split(`
157
-
158
- `),f=o.pop()??"";for(const d of o){const p=d.split(`
159
- `).filter(m=>m.startsWith("data:")).map(m=>m.slice(5).trim()).join("");if(!(!p||!/^event: event$/m.test(d)))try{r(JSON.parse(p))}catch{}}return f}async function v1(i,r,o,f,d){try{const p=await fetch(`${Io()}${Wo(i,r)}/stream?after=${o()}`,{headers:{...Fo(),accept:"text/event-stream"},signal:d});if(!p.ok||!p.body)return;const m=p.body.getReader(),y=new TextDecoder;let x="";for(;;){const{done:E,value:N}=await m.read();if(E)return;x=g1(x+y.decode(N,{stream:!0}),f)}}catch{}}const G0=i=>i&&typeof i=="object"?i:{},$0=i=>typeof i=="number"&&Number.isFinite(i)?i:null,al=i=>typeof i=="string"&&i?i:null,Ho=i=>{const r=i?Date.parse(i):NaN;return Number.isNaN(r)?null:r};function y1(i){const r=[],o=new Map,f=new Map,d=new Map;for(const m of i){const y=G0(m.data),x=m.stage??"";if(m.type==="session.started"&&x&&al(y.model)&&d.set(x,al(y.model)),m.type==="cost"&&x){const E=f.get(x)??{usd:0,unmeasured:!1,seen:!1},N=$0(y.usd);E.seen=!0,N===null?E.unmeasured=!0:E.usd+=N,f.set(x,E),al(y.model)&&!d.has(x)&&d.set(x,al(y.model))}}const p=m=>{const y=f.get(m);return y&&y.seen&&!y.unmeasured?y.usd:null};for(const m of i){const y=G0(m.data);if(m.type==="run.started")r.push({key:`s${m.seq}`,kind:"run",label:"Run started",duration_s:null,model:al(y.model),cost_usd:null,outcome:"started",detail:al(y.issue_ref)??void 0});else if(m.type==="stage.started"&&m.stage){const x={key:`s${m.seq}`,kind:"stage",label:m.stage,duration_s:null,model:d.get(m.stage)??null,cost_usd:p(m.stage),outcome:"running",startedMs:Ho(m.ts)};o.set(m.stage,x),r.push(x)}else if((m.type==="stage.skipped"||m.type==="stage.failed")&&m.stage){const x=o.get(m.stage),E=al(y.reason)??(m.type==="stage.skipped"?"no reason recorded":null),N=m.type==="stage.skipped"?"skipped":"failed";x?Object.assign(x,{outcome:N,detail:E??void 0,cost_usd:p(m.stage)}):r.push({key:`s${m.seq}`,kind:"stage",label:m.stage,duration_s:null,model:null,cost_usd:p(m.stage),outcome:N,detail:E??void 0}),o.delete(m.stage)}else if(m.type==="stage.completed"&&m.stage){const x=o.get(m.stage),E=$0(y.duration_s)??((x==null?void 0:x.startedMs)!=null&&Ho(m.ts)!=null?(Ho(m.ts)-x.startedMs)/1e3:null),N=al(y.skipped_reason)??al(y.reason),v=y.skipped===!0?"skipped":"completed";x?Object.assign(x,{duration_s:E,outcome:v,model:d.get(m.stage)??x.model,cost_usd:p(m.stage),detail:N??void 0}):r.push({key:`s${m.seq}`,kind:"stage",label:m.stage,duration_s:E,model:d.get(m.stage)??null,cost_usd:p(m.stage),outcome:v,detail:N??void 0}),o.delete(m.stage)}else m.type==="pr.opened"?r.push({key:`s${m.seq}`,kind:"pr",label:"Pull request opened",duration_s:null,model:null,cost_usd:null,outcome:y.draft===!0?"draft":"opened",detail:al(y.url)??void 0}):m.type==="receipt.sealed"?r.push({key:`s${m.seq}`,kind:"receipt",label:"Receipt sealed",duration_s:null,model:null,cost_usd:null,outcome:y.signed===!0?"signed":"unsigned"}):m.type==="run.completed"&&r.push({key:`s${m.seq}`,kind:"verdict",label:"Run completed",duration_s:null,model:null,cost_usd:null,outcome:al(y.verdict)??"no verdict"})}return r}const Ll="not measured";function x1(i){return i.cost_usd!==null&&i.cost_usd!==void 0?ul(i.cost_usd):i.partial_usd?`at least ${ul(i.partial_usd)} (${i.measured_sessions} of ${i.total_sessions} sessions measured)`:Ll}const Mp=i=>typeof i!="number"?Ll:i>=60?`${Math.floor(i/60)}m ${Math.floor(i%60)}s`:`${i.toFixed(1)}s`;function b1(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 S1({source:i,run:r}){const[o,f]=R.useState([]),[d,p]=R.useState(!1),m=R.useRef(-1);R.useEffect(()=>{const x=new AbortController,E=N=>{const v=N.filter(A=>A.seq>m.current);v.length&&(m.current=v[v.length-1].seq,f(A=>[...A,...v].slice(-2e3)))};return(async()=>{for(E(await p1(i,r));!x.signal.aborted;)await v1(i,r,()=>m.current,N=>E([N]),x.signal),x.signal.aborted||await new Promise(N=>setTimeout(N,3e3))})(),()=>x.abort()},[i,r]);const y=y1(o);return s.jsxs("div",{children:[s.jsx("div",{style:{marginBottom:6},children:s.jsx(Bt,{variant:"ghost",size:"sm","data-testid":"run-raw-toggle","aria-pressed":d,onClick:()=>p(x=>!x),children:d?"Show timeline":"Show raw"})}),d?s.jsx("div",{"data-testid":"run-log",role:"log","aria-live":"polite",style:{maxHeight:280,overflow:"auto",fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-sm)",color:"var(--cp-text-2)"},children:o.length===0?s.jsx("div",{children:"No events yet."}):o.map(x=>s.jsx("div",{children:`${x.seq} ${b1(x)}`},x.seq))}):s.jsx("ol",{"data-testid":"run-timeline","aria-live":"polite",style:{listStyle:"none",margin:0,padding:0,maxHeight:360,overflow:"auto",fontSize:"var(--cp-text-sm)"},children:y.length===0?s.jsx("li",{children:"No events yet."}):y.map(x=>s.jsxs("li",{"data-testid":"timeline-line","data-outcome":x.outcome,style:{display:"flex",flexWrap:"wrap",gap:"2px 12px",padding:"3px 0"},children:[s.jsx("strong",{style:{minWidth:120},children:x.label}),s.jsx("span",{children:x.outcome}),x.kind==="stage"?s.jsxs(s.Fragment,{children:[s.jsx("span",{"data-testid":"tl-duration",children:typeof x.duration_s=="number"?Mp(x.duration_s):"--"}),s.jsx("span",{"data-testid":"tl-model",children:x.model??"--"}),s.jsx("span",{"data-testid":"tl-cost",children:x.cost_usd===null?"--":ul(x.cost_usd)})]}):null,x.detail?s.jsx("span",{"data-testid":"tl-detail",style:{color:"var(--cp-text-muted)"},children:x.detail}):null]},x.key))})]})}function Q0({source:i,run:r,name:o,empty:f}){const[d,p]=R.useState(void 0);return R.useEffect(()=>{let m=!0;return Dp(i,r,o).then(y=>{m&&p(y)}),()=>{m=!1}},[i,r,o]),d===void 0?s.jsx(It,{label:`Loading ${o}`}):d===null?s.jsx("div",{children:f}):s.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap",fontFamily:"var(--cp-font-mono)",fontSize:"var(--cp-text-sm)",maxHeight:360,overflow:"auto"},children:d})}function j1({source:i,run:r,question:o,onSent:f}){const[d,p]=R.useState(""),[m,y]=R.useState({busy:!1}),x=async()=>{y({busy:!0});try{await hp(i,r,d.trim()),y({busy:!1,sent:!0}),f()}catch(E){y({busy:!1,error:E.message})}};return s.jsx(ql,{icon:s.jsx(Rx,{size:16}),title:s.jsxs(s.Fragment,{children:[s.jsx(wt,{tone:"info",children:"BLOCKED"})," ",o]}),children:s.jsxs("div",{"data-testid":"run-reply",style:{display:"flex",flexDirection:"column",gap:8,marginTop:6},children:[s.jsx(bp,{"aria-label":"Your reply",rows:3,value:d,onChange:E=>p(E.target.value),disabled:m.busy||m.sent}),s.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[s.jsx(Bt,{onClick:x,disabled:!d.trim()||m.busy||m.sent,children:"Send reply"}),m.sent?s.jsx("span",{role:"status",children:"Reply saved. Resume the run to continue."}):null,m.error?s.jsx("span",{role:"alert",style:{color:"var(--cp-error)"},children:m.error}):null]})]})})}function _1({source:i,run:r,slot:o,renderSlot:f}){var P,q,k;const[d,p]=R.useState(null),[m,y]=R.useState(null),[x,E]=R.useState(!1),N=R.useCallback(()=>{Vs(i,r).then(G=>{p(G),y(null)},G=>y(G.message))},[i,r]),v=!d||d.status==="running"||d.verdict===null;if(R.useEffect(()=>{if(N(),!v)return;const G=setInterval(N,4e3);return()=>clearInterval(G)},[N,v]),m&&!d)return s.jsx(Lt,{title:"Run not available",hint:m});if(!d)return s.jsx(It,{label:"Loading run"});const A=d.issue_ref??d.origin_repo??d.run_id,U=((P=d.receipt)==null?void 0:P.sha256)??null,X=!!d.blocked_question;return s.jsxs("section",{"data-testid":"run-thread",style:{maxWidth:860,margin:"0 auto",padding:16},children:[s.jsxs("header",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:12,marginBottom:12},children:[s.jsx("h1",{style:{margin:0,fontFamily:"var(--cp-font-serif)",fontWeight:400,fontSize:"var(--cp-text-2xl)",flex:1,minWidth:0},children:A}),X?s.jsx(il,{verdict:pt.BLOCKED}):d.verdict?s.jsx(il,{run:d}):s.jsx(wt,{pulse:!0,children:"running"}),s.jsx("span",{"data-testid":"run-elapsed",children:Mp(d.elapsed_s??d.wall_s)}),s.jsx("span",{"data-testid":"run-cost",children:x1(d)}),s.jsxs("span",{"data-testid":"run-header-slot",style:{display:"inline-flex",gap:8},children:[o,f?f(d,N):null]}),s.jsxs(Bt,{variant:"ghost",size:"sm",onClick:()=>E(!0),children:[s.jsx(Ex,{size:14})," Details"]})]}),s.jsxs("div",{"data-testid":"run-stages",children:[d.stages.length===0?s.jsx(ql,{icon:s.jsx(Uo,{size:16}),title:"Waiting for the first stage"}):null,d.stages.map((G,H)=>s.jsxs(ql,{icon:s.jsx(Uo,{size:16}),title:G.stage,meta:G.status==="started"?"running":G.status,children:[s.jsx("span",{"data-testid":"run-stage","data-status":G.status}),G.reason?s.jsx("span",{"data-testid":"run-stage-reason",children:G.reason}):G.status==="skipped"?s.jsx("span",{"data-testid":"run-stage-reason",children:"no reason recorded"}):null]},`${G.stage}-${H}`))]}),d.blocked_question?s.jsx(j1,{source:i,run:r,question:d.blocked_question,onSent:N}):null,s.jsx(ql,{icon:s.jsx(Uo,{size:16}),title:"Timeline",expandable:!0,defaultOpen:!0,children:s.jsx(S1,{source:i,run:r})}),s.jsx(ql,{icon:s.jsx(Sx,{size:16}),title:"Diff",meta:(q=d.files_touched)!=null&&q.length?`${d.files_touched.length} files touched`:void 0,expandable:!0,children:s.jsx("div",{"data-testid":"run-diff",children:s.jsx(Q0,{source:i,run:r,name:"diff.patch",empty:"Diff not available for this run."})})}),s.jsx(ql,{icon:s.jsx(H0,{size:16}),title:"Evidence and receipt",meta:U?`sha256 ${U.slice(0,16)} ${(k=d.receipt)!=null&&k.signed?"signed":"unsigned"}`:"no receipt",expandable:!0,children:s.jsx("div",{"data-testid":"run-receipt",children:s.jsx(Q0,{source:i,run:r,name:"receipt.md",empty:"Receipt not available for this run."})})}),s.jsx(ql,{icon:s.jsx(H0,{size:16}),title:"NOT PROVEN",children:s.jsx("div",{"data-testid":"run-not-proven",children:d.not_proven.length?s.jsx("ul",{style:{margin:0,paddingLeft:18},children:d.not_proven.map((G,H)=>s.jsx("li",{children:G},H))}):s.jsx("span",{children:d.verdict?"Nothing listed as not proven.":"Not known until the run finishes."})})}),s.jsx(ql,{icon:s.jsx(_x,{size:16}),title:"Pull request",children:s.jsx("div",{"data-testid":"run-pr",children:d.pr_url?/^https?:\/\//.test(d.pr_url)?s.jsxs("a",{href:d.pr_url,target:"_blank",rel:"noreferrer",children:[d.pr_url," ",s.jsx(dp,{size:12})]}):s.jsx("span",{children:d.pr_url}):"No PR."})}),s.jsx(jp,{open:x,title:"Run details",onClose:()=>E(!1),children:s.jsx(qt,{"data-testid":"run-details",children:s.jsx("dl",{style:{margin:0,display:"grid",gridTemplateColumns:"auto 1fr",gap:"4px 12px",fontSize:"var(--cp-text-sm)"},children:[["source",d.source_id],["run",d.run_id],["repo",d.origin_repo??Ll],["provider",d.provider??Ll],["model",d.model??Ll],["started",d.started_at??Ll],["ended",d.ended_at??Ll],["input tokens",d.input_tokens??Ll],["output tokens",d.output_tokens??Ll],["sessions measured",`${d.measured_sessions} of ${d.total_sessions}`],["events",d.last_seq]].map(([G,H])=>s.jsxs(R.Fragment,{children:[s.jsx("dt",{children:G}),s.jsx("dd",{style:{margin:0,fontFamily:"var(--cp-font-mono)"},children:String(H)})]},G))})})})]})}function T1(){var r;const i=/\/runs?\/([^/]+)\/([^/?#]+)/.exec(((r=globalThis.location)==null?void 0:r.pathname)??"");return i?{source:decodeURIComponent(i[1]),run:decodeURIComponent(i[2])}:null}function E1({source:i,run:r,slot:o,renderSlot:f}){const d=i&&r?{source:i,run:r}:T1();return d?s.jsx(_1,{source:d.source,run:d.run,slot:o,renderSlot:f}):s.jsx(Lt,{title:"No run selected",hint:"Open a run from Home or Runs."})}const wp={id:"run",path:"/runs/:source/:run",title:"Run",component:E1},Up="loki-theme",Bs=new Set,N1=()=>{try{const i=localStorage.getItem(Up);return i==="light"||i==="dark"?i:null}catch{return null}},Hp=()=>{try{return typeof globalThis.matchMedia=="function"?globalThis.matchMedia("(prefers-color-scheme: dark)"):null}catch{return null}},Bp=()=>{const i=Hp();return i?i.matches?"dark":"light":"dark"};let $s=N1(),Iu=$s??Bp();function Qs(i=Iu){var o;const r=(o=globalThis.document)==null?void 0:o.documentElement;r&&($s?r.setAttribute("data-theme",i):r.removeAttribute("data-theme"),r.classList.toggle("dark",i==="dark"))}function z1(i){Iu=i,$s=i;try{localStorage.setItem(Up,i)}catch{}Qs(i);for(const r of Bs)r()}const ks=()=>z1(Iu==="dark"?"light":"dark");var Us,op;(op=(Us=Hp())==null?void 0:Us.addEventListener)==null||op.call(Us,"change",()=>{if(!$s){Iu=Bp(),Qs();for(const i of Bs)i()}});function kp(){return R.useSyncExternalStore(i=>(Bs.add(i),()=>{Bs.delete(i)}),()=>Iu,()=>"dark")}const qp="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",X0="rounded border border-slate-300 bg-white px-2 py-2 text-sm md:py-1 dark:border-slate-700 dark:bg-slate-900",O1="loki start owner/repo#N";function Lp(){const[i,r]=R.useState(null),[o,f]=R.useState(!1),d=async()=>{f(!0);try{const p=await Vx();r(p.failed.length?{ok:!1,text:`Imported ${p.runs} runs; ${p.failed.length} failed.`}:{ok:!0,text:p.runs===0?"No runs found in this folder.":`Imported ${p.runs} runs. Reload to see them.`})}catch(p){r({ok:!1,text:p.message})}f(!1)};return s.jsxs("div",{children:[s.jsx("button",{type:"button","data-testid":"import-runs",disabled:o,onClick:d,className:qp,children:"Import runs from this folder"}),i&&s.jsx("p",{role:i.ok?"status":"alert",className:`mt-2 text-sm ${i.ok?"text-emerald-600":"text-red-600"}`,children:i.text})]})}function Yp({knownRepos:i}){const[r,o]=R.useState(""),[f,d]=R.useState(""),[p,m]=R.useState(i??[]),[y,x]=R.useState(null);R.useEffect(()=>{i||pp().then(N=>m(N.repos),()=>{})},[i]);const E=async()=>{try{const N=await Gx(r.trim(),f);x({ok:!0,text:`Started: loki ${N.command}`}),o("")}catch(N){x({ok:!1,text:N.message})}};return s.jsxs("form",{"data-testid":"start-run",className:"mb-6 flex flex-col gap-2 sm:flex-row sm:items-end",onSubmit:N=>{N.preventDefault(),E()},children:[s.jsxs("label",{className:"flex flex-1 flex-col gap-1 text-sm",children:["Start a run",s.jsx("input",{"aria-label":"Issue or task",className:X0,value:r,onChange:N=>o(N.target.value),placeholder:"owner/repo#123 or a task",maxLength:500})]}),s.jsxs("label",{className:"flex flex-col gap-1 text-sm",children:["Repo",s.jsxs("select",{"aria-label":"Repo folder",className:X0,value:f,onChange:N=>d(N.target.value),children:[s.jsx("option",{value:"",children:"This folder"}),p.map(N=>s.jsx("option",{value:N,children:N},N))]})]}),s.jsx("button",{type:"submit",disabled:r.trim()==="",className:qp,children:"Start"}),y&&s.jsx("p",{role:y.ok?"status":"alert",className:`text-sm ${y.ok?"text-emerald-600":"text-red-600"}`,children:y.text})]})}function Vp(){return s.jsxs("div",{"data-testid":"empty-state",className:"rounded border border-dashed border-slate-300 p-8 text-center dark:border-slate-700",children:[s.jsx("p",{className:"text-lg font-medium",children:"No runs yet"}),s.jsx("div",{className:"mt-4 flex justify-center",children:s.jsx(Lp,{})}),s.jsx("p",{className:"mt-6 text-sm text-slate-600 dark:text-slate-400",children:"Or start your first run from a terminal:"}),s.jsx("code",{className:"mt-2 inline-block rounded bg-slate-200 px-2 py-1 text-sm dark:bg-slate-800",children:O1})]})}function R1(){const i=kp();return s.jsxs("section",{children:[s.jsx("h2",{className:"mb-4 text-xl",style:{fontFamily:"var(--cp-font-serif)",fontWeight:400},children:"General"}),s.jsx("p",{className:"mb-2 text-sm",style:{color:"var(--cp-text-2)"},children:"Appearance"}),s.jsx(Bt,{variant:"secondary",onClick:ks,children:i==="dark"?"Switch to light theme":"Switch to dark theme"}),s.jsx("div",{className:"mt-6",children:s.jsx(Lp,{})})]})}const qs="not measured",C1=864e5,A1=()=>globalThis.LOKI_CONTROL_BASE??"";async function Os(i){const r=xe(),o=await fetch(`${A1()}${i}`,{headers:r?{authorization:`Bearer ${r}`}:{}});if(!o.ok)throw new Error(`${i}: HTTP ${o.status}`);return await o.json()}async function D1(i){const r=new Date(i),o=new Date(r.getFullYear(),r.getMonth(),r.getDate()).toISOString(),[f,d,p,m]=await Promise.all([Os(`/v1/stats?since=${encodeURIComponent(o)}`),Os(`/v1/stats?since=${encodeURIComponent(new Date(i-7*C1).toISOString())}`),Os("/v1/runs?limit=8"),Os("/v1/notifications?kind=blocked&limit=20")]);return{today:f,week:d,runs:p.runs.slice(0,8),blocked:m.notifications,blockedTotal:m.total}}const Ls=ul,Z0=(i,r)=>`/r/${encodeURIComponent(i)}/${encodeURIComponent(r)}`;function M1(i){if(i.label==="not measured")return{value:qs,trend:"no priced runs"};if(i.label==="measured")return{value:Ls(i.measured_usd??0),trend:"measured"};const r=(i.measured_usd??0)+(i.partial_usd??0);return{value:`${Ls(r)}+`,trend:`partial, ${i.partial_runs} run${i.partial_runs===1?"":"s"} unpriced`}}function w1(i){return i.cost_usd!==null&&i.cost_usd!==void 0?Ls(i.cost_usd):i.partial_usd?`at least ${Ls(i.partial_usd)}`:qs}function U1({data:i}){const{today:r,week:o,runs:f,blocked:d,blockedTotal:p}=i,m=o.verified_rate,y=o.verified_unchecked??0,x=m!==null&&o.keys_configured===!1&&y>0,E=o.breakdown,N=E?`${E.verified} verified, ${E.failed} failed, ${E.already_satisfied} already satisfied, ${E.other} other`:void 0,v=x?`${y} signature not checked`:N?`${N}${y?`, ${y} signature not checked`:""}`:void 0,A=M1(o.cost);return o.runs_total===0&&f.length===0&&p===0?s.jsx(Vp,{}):s.jsxs("section",{"data-testid":"home",style:{display:"flex",flexDirection:"column",gap:20},children:[s.jsx("h1",{style:{fontFamily:"var(--cp-font-serif)",fontSize:"var(--cp-text-2xl)",margin:0},children:"Home"}),s.jsxs("div",{style:{display:"grid",gap:12,gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))"},children:[s.jsx("div",{"data-testid":"kpi-today",children:s.jsx(bl,{label:"Runs today",value:String(r.runs_total),trend:r.runs_running?`${r.runs_running} running`:void 0})}),s.jsx("div",{"data-testid":"kpi-verified",children:s.jsx(bl,{label:"Verified rate, 7 days",value:m===null?"--":x?`${qs}: no verification key`:`${Math.round(m*100)}%`,trend:v,trendTone:m===null||x?"neutral":m>=.8?"success":"warning"})}),s.jsx("div",{"data-testid":"kpi-cost",children:s.jsx(bl,{label:"Cost, 7 days",value:A.value,trend:A.trend,trendTone:o.cost.label==="partial"?"warning":"neutral"})}),s.jsx("div",{"data-testid":"kpi-blocked",children:s.jsx(bl,{label:"BLOCKED waiting",value:String(p),trend:p?"needs your answer":void 0,trendTone:"info"})})]}),s.jsxs("div",{children:[s.jsx("h2",{style:{fontSize:"var(--cp-text-md)",margin:"0 0 8px"},children:"Blocked inbox"}),d.length===0?s.jsx(qt,{"data-testid":"blocked-empty",style:{color:"var(--cp-text-2)"},children:"Nothing is waiting for you."}):s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:d.map(U=>s.jsx("a",{"data-testid":"blocked-item",href:Z0(U.source_id,U.run_id),style:{textDecoration:"none",color:"inherit"},children:s.jsxs(qt,{interactive:!0,compact:!0,style:{display:"flex",gap:10,alignItems:"center",justifyContent:"space-between"},children:[s.jsx("span",{children:U.title}),s.jsx(wt,{tone:"info",children:"Answer"})]})},U.id))})]}),s.jsxs("div",{children:[s.jsx("h2",{style:{fontSize:"var(--cp-text-md)",margin:"0 0 8px"},children:"Recent runs"}),f.length===0?s.jsx(qt,{style:{color:"var(--cp-text-2)"},children:"No runs yet."}):s.jsx("div",{"data-testid":"recent-runs",children:s.jsx(jn,{caption:"Recent runs",columns:["Run","Verdict","Cost","Model"],rows:f.map(U=>[s.jsx("a",{"data-testid":"recent-run",href:Z0(U.source_id,U.run_id),style:{fontFamily:"var(--cp-font-mono)",color:"var(--cp-accent)"},children:U.origin_repo??U.issue_ref??U.run_id},"l"),U.verdict?s.jsx(il,{run:U},"v"):s.jsx(wt,{pulse:!0,children:"running"},"v"),w1(U),U.model??qs])})})]})]})}function H1({now:i=Date.now()}){const[r,o]=R.useState({data:null,error:null});return R.useEffect(()=>{let f=!0,d,p=!0;const m=()=>D1(p?i:Date.now()).then(y=>{p=!1,f&&(o({data:y,error:null}),d=setTimeout(m,1e4))},y=>{f&&(o(x=>({data:x.data,error:y.message})),d=setTimeout(m,1e4))});return m(),()=>{f=!1,d&&clearTimeout(d)}},[]),r.data?s.jsx(U1,{data:r.data}):r.error?s.jsxs("p",{role:"alert","data-testid":"home-error",children:["Could not load Home: ",r.error]}):s.jsx(It,{label:"Loading Home"})}const B1={id:"home",path:"/home",title:"Home",component:H1};function k1(i){return i.verdict?Va(i)?"verified":"notproven":i.pr_url?"pr":i.status==="running"||i.started_at?"running":"issue"}const K0={issue:"Issue",running:"Running",pr:"PR open",verified:"Verified",notproven:"Not proven"};function q1({r:i}){const r=i.issue_ref??i.run_id;return s.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:s.jsxs(qt,{interactive:!0,compact:!0,children:[s.jsx("div",{style:{fontWeight:600,fontSize:"var(--cp-text-md)",overflowWrap:"anywhere"},children:r}),s.jsx("div",{style:{color:"var(--cp-text-muted)",fontSize:"var(--cp-text-xs)",marginTop:2},children:i.origin_repo??"repo not recorded"}),s.jsxs("div",{style:{display:"flex",gap:6,marginTop:8,flexWrap:"wrap",alignItems:"center"},children:[i.verdict?s.jsx(il,{run:i}):i.pr_url?s.jsx(wt,{tone:"info",children:i.pr_draft?"draft PR":"PR open"}):i.status==="running"?s.jsx(il,{verdict:pt.RUNNING}):s.jsx(wt,{children:"queued"}),i.current_stage&&!i.verdict?s.jsx(wt,{children:i.current_stage}):null]})]})})}function Vu({id:i,runs:r}){return s.jsxs("section",{"data-testid":`lane-${i}`,"aria-label":K0[i],style:{display:"flex",flexDirection:"column",gap:8},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"var(--cp-text-xs)",color:"var(--cp-text-2)",textTransform:"uppercase",letterSpacing:"0.05em"},children:[s.jsx("span",{children:K0[i]}),s.jsx("span",{children:r.length})]}),r.length===0?s.jsx("div",{style:{color:"var(--cp-text-muted)",fontSize:"var(--cp-text-xs)"},children:"none"}):r.map(o=>s.jsx(q1,{r:o},`${o.source_id}/${o.run_id}`))]})}function Rs({id:i,children:r}){return s.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 L1(){const[i,r]=R.useState(null),[o,f]=R.useState(null),d=R.useCallback(()=>{Vl().then(m=>{r(m.runs),f(null)}).catch(m=>f(m.message))},[]);if(R.useEffect(()=>(d(),gp(d)),[d]),o&&!i)return s.jsx(Lt,{title:"Could not load runs",hint:o});if(!i)return s.jsx("div",{style:{padding:24},children:s.jsx(It,{label:"Loading runs"})});if(i.length===0)return s.jsx(Lt,{title:"No runs yet",hint:"Start a run and it will appear here."});const p=m=>i.filter(y=>k1(y)===m);return s.jsxs("div",{style:{padding:24},children:[s.jsx("h1",{style:{fontFamily:"var(--cp-font-serif)",fontSize:"var(--cp-text-2xl)",margin:"0 0 16px"},children:"Work"}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:12,alignItems:"start"},children:[s.jsx(Rs,{id:"issue",children:s.jsx(Vu,{id:"issue",runs:p("issue")})}),s.jsx(Rs,{id:"running",children:s.jsx(Vu,{id:"running",runs:p("running")})}),s.jsx(Rs,{id:"pr",children:s.jsx(Vu,{id:"pr",runs:p("pr")})}),s.jsxs(Rs,{id:"done",children:[s.jsx(Vu,{id:"verified",runs:p("verified")}),s.jsx(Vu,{id:"notproven",runs:p("notproven")})]})]})]})}const Y1={id:"work",path:"/work",title:"Work",component:()=>s.jsx(L1,{})},Gp=()=>globalThis.LOKI_CONTROL_BASE??"",$p=(i={})=>{const r=xe();return r?{...i,authorization:`Bearer ${r}`}:i};async function V1(i,r){const o=await fetch(`${Gp()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}/verify`,{method:"POST",headers:$p({"content-type":"application/json"}),body:"{}"}),f=await o.json().catch(()=>({}));if(!o.ok)throw new Error(f.error??`HTTP ${o.status}`);return f}async function G1(){const i=await fetch(`${Gp()}/v1/keys`,{headers:$p()});if(i.status===404)return null;if(!i.ok)throw new Error(`/v1/keys: HTTP ${i.status}`);return await i.json()}function $1(i){const r=new Map;for(const o of i){if(!o.verdict||!o.started_at)continue;const f=o.started_at.slice(0,10),d=r.get(f)??{v:0,n:0};d.n++,Va(o)&&d.v++,r.set(f,d)}return[...r.entries()].sort(([o],[f])=>o<f?-1:1).map(([o,f])=>({day:o,rate:f.v/f.n,total:f.n}))}const Cs=i=>`${i.source_id}/${i.run_id}`;function Q1(){const[i,r]=R.useState(null),[o,f]=R.useState(null),[d,p]=R.useState({}),[m,y]=R.useState(void 0);R.useEffect(()=>{let A=!0;return Vl().then(U=>A&&r(U.runs),U=>A&&f(U.message)),G1().then(U=>A&&y(U),()=>A&&y(null)),()=>{A=!1}},[]);const x=async A=>{p(U=>({...U,[Cs(A)]:"pending"}));try{const U=await V1(A.source_id,A.run_id);p(X=>({...X,[Cs(A)]:U}))}catch(U){p(X=>({...X,[Cs(A)]:{error:U.message}}))}};if(o)return s.jsx(Lt,{title:"Receipts unavailable",hint:o});if(!i)return s.jsx(It,{label:"Loading receipts"});const E=i.filter(A=>A.verdict),N=$1(E),v=E.length?Math.round(E.filter(A=>Va(A)).length/E.length*100):null;return s.jsxs("div",{"data-testid":"receipts",style:{display:"flex",flexDirection:"column",gap:16},children:[s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(240px, 1fr))",gap:12},children:[s.jsx(bl,{label:`Verified rate (${E.length} finished run${E.length===1?"":"s"}, by run outcome)`,value:v===null?"not measured":`${v}%`,series:N.map(A=>A.rate),trend:N.length>1?`${N.length} days`:void 0}),s.jsxs(qt,{style:{padding:"14px 16px"},"data-testid":"public-key",children:[s.jsx("div",{style:{fontSize:"var(--cp-text-sm)",color:"var(--cp-text-2)"},children:"Public key (Ed25519)"}),m===void 0?s.jsx(It,{size:12}):m===null?s.jsx("div",{children:"not measured: no signing key on this machine yet"}):s.jsxs("div",{style:{fontFamily:"var(--cp-font-mono)",fontSize:12,wordBreak:"break-all"},children:[s.jsxs("div",{"data-testid":"key-kid",children:["kid ",m.kid]}),s.jsxs("div",{"data-testid":"key-x",children:["x ",m.x]})]})]})]}),E.length===0?s.jsx(Lt,{title:"No finished runs yet",hint:"A receipt appears here when a run completes."}):s.jsx(jn,{caption:"Receipts",columns:["Run","Outcome","Started","Verify"],rows:E.map(A=>{const U=d[Cs(A)];return[s.jsx("span",{style:{fontFamily:"var(--cp-font-mono)"},children:A.run_id},"run"),s.jsx(il,{run:A},"out"),A.started_at??"not measured",s.jsxs("span",{style:{display:"inline-flex",gap:8,alignItems:"center"},children:[s.jsx(Bt,{size:"sm",variant:"secondary",disabled:U==="pending",onClick:()=>void x(A),"data-testid":"verify-btn",children:U==="pending"?"Verifying":"Verify"}),U&&U!=="pending"?"error"in U?s.jsx(wt,{tone:"error","data-testid":"verify-result",children:U.error}):s.jsxs("span",{"data-testid":"verify-result","data-verdict":U.verdict,children:[s.jsx(il,{run:{verdict:U.verdict,tampered:A.tampered}}),U.reasons[0]?s.jsx("span",{style:{marginLeft:8,color:"var(--cp-text-2)",fontSize:12},children:U.reasons[0]}):null]}):null]},"v")]})})]})}const X1={id:"receipts",path:"/receipts",title:"Receipts",component:Q1},J0={status:"",verdict:"",repo:"",source:"",q:""},Z1="no repo",Xs=i=>i.origin_repo??Z1,Ya=i=>i.status??(i.verdict?"completed":"running"),Ys=i=>i.task_source??i.source_id,K1=i=>Ye(i)??"none";function J1(i,r){const o=r.q.trim().toLowerCase();return i.filter(f=>!(r.status&&Ya(f)!==r.status||r.verdict&&K1(f)!==r.verdict||r.repo&&Xs(f)!==r.repo||r.source&&Ys(f)!==r.source||o&&![f.run_id,f.source_id,f.origin_repo,f.issue_ref,f.provider,f.model,Ye(f)].some(d=>d&&d.toLowerCase().includes(o))))}const I0=(i,r)=>{switch(r){case"started":return i.started_at?Date.parse(i.started_at):null;case"repo":return Xs(i);case"source":return Ys(i);case"status":return Ya(i);case"verdict":return Ye(i);case"cost":return i.cost_usd;case"elapsed":return i.elapsed_s??i.wall_s}};function I1(i,r,o){const f=o==="asc"?1:-1;return[...i].sort((d,p)=>{const m=I0(d,r),y=I0(p,r);return m===null&&y===null?0:m===null?1:y===null?-1:(typeof m=="number"&&typeof y=="number"?m-y:String(m).localeCompare(String(y)))*f})}function F1(i){const r=new Map;for(const o of i){const f=Xs(o),d=r.get(f)??{repo:f,runs:0,running:0,verified:0,cost:null,unpriced:0};d.runs++,Ya(o)==="running"&&d.running++,Va(o)&&d.verified++,o.cost_usd===null?d.unpriced++:d.cost=(d.cost??0)+o.cost_usd,r.set(f,d)}return[...r.values()].sort((o,f)=>f.runs-o.runs||o.repo.localeCompare(f.repo))}const Bo=i=>[...new Set(i)].sort(),W1=i=>{const r=new AbortController,o=globalThis.LOKI_CONTROL_BASE??"";return(async()=>{for(;!r.signal.aborted;){try{const f=xe(),d=await fetch(`${o}/v1/stream`,{headers:f?{authorization:`Bearer ${f}`}:{},signal:r.signal});if(!d.ok||!d.body)throw new Error(`HTTP ${d.status}`);const p=d.body.getReader(),m=new TextDecoder;let y="";for(;;){const{done:x,value:E}=await p.read();if(x)break;y+=m.decode(E,{stream:!0});let N;for(;(N=y.indexOf(`
160
-
161
- `))>=0;){const v=y.slice(0,N);y=y.slice(N+2),/^event: run$/m.test(v)&&i()}}}catch{}r.signal.aborted||await new Promise(f=>setTimeout(f,3e3))}})(),()=>r.abort()},F0=i=>i===null?"unpriced":ul(i),P1=i=>i==null?"not measured":i<60?`${Math.round(i)}s`:i<3600?`${Math.floor(i/60)}m ${Math.round(i%60)}s`:`${Math.floor(i/3600)}h ${Math.floor(i%3600/60)}m`,tb=i=>i?i.replace("T"," ").slice(0,16):"not measured",eb=[{key:"started",label:"Started"},{key:"repo",label:"Repo"},{key:"source",label:"Source"},{key:"status",label:"Status"},{key:"verdict",label:"Verdict"},{key:"cost",label:"Cost"},{key:"elapsed",label:"Elapsed"}],ke={padding:"6px 12px",whiteSpace:"nowrap"},W0={...ke,textAlign:"left",fontSize:"var(--cp-text-sm)",textTransform:"uppercase",color:"var(--cp-text-2)",background:"var(--cp-bg-3)"};function As({label:i,value:r,options:o,onChange:f}){return s.jsx("span",{"data-testid":`filter-${i.toLowerCase()}`,"data-value":r,children:s.jsx(Zn,{label:i,value:r||"all",options:[{value:"",label:"All"},...o.map(d=>({value:d,label:d}))],onSelect:f})})}function lb({subscribe:i=W1}){const[r,o]=R.useState(null),[f,d]=R.useState(null),[p,m]=R.useState(J0),[y,x]=R.useState({key:"started",dir:"desc"}),[E,N]=R.useState(!1),v=R.useCallback(()=>{Vl({}).then(k=>{o(k.runs),d(null)},k=>d(k.message))},[]);R.useEffect(()=>{v()},[v]),R.useEffect(()=>i?i(v):void 0,[i,v]);const A=R.useMemo(()=>r??[],[r]),U=R.useMemo(()=>I1(J1(A,p),y.key,y.dir),[A,p,y]),X=R.useMemo(()=>F1(U),[U]),P=k=>G=>m(H=>({...H,[k]:G})),q=JSON.stringify(p)!==JSON.stringify(J0);return f&&r===null?s.jsx(Lt,{title:"Could not load runs",hint:f}):r===null?s.jsx(It,{label:"Loading runs"}):s.jsxs("div",{"data-testid":"runs-page",style:{display:"flex",flexDirection:"column",gap:12},children:[s.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:8,alignItems:"center"},children:[s.jsx(Qa,{"aria-label":"Search runs",placeholder:"Search runs",value:p.q,onChange:k=>P("q")(k.target.value),style:{maxWidth:240}}),s.jsx(As,{label:"Status",value:p.status,options:["running","completed"],onChange:P("status")}),s.jsx(As,{label:"Verdict",value:p.verdict,options:Bo(A.map(k=>k.verdict??"none")),onChange:P("verdict")}),s.jsx(As,{label:"Repo",value:p.repo,options:Bo(A.map(Xs)),onChange:P("repo")}),s.jsx(As,{label:"Source",value:p.source,options:Bo(A.map(Ys)),onChange:P("source")}),s.jsxs("label",{style:{display:"inline-flex",gap:6,alignItems:"center",fontSize:"var(--cp-text-base)",color:"var(--cp-text-2)"},children:[s.jsx("input",{type:"checkbox","data-testid":"group-toggle",checked:E,onChange:k=>N(k.target.checked)}),"Group by repo"]}),s.jsxs("span",{"data-testid":"runs-count",style:{marginLeft:"auto",fontSize:"var(--cp-text-base)",color:"var(--cp-text-2)"},children:[U.length," of ",A.length," runs"]})]}),E&&U.length?s.jsx(qt,{style:{padding:0,overflow:"auto"},children:s.jsxs("table",{"data-testid":"rollup",style:{width:"100%",borderCollapse:"collapse",fontSize:"var(--cp-text-base)"},children:[s.jsx("thead",{children:s.jsx("tr",{children:["Repo","Runs","Running","Verified","Cost"].map(k=>s.jsx("th",{scope:"col",style:W0,children:k},k))})}),s.jsx("tbody",{children:X.map(k=>s.jsxs("tr",{"data-testid":"rollup-row","data-repo":k.repo,style:{borderTop:"1px solid var(--cp-border-light)"},children:[s.jsx("td",{style:ke,children:s.jsx("button",{type:"button",onClick:()=>P("repo")(k.repo),style:{background:"none",border:0,color:"var(--cp-accent)",cursor:"pointer",padding:0,font:"inherit"},children:k.repo})}),s.jsx("td",{style:ke,children:k.runs}),s.jsx("td",{style:ke,children:k.running}),s.jsxs("td",{style:ke,children:[k.verified," of ",k.runs]}),s.jsxs("td",{style:ke,children:[F0(k.cost),k.cost!==null&&k.unpriced?` (+${k.unpriced} unpriced)`:""]})]},k.repo))})]})}):null,U.length===0?s.jsx(Lt,{title:q?"No runs match these filters":"No runs yet",hint:q?"Clear a filter or the search to see more.":"Start a run and it will appear here."}):s.jsx(qt,{style:{padding:0,overflow:"auto"},children:s.jsxs("table",{"data-testid":"runs-table",style:{width:"100%",borderCollapse:"collapse",fontSize:"var(--cp-text-base)"},children:[s.jsx("thead",{children:s.jsx("tr",{children:eb.map(k=>s.jsx("th",{scope:"col","aria-sort":y.key===k.key?y.dir==="asc"?"ascending":"descending":"none",style:W0,children:s.jsxs("button",{type:"button","data-testid":`sort-${k.key}`,onClick:()=>x(G=>({key:k.key,dir:G.key===k.key&&G.dir==="desc"?"asc":"desc"})),style:{background:"none",border:0,cursor:"pointer",font:"inherit",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em",color:"inherit",padding:0},children:[k.label,y.key===k.key?y.dir==="asc"?" (asc)":" (desc)":""]})},k.key))})}),s.jsx("tbody",{children:U.map(k=>s.jsxs("tr",{"data-testid":"run-row","data-run":k.run_id,style:{borderTop:"1px solid var(--cp-border-light)"},children:[s.jsx("td",{style:ke,children:s.jsx("a",{href:`#/runs/${encodeURIComponent(k.source_id)}/${encodeURIComponent(k.run_id)}`,style:{color:"var(--cp-accent)",textDecoration:"none"},children:tb(k.started_at)})}),s.jsxs("td",{style:ke,children:[k.origin_repo??s.jsx("span",{style:{color:"var(--cp-text-2)"},children:"no repo"}),k.issue_ref?s.jsxs("span",{style:{color:"var(--cp-text-2)"},children:[" ",k.issue_ref]}):null]}),s.jsx("td",{style:ke,children:Ys(k)}),s.jsx("td",{style:ke,children:s.jsx(wt,{tone:Ya(k)==="running"?"info":"neutral",pulse:Ya(k)==="running",children:Ya(k)})}),s.jsx("td",{style:ke,children:k.verdict?s.jsx(il,{run:k}):s.jsx("span",{style:{color:"var(--cp-text-2)"},children:"none yet"})}),s.jsx("td",{style:ke,children:F0(k.cost_usd)}),s.jsx("td",{style:ke,children:P1(k.elapsed_s??k.wall_s)})]},`${k.source_id}:${k.run_id}`))})]})})]})}const nb={id:"runs",path:"/runs",title:"Runs",component:lb,inSettings:!1};async function ab(){const i=globalThis.LOKI_CONTROL_BASE??"",r=xe(),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 ub=i=>i.probe==="timeout"?"installed, version probe timed out":i.installed?i.version?`installed, ${i.version}`:"installed, version not reported":"not installed";function ib(){const[i,r]=R.useState(null),[o,f]=R.useState(null);if(R.useEffect(()=>{let p=!0;return ab().then(m=>p&&r(m)).catch(m=>p&&f(m instanceof Error?m.message:String(m))),()=>{p=!1}},[]),o)return s.jsx(Lt,{title:"Could not load providers",hint:o});if(!i)return s.jsx(It,{label:"Detecting provider CLIs"});const d=i.providers.map(p=>[s.jsxs("span",{style:{display:"inline-flex",gap:8,alignItems:"center"},children:[s.jsx(yp,{state:p.installed?"active":"idle",label:p.installed?"installed":"not installed"}),s.jsx("strong",{children:p.id}),p.deprecated?s.jsx(wt,{tone:"warning",children:"deprecated"}):null]},"n"),ub(p),p.auth_present?s.jsx(wt,{tone:"success",children:"auth present"},"a"):s.jsx(wt,{tone:"neutral",children:"no auth env set"},"a"),p.auth_env_names.length?`${p.auth_env_set.length?p.auth_env_set.join(", "):"none"} (of ${p.auth_env_names.join(", ")})`:"not measured",p.tiers.planning??"not measured",p.tiers.development??"not measured",p.tiers.fast??"not measured"]);return s.jsxs("div",{style:{display:"grid",gap:16},children:[s.jsx("h1",{style:{margin:0,fontSize:"var(--cp-text-xl, 20px)"},children:"Models and providers"}),s.jsx(jn,{caption:"Provider CLIs",columns:["Provider","CLI","Auth","Env vars set","Planning","Development","Fast"],rows:d}),s.jsx(qt,{compact:!0,children:s.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 sb={id:"models",path:"/models",title:"Models and providers",component:ib,inSettings:!0};class Qp extends Error{constructor(r,o){super(o),this.status=r}}const cb=()=>globalThis.LOKI_CONTROL_BASE??"";async function rb(i){const r=xe(),o=await fetch(`${cb()}/v1/runs`,{method:"POST",headers:{"content-type":"application/json",...r?{authorization:`Bearer ${r}`}:{}},body:JSON.stringify(i)}),f=await o.json().catch(()=>({}));if(!o.ok)throw new Qp(o.status,f.error??`HTTP ${o.status}`);return f}const ob=async()=>(await pp()).repos,Go="loki:composer-submit",fb=8,db=()=>[{id:"action:new-run",kind:"Actions",label:"New run",hint:"Cmd+N",to:"/new",action:"new-run"},{id:"action:toggle-theme",kind:"Actions",label:"Toggle theme",hint:"Cmd+Shift+D",action:"toggle-theme"}],hb=i=>i.filter(r=>!r.path.includes(":")).map(r=>({id:`page:${r.id}`,kind:"Pages",label:r.title,hint:r.path,to:r.path})),P0=i=>{const r=Date.parse(i.started_at??i.last_event_at??"");return Number.isNaN(r)?0:r},mb=i=>[...i].sort((r,o)=>P0(o)-P0(r)).map(r=>({id:`run:${r.source_id}/${r.run_id}`,kind:"Runs",label:r.run_id,hint:[r.origin_repo,Ye(r)??r.status].filter(Boolean).join(" / ")||void 0,to:`/runs/${encodeURIComponent(r.source_id)}/${encodeURIComponent(r.run_id)}`})),pb=(i,r)=>{const o=`${i.label} ${i.hint??""}`.toLowerCase();return r.split(/\s+/).filter(Boolean).every(f=>o.includes(f))};function gb(i,r,o,f){const d=i.trim().toLowerCase(),p=m=>d?m.filter(y=>pb(y,d)):m;return[...p(f),...p(r),...p(o).slice(0,fb)]}const vb=["claude","codex","cline","aider","opencode"],yb=["opus","sonnet","haiku"],xb=["1","5","10","25","50"],bb=/^https:\/\/github\.com\/([A-Za-z0-9][A-Za-z0-9._-]*)\/([A-Za-z0-9._-]+)\/issues\/([1-9][0-9]*)\/?$/;function Sb(i){const r=i.trim(),o=bb.exec(r);return o?`${o[1]}/${o[2]}#${o[3]}`:r}function jb(i,r){const o={target:Sb(i)};return r.repo&&(o.repo=r.repo),r.model&&(o.model=r.model),r.workspace?o.workspace=r.workspace:(r.provider&&(o.provider=r.provider),r.budget&&(o.budget=r.budget)),o}function _b(i){return i instanceof Qp?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===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 Ds=(i,r)=>[{value:"",label:r},...i.map(o=>({value:o,label:o}))];function Tb(){const[i,r]=R.useState(""),[o,f]=R.useState({}),[d,p]=R.useState(null),[m,y]=R.useState(!1),[x,E]=R.useState(null),[N,v]=R.useState(null),A=R.useRef(null),U=H=>Q=>f(K=>({...K,[H]:Q||void 0}));R.useEffect(()=>{var Q;let H=!0;return ob().then(K=>H&&p(K)).catch(()=>H&&p([])),(Q=A.current)==null||Q.focus(),()=>{H=!1}},[]);const X=x!==null,P=R.useRef(!1),q=async()=>{if(P.current||X||!i.trim())return;P.current=!0;const H=jb(i,o);v(null),E(H.target);try{await rb(H),location.hash="#/runs"}catch(Q){E(null),v(_b(Q))}finally{P.current=!1}},k=R.useRef(q);k.current=q,R.useEffect(()=>{const H=()=>{k.current()};return window.addEventListener(Go,H),()=>window.removeEventListener(Go,H)},[]);const G=!!o.workspace;return s.jsxs("section",{"data-testid":"composer",style:{maxWidth:760,margin:"0 auto",padding:"var(--cp-space-2xl) var(--cp-space-xl)"},children:[x===null&&!i?s.jsx(Lt,{title:"What should Loki build?",hint:"Paste owner/repo#N or a GitHub issue URL, give a PRD path, or describe a task. Nothing starts until you press Cmd+Enter."}):null,x!==null?s.jsx("div",{"data-testid":"optimistic-row",children:s.jsx(ql,{icon:s.jsx(It,{size:14,label:"Starting"}),title:x,meta:"starting, waiting for the control service"})}):null,s.jsxs("div",{style:{border:"1px solid var(--cp-border)",borderRadius:"var(--cp-radius-lg)",background:"var(--cp-card)",padding:12,marginTop:16},children:[s.jsx("textarea",{ref:A,"data-testid":"composer-input","aria-label":"Task, issue or PRD path",value:i,rows:4,disabled:X,placeholder:"owner/repo#123, an issue URL, a PRD path, or a task",onChange:H=>r(H.target.value),onKeyDown:H=>{H.key==="Enter"&&(H.metaKey||H.ctrlKey)&&(H.preventDefault(),q())},style:{width:"100%",resize:"vertical",border:0,outline:"none",background:"transparent",color:"var(--cp-text)",font:"inherit",fontSize:"var(--cp-text-md)"}}),s.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:8,alignItems:"center",marginTop:8},children:[s.jsx("span",{"data-testid":"chip-repo",children:s.jsx(Zn,{label:"repo",value:o.repo??"server directory",options:Ds(d??[],"server directory"),onSelect:U("repo")})}),s.jsx("span",{"data-testid":"chip-model",children:s.jsx(Zn,{label:"model",value:o.model??"default",options:Ds(yb,"default"),onSelect:U("model")})}),s.jsx("span",{"data-testid":"chip-provider",children:s.jsx(Zn,{label:"provider",value:G?"set per repo":o.provider??"default",options:G?void 0:Ds(vb,"default"),onSelect:U("provider")})}),s.jsx("span",{"data-testid":"chip-budget",children:s.jsx(Zn,{label:"budget",value:G?"set per repo":o.budget?`$${o.budget}`:"none",options:G?void 0:Ds(xb.map(String),"none").map(H=>({...H,label:H.value?`$${H.value}`:H.label})),onSelect:U("budget")})}),s.jsx("span",{"data-testid":"chip-workspace",onClick:()=>y(H=>!H),children:s.jsx(Zn,{label:"workspace",value:o.workspace??"none"})}),m?s.jsx("input",{"data-testid":"workspace-input","aria-label":"Workspace name from loki.yaml",placeholder:"name from loki.yaml",value:o.workspace??"",onChange:H=>U("workspace")(H.target.value.trim()),style:{border:"1px solid var(--cp-border)",borderRadius:"var(--cp-radius-md)",background:"var(--cp-bg)",color:"var(--cp-text)",padding:"4px 8px",fontSize:"var(--cp-text-base)"}}):null,s.jsx("span",{style:{flex:1}}),s.jsxs(Bt,{"data-testid":"composer-submit",disabled:X||!i.trim(),onClick:()=>void q(),children:["Start ",s.jsx(_p,{children:"Cmd+Enter"})]})]})]}),d!==null&&d.length===0?s.jsx("p",{"data-testid":"no-repos",style:{color:"var(--cp-text-2)",fontSize:"var(--cp-text-base)",marginTop:8},children:"No repos discovered yet. The run starts in the directory the control service was launched from."}):null,N?s.jsx("div",{"data-testid":"composer-error",style:{marginTop:12},children:s.jsx(Wx,{tone:"error",onClose:()=>v(null),children:N})}):null]})}const Eb={id:"compose",path:"/new",title:"New run",component:Tb},Nb=()=>globalThis.LOKI_CONTROL_BASE??"";async function zb(i,r,o){const f=xe(),d={"content-type":"application/json"};f&&(d.authorization=`Bearer ${f}`);const p=await fetch(`${Nb()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}/${o}`,{method:"POST",headers:d,body:"{}"}),m=await p.json().catch(()=>({}));if(!p.ok)throw new Error(m.error??`HTTP ${p.status}`)}const Ob={stop:"Stopping...",retry:"Retrying...",resume:"Resuming..."},Rb={stop:"Stop signal sent.",retry:"Retry started as a new run.",resume:"Resume started."};function Cb({source:i,run:r,status:o,onChanged:f}){const[d,p]=R.useState(!1),[m,y]=R.useState(null),[x,E]=R.useState(!1),[N,v]=R.useState(!1),[A,U]=R.useState(null),X=o.trim().toUpperCase(),P=m==="stop"||x,q=!P&&(m==="resume"||N||X==="RUNNING"),k=X==="BLOCKED"&&!q&&!P,G=async H=>{if(!m){p(!1),U(null),y(H);try{await zb(i,r,H),H==="stop"&&E(!0),H==="resume"&&v(!0),U({tone:"ok",text:Rb[H]}),f==null||f()}catch(Q){U({tone:"error",text:Q.message})}finally{y(null)}}};return s.jsxs("div",{"data-testid":"run-controls","data-state":P?"stopping":q?"running":X.toLowerCase(),style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[q&&!m&&!d?s.jsx(Bt,{variant:"danger",size:"sm",onClick:()=>p(!0),children:"Stop"}):null,d?s.jsxs("span",{"data-testid":"stop-confirm",role:"group","aria-label":"Confirm stop",style:{display:"flex",gap:8,alignItems:"center"},children:[s.jsx("span",{children:"Stop this run?"}),s.jsx(Bt,{variant:"danger",size:"sm",onClick:()=>void G("stop"),children:"Confirm stop"}),s.jsx(Bt,{variant:"ghost",size:"sm",onClick:()=>p(!1),children:"Cancel"})]}):null,k&&!m?s.jsx(Bt,{size:"sm",onClick:()=>void G("resume"),children:"Resume"}):null,!q&&!P&&!m&&X!==""?s.jsx(Bt,{variant:"secondary",size:"sm",onClick:()=>void G("retry"),children:"Retry"}):null,m?s.jsx("span",{role:"status",children:Ob[m]}):null,!m&&A?s.jsx("span",{role:A.tone==="error"?"alert":"status",style:A.tone==="error"?{color:"var(--cp-error)"}:void 0,children:A.text}):null]})}const Ab=new Set(["that","this","with","from","when","should","must","will","have","into","then","than","each","which","their","there","about"]),$u=i=>new Set((i.toLowerCase().match(/[a-z0-9]{4,}/g)??[]).filter(r=>!Ab.has(r))),Gu=(i,r)=>{for(const o of i)if(r.has(o))return!0;return!1},ko=i=>$u(i.replace(/[/.]/g," "));function qo(i){if(i===null)return null;try{return JSON.parse(i)}catch{return null}}function Db(i){const r=i&&typeof i=="object"?i:{},f=(typeof r.body=="string"?r.body:"").split(/\r?\n/),d=f.map(x=>{var E,N;return(N=(E=/^\s*[-*]\s*\[[ xX]\]\s*(.+)$/.exec(x))==null?void 0:E[1])==null?void 0:N.trim()}).filter(x=>!!x);if(d.length)return{list:d,source:"checklist"};const p=[];let m=!1;for(const x of f)if(/^\s*#{1,6}\s/.test(x)||/^\s*\*\*[^*]+\*\*:?\s*$/.test(x))m=/accept|requirement|criteri|expected|done when/i.test(x);else if(m){const E=/^\s*(?:[-*]|\d+[.)])\s+(.+)$/.exec(x);E!=null&&E[1]&&p.push(E[1].trim())}if(p.length)return{list:p,source:"checklist"};const y=typeof r.title=="string"?r.title.trim():"";return y?{list:[y],source:"title"}:{list:[],source:"none"}}function Mb(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()):[],f=[];for(const d of o){if(typeof d=="string"){const p=d.replace(/^\s*(?:[-*]|\d+[.)])\s*/,"").trim();p&&f.push({text:p,files:[],checks:[]});continue}if(d&&typeof d=="object"){const p=d,m=[p.title,p.step,p.description,p.text].find(E=>typeof E=="string"&&E.trim()!=="");if(!m)continue;const y=Array.isArray(p.files)?p.files.filter(E=>typeof E=="string"):[],x=Array.isArray(p.checks)?p.checks.filter(E=>typeof E=="string"):[];f.push({text:m.trim(),files:y,checks:x,...typeof p.criterion=="string"?{criterion:p.criterion}:{}})}}return f}function wb(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 Ub(i,r){return i?Ye({...i,verdict:i.verdict??(r==null?void 0:r.verdict)??null}):null}function Hb(i){var v,A,U,X,P;const{list:r,source:o}=Db(i.issue),f=Mb(i.plan),d=((v=i.receipt)==null?void 0:v.checks)??[],p=i.run?Ye({...i.run,verdict:i.run.verdict??((A=i.receipt)==null?void 0:A.verdict)??null}):null,m=(U=i.receipt)==null?void 0:U.verdict,y=p===pt.VERIFIED&&(m==null||m===pt.VERIFIED),x=[...new Set([...i.changedFiles,...((P=(X=i.receipt)==null?void 0:X.wall)==null?void 0:P.files)??[]])],E=new Set;return{rows:r.map(q=>{const k=$u(q),G=f.filter(at=>at.criterion?at.criterion.trim()===q:Gu(k,$u(at.text))),H=new Set;for(const at of G){for(const he of at.files)H.add(he);const de=$u(at.text);for(const he of x)Gu(de,ko(he))&&H.add(he)}for(const at of x)Gu(k,ko(at))&&H.add(at);const Q=[...H];Q.forEach(at=>E.add(at));const K=at=>at.name.trim().toLowerCase(),Tt=at=>!!K(at)&&(q.toLowerCase().includes(K(at))||G.some(de=>de.text.toLowerCase().includes(K(at))||de.checks.some(he=>he.trim().toLowerCase()===K(at)))),ut=d.filter(at=>{const de=$u(`${at.name} ${at.cmd??""}`);return Tt(at)||Gu(k,de)||Q.some(he=>Gu(ko(he),de))}),rt=ut.filter(Tt),Ne=ut.filter(at=>!Tt(at));let fe="not proven",Kt=null;return i.receipt?rt.some(at=>at.result==="fail")?(fe="failed",Kt="a linked check failed"):rt.length===0?Kt=Ne.length?"link inferred":"no check linked to this criterion":rt.every(at=>at.result==="pass")?y?fe="proven":Kt=`verdict is ${p!==pt.VERIFIED?p??"unknown (run record unavailable)":m}`:Kt="a linked check did not run":Kt="no receipt for this run",{criterion:q,steps:G.map(at=>at.text),files:Q,evidence:rt,inferred:Ne,status:fe,note:Kt}}),unmapped_files:x.filter(q=>!E.has(q)),criteria_source:o}}async function Bb(i,r,o,f){const[d,p,m,y]=await Promise.all(["issue.json","plan.json","receipt.json","diff.patch"].map(v=>Dp(i,r,v))),x=qo(m??null),E=qo(d??null),N=qo(p??null);return{matrix:Hb({issue:E,plan:N,receipt:x,changedFiles:wb(y??null),run:f}),stages:o,verdict:Ub(f,x),have:{issue:E!==null,plan:N!==null,receipt:x!==null}}}const kb={proven:"success",failed:"error","not proven":"warning"},Qu={fontFamily:"var(--cp-font-mono)",fontSize:12,wordBreak:"break-all"},Lo=s.jsx("span",{style:{color:"var(--cp-text-2)"},children:"none"});function Xp({params:i}){const r=i.source,o=i.run;return!r||!o?s.jsx(qb,{}):s.jsx(Lb,{source:r,run:o})}function qb(){const[i,r]=R.useState(null),[o,f]=R.useState(null);return R.useEffect(()=>{let d=!0;return Vl().then(p=>d&&r(p.runs),p=>d&&f(p.message)),()=>{d=!1}},[]),o?s.jsx(Lt,{title:"Plans unavailable",hint:o}):i?i.length?s.jsx("div",{"data-testid":"plans-picker",children:s.jsx(jn,{caption:"Pick a run",columns:["Run","Outcome","Started"],rows:i.map(d=>[s.jsx("a",{href:`#/plans/${encodeURIComponent(d.source_id)}/${encodeURIComponent(d.run_id)}`,style:Qu,"data-testid":"plans-pick",children:d.run_id},"a"),d.verdict?s.jsx(il,{run:d},"v"):"running",d.started_at??"not measured"])})}):s.jsx(Lt,{title:"No runs yet",hint:"Start a run to see its plan and traceability here."}):s.jsx(It,{label:"Loading runs"})}function Lb({source:i,run:r}){var N;const[o,f]=R.useState(null),[d,p]=R.useState(null);if(R.useEffect(()=>{let v=!0;return f(null),(async()=>{const A=await Vs(i,r).catch(()=>null);return Bb(i,r,(A==null?void 0:A.stages)??null,A)})().then(A=>v&&f(A),A=>v&&p(A.message)),()=>{v=!1}},[i,r]),d)return s.jsx(Lt,{title:"Plan unavailable",hint:d});if(!o)return s.jsx(It,{label:"Loading plan"});const{matrix:m,have:y}=o,x=["issue","plan","receipt"].filter(v=>!y[v]),E=m.rows.filter(v=>v.status==="proven").length;return s.jsxs("div",{"data-testid":"plans",style:{display:"flex",flexDirection:"column",gap:16},children:[s.jsxs(qt,{style:{padding:"14px 16px"},children:[s.jsx("div",{style:{fontFamily:"var(--cp-font-mono)"},children:r}),s.jsxs("div",{"data-testid":"plans-summary",style:{color:"var(--cp-text-2)"},children:[m.rows.length?`${E} of ${m.rows.length} criteria proven`:"not measured: no criteria",o.verdict?` - verdict ${o.verdict}`:y.receipt?" - verdict unavailable":" - no receipt"]}),x.length?s.jsxs("div",{"data-testid":"plans-missing",style:{color:"var(--cp-text-2)"},children:["not available: ",x.map(v=>`${v}.json`).join(", ")]}):null]}),(N=o.stages)!=null&&N.length?s.jsx(Fx,{stages:o.stages.map(v=>({label:v.stage,status:v.status==="completed"?"success":v.status==="failed"?"error":"pending"}))}):null,m.rows.length===0?s.jsx(Lt,{title:"No requirements found",hint:"issue.json has no title or acceptance criteria for this run."}):s.jsx(jn,{caption:"Traceability matrix",columns:["Requirement","Plan step","Files changed","Evidence","Verdict"],rows:m.rows.map(v=>[v.criterion,v.steps.length?s.jsx("ol",{style:{margin:0,paddingLeft:16},children:v.steps.map(A=>s.jsx("li",{children:A},A))},"s"):Lo,v.files.length?s.jsx("div",{style:Qu,children:v.files.map(A=>s.jsx("div",{children:A},A))},"f"):Lo,v.evidence.length||v.inferred.length?s.jsxs("div",{children:[v.evidence.map(A=>s.jsxs("div",{style:Qu,children:[A.result,": ",A.name]},A.name)),v.inferred.map(A=>s.jsxs("div",{"data-testid":"inferred-hint",style:{...Qu,color:"var(--cp-text-2)"},children:["inferred, not recorded: ",A.result,": ",A.name]},`i-${A.name}`))]},"e"):Lo,s.jsxs("span",{"data-testid":"row-status","data-status":v.status,children:[s.jsx(wt,{tone:kb[v.status],children:v.status==="not proven"?v.note==="link inferred"?"NOT PROVEN (link inferred)":"NOT PROVEN":v.status.toUpperCase()}),v.note?s.jsx("div",{style:{color:"var(--cp-text-2)",fontSize:12},children:v.note}):null]},"v")])}),m.unmapped_files.length?s.jsxs(qt,{style:{padding:"14px 16px"},"data-testid":"plans-unmapped",children:[s.jsx("div",{style:{color:"var(--cp-text-2)"},children:"Changed files not tied to any requirement"}),s.jsx("div",{style:Qu,children:m.unmapped_files.map(v=>s.jsx("div",{children:v},v))})]}):null]})}const Yb={id:"plans",path:"/plans/:source/:run",title:"Plans",component:Xp},Vb={id:"plans-picker",path:"/plans",title:"Plans",component:Xp},Zp=()=>globalThis.LOKI_CONTROL_BASE??"",$o=i=>{const r=xe();return{...i?{"content-type":"application/json"}:{},...r?{authorization:`Bearer ${r}`}:{}}};async function tp(i,r){const o=await fetch(`${Zp()}${i}`,r),f=await o.json().catch(()=>({}));if(!o.ok)throw new Error(f.error??`HTTP ${o.status}`);return f}async function Gb(i){const r=await fetch(`${Zp()}/v1/merge/run`,{method:"POST",headers:$o(!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 Ms(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 $b(){const[i,r]=R.useState(null),[o,f]=R.useState(null),[d,p]=R.useState(""),[m,y]=R.useState(!1),[x,E]=R.useState(null),[N,v]=R.useState(null),[A,U]=R.useState(!1),[X,P]=R.useState(null),q=R.useCallback(async()=>{try{const K=await tp("/v1/merge/queue",{headers:$o(!1)});K.measured?(r(K.queue),f(null)):(r(null),f(K.error??"not measured"))}catch(K){r(null),f(K instanceof Error?K.message:String(K))}},[]);R.useEffect(()=>{q()},[q]);const k=/^[0-9]{1,7}$/.test(d.trim()),G=async()=>{y(!0),E(null);try{await tp("/v1/merge/queue",{method:"POST",headers:$o(!0),body:JSON.stringify({prs:[d.trim()]})}),E({tone:"success",text:`Queued PR #${d.trim()}`}),p(""),await q()}catch(K){E({tone:"error",text:K instanceof Error?K.message:String(K)})}y(!1)},H=async K=>{y(!0),E(null),U(!1);try{const Tt=await Gb(K);K?(v(Tt),P(null)):(P(Tt),v(null)),await q()}catch(Tt){E({tone:"error",text:Tt instanceof Error?Tt.message:String(Tt)})}y(!1)},Q=i!==null&&i.length===0;return s.jsxs("div",{style:{display:"grid",gap:16,maxWidth:720},children:[s.jsx("h1",{style:{margin:0,fontSize:"var(--cp-text-xl, 20px)"},children:"Merge queue"}),s.jsx(qt,{children:s.jsxs("div",{style:{display:"grid",gap:8},children:[s.jsx("strong",{children:"Queue"}),o?s.jsx(Lt,{title:"Queue not measured",hint:o}):i===null?s.jsx(It,{label:"Reading the queue"}):Q?s.jsx("small",{children:"The merge queue is empty."}):s.jsx("ol",{"aria-label":"Queued pull requests",style:{margin:0,paddingLeft:20},children:i.map(K=>s.jsxs("li",{children:["PR #",K]},K))}),s.jsxs("div",{style:{display:"flex",gap:8},children:[s.jsx(Qa,{"aria-label":"PR number",inputMode:"numeric",placeholder:"PR number",value:d,onChange:K=>p(K.target.value.replace(/[^0-9]/g,"").slice(0,7))}),s.jsx(Bt,{variant:"secondary",disabled:!k||m,onClick:G,children:"Add"})]})]})}),s.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[s.jsx(Bt,{variant:"secondary",disabled:m||Q||i===null,onClick:()=>H(!0),children:"Preview"}),A?s.jsxs("span",{role:"alertdialog","aria-label":"Confirm merge",style:{display:"inline-flex",gap:8,alignItems:"center"},children:[s.jsx("small",{children:"Squash-merge each PR whose checks are green, one at a time. This cannot be undone."}),s.jsx(Bt,{variant:"danger",disabled:m,onClick:()=>H(!1),children:"Confirm merge"}),s.jsx(Bt,{variant:"ghost",onClick:()=>U(!1),children:"Cancel"})]}):s.jsx(Bt,{disabled:m||Q||i===null,onClick:()=>U(!0),children:"Merge queue"}),m?s.jsx(It,{label:"Working"}):null]}),x?s.jsx(wt,{tone:x.tone,children:x.text}):null,N?s.jsxs(qt,{children:[s.jsx("strong",{children:"Plan (dry run, nothing changed)"}),Ms(N)?s.jsx("p",{role:"alert",style:{margin:"4px 0"},children:Ms(N)}):null,s.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap"},children:N.lines.join(`
162
- `)||"not measured"})]}):null,X?s.jsxs(qt,{children:[s.jsx("strong",{children:"Merge result"})," ",s.jsx(wt,{tone:X.ok?"success":"warning",children:X.ok?"all merged":X.partial||!X.ran?"partial result":"some PRs left in queue"}),Ms(X)?s.jsx("p",{role:"alert",style:{margin:"4px 0"},children:Ms(X)}):null,s.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap"},children:X.lines.join(`
163
- `)})]}):null]})}const Qb={id:"merge",path:"/merge",title:"Merge queue",component:$b},Xb=()=>globalThis.LOKI_CONTROL_BASE??"",Zb=i=>i==="low"?"success":i==="medium"?"warning":i==="high"||i==="critical"?"error":"neutral";function Kb(){const[i,r]=R.useState("pr"),[o,f]=R.useState(""),[d,p]=R.useState(!1),[m,y]=R.useState(null),x=i==="staged"||(i==="pr"?/^[0-9]{1,7}$/.test(o):/^[A-Za-z0-9._/][A-Za-z0-9._/-]{0,99}$/.test(o)),E=async()=>{p(!0);const N=i==="staged"?"staged=1":`${i}=${encodeURIComponent(o)}`;try{const v=xe(),A=await fetch(`${Xb()}/v1/review/risk?${N}`,{headers:v?{authorization:`Bearer ${v}`}:{}}),U=await A.json().catch(()=>null);y(A.ok&&U&&U.measured===!0&&typeof U.score=="number"?U:{measured:!1,reason:(U==null?void 0:U.error)??(U==null?void 0:U.reason)??`HTTP ${A.status}`})}catch(v){y({measured:!1,reason:v instanceof Error?v.message:String(v)})}p(!1)};return s.jsxs("div",{style:{display:"grid",gap:16,maxWidth:720},children:[s.jsx("h1",{style:{margin:0,fontSize:"var(--cp-text-xl, 20px)"},children:"PR risk"}),s.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",alignItems:"center"},children:[s.jsxs("select",{"aria-label":"Diff source",value:i,onChange:N=>{r(N.target.value),f(""),y(null)},children:[s.jsx("option",{value:"pr",children:"Pull request"}),s.jsx("option",{value:"staged",children:"Staged changes"}),s.jsx("option",{value:"since",children:"Since a ref"})]}),i!=="staged"?s.jsx(Qa,{"aria-label":i==="pr"?"PR number":"Git ref",placeholder:i==="pr"?"PR number":"HEAD~5",value:o,onChange:N=>f(N.target.value)}):null,s.jsx(Bt,{disabled:!x||d,onClick:E,children:"Measure risk"}),d?s.jsx(It,{label:"Scoring"}):null]}),m&&m.measured?s.jsxs(s.Fragment,{children:[s.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[s.jsx(bl,{label:"Risk score",value:`${m.score}/100`}),s.jsx(wt,{tone:Zb(m.level),children:m.level}),s.jsx("small",{children:m.source}),s.jsx("small",{children:typeof m.files=="number"?`${m.files} files`:"files: not measured"})]}),s.jsx(jn,{caption:"Risk factors",columns:["Factor","Points","Detail"],rows:m.factors.map(N=>[N.factor,`${N.points}/${N.max}`,N.detail])})]}):m?s.jsxs(qt,{children:[s.jsx("strong",{children:"Risk score: not measured"}),s.jsx("br",{}),s.jsx("small",{children:m.reason??"no reason reported"})]}):null]})}const Jb={id:"risk",path:"/risk",title:"PR risk",component:Kb},Kp=()=>globalThis.LOKI_CONTROL_BASE??"",Jp=(i={})=>{const r=xe();return r?{...i,authorization:`Bearer ${r}`}:i};class $a extends Error{constructor(r,o,f){super(r),this.status=o,this.details=f}}async function Ip(){const i=await fetch(`${Kp()}/v1/config`,{headers:Jp()}),r=await i.json().catch(()=>({}));if(!i.ok)throw new $a(r.error??`HTTP ${i.status}`,i.status,[]);return{exists:!!r.exists,etag:r.etag??"",config:r.config??{},errors:r.errors??[]}}async function Fp(i,r){const o=await fetch(`${Kp()}/v1/config`,{method:"PUT",headers:Jp({"content-type":"application/json","if-match":r}),body:JSON.stringify({config:i})}),f=await o.json().catch(()=>({}));if(!o.ok)throw new $a(f.error??`HTTP ${o.status}`,o.status,f.errors??(f.paths?f.paths.map(d=>`${d}: looks like a secret`):[]));return{etag:f.etag??r,config:f.config??i}}const Ht=i=>`var(--cp-${i})`,Ib=[{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"}]}],xn=i=>typeof i=="object"&&i!==null&&!Array.isArray(i);function ws(i){const r={},o=xn(i)&&xn(i.workspaces)?i.workspaces:{};for(const[f,d]of Object.entries(o))xn(d)&&(xn(d.integration)&&"command"in d.integration&&(r[`${f} integration command`]=String(d.integration.command)),Array.isArray(d.repos)&&d.repos.forEach((p,m)=>{xn(p)&&"setup"in p&&(r[`${f} setup for repo ${m+1}`]=String(p.setup))}));return r}const Fb=(i,r)=>r.reduce((o,f)=>xn(o)?o[f]:void 0,i);function Wp(i,r,o){const f={...i},[d,...p]=r;if(d===void 0)return f;if(p.length===0)return o===void 0?delete f[d]:f[d]=o,f;const m=Wp(xn(f[d])?f[d]:{},p,o);return Object.keys(m).length===0?delete f[d]:f[d]=m,f}function Wb(i,r){return r==null?"":i.kind==="lines"?Array.isArray(r)?r.join(`
164
- `):"":i.kind==="json"?JSON.stringify(r,null,2):String(r)}function Pb(i,r){const o=r.trim();if(o==="")return{value:void 0};if(i.kind==="number"){const f=Number(o);return Number.isFinite(f)?{value:f}:{error:`${i.label} must be a number`}}if(i.kind==="lines")return{value:o.split(`
165
- `).map(f=>f.trim()).filter(Boolean)};if(i.kind==="json")try{const f=JSON.parse(o);return xn(f)?{value:f}:{error:`${i.label} must be a JSON object`}}catch{return{error:`${i.label} is not valid JSON`}}return{value:o}}function tS({section:i,state:r,onSave:o}){const f=i.fields.map(q=>Wb(q,Fb(r.config,q.path))),[d,p]=R.useState(f),[m,y]=R.useState([]),[x,E]=R.useState(!1),[N,v]=R.useState(!1),A=R.useId(),U=JSON.stringify(f);R.useEffect(()=>{p(f),y([])},[U]);const X=d.some((q,k)=>q!==f[k]),P=async()=>{const q=[];let k=r.config;if(i.fields.forEach((G,H)=>{const Q=Pb(G,d[H]??"");Q.error?q.push(Q.error):k=Wp(k,G.path,Q.value)}),q.length){y(q);return}if(JSON.stringify(ws(k))!==JSON.stringify(ws(r.config))){y(["Edit shell commands in loki.yaml directly"]);return}E(!0),y([]),v(!1);try{await o(k),v(!0)}catch(G){y(G instanceof $a?[G.message,...G.details]:[G.message])}finally{E(!1)}};return s.jsxs(qt,{"data-testid":`settings-${i.id}`,"aria-labelledby":`${A}-h`,children:[s.jsx("h2",{id:`${A}-h`,style:{margin:0,fontFamily:Ht("font-serif"),fontWeight:400,fontSize:Ht("text-xl")},children:i.title}),s.jsx("p",{style:{margin:"4px 0 12px",color:Ht("text-2"),fontSize:Ht("text-md")},children:i.hint}),s.jsx("div",{style:{display:"grid",gap:12},children:i.fields.map((q,k)=>{const G=`${A}-${k}`,H=K=>{v(!1),p(Tt=>Tt.map((ut,rt)=>rt===k?K:ut))},Q={id:G,value:d[k]??"","data-field":q.path.join(".")};return s.jsxs("div",{children:[s.jsx("label",{htmlFor:G,style:{display:"block",fontSize:Ht("text-md"),marginBottom:4},children:q.label}),q.kind==="select"?s.jsxs("select",{...Q,onChange:K=>H(K.target.value),style:{padding:"8px 10px",borderRadius:Ht("radius-md"),border:`1px solid ${Ht("border")}`,background:Ht("bg"),color:Ht("text"),font:"inherit"},children:[s.jsx("option",{value:"",children:"Not set"}),q.options.map(K=>s.jsx("option",{value:K,children:K},K))]}):q.kind==="lines"||q.kind==="json"?s.jsx(bp,{...Q,rows:q.kind==="json"?8:4,spellCheck:!1,onChange:K=>H(K.target.value),style:q.kind==="json"?{fontFamily:Ht("font-mono")}:void 0}):s.jsx(Qa,{...Q,type:q.kind==="number"?"number":"text",step:q.kind==="number"?"any":void 0,autoComplete:"off",spellCheck:!1,placeholder:q.kind==="env"?"ENV_VAR_NAME":void 0,onChange:K=>H(K.target.value),style:q.kind==="env"?{fontFamily:Ht("font-mono")}:void 0}),q.hint?s.jsx("div",{style:{color:Ht("text-3"),fontSize:Ht("text-base"),marginTop:4},children:q.hint}):null]},q.path.join("."))})}),i.id==="workspaces"&&Object.keys(ws(r.config)).length?s.jsxs("div",{"data-testid":"settings-shell-readonly",style:{marginTop:12},children:[s.jsx("div",{style:{fontSize:Ht("text-md"),marginBottom:4},children:"Shell commands (read only, edit in loki.yaml directly)"}),s.jsx("ul",{style:{margin:0,paddingLeft:18,fontFamily:Ht("font-mono"),fontSize:Ht("text-base"),color:Ht("text-2")},children:Object.entries(ws(r.config)).map(([q,k])=>s.jsxs("li",{children:[q,": ",k]},q))})]}):null,m.length?s.jsx("ul",{role:"alert","data-testid":"settings-problems",style:{margin:"12px 0 0",paddingLeft:18,color:Ht("error"),fontSize:Ht("text-md")},children:m.map(q=>s.jsx("li",{children:q},q))}):null,s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:12},children:[s.jsx(Bt,{disabled:!X||x,onClick:P,children:x?"Saving":"Save"}),N&&!X?s.jsx(wt,{tone:"success",children:"Saved"}):null]})]})}function eS(){const[i,r]=R.useState(null),[o,f]=R.useState(null),d=()=>{f(null),Ip().then(r,m=>f(m.message))};if(R.useEffect(d,[]),o)return s.jsx(Lt,{title:"Configuration unavailable",hint:o,action:s.jsx(Bt,{variant:"secondary",onClick:d,children:"Retry"})});if(!i)return s.jsx(It,{label:"Loading configuration"});const p=async m=>{try{const y=await Fp(m,i.etag);r({exists:!0,etag:y.etag,config:y.config,errors:[]})}catch(y){throw y instanceof $a&&y.status===409?new $a("loki.yaml changed on disk since it was loaded. Reload to see the latest, then apply your edit again.",409,[]):y}};return s.jsxs("div",{"data-testid":"config-settings",style:{display:"grid",gap:16,maxWidth:720},children:[s.jsxs("div",{children:[s.jsx("h1",{style:{margin:0,fontFamily:Ht("font-serif"),fontWeight:400,fontSize:Ht("text-2xl")},children:"Configuration"}),s.jsxs("p",{style:{margin:"4px 0 0",color:Ht("text-2"),fontSize:Ht("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?s.jsxs(qt,{"data-testid":"config-file-errors",role:"alert",style:{borderColor:Ht("error")},children:[s.jsx("strong",{children:"The current loki.yaml has problems"}),s.jsx("ul",{style:{margin:"6px 0 0",paddingLeft:18},children:i.errors.map(m=>s.jsx("li",{children:m},m))})]}):null,Ib.map(m=>s.jsx(tS,{section:m,state:i,onSave:p},m.id)),s.jsx("div",{children:s.jsx(Bt,{variant:"ghost",size:"sm",onClick:d,children:"Reload from disk"})})]})}const lS={id:"settings-config",path:"/settings/config",title:"Configuration",component:eS,inSettings:!0},Yo=i=>typeof i=="object"&&i!==null&&!Array.isArray(i),Xu=i=>i.replace(/[\\/]+$/,"").split(/[\\/]/).pop()??i;function nS(i){const r=Yo(i)&&Yo(i.workspaces)?i.workspaces:{};return Object.entries(r).map(([o,f])=>({name:o,def:Yo(f)?f:{}}))}const aS=(i,r)=>{const o=r.origin_repo;return o?i.repo&&(o===i.repo||o.endsWith(`/${i.repo}`)||Xu(o)===Xu(i.repo))?!0:!!i.path&&Xu(o)===Xu(i.path):!1},ep=i=>i.started_at??"";function uS(i,r){return nS(i).map(({name:o,def:f})=>{const d=(Array.isArray(f.repos)?f.repos:[]).map(x=>{const E=r.filter(N=>aS(x,N)).sort((N,v)=>ep(v).localeCompare(ep(N)));return{name:x.repo??(x.path?Xu(x.path):"unnamed"),path:x.path??null,after:Array.isArray(x.after)?x.after:[],shell:typeof x.setup=="string",latest:E[0]??null,runs:E.length}}),p=d.filter(x=>x.latest),m=d.length&&p.length===d.length?{total:d.length,verified:p.filter(x=>Va(x.latest)).length,failed:p.filter(x=>x.latest.verdict!==null&&!Va(x.latest)).length,running:p.filter(x=>x.latest.verdict===null).length}:null,y=!!f.integration&&typeof f.integration.command=="string";return{name:o,repos:d,shell:y||d.some(x=>x.shell),integrationShell:y,status:m}})}const Pp=()=>globalThis.LOKI_CONTROL_BASE??"",iS=()=>{const i=xe();return i?{"content-type":"application/json",authorization:`Bearer ${i}`}:{"content-type":"application/json"}};async function sS(){const i=xe(),r=await fetch(`${Pp()}/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 cS(i,r){const o=await fetch(`${Pp()}/v1/runs`,{method:"POST",headers:iS(),body:JSON.stringify({workspace:i,target:r})}),f=await o.json().catch(()=>({}));if(!o.ok)throw new Error(f.error??`HTTP ${o.status}`);return{pid:f.pid??0,command:f.command??""}}function rS({name:i}){const[r,o]=R.useState(""),[f,d]=R.useState(null),[p,m]=R.useState(!1),y=async()=>{m(!0),d(null);try{const x=await cS(i,r.trim());d({ok:!0,text:`Started: ${x.command} (pid ${x.pid})`})}catch(x){d({ok:!1,text:x instanceof Error?x.message:String(x)})}finally{m(!1)}};return s.jsxs("div",{style:{display:"grid",gap:8},children:[s.jsxs("div",{style:{display:"flex",gap:8},children:[s.jsx(Qa,{"aria-label":`Target for ${i}`,placeholder:"owner/repo#123 or a short task",value:r,onChange:x=>o(x.target.value)}),s.jsx(Bt,{disabled:p||!r.trim(),onClick:y,children:"Run workspace"})]}),f?s.jsxs("div",{role:f.ok?"status":"alert",children:[s.jsx(wt,{tone:f.ok?"success":"error",children:f.ok?"started":"refused"})," ",f.text]}):null]})}function oS({w:i}){const r=i.repos.map(o=>[s.jsx("strong",{children:o.name},"n"),o.path??"not measured",o.after.length?o.after.join(", "):"none",o.latest?o.latest.verdict?s.jsx(il,{run:o.latest},"v"):s.jsx(wt,{tone:"neutral",pulse:!0,children:"running"},"v"):"not measured",o.latest?String(o.runs):"not measured"]);return s.jsx(qt,{children:s.jsxs("div",{style:{display:"grid",gap:12},children:[s.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[s.jsx("h2",{style:{margin:0,fontSize:16},children:i.name}),i.shell?s.jsx(wt,{tone:"warning",children:"read-only: runs shell commands"}):null,s.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?s.jsx(jn,{caption:`Repos in ${i.name}`,columns:["Repo","Path","After","Latest run","Runs"],rows:r}):s.jsx("div",{children:"No repos listed"}),i.shell?s.jsx("div",{children:"Edit shell commands in loki.yaml; the UI never changes them."}):null,s.jsx(rS,{name:i.name})]})})}function fS(){const[i,r]=R.useState(null),[o,f]=R.useState([]),[d,p]=R.useState(null);return R.useEffect(()=>{let m=!0;return(async()=>{try{const{config:y,errors:x}=await sS();let E=[];try{E=(await Vl()).runs}catch{}m&&(r(uS(y,E)),f(x))}catch(y){m&&p(y instanceof Error?y.message:String(y))}})(),()=>{m=!1}},[]),d?s.jsx(Lt,{title:"Could not load workspaces",hint:d}):i?i.length?s.jsxs("div",{style:{display:"grid",gap:16},children:[o.length?s.jsxs("div",{role:"alert",children:[s.jsx(wt,{tone:"warning",children:"loki.yaml has problems"})," ",o.join("; ")]}):null,i.map(m=>s.jsx(oS,{w:m},m.name))]}):s.jsx(Lt,{title:"No workspaces",hint:"Define workspaces in loki.yaml to run a group of repos together."}):s.jsx(It,{label:"Loading workspaces"})}const dS={id:"workspaces",path:"/workspaces",title:"Workspaces",component:fS},hS=()=>globalThis.LOKI_CONTROL_BASE??"";async function mS(){const i=xe(),r=await fetch(`${hS()}/v1/integrations`,{headers:i?{authorization:`Bearer ${i}`}:{}});if(!r.ok)throw new Error(`HTTP ${r.status}`);return(await r.json()).integrations}const pS=i=>typeof i=="object"&&i!==null&&!Array.isArray(i);function tg(i,r,o){const[f,...d]=r;return f===void 0?i:{...i,[f]:d.length?tg(pS(i[f])?i[f]:{},d,o):o}}const gS={connected:"success",not_connected:"neutral",not_measured:"neutral"},vS={connected:"connected",not_connected:"not connected",not_measured:"not measured"};function yS({row:i,onChanged:r}){const[o,f]=R.useState(i.env_name??""),[d,p]=R.useState(!1),[m,y]=R.useState(null),x=/^[A-Z_][A-Z0-9_]*$/.test(o),E=async()=>{if(!(!i.config_path||!x)){p(!0),y(null);try{const N=await Ip();await Fp(tg(N.config,i.config_path.split("."),o),N.etag),y(`Saved ${o} to loki.yaml`),r()}catch(N){y(N instanceof $a?[N.message,...N.details].join(": "):N.message)}finally{p(!1)}}};return s.jsxs(qt,{"data-testid":`integration-${i.id}`,children:[s.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",justifyContent:"space-between"},children:[s.jsx("strong",{children:i.label}),s.jsx(wt,{tone:gS[i.status],children:vS[i.status]})]}),s.jsx("p",{style:{margin:"4px 0 8px",color:"var(--cp-text-2)",fontSize:"var(--cp-text-md)"},children:i.detail}),i.config_path?s.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[s.jsx(Qa,{"aria-label":`${i.label} variable name`,value:o,placeholder:"ENV_VAR_NAME",autoComplete:"off",spellCheck:!1,onChange:N=>{f(N.target.value.trim()),y(null)},style:{fontFamily:"var(--cp-font-mono)"}}),s.jsx(Bt,{onClick:E,disabled:d||!x||o===i.env_name,children:d?"Saving":"Connect"})]}):s.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&&!x?s.jsx("small",{role:"alert",children:"Use an environment variable name such as GITHUB_TOKEN, never the secret itself."}):null,m?s.jsx("small",{role:"status",style:{display:"block",marginTop:4},children:m}):null]})}function xS(){const[i,r]=R.useState(null),[o,f]=R.useState(null),d=R.useCallback(()=>{mS().then(r).catch(p=>f(p instanceof Error?p.message:String(p)))},[]);return R.useEffect(d,[d]),o?s.jsx(Lt,{title:"Could not load integrations",hint:o}):i?s.jsxs("div",{style:{display:"grid",gap:16},children:[s.jsx("h1",{style:{margin:0,fontSize:"var(--cp-text-xl, 20px)"},children:"Integrations"}),s.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(p=>s.jsx(yS,{row:p,onChanged:d},p.id))]}):s.jsx(It,{label:"Probing integrations"})}const bS={id:"integrations",path:"/integrations",title:"Integrations",component:xS,inSettings:!0},SS=wp.component,lp={...wp,component:({params:i})=>s.jsx(SS,{source:i.source,run:i.run,renderSlot:(r,o)=>s.jsx(Cb,{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 np(i){const r=i.component;return{...i,component:()=>s.jsx(r,{})}}function jS(){Y0("run-detail"),Y0("new-run"),qe(np({...B1,path:"/"})),qe({...lp,id:"run-short",path:"/r/:source/:run"}),qe(lp),qe(Yb),qe(Vb);for(const i of[m1,Y1,X1,nb,sb,Eb,Qb,Jb,lS,dS,bS])qe(np(i))}let Qo=null;function ap(i){Qo=i}function _S(){return Qo?(Qo(),!0):!1}const oe=i=>`var(--cp-${i})`,up=i=>{location.hash=`#${i}`};function TS(){const[i,r]=R.useState(!1),[o,f]=R.useState(""),[d,p]=R.useState(0),[m,y]=R.useState([]),[x,E]=R.useState(null),N=R.useRef(null),v=R.useId(),A=R.useSyncExternalStore(Ap,Hs,Hs),U=()=>{r(!1),f(""),p(0)};R.useEffect(()=>(ap(()=>r(H=>!H)),()=>ap(null)),[]),R.useEffect(()=>{if(!i)return;let H=!0;return E(null),Vl().then(Q=>{H&&y(Q.runs)},Q=>{H&&E(Q.message)}),queueMicrotask(()=>{var Q;return(Q=N.current)==null?void 0:Q.focus()}),()=>{H=!1}},[i]),R.useEffect(()=>{const H=Q=>{const K=Q.metaKey||Q.ctrlKey,Tt=Q.key.toLowerCase();Q.key==="Escape"&&i?(Q.preventDefault(),U()):K&&Q.key==="Enter"?(Q.preventDefault(),window.dispatchEvent(new CustomEvent(Go)),i&&U()):K&&!Q.shiftKey&&Tt==="n"?(Q.preventDefault(),up("/new"),i&&U()):K&&Q.shiftKey&&Tt==="d"&&(Q.preventDefault(),ks())};return window.addEventListener("keydown",H),()=>window.removeEventListener("keydown",H)},[i]);const X=R.useMemo(()=>gb(o,hb(Cp()),mb(m),db()),[o,m,A]),P=Math.min(d,Math.max(0,X.length-1)),q=H=>{H.action==="toggle-theme"?ks():H.to&&up(H.to),U()},k=H=>{if(H.key==="ArrowDown")H.preventDefault(),p(X.length?(P+1)%X.length:0);else if(H.key==="ArrowUp")H.preventDefault(),p(X.length?(P-1+X.length)%X.length:0);else if(H.key==="Home")H.preventDefault(),p(0);else if(H.key==="End")H.preventDefault(),p(Math.max(0,X.length-1));else if(H.key==="Enter"&&!(H.metaKey||H.ctrlKey)){H.preventDefault();const Q=X[P];Q&&q(Q)}};if(!i)return null;let G="";return s.jsx("div",{"data-testid":"palette-backdrop",onClick:U,style:{position:"fixed",inset:0,zIndex:400,background:"rgba(0,0,0,0.4)",display:"flex",justifyContent:"center",alignItems:"flex-start",paddingTop:"14vh"},children:s.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":"Command palette",onClick:H=>H.stopPropagation(),style:{width:"min(560px, 92vw)",background:oe("bg"),color:oe("text"),border:`1px solid ${oe("border")}`,borderRadius:oe("radius-lg"),boxShadow:oe("shadow-lg"),overflow:"hidden",fontFamily:oe("font-sans")},children:[s.jsx("input",{ref:N,role:"combobox","aria-expanded":"true","aria-controls":v,"aria-autocomplete":"list","aria-label":"Search pages, runs and actions","aria-activedescendant":X[P]?`${v}-${P}`:void 0,value:o,onChange:H=>{f(H.target.value),p(0)},onKeyDown:k,placeholder:"Search pages, runs, actions",style:{width:"100%",boxSizing:"border-box",padding:"14px 16px",background:"transparent",color:oe("text"),border:"none",borderBottom:`1px solid ${oe("border")}`,outline:"none",fontSize:"1rem"}}),s.jsx("ul",{id:v,role:"listbox","aria-label":"Results",style:{listStyle:"none",margin:0,padding:6,maxHeight:"50vh",overflowY:"auto"},children:X.map((H,Q)=>{const K=H.kind!==G?H.kind:null;return G=H.kind,s.jsxs("li",{role:"presentation",children:[K&&s.jsx("div",{role:"presentation",style:{padding:"8px 10px 4px",fontSize:oe("text-sm"),color:oe("text-2")},children:K}),s.jsxs("div",{id:`${v}-${Q}`,role:"option","aria-selected":Q===P,onMouseMove:()=>p(Q),onClick:()=>q(H),style:{display:"flex",justifyContent:"space-between",gap:12,padding:"8px 10px",borderRadius:oe("radius-md"),cursor:"pointer",background:Q===P?oe("bg-3"):"transparent"},children:[s.jsx("span",{children:H.label}),H.hint&&s.jsx("span",{style:{color:oe("text-2"),fontSize:oe("text-sm")},children:H.hint.startsWith("Cmd")?s.jsx(_p,{children:H.hint}):H.hint})]})]},H.id)})}),X.length===0&&s.jsx("p",{role:"status",style:{margin:0,padding:"14px 16px",color:oe("text-2")},children:"No matches"}),x&&s.jsxs("p",{role:"alert",style:{margin:0,padding:"8px 16px",color:oe("error"),fontSize:oe("text-sm")},children:["Recent runs not loaded: ",x]})]})})}const ip=i=>Date.parse(i.started_at??i.last_event_at??""),sp=i=>{const r=new Date(i);return r.setHours(0,0,0,0),r.getTime()};function ES(i,r){const o=sp(r),f=sp(o-1),d={Today:[],Yesterday:[],Earlier:[]};for(const y of i){const x=ip(y),E=Number.isNaN(x)?"Earlier":x>=o?"Today":x>=f?"Yesterday":"Earlier";d[E].push(y)}const p=y=>{const x=ip(y);return Number.isNaN(x)?-1/0:x},m=[];for(const y of["Today","Yesterday","Earlier"])d[y].length&&m.push({name:y,runs:d[y].sort((x,E)=>p(E)-p(x))});return m}function NS({active:i=!1,size:r=26}){const o=i?"var(--cp-accent)":"var(--cp-text)";return s.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:[s.jsx("rect",{x:"3",y:"4",width:"26",height:"22",rx:"6",fill:"var(--cp-card)",stroke:"var(--cp-accent)",strokeWidth:"2"}),s.jsx("path",{d:"M3 10h26",stroke:"var(--cp-accent)",strokeWidth:"1.5",opacity:"0.5"}),s.jsx("circle",{cx:"12",cy:"17",r:"2",fill:o}),s.jsx("circle",{cx:"20",cy:"17",r:"2",fill:o}),s.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"}),s.jsx("path",{d:"M10 26v3M22 26v3",stroke:"var(--cp-accent)",strokeWidth:"2",strokeLinecap:"round"})]})}const St=i=>`var(--cp-${i})`;function zS(){var o;const[i,r]=R.useState(((o=globalThis.location)==null?void 0:o.hash)??"");return R.useEffect(()=>{const f=()=>r(location.hash);return f(),addEventListener("hashchange",f),()=>removeEventListener("hashchange",f)},[]),i}function OS(){const[i,r]=R.useState({runs:null,error:null}),o=R.useCallback(()=>{Vl({}).then(f=>r({runs:f.runs,error:null}),f=>r(d=>({runs:d.runs,error:f.message})))},[]);return R.useEffect(()=>(o(),gp(o)),[o]),i}const RS=i=>i.status==="running"||!i.verdict&&!i.ended_at?"active":i.verdict===pt.FAILED||Ye(i)===pt.TAMPERED?"error":"idle",CS=i=>i.title??i.issue_ref??i.run_id,AS={display:"block",flex:"0 1 auto",minWidth:0,maxWidth:"46%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},eg=i=>`#/runs/${encodeURIComponent(i.source_id)}/${encodeURIComponent(i.run_id)}`;function DS({run:i,active:r,onNavigate:o}){const f={display:"flex",alignItems:"center",gap:8,padding:"7px 12px",borderRadius:St("radius-nav"),textDecoration:"none",color:St(r?"accent":"text"),background:r?St("accent-glow"):"transparent",fontSize:St("text-md")};return s.jsxs("a",{"data-testid":"session-row",href:eg(i),"aria-current":r?"page":void 0,onClick:o,style:f,children:[s.jsx(yp,{state:RS(i)}),s.jsxs("span",{style:{minWidth:0,flex:1},children:[s.jsx("span",{style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:CS(i)}),i.origin_repo||i.title&&i.issue_ref?s.jsx("span",{style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:St("text-sm"),color:St("text-muted")},children:[i.origin_repo,i.title?i.issue_ref:null].filter(Boolean).join(" · ")}):null]}),i.verdict?s.jsx(il,{run:i,style:AS}):null]})}function MS({runs:i,error:r,now:o,activeHash:f,onNavigate:d}){if(!i)return r?s.jsxs("p",{role:"alert",style:{padding:"0 12px",color:St("error"),fontSize:St("text-sm")},children:["Could not load sessions: ",r]}):s.jsx("div",{style:{padding:12},children:s.jsx(It,{label:"Loading sessions"})});if(i.length===0)return s.jsx("p",{"data-testid":"sessions-empty",style:{padding:"0 12px",color:St("text-muted"),fontSize:St("text-sm")},children:"No sessions yet."});const p=Ga(f);return s.jsx("div",{"data-testid":"session-list",children:ES(i,o).map(m=>s.jsxs("section",{"aria-label":m.name,style:{marginBottom:12},children:[s.jsx(Ix,{children:m.name}),m.runs.map(y=>s.jsx(DS,{run:y,active:Ga(eg(y))===p,onNavigate:d},`${y.source_id}/${y.run_id}`))]},m.name))})}function wS(){const i=kp(),r=i==="dark"?"light":"dark";return s.jsxs("button",{type:"button","data-testid":"theme-toggle",onClick:ks,"aria-label":`Switch to ${r} theme`,style:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"7px 12px",marginTop:2,border:0,borderRadius:St("radius-nav"),background:"transparent",color:St("text-2"),cursor:"pointer",fontSize:St("text-md"),fontFamily:"inherit"},children:[i==="dark"?s.jsx(qx,{size:14,"aria-hidden":"true"}):s.jsx(Ax,{size:14,"aria-hidden":"true"}),i==="dark"?"Light theme":"Dark theme"]})}function cp({hash:i,onNavigate:r}){const{runs:o,error:f}=OS(),d=Ga(i);return s.jsxs(s.Fragment,{children:[s.jsxs("a",{href:"#/",onClick:r,style:{display:"flex",alignItems:"center",gap:8,padding:"4px 12px 12px",textDecoration:"none",color:St("text")},children:[s.jsx(NS,{active:!!(o!=null&&o.some(p=>p.status==="running"))}),s.jsx("span",{style:{fontFamily:St("font-serif"),fontSize:St("text-2xl")},children:"Loki Mode"})]}),s.jsx("div",{style:{padding:"0 8px 12px"},children:s.jsxs(Bt,{size:"md","data-testid":"new-run",onClick:()=>{location.hash="#/new",r==null||r()},style:{width:"100%",justifyContent:"center",gap:6,display:"inline-flex",alignItems:"center"},children:[s.jsx(Mx,{size:14,"aria-hidden":"true"}),"New run"]})}),s.jsx("div",{style:{flex:1,overflowY:"auto",padding:"0 8px"},children:s.jsx(MS,{runs:o,error:f,now:Date.now(),activeHash:i,onNavigate:r})}),s.jsxs("div",{style:{padding:8,borderTop:`1px solid ${St("border")}`},children:[s.jsx(Sp,{href:"#/settings",active:d.startsWith("/settings"),icon:s.jsx(Hx,{size:14,"aria-hidden":"true"}),onClick:r,children:"Settings"}),s.jsx(wS,{})]})]})}const US={width:St("sidebar-w"),flexShrink:0,flexDirection:"column",height:"100vh",position:"sticky",top:0,paddingTop:16,background:St("glass"),borderRight:`1px solid ${St("glass-border")}`,boxShadow:St("glass-shadow")};function HS({path:i}){const r=s1();if(r.length===0)return s.jsx(Lt,{title:"No settings available"});const o=r.find(d=>Ga(d.path)===i)??r[0],f=o.component;return s.jsxs("div",{"data-testid":"settings-area",style:{display:"flex",flexWrap:"wrap",gap:24},children:[s.jsxs("nav",{"aria-label":"Settings","data-testid":"settings-nav",style:{width:200,flexShrink:0},children:[s.jsx("h1",{style:{fontFamily:St("font-serif"),fontWeight:400,fontSize:St("text-2xl"),margin:"0 0 12px 12px"},children:"Settings"}),r.map(d=>s.jsx(Sp,{href:`#${d.path}`,active:d.id===o.id,children:d.title},d.id))]}),s.jsx("div",{style:{flex:1,minWidth:0},children:s.jsx(f,{params:{}})})]})}function BS({hash:i}){R.useSyncExternalStore(Ap,Hs,Hs);const r=Ga(i);if(r==="/settings"||r.startsWith("/settings/"))return s.jsx(HS,{path:r});const o=r1(i);if(!o)return s.jsx(Lt,{title:"Page not found",hint:s.jsx("a",{href:"#/",style:{color:St("accent")},children:"Back to home"})});const f=o.page.component;return s.jsx(f,{params:o.params})}function kS(){const i=zS(),[r,o]=R.useState(!1);return R.useEffect(()=>{Qs()},[]),R.useEffect(()=>{const f=d=>{(d.metaKey||d.ctrlKey)&&d.key.toLowerCase()==="k"&&_S()&&d.preventDefault()};return addEventListener("keydown",f),()=>removeEventListener("keydown",f)},[]),s.jsxs("div",{"data-testid":"app-shell",className:"flex min-h-screen",style:{background:St("bg"),color:St("text"),fontFamily:St("font-sans")},children:[s.jsx("nav",{"data-testid":"nav","aria-label":"Sessions",className:"hidden md:flex",style:US,children:s.jsx(cp,{hash:i})}),s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[s.jsxs("header",{className:"flex items-center gap-2 p-2 md:hidden",style:{borderBottom:`1px solid ${St("border")}`},children:[s.jsx(Bt,{variant:"ghost","aria-label":"Open sessions","data-testid":"open-drawer",onClick:()=>o(!0),children:s.jsx(zx,{size:16,"aria-hidden":"true"})}),s.jsx("span",{style:{fontFamily:St("font-serif"),fontSize:St("text-xl")},children:"Loki Mode"})]}),s.jsx("main",{"data-testid":"outlet",className:"min-w-0 flex-1 overflow-x-auto p-3 md:p-6",style:{maxWidth:"100%"},children:s.jsx(BS,{hash:i})})]}),s.jsx(jp,{open:r,title:"Loki Mode",side:"left",onClose:()=>o(!1),children:s.jsx("div",{style:{display:"flex",flexDirection:"column",minHeight:"80vh"},children:s.jsx(cp,{hash:i,onNavigate:()=>o(!1)})})})]})}const Sn="not recorded";function lg(i){return i.cost_usd!==null&&i.cost_usd!==void 0?ul(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 qS=i=>i.started_at&&i.ended_at?(Date.parse(i.ended_at)-Date.parse(i.started_at))/1e3:null,ng=i=>typeof i=="number"?`${i.toFixed(1)}s`:Sn,ag=i=>i?i.replace("T"," ").replace(/\.\d+Z$/,"Z"):Sn,LS={[pt.VERIFIED]:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-300 ring-emerald-500/30",[pt.PARTIAL]:"bg-amber-500/15 text-amber-700 dark:text-amber-300 ring-amber-500/30",[pt.FAILED]:"bg-red-500/15 text-red-700 dark:text-red-300 ring-red-500/30",[pt.TAMPERED]:"bg-red-600/20 text-red-700 dark:text-red-300 ring-red-600/50",[pt.VERIFIED_UNCHECKED]:"bg-sky-500/15 text-sky-700 dark:text-sky-300 ring-sky-500/30",[pt.UNVERIFIED]:"bg-amber-500/15 text-amber-700 dark:text-amber-300 ring-amber-500/30",[pt.SPEC_CONFLICT]:"bg-violet-500/15 text-violet-700 dark:text-violet-300 ring-violet-500/30"};function Xo({verdict:i,run:r}){const o=r?Ye(r):i??null,f=o?LS[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 s.jsx("span",{"data-testid":"verdict",className:`inline-block rounded px-2 py-0.5 text-xs font-medium ring-1 ${f}`,children:o??"in progress"})}function ug({url:i}){return i?/^https?:\/\//.test(i)?s.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 ",s.jsx(dp,{size:12})]}):s.jsx("span",{className:"break-all font-mono text-xs",title:"local origin, no web URL",children:i}):s.jsx("span",{className:"text-slate-500",children:"no PR"})}const rp=3e3;function ig(i,r,o){const[f,d]=R.useState({data:null,error:null});return R.useEffect(()=>{let p=!0,m;d({data:null,error:null});const y=()=>i().then(x=>{p&&(d({data:x,error:null}),o!=null&&o(x)&&(m=setTimeout(y,rp)))},x=>{p&&(d(E=>({data:E.data,error:x.message})),o&&(m=setTimeout(y,rp)))});return y(),()=>{p=!1,clearTimeout(m)}},r),f}const bn=i=>i.status==="running";function sg({run:i}){const[r]=R.useState(()=>({at:Date.now(),s:i.elapsed_s??0})),[,o]=R.useState(0),f=bn(i);R.useEffect(()=>{if(!f)return;const p=setInterval(()=>o(m=>m+1),1e3);return()=>clearInterval(p)},[f]);const d=f?Math.max(i.elapsed_s??0,r.s+(Date.now()-r.at)/1e3):i.elapsed_s??i.wall_s;return s.jsx("span",{"data-testid":"elapsed",children:typeof d=="number"?`${Math.floor(d)}s`:Sn})}function YS({onOpen:i}){const[r,o]=R.useState(""),[f,d]=R.useState(""),[p,m]=R.useState(""),{data:y,error:x}=ig(()=>Vl({verdict:r,repo:f,since:p?`${p}T00:00:00Z`:""}),[r,f,p],v=>v.runs.some(bn)),E=!!(r||f||p),N="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 s.jsxs("section",{children:[s.jsx("h1",{className:"mb-4 text-xl font-semibold",children:"Runs"}),s.jsxs("div",{className:"mb-4 grid grid-cols-1 gap-3 text-sm sm:flex sm:flex-wrap sm:items-end",children:[s.jsxs("label",{className:"flex flex-col gap-1",children:["Verdict",s.jsxs("select",{"aria-label":"Verdict",className:N,value:r,onChange:v=>o(v.target.value),children:[s.jsx("option",{value:"",children:"All"}),Zx.map(v=>s.jsx("option",{children:v},v))]})]}),s.jsxs("label",{className:"flex flex-col gap-1",children:["Repo",s.jsx("input",{"aria-label":"Repo",className:N,value:f,onChange:v=>d(v.target.value),placeholder:"owner/name"})]}),s.jsxs("label",{className:"flex flex-col gap-1",children:["Since",s.jsx("input",{"aria-label":"Since",type:"date",className:N,value:p,onChange:v=>m(v.target.value)})]})]}),x&&s.jsxs("p",{role:"alert",className:"text-red-600",children:["Could not load runs: ",x]}),!y&&!x&&s.jsx("p",{className:"text-slate-500",children:"Loading runs"}),y&&y.runs.length===0&&(E?s.jsx("p",{children:"No runs match these filters."}):s.jsx(Vp,{})),y&&y.runs.length>0&&s.jsx("div",{className:"overflow-x-auto rounded border border-slate-200 dark:border-slate-800",children:s.jsxs("table",{className:"w-full text-left text-sm",children:[s.jsx("thead",{className:"bg-slate-100 text-xs uppercase text-slate-500 dark:bg-slate-900",children:s.jsxs("tr",{children:[s.jsx("th",{className:"p-2",children:"Verdict"}),s.jsx("th",{className:"p-2",children:"Run"}),s.jsx("th",{className:"hidden p-2 md:table-cell",children:"Repo"}),s.jsx("th",{className:"hidden p-2 md:table-cell",children:"Started"}),s.jsx("th",{className:"p-2",children:"Progress"}),s.jsx("th",{className:"p-2",children:"Cost"}),s.jsx("th",{className:"p-2",children:"PR"})]})}),s.jsx("tbody",{children:y.runs.map(v=>s.jsxs("tr",{"data-testid":"run-row",className:"border-t border-slate-200 dark:border-slate-800",children:[s.jsx("td",{className:"p-2",children:s.jsx(Xo,{run:v})}),s.jsx("td",{className:"p-2 font-mono text-xs",children:s.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})}),s.jsx("td",{className:"hidden p-2 md:table-cell",children:v.origin_repo??Sn}),s.jsx("td",{className:"hidden p-2 md:table-cell",children:ag(v.started_at)}),s.jsx("td",{className:"p-2 text-xs","data-testid":"progress",children:bn(v)?s.jsxs(s.Fragment,{children:[v.current_stage??"starting",", ",s.jsx(sg,{run:v}),", ",(v.files_touched??[]).length," files"]}):""}),s.jsx("td",{className:"p-2","data-testid":"cost",children:lg(v)}),s.jsx("td",{className:"p-2",children:s.jsx(ug,{url:v.pr_url})})]},`${v.source_id}/${v.run_id}`))})]})})]})}function Zu({title:i,children:r}){return s.jsxs("div",{className:"rounded border border-slate-200 p-4 dark:border-slate-800",children:[s.jsx("h2",{className:"mb-2 text-sm font-semibold uppercase text-slate-500",children:i}),r]})}function VS({stages:i}){return i.length===0?s.jsx("p",{className:"text-slate-500",children:"No stages ingested for this run."}):s.jsx("ol",{className:"space-y-1 text-sm",children:i.map(r=>s.jsxs("li",{"data-testid":"stage",className:"flex items-center justify-between gap-4",children:[s.jsx("span",{className:"font-medium",children:r.stage}),s.jsx("span",{className:"text-slate-500",children:r.status==="started"?"running":ng(qS(r))})]},r.stage))})}function GS({source:i,run:r,question:o}){const[f,d]=R.useState(""),[p,m]=R.useState(null),y=async()=>{try{const x=await hp(i,r,f);m({ok:!0,text:`Saved to ${x.path}. Resume: ${x.resume}`})}catch(x){m({ok:!1,text:x.message})}};return s.jsxs(Zu,{title:"Blocked: your answer is needed",children:[s.jsx("p",{"data-testid":"blocked-question",className:"mb-2 text-sm",children:o}),s.jsx("textarea",{"data-testid":"answer-input","aria-label":"Answer",maxLength:4e3,value:f,onChange:x=>d(x.target.value),className:"w-full rounded border border-slate-300 p-2 text-sm dark:border-slate-700 dark:bg-slate-900",rows:3}),s.jsx("button",{type:"button","data-testid":"answer-submit",disabled:f.trim()==="",onClick:y,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"}),p&&s.jsx("p",{role:p.ok?"status":"alert",className:`mt-2 break-all text-sm ${p.ok?"text-emerald-600":"text-red-600"}`,children:p.text})]})}function $S({source:i,run:r}){const[o,f]=R.useState(!1),[d,p]=R.useState(!1),[m,y]=R.useState(null),x=async()=>{p(!0),y(null);try{await $x(i,r),location.hash="#/runs"}catch(N){y(N.message),p(!1)}},E="min-h-11 rounded px-4 py-2 text-sm md:min-h-0 md:px-3 md:py-1";return s.jsxs(Zu,{title:"Remove run",children:[o?s.jsxs("div",{className:"space-y-2 text-sm",children:[s.jsx("p",{"data-testid":"remove-confirm-text",children:"Permanently delete this run and its events from the local control database? This cannot be undone."}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{type:"button","data-testid":"remove-confirm",disabled:d,onClick:x,className:`${E} bg-red-600 text-white disabled:opacity-50`,children:d?"Removing":"Yes, remove"}),s.jsx("button",{type:"button","data-testid":"remove-cancel",disabled:d,onClick:()=>{f(!1),y(null)},className:`${E} border border-slate-300 dark:border-slate-700`,children:"Cancel"})]})]}):s.jsx("button",{type:"button","data-testid":"remove-run",onClick:()=>f(!0),className:`${E} border border-red-500/50 text-red-600`,children:"Remove"}),m&&s.jsxs("p",{role:"alert","data-testid":"remove-error",className:"mt-2 break-all text-sm text-red-600",children:["Could not remove run: ",m]})]})}function QS({source:i,run:r}){const{data:o,error:f}=ig(()=>Vs(i,r),[i,r],bn);if(f)return s.jsxs("p",{role:"alert",className:"text-red-600",children:["Could not load run: ",f]});if(!o)return s.jsx("p",{className:"text-slate-500",children:"Loading run"});const d=o;return s.jsxs("section",{className:"space-y-4",children:[s.jsx("a",{href:"#/runs",className:"text-sm text-sky-600 hover:underline dark:text-sky-400",children:"Back to runs"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[s.jsx("h1",{className:"font-mono text-lg font-semibold",children:d.run_id}),s.jsx(Xo,{run:d}),d.tampered&&s.jsxs("span",{className:"inline-flex items-center gap-1 text-sm text-red-600",children:[s.jsx(B0,{size:14}),"event log tampered"]}),d.conflict&&s.jsxs("span",{className:"inline-flex items-center gap-1 text-sm text-amber-600",children:[s.jsx(B0,{size:14}),"conflicting events ingested"]})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[s.jsx(Zu,{title:"Summary",children:s.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-sm",children:[s.jsx("dt",{className:"text-slate-500",children:"Repo"}),s.jsx("dd",{children:d.origin_repo??Sn}),s.jsx("dt",{className:"text-slate-500",children:"Issue"}),s.jsx("dd",{children:d.issue_ref??Sn}),s.jsx("dt",{className:"text-slate-500",children:"Provider"}),s.jsx("dd",{children:d.provider??Sn}),s.jsx("dt",{className:"text-slate-500",children:"Model"}),s.jsx("dd",{children:d.model??Sn}),s.jsx("dt",{className:"text-slate-500",children:"Started"}),s.jsx("dd",{children:ag(d.started_at)}),bn(d)&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{className:"text-slate-500",children:"Current stage"}),s.jsx("dd",{"data-testid":"current-stage",children:d.current_stage??"starting"})]}),s.jsx("dt",{className:"text-slate-500",children:bn(d)?"Elapsed":"Wall time"}),s.jsx("dd",{children:bn(d)?s.jsx(sg,{run:d}):ng(d.wall_s)}),bn(d)&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{className:"text-slate-500",children:"Files touched"}),s.jsx("dd",{"data-testid":"files-touched",children:(d.files_touched??[]).join(", ")||"none yet"})]}),s.jsx("dt",{className:"text-slate-500",children:"Cost"}),s.jsx("dd",{"data-testid":"cost",children:lg(d)}),s.jsx("dt",{className:"text-slate-500",children:"PR"}),s.jsx("dd",{children:s.jsx(ug,{url:d.pr_url})})]})}),s.jsx(Zu,{title:"Stage timeline",children:s.jsx(VS,{stages:o.stages})})]}),o.blocked_question&&s.jsx(GS,{source:i,run:r,question:o.blocked_question}),s.jsx(Zu,{title:"Receipt",children:s.jsxs("div",{className:"space-y-3 text-sm",children:[o.receipt?s.jsxs("p",{children:["Receipt verdict: ",s.jsx(Xo,{run:{verdict:o.receipt.verdict,tampered:d.tampered,attested:d.attested,sig_checked:d.sig_checked}})," ",s.jsx("span",{className:"ml-2 font-mono text-xs text-slate-500",children:o.receipt.sha256})]}):s.jsx("p",{className:"text-slate-500",children:"No receipt ingested for this run."}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"NOT PROVEN"}),o.not_proven.length===0?s.jsx("p",{className:"text-slate-500",children:"Nothing listed as not proven."}):s.jsx("ul",{className:"list-disc pl-5",children:o.not_proven.map(p=>s.jsx("li",{"data-testid":"not-proven",children:p},p))})]})]})}),s.jsx($S,{source:i,run:r})]})}const Po=s.jsxs(s.Fragment,{children:[s.jsx(Yp,{}),s.jsx(YS,{})]});qe({id:"home",path:"/",title:"Home",component:()=>s.jsx(zp,{fallback:Po})});qe({id:"overview",path:"/overview",title:"Overview",component:()=>s.jsx(zp,{overview:!0,fallback:Po})});qe({id:"new-run",path:"/new",title:"New run",component:()=>s.jsxs("section",{children:[s.jsx("h1",{className:"mb-4 text-xl font-semibold",children:"New run"}),s.jsx(Yp,{})]})});qe({id:"runs",path:"/runs",title:"Runs",component:()=>Po});qe({id:"run-detail",path:"/runs/:source/:run",title:"Run",component:({params:i})=>s.jsx(QS,{source:i.source,run:i.run})});qe({id:"live-run",path:"/live/:source/:run",title:"Live run",component:({params:i})=>s.jsx(Np,{source:i.source,run:i.run})});qe({id:"settings-general",path:"/settings/general",title:"General",inSettings:!0,component:R1});jS();function XS(){return s.jsxs(s.Fragment,{children:[s.jsx(kS,{}),s.jsx(TS,{})]})}Qs();hx.createRoot(document.getElementById("root")).render(s.jsx(XS,{}));