@intent-hq/web 2.372.3 → 2.372.4

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 (143) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{CP03b_lt.js → -JM4IO5s.js} +1 -1
  3. package/web/app/immutable/chunks/{BDMD6FdT.js → 0x9fwj6X.js} +1 -1
  4. package/web/app/immutable/chunks/{a_hFrVUs.js → 1cfvZqIL.js} +1 -1
  5. package/web/app/immutable/chunks/{DtPlbqlO.js → 4V5RPZv7.js} +1 -1
  6. package/web/app/immutable/chunks/{BpXYSrHL.js → 6s1pPvLx.js} +4 -4
  7. package/web/app/immutable/chunks/{uMNoDmQ2.js → 8kN6wMYA.js} +1 -1
  8. package/web/app/immutable/chunks/{CuNdhmq6.js → B0rlWqYd.js} +1 -1
  9. package/web/app/immutable/chunks/{BiWBSez2.js → B62l45Uf.js} +2 -2
  10. package/web/app/immutable/chunks/{C_MA8w30.js → B7-7bZi9.js} +1 -1
  11. package/web/app/immutable/chunks/{kRDyYnu-.js → B70PGGIw.js} +1 -1
  12. package/web/app/immutable/chunks/{CCr3GhwT.js → BBFSGGQF.js} +1 -1
  13. package/web/app/immutable/chunks/{DZnf3Vcd.js → BDARQpEZ.js} +1 -1
  14. package/web/app/immutable/chunks/{Ciyw1cDk.js → BEUFwM79.js} +1 -1
  15. package/web/app/immutable/chunks/{xCNFDAsL.js → BGPjhZRB.js} +1 -1
  16. package/web/app/immutable/chunks/{CBP_r2rZ.js → BGTJWNfe.js} +1 -1
  17. package/web/app/immutable/chunks/{DQITwHBm.js → BGdVu4MB.js} +2 -2
  18. package/web/app/immutable/chunks/{pO_uIUtS.js → BHINa8Ry.js} +2 -2
  19. package/web/app/immutable/chunks/{CLkKOQIb.js → BIHiol8V.js} +1 -1
  20. package/web/app/immutable/chunks/{D9E1Sed-.js → BIoeY2kf.js} +3 -3
  21. package/web/app/immutable/chunks/{C5Ddrquv.js → BJyEBl3g.js} +1 -1
  22. package/web/app/immutable/chunks/{DTl-epgW.js → BO2BotXa.js} +1 -1
  23. package/web/app/immutable/chunks/{BjmThgx9.js → BPE9rssu.js} +3 -3
  24. package/web/app/immutable/chunks/{Byc-Gwn1.js → BTTV-GiU.js} +2 -2
  25. package/web/app/immutable/chunks/{paBp5EDQ.js → BTtsrh4I.js} +2 -2
  26. package/web/app/immutable/chunks/{DmNlyOFF.js → BTwXmxv4.js} +2 -2
  27. package/web/app/immutable/chunks/{DL1rChoc.js → Ba0RqSDe.js} +1 -1
  28. package/web/app/immutable/chunks/{D0WHOKE3.js → BcI2Qs88.js} +1 -1
  29. package/web/app/immutable/chunks/{DfvdR1t7.js → BlCrzIC_.js} +13 -13
  30. package/web/app/immutable/chunks/{s5eSUTR7.js → BlEjgaTq.js} +1 -1
  31. package/web/app/immutable/chunks/{DsATs4Yw.js → BlT-PlLX.js} +3 -3
  32. package/web/app/immutable/chunks/{DoUa1hTg.js → BmpDBFC8.js} +1 -1
  33. package/web/app/immutable/chunks/{B8GoKZxM.js → Bng2Wjmd.js} +1 -1
  34. package/web/app/immutable/chunks/{8vt0w0gB.js → BoVvYfWW.js} +1 -1
  35. package/web/app/immutable/chunks/{DO0YQnSr.js → BoqgKStq.js} +1 -1
  36. package/web/app/immutable/chunks/{-il6if-X.js → BqwlUVV2.js} +1 -1
  37. package/web/app/immutable/chunks/{CXXobfG5.js → BtmPL5YS.js} +1 -1
  38. package/web/app/immutable/chunks/{rUAQGuY9.js → BuJuLth3.js} +1 -1
  39. package/web/app/immutable/chunks/{CNc8h__d.js → BukcKDm8.js} +1 -1
  40. package/web/app/immutable/chunks/{BAcZGd3g.js → Byis73mI.js} +1 -1
  41. package/web/app/immutable/chunks/{BlPpu_gv.js → C0QlGAGX.js} +1 -1
  42. package/web/app/immutable/chunks/{BbbO1mVP.js → C0pO6HUL.js} +1 -1
  43. package/web/app/immutable/chunks/{BuHIOAsb.js → C8EZa-xD.js} +1 -1
  44. package/web/app/immutable/chunks/{CMR4RacT.js → CACF-3uP.js} +1 -1
  45. package/web/app/immutable/chunks/{BIZcpPtH.js → CDypb-9r.js} +1 -1
  46. package/web/app/immutable/chunks/{Cu_kcmjo.js → CE4gPfvG.js} +1 -1
  47. package/web/app/immutable/chunks/{DXq51U5Z.js → CEEa3RhU.js} +1 -1
  48. package/web/app/immutable/chunks/{B93aSOB6.js → CEwqW-JV.js} +1 -1
  49. package/web/app/immutable/chunks/{BjLzmoKu.js → CGn7nYWV.js} +1 -1
  50. package/web/app/immutable/chunks/{D73rJM26.js → CHpIe7_H.js} +1 -1
  51. package/web/app/immutable/chunks/{lMYobXp7.js → CIZP3oBY.js} +1 -1
  52. package/web/app/immutable/chunks/{3vi-OgRR.js → CJ-lCrFi.js} +1 -1
  53. package/web/app/immutable/chunks/{B77zwvv7.js → CMFcg3RE.js} +1 -1
  54. package/web/app/immutable/chunks/{CNW9Rwes.js → CNefgEA2.js} +1 -1
  55. package/web/app/immutable/chunks/{eWtOjdwZ.js → CRHarGqr.js} +1 -1
  56. package/web/app/immutable/chunks/{CVA75Jzf.js → CSfWCx1k.js} +1 -1
  57. package/web/app/immutable/chunks/{Dyda26aD.js → CSr8o6qm.js} +1 -1
  58. package/web/app/immutable/chunks/{CSUG4tUd.js → CVnLEltT.js} +2 -2
  59. package/web/app/immutable/chunks/{sppurVVE.js → CWm_YxN-.js} +1 -1
  60. package/web/app/immutable/chunks/{BMjTWq66.js → CYUq_fja.js} +1 -1
  61. package/web/app/immutable/chunks/{64KJqioX.js → CZ7G19nC.js} +1 -1
  62. package/web/app/immutable/chunks/{DlekFIEJ.js → CbbK8WaD.js} +1 -1
  63. package/web/app/immutable/chunks/{D4_8WlAX.js → Cd2ZM5fn.js} +1 -1
  64. package/web/app/immutable/chunks/{4WFBPbig.js → ChADavMb.js} +2 -2
  65. package/web/app/immutable/chunks/{Smn45KEu.js → CjJYMl8M.js} +1 -1
  66. package/web/app/immutable/chunks/{AzvtNQGc.js → CjoZjg16.js} +1 -1
  67. package/web/app/immutable/chunks/{D-5xnKgT.js → CnjuQpEd.js} +1 -1
  68. package/web/app/immutable/chunks/{C4tXJNlU.js → CpGAJSr-.js} +1 -1
  69. package/web/app/immutable/chunks/{D4HebHoD.js → Cqsgf1DM.js} +1 -1
  70. package/web/app/immutable/chunks/{Dr_KWcsf.js → CrrouvLD.js} +1 -1
  71. package/web/app/immutable/chunks/{DoGlKPs8.js → Csqgcuja.js} +1 -1
  72. package/web/app/immutable/chunks/{B6OWzTDz.js → Cub6NZJQ.js} +1 -1
  73. package/web/app/immutable/chunks/{0PFbquWg.js → Cuij5UQt.js} +1 -1
  74. package/web/app/immutable/chunks/{CEIGYgmC.js → CvPNqaI1.js} +1 -1
  75. package/web/app/immutable/chunks/{DXT_tHZV.js → CxNWBXR-.js} +3 -3
  76. package/web/app/immutable/chunks/{DVkhmNxg.js → D0Rl0jWy.js} +3 -3
  77. package/web/app/immutable/chunks/{BQ0lhaiw.js → D1B_DGCd.js} +1 -1
  78. package/web/app/immutable/chunks/{C8GDR5mq.js → D1gQR6EA.js} +1 -1
  79. package/web/app/immutable/chunks/{BFAXN_U2.js → D2akGP2t.js} +1 -1
  80. package/web/app/immutable/chunks/{CbGkMYMi.js → D69enMvZ.js} +1 -1
  81. package/web/app/immutable/chunks/{CmfLCgYN.js → D6nqIgl8.js} +1 -1
  82. package/web/app/immutable/chunks/{D7X_WaSL.js → D72FFXC3.js} +3 -3
  83. package/web/app/immutable/chunks/{QJaPD5ja.js → D9N7PGtO.js} +3 -3
  84. package/web/app/immutable/chunks/{DSam4kPq.js → DA_CqgBx.js} +2 -2
  85. package/web/app/immutable/chunks/{FHdlPR2E.js → DB4YPFuG.js} +1 -1
  86. package/web/app/immutable/chunks/{CygNkso5.js → DCdZE6Zv.js} +1 -1
  87. package/web/app/immutable/chunks/{Di8laZBj.js → DE0oDk53.js} +1 -1
  88. package/web/app/immutable/chunks/{Dqso2iIq.js → DE9J1g7V.js} +1 -1
  89. package/web/app/immutable/chunks/{DyOuvQsx.js → DEsEAjIo.js} +3 -3
  90. package/web/app/immutable/chunks/{D9ZsyNyz.js → DJbcK1vm.js} +1 -1
  91. package/web/app/immutable/chunks/{n1Mub_w4.js → DOOWwNKc.js} +1 -1
  92. package/web/app/immutable/chunks/{DdfA1Cl6.js → DRX7fFc0.js} +2 -2
  93. package/web/app/immutable/chunks/{DzXo18RQ.js → DYb2Jx_H.js} +1 -1
  94. package/web/app/immutable/chunks/{Dz9187FZ.js → DZXtm4_Y.js} +1 -1
  95. package/web/app/immutable/chunks/{ezsQjlt6.js → DcPlD4Yk.js} +1 -1
  96. package/web/app/immutable/chunks/{eHy-2vQk.js → DfC089Aj.js} +1 -1
  97. package/web/app/immutable/chunks/{BSXFgzj_.js → DfybFhnX.js} +1 -1
  98. package/web/app/immutable/chunks/{tDXv5z_U.js → Dl1bhT5L.js} +1 -1
  99. package/web/app/immutable/chunks/{B3agx6Zv.js → Dp1LDv4x.js} +1 -1
  100. package/web/app/immutable/chunks/{m5FEmsd9.js → DskDJYfd.js} +1 -1
  101. package/web/app/immutable/chunks/{DUnf3IJM.js → DtDGJeDZ.js} +1 -1
  102. package/web/app/immutable/chunks/{DoKriIRg.js → DthXaxFc.js} +1 -1
  103. package/web/app/immutable/chunks/{Buf2XX2m.js → DwIiGflF.js} +1 -1
  104. package/web/app/immutable/chunks/{CMd9xe_v.js → DyZwlsjA.js} +1 -1
  105. package/web/app/immutable/chunks/{CwLBVHwC.js → EYYp06eB.js} +1 -1
  106. package/web/app/immutable/chunks/{DpqgMZNx.js → Fg5V-_KH.js} +1 -1
  107. package/web/app/immutable/chunks/{DSviIBB2.js → Id9rbUde.js} +1 -1
  108. package/web/app/immutable/chunks/{B430oCRo.js → JHEpx9qH.js} +1 -1
  109. package/web/app/immutable/chunks/{D_yMjDjB.js → NDFzzX6j.js} +6 -6
  110. package/web/app/immutable/chunks/{Bmgc_Vmk.js → OKyJRSao.js} +1 -1
  111. package/web/app/immutable/chunks/{TWY-IEJw.js → PAnofhoS.js} +1 -1
  112. package/web/app/immutable/chunks/{CjmicwNO.js → RLm3umLY.js} +1 -1
  113. package/web/app/immutable/chunks/{BR-e1Dqz.js → RNLMbZ9C.js} +4 -4
  114. package/web/app/immutable/chunks/{B4N2SW_I.js → TWIpzPb0.js} +1 -1
  115. package/web/app/immutable/chunks/{DumB3eQv.js → ZVjzo5B6.js} +1 -1
  116. package/web/app/immutable/chunks/{C8F76z1j.js → _q3XqkyK.js} +1 -1
  117. package/web/app/immutable/chunks/{D4p9bnGO.js → b2N6VSvj.js} +1 -1
  118. package/web/app/immutable/chunks/{DjHgMTjl.js → f_7_jVTC.js} +3 -3
  119. package/web/app/immutable/chunks/{2gbKHQXV.js → gprpeC7D.js} +1 -1
  120. package/web/app/immutable/chunks/{CgyKOUjB.js → p9pVDf-Y.js} +1 -1
  121. package/web/app/immutable/chunks/{CvO597Pq.js → pjjCtVad.js} +1 -1
  122. package/web/app/immutable/chunks/{C2f0QCtk.js → pnLCy_6A.js} +1 -1
  123. package/web/app/immutable/chunks/{yc-ZA4uZ.js → qc5YRWua.js} +1 -1
  124. package/web/app/immutable/chunks/{DAAshoKb.js → xHTS7_DQ.js} +1 -1
  125. package/web/app/immutable/entry/{app.DDy_f4Vr.js → app.Bn2XrulZ.js} +2 -2
  126. package/web/app/immutable/entry/start.DdzwOLyS.js +1 -0
  127. package/web/app/immutable/nodes/{0.BIgrj7tk.js → 0.BCyk8Eor.js} +1 -1
  128. package/web/app/immutable/nodes/{1.BS4qG73n.js → 1.D2GMUxe6.js} +1 -1
  129. package/web/app/immutable/nodes/{10.CoUmfWJP.js → 10.CqLjvueR.js} +4 -4
  130. package/web/app/immutable/nodes/{11.Cp19-DaX.js → 11.DjHiLQV_.js} +1 -1
  131. package/web/app/immutable/nodes/{15._NKX_puo.js → 15.DBgLfjTo.js} +1 -1
  132. package/web/app/immutable/nodes/{19.CrIpgdrd.js → 19.C65aoXG7.js} +2 -2
  133. package/web/app/immutable/nodes/{2.B-ARMoF4.js → 2.DyILpfUv.js} +4 -4
  134. package/web/app/immutable/nodes/{3.CeiKZ0d6.js → 3.BUXW6SHm.js} +1 -1
  135. package/web/app/immutable/nodes/{4.-s0Jfvde.js → 4.IOdsbvEy.js} +1 -1
  136. package/web/app/immutable/nodes/{5.BIDxYMYJ.js → 5.CdjllGpy.js} +1 -1
  137. package/web/app/immutable/nodes/{6.3fDeScAq.js → 6.B9bgqfmM.js} +1 -1
  138. package/web/app/immutable/nodes/{7.DydkXABx.js → 7.CJeEPi1x.js} +1 -1
  139. package/web/app/immutable/nodes/{8.DyQruTiJ.js → 8.CoXwlNYv.js} +1 -1
  140. package/web/app/immutable/nodes/{9.D0w1njvH.js → 9.B7TZvLdB.js} +4 -4
  141. package/web/app/version.json +1 -1
  142. package/web/index.html +9 -9
  143. package/web/app/immutable/entry/start.CtWgyCM1.js +0 -1
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/0LjODXcP.js","/app/immutable/chunks/CpP1PKzF.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CgBcONKs.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/WSVFXKpL.js","/app/immutable/chunks/ClpAEjbe.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/C5TH9nNS.js"])))=>i.map(i=>d[i]);
2
- import{t as Qt,bo as J,bw as te,bs as M,bq as ee,b as re,bm as n,_ as se}from"./ClpAEjbe.js";import{bo as ae,bs as ne,ca as C,bH as Y,c5 as yt,aD as O,bj as ie,a5 as F,bS as p,bA as D,b_ as x,W as f,bn as oe,cd as lt,bV as kt,c9 as N,aA as Z,bl as R,bO as h,ay as wt,aB as y}from"./CJxGDkBm.js";import{i as I}from"./wmcYjLAa.js";import{f as St,g as le,s as ce}from"./CnGVh7I3.js";import{b as ue}from"./NtFyWdpR.js";import{b as de}from"./5vm8eILD.js";import{Jq as m,CZ as pe,CP as me,CO as fe,Jk as _e,CA as ve,iy as be,iY as ge}from"./CpP1PKzF.js";import{d as xe,T as he,D as ye,L as ke,o as we}from"./Dsw5zy-Y.js";import{F as ct,d3 as Se,cb as $e,c$ as Ae}from"./CtJxHvGv.js";import{f as $t}from"./BVi5KkOP.js";import{m as rt}from"./C1zxTHwk.js";import"./CPDV_dyu.js";import"./WSVFXKpL.js";import"./ChTqQfQN.js";import"./BeYVt6Wg.js";import{r as Ce}from"./WQlIWqz7.js";import{selectScriptById as ut,selectScriptRuntime as Oe,selectScriptOutput as At,selectScriptRetainedOutput as Fe,selectCanDeleteScript as Ct}from"./uMNoDmQ2.js";import{g as De}from"./CTV49dzf.js";import{c1 as Re,dY as Ie,dz as Ot}from"./D9Ykl3eH.js";import"./Gb7Ohwuc.js";import"./BYiyLeZ4.js";import"./Qt_rZNko.js";import{e as Le}from"./CwRzaOEp.js";import{v as Ft}from"./CVA75Jzf.js";var Dt=y("<!> ",1),qe=y('<div class="bg-danger-background/20 border-y border-danger/20 px-3 py-1.5 flex items-center justify-between"><div class="flex items-center gap-2 text-sm text-danger font-medium"><div class="w-4 h-4 rounded-full bg-danger-background flex items-center justify-center"><!></div> <span> </span></div> <!></div>'),Pe=y('<pre class="retained-text px-3 pb-3 text-xs svelte-115p4sl"> </pre>'),Te=y('<p class="px-3 pb-3 text-xs text-muted-foreground" role="status"> </p>'),Be=y('<details class="retained-output border-b border-border svelte-115p4sl"><summary class="cursor-pointer px-3 py-2 text-xs text-muted-foreground"> </summary> <p class="px-3 pb-2 text-xs text-muted-foreground"> </p> <!></details>'),Ee=y('<div class="px-3 py-1 text-xs text-muted-foreground"> </div>'),ze=y('<code class="text-muted-foreground font-mono text-xs"> </code>'),Me=y('<span class="sr-only"> </span>'),We=y('<div class="flex-1 flex items-center justify-center px-4 py-8"><div class="flex items-center gap-3 text-sm"><span class="text-subtle font-mono">$</span> <!> <!> <!></div></div>'),je=y('<div><!> <!> <!> <!> <div><div class="xterm-output svelte-115p4sl"></div></div></div>');function Ue(_,c){const j=ae();if(new.target)return Qt({component:Ue,..._});ne(c,!0);const L=()=>M(zt,"$outputAuthority",q),u=()=>M(qt,"$runtime$",q),v=()=>M(Pt,"$output$",q),S=()=>M(Et,"$codeFontFamilyCSS",q),W=()=>M(Tt,"$retainedOutput$",q),Rt=()=>M(Bt,"$hidesAgentLifecycleActions$",q),dt=()=>M(Lt,"$script$",q),[q,It]=ee();let $=J(c,"scriptId",7),b=J(c,"workspaceId",7),st=J(c,"class",7,""),at=J(c,"runDisabled",7,!1),P=J(c,"runDisabledReason",7,null);const pt=N(()=>at()||P()!==null),T=lt(""),U=lt(""),mt=lt("");let nt=kt(!1);C(()=>T.set(b())),C(()=>U.set($()));let B,i=null,H=null,G=null,V=null,E=null,X=null;const Lt=ut(T,U),qt=Oe(T,U),Pt=At(T,U),Tt=Fe(T,U,mt),Bt=Re(T),Et=De(),zt=Ie(T),ft=crypto.randomUUID();C(()=>{const t=b();return $(),()=>{t&&m.dispatch(pe(t,ft))}}),C(()=>{const t=b(),e=$(),a=L(),s=u();if(!a||!t||!e)return;s.status,s.startedAt;const l=crypto.randomUUID();return mt.set(l),Y(nt,yt(()=>v().chunks.length===0),!0),m.dispatch(me(t,e,l)),()=>m.dispatch(fe(t,e,l))});let Q=kt(0);const Mt=N(()=>u().status==="exited"&&u().exitCode!=null&&u().exitCode!==0&&u().exitCode<128);function Wt(){if(!B||i)return;V=new he(B);const t=V.getCurrentTheme();i=new ye({allowProposedApi:!0,fontFamily:S(),fontSize:13,lineHeight:1.2,letterSpacing:0,cursorBlink:!1,cursorStyle:"underline",cursorWidth:1,scrollback:1e4,allowTransparency:!0,convertEol:!0,disableStdin:!0,drawBoldTextInBrightColors:!0,theme:t}),i.attachCustomKeyEventHandler(a=>{const s=a.metaKey||a.ctrlKey;return!(s&&a.key==="`"||s&&a.key==="j"||s&&a.key==="k")}),H=new we,i.loadAddon(H);const e=new ke((a,s)=>{try{const l=new URL(s);l.hostname==="localhost"||l.hostname==="127.0.0.1"?Ce(s).then(g=>{se(async()=>{const{getPanelLayoutManager:k}=await import("./0LjODXcP.js").then(A=>A.p);return{getPanelLayoutManager:k}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url).then(({getPanelLayoutManager:k})=>{k(b()).openBrowserPanel(g.url,void 0,void 0,g.requestedUrl)}).catch(()=>{window.open(g.url,"_blank")})}):window.open(s,"_blank")}catch{window.open(s,"_blank")}});i.loadAddon(e),i.open(B),V.applyTheme(i),X=requestAnimationFrame(()=>{X=null,H?.fit()}),G=new ResizeObserver(()=>{H?.fit()}),G.observe(B),jt()}function jt(){if(!i)return;const t=At.select(m.state,b(),$());t.chunks.length>0&&i.write(t.chunks.map(e=>e.text).join("")),Y(Q,t.dropped+t.chunks.length)}function _t(){E!==null&&(cancelAnimationFrame(E),E=null),X!==null&&(cancelAnimationFrame(X),X=null),G?.disconnect(),G=null,V?.dispose(),V=null;const t=i;i=null,H=null,Y(Q,0),t&&xe(t)}C(()=>{const t=v(),e=yt(()=>O(Q)),a=t.dropped+t.chunks.length;if(!i||a<=e)return;const s=Math.max(e-t.dropped,0);i.write(t.chunks.slice(s).map(l=>l.text).join("")),Y(Q,a)}),C(()=>{const t=S();i&&i.options.fontFamily!==t&&(i.options.fontFamily=t)});function Ut(){O(pt)||m.dispatch(_e(b(),$()))}function Ht(){if(!b()){rt.error(n.terminal_scriptOutput_noWorkspace_error());return}m.dispatch(be(b(),$(),W()?.text,ft))}C(()=>{u().status==="idle"&&v().chunks.length===0&&_t()}),C(()=>{!(u().status==="idle"&&v().chunks.length===0)&&B&&!i&&(E!==null&&cancelAnimationFrame(E),E=requestAnimationFrame(()=>{E=null,Wt()}))}),ie(()=>{_t()});var Vt={get scriptId(){return $()},set scriptId(t){$(t),Z()},get workspaceId(){return b()},set workspaceId(t){b(t),Z()},get class(){return st()},set class(t=""){st(t),Z()},get runDisabled(){return at()},set runDisabled(t=!1){at(t),Z()},get runDisabledReason(){return P()},set runDisabledReason(t=null){P(t),Z()},$set:te,$on:(t,e)=>re(c,t,e)},tt=je(),vt=F(tt);{var Xt=t=>{var e=qe(),a=F(e),s=F(a),l=F(s);ct(l,{get icon(){return Se},size:"xs"}),D(s);var g=p(s,2),k=R(g,!0);D(a);var A=p(a,2);{var d=r=>{$t(r,{variant:"outline",size:"sm",class:"h-7 text-xs bg-background border border-border text-danger",onclick:Ht,children:(o,w)=>{var z=Dt(),K=wt(z);ct(K,{get icon(){return Ae},size:"sm",class:"mr-1.5"});var et=p(K);x(ot=>h(et,` ${ot??""}`),[()=>n.terminal_scriptOutput_askAiToFix_label()]),f(o,z)},$$slots:{default:!0}})};I(A,r=>{Rt()||r(d)})}D(e),x(r=>h(k,r),[()=>n.terminal_scriptOutput_buildFailed_label({exitCode:u().exitCode??0})]),f(t,e)};I(vt,t=>{O(Mt)&&t(Xt)})}var bt=p(vt,2);{var Kt=t=>{var e=Be(),a=F(e),s=R(a,!0),l=p(a,2),g=R(l,!0),k=p(l,2);{var A=r=>{var o=Pe();let w;var z=R(o,!0);x(()=>{w=le(o,"",w,{"font-family":S()}),h(z,W().text)}),f(r,o)},d=r=>{var o=Te(),w=R(o,!0);x(z=>h(w,z),[()=>W().status==="loading"?n.terminal_scriptOutput_retainedLoading_label():n.terminal_scriptOutput_retainedUnavailable_label()]),f(r,o)};I(k,r=>{W().status==="available"?r(A):r(d,-1)})}D(e),x((r,o)=>{h(s,r),h(g,o)},[()=>n.terminal_scriptOutput_retained_label(),()=>n.terminal_scriptOutput_retained_description()]),de("open","toggle",e,r=>Y(nt,r),()=>O(nt)),f(t,e)};I(bt,t=>{W()&&t(Kt)})}var gt=p(bt,2);{var Jt=t=>{var e=Ee(),a=R(e,!0);x(s=>h(a,s),[()=>n.terminal_scriptOutput_live_label()]),f(t,e)};I(gt,t=>{v().chunks.length>0&&W()&&t(Jt)})}var xt=p(gt,2);{var Yt=t=>{var e=We(),a=F(e),s=p(F(a),2);{var l=d=>{var r=ze(),o=R(r,!0);x(w=>h(o,w),[()=>ve(dt())]),f(d,r)};I(s,d=>{dt()&&d(l)})}var g=p(s,2);{let d=N(()=>P()??void 0),r=N(()=>n.terminal_scriptOutput_run_label()),o=N(()=>P()?j:void 0);$t(g,{variant:"ghost",size:"xs",get disabled(){return O(pt)},get tooltip(){return O(d)},get"aria-label"(){return O(r)},get"aria-describedby"(){return O(o)},onclick:Ut,class:"text-muted-foreground hover:text-foreground",children:(w,z)=>{var K=Dt(),et=wt(K);ct(et,{get icon(){return $e},class:"h-3 w-3 mr-1"});var ot=p(et);x(Gt=>h(ot,` ${Gt??""}`),[()=>n.terminal_scriptOutput_run_label()]),f(w,K)},$$slots:{default:!0}})}var k=p(g,2);{var A=d=>{var r=Me(),o=R(r,!0);x(()=>{ce(r,"id",j),h(o,P())}),f(d,r)};I(k,d=>{P()&&d(A)})}D(a),D(e),f(t,e)};I(xt,t=>{u().status==="idle"&&v().chunks.length===0&&t(Yt)})}var it=p(xt,2);let ht;var Nt=F(it);ue(Nt,t=>B=t,()=>B),D(it),D(tt),x(()=>{St(tt,1,`script-output-viewer ${st()??""}`,"svelte-115p4sl"),ht=St(it,1,"flex-1 relative overflow-hidden",null,ht,{hidden:u().status==="idle"&&v().chunks.length===0})}),f(_,tt);var Zt=oe(Vt);return It(),Zt}async function fr(_,c,j){const L=ut.select(m.state,_,c);if(!L||!j()||!Ct.select(m.state,_,c))return;const u=Ft(L.runtime?.status),v=Ot.select(m.state,_);if(!v){rt.error(n.workspace_client_accessChanged_error());return}if(!await Le({title:n.scripts_delete_title({name:L.name}),description:u?n.scripts_delete_running_description():n.scripts_delete_description(),confirmLabel:n.scripts_delete_label(),destructive:!0}))return;if(v!==Ot.select(m.state,_)){rt.error(n.workspace_client_accessChanged_error());return}const S=ut.select(m.state,_,c);if(!j()||!S||S.createdAt!==L.createdAt||S.name!==L.name||!u&&Ft(S.runtime?.status)||!Ct.select(m.state,_,c)){rt.error(n.scripts_delete_changed_error());return}m.dispatch(ge(_,c,n.terminal_quakeOverlay_deleteScriptFailed_error()))}export{Ue as S,fr as c};
2
+ import{t as Qt,bo as J,bw as te,bs as M,bq as ee,b as re,bm as n,_ as se}from"./ClpAEjbe.js";import{bo as ae,bs as ne,ca as C,bH as Y,c5 as yt,aD as O,bj as ie,a5 as F,bS as p,bA as D,b_ as x,W as f,bn as oe,cd as lt,bV as kt,c9 as N,aA as Z,bl as R,bO as h,ay as wt,aB as y}from"./CJxGDkBm.js";import{i as I}from"./wmcYjLAa.js";import{f as St,g as le,s as ce}from"./CnGVh7I3.js";import{b as ue}from"./NtFyWdpR.js";import{b as de}from"./5vm8eILD.js";import{Jq as m,CZ as pe,CP as me,CO as fe,Jk as _e,CA as ve,iy as be,iY as ge}from"./CpP1PKzF.js";import{d as xe,T as he,D as ye,L as ke,o as we}from"./Dsw5zy-Y.js";import{F as ct,d3 as Se,cb as $e,c$ as Ae}from"./CtJxHvGv.js";import{f as $t}from"./BVi5KkOP.js";import{m as rt}from"./C1zxTHwk.js";import"./CPDV_dyu.js";import"./WSVFXKpL.js";import"./ChTqQfQN.js";import"./BeYVt6Wg.js";import{r as Ce}from"./WQlIWqz7.js";import{selectScriptById as ut,selectScriptRuntime as Oe,selectScriptOutput as At,selectScriptRetainedOutput as Fe,selectCanDeleteScript as Ct}from"./8kN6wMYA.js";import{g as De}from"./CTV49dzf.js";import{c1 as Re,dY as Ie,dz as Ot}from"./D9Ykl3eH.js";import"./Gb7Ohwuc.js";import"./BYiyLeZ4.js";import"./Qt_rZNko.js";import{e as Le}from"./CwRzaOEp.js";import{v as Ft}from"./CSfWCx1k.js";var Dt=y("<!> ",1),qe=y('<div class="bg-danger-background/20 border-y border-danger/20 px-3 py-1.5 flex items-center justify-between"><div class="flex items-center gap-2 text-sm text-danger font-medium"><div class="w-4 h-4 rounded-full bg-danger-background flex items-center justify-center"><!></div> <span> </span></div> <!></div>'),Pe=y('<pre class="retained-text px-3 pb-3 text-xs svelte-115p4sl"> </pre>'),Te=y('<p class="px-3 pb-3 text-xs text-muted-foreground" role="status"> </p>'),Be=y('<details class="retained-output border-b border-border svelte-115p4sl"><summary class="cursor-pointer px-3 py-2 text-xs text-muted-foreground"> </summary> <p class="px-3 pb-2 text-xs text-muted-foreground"> </p> <!></details>'),Ee=y('<div class="px-3 py-1 text-xs text-muted-foreground"> </div>'),ze=y('<code class="text-muted-foreground font-mono text-xs"> </code>'),Me=y('<span class="sr-only"> </span>'),We=y('<div class="flex-1 flex items-center justify-center px-4 py-8"><div class="flex items-center gap-3 text-sm"><span class="text-subtle font-mono">$</span> <!> <!> <!></div></div>'),je=y('<div><!> <!> <!> <!> <div><div class="xterm-output svelte-115p4sl"></div></div></div>');function Ue(_,c){const j=ae();if(new.target)return Qt({component:Ue,..._});ne(c,!0);const L=()=>M(zt,"$outputAuthority",q),u=()=>M(qt,"$runtime$",q),v=()=>M(Pt,"$output$",q),S=()=>M(Et,"$codeFontFamilyCSS",q),W=()=>M(Tt,"$retainedOutput$",q),Rt=()=>M(Bt,"$hidesAgentLifecycleActions$",q),dt=()=>M(Lt,"$script$",q),[q,It]=ee();let $=J(c,"scriptId",7),b=J(c,"workspaceId",7),st=J(c,"class",7,""),at=J(c,"runDisabled",7,!1),P=J(c,"runDisabledReason",7,null);const pt=N(()=>at()||P()!==null),T=lt(""),U=lt(""),mt=lt("");let nt=kt(!1);C(()=>T.set(b())),C(()=>U.set($()));let B,i=null,H=null,G=null,V=null,E=null,X=null;const Lt=ut(T,U),qt=Oe(T,U),Pt=At(T,U),Tt=Fe(T,U,mt),Bt=Re(T),Et=De(),zt=Ie(T),ft=crypto.randomUUID();C(()=>{const t=b();return $(),()=>{t&&m.dispatch(pe(t,ft))}}),C(()=>{const t=b(),e=$(),a=L(),s=u();if(!a||!t||!e)return;s.status,s.startedAt;const l=crypto.randomUUID();return mt.set(l),Y(nt,yt(()=>v().chunks.length===0),!0),m.dispatch(me(t,e,l)),()=>m.dispatch(fe(t,e,l))});let Q=kt(0);const Mt=N(()=>u().status==="exited"&&u().exitCode!=null&&u().exitCode!==0&&u().exitCode<128);function Wt(){if(!B||i)return;V=new he(B);const t=V.getCurrentTheme();i=new ye({allowProposedApi:!0,fontFamily:S(),fontSize:13,lineHeight:1.2,letterSpacing:0,cursorBlink:!1,cursorStyle:"underline",cursorWidth:1,scrollback:1e4,allowTransparency:!0,convertEol:!0,disableStdin:!0,drawBoldTextInBrightColors:!0,theme:t}),i.attachCustomKeyEventHandler(a=>{const s=a.metaKey||a.ctrlKey;return!(s&&a.key==="`"||s&&a.key==="j"||s&&a.key==="k")}),H=new we,i.loadAddon(H);const e=new ke((a,s)=>{try{const l=new URL(s);l.hostname==="localhost"||l.hostname==="127.0.0.1"?Ce(s).then(g=>{se(async()=>{const{getPanelLayoutManager:k}=await import("./0LjODXcP.js").then(A=>A.p);return{getPanelLayoutManager:k}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]),import.meta.url).then(({getPanelLayoutManager:k})=>{k(b()).openBrowserPanel(g.url,void 0,void 0,g.requestedUrl)}).catch(()=>{window.open(g.url,"_blank")})}):window.open(s,"_blank")}catch{window.open(s,"_blank")}});i.loadAddon(e),i.open(B),V.applyTheme(i),X=requestAnimationFrame(()=>{X=null,H?.fit()}),G=new ResizeObserver(()=>{H?.fit()}),G.observe(B),jt()}function jt(){if(!i)return;const t=At.select(m.state,b(),$());t.chunks.length>0&&i.write(t.chunks.map(e=>e.text).join("")),Y(Q,t.dropped+t.chunks.length)}function _t(){E!==null&&(cancelAnimationFrame(E),E=null),X!==null&&(cancelAnimationFrame(X),X=null),G?.disconnect(),G=null,V?.dispose(),V=null;const t=i;i=null,H=null,Y(Q,0),t&&xe(t)}C(()=>{const t=v(),e=yt(()=>O(Q)),a=t.dropped+t.chunks.length;if(!i||a<=e)return;const s=Math.max(e-t.dropped,0);i.write(t.chunks.slice(s).map(l=>l.text).join("")),Y(Q,a)}),C(()=>{const t=S();i&&i.options.fontFamily!==t&&(i.options.fontFamily=t)});function Ut(){O(pt)||m.dispatch(_e(b(),$()))}function Ht(){if(!b()){rt.error(n.terminal_scriptOutput_noWorkspace_error());return}m.dispatch(be(b(),$(),W()?.text,ft))}C(()=>{u().status==="idle"&&v().chunks.length===0&&_t()}),C(()=>{!(u().status==="idle"&&v().chunks.length===0)&&B&&!i&&(E!==null&&cancelAnimationFrame(E),E=requestAnimationFrame(()=>{E=null,Wt()}))}),ie(()=>{_t()});var Vt={get scriptId(){return $()},set scriptId(t){$(t),Z()},get workspaceId(){return b()},set workspaceId(t){b(t),Z()},get class(){return st()},set class(t=""){st(t),Z()},get runDisabled(){return at()},set runDisabled(t=!1){at(t),Z()},get runDisabledReason(){return P()},set runDisabledReason(t=null){P(t),Z()},$set:te,$on:(t,e)=>re(c,t,e)},tt=je(),vt=F(tt);{var Xt=t=>{var e=qe(),a=F(e),s=F(a),l=F(s);ct(l,{get icon(){return Se},size:"xs"}),D(s);var g=p(s,2),k=R(g,!0);D(a);var A=p(a,2);{var d=r=>{$t(r,{variant:"outline",size:"sm",class:"h-7 text-xs bg-background border border-border text-danger",onclick:Ht,children:(o,w)=>{var z=Dt(),K=wt(z);ct(K,{get icon(){return Ae},size:"sm",class:"mr-1.5"});var et=p(K);x(ot=>h(et,` ${ot??""}`),[()=>n.terminal_scriptOutput_askAiToFix_label()]),f(o,z)},$$slots:{default:!0}})};I(A,r=>{Rt()||r(d)})}D(e),x(r=>h(k,r),[()=>n.terminal_scriptOutput_buildFailed_label({exitCode:u().exitCode??0})]),f(t,e)};I(vt,t=>{O(Mt)&&t(Xt)})}var bt=p(vt,2);{var Kt=t=>{var e=Be(),a=F(e),s=R(a,!0),l=p(a,2),g=R(l,!0),k=p(l,2);{var A=r=>{var o=Pe();let w;var z=R(o,!0);x(()=>{w=le(o,"",w,{"font-family":S()}),h(z,W().text)}),f(r,o)},d=r=>{var o=Te(),w=R(o,!0);x(z=>h(w,z),[()=>W().status==="loading"?n.terminal_scriptOutput_retainedLoading_label():n.terminal_scriptOutput_retainedUnavailable_label()]),f(r,o)};I(k,r=>{W().status==="available"?r(A):r(d,-1)})}D(e),x((r,o)=>{h(s,r),h(g,o)},[()=>n.terminal_scriptOutput_retained_label(),()=>n.terminal_scriptOutput_retained_description()]),de("open","toggle",e,r=>Y(nt,r),()=>O(nt)),f(t,e)};I(bt,t=>{W()&&t(Kt)})}var gt=p(bt,2);{var Jt=t=>{var e=Ee(),a=R(e,!0);x(s=>h(a,s),[()=>n.terminal_scriptOutput_live_label()]),f(t,e)};I(gt,t=>{v().chunks.length>0&&W()&&t(Jt)})}var xt=p(gt,2);{var Yt=t=>{var e=We(),a=F(e),s=p(F(a),2);{var l=d=>{var r=ze(),o=R(r,!0);x(w=>h(o,w),[()=>ve(dt())]),f(d,r)};I(s,d=>{dt()&&d(l)})}var g=p(s,2);{let d=N(()=>P()??void 0),r=N(()=>n.terminal_scriptOutput_run_label()),o=N(()=>P()?j:void 0);$t(g,{variant:"ghost",size:"xs",get disabled(){return O(pt)},get tooltip(){return O(d)},get"aria-label"(){return O(r)},get"aria-describedby"(){return O(o)},onclick:Ut,class:"text-muted-foreground hover:text-foreground",children:(w,z)=>{var K=Dt(),et=wt(K);ct(et,{get icon(){return $e},class:"h-3 w-3 mr-1"});var ot=p(et);x(Gt=>h(ot,` ${Gt??""}`),[()=>n.terminal_scriptOutput_run_label()]),f(w,K)},$$slots:{default:!0}})}var k=p(g,2);{var A=d=>{var r=Me(),o=R(r,!0);x(()=>{ce(r,"id",j),h(o,P())}),f(d,r)};I(k,d=>{P()&&d(A)})}D(a),D(e),f(t,e)};I(xt,t=>{u().status==="idle"&&v().chunks.length===0&&t(Yt)})}var it=p(xt,2);let ht;var Nt=F(it);ue(Nt,t=>B=t,()=>B),D(it),D(tt),x(()=>{St(tt,1,`script-output-viewer ${st()??""}`,"svelte-115p4sl"),ht=St(it,1,"flex-1 relative overflow-hidden",null,ht,{hidden:u().status==="idle"&&v().chunks.length===0})}),f(_,tt);var Zt=oe(Vt);return It(),Zt}async function fr(_,c,j){const L=ut.select(m.state,_,c);if(!L||!j()||!Ct.select(m.state,_,c))return;const u=Ft(L.runtime?.status),v=Ot.select(m.state,_);if(!v){rt.error(n.workspace_client_accessChanged_error());return}if(!await Le({title:n.scripts_delete_title({name:L.name}),description:u?n.scripts_delete_running_description():n.scripts_delete_description(),confirmLabel:n.scripts_delete_label(),destructive:!0}))return;if(v!==Ot.select(m.state,_)){rt.error(n.workspace_client_accessChanged_error());return}const S=ut.select(m.state,_,c);if(!j()||!S||S.createdAt!==L.createdAt||S.name!==L.name||!u&&Ft(S.runtime?.status)||!Ct.select(m.state,_,c)){rt.error(n.scripts_delete_changed_error());return}m.dispatch(ge(_,c,n.terminal_quakeOverlay_deleteScriptFailed_error()))}export{Ue as S,fr as c};
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/paBp5EDQ.js","/app/immutable/chunks/ClpAEjbe.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/CpP1PKzF.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CgBcONKs.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/WSVFXKpL.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CVA75Jzf.js","/app/immutable/chunks/C1zxTHwk.js","/app/immutable/chunks/wmcYjLAa.js","/app/immutable/chunks/CnGVh7I3.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/BVi5KkOP.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/BwASeArv.js","/app/immutable/chunks/CPDV_dyu.js","/app/immutable/chunks/BejTxFyR.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/DSqSJXGX.js","/app/immutable/chunks/Xh71Wbuh.js","/app/immutable/chunks/By588DV1.js","/app/immutable/chunks/BeYVt6Wg.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/CtJxHvGv.js","/app/immutable/chunks/oXpJ1LFx.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/D9Ykl3eH.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CTV49dzf.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/pO_uIUtS.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/b89lNINv.js","/app/immutable/chunks/DujUyPvo.js","/app/immutable/chunks/ByoP16rr.js","/app/immutable/chunks/C5TH9nNS.js","/app/immutable/chunks/B6-GEB4b.js","/app/immutable/chunks/B5aYN90J.js"])))=>i.map(i=>d[i]);
2
- import{t as Dt,bo as h,bw as Bt,b as Ft,bm as g,bp as Hf,bs as ht,bq as la,br as js,b6 as Yl,bj as zf,b9 as Wf,bi as jf,ba as Uf,bf as qf,a$ as Vf,b3 as Kf,bh as Gf,bk as Jf,a_ as Yf,b8 as Xf,b7 as Zf,b1 as Qf,be as $f,bl as eg,bu as Xl,bd as tg,b5 as rg,b4 as ng,b2 as ag,bc as og,bb as sg,bg as ig,b0 as lg,_ as cg}from"./ClpAEjbe.js";import{bI as dg,bj as xo,aG as ug,bs as Ht,ca as _t,c0 as jn,aD as e,a7 as mt,ay as De,bS as m,be as rr,b$ as jt,b_ as I,bO as x,W as u,bH as T,c9 as d,a5 as P,bl as L,bA as w,bn as zt,bV as he,aA as b,aB as k,c5 as dn,aC as Ua,bo as Wo,br as Yr,bk as ss,ai as ao,cd as Lo,aw as Tn,a as pg,aj as Nr,c7 as fg,c6 as Zl,bf as Qo,bz as jd}from"./CJxGDkBm.js";import{i as F}from"./wmcYjLAa.js";import{k as no}from"./Xh71Wbuh.js";import{g as Lt,h as gg,e as Un,I as is,i as Lr,o as vg,p as mg,f as hg,s as bg}from"./BwASeArv.js";import{s as cn}from"./WSVFXKpL.js";import{c as Cr}from"./DSqSJXGX.js";import{n as Oi}from"./oXpJ1LFx.js";import{b as yg,s as se,g as Rn,e as _n,c as ir,f as pt}from"./CnGVh7I3.js";import{b as fr}from"./NtFyWdpR.js";import{p as Ud,bG as qd,cX as Vd,dT as _g,dF as xg,aI as wg,cG as kg,ac as Ig,d1 as Sg,dE as $o,aN as Us,ce as Cg,R as Eg,b as Pg,a9 as Ql,d7 as Ag,c2 as Tg,X as Rg,dA as Mg,a3 as Lg,dK as Ng,aq as Og,cu as Dg,c_ as Bg,aE as Fg,n as Hg,H as zg}from"./D9Ykl3eH.js";import{c as Wg}from"./D-62MVd3.js";import{m as Wn,w as jg,C as Kd,c as Ug,R as qg}from"./C1zxTHwk.js";import{aa as Gd,f as St,ah as Ro,ae as Di}from"./BVi5KkOP.js";import{w as Vg,F as Kg}from"./CPDV_dyu.js";import{T as Gg}from"./ClEpfV0K.js";import{F as Tt,bj as Bi,bO as Jg,aq as Yg,aS as Xg,cQ as Zg,bn as pl,bE as Qg,aI as Jd,aN as fl,d3 as Ts,ad as Fi,cs as $g,ch as ev,cn as gl,cK as vl,bv as tv,e as rv,c3 as $l,cd as nv,cq as av,c$ as Yd,bY as ov,ba as gi,bg as Go,aH as sv,aB as Hi,aw as Xd,be as Zd,bF as iv,B as lv,by as cv,a2 as Qd,b5 as dv,a8 as $d,cl as uv,an as eu,cS as tu,cO as ec,au as ru,aM as tc,cA as pv,cZ as fv,cT as gv,aL as vv,b1 as mv,bR as nu,bp as hv,ap as ml,c9 as rc,aA as bv,ab as yv,a9 as _v}from"./CtJxHvGv.js";import{c as au}from"./ChTqQfQN.js";import{g as xv}from"./BeYVt6Wg.js";import{Jq as Nt,bY as wv,sw as nc,t5 as kv,Kg as Iv,Km as Sv,m as ou,J3 as su,nU as iu,o8 as lu,o7 as cu,nN as qs,qw as hl,yE as Cv,vG as Is,uZ as zi,vI as Ev,nB as du,Jv as Pv,tN as Av,oY as uu,rQ as bl,mh as ac,a9 as oc,ri as Tv,re as Rv,rj as Mv,ra as Lv,rg as Nv,vw as Ov,Bm as pu,Bq as fu,o9 as sc,Ag as Dv,Ae as Bv,Ai as Fv,bq as Wi,HO as Hv,I$ as zv,hp as ic,ho as Wv,o3 as jv,wH as Uv,wI as qv,wG as lc,Cl as sa,cD as gu,cr as Vv,xF as Kv,dc as Gv,dj as Jv,Bw as Yv}from"./CpP1PKzF.js";import{z as vu,I as mu}from"./Bqd7fdCF.js";import{e as cc,i as hu}from"./CL3a4Hm1.js";import{e as dc,d as bu,b as Xv,a as Zv,f as Qv,I as $v}from"./sppurVVE.js";import{b as yu}from"./BxAKyA2J.js";/* empty css */import{d as _u,G as xu,R as wu,g as ku,f as em,M as Iu,C as tm,q as yl,l as rm,h as nm,e as am,a as Su,o as om,S as Ao,K as sm}from"./B06RKBOm.js";import{D as im,e as lm}from"./CgBcONKs.js";import"./Gb7Ohwuc.js";import"./BYiyLeZ4.js";import"./Qt_rZNko.js";import{b as cm}from"./PBef_gss.js";import{r as dm}from"./BqoCUMk3.js";import{a6 as um,ck as pm,cm as fm,cl as gm,b3 as vm,b1 as mm,b2 as hm,a4 as bm,am as bs,al as ym,cV as _m,aB as uc,aJ as xm,ak as wm,C as km,i as Im,E as Ss,cW as Sm,aY as pc,c$ as Cm,ah as Em,a9 as Pm,r as Am,p as Tm,aG as Rm,d2 as Mm,cM as Lm,cF as Nm,R as Om,cw as Dm,bU as Bm}from"./eHy-2vQk.js";import{v as Fm,k as Hm,E as zm,l as Wm,V as jm,q as Um,n as qm,A as fc,s as Vm,I as Km,R as Gm,m as Jm,W as Ym,o as Cu,S as Eu,i as Xm,g as gc,f as Zm,e as Qm,j as $m,h as eh,c as vc,r as th}from"./DVkhmNxg.js";import{a as rh}from"./CP03b_lt.js";import{aA as nh,aH as ah,g as oh,n as sh,aK as ih,K as lh,M as ch,O as dh,at as uh,aD as ph,av as fh}from"./b89lNINv.js";import{f as gh,e as vh,m as ji,bF as mh,B as hh,bE as bh,bB as yh,ai as mc,bD as _h,be as Ui,ar as xh,k as wh,b4 as kh,q as hc,A as Ih,L as bc}from"./CVA75Jzf.js";import{i as Sh,I as No,c as yc}from"./MZe3NxQe.js";import{A as Ch,s as Eh}from"./BjmThgx9.js";import{e as _c,l as xc,M as Pu,m as qi,w as bo}from"./C8GDR5mq.js";import{b as Au}from"./B5fQcqb-.js";import{H as Ph}from"./CIMWDf4a.js";import{t as es}from"./DAsc1V4f.js";import{a as Ah}from"./B5wwCKYG.js";import{P as Th}from"./CMe1I98y.js";import{C as Vi}from"./CWupBtSA.js";import"./DmNlyOFF.js";import{d as Rh,c as Mh}from"./DM2Efanx.js";import{O as Lh,M as Nh}from"./wJsFiZDi.js";import{aQ as Oh,aZ as Dh,aB as Bh,b1 as Fh,aO as Hh,aY as zh,aU as Wh,a7 as Do,b4 as wc,aK as jh,aR as Uh,aX as _l,aS as xl,W as vi,aq as qh,X as Vh,a$ as Kh,aJ as Gh,aT as Jh,aW as Yh,b7 as Xh,b5 as Zh,ay as Tu,p as Qh,n as $h,aV as eb,_ as tb,ao as rb,aD as nb,z as ab,aC as ob,a8 as sb}from"./DsATs4Yw.js";import{s as Ki}from"./D0WHOKE3.js";import{e as kc}from"./CsFPvReh.js";import{M as ib}from"./Dd_i7pU1.js";import{s as lb,a as cb}from"./BsieX9dN.js";import{u as wl,w as db,v as Vs,I as ub,A as Ic,e as Bo,d as Fa,J as Sc,c as pb,f as fb,g as Cc,i as gb,b as vb,o as Ru,j as mb,q as Gi,r as hb,O as bb,x as yb,k as Mu,S as _b,N as xb,p as wb,n as Ec,z as kb,s as Ib}from"./DoKriIRg.js";import{o as Pc,T as mi,a as Sb}from"./Byc-Gwn1.js";import{O as Cb,x as Eb,i as Pb,g as Ab,V as Tb,d as Rb}from"./BxKppgO5.js";import{D as ts}from"./Buf2XX2m.js";import{l as nr,e as Mb,f as Ac,m as Tc}from"./By588DV1.js";import{A as rs}from"./BCrI1nnw.js";import"./DvfG7QDh.js";import{h as Lu}from"./BigcqNWS.js";import{C as ya}from"./CTsZeMVP.js";import{M as Lb}from"./BpXYSrHL.js";/* empty css */import{g as kl}from"./G-nrQJwO.js";import{h as Ji}from"./paBp5EDQ.js";import{f as Rc,d as Nb}from"./DpqgMZNx.js";import{c as Cs}from"./DjAHTP5R.js";import{handleIntentLink as Ob}from"./BiWBSez2.js";import{a as Mc}from"./D0H3cACA.js";import{t as Yi}from"./D2MmXC4A.js";import{s as Db,a as Bb,M as Nu}from"./D9E1Sed-.js";import{b as Fb,k as Hb}from"./C5TH9nNS.js";import{m as zb}from"./PVXvIyE8.js";import{showAssistantContent as Wb}from"./DdfA1Cl6.js";import{o as Rs,c as jb,n as Ub}from"./a_hFrVUs.js";import{p as qb}from"./tDXv5z_U.js";import{H as Vb}from"./DRG24ZS8.js";import{d as Kb,c as Gb,r as Jb,g as Yb,w as Jo,e as Xb,W as Zb,b as Qb}from"./D7X_WaSL.js";import{A as Lc}from"./Dd5ei__B.js";import{m as $b}from"./BOXv-Vsz.js";import{h as ys}from"./V1moMw6X.js";import{g as ey,e as ty,f as ry,h as ny}from"./B5aYN90J.js";import{T as hi}from"./Cfkb8WUl.js";import"./D_G_nxUe.js";import{S as ja}from"./CWDALWEd.js";import{O as ay,M as oy,X as sy,J as iy}from"./B6-GEB4b.js";import{S as Zo,a as Xi,V as ly,b as mo,W as Zi,M as cy,C as dy,R as uy,P as py,y as fy,l as gy,_ as vy,X as my,Z as Nc,U as hy,Y as by}from"./Ct82vzld.js";import{D as yy}from"./DnYPeWf9.js";import{a as _y}from"./R9aYbjet.js";import{a as xy}from"./BdWqymET.js";import{p as wy}from"./CwLBVHwC.js";const ky="intent:inline-visual-draft";function AP(r,t){const n=t.title.replace(/\s+/g," ").trim(),a=JSON.stringify({inputs:t.inputs,results:t.results},null,2),o=(a.match(/`+/g)??[]).reduce((c,l)=>Math.max(c,l.length),0),s="`".repeat(Math.max(3,o+1));return`${r}${r?`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BTtsrh4I.js","/app/immutable/chunks/ClpAEjbe.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/CpP1PKzF.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CgBcONKs.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/WSVFXKpL.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CSfWCx1k.js","/app/immutable/chunks/C1zxTHwk.js","/app/immutable/chunks/wmcYjLAa.js","/app/immutable/chunks/CnGVh7I3.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/BVi5KkOP.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/BwASeArv.js","/app/immutable/chunks/CPDV_dyu.js","/app/immutable/chunks/BejTxFyR.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/DSqSJXGX.js","/app/immutable/chunks/Xh71Wbuh.js","/app/immutable/chunks/By588DV1.js","/app/immutable/chunks/BeYVt6Wg.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/CtJxHvGv.js","/app/immutable/chunks/oXpJ1LFx.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/D9Ykl3eH.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/CTV49dzf.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/BHINa8Ry.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/b89lNINv.js","/app/immutable/chunks/DujUyPvo.js","/app/immutable/chunks/ByoP16rr.js","/app/immutable/chunks/C5TH9nNS.js","/app/immutable/chunks/B6-GEB4b.js","/app/immutable/chunks/B5aYN90J.js"])))=>i.map(i=>d[i]);
2
+ import{t as Dt,bo as h,bw as Bt,b as Ft,bm as g,bp as Hf,bs as ht,bq as la,br as js,b6 as Yl,bj as zf,b9 as Wf,bi as jf,ba as Uf,bf as qf,a$ as Vf,b3 as Kf,bh as Gf,bk as Jf,a_ as Yf,b8 as Xf,b7 as Zf,b1 as Qf,be as $f,bl as eg,bu as Xl,bd as tg,b5 as rg,b4 as ng,b2 as ag,bc as og,bb as sg,bg as ig,b0 as lg,_ as cg}from"./ClpAEjbe.js";import{bI as dg,bj as xo,aG as ug,bs as Ht,ca as _t,c0 as jn,aD as e,a7 as mt,ay as De,bS as m,be as rr,b$ as jt,b_ as I,bO as x,W as u,bH as T,c9 as d,a5 as P,bl as L,bA as w,bn as zt,bV as he,aA as b,aB as k,c5 as dn,aC as Ua,bo as Wo,br as Yr,bk as ss,ai as ao,cd as Lo,aw as Tn,a as pg,aj as Nr,c7 as fg,c6 as Zl,bf as Qo,bz as jd}from"./CJxGDkBm.js";import{i as F}from"./wmcYjLAa.js";import{k as no}from"./Xh71Wbuh.js";import{g as Lt,h as gg,e as Un,I as is,i as Lr,o as vg,p as mg,f as hg,s as bg}from"./BwASeArv.js";import{s as cn}from"./WSVFXKpL.js";import{c as Cr}from"./DSqSJXGX.js";import{n as Oi}from"./oXpJ1LFx.js";import{b as yg,s as se,g as Rn,e as _n,c as ir,f as pt}from"./CnGVh7I3.js";import{b as fr}from"./NtFyWdpR.js";import{p as Ud,bG as qd,cX as Vd,dT as _g,dF as xg,aI as wg,cG as kg,ac as Ig,d1 as Sg,dE as $o,aN as Us,ce as Cg,R as Eg,b as Pg,a9 as Ql,d7 as Ag,c2 as Tg,X as Rg,dA as Mg,a3 as Lg,dK as Ng,aq as Og,cu as Dg,c_ as Bg,aE as Fg,n as Hg,H as zg}from"./D9Ykl3eH.js";import{c as Wg}from"./D-62MVd3.js";import{m as Wn,w as jg,C as Kd,c as Ug,R as qg}from"./C1zxTHwk.js";import{aa as Gd,f as St,ah as Ro,ae as Di}from"./BVi5KkOP.js";import{w as Vg,F as Kg}from"./CPDV_dyu.js";import{T as Gg}from"./ClEpfV0K.js";import{F as Tt,bj as Bi,bO as Jg,aq as Yg,aS as Xg,cQ as Zg,bn as pl,bE as Qg,aI as Jd,aN as fl,d3 as Ts,ad as Fi,cs as $g,ch as ev,cn as gl,cK as vl,bv as tv,e as rv,c3 as $l,cd as nv,cq as av,c$ as Yd,bY as ov,ba as gi,bg as Go,aH as sv,aB as Hi,aw as Xd,be as Zd,bF as iv,B as lv,by as cv,a2 as Qd,b5 as dv,a8 as $d,cl as uv,an as eu,cS as tu,cO as ec,au as ru,aM as tc,cA as pv,cZ as fv,cT as gv,aL as vv,b1 as mv,bR as nu,bp as hv,ap as ml,c9 as rc,aA as bv,ab as yv,a9 as _v}from"./CtJxHvGv.js";import{c as au}from"./ChTqQfQN.js";import{g as xv}from"./BeYVt6Wg.js";import{Jq as Nt,bY as wv,sw as nc,t5 as kv,Kg as Iv,Km as Sv,m as ou,J3 as su,nU as iu,o8 as lu,o7 as cu,nN as qs,qw as hl,yE as Cv,vG as Is,uZ as zi,vI as Ev,nB as du,Jv as Pv,tN as Av,oY as uu,rQ as bl,mh as ac,a9 as oc,ri as Tv,re as Rv,rj as Mv,ra as Lv,rg as Nv,vw as Ov,Bm as pu,Bq as fu,o9 as sc,Ag as Dv,Ae as Bv,Ai as Fv,bq as Wi,HO as Hv,I$ as zv,hp as ic,ho as Wv,o3 as jv,wH as Uv,wI as qv,wG as lc,Cl as sa,cD as gu,cr as Vv,xF as Kv,dc as Gv,dj as Jv,Bw as Yv}from"./CpP1PKzF.js";import{z as vu,I as mu}from"./Bqd7fdCF.js";import{e as cc,i as hu}from"./CL3a4Hm1.js";import{e as dc,d as bu,b as Xv,a as Zv,f as Qv,I as $v}from"./CWm_YxN-.js";import{b as yu}from"./BxAKyA2J.js";/* empty css */import{d as _u,G as xu,R as wu,g as ku,f as em,M as Iu,C as tm,q as yl,l as rm,h as nm,e as am,a as Su,o as om,S as Ao,K as sm}from"./B06RKBOm.js";import{D as im,e as lm}from"./CgBcONKs.js";import"./Gb7Ohwuc.js";import"./BYiyLeZ4.js";import"./Qt_rZNko.js";import{b as cm}from"./PBef_gss.js";import{r as dm}from"./BqoCUMk3.js";import{a6 as um,ck as pm,cm as fm,cl as gm,b3 as vm,b1 as mm,b2 as hm,a4 as bm,am as bs,al as ym,cV as _m,aB as uc,aJ as xm,ak as wm,C as km,i as Im,E as Ss,cW as Sm,aY as pc,c$ as Cm,ah as Em,a9 as Pm,r as Am,p as Tm,aG as Rm,d2 as Mm,cM as Lm,cF as Nm,R as Om,cw as Dm,bU as Bm}from"./DfC089Aj.js";import{v as Fm,k as Hm,E as zm,l as Wm,V as jm,q as Um,n as qm,A as fc,s as Vm,I as Km,R as Gm,m as Jm,W as Ym,o as Cu,S as Eu,i as Xm,g as gc,f as Zm,e as Qm,j as $m,h as eh,c as vc,r as th}from"./D0Rl0jWy.js";import{a as rh}from"./-JM4IO5s.js";import{aA as nh,aH as ah,g as oh,n as sh,aK as ih,K as lh,M as ch,O as dh,at as uh,aD as ph,av as fh}from"./b89lNINv.js";import{f as gh,e as vh,m as ji,bF as mh,B as hh,bE as bh,bB as yh,ai as mc,bD as _h,be as Ui,ar as xh,k as wh,b4 as kh,q as hc,A as Ih,L as bc}from"./CSfWCx1k.js";import{i as Sh,I as No,c as yc}from"./MZe3NxQe.js";import{A as Ch,s as Eh}from"./BPE9rssu.js";import{e as _c,l as xc,M as Pu,m as qi,w as bo}from"./D1gQR6EA.js";import{b as Au}from"./B5fQcqb-.js";import{H as Ph}from"./CIMWDf4a.js";import{t as es}from"./DAsc1V4f.js";import{a as Ah}from"./B5wwCKYG.js";import{P as Th}from"./CMe1I98y.js";import{C as Vi}from"./CWupBtSA.js";import"./BTwXmxv4.js";import{d as Rh,c as Mh}from"./DM2Efanx.js";import{O as Lh,M as Nh}from"./wJsFiZDi.js";import{aQ as Oh,aZ as Dh,aB as Bh,b1 as Fh,aO as Hh,aY as zh,aU as Wh,a7 as Do,b4 as wc,aK as jh,aR as Uh,aX as _l,aS as xl,W as vi,aq as qh,X as Vh,a$ as Kh,aJ as Gh,aT as Jh,aW as Yh,b7 as Xh,b5 as Zh,ay as Tu,p as Qh,n as $h,aV as eb,_ as tb,ao as rb,aD as nb,z as ab,aC as ob,a8 as sb}from"./BlT-PlLX.js";import{s as Ki}from"./BcI2Qs88.js";import{e as kc}from"./CsFPvReh.js";import{M as ib}from"./Dd_i7pU1.js";import{s as lb,a as cb}from"./BsieX9dN.js";import{u as wl,w as db,v as Vs,I as ub,A as Ic,e as Bo,d as Fa,J as Sc,c as pb,f as fb,g as Cc,i as gb,b as vb,o as Ru,j as mb,q as Gi,r as hb,O as bb,x as yb,k as Mu,S as _b,N as xb,p as wb,n as Ec,z as kb,s as Ib}from"./DthXaxFc.js";import{o as Pc,T as mi,a as Sb}from"./BTTV-GiU.js";import{O as Cb,x as Eb,i as Pb,g as Ab,V as Tb,d as Rb}from"./BxKppgO5.js";import{D as ts}from"./DwIiGflF.js";import{l as nr,e as Mb,f as Ac,m as Tc}from"./By588DV1.js";import{A as rs}from"./BCrI1nnw.js";import"./DvfG7QDh.js";import{h as Lu}from"./BigcqNWS.js";import{C as ya}from"./CTsZeMVP.js";import{M as Lb}from"./6s1pPvLx.js";/* empty css */import{g as kl}from"./G-nrQJwO.js";import{h as Ji}from"./BTtsrh4I.js";import{f as Rc,d as Nb}from"./Fg5V-_KH.js";import{c as Cs}from"./DjAHTP5R.js";import{handleIntentLink as Ob}from"./B62l45Uf.js";import{a as Mc}from"./D0H3cACA.js";import{t as Yi}from"./D2MmXC4A.js";import{s as Db,a as Bb,M as Nu}from"./BIoeY2kf.js";import{b as Fb,k as Hb}from"./C5TH9nNS.js";import{m as zb}from"./PVXvIyE8.js";import{showAssistantContent as Wb}from"./DRX7fFc0.js";import{o as Rs,c as jb,n as Ub}from"./1cfvZqIL.js";import{p as qb}from"./Dl1bhT5L.js";import{H as Vb}from"./DRG24ZS8.js";import{d as Kb,c as Gb,r as Jb,g as Yb,w as Jo,e as Xb,W as Zb,b as Qb}from"./D72FFXC3.js";import{A as Lc}from"./Dd5ei__B.js";import{m as $b}from"./BOXv-Vsz.js";import{h as ys}from"./V1moMw6X.js";import{g as ey,e as ty,f as ry,h as ny}from"./B5aYN90J.js";import{T as hi}from"./Cfkb8WUl.js";import"./D_G_nxUe.js";import{S as ja}from"./CWDALWEd.js";import{O as ay,M as oy,X as sy,J as iy}from"./B6-GEB4b.js";import{S as Zo,a as Xi,V as ly,b as mo,W as Zi,M as cy,C as dy,R as uy,P as py,y as fy,l as gy,_ as vy,X as my,Z as Nc,U as hy,Y as by}from"./Ct82vzld.js";import{D as yy}from"./DnYPeWf9.js";import{a as _y}from"./R9aYbjet.js";import{a as xy}from"./BdWqymET.js";import{p as wy}from"./EYYp06eB.js";const ky="intent:inline-visual-draft";function AP(r,t){const n=t.title.replace(/\s+/g," ").trim(),a=JSON.stringify({inputs:t.inputs,results:t.results},null,2),o=(a.match(/`+/g)??[]).reduce((c,l)=>Math.max(c,l.length),0),s="`".repeat(Math.max(3,o+1));return`${r}${r?`
3
3
 
4
4
  `:""}${n}
5
5
 
@@ -294,7 +294,7 @@ ${r.content}`:a.content=r.content,a):r.old_text!==void 0&&r.new_text!==void 0?(a
294
294
  `,qk=["background","foreground","card","card-foreground","primary","primary-ink","primary-foreground","secondary","secondary-foreground","muted","muted-foreground","border","input","ring","danger","danger-background","info","info-foreground","success","success-foreground","warning","warning-foreground","font-ui","font-code","text-body-size","text-body-line-height","text-body-weight","text-body-tracking","radius-small","radius-medium","radius-large","app-background","sidebar","sidebar-accent","agent-avatar-surface-active","agent-avatar-foreground","diagram-host-surface","diagram-canvas","diagram-label-surface","diagram-node-surface","diagram-node-hover-surface","diagram-node-outline","diagram-node-title","diagram-metadata","diagram-group-outline","diagram-connector","diagram-connector-hover","diagram-connector-muted","diagram-connector-inactive","diagram-connector-danger","diagram-connector-success","diagram-connector-warning","diagram-connector-active","diagram-accent","diagram-accent-foreground","diagram-node-radius","diagram-group-radius","diagram-connector-width","text-caption-size","text-caption-line-height","text-caption-weight","text-caption-tracking","text-body-strong-size","text-body-strong-line-height","text-body-strong-weight","text-body-strong-tracking","space-1","space-2","space-3","space-4","space-5","space-6","space-7","control-height-compact","control-height-small","control-height-medium","control-height-large","radius-full","spring-fast","spring-fast-exit","spring-fast-ease","spring-moderate","spring-moderate-exit","spring-moderate-ease","spring-slow","spring-slow-exit","spring-slow-ease","spring-exit-ease","motion-fast","motion-standard","motion-slow","ease-standard","ease-emphasized-out","motion-reduced"],Ti=96,kd=2e4,Vk=480,Vp=512,Kk=["default-src 'none'","script-src 'unsafe-inline'","style-src 'unsafe-inline'","img-src data:","connect-src 'none'","font-src data:","media-src 'none'","object-src 'none'","frame-src 'none'","child-src 'none'","worker-src 'none'","manifest-src 'none'","base-uri 'none'","form-action 'none'"].join("; ");function Gk(r,t,n,a,o,s){const c=new MessageChannel,l=MessagePort.prototype.postMessage.bind(c.port1);window.parent.postMessage({channel:r,type:"scroll-port"},"*",[c.port2]);const p=(C,D={})=>{window.parent.postMessage({channel:r,type:C,...D},"*")};let i=o?.state??null,f=null,v=!1;Object.defineProperty(window,"intentVisual",{configurable:!1,writable:!1,value:Object.freeze({get state(){return i},publish(C){try{if(!s(C))return!1;const D=JSON.parse(JSON.stringify(C));return i=D.state,f=D,v||(v=!0,requestAnimationFrame(()=>{v=!1,f&&p("snapshot",{snapshot:f}),f=null})),!0}catch{return!1}}})});let M=!1,_=-1,y=innerHeight,R=Number.NaN,O=0,B=0;const H=()=>{if(M=!1,!document.body)return;let C=Math.ceil(Math.max(document.body.scrollHeight,document.body.getBoundingClientRect().height));const D=innerHeight,K=C-D;if(D>y+1&&K>1&&Math.abs(K-R)<=1?O+=1:(D!==y||K<=1)&&(O=0),y=D,R=K,!B&&O>=3){B=Math.max(a,D);const j="Page height follows the frame (vh units or height: 100%); frame height held.";console.warn(j),p("layout",{message:j})}B&&(C=Math.min(C,B)),C!==_&&(_=C,p("resize",{height:C}))},S=()=>{M||(M=!0,requestAnimationFrame(H))},A=C=>{if(!C||typeof C.dark!="boolean"||!C.variables)return;const D=document.documentElement;D.classList.toggle("dark",C.dark),D.style.colorScheme=C.dark?"dark":"light";const K=C.variables["--inline-html-root-font-size"];"--inline-html-root-font-size"in t.variables&&typeof K=="string"&&K.length<512&&D.style.setProperty("--inline-html-root-font-size",K);for(const j of Object.keys(t.variables)){if(j==="--inline-html-root-font-size")continue;const V=C.variables[j];typeof V=="string"&&V.length<512&&D.style.setProperty(j,V)}S()};window.addEventListener("message",C=>{C.source!==window.parent||!C.data||C.data.channel!==r||C.data.type==="theme"&&A(C.data.theme)});const W=C=>{if(C.defaultPrevented||!C.isTrusted||C.ctrlKey||C.metaKey||C.shiftKey||!C.deltaY||Math.abs(C.deltaX)>Math.abs(C.deltaY))return;const D=V=>{const de=getComputedStyle(V);if(V!==document.scrollingElement&&!/^(auto|scroll|overlay)$/.test(de.overflowY)||/^(hidden|clip)$/.test(de.overflowY))return!1;const X=V.scrollHeight-V.clientHeight;return X>1&&(C.deltaY<0?V.scrollTop>1:V.scrollTop<X-1)};if(C.composedPath().some(V=>V instanceof Element&&D(V))||document.scrollingElement&&D(document.scrollingElement))return;const K=C.deltaMode===WheelEvent.DOM_DELTA_LINE?parseFloat(getComputedStyle(document.body).lineHeight)||16:C.deltaMode===WheelEvent.DOM_DELTA_PAGE?innerHeight:1,j=Math.max(-n,Math.min(n,C.deltaY*K));Number.isFinite(j)&&(C.preventDefault(),l({deltaY:j}))};window.addEventListener("wheel",()=>{window.removeEventListener("wheel",W),window.addEventListener("wheel",W,{passive:!1})},{capture:!0,passive:!1}),window.addEventListener("error",C=>{C.message&&p("error",{message:C.message.slice(0,300)})}),window.addEventListener("unhandledrejection",C=>{const D=C.reason;p("error",{message:String(D instanceof Error?D.message:D).slice(0,300)})}),window.addEventListener("click",C=>{const D=C.target instanceof Element?C.target.closest("a, area"):null;if(!D)return;(D.getAttribute("href")??D.getAttribute("xlink:href"))?.startsWith("#")||C.preventDefault()},!0),window.addEventListener("submit",C=>C.preventDefault(),!0),A(t),window.addEventListener("DOMContentLoaded",()=>{new ResizeObserver(S).observe(document.body),new MutationObserver(S).observe(document.body,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),window.addEventListener("resize",S),document.addEventListener("load",S,!0),document.fonts.ready.then(S),p("ready"),S()},{once:!0})}function Jk(r,t,n,a,o){const s=document.createElement("iframe");s.setAttribute("sandbox","allow-scripts"),s.setAttribute("referrerpolicy","no-referrer"),s.title=n,s.style.cssText="display:block;width:100%;height:100%;border:0;";let c;const l=p=>{const i=p.data?.deltaY;typeof i=="number"&&Number.isFinite(i)&&i!==0&&Math.abs(i)<=a&&window.parent.postMessage({channel:r,type:"wheel",deltaY:i},"*")};window.addEventListener("message",p=>{const i=p.data;if(!(!i||typeof i!="object"||i.channel!==r)){if(p.source===window.parent&&i.type==="theme"){s.contentWindow?.postMessage({channel:r,type:"theme",theme:i.theme},"*");return}if(!(p.source!==s.contentWindow||p.origin!=="null")){if(i.type==="scroll-port"&&!c&&p.ports.length===1){c=p.ports[0],c.onmessage=l;return}i.type==="resize"&&typeof i.height=="number"&&Number.isFinite(i.height)&&i.height>=0?window.parent.postMessage({channel:r,type:"resize",height:i.height},"*"):i.type==="ready"?window.parent.postMessage({channel:r,type:"ready"},"*"):(i.type==="error"||i.type==="layout")&&typeof i.message=="string"?window.parent.postMessage({channel:r,type:i.type,message:i.message.slice(0,300)},"*"):i.type==="snapshot"&&o(i.snapshot)&&window.parent.postMessage({channel:r,type:"snapshot",snapshot:i.snapshot},"*")}}}),window.addEventListener("DOMContentLoaded",()=>{s.srcdoc=t,document.body.append(s)},{once:!0})}function Yk(r,t,n,a,o,s,c,l){const p=document.implementation.createHTMLDocument(""),i=p.createElement("template");i.innerHTML=n,p.body.append(i.content);const f=j=>{j.querySelectorAll("meta, base, link, iframe, frame, frameset, object, embed").forEach(V=>V.remove()),j.querySelectorAll("template").forEach(V=>f(V.content)),j.querySelectorAll("a, area").forEach(V=>{for(const de of["href","xlink:href"])V.getAttribute(de)?.startsWith("#")||V.removeAttribute(de);V.removeAttribute("target"),V.removeAttribute("ping"),V.removeAttribute("download")})};f(p);const v=j=>JSON.stringify(j).replace(/</g,"\\u003c"),M=p.createElement("meta");M.httpEquiv="Content-Security-Policy",M.content=r.csp;const _=p.createElement("meta");_.setAttribute("charset","utf-8");const y=p.createElement("style"),R=/^data:[\w.+/-]+;base64,[A-Za-z0-9+/=]+$/.test(l)?`@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900;
295
295
  font-display: swap; src: url('${l}') format('woff2'); }`:"";y.textContent=`${R}${r.styles}`;const O=p.createElement("script"),B=v([a,o,r.maxScrollDelta,r.lockHeight,t(c)?c:null]);O.textContent=`(${r.bridge})(...${B}, (${r.validate}));`,p.head.prepend(M,_,y,O);const H=`<!doctype html>${p.documentElement.outerHTML}`,S=document.implementation.createHTMLDocument(""),A=S.createElement("meta");A.httpEquiv="Content-Security-Policy",A.content=r.csp.replace("frame-src 'none'","frame-src about:");const W=S.createElement("meta");W.setAttribute("charset","utf-8");const C=S.createElement("style");C.textContent="html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }";const D=S.createElement("script"),K=v([a,H,s,r.maxScrollDelta]);return D.textContent=`(${r.shell})(...${K}, (${r.validate}));`,S.head.prepend(A,W,C,D),`<!doctype html>${S.documentElement.outerHTML}`}const Xk=()=>({csp:Kk,styles:Uk,maxScrollDelta:Vp,lockHeight:Vk,bridge:Gk.toString(),shell:Jk.toString(),validate:bl.toString()});function Zk(r,t,n,a,o=null,s=""){return Yk(Xk(),bl,r,t,n,a,o,s)}function Id(r){const t=getComputedStyle(r);return{dark:document.documentElement.classList.contains("dark"),variables:{...Object.fromEntries(qk.map(n=>[`--${n}`,t.getPropertyValue(`--${n}`).trim()])),"--inline-html-root-font-size":getComputedStyle(document.documentElement).fontSize}}}function Qk(r,t,n,a,o=null){return Zk(r,t,n,a,o,jk)}var $k=k('<p class="type-caption m-0 break-words px-4 pb-2 text-muted-foreground"> </p>'),e2=k('<div class="type-body flex items-center justify-between gap-3 px-4 py-2" role="status"><span class="text-danger"> </span> <!></div> <!>',1),t2=k('<p class="sr-only" role="status"> </p>'),r2=k('<p class="type-body m-0 px-4 py-3 text-muted-foreground" role="status"> </p>'),n2=k('<div class="type-body px-4 py-2 text-danger" role="status"><p class="m-0"> </p> <p class="type-code m-0 break-words"> </p></div>'),a2=k('<iframe sandbox="allow-scripts" referrerpolicy="no-referrer"></iframe>'),o2=k('<div class="space-y-4 p-4" aria-hidden="true"><div class="space-y-2"><!> <!></div> <!> <div class="flex items-center gap-4"><!> <!> <!></div></div>'),s2=k('<span aria-hidden="true"><!></span> <span class="min-w-0 flex-1 whitespace-normal text-pretty"> </span>',1),i2=k('<p class="type-caption m-0 break-words px-4 pb-2 text-muted-foreground" role="status"> <!></p>'),l2=k('<th class="min-w-40 px-2 pb-3 align-top font-normal"><!> <div class="mt-1 flex gap-1"><!> <!></div></th>'),c2=k('<td class="max-w-56 px-2 py-2 align-top break-words tabular-nums"> </td>'),d2=k('<tr><th class="max-w-48 py-2 pr-4 align-top font-normal break-words text-muted-foreground"> </th><!></tr>'),u2=k('<div class="overflow-x-auto px-4 pb-4" data-inline-visual-comparison=""><table class="type-body w-full border-separate border-spacing-0 text-left"><thead><tr><th class="min-w-28 pr-4 pb-3 font-normal text-muted-foreground"> </th><th class="min-w-32 px-2 pb-3 align-top font-medium"> </th><!></tr></thead><tbody></tbody></table></div>'),p2=k("<!> <!>",1),f2=k('<div data-inline-html="" class="my-3 min-w-0 overflow-hidden rounded-lg bg-background text-foreground"><!> <!> <div class="relative min-w-0"><!> <!></div> <div class="flex min-w-0 items-center justify-between gap-2 px-4 pt-1 pb-3" data-inline-visual-actions=""><!> <!></div> <!></div>');function Kp(r,t){if(new.target)return Dt({component:Kp,...r});Ht(t,!0);const n=720,a=1e4;let o=h(t,"source",7),s=h(t,"isStreaming",7,!1),c=h(t,"isComplete",7,!0),l=h(t,"record",7),p=h(t,"storageStatus",7,"ready"),i=h(t,"onRecordChange",7),f=h(t,"onUseConfiguration",7),v=h(t,"onExport",7),M=h(t,"onRetry",7),_=h(t,"storageError",7),y=h(t,"exportStatus",7),R=h(t,"exportPath",7),O=h(t,"exportError",7),B,H=he(void 0),S=he(!1),A=he(!1),W=he(0),C=he(""),D=he(""),K=he(!1),j=he(""),V=he(Yr(Ti)),de=he(n),X=he(""),be=he(ac()),ce=he(void 0),Ee=he(void 0),le,Pe=he(void 0),re=he(!1);const Q=d(()=>l()??e(be)),xe=d(()=>e(Ee)!==void 0&&e(ce)!==void 0&&!zb(e(Ee),e(ce).inputs)),te=d(()=>p()!=="loading"&&(p()!=="error"||!!e(Q).current)),Me=d(()=>!s()&&c()&&!!o().trim()&&e(te)),Je=d(()=>Math.min(kd,Math.max(Ti,e(V)))),Ke=d(()=>s()||p()==="loading"?"loading":c()?o().trim()?e(j)?"error":e(K)?"ready":"loading":"empty":"incomplete"),Z=d(()=>s()||p()==="loading"||e(Me)&&!e(K)&&!e(j)),$=d(()=>om([{id:"source",label:e(A)?Wf():jf()},{id:"reload",label:Uf(),disabled:!e(Me)},{id:"save",label:qf(),when:!!(e(ce)&&e(Me)),disabled:!e(K)||!!e(j)||e(Q).scenarios.length>=oc,group:"configuration"},{id:"compare",label:Vf(),when:!!(e(ce)&&e(Me)&&e(Q).scenarios.length),group:"configuration"},{id:"export",label:Kf(),when:!!(e(ce)&&e(Me)&&v()),disabled:!e(K)||y()==="saving",group:"configuration"}]));function we(ue){ue==="source"?T(A,!e(A)):ue==="reload"?T(W,e(W)+1):ue==="save"?J():ue==="compare"?T(re,!e(re)):ue==="export"&&v()?.({...e(Q),current:e(ce)??null})}function z(ue){const Te={...ue,current:e(ce)??ue.current};T(be,Te),i()?.(Te)}function J(){const ue=e(ce);!ue||e(Q).scenarios.length>=oc||(z({...e(Q),scenarios:[...e(Q).scenarios,{id:crypto.randomUUID(),name:Gf({number:Tc(e(Q).scenarios.length+1)}),snapshot:structuredClone(ue)}]}),T(re,!0))}function G(ue,Te){const Qe=Te.trim().slice(0,120);Qe&&z({...e(Q),scenarios:e(Q).scenarios.map(gt=>gt.id===ue?{...gt,name:Qe}:gt)})}function ie(ue){const Te=structuredClone(ue);T(ce,Te),T(Pe,Te),z({...e(Q),current:Te}),T(W,e(W)+1)}function Ie(ue){return typeof ue=="number"?Tc(ue):typeof ue=="string"?ue:JSON.stringify(ue)}function Le(){!e(H)?.contentWindow||!e(D)||e(H).contentWindow.postMessage({channel:e(D),type:"theme",theme:Id(B)},"*")}function ee(ue){let Te=B.parentElement;for(;Te;){const Qe=getComputedStyle(Te),gt=Te.scrollHeight-Te.clientHeight;if(/^(auto|scroll|overlay)$/.test(Qe.overflowY)&&gt>1){if(ue<0?Te.scrollTop>0:Te.scrollTop<gt){Te.dispatchEvent(new WheelEvent("wheel",{deltaY:ue,bubbles:!0})),Te.scrollTop+=ue;return}if(/^(contain|none)$/.test(Qe.overscrollBehaviorY))return}Te=Te.parentElement}window.scrollBy({top:ue,behavior:"instant"})}_t(()=>{if(!e(S))return;const ue=o(),Te=e(Me);e(W),dn(()=>{le!==ue&&(T(be,ac()),T(ce,void 0),T(Ee,void 0),T(re,!1),T(Pe,void 0),le=ue),T(K,!1),T(j,""),T(X,""),T(V,Ti,!0),T(D,crypto.randomUUID(),!0),T(C,Te?Qk(ue,e(D),Id(B),Yl(),e(Pe)??e(ce)??e(Q).current):"",!0),T(Pe,void 0)})}),_t(()=>{if(!e(C)||e(K)||e(j))return;const ue=setTimeout(()=>{T(j,zf(),!0)},a);return()=>clearTimeout(ue)}),ss(()=>{T(S,!0);const ue=ut=>{if(ut.source!==e(H)?.contentWindow||ut.origin!=="null")return;const at=ut.data;if(!(!at||typeof at!="object"||at.channel!==e(D))){if(at.type==="bootstrap"){e(H)?.contentWindow?.postMessage({channel:e(D),type:"initialize",documentHtml:e(C)},"*");return}if(at.type==="resize"&&typeof at.height=="number"&&Number.isFinite(at.height)&&at.height>=0)T(V,Math.min(kd,Math.ceil(at.height)),!0);else if(at.type==="ready")T(K,!0),Le();else if(at.type==="error"&&typeof at.message=="string")T(j,at.message.slice(0,300),!0);else if(at.type==="layout"&&typeof at.message=="string")T(X,at.message.slice(0,300),!0);else if(at.type==="snapshot"&&e(Me)&&bl(at.snapshot)){const Et=at.snapshot;T(Ee,e(Ee)??structuredClone(Et.inputs)),T(ce,Et),z({...e(Q),current:Et})}else at.type==="wheel"&&e(K)&&e(Me)&&!e(A)&&!e(Z)&&typeof at.deltaY=="number"&&Number.isFinite(at.deltaY)&&at.deltaY!==0&&Math.abs(at.deltaY)<=Vp&&ee(at.deltaY)}},Te=()=>{T(de,Math.min(n,Math.max(160,Math.floor(window.innerHeight*.8))),!0)},Qe=new MutationObserver(Le);Qe.observe(document.documentElement,{attributes:!0,attributeFilter:["class","style","data-theme"]});const gt=window.matchMedia("(prefers-color-scheme: dark)");return gt.addEventListener("change",Le),window.addEventListener("message",ue),window.addEventListener("resize",Te),Te(),()=>{Qe.disconnect(),gt.removeEventListener("change",Le),window.removeEventListener("message",ue),window.removeEventListener("resize",Te)}});var ne={get source(){return o()},set source(ue){o(ue),b()},get isStreaming(){return s()},set isStreaming(ue=!1){s(ue),b()},get isComplete(){return c()},set isComplete(ue=!0){c(ue),b()},get record(){return l()},set record(ue){l(ue),b()},get storageStatus(){return p()},set storageStatus(ue="ready"){p(ue),b()},get onRecordChange(){return i()},set onRecordChange(ue){i(ue),b()},get onUseConfiguration(){return f()},set onUseConfiguration(ue){f(ue),b()},get onExport(){return v()},set onExport(ue){v(ue),b()},get onRetry(){return M()},set onRetry(ue){M(ue),b()},get storageError(){return _()},set storageError(ue){_(ue),b()},get exportStatus(){return y()},set exportStatus(ue){y(ue),b()},get exportPath(){return R()},set exportPath(ue){R(ue),b()},get exportError(){return O()},set exportError(ue){O(ue),b()},$set:Bt,$on:(ue,Te)=>Ft(t,ue,Te)},Se=f2(),Ye=P(Se);{var ye=ue=>{var Te=e2(),Qe=De(Te),gt=P(Qe),ut=L(gt,!0),at=m(gt,2);{var Et=Rt=>{St(Rt,{variant:"ghost",size:"sm",get onclick(){return M()},children:(Gt,ar)=>{rr();var qt=jt();I(Oe=>x(qt,Oe),[()=>tg()]),u(Gt,qt)},$$slots:{default:!0}})};F(at,Rt=>{M()&&Rt(Et)})}w(Qe);var wt=m(Qe,2);{var kt=Rt=>{var Gt=$k(),ar=L(Gt,!0);I(()=>x(ar,_())),u(Rt,Gt)};F(wt,Rt=>{_()&&Rt(kt)})}I(Rt=>x(ut,Rt),[()=>Jf()]),u(ue,Te)};F(Ye,ue=>{p()==="error"&&ue(ye)})}var Ae=m(Ye,2);{var Y=ue=>{var Te=t2(),Qe=L(Te,!0);I(gt=>x(Qe,gt),[()=>s()?Yf():Xf()]),u(ue,Te)},Ce=ue=>{var Te=r2(),Qe=L(Te,!0);I(gt=>x(Qe,gt),[()=>c()?Qf():Zf()]),u(ue,Te)},pe=ue=>{var Te=n2(),Qe=P(Te),gt=L(Qe,!0),ut=m(Qe,2),at=L(ut,!0);w(Te),I(Et=>{x(gt,Et),x(at,e(j))},[()=>$f()]),u(ue,Te)};F(Ae,ue=>{e(Z)?ue(Y):e(Me)?e(j)&&ue(pe,2):ue(Ce,1)})}var N=m(Ae,2),q=P(N);{var _e=ue=>{var Te=mt(),Qe=De(Te);no(Qe,()=>e(D),gt=>{var ut=a2();let at,Et;fr(ut,wt=>T(H,wt),()=>e(H)),I(wt=>{se(ut,"title",wt),se(ut,"src",`/inline-html-sandbox.html#${e(D)}`),at=pt(ut,1,"block w-full border-0 svelte-1kkow1d",null,at,{"preview-hidden":e(A)||!e(K)}),se(ut,"aria-hidden",e(A)||!e(K)),Et=Rn(ut,"",Et,{height:`${e(Je)}px`})},[()=>Yl()]),u(gt,ut)}),u(ue,Te)};F(q,ue=>{e(Me)&&e(C)&&ue(_e)})}var qe=m(q,2);{var Ne=ue=>{ya(ue,{get code(){return o()},language:"html",noBorder:!0,noMargin:!0,get maxHeight(){return e(de)}})},Ve=ue=>{var Te=o2(),Qe=P(Te),gt=P(Qe);Ao(gt,{class:"h-4 w-32 max-w-1/2"});var ut=m(gt,2);Ao(ut,{class:"h-3 w-2/3"}),w(Qe);var at=m(Qe,2);Ao(at,{class:"aspect-video max-h-60 w-full rounded-lg"});var Et=m(at,2),wt=P(Et);Ao(wt,{class:"h-3 w-16"});var kt=m(wt,2);Ao(kt,{class:"h-2 min-w-0 flex-1"});var Rt=m(kt,2);Ao(Rt,{class:"h-3 w-10"}),w(Et),w(Te),u(ue,Te)};F(qe,ue=>{e(A)?ue(Ne):e(Z)&&ue(Ve,1)})}w(N);var Ge=m(N,2),lt=P(Ge);{var bt=ue=>{{let Te=d(()=>!e(K)||!!e(j));St(ue,{variant:"plain",size:"sm",wrapContent:!1,get class(){return`${Gi} ${hb} h-auto min-w-0 shrink justify-start rounded-sm border border-transparent px-1.5 py-0.5 text-left hover:text-foreground`},style:"gap: var(--operational-leading-gap)","data-typography-role":"body",get disabled(){return e(Te)},onclick:()=>e(ce)&&f()(e(ce)),children:(Qe,gt)=>{var ut=s2(),at=De(ut),Et=P(at);Tt(Et,{get icon(){return Qd},size:16,get class(){return Fa}}),w(at);var wt=m(at,2),kt=L(wt,!0);I(Rt=>{pt(at,1,`${Bo??""} mt-px self-start`,"svelte-1kkow1d"),x(kt,Rt)},[()=>eg()]),u(Qe,ut)},$$slots:{default:!0}})}};F(lt,ue=>{e(ce)&&e(xe)&&e(Me)&&f()&&!e(A)&&ue(bt)})}var xt=m(lt,2);{const ue=(Qe,gt)=>{let ut=()=>(gt?.()).props;{let at=d(()=>Xl());St(Qe,js(ut,{variant:"ghost",size:"icon-sm",class:"ml-auto text-muted-foreground",get"aria-label"(){return e(at)},children:(Et,wt)=>{Tt(Et,{get icon(){return dv},size:16})},$$slots:{default:!0}}))}};let Te=d(()=>Xl());Su(xt,{get actions(){return e($)},get ariaLabel(){return e(Te)},align:"end",side:"top",onAction:we,trigger:ue,$$slots:{trigger:!0}})}w(Ge);var Kt=m(Ge,2);{var Ct=ue=>{var Te=p2(),Qe=De(Te);{var gt=Et=>{var wt=i2(),kt=P(wt),Rt=m(kt);{var Gt=ar=>{var qt=jt();I(()=>x(qt,O())),u(ar,qt)};F(Rt,ar=>{y()==="error"&&O()&&ar(Gt)})}w(wt),I(ar=>x(kt,`${ar??""} `),[()=>y()==="saving"?rg():y()==="saved"?ng({path:R()??""}):ag()]),u(Et,wt)};F(Qe,Et=>{y()&&Et(gt)})}var ut=m(Qe,2);{var at=Et=>{var wt=u2(),kt=P(wt),Rt=P(kt),Gt=P(Rt),ar=P(Gt),qt=L(ar,!0),Oe=m(ar),fe=L(Oe,!0),Ze=m(Oe);Lt(Ze,17,()=>e(Q).scenarios,nt=>nt.id,(nt,Fe)=>{var oe=l2(),ke=P(oe);{let ze=d(()=>ig());No(ke,{get value(){return e(Fe).name},get"aria-label"(){return e(ze)},maxlength:120,onblur:He=>{He.currentTarget.value.trim()||(He.currentTarget.value=e(Fe).name),G(e(Fe).id,He.currentTarget.value)},onkeydown:He=>{He.key==="Enter"&&He.currentTarget.blur(),He.key==="Escape"&&(He.currentTarget.value=e(Fe).name,He.currentTarget.blur())}})}var ge=m(ke,2),Be=P(ge);St(Be,{variant:"ghost",size:"sm",onclick:()=>ie(e(Fe).snapshot),children:(ze,He)=>{rr();var Xe=jt();I($e=>x(Xe,$e),[()=>og()]),u(ze,Xe)},$$slots:{default:!0}});var ve=m(Be,2);St(ve,{variant:"ghost",size:"sm",onclick:()=>z({...e(Q),scenarios:e(Q).scenarios.filter(ze=>ze.id!==e(Fe).id)}),children:(ze,He)=>{rr();var Xe=jt();I($e=>x(Xe,$e),[()=>sg()]),u(ze,Xe)},$$slots:{default:!0}}),w(ge),w(oe),u(nt,oe)}),w(Gt),w(Rt);var it=m(Rt);Lt(it,20,()=>["inputs","results"],Lr,(nt,Fe)=>{const oe=d(()=>Fe),ke=d(()=>Array.from(new Set([...Object.keys(e(ce)[e(oe)]),...e(Q).scenarios.flatMap(ve=>Object.keys(ve.snapshot[e(oe)]))])));var ge=mt(),Be=De(ge);Lt(Be,16,()=>e(ke),ve=>ve,(ve,ze)=>{var He=d2(),Xe=P(He),$e=L(Xe,!0),We=m(Xe);Lt(We,17,()=>[e(ce),...e(Q).scenarios.map(et=>et.snapshot)],Lr,(et,je)=>{var tt=c2(),rt=L(tt,!0);I(st=>x(rt,st),[()=>Object.hasOwn(e(je)[e(oe)],ze)?Ie(e(je)[e(oe)][ze]):"—"]),u(et,tt)}),w(He),I(()=>x($e,ze)),u(ve,He)}),u(nt,ge)}),w(it),w(kt),w(wt),I(nt=>{x(qt,e(ce).title),x(fe,nt)},[()=>lg()]),u(Et,wt)};F(ut,Et=>{e(re)&&e(Q).scenarios.length&&Et(at)})}u(ue,Te)};F(Kt,ue=>{e(ce)&&e(Me)&&ue(Ct)})}return w(Se),fr(Se,ue=>B=ue,()=>B),I(()=>{se(Se,"data-inline-html-status",e(Ke)),se(Se,"data-inline-html-layout",e(X)?"viewport-locked":void 0),se(Se,"aria-busy",e(Z))}),u(r,Se),zt(ne)}var g2=k('<div class="w-full min-w-0"><!></div>');function v2(r,t){if(new.target)return Dt({component:v2,...r});Ht(t,!0);const n=()=>ht(e(_),"$agent$",o),a=()=>ht(e(B),"$entry$",o),[o,s]=la();let c=h(t,"block",7),l=h(t,"role",7),p=h(t,"workspaceId",7),i=h(t,"agentId",7),f=h(t,"messageId",7),v=h(t,"contentBlockKey",7,""),M=he(void 0);const _=d(()=>Us(i()??"")),y=d(()=>l()==="assistant"&&p()&&i()&&f()&&c().metadata?.fenceClosed&&!c().metadata?.isStreaming&&n()&&!uu(n())?{workspaceId:p(),agentId:i(),messageId:f(),blockKey:JSON.stringify([v(),c().metadata?.fenceStart??0]),source:c().content}:void 0),R=d(()=>!!(p()&&i()&&f()&&c().metadata?.fenceClosed&&!n())),O=d(()=>e(y)?Nv(e(y)):""),B=d(()=>Hh(e(O)));_t(()=>{e(y)&&Nt.dispatch(Tv(e(y)))});function H(j){!p()||!i()||n()?.retiredAt||e(M)?.dispatchEvent(new CustomEvent(ky,{bubbles:!0,detail:{workspaceId:p(),agentId:i(),snapshot:j}}))}var S={get block(){return c()},set block(j){c(j),b()},get role(){return l()},set role(j){l(j),b()},get workspaceId(){return p()},set workspaceId(j){p(j),b()},get agentId(){return i()},set agentId(j){i(j),b()},get messageId(){return f()},set messageId(j){f(j),b()},get contentBlockKey(){return v()},set contentBlockKey(j=""){v(j),b()},$set:Bt,$on:(j,V)=>Ft(t,j,V)},A=mt(),W=De(A);{var C=j=>{var V=g2(),de=P(V);{let X=d(()=>c().metadata?.isStreaming??!1),be=d(()=>c().metadata?.fenceClosed??!1),ce=d(()=>a()?.record),Ee=d(()=>e(y)?a()?.status??"loading":e(R)?"loading":"ready"),le=d(()=>a()?.error),Pe=d(()=>e(y)?Ke=>Nt.dispatch(Lv(e(O),Ke)):void 0),re=d(()=>p()&&i()&&n()&&!n().retiredAt?H:void 0),Q=d(()=>e(y)?()=>Nt.dispatch(Mv(e(O))):void 0),xe=d(()=>e(y)?Ke=>Nt.dispatch(Rv(e(O),crypto.randomUUID(),Ke)):void 0),te=d(()=>a()?.export?.status),Me=d(()=>a()?.export?.path),Je=d(()=>a()?.export?.error);Kp(de,{get source(){return c().content},get isStreaming(){return e(X)},get isComplete(){return e(be)},get record(){return e(ce)},get storageStatus(){return e(Ee)},get storageError(){return e(le)},get onRecordChange(){return e(Pe)},get onUseConfiguration(){return e(re)},get onRetry(){return e(Q)},get onExport(){return e(xe)},get exportStatus(){return e(te)},get exportPath(){return e(Me)},get exportError(){return e(Je)}})}w(V),fr(V,X=>T(M,X),()=>e(M)),u(j,V)},D=j=>{ya(j,{get code(){return c().content},language:"html"})};F(W,j=>{l()==="assistant"?j(C):j(D,-1)})}u(r,A);var K=zt(S);return s(),K}var m2=k('<div class="digest-card flex items-start gap-2.5 py-5 px-6 my-4 shadow-xs text-base leading-normal border border-border"> </div>');function h2(r,t){if(new.target)return Dt({component:h2,...r});Ht(t,!0);let n=h(t,"digest",7);var a={get digest(){return n()},set digest(c){n(c),b()},$set:Bt,$on:(c,l)=>Ft(t,c,l)},o=m2(),s=L(o,!0);return I(()=>x(s,n())),u(r,o),zt(a)}var b2=k('<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-blue-500/15 text-blue-600 dark:text-blue-400"> </span>'),y2=k('<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-muted text-muted-foreground"> </span>'),_2=k('<span class="inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium bg-primary/10 text-primary/80"> </span>'),x2=k('<div class="flex items-start gap-3 px-4 py-2.5"><div class="flex-1 min-w-0"><div class="flex items-center gap-2 flex-wrap"><span class="text-sm font-semibold text-foreground"> </span> <!> <!></div> <div class="mt-0.5 text-xs font-mono text-muted-foreground truncate"> </div></div></div>'),w2=k('<div class="detected-scripts-card my-3 rounded-lg border border-border bg-muted/30 overflow-hidden"><div class="flex items-center gap-2 px-4 py-2.5 border-b border-border bg-muted/40"><!> <span class="text-sm font-semibold text-foreground"> </span></div> <div class="divide-y divide-border"></div> <div class="px-4 py-2 border-t border-border bg-muted/20"><span class="text-xs text-muted-foreground"> </span></div></div>');function k2(r,t){if(new.target)return Dt({component:k2,...r});Ht(t,!0);let n=h(t,"scripts",7);var a={get scripts(){return n()},set scripts(_){n(_),b()},$set:Bt,$on:(_,y)=>Ft(t,_,y)},o=w2(),s=P(o),c=P(s);Tt(c,{get icon(){return Yd},size:"sm",class:"text-primary-ink/70"});var l=m(c,2),p=L(l,!0);w(s);var i=m(s,2);Lt(i,21,n,_=>_.name+_.command,(_,y)=>{var R=x2(),O=P(R),B=P(O),H=P(B),S=L(H,!0),A=m(H,2);{var W=de=>{var X=b2(),be=L(X,!0);I(ce=>x(be,ce),[()=>g.chat_detectedScripts_service_badge()]),u(de,X)},C=de=>{var X=y2(),be=L(X,!0);I(ce=>x(be,ce),[()=>g.chat_detectedScripts_command_badge()]),u(de,X)};F(A,de=>{e(y).mode==="service"?de(W):de(C,-1)})}var D=m(A,2);{var K=de=>{var X=_2(),be=L(X,!0);I(()=>x(be,e(y).category)),u(de,X)};F(D,de=>{e(y).category&&e(y).category!=="other"&&de(K)})}w(B);var j=m(B,2),V=L(j,!0);w(O),w(R),I(()=>{x(S,e(y).name),x(V,e(y).command)}),u(_,R)}),w(i);var f=m(i,2),v=P(f),M=L(v,!0);return w(f),w(o),I((_,y)=>{x(p,_),x(M,y)},[()=>g.chat_detectedScripts_title(),()=>n().length===1?g.chat_detectedScripts_count_one({count:nr(n().length)}):g.chat_detectedScripts_count_many({count:nr(n().length)})]),u(r,o),zt(a)}function I2(r,t){if(new.target)return Dt({component:I2,...r});Ht(t,!0);let n=h(t,"diff",7),a=h(t,"filePath",7),o=h(t,"language",7),s=h(t,"onApply",7),c=h(t,"onReject",7);function l(){s()?.(),Wn.success(g.chat_diffViewer_applied_toast())}function p(){c()?.(),Wn.info(g.chat_diffViewer_rejected_toast())}const i=d(()=>{const v=[];return s()&&v.push({label:g.chat_diffViewer_apply_label(),variant:"success",onClick:l}),c()&&v.push({label:g.chat_diffViewer_reject_label(),variant:"danger",onClick:p}),v});var f={get diff(){return n()},set diff(v){n(v),b()},get filePath(){return a()},set filePath(v){a(v),b()},get language(){return o()},set language(v){o(v),b()},get onApply(){return s()},set onApply(v){s(v),b()},get onReject(){return c()},set onReject(v){c(v),b()},$set:Bt,$on:(v,M)=>Ft(t,v,M)};{let v=d(()=>a()||g.chat_diffViewer_suggestedChanges_fallback());ts(r,{get patch(){return n()},get fileName(){return e(v)},get language(){return o()},get actions(){return e(i)},collapsible:!0,initialCollapsed:!1,maxHeight:"500px"})}return zt(f)}var S2=Ua('<circle fill="none" style="transition: stroke-dasharray 0.3s ease-out"></circle>'),Sd=Ua("<circle></circle>"),C2=Ua('<svg class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 fill-background" viewBox="0 0 8 6"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.69471 1.69471C7.87687 1.50611 7.97766 1.25351 7.97539 0.991311C7.97311 0.729114 7.86794 0.478302 7.68253 0.292894C7.49712 0.107485 7.24631 0.00231622 6.98411 3.78025e-05C6.72192 -0.00224062 6.46931 0.0985542 6.28071 0.280712L2.98771 3.57371L1.69471 2.28071C1.50611 2.09855 1.25351 1.99776 0.991311 2.00004C0.729114 2.00232 0.478302 2.10749 0.292894 2.29289C0.107485 2.4783 0.00231622 2.72911 3.78025e-05 2.99131C-0.00224062 3.25351 0.0985542 3.50611 0.280712 3.69471L2.28071 5.69471C2.46824 5.88218 2.72255 5.9875 2.98771 5.9875C3.25288 5.9875 3.50718 5.88218 3.69471 5.69471L7.69471 1.69471Z"></path></svg>'),E2=k('<div class="relative"><svg fill="none" xmlns="http://www.w3.org/2000/svg"><circle fill="none"></circle><!></svg> <!></div>');function As(r,t){if(new.target)return Dt({component:As,...r});Ht(t,!0);let n=h(t,"phase",7),a=h(t,"progress",7,0),o=h(t,"size",7,16),s=h(t,"class",7,""),c=d(()=>o()/2),l=d(()=>e(c)),p=d(()=>e(c)),i=d(()=>o()*.12),f=d(()=>e(c)-e(i)/2),v=d(()=>e(c)*.35),M=d(()=>2*Math.PI*e(v)),_=d(()=>Math.max(0,Math.min(1,a()))*e(M));const y={planning:"#99999999",building:"#54B1F3",reviewing:"#6D7FF5",shipped:"var(--color-foreground)"};let R=d(()=>y[n()]||"currentColor");var O={get phase(){return n()},set phase(X){n(X),b()},get progress(){return a()},set progress(X=0){a(X),b()},get size(){return o()},set size(X=16){o(X),b()},get class(){return s()},set class(X=""){s(X),b()},$set:Bt,$on:(X,be)=>Ft(t,X,be)},B=E2(),H=P(B),S=P(H),A=m(S);{var W=X=>{},C=X=>{var be=S2();I(()=>{se(be,"cx",e(l)),se(be,"cy",e(p)),se(be,"r",e(v)*.8),se(be,"stroke",e(R)),se(be,"stroke-width",e(v)*1.5),se(be,"stroke-dasharray",`${e(_)??""} ${e(M)??""}`),se(be,"stroke-dashoffset",e(M)*.25),se(be,"transform",`rotate(-90 ${e(l)??""} ${e(p)??""})`)}),u(X,be)},D=X=>{var be=Sd();I(()=>{se(be,"cx",e(l)),se(be,"cy",e(p)),se(be,"r",e(f)*.6),se(be,"fill",e(R))}),u(X,be)},K=X=>{var be=Sd();I(()=>{se(be,"cx",e(l)),se(be,"cy",e(p)),se(be,"r",e(f)),se(be,"fill",e(R))}),u(X,be)};F(A,X=>{n()==="planning"?X(W):n()==="building"?X(C,1):n()==="reviewing"?X(D,2):n()==="shipped"&&X(K,3)})}w(H);var j=m(H,2);{var V=X=>{},de=X=>{var be=C2();I(()=>se(be,"width",o()*.5)),u(X,be)};F(j,X=>{n()==="reviewing"?X(V):n()==="shipped"&&X(de,1)})}return w(B),I(()=>{se(H,"width",o()),se(H,"height",o()),se(H,"viewBox",`0 0 ${o()??""} ${o()??""}`),pt(H,0,ir(s())),se(S,"cx",e(l)),se(S,"cy",e(p)),se(S,"r",e(f)),se(S,"stroke",e(R)),se(S,"stroke-width",e(i))}),u(r,B),zt(O)}var Cd=k('<span class="flex items-center gap-1"><span class="size-1.5 rounded-full"></span> </span>'),P2=k('<span class="flex items-center gap-1"><span class="size-1.5 rounded-full bg-border"></span> </span>'),Ed=k('<span class="text-ui text-subtle truncate"> </span>'),Pd=k('<div class="flex items-center gap-1 mt-0.5"><!> <!></div>'),Ad=k('<div class="flex items-start gap-2"><div class="shrink-0 mt-0.5"><!></div> <div class="flex-1 min-w-0"><div class="text-xs leading-snug truncate"> </div> <!></div></div>'),A2=k('<div class="flex items-center gap-2"><div class="shrink-0"><!></div> <span class="text-ui text-subtle truncate line-through"> </span></div>'),T2=k('<span class="text-ui text-subtle pl-4"> </span>'),R2=k('<div class="flex flex-col gap-0.5 pt-1 border-t border-border"><!> <!></div>'),M2=k('<div class="text-ui text-subtle"> </div>'),L2=k("<!> <!> <!> <!>",1),N2=k('<div class="flex flex-col py-2 px-3 gap-2 max-h-80 overflow-y-auto"><div class="flex items-center justify-between gap-3"><span class="text-xs font-semibold text-foreground"> </span> <div class="flex items-center gap-3 text-ui text-subtle"><!> <!> <!></div></div> <!></div>'),O2=k('<div class="rounded-[0.5px]"></div>');function Gp(r,t){if(new.target)return Dt({component:Gp,...r});Ht(t,!0);let n=h(t,"stats",7),a=h(t,"tasks",23,()=>[]),o=h(t,"maxBars",7,20),s=h(t,"barWidth",7,"1px"),c=h(t,"barHeight",7,"16px"),l=h(t,"gap",7,"1px"),p=h(t,"class",7);const i={completed:"#22c55e",inProgress:"#4F7BF7",notStarted:"var(--border)"};let f=d(()=>{const{completed:A,inProgress:W,notStarted:C,total:D}=n();if(D===0)return[];const K=[...Array(A).fill("completed"),...Array(W).fill("inProgress"),...Array(Math.max(0,C)).fill("notStarted")];return K.length<=o()?K:K.slice(K.length-o())}),v=d(()=>a().filter(A=>A.status==="complete")),M=d(()=>a().filter(A=>A.status==="in_progress"||A.status==="review_required")),_=d(()=>a().filter(A=>A.status!=="complete"&&A.status!=="in_progress"&&A.status!=="review_required"&&A.status!=="cancelled")),y=d(()=>a().filter(A=>A.status==="cancelled")),R=d(()=>a().length>0);var O={get stats(){return n()},set stats(A){n(A),b()},get tasks(){return a()},set tasks(A=[]){a(A),b()},get maxBars(){return o()},set maxBars(A=20){o(A),b()},get barWidth(){return s()},set barWidth(A="1px"){s(A),b()},get barHeight(){return c()},set barHeight(A="16px"){c(A),b()},get gap(){return l()},set gap(A="1px"){l(A),b()},get class(){return p()},set class(A){p(A),b()},$set:Bt,$on:(A,W)=>Ft(t,A,W)},B=mt(),H=De(B);{var S=A=>{Di(A,{side:"top",align:"start",sideOffset:6,contentClass:"max-w-xs p-0",delayDuration:200,disableHoverableContent:!1,content:C=>{var D=N2(),K=P(D),j=P(K),V=L(j,!0),de=m(j,2),X=P(de);{var be=xe=>{var te=Cd(),Me=P(te);Rn(Me,"",{},{"background-color":"#22c55e"});var Je=m(Me);w(te),I(()=>x(Je,` ${n().completed??""}`)),u(xe,te)};F(X,xe=>{n().completed>0&&xe(be)})}var ce=m(X,2);{var Ee=xe=>{var te=Cd(),Me=P(te);Rn(Me,"",{},{"background-color":"#4F7BF7"});var Je=m(Me);w(te),I(()=>x(Je,` ${n().inProgress??""}`)),u(xe,te)};F(ce,xe=>{n().inProgress>0&&xe(Ee)})}var le=m(ce,2);{var Pe=xe=>{var te=P2(),Me=m(P(te));w(te),I(()=>x(Me,` ${n().notStarted??""}`)),u(xe,te)};F(le,xe=>{n().notStarted>0&&xe(Pe)})}w(de),w(K);var re=m(K,2);{var Q=xe=>{var te=L2(),Me=De(te);Lt(Me,17,()=>e(M),Lr,(z,J)=>{var G=Ad(),ie=P(G),Ie=P(ie);mi(Ie,{get status(){return e(J).status},size:14}),w(ie);var Le=m(ie,2),ee=P(Le),ne=L(ee,!0),Se=m(ee,2);{var Ye=ye=>{var Ae=Pd(),Y=P(Ae);{let N=d(()=>e(J).agentState||"idle");Lc(Y,{get agentId(){return e(J).agentId},get state(){return e(N)},size:12,get specialist(){return e(J).agentSpecialist}})}var Ce=m(Y,2);{var pe=N=>{var q=Ed(),_e=L(q,!0);I(()=>x(_e,e(J).agentName)),u(N,q)};F(Ce,N=>{e(J).agentName&&N(pe)})}w(Ae),u(ye,Ae)};F(Se,ye=>{e(J).agentId&&ye(Ye)})}w(Le),w(G),I(()=>x(ne,e(J).title)),u(z,G)});var Je=m(Me,2);Lt(Je,17,()=>e(_),Lr,(z,J)=>{var G=Ad(),ie=P(G),Ie=P(ie);mi(Ie,{get status(){return e(J).status},size:14}),w(ie);var Le=m(ie,2),ee=P(Le),ne=L(ee,!0),Se=m(ee,2);{var Ye=ye=>{var Ae=Pd(),Y=P(Ae);{let N=d(()=>e(J).agentState||"idle");Lc(Y,{get agentId(){return e(J).agentId},get state(){return e(N)},size:12,get specialist(){return e(J).agentSpecialist}})}var Ce=m(Y,2);{var pe=N=>{var q=Ed(),_e=L(q,!0);I(()=>x(_e,e(J).agentName)),u(N,q)};F(Ce,N=>{e(J).agentName&&N(pe)})}w(Ae),u(ye,Ae)};F(Se,ye=>{e(J).agentId&&ye(Ye)})}w(Le),w(G),I(()=>x(ne,e(J).title)),u(z,G)});var Ke=m(Je,2);{var Z=z=>{var J=R2(),G=P(J);Lt(G,17,()=>e(v).slice(0,3),Lr,(Le,ee)=>{var ne=A2(),Se=P(ne),Ye=P(Se);mi(Ye,{status:"complete",size:12}),w(Se);var ye=m(Se,2),Ae=L(ye,!0);w(ne),I(()=>x(Ae,e(ee).title)),u(Le,ne)});var ie=m(G,2);{var Ie=Le=>{var ee=T2(),ne=L(ee,!0);I(Se=>x(ne,Se),[()=>g.workspace_taskProgressBar_moreCompleted_label({count:nr(e(v).length-3)})]),u(Le,ee)};F(ie,Le=>{e(v).length>3&&Le(Ie)})}w(J),u(z,J)};F(Ke,z=>{e(v).length>0&&z(Z)})}var $=m(Ke,2);{var we=z=>{var J=M2(),G=L(J,!0);I(ie=>x(G,ie),[()=>g.workspace_taskProgressBar_cancelled_label({count:nr(e(y).length)})]),u(z,J)};F($,z=>{e(y).length>0&&z(we)})}u(xe,te)};F(re,xe=>{e(R)&&xe(Q)})}w(D),I(xe=>x(V,xe),[()=>g.workspace_taskProgressBar_tasksRatio_label({completed:nr(n().completed),total:nr(n().total)})]),u(C,D)},children:(C,D)=>{{let K=d(()=>_n("flex h-auto min-w-0 shrink items-end justify-start cursor-default rounded-none border-0",p())),j=d(()=>`gap: ${l()}`),V=d(()=>g.workspace_taskProgressBar_tasksRatio_label({completed:nr(n().completed),total:nr(n().total)}));St(C,{variant:"plain",type:"button",wrapContent:!1,get class(){return e(K)},get style(){return e(j)},get"aria-label"(){return e(V)},"data-task-progress-trigger":!0,children:(de,X)=>{var be=mt(),ce=De(be);Lt(ce,17,()=>e(f),Lr,(Ee,le)=>{var Pe=O2();let re;I(()=>re=Rn(Pe,"",re,{width:s(),height:c(),"background-color":i[e(le)]})),u(Ee,Pe)}),u(de,be)},$$slots:{default:!0}})}},$$slots:{content:!0,default:!0}})};F(H,A=>{n().total>0&&A(S)})}return u(r,B),zt(O)}function Ws(r,t){if(new.target)return Dt({component:Ws,...r});Ht(t,!0);let n=h(t,"items",7),a=h(t,"ariaLabel",7),o=h(t,"open",15,!1),s=h(t,"orientation",7,"vertical"),c=h(t,"selection",7),l=h(t,"class",7,"");const p=d(()=>Ym(n(),c(),a()));var i={get items(){return n()},set items(f){n(f),b()},get ariaLabel(){return a()},set ariaLabel(f){a(f),b()},get open(){return o()},set open(f=!1){o(f),b()},get orientation(){return s()},set orientation(f="vertical"){s(f),b()},get selection(){return c()},set selection(f){c(f),b()},get class(){return l()},set class(f=""){l(f),b()},$set:Bt,$on:(f,v)=>Ft(t,f,v)};return Su(r,{get actions(){return e(p)},align:"end",get ariaLabel(){return a()},onAction:v=>Jm(n(),v)?.onClick(),get open(){return o()},set open(v){o(v)},trigger:(v,M)=>{let _=()=>(M?.()).props;St(v,js(_,{variant:"plain",size:"icon-compact",iconOnly:!0,type:"button",get class(){return l()},get"aria-label"(){return a()},onclick:y=>{y.stopPropagation(),_().onclick?.(y)},oncontextmenu:y=>{y.preventDefault(),y.stopPropagation()},children:(y,R)=>{sm(y,{get orientation(){return s()},class:"size-3.5"})},$$slots:{default:!0}}))},$$slots:{trigger:!0}}),zt(i)}var D2=k('<span class="contents"><!></span>'),B2=k("<!> <!>",1);function Jp(r,t){if(new.target)return Dt({component:Jp,...r});Ht(t,!0);let n=h(t,"workspaceId",7),a=h(t,"slot",7);const o=d(()=>xv(a()));let s=he(null);_t(()=>{e(s)&&e(s).workspaceId!==n()&&T(s,null)});function c(y){const R=Cu(y);R&&T(s,{...R,workspaceId:n()},!0)}function l(y){y.preventDefault(),y.stopPropagation();const R=y.currentTarget.getBoundingClientRect();T(s,{x:R.left,y:R.bottom+2,returnFocus:y.currentTarget,workspaceId:n()},!0)}function p(){T(s,null)}var i={get workspaceId(){return n()},set workspaceId(y){n(y),b()},get slot(){return a()},set slot(y){a(y),b()},$set:Bt,$on:(y,R)=>Ft(t,y,R)},f=B2(),v=De(f);{let y=d(()=>g.workspace_microKeyBadge_ariaLabel({number:nr(a()+1)})),R=d(()=>g.workspace_microKeyBadge_tooltip({number:nr(a()+1)})),O=d(()=>e(s)!==null);St(v,{variant:"ghost",size:"icon",type:"button",class:"micro-key-slot-badge size-4 min-w-0 shrink-0 cursor-pointer rounded-[3px] p-0 a11y-ignore",get"aria-label"(){return e(y)},get title(){return e(R)},onclick:l,oncontextmenu:c,onkeydown:c,"aria-haspopup":"menu",get"aria-expanded"(){return e(O)},children:(B,H)=>{var S=D2(),A=P(S);Ug(A,{get slot(){return a()},get class(){return`transition-colors ${e(o)??""}`}}),w(S),u(B,S)},$$slots:{default:!0}})}var M=m(v,2);{var _=y=>{{let R=d(()=>e(s)?.x??0),O=d(()=>e(s)?.y??0),B=d(()=>e(s)?.returnFocus),H=d(()=>g.workspace_card_assignMicroKey_label()),S=d(()=>Kb(n(),p));Eu(y,{get x(){return e(R)},get y(){return e(O)},get returnFocus(){return e(B)},selection:"single",get ariaLabel(){return e(H)},get items(){return e(S)},onClickOutside:p})}};F(M,y=>{e(s)&&y(_)})}return u(r,f),zt(i)}var F2=k('<span class="flex size-4 shrink-0 items-center justify-center"><!></span>'),H2=k('<span data-workspace-card-pin-indicator="" aria-hidden="true"><!></span> <span class="sr-only"> </span>',1),z2=k('<span class="type-caption shrink-0 rounded-sm bg-muted-foreground/10 px-1.5 font-normal text-muted-foreground" data-workspace-card-trailing-label=""> </span>'),W2=k('<span data-workspace-card-pr-item=""><!></span>'),j2=k('<span class="flex shrink-0 items-center" data-workspace-card-pr-list=""><!></span>'),U2=k('<span data-workspace-card-time=""><!></span>'),q2=k('<span aria-hidden="true"><!></span>'),V2=k("<div><!> <!> <!> <!></div>"),K2=k('<div data-workspace-card-hover-surface=""><!></div>'),G2=k('<div role="group" data-workspace-card-row=""><!> <div class="relative z-10 flex shrink-0 items-center gap-1.5"><!> <!> <span class="sr-only"> </span></div> <div class="relative z-10 flex min-w-0 flex-1 items-center gap-2"><span class="flex min-w-0 flex-1 items-center gap-1" data-workspace-card-title-group=""><span dir="ltr" data-workspace-card-title=""><span class="wc-title-text svelte-1ct56pd"> </span></span> <!></span> <!> <!> <!></div> <!></div> <!> <!>',1),J2=k('<div class="relative z-10 flex shrink-0 items-center"><!></div>'),Y2=k('<div><!> <!> <span class="font-medium truncate"> </span> <span class="shrink-0 text-muted-foreground">·</span> <span class="truncate text-xs text-muted-foreground"> </span> <!></div>'),X2=k('<div class="text-sm font-semibold truncate"> </div>'),Td=k('<span class="truncate"> </span>'),Z2=k('<span class="text-muted-foreground">·</span>'),Q2=k('<div class="flex items-center gap-1 truncate text-xs text-muted-foreground"><!> <!> <!></div>'),$2=k('<div><!> <!> <div class="flex items-center gap-2 text-xs"><!> <span class="truncate text-muted-foreground"> </span> <span> </span></div> <!></div>'),eI=k('<div class="flex items-center gap-2"><!> <span class="text-ui shrink-0 tabular-nums text-muted-foreground"> </span></div>'),tI=k('<div class="flex items-center justify-between text-ui"><span class="text-muted-foreground"> </span> <span class="tabular-nums"><span class="text-success"> </span> <span class="ml-1 text-danger"> </span></span></div>'),rI=k('<div class="flex items-center justify-between text-ui"><span class="text-muted-foreground"> </span></div>'),nI=k('<div class="flex items-center text-ui"><span> </span></div>'),aI=k('<div class="flex flex-col gap-1 px-3 pb-2.5"><!> <!> <!> <!></div>'),oI=k('<div class="relative z-10 flex items-center gap-1.5 px-2 pb-2"><!></div>'),sI=k('<div class="relative z-10 flex items-center gap-1.5 px-2 pb-2"><!> <!></div>'),iI=k('<div role="group"><!> <div class="flex items-start gap-2.5 px-3 pt-3 pb-2"><!> <div class="flex-1 min-w-0"><div class="text-sm font-medium"> </div> <div class="mt-0.5 line-clamp-2 text-xs leading-snug text-muted-foreground"> </div></div></div> <!> <!></div>');function cl(r,t){if(new.target)return Dt({component:cl,...r});Ht(t,!0);const n=()=>ht(Ke,"$prMonitors$",c),a=()=>ht(Z,"$microConnected$",c),o=()=>ht(we,"$hidesOwnerActions$",c),s=()=>ht($,"$workspaceKeySlot$",c),[c,l]=la();let p=h(t,"workspace",7),i=h(t,"phase",7),f=h(t,"stats",7),v=h(t,"variant",7,"compact"),M=h(t,"showTime",7,!0),_=h(t,"isRunning",7,!1),y=h(t,"isUnread",7,!1),R=h(t,"isWaiting",7),O=h(t,"isPinned",7,!1),B=h(t,"streamingAgentIds",23,()=>[]),H=h(t,"hasSpec",7,!1),S=h(t,"isAgentRunning",7,!1),A=h(t,"agentDigest",7),W=h(t,"trailingLabel",7),C=h(t,"title",7),D=h(t,"repoName",7),K=h(t,"branch",7),j=h(t,"onClick",7),V=h(t,"onAction",7),de=h(t,"onTogglePin",7),X=h(t,"onMarkAsRead",7),be=h(t,"onOpenInNewWindow",7),ce=h(t,"onHover",7),Ee=h(t,"highlighted",7,!1),le=h(t,"selected",7,!1),Pe=h(t,"highlightId",7),re=h(t,"suppressHover",7,!1),Q=h(t,"hoverPreview",7,!0),xe=h(t,"isolateHoverReveal",7,!1),te=h(t,"class",7),Me=h(t,"actions",7);const Je=Lo("");_t(()=>{Je.set(p()?.id??"")});const Ke=Ag(Je),Z=$b(),$=ih(Je),we=Tg(Je),z=d(()=>Jb(p()??{})),J=d(()=>Yb(e(z)));let G=d(()=>p()?qb.url.pathname===`/workspace/${p().id}`:!1),ie=d(()=>p()?`workspace-hover-card-${p().id}`:void 0),Ie=he(!1),Le=he(null),ee=he(null);_t(()=>{if(!e(ee))return;const ae=ys(e(ee),{id:Pe()});return()=>ae.destroy()});let ne=he(null),Se=he(null),Ye=he(null),ye=he(0),Ae=he(0),Y=d(()=>e(ye)+(e(Ae)>0?e(Ae)+4:0));function Ce(){const ae=e(ne),vt=e(Ye);T(ye,ae?Math.max(0,ae.scrollWidth-ae.clientWidth):0,!0),T(Ae,ae&&vt&&vt.getClientRects().length>0?Math.max(0,ae.getBoundingClientRect().right-vt.getBoundingClientRect().left):0,!0)}_t(()=>{const ae=e(ne),vt=e(Se),At=e(Ye);if(!ae||!vt||(Ce(),typeof ResizeObserver>"u"))return;const vr=new ResizeObserver(Ce);return vr.observe(ae),vr.observe(vt),At&&vr.observe(At),()=>vr.disconnect()});let pe=null,N=null,q=!1,_e=!1,qe=!1,Ne=!1,Ve=!1,Ge=!1,lt=he(!1),bt=!1,xt=null,Kt=he(null),Ct=null,ue;function Te(){pe!==null&&(clearTimeout(pe),pe=null)}function Qe(){N!==null&&(clearTimeout(N),N=null),Ct?.(),Ct=null}function gt(){Qe(),T(lt,!0),T(Ie,!0),!Ve&&(Ve=!0,Jo.notifyOpened())}function ut(){Qe(),clearTimeout(ue),T(lt,!1),T(Ie,!1),_e=!1,Ne=!1,Ve&&(Ve=!1,Jo.notifyClosed())}function at(){return q||_e||qe||Ne}function Et(){if(!e(Ie)){ut();return}Qe(),N=setTimeout(()=>{N=null,at()||ut()},Zb),Ct=Jo.deferClose(ut)}function wt(){_e=!0,Qe()}function kt(){_e=!1,!qe&&!Ne&&Et()}function Rt(){Ne=!0,clearTimeout(ue),Qe()}function Gt(ae){const vt=ae.relatedTarget instanceof Node?ae.relatedTarget:null;if(vt&&ge()?.contains(vt)||(Ne=!1,vt&&e(Le)?.contains(vt)))return;if(vt){!q&&!_e&&ut();return}const At=ae.target;clearTimeout(ue),ue=setTimeout(()=>{const vr=document.activeElement,wr=ge()?.contains(vr)||e(Le)?.contains(vr);vr&&vr!==At&&wr||!q&&!_e&&ut()},0)}function ar(){xt!==null&&clearTimeout(xt),bt=!0,xt=setTimeout(()=>{bt=!1,xt=null},0)}function qt(ae){const vt=ae.target,At=ge();vt instanceof Node&&At?.contains(vt)||ae.type==="scroll"&&e(Le)&&vt instanceof Node&&!vt.contains(e(Le))||(ae.type==="pointerdown"&&ar(),Te(),ut())}_t(()=>{if(e(lt))return window.addEventListener("pointerdown",qt,!0),window.addEventListener("scroll",qt,!0),()=>{window.removeEventListener("pointerdown",qt,!0),window.removeEventListener("scroll",qt,!0)}});function Oe(ae){if(ae.key!=="Escape")return;const vt=ae.target;vt instanceof Node&&ge()?.contains(vt)||(ae.preventDefault(),ae.stopPropagation(),Ge=qe,Te(),ut())}_t(()=>{if(e(Ie))return window.addEventListener("keydown",Oe,!0),()=>window.removeEventListener("keydown",Oe,!0)});const fe=d(()=>p()?Mg.select(Nt.state,p().id):null),Ze=d(()=>e(fe)?e(fe):p()?.activePullRequest?p().activePullRequest:!p()?.prStatus||p().prNumber==null?null:{id:`legacy-pr-${p().prNumber}`,number:p().prNumber,url:p().prUrl??"",title:g.workspace_hoverCard_pullRequest_label(),status:p().prStatus,createdAt:p().updatedAt,updatedAt:p().updatedAt}),it=d(()=>Rg(p())),nt=d(()=>{if(!p()||e(it))return[];const ae=p(),vt=ae.repositoryOwner&&ae.repositoryName?`${ae.repositoryOwner}/${ae.repositoryName}`:void 0;return Xm({workspacePRs:ae.pullRequests,activePR:e(Ze),monitors:n(),workspaceRepo:vt,buildPrUrl:(At,vr)=>Tm(At,ae.repositoryOwner,ae.repositoryName,vr),getDisplayTitle:At=>At.title})}),Fe=d(()=>e(nt)[0]);function oe(ae){const vt=ae.resource?.repository.provider==="gitlab"?`${ae.repo} !${ae.number}`:ae.repo?g.workspace_card_prBadge_repoLine_tooltip({repo:ae.repo,number:ae.number}):g.workspace_card_prBadge_label({number:` #${ae.number}`});return[Lg(vt,ae),ae.title,ae.details].filter(Boolean).join(`
296
296
  `)}function ke(ae){ae.key==="Enter"&&j()?.(ae)}function ge(){return e(ie)?document.getElementById(e(ie)):null}function Be(){return Array.from(ge()?.querySelectorAll("button:not(:disabled), a[href]")??[])}function ve(){const ae=e(Le)?.querySelector("[data-workspace-card-trigger]"),vt=ge();if(!ae||!vt)return null;const At=Array.from(document.querySelectorAll('button:not(:disabled), a[href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])')).filter(wr=>wr.tabIndex>=0&&!vt.contains(wr)),vr=At.indexOf(ae);return vr>=0?At[vr+1]:null}function ze(ae){Ge=!!e(Le)?.contains(ae),ut(),ae.focus({preventScroll:!0})}function He(){const ae=e(Le)?.querySelector("[data-workspace-card-trigger]");ae&&ze(ae)}async function Xe(ae){if(ae.key==="Escape"&&e(Ie)){ae.preventDefault(),ae.stopPropagation(),ut();return}ae.key!=="ArrowDown"||re()||!p()||(ae.preventDefault(),ae.stopPropagation(),T(lt,!0),T(Ie,!0),await jn(),Be()[0]?.focus({preventScroll:!0}))}function $e(ae){const vt=Be(),At=ae.key==="Tab"&&ae.shiftKey&&ae.currentTarget===vt[0],wr=ae.key==="Tab"&&!ae.shiftKey&&ae.currentTarget===vt.at(-1)?ve():null;ae.key!=="Escape"&&!At&&!wr||(ae.preventDefault(),ae.stopPropagation(),wr?ze(wr):He())}function We(){q=!0,Qe(),Jo.settleDeferredCloses(),Ce(),ce()?.(),p()&&!re()&&!qe&&(Te(),T(lt,!0),pe=setTimeout(()=>{pe=null,gt()},Jo.currentOpenDelay))}function et(){q=!1,Te(),!qe&&!Ne&&Et()}function je(){qe=!0,Te(),Qe(),!Ge&&(bt||p()&&!re()&&(T(lt,!0),T(Ie,!0)))}function tt(ae){const vt=ae.relatedTarget instanceof Node?ae.relatedTarget:null;vt&&e(Le)?.contains(vt)||(Ge=!1,qe=!1,!(vt&&ge()?.contains(vt))&&!q&&!_e&&ut())}_t(()=>{re()&&(Te(),Qe(),ut())});let rt=he(null),st=he(!1),ft;_t(()=>{const ae=p()?.id;ft!==ae&&(ft=ae,T(st,!1)),e(rt)&&e(rt).workspaceId!==p()?.id&&dt()});function Vt(ae){if(!p())return;const vt=Cu(ae);if(vt){if(T(st,!1),Wt().length===0){T(rt,null);return}T(rt,{...vt,returnFocus:ae.target instanceof HTMLElement?ae.target.closest("button")??e(Le)?.querySelector("button")??null:null,workspaceId:p().id},!0)}}function dt(){T(rt,null),T(st,!1)}_t(()=>{e(st)&&T(rt,null)}),xo(()=>{Te(),Qe(),xt!==null&&(clearTimeout(xt),xt=null),ut()});function Wt(){if(!p())return[];const ae=[];return be()&&ae.push({id:"open-new-window",label:g.workspace_card_openNewWindow_label(),icon:$d,onClick:()=>{be()?.(),dt()}}),ae.push(...Xb(p().id,{connected:a(),onClose:dt})),o()||(e(it)||ae.push({id:"transfer",label:g.workspace_card_transfer_label(),icon:uv,onClick:()=>{Nt.dispatch(Ov({workspaceId:p().id,workspaceTitle:p().title})),dt()}}),ae.push({id:"archive",label:g.workspace_card_archive_label(),icon:eu,onClick:()=>{Nt.dispatch(pu(p().id)),dt()}}),ae.push({id:"delete",label:g.workspace_card_deleteSpace_label(),icon:tu,destructive:!0,onClick:()=>{Nt.dispatch(fu(p().id)),dt()}})),ae}let Yt=d(()=>S()&&A()?A():i()?.subtitle??""),Zt=d(()=>f()&&f().tasks.total>0?f().tasks.completed/f().tasks.total:0),xr=d(()=>!!f()&&(f().tasks.total>0||f().files.changed>0||f().commits.total>0||f().pr.hasOpen||f().pr.hasMerged)),Pr=d(()=>e(it)?void 0:K()),un=d(()=>!f()||e(it)?"":f().pr.hasMerged?g.workspace_card_prMerged_label({number:f().pr.number??""}):f().pr.hasOpen?g.workspace_card_prOpen_label({number:f().pr.number?`#${f().pr.number}`:""}):""),Kr=d(()=>i()?.phase==="planning"?S()?{primary:{label:g.workspace_card_showCoordinator_label(),action:"show-coordinator"},secondary:{label:g.workspace_card_pause_label(),action:"pause"}}:H()||(f()?.tasks.total??0)>0?{primary:{label:g.workspace_card_approveStart_label(),action:"approve"},secondary:{label:g.workspace_card_viewSpec_label(),action:"view-spec"}}:{primary:{label:g.workspace_card_showCoordinator_label(),action:"show-coordinator"},secondary:{label:g.workspace_card_viewSpec_label(),action:"view-spec"}}:i()?.phase==="building"?{primary:{label:g.workspace_card_showCoordinator_label(),action:"show-coordinator"},secondary:{label:g.workspace_card_pause_label(),action:"pause"}}:i()?.phase==="reviewing"?{primary:{label:g.workspace_card_createPr_label(),action:"create-pr"},secondary:{label:g.workspace_card_showChanges_label(),action:"show-changes"}}:{primary:{label:g.workspace_card_archive_label(),action:"archive"},secondary:{label:g.workspace_card_showChanges_label(),action:"show-changes"}});const gr={planning:"bg-muted/20 text-muted-foreground",building:"bg-info/15 text-info",reviewing:"bg-primary/15 text-primary",shipped:"bg-foreground/10 text-foreground"};var Mn={get workspace(){return p()},set workspace(ae){p(ae),b()},get phase(){return i()},set phase(ae){i(ae),b()},get stats(){return f()},set stats(ae){f(ae),b()},get variant(){return v()},set variant(ae="compact"){v(ae),b()},get showTime(){return M()},set showTime(ae=!0){M(ae),b()},get isRunning(){return _()},set isRunning(ae=!1){_(ae),b()},get isUnread(){return y()},set isUnread(ae=!1){y(ae),b()},get isWaiting(){return R()},set isWaiting(ae){R(ae),b()},get isPinned(){return O()},set isPinned(ae=!1){O(ae),b()},get streamingAgentIds(){return B()},set streamingAgentIds(ae=[]){B(ae),b()},get hasSpec(){return H()},set hasSpec(ae=!1){H(ae),b()},get isAgentRunning(){return S()},set isAgentRunning(ae=!1){S(ae),b()},get agentDigest(){return A()},set agentDigest(ae){A(ae),b()},get trailingLabel(){return W()},set trailingLabel(ae){W(ae),b()},get title(){return C()},set title(ae){C(ae),b()},get repoName(){return D()},set repoName(ae){D(ae),b()},get branch(){return K()},set branch(ae){K(ae),b()},get onClick(){return j()},set onClick(ae){j(ae),b()},get onAction(){return V()},set onAction(ae){V(ae),b()},get onTogglePin(){return de()},set onTogglePin(ae){de(ae),b()},get onMarkAsRead(){return X()},set onMarkAsRead(ae){X(ae),b()},get onOpenInNewWindow(){return be()},set onOpenInNewWindow(ae){be(ae),b()},get onHover(){return ce()},set onHover(ae){ce(ae),b()},get highlighted(){return Ee()},set highlighted(ae=!1){Ee(ae),b()},get selected(){return le()},set selected(ae=!1){le(ae),b()},get highlightId(){return Pe()},set highlightId(ae){Pe(ae),b()},get suppressHover(){return re()},set suppressHover(ae=!1){re(ae),b()},get hoverPreview(){return Q()},set hoverPreview(ae=!0){Q(ae),b()},get isolateHoverReveal(){return xe()},set isolateHoverReveal(ae=!1){xe(ae),b()},get class(){return te()},set class(ae){te(ae),b()},get actions(){return Me()},set actions(ae){Me(ae),b()},$set:Bt,$on:(ae,vt)=>Ft(t,ae,vt)},qn=mt(),wa=De(qn);{var Ln=ae=>{var vt=G2(),At=De(vt);let vr;var wr=P(At);{let yt=d(()=>p().title||g.workspace_links_untitled_label()),Mt=d(()=>`workspace-status-state-${p().id}${O()?` workspace-pinned-state-${p().id}`:""}${e(Ie)?` ${e(ie)}`:""}`),cr=d(()=>e(G)?"page":void 0);St(wr,{variant:"plain",class:"absolute inset-0 z-0 h-auto w-auto rounded-md focus-visible:border-transparent focus-visible:bg-background/50 focus-visible:ring-0",get"aria-label"(){return e(yt)},get"aria-describedby"(){return e(Mt)},get"aria-current"(){return e(cr)},"data-workspace-card-trigger":!0,onkeydown:Xe,onclick:mr=>{mr.stopPropagation(),j()?.(mr)}})}var Xr=m(wr,2),Kn=P(Xr);{var Nn=yt=>{var Mt=F2(),cr=P(Mt);{var mr=Er=>{Jp(Er,{get workspaceId(){return p().id},get slot(){return s()}})};F(cr,Er=>{s()!==null&&Er(mr)})}w(Mt),u(yt,Mt)};F(Kn,yt=>{a()&&yt(Nn)})}var wn=m(Kn,2);Di(wn,{get content(){return e(J).tooltip},side:"bottom",sideOffset:4,children:(yt,Mt)=>{Gb(yt,{get status(){return e(z)},size:14,decorative:!0,class:"justify-start"})},$$slots:{default:!0}});var On=m(wn,2),ca=L(On,!0);w(Xr);var Tr=m(Xr,2),en=P(Tr),Qt=P(en),lr=P(Qt),zr=L(lr,!0);fr(lr,yt=>T(Se,yt),()=>e(Se)),w(Qt),fr(Qt,yt=>T(ne,yt),()=>e(ne));var Rr=m(Qt,2);{var kr=yt=>{var Mt=H2(),cr=De(Mt),mr=P(cr);Tt(mr,{get icon(){return ec},size:"xs"}),w(cr);var Er=m(cr,2),Or=L(Er,!0);I(da=>{pt(cr,1,`wc-pin-indicator inline-flex shrink-0 items-center text-muted-foreground transition-opacity
297
- ${de()?Ee()?"opacity-0":re()?"":xe()?"group-hover/wc:opacity-0 group-focus-within/wc:opacity-0":"group-hover:opacity-0 group-focus-within:opacity-0":""}`,"svelte-1ct56pd"),se(Er,"id",`workspace-pinned-state-${p().id??""}`),x(Or,da)},[()=>g.layout_activeCard_pinned_header()]),u(yt,Mt)};F(Rr,yt=>{O()&&yt(kr)})}w(en);var sn=m(en,2);{var ka=yt=>{var Mt=z2(),cr=L(Mt,!0);I(()=>x(cr,W())),u(yt,Mt)};F(sn,yt=>{W()&&yt(ka)})}var ln=m(sn,2);{var Wr=yt=>{const Mt=d(()=>e(Fe));var cr=j2(),mr=P(cr);{let Er=d(()=>oe(e(Mt)));Di(mr,{get content(){return e(Er)},side:"bottom",sideOffset:4,children:(Or,da)=>{var ua=mt(),Ra=De(ua);{var Dr=kn=>{{let Br=d(()=>oe(e(Mt)));St(kn,{variant:"plain",size:"icon-compact",iconOnly:!0,get class(){return`size-5 shrink-0 rounded-sm ${e(Mt).foregroundClass??""}`},get"aria-label"(){return e(Br)},"data-workspace-card-pr-item":!0,get"data-pr-identity"(){return e(Mt).identity},get"data-pr-status"(){return e(Mt).status},onclick:In=>{In.stopPropagation();const Ha=p().id;cg(async()=>{const{handleLink:Sa}=await import("./paBp5EDQ.js").then(Sn=>Sn.l);return{handleLink:Sa}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46]),import.meta.url).then(({handleLink:Sa})=>Sa(e(Mt).url,{workspaceId:Ha,event:In}))},children:(In,Ha)=>{Tt(In,{get icon(){return e(Mt).statusIcon},size:14})},$$slots:{default:!0}})}},pa=kn=>{var Br=W2(),In=P(Br);Tt(In,{get icon(){return e(Mt).statusIcon},size:14}),w(Br),I(Ha=>{pt(Br,1,`inline-flex size-5 shrink-0 items-center justify-center rounded-sm ${e(Mt).foregroundClass??""}`,"svelte-1ct56pd"),se(Br,"aria-label",Ha),se(Br,"data-pr-identity",e(Mt).identity),se(Br,"data-pr-status",e(Mt).status)},[()=>oe(e(Mt))]),u(kn,Br)};F(Ra,kn=>{e(Mt).url?kn(Dr):kn(pa,-1)})}u(Or,ua)},$$slots:{default:!0}})}w(cr),I(Er=>se(cr,"aria-label",Er),[()=>e(Mt).resource?.repository.provider==="gitlab"?g.workspace_hoverCard_mergeRequest_label():g.workspace_hoverCard_pullRequest_label()]),u(yt,cr)};F(ln,yt=>{e(Fe)&&yt(Wr)})}var Zr=m(ln,2);{var Ia=yt=>{var Mt=U2(),cr=P(Mt);{var mr=Or=>{{let da=d(()=>sc(p()));qg(Or,{get date(){return e(da)},class:"type-caption whitespace-nowrap tabular-nums text-muted-foreground",compact:!0})}},Er=d(()=>sc(p())>0);F(cr,Or=>{e(Er)&&Or(mr)})}w(Mt),I(()=>pt(Mt,1,`wc-secondary shrink-0 ${Me()||de()||y()&&X()?Ee()?"opacity-0":re()?"":xe()?"group-hover/wc:opacity-0 group-hover/message:opacity-0":"group-hover:opacity-0 group-hover/message:opacity-0":""}`,"svelte-1ct56pd")),u(yt,Mt)};F(Zr,yt=>{M()&&yt(Ia)})}w(Tr);var Xa=m(Tr,2);{var qa=yt=>{var Mt=V2(),cr=P(Mt);{var mr=Dr=>{{let pa=d(()=>O()?"text-primary-ink":"text-muted-foreground"),kn=d(()=>O()?g.workspace_card_unpin_ariaLabel():g.workspace_card_pin_ariaLabel()),Br=d(()=>O()?g.workspace_card_unpin_tooltip():g.workspace_card_pin_tooltip());St(Dr,{variant:"plain",size:"icon-xs",iconOnly:!0,get class(){return`transition-all hover:bg-muted/50 hover:text-foreground focus-visible:border-transparent focus-visible:bg-muted/50 focus-visible:text-foreground focus-visible:ring-0
297
+ ${de()?Ee()?"opacity-0":re()?"":xe()?"group-hover/wc:opacity-0 group-focus-within/wc:opacity-0":"group-hover:opacity-0 group-focus-within:opacity-0":""}`,"svelte-1ct56pd"),se(Er,"id",`workspace-pinned-state-${p().id??""}`),x(Or,da)},[()=>g.layout_activeCard_pinned_header()]),u(yt,Mt)};F(Rr,yt=>{O()&&yt(kr)})}w(en);var sn=m(en,2);{var ka=yt=>{var Mt=z2(),cr=L(Mt,!0);I(()=>x(cr,W())),u(yt,Mt)};F(sn,yt=>{W()&&yt(ka)})}var ln=m(sn,2);{var Wr=yt=>{const Mt=d(()=>e(Fe));var cr=j2(),mr=P(cr);{let Er=d(()=>oe(e(Mt)));Di(mr,{get content(){return e(Er)},side:"bottom",sideOffset:4,children:(Or,da)=>{var ua=mt(),Ra=De(ua);{var Dr=kn=>{{let Br=d(()=>oe(e(Mt)));St(kn,{variant:"plain",size:"icon-compact",iconOnly:!0,get class(){return`size-5 shrink-0 rounded-sm ${e(Mt).foregroundClass??""}`},get"aria-label"(){return e(Br)},"data-workspace-card-pr-item":!0,get"data-pr-identity"(){return e(Mt).identity},get"data-pr-status"(){return e(Mt).status},onclick:In=>{In.stopPropagation();const Ha=p().id;cg(async()=>{const{handleLink:Sa}=await import("./BTtsrh4I.js").then(Sn=>Sn.l);return{handleLink:Sa}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46]),import.meta.url).then(({handleLink:Sa})=>Sa(e(Mt).url,{workspaceId:Ha,event:In}))},children:(In,Ha)=>{Tt(In,{get icon(){return e(Mt).statusIcon},size:14})},$$slots:{default:!0}})}},pa=kn=>{var Br=W2(),In=P(Br);Tt(In,{get icon(){return e(Mt).statusIcon},size:14}),w(Br),I(Ha=>{pt(Br,1,`inline-flex size-5 shrink-0 items-center justify-center rounded-sm ${e(Mt).foregroundClass??""}`,"svelte-1ct56pd"),se(Br,"aria-label",Ha),se(Br,"data-pr-identity",e(Mt).identity),se(Br,"data-pr-status",e(Mt).status)},[()=>oe(e(Mt))]),u(kn,Br)};F(Ra,kn=>{e(Mt).url?kn(Dr):kn(pa,-1)})}u(Or,ua)},$$slots:{default:!0}})}w(cr),I(Er=>se(cr,"aria-label",Er),[()=>e(Mt).resource?.repository.provider==="gitlab"?g.workspace_hoverCard_mergeRequest_label():g.workspace_hoverCard_pullRequest_label()]),u(yt,cr)};F(ln,yt=>{e(Fe)&&yt(Wr)})}var Zr=m(ln,2);{var Ia=yt=>{var Mt=U2(),cr=P(Mt);{var mr=Or=>{{let da=d(()=>sc(p()));qg(Or,{get date(){return e(da)},class:"type-caption whitespace-nowrap tabular-nums text-muted-foreground",compact:!0})}},Er=d(()=>sc(p())>0);F(cr,Or=>{e(Er)&&Or(mr)})}w(Mt),I(()=>pt(Mt,1,`wc-secondary shrink-0 ${Me()||de()||y()&&X()?Ee()?"opacity-0":re()?"":xe()?"group-hover/wc:opacity-0 group-hover/message:opacity-0":"group-hover:opacity-0 group-hover/message:opacity-0":""}`,"svelte-1ct56pd")),u(yt,Mt)};F(Zr,yt=>{M()&&yt(Ia)})}w(Tr);var Xa=m(Tr,2);{var qa=yt=>{var Mt=V2(),cr=P(Mt);{var mr=Dr=>{{let pa=d(()=>O()?"text-primary-ink":"text-muted-foreground"),kn=d(()=>O()?g.workspace_card_unpin_ariaLabel():g.workspace_card_pin_ariaLabel()),Br=d(()=>O()?g.workspace_card_unpin_tooltip():g.workspace_card_pin_tooltip());St(Dr,{variant:"plain",size:"icon-xs",iconOnly:!0,get class(){return`transition-all hover:bg-muted/50 hover:text-foreground focus-visible:border-transparent focus-visible:bg-muted/50 focus-visible:text-foreground focus-visible:ring-0
298
298
  ${e(pa)??""}`},onclick:In=>{In.stopPropagation(),de()?.(In)},get"aria-label"(){return e(kn)},get title(){return e(Br)},children:(In,Ha)=>{var Sa=q2(),Sn=P(Sa);Tt(Sn,{get icon(){return ec},size:"xs"}),w(Sa),u(In,Sa)},$$slots:{default:!0}})}};F(cr,Dr=>{de()&&Dr(mr)})}var Er=m(cr,2);{var Or=Dr=>{{let pa=d(()=>g.workspace_card_markAsRead_label()),kn=d(()=>g.workspace_card_markAsRead_label());St(Dr,{variant:"plain",size:"icon-xs",iconOnly:!0,class:"text-muted-foreground hover:bg-muted/50 hover:text-foreground focus-visible:border-transparent focus-visible:bg-muted/50 focus-visible:text-foreground focus-visible:ring-0",onclick:Br=>{Br.stopPropagation(),X()?.(Br)},get"aria-label"(){return e(pa)},get title(){return e(kn)},children:(Br,In)=>{Tt(Br,{get icon(){return ru},size:"xs"})},$$slots:{default:!0}})}};F(Er,Dr=>{y()&&X()&&Dr(Or)})}var da=m(Er,2);cn(da,()=>Me()??Qo);var ua=m(da,2);{var Ra=Dr=>{{let pa=d(Wt),kn=d(()=>g.workspace_progressCard_actions_ariaLabel());Ws(Dr,{get items(){return e(pa)},get ariaLabel(){return e(kn)},class:"flex size-5 cursor-pointer items-center justify-center rounded text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground focus-visible:bg-muted/50 focus-visible:text-foreground focus-visible:outline-none",get open(){return e(st)},set open(Br){T(st,Br,!0)}})}};F(ua,Dr=>{be()&&Dr(Ra)})}w(Mt),fr(Mt,Dr=>T(Ye,Dr),()=>e(Ye)),I(()=>pt(Mt,1,`wc-actions absolute right-1 top-1/2 z-20 flex -translate-y-1/2 items-center gap-0.5 rounded-md bg-accent/95 px-0.5 focus-within:opacity-100
299
299
  ${xe()?"group-focus-within/wc:opacity-100":"group-focus-within:opacity-100"}
300
300
  ${Ee()?"opacity-100":re()?"opacity-0":xe()?"opacity-0 group-hover/wc:opacity-100":"opacity-0 group-hover:opacity-100"}`,"svelte-1ct56pd")),u(yt,Mt)};F(Xa,yt=>{(Me()||be()||de()||y()&&X())&&yt(qa)})}w(At),fr(At,yt=>T(Le,yt),()=>e(Le)),Un(At,(yt,Mt)=>ys?.(yt,Mt),()=>({id:Pe()}));var Qr=m(At,2);{var tn=yt=>{Vb(yt,{get id(){return e(ie)},get anchor(){return`--workspace-list-${p().id??""}`},position:"right",get anchorElement(){return e(Le)},class:"w-auto overflow-visible! rounded-lg border-0! bg-background! shadow-none!",onmouseenter:wt,onmouseleave:kt,onfocusin:Rt,onfocusout:Gt,children:(Mt,cr)=>{var mr=K2(),Er=P(mr);Qb(Er,{get workspace(){return p()},get activeAgentIds(){return B()},onkeydown:$e}),w(mr),fr(mr,Or=>T(Kt,Or),()=>e(Kt)),Tn("pointerenter",mr,wt),Tn("pointerleave",mr,kt),Nr("focusin",mr,Rt),Nr("focusout",mr,Gt),u(Mt,mr)},$$slots:{default:!0}})};F(Qr,yt=>{e(Ie)&&!re()&&Q()&&yt(tn)})}var dr=m(Qr,2);{var Dn=yt=>{const Mt=d(Wt);var cr=mt(),mr=De(cr);{var Er=Or=>{{let da=d(()=>e(rt)?.x??0),ua=d(()=>e(rt)?.y??0),Ra=d(()=>e(rt)?.returnFocus),Dr=d(()=>g.workspace_progressCard_actions_ariaLabel());Eu(Or,{get x(){return e(da)},get y(){return e(ua)},get returnFocus(){return e(Ra)},get ariaLabel(){return e(Dr)},get items(){return e(Mt)},onClickOutside:dt})}};F(mr,Or=>{e(Mt).length>0&&Or(Er)})}u(yt,cr)};F(dr,yt=>{e(rt)&&yt(Dn)})}I((yt,Mt,cr)=>{pt(At,1,yt,"svelte-1ct56pd"),se(At,"data-pinned",O()),se(At,"data-highlight-id",Pe()),vr=Rn(At,"",vr,{"anchor-name":`--workspace-list-${p().id??""}`}),se(On,"id",`workspace-status-state-${p().id??""}`),x(ca,e(J).accessibleName),pt(Qt,1,`wc-title type-body min-w-0 truncate font-normal!
@@ -1 +1 @@
1
- import{t as B,bo as f,bw as T,bq as W,b as j,bm as q,bs as z}from"./ClpAEjbe.js";import{bs as D,cd as E,ca as L,a7 as O,ay as F,W as d,bn as G,aA as h,aD as t,c9 as r,a5 as H,bl as J,bA as K,b_ as M,bO as N,aB as Q}from"./CJxGDkBm.js";import{i as R}from"./wmcYjLAa.js";import{C as U}from"./3vi-OgRR.js";import{dE as V}from"./D9Ykl3eH.js";import{i as X}from"./H2jLkRRS.js";var Y=Q('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p></div>');function Z(c,o){if(new.target)return B({component:Z,...c});D(o,!0);const l=()=>z(b,"$workspace",m),[m,u]=W();let s=f(o,"tab",7),n=f(o,"workspaceId",7);const i=E(n());L(()=>{i.set(n())});const b=V(i),_=r(()=>l()?.worktreePath||l()?.repositoryPath||""),g=r(()=>s().data?.changes||[]),v=r(()=>s().data?.isAggregate||!1),w=r(()=>s().data?.agentId),k=r(()=>t(g).map(e=>{const a=e.filePath&&X(e.filePath)?e.filePath:`${t(_)}/${e.filePath}`;return{...e,filePath:a}}));var C={get tab(){return s()},set tab(e){s(e),h()},get workspaceId(){return n()},set workspaceId(e){n(e),h()},$set:T,$on:(e,a)=>j(o,e,a)},p=O(),y=F(p);{var P=e=>{U(e,{isLoading:!1,get changes(){return t(k)},get isAggregate(){return t(v)},get agentId(){return t(w)},showStagingControls:!0})},I=e=>{var a=Y(),A=H(a),$=J(A,!0);K(a),M(S=>N($,S),[()=>q.layout_chatChanges_noChanges_label()]),d(e,a)};R(y,e=>{t(g).length>0?e(P):e(I,-1)})}d(c,p);var x=G(C);return u(),x}export{Z as default};
1
+ import{t as B,bo as f,bw as T,bq as W,b as j,bm as q,bs as z}from"./ClpAEjbe.js";import{bs as D,cd as E,ca as L,a7 as O,ay as F,W as d,bn as G,aA as h,aD as t,c9 as r,a5 as H,bl as J,bA as K,b_ as M,bO as N,aB as Q}from"./CJxGDkBm.js";import{i as R}from"./wmcYjLAa.js";import{C as U}from"./CJ-lCrFi.js";import{dE as V}from"./D9Ykl3eH.js";import{i as X}from"./H2jLkRRS.js";var Y=Q('<div class="flex flex-col items-center justify-center h-full text-subtle gap-4"><p class="text-sm"> </p></div>');function Z(c,o){if(new.target)return B({component:Z,...c});D(o,!0);const l=()=>z(b,"$workspace",m),[m,u]=W();let s=f(o,"tab",7),n=f(o,"workspaceId",7);const i=E(n());L(()=>{i.set(n())});const b=V(i),_=r(()=>l()?.worktreePath||l()?.repositoryPath||""),g=r(()=>s().data?.changes||[]),v=r(()=>s().data?.isAggregate||!1),w=r(()=>s().data?.agentId),k=r(()=>t(g).map(e=>{const a=e.filePath&&X(e.filePath)?e.filePath:`${t(_)}/${e.filePath}`;return{...e,filePath:a}}));var C={get tab(){return s()},set tab(e){s(e),h()},get workspaceId(){return n()},set workspaceId(e){n(e),h()},$set:T,$on:(e,a)=>j(o,e,a)},p=O(),y=F(p);{var P=e=>{U(e,{isLoading:!1,get changes(){return t(k)},get isAggregate(){return t(v)},get agentId(){return t(w)},showStagingControls:!0})},I=e=>{var a=Y(),A=H(a),$=J(A,!0);K(a),M(S=>N($,S),[()=>q.layout_chatChanges_noChanges_label()]),d(e,a)};R(y,e=>{t(g).length>0?e(P):e(I,-1)})}d(c,p);var x=G(C);return u(),x}export{Z as default};
@@ -1 +1 @@
1
- import{g as l,r as m,d as a}from"./DZnf3Vcd.js";import{p}from"./ezsQjlt6.js";import{b as t,ay as o}from"./BpXYSrHL.js";import{M as u,b as c}from"./2ypcXvW0.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=y(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),y=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),v=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(v(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},$={parser:b,db:a,renderer:m,styles:l};export{$ as diagram};
1
+ import{g as l,r as m,d as a}from"./BDARQpEZ.js";import{p}from"./DcPlD4Yk.js";import{b as t,ay as o}from"./6s1pPvLx.js";import{M as u,b as c}from"./2ypcXvW0.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=y(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),y=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),v=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(v(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},$={parser:b,db:a,renderer:m,styles:l};export{$ as diagram};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/WQlIWqz7.js","/app/immutable/chunks/C1zxTHwk.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/ClpAEjbe.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/wmcYjLAa.js","/app/immutable/chunks/CnGVh7I3.js","/app/immutable/chunks/WSVFXKpL.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/BVi5KkOP.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/BwASeArv.js","/app/immutable/chunks/CPDV_dyu.js","/app/immutable/chunks/BejTxFyR.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/DSqSJXGX.js","/app/immutable/chunks/Xh71Wbuh.js","/app/immutable/chunks/By588DV1.js","/app/immutable/chunks/BeYVt6Wg.js","/app/immutable/chunks/CpP1PKzF.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CgBcONKs.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/CtJxHvGv.js","/app/immutable/chunks/oXpJ1LFx.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/kRDyYnu-.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BxKppgO5.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/ByoP16rr.js","/app/immutable/chunks/D9Ykl3eH.js","/app/immutable/chunks/CTV49dzf.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/pO_uIUtS.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/a_hFrVUs.js"])))=>i.map(i=>d[i]);
2
- import{bm as h,_ as x}from"./ClpAEjbe.js";import{m as f,Jq as a,dn as P,HO as S,zd as R,F_ as N,vR as q,r5 as W,vp as H,Lv as U}from"./CpP1PKzF.js";import{d as I}from"./BxKppgO5.js";import{E as V}from"./CPDV_dyu.js";import{parseIntentLink as j}from"./BiWBSez2.js";import{m as y}from"./C1zxTHwk.js";import"./CJxGDkBm.js";import"./CnGVh7I3.js";import"./WSVFXKpL.js";import"./ChTqQfQN.js";import"./BeYVt6Wg.js";import{x as B,k as C,w as L}from"./C5TH9nNS.js";import{dE as D}from"./D9Ykl3eH.js";import{p as E,o as z,h as $}from"./Ck2JBj0W.js";const p="assistant-content",J=a.createSelector(t=>{const r=E.select(t),s=z.select(t),e=$.select(t).find(i=>i.agentId===s)??r.find(i=>i.isActive)??r.find(i=>i.messageCount>0)??r[0];return P(e?.agentId??null)}),O=new Map;function K(t,r=!1){const s=O.get(t)??{explicit:0,background:0},e={explicit:s.explicit+(r?0:1),background:s.background+(r?1:0)};return O.set(t,e),r?e:{explicit:e.explicit}}function k(t,r){const s=O.get(t);return s!==void 0&&r.explicit===s.explicit&&(r.background===void 0||r.background===s.background)}async function G(t){a.dispatch(q(t)),L.select(a.state,t).restoreStatus==="pending"&&await new Promise(r=>{const s=L.withStore(a)(t).subscribe(e=>{e.restoreStatus!=="pending"&&(r(),queueMicrotask(()=>s()))})})}function b(t,r,s){const e=L.select(a.state,s);if(!e.panels[p]||Object.keys(e.panels).some(i=>i!==p)){const i=e.panels[p],d=Object.values(e.panels).flatMap(n=>n.tabs.filter(o=>o.type!=="agent"||o.workspaceId!==f)),c=d.some(n=>n.id===i?.activeTabId)?i?.activeTabId??null:d.at(-1)?.id??null;a.dispatch(W(s,{root:{type:"panel",panelId:p},panels:{[p]:{id:p,tabs:d,activeTabId:c}},focusedPanelId:e.focusedPanelId===p?p:null,hiddenTabs:C.select(a.state,s)}))}a.dispatch(H(s,t,p,void 0,!0,void 0,!1,r.background||r.preserveFocus,void 0,r.background))}async function de(t,r={}){try{return await Q(t,r)}catch(s){return y.error(h.ui_linkHandler_notFound_title(),{description:s instanceof Error?s.message:String(s)}),!0}}async function Q(t,r){const s=/^intent:\/\/local\/([^/?#]+)\/agent\/([^/?#]+)$/.exec(t),e=t.startsWith("intent://")?j(t):null,i=e?.valid&&e.type==="workspace"?[t,e.resourceId]:/^\/workspace\/([^/?#]+)\/?$/.exec(t),d=/^https?:\/\//.test(t)&&!V(t);if(!i&&!s&&!d&&!(e?.valid&&["file","message","note","task"].includes(e.type))||i&&[f,"new"].includes(i[1]))return!1;const c=E.select(a.state),n=r.agentId?P(r.agentId):r.background?c.length===1?P(c[0].agentId):null:r.layoutId??J.select(a.state);if(!n)return!0;const o=K(n,r.background);if(await G(n),!k(n,o))return!0;if(i){const u=i[1],g=await I.workspaces.get(u);return k(n,o)?g?(a.dispatch(S(g)),b({type:"workspace",title:g.title,workspaceId:u,closable:!0},r,n),!0):(y.error(h.workspace_loader_notFound_title()),!0):!0}if(s)return T(s[1],s[2],r,n,o);if(d){const{resolveBrowserLinkForOpen:u}=await x(async()=>{const{resolveBrowserLinkForOpen:v}=await import("./WQlIWqz7.js").then(w=>w.b);return{resolveBrowserLinkForOpen:v}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]),import.meta.url),g=await u(t);return k(n,o)&&b({type:"browser",title:new URL(t).hostname,browserUrl:g.url,browserRequestedUrl:g.requestedUrl,workspaceId:f,closable:!0},r,n),!0}if(!e?.valid)return!1;const _=e.workspaceId??f;if(e.type==="file"){const u=await I.workspaces.get(_);return k(n,o)?u?(a.dispatch(S(u)),b({type:"file",title:e.resourceId.split("/").at(-1)??e.resourceId,filePath:e.resourceId,workspaceId:_,closable:!0,data:{line:e.line,filePathIsLiteral:!0}},r,n),!0):(y.error(h.workspace_loader_notFound_title()),!0):!0}if(e.type==="message"&&e.agentId)return T(_,e.agentId,r,n,o,e.resourceId);if(e.type!=="note"&&e.type!=="task")return!1;const l=e.workspaceId??f,[m,A]=await Promise.all([a.dispatch(R(l,e.resourceId)),Promise.resolve(D.select(a.state,l)??I.workspaces.get(l)).catch(()=>null)]);if(!k(n,o))return!0;if(!m||String(m.workspaceId)!==l)return y.error(h.ui_linkHandler_notFound_title(),{description:h.ui_linkHandler_noteNotFound_error({noteId:e.resourceId,workspaceId:l})}),!0;A&&String(A.id)===l&&a.dispatch(S(A));const F=Object.entries(B.select(a.state)).some(([u,g])=>{const v=w=>w.type==="note"&&w.noteId===String(m.id)&&(w.workspaceId??u)===l;return Object.values(g.panels).some(w=>w.tabs.some(v))||C.select(a.state,u).some(v)}),M=a.state.transientUi.byWorkspaceId[l]?.noteViewModeByNoteId[String(m.id)];return!F&&(!r.background||M===void 0)&&a.dispatch(N(l,String(m.id),"editor")),b({type:"note",title:m.title,noteId:String(m.id),workspaceId:l,closable:!0},r,n),!0}async function T(t,r,s,e,i,d){const c=await I.agents.get(r,t===f?void 0:t);t===f&&c&&(t=String(c.workspaceId));const n=t===f?null:await I.workspaces.get(t);if(!k(e,i))return!0;if(!n&&t!==f||!c||String(c.workspaceId)!==t)return y.error(h.ui_linkHandler_notFound_title()),!0;if(n&&a.dispatch(S(n)),a.dispatch(U(c)),b({type:"agent",title:c.name??r,agentId:r,workspaceId:t,closable:!0},s,e),d&&!s.background){const{openMessage:o}=await x(async()=>{const{openMessage:_}=await import("./kRDyYnu-.js");return{openMessage:_}},__vite__mapDeps([32,33,34,35,4,5,21,22,23,24,3,8,25,15,2,13,14,7,9,16,36,37,38,39,40,27,17,6,12,41,19,42,43,44,45]),import.meta.url);o({workspaceId:t,agentId:r,messageId:d,contentAlreadyOpen:!0})}return!0}export{p as ASSISTANT_CONTENT_PANEL_ID,J as selectAssistantPanelLayoutId,de as showAssistantContent};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/WQlIWqz7.js","/app/immutable/chunks/C1zxTHwk.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/ClpAEjbe.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/wmcYjLAa.js","/app/immutable/chunks/CnGVh7I3.js","/app/immutable/chunks/WSVFXKpL.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/BVi5KkOP.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/BwASeArv.js","/app/immutable/chunks/CPDV_dyu.js","/app/immutable/chunks/BejTxFyR.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/DSqSJXGX.js","/app/immutable/chunks/Xh71Wbuh.js","/app/immutable/chunks/By588DV1.js","/app/immutable/chunks/BeYVt6Wg.js","/app/immutable/chunks/CpP1PKzF.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CgBcONKs.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/CtJxHvGv.js","/app/immutable/chunks/oXpJ1LFx.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/B70PGGIw.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BxKppgO5.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/ByoP16rr.js","/app/immutable/chunks/D9Ykl3eH.js","/app/immutable/chunks/CTV49dzf.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/BHINa8Ry.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/1cfvZqIL.js"])))=>i.map(i=>d[i]);
2
+ import{bm as h,_ as x}from"./ClpAEjbe.js";import{m as f,Jq as a,dn as P,HO as S,zd as R,F_ as N,vR as q,r5 as W,vp as H,Lv as U}from"./CpP1PKzF.js";import{d as I}from"./BxKppgO5.js";import{E as V}from"./CPDV_dyu.js";import{parseIntentLink as j}from"./B62l45Uf.js";import{m as y}from"./C1zxTHwk.js";import"./CJxGDkBm.js";import"./CnGVh7I3.js";import"./WSVFXKpL.js";import"./ChTqQfQN.js";import"./BeYVt6Wg.js";import{x as B,k as C,w as L}from"./C5TH9nNS.js";import{dE as D}from"./D9Ykl3eH.js";import{p as E,o as z,h as $}from"./Ck2JBj0W.js";const p="assistant-content",J=a.createSelector(t=>{const r=E.select(t),s=z.select(t),e=$.select(t).find(i=>i.agentId===s)??r.find(i=>i.isActive)??r.find(i=>i.messageCount>0)??r[0];return P(e?.agentId??null)}),O=new Map;function K(t,r=!1){const s=O.get(t)??{explicit:0,background:0},e={explicit:s.explicit+(r?0:1),background:s.background+(r?1:0)};return O.set(t,e),r?e:{explicit:e.explicit}}function k(t,r){const s=O.get(t);return s!==void 0&&r.explicit===s.explicit&&(r.background===void 0||r.background===s.background)}async function G(t){a.dispatch(q(t)),L.select(a.state,t).restoreStatus==="pending"&&await new Promise(r=>{const s=L.withStore(a)(t).subscribe(e=>{e.restoreStatus!=="pending"&&(r(),queueMicrotask(()=>s()))})})}function b(t,r,s){const e=L.select(a.state,s);if(!e.panels[p]||Object.keys(e.panels).some(i=>i!==p)){const i=e.panels[p],d=Object.values(e.panels).flatMap(n=>n.tabs.filter(o=>o.type!=="agent"||o.workspaceId!==f)),c=d.some(n=>n.id===i?.activeTabId)?i?.activeTabId??null:d.at(-1)?.id??null;a.dispatch(W(s,{root:{type:"panel",panelId:p},panels:{[p]:{id:p,tabs:d,activeTabId:c}},focusedPanelId:e.focusedPanelId===p?p:null,hiddenTabs:C.select(a.state,s)}))}a.dispatch(H(s,t,p,void 0,!0,void 0,!1,r.background||r.preserveFocus,void 0,r.background))}async function de(t,r={}){try{return await Q(t,r)}catch(s){return y.error(h.ui_linkHandler_notFound_title(),{description:s instanceof Error?s.message:String(s)}),!0}}async function Q(t,r){const s=/^intent:\/\/local\/([^/?#]+)\/agent\/([^/?#]+)$/.exec(t),e=t.startsWith("intent://")?j(t):null,i=e?.valid&&e.type==="workspace"?[t,e.resourceId]:/^\/workspace\/([^/?#]+)\/?$/.exec(t),d=/^https?:\/\//.test(t)&&!V(t);if(!i&&!s&&!d&&!(e?.valid&&["file","message","note","task"].includes(e.type))||i&&[f,"new"].includes(i[1]))return!1;const c=E.select(a.state),n=r.agentId?P(r.agentId):r.background?c.length===1?P(c[0].agentId):null:r.layoutId??J.select(a.state);if(!n)return!0;const o=K(n,r.background);if(await G(n),!k(n,o))return!0;if(i){const u=i[1],g=await I.workspaces.get(u);return k(n,o)?g?(a.dispatch(S(g)),b({type:"workspace",title:g.title,workspaceId:u,closable:!0},r,n),!0):(y.error(h.workspace_loader_notFound_title()),!0):!0}if(s)return T(s[1],s[2],r,n,o);if(d){const{resolveBrowserLinkForOpen:u}=await x(async()=>{const{resolveBrowserLinkForOpen:v}=await import("./WQlIWqz7.js").then(w=>w.b);return{resolveBrowserLinkForOpen:v}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]),import.meta.url),g=await u(t);return k(n,o)&&b({type:"browser",title:new URL(t).hostname,browserUrl:g.url,browserRequestedUrl:g.requestedUrl,workspaceId:f,closable:!0},r,n),!0}if(!e?.valid)return!1;const _=e.workspaceId??f;if(e.type==="file"){const u=await I.workspaces.get(_);return k(n,o)?u?(a.dispatch(S(u)),b({type:"file",title:e.resourceId.split("/").at(-1)??e.resourceId,filePath:e.resourceId,workspaceId:_,closable:!0,data:{line:e.line,filePathIsLiteral:!0}},r,n),!0):(y.error(h.workspace_loader_notFound_title()),!0):!0}if(e.type==="message"&&e.agentId)return T(_,e.agentId,r,n,o,e.resourceId);if(e.type!=="note"&&e.type!=="task")return!1;const l=e.workspaceId??f,[m,A]=await Promise.all([a.dispatch(R(l,e.resourceId)),Promise.resolve(D.select(a.state,l)??I.workspaces.get(l)).catch(()=>null)]);if(!k(n,o))return!0;if(!m||String(m.workspaceId)!==l)return y.error(h.ui_linkHandler_notFound_title(),{description:h.ui_linkHandler_noteNotFound_error({noteId:e.resourceId,workspaceId:l})}),!0;A&&String(A.id)===l&&a.dispatch(S(A));const F=Object.entries(B.select(a.state)).some(([u,g])=>{const v=w=>w.type==="note"&&w.noteId===String(m.id)&&(w.workspaceId??u)===l;return Object.values(g.panels).some(w=>w.tabs.some(v))||C.select(a.state,u).some(v)}),M=a.state.transientUi.byWorkspaceId[l]?.noteViewModeByNoteId[String(m.id)];return!F&&(!r.background||M===void 0)&&a.dispatch(N(l,String(m.id),"editor")),b({type:"note",title:m.title,noteId:String(m.id),workspaceId:l,closable:!0},r,n),!0}async function T(t,r,s,e,i,d){const c=await I.agents.get(r,t===f?void 0:t);t===f&&c&&(t=String(c.workspaceId));const n=t===f?null:await I.workspaces.get(t);if(!k(e,i))return!0;if(!n&&t!==f||!c||String(c.workspaceId)!==t)return y.error(h.ui_linkHandler_notFound_title()),!0;if(n&&a.dispatch(S(n)),a.dispatch(U(c)),b({type:"agent",title:c.name??r,agentId:r,workspaceId:t,closable:!0},s,e),d&&!s.background){const{openMessage:o}=await x(async()=>{const{openMessage:_}=await import("./B70PGGIw.js");return{openMessage:_}},__vite__mapDeps([32,33,34,35,4,5,21,22,23,24,3,8,25,15,2,13,14,7,9,16,36,37,38,39,40,27,17,6,12,41,19,42,43,44,45]),import.meta.url);o({workspaceId:t,agentId:r,messageId:d,contentAlreadyOpen:!0})}return!0}export{p as ASSISTANT_CONTENT_PANEL_ID,J as selectAssistantPanelLayoutId,de as showAssistantContent};
@@ -1 +1 @@
1
- import{b as s}from"./BpXYSrHL.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I};
1
+ import{b as s}from"./6s1pPvLx.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I};