loki-mode 10.9.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 (110) hide show
  1. package/.github/actions/issue-to-pr/action.yml +2 -2
  2. package/README.md +9 -3
  3. package/SKILL.md +12 -2
  4. package/VERSION +1 -1
  5. package/autonomy/lib/proof-generator.py +1 -0
  6. package/autonomy/loki +39 -9
  7. package/autonomy/receipt_jwt.py +46 -1
  8. package/autonomy/run.sh +1 -1
  9. package/autonomy/telemetry.sh +1 -1
  10. package/autonomy/trigger-server.py +1 -0
  11. package/bin/loki +12 -1
  12. package/bin/loki-postinstall.js +12 -0
  13. package/dashboard/__init__.py +1 -1
  14. package/docs/CLI-REFERENCE.md +139 -0
  15. package/docs/INSTALLATION.md +1 -1
  16. package/docs/LOKI-10-BUILD-PROMPT.md +2 -2
  17. package/docs/PLANS-INDEX.md +2 -3
  18. package/docs/SLO.md +3 -3
  19. package/docs/alternative-installations.md +1 -1
  20. package/docs/bug-fixes/agent-04-memory-fixes.md +1 -1
  21. package/docs/dev/release-checklist.md +1 -1
  22. package/{.github/workflows/loki-issue-to-pr.yml → docs/examples/loki-issue-to-pr.yml.example} +2 -0
  23. package/docs/{ONE-RUN-AUDIT.md → history/one-run-audit.md} +6 -0
  24. package/docs/{BUG-AUDIT-v6.61.0.md → history/v6.61.0-audit.md} +6 -0
  25. package/docs/{V8-AGENT-SDK-PLAN.md → history/v8-agent-sdk-plan.md} +6 -0
  26. package/docs/{CONFIG-FILE-PLAN.md → history/v8-config-plan.md} +6 -0
  27. package/docs/test-scenarios/enterprise-scenarios.md +1 -1
  28. package/docs/v10/BOARD.md +3 -0
  29. package/docs/v10/CLI-MODERN.md +190 -0
  30. package/docs/v10/DEPS.md +148 -169
  31. package/docs/v10/FAILURE-CLASSES.md +23 -2
  32. package/docs/v10/GUARDS.md +18 -0
  33. package/docs/v10/LEGACY-REMOVAL.md +334 -25
  34. package/docs/v10/PROGRESS.md +15 -0
  35. package/loki-ts/dist/loki.js +1574 -1794
  36. package/mcp/__init__.py +1 -1
  37. package/package.json +3 -2
  38. package/packages/control-plane/dist/server.js +733 -397
  39. package/packages/control-plane/src/db/fixture-cleanup.ts +47 -0
  40. package/packages/control-plane/src/server/app.ts +2 -0
  41. package/packages/control-plane/src/server/integrity.ts +48 -9
  42. package/packages/control-plane/src/server/routes/stats.ts +16 -5
  43. package/packages/control-plane/src/server/runs.ts +16 -4
  44. package/packages/control-plane/ui/dist/assets/index-BinL6h3i.css +1 -0
  45. package/packages/control-plane/ui/dist/assets/index-BrA22FUs.js +152 -0
  46. package/packages/control-plane/ui/dist/index.html +2 -2
  47. package/plugins/loki-mode/.claude-plugin/plugin.json +1 -1
  48. package/schemas/status-result.schema.json +13 -22
  49. package/skills/release-cadence.md +5 -5
  50. package/web-app/dist/assets/{AdminPage-DqMnfZrH.js → AdminPage-BvbxMtZO.js} +1 -1
  51. package/web-app/dist/assets/{Avatar-BEof29du.js → Avatar-Dc7Scg02.js} +1 -1
  52. package/web-app/dist/assets/{Badge-WD53OL5m.js → Badge-BmVuOqbM.js} +1 -1
  53. package/web-app/dist/assets/{Button-Rzk5flhU.js → Button-DvzqhxRU.js} +1 -1
  54. package/web-app/dist/assets/{CockpitPage-Bqz3PCMh.js → CockpitPage-D8AZo7Ha.js} +1 -1
  55. package/web-app/dist/assets/{ComparePage-Byo2NzAZ.js → ComparePage-NmqaTXDz.js} +1 -1
  56. package/web-app/dist/assets/{ErrorBoundary-BuE0kH3W.js → ErrorBoundary-PGl8Kzoq.js} +1 -1
  57. package/web-app/dist/assets/{EvidenceReceiptPanel-CKFHOPBx.js → EvidenceReceiptPanel-2NY4n9gv.js} +1 -1
  58. package/web-app/dist/assets/{GitHubIssuesPanel-Df_kTMqI.js → GitHubIssuesPanel-DBO_LHHM.js} +1 -1
  59. package/web-app/dist/assets/{GitHubPRsPanel-CouvcKrZ.js → GitHubPRsPanel-K7m9uJ1N.js} +1 -1
  60. package/web-app/dist/assets/{HomePage-dEpLzj0x.js → HomePage-qNQzAJxM.js} +2 -2
  61. package/web-app/dist/assets/{LoginPage-6DVjUND5.js → LoginPage-esu3OK65.js} +1 -1
  62. package/web-app/dist/assets/{MagicPage-BDQ9MOfY.js → MagicPage-CCdVvXrA.js} +1 -1
  63. package/web-app/dist/assets/{MetricsPage-CXiJ04G_.js → MetricsPage-bEvugU2t.js} +1 -1
  64. package/web-app/dist/assets/{NotFoundPage-BaXhZvyj.js → NotFoundPage-BlEjQ1wX.js} +1 -1
  65. package/web-app/dist/assets/{ProjectPage-BzE4V7Ti.js → ProjectPage-Bnug_Yzv.js} +3 -3
  66. package/web-app/dist/assets/{ProjectsPage-ipf6TLMX.js → ProjectsPage-M8r1vfpn.js} +1 -1
  67. package/web-app/dist/assets/{SettingsPage-BDxkUKN6.js → SettingsPage-NqAJpB48.js} +1 -1
  68. package/web-app/dist/assets/{ShowcasePage-YQXD72SM.js → ShowcasePage-8FggxL1P.js} +1 -1
  69. package/web-app/dist/assets/{SystemSettingsPage-Dou7zHS0.js → SystemSettingsPage-3Sz3kFOO.js} +1 -1
  70. package/web-app/dist/assets/{TeamsPage-CQarfcYr.js → TeamsPage-nV-6vdWM.js} +1 -1
  71. package/web-app/dist/assets/{TemplatesPage-CPi1R8Xj.js → TemplatesPage-Brbc_VR9.js} +1 -1
  72. package/web-app/dist/assets/{TerminalOutput-WiGhWdYD.js → TerminalOutput-D1yta5ac.js} +1 -1
  73. package/web-app/dist/assets/{activity-DOa7ejQA.js → activity-oEeKuqFe.js} +1 -1
  74. package/web-app/dist/assets/{bell-CX-VAlYN.js → bell-3NJtqBRR.js} +1 -1
  75. package/web-app/dist/assets/{bot-EDXaZmHc.js → bot-CuvJZ6x1.js} +1 -1
  76. package/web-app/dist/assets/{check-CnBdKk3L.js → check-n4289IZw.js} +1 -1
  77. package/web-app/dist/assets/{chevron-left-BJ_ydRQW.js → chevron-left-CmQeio7h.js} +1 -1
  78. package/web-app/dist/assets/{circle-alert-tz8ufhc_.js → circle-alert-CmmVW-Pd.js} +1 -1
  79. package/web-app/dist/assets/{clock-DFBZPSsH.js → clock-QFqk7GlA.js} +1 -1
  80. package/web-app/dist/assets/{cloud-uy3p_5Q7.js → cloud-BNkSokmq.js} +1 -1
  81. package/web-app/dist/assets/{code-xml-3CbYD9YL.js → code-xml-nWeketqj.js} +1 -1
  82. package/web-app/dist/assets/{database-YiNBXc9c.js → database-C83MXTmJ.js} +1 -1
  83. package/web-app/dist/assets/{dollar-sign-D0wBa4Cv.js → dollar-sign-Blg6TO4y.js} +1 -1
  84. package/web-app/dist/assets/{file-code-corner-DDdZVZ5v.js → file-code-corner-Tk11oUzm.js} +1 -1
  85. package/web-app/dist/assets/{file-plus-D09LTBqt.js → file-plus-DF_eyA6I.js} +1 -1
  86. package/web-app/dist/assets/{globe-BirTPwff.js → globe-D5hDqqmn.js} +1 -1
  87. package/web-app/dist/assets/{hammer-DaE5qgnd.js → hammer-C2hm9lzl.js} +1 -1
  88. package/web-app/dist/assets/{index-D8t7KnQf.js → index-pMxOIwXq.js} +3 -3
  89. package/web-app/dist/assets/{layers-DVVrckRY.js → layers-XWQKGXg0.js} +1 -1
  90. package/web-app/dist/assets/{loader-circle-2-nMGmcb.js → loader-circle-BRuvorm2.js} +1 -1
  91. package/web-app/dist/assets/{lock-D0Xj43pC.js → lock-BSGvQf5v.js} +1 -1
  92. package/web-app/dist/assets/{package-BB7S3egm.js → package-3FJYUYgJ.js} +1 -1
  93. package/web-app/dist/assets/{plus-BLhoMrn3.js → plus-CeIx6g9P.js} +1 -1
  94. package/web-app/dist/assets/{refresh-cw-DMc2uPLw.js → refresh-cw-ChutW42g.js} +1 -1
  95. package/web-app/dist/assets/{rotate-ccw-DM3IP9x7.js → rotate-ccw-BdSjUAk-.js} +1 -1
  96. package/web-app/dist/assets/{scroll-text-lH2uW7rB.js → scroll-text-BjFqxpw3.js} +1 -1
  97. package/web-app/dist/assets/{server-BkerZcdR.js → server-C7UEKdol.js} +1 -1
  98. package/web-app/dist/assets/{shield-alert-B8ohcUfu.js → shield-alert-DY8fpEs7.js} +1 -1
  99. package/web-app/dist/assets/{thumbs-up-CTIxLzPD.js → thumbs-up-Cz1san1g.js} +1 -1
  100. package/web-app/dist/assets/{trash-2-C3zIpsH5.js → trash-2-D2MvGYeP.js} +1 -1
  101. package/web-app/dist/assets/{trending-down-BTT7wV4Y.js → trending-down-CxO3OYOB.js} +1 -1
  102. package/web-app/dist/assets/{trending-up-BzHdCDvF.js → trending-up-DCHKPJLe.js} +1 -1
  103. package/web-app/dist/assets/{upload-HxR34-A8.js → upload-CdPJpSHC.js} +1 -1
  104. package/web-app/dist/assets/{usePolling-DDj6Fupy.js → usePolling-DAH6K3ST.js} +1 -1
  105. package/web-app/dist/assets/{user-qH5y9yNy.js → user-Byyt01W4.js} +1 -1
  106. package/web-app/dist/index.html +1 -1
  107. package/docs/BRANCH-LIFECYCLE-PLAN.md +0 -354
  108. package/docs/EXECUTION-COCKPIT-PLAN.md +0 -289
  109. package/packages/control-plane/ui/dist/assets/index-BQbFv65M.css +0 -1
  110. package/packages/control-plane/ui/dist/assets/index-Dbhu244h.js +0 -155
@@ -1,155 +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 m of d)if(m.type==="childList")for(const v of m.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&f(v)}).observe(document,{childList:!0,subtree:!0});function o(d){const m={};return d.integrity&&(m.integrity=d.integrity),d.referrerPolicy&&(m.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?m.credentials="include":d.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function f(d){if(d.ep)return;d.ep=!0;const m=o(d);fetch(d.href,m)}})();var jo={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 b0;function Xy(){if(b0)return Lu;b0=1;var i=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(f,d,m){var v=null;if(m!==void 0&&(v=""+m),d.key!==void 0&&(v=""+d.key),"key"in d){m={};for(var x in d)x!=="key"&&(m[x]=d[x])}else m=d;return d=m.ref,{$$typeof:i,type:f,key:v,ref:d!==void 0?d:null,props:m}}return Lu.Fragment=r,Lu.jsx=o,Lu.jsxs=o,Lu}var S0;function Zy(){return S0||(S0=1,jo.exports=Xy()),jo.exports}var s=Zy(),Eo={exports:{}},qu={},To={exports:{}},_o={};/**
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 j0;function Ky(){return j0||(j0=1,(function(i){function r(Y,tt){var et=Y.length;Y.push(tt);t:for(;0<et;){var Rt=et-1>>>1,St=Y[Rt];if(0<d(St,tt))Y[Rt]=tt,Y[et]=St,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,St=Y.length,Ie=St>>>1;Rt<Ie;){var xl=2*(Rt+1)-1,Sn=Y[xl],b=xl+1,H=Y[b];if(0>d(Sn,et))b<St&&0>d(H,Sn)?(Y[Rt]=H,Y[b]=et,Rt=b):(Y[Rt]=Sn,Y[xl]=et,Rt=xl);else if(b<St&&0>d(H,et))Y[Rt]=H,Y[b]=et,Rt=b;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 m=performance;i.unstable_now=function(){return m.now()}}else{var v=Date,x=v.now();i.unstable_now=function(){return v.now()-x}}var E=[],O=[],R=1,g=null,A=3,L=!1,X=!1,P=!1,q=!1,B=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function $(Y){for(var tt=o(O);tt!==null;){if(tt.callback===null)f(O);else if(tt.startTime<=Y)f(O),tt.sortIndex=tt.expirationTime,r(E,tt);else break;tt=o(O)}}function K(Y){if(P=!1,$(Y),!X)if(o(E)!==null)X=!0,Et||(Et=!0,at());else{var tt=o(O);tt!==null&&Ft(K,tt.startTime-Y)}}var Et=!1,ut=-1,rt=5,Ne=-1;function fe(){return q?!0:!(i.unstable_now()-Ne<rt)}function Kt(){if(q=!1,Et){var Y=i.unstable_now();Ne=Y;var tt=!0;try{t:{X=!1,P&&(P=!1,G(ut),ut=-1),L=!0;var et=A;try{e:{for($(Y),g=o(E);g!==null&&!(g.expirationTime>Y&&fe());){var Rt=g.callback;if(typeof Rt=="function"){g.callback=null,A=g.priorityLevel;var St=Rt(g.expirationTime<=Y);if(Y=i.unstable_now(),typeof St=="function"){g.callback=St,$(Y),tt=!0;break e}g===o(E)&&f(E),$(Y)}else f(E);g=o(E)}if(g!==null)tt=!0;else{var Ie=o(O);Ie!==null&&Ft(K,Ie.startTime-Y),tt=!1}}break t}finally{g=null,A=et,L=!1}tt=void 0}}finally{tt?at():Et=!1}}}var at;if(typeof U=="function")at=function(){U(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(){B(Kt,0)};function Ft(Y,tt){ut=B(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 St=-1;break;case 2:St=250;break;case 5:St=1073741823;break;case 4:St=1e4;break;default:St=5e3}return St=et+St,Y={id:R++,callback:tt,priorityLevel:Y,startTime:et,expirationTime:St,sortIndex:-1},et>Rt?(Y.sortIndex=et,r(O,Y),o(E)===null&&Y===o(O)&&(P?(G(ut),ut=-1):P=!0,Ft(K,et-Rt))):(Y.sortIndex=St,r(E,Y),X||L||(X=!0,Et||(Et=!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}}}})(_o)),_o}var E0;function Jy(){return E0||(E0=1,To.exports=Ky()),To.exports}var No={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 T0;function Iy(){if(T0)return nt;T0=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"),m=Symbol.for("react.consumer"),v=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),O=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),A=Symbol.for("react.view_transition"),L=Symbol.iterator;function X(b){return b===null||typeof b!="object"?null:(b=L&&b[L]||b["@@iterator"],typeof b=="function"?b:null)}var P={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},q=Object.assign,B={};function G(b,H,I){this.props=b,this.context=H,this.refs=B,this.updater=I||P}G.prototype.isReactComponent={},G.prototype.setState=function(b,H){if(typeof b!="object"&&typeof b!="function"&&b!=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,b,H,"setState")},G.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function U(){}U.prototype=G.prototype;function $(b,H,I){this.props=b,this.context=H,this.refs=B,this.updater=I||P}var K=$.prototype=new U;K.constructor=$,q(K,G.prototype),K.isPureReactComponent=!0;var Et=Array.isArray;function ut(){}var rt={H:null,A:null,T:null,S:null},Ne=Object.prototype.hasOwnProperty;function fe(b,H,I){var F=I.ref;return{$$typeof:i,type:b,key:H,ref:F!==void 0?F:null,props:I}}function Kt(b,H){return fe(b.type,H,b.props)}function at(b){return typeof b=="object"&&b!==null&&b.$$typeof===i}function de(b){var H={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(I){return H[I]})}var he=/\/+/g;function Ft(b,H){return typeof b=="object"&&b!==null&&b.key!=null?de(""+b.key):H.toString(36)}function Y(b){switch(b.status){case"fulfilled":return b.value;case"rejected":throw b.reason;default:switch(typeof b.status=="string"?b.then(ut,ut):(b.status="pending",b.then(function(H){b.status==="pending"&&(b.status="fulfilled",b.value=H)},function(H){b.status==="pending"&&(b.status="rejected",b.reason=H)})),b.status){case"fulfilled":return b.value;case"rejected":throw b.reason}}throw b}function tt(b,H,I,F,gt){var pt=typeof b;(pt==="undefined"||pt==="boolean")&&(b=null);var xt=!1;if(b===null)xt=!0;else switch(pt){case"bigint":case"string":case"number":xt=!0;break;case"object":switch(b.$$typeof){case i:case r:xt=!0;break;case R:return xt=b._init,tt(xt(b._payload),H,I,F,gt)}}if(xt)return gt=gt(b),xt=F===""?"."+Ft(b,0):F,Et(gt)?(I="",xt!=null&&(I=xt.replace(he,"$&/")+"/"),tt(gt,H,I,"",function(bl){return bl})):gt!=null&&(at(gt)&&(gt=Kt(gt,I+(gt.key==null||b&&b.key===gt.key?"":(""+gt.key).replace(he,"$&/")+"/")+xt)),H.push(gt)),1;xt=0;var Z=F===""?".":F+":";if(Et(b))for(var lt=0;lt<b.length;lt++)F=b[lt],pt=Z+Ft(F,lt),xt+=tt(F,H,I,pt,gt);else if(lt=X(b),typeof lt=="function")for(b=lt.call(b),lt=0;!(F=b.next()).done;)F=F.value,pt=Z+Ft(F,lt++),xt+=tt(F,H,I,pt,gt);else if(pt==="object"){if(typeof b.then=="function")return tt(Y(b),H,I,F,gt);throw H=String(b),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return xt}function et(b,H,I){if(b==null)return b;var F=[],gt=0;return tt(b,F,"","",function(pt){return H.call(I,pt,gt++)}),F}function Rt(b){if(b._status===-1){var H=b._result,I=H();I.then(function(F){(b._status===0||b._status===-1)&&(b._status=1,b._result=F,I.status===void 0&&(I.status="fulfilled",I.value=F))},function(F){(b._status===0||b._status===-1)&&(b._status=2,b._result=F,I.status===void 0&&(I.status="rejected",I.reason=F))}),b._status===-1&&(b._status=0,b._result=I)}if(b._status===1)return b._result.default;throw b._result}var St=typeof reportError=="function"?reportError:function(b){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof b=="object"&&b!==null&&typeof b.message=="string"?String(b.message):String(b),error:b});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",b);return}console.error(b)};function Ie(b){var H=rt.T,I={};I.types=H!==null?H.types:null,rt.T=I;try{var F=b(),gt=rt.S;gt!==null&&gt(I,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(ut,St)}catch(pt){St(pt)}finally{H!==null&&I.types!==null&&(H.types=I.types),rt.T=H}}function xl(b){var H=rt.T;if(H!==null){var I=H.types;I===null?H.types=[b]:I.indexOf(b)===-1&&I.push(b)}else Ie(xl.bind(null,b))}var Sn={map:et,forEach:function(b,H,I){et(b,function(){H.apply(this,arguments)},I)},count:function(b){var H=0;return et(b,function(){H++}),H},toArray:function(b){return et(b,function(H){return H})||[]},only:function(b){if(!at(b))throw Error("React.Children.only expected to receive a single React element child.");return b}};return nt.Activity=g,nt.Children=Sn,nt.Component=G,nt.Fragment=o,nt.Profiler=d,nt.PureComponent=$,nt.StrictMode=f,nt.Suspense=E,nt.ViewTransition=A,nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=rt,nt.__COMPILER_RUNTIME={__proto__:null,c:function(b){return rt.H.useMemoCache(b)}},nt.addTransitionType=xl,nt.cache=function(b){return function(){return b.apply(null,arguments)}},nt.cacheSignal=function(){return null},nt.cloneElement=function(b,H,I){if(b==null)throw Error("The argument must be a React element, but you passed "+b+".");var F=q({},b.props),gt=b.key;if(H!=null)for(pt in H.key!==void 0&&(gt=""+H.key),H)!Ne.call(H,pt)||pt==="key"||pt==="__self"||pt==="__source"||pt==="ref"&&H.ref===void 0||(F[pt]=H[pt]);var pt=arguments.length-2;if(pt===1)F.children=I;else if(1<pt){for(var xt=Array(pt),Z=0;Z<pt;Z++)xt[Z]=arguments[Z+2];F.children=xt}return fe(b.type,gt,F)},nt.createContext=function(b){return b={$$typeof:v,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null},b.Provider=b,b.Consumer={$$typeof:m,_context:b},b},nt.createElement=function(b,H,I){var F,gt={},pt=null;if(H!=null)for(F in H.key!==void 0&&(pt=""+H.key),H)Ne.call(H,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(gt[F]=H[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(b&&b.defaultProps)for(F in xt=b.defaultProps,xt)gt[F]===void 0&&(gt[F]=xt[F]);return fe(b,pt,gt)},nt.createRef=function(){return{current:null}},nt.forwardRef=function(b){return{$$typeof:x,render:b}},nt.isValidElement=at,nt.lazy=function(b){return{$$typeof:R,_payload:{_status:-1,_result:b},_init:Rt}},nt.memo=function(b,H){return{$$typeof:O,type:b,compare:H===void 0?null:H}},nt.startTransition=Ie,nt.unstable_useCacheRefresh=function(){return rt.H.useCacheRefresh()},nt.use=function(b){return rt.H.use(b)},nt.useActionState=function(b,H,I){return rt.H.useActionState(b,H,I)},nt.useCallback=function(b,H){return rt.H.useCallback(b,H)},nt.useContext=function(b){return rt.H.useContext(b)},nt.useDebugValue=function(){},nt.useDeferredValue=function(b,H){return rt.H.useDeferredValue(b,H)},nt.useEffect=function(b,H){return rt.H.useEffect(b,H)},nt.useEffectEvent=function(b){return rt.H.useEffectEvent(b)},nt.useId=function(){return rt.H.useId()},nt.useImperativeHandle=function(b,H,I){return rt.H.useImperativeHandle(b,H,I)},nt.useInsertionEffect=function(b,H){return rt.H.useInsertionEffect(b,H)},nt.useLayoutEffect=function(b,H){return rt.H.useLayoutEffect(b,H)},nt.useMemo=function(b,H){return rt.H.useMemo(b,H)},nt.useOptimistic=function(b,H){return rt.H.useOptimistic(b,H)},nt.useReducer=function(b,H,I){return rt.H.useReducer(b,H,I)},nt.useRef=function(b){return rt.H.useRef(b)},nt.useState=function(b){return rt.H.useState(b)},nt.useSyncExternalStore=function(b,H,I){return rt.H.useSyncExternalStore(b,H,I)},nt.useTransition=function(){return rt.H.useTransition()},nt.version="19.3.0",nt}var _0;function Yo(){return _0||(_0=1,No.exports=Iy()),No.exports}var zo={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 N0;function Fy(){if(N0)return re;N0=1;var i=Yo();function r(R){var g="https://react.dev/errors/"+R;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var A=2;A<arguments.length;A++)g+="&args[]="+encodeURIComponent(arguments[A])}return"Minified React error #"+R+"; visit "+g+" 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"),m=Symbol.for("react.recoverable"),v=Symbol.for("react.optimistic_key");function x(R,g,A){var L=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:L==null?null:L===v?v:""+L,children:R,containerInfo:g,implementation:A}}var E=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function O(R,g){if(R==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return re.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=f,re.browser=function(R){return{$$typeof:m,_reason:R}},re.createPortal=function(R,g){var A=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(r(299));return x(R,g,null,A)},re.flushSync=function(R){var g=E.T,A=f.p;try{if(E.T=null,f.p=2,R)return R()}finally{E.T=g,f.p=A,f.d.f()}},re.preconnect=function(R,g){typeof R=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,f.d.C(R,g))},re.prefetchDNS=function(R){typeof R=="string"&&f.d.D(R)},re.preinit=function(R,g){if(typeof R=="string"&&g&&typeof g.as=="string"){var A=g.as,L=O(A,g.crossOrigin),X=typeof g.integrity=="string"?g.integrity:void 0,P=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;A==="style"?f.d.S(R,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:L,integrity:X,fetchPriority:P}):A==="script"&&f.d.X(R,{crossOrigin:L,integrity:X,fetchPriority:P,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},re.preinitModule=function(R,g){if(typeof R=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var A=O(g.as,g.crossOrigin);f.d.M(R,{crossOrigin:A,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0})}}else g==null&&f.d.M(R)},re.preload=function(R,g){if(typeof R=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var A=g.as,L=O(A,g.crossOrigin);f.d.L(R,A,{crossOrigin:L,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},re.preloadModule=function(R,g){if(typeof R=="string")if(g){var A=O(g.as,g.crossOrigin);f.d.m(R,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:A,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0})}else f.d.m(R)},re.requestFormReset=function(R){f.d.r(R)},re.unstable_batchedUpdates=function(R,g){return R(g)},re.useFormState=function(R,g,A){return E.H.useFormState(R,g,A)},re.useFormStatus=function(){return E.H.useHostTransitionStatus()},re.version="19.3.0",re}var z0;function Wy(){if(z0)return zo.exports;z0=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(),zo.exports=Fy(),zo.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 O0;function Py(){if(O0)return qu;O0=1;var i=Jy(),r=Yo(),o=Wy();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 m(t){for(var e=t,l=e;l&&!l.alternate;)e=l,(e.flags&4098)!==0&&(t=e.return),l=e.return;for(;e.return;)e=e.return;return e.tag===3?t:null}function v(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 x(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 E(t){if(m(t)!==t)throw Error(f(188))}function O(t){var e=t.alternate;if(!e){if(e=m(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 E(a),t;if(u===n)return E(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 R(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=R(t),e!==null)return e;t=t.sibling}return null}function g(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)&&g(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 L(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 B=null,G=null;function U(t,e,l){return t===l?!0:t===e?(B=t,!0):!1}function $(t,e,l){return t===l?(G=t,!1):t===e?(G!==null&&(B=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 Et(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"),St=Symbol.for("react.lazy"),Ie=Symbol.for("react.activity"),xl=Symbol.for("react.legacy_hidden"),Sn=Symbol.for("react.memo_cache_sentinel"),b=Symbol.for("react.view_transition"),H=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 pt(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 Ie:return"Activity";case b: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:pt(t.type)||"Memo";case St:e=t._payload,t=t._init;try{return pt(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,bl={pending:!1,data:null,method:null,action:null},ks=[],Kn=-1;function ul(t){return{current:t}}function le(t){0>Kn||(t.current=ks[Kn],ks[Kn]=null,Kn--)}function At(t,e){Kn++,ks[Kn]=t.current,t.current=e}var il=ul(null),Qa=ul(null),Yl=ul(null),Ju=ul(null);function Iu(t,e){switch(At(Yl,e),At(Qa,t),At(il,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?Rm(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=Rm(e),t=Cm(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}le(il),At(il,t)}function Jn(){le(il),le(Qa),le(Yl)}function Ys(t){var e=t.memoizedState;e!==null&&(Ha._currentValue=e.memoizedState,At(Ju,t)),e=il.current;var l=Cm(e,t.type);e!==l&&(At(Qa,t),At(il,l))}function Fu(t){Qa.current===t&&(le(il),le(Qa)),Ju.current===t&&(le(Ju),Ha._currentValue=bl)}var Vs,Jo;function Vl(t){if(Vs===void 0)try{throw Error()}catch(l){var e=l.stack.trim().match(/\n( *(at )?)/);Vs=e&&e[1]||"",Jo=-1<l.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+Vs+t+Jo}var Gs=!1;function Qs(t,e){if(!t||Gs)return"";Gs=!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(k){var S=k}Reflect.construct(t,[],M)}else{try{M.call()}catch(k){S=k}M=!1;try{var N=Object.getOwnPropertyDescriptor(t.prototype,"props");Object.defineProperty(t.prototype,"props",{configurable:!0,set:function(){throw Error()}}),M=!0,new t}finally{M&&(N!==void 0?Object.defineProperty(t.prototype,"props",N):delete t.prototype.props)}}}else{try{throw Error()}catch(k){S=k}(M=t())&&typeof M.catch=="function"&&M.catch(function(){})}}catch(k){if(k&&S&&typeof k.stack=="string")return[k.stack,S.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 p=c.split(`
44
- `),T=h.split(`
45
- `);for(a=n=0;n<p.length&&!p[n].includes("DetermineComponentFrameRoot");)n++;for(;a<T.length&&!T[a].includes("DetermineComponentFrameRoot");)a++;if(n===p.length||a===T.length)for(n=p.length-1,a=T.length-1;1<=n&&0<=a&&p[n]!==T[a];)a--;for(;1<=n&&0<=a;n--,a--)if(p[n]!==T[a]){if(n!==1||a!==1)do if(n--,a--,0>a||p[n]!==T[a]){var C=`
46
- `+p[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{Gs=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?Vl(l):""}function Iv(t,e){switch(t.tag){case 26:case 27:case 5:return Vl(t.type);case 16:return Vl("Lazy");case 13:return t.child!==e&&e!==null?Vl("Suspense Fallback"):Vl("Suspense");case 19:return Vl("SuspenseList");case 0:case 15:return Qs(t.type,!1);case 11:return Qs(t.type.render,!1);case 1:return Qs(t.type,!0);case 31:return Vl("Activity");case 30:return Vl("ViewTransition");default:return""}}function Io(t){try{var e="",l=null;do e+=Iv(t,l),l=t,t=t.return;while(t);return e}catch(n){return`
47
- Error generating stack: `+n.message+`
48
- `+n.stack}}var $s=Object.prototype.hasOwnProperty,Xs=i.unstable_scheduleCallback,Zs=i.unstable_cancelCallback,Fv=i.unstable_shouldYield,Wv=i.unstable_requestPaint,ze=i.unstable_now,Pv=i.unstable_getCurrentPriorityLevel,Fo=i.unstable_ImmediatePriority,Wo=i.unstable_UserBlockingPriority,Wu=i.unstable_NormalPriority,tg=i.unstable_LowPriority,Po=i.unstable_IdlePriority,eg=i.log,lg=i.unstable_setDisableYieldValue,$a=null,Oe=null;function Gl(t){if(typeof eg=="function"&&lg(t),Oe&&typeof Oe.setStrictMode=="function")try{Oe.setStrictMode($a,t)}catch{}}var Re=Math.clz32?Math.clz32:ug,ng=Math.log,ag=Math.LN2;function ug(t){return t>>>=0,t===0?32:31-(ng(t)/ag|0)|0}var Pu=256,ti=262144,ei=4194304;function jn(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 li(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=jn(n):(c&=h,c!==0?a=jn(c):l||(l=h&~t,l!==0&&(a=jn(l))))):(h=n&~u,h!==0?a=jn(h):c!==0?a=jn(c):l||(l=n&~t,l!==0&&(a=jn(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 Xa(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function tf(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 ig(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 ef(){var t=ei;return ei<<=1,(ei&62914560)===0&&(ei=4194304),t}function Ks(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function Za(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function sg(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,p=t.expirationTimes,T=t.hiddenUpdates;for(l=c&~l;0<l;){var C=31-Re(l),M=1<<C;h[C]=0,p[C]=-1;var S=T[C];if(S!==null)for(T[C]=null,C=0;C<S.length;C++){var N=S[C];N!==null&&(N.lane&=-536870913)}l&=~M}n!==0&&lf(t,n,0),u!==0&&a===0&&t.tag!==0&&(t.suspendedLanes|=u&~(c&~e))}function lf(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 nf(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 af(t,e){var l=e&-e;return l=(l&42)!==0?1:Js(l),(l&(t.suspendedLanes|e))!==0?0:l}function Js(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 Is(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function uf(){var t=lt.p;return t!==0?t:(t=window.event,t===void 0?32:h0(t.type))}function sf(t,e){var l=lt.p;try{return lt.p=t,e()}finally{lt.p=l}}var Sl=Math.random().toString(36).slice(2),ne="__reactFiber$"+Sl,be="__reactProps$"+Sl,In="__reactContainer$"+Sl,cf="__reactEvents$"+Sl,cg="__reactListeners$"+Sl,rg="__reactHandles$"+Sl,rf="__reactResources$"+Sl,Ka="__reactMarker$"+Sl,ni="__reactLoad$"+Sl;function ai(t){delete t[ne],delete t[be],delete t[cg],delete t[rg]}function En(t){var e;if(e=t[ne])return e;for(var l=t.parentNode;l;){if(e=l[In]||l[ne]){if(l=e.alternate,e.child!==null||l!==null&&l.child!==null)for(t=Zm(t);t!==null;){if(l=t[ne])return l;t=Zm(t)}return e}t=l,l=t.parentNode}return null}function Fn(t){if(t=t[ne]||t[In]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function Ja(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(f(33))}function Wn(t){var e=t[rf];return e||(e=t[rf]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Wt(t){t[Ka]=!0}function of(t){t[ni]=void 0}var ff=new Set,df={};function Tn(t,e){Pn(t,e),Pn(t+"Capture",e)}function Pn(t,e){for(df[t]=e,t=0;t<e.length;t++)ff.add(e[t])}var og=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]*$"),hf={},mf={};function fg(t){return $s.call(mf,t)?!0:$s.call(hf,t)?!1:og.test(t)?mf[t]=!0:(hf[t]=!0,!1)}var yt=!1;function vf(){var t=yt;return yt=!1,t}function ui(t,e,l){if(fg(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 ii(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 jl(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 gf(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function dg(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 Fs(t){if(!t._valueTracker){var e=gf(t)?"checked":"value";t._valueTracker=dg(t,e,""+t[e])}}function pf(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var l=e.getValue(),n="";return t&&(n=gf(t)?t.checked?"true":"false":t.value),t=n,t!==l?(e.setValue(t),!0):!1}var hg=/[\n"\\]/g;function Ye(t){return t.replace(hg,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Ws(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?Ps(t,Ce(t.value)):Ps(t,Ce(e)):l!=null?Ps(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 yf(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)){Fs(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),Fs(t)}function Ps(t,e){t.defaultValue!==""+e&&(t.defaultValue=""+e)}function ta(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 xf(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 bf(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),Fs(t)}function ea(t,e){if(e){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=e;return}}t.textContent=e}var mg=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Sf(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||mg.has(e)?e==="float"?t.cssFloat=l:t[e]=(""+l).trim():t[e]=l+"px"}function jf(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&&(Sf(t,a,n),yt=!0)}else for(var u in e)e.hasOwnProperty(u)&&Sf(t,u,e[u])}function tc(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 vg=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"]]),gg=/^[\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 si(t){return gg.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function sl(){}var ec=null;function lc(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var la=null,na=null;function Ef(t){var e=Fn(t);if(e&&(t=e.stateNode)){var l=t[be]||null;t:switch(t=e.stateNode,e.type){case"input":if(Ws(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="'+Ye(""+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));Ws(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&&pf(n)}break t;case"textarea":xf(t,l.value,l.defaultValue);break t;case"select":e=l.value,e!=null&&ta(t,!!l.multiple,e,!1)}}}var nc=!1;function Tf(t,e,l){if(nc)return t(e,l);nc=!0;try{var n=t(e);return n}finally{if(nc=!1,(la!==null||na!==null)&&(ss(),la&&(e=la,t=na,na=la=null,Ef(e),t)))for(e=0;e<t.length;e++)Ef(t[e])}}function Ia(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"),ac=!1;if(El)try{var Fa={};Object.defineProperty(Fa,"passive",{get:function(){ac=!0}}),window.addEventListener("test",Fa,Fa),window.removeEventListener("test",Fa,Fa)}catch{ac=!1}var Ql=null,uc=null,ci=null;function _f(){if(ci)return ci;var t,e=uc,l=e.length,n,a="value"in Ql?Ql.value:Ql.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 ci=a.slice(t,1<n?1-n:void 0)}function ri(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 oi(){return!0}function Nf(){return!1}function ve(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)?oi:Nf,this.isPropagationStopped=Nf,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=oi)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=oi)},persist:function(){},isPersistent:oi}),e}var $l={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fi=ve($l),Wa=ut({},$l,{view:0,detail:0}),pg=ve(Wa),ic,sc,Pa,di=ut({},Wa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rc,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!==Pa&&(Pa&&t.type==="mousemove"?(ic=t.screenX-Pa.screenX,sc=t.screenY-Pa.screenY):sc=ic=0,Pa=t),ic)},movementY:function(t){return"movementY"in t?t.movementY:sc}}),zf=ve(di),yg=ut({},di,{dataTransfer:0}),xg=ve(yg),bg=ut({},Wa,{relatedTarget:0}),cc=ve(bg),Sg=ut({},$l,{animationName:0,elapsedTime:0,pseudoElement:0}),jg=ve(Sg),Eg=ut({},$l,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Tg=ve(Eg),_g=ut({},$l,{data:0}),Of=ve(_g),Ng={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zg={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"},Og={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Rg(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Og[t])?!!e[t]:!1}function rc(){return Rg}var Cg=ut({},Wa,{key:function(t){if(t.key){var e=Ng[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=ri(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?zg[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rc,charCode:function(t){return t.type==="keypress"?ri(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ri(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Ag=ve(Cg),Dg=ut({},di,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rf=ve(Dg),Mg=ut({},$l,{submitter:0}),wg=ve(Mg),Ug=ut({},Wa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rc}),Hg=ve(Ug),Bg=ut({},$l,{propertyName:0,elapsedTime:0,pseudoElement:0}),Lg=ve(Bg),qg=ut({},di,{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}),kg=ve(qg),Yg=ut({},$l,{newState:0,oldState:0,source:0}),Vg=ve(Yg),Gg=[9,13,27,32],oc=El&&"CompositionEvent"in window,tu=null;El&&"documentMode"in document&&(tu=document.documentMode);var Qg=El&&"TextEvent"in window&&!tu,Cf=El&&(!oc||tu&&8<tu&&11>=tu),Af=" ",Df=!1;function Mf(t,e){switch(t){case"keyup":return Gg.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wf(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var aa=!1;function $g(t,e){switch(t){case"compositionend":return wf(e);case"keypress":return e.which!==32?null:(Df=!0,Af);case"textInput":return t=e.data,t===Af&&Df?null:t;default:return null}}function Xg(t,e){if(aa)return t==="compositionend"||!oc&&Mf(t,e)?(t=_f(),ci=uc=Ql=null,aa=!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 Cf&&e.locale!=="ko"?null:e.data;default:return null}}var Zg={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 Uf(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Zg[t.type]:e==="textarea"}function Hf(t,e,l,n){la?na?na.push(n):na=[n]:la=n,e=hs(e,"onChange"),0<e.length&&(l=new fi("onChange","change",null,l,n),t.push({event:l,listeners:e}))}var eu=null,lu=null;function Kg(t){Em(t,0)}function hi(t){var e=Ja(t);if(pf(e))return t}function Bf(t,e){if(t==="change")return e}var Lf=!1;if(El){var fc;if(El){var dc="oninput"in document;if(!dc){var qf=document.createElement("div");qf.setAttribute("oninput","return;"),dc=typeof qf.oninput=="function"}fc=dc}else fc=!1;Lf=fc&&(!document.documentMode||9<document.documentMode)}function kf(){eu&&(eu.detachEvent("onpropertychange",Yf),lu=eu=null)}function Yf(t){if(t.propertyName==="value"&&hi(lu)){var e=[];Hf(e,lu,t,lc(t)),Tf(Kg,e)}}function Jg(t,e,l){t==="focusin"?(kf(),eu=e,lu=l,eu.attachEvent("onpropertychange",Yf)):t==="focusout"&&kf()}function Ig(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return hi(lu)}function Fg(t,e){if(t==="click")return hi(e)}function Wg(t,e){if(t==="input"||t==="change")return hi(e)}function Pg(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ae=typeof Object.is=="function"?Object.is:Pg;function nu(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(!$s.call(e,a)||!Ae(t[a],e[a]))return!1}return!0}function hc(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 Vf(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Gf(t,e){var l=Vf(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=Vf(l)}}function Qf(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Qf(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function $f(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=hc(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=hc(t.document)}return e}function mc(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 tp=El&&"documentMode"in document&&11>=document.documentMode,ua=null,vc=null,au=null,gc=!1;function Xf(t,e,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;gc||ua==null||ua!==hc(n)||(n=ua,"selectionStart"in n&&mc(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}),au&&nu(au,n)||(au=n,n=hs(vc,"onSelect"),0<n.length&&(e=new fi("onSelect","select",null,e,l),t.push({event:e,listeners:n}),e.target=ua)))}function _n(t,e){var l={};return l[t.toLowerCase()]=e.toLowerCase(),l["Webkit"+t]="webkit"+e,l["Moz"+t]="moz"+e,l}var ia={animationend:_n("Animation","AnimationEnd"),animationiteration:_n("Animation","AnimationIteration"),animationstart:_n("Animation","AnimationStart"),transitionrun:_n("Transition","TransitionRun"),transitionstart:_n("Transition","TransitionStart"),transitioncancel:_n("Transition","TransitionCancel"),transitionend:_n("Transition","TransitionEnd")},pc={},Zf={};El&&(Zf=document.createElement("div").style,"AnimationEvent"in window||(delete ia.animationend.animation,delete ia.animationiteration.animation,delete ia.animationstart.animation),"TransitionEvent"in window||delete ia.transitionend.transition);function Nn(t){if(pc[t])return pc[t];if(!ia[t])return t;var e=ia[t],l;for(l in e)if(e.hasOwnProperty(l)&&l in Zf)return pc[t]=e[l];return t}var Kf=Nn("animationend"),Jf=Nn("animationiteration"),If=Nn("animationstart"),ep=Nn("transitionrun"),lp=Nn("transitionstart"),np=Nn("transitioncancel"),Ff=Nn("transitionend"),Wf=new Map,yc="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(" ");yc.push("scrollEnd");function Fe(t,e){Wf.set(t,e),Tn(e,[t])}var ap=0;function Tl(t,e){if(t.name!=null&&t.name!=="auto")return t.name;if(e.autoName!==null)return e.autoName;t=el.identifierPrefix;var l=ap++;return t="_"+t+"t_"+l.toString(32)+"_",e.autoName=t}function Pf(t){if(t==null||typeof t=="string")return t;var e=null,l=Na;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 _l(t,e){return t=Pf(t),e=Pf(e),e==null?t==="auto"?null:t:e==="auto"?null:e}var mi=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)},Ve=[],sa=0,xc=0;function vi(){for(var t=sa,e=xc=sa=0;e<t;){var l=Ve[e];Ve[e++]=null;var n=Ve[e];Ve[e++]=null;var a=Ve[e];Ve[e++]=null;var u=Ve[e];if(Ve[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&&td(l,a,u)}}function gi(t,e,l,n){Ve[sa++]=t,Ve[sa++]=e,Ve[sa++]=l,Ve[sa++]=n,xc|=n,t.lanes|=n,t=t.alternate,t!==null&&(t.lanes|=n)}function bc(t,e,l,n){return gi(t,e,l,n),pi(t)}function zn(t,e){return gi(t,null,null,e),pi(t)}function td(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 pi(t){if(50<Nu)throw Nu=0,is=null,Error(f(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var ca={};function up(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 up(t,e,l,n)}function Sc(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Nl(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 ed(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 yi(t,e,l,n,a,u){var c=0;if(n=t,typeof n=="function")Sc(n)&&(c=1);else if(typeof n=="string")c=My(t,l,il.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(n){case Ie:return t=Se(31,l,e,a),t.elementType=Ie,t.lanes=u,t;case Kt:return On(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 xl:case b:return t=a|32,t=Se(30,l,e,t),t.elementType=b,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 St: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 On(t,e,l,n){return t=Se(7,t,n,e),t.lanes=l,t}function jc(t,e,l){return t=Se(6,t,null,e),t.lanes=l,t}function ld(t){var e=Se(18,null,null,0);return e.stateNode=t,e}function Ec(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 nd=new WeakMap;function Ge(t,e){if(typeof t=="object"&&t!==null){var l=nd.get(t);return l!==void 0?l:(e={value:t,source:e,stack:Io(e)},nd.set(t,e),e)}return{value:t,source:e,stack:Io(e)}}var ra=[],oa=0,xi=null,uu=0,Qe=[],$e=0,Xl=null,cl=1,rl="";function zl(t,e){ra[oa++]=uu,ra[oa++]=xi,xi=t,uu=e}function ad(t,e,l){Qe[$e++]=cl,Qe[$e++]=rl,Qe[$e++]=Xl,Xl=t;var n=cl;t=rl;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,cl=1<<32-Re(e)+a|l<<a|n,rl=u+t}else cl=1<<u|l<<a|n,rl=t}function bi(t){t.return!==null&&(zl(t,1),ad(t,1,0))}function Tc(t){for(;t===xi;)xi=ra[--oa],ra[oa]=null,uu=ra[--oa],ra[oa]=null;for(;t===Xl;)Xl=Qe[--$e],Qe[$e]=null,rl=Qe[--$e],Qe[$e]=null,cl=Qe[--$e],Qe[$e]=null}function ud(t,e){Qe[$e++]=cl,Qe[$e++]=rl,Qe[$e++]=Xl,cl=e.id,rl=e.overflow,Xl=t}var Pt=null,Dt=null,ct=!1,Zl=null,Xe=!1,_c=Error(f(519));function Kl(t){var e=Error(f(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw iu(Ge(e,t)),_c}function id(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<Ou.length;l++)ft(Ou[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),yf(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),bf(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||zm(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=sl),e=!0):e=!1,e||Kl(t,!0)}function Si(t){for(Pt=t.return;Pt;)switch(Pt.tag){case 5:case 31:case 13:Xe=!1;return;case 27:case 3:Xe=!0;return;default:Pt=Pt.return}}function fa(t){if(t!==Pt)return!1;if(!ct)return Si(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")||eo(t.type,t.memoizedProps)),l=!l),l&&Dt&&Kl(t),Si(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(f(317));Dt=Xm(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(f(317));Dt=Xm(t)}else e===27?(e=Dt,fn(t.type)?(t=oo,oo=null,Dt=t):Dt=e):Dt=Pt?Ke(t.stateNode.nextSibling):null;return!0}function Rn(){Dt=Pt=null,ct=!1}function Nc(){var t=Zl;return t!==null&&(Te===null?Te=t:Te.push.apply(Te,t),Zl=null),t}function iu(t){Zl===null?Zl=[t]:Zl.push(t)}var zc=ul(null),Cn=null,Ol=null;function Jl(t,e,l){At(zc,e._currentValue),e._currentValue=l}function Rl(t){t._currentValue=zc.current,le(zc)}function ji(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 Oc(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 p=0;p<e.length;p++)if(h.context===e[p]){u.lanes|=l,h=u.alternate,h!==null&&(h.lanes|=l),ji(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),ji(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),ji(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 An(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===Ju.current){if(c=a.alternate,c===null)throw Error(f(387));c.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(t!==null?t.push(Ha):t=[Ha])}a=a.return}return t!==null&&Oc(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 Dn(t){Cn=t,Ol=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function ae(t){return sd(Cn,t)}function Ti(t,e){return Cn===null&&Dn(t),sd(t,e)}function sd(t,e){var l=e._currentValue;if(e={context:e,memoizedValue:l,next:null},Ol===null){if(t===null)throw Error(f(308));Ol=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Ol=Ol.next=e;return l}var ip=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()})}},sp=i.unstable_scheduleCallback,cp=i.unstable_NormalPriority,Qt={$$typeof:Ft,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Rc(){return{controller:new ip,data:new Map,refCount:0}}function su(t){t.refCount--,t.refCount===0&&sp(cp,function(){t.controller.abort()})}function cd(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 cu=null;function rp(t){var e=t.transitionTypes;return t.transitionTypes=null,e}var ru=null,Cc=0,Mn=0,da=null;function op(t,e){if(ru===null){var l=ru=[];Cc=0,Mn=Xr(),da={status:"pending",value:void 0,then:function(n){l.push(n)}}}return Cc++,e.then(rd,rd),e}function rd(){if(--Cc===0&&(cu=null,ru!==null)){da!==null&&(da.status="fulfilled");var t=ru;ru=null,Mn=0,da=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function fp(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 od=Z.S;Z.S=function(t,e){if(lm=ze(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&op(t,e),cu!==null)for(var l=Ca;l!==null;)cd(l,cu),l=l.next;if(l=t.types,l!==null){for(var n=Ca;n!==null;)cd(n,l),n=n.next;if(Mn!==0){n=cu,n===null&&(n=cu=[]);for(var a=0;a<l.length;a++){var u=l[a];n.indexOf(u)===-1&&n.push(u)}}}od!==null&&od(t,e)};var wn=ul(null);function Ac(){var t=wn.current;return t!==null?t:Ct.pooledCache}function _i(t,e){e===null?At(wn,wn.current):At(wn,e.pool)}function fd(){var t=Ac();return t===null?null:{parent:Qt._currentValue,pool:t}}var ha=Error(f(460)),Dc=Error(f(474)),Ni=Error(f(542)),zi={then:function(){}};function dd(t){return t=t.status,t==="fulfilled"||t==="rejected"}function hd(t,e,l){switch(l=t[l],l===void 0?t.push(e):l!==e&&(e.then(sl,sl),e=l),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,vd(t),t===void 0&&!("reason"in e)?Error(f(600)):t;default:if(typeof e.status=="string")e.then(sl,sl);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,vd(t),t}throw Hn=e,ha}}function Un(t){try{var e=t._init;return e(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Hn=l,ha):l}}var Hn=null;function md(){if(Hn===null)throw Error(f(459));var t=Hn;return Hn=null,t}function vd(t){if(t===ha||t===Ni)throw Error(f(483))}var ma=null,ou=0;function Oi(t){var e=ou;return ou+=1,ma===null&&(ma=[]),hd(ma,t,e)}function Il(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function Ri(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 gd(t){function e(j,y){if(t){var _=j.deletions;_===null?(j.deletions=[y],j.flags|=16):_.push(y)}}function l(j,y){if(!t)return null;for(;y!==null;)e(j,y),y=y.sibling;return null}function n(j){for(var y=new Map;j!==null;)j.key===null?y.set(j.index,j):y.set(j.key,j),j=j.sibling;return y}function a(j,y){return j=Nl(j,y),j.index=0,j.sibling=null,j}function u(j,y,_){return j.index=_,t?(_=j.alternate,_!==null?(_=_.index,_<y?(j.flags|=2,y):_):(j.flags|=134217730,y)):(j.flags|=1048576,y)}function c(j){return t&&j.alternate===null&&(j.flags|=134217730),j}function h(j,y,_,D){return y===null||y.tag!==6?(y=jc(_,j.mode,D),y.return=j,y):(y=a(y,_),y.return=j,y)}function p(j,y,_,D){var V=_.type;return V===Kt?(j=C(j,y,_.props.children,D,_.key),Il(j,_),j):y!==null&&(y.elementType===V||typeof V=="object"&&V!==null&&V.$$typeof===St&&Un(V)===y.type)?(y=a(y,_.props),Il(y,_),y.return=j,y):(y=yi(_.type,_.key,_.props,null,j.mode,D),Il(y,_),y.return=j,y)}function T(j,y,_,D){return y===null||y.tag!==4||y.stateNode.containerInfo!==_.containerInfo||y.stateNode.implementation!==_.implementation?(y=Ec(_,j.mode,D),y.return=j,y):(y=a(y,_.children||[]),y.return=j,y)}function C(j,y,_,D,V){return y===null||y.tag!==7?(y=On(_,j.mode,D,V),y.return=j,y):(y=a(y,_),y.return=j,y)}function M(j,y,_){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=jc(""+y,j.mode,_),y.return=j,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ne:return _=yi(y.type,y.key,y.props,null,j.mode,_),Il(_,y),_.return=j,_;case fe:return y=Ec(y,j.mode,_),y.return=j,y;case St:return y=Un(y),M(j,y,_)}if(xt(y)||F(y))return y=On(y,j.mode,_,null),y.return=j,y;if(typeof y.then=="function")return M(j,Oi(y),_);if(y.$$typeof===Ft)return M(j,Ti(j,y),_);Ri(j,y)}return null}function S(j,y,_,D){var V=y!==null?y.key:null;if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return V!==null?null:h(j,y,""+_,D);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Ne:return _.key===V?p(j,y,_,D):null;case fe:return _.key===V?T(j,y,_,D):null;case St:return _=Un(_),S(j,y,_,D)}if(xt(_)||F(_))return V!==null?null:C(j,y,_,D,null);if(typeof _.then=="function")return S(j,y,Oi(_),D);if(_.$$typeof===Ft)return S(j,y,Ti(j,_),D);Ri(j,_)}return null}function N(j,y,_,D,V){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return j=j.get(_)||null,h(y,j,""+D,V);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case Ne:return j=j.get(D.key===null?_:D.key)||null,p(y,j,D,V);case fe:return j=j.get(D.key===null?_:D.key)||null,T(y,j,D,V);case St:return D=Un(D),N(j,y,_,D,V)}if(xt(D)||F(D))return j=j.get(_)||null,C(y,j,D,V,null);if(typeof D.then=="function")return N(j,y,_,Oi(D),V);if(D.$$typeof===Ft)return N(j,y,_,Ti(y,D),V);Ri(y,D)}return null}function k(j,y,_,D){for(var V=null,ht=null,J=y,W=y=0,Zt=null;J!==null&&W<_.length;W++){J.index>W?(Zt=J,J=null):Zt=J.sibling;var vt=S(j,J,_[W],D);if(vt===null){J===null&&(J=Zt);break}t&&J&&vt.alternate===null&&e(j,J),y=u(vt,y,W),ht===null?V=vt:ht.sibling=vt,ht=vt,J=Zt}if(W===_.length)return l(j,J),ct&&zl(j,W),V;if(J===null){for(;W<_.length;W++)J=M(j,_[W],D),J!==null&&(y=u(J,y,W),ht===null?V=J:ht.sibling=J,ht=J);return ct&&zl(j,W),V}for(J=n(J);W<_.length;W++)Zt=N(J,j,W,_[W],D),Zt!==null&&(t&&(vt=Zt.alternate,vt!==null&&J.delete(vt.key===null?W:vt.key)),y=u(Zt,y,W),ht===null?V=Zt:ht.sibling=Zt,ht=Zt);return t&&J.forEach(function(gn){return e(j,gn)}),ct&&zl(j,W),V}function Q(j,y,_,D){if(_==null)throw Error(f(151));for(var V=null,ht=null,J=y,W=y=0,Zt=null,vt=_.next();J!==null&&!vt.done;W++,vt=_.next()){J.index>W?(Zt=J,J=null):Zt=J.sibling;var gn=S(j,J,vt.value,D);if(gn===null){J===null&&(J=Zt);break}t&&J&&gn.alternate===null&&e(j,J),y=u(gn,y,W),ht===null?V=gn:ht.sibling=gn,ht=gn,J=Zt}if(vt.done)return l(j,J),ct&&zl(j,W),V;if(J===null){for(;!vt.done;W++,vt=_.next())vt=M(j,vt.value,D),vt!==null&&(y=u(vt,y,W),ht===null?V=vt:ht.sibling=vt,ht=vt);return ct&&zl(j,W),V}for(J=n(J);!vt.done;W++,vt=_.next())vt=N(J,j,W,vt.value,D),vt!==null&&(t&&(Zt=vt.alternate,Zt!==null&&J.delete(Zt.key===null?W:Zt.key)),y=u(vt,y,W),ht===null?V=vt:ht.sibling=vt,ht=vt);return t&&J.forEach(function($y){return e(j,$y)}),ct&&zl(j,W),V}function st(j,y,_,D){if(typeof _=="object"&&_!==null&&_.type===Kt&&_.key===null&&_.props.ref===void 0&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Ne:t:{for(var V=_.key;y!==null;){if(y.key===V){if(V=_.type,V===Kt){if(y.tag===7){l(j,y.sibling),D=a(y,_.props.children),Il(D,_),D.return=j,j=D;break t}}else if(y.elementType===V||typeof V=="object"&&V!==null&&V.$$typeof===St&&Un(V)===y.type){l(j,y.sibling),D=a(y,_.props),Il(D,_),D.return=j,j=D;break t}l(j,y);break}else e(j,y);y=y.sibling}_.type===Kt?(D=On(_.props.children,j.mode,D,_.key),Il(D,_),D.return=j,j=D):(D=yi(_.type,_.key,_.props,null,j.mode,D),Il(D,_),D.return=j,j=D)}return c(j);case fe:t:{for(V=_.key;y!==null;){if(y.key===V)if(y.tag===4&&y.stateNode.containerInfo===_.containerInfo&&y.stateNode.implementation===_.implementation){l(j,y.sibling),D=a(y,_.children||[]),D.return=j,j=D;break t}else{l(j,y);break}else e(j,y);y=y.sibling}D=Ec(_,j.mode,D),D.return=j,j=D}return c(j);case St:return _=Un(_),st(j,y,_,D)}if(xt(_))return k(j,y,_,D);if(F(_)){if(V=F(_),typeof V!="function")throw Error(f(150));return _=V.call(_),Q(j,y,_,D)}if(typeof _.then=="function")return st(j,y,Oi(_),D);if(_.$$typeof===Ft)return st(j,y,Ti(j,_),D);Ri(j,_)}return typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint"?(_=""+_,y!==null&&y.tag===6?(l(j,y.sibling),D=a(y,_),D.return=j,j=D):(l(j,y),D=jc(_,j.mode,D),D.return=j,j=D),c(j)):l(j,y)}return function(j,y,_,D){try{ou=0;var V=st(j,y,_,D);return ma=null,V}catch(J){if(J===ha||J===Ni)throw J;var ht=Se(29,J,null,j.mode);return ht.lanes=D,ht.return=j,ht}finally{}}}var Bn=gd(!0),pd=gd(!1),Fl=!1;function Mc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wc(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Wl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Pl(t,e,l){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,(bt&2)!==0){var a=n.pending;return a===null?e.next=e:(e.next=a.next,a.next=e),n.pending=e,e=pi(t),td(t,null,l),e}return gi(t,n,e,l),pi(t)}function fu(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,nf(t,l)}}function Uc(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 Hc=!1;function du(){if(Hc){var t=da;if(t!==null)throw t}}function hu(t,e,l,n){Hc=!1;var a=t.updateQueue;Fl=!1;var u=a.firstBaseUpdate,c=a.lastBaseUpdate,h=a.shared.pending;if(h!==null){a.shared.pending=null;var p=h,T=p.next;p.next=null,c===null?u=T:c.next=T,c=p;var C=t.alternate;C!==null&&(C=C.updateQueue,h=C.lastBaseUpdate,h!==c&&(h===null?C.firstBaseUpdate=T:h.next=T,C.lastBaseUpdate=p))}if(u!==null){var M=a.baseState;c=0,C=T=p=null,h=u;do{var S=h.lane&-536870913,N=S!==h.lane;if(N?(dt&S)===S:(n&S)===S){S!==0&&S===Mn&&(Hc=!0),C!==null&&(C=C.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});t:{var k=t,Q=h;S=e;var st=l;switch(Q.tag){case 1:if(k=Q.payload,typeof k=="function"){M=k.call(st,M,S);break t}M=k;break t;case 3:k.flags=k.flags&-65537|128;case 0:if(k=Q.payload,S=typeof k=="function"?k.call(st,M,S):k,S==null)break t;M=ut({},M,S);break t;case 2:Fl=!0}}S=h.callback,S!==null&&(t.flags|=64,N&&(t.flags|=8192),N=a.callbacks,N===null?a.callbacks=[S]:N.push(S))}else N={lane:S,tag:h.tag,payload:h.payload,callback:h.callback,next:null},C===null?(T=C=N,p=M):C=C.next=N,c|=S;if(h=h.next,h===null){if(h=a.shared.pending,h===null)break;N=h,h=N.next,N.next=null,a.lastBaseUpdate=N,a.shared.pending=null}}while(!0);C===null&&(p=M),a.baseState=p,a.firstBaseUpdate=T,a.lastBaseUpdate=C,u===null&&(a.shared.lanes=0),sn|=c,t.lanes=c,t.memoizedState=M}}function yd(t,e){if(typeof t!="function")throw Error(f(191,t));t.call(e)}function xd(t,e){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)yd(l[t],e)}var tn=ul(null),Ci=ul(0);function bd(t,e){t=wl,At(Ci,t),At(tn,e),wl=t|e.baseLanes}function Bc(){At(Ci,wl),At(tn,tn.current)}function Lc(){wl=Ci.current,le(tn),le(Ci)}var ue=ul(null),me=null;function en(t){var e=t.alternate;At(ie,ie.current&1),At(ue,t),me===null&&(e===null||tn.current!==null||e.memoizedState!==null)&&(me=t)}function qc(t){At(ie,ie.current),At(ue,t),me===null&&(me=t)}function Sd(t){t.tag===22?(At(ie,ie.current),At(ue,t),me===null&&(me=t)):ln()}function ln(){At(ie,ie.current),At(ue,ue.current)}function De(t){le(ue),me===t&&(me=null),le(ie)}var ie=ul(0);function mu(t,e){At(ue,ue.current),At(ie,e)}function kc(t){le(ie),le(ue),me===t&&(me=null)}function Ai(t){for(var e=t;e!==null;){if(e.tag===13){var l=e.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||co(l)||ro(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 Cl=0,it=null,zt=null,$t=null,Di=!1,va=!1,Ln=!1,Mi=0,vu=0,ga=null,dp=0;function Yt(){throw Error(f(321))}function Yc(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 Vc(t,e,l,n,a,u){return Cl=u,it=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Z.H=t===null||t.memoizedState===null?ah:uh,Ln=!1,u=l(n,a),Ln=!1,va&&(u=Ed(e,l,n,a)),jd(t),u}function jd(t){Z.H=ki;var e=zt!==null&&zt.next!==null;if(Cl=0,$t=zt=it=null,Di=!1,vu=0,ga=null,e)throw Error(f(300));t===null||Xt||(t=t.dependencies,t!==null&&Ei(t)&&(Xt=!0))}function Ed(t,e,l,n){it=t;var a=0;do{if(va&&(ga=null),vu=0,va=!1,25<=a)throw Error(f(301));if(a+=1,$t=zt=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=bp,u=e(l,n)}while(va);return u}function hp(){var t=Z.H,e=t.useState()[0];return e=typeof e.then=="function"?gu(e):e,t=t.useState()[0],(zt!==null?zt.memoizedState:null)!==t&&(it.flags|=1024),e}function Gc(){var t=Mi!==0;return Mi=0,t}function Qc(t,e,l){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~l}function $c(t){if(Di){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}Di=!1}Cl=0,$t=zt=it=null,va=!1,vu=Mi=0,ga=null}function ge(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?it.memoizedState=$t=t:$t=$t.next=t,$t}function Gt(){if(zt===null){var t=it.alternate;t=t!==null?t.memoizedState:null}else t=zt.next;var e=$t===null?it.memoizedState:$t.next;if(e!==null)$t=e,zt=t;else{if(t===null)throw it.alternate===null?Error(f(467)):Error(f(310));zt=t,t={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},$t===null?it.memoizedState=$t=t:$t=$t.next=t}return $t}function wi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function gu(t){var e=vu;return vu+=1,ga===null&&(ga=[]),t=hd(ga,t,e),e=it,($t===null?e.memoizedState:$t.next)===null&&(e=e.alternate,Z.H=e===null||e.memoizedState===null?ah:uh),t}function Ui(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return gu(t);if(t.$$typeof===H)return;if(t.$$typeof===Ft)return ae(t)}throw Error(f(438,String(t)))}function Xc(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=wi(),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]=Sn;return e.index++,l}function Al(t,e){return typeof e=="function"?e(t):e}function Hi(t){var e=Gt();return Zc(e,zt,t)}function Zc(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,p=null,T=e,C=!1;do{var M=T.lane&-536870913;if(M!==T.lane?(dt&M)===M:(Cl&M)===M){var S=T.revertLane;if(S===0)p!==null&&(p=p.next={lane:0,revertLane:0,gesture:null,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null}),M===Mn&&(C=!0);else if((Cl&S)===S){T=T.next,S===Mn&&(C=!0);continue}else M={lane:0,revertLane:T.revertLane,gesture:null,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null},p===null?(h=p=M,c=u):p=p.next=M,it.lanes|=S,sn|=S;M=T.action,Ln&&l(u,M),u=T.hasEagerState?T.eagerState:l(u,M)}else S={lane:M,revertLane:T.revertLane,gesture:T.gesture,action:T.action,hasEagerState:T.hasEagerState,eagerState:T.eagerState,next:null},p===null?(h=p=S,c=u):p=p.next=S,it.lanes|=M,sn|=M;T=T.next}while(T!==null&&T!==e);if(p===null?c=u:p.next=h,!Ae(u,t.memoizedState)&&(Xt=!0,C&&(l=da,l!==null)))throw l;t.memoizedState=u,t.baseState=c,t.baseQueue=p,n.lastRenderedState=u}return a===null&&(n.lanes=0),[t.memoizedState,n.dispatch]}function Kc(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 Td(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((zt||a).memoizedState,l);if(c&&(a.memoizedState=l,Xt=!0),a=a.queue,Fc(zd.bind(null,n,a,t),[t]),t=a.getSnapshot!==e||c||$t!==null&&($t.memoizedState.tag&1)!==0,pa(t?9:8,{destroy:void 0},Nd.bind(null,n,a,l,e),null),t){if(n.flags|=2048,Ct===null)throw Error(f(349));u||(Cl&127)!==0||_d(n,e,l)}return l}function _d(t,e,l){t.flags|=16384,t={getSnapshot:e,value:l},e=it.updateQueue,e===null?(e=wi(),it.updateQueue=e,e.stores=[t]):(l=e.stores,l===null?e.stores=[t]:l.push(t))}function Nd(t,e,l,n){e.value=l,e.getSnapshot=n,Od(e)&&Rd(t)}function zd(t,e,l){return l(function(){Od(e)&&Rd(t)})}function Od(t){var e=t.getSnapshot;t=t.value;try{var l=e();return!Ae(t,l)}catch{return!0}}function Rd(t){var e=zn(t,2);e!==null&&_e(e,t,2)}function Jc(t){var e=ge();if(typeof t=="function"){var l=t;if(t=l(),Ln){Gl(!0);try{l()}finally{Gl(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Al,lastRenderedState:t},e}function Cd(t,e,l,n){return t.baseState=l,Zc(t,zt,typeof n=="function"?n:Al)}function mp(t,e,l,n,a){if(qi(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,Ad(e,u)):(u.next=l.next,e.pending=l.next=u)}}function Ad(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),p=Z.S;p!==null&&p(c,h),Dd(t,e,h)}catch(T){Ic(t,e,T)}finally{u!==null&&c.types!==null&&(u.types=c.types),Z.T=u}}else try{u=l(a,n),Dd(t,e,u)}catch(T){Ic(t,e,T)}}function Dd(t,e,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){Md(t,e,n)},function(n){return Ic(t,e,n)}):Md(t,e,l)}function Md(t,e,l){e.status="fulfilled",e.value=l,wd(e),t.state=l,e=t.pending,e!==null&&(l=e.next,l===e?t.pending=null:(l=l.next,e.next=l,Ad(t,l)))}function Ic(t,e,l){var n=t.pending;if(t.pending=null,n!==null){n=n.next;do e.status="rejected",e.reason=l,wd(e),e=e.next;while(e!==n)}t.action=null}function wd(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function Ud(t,e){return e}function Hd(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=Xe;a.nodeType!==8;){if(!u){a=null;break e}if(a=Ke(a.nextSibling),a===null){a=null;break e}}u=a.data,a=u==="F!"||u==="F"?a:null}if(a){Dt=Ke(a.nextSibling),n=a.data==="F!";break t}}Kl(n)}n=!1}n&&(e=l[0])}}return l=ge(),l.memoizedState=l.baseState=e,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ud,lastRenderedState:e},l.queue=n,l=eh.bind(null,it,n),n.dispatch=l,n=Jc(!1),u=lr.bind(null,it,!1,n.queue),n=ge(),a={state:e,dispatch:null,action:t,pending:null},n.queue=a,l=mp.bind(null,it,a,u,l),a.dispatch=l,n.memoizedState=t,[e,l,!1]}function Bd(t){var e=Gt();return Ld(e,zt,t)}function Ld(t,e,l){if(e=Zc(t,e,Ud)[0],t=Hi(Al)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var n=gu(e)}catch(c){throw c===ha?Ni:c}else n=e;e=Gt();var a=e.queue,u=a.dispatch;return l!==e.memoizedState&&(it.flags|=2048,pa(9,{destroy:void 0},vp.bind(null,a,l),null)),[n,u,t]}function vp(t,e){t.action=e}function qd(t){var e=Gt(),l=zt;if(l!==null)return Ld(e,l,t);Gt(),e=e.memoizedState,l=Gt();var n=l.queue.dispatch;return l.memoizedState=t,[e,n,!1]}function pa(t,e,l,n){return t={tag:t,create:l,deps:n,inst:e,next:null},e=it.updateQueue,e===null&&(e=wi(),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 kd(){return Gt().memoizedState}function Bi(t,e,l,n){var a=ge();it.flags|=t,a.memoizedState=pa(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;zt!==null&&n!==null&&Yc(n,zt.memoizedState.deps)?a.memoizedState=pa(e,u,l,n):(it.flags|=t,a.memoizedState=pa(1|e,u,l,n))}function Yd(t,e){Bi(8390656,8,t,e)}function Fc(t,e){Li(2048,8,t,e)}function gp(t){it.flags|=4;var e=it.updateQueue;if(e===null)e=wi(),it.updateQueue=e,e.events=[t];else{var l=e.events;l===null?e.events=[t]:l.push(t)}}function Vd(t){var e=Gt().memoizedState;return gp({ref:e,nextImpl:t}),function(){if((bt&2)!==0)throw Error(f(440));return e.impl.apply(void 0,arguments)}}function Gd(t,e){return Li(4,2,t,e)}function Qd(t,e){return Li(4,4,t,e)}function $d(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 Xd(t,e,l){l=l!=null?l.concat([t]):null,Li(4,4,$d.bind(null,e,t),l)}function Wc(){}function Zd(t,e){var l=Gt();e=e===void 0?null:e;var n=l.memoizedState;return e!==null&&Yc(e,n[1])?n[0]:(l.memoizedState=[t,e],t)}function Kd(t,e){var l=Gt();e=e===void 0?null:e;var n=l.memoizedState;if(e!==null&&Yc(e,n[1]))return n[0];if(n=t(),Ln){Gl(!0);try{t()}finally{Gl(!1)}}return l.memoizedState=[n,e],n}function Pc(t,e,l){return l===void 0||(Cl&1073741824)!==0&&(dt&261930)===0?t.memoizedState=e:(t.memoizedState=l,t=am(),it.lanes|=t,sn|=t,l)}function Jd(t,e,l,n){return Ae(l,e)?l:tn.current!==null?(t=Pc(t,l,n),Ae(t,e)||(Xt=!0),t):(Cl&106)===0||(Cl&1073741824)!==0&&(dt&261930)===0?(Xt=!0,t.memoizedState=l):(t=am(),it.lanes|=t,sn|=t,e)}function Id(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,lr(t,!1,e,l);try{var p=a(),T=Z.S;if(T!==null&&T(h,p),p!==null&&typeof p=="object"&&typeof p.then=="function"){var C=fp(p,n);pu(t,e,C,He(t))}else pu(t,e,n,He(t))}catch(M){pu(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 pp(){}function tr(t,e,l,n){if(t.tag!==5)throw Error(f(476));var a=Fd(t).queue;Id(t,a,e,bl,l===null?pp:function(){return Wd(t),l(n)})}function Fd(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:bl,baseState:bl,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Al,lastRenderedState:bl},next:null};var l={};return e.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Al,lastRenderedState:l},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Wd(t){var e=Fd(t);e.next===null&&(e=t.alternate.memoizedState),pu(t,e.next.queue,{},He())}function er(){return ae(Ha)}function Pd(){return Gt().memoizedState}function th(){return Gt().memoizedState}function yp(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=He();t=Wl(l);var n=Pl(e,t,l);n!==null&&(_e(n,e,l),fu(n,e,l)),e={cache:Rc()},t.payload=e;return}e=e.return}}function xp(t,e,l){var n=He();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},qi(t)?lh(e,l):(l=bc(t,e,l,n),l!==null&&(_e(l,t,n),nh(l,e,n)))}function eh(t,e,l){var n=He();pu(t,e,l,n)}function pu(t,e,l,n){var a={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(qi(t))lh(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 gi(t,e,a,0),Ct===null&&vi(),!1}catch{}finally{}if(l=bc(t,e,a,n),l!==null)return _e(l,t,n),nh(l,e,n),!0}return!1}function lr(t,e,l,n){if(n={lane:2,revertLane:Xr(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},qi(t)){if(e)throw Error(f(479))}else e=bc(t,l,n,2),e!==null&&_e(e,t,2)}function qi(t){var e=t.alternate;return t===it||e!==null&&e===it}function lh(t,e){va=Di=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function nh(t,e,l){if((l&4194048)!==0){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,nf(t,l)}}var ki={readContext:ae,use:Ui,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},ah={readContext:ae,use:Ui,useCallback:function(t,e){return ge().memoizedState=[t,e===void 0?null:e],t},useContext:ae,useEffect:Yd,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,Bi(4194308,4,$d.bind(null,e,t),l)},useLayoutEffect:function(t,e){return Bi(4194308,4,t,e)},useInsertionEffect:function(t,e){Bi(4,2,t,e)},useMemo:function(t,e){var l=ge();e=e===void 0?null:e;var n=t();if(Ln){Gl(!0);try{t()}finally{Gl(!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){Gl(!0);try{l(e)}finally{Gl(!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=xp.bind(null,it,t),[n.memoizedState,t]},useRef:function(t){var e=ge();return t={current:t},e.memoizedState=t},useState:function(t){t=Jc(t);var e=t.queue,l=eh.bind(null,it,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:Wc,useDeferredValue:function(t,e){var l=ge();return Pc(l,t,e)},useTransition:function(){var t=Jc(!1);return t=Id.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||_d(n,e,l)}a.memoizedState=l;var u={value:l,getSnapshot:e};return a.queue=u,Yd(zd.bind(null,n,u,t),[t]),n.flags|=2048,pa(9,{destroy:void 0},Nd.bind(null,n,u,l,e),null),l},useId:function(){var t=ge(),e=Ct.identifierPrefix;if(ct){var l=rl,n=cl;l=(n&~(1<<32-Re(n)-1)).toString(32)+l,e="_"+e+"R_"+l,l=Mi++,0<l&&(e+="H"+l.toString(32)),e+="_"}else l=dp++,e="_"+e+"r_"+l.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:er,useFormState:Hd,useActionState:Hd,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=lr.bind(null,it,!0,l),l.dispatch=e,[t,e]},useMemoCache:Xc,useCacheRefresh:function(){return ge().memoizedState=yp.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)}}},uh={readContext:ae,use:Ui,useCallback:Zd,useContext:ae,useEffect:Fc,useImperativeHandle:Xd,useInsertionEffect:Gd,useLayoutEffect:Qd,useMemo:Kd,useReducer:Hi,useRef:kd,useState:function(){return Hi(Al)},useDebugValue:Wc,useDeferredValue:function(t,e){var l=Gt();return Jd(l,zt.memoizedState,t,e)},useTransition:function(){var t=Hi(Al)[0],e=Gt().memoizedState;return[typeof t=="boolean"?t:gu(t),e]},useSyncExternalStore:Td,useId:Pd,useHostTransitionStatus:er,useFormState:Bd,useActionState:Bd,useOptimistic:function(t,e){var l=Gt();return Cd(l,zt,t,e)},useMemoCache:Xc,useCacheRefresh:th,useEffectEvent:Vd},bp={readContext:ae,use:Ui,useCallback:Zd,useContext:ae,useEffect:Fc,useImperativeHandle:Xd,useInsertionEffect:Gd,useLayoutEffect:Qd,useMemo:Kd,useReducer:Kc,useRef:kd,useState:function(){return Kc(Al)},useDebugValue:Wc,useDeferredValue:function(t,e){var l=Gt();return zt===null?Pc(l,t,e):Jd(l,zt.memoizedState,t,e)},useTransition:function(){var t=Kc(Al)[0],e=Gt().memoizedState;return[typeof t=="boolean"?t:gu(t),e]},useSyncExternalStore:Td,useId:Pd,useHostTransitionStatus:er,useFormState:qd,useActionState:qd,useOptimistic:function(t,e){var l=Gt();return zt!==null?Cd(l,zt,t,e):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:Xc,useCacheRefresh:th,useEffectEvent:Vd};function nr(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 ar={enqueueSetState:function(t,e,l){t=t._reactInternals;var n=He(),a=Wl(n);a.payload=e,l!=null&&(a.callback=l),e=Pl(t,a,n),e!==null&&(_e(e,t,n),fu(e,t,n))},enqueueReplaceState:function(t,e,l){t=t._reactInternals;var n=He(),a=Wl(n);a.tag=1,a.payload=e,l!=null&&(a.callback=l),e=Pl(t,a,n),e!==null&&(_e(e,t,n),fu(e,t,n))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var l=He(),n=Wl(l);n.tag=2,e!=null&&(n.callback=e),e=Pl(t,n,l),e!==null&&(_e(e,t,l),fu(e,t,l))}};function ih(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?!nu(l,n)||!nu(a,u):!0}function sh(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&&ar.enqueueReplaceState(e,e.state,null)}function qn(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 ch(t){mi(t)}function rh(t){console.error(t)}function oh(t){mi(t)}function Yi(t,e){try{var l=t.onUncaughtError;l(e.value,{componentStack:e.stack})}catch(n){setTimeout(function(){throw n})}}function fh(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 ur(t,e,l){return l=Wl(l),l.tag=3,l.payload={element:null},l.callback=function(){Yi(t,e)},l}function dh(t){return t=Wl(t),t.tag=3,t}function hh(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(){fh(e,l,n)}}var c=l.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(t.callback=function(){fh(e,l,n),typeof a!="function"&&(cn===null?cn=new Set([this]):cn.add(this));var h=n.stack;this.componentDidCatch(n.value,{componentStack:h!==null?h:""})})}function Sp(t,e,l,n,a){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(e=l.alternate,e!==null&&An(e,l,a,!0),l=ue.current,l!==null){switch(l.tag){case 31:case 13:case 19:return me===null?cs():l.alternate===null&&Vt===0&&(Vt=3),l.flags&=-257,l.flags|=65536,l.lanes=a,n===zi?l.flags|=16384:(e=l.updateQueue,e===null?l.updateQueue=new Set([n]):e.add(n),Gr(t,n,a)),!1;case 22:return l.flags|=65536,n===zi?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)),Gr(t,n,a)),!1}throw Error(f(435,l.tag))}return Gr(t,n,a),cs(),!1}if(ct)return e=ue.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=a,n!==_c&&(t=Error(f(422),{cause:n}),iu(Ge(t,l)))):(n!==_c&&(e=Error(f(423),{cause:n}),iu(Ge(e,l))),t=t.current.alternate,t.flags|=65536,a&=-a,t.lanes|=a,n=Ge(n,l),a=ur(t.stateNode,n,a),Uc(t,a),Vt!==4&&(Vt=2)),!1;var u=Error(f(520),{cause:n});if(u=Ge(u,l),_u===null?_u=[u]:_u.push(u),Vt!==4&&(Vt=2),e===null)return!0;n=Ge(n,l),l=e;do{switch(l.tag){case 3:return l.flags|=65536,t=a&-a,l.lanes|=t,t=ur(l.stateNode,n,t),Uc(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"&&(cn===null||!cn.has(u))))return l.flags|=65536,a&=-a,l.lanes|=a,a=dh(a),hh(a,t,l,n),Uc(l,a),!1;break;case 22:if(l.memoizedState!==null)return l.flags|=65536,!1}l=l.return}while(l!==null);return!1}var ir=Error(f(461)),Xt=!1;function Jt(t,e,l,n){e.child=t===null?pd(e,null,l,n):Bn(e,t.child,l,n)}function mh(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 Dn(e),n=Vc(t,e,l,c,u,a),h=Gc(),t!==null&&!Xt?(Qc(t,e,a),Dl(t,e,a)):(ct&&h&&bi(e),e.flags|=1,Jt(t,e,n,a),e.child)}function vh(t,e,l,n,a){if(t===null){var u=l.type;return typeof u=="function"&&!Sc(u)&&u.defaultProps===void 0&&l.compare===null?(e.tag=15,e.type=u,gh(t,e,u,n,a)):(t=yi(l.type,null,n,e,e.mode,a),t.ref=e.ref,t.return=e,e.child=t)}if(u=t.child,!mr(t,a)){var c=u.memoizedProps;if(l=l.compare,l=l!==null?l:nu,l(c,n)&&t.ref===e.ref)return Dl(t,e,a)}return e.flags|=1,t=Nl(u,n),t.ref=e.ref,t.return=e,e.child=t}function gh(t,e,l,n,a){if(t!==null){var u=t.memoizedProps;if(nu(u,n)&&t.ref===e.ref)if(Xt=!1,e.pendingProps=n=u,mr(t,a))(t.flags&131072)!==0&&(Xt=!0);else return e.lanes=t.lanes,Dl(t,e,a)}return sr(t,e,l,n,a)}function ph(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 yh(t,e,u,l,n)}if((l&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&_i(e,u!==null?u.cachePool:null),u!==null?bd(e,u):Bc(),Sd(e);else return n=e.lanes=536870912,yh(t,e,u!==null?u.baseLanes|l:l,l,n)}else u!==null?(_i(e,u.cachePool),bd(e,u),ln(),e.memoizedState=null):(t!==null&&_i(e,null),Bc(),ln());return Jt(t,e,a,l),e.child}function yu(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function yh(t,e,l,n,a){var u=Ac();return u=u===null?null:{parent:Qt._currentValue,pool:u},e.memoizedState={baseLanes:l,cachePool:u},t!==null&&_i(e,null),Bc(),Sd(e),t!==null&&An(t,e,n,!0),e.childLanes=a,null}function Vi(t,e){return e=Gi({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function xh(t,e,l){return Bn(e,t.child,null,l),t=Vi(e,e.pendingProps),t.flags|=2,De(e),e.memoizedState=null,t}function jp(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=Vi(e,n),e.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},yu(null,t);if(qc(e),(t=Dt)?(t=$m(t,Xe),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Xl!==null?{id:cl,overflow:rl}:null,retryLane:536870912,hydrationErrors:null},l=ld(t),l.return=e,e.child=l,Pt=e,Dt=null)):t=null,t===null)throw Kl(e);return e.lanes=536870912,null}return Vi(e,n)}var u=t.memoizedState;if(u!==null){var c=u.dehydrated;if(qc(e),a)if(e.flags&256)e.flags&=-257,e=xh(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||An(t,e,l,!1),a=(l&t.childLanes)!==0,Xt||a){if(tn.current===null){if(n=Ct,n!==null&&(c=af(n,l),c!==0&&c!==u.retryLane))throw u.retryLane=c,zn(t,c),_e(n,t,c),ir;cs()}e=xh(t,e,l)}else t=u.treeContext,Dt=Ke(c.nextSibling),Pt=e,ct=!0,Zl=null,Xe=!1,t!==null&&ud(e,t),e=Vi(e,n),e.flags|=134221824;return e}return t=Nl(t.child,{mode:n.mode,children:n.children}),t.ref=e.ref,e.child=t,t.return=e,t}function ya(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 sr(t,e,l,n,a){return Dn(e),l=Vc(t,e,l,n,void 0,a),n=Gc(),t!==null&&!Xt?(Qc(t,e,a),Dl(t,e,a)):(ct&&n&&bi(e),e.flags|=1,Jt(t,e,l,a),e.child)}function bh(t,e,l,n,a,u){return Dn(e),e.updateQueue=null,l=Ed(e,n,l,a),jd(t),n=Gc(),t!==null&&!Xt?(Qc(t,e,u),Dl(t,e,u)):(ct&&n&&bi(e),e.flags|=1,Jt(t,e,l,u),e.child)}function Sh(t,e,l,n,a){if(Dn(e),e.stateNode===null){var u=ca,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=ar,e.stateNode=u,u._reactInternals=e,u=e.stateNode,u.props=n,u.state=e.memoizedState,u.refs={},Mc(e),c=l.contextType,u.context=typeof c=="object"&&c!==null?ae(c):ca,u.state=e.memoizedState,c=l.getDerivedStateFromProps,typeof c=="function"&&(nr(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&&ar.enqueueReplaceState(u,u.state,null),hu(e,n,u,a),du(),u.state=e.memoizedState),typeof u.componentDidMount=="function"&&(e.flags|=4194308),n=!0}else if(t===null){u=e.stateNode;var h=e.memoizedProps,p=qn(l,h);u.props=p;var T=u.context,C=l.contextType;c=ca,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)&&sh(e,u,n,c),Fl=!1;var S=e.memoizedState;u.state=S,hu(e,n,u,a),du(),T=e.memoizedState,h||S!==T||Fl?(typeof M=="function"&&(nr(e,l,M,n),T=e.memoizedState),(p=Fl||ih(e,l,p,n,S,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=p):(typeof u.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{u=e.stateNode,wc(t,e),c=e.memoizedProps,C=qn(l,c),u.props=C,M=e.pendingProps,S=u.context,T=l.contextType,p=ca,typeof T=="object"&&T!==null&&(p=ae(T)),h=l.getDerivedStateFromProps,(T=typeof h=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(c!==M||S!==p)&&sh(e,u,n,p),Fl=!1,S=e.memoizedState,u.state=S,hu(e,n,u,a),du();var N=e.memoizedState;c!==M||S!==N||Fl||t!==null&&t.dependencies!==null&&Ei(t.dependencies)?(typeof h=="function"&&(nr(e,l,h,n),N=e.memoizedState),(C=Fl||ih(e,l,C,n,S,N,p)||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,N,p),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(n,N,p)),typeof u.componentDidUpdate=="function"&&(e.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof u.componentDidUpdate!="function"||c===t.memoizedProps&&S===t.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||c===t.memoizedProps&&S===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=N),u.props=n,u.state=N,u.context=p,n=C):(typeof u.componentDidUpdate!="function"||c===t.memoizedProps&&S===t.memoizedState||(e.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||c===t.memoizedProps&&S===t.memoizedState||(e.flags|=1024),n=!1)}return u=n,ya(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=Bn(e,t.child,null,a),e.child=Bn(e,null,l,a)):Jt(t,e,l,a),e.memoizedState=u.state,t=e.child):t=Dl(t,e,a),t}function jh(t,e,l,n){return Rn(),e.flags|=256,Jt(t,e,l,n),e.child}var cr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rr(t){return{baseLanes:t,cachePool:fd()}}function or(t,e,l){return t=t!==null?t.childLanes&~l:0,e&&(t|=Ue),t}function Eh(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?en(e):ln(),(t=Dt)?(t=$m(t,Xe),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:Xl!==null?{id:cl,overflow:rl}:null,retryLane:536870912,hydrationErrors:null},l=ld(t),l.return=e,e.child=l,Pt=e,Dt=null)):t=null,t===null)throw Kl(e);return ro(t)?e.lanes=32:e.lanes=536870912,null}return u=n.children,n=n.fallback,a?(ln(),a=e.mode,u=Gi({mode:"hidden",children:u},a),n=On(n,a,l,null),u.return=e,n.return=e,u.sibling=n,e.child=u,n=e.child,n.memoizedState=rr(l),n.childLanes=or(t,c,l),e.memoizedState=cr,yu(null,n)):(en(e),fr(e,u))}var h=t.memoizedState;if(h!==null){var p=h.dehydrated;if(p!==null)return Ep(t,e,u,c,n,p,h,l)}return a?(ln(),a=n.fallback,u=e.mode,h=t.child,p=h.sibling,n=Nl(h,{mode:"hidden",children:n.children}),n.subtreeFlags=h.subtreeFlags&1206910976,p!==null?a=Nl(p,a):(a=On(a,u,l,null),a.flags|=2),a.return=e,n.return=e,n.sibling=a,e.child=n,yu(null,n),n=e.child,a=t.child.memoizedState,a===null?a=rr(l):(u=a.cachePool,u!==null?(h=Qt._currentValue,u=u.parent!==h?{parent:h,pool:h}:u):u=fd(),a={baseLanes:a.baseLanes|l,cachePool:u}),n.memoizedState=a,n.childLanes=or(t,c,l),e.memoizedState=cr,yu(t.child,n)):(en(e),l=t.child,t=l.sibling,l=Nl(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 fr(t,e){return e=Gi({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function Gi(t,e){return t=Se(22,t,null,e),t.lanes=0,t}function Qi(t,e,l){return Bn(e,t.child,null,l),t=fr(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Ep(t,e,l,n,a,u,c,h){if(l)return e.flags&256?(en(e),e.flags&=-257,Qi(t,e,h)):e.memoizedState!==null?(ln(),e.child=t.child,e.flags|=128,null):(ln(),u=a.fallback,c=e.mode,a=Gi({mode:"visible",children:a.children},c),u=On(u,c,h,null),u.flags|=2,a.return=e,u.return=e,a.sibling=u,e.child=a,Bn(e,t.child,null,h),a=e.child,a.memoizedState=rr(h),a.childLanes=or(t,n,h),e.memoizedState=cr,yu(null,a));if(en(e),ro(u)){if(n=u.nextSibling&&u.nextSibling.dataset,n)var p=n.dgst;return n=p,n!==""&&(a=Error(f(419)),a.stack="",a.digest=n,iu({value:a,source:null,stack:null})),Qi(t,e,h)}if(Xt||An(t,e,h,!1),n=(h&t.childLanes)!==0,Xt||n){if(tn.current!==null)return Qi(t,e,h);if(n=Ct,n!==null&&(a=af(n,h),a!==0&&a!==c.retryLane))throw c.retryLane=a,zn(t,a),_e(n,t,a),ir;return co(u)||cs(),Qi(t,e,h)}return co(u)?(e.flags|=192,e.child=t.child,null):(t=c.treeContext,Dt=Ke(u.nextSibling),Pt=e,ct=!0,Zl=null,Xe=!1,t!==null&&ud(e,t),e=fr(e,a.children),e.flags|=134221824,e)}function Th(t,e,l){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),ji(t.return,e,l)}function _h(t){for(var e=null;t!==null;){var l=t.alternate;l!==null&&Ai(l)===null&&(e=t),t=t.sibling}return e}function $i(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 dr(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 hr(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 mu(e,c),null;var h=(c&2)!==0;if(h?(c=c&1|2,e.flags|=128):c&=1,mu(e,c),a==="backwards"&&t!==null?(dr(t),Jt(t,e,n,l),dr(t)):Jt(t,e,n,l),n=ct?uu:0,!h&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Th(t,l,e);else if(t.tag===19)Th(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=_h(e.child),l===null?(a=e.child,e.child=null):(a=l.sibling,l.sibling=null,dr(e)),$i(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&&Ai(t)===null){e.child=a;break}t=a.sibling,a.sibling=l,l=a,a=t}$i(e,!0,l,null,u,n);break;case"together":$i(e,!1,null,null,void 0,n);break;case"independent":e.memoizedState=null;break;default:l=_h(e.child),l===null?(a=e.child,e.child=null):(a=l.sibling,l.sibling=null),$i(e,!1,a,l,u,n)}return e.child}function Nh(t,e,l){var n=e.pendingProps;return Jl(e,e.type,n.value),Jt(t,e,n.children,l),e.child}function Dl(t,e,l){if(t!==null&&(e.dependencies=t.dependencies),sn|=e.lanes,(l&e.childLanes)===0)if(t!==null){if(An(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=Nl(t,t.pendingProps),e.child=l,l.return=e;t.sibling!==null;)t=t.sibling,l=l.sibling=Nl(t,t.pendingProps),l.return=e;l.sibling=null}return e.child}function mr(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&Ei(t)))}function Tp(t,e,l){switch(e.tag){case 3:Iu(e,e.stateNode.containerInfo),Jl(e,Qt,t.memoizedState.cache),Rn();break;case 27:case 5:Ys(e);break;case 4:Iu(e,e.stateNode.containerInfo);break;case 10:Jl(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,qc(e),null;break;case 13:var n=e.memoizedState;if(n!==null){if(n.dehydrated!==null)return en(e),e.flags|=128,null;n=An(t,e,l,!1);var a=e.child.childLanes;return n||(l&a)!==0?Eh(t,e,l):(en(e),t=Dl(t,e,l),t!==null?t.sibling:null)}en(e);break;case 19:if(e.flags&128)return hr(t,e,l);if(a=(t.flags&128)!==0,n=(l&e.childLanes)!==0,n||(An(t,e,l,!1),n=(l&e.childLanes)!==0),a){if(n)return hr(t,e,l);e.flags|=128}if(a=e.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),mu(e,ie.current),n)break;return null;case 22:return e.lanes=0,ph(t,e,l,e.pendingProps);case 24:Jl(e,Qt,t.memoizedState.cache)}return Dl(t,e,l)}function zh(t,e,l){if(t!==null)if(t.memoizedProps!==e.pendingProps)Xt=!0;else{if(!mr(t,l)&&(e.flags&128)===0)return Xt=!1,Tp(t,e,l);Xt=(t.flags&131072)!==0}else Xt=!1,ct&&(e.flags&1048576)!==0&&ad(e,uu,e.index);switch(e.lanes=0,e.tag){case 16:t:{var n=e.pendingProps;if(t=Un(e.elementType),e.type=t,typeof t=="function")Sc(t)?(n=qn(t,n),e.tag=1,e=Sh(null,e,t,n,l)):(e.tag=0,e=sr(null,e,t,n,l));else{if(t!=null){var a=t.$$typeof;if(a===Y){e.tag=11,e=mh(null,e,t,n,l);break t}else if(a===Rt){e.tag=14,e=vh(null,e,t,n,l);break t}else if(a===Ft){e.tag=10,e.type=t,e=Nh(null,e,l);break t}}throw e=pt(t)||t,Error(f(306,e,""))}}return e;case 0:return sr(t,e,e.type,e.pendingProps,l);case 1:return n=e.type,a=qn(n,e.pendingProps),Sh(t,e,n,a,l);case 3:t:{if(Iu(e,e.stateNode.containerInfo),t===null)throw Error(f(387));n=e.pendingProps;var u=e.memoizedState;a=u.element,wc(t,e),hu(e,n,null,l);var c=e.memoizedState;if(n=c.cache,Jl(e,Qt,n),n!==u.cache&&Oc(e,[Qt],l,!0),du(),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=jh(t,e,n,l);break t}else if(n!==a){a=Ge(Error(f(424)),e),iu(a),e=jh(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=Ke(t.firstChild),Pt=e,ct=!0,Zl=null,Xe=!0,l=pd(e,null,n,l),e.child=l;l;)l.flags=l.flags&-3|134221824,l=l.sibling}else{if(Rn(),n===a){e=Dl(t,e,l);break t}Jt(t,e,n,l)}e=e.child}return e;case 26:return ya(t,e),t===null?(l=Wm(e.type,null,e.pendingProps,null))?e.memoizedState=l:ct||(e.stateNode=Am(e.type,e.pendingProps,Yl.current,e)):e.memoizedState=Wm(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return Ys(e),t===null&&ct&&(n=e.stateNode=Km(e.type,e.pendingProps,Yl.current),Pt=e,Xe=!0,a=Dt,fn(e.type)?(oo=a,Dt=Ke(n.firstChild)):Dt=a),Jt(t,e,e.pendingProps.children,l),ya(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&ct&&((a=n=Dt)&&(n=yy(n,e.type,e.pendingProps,Xe),n!==null?(e.stateNode=n,Pt=e,Dt=Ke(n.firstChild),Xe=!1,a=!0):a=!1),a||Kl(e)),Ys(e),a=e.type,u=e.pendingProps,c=t!==null?t.memoizedProps:null,n=u.children,eo(a,u)?n=null:c!==null&&eo(a,c)&&(e.flags|=32),e.memoizedState!==null&&(a=Vc(t,e,hp,null,null,l),Ha._currentValue=a),ya(t,e),Jt(t,e,n,l),e.child;case 6:return t===null&&ct&&((t=l=Dt)&&(l=xy(l,e.pendingProps,Xe),l!==null?(e.stateNode=l,Pt=e,Dt=null,t=!0):t=!1),t||Kl(e)),null;case 13:return Eh(t,e,l);case 4:return Iu(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Bn(e,null,n,l):Jt(t,e,n,l),e.child;case 11:return mh(t,e,e.type,e.pendingProps,l);case 7:return n=e.pendingProps,ya(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 Nh(t,e,l);case 9:return a=e.type._context,n=e.pendingProps.children,Dn(e),a=ae(a),n=n(a),e.flags|=1,Jt(t,e,n,l),e.child;case 14:return vh(t,e,e.type,e.pendingProps,l);case 15:return gh(t,e,e.type,e.pendingProps,l);case 19:return hr(t,e,l);case 31:return jp(t,e,l);case 22:return ph(t,e,l,e.pendingProps);case 24:return Dn(e),n=ae(Qt),t===null?(a=Ac(),a===null&&(a=Ct,u=Rc(),a.pooledCache=u,u.refCount++,u!==null&&(a.pooledCacheLanes|=l),a=u),e.memoizedState={parent:n,cache:a},Mc(e),Jl(e,Qt,a)):((t.lanes&l)!==0&&(wc(t,e),hu(e,null,null,l),du()),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),Jl(e,Qt,n)):(n=u.cache,Jl(e,Qt,n),n!==a.cache&&Oc(e,[Qt],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&&bi(e),t!==null&&t.memoizedProps.name!==n.name?e.flags|=4194816:ya(t,e),Jt(t,e,n.children,l),e.child;case 29:throw e.pendingProps}throw Error(f(156,e.tag))}function Ml(t){t.flags|=4}function vr(t,e,l,n,a){var u;if((u=(t.mode&32)!==0)&&(u=l===null?l0(e,n):l0(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(cm())t.flags|=8192;else throw Hn=zi,Dc}else t.flags&=-16777217}function Oh(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!n0(e))if(cm())t.flags|=8192;else throw Hn=zi,Dc}function Xi(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?ef():536870912,t.lanes|=e,Ea|=e)}function xu(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 _p(t,e,l){var n=e.pendingProps;switch(Tc(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return 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),Rl(Qt),Jn(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(fa(e)?Ml(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Nc())),Mt(e),null;case 26:var a=e.type,u=e.memoizedState;return t===null?(Ml(e),u!==null?(Mt(e),Oh(e,u)):(Mt(e),vr(e,a,null,n,l))):u?u!==t.memoizedState?(Ml(e),Mt(e),Oh(e,u)):(Mt(e),e.flags&=-16777217):(t=t.memoizedProps,t!==n&&Ml(e),Mt(e),vr(e,a,t,n,l)),null;case 27:if(Fu(e),l=Yl.current,a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&Ml(e);else{if(!n){if(e.stateNode===null)throw Error(f(166));return Mt(e),e.subtreeFlags&=-33554433,null}t=il.current,fa(e)?id(e):(t=Km(a,n,l),e.stateNode=t,Ml(e))}return Mt(e),e.subtreeFlags&=-33554433,null;case 5:if(Fu(e),a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&Ml(e);else{if(!n){if(e.stateNode===null)throw Error(f(166));return Mt(e),e.subtreeFlags&=-33554433,null}if(u=il.current,fa(e))id(e);else{var c=Cu(Yl.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&&Ml(e)}}return Mt(e),e.subtreeFlags&=-33554433,vr(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,l),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==n&&Ml(e);else{if(typeof n!="string"&&e.stateNode===null)throw Error(f(166));if(t=Yl.current,fa(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||zm(t.nodeValue,l)),t||Kl(e,!0)}else t=Cu(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=fa(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 Rn(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Mt(e),t=!1}else l=Nc(),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=fa(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 Rn(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Mt(e),a=!1}else a=Nc(),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),Xi(e,e.updateQueue),Mt(e),null);case 4:return Jn(),t===null&&Ir(e.stateNode.containerInfo),e.flags|=67108864,Mt(e),null;case 10:return Rl(e.type),Mt(e),null;case 19:if(kc(e),n=e.memoizedState,n===null)return Mt(e),null;if(a=(e.flags&128)!==0,u=n.rendering,u===null)if(a)xu(n,!1);else{if(Vt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(u=Ai(t),u!==null){for(e.flags|=128,xu(n,!1),t=u.updateQueue,e.updateQueue=t,Xi(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)ed(l,t),l=l.sibling;return mu(e,ie.current&1|2),ct&&zl(e,n.treeForkCount),e.child}t=t.sibling}n.tail!==null&&ze()>as&&(e.flags|=128,a=!0,xu(n,!1),e.lanes=4194304)}else{if(!a)if(t=Ai(u),t!==null){if(e.flags|=128,a=!0,t=t.updateQueue,e.updateQueue=t,Xi(e,t),xu(n,!0),n.tail===null&&n.tailMode!=="collapsed"&&n.tailMode!=="visible"&&!u.alternate&&!ct)return Mt(e),null}else 2*ze()-n.renderingStartTime>as&&l!==536870912&&(e.flags|=128,a=!0,xu(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?mu(e,u):(l=u,At(ue,e),At(ie,l),me===null&&(me=e)),ct&&zl(e,n.treeForkCount),t}return Mt(e),null;case 22:case 23:return De(e),Lc(),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&&Xi(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(wn),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),Rl(Qt),Mt(e),null;case 25:return null;case 30:return e.flags|=33554432,Mt(e),null}throw Error(f(156,e.tag))}function Np(t,e){switch(Tc(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Rl(Qt),Jn(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Fu(e),null;case 31:if(e.memoizedState!==null){if(De(e),e.alternate===null)throw Error(f(340));Rn()}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));Rn()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return kc(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 Jn(),null;case 10:return Rl(e.type),null;case 22:case 23:return De(e),Lc(),t!==null&&le(wn),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Rl(Qt),null;case 25:return null;default:return null}}function Rh(t,e){switch(Tc(e),e.tag){case 3:Rl(Qt),Jn();break;case 26:case 27:case 5:Fu(e);break;case 4:Jn();break;case 31:e.memoizedState!==null&&De(e);break;case 13:De(e);break;case 19:kc(e);break;case 10:Rl(e.type);break;case 22:case 23:De(e),Lc(),t!==null&&le(wn);break;case 24:Rl(Qt)}}function bu(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){_t(e,e.return,h)}}function nn(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 p=l,T=h;try{T()}catch(C){_t(a,p,C)}}}n=n.next}while(n!==u)}}catch(C){_t(e,e.return,C)}}function Ch(t){var e=t.updateQueue;if(e!==null){var l=t.stateNode;try{xd(e,l)}catch(n){_t(t,t.return,n)}}}function Ah(t,e,l){l.props=qn(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(n){_t(t,e,n)}}function ol(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=Tl(t.memoizedProps,a);(a.ref===null||a.ref.name!==u)&&(a.ref=Lm(u)),n=a.ref;break;case 7:if(t.stateNode===null){var c=new Be(t);g(t.child,!1,gy,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){_t(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){_t(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){_t(t,e,a)}else l.current=null}function Zi(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++)Qm(t.stateNode,e[l])}function Dh(t){for(var e=t.return;e!==null&&(pr(e)&&Qm(t.stateNode,e.stateNode),!gr(e));)e=e.return}function Su(t){for(var e=t.return;e!==null&&(pr(e)&&py(t.stateNode,e.stateNode),!gr(e));)e=e.return}function gr(t){return t.tag===5||t.tag===3||t.tag===27}function pr(t){return t&&t.tag===7&&t.stateNode!==null}function yr(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){_t(t,t.return,a)}}function xr(t,e,l){try{var n=t.stateNode;Wp(n,t.type,l,e),n[be]=e}catch(a){_t(t,t.return,a)}}function Mh(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&fn(t.type)||t.tag===4}function br(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Mh(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&fn(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Sr(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=sl)),Zi(t,n),yt=!0;else if(a!==4&&(a===27&&(Zi(t,n),n=null,fn(t.type)&&(l=t.stateNode,e=null)),t=t.child,t!==null))for(Sr(t,e,l,n),t=t.sibling;t!==null;)Sr(t,e,l,n),t=t.sibling}function Ki(t,e,l,n){var a=t.tag;if(a===5||a===6)a=t.stateNode,e?l.insertBefore(a,e):l.appendChild(a),Zi(t,n),yt=!0;else if(a!==4&&(a===27&&(Zi(t,n),n=null,fn(t.type)&&(l=t.stateNode)),t=t.child,t!==null))for(Ki(t,e,l,n),t=t.sibling;t!==null;)Ki(t,e,l,n),t=t.sibling}function wh(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){_t(t,t.return,u)}}var Ji=!1,Me=null;function Uh(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(Ji=!0)}var fl=null;function Hh(){var t=fl;return fl=null,t}var je=0;function xa(t,e,l,n,a){return je=0,Bh(t.child,e,l,n,a)}function Bh(t,e,l,n,a){for(var u=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(n!==null){var h=ao(c);n.push(h),h.view&&(u=!0)}else u||ao(c).view&&(u=!0);Ji=!0,Hm(c,je===0?e:e+"_"+je,l),je++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&a||Bh(t.child,e,l,n,a)&&(u=!0));t=t.sibling}return u}function dl(t,e){for(;t!==null;)t.tag===5?Bm(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&e||dl(t.child,e)),t=t.sibling}function Ii(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(Ii(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=_l(e.default,e.share),e!=="none"&&(xa(t,l,e,null,!1)||dl(t.child,!1))}t=t.sibling}}function jr(t,e){if(t.tag===30){var l=t.stateNode,n=t.memoizedProps,a=Tl(n,l),u=_l(n.default,l.paired?n.share:n.enter);u!=="none"?xa(t,a,u,null,!1)?(Ii(t),l.paired||e||za(t,n.onEnter)):dl(t.child,!1):Ii(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)jr(t,e),t=t.sibling;else Ii(t)}function Er(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=_l(l.default,l.share);if(u!=="none"&&(xa(t,n,u,null,!1)?(u=t.stateNode,a.paired=u,u.paired=a,za(t,l.onShare)):dl(t.child,!1)),e.delete(n),e.size===0)break}}}Er(t)}t=t.sibling}}}function Tr(t){if(t.tag===30){var e=t.memoizedProps,l=Tl(e,t.stateNode),n=Me!==null?Me.get(l):void 0,a=_l(e.default,n!==void 0?e.share:e.exit);a!=="none"&&(xa(t,l,a,null,!1)?n!==void 0?(a=t.stateNode,n.paired=a,a.paired=n,Me.delete(l),za(t,e.onShare)):za(t,e.onExit):dl(t.child,!1)),Me!==null&&Er(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Tr(t),t=t.sibling;else Me!==null&&Er(t)}function Lh(t){for(t=t.child;t!==null;){if(t.tag===30){var e=t.memoizedProps,l=Tl(e,t.stateNode);e=_l(e.default,e.update),t.flags&=-5,e!=="none"&&xa(t,l,e,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&Lh(t);t=t.sibling}}function _r(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,dl(t.child,!1))}_r(t)}t=t.sibling}}function Fi(t){if(t.tag===30)t.stateNode.paired=null,dl(t.child,!1),_r(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)Fi(t),t=t.sibling;else _r(t)}function qh(t){for(t=t.child;t!==null;)t.tag===30?dl(t.child,!1):(t.subtreeFlags&33554432)!==0&&qh(t),t=t.sibling}function Nr(t,e,l,n,a,u,c){for(var h=!1;e!==null;){if(e.tag===5){var p=e.stateNode;if(u!==null&&je<u.length){var T=u[je],C=ao(p);(T.view||C.view)&&(h=!0);var M;if(M=(t.flags&4)===0)if(C.clip)M=!0;else{M=T.rect;var S=C.rect;M=M.y!==S.y||M.x!==S.x||M.height!==S.height||M.width!==S.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&&Hm(p,je===0?l:l+"_"+je,a),h&&(t.flags&4)!==0||(fl===null&&(fl=[]),fl.push(p,je===0?n:n+"_"+je,e.memoizedProps)),je++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&c?t.flags|=e.flags&32:Nr(t,e.child,l,n,a,u,c)&&(h=!0));e=e.sibling}return h}function kh(t,e){for(t=t.child;t!==null;){if(t.tag===30){var l=t.memoizedProps,n=t.stateNode,a=Tl(l,n),u=_l(l.default,l.update),c;c=t.memoizedState,t.memoizedState=null,n=t;var h=t.child;je=0,a=Nr(n,h,a,a,u,c,!1),(t.flags&4)!==0&&a&&za(t,l.onUpdate)}else(t.subtreeFlags&33554432)!==0&&kh(t);t=t.sibling}}var te=!1,jt=!1,hl=!1,zr=!1,Yh=typeof WeakSet=="function"?WeakSet:Set,ee=null,ml=!1,ju=!1,Wi=!1,Or=!1;function zp(t,e,l){if(t=t.containerInfo,Pr=Ba,t=$f(t),mc(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,p=-1,T=-1,C=0,M=0,S=t,N=null;e:for(;;){for(var k;S!==n||u!==0&&S.nodeType!==3||(p=h+u),S!==c||a!==0&&S.nodeType!==3||(T=h+a),S.nodeType===3&&(h+=S.nodeValue.length),(k=S.firstChild)!==null;)N=S,S=k;for(;;){if(S===t)break e;if(N===n&&++C===u&&(p=h),N===c&&++M===a&&(T=h),(k=S.nextSibling)!==null)break;S=N,N=S.parentNode}S=k}n=p===-1||T===-1?null:{start:p,end:T}}else n=null}n=n||{start:0,end:0}}else n=null;for(to={focusedElem:t,selectionRange:n},Ba=!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&&Tr(n[u]);if(t.alternate===null&&(t.flags&2)!==0)l&&Uh(t),Pi(l);else{if(t.tag===22){if(n=t.alternate,t.memoizedState!==null){n!==null&&n.memoizedState===null&&l&&Tr(n),Pi(l);continue}else if(n!==null&&n.memoizedState!==null){l&&Uh(t),Pi(l);continue}}n=t.child,(t.subtreeFlags&e)!==0&&n!==null?(n.return=t,ee=n):(l&&Lh(t),Pi(l))}}Me=null}function Pi(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=qn(e.type,a);l=u.getSnapshotBeforeUpdate(c,n),u.__reactInternalSnapshotBeforeUpdate=l}catch(h){_t(e,e.return,h)}}break;case 3:if((a&1024)!==0){if(n=e.stateNode.containerInfo,l=n.nodeType,l===9)so(n);else if(l===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":so(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=Tl(n.memoizedProps,n.stateNode),a=e.memoizedProps,a=_l(a.default,a.update),a!=="none"&&xa(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 Vh(t,e,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:vl(t,l),n&4&&bu(5,l);break;case 1:if(vl(t,l),n&4)if(t=l.stateNode,e===null)try{t.componentDidMount()}catch(c){_t(l,l.return,c)}else{var a=qn(l.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(a,e,t.__reactInternalSnapshotBeforeUpdate)}catch(c){_t(l,l.return,c)}}n&64&&Ch(l),n&512&&ol(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{xd(t,e)}catch(c){_t(l,l.return,c)}}break;case 27:e===null&&n&4&&wh(l);case 26:case 5:vl(t,l),e===null&&n&4&&yr(l),n&512&&ol(l,l.return);break;case 12:vl(t,l);break;case 31:vl(t,l),n&4&&Xh(t,l);break;case 13:vl(t,l),n&4&&Zh(t,l),n&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=qp.bind(null,l),by(t,l))));break;case 22:if(n=l.memoizedState!==null||te,!n){var u=e!==null&&e.memoizedState!==null||jt;e=te,a=jt,te=n,(jt=u)&&!a?(n=2,(l.subtreeFlags&8772)!==0&&(n|=1),tl(t,l,n)):vl(t,l),te=e,jt=a}break;case 30:vl(t,l),n&512&&ol(l,l.return);break;case 7:n&512&&ol(l,l.return);default:vl(t,l)}}function Rr(t,e){for(t=t.child;t!==null;)Gh(t,e),t=t.sibling}function Gh(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(p){_t(t,t.return,p)}Cr(t,e);break;case 6:try{t.stateNode.nodeValue=e?"":t.memoizedProps,yt=!0}catch(p){_t(t,t.return,p)}break;case 18:try{var h=t.stateNode;e?Um(h,!0):Um(t.stateNode,!1)}catch(p){_t(t,t.return,p)}break;case 22:case 23:t.memoizedState===null&&Rr(t,e);break;default:Rr(t,e)}}function Cr(t,e){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){t:{var l=t,n=e;switch(l.tag){case 4:Gh(l,n);break t;case 22:l.memoizedState===null&&Cr(l,n);break t;default:Cr(l,n)}}t=t.sibling}}function Qh(t){var e=t.alternate;e!==null&&(t.alternate=null,Qh(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&ai(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,Ee=!1;function We(t,e,l){for(l=l.child;l!==null;)$h(t,e,l),l=l.sibling}function $h(t,e,l){if(Oe&&typeof Oe.onCommitFiberUnmount=="function")try{Oe.onCommitFiberUnmount($a,l)}catch{}switch(l.tag){case 26:jt||se(l,e),We(t,e,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&!jt&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:jt||se(l,e),Su(l);var n=Ut,a=Ee;fn(l.type)&&(Ut=l.stateNode,Ee=!1),We(t,e,l),Jm(l.stateNode,l.type,l.memoizedProps),Ut=n,Ee=a;break;case 5:jt||se(l,e),Su(l);case 6:if(l.tag===6&&Su(l),n=Ut,a=Ee,Ut=null,We(t,e,l),Ut=n,Ee=a,Ut!==null)if(Ee)try{(Ut.nodeType===9?Ut.body:Ut.nodeName==="HTML"?Ut.ownerDocument.body:Ut).removeChild(l.stateNode),yt=!0}catch(u){_t(l,e,u)}else try{Ut.removeChild(l.stateNode),yt=!0}catch(u){_t(l,e,u)}break;case 18:Ut!==null&&(Ee?(t=Ut,wm(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),La(t)):wm(Ut,l.stateNode));break;case 4:n=Ut,a=Ee,Ut=l.stateNode.containerInfo,Ee=!0,We(t,e,l),Ut=n,Ee=a;break;case 0:case 11:case 14:case 15:nn(2,l,e),jt||nn(4,l,e),We(t,e,l);break;case 1:jt||(se(l,e),n=l.stateNode,typeof n.componentWillUnmount=="function"&&Ah(l,e,n)),We(t,e,l);break;case 21:We(t,e,l);break;case 22:jt=(n=jt)||l.memoizedState!==null,We(t,e,l),jt=n;break;case 30:se(l,e),We(t,e,l);break;case 7:jt||se(l,e),We(t,e,l);break;default:We(t,e,l)}}function Xh(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{La(t)}catch(l){_t(e,e.return,l)}}}function Zh(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){_t(e,e.return,l)}}function Op(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new Yh),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new Yh),e;default:throw Error(f(435,t.tag))}}function ts(t,e){var l=Op(t);e.forEach(function(n){if(!l.has(n)){l.add(n);var a=kp.bind(null,t,n);n.then(a,a)}})}function pe(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,p=h;t:for(;p!==null;){switch(p.tag){case 27:if(fn(p.type)){Ut=p.stateNode,Ee=!1;break t}break;case 5:Ut=p.stateNode,Ee=!1;break t;case 3:case 4:Ut=p.stateNode.containerInfo,Ee=!0;break t}p=p.return}if(Ut===null)throw Error(f(160));$h(c,h,u),Ut=null,Ee=!1,c=u.alternate,c!==null&&(c.return=null),u.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)Kh(e,t,l),e=e.sibling}var Pe=null;function Kh(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}pe(e,t,l),ye(t),a&4&&(nn(3,t,t.return),bu(3,t),nn(5,t,t.return));break;case 1:pe(e,t,l),ye(t),a&512&&(jt||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=Pe,pe(e,t,l),ye(t),a&512&&(jt||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=Am(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[Ka]||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=e0("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=e0("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||vo(u,t.type,t.stateNode);else t.stateNode=t0(u,l,t.memoizedProps);else a!==l?(a===null?(e=n.stateNode,e===null||jt||e.parentNode.removeChild(e)):a.count--,l===null?te||vo(u,t.type,t.stateNode):t0(u,l,t.memoizedProps)):l===null&&t.stateNode!==null&&xr(t,t.memoizedProps,n.memoizedProps);break;case 27:pe(e,t,l),ye(t),a&512&&(jt||n===null||se(n,n.return)),n!==null&&a&4&&xr(t,t.memoizedProps,n.memoizedProps);break;case 5:if(u=hl,hl=!1,pe(e,t,l),hl=u,ye(t),a&512&&(jt||n===null||se(n,n.return)),t.flags&32){e=t.stateNode;try{ea(e,""),yt=!0}catch(C){_t(t,t.return,C)}}a&4&&t.stateNode!=null&&(e=t.memoizedProps,xr(t,e,n!==null?n.memoizedProps:e)),a&1024&&(zr=!0);break;case 6:if(pe(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){_t(t,t.return,C)}}break;case 3:if(yt=!1,vs=null,u=Pe,Pe=Au(e.containerInfo),pe(e,t,l),Pe=u,ye(t),a&4&&n!==null&&n.memoizedState.isDehydrated)try{La(e.containerInfo)}catch(C){_t(t,t.return,C)}zr&&(zr=!1,Jh(t)),yt=!1;break;case 4:a=hl,hl=te,n=vf(),u=Pe,Pe=Au(t.stateNode.containerInfo),pe(e,t,l),ye(t),Pe=u,yt&&ju&&(Wi=!0),yt=n,hl=a;break;case 12:pe(e,t,l),ye(t);break;case 31:pe(e,t,l),ye(t),a&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,ts(t,e)));break;case 13:pe(e,t,l),ye(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ns=ze()),a&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,ts(t,e)));break;case 22:u=t.memoizedState!==null,c=n!==null&&n.memoizedState!==null;var h=te,p=jt,T=hl;te=h||u,hl=T||u,jt=p||c,pe(e,t,l),jt=p,hl=T,te=h,ye(t),a&8192&&(e=t.stateNode,e._visibility=u?e._visibility&-2:e._visibility|1,!u||n===null||c||te||jt||(e=c||jt,l=te,n=jt,te=u||te,jt=e,an(t,2),te=l,jt=n),!u&&hl||Rr(t,u)),a&4&&(e=t.updateQueue,e!==null&&(l=e.retryQueue,l!==null&&(e.retryQueue=null,ts(t,l))));break;case 19:pe(e,t,l),ye(t),a&4&&(e=t.updateQueue,e!==null&&(t.updateQueue=null,ts(t,e)));break;case 30:a&512&&(jt||n===null||se(n,n.return)),a=vf(),u=ju,c=(l&335544064)===l,h=t.memoizedProps,ju=c&&_l(h.default,h.update)!=="none",pe(e,t,l),ye(t),c&&n!==null&&yt&&(t.flags|=4),ju=u,yt=a;break;case 21:break;case 7:a&512&&(jt||n===null||se(n,n.return)),n&&n.stateNode!==null&&(n.stateNode._fragmentFiber=t);default:pe(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(Mh(n)){l=n;break}n=n.return}n=null;for(var a=t.return;a!==null;){if(pr(a)){var u=a.stateNode;n===null?n=[u]:n.push(u)}if(gr(a))break;a=a.return}var c=n;if(l==null)throw Error(f(160));switch(l.tag){case 27:var h=l.stateNode,p=br(t);Ki(t,p,h,c);break;case 5:var T=l.stateNode;l.flags&32&&(ea(T,""),l.flags&=-33);var C=br(t);Ki(t,C,T,c);break;case 3:case 4:var M=l.stateNode.containerInfo,S=br(t);Sr(t,S,M,c);break;default:throw Error(f(161))}}catch(N){_t(t,t.return,N)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Jh(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;Jh(e),e.tag===5&&e.flags&1024&&(e=e.stateNode,Ba=!0,e.reset(),Ba=!1),t=t.sibling}}function ba(t,e){if(e.subtreeFlags&9270)for(e=e.child;e!==null;)Ih(e,t),e=e.sibling;else kh(e)}function Ih(t,e){var l=t.alternate;if(l===null)jr(t,!1);else switch(t.tag){case 3:if(Or=ml=!1,Hh(),ba(e,t),!ml&&!Wi){if(t=fl,t!==null)for(var n=0;n<t.length;n+=3){l=t[n];var a=t[n+1];Bm(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"})),Or=!0}fl=null;break;case 5:ba(e,t);break;case 4:n=ml,ml=!1,ba(e,t),ml&&(Wi=!0),ml=n;break;case 22:t.memoizedState===null&&(l.memoizedState!==null?jr(t,!1):ba(e,t));break;case 30:n=ml,a=Hh(),ml=!1,ba(e,t),ml&&(t.flags|=4);var u=t.memoizedProps,c=t.stateNode;e=Tl(u,c),c=Tl(l.memoizedProps,c);var h=_l(u.default,u.update);h==="none"?e=!1:(u=l.memoizedState,l.memoizedState=null,l=t.child,je=0,e=Nr(t,l,e,c,h,u,!0),je!==(u===null?0:u.length)&&(t.flags|=32)),(t.flags&4)!==0&&e?(za(t,t.memoizedProps.onUpdate),fl=a):a!==null&&(a.push.apply(a,fl),fl=a),ml=(t.flags&32)!==0?!0:n;break;default:ba(e,t)}}function vl(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)Vh(t,e.alternate,e),e=e.sibling}function an(t,e){for(t=t.child;t!==null;){var l=t,n=e;switch(l.tag){case 0:case 11:case 14:case 15:nn(4,l,l.return),an(l,n);break;case 1:se(l,l.return);var a=l.stateNode;typeof a.componentWillUnmount=="function"&&Ah(l,l.return,a),an(l,n);break;case 27:(n&2)!==0&&Jm(l.stateNode,l.type,l.memoizedProps);case 5:se(l,l.return),l.tag!==5&&l.tag!==27||Su(l),an(l,n);break;case 6:Su(l);break;case 26:se(l,l.return),a=l.stateNode,l.memoizedState!==null||a===null||jt||a.parentNode.removeChild(a),an(l,n);break;case 22:l.memoizedState===null&&an(l,n);break;case 30:se(l,l.return),an(l,n);break;case 7:se(l,l.return);default:an(l,n)}t=t.sibling}}function tl(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:tl(a,u,l),bu(4,u);break;case 1:if(tl(a,u,l),n=u,a=n.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(C){_t(n,n.return,C)}if(n=u,a=n.updateQueue,a!==null){var p=n.stateNode;try{var T=a.shared.hiddenCallbacks;if(T!==null)for(a.shared.hiddenCallbacks=null,a=0;a<T.length;a++)yd(T[a],p)}catch(C){_t(n,n.return,C)}}h&&c&64&&Ch(u),ol(u,u.return);break;case 27:(l&2)!==0&&wh(u);case 5:u.tag!==5&&u.tag!==27||Dh(u),tl(a,u,l),h&&n===null&&c&4&&yr(u),ol(u,u.return);break;case 6:Dh(u);break;case 26:p=u.stateNode,u.memoizedState!==null||p===null||te||vo(Au(p.ownerDocument),u.type,p),tl(a,u,l),h&&n===null&&c&4&&yr(u),ol(u,u.return);break;case 12:tl(a,u,l);break;case 31:tl(a,u,l),h&&c&4&&Xh(a,u);break;case 13:tl(a,u,l),h&&c&4&&Zh(a,u);break;case 22:u.memoizedState===null&&tl(a,u,l),ol(u,u.return);break;case 30:tl(a,u,l),ol(u,u.return);break;case 7:ol(u,u.return);default:tl(a,u,l)}e=e.sibling}}function Ar(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&&su(l))}function Dr(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&su(t))}function Ze(t,e,l,n){var a=(l&335544064)===l;if(e.subtreeFlags&(a?10262:10256))for(e=e.child;e!==null;)Fh(t,e,l,n),e=e.sibling;else a&&qh(e)}function Fh(t,e,l,n){var a=(l&335544064)===l;a&&e.alternate===null&&e.return!==null&&e.return.alternate!==null&&Fi(e);var u=e.flags;switch(e.tag){case 0:case 11:case 15:Ze(t,e,l,n),u&2048&&bu(9,e);break;case 1:Ze(t,e,l,n);break;case 3:Ze(t,e,l,n),a&&Or&&(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&&su(u)));break;case 12:if(u&2048){Ze(t,e,l,n),u=e.stateNode;try{var c=e.memoizedProps,h=c.id,p=c.onPostCommit;typeof p=="function"&&p(h,e.alternate===null?"mount":"update",u.passiveEffectDuration,-0)}catch(T){_t(e,e.return,T)}}else Ze(t,e,l,n);break;case 31:Ze(t,e,l,n);break;case 13:Ze(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&&Fi(h),c._visibility&2?Ze(t,e,l,n):Eu(t,e)):(a&&h!==null&&h.memoizedState!==null&&Fi(e),c._visibility&2?Ze(t,e,l,n):(c._visibility|=2,Sa(t,e,l,n,(e.subtreeFlags&10256)!==0||!1))),u&2048&&Ar(h,e);break;case 24:Ze(t,e,l,n),u&2048&&Dr(e.alternate,e);break;case 30:a&&(u=e.alternate,u!==null&&(dl(u.child,!0),dl(e.child,!0))),Ze(t,e,l,n);break;default:Ze(t,e,l,n)}}function Sa(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,p=n,T=c.flags;switch(c.tag){case 0:case 11:case 15:Sa(u,c,h,p,a),bu(8,c);break;case 23:break;case 22:var C=c.stateNode;c.memoizedState!==null?C._visibility&2?Sa(u,c,h,p,a):Eu(u,c):(C._visibility|=2,Sa(u,c,h,p,a)),a&&T&2048&&Ar(c.alternate,c);break;case 24:Sa(u,c,h,p,a),a&&T&2048&&Dr(c.alternate,c);break;default:Sa(u,c,h,p,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&&Ar(n.alternate,n);break;case 24:Eu(l,n),a&2048&&Dr(n.alternate,n);break;default:Eu(l,n)}e=e.sibling}}var kn=8192;function Yn(t,e,l){if(t.subtreeFlags&kn)for(t=t.child;t!==null;)Wh(t,e,l),t=t.sibling}function Wh(t,e,l){switch(t.tag){case 26:Yn(t,e,l),t.flags&kn&&(t.memoizedState!==null?wy(l,Pe,t.memoizedState,t.memoizedProps):(t=t.stateNode,(e&335544128)===e&&u0(l,t)));break;case 5:Yn(t,e,l),t.flags&kn&&(t=t.stateNode,(e&335544128)===e&&u0(l,t));break;case 3:case 4:var n=Pe;Pe=Au(t.stateNode.containerInfo),Yn(t,e,l),Pe=n;break;case 22:t.memoizedState===null&&(n=t.alternate,n!==null&&n.memoizedState!==null?(n=kn,kn=16777216,Yn(t,e,l),kn=n):Yn(t,e,l));break;case 30:if((t.flags&kn)!==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)}Yn(t,e,l);break;default:Yn(t,e,l)}}function Ph(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 Tu(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,em(n,t)}Ph(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)tm(t),t=t.sibling}function tm(t){switch(t.tag){case 0:case 11:case 15:Tu(t),t.flags&2048&&nn(9,t,t.return);break;case 3:Tu(t);break;case 12:Tu(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,es(t)):Tu(t);break;default:Tu(t)}}function es(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,em(n,t)}Ph(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:nn(8,e,e.return),es(e);break;case 22:l=e.stateNode,l._visibility&2&&(l._visibility&=-3,es(e));break;default:es(e)}t=t.sibling}}function em(t,e){for(;ee!==null;){var l=ee;switch(l.tag){case 0:case 11:case 15:nn(8,l,e);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var n=l.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:su(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(Qh(n),n===l){ee=null;break t}if(a!==null){a.return=u,ee=a;break t}ee=u}}}var Rp={getCacheForType:function(t){var e=ae(Qt),l=e.data.get(t);return l===void 0&&(l=t(),e.data.set(t,l)),l},cacheSignal:function(){return ae(Qt).controller.signal}},Cp=typeof WeakMap=="function"?WeakMap:Map,bt=0,Ct=null,ot=null,dt=0,Tt=0,we=null,un=!1,ja=!1,Mr=!1,wl=0,Vt=0,sn=0,Vn=0,ls=0,Ue=0,Ea=0,_u=null,Te=null,wr=!1,ns=0,lm=0,as=1/0,us=null,cn=null,Bt=0,el=null,Gn=null,gl=0,Ur=0,Hr=null,nm=null,Ta=null,_a=null,Na=null,Nu=0,is=null;function He(){return(bt&2)!==0&&dt!==0?dt&-dt:Z.T!==null?Xr():uf()}function am(){if(Ue===0)if((dt&536870912)===0||ct){var t=ti;ti<<=1,(ti&3932160)===0&&(ti=262144),Ue=t}else Ue=536870912;return t=ue.current,t!==null&&(t.flags|=32),Ue}function za(t,e){if(e!=null){var l=t.stateNode,n=l.ref;n===null&&(n=l.ref=Lm(Tl(t.memoizedProps,l))),_a===null&&(_a=[]),_a.push(e.bind(null,n))}}function _e(t,e,l){(t===Ct&&(Tt===2||Tt===9)||t.cancelPendingCommit!==null)&&(Oa(t,0),rn(t,dt,Ue,!1)),Za(t,l),((bt&2)===0||t!==Ct)&&(t===Ct&&((bt&2)===0&&(Vn|=l),Vt===4&&rn(t,dt,Ue,!1)),pl(t))}function um(t,e,l){if((bt&6)!==0)throw Error(f(327));var n=!l&&(e&127)===0&&(e&t.expiredLanes)===0||Xa(t,e),a=n?Mp(t,e):Lr(t,e,!0),u=n;do{if(a===0){ja&&!n&&rn(t,e,0,!1);break}else{if(l=t.current.alternate,u&&!Ap(l)){a=Lr(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=_u;var p=h.current.memoizedState.isDehydrated;if(p&&(Oa(h,c).flags|=256),c=Lr(h,c,!1),c!==2&&c!==6){if(Mr&&!p){h.errorRecoveryDisabledLanes|=u,Vn|=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){Oa(t,0),rn(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:rn(n,e,Ue,!un);break t;case 2:Te=null;break;case 3:case 5:break;default:throw Error(f(329))}if((e&62914560)===e&&(a=ns+300-ze(),10<a)){if(rn(n,e,Ue,!un),li(n,0,!0)!==0)break t;gl=e,n.timeoutHandle=no(im.bind(null,n,l,Te,us,wr,e,Ue,Vn,Ea,un,u,"Throttled",-0,0),a);break t}im(n,l,Te,us,wr,e,Ue,Vn,Ea,un,u,null,-0,0)}}break}while(!0);pl(t)}function im(t,e,l,n,a,u,c,h,p,T,C,M,S,N){t.timeoutHandle=-1;var k=e.subtreeFlags,Q=(u&335544064)===u;if(M=null,(Q||k&8192||(k&16785408)===16785408)&&(M={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:sl},Me=null,Wh(e,u,M),Q&&(k=M,Q=t.containerInfo,Q=(Q.nodeType===9?Q:Q.ownerDocument).__reactViewTransition,Q!=null&&(k.count++,k.waitingForViewTransition=!0,k=wu.bind(k),Q.finished.then(k,k))),k=(u&62914560)===u?ns-ze():(u&4194048)===u?lm-ze():0,k=Uy(M,k),k!==null)){gl=u,t.cancelPendingCommit=k(mm.bind(null,t,e,u,l,n,a,c,h,p,T,C,M,null,S,N)),rn(t,u,c,!T);return}mm(t,e,u,l,n,a,c,h,p,T,C,M)}function Ap(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 rn(t,e,l,n){e=tf(t,e),e&=~ls,e&=~Vn,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&&lf(t,l,e)}function ss(){return(bt&6)===0?(zu(0),!1):!0}function Br(){if(ot!==null){if(Tt===0)var t=ot.return;else t=ot,Ol=Cn=null,$c(t),ma=null,ou=0,t=ot;for(;t!==null;)Rh(t.alternate,t),t=t.return;ot=null}}function Oa(t,e){var l=t.timeoutHandle;return l!==-1&&(t.timeoutHandle=-1,ey(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),gl=0,Br(),Ct=t,ot=l=Nl(t.current,null),dt=e,Tt=0,we=null,un=!1,ja=Xa(t,e),Mr=!1,Ea=Ue=ls=Vn=sn=Vt=0,Te=_u=null,wr=!1,wl=tf(t,e),vi(),l}function sm(t,e){it=null,Z.H=ki,e===ha||e===Ni?(e=md(),Tt=3):e===Dc?(e=md(),Tt=4):Tt=e===ir?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,we=e,ot===null&&(Vt=1,Yi(t,Ge(e,t.current)))}function cm(){var t=ue.current;return t===null?!0:(dt&4194048)===dt?me===null:(dt&62914560)===dt||(dt&536870912)!==0?t===me:!1}function rm(){var t=Z.H;return Z.H=ki,t===null?ki:t}function om(){var t=Z.A;return Z.A=Rp,t}function cs(){Vt=4,un||(dt&4194048)!==dt&&ue.current!==null||(ja=!0),(sn&134217727)===0&&(Vn&134217727)===0||Ct===null||rn(Ct,dt,Ue,!1)}function Lr(t,e,l){var n=bt;bt|=2;var a=rm(),u=om();(Ct!==t||dt!==e)&&(us=null,Oa(t,e)),e=!1;var c=Vt;t:do try{if(Tt!==0&&ot!==null){var h=ot,p=we;switch(Tt){case 8:Br(),c=6;break t;case 3:case 2:case 9:case 6:ue.current===null&&(e=!0);var T=Tt;if(Tt=0,we=null,Ra(t,h,p,T),l&&ja){c=0;break t}break;default:T=Tt,Tt=0,we=null,Ra(t,h,p,T)}}Dp(),c=Vt;break}catch(C){sm(t,C)}while(!0);return e&&t.shellSuspendCounter++,Ol=Cn=null,bt=n,Z.H=a,Z.A=u,ot===null&&(Ct=null,dt=0,vi()),c}function Dp(){for(;ot!==null;)fm(ot)}function Mp(t,e){var l=bt;bt|=2;var n=rm(),a=om();Ct!==t||dt!==e?(us=null,as=ze()+500,Oa(t,e)):ja=Xa(t,e);t:do try{if(Tt!==0&&ot!==null){e=ot;var u=we;e:switch(Tt){case 1:Tt=0,we=null,Ra(t,e,u,1);break;case 2:case 9:if(dd(u)){Tt=0,we=null,dm(e);break}e=function(){Tt!==2&&Tt!==9||Ct!==t||(Tt=7),pl(t)},u.then(e,e);break t;case 3:Tt=7;break t;case 4:Tt=5;break t;case 7:dd(u)?(Tt=0,we=null,dm(e)):(Tt=0,we=null,Ra(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?n0(c):h.stateNode.complete){Tt=0,we=null;var p=h.sibling;if(p!==null)ot=p;else{var T=h.return;T!==null?(ot=T,rs(T)):ot=null}break e}}Tt=0,we=null,Ra(t,e,u,5);break;case 6:Tt=0,we=null,Ra(t,e,u,6);break;case 8:Br(),Vt=6;break t;default:throw Error(f(462))}}wp();break}catch(C){sm(t,C)}while(!0);return Ol=Cn=null,Z.H=n,Z.A=a,bt=l,ot!==null?0:(Ct=null,dt=0,vi(),Vt)}function wp(){for(;ot!==null&&!Fv();)fm(ot)}function fm(t){var e=zh(t.alternate,t,wl);t.memoizedProps=t.pendingProps,e===null?rs(t):ot=e}function dm(t){var e=t,l=e.alternate;switch(e.tag){case 15:case 0:e=bh(l,e,e.pendingProps,e.type,void 0,dt);break;case 11:e=bh(l,e,e.pendingProps,e.type.render,e.ref,dt);break;case 5:$c(e);var n=e;n===Pt&&(ct?(Si(n),n.tag===5&&n.stateNode!=null&&(Dt=n.stateNode)):(Si(n),ct=!0));default:Rh(l,e),e=ot=ed(e,wl),e=zh(l,e,wl)}t.memoizedProps=t.pendingProps,e===null?rs(t):ot=e}function Ra(t,e,l,n){Ol=Cn=null,$c(e),ma=null,ou=0;var a=e.return;try{if(Sp(t,a,e,l,dt)){Vt=1,Yi(t,Ge(l,t.current)),ot=null;return}}catch(u){if(a!==null)throw ot=a,u;Vt=1,Yi(t,Ge(l,t.current)),ot=null;return}e.flags&32768?(ct||n===1?t=!0:ja||(dt&536870912)!==0?t=!1:(un=t=!0,(n===2||n===9||n===3||n===6)&&(n=ue.current,n!==null&&n.tag===13&&(n.flags|=16384))),hm(e,t)):rs(e)}function rs(t){var e=t;do{if((e.flags&32768)!==0){hm(e,un);return}t=e.return;var l=_p(e.alternate,e,wl);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 hm(t,e){do{var l=Np(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 mm(t,e,l,n,a,u,c,h,p,T,C,M){t.cancelPendingCommit=null;do os();while(Bt!==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),Gn=e,el=t,gl=l,Hr=a,nm=n,Up(t,e,l,c,h,p,M)}}function Up(t,e,l,n,a,u,c){var h=e.lanes|e.childLanes;if(Ur=h,h|=xc,sg(t,l,h,n,a,u),_a=null,(l&335544064)===l?(Na=rp(t),n=10262):(Na=null,n=10256),(e.subtreeFlags&n)!==0||(e.flags&n)!==0?(t.callbackNode=null,t.callbackPriority=0,Yp(Wu,function(){return Vr(),null})):(t.callbackNode=null,t.callbackPriority=0),Ji=!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{zp(t,e,l)}finally{bt=u,lt.p=a,Z.T=n}}Bt=1,Ji?Ta=sy(c,t.containerInfo,Na,qr,kr,Bp,Yr,Vr,Hp):(qr(),kr(),Yr())}function Hp(t){if(Bt!==0){var e=el.onRecoverableError;e(t,{componentStack:null})}}function Bp(){Bt===3&&(Bt=0,Ih(Gn,el),Bt=4)}function qr(){if(Bt===1){Bt=0;var t=el,e=Gn,l=gl,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{ju=Wi=!1,Kh(e,t,l),l=to;var c=$f(t.containerInfo),h=l.focusedElem,p=l.selectionRange;if(c!==h&&h&&h.ownerDocument&&Qf(h.ownerDocument.documentElement,h)){if(p!==null&&mc(h)){var T=p.start,C=p.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,S=M&&M.defaultView||window;if(S.getSelection){var N=S.getSelection(),k=h.textContent.length,Q=Math.min(p.start,k),st=p.end===void 0?Q:Math.min(p.end,k);!N.extend&&Q>st&&(c=st,st=Q,Q=c);var j=Gf(h,Q),y=Gf(h,st);if(j&&y&&(N.rangeCount!==1||N.anchorNode!==j.node||N.anchorOffset!==j.offset||N.focusNode!==y.node||N.focusOffset!==y.offset)){var _=M.createRange();_.setStart(j.node,j.offset),N.removeAllRanges(),Q>st?(N.addRange(_),N.extend(y.node,y.offset)):(_.setEnd(y.node,y.offset),N.addRange(_))}}}}for(M=[],N=h;N=N.parentNode;)N.nodeType===1&&M.push({element:N,left:N.scrollLeft,top:N.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}}Ba=!!Pr,to=Pr=null}finally{bt=u,lt.p=a,Z.T=n}}t.current=e,Bt=2}}function kr(){if(Bt===2){Bt=0;var t=el,e=Gn,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{Vh(t,e.alternate,e)}finally{bt=a,lt.p=n,Z.T=l}}Bt=3}}function Yr(){if(Bt===4||Bt===3){Bt=0;var t=Ta;Ta=null,Wv();var e=el,l=Gn,n=gl,a=nm,u=(n&335544064)===n?10262:10256;if((l.subtreeFlags&u)!==0||(l.flags&u)!==0?Bt=5:(Bt=0,Gn=el=null,vm(e,e.pendingLanes)),u=e.pendingLanes,u===0&&(cn=null),Is(n),l=l.stateNode,Oe&&typeof Oe.onCommitFiberRoot=="function")try{Oe.onCommitFiberRoot($a,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 p=a[h];c(p.value,{componentStack:p.stack})}}finally{Z.T=l,lt.p=u}}if(a=_a,c=Na,Na=null,a!==null&&(_a=null,c===null&&(c=[]),t!==null))for(p=0;p<a.length;p++)l=(0,a[p])(c),l!==void 0&&t.finished.finally(l);(gl&3)!==0&&os(),pl(e),u=e.pendingLanes,(n&261930)!==0&&(u&42)!==0?e===is?Nu++:(Nu=0,is=e):(Nu=0,is=null),zu(0)}}function vm(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,su(e)))}function os(){return Ta!==null&&(Ta.skipTransition(),Ta=null),qr(),kr(),Yr(),Vr()}function Vr(){if(Bt!==5)return!1;var t=el,e=Ur;Ur=0;var l=Is(gl),n=Z.T,a=lt.p;try{lt.p=32>l?32:l,Z.T=null,l=Hr,Hr=null;var u=el,c=gl;if(Bt=0,Gn=el=null,gl=0,(bt&6)!==0)throw Error(f(331));var h=bt;if(bt|=4,tm(u.current),Fh(u,u.current,c,l),bt=h,zu(0,!1),Oe&&typeof Oe.onPostCommitFiberRoot=="function")try{Oe.onPostCommitFiberRoot($a,u)}catch{}return!0}finally{lt.p=a,Z.T=n,vm(t,e)}}function gm(t,e,l){e=Ge(l,e),e=ur(t.stateNode,e,2),t=Pl(t,e,2),t!==null&&(Za(t,2),pl(t))}function _t(t,e,l){if(t.tag===3)gm(t,t,l);else for(;e!==null;){if(e.tag===3){gm(e,t,l);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(cn===null||!cn.has(n))){t=Ge(l,t),l=dh(2),n=Pl(e,l,2),n!==null&&(hh(l,n,e,t),Za(n,2),pl(n));break}}e=e.return}}function Gr(t,e,l){var n=t.pingCache;if(n===null){n=t.pingCache=new Cp;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)||(Mr=!0,a.add(l),t=Lp.bind(null,t,e,l),e.then(t,t))}function Lp(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()-ns)&&(bt&2)===0?Oa(t,0):ls|=l,Ea===dt&&(Ea=0)),pl(t)}function pm(t,e){e===0&&(e=ef()),t=zn(t,e),t!==null&&(Za(t,e),pl(t))}function qp(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),pm(t,l)}function kp(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),pm(t,l)}function Yp(t,e){return Xs(t,e)}var Ca=null,Aa=null,Qr=!1,fs=!1,$r=!1,on=0;function pl(t){t!==Aa&&t.next===null&&(Aa===null?Ca=Aa=t:Aa=Aa.next=t),fs=!0,Qr||(Qr=!0,Gp())}function zu(t,e){if(!$r&&fs){$r=!0;do for(var l=!1,n=Ca;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,Sm(n,u))}else u=dt,u=li(n,n===Ct?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&3)===0||Xa(n,u)||(l=!0,Sm(n,u));n=n.next}while(l);$r=!1}}function Vp(){ym()}function ym(){fs=Qr=!1;var t=0;on!==0&&ty()&&(t=on);for(var e=ze(),l=null,n=Ca;n!==null;){var a=n.next,u=xm(n,e);u===0?(n.next=null,l===null?Ca=a:l.next=a,a===null&&(Aa=l)):(l=n,(t!==0||(u&3)!==0)&&(fs=!0)),n=a}Bt!==0&&Bt!==5||zu(t),on!==0&&(on=0)}function xm(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,p=a[c];p===-1?((h&l)===0||(h&n)!==0)&&(a[c]=ig(h,e)):p<=e&&(t.expiredLanes|=h),u&=~h}if(e=Ct,l=dt,l=li(t,t===e?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n=t.callbackNode,l===0||t===e&&(Tt===2||Tt===9)||t.cancelPendingCommit!==null)return n!==null&&n!==null&&Zs(n),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||Xa(t,l)){if(e=l&-l,e===t.callbackPriority)return e;switch(n!==null&&Zs(n),Is(l)){case 2:case 8:l=Wo;break;case 32:l=Wu;break;case 268435456:l=Po;break;default:l=Wu}return n=bm.bind(null,t),l=Xs(l,n),t.callbackPriority=e,t.callbackNode=l,e}return n!==null&&n!==null&&Zs(n),t.callbackPriority=2,t.callbackNode=null,2}function bm(t,e){if(Bt!==0&&Bt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(os()&&t.callbackNode!==l)return null;var n=dt;return n=li(t,t===Ct?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n===0?null:(um(t,n,e),xm(t,ze()),t.callbackNode!=null&&t.callbackNode===l?bm.bind(null,t):null)}function Sm(t,e){if(os())return null;um(t,e,!0)}function Gp(){ly(function(){(bt&6)!==0?Xs(Fo,Vp):ym()})}function Xr(){if(on===0){var t=Mn;t===0&&(t=Pu,Pu<<=1,(Pu&261888)===0&&(Pu=256)),on=t}return on}function jm(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:si(t)}function Qp(t,e,l,n,a){if(e==="submit"&&l&&l.stateNode===a){var u=jm((a[be]||null).action),c=n.submitter;c&&(e=(e=c[be]||null)?jm(e.formAction):c.getAttribute("formAction"),e!==null&&(u=e,c=null));var h=new fi("action","action",null,n,a);t.push({event:h,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(on!==0){var p=new FormData(a,c);tr(l,{pending:!0,data:p,method:a.method,action:u},null,p)}}else typeof u=="function"&&(h.preventDefault(),p=new FormData(a,c),tr(l,{pending:!0,data:p,method:a.method,action:u},u,p))},currentTarget:a}]})}}for(var Zr=0;Zr<yc.length;Zr++){var Kr=yc[Zr],$p=Kr.toLowerCase(),Xp=Kr[0].toUpperCase()+Kr.slice(1);Fe($p,"on"+Xp)}Fe(Kf,"onAnimationEnd"),Fe(Jf,"onAnimationIteration"),Fe(If,"onAnimationStart"),Fe("dblclick","onDoubleClick"),Fe("focusin","onFocus"),Fe("focusout","onBlur"),Fe(ep,"onTransitionRun"),Fe(lp,"onTransitionStart"),Fe(np,"onTransitionCancel"),Fe(Ff,"onTransitionEnd"),Pn("onMouseEnter",["mouseout","mouseover"]),Pn("onMouseLeave",["mouseout","mouseover"]),Pn("onPointerEnter",["pointerout","pointerover"]),Pn("onPointerLeave",["pointerout","pointerover"]),Tn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Tn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Tn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Tn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Tn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Tn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ou="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(" "),Zp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ou));function Em(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],p=h.instance,T=h.currentTarget;if(h=h.listener,p!==u&&a.isPropagationStopped())break t;u=h,a.currentTarget=T;try{u(a)}catch(C){mi(C)}a.currentTarget=null,u=p}else for(c=0;c<n.length;c++){if(h=n[c],p=h.instance,T=h.currentTarget,h=h.listener,p!==u&&a.isPropagationStopped())break t;u=h,a.currentTarget=T;try{u(a)}catch(C){mi(C)}a.currentTarget=null,u=p}}}}function ft(t,e){var l=e[cf];l===void 0&&(l=e[cf]=new Set);var n=t+"__bubble";l.has(n)||(Tm(e,t,2,!1),l.add(n))}function Jr(t,e,l){var n=0;e&&(n|=4),Tm(l,t,n,e)}var ds="_reactListening"+Math.random().toString(36).slice(2);function Ir(t){if(!t[ds]){t[ds]=!0,ff.forEach(function(l){l!=="selectionchange"&&(Zp.has(l)||Jr(l,!1,t),Jr(l,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[ds]||(e[ds]=!0,Jr("selectionchange",!1,e))}}function Tm(t,e,l,n){switch(h0(e)){case 2:var a=qy;break;case 8:a=ky;break;default:a=po}l=a.bind(null,e,l,t),a=void 0,!ac||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 Fr(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 p=c.tag;if((p===3||p===4)&&c.stateNode.containerInfo===a)return;c=c.return}for(;h!==null;){if(c=En(h),c===null)return;if(p=c.tag,p===5||p===6||p===26||p===27){n=u=c;continue t}h=h.parentNode}}n=n.return}Tf(function(){var T=u,C=lc(l),M=[];t:{var S=Wf.get(t);if(S!==void 0){var N=fi,k=t;switch(t){case"keypress":if(ri(l)===0)break t;case"keydown":case"keyup":N=Ag;break;case"focusin":k="focus",N=cc;break;case"focusout":k="blur",N=cc;break;case"beforeblur":case"afterblur":N=cc;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":N=zf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":N=xg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":N=Hg;break;case Kf:case Jf:case If:N=jg;break;case Ff:N=Lg;break;case"scroll":case"scrollend":N=pg;break;case"wheel":N=kg;break;case"copy":case"cut":case"paste":N=Tg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":N=Rf;break;case"submit":N=wg;break;case"toggle":case"beforetoggle":N=Vg}var Q=(e&4)!==0,st=!Q&&(t==="scroll"||t==="scrollend"),j=Q?S!==null?S+"Capture":null:S;Q=[];for(var y=T,_;y!==null;){var D=y;if(_=D.stateNode,D=D.tag,D!==5&&D!==26&&D!==27||_===null||j===null||(D=Ia(y,j),D!=null&&Q.push(Ru(y,D,_))),st)break;y=y.return}0<Q.length&&(S=new N(S,k,null,l,C),M.push({event:S,listeners:Q}))}}if((e&7)===0){t:{if(N=t==="mouseover"||t==="pointerover",S=t==="mouseout"||t==="pointerout",N&&l!==ec&&(k=l.relatedTarget||l.fromElement)&&(En(k)||k[In]))break t;(S||N)&&(k=C.window===C?C:(N=C.ownerDocument)?N.defaultView||N.parentWindow:window,S?(N=l.relatedTarget||l.toElement,S=T,N=N?En(N):null,N!==null&&(st=m(N),Q=N.tag,N!==st||Q!==5&&Q!==27&&Q!==6)&&(N=null)):(S=null,N=T),S!==N&&(Q=zf,D="onMouseLeave",j="onMouseEnter",y="mouse",(t==="pointerout"||t==="pointerover")&&(Q=Rf,D="onPointerLeave",j="onPointerEnter",y="pointer"),st=S==null?k:Ja(S),_=N==null?k:Ja(N),k=new Q(D,y+"leave",S,l,C),k.target=st,k.relatedTarget=_,D=null,En(C)===T&&(Q=new Q(j,y+"enter",N,l,C),Q.target=_,Q.relatedTarget=st,D=Q),st=D,Q=S&&N?Et(S,N,Kp):null,S!==null&&_m(M,k,S,Q,!1),N!==null&&st!==null&&_m(M,st,N,Q,!0)))}t:{if(S=T?Ja(T):window,N=S.nodeName&&S.nodeName.toLowerCase(),N==="select"||N==="input"&&S.type==="file")var V=Bf;else if(Uf(S))if(Lf)V=Wg;else{V=Ig;var ht=Jg}else N=S.nodeName,!N||N.toLowerCase()!=="input"||S.type!=="checkbox"&&S.type!=="radio"?T&&tc(T.elementType)&&(V=Bf):V=Fg;if(V&&(V=V(t,T))){Hf(M,V,l,C);break t}ht&&ht(t,S,T)}switch(ht=T?Ja(T):window,t){case"focusin":(Uf(ht)||ht.contentEditable==="true")&&(ua=ht,vc=T,au=null);break;case"focusout":au=vc=ua=null;break;case"mousedown":gc=!0;break;case"contextmenu":case"mouseup":case"dragend":gc=!1,Xf(M,l,C);break;case"selectionchange":if(tp)break;case"keydown":case"keyup":Xf(M,l,C)}var J;if(oc)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 aa?Mf(t,l)&&(W="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(W="onCompositionStart");W&&(Cf&&l.locale!=="ko"&&(aa||W!=="onCompositionStart"?W==="onCompositionEnd"&&aa&&(J=_f()):(Ql=C,uc="value"in Ql?Ql.value:Ql.textContent,aa=!0)),ht=hs(T,W),0<ht.length&&(W=new Of(W,t,null,l,C),M.push({event:W,listeners:ht}),J?W.data=J:(J=wf(l),J!==null&&(W.data=J)))),(J=Qg?$g(t,l):Xg(t,l))&&(W=hs(T,"onBeforeInput"),0<W.length&&(ht=new Of("onBeforeInput","beforeinput",null,l,C),M.push({event:ht,listeners:W}),ht.data=J)),Qp(M,t,T,l,C)}Em(M,e)})}function Ru(t,e,l){return{instance:t,listener:e,currentTarget:l}}function hs(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=Ia(t,l),a!=null&&n.unshift(Ru(t,a,u)),a=Ia(t,e),a!=null&&n.push(Ru(t,a,u))),t.tag===3)return n;t=t.return}return[]}function Kp(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function _m(t,e,l,n,a){for(var u=e._reactName,c=[];l!==null&&l!==n;){var h=l,p=h.alternate,T=h.stateNode;if(h=h.tag,p!==null&&p===n)break;h!==5&&h!==26&&h!==27||T===null||(p=T,a?(T=Ia(l,u),T!=null&&c.unshift(Ru(l,T,p))):a||(T=Ia(l,u),T!=null&&c.push(Ru(l,T,p)))),l=l.return}c.length!==0&&t.push({event:e,listeners:c})}var Jp=/\r\n?/g,Ip=/\u0000|\uFFFD/g;function Nm(t){return(typeof t=="string"?t:""+t).replace(Jp,`
49
- `).replace(Ip,"")}function zm(t,e){return e=Nm(e),Nm(t)===e}function Nt(t,e,l,n,a,u){switch(l){case"children":if(typeof n=="string")e==="body"||e==="textarea"&&n===""||ea(t,n);else if(typeof n=="number"||typeof n=="bigint")e!=="body"&&ea(t,""+n);else return;break;case"className":ii(t,"class",n);break;case"tabIndex":ii(t,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":ii(t,l,n);break;case"style":jf(t,n,u);return;case"data":if(e!=="object"){ii(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=si(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"&&Nt(t,e,"name",a.name,a,null),Nt(t,e,"formEncType",a.formEncType,a,null),Nt(t,e,"formMethod",a.formMethod,a,null),Nt(t,e,"formTarget",a.formTarget,a,null)):(Nt(t,e,"encType",a.encType,a,null),Nt(t,e,"method",a.method,a,null),Nt(t,e,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(l);break}n=si(n),t.setAttribute(l,n);break;case"onClick":n!=null&&(t.onclick=sl);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=si(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),ui(t,"popover",n);break;case"xlinkActuate":jl(t,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":jl(t,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":jl(t,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":jl(t,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":jl(t,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":jl(t,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":jl(t,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":jl(t,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":jl(t,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":ui(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=vg.get(l)||l,ui(t,l,n);else return}yt=!0}function Wr(t,e,l,n,a,u){switch(l){case"style":jf(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")ea(t,n);else if(typeof n=="number"||typeof n=="bigint")ea(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=sl);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!df.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,""):ui(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:Nt(t,e,u,c,l,null)}}a&&Nt(t,e,"srcSet",l.srcSet,l,null),n&&Nt(t,e,"src",l.src,l,null);return;case"input":ft("invalid",t);var h=u=c=a=null,p=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":p=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:Nt(t,e,n,C,l,null)}}yf(t,u,h,p,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:Nt(t,e,a,h,l,null)}e=u,l=c,t.multiple=!!n,e!=null?ta(t,!!n,e,!1):l!=null&&ta(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:Nt(t,e,c,h,l,null)}bf(t,n,a,u);return;case"option":for(p in l)if(l.hasOwnProperty(p)&&(n=l[p],n!=null))switch(p){case"selected":t.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:Nt(t,e,p,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<Ou.length;n++)ft(Ou[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:Nt(t,e,T,n,l,null)}return;default:if(tc(e)){for(C in l)l.hasOwnProperty(C)&&(n=l[C],n!==void 0&&Wr(t,e,C,n,l,void 0));return}}for(h in l)l.hasOwnProperty(h)&&(n=l[h],n!=null&&Nt(t,e,h,n,l,null))}var Fp={};function Wp(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,p=null,T=null,C=null;for(N in l){var M=l[N];if(l.hasOwnProperty(N)&&M!=null)switch(N){case"checked":break;case"value":break;case"defaultValue":p=M;default:n.hasOwnProperty(N)||Nt(t,e,N,null,n,M)}}for(var S in n){var N=n[S];if(M=l[S],n.hasOwnProperty(S)&&(N!=null||M!=null))switch(S){case"type":N!==M&&(yt=!0),u=N;break;case"name":N!==M&&(yt=!0),a=N;break;case"checked":N!==M&&(yt=!0),T=N;break;case"defaultChecked":N!==M&&(yt=!0),C=N;break;case"value":N!==M&&(yt=!0),c=N;break;case"defaultValue":N!==M&&(yt=!0),h=N;break;case"children":case"dangerouslySetInnerHTML":if(N!=null)throw Error(f(137,e));break;default:N!==M&&Nt(t,e,S,N,n,M)}}Ws(t,c,h,p,T,C,u,a);return;case"select":N=c=h=S=null;for(u in l)if(p=l[u],l.hasOwnProperty(u)&&p!=null)switch(u){case"value":break;case"multiple":N=p;default:n.hasOwnProperty(u)||Nt(t,e,u,null,n,p)}for(a in n)if(u=n[a],p=l[a],n.hasOwnProperty(a)&&(u!=null||p!=null))switch(a){case"value":u!==p&&(yt=!0),S=u;break;case"defaultValue":u!==p&&(yt=!0),h=u;break;case"multiple":u!==p&&(yt=!0),c=u;default:u!==p&&Nt(t,e,a,u,n,p)}e=h,l=c,n=N,S!=null?ta(t,!!l,S,!1):!!n!=!!l&&(e!=null?ta(t,!!l,e,!0):ta(t,!!l,l?[]:"",!1));return;case"textarea":N=S=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:Nt(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),S=a;break;case"defaultValue":a!==u&&(yt=!0),N=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(f(91));break;default:a!==u&&Nt(t,e,c,a,n,u)}xf(t,S,N);return;case"option":for(var k in l)if(S=l[k],l.hasOwnProperty(k)&&S!=null&&!n.hasOwnProperty(k))switch(k){case"selected":t.selected=!1;break;default:Nt(t,e,k,null,n,S)}for(p in n)if(S=n[p],N=l[p],n.hasOwnProperty(p)&&S!==N&&(S!=null||N!=null))switch(p){case"selected":S!==N&&(yt=!0),t.selected=S&&typeof S!="function"&&typeof S!="symbol";break;default:Nt(t,e,p,S,n,N)}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 Q in l)S=l[Q],l.hasOwnProperty(Q)&&S!=null&&!n.hasOwnProperty(Q)&&Nt(t,e,Q,null,n,S);for(T in n)if(S=n[T],N=l[T],n.hasOwnProperty(T)&&S!==N&&(S!=null||N!=null))switch(T){case"children":case"dangerouslySetInnerHTML":if(S!=null)throw Error(f(137,e));break;default:Nt(t,e,T,S,n,N)}return;default:if(tc(e)){for(var st in l)S=l[st],l.hasOwnProperty(st)&&S!==void 0&&!n.hasOwnProperty(st)&&Wr(t,e,st,void 0,n,S);for(C in n)S=n[C],N=l[C],!n.hasOwnProperty(C)||S===N||S===void 0&&N===void 0||Wr(t,e,C,S,n,N);return}}for(var j in l)S=l[j],l.hasOwnProperty(j)&&S!=null&&!n.hasOwnProperty(j)&&Nt(t,e,j,null,n,S);for(M in n)S=n[M],N=l[M],!n.hasOwnProperty(M)||S===N||S==null&&N==null||Nt(t,e,M,S,n,N)}function Om(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Pp(){if(typeof performance.getEntriesByType=="function"){for(var 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&&Om(c)){for(c=0,h=a.responseEnd,n+=1;n<l.length;n++){var p=l[n],T=p.startTime;if(T>h)break;var C=p.transferSize,M=p.initiatorType;C&&Om(M)&&(p=p.responseEnd,c+=C*(p<h?1:(h-T)/(p-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 Pr=null,to=null;function Cu(t){return t.nodeType===9?t:t.ownerDocument}function Rm(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 Cm(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 Am(t,e,l,n){return l=Cu(l).createElement(t),l[ne]=n,l[be]=e,ce(l,t,e),Wt(l),l}function eo(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 lo=null;function ty(){var t=window.event;return t&&t.type==="popstate"?t===lo?!1:(lo=t,!0):(lo=null,!1)}var no=typeof setTimeout=="function"?setTimeout:void 0,ey=typeof clearTimeout=="function"?clearTimeout:void 0,Dm=typeof Promise=="function"?Promise:void 0,Mm=typeof requestAnimationFrame=="function"?requestAnimationFrame:no,ly=typeof queueMicrotask=="function"?queueMicrotask:typeof Dm<"u"?function(t){return Dm.resolve(null).then(t).catch(ny)}:no;function ny(t){setTimeout(function(){throw t})}function fn(t){return t==="head"}function wm(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")fo(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,fo(l);for(var u=l.firstChild;u;){var c=u.nextSibling,h=u.nodeName;u[Ka]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&u.rel.toLowerCase()==="stylesheet"||l.removeChild(u),u=c}}else l==="body"&&fo(t.ownerDocument.body);l=a}while(l);La(e)}function Um(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 Hm(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 Bm(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 ay(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 ao(t){var e=t.getBoundingClientRect(),l=getComputedStyle(t);return ay(e,l,t)}function uy(t){return t.documentElement.clientHeight}function iy(t){this.addEventListener("load",t),this.addEventListener("error",t)}function sy(t,e,l,n,a,u,c,h,p){var T=e.nodeType===9?e:e.ownerDocument;try{var C=T.startViewTransition({update:function(){var S=T.defaultView,N=S.navigation&&S.navigation.transition,k=T.fonts.status;n();var Q=[];if(k==="loaded"&&(uy(T),T.fonts.status==="loading"&&Q.push(T.fonts.ready)),k=Q.length,t!==null)for(var st=t.suspenseyImages,j=0,y=0;y<st.length;y++){var _=st[y];if(!_.complete){var D=_.getBoundingClientRect();if(0<D.bottom&&0<D.right&&D.top<S.innerHeight&&D.left<S.innerWidth){if(j+=a0(_),j>gs){Q.length=k;break}_=new Promise(iy.bind(_)),Q.push(_)}}}if(0<Q.length)return S=Promise.race([Promise.all(Q),new Promise(function(V){return setTimeout(V,500)})]).then(a,a),(N?Promise.allSettled([N.finished,S]):S).then(u,u);if(a(),N)return N.finished.then(u,u);u()},types:l});T.__reactViewTransition=C;var M=[];return C.ready.then(function(){for(var S=T.documentElement.getAnimations({subtree:!0}),N=0;N<S.length;N++){var k=S[N],Q=k.effect,st=Q.pseudoElement;if(st!=null&&st.startsWith("::view-transition")){M.push(k),k=Q.getKeyframes();for(var j=st=void 0,y=!0,_=0;_<k.length;_++){var D=k[_],V=D.width;if(st===void 0)st=V;else if(st!==V){y=!1;break}if(V=D.height,j===void 0)j=V;else if(j!==V){y=!1;break}delete D.width,delete D.height,D.transform==="none"&&delete D.transform}y&&st!==void 0&&j!==void 0&&(Q.setKeyframes(k),y=getComputedStyle(Q.target,Q.pseudoElement),y.width!==st||y.height!==j)&&(y=k[0],y.width=st,y.height=j,y=k[k.length-1],y.width=st,y.height=j,Q.setKeyframes(k))}}c()},function(S){T.__reactViewTransition===C&&(T.__reactViewTransition=null);try{if(typeof S=="object"&&S!==null)switch(S.name){case"InvalidStateError":(S.message==="View transition was skipped because document visibility state is hidden."||S.message==="Skipping view transition because document visibility state has become hidden."||S.message==="Skipping view transition because viewport size changed."||S.message==="Transition was aborted because of invalid state")&&(S=null)}S!==null&&p(S)}finally{n(),a(),c()}}),C.finished.finally(function(){for(var S=0;S<M.length;S++)M[S].cancel();T.__reactViewTransition===C&&(T.__reactViewTransition=null),h()}),C}catch{return n(),a(),c(),null}}function Qn(t,e){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+e+")"}Qn.prototype.animate=function(t,e){return e=typeof e=="number"?{duration:e}:ut({},e),e.pseudoElement=this._selector,this._scope.animate(t,e)},Qn.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},Qn.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Lm(t){return{name:t,group:new Qn("group",t),imagePair:new Qn("image-pair",t),old:new Qn("old",t),new:new Qn("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(km(u,t,e,l)===-1){var c=this,h=e;l!=null&&typeof l!="boolean"&&l.once===!0&&(h=function(p){c.removeEventListener(t,e,l),typeof e=="function"?e.call(this,p):e.handleEvent(p)}),n!==null&&(a=c.removeEventListener.bind(c,t,e,l),n.addEventListener("abort",a,{once:!0}),a=n.removeEventListener.bind(n,"abort",a)),n=Da(l),u.push({type:t,listener:e,optionsOrUseCapture:l,attachedListener:h,cleanup:a}),g(this._fragmentFiber.child,!1,cy,t,h,n)}this._eventListeners=u}};function cy(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=km(n,t,e,l),e!==-1)){var a=n[e];l=a.attachedListener;var u=a.cleanup;a=Da(a.optionsOrUseCapture),g(this._fragmentFiber.child,!1,ry,t,l,a),n.splice(e,1),u!==null&&u()}};function ry(t,e,l,n){return q(t).removeEventListener(e,l,n),!1}function Da(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function qm(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function km(t,e,l,n){if(t.length===0)return-1;n=qm(n);for(var a=0;a<t.length;a++){var u=t[a];if(u.type===e&&u.listener===l&&qm(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,Da(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,Da(u.optionsOrUseCapture));return e.removeChild(n),t}return e.dispatchEvent(t)},Be.prototype.focus=function(t){g(this._fragmentFiber.child,!0,Ym,t,void 0,void 0)};function Ym(t,e){return t.tag===6?!1:(t=q(t),Sy(t,e))}Be.prototype.focusLast=function(t){var e=[];g(this._fragmentFiber.child,!0,uo,e,void 0,void 0);for(var l=e.length-1;0<=l&&!Ym(e[l],t);l--);};function uo(t,e){return e.push(t),!1}Be.prototype.blur=function(){var t=A(this._fragmentFiber);t!==null&&(t=q(t),t=Cu(t).activeElement,t!==null&&g(this._fragmentFiber.child,!1,oy,t,void 0,void 0))};function oy(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),g(this._fragmentFiber.child,!1,fy,t,void 0,void 0)};function fy(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),g(this._fragmentFiber.child,!1,dy,t,void 0,void 0);for(var l=e=0;l<ll.length;l++){var n=ll[l];n.fragmentInstance===this&&n.observer===t?t.unobserve(n.instance):ll[e++]=n}ll.length=e}};function dy(t,e){return t.tag===6||(t=q(t),e.unobserve(t)),!1}var ll=[],io=!1;function hy(t,e,l){ll.push({fragmentInstance:t,observer:e,instance:l}),io||(io=!0,jy(function(){io=!1;var n=ll;ll=[];for(var a=0;a<n.length;a++){var u=n[a];u.observer.unobserve(u.instance)}}))}Be.prototype.getClientRects=function(){var t=[];return g(this._fragmentFiber.child,!1,my,t,void 0,void 0),t};function my(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=[];g(this._fragmentFiber.child,!1,uo,l,void 0,void 0);var n=q(e);if(l.length===0){if(l=n,L(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=L(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),p=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||p||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||vy(e,this._fragmentFiber,l[0],l[l.length-1],t)?e:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function vy(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=Et(l,u,K),e===null?e=!1:(g(e,!0,U,u,l),u=B,B=null,e=u!==null)),e):t&Node.DOCUMENT_POSITION_FOLLOWING?((e=!!u)&&!(e=u===n)&&(e=Et(n,u,K),e===null?e=!1:(g(e,!0,$,u,n),u=B,G=B=null,e=u!==null)),e):!1}function Vm(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=[];g(this._fragmentFiber.child,!1,uo,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),Vm(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),Vm(a,l)):q(a).scrollIntoView(t),n+=l?-1:1}};function gy(t,e){return t=q(t),Gm(t,e),!1}function Gm(t,e){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(e)}function Qm(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,Da(a.optionsOrUseCapture))}t.nodeType!==3&&(l=e._observers,l!==null&&l.forEach(function(u){for(var c=0,h=0;h<ll.length;h++){var p=ll[h];(p.fragmentInstance!==e||p.observer!==u||p.instance!==t)&&(ll[c++]=p)}ll.length=c,u.observe(t)}),Gm(t,e))}function py(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,Da(a.optionsOrUseCapture))}t.nodeType!==3&&(l=e._observers,l!==null&&l.forEach(function(u){typeof u.rootMargin=="string"?hy(e,u,t):u.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(e))}function so(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":so(l),ai(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function yy(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[Ka])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=Ke(t.nextSibling),t===null)break}return null}function xy(t,e,l){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Ke(t.nextSibling),t===null))return null;return t}function $m(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Ke(t.nextSibling),t===null))return null;return t}function co(t){return t.data==="$?"||t.data==="$~"}function ro(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function by(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 Ke(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 oo=null;function Xm(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(e===0)return Ke(t.nextSibling);e--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||e++}t=t.nextSibling}return null}function Zm(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 Sy(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 jy(t){Mm(function(){Mm(function(e){return t(e)})})}function Km(t,e,l){switch(e=Cu(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 Jm(t,e,l){for(var n in l){var a=l[n];l.hasOwnProperty(n)&&a!=null&&Nt(t,e,n,null,Fp,a)}l.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===sl&&(t.onclick=null),ai(t)}function fo(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);ai(t)}var Je=new Map,Im=new Set;function Au(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 Ul=lt.d;lt.d={f:Ey,r:Ty,D:_y,C:Ny,L:zy,m:Oy,X:Cy,S:Ry,M:Ay};function Ey(){var t=Ul.f(),e=ss();return t||e}function Ty(t){var e=Fn(t);e!==null&&e.tag===5&&e.type==="form"?Wd(e):Ul.r(t)}var Ma=typeof document>"u"?null:document;function Fm(t,e,l){var n=Ma;if(n&&typeof e=="string"&&e){var a=Ye(e);a='link[rel="'+t+'"][href="'+a+'"]',typeof l=="string"&&(a+='[crossorigin="'+l+'"]'),Im.has(a)||(Im.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 _y(t){Ul.D(t),Fm("dns-prefetch",t,null)}function Ny(t,e){Ul.C(t,e),Fm("preconnect",t,e)}function zy(t,e,l){Ul.L(t,e,l);var n=Ma;if(n&&t&&e){var a='link[rel="preload"][as="'+Ye(e)+'"]';e==="image"&&l&&l.imageSrcSet?(a+='[imagesrcset="'+Ye(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(a+='[imagesizes="'+Ye(l.imageSizes)+'"]')):a+='[href="'+Ye(t)+'"]';var u=a;switch(e){case"style":u=wa(t);break;case"script":u=Ua(t)}if(!(Je.has(u)||(t=ut({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),Je.set(u,t),n.querySelector(a)!==null||e==="style"&&n.querySelector(Du(u))||e==="script"&&n.querySelector(Mu(u))))){var c=n.createElement("link");ce(c,"link",t),e==="style"&&(c[ni]=!0,c.onload=c.onerror=function(){of(c)}),Wt(c),n.head.appendChild(c)}}}function Oy(t,e){Ul.m(t,e);var l=Ma;if(l&&t){var n=e&&typeof e.as=="string"?e.as:"script",a='link[rel="modulepreload"][as="'+Ye(n)+'"][href="'+Ye(t)+'"]',u=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ua(t)}if(!Je.has(u)&&(t=ut({rel:"modulepreload",href:t},e),Je.set(u,t),l.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Mu(u)))return}n=l.createElement("link"),ce(n,"link",t),Wt(n),l.head.appendChild(n)}}}function Ry(t,e,l){Ul.S(t,e,l);var n=Ma;if(n&&t){var a=Wn(n).hoistableStyles,u=wa(t);e=e||"default";var c=a.get(u);if(!c){var h={loading:0,preload:null};if(c=n.querySelector(Du(u)))h.loading=5;else{t=ut({rel:"stylesheet",href:t,"data-precedence":e},l),(l=Je.get(u))&&ho(t,l);var p=c=n.createElement("link");Wt(p),ce(p,"link",t),p._p=new Promise(function(T,C){p.onload=T,p.onerror=C}),p.addEventListener("load",function(){h.loading|=1}),p.addEventListener("error",function(){h.loading|=2}),h.loading|=4,ms(c,e,n)}c={type:"stylesheet",instance:c,count:1,state:h},a.set(u,c)}}}function Cy(t,e){Ul.X(t,e);var l=Ma;if(l&&t){var n=Wn(l).hoistableScripts,a=Ua(t),u=n.get(a);u||(u=l.querySelector(Mu(a)),u||(t=ut({src:t,async:!0},e),(e=Je.get(a))&&mo(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 Ay(t,e){Ul.M(t,e);var l=Ma;if(l&&t){var n=Wn(l).hoistableScripts,a=Ua(t),u=n.get(a);u||(u=l.querySelector(Mu(a)),u||(t=ut({src:t,async:!0,type:"module"},e),(e=Je.get(a))&&mo(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 Wm(t,e,l,n){var a=(a=Yl.current)?Au(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=wa(l.href),e=Wn(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=wa(l.href);var u=Wn(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(Du(t)))?u._p||(c.instance=u,c.state.loading=5):(u=Je.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},Je.set(t,u)),Dy(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=Ua(l),e=Wn(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 wa(t){return'href="'+Ye(t)+'"'}function Du(t){return'link[rel="stylesheet"]['+t+"]"}function Pm(t){return ut({},t,{"data-precedence":t.precedence,precedence:null})}function Dy(t,e,l,n){if(e=t.querySelector('link[rel="preload"][as="style"]['+e+"]")){if(e[ni]!==!0){n.loading=1;return}}else e=t.createElement("link"),e[ni]=!0,e.onload=e.onerror=of.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 Ua(t){return'[src="'+Ye(t)+'"]'}function Mu(t){return"script[async]"+t}function t0(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var n=t.querySelector('style[data-href~="'+Ye(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),ms(n,l.precedence,t),e.instance=n;case"stylesheet":a=wa(l.href);var u=t.querySelector(Du(a));if(u)return e.state.loading|=4,e.instance=u,Wt(u),u;n=Pm(l),(a=Je.get(a))&&ho(n,a),u=(t.ownerDocument||t).createElement("link"),Wt(u);var c=u;return c._p=new Promise(function(h,p){c.onload=h,c.onerror=p}),ce(u,"link",n),e.state.loading|=4,ms(u,l.precedence,t),e.instance=u;case"script":return u=Ua(l.src),(a=t.querySelector(Mu(u)))?(e.instance=a,Wt(a),a):(n=l,(a=Je.get(u))&&(n=ut({},l),mo(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,ms(n,l.precedence,t));return e.instance}function ms(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 ho(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function mo(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 e0(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[Ka]||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 vo(t,e,l){t=t.ownerDocument||t,t.head.insertBefore(l,e==="title"?t.querySelector("head > title"):null)}function My(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 l0(t,e){return t==="img"&&e.src!=null&&e.src!==""&&e.onLoad==null&&e.loading!=="lazy"}function n0(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function a0(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function u0(t,e){typeof e.decode=="function"&&(t.imgCount++,e.complete||(t.imgBytes+=a0(e),t.suspenseyImages.push(e)),t=Hy.bind(t),e.decode().then(t,t))}function wy(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=wa(n.href),u=e.querySelector(Du(a));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=wu.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=u,Wt(u);return}u=e.ownerDocument||e,n=Pm(n),(a=Je.get(a))&&ho(n,a),u=u.createElement("link"),Wt(u);var c=u;c._p=new Promise(function(h,p){c.onload=h,c.onerror=p}),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=wu.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var gs=0;function Uy(t,e){return t.stylesheets&&t.count===0&&ys(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var n=setTimeout(function(){if(t.stylesheets&&ys(t,t.stylesheets),t.unsuspend){var u=t.unsuspend;t.unsuspend=null,u()}},6e4+e);0<t.imgBytes&&gs===0&&(gs=62500*Pp());var a=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&ys(t,t.stylesheets),t.unsuspend)){var u=t.unsuspend;t.unsuspend=null,u()}},(t.imgBytes>gs?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function i0(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)ys(t,t.stylesheets);else if(t.unsuspend){var e=t.unsuspend;t.unsuspend=null,e()}}}function wu(){this.count--,i0(this)}function Hy(){this.imgCount--,i0(this)}var ps=null;function ys(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,ps=new Map,e.forEach(By,t),ps=null,wu.call(t))}function By(t,e){if(!(e.state.loading&4)){var l=ps.get(t);if(l)var n=l.get(null);else{l=new Map,ps.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=wu.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 Ha={$$typeof:Ft,Provider:null,Consumer:null,_currentValue:bl,_currentValue2:bl,_threadCount:0};function Ly(t,e,l,n,a,u,c,h,p){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=Ks(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ks(0),this.hiddenUpdates=Ks(null),this.identifierPrefix=n,this.onUncaughtError=a,this.onCaughtError=u,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=p,this.transitionTypes=null,this.incompleteTransitions=new Map}function s0(t,e,l,n,a,u,c,h,p,T,C,M){return t=new Ly(t,e,l,c,p,T,C,M,h),e=1,u===!0&&(e|=24),u=Se(3,null,null,e),t.current=u,u.stateNode=t,e=Rc(),e.refCount++,t.pooledCache=e,e.refCount++,u.memoizedState={element:n,isDehydrated:l,cache:e},Mc(u),t}function c0(t){return t?(t=ca,t):ca}function r0(t,e,l,n,a,u){a=c0(a),n.context===null?n.context=a:n.pendingContext=a,n=Wl(e),n.payload={element:l},u=u===void 0?null:u,u!==null&&(n.callback=u),l=Pl(t,n,e),l!==null&&(_e(l,t,e),fu(l,t,e))}function o0(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<e?l:e}}function go(t,e){o0(t,e),(t=t.alternate)&&o0(t,e)}function f0(t){if(t.tag===13||t.tag===31){var e=zn(t,67108864);e!==null&&_e(e,t,67108864),go(t,67108864)}}function d0(t){if(t.tag===13||t.tag===31){var e=He();e=Js(e);var l=zn(t,e);l!==null&&_e(l,t,e),go(t,e)}}var Ba=!0;function qy(t,e,l,n){var a=Z.T;Z.T=null;var u=lt.p;try{lt.p=2,po(t,e,l,n)}finally{lt.p=u,Z.T=a}}function ky(t,e,l,n){var a=Z.T;Z.T=null;var u=lt.p;try{lt.p=8,po(t,e,l,n)}finally{lt.p=u,Z.T=a}}function po(t,e,l,n){if(Ba){var a=yo(n);if(a===null)Fr(t,e,n,xs,l),m0(t,n);else if(Vy(a,t,e,l,n))n.stopPropagation();else if(m0(t,n),e&4&&-1<Yy.indexOf(t)){for(;a!==null;){var u=Fn(a);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var c=jn(u.pendingLanes);if(c!==0){var h=u;for(h.pendingLanes|=2,h.entangledLanes|=2;c;){var p=1<<31-Re(c);h.entanglements[1]|=p,c&=~p}pl(u),(bt&6)===0&&(as=ze()+500,zu(0))}}break;case 31:case 13:h=zn(u,2),h!==null&&_e(h,u,2),ss(),go(u,2)}if(u=yo(n),u===null&&Fr(t,e,n,xs,l),u===a)break;a=u}a!==null&&n.stopPropagation()}else Fr(t,e,n,null,l)}}function yo(t){return t=lc(t),xo(t)}var xs=null;function xo(t){if(xs=null,t=En(t),t!==null){var e=m(t);if(e===null)t=null;else{var l=e.tag;if(l===13){if(t=v(e),t!==null)return t;t=null}else if(l===31){if(t=x(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 xs=t,null}function h0(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(Pv()){case Fo:return 2;case Wo:return 8;case Wu:case tg:return 32;case Po:return 268435456;default:return 32}default:return 32}}var bo=!1,dn=null,hn=null,mn=null,Uu=new Map,Hu=new Map,vn=[],Yy="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 m0(t,e){switch(t){case"focusin":case"focusout":dn=null;break;case"dragenter":case"dragleave":hn=null;break;case"mouseover":case"mouseout":mn=null;break;case"pointerover":case"pointerout":Uu.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hu.delete(e.pointerId)}}function Bu(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=Fn(e),e!==null&&f0(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,a!==null&&e.indexOf(a)===-1&&e.push(a),t)}function Vy(t,e,l,n,a){switch(e){case"focusin":return dn=Bu(dn,t,e,l,n,a),!0;case"dragenter":return hn=Bu(hn,t,e,l,n,a),!0;case"mouseover":return mn=Bu(mn,t,e,l,n,a),!0;case"pointerover":var u=a.pointerId;return Uu.set(u,Bu(Uu.get(u)||null,t,e,l,n,a)),!0;case"gotpointercapture":return u=a.pointerId,Hu.set(u,Bu(Hu.get(u)||null,t,e,l,n,a)),!0}return!1}function v0(t){var e=En(t.target);if(e!==null){var l=m(e);if(l!==null){if(e=l.tag,e===13){if(e=v(l),e!==null){t.blockedOn=e,sf(t.priority,function(){d0(l)});return}}else if(e===31){if(e=x(l),e!==null){t.blockedOn=e,sf(t.priority,function(){d0(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 bs(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var l=yo(t.nativeEvent);if(l===null){l=t.nativeEvent;var n=new l.constructor(l.type,l);ec=n,l.target.dispatchEvent(n),ec=null}else return e=Fn(l),e!==null&&f0(e),t.blockedOn=l,!1;e.shift()}return!0}function g0(t,e,l){bs(t)&&l.delete(e)}function Gy(){bo=!1,dn!==null&&bs(dn)&&(dn=null),hn!==null&&bs(hn)&&(hn=null),mn!==null&&bs(mn)&&(mn=null),Uu.forEach(g0),Hu.forEach(g0)}function Ss(t,e){t.blockedOn===e&&(t.blockedOn=null,bo||(bo=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Gy)))}var js=null;function p0(t){js!==t&&(js=t,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){js===t&&(js=null);for(var e=0;e<t.length;e+=3){var l=t[e],n=t[e+1],a=t[e+2];if(typeof n!="function"){if(xo(n||l)===null)continue;break}var u=Fn(l);u!==null&&(t.splice(e,3),e-=3,tr(u,{pending:!0,data:a,method:l.method,action:n},n,a))}}))}function La(t){function e(p){return Ss(p,t)}dn!==null&&Ss(dn,t),hn!==null&&Ss(hn,t),mn!==null&&Ss(mn,t),Uu.forEach(e),Hu.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);)v0(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||p0(l);else if(c){var h=null;if(u&&u.hasAttribute("formAction")){if(a=u,c=u[be]||null)h=c.formAction;else if(xo(a)!==null)continue}else h=c.action;typeof h=="function"?l[n+1]=h:(l.splice(n,3),n-=3),p0(l)}}}function y0(){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 So(t){this._internalRoot=t}Es.prototype.render=So.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(f(409));var l=e.current,n=He();r0(l,n,t,e,null,null)},Es.prototype.unmount=So.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;r0(t.current,2,null,t,null,null),ss(),e[In]=null}};function Es(t){this._internalRoot=t}Es.prototype.unstable_scheduleHydration=function(t){if(t){var e=uf();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&&v0(t)}};var x0=r.version;if(x0!=="19.3.0")throw Error(f(527,x0,"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=O(e),t=t!==null?R(t):null,t=t===null?null:t.stateNode,t};var Qy={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:Z,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ts=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ts.isDisabled&&Ts.supportsFiber)try{$a=Ts.inject(Qy),Oe=Ts}catch{}}return qu.createRoot=function(t,e){if(!d(t))throw Error(f(299));var l=!1,n="",a=ch,u=rh,c=oh;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=s0(t,1,!1,null,null,l,n,null,a,u,c,y0),t[In]=e.current,Ir(t),new So(e)},qu.hydrateRoot=function(t,e,l){if(!d(t))throw Error(f(299));var n=!1,a="",u=ch,c=rh,h=oh,p=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&&(p=l.formState)),e=s0(t,1,!0,e,l??null,n,a,p,u,c,h,y0),e.context=c0(null),l=e.current,n=He(),n=Js(n),a=Wl(n),a.callback=null,Pl(l,a,n),l=n,e.current.lanes=l,Za(e,l),pl(e),t[In]=e.current,Ir(t),new Es(e)},qu.version="19.3.0",qu}var R0;function tx(){if(R0)return Eo.exports;R0=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(),Eo.exports=Py(),Eo.exports}var ex=tx(),z=Yo();/**
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 nv=(...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 lx=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 nx=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 C0=i=>{const r=nx(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 ax={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 ux=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 ix=z.forwardRef(({color:i="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:f,className:d="",children:m,iconNode:v,...x},E)=>z.createElement("svg",{ref:E,...ax,width:r,height:r,stroke:i,strokeWidth:f?Number(o)*24/Number(r):o,className:nv("lucide",d),...!m&&!ux(x)&&{"aria-hidden":"true"},...x},[...v.map(([O,R])=>z.createElement(O,R)),...Array.isArray(m)?m:[m]]));/**
85
- * @license lucide-react v0.577.0 - ISC
86
- *
87
- * This source code is licensed under the ISC license.
88
- * See the LICENSE file in the root directory of this source tree.
89
- */const al=(i,r)=>{const o=z.forwardRef(({className:f,...d},m)=>z.createElement(ix,{ref:m,iconNode:r,className:nv(`lucide-${lx(C0(i))}`,`lucide-${i}`,f),...d}));return o.displayName=C0(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 sx=[["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"}]],av=al("external-link",sx);/**
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 cx=[["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"}]],rx=al("file-diff",cx);/**
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 ox=[["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"}]],fx=al("git-pull-request",ox);/**
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 dx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],hx=al("info",dx);/**
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 mx=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],vx=al("menu",mx);/**
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 gx=[["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"}]],px=al("message-circle-question-mark",gx);/**
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 yx=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],xx=al("plus",yx);/**
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 bx=[["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"}]],Oo=al("scroll-text",bx);/**
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 Sx=[["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"}]],jx=al("settings",Sx);/**
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 Ex=[["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"}]],A0=al("shield-check",Ex);/**
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 Tx=[["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"}]],D0=al("triangle-alert",Tx),M0=new Set(["VERIFIED","ALREADY_SATISFIED"]),_x=i=>{if(typeof i.verdict!="string")return i.verdict;const r=i.verdict.trim().toUpperCase();return i.attested===!1?M0.has(r)?"UNVERIFIED":`${i.verdict} (unattested)`:M0.has(r)?i.sig_checked===!1?`${r} (signature not checked)`:r:i.verdict},Zu=()=>globalThis.LOKI_CONTROL_BASE??"",w0="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(w0,decodeURIComponent(o[1])),(r=globalThis.history)==null||r.replaceState(null,"",globalThis.location.pathname+globalThis.location.search)),sessionStorage.getItem(w0)}catch{return null}}const Ku=(i={})=>{const r=xe();return r?{...i,authorization:`Bearer ${r}`}:i};async function Vo(i){const r=await fetch(`${Zu()}${i}`,{headers:Ku()});if(!r.ok)throw new Error(`${i}: HTTP ${r.status}`);return await r.json()}function kl(i={}){const r=new URLSearchParams;for(const[f,d]of Object.entries(i))d&&r.set(f,d);const o=r.toString();return Vo(`/v1/runs${o?`?${o}`:""}`)}function Hs(i,r){return Vo(`/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}`)}async function uv(i,r,o){const f=await fetch(`${Zu()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}/answer`,{method:"POST",headers:Ku({"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 iv(i,r){const o=await fetch(`${Zu()}${i}`,{method:"POST",headers:Ku({"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 Nx=()=>iv("/v1/import",{}),sv=()=>Vo("/v1/repos");function cv(i,r=3e3){const o=new AbortController,f=d=>new Promise(m=>{const v=setTimeout(m,d);o.signal.addEventListener("abort",()=>{clearTimeout(v),m()},{once:!0})});return(async()=>{for(;!o.signal.aborted;){try{const d=await fetch(`${Zu()}/v1/stream`,{headers:Ku({accept:"text/event-stream"}),signal:o.signal});if(d.ok&&d.body){const m=d.body.getReader(),v=new TextDecoder;let x="";for(;;){const{value:E,done:O}=await m.read();if(O)break;x+=v.decode(E,{stream:!0});const R=x.split(`
145
-
146
- `);x=R.pop()??"",R.some(g=>/^event: run$/m.test(g))&&i()}}}catch{}await f(r)}})(),()=>o.abort()}const zx=(i,r)=>iv("/v1/start",{target:i,repo:r});async function Ox(i,r){const o=await fetch(`${Zu()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}`,{method:"DELETE",headers:Ku({"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})`,Rx=(...i)=>i.filter(Boolean).join(" ")||void 0,rv={success:w("success-muted"),warning:w("warning-muted"),error:w("error-muted"),info:w("info-muted"),neutral:w("bg-3")},Go={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,...m}){return s.jsx("div",{...m,"data-cp":"card","data-interactive":i?"true":void 0,className:Rx("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 yl({label:i,value:r,icon:o,trend:f,trendTone:d="neutral",series:m,compact:v}){const x=m&&m.length>1?m:null;let E=null;if(x){const O=Math.min(...x),R=Math.max(...x),g=R-O||1,A=x.map((L,X)=>`${X?"L":"M"}${(X/(x.length-1)*80).toFixed(1)} ${(22-(L-O)/g*20).toFixed(1)}`).join(" ");E=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:v?"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:v?20:28,fontWeight:500,lineHeight:1.2},children:r})]}),f?s.jsx("span",{style:{fontSize:11,borderRadius:3,padding:"1px 6px",background:rv[d],color:Go[d]},children:f}):null,E]})}const Cx={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"},mt={VERIFIED:"VERIFIED",PARTIAL:"PARTIAL",FAILED:"FAILED",SPEC_CONFLICT:"SPEC_CONFLICT",BLOCKED:"BLOCKED",TAMPERED:"TAMPERED",UNVERIFIED:"UNVERIFIED",VERIFIED_UNCHECKED:"VERIFIED (signature not checked)",RUNNING:"running"},Ax=[mt.VERIFIED,mt.VERIFIED_UNCHECKED,mt.UNVERIFIED,mt.TAMPERED,mt.PARTIAL,mt.FAILED,mt.SPEC_CONFLICT];function ke(i){var r;return i?i.tampered===!0||i.integrity===mt.TAMPERED||((r=i.receipt)==null?void 0:r.verdict)===mt.TAMPERED||i.verdict===mt.TAMPERED?mt.TAMPERED:_x({verdict:i.verdict??null,attested:i.attested??void 0,sig_checked:i.sig_checked??void 0}):null}const ka=i=>ke(i)===mt.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:rv[i],color:Go[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 nl({verdict:i,run:r}){const o=r?ke(r):i??null;return o?s.jsx(wt,{tone:Cx[o]??"neutral",pulse:o===mt.RUNNING,"data-verdict":o,children:o}):s.jsx(wt,{pulse:!0,children:"running"})}const Dx={active:w("success-fill"),idle:w("text-muted"),paused:w("warning-fill"),error:w("error-fill")};function ov({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:Dx[i]}})}const Mx={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 Lt({variant:i="primary",size:r="md",style:o,type:f="button",...d}){const m=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:m,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,...Mx[i],...o}})}const fv={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 Ga({style:i,onFocus:r,onBlur:o,...f}){const[d,m]=z.useState(!1);return s.jsx("input",{...f,"data-cp":"input",onFocus:v=>{m(!0),r==null||r(v)},onBlur:v=>{m(!1),o==null||o(v)},style:{...fv,...d?{borderColor:w("accent"),boxShadow:w("focus"),outline:"none"}:null,...i}})}function dv({style:i,onFocus:r,onBlur:o,...f}){const[d,m]=z.useState(!1);return s.jsx("textarea",{...f,"data-cp":"textarea",onFocus:v=>{m(!0),r==null||r(v)},onBlur:v=>{m(!1),o==null||o(v)},style:{...fv,resize:"vertical",...d?{borderColor:w("accent"),boxShadow:w("focus"),outline:"none"}:null,...i}})}function $n({label:i,value:r,icon:o,options:f,onSelect:d}){const[m,v]=z.useState(!1),x=z.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?m:void 0,"aria-controls":f&&m?x:void 0,onClick:()=>f&&v(E=>!E),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&&m?s.jsx("div",{id:x,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(E=>s.jsx("button",{role:"menuitem",type:"button",onClick:()=>{d==null||d(E.value),v(!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:E.label},E.value))}):null]})}function bn({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((m,v)=>s.jsx("td",{style:{padding:"10px 14px"},children:m},v))},d))})]})})}function hv({active:i,icon:r,children:o,href:f,onClick:d}){const m={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")},v=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:m,children:v}):s.jsx("button",{type:"button","data-cp":"nav-item","data-active":i?"true":void 0,"aria-current":i?"page":void 0,onClick:d,style:m,children:v})}function wx({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 Ux({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 Bl({icon:i,title:r,meta:o,children:f,expandable:d,defaultOpen:m}){const[v,x]=z.useState(!!m),E=z.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":v,"aria-controls":E,onClick:()=>x(O=>!O),style:{background:"transparent",border:0,padding:0,marginTop:4,color:w("accent"),fontSize:w("text-base"),cursor:"pointer"},children:v?"Hide details":"Show details"}),v?s.jsx(qt,{id:E,style:{marginTop:6},children:f}):null]}):f]})]})}function kt({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 Hx({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 ${Go[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 Bx(i,r){const o=z.useRef(null);return z.useEffect(()=>{var m;if(!i)return;const f=document.activeElement;(m=o.current)==null||m.focus();const d=v=>{v.key==="Escape"&&r()};return document.addEventListener("keydown",d),()=>{var v;document.removeEventListener("keydown",d),(v=f==null?void 0:f.focus)==null||v.call(f)}},[i,r]),o}function mv({open:i,title:r,onClose:o,side:f="right",children:d}){const m=Bx(i,o),v=z.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:m,role:"dialog","aria-modal":"true","aria-labelledby":v,tabIndex:-1,"data-cp":"drawer","data-side":f,onClick:x=>x.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:v,style:{margin:"0 0 12px",fontFamily:w("font-serif"),fontWeight:400,fontSize:"1.15rem"},children:r}),d]})}):null}function vv({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 ql="unmeasured",U0=3e3,Lx=["intake","plan","Wall","implement","verify","seal","PR"];function qx(i,r){const o=new Set,f=v=>i.find(x=>!o.has(x)&&x.stage.toLowerCase().includes(v.toLowerCase())),d=(v,x)=>{if(!x)return{name:v,status:"pending",elapsed_s:null};o.add(x);const E=x.started_at?Date.parse(x.started_at):NaN,O=x.ended_at?Date.parse(x.ended_at):x.status==="started"?r:NaN,R=Number.isNaN(E)||Number.isNaN(O)?null:Math.max(0,(O-E)/1e3),g=x.status==="started"?"running":x.status==="completed"?"done":"failed";return{name:v,status:g,elapsed_s:R}},m=Lx.map(v=>d(v,f(v)));for(const v of i)o.has(v)||m.push(d(v.stage,v));return m}const kx=i=>i===null?ql:i>=60?`${Math.floor(i/60)}m ${Math.floor(i%60)}s`:`${i.toFixed(1)}s`,gv=i=>i.cost_usd!==null&&i.cost_usd!==void 0?`$${i.cost_usd.toFixed(4)}`:i.partial_usd?`at least $${i.partial_usd.toFixed(4)} (rest ${ql})`:ql;function pv(i,r,o){const[f,d]=z.useState({data:null,error:null});return z.useEffect(()=>{let m=!0,v;const x=()=>i().then(E=>{m&&(d({data:E,error:null}),o(E)&&(v=setTimeout(x,U0)))},E=>{m&&(d(O=>({data:O.data,error:E.message})),v=setTimeout(x,U0))});return x(),()=>{m=!1,clearTimeout(v)}},r),f}const Xn="rounded border border-slate-200 p-4 dark:border-slate-800",Yx={pending:"text-slate-400",running:"text-sky-600 dark:text-sky-400",done:"text-emerald-600 dark:text-emerald-400",failed:"text-red-600"},Vx=i=>i&&/^https?:\/\//.test(i)?i:null;function yv({source:i,run:r}){const{data:o,error:f}=pv(()=>Hs(i,r),[i,r],O=>O.status==="running"),[,d]=z.useState(0),m=(o==null?void 0:o.status)==="running";if(z.useEffect(()=>{if(!m)return;const O=setInterval(()=>d(R=>R+1),1e3);return()=>clearInterval(O)},[m]),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 v=qx(o.stages??[],Date.now()),x=o.files_touched??[],E=Vx(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:m?"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:Xn,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:v.map(O=>s.jsxs("li",{"data-testid":"live-stage","data-status":O.status,className:"flex flex-wrap items-center justify-between gap-x-4",children:[s.jsx("span",{className:"font-medium",children:O.name}),s.jsxs("span",{className:Yx[O.status],children:[O.status,", ",O.status==="pending"?"not started":kx(O.elapsed_s),", limit ",ql]})]},O.name))})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[s.jsxs("div",{className:Xn,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:[x.length," files, +/- ",ql]})]}),s.jsxs("div",{className:Xn,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:gv(o)})]}),s.jsxs("div",{className:Xn,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??ql})]})]}),!m&&s.jsxs("div",{"data-testid":"live-outcome",className:Xn,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:ke(o)??ql}),s.jsxs("p",{className:"mt-1 flex flex-wrap gap-4 text-sm",children:[E?s.jsx("a",{"data-testid":"live-pr",href:E,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 Gx(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 m of i){const v=m.started_at?Date.parse(m.started_at):NaN;Number.isNaN(v)||(v>=f&&d.today++,v>=f-6*864e5&&d.week++);const x=ke(m);x===mt.VERIFIED?d.verified++:x===mt.VERIFIED_UNCHECKED?d.unchecked++:x===mt.PARTIAL?d.partial++:x===mt.FAILED?d.failed++:x?d.other++:d.running++,m.cost_usd!==null&&m.cost_usd!==void 0?d.costUsd+=m.cost_usd:(d.unmeasuredRuns++,d.costUsd+=m.partial_usd??0),m.pr_url&&d.prsOpened++}return d.last=[...i].sort((m,v)=>Date.parse(v.started_at??"")-Date.parse(m.started_at??"")).slice(0,10),d}function Hl({id:i,label:r,value:o}){return s.jsxs("div",{className:Xn,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 Qx({runs:i,now:r=Date.now()}){const o=Gx(i,r),f=o.unmeasuredRuns===0?`$${o.costUsd.toFixed(4)}`:`$${o.costUsd.toFixed(4)} measured, ${o.unmeasuredRuns} run${o.unmeasuredRuns===1?"":"s"} ${ql}`;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(Hl,{id:"ov-today",label:"Runs today",value:String(o.today)}),s.jsx(Hl,{id:"ov-week",label:"Runs, last 7 days",value:String(o.week)}),s.jsx(Hl,{id:"ov-verified",label:mt.VERIFIED,value:String(o.verified)}),s.jsx(Hl,{id:"ov-unchecked",label:"Signature not checked",value:String(o.unchecked)}),s.jsx(Hl,{id:"ov-partial",label:mt.PARTIAL,value:String(o.partial)}),s.jsx(Hl,{id:"ov-failed",label:mt.FAILED,value:String(o.failed)}),s.jsx(Hl,{id:"ov-cost",label:"Total cost",value:f}),s.jsx(Hl,{id:"ov-pr-opened",label:"PRs opened",value:String(o.prsOpened)}),s.jsx(Hl,{id:"ov-pr-merged",label:"PRs merged",value:ql})]}),s.jsxs("div",{className:Xn,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:[ke(d)??"in progress",", ",gv(d)]})]},`${d.source_id}/${d.run_id}`))})]})]})}function xv({fallback:i,overview:r}){const{data:o}=pv(()=>kl(),[],d=>d.runs.some(m=>m.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(yv,{source:f.source_id,run:f.run_id}):s.jsx(Qx,{runs:o.runs})}const Bs=new Map,wo=new Set;let bv=0;const Sv=()=>{bv++;for(const i of wo)i()};function qe(i){Bs.set(i.id,i),Sv()}function H0(i){Bs.delete(i)&&Sv()}const jv=()=>[...Bs.values()],$x=()=>jv().filter(i=>i.inSettings),Ev=i=>(wo.add(i),()=>{wo.delete(i)}),Ms=()=>bv;function Ya(i){const o=(i.replace(/^#/,"").split("?")[0]??"").replace(/\/+$/,"");return o===""?"/":o.startsWith("/")?o:`/${o}`}function Xx(i,r){const o=i.split("/").filter(Boolean),f=r.split("/").filter(Boolean);if(o.length!==f.length)return null;const d={};for(let m=0;m<o.length;m++){const v=o[m];if(v.startsWith(":"))try{d[v.slice(1)]=decodeURIComponent(f[m])}catch{return null}else if(v!==f[m])return null}return d}function Zx(i){const r=Ya(i);let o=null;for(const f of Bs.values()){const d=Xx(f.path,r);if(!d)continue;const m=f.path.split("/").filter(v=>v&&!v.startsWith(":")).length;(!o||m>o.score)&&(o={page:f,params:d,score:m})}return o?{page:o.page,params:o.params}:null}async function Kx(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 Zn=i=>`$${i.toFixed(2)}`,_s=i=>i.toLocaleString("en-US"),B0=[{value:"day",label:"Day"},{value:"model",label:"Model"},{value:"repo",label:"Repo"},{value:"provider",label:"Provider"}];function Jx({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"})," ",Zn(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 Ix({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 ${Zn(i.measured_usd)}, partial ${Zn(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 Fx(){const[i,r]=z.useState("day"),[o,f]=z.useState(null),[d,m]=z.useState(null);if(z.useEffect(()=>{let O=!0;return f(null),m(null),Kx(i).then(R=>{O&&f(R)},R=>{O&&m(R.message)}),()=>{O=!1}},[i]),d)return s.jsx(kt,{title:"Cost unavailable",hint:d});if(!o)return s.jsx(It,{label:"Loading cost"});const v=o.totals,x=Math.max(0,...o.rows.map(O=>O.measured_usd+O.partial_usd)),E=B0.find(O=>O.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(Jx,{budget:o.budget}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:12},children:[s.jsx(yl,{label:"Measured",value:s.jsx("span",{"data-testid":"cost-measured",children:Zn(v.measured_usd)}),trend:`${v.measured_runs} runs`,trendTone:"success"}),s.jsx(yl,{label:"Partial (priced sessions only)",value:s.jsx("span",{"data-testid":"cost-partial",children:Zn(v.partial_usd)}),trend:`${v.partial_runs} runs`,trendTone:"warning"}),s.jsx(yl,{label:"Unmeasured",value:s.jsxs("span",{"data-testid":"cost-unmeasured",children:[v.unmeasured_runs," runs"]}),trend:"not measured"}),s.jsx(yl,{label:"Tokens in / out",value:s.jsxs("span",{"data-testid":"cost-tokens",children:[_s(v.input_tokens)," / ",_s(v.output_tokens)]})})]}),s.jsx("div",{children:s.jsx($n,{label:"Group by",value:E,options:B0,onSelect:O=>r(O)})}),o.rows.length===0?s.jsx(kt,{title:"No runs yet",hint:"Cost appears here once a run has been ingested."}):s.jsx(bn,{caption:`Cost by ${E}`,columns:[E,"Runs","Measured","Partial","Unmeasured","Tokens in","Tokens out","Spend"],rows:o.rows.map(O=>[O[i]??"unknown",O.runs,O.measured_runs?Zn(O.measured_usd):"not measured",O.partial_runs?`${Zn(O.partial_usd)} (partial)`:"none",O.unmeasured_runs?`${O.unmeasured_runs} not measured`:"none",_s(O.input_tokens),_s(O.output_tokens),s.jsx(Ix,{row:O,max:x},"bar")])})]})}const Wx={id:"cost",path:"/cost",title:"Cost and usage",component:Fx},Qo=()=>globalThis.LOKI_CONTROL_BASE??"",$o=()=>{const i=xe();return i?{authorization:`Bearer ${i}`}:{}},Xo=(i,r)=>`/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}`;async function Tv(i,r,o){try{const f=await fetch(`${Qo()}${Xo(i,r)}/artifact/${o}`,{headers:$o()});return f.ok?await f.text():null}catch{return null}}async function Px(i,r,o=-1){try{const f=await fetch(`${Qo()}${Xo(i,r)}/events?after=${o}`,{headers:$o()});return f.ok?(await f.json()).events??[]:[]}catch{return[]}}function t1(i,r){const o=i.split(`
147
-
148
- `),f=o.pop()??"";for(const d of o){const m=d.split(`
149
- `).filter(v=>v.startsWith("data:")).map(v=>v.slice(5).trim()).join("");if(!(!m||!/^event: event$/m.test(d)))try{r(JSON.parse(m))}catch{}}return f}async function e1(i,r,o,f,d){try{const m=await fetch(`${Qo()}${Xo(i,r)}/stream?after=${o()}`,{headers:{...$o(),accept:"text/event-stream"},signal:d});if(!m.ok||!m.body)return;const v=m.body.getReader(),x=new TextDecoder;let E="";for(;;){const{done:O,value:R}=await v.read();if(O)return;E=t1(E+x.decode(R,{stream:!0}),f)}}catch{}}const Ll="not measured";function l1(i){return i.cost_usd!==null&&i.cost_usd!==void 0?`$${i.cost_usd.toFixed(4)}`:i.partial_usd?`at least $${i.partial_usd.toFixed(4)} (${i.measured_sessions} of ${i.total_sessions} sessions measured)`:Ll}const n1=i=>typeof i!="number"?Ll:i>=60?`${Math.floor(i/60)}m ${Math.floor(i%60)}s`:`${i.toFixed(1)}s`;function a1(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 u1({source:i,run:r}){const[o,f]=z.useState([]),d=z.useRef(-1);return z.useEffect(()=>{const m=new AbortController,v=x=>{const E=x.filter(O=>O.seq>d.current);E.length&&(d.current=E[E.length-1].seq,f(O=>[...O,...E].slice(-2e3)))};return(async()=>{for(v(await Px(i,r));!m.signal.aborted;)await e1(i,r,()=>d.current,x=>v([x]),m.signal),m.signal.aborted||await new Promise(x=>setTimeout(x,3e3))})(),()=>m.abort()},[i,r]),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(m=>s.jsx("div",{children:`${m.seq} ${a1(m)}`},m.seq))})}function L0({source:i,run:r,name:o,empty:f}){const[d,m]=z.useState(void 0);return z.useEffect(()=>{let v=!0;return Tv(i,r,o).then(x=>{v&&m(x)}),()=>{v=!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 i1({source:i,run:r,question:o,onSent:f}){const[d,m]=z.useState(""),[v,x]=z.useState({busy:!1}),E=async()=>{x({busy:!0});try{await uv(i,r,d.trim()),x({busy:!1,sent:!0}),f()}catch(O){x({busy:!1,error:O.message})}};return s.jsx(Bl,{icon:s.jsx(px,{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(dv,{"aria-label":"Your reply",rows:3,value:d,onChange:O=>m(O.target.value),disabled:v.busy||v.sent}),s.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[s.jsx(Lt,{onClick:E,disabled:!d.trim()||v.busy||v.sent,children:"Send reply"}),v.sent?s.jsx("span",{role:"status",children:"Reply saved. Resume the run to continue."}):null,v.error?s.jsx("span",{role:"alert",style:{color:"var(--cp-error)"},children:v.error}):null]})]})})}function s1({source:i,run:r,slot:o,renderSlot:f}){var P,q,B;const[d,m]=z.useState(null),[v,x]=z.useState(null),[E,O]=z.useState(!1),R=z.useCallback(()=>{Hs(i,r).then(G=>{m(G),x(null)},G=>x(G.message))},[i,r]),g=!d||d.status==="running"||d.verdict===null;if(z.useEffect(()=>{if(R(),!g)return;const G=setInterval(R,4e3);return()=>clearInterval(G)},[R,g]),v&&!d)return s.jsx(kt,{title:"Run not available",hint:v});if(!d)return s.jsx(It,{label:"Loading run"});const A=d.issue_ref??d.origin_repo??d.run_id,L=((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(nl,{verdict:mt.BLOCKED}):d.verdict?s.jsx(nl,{run:d}):s.jsx(wt,{pulse:!0,children:"running"}),s.jsx("span",{"data-testid":"run-elapsed",children:n1(d.elapsed_s??d.wall_s)}),s.jsx("span",{"data-testid":"run-cost",children:l1(d)}),s.jsxs("span",{"data-testid":"run-header-slot",style:{display:"inline-flex",gap:8},children:[o,f?f(d,R):null]}),s.jsxs(Lt,{variant:"ghost",size:"sm",onClick:()=>O(!0),children:[s.jsx(hx,{size:14})," Details"]})]}),s.jsxs("div",{"data-testid":"run-stages",children:[d.stages.length===0?s.jsx(Bl,{icon:s.jsx(Oo,{size:16}),title:"Waiting for the first stage"}):null,d.stages.map((G,U)=>s.jsx(Bl,{icon:s.jsx(Oo,{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.stage}-${U}`))]}),d.blocked_question?s.jsx(i1,{source:i,run:r,question:d.blocked_question,onSent:R}):null,s.jsx(Bl,{icon:s.jsx(Oo,{size:16}),title:"Live log",expandable:!0,defaultOpen:!0,children:s.jsx(u1,{source:i,run:r})}),s.jsx(Bl,{icon:s.jsx(rx,{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(L0,{source:i,run:r,name:"diff.patch",empty:"Diff not available for this run."})})}),s.jsx(Bl,{icon:s.jsx(A0,{size:16}),title:"Evidence and receipt",meta:L?`sha256 ${L.slice(0,16)} ${(B=d.receipt)!=null&&B.signed?"signed":"unsigned"}`:"no receipt",expandable:!0,children:s.jsx("div",{"data-testid":"run-receipt",children:s.jsx(L0,{source:i,run:r,name:"receipt.md",empty:"Receipt not available for this run."})})}),s.jsx(Bl,{icon:s.jsx(A0,{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,U)=>s.jsx("li",{children:G},U))}):s.jsx("span",{children:d.verdict?"Nothing listed as not proven.":"Not known until the run finishes."})})}),s.jsx(Bl,{icon:s.jsx(fx,{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(av,{size:12})]}):s.jsx("span",{children:d.pr_url}):"No PR."})}),s.jsx(mv,{open:E,title:"Run details",onClose:()=>O(!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,U])=>s.jsxs(z.Fragment,{children:[s.jsx("dt",{children:G}),s.jsx("dd",{style:{margin:0,fontFamily:"var(--cp-font-mono)"},children:String(U)})]},G))})})})]})}function c1(){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 r1({source:i,run:r,slot:o,renderSlot:f}){const d=i&&r?{source:i,run:r}:c1();return d?s.jsx(s1,{source:d.source,run:d.run,slot:o,renderSlot:f}):s.jsx(kt,{title:"No run selected",hint:"Open a run from Home or Runs."})}const _v={id:"run",path:"/runs/:source/:run",title:"Run",component:r1},Nv="loki-theme",Uo=new Set,o1=()=>{try{return localStorage.getItem(Nv)==="light"?"light":"dark"}catch{return"dark"}};let Ls=o1();function Zo(i=Ls){var o;const r=(o=globalThis.document)==null?void 0:o.documentElement;r&&(r.setAttribute("data-theme",i),r.classList.toggle("dark",i==="dark"))}function f1(i){Ls=i;try{localStorage.setItem(Nv,i)}catch{}Zo(i);for(const r of Uo)r()}const Ho=()=>f1(Ls==="dark"?"light":"dark");function d1(){return z.useSyncExternalStore(i=>(Uo.add(i),()=>{Uo.delete(i)}),()=>Ls,()=>"dark")}const zv="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",q0="rounded border border-slate-300 bg-white px-2 py-2 text-sm md:py-1 dark:border-slate-700 dark:bg-slate-900",h1="loki start owner/repo#N";function Ov(){const[i,r]=z.useState(null),[o,f]=z.useState(!1),d=async()=>{f(!0);try{const m=await Nx();r(m.failed.length?{ok:!1,text:`Imported ${m.runs} runs; ${m.failed.length} failed.`}:{ok:!0,text:m.runs===0?"No runs found in this folder.":`Imported ${m.runs} runs. Reload to see them.`})}catch(m){r({ok:!1,text:m.message})}f(!1)};return s.jsxs("div",{children:[s.jsx("button",{type:"button","data-testid":"import-runs",disabled:o,onClick:d,className:zv,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 Rv({knownRepos:i}){const[r,o]=z.useState(""),[f,d]=z.useState(""),[m,v]=z.useState(i??[]),[x,E]=z.useState(null);z.useEffect(()=>{i||sv().then(R=>v(R.repos),()=>{})},[i]);const O=async()=>{try{const R=await zx(r.trim(),f);E({ok:!0,text:`Started: loki ${R.command}`}),o("")}catch(R){E({ok:!1,text:R.message})}};return s.jsxs("form",{"data-testid":"start-run",className:"mb-6 flex flex-col gap-2 sm:flex-row sm:items-end",onSubmit:R=>{R.preventDefault(),O()},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:q0,value:r,onChange:R=>o(R.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:q0,value:f,onChange:R=>d(R.target.value),children:[s.jsx("option",{value:"",children:"This folder"}),m.map(R=>s.jsx("option",{value:R,children:R},R))]})]}),s.jsx("button",{type:"submit",disabled:r.trim()==="",className:zv,children:"Start"}),x&&s.jsx("p",{role:x.ok?"status":"alert",className:`text-sm ${x.ok?"text-emerald-600":"text-red-600"}`,children:x.text})]})}function Cv(){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(Ov,{})}),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:h1})]})}function m1(){const i=d1();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(Lt,{variant:"secondary",onClick:Ho,children:i==="dark"?"Switch to light theme":"Switch to dark theme"}),s.jsx("div",{className:"mt-6",children:s.jsx(Ov,{})})]})}const $u="not measured",v1=864e5,g1=()=>globalThis.LOKI_CONTROL_BASE??"";async function Ns(i){const r=xe(),o=await fetch(`${g1()}${i}`,{headers:r?{authorization:`Bearer ${r}`}:{}});if(!o.ok)throw new Error(`${i}: HTTP ${o.status}`);return await o.json()}async function p1(i){const r=new Date(i),o=new Date(r.getFullYear(),r.getMonth(),r.getDate()).toISOString(),[f,d,m,v]=await Promise.all([Ns(`/v1/stats?since=${encodeURIComponent(o)}`),Ns(`/v1/stats?since=${encodeURIComponent(new Date(i-7*v1).toISOString())}`),Ns("/v1/runs?limit=8"),Ns("/v1/notifications?kind=blocked&limit=20")]);return{today:f,week:d,runs:m.runs.slice(0,8),blocked:v.notifications,blockedTotal:v.total}}const ws=i=>`$${i.toFixed(4)}`,k0=(i,r)=>`/r/${encodeURIComponent(i)}/${encodeURIComponent(r)}`;function y1(i){if(i.label==="not measured")return{value:$u,trend:"no priced runs"};if(i.label==="measured")return{value:ws(i.measured_usd??0),trend:"measured"};const r=(i.measured_usd??0)+(i.partial_usd??0);return{value:`${ws(r)}+`,trend:`partial, ${i.partial_runs} run${i.partial_runs===1?"":"s"} unpriced`}}function x1(i){return i.cost_usd!==null&&i.cost_usd!==void 0?ws(i.cost_usd):i.partial_usd?`at least ${ws(i.partial_usd)}`:$u}function b1({data:i}){const{today:r,week:o,runs:f,blocked:d,blockedTotal:m}=i,v=o.verified_rate,x=o.verified_unchecked??0,E=v!==null&&o.keys_configured===!1&&x>0,O=v===null?void 0:E?`${x} signature not checked`:`${o.by_verdict[mt.VERIFIED]??0} of ${o.runs_finished} finished${x?`, ${x} signature not checked`:""}`,R=y1(o.cost);return o.runs_total===0&&f.length===0&&m===0?s.jsx(Cv,{}):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(yl,{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(yl,{label:"Verified rate, 7 days",value:v===null?$u:E?`${$u}: no verification key`:`${Math.round(v*100)}%`,trend:O,trendTone:v===null||E?"neutral":v>=.8?"success":"warning"})}),s.jsx("div",{"data-testid":"kpi-cost",children:s.jsx(yl,{label:"Cost, 7 days",value:R.value,trend:R.trend,trendTone:o.cost.label==="partial"?"warning":"neutral"})}),s.jsx("div",{"data-testid":"kpi-blocked",children:s.jsx(yl,{label:"BLOCKED waiting",value:String(m),trend:m?"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(g=>s.jsx("a",{"data-testid":"blocked-item",href:k0(g.source_id,g.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:g.title}),s.jsx(wt,{tone:"info",children:"Answer"})]})},g.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(bn,{caption:"Recent runs",columns:["Run","Verdict","Cost","Model"],rows:f.map(g=>[s.jsx("a",{"data-testid":"recent-run",href:k0(g.source_id,g.run_id),style:{fontFamily:"var(--cp-font-mono)",color:"var(--cp-accent)"},children:g.origin_repo??g.issue_ref??g.run_id},"l"),g.verdict?s.jsx(nl,{run:g},"v"):s.jsx(wt,{pulse:!0,children:"running"},"v"),x1(g),g.model??$u])})})]})]})}function S1({now:i=Date.now()}){const[r,o]=z.useState({data:null,error:null});return z.useEffect(()=>{let f=!0,d,m=!0;const v=()=>p1(m?i:Date.now()).then(x=>{m=!1,f&&(o({data:x,error:null}),d=setTimeout(v,1e4))},x=>{f&&(o(E=>({data:E.data,error:x.message})),d=setTimeout(v,1e4))});return v(),()=>{f=!1,d&&clearTimeout(d)}},[]),r.data?s.jsx(b1,{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 j1={id:"home",path:"/home",title:"Home",component:S1};function E1(i){return i.verdict?ka(i)?"verified":"notproven":i.pr_url?"pr":i.status==="running"||i.started_at?"running":"issue"}const Y0={issue:"Issue",running:"Running",pr:"PR open",verified:"Verified",notproven:"Not proven"};function T1({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(nl,{run:i}):i.pr_url?s.jsx(wt,{tone:"info",children:i.pr_draft?"draft PR":"PR open"}):i.status==="running"?s.jsx(nl,{verdict:mt.RUNNING}):s.jsx(wt,{children:"queued"}),i.current_stage&&!i.verdict?s.jsx(wt,{children:i.current_stage}):null]})]})})}function ku({id:i,runs:r}){return s.jsxs("section",{"data-testid":`lane-${i}`,"aria-label":Y0[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:Y0[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(T1,{r:o},`${o.source_id}/${o.run_id}`))]})}function zs({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 _1(){const[i,r]=z.useState(null),[o,f]=z.useState(null),d=z.useCallback(()=>{kl().then(v=>{r(v.runs),f(null)}).catch(v=>f(v.message))},[]);if(z.useEffect(()=>(d(),cv(d)),[d]),o&&!i)return s.jsx(kt,{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(kt,{title:"No runs yet",hint:"Start a run and it will appear here."});const m=v=>i.filter(x=>E1(x)===v);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(zs,{id:"issue",children:s.jsx(ku,{id:"issue",runs:m("issue")})}),s.jsx(zs,{id:"running",children:s.jsx(ku,{id:"running",runs:m("running")})}),s.jsx(zs,{id:"pr",children:s.jsx(ku,{id:"pr",runs:m("pr")})}),s.jsxs(zs,{id:"done",children:[s.jsx(ku,{id:"verified",runs:m("verified")}),s.jsx(ku,{id:"notproven",runs:m("notproven")})]})]})]})}const N1={id:"work",path:"/work",title:"Work",component:()=>s.jsx(_1,{})},Av=()=>globalThis.LOKI_CONTROL_BASE??"",Dv=(i={})=>{const r=xe();return r?{...i,authorization:`Bearer ${r}`}:i};async function z1(i,r){const o=await fetch(`${Av()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}/verify`,{method:"POST",headers:Dv({"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 O1(){const i=await fetch(`${Av()}/v1/keys`,{headers:Dv()});if(i.status===404)return null;if(!i.ok)throw new Error(`/v1/keys: HTTP ${i.status}`);return await i.json()}function R1(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++,ka(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 Os=i=>`${i.source_id}/${i.run_id}`;function C1(){const[i,r]=z.useState(null),[o,f]=z.useState(null),[d,m]=z.useState({}),[v,x]=z.useState(void 0);z.useEffect(()=>{let A=!0;return kl().then(L=>A&&r(L.runs),L=>A&&f(L.message)),O1().then(L=>A&&x(L),()=>A&&x(null)),()=>{A=!1}},[]);const E=async A=>{m(L=>({...L,[Os(A)]:"pending"}));try{const L=await z1(A.source_id,A.run_id);m(X=>({...X,[Os(A)]:L}))}catch(L){m(X=>({...X,[Os(A)]:{error:L.message}}))}};if(o)return s.jsx(kt,{title:"Receipts unavailable",hint:o});if(!i)return s.jsx(It,{label:"Loading receipts"});const O=i.filter(A=>A.verdict),R=R1(O),g=O.length?Math.round(O.filter(A=>ka(A)).length/O.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(yl,{label:`Verified rate (${O.length} finished run${O.length===1?"":"s"}, by run outcome)`,value:g===null?"not measured":`${g}%`,series:R.map(A=>A.rate),trend:R.length>1?`${R.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)"}),v===void 0?s.jsx(It,{size:12}):v===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 ",v.kid]}),s.jsxs("div",{"data-testid":"key-x",children:["x ",v.x]})]})]})]}),O.length===0?s.jsx(kt,{title:"No finished runs yet",hint:"A receipt appears here when a run completes."}):s.jsx(bn,{caption:"Receipts",columns:["Run","Outcome","Started","Verify"],rows:O.map(A=>{const L=d[Os(A)];return[s.jsx("span",{style:{fontFamily:"var(--cp-font-mono)"},children:A.run_id},"run"),s.jsx(nl,{run:A},"out"),A.started_at??"not measured",s.jsxs("span",{style:{display:"inline-flex",gap:8,alignItems:"center"},children:[s.jsx(Lt,{size:"sm",variant:"secondary",disabled:L==="pending",onClick:()=>void E(A),"data-testid":"verify-btn",children:L==="pending"?"Verifying":"Verify"}),L&&L!=="pending"?"error"in L?s.jsx(wt,{tone:"error","data-testid":"verify-result",children:L.error}):s.jsxs("span",{"data-testid":"verify-result","data-verdict":L.verdict,children:[s.jsx(nl,{run:{verdict:L.verdict,tampered:A.tampered}}),L.reasons[0]?s.jsx("span",{style:{marginLeft:8,color:"var(--cp-text-2)",fontSize:12},children:L.reasons[0]}):null]}):null]},"v")]})})]})}const A1={id:"receipts",path:"/receipts",title:"Receipts",component:C1},V0={status:"",verdict:"",repo:"",source:"",q:""},D1="no repo",qs=i=>i.origin_repo??D1,qa=i=>i.status??(i.verdict?"completed":"running"),Us=i=>i.task_source??i.source_id,M1=i=>ke(i)??"none";function w1(i,r){const o=r.q.trim().toLowerCase();return i.filter(f=>!(r.status&&qa(f)!==r.status||r.verdict&&M1(f)!==r.verdict||r.repo&&qs(f)!==r.repo||r.source&&Us(f)!==r.source||o&&![f.run_id,f.source_id,f.origin_repo,f.issue_ref,f.provider,f.model,ke(f)].some(d=>d&&d.toLowerCase().includes(o))))}const G0=(i,r)=>{switch(r){case"started":return i.started_at?Date.parse(i.started_at):null;case"repo":return qs(i);case"source":return Us(i);case"status":return qa(i);case"verdict":return ke(i);case"cost":return i.cost_usd;case"elapsed":return i.elapsed_s??i.wall_s}};function U1(i,r,o){const f=o==="asc"?1:-1;return[...i].sort((d,m)=>{const v=G0(d,r),x=G0(m,r);return v===null&&x===null?0:v===null?1:x===null?-1:(typeof v=="number"&&typeof x=="number"?v-x:String(v).localeCompare(String(x)))*f})}function H1(i){const r=new Map;for(const o of i){const f=qs(o),d=r.get(f)??{repo:f,runs:0,running:0,verified:0,cost:null,unpriced:0};d.runs++,qa(o)==="running"&&d.running++,ka(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 Ro=i=>[...new Set(i)].sort(),B1=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 m=d.body.getReader(),v=new TextDecoder;let x="";for(;;){const{done:E,value:O}=await m.read();if(E)break;x+=v.decode(O,{stream:!0});let R;for(;(R=x.indexOf(`
150
-
151
- `))>=0;){const g=x.slice(0,R);x=x.slice(R+2),/^event: run$/m.test(g)&&i()}}}catch{}r.signal.aborted||await new Promise(f=>setTimeout(f,3e3))}})(),()=>r.abort()},Q0=i=>i===null?"unpriced":`$${i.toFixed(2)}`,L1=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`,q1=i=>i?i.replace("T"," ").slice(0,16):"not measured",k1=[{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"}],Le={padding:"6px 12px",whiteSpace:"nowrap"},$0={...Le,textAlign:"left",fontSize:"var(--cp-text-sm)",textTransform:"uppercase",color:"var(--cp-text-2)",background:"var(--cp-bg-3)"};function Rs({label:i,value:r,options:o,onChange:f}){return s.jsx("span",{"data-testid":`filter-${i.toLowerCase()}`,"data-value":r,children:s.jsx($n,{label:i,value:r||"all",options:[{value:"",label:"All"},...o.map(d=>({value:d,label:d}))],onSelect:f})})}function Y1({subscribe:i=B1}){const[r,o]=z.useState(null),[f,d]=z.useState(null),[m,v]=z.useState(V0),[x,E]=z.useState({key:"started",dir:"desc"}),[O,R]=z.useState(!1),g=z.useCallback(()=>{kl({}).then(B=>{o(B.runs),d(null)},B=>d(B.message))},[]);z.useEffect(()=>{g()},[g]),z.useEffect(()=>i?i(g):void 0,[i,g]);const A=z.useMemo(()=>r??[],[r]),L=z.useMemo(()=>U1(w1(A,m),x.key,x.dir),[A,m,x]),X=z.useMemo(()=>H1(L),[L]),P=B=>G=>v(U=>({...U,[B]:G})),q=JSON.stringify(m)!==JSON.stringify(V0);return f&&r===null?s.jsx(kt,{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(Ga,{"aria-label":"Search runs",placeholder:"Search runs",value:m.q,onChange:B=>P("q")(B.target.value),style:{maxWidth:240}}),s.jsx(Rs,{label:"Status",value:m.status,options:["running","completed"],onChange:P("status")}),s.jsx(Rs,{label:"Verdict",value:m.verdict,options:Ro(A.map(B=>B.verdict??"none")),onChange:P("verdict")}),s.jsx(Rs,{label:"Repo",value:m.repo,options:Ro(A.map(qs)),onChange:P("repo")}),s.jsx(Rs,{label:"Source",value:m.source,options:Ro(A.map(Us)),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:O,onChange:B=>R(B.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:[L.length," of ",A.length," runs"]})]}),O&&L.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(B=>s.jsx("th",{scope:"col",style:$0,children:B},B))})}),s.jsx("tbody",{children:X.map(B=>s.jsxs("tr",{"data-testid":"rollup-row","data-repo":B.repo,style:{borderTop:"1px solid var(--cp-border-light)"},children:[s.jsx("td",{style:Le,children:s.jsx("button",{type:"button",onClick:()=>P("repo")(B.repo),style:{background:"none",border:0,color:"var(--cp-accent)",cursor:"pointer",padding:0,font:"inherit"},children:B.repo})}),s.jsx("td",{style:Le,children:B.runs}),s.jsx("td",{style:Le,children:B.running}),s.jsxs("td",{style:Le,children:[B.verified," of ",B.runs]}),s.jsxs("td",{style:Le,children:[Q0(B.cost),B.cost!==null&&B.unpriced?` (+${B.unpriced} unpriced)`:""]})]},B.repo))})]})}):null,L.length===0?s.jsx(kt,{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:k1.map(B=>s.jsx("th",{scope:"col","aria-sort":x.key===B.key?x.dir==="asc"?"ascending":"descending":"none",style:$0,children:s.jsxs("button",{type:"button","data-testid":`sort-${B.key}`,onClick:()=>E(G=>({key:B.key,dir:G.key===B.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:[B.label,x.key===B.key?x.dir==="asc"?" (asc)":" (desc)":""]})},B.key))})}),s.jsx("tbody",{children:L.map(B=>s.jsxs("tr",{"data-testid":"run-row","data-run":B.run_id,style:{borderTop:"1px solid var(--cp-border-light)"},children:[s.jsx("td",{style:Le,children:s.jsx("a",{href:`#/runs/${encodeURIComponent(B.source_id)}/${encodeURIComponent(B.run_id)}`,style:{color:"var(--cp-accent)",textDecoration:"none"},children:q1(B.started_at)})}),s.jsxs("td",{style:Le,children:[B.origin_repo??s.jsx("span",{style:{color:"var(--cp-text-2)"},children:"no repo"}),B.issue_ref?s.jsxs("span",{style:{color:"var(--cp-text-2)"},children:[" ",B.issue_ref]}):null]}),s.jsx("td",{style:Le,children:Us(B)}),s.jsx("td",{style:Le,children:s.jsx(wt,{tone:qa(B)==="running"?"info":"neutral",pulse:qa(B)==="running",children:qa(B)})}),s.jsx("td",{style:Le,children:B.verdict?s.jsx(nl,{run:B}):s.jsx("span",{style:{color:"var(--cp-text-2)"},children:"none yet"})}),s.jsx("td",{style:Le,children:Q0(B.cost_usd)}),s.jsx("td",{style:Le,children:L1(B.elapsed_s??B.wall_s)})]},`${B.source_id}:${B.run_id}`))})]})})]})}const V1={id:"runs",path:"/runs",title:"Runs",component:Y1,inSettings:!1};async function G1(){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 Q1=i=>i.probe==="timeout"?"installed, version probe timed out":i.installed?i.version?`installed, ${i.version}`:"installed, version not reported":"not installed";function $1(){const[i,r]=z.useState(null),[o,f]=z.useState(null);if(z.useEffect(()=>{let m=!0;return G1().then(v=>m&&r(v)).catch(v=>m&&f(v instanceof Error?v.message:String(v))),()=>{m=!1}},[]),o)return s.jsx(kt,{title:"Could not load providers",hint:o});if(!i)return s.jsx(It,{label:"Detecting provider CLIs"});const d=i.providers.map(m=>[s.jsxs("span",{style:{display:"inline-flex",gap:8,alignItems:"center"},children:[s.jsx(ov,{state:m.installed?"active":"idle",label:m.installed?"installed":"not installed"}),s.jsx("strong",{children:m.id}),m.deprecated?s.jsx(wt,{tone:"warning",children:"deprecated"}):null]},"n"),Q1(m),m.auth_present?s.jsx(wt,{tone:"success",children:"auth present"},"a"):s.jsx(wt,{tone:"neutral",children:"no auth env set"},"a"),m.auth_env_names.length?`${m.auth_env_set.length?m.auth_env_set.join(", "):"none"} (of ${m.auth_env_names.join(", ")})`:"not measured",m.tiers.planning??"not measured",m.tiers.development??"not measured",m.tiers.fast??"not measured"]);return 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(bn,{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 X1={id:"models",path:"/models",title:"Models and providers",component:$1,inSettings:!0};class Mv extends Error{constructor(r,o){super(o),this.status=r}}const Z1=()=>globalThis.LOKI_CONTROL_BASE??"";async function K1(i){const r=xe(),o=await fetch(`${Z1()}/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 Mv(o.status,f.error??`HTTP ${o.status}`);return f}const J1=async()=>(await sv()).repos,Bo="loki:composer-submit",I1=8,F1=()=>[{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"}],W1=i=>i.filter(r=>!r.path.includes(":")).map(r=>({id:`page:${r.id}`,kind:"Pages",label:r.title,hint:r.path,to:r.path})),X0=i=>{const r=Date.parse(i.started_at??i.last_event_at??"");return Number.isNaN(r)?0:r},P1=i=>[...i].sort((r,o)=>X0(o)-X0(r)).map(r=>({id:`run:${r.source_id}/${r.run_id}`,kind:"Runs",label:r.run_id,hint:[r.origin_repo,ke(r)??r.status].filter(Boolean).join(" / ")||void 0,to:`/runs/${encodeURIComponent(r.source_id)}/${encodeURIComponent(r.run_id)}`})),tb=(i,r)=>{const o=`${i.label} ${i.hint??""}`.toLowerCase();return r.split(/\s+/).filter(Boolean).every(f=>o.includes(f))};function eb(i,r,o,f){const d=i.trim().toLowerCase(),m=v=>d?v.filter(x=>tb(x,d)):v;return[...m(f),...m(r),...m(o).slice(0,I1)]}const lb=["claude","codex","cline","aider","opencode"],nb=["opus","sonnet","haiku"],ab=["1","5","10","25","50"],ub=/^https:\/\/github\.com\/([A-Za-z0-9][A-Za-z0-9._-]*)\/([A-Za-z0-9._-]+)\/issues\/([1-9][0-9]*)\/?$/;function ib(i){const r=i.trim(),o=ub.exec(r);return o?`${o[1]}/${o[2]}#${o[3]}`:r}function sb(i,r){const o={target:ib(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 cb(i){return i instanceof Mv?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 Cs=(i,r)=>[{value:"",label:r},...i.map(o=>({value:o,label:o}))];function rb(){const[i,r]=z.useState(""),[o,f]=z.useState({}),[d,m]=z.useState(null),[v,x]=z.useState(!1),[E,O]=z.useState(null),[R,g]=z.useState(null),A=z.useRef(null),L=U=>$=>f(K=>({...K,[U]:$||void 0}));z.useEffect(()=>{var $;let U=!0;return J1().then(K=>U&&m(K)).catch(()=>U&&m([])),($=A.current)==null||$.focus(),()=>{U=!1}},[]);const X=E!==null,P=z.useRef(!1),q=async()=>{if(P.current||X||!i.trim())return;P.current=!0;const U=sb(i,o);g(null),O(U.target);try{await K1(U),location.hash="#/runs"}catch($){O(null),g(cb($))}finally{P.current=!1}},B=z.useRef(q);B.current=q,z.useEffect(()=>{const U=()=>{B.current()};return window.addEventListener(Bo,U),()=>window.removeEventListener(Bo,U)},[]);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:[E===null&&!i?s.jsx(kt,{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,E!==null?s.jsx("div",{"data-testid":"optimistic-row",children:s.jsx(Bl,{icon:s.jsx(It,{size:14,label:"Starting"}),title:E,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:U=>r(U.target.value),onKeyDown:U=>{U.key==="Enter"&&(U.metaKey||U.ctrlKey)&&(U.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($n,{label:"repo",value:o.repo??"server directory",options:Cs(d??[],"server directory"),onSelect:L("repo")})}),s.jsx("span",{"data-testid":"chip-model",children:s.jsx($n,{label:"model",value:o.model??"default",options:Cs(nb,"default"),onSelect:L("model")})}),s.jsx("span",{"data-testid":"chip-provider",children:s.jsx($n,{label:"provider",value:G?"set per repo":o.provider??"default",options:G?void 0:Cs(lb,"default"),onSelect:L("provider")})}),s.jsx("span",{"data-testid":"chip-budget",children:s.jsx($n,{label:"budget",value:G?"set per repo":o.budget?`$${o.budget}`:"none",options:G?void 0:Cs(ab.map(String),"none").map(U=>({...U,label:U.value?`$${U.value}`:U.label})),onSelect:L("budget")})}),s.jsx("span",{"data-testid":"chip-workspace",onClick:()=>x(U=>!U),children:s.jsx($n,{label:"workspace",value:o.workspace??"none"})}),v?s.jsx("input",{"data-testid":"workspace-input","aria-label":"Workspace name from loki.yaml",placeholder:"name from loki.yaml",value:o.workspace??"",onChange:U=>L("workspace")(U.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(Lt,{"data-testid":"composer-submit",disabled:X||!i.trim(),onClick:()=>void q(),children:["Start ",s.jsx(vv,{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,R?s.jsx("div",{"data-testid":"composer-error",style:{marginTop:12},children:s.jsx(Hx,{tone:"error",onClose:()=>g(null),children:R})}):null]})}const ob={id:"compose",path:"/new",title:"New run",component:rb},fb=()=>globalThis.LOKI_CONTROL_BASE??"";async function db(i,r,o){const f=xe(),d={"content-type":"application/json"};f&&(d.authorization=`Bearer ${f}`);const m=await fetch(`${fb()}/v1/runs/${encodeURIComponent(i)}/${encodeURIComponent(r)}/${o}`,{method:"POST",headers:d,body:"{}"}),v=await m.json().catch(()=>({}));if(!m.ok)throw new Error(v.error??`HTTP ${m.status}`)}const hb={stop:"Stopping...",retry:"Retrying...",resume:"Resuming..."},mb={stop:"Stop signal sent.",retry:"Retry started as a new run.",resume:"Resume started."};function vb({source:i,run:r,status:o,onChanged:f}){const[d,m]=z.useState(!1),[v,x]=z.useState(null),[E,O]=z.useState(!1),[R,g]=z.useState(!1),[A,L]=z.useState(null),X=o.trim().toUpperCase(),P=v==="stop"||E,q=!P&&(v==="resume"||R||X==="RUNNING"),B=X==="BLOCKED"&&!q&&!P,G=async U=>{if(!v){m(!1),L(null),x(U);try{await db(i,r,U),U==="stop"&&O(!0),U==="resume"&&g(!0),L({tone:"ok",text:mb[U]}),f==null||f()}catch($){L({tone:"error",text:$.message})}finally{x(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&&!v&&!d?s.jsx(Lt,{variant:"danger",size:"sm",onClick:()=>m(!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(Lt,{variant:"danger",size:"sm",onClick:()=>void G("stop"),children:"Confirm stop"}),s.jsx(Lt,{variant:"ghost",size:"sm",onClick:()=>m(!1),children:"Cancel"})]}):null,B&&!v?s.jsx(Lt,{size:"sm",onClick:()=>void G("resume"),children:"Resume"}):null,!q&&!P&&!v&&X!==""?s.jsx(Lt,{variant:"secondary",size:"sm",onClick:()=>void G("retry"),children:"Retry"}):null,v?s.jsx("span",{role:"status",children:hb[v]}):null,!v&&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 gb=new Set(["that","this","with","from","when","should","must","will","have","into","then","than","each","which","their","there","about"]),Vu=i=>new Set((i.toLowerCase().match(/[a-z0-9]{4,}/g)??[]).filter(r=>!gb.has(r))),Yu=(i,r)=>{for(const o of i)if(r.has(o))return!0;return!1},Co=i=>Vu(i.replace(/[/.]/g," "));function Ao(i){if(i===null)return null;try{return JSON.parse(i)}catch{return null}}function pb(i){const r=i&&typeof i=="object"?i:{},f=(typeof r.body=="string"?r.body:"").split(/\r?\n/),d=f.map(E=>{var O,R;return(R=(O=/^\s*[-*]\s*\[[ xX]\]\s*(.+)$/.exec(E))==null?void 0:O[1])==null?void 0:R.trim()}).filter(E=>!!E);if(d.length)return{list:d,source:"checklist"};const m=[];let v=!1;for(const E of f)if(/^\s*#{1,6}\s/.test(E)||/^\s*\*\*[^*]+\*\*:?\s*$/.test(E))v=/accept|requirement|criteri|expected|done when/i.test(E);else if(v){const O=/^\s*(?:[-*]|\d+[.)])\s+(.+)$/.exec(E);O!=null&&O[1]&&m.push(O[1].trim())}if(m.length)return{list:m,source:"checklist"};const x=typeof r.title=="string"?r.title.trim():"";return x?{list:[x],source:"title"}:{list:[],source:"none"}}function yb(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 m=d.replace(/^\s*(?:[-*]|\d+[.)])\s*/,"").trim();m&&f.push({text:m,files:[],checks:[]});continue}if(d&&typeof d=="object"){const m=d,v=[m.title,m.step,m.description,m.text].find(O=>typeof O=="string"&&O.trim()!=="");if(!v)continue;const x=Array.isArray(m.files)?m.files.filter(O=>typeof O=="string"):[],E=Array.isArray(m.checks)?m.checks.filter(O=>typeof O=="string"):[];f.push({text:v.trim(),files:x,checks:E,...typeof m.criterion=="string"?{criterion:m.criterion}:{}})}}return f}function xb(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 bb(i,r){return i?ke({...i,verdict:i.verdict??(r==null?void 0:r.verdict)??null}):null}function Sb(i){var g,A,L,X,P;const{list:r,source:o}=pb(i.issue),f=yb(i.plan),d=((g=i.receipt)==null?void 0:g.checks)??[],m=i.run?ke({...i.run,verdict:i.run.verdict??((A=i.receipt)==null?void 0:A.verdict)??null}):null,v=(L=i.receipt)==null?void 0:L.verdict,x=m===mt.VERIFIED&&(v==null||v===mt.VERIFIED),E=[...new Set([...i.changedFiles,...((P=(X=i.receipt)==null?void 0:X.wall)==null?void 0:P.files)??[]])],O=new Set;return{rows:r.map(q=>{const B=Vu(q),G=f.filter(at=>at.criterion?at.criterion.trim()===q:Yu(B,Vu(at.text))),U=new Set;for(const at of G){for(const he of at.files)U.add(he);const de=Vu(at.text);for(const he of E)Yu(de,Co(he))&&U.add(he)}for(const at of E)Yu(B,Co(at))&&U.add(at);const $=[...U];$.forEach(at=>O.add(at));const K=at=>at.name.trim().toLowerCase(),Et=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=Vu(`${at.name} ${at.cmd??""}`);return Et(at)||Yu(B,de)||$.some(he=>Yu(Co(he),de))}),rt=ut.filter(Et),Ne=ut.filter(at=>!Et(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")?x?fe="proven":Kt=`verdict is ${m!==mt.VERIFIED?m??"unknown (run record unavailable)":v}`:Kt="a linked check did not run":Kt="no receipt for this run",{criterion:q,steps:G.map(at=>at.text),files:$,evidence:rt,inferred:Ne,status:fe,note:Kt}}),unmapped_files:E.filter(q=>!O.has(q)),criteria_source:o}}async function jb(i,r,o,f){const[d,m,v,x]=await Promise.all(["issue.json","plan.json","receipt.json","diff.patch"].map(g=>Tv(i,r,g))),E=Ao(v??null),O=Ao(d??null),R=Ao(m??null);return{matrix:Sb({issue:O,plan:R,receipt:E,changedFiles:xb(x??null),run:f}),stages:o,verdict:bb(f,E),have:{issue:O!==null,plan:R!==null,receipt:E!==null}}}const Eb={proven:"success",failed:"error","not proven":"warning"},Gu={fontFamily:"var(--cp-font-mono)",fontSize:12,wordBreak:"break-all"},Do=s.jsx("span",{style:{color:"var(--cp-text-2)"},children:"none"});function wv({params:i}){const r=i.source,o=i.run;return!r||!o?s.jsx(Tb,{}):s.jsx(_b,{source:r,run:o})}function Tb(){const[i,r]=z.useState(null),[o,f]=z.useState(null);return z.useEffect(()=>{let d=!0;return kl().then(m=>d&&r(m.runs),m=>d&&f(m.message)),()=>{d=!1}},[]),o?s.jsx(kt,{title:"Plans unavailable",hint:o}):i?i.length?s.jsx("div",{"data-testid":"plans-picker",children:s.jsx(bn,{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:Gu,"data-testid":"plans-pick",children:d.run_id},"a"),d.verdict?s.jsx(nl,{run:d},"v"):"running",d.started_at??"not measured"])})}):s.jsx(kt,{title:"No runs yet",hint:"Start a run to see its plan and traceability here."}):s.jsx(It,{label:"Loading runs"})}function _b({source:i,run:r}){var R;const[o,f]=z.useState(null),[d,m]=z.useState(null);if(z.useEffect(()=>{let g=!0;return f(null),(async()=>{const A=await Hs(i,r).catch(()=>null);return jb(i,r,(A==null?void 0:A.stages)??null,A)})().then(A=>g&&f(A),A=>g&&m(A.message)),()=>{g=!1}},[i,r]),d)return s.jsx(kt,{title:"Plan unavailable",hint:d});if(!o)return s.jsx(It,{label:"Loading plan"});const{matrix:v,have:x}=o,E=["issue","plan","receipt"].filter(g=>!x[g]),O=v.rows.filter(g=>g.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:[v.rows.length?`${O} of ${v.rows.length} criteria proven`:"not measured: no criteria",o.verdict?` - verdict ${o.verdict}`:x.receipt?" - verdict unavailable":" - no receipt"]}),E.length?s.jsxs("div",{"data-testid":"plans-missing",style:{color:"var(--cp-text-2)"},children:["not available: ",E.map(g=>`${g}.json`).join(", ")]}):null]}),(R=o.stages)!=null&&R.length?s.jsx(Ux,{stages:o.stages.map(g=>({label:g.stage,status:g.status==="completed"?"success":g.status==="failed"?"error":"pending"}))}):null,v.rows.length===0?s.jsx(kt,{title:"No requirements found",hint:"issue.json has no title or acceptance criteria for this run."}):s.jsx(bn,{caption:"Traceability matrix",columns:["Requirement","Plan step","Files changed","Evidence","Verdict"],rows:v.rows.map(g=>[g.criterion,g.steps.length?s.jsx("ol",{style:{margin:0,paddingLeft:16},children:g.steps.map(A=>s.jsx("li",{children:A},A))},"s"):Do,g.files.length?s.jsx("div",{style:Gu,children:g.files.map(A=>s.jsx("div",{children:A},A))},"f"):Do,g.evidence.length||g.inferred.length?s.jsxs("div",{children:[g.evidence.map(A=>s.jsxs("div",{style:Gu,children:[A.result,": ",A.name]},A.name)),g.inferred.map(A=>s.jsxs("div",{"data-testid":"inferred-hint",style:{...Gu,color:"var(--cp-text-2)"},children:["inferred, not recorded: ",A.result,": ",A.name]},`i-${A.name}`))]},"e"):Do,s.jsxs("span",{"data-testid":"row-status","data-status":g.status,children:[s.jsx(wt,{tone:Eb[g.status],children:g.status==="not proven"?g.note==="link inferred"?"NOT PROVEN (link inferred)":"NOT PROVEN":g.status.toUpperCase()}),g.note?s.jsx("div",{style:{color:"var(--cp-text-2)",fontSize:12},children:g.note}):null]},"v")])}),v.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:Gu,children:v.unmapped_files.map(g=>s.jsx("div",{children:g},g))})]}):null]})}const Nb={id:"plans",path:"/plans/:source/:run",title:"Plans",component:wv},zb={id:"plans-picker",path:"/plans",title:"Plans",component:wv},Uv=()=>globalThis.LOKI_CONTROL_BASE??"",Lo=i=>{const r=xe();return{...i?{"content-type":"application/json"}:{},...r?{authorization:`Bearer ${r}`}:{}}};async function Z0(i,r){const o=await fetch(`${Uv()}${i}`,r),f=await o.json().catch(()=>({}));if(!o.ok)throw new Error(f.error??`HTTP ${o.status}`);return f}async function Ob(i){const r=await fetch(`${Uv()}/v1/merge/run`,{method:"POST",headers:Lo(!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 As(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 Rb(){const[i,r]=z.useState(null),[o,f]=z.useState(null),[d,m]=z.useState(""),[v,x]=z.useState(!1),[E,O]=z.useState(null),[R,g]=z.useState(null),[A,L]=z.useState(!1),[X,P]=z.useState(null),q=z.useCallback(async()=>{try{const K=await Z0("/v1/merge/queue",{headers:Lo(!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))}},[]);z.useEffect(()=>{q()},[q]);const B=/^[0-9]{1,7}$/.test(d.trim()),G=async()=>{x(!0),O(null);try{await Z0("/v1/merge/queue",{method:"POST",headers:Lo(!0),body:JSON.stringify({prs:[d.trim()]})}),O({tone:"success",text:`Queued PR #${d.trim()}`}),m(""),await q()}catch(K){O({tone:"error",text:K instanceof Error?K.message:String(K)})}x(!1)},U=async K=>{x(!0),O(null),L(!1);try{const Et=await Ob(K);K?(g(Et),P(null)):(P(Et),g(null)),await q()}catch(Et){O({tone:"error",text:Et instanceof Error?Et.message:String(Et)})}x(!1)},$=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(kt,{title:"Queue not measured",hint:o}):i===null?s.jsx(It,{label:"Reading the queue"}):$?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(Ga,{"aria-label":"PR number",inputMode:"numeric",placeholder:"PR number",value:d,onChange:K=>m(K.target.value.replace(/[^0-9]/g,"").slice(0,7))}),s.jsx(Lt,{variant:"secondary",disabled:!B||v,onClick:G,children:"Add"})]})]})}),s.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[s.jsx(Lt,{variant:"secondary",disabled:v||$||i===null,onClick:()=>U(!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(Lt,{variant:"danger",disabled:v,onClick:()=>U(!1),children:"Confirm merge"}),s.jsx(Lt,{variant:"ghost",onClick:()=>L(!1),children:"Cancel"})]}):s.jsx(Lt,{disabled:v||$||i===null,onClick:()=>L(!0),children:"Merge queue"}),v?s.jsx(It,{label:"Working"}):null]}),E?s.jsx(wt,{tone:E.tone,children:E.text}):null,R?s.jsxs(qt,{children:[s.jsx("strong",{children:"Plan (dry run, nothing changed)"}),As(R)?s.jsx("p",{role:"alert",style:{margin:"4px 0"},children:As(R)}):null,s.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap"},children:R.lines.join(`
152
- `)||"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"}),As(X)?s.jsx("p",{role:"alert",style:{margin:"4px 0"},children:As(X)}):null,s.jsx("pre",{style:{margin:0,whiteSpace:"pre-wrap"},children:X.lines.join(`
153
- `)})]}):null]})}const Cb={id:"merge",path:"/merge",title:"Merge queue",component:Rb},Ab=()=>globalThis.LOKI_CONTROL_BASE??"",Db=i=>i==="low"?"success":i==="medium"?"warning":i==="high"||i==="critical"?"error":"neutral";function Mb(){const[i,r]=z.useState("pr"),[o,f]=z.useState(""),[d,m]=z.useState(!1),[v,x]=z.useState(null),E=i==="staged"||(i==="pr"?/^[0-9]{1,7}$/.test(o):/^[A-Za-z0-9._/][A-Za-z0-9._/-]{0,99}$/.test(o)),O=async()=>{m(!0);const R=i==="staged"?"staged=1":`${i}=${encodeURIComponent(o)}`;try{const g=xe(),A=await fetch(`${Ab()}/v1/review/risk?${R}`,{headers:g?{authorization:`Bearer ${g}`}:{}}),L=await A.json().catch(()=>null);x(A.ok&&L&&L.measured===!0&&typeof L.score=="number"?L:{measured:!1,reason:(L==null?void 0:L.error)??(L==null?void 0:L.reason)??`HTTP ${A.status}`})}catch(g){x({measured:!1,reason:g instanceof Error?g.message:String(g)})}m(!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:R=>{r(R.target.value),f(""),x(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(Ga,{"aria-label":i==="pr"?"PR number":"Git ref",placeholder:i==="pr"?"PR number":"HEAD~5",value:o,onChange:R=>f(R.target.value)}):null,s.jsx(Lt,{disabled:!E||d,onClick:O,children:"Measure risk"}),d?s.jsx(It,{label:"Scoring"}):null]}),v&&v.measured?s.jsxs(s.Fragment,{children:[s.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[s.jsx(yl,{label:"Risk score",value:`${v.score}/100`}),s.jsx(wt,{tone:Db(v.level),children:v.level}),s.jsx("small",{children:v.source}),s.jsx("small",{children:typeof v.files=="number"?`${v.files} files`:"files: not measured"})]}),s.jsx(bn,{caption:"Risk factors",columns:["Factor","Points","Detail"],rows:v.factors.map(R=>[R.factor,`${R.points}/${R.max}`,R.detail])})]}):v?s.jsxs(qt,{children:[s.jsx("strong",{children:"Risk score: not measured"}),s.jsx("br",{}),s.jsx("small",{children:v.reason??"no reason reported"})]}):null]})}const wb={id:"risk",path:"/risk",title:"PR risk",component:Mb},Hv=()=>globalThis.LOKI_CONTROL_BASE??"",Bv=(i={})=>{const r=xe();return r?{...i,authorization:`Bearer ${r}`}:i};class Va extends Error{constructor(r,o,f){super(r),this.status=o,this.details=f}}async function Lv(){const i=await fetch(`${Hv()}/v1/config`,{headers:Bv()}),r=await i.json().catch(()=>({}));if(!i.ok)throw new Va(r.error??`HTTP ${i.status}`,i.status,[]);return{exists:!!r.exists,etag:r.etag??"",config:r.config??{},errors:r.errors??[]}}async function qv(i,r){const o=await fetch(`${Hv()}/v1/config`,{method:"PUT",headers:Bv({"content-type":"application/json","if-match":r}),body:JSON.stringify({config:i})}),f=await o.json().catch(()=>({}));if(!o.ok)throw new Va(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})`,Ub=[{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"}]}],pn=i=>typeof i=="object"&&i!==null&&!Array.isArray(i);function Ds(i){const r={},o=pn(i)&&pn(i.workspaces)?i.workspaces:{};for(const[f,d]of Object.entries(o))pn(d)&&(pn(d.integration)&&"command"in d.integration&&(r[`${f} integration command`]=String(d.integration.command)),Array.isArray(d.repos)&&d.repos.forEach((m,v)=>{pn(m)&&"setup"in m&&(r[`${f} setup for repo ${v+1}`]=String(m.setup))}));return r}const Hb=(i,r)=>r.reduce((o,f)=>pn(o)?o[f]:void 0,i);function kv(i,r,o){const f={...i},[d,...m]=r;if(d===void 0)return f;if(m.length===0)return o===void 0?delete f[d]:f[d]=o,f;const v=kv(pn(f[d])?f[d]:{},m,o);return Object.keys(v).length===0?delete f[d]:f[d]=v,f}function Bb(i,r){return r==null?"":i.kind==="lines"?Array.isArray(r)?r.join(`
154
- `):"":i.kind==="json"?JSON.stringify(r,null,2):String(r)}function Lb(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(`
155
- `).map(f=>f.trim()).filter(Boolean)};if(i.kind==="json")try{const f=JSON.parse(o);return pn(f)?{value:f}:{error:`${i.label} must be a JSON object`}}catch{return{error:`${i.label} is not valid JSON`}}return{value:o}}function qb({section:i,state:r,onSave:o}){const f=i.fields.map(q=>Bb(q,Hb(r.config,q.path))),[d,m]=z.useState(f),[v,x]=z.useState([]),[E,O]=z.useState(!1),[R,g]=z.useState(!1),A=z.useId(),L=JSON.stringify(f);z.useEffect(()=>{m(f),x([])},[L]);const X=d.some((q,B)=>q!==f[B]),P=async()=>{const q=[];let B=r.config;if(i.fields.forEach((G,U)=>{const $=Lb(G,d[U]??"");$.error?q.push($.error):B=kv(B,G.path,$.value)}),q.length){x(q);return}if(JSON.stringify(Ds(B))!==JSON.stringify(Ds(r.config))){x(["Edit shell commands in loki.yaml directly"]);return}O(!0),x([]),g(!1);try{await o(B),g(!0)}catch(G){x(G instanceof Va?[G.message,...G.details]:[G.message])}finally{O(!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,B)=>{const G=`${A}-${B}`,U=K=>{g(!1),m(Et=>Et.map((ut,rt)=>rt===B?K:ut))},$={id:G,value:d[B]??"","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",{...$,onChange:K=>U(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(dv,{...$,rows:q.kind==="json"?8:4,spellCheck:!1,onChange:K=>U(K.target.value),style:q.kind==="json"?{fontFamily:Ht("font-mono")}:void 0}):s.jsx(Ga,{...$,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=>U(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(Ds(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(Ds(r.config)).map(([q,B])=>s.jsxs("li",{children:[q,": ",B]},q))})]}):null,v.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:v.map(q=>s.jsx("li",{children:q},q))}):null,s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:12},children:[s.jsx(Lt,{disabled:!X||E,onClick:P,children:E?"Saving":"Save"}),R&&!X?s.jsx(wt,{tone:"success",children:"Saved"}):null]})]})}function kb(){const[i,r]=z.useState(null),[o,f]=z.useState(null),d=()=>{f(null),Lv().then(r,v=>f(v.message))};if(z.useEffect(d,[]),o)return s.jsx(kt,{title:"Configuration unavailable",hint:o,action:s.jsx(Lt,{variant:"secondary",onClick:d,children:"Retry"})});if(!i)return s.jsx(It,{label:"Loading configuration"});const m=async v=>{try{const x=await qv(v,i.etag);r({exists:!0,etag:x.etag,config:x.config,errors:[]})}catch(x){throw x instanceof Va&&x.status===409?new Va("loki.yaml changed on disk since it was loaded. Reload to see the latest, then apply your edit again.",409,[]):x}};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(v=>s.jsx("li",{children:v},v))})]}):null,Ub.map(v=>s.jsx(qb,{section:v,state:i,onSave:m},v.id)),s.jsx("div",{children:s.jsx(Lt,{variant:"ghost",size:"sm",onClick:d,children:"Reload from disk"})})]})}const Yb={id:"settings-config",path:"/settings/config",title:"Configuration",component:kb,inSettings:!0},Mo=i=>typeof i=="object"&&i!==null&&!Array.isArray(i),Qu=i=>i.replace(/[\\/]+$/,"").split(/[\\/]/).pop()??i;function Vb(i){const r=Mo(i)&&Mo(i.workspaces)?i.workspaces:{};return Object.entries(r).map(([o,f])=>({name:o,def:Mo(f)?f:{}}))}const Gb=(i,r)=>{const o=r.origin_repo;return o?i.repo&&(o===i.repo||o.endsWith(`/${i.repo}`)||Qu(o)===Qu(i.repo))?!0:!!i.path&&Qu(o)===Qu(i.path):!1},K0=i=>i.started_at??"";function Qb(i,r){return Vb(i).map(({name:o,def:f})=>{const d=(Array.isArray(f.repos)?f.repos:[]).map(E=>{const O=r.filter(R=>Gb(E,R)).sort((R,g)=>K0(g).localeCompare(K0(R)));return{name:E.repo??(E.path?Qu(E.path):"unnamed"),path:E.path??null,after:Array.isArray(E.after)?E.after:[],shell:typeof E.setup=="string",latest:O[0]??null,runs:O.length}}),m=d.filter(E=>E.latest),v=d.length&&m.length===d.length?{total:d.length,verified:m.filter(E=>ka(E.latest)).length,failed:m.filter(E=>E.latest.verdict!==null&&!ka(E.latest)).length,running:m.filter(E=>E.latest.verdict===null).length}:null,x=!!f.integration&&typeof f.integration.command=="string";return{name:o,repos:d,shell:x||d.some(E=>E.shell),integrationShell:x,status:v}})}const Yv=()=>globalThis.LOKI_CONTROL_BASE??"",$b=()=>{const i=xe();return i?{"content-type":"application/json",authorization:`Bearer ${i}`}:{"content-type":"application/json"}};async function Xb(){const i=xe(),r=await fetch(`${Yv()}/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 Zb(i,r){const o=await fetch(`${Yv()}/v1/runs`,{method:"POST",headers:$b(),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 Kb({name:i}){const[r,o]=z.useState(""),[f,d]=z.useState(null),[m,v]=z.useState(!1),x=async()=>{v(!0),d(null);try{const E=await Zb(i,r.trim());d({ok:!0,text:`Started: ${E.command} (pid ${E.pid})`})}catch(E){d({ok:!1,text:E instanceof Error?E.message:String(E)})}finally{v(!1)}};return s.jsxs("div",{style:{display:"grid",gap:8},children:[s.jsxs("div",{style:{display:"flex",gap:8},children:[s.jsx(Ga,{"aria-label":`Target for ${i}`,placeholder:"owner/repo#123 or a short task",value:r,onChange:E=>o(E.target.value)}),s.jsx(Lt,{disabled:m||!r.trim(),onClick:x,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 Jb({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(nl,{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(bn,{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(Kb,{name:i.name})]})})}function Ib(){const[i,r]=z.useState(null),[o,f]=z.useState([]),[d,m]=z.useState(null);return z.useEffect(()=>{let v=!0;return(async()=>{try{const{config:x,errors:E}=await Xb();let O=[];try{O=(await kl()).runs}catch{}v&&(r(Qb(x,O)),f(E))}catch(x){v&&m(x instanceof Error?x.message:String(x))}})(),()=>{v=!1}},[]),d?s.jsx(kt,{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(v=>s.jsx(Jb,{w:v},v.name))]}):s.jsx(kt,{title:"No workspaces",hint:"Define workspaces in loki.yaml to run a group of repos together."}):s.jsx(It,{label:"Loading workspaces"})}const Fb={id:"workspaces",path:"/workspaces",title:"Workspaces",component:Ib},Wb=()=>globalThis.LOKI_CONTROL_BASE??"";async function Pb(){const i=xe(),r=await fetch(`${Wb()}/v1/integrations`,{headers:i?{authorization:`Bearer ${i}`}:{}});if(!r.ok)throw new Error(`HTTP ${r.status}`);return(await r.json()).integrations}const tS=i=>typeof i=="object"&&i!==null&&!Array.isArray(i);function Vv(i,r,o){const[f,...d]=r;return f===void 0?i:{...i,[f]:d.length?Vv(tS(i[f])?i[f]:{},d,o):o}}const eS={connected:"success",not_connected:"neutral",not_measured:"neutral"},lS={connected:"connected",not_connected:"not connected",not_measured:"not measured"};function nS({row:i,onChanged:r}){const[o,f]=z.useState(i.env_name??""),[d,m]=z.useState(!1),[v,x]=z.useState(null),E=/^[A-Z_][A-Z0-9_]*$/.test(o),O=async()=>{if(!(!i.config_path||!E)){m(!0),x(null);try{const R=await Lv();await qv(Vv(R.config,i.config_path.split("."),o),R.etag),x(`Saved ${o} to loki.yaml`),r()}catch(R){x(R instanceof Va?[R.message,...R.details].join(": "):R.message)}finally{m(!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:eS[i.status],children:lS[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(Ga,{"aria-label":`${i.label} variable name`,value:o,placeholder:"ENV_VAR_NAME",autoComplete:"off",spellCheck:!1,onChange:R=>{f(R.target.value.trim()),x(null)},style:{fontFamily:"var(--cp-font-mono)"}}),s.jsx(Lt,{onClick:O,disabled:d||!E||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&&!E?s.jsx("small",{role:"alert",children:"Use an environment variable name such as GITHUB_TOKEN, never the secret itself."}):null,v?s.jsx("small",{role:"status",style:{display:"block",marginTop:4},children:v}):null]})}function aS(){const[i,r]=z.useState(null),[o,f]=z.useState(null),d=z.useCallback(()=>{Pb().then(r).catch(m=>f(m instanceof Error?m.message:String(m)))},[]);return z.useEffect(d,[d]),o?s.jsx(kt,{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(m=>s.jsx(nS,{row:m,onChanged:d},m.id))]}):s.jsx(It,{label:"Probing integrations"})}const uS={id:"integrations",path:"/integrations",title:"Integrations",component:aS,inSettings:!0},iS=_v.component,J0={..._v,component:({params:i})=>s.jsx(iS,{source:i.source,run:i.run,renderSlot:(r,o)=>s.jsx(vb,{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 I0(i){const r=i.component;return{...i,component:()=>s.jsx(r,{})}}function sS(){H0("run-detail"),H0("new-run"),qe(I0({...j1,path:"/"})),qe({...J0,id:"run-short",path:"/r/:source/:run"}),qe(J0),qe(Nb),qe(zb);for(const i of[Wx,N1,A1,V1,X1,ob,Cb,wb,Yb,Fb,uS])qe(I0(i))}let qo=null;function F0(i){qo=i}function cS(){return qo?(qo(),!0):!1}const oe=i=>`var(--cp-${i})`,W0=i=>{location.hash=`#${i}`};function rS(){const[i,r]=z.useState(!1),[o,f]=z.useState(""),[d,m]=z.useState(0),[v,x]=z.useState([]),[E,O]=z.useState(null),R=z.useRef(null),g=z.useId(),A=z.useSyncExternalStore(Ev,Ms,Ms),L=()=>{r(!1),f(""),m(0)};z.useEffect(()=>(F0(()=>r(U=>!U)),()=>F0(null)),[]),z.useEffect(()=>{if(!i)return;let U=!0;return O(null),kl().then($=>{U&&x($.runs)},$=>{U&&O($.message)}),queueMicrotask(()=>{var $;return($=R.current)==null?void 0:$.focus()}),()=>{U=!1}},[i]),z.useEffect(()=>{const U=$=>{const K=$.metaKey||$.ctrlKey,Et=$.key.toLowerCase();$.key==="Escape"&&i?($.preventDefault(),L()):K&&$.key==="Enter"?($.preventDefault(),window.dispatchEvent(new CustomEvent(Bo)),i&&L()):K&&!$.shiftKey&&Et==="n"?($.preventDefault(),W0("/new"),i&&L()):K&&$.shiftKey&&Et==="d"&&($.preventDefault(),Ho())};return window.addEventListener("keydown",U),()=>window.removeEventListener("keydown",U)},[i]);const X=z.useMemo(()=>eb(o,W1(jv()),P1(v),F1()),[o,v,A]),P=Math.min(d,Math.max(0,X.length-1)),q=U=>{U.action==="toggle-theme"?Ho():U.to&&W0(U.to),L()},B=U=>{if(U.key==="ArrowDown")U.preventDefault(),m(X.length?(P+1)%X.length:0);else if(U.key==="ArrowUp")U.preventDefault(),m(X.length?(P-1+X.length)%X.length:0);else if(U.key==="Home")U.preventDefault(),m(0);else if(U.key==="End")U.preventDefault(),m(Math.max(0,X.length-1));else if(U.key==="Enter"&&!(U.metaKey||U.ctrlKey)){U.preventDefault();const $=X[P];$&&q($)}};if(!i)return null;let G="";return s.jsx("div",{"data-testid":"palette-backdrop",onClick:L,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:U=>U.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:R,role:"combobox","aria-expanded":"true","aria-controls":g,"aria-autocomplete":"list","aria-label":"Search pages, runs and actions","aria-activedescendant":X[P]?`${g}-${P}`:void 0,value:o,onChange:U=>{f(U.target.value),m(0)},onKeyDown:B,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:g,role:"listbox","aria-label":"Results",style:{listStyle:"none",margin:0,padding:6,maxHeight:"50vh",overflowY:"auto"},children:X.map((U,$)=>{const K=U.kind!==G?U.kind:null;return G=U.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:`${g}-${$}`,role:"option","aria-selected":$===P,onMouseMove:()=>m($),onClick:()=>q(U),style:{display:"flex",justifyContent:"space-between",gap:12,padding:"8px 10px",borderRadius:oe("radius-md"),cursor:"pointer",background:$===P?oe("bg-3"):"transparent"},children:[s.jsx("span",{children:U.label}),U.hint&&s.jsx("span",{style:{color:oe("text-2"),fontSize:oe("text-sm")},children:U.hint.startsWith("Cmd")?s.jsx(vv,{children:U.hint}):U.hint})]})]},U.id)})}),X.length===0&&s.jsx("p",{role:"status",style:{margin:0,padding:"14px 16px",color:oe("text-2")},children:"No matches"}),E&&s.jsxs("p",{role:"alert",style:{margin:0,padding:"8px 16px",color:oe("error"),fontSize:oe("text-sm")},children:["Recent runs not loaded: ",E]})]})})}const P0=i=>Date.parse(i.started_at??i.last_event_at??""),tv=i=>{const r=new Date(i);return r.setHours(0,0,0,0),r.getTime()};function oS(i,r){const o=tv(r),f=tv(o-1),d={Today:[],Yesterday:[],Earlier:[]};for(const x of i){const E=P0(x),O=Number.isNaN(E)?"Earlier":E>=o?"Today":E>=f?"Yesterday":"Earlier";d[O].push(x)}const m=x=>{const E=P0(x);return Number.isNaN(E)?-1/0:E},v=[];for(const x of["Today","Yesterday","Earlier"])d[x].length&&v.push({name:x,runs:d[x].sort((E,O)=>m(O)-m(E))});return v}function fS({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 Ot=i=>`var(--cp-${i})`;function dS(){var o;const[i,r]=z.useState(((o=globalThis.location)==null?void 0:o.hash)??"");return z.useEffect(()=>{const f=()=>r(location.hash);return f(),addEventListener("hashchange",f),()=>removeEventListener("hashchange",f)},[]),i}function hS(){const[i,r]=z.useState({runs:null,error:null}),o=z.useCallback(()=>{kl({}).then(f=>r({runs:f.runs,error:null}),f=>r(d=>({runs:d.runs,error:f.message})))},[]);return z.useEffect(()=>(o(),cv(o)),[o]),i}const mS=i=>i.status==="running"||!i.verdict&&!i.ended_at?"active":i.verdict===mt.FAILED||ke(i)===mt.TAMPERED?"error":"idle",vS=i=>i.issue_ref??i.run_id,Gv=i=>`#/runs/${encodeURIComponent(i.source_id)}/${encodeURIComponent(i.run_id)}`;function gS({run:i,active:r,onNavigate:o}){const f={display:"flex",alignItems:"center",gap:8,padding:"7px 12px",borderRadius:Ot("radius-nav"),textDecoration:"none",color:Ot(r?"accent":"text"),background:r?Ot("accent-glow"):"transparent",fontSize:Ot("text-md")};return s.jsxs("a",{"data-testid":"session-row",href:Gv(i),"aria-current":r?"page":void 0,onClick:o,style:f,children:[s.jsx(ov,{state:mS(i)}),s.jsxs("span",{style:{minWidth:0,flex:1},children:[s.jsx("span",{style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:vS(i)}),i.origin_repo?s.jsx("span",{style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:Ot("text-sm"),color:Ot("text-muted")},children:i.origin_repo}):null]}),i.verdict?s.jsx(nl,{run:i}):null]})}function pS({runs:i,error:r,now:o,activeHash:f,onNavigate:d}){if(!i)return r?s.jsxs("p",{role:"alert",style:{padding:"0 12px",color:Ot("error"),fontSize:Ot("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:Ot("text-muted"),fontSize:Ot("text-sm")},children:"No sessions yet."});const m=Ya(f);return s.jsx("div",{"data-testid":"session-list",children:oS(i,o).map(v=>s.jsxs("section",{"aria-label":v.name,style:{marginBottom:12},children:[s.jsx(wx,{children:v.name}),v.runs.map(x=>s.jsx(gS,{run:x,active:Ya(Gv(x))===m,onNavigate:d},`${x.source_id}/${x.run_id}`))]},v.name))})}function ev({hash:i,onNavigate:r}){const{runs:o,error:f}=hS(),d=Ya(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:Ot("text")},children:[s.jsx(fS,{active:!!(o!=null&&o.some(m=>m.status==="running"))}),s.jsx("span",{style:{fontFamily:Ot("font-serif"),fontSize:Ot("text-2xl")},children:"Loki Mode"})]}),s.jsx("div",{style:{padding:"0 8px 12px"},children:s.jsxs(Lt,{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(xx,{size:14,"aria-hidden":"true"}),"New run"]})}),s.jsx("div",{style:{flex:1,overflowY:"auto",padding:"0 8px"},children:s.jsx(pS,{runs:o,error:f,now:Date.now(),activeHash:i,onNavigate:r})}),s.jsx("div",{style:{padding:8,borderTop:`1px solid ${Ot("border")}`},children:s.jsx(hv,{href:"#/settings",active:d.startsWith("/settings"),icon:s.jsx(jx,{size:14,"aria-hidden":"true"}),onClick:r,children:"Settings"})})]})}const yS={width:Ot("sidebar-w"),flexShrink:0,flexDirection:"column",height:"100vh",position:"sticky",top:0,paddingTop:16,background:Ot("glass"),borderRight:`1px solid ${Ot("glass-border")}`,boxShadow:Ot("glass-shadow")};function xS({path:i}){const r=$x();if(r.length===0)return s.jsx(kt,{title:"No settings available"});const o=r.find(d=>Ya(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:Ot("font-serif"),fontWeight:400,fontSize:Ot("text-2xl"),margin:"0 0 12px 12px"},children:"Settings"}),r.map(d=>s.jsx(hv,{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}){z.useSyncExternalStore(Ev,Ms,Ms);const r=Ya(i);if(r==="/settings"||r.startsWith("/settings/"))return s.jsx(xS,{path:r});const o=Zx(i);if(!o)return s.jsx(kt,{title:"Page not found",hint:s.jsx("a",{href:"#/",style:{color:Ot("accent")},children:"Back to home"})});const f=o.page.component;return s.jsx(f,{params:o.params})}function SS(){const i=dS(),[r,o]=z.useState(!1);return z.useEffect(()=>{Zo()},[]),z.useEffect(()=>{const f=d=>{(d.metaKey||d.ctrlKey)&&d.key.toLowerCase()==="k"&&cS()&&d.preventDefault()};return addEventListener("keydown",f),()=>removeEventListener("keydown",f)},[]),s.jsxs("div",{"data-testid":"app-shell",className:"flex min-h-screen",style:{background:Ot("bg"),color:Ot("text"),fontFamily:Ot("font-sans")},children:[s.jsx("nav",{"data-testid":"nav","aria-label":"Sessions",className:"hidden md:flex",style:yS,children:s.jsx(ev,{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 ${Ot("border")}`},children:[s.jsx(Lt,{variant:"ghost","aria-label":"Open sessions","data-testid":"open-drawer",onClick:()=>o(!0),children:s.jsx(vx,{size:16,"aria-hidden":"true"})}),s.jsx("span",{style:{fontFamily:Ot("font-serif"),fontSize:Ot("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(mv,{open:r,title:"Loki Mode",side:"left",onClose:()=>o(!1),children:s.jsx("div",{style:{display:"flex",flexDirection:"column",minHeight:"80vh"},children:s.jsx(ev,{hash:i,onNavigate:()=>o(!1)})})})]})}const xn="not recorded";function Qv(i){return i.cost_usd!==null&&i.cost_usd!==void 0?`$${i.cost_usd.toFixed(4)}`:i.total_sessions>0&&i.measured_sessions<i.total_sessions?`unpriced (${i.measured_sessions} of ${i.total_sessions} sessions priced)`:"unpriced"}const jS=i=>i.started_at&&i.ended_at?(Date.parse(i.ended_at)-Date.parse(i.started_at))/1e3:null,$v=i=>typeof i=="number"?`${i.toFixed(1)}s`:xn,Xv=i=>i?i.replace("T"," ").replace(/\.\d+Z$/,"Z"):xn,ES={[mt.VERIFIED]:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-300 ring-emerald-500/30",[mt.PARTIAL]:"bg-amber-500/15 text-amber-700 dark:text-amber-300 ring-amber-500/30",[mt.FAILED]:"bg-red-500/15 text-red-700 dark:text-red-300 ring-red-500/30",[mt.TAMPERED]:"bg-red-600/20 text-red-700 dark:text-red-300 ring-red-600/50",[mt.VERIFIED_UNCHECKED]:"bg-sky-500/15 text-sky-700 dark:text-sky-300 ring-sky-500/30",[mt.UNVERIFIED]:"bg-amber-500/15 text-amber-700 dark:text-amber-300 ring-amber-500/30",[mt.SPEC_CONFLICT]:"bg-violet-500/15 text-violet-700 dark:text-violet-300 ring-violet-500/30"};function ko({verdict:i,run:r}){const o=r?ke(r):i??null,f=o?ES[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 Zv({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(av,{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 lv=3e3;function Kv(i,r,o){const[f,d]=z.useState({data:null,error:null});return z.useEffect(()=>{let m=!0,v;d({data:null,error:null});const x=()=>i().then(E=>{m&&(d({data:E,error:null}),o!=null&&o(E)&&(v=setTimeout(x,lv)))},E=>{m&&(d(O=>({data:O.data,error:E.message})),o&&(v=setTimeout(x,lv)))});return x(),()=>{m=!1,clearTimeout(v)}},r),f}const yn=i=>i.status==="running";function Jv({run:i}){const[r]=z.useState(()=>({at:Date.now(),s:i.elapsed_s??0})),[,o]=z.useState(0),f=yn(i);z.useEffect(()=>{if(!f)return;const m=setInterval(()=>o(v=>v+1),1e3);return()=>clearInterval(m)},[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`:xn})}function TS({onOpen:i}){const[r,o]=z.useState(""),[f,d]=z.useState(""),[m,v]=z.useState(""),{data:x,error:E}=Kv(()=>kl({verdict:r,repo:f,since:m?`${m}T00:00:00Z`:""}),[r,f,m],g=>g.runs.some(yn)),O=!!(r||f||m),R="rounded border border-slate-300 bg-white px-2 py-2 text-sm md:py-1 dark:border-slate-700 dark:bg-slate-900";return 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:R,value:r,onChange:g=>o(g.target.value),children:[s.jsx("option",{value:"",children:"All"}),Ax.map(g=>s.jsx("option",{children:g},g))]})]}),s.jsxs("label",{className:"flex flex-col gap-1",children:["Repo",s.jsx("input",{"aria-label":"Repo",className:R,value:f,onChange:g=>d(g.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:R,value:m,onChange:g=>v(g.target.value)})]})]}),E&&s.jsxs("p",{role:"alert",className:"text-red-600",children:["Could not load runs: ",E]}),!x&&!E&&s.jsx("p",{className:"text-slate-500",children:"Loading runs"}),x&&x.runs.length===0&&(O?s.jsx("p",{children:"No runs match these filters."}):s.jsx(Cv,{})),x&&x.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:x.runs.map(g=>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(ko,{run:g})}),s.jsx("td",{className:"p-2 font-mono text-xs",children:s.jsx("a",{href:`#/runs/${encodeURIComponent(g.source_id)}/${encodeURIComponent(g.run_id)}`,onClick:()=>i==null?void 0:i(g),className:"inline-block break-all py-2 text-sky-600 hover:underline md:py-0 dark:text-sky-400",children:g.run_id})}),s.jsx("td",{className:"hidden p-2 md:table-cell",children:g.origin_repo??xn}),s.jsx("td",{className:"hidden p-2 md:table-cell",children:Xv(g.started_at)}),s.jsx("td",{className:"p-2 text-xs","data-testid":"progress",children:yn(g)?s.jsxs(s.Fragment,{children:[g.current_stage??"starting",", ",s.jsx(Jv,{run:g}),", ",(g.files_touched??[]).length," files"]}):""}),s.jsx("td",{className:"p-2","data-testid":"cost",children:Qv(g)}),s.jsx("td",{className:"p-2",children:s.jsx(Zv,{url:g.pr_url})})]},`${g.source_id}/${g.run_id}`))})]})})]})}function Xu({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 _S({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":$v(jS(r))})]},r.stage))})}function NS({source:i,run:r,question:o}){const[f,d]=z.useState(""),[m,v]=z.useState(null),x=async()=>{try{const E=await uv(i,r,f);v({ok:!0,text:`Saved to ${E.path}. Resume: ${E.resume}`})}catch(E){v({ok:!1,text:E.message})}};return s.jsxs(Xu,{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:E=>d(E.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:x,className:"mt-2 min-h-11 rounded bg-sky-600 px-4 py-2 text-sm md:min-h-0 md:px-3 md:py-1 text-white disabled:opacity-50",children:"Submit answer"}),m&&s.jsx("p",{role:m.ok?"status":"alert",className:`mt-2 break-all text-sm ${m.ok?"text-emerald-600":"text-red-600"}`,children:m.text})]})}function zS({source:i,run:r}){const[o,f]=z.useState(!1),[d,m]=z.useState(!1),[v,x]=z.useState(null),E=async()=>{m(!0),x(null);try{await Ox(i,r),location.hash="#/runs"}catch(R){x(R.message),m(!1)}},O="min-h-11 rounded px-4 py-2 text-sm md:min-h-0 md:px-3 md:py-1";return s.jsxs(Xu,{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:E,className:`${O} 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),x(null)},className:`${O} border border-slate-300 dark:border-slate-700`,children:"Cancel"})]})]}):s.jsx("button",{type:"button","data-testid":"remove-run",onClick:()=>f(!0),className:`${O} border border-red-500/50 text-red-600`,children:"Remove"}),v&&s.jsxs("p",{role:"alert","data-testid":"remove-error",className:"mt-2 break-all text-sm text-red-600",children:["Could not remove run: ",v]})]})}function OS({source:i,run:r}){const{data:o,error:f}=Kv(()=>Hs(i,r),[i,r],yn);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(ko,{run:d}),d.tampered&&s.jsxs("span",{className:"inline-flex items-center gap-1 text-sm text-red-600",children:[s.jsx(D0,{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(D0,{size:14}),"conflicting events ingested"]})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[s.jsx(Xu,{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??xn}),s.jsx("dt",{className:"text-slate-500",children:"Issue"}),s.jsx("dd",{children:d.issue_ref??xn}),s.jsx("dt",{className:"text-slate-500",children:"Provider"}),s.jsx("dd",{children:d.provider??xn}),s.jsx("dt",{className:"text-slate-500",children:"Model"}),s.jsx("dd",{children:d.model??xn}),s.jsx("dt",{className:"text-slate-500",children:"Started"}),s.jsx("dd",{children:Xv(d.started_at)}),yn(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:yn(d)?"Elapsed":"Wall time"}),s.jsx("dd",{children:yn(d)?s.jsx(Jv,{run:d}):$v(d.wall_s)}),yn(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:Qv(d)}),s.jsx("dt",{className:"text-slate-500",children:"PR"}),s.jsx("dd",{children:s.jsx(Zv,{url:d.pr_url})})]})}),s.jsx(Xu,{title:"Stage timeline",children:s.jsx(_S,{stages:o.stages})})]}),o.blocked_question&&s.jsx(NS,{source:i,run:r,question:o.blocked_question}),s.jsx(Xu,{title:"Receipt",children:s.jsxs("div",{className:"space-y-3 text-sm",children:[o.receipt?s.jsxs("p",{children:["Receipt verdict: ",s.jsx(ko,{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(m=>s.jsx("li",{"data-testid":"not-proven",children:m},m))})]})]})}),s.jsx(zS,{source:i,run:r})]})}const Ko=s.jsxs(s.Fragment,{children:[s.jsx(Rv,{}),s.jsx(TS,{})]});qe({id:"home",path:"/",title:"Home",component:()=>s.jsx(xv,{fallback:Ko})});qe({id:"overview",path:"/overview",title:"Overview",component:()=>s.jsx(xv,{overview:!0,fallback:Ko})});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(Rv,{})]})});qe({id:"runs",path:"/runs",title:"Runs",component:()=>Ko});qe({id:"run-detail",path:"/runs/:source/:run",title:"Run",component:({params:i})=>s.jsx(OS,{source:i.source,run:i.run})});qe({id:"live-run",path:"/live/:source/:run",title:"Live run",component:({params:i})=>s.jsx(yv,{source:i.source,run:i.run})});qe({id:"settings-general",path:"/settings/general",title:"General",inSettings:!0,component:m1});sS();function RS(){return s.jsxs(s.Fragment,{children:[s.jsx(SS,{}),s.jsx(rS,{})]})}Zo();ex.createRoot(document.getElementById("root")).render(s.jsx(RS,{}));