@intent-hq/web 2.392.0 → 2.392.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{CB8FMdnB.js → 0TbppU-W.js} +2 -2
  3. package/web/app/immutable/chunks/{D7rh8Clb.js → 3rqOYBi3.js} +1 -1
  4. package/web/app/immutable/chunks/{B_DmwFyf.js → 50HYkjWD.js} +3 -3
  5. package/web/app/immutable/chunks/{B77w2td3.js → 7zxUzaYz.js} +1 -1
  6. package/web/app/immutable/chunks/{CV86ty5-.js → 9AKr1UyY.js} +1 -1
  7. package/web/app/immutable/chunks/{IhhtpC0N.js → AlO3r9jV.js} +1 -1
  8. package/web/app/immutable/chunks/{BybDBA-a.js → B0oQ37UY.js} +1 -1
  9. package/web/app/immutable/chunks/{B_GvRk21.js → B2frqTj8.js} +1 -1
  10. package/web/app/immutable/chunks/{mE5-Vs-0.js → B6wkNYPs.js} +1 -1
  11. package/web/app/immutable/chunks/{B4OBYHli.js → B97l6Xkk.js} +1 -1
  12. package/web/app/immutable/chunks/{DnNE_pmq.js → B9NjB9vD.js} +1 -1
  13. package/web/app/immutable/chunks/{C6DQmPVB.js → B9ZgGXDm.js} +1 -1
  14. package/web/app/immutable/chunks/{DpDGJXfb.js → BB5TUToP.js} +2 -2
  15. package/web/app/immutable/chunks/{lE7gD_tn.js → BDRM-DVo.js} +1 -1
  16. package/web/app/immutable/chunks/{Bg5K6Ci3.js → BE3g5vcj.js} +1 -1
  17. package/web/app/immutable/chunks/{BxCgCRwx.js → BJEFEyAm.js} +1 -1
  18. package/web/app/immutable/chunks/BPFSAjsd.js +411 -0
  19. package/web/app/immutable/chunks/{1NvRJVY9.js → BS9LmSp_.js} +1 -1
  20. package/web/app/immutable/chunks/{Bk3dX2Ob.js → BSMi55yC.js} +1 -1
  21. package/web/app/immutable/chunks/{qqJggbSF.js → BSpgPPjp.js} +1 -1
  22. package/web/app/immutable/chunks/{Dv2WcD53.js → BTE0066U.js} +1 -1
  23. package/web/app/immutable/chunks/{BnGY4PVn.js → BUF0WvAS.js} +1 -1
  24. package/web/app/immutable/chunks/{CDD7ui9Z.js → BUPWY1pO.js} +1 -1
  25. package/web/app/immutable/chunks/{CQPid4Qr.js → BVBh582U.js} +1 -1
  26. package/web/app/immutable/chunks/{Bdh-SKNo.js → BdlwjSpf.js} +1 -1
  27. package/web/app/immutable/chunks/{B_4oJZFT.js → Bhul7r_Y.js} +1 -1
  28. package/web/app/immutable/chunks/{DQ3EU1b-.js → BlVpCoL1.js} +1 -1
  29. package/web/app/immutable/chunks/{DQYwt0RJ.js → Bp6DusVC.js} +1 -1
  30. package/web/app/immutable/chunks/{k5fprFtz.js → BuM8LV7z.js} +1 -1
  31. package/web/app/immutable/chunks/{D8CQQUv8.js → BvByaKKp.js} +1 -1
  32. package/web/app/immutable/chunks/{BJRZEnHw.js → BvvIG-FE.js} +1 -1
  33. package/web/app/immutable/chunks/{D5A4PJDt.js → BwFe8eI9.js} +1 -1
  34. package/web/app/immutable/chunks/{DITs7RNY.js → Bwa2n5jC.js} +1 -1
  35. package/web/app/immutable/chunks/{BnbmXiW4.js → ByvcSsIj.js} +1 -1
  36. package/web/app/immutable/chunks/{vpLnaArD.js → C13CRqsS.js} +1 -1
  37. package/web/app/immutable/chunks/{BK5l06W2.js → C6Af0QaF.js} +1 -1
  38. package/web/app/immutable/chunks/{udmuNwTR.js → C7MFACZg.js} +1 -1
  39. package/web/app/immutable/chunks/{pUywXnJP.js → C9DStJW1.js} +1 -1
  40. package/web/app/immutable/chunks/{uPtH8pRz.js → C9iwh4F-.js} +1 -1
  41. package/web/app/immutable/chunks/{B6SGYvow.js → CA5vNvRD.js} +3 -3
  42. package/web/app/immutable/chunks/{CcijsN8m.js → CBQrOO2t.js} +1 -1
  43. package/web/app/immutable/chunks/{CSbEYhAV.js → CCyGGl6b.js} +1 -1
  44. package/web/app/immutable/chunks/{BCwKGJpG.js → CDcxODgf.js} +1 -1
  45. package/web/app/immutable/chunks/{Bj58rFtD.js → CEqrck_t.js} +1 -1
  46. package/web/app/immutable/chunks/{Ca1iiPGq.js → CGJ5yTzR.js} +3 -3
  47. package/web/app/immutable/chunks/{BPd-Q6x4.js → CJItvMq2.js} +1 -1
  48. package/web/app/immutable/chunks/{Qvf67TfJ.js → CLX81MHV.js} +1 -1
  49. package/web/app/immutable/chunks/{DzNzbnYA.js → CPNOsHfj.js} +1 -1
  50. package/web/app/immutable/chunks/{BjPpzZjk.js → CPav-V5t.js} +2 -2
  51. package/web/app/immutable/chunks/{Cv6grH4l.js → CPmXQBUf.js} +1 -1
  52. package/web/app/immutable/chunks/{CtcGxSOx.js → CQClkuxa.js} +1 -1
  53. package/web/app/immutable/chunks/{BbK9qDRy.js → CRFyRwf-.js} +1 -1
  54. package/web/app/immutable/chunks/{_IIJlCYC.js → CRIoGx5T.js} +1 -1
  55. package/web/app/immutable/chunks/{D_-4DIK6.js → CSzXeH2S.js} +1 -1
  56. package/web/app/immutable/chunks/{kSTrWIIB.js → CUiYYsIq.js} +1 -1
  57. package/web/app/immutable/chunks/{C3AR_gNB.js → CUmvnJK5.js} +1 -1
  58. package/web/app/immutable/chunks/{AVUhaNFO.js → CWS5g6aA.js} +1 -1
  59. package/web/app/immutable/chunks/{7590d3_e.js → CY56l_5k.js} +1 -1
  60. package/web/app/immutable/chunks/{BRPh2Gky.js → CcBmcC9f.js} +2 -2
  61. package/web/app/immutable/chunks/{CykElrvo.js → CcMCIG6E.js} +2 -2
  62. package/web/app/immutable/chunks/{BqF1bVQC.js → CccfsETL.js} +2 -2
  63. package/web/app/immutable/chunks/{Boky5e4-.js → CdLJ0-dH.js} +1 -1
  64. package/web/app/immutable/chunks/{DwJUGAx4.js → Cdw7QKyr.js} +3 -3
  65. package/web/app/immutable/chunks/{DqQWmhFJ.js → CeHL-3WK.js} +1 -1
  66. package/web/app/immutable/chunks/{ggRB4LMK.js → CewZlXwy.js} +1 -1
  67. package/web/app/immutable/chunks/{Fiwts6D3.js → CiNmS1jZ.js} +1 -1
  68. package/web/app/immutable/chunks/{B-mEBo1a.js → CngTEvgU.js} +1 -1
  69. package/web/app/immutable/chunks/{R2QRct6h.js → CorT7tdR.js} +1 -1
  70. package/web/app/immutable/chunks/{Bs5b-3jJ.js → Cp4SiU7R.js} +1 -1
  71. package/web/app/immutable/chunks/{C3cVfkio.js → CpT48V2z.js} +1 -1
  72. package/web/app/immutable/chunks/{C8TRSNUb.js → Ct0fN4Lt.js} +1 -1
  73. package/web/app/immutable/chunks/{8ljmIEEj.js → CtzbB_EQ.js} +1 -1
  74. package/web/app/immutable/chunks/{B76dt5zP.js → CzK_7_Jd.js} +1 -1
  75. package/web/app/immutable/chunks/{C0JQvbI4.js → D-j7vD5Z.js} +1 -1
  76. package/web/app/immutable/chunks/{CtBzyNOX.js → D0DIeAXH.js} +1 -1
  77. package/web/app/immutable/chunks/{CVZzx9IJ.js → D6EyZ2rd.js} +1 -1
  78. package/web/app/immutable/chunks/{DwwEvwlj.js → D8MIwtpL.js} +1 -1
  79. package/web/app/immutable/chunks/{CUtsQ_at.js → DA3tGWzX.js} +1 -1
  80. package/web/app/immutable/chunks/{D7VoSTzK.js → DDDvNwR-.js} +1 -1
  81. package/web/app/immutable/chunks/{IHdKCjQM.js → DEsM7h8K.js} +2 -2
  82. package/web/app/immutable/chunks/{BZnji9hP.js → DFNKkiho.js} +4 -4
  83. package/web/app/immutable/chunks/{B469nFvV.js → DIME5LWK.js} +2 -2
  84. package/web/app/immutable/chunks/{BkxevPaB.js → DIxibpTv.js} +1 -1
  85. package/web/app/immutable/chunks/{CXTQXSCs.js → DL__HI6l.js} +1 -1
  86. package/web/app/immutable/chunks/{mpTxy2jJ.js → DNup87JQ.js} +1 -1
  87. package/web/app/immutable/chunks/{BNNeufNk.js → DQe_5JbW.js} +1 -1
  88. package/web/app/immutable/chunks/{BLUGgUG-.js → DTNrtzyx.js} +1 -1
  89. package/web/app/immutable/chunks/{C-BJXKy-.js → DTbyG794.js} +1 -1
  90. package/web/app/immutable/chunks/{B8RXlIBH.js → DTco_120.js} +1 -1
  91. package/web/app/immutable/chunks/{C7q_UkFQ.js → DUcJILSg.js} +1 -1
  92. package/web/app/immutable/chunks/{CxuKWK-9.js → DY9w61PC.js} +6 -6
  93. package/web/app/immutable/chunks/{wRT2cc73.js → DYzxLuOL.js} +1 -1
  94. package/web/app/immutable/chunks/{BhxHPYvf.js → D_R1vNH8.js} +1 -1
  95. package/web/app/immutable/chunks/{CyHB14hJ.js → D_YMc8vN.js} +1 -1
  96. package/web/app/immutable/chunks/{wtJmZfcy.js → DaTkisKB.js} +1 -1
  97. package/web/app/immutable/chunks/{CDjbPb5H.js → DaTwSOqs.js} +1 -1
  98. package/web/app/immutable/chunks/{D42wJcQ3.js → DbB491_u.js} +1 -1
  99. package/web/app/immutable/chunks/{BjEG_fCJ.js → DdU2snxg.js} +1 -1
  100. package/web/app/immutable/chunks/{BFVncOQi.js → DdYVblGk.js} +1 -1
  101. package/web/app/immutable/chunks/DejjV5ft.js +1 -0
  102. package/web/app/immutable/chunks/{DtuubiMf.js → Dgvdn_ax.js} +1 -1
  103. package/web/app/immutable/chunks/{Cb6ALa0V.js → Dhs7RSq9.js} +1 -1
  104. package/web/app/immutable/chunks/{BzKqzACd.js → DivmpPFQ.js} +1 -1
  105. package/web/app/immutable/chunks/{Xk1ND_1x.js → DlnCrS3y.js} +1 -1
  106. package/web/app/immutable/chunks/{i2kR60wc.js → DmtYsVlu.js} +2 -2
  107. package/web/app/immutable/chunks/{B8pX1T5t.js → DotCIVLI.js} +1 -1
  108. package/web/app/immutable/chunks/{CkTAy7fl.js → Dp0kLnIL.js} +1 -1
  109. package/web/app/immutable/chunks/{BnJ52enz.js → DqCgFTqN.js} +1 -1
  110. package/web/app/immutable/chunks/{DPbxpEc3.js → DuFY1gwd.js} +4 -4
  111. package/web/app/immutable/chunks/{BmyNM7bS.js → DvdITStP.js} +1 -1
  112. package/web/app/immutable/chunks/{B9-jkWWp.js → Dvzvnzzu.js} +1 -1
  113. package/web/app/immutable/chunks/{ynQC8xZQ.js → DznISJQO.js} +1 -1
  114. package/web/app/immutable/chunks/{BN9pl0_x.js → FS0kRzLP.js} +1 -1
  115. package/web/app/immutable/chunks/{w3KJAO4V.js → H8hIaDaV.js} +1 -1
  116. package/web/app/immutable/chunks/{7BHYBi88.js → KPBWxwIA.js} +1 -1
  117. package/web/app/immutable/chunks/{CPUJ3EYc.js → KRACSBb9.js} +1 -1
  118. package/web/app/immutable/chunks/{DbSflHPQ.js → KvfW-q1N.js} +1 -1
  119. package/web/app/immutable/chunks/{vezRCn6E.js → MFTfhUYi.js} +1 -1
  120. package/web/app/immutable/chunks/{CkyxPppw.js → OuI4JmWC.js} +1 -1
  121. package/web/app/immutable/chunks/{Cx8Rw_sH.js → PejVYY2W.js} +3 -3
  122. package/web/app/immutable/chunks/{m8Q2Rt7R.js → QKQvZF-2.js} +2 -2
  123. package/web/app/immutable/chunks/{BKxcGjV6.js → R3fZBk-k.js} +1 -1
  124. package/web/app/immutable/chunks/{CGO_zr9m.js → RqSv1iWX.js} +1 -1
  125. package/web/app/immutable/chunks/{zFu37m6L.js → WWq3hijy.js} +1 -1
  126. package/web/app/immutable/chunks/{CDUMf4mn.js → Xr-aTNRN.js} +1 -1
  127. package/web/app/immutable/chunks/{BCL-o_Md.js → ZIePA90q.js} +3 -3
  128. package/web/app/immutable/chunks/{xK5y1U34.js → a3O-Ns1M.js} +1 -1
  129. package/web/app/immutable/chunks/{DfyDNbbj.js → aoX2v33V.js} +4 -4
  130. package/web/app/immutable/chunks/{Z_lXVxA_.js → b7gnFN68.js} +1 -1
  131. package/web/app/immutable/chunks/{D3m2Y1N8.js → ciQFmiC4.js} +1 -1
  132. package/web/app/immutable/chunks/{DsDbrkJf.js → f0WUpIfB.js} +1 -1
  133. package/web/app/immutable/chunks/{CIqC9ucK.js → gX9ZnDRD.js} +1 -1
  134. package/web/app/immutable/chunks/{CqPoxrPz.js → gXHlCg5O.js} +1 -1
  135. package/web/app/immutable/chunks/{D7z6HEeo.js → i2Q0D3-m.js} +1 -1
  136. package/web/app/immutable/chunks/{y83c7yRZ.js → oM2TfoNE.js} +1 -1
  137. package/web/app/immutable/chunks/{BirGv2ci.js → pQalwNsE.js} +1 -1
  138. package/web/app/immutable/chunks/{qLTVpfPn.js → r4dmBxo_.js} +1 -1
  139. package/web/app/immutable/chunks/{DJSAkzw5.js → rmHQzJ1a.js} +1 -1
  140. package/web/app/immutable/chunks/{DYrrsQ1p.js → vJJtTADX.js} +1 -1
  141. package/web/app/immutable/chunks/{C-e2e9PC.js → vq6mxGLA.js} +1 -1
  142. package/web/app/immutable/chunks/{DT_a2Oi3.js → x9IQ_8UO.js} +1 -1
  143. package/web/app/immutable/chunks/{DeLdUBWT.js → z2uEgbos.js} +1 -1
  144. package/web/app/immutable/entry/{app.aDjWpyk7.js → app.Dh0FLLBd.js} +2 -2
  145. package/web/app/immutable/entry/start.IMZH36aM.js +1 -0
  146. package/web/app/immutable/nodes/{0.D_e7AeTl.js → 0.BlcS-Hyh.js} +1 -1
  147. package/web/app/immutable/nodes/{1.DA21OvwY.js → 1.BMTchPFq.js} +1 -1
  148. package/web/app/immutable/nodes/{10.CSASJEbg.js → 10.CfDNhRgU.js} +1 -1
  149. package/web/app/immutable/nodes/{11.DW2JfBsq.js → 11.CxSRkGHD.js} +1 -1
  150. package/web/app/immutable/nodes/{15.DrH3We44.js → 15.DCpm4k7K.js} +1 -1
  151. package/web/app/immutable/nodes/{19.DyUaZQFK.js → 19.C2T81__z.js} +2 -2
  152. package/web/app/immutable/nodes/{2.CTOsyef2.js → 2.1iJIAnw5.js} +1 -1
  153. package/web/app/immutable/nodes/{20.BPfqGZ4o.js → 20.BHRuLw4-.js} +1 -1
  154. package/web/app/immutable/nodes/{3.xcZps6DB.js → 3.BDDby9Gq.js} +1 -1
  155. package/web/app/immutable/nodes/{4.DaJkDmFI.js → 4.utfN0vdd.js} +1 -1
  156. package/web/app/immutable/nodes/{5.7rTxN-4O.js → 5.Z6w8za6J.js} +1 -1
  157. package/web/app/immutable/nodes/{6.tsWwri9c.js → 6.w_k_ibWb.js} +1 -1
  158. package/web/app/immutable/nodes/{7.CDTojphP.js → 7.I-q-I1bs.js} +1 -1
  159. package/web/app/immutable/nodes/{8.BO5ffLDm.js → 8.BgjULPKU.js} +1 -1
  160. package/web/app/immutable/nodes/{9.D0POivb2.js → 9.DOkmR0cl.js} +2 -2
  161. package/web/app/version.json +1 -1
  162. package/web/index.html +9 -9
  163. package/web/app/immutable/chunks/C4AJzMws.js +0 -411
  164. package/web/app/immutable/chunks/DrCYFWYk.js +0 -1
  165. package/web/app/immutable/entry/start.1qdHg029.js +0 -1
@@ -1,4 +1,4 @@
1
- var G_=Object.defineProperty;var Ng=n=>{throw TypeError(n)};var V_=(n,r,a)=>r in n?G_(n,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[r]=a;var Js=(n,r,a)=>V_(n,typeof r!="symbol"?r+"":r,a),K_=(n,r,a)=>r.has(n)||Ng("Cannot "+a);var Ao=(n,r,a)=>(K_(n,r,"read from private field"),a?a.call(n):r.get(n)),Bg=(n,r,a)=>r.has(n)?Ng("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,a);import{t as fn,bo as X,bw as vn,bp as pf,b as hn,bm as u,bq as Nr,bs as ge,br as Li}from"./Fcr7AvC-.js";import{bs as mn,a5 as I,bf as fs,bA as b,W as p,bn as _n,aA as Z,aB as E,ca as ae,a7 as Wt,ay as ye,aD as e,cd as Bn,c9 as o,bS as m,bl as de,be as pn,b_ as L,bO as j,c5 as ot,bH as w,bV as _e,bj as qs,bk as ro,b$ as dn,ai as Ud,aj as ps,bo as Vl,br as Tr,c0 as Ot,cb as ql,ak as Q_,aw as bi,a as J_}from"./3SdAC2_C.js";import{i as B}from"./BhYXv0ZM.js";import{k as Ci}from"./Cc0763mU.js";import{g as On,i as Y_,I as eo,p as Lo,e as Eo}from"./CA6H1-bp.js";import{n as Bt,l as ma,c as to,j as Wg,k as Do,h as X_}from"./CxR-pcVt.js";import{b as ff,e as zd,f as xe,s as Ue,c as jt,g as gs}from"./BRCr02in.js";import{b as Z_}from"./goTpbPhD.js";import{b as _r}from"./Dn334wJv.js";import{m as ew,U as tw,Z as nw,X as rw,Y as aw,I as Ug,o as sw,l as ow,a2 as iw,x as zg,$ as lw,a0 as jg,r as cw,s as dw}from"./B6SGYvow.js";import{JH as F,fp as uw,eX as gw,f4 as pw,eY as fw,f2 as vw,f1 as hw,e_ as mw,f0 as _w,eZ as ww,rw as bw,c7 as yw,i as ki,Jg as Iw,Dn as vf,Ds as Sw,Du as Gg,Dr as $w,Dt as kw,vF as xw,vH as Cw,CA as hf,cq as Pw,co as Rw,BJ as Aw,bF as Tw,Ae as Mw,Cp as id,v1 as Ew,cr as Vg,dC as qw,dD as Lw,Cz as Hw,em as Ow,CT as Dw,CS as Fw,CX as Nw,CW as Bw,cR as Ww,cU as Uw,nE as zw,es as jw,wT as Gw,CY as Vw,wV as Kw,CZ as Qw,cV as Jw,cW as Yw,nM as Xw,As as Zw,IC as eb,Ar as tb,DE as nb,wo as rb,wp as ab,za as sb,ze as ld,wk as ob,wl as ib,rU as lb,rh as cb,rf as db,f$ as ub,H_ as gb,Lv as pb,GX as fb,go as vb,p4 as hb,Jv as mb,ol as _b,Ad as wb,fu as Kg,r4 as Qg,fn as bb,fm as yb,tD as Ib,g4 as Jg,rg as Sb,ff as $b,Ck as kb,m as xb,nN as Cb,zS as Pb,z8 as Rb,EK as Ab,Ez as Yg,xj as Tb,xk as Xg,v0 as Zg,p5 as Mb,DQ as Eb,gk as qb,g2 as Lb,eV as Hb,cN as Ob,Ah as Db,LA as Fb,CF as Nb,LS as Bb,y4 as Wb,gb as Ub,fe as zb,cM as jb,cJ as Gb,cI as Vb,vt as Kb,xq as Qb,xo as Jb,cG as Yb,cF as Xb,zg as Zb,zb as ey,xp as ty}from"./D0qhIm1r.js";import{a as jd}from"./CC7to1B5.js";import{aM as ny,aL as ry,bg as ay,a7 as sy,aD as oy,aO as iy,M as mf,a0 as _f,b8 as ly,b2 as cy,as as ep,P as yl,b0 as tp,a$ as np,a_ as rp}from"./DPbxpEc3.js";import{l as wf,G as dy,I as Rd,at as uy,b1 as Ll,a9 as bf,S as gy,aW as cd,aq as py,aJ as fy,C as vy,z as yf,s as hy,A as my,v as _y,a$ as wy,aH as If,aG as Sf,aI as by,j as ap,aM as dd,aT as sp,aS as Il,aU as op,Q as ip,d as yy,e as Iy,ax as Sy,V as lp,aE as $y,c as ky,m as xy,aV as cp,ap as Cy,aw as dp,a as Py,aA as Ry,ad as up,aD as Ay,aX as gp,a_ as pp,n as fp,ae as Ty,R as My,ay as vp,am as Ey,O as qy,as as Ly,h as Hy,q as Oy,$ as ud,_ as Dy,aC as hp,a8 as Fy,f as Ny,i as By,a6 as Wy,ac as Uy}from"./BjEG_fCJ.js";import{f as zy,o as jy,E as Gy,C as Vy,m as Ky,a2 as mp,aa as Qy,K as Jy,e as Yy,y as Xy}from"./B0SSzYpD.js";import{a as Ri}from"./CZfU7DE3.js";import{dX as Bl,cU as $f,O as kf,W as Zy,bv as eI,aF as xf,dI as Cf,aU as qo,e9 as tI,dx as Pf,aw as Gd,dW as Vd,aN as Rf,cP as nI,V as ha,a3 as Xs,B as rI,a7 as aI,a4 as sI,M as oI,a6 as iI,ar as lI,aG as Af,aO as Hl,b6 as cI,ay as Tf,r as dI,n as Ad,H as uI,dZ as gI,aQ as pI,aK as fI,c9 as vI,aW as hI,bM as mI,bK as _I,bL as wI,c8 as bI,c7 as yI,cN as II,cM as SI,aS as $I,bb as kI,bd as xI,bg as CI,bc as PI,bl as RI,bf as AI,be as TI,bh as MI,bi as EI,bk as qI,bj as LI,ax as HI,cj as OI,ck as DI,dw as FI,dv as NI,a$ as BI,G as WI,b3 as UI,cf as zI,C as _p,d1 as jI,ba as ds,b$ as GI,X as VI,bq as KI,E as QI,ad as JI,t as YI,cX as XI,d4 as wp,Q as bp,du as ZI,cQ as gd}from"./cD292w1o.js";import{u as Mf,a as Sl,ag as eS,x as tS,ad as Ef,af as nS,ac as qf,a4 as rS,F as yp,D as aS,e as sS,n as oS,s as iS,m as lS,Y as cS,k as dS}from"./BnbmXiW4.js";import{a2 as uS,b5 as gS,cN as pS,a_ as fS,b4 as vS,c3 as hS,ca as mS,w as _S,x as wS,ce as bS}from"./C0JQvbI4.js";import{n as yS,P as Lf,F as IS,ai as SS,r as $S,ac as kS}from"./BS1zON0P.js";import{I as xS,s as CS,H as Ip}from"./Bqd7fdCF.js";import{e as PS}from"./CL3a4Hm1.js";import{e as RS,f as AS}from"./Y8hdNZSZ.js";import{s as TS,o as Zs,b as MS,g as Wl,d as ES,l as yi}from"./CIyUrgF0.js";import{a5 as qS,a7 as LS,D as HS,N as OS,ac as Sp,X as Hf,i as DS,r as ur,v as Ai,u as ea,p as xi,x as wr,S as Kd,m as Kl,s as Ho,y as Ti,o as ao,n as so,t as $p,aa as oo,w as io,a9 as Qd,q as _a,z as Oo,J as Td,_ as kp,g as FS,F as NS,U as Of,I as Df,a8 as Ff,a6 as Ol,O as BS,E as Nf,V as WS,A as US,b as zS,ab as jS,ad as $l,G as GS,e as pd,l as VS,C as KS,f as Ys,j as xp,H as us,Q as QS,d as kl,c as JS,a as Cp,h as YS,L as XS,Y as Pp,a4 as fd,a1 as Rp,a0 as ZS,a3 as Ap,$ as Tp,T as e$,B as t$,k as n$,a2 as r$,K as a$,R as s$,P as o$,W as i$}from"./D7z6HEeo.js";import{m as l$}from"./Dms_DO28.js";import{g as Bf}from"./2OP7IVCM.js";import{b as c$}from"./CH7HNVC2.js";import{g as d$}from"./ghzRmqKs.js";import{a as u$}from"./D9gMMVdB.js";import{q as Wf,d as gr,r as g$,e as Ul,j as p$,g as Md,i as f$,f as Ed,c as v$,A as h$,O as Mp,k as m$}from"./B76dt5zP.js";import{P as _$}from"./iViWtmHm.js";import{e as w$}from"./gKdztwD8.js";import{b as b$,a as y$,g as I$,c as S$,i as $$}from"./DHMxSQaO.js";import{R as k$,g as x$,W as xl,c as C$}from"./DqQWmhFJ.js";import"./x4bPxhVW.js";import"./BzXQ5SMs.js";import{t as Mi}from"./CWfjuhY2.js";import{F as P$,h as R$}from"./BAtAwQ72.js";import"./O5ZlQHf9.js";import{C as A$,e as Dr,L as T$,l as Ql,d as Jl,K as Yl,h as Jd,M as Xl,S as Fa}from"./D7KhILhs.js";import{D as M$}from"./52kdRKiP.js";import{f as Ep}from"./BonA_mfc.js";import"./DU3vNstz.js";import{i as Uf}from"./BjLb7AHW.js";import{h as qp,i as Lp,g as Hp,P as Op,C as E$,m as Dl,R as q$}from"./DkQdSPDN.js";import{f as $t,ae as L$}from"./Beq_QLuz.js";import{F as gt,bs as H$,cd as O$,aw as Na,a2 as zf,c9 as D$,bf as F$,be as N$,bg as B$,aO as Dp,aj as vd,aB as hd,bB as jf,d3 as zl,cF as W$,aM as Fp,cb as Np,cK as jl,bu as U$,aS as z$,d0 as j$,a8 as Gf,ac as G$,ag as V$,cr as K$,ba as Q$,aC as Vf,cT as Bp,cz as J$,ax as Y$,cD as X$,c3 as Z$}from"./ChHRVjww.js";import{c as Kf}from"./ChTqQfQN.js";import"./DRMe5Ypb.js";import{c as Tt}from"./2z64ELW5.js";import{a4 as Qf,bf as ek,aq as tk,k as nk,X as rk,V as ak,a1 as sk,Y as ok,bv as ik,U as lk,a0 as ck,ag as dk}from"./Xk1ND_1x.js";import{d as Gl,f as uk,e as gk}from"./CkyxPppw.js";import{A as pk}from"./DON9zoQ1.js";import{D as fk}from"./C8OXQeb2.js";import"./Cz3WzTlQ.js";import{a as vk,C as hk}from"./CXygwMkb.js";import"./CpK0xLH4.js";import{C as mk}from"./B8m3-qrW.js";import{h as qd,r as _k,a as wk}from"./B469nFvV.js";import{s as bk}from"./BVhnyyZ7.js";import{I as yk,a as Jf}from"./C3KgmGxd.js";import{L as Ik}from"./gNR_yDDX.js";import{g as Sk,f as $k,b as kk}from"./k5fprFtz.js";import{s as Ei,g as Yn,i as xk,j as Ck,e as Wp,r as Up,f as Pk,d as Rk,a as md,h as Ak}from"./C-e2e9PC.js";import{i as zp,a as Tk}from"./Bu13V5mO.js";import{seekConversationToMessage as jp}from"./uPtH8pRz.js";import{l as Xt,o as _d,h as Yd,n as Ld,q as Mk}from"./C7b3vXLD.js";import{o as Ek}from"./BjPpzZjk.js";import{A as Yf}from"./BK5l06W2.js";import{b as Xf}from"./Qvf67TfJ.js";import{h as qk,f as Zf,w as Lk,g as Hk,Q as Ok,O as Dk,M as Fk,l as ev,m as Nk,J as tv,s as nv}from"./CCAtqaSn.js";import{selectCurrentWorkspaceTabId as wd}from"./_IjN0Lbt.js";import{o as Bk}from"./BCwKGJpG.js";import{d as Wk}from"./B0Z-1lwJ.js";import{P as Uk}from"./BdWMbiFk.js";import{g as zk}from"./mpTxy2jJ.js";import{H as rv,M as jk,y as Gk,J as Vk,g as Kk,i as Qk,u as Jk,e as av,c as sv,d as Yk}from"./vezRCn6E.js";import{c as Xk,h as Xd,f as ov,Q as Zk}from"./DrCYFWYk.js";import{t as ex}from"./DAsc1V4f.js";import{s as tx}from"./BsieX9dN.js";import{i as iv}from"./BLUGgUG-.js";import{d as nx,i as rx,r as ax}from"./BwweojP5.js";import{g as sx}from"./DJZIHUd7.js";var ox=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),ix=E("<div><!></div>");function lv(n,r){if(new.target)return fn({component:lv,...n});mn(r,!0);let a=X(r,"ref",15,null),i=X(r,"class",7),c=X(r,"children",7),l=pf(r,ox);var v={get ref(){return a()},set ref(f=null){a(f),Z()},get class(){return i()},set class(f){i(f),Z()},get children(){return c()},set children(f){c(f),Z()},$set:vn,$on:(f,P)=>hn(r,f,P)},g=ix();ff(g,f=>({"data-slot":"card-header",class:f,...l}),[()=>zd("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-x-4 gap-y-1.5 pt-4 pb-2 has-data-[slot=card-action]:grid-cols-[minmax(0,1fr)_auto]",mk,i())]);var _=I(g);return Mi(_,()=>c()??fs),b(g),_r(g,f=>a(f),()=>a()),p(n,g),_n(v)}var lx=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),cx=E("<div><!></div>");function cv(n,r){if(new.target)return fn({component:cv,...n});mn(r,!0);let a=X(r,"ref",15,null),i=X(r,"class",7),c=X(r,"children",7),l=pf(r,lx);var v={get ref(){return a()},set ref(f=null){a(f),Z()},get class(){return i()},set class(f){i(f),Z()},get children(){return c()},set children(f){c(f),Z()},$set:vn,$on:(f,P)=>hn(r,f,P)},g=cx();ff(g,f=>({"data-slot":"card-title",class:f,...l}),[()=>zd("type-title min-w-0 break-words font-semibold leading-tight text-foreground",i())]);var _=I(g);return Mi(_,()=>c()??fs),b(g),_r(g,f=>a(f),()=>a()),p(n,g),_n(v)}const Cl=xS.CHAT_MEDIA,bd=TS().min(1).max(512);Zs({workspaceId:bd,agentId:bd,draftId:Wl(),principalId:bd,media:MS(yS).min(1).max(20)}).strict();const dx=Zs({sessionId:Wl()}).strict();dx.extend({control:ES("action",[Zs({action:yi("readiness")}).strict(),Zs({action:yi("export"),request:RS}).strict(),Zs({action:yi("transcribe"),request:AS}).strict(),Zs({action:yi("release"),jobId:Wl()}).strict(),Zs({action:yi("adopt"),jobId:Wl()}).strict()])}).strict();function Zd(n,r,a,i=async(c,l)=>typeof window>"u"||CS(window)!=="electron"?{ok:!1,error:"unavailable"}:PS().invoke(c,l)){let c=null,l=null,v=!1;async function g(){v=!0,a.removeEventListener("abort",_);const k=c;c=null,k&&await i(Cl.CLOSE,{sessionId:k}).catch(()=>{})}const _=()=>{g()};a.addEventListener("abort",_,{once:!0});const f=()=>{if(v||a.aborted||!r())throw new Error("media-send-retired")};async function P(){if(f(),c)return c;if(l)return l;l=(async()=>{const k=await i(Cl.BEGIN,n);if(!k.ok)throw new Error("media-export-unavailable");c=k.value.sessionId;try{return f(),c}catch(W){throw await g(),W}})();try{return await l}finally{l=null}}async function S(k){const W=await P();f();const O=await i(Cl.CONTROL,{sessionId:W,control:k});return f(),O}return{service:{exportMedia:k=>S({action:"export",request:k}),adoptMediaJob:k=>S({action:"adopt",jobId:k}),transcribeMedia:k=>S({action:"transcribe",request:k}),releaseMediaJob:async k=>c?await i(Cl.CONTROL,{sessionId:c,control:{action:"release",jobId:k}}):{ok:!0,value:void 0}},dispose:g,readiness:()=>S({action:"readiness"})}}const yd=new Set;async function ux(n){const{drafts:r,signal:a}=n,i=structuredClone(n.capture),c=structuredClone(n.items),l=structuredClone(n.payload),{workspaceId:v,agentId:g}=i,_=Ri(F.state),f=Bl.select(F.state,v),P=$f.select(F.state),S=wf(),q=JSON.stringify([_,v,g]);if(!_||!f||!P||l.wsId!==v||yd.has(q))return!1;yd.add(q);const k=new AbortController,W=()=>k.abort();a.addEventListener("abort",W,{once:!0});const O=()=>!a.aborted&&!k.signal.aborted&&Ri(F.state)===_&&Bl.select(F.state,v)===f&&bf(S)&&r.isCurrentDraft(i),T=F.getReadableState().subscribe(()=>{O()||k.abort()});let D=null;try{if(!O()||uS(c))return!1;const K=Mf(i.attachments),se=Lf(IS(v,g),K,c.map(fe=>({contextItemId:fe.id,attachmentId:fe.attachmentId,path:fe.path}))),C=new Set([...se.images,...se.clips].map(fe=>fe.contextItemId));if(K.some(([fe])=>!C.has(fe))||se.images.some(fe=>fe.mediaError)||se.clips.some(fe=>fe.mediaError)||!SS(l.text,se))throw new Error("invalid-evidence");if(D=n.warm?.take(i,k.signal)??null,!await r.flushDraft(i)||!O())return!1;const x=await zy.agents.get(g,v);if(!O())return!1;if(!x||x.workspaceId!==v||x.retiredAt||x.pendingDeleteAt||x.status==="deleted")throw new Error("unavailable");const Q=se.clips.flatMap(fe=>fe.media?[fe.media]:[]);Q.length&&!D&&(D=Zd({workspaceId:v,agentId:g,draftId:crypto.randomUUID(),principalId:P.principal.id,media:Q},O,k.signal));const pe=dy(c,se),Te=Rd(pe),he=await uy({workspaceId:v,agentId:g,evidence:se,clickedItems:c,sendItems:pe,clickedPayload:{...l,contextItems:pe,imageBlocks:Te.imageBlocks,fileBlocks:Te.fileBlocks},binding:S,service:D?.service??null,current:O,onRecord:()=>{}});return!he||!O()?!1:Ll(F,g,he)}catch{return O()&&F.dispatch(uw(g,u.dock_conversation_sendFailed_error())),!1}finally{T(),a.removeEventListener("abort",W),await D?.dispose(),yd.delete(q)}}const dv=1e4,Gp={wasBusy:!1,busySince:null,preempted:!1,prediction:null};function Vp(n){return qS(n.messageMetadata)}function gx(n,r){if(n.some(Vp)){const a=n[0];return a&&!Vp(a)&&Kp(a,r)?[a.id]:[]}return n.filter(a=>Kp(a,r)).map(a=>a.id)}function px(n){let r=null;for(const a of n)(a.status==="preparing"||a.status==="sending")&&a.createdAt>(r??-1/0)&&(r=a.createdAt);return r}function Kp(n,r){return!n.requeuedAfterFailure&&LS(n,r)}function fx(n,r){const{busy:a,queue:i,delivered:c,now:l}=r,v=r.blocked||r.interrupted,g=r.timeoutMs??dv;let _=n.prediction;if(_){const k=new Set(i.map(D=>D.id)),W=_.ids.filter(D=>k.has(D)&&!c.has(D)),O=l-_.startedAt>=g,T=n.wasBusy&&!a;!W.length||O||v&&!a||T?_=null:W.length!==_.ids.length&&(_={..._,ids:W})}const f=n.wasBusy&&!a,P=n.wasBusy?n.busySince:a?l:null,S=n.wasBusy&&n.preempted||P!==null&&r.directSendAt!==null&&r.directSendAt>P;if(!_&&f&&!v&&!S){const k=gx(i,l).filter(W=>!c.has(W));k.length&&(_={ids:k,startedAt:l})}const q={wasBusy:a,busySince:a?P:null,preempted:a&&S,prediction:_};return n.wasBusy===q.wasBusy&&n.busySince===q.busySince&&n.preempted===q.preempted&&n.prediction===q.prediction?n:q}class vx{constructor(){Js(this,"previousWorkspaceId",null);Js(this,"_isRebinding",!1);Js(this,"_generation",0);Js(this,"_rebindPromise",null);Js(this,"_rebindResolve",null)}recordMount(r){return this.previousWorkspaceId=r,r}wasWorkspaceChangedDuringMount(r){return this.previousWorkspaceId!==r}shouldRebind(r){return!r||this.previousWorkspaceId===null?!1:r!==this.previousWorkspaceId}recordRebind(r){this.previousWorkspaceId=r}hasWorkspaceChanged(r){return r!==this.previousWorkspaceId}get trackedWorkspaceId(){return this.previousWorkspaceId}get isRebinding(){return this._isRebinding}startRebind(){return this._generation++,this._isRebinding=!0,this._rebindResolve?.(),this._rebindPromise=new Promise(r=>{this._rebindResolve=r}),this._generation}endRebind(r){r!==void 0&&r!==this._generation||(this._isRebinding=!1,this._rebindResolve?.(),this._rebindPromise=null,this._rebindResolve=null)}async waitForRebind(r=5e3){if(!this._isRebinding||!this._rebindPromise)return!1;const a=Date.now()+r;for(;this._isRebinding&&this._rebindPromise;){const i=a-Date.now();if(i<=0)return!1;let c;const l=await Promise.race([this._rebindPromise.then(()=>!1),new Promise(v=>{c=setTimeout(()=>v(!0),i)})]);if(clearTimeout(c),l)return!1}return!0}}function hx(n,r){return!(n?.tabType!=="agent"||n.agentId!==r.agentId||!r.isActive||n.workspaceId&&n.workspaceId!==r.workspaceId||r.panelId&&(n.source!=="dictation"&&!r.isPanelFocused||n.panelId&&n.panelId!==r.panelId))}function Qp(n){const r=typeof n=="string"?n:n&&typeof n=="object"&&typeof n.script=="string"?n.script:void 0;return r||void 0}var mx=E('<div role="status" aria-live="polite" data-presence-typing-indicator=""><span class="inline-flex min-w-[var(--operational-leading-slot-size)] shrink-0 items-center justify-center svelte-lm4khl"><!></span> <span class="min-w-0 truncate svelte-lm4khl"> </span> <span class="inline-flex shrink-0 items-center gap-0.5 svelte-lm4khl" aria-hidden="true"><span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.2s"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.4s"></span></span></div>');function uv(n,r){if(new.target)return fn({component:uv,...n});mn(r,!0);const a=()=>ge(P,"$typing$",i),[i,c]=Nr();let l=X(r,"workspaceId",7),v=X(r,"agentId",7),g=X(r,"class",7,"");const _=Bn(""),f=Bn("");ae(()=>{_.set(l())}),ae(()=>{f.set(v())});const P=gS(_,f),S=o(()=>w$(a()));var q={get workspaceId(){return l()},set workspaceId(D){l(D),Z()},get agentId(){return v()},set agentId(D){v(D),Z()},get class(){return g()},set class(D=""){g(D),Z()},$set:vn,$on:(D,K)=>hn(r,D,K)},k=Wt(),W=ye(k);{var O=D=>{var K=mx(),se=I(K),C=I(se);_$(C,{get people(){return a()},size:12,decorative:!0}),b(se);var x=m(se,2),Q=de(x,!0);pn(2),b(K),L(()=>{xe(K,1,`${Wf} flex h-4 min-w-0 items-center gap-[var(--operational-leading-gap)] px-[var(--operational-row-inline-padding)] font-family-child font-normal text-muted-foreground text-[11px] leading-4 ${g()??""} /* a11y-ignore: user-requested compact typing status in the composer gap */`,"svelte-lm4khl"),j(Q,e(S))}),p(D,K)};B(W,D=>{e(S)&&D(O)})}p(n,k);var T=_n(q);return c(),T}const _x=50,wx=5e3,bx=500,yx=()=>({authority:()=>Ri(F.state),persistSnapshot:py,dispatch:n=>F.dispatch(n),ownerView:n=>fy.withStore(F)(n)});function Ix(n){const r=n.store??yx(),a=crypto.randomUUID();let i=_e(!1),c=_e(!1),l=_e(!1),v=null,g=null,_=0,f=!1,P=null,S=null,q=null,k=0,W=null,O=null;const T={};let D,K=_e([]),se=null,C=0,x="",Q=0,pe="";const Te=()=>{const N=n.workspaceId(),R=n.agentId();if(!N||!R||!(n.active?.()??!0))return null;const re=r.authority?.();if(!re||f)return null;const qe=n.inputValue(),H=fe(),Y=D?.shared,J=Y?.workspaceId===N&&Y.agentId===R?Y.lifetime:null,Se=JSON.stringify([re,N,R,k,J,H.map(z=>[z.id,z.attachmentId,z.path])]);Se!==pe&&(pe=Se,Q+=1);const He=JSON.stringify([re,N,R,qe,H,k]);return He!==x&&(x=He,C+=1),{authority:re,ownerId:a,workspaceId:N,agentId:R,text:qe,attachments:JSON.parse(JSON.stringify(H)),generation:C,attachmentEpoch:Q}};let he=null;const fe=()=>eS(n.contextItems(),tS(n.contextItems(),e(K))),Le=N=>{if(D=N,!N||f)return;const R=N.restore;if(O&&R?.requestId===O.requestId&&R.status!=="pending"){const{apply:H}=O;O=null,w(c,!1),R.status==="restored"&&w(K,R.draft?.attachments??[]),H(R)}const re=N.shared;if(re&&!e(c)&&g===`${re.workspaceId}\0${re.agentId}`){const H=JSON.stringify([re.provenance,re.workspaceId,re.agentId,re.lifetime,re.revision]);if(se!==H){se=H;const Y=he??v,J=Y&&n.inputValue()===Y.text&&JSON.stringify(fe())===Y.attachmentsJson;re.origin===a?he={text:re.snapshot.text,attachmentsJson:JSON.stringify(re.snapshot.attachments)}:J&&(_+=1,q&&clearTimeout(q),w(K,re.snapshot.attachments),he=v={text:re.snapshot.text,attachmentsJson:JSON.stringify(e(K))},n.setInputValue(re.snapshot.text),n.setContextItems(Sl(e(K))),n.applyEditorContent(re.snapshot.text))}}ot(Te);const qe=[];for(const H of N.saves){if(H.status==="pending")continue;qe.push(H.id);const Y=T[H.id];delete T[H.id],Y?.(H)}qe.length>0&&queueMicrotask(()=>r.dispatch(vw(a,qe)))},ue=(N,R,re)=>{const qe=crypto.randomUUID();O={requestId:qe,apply:re},w(c,!0),r.dispatch(mw(a,qe,N,R))},oe=()=>{O&&(O=null,w(c,!1),r.dispatch(ww(a)))},Me=()=>{const N=W;N&&(W=null,r.dispatch(_w(a)),D?.saves.some(R=>R.id===N)||delete T[N])};r.dispatch(gw(a));const ie=r.ownerView(a).subscribe(N=>ot(()=>Le(N))),ee=()=>{S&&(clearTimeout(S),S=null),w(l,!1)},Ae=()=>{W&&(W=null,r.dispatch(hw(a)))};ae(()=>{const N=n.active?.()??!0,R=n.workspaceId(),re=n.agentId();if(!N){ot(()=>{_+=1,g=null,oe(),P&&clearTimeout(P),P=null,ee(),q&&clearTimeout(q),q=null,w(i,!1),Ae()});return}if(!R||!re)return;const qe=`${R}\0${re}`;if(g===qe)return;const H=g!==null;g=qe;const Y=++_;ot(()=>{v=null,he=null,se=null,w(K,[]),P&&clearTimeout(P),ee(),q&&(clearTimeout(q),q=null),H&&(Ae(),n.setInputValue(""),n.contextItemsAreScoped||n.setContextItems([]),n.applyEditorContent(""));const J=gy(R,re);if(J){w(K,J.attachments),w(i,!1);const He=n.contextItems().length>0,z=J.text,Ie=JSON.stringify(J.attachments);n.setInputValue(J.text),He||n.setContextItems(Sl(J.attachments)),n.applyEditorContent(J.text),v={text:J.text,attachmentsJson:Ie},ue(R,re,Ce=>{if(Ce.status!=="restored")return;const De=Ce.draft;if(f||!(n.active?.()??!0)||g!==qe||_!==Y)return;const at=De?.text??"",lt=De?.attachments??[],Oe=JSON.stringify(lt);cd(R,re,{text:at,attachments:lt});const $e=n.inputValue()===z&&JSON.stringify(fe())===Ie;He||!$e||(at!==z&&(n.setInputValue(at),n.applyEditorContent(at)),Oe!==Ie&&n.setContextItems(Sl(lt)),v={text:at,attachmentsJson:Oe})});return}w(i,!0),S=setTimeout(()=>{S=null,(n.active?.()??!0)&&w(l,!0)},bx),P=setTimeout(()=>{(n.active?.()??!0)&&(w(i,!1),ee())},wx);const Se=()=>{!(n.active?.()??!0)||g!==qe||_!==Y||(P&&clearTimeout(P),w(i,!1),ee())};ue(R,re,He=>{if(He.status!=="restored"){Se();return}const z=He.draft;if(f||!(n.active?.()??!0)||g!==qe||_!==Y)return;const Ie=!!n.inputValue();if(!Ie&&z?.attachments?.length&&n.contextItems().length===0&&n.setContextItems(Sl(z.attachments)),!Ie&&z?.text&&(n.setInputValue(z.text),q=setTimeout(()=>{(n.active?.()??!0)&&n.inputValue()===z.text&&n.applyEditorContent(z.text)},_x)),v===null){const Ce=z?.text??"",De=z?.attachments??[];v={text:Ce,attachmentsJson:JSON.stringify(De)},cd(R,re,{text:Ce,attachments:De})}Se()})})}),ae(()=>{const N=n.active?.()??!0,R=n.workspaceId(),re=n.agentId(),qe=e(i);if(!N){ot(Me);return}if(!R||!re)return;const H=n.inputValue(),Y=fe();if(ot(Te),ot(Me),qe||v===null&&!H&&Y.length===0)return;const J=JSON.stringify(Y);if(v!==null&&v.text===H&&v.attachmentsJson===J)return;JSON.stringify(e(K))!==J&&w(K,Y);const Se=`${R}\0${re}`,He=k,z=crypto.randomUUID();T[z]=Ie=>{if(n.active?.()??!0){if(Ie.status==="saved"){g===Se&&k===He&&(v={text:H,attachmentsJson:J});return}n.onSaveError?.(new Error(Ie.error))}},ot(()=>{W=z,r.dispatch(pw(a,z,{authority:r.authority?.()??void 0,workspaceId:R,agentId:re,text:H,attachments:Y,rollback:v?{text:v.text,attachments:JSON.parse(v.attachmentsJson)}:null}))})}),ae(()=>()=>{f=!0,P&&clearTimeout(P),S&&clearTimeout(S),q&&clearTimeout(q),Ae(),ie(),r.dispatch(fw(a))});const Ee=N=>{const R=Te();return R!==null&&R.authority===N.authority&&R.ownerId===N.ownerId&&R.workspaceId===N.workspaceId&&R.agentId===N.agentId&&R.generation===N.generation&&R.text===N.text&&JSON.stringify(R.attachments)===JSON.stringify(N.attachments)};return{captureDraft:Te,isCurrentDraft:Ee,updateAttachmentScreen(N,R,re){return!Ee(N)||!N.attachments.some(qe=>qe.id===R)?null:(w(K,N.attachments.map(qe=>qe.id===R?{...qe,screen:structuredClone(re)}:qe)),Te())},async flushDraft(N){if(!Ee(N))return!1;if(!r.persistSnapshot)throw new Error("draft-shared-transport-unavailable");return await r.persistSnapshot(a,N.workspaceId,N.agentId,N,N.authority),Ee(N)},get restorePending(){return e(c)},get gateActive(){return e(i)},get gateVisible(){return e(l)},invalidatePendingRestore(){if(_+=1,k+=1,oe(),P&&(clearTimeout(P),P=null),q&&(clearTimeout(q),q=null),w(i,!1),ee(),Me(),g!==null){const[N,R]=g.split("\0");cd(N,R,{text:"",attachments:[]}),he=null,w(K,[]),v={text:"",attachmentsJson:"[]"}}}}}function qi(n){if(!n)return null;const r=Lf(JSON.stringify([n.workspaceId,n.agentId]),Mf(n.attachments),n.attachments.map(a=>({contextItemId:a.id,attachmentId:a.attachmentId,path:a.path})));return{...r,clips:r.clips.filter(a=>{const i=n.attachments.find(c=>c.id===a.contextItemId);return!!a.media&&!a.mediaError&&!!i&&a.path===i.path})}}async function Sx(n,r,a){const i=F.state.principal.snapshot,c=()=>Ri(F.state)===n.authority&&a.isCurrentDraft(n);if(!i||!c()||!await a.flushDraft(n)||!c())return{ready:!1};const l=new AbortController,v=Zd({workspaceId:n.workspaceId,agentId:n.agentId,principalId:i.principal.id,draftId:crypto.randomUUID(),media:[r]},c,l.signal);try{const g=await v.readiness();return!c()||!g.ok?{ready:!1}:g.value.find(_=>_.sourceId===r.source.id)??{ready:!1}}finally{await v.dispose()}}function Jp(n){let r=_e(null),a=_e(!1),i=_e(!1),c=null,l=!0,v=0,g=null;qs(()=>{l=!1,v++}),ae(()=>{const S=n.capture();e(r)&&(!S||S.authority!==e(r).capture.authority||S.ownerId!==e(r).capture.ownerId||S.workspaceId!==e(r).capture.workspaceId||S.agentId!==e(r).capture.agentId||S.attachmentEpoch!==e(r).capture.attachmentEpoch)&&w(r,null)});async function _(S){if(n.disabled()||e(a))return;const q=n.drafts.captureDraft(),k=qi(q),W=k?.clips.find(K=>K.contextItemId===S);if(!q||!W?.media||!k)return;const O=vy({workspaceId:q.workspaceId,agentId:q.agentId,clip:W,evidence:k,marks:k.marks}),T=yf(q.workspaceId,W.path);if(!O||!T)return;const D=++v;c=document.activeElement instanceof HTMLElement?document.activeElement:null,w(a,!0),w(i,!1);try{if(await n.beforeOpen?.(),!l||v!==D||!n.drafts.isCurrentDraft(q))return;const K=await(n.prepareOutput??Sx)(q,W.media,n.drafts);if(!l||v!==D||!n.drafts.isCurrentDraft(q))return;const{attachmentPath:se,...C}=O;w(r,{capture:q,contextItemId:S,snapshot:{...C,openId:crypto.randomUUID(),mediaUrl:T,output:K,deleteReady:!0}})}catch{l&&v===D&&w(i,!0)}finally{l&&v===D&&w(a,!1)}}async function f(S){const q=crypto.randomUUID(),k=e(r),W=n.drafts.captureDraft();if(!k||!W||W.authority!==k.capture.authority||W.ownerId!==k.capture.ownerId||W.workspaceId!==k.capture.workspaceId||W.agentId!==k.capture.agentId||W.attachmentEpoch!==k.capture.attachmentEpoch)return{requestId:q,result:"stale-source"};const O=qi(W),T=O?.clips.find(Q=>Q.contextItemId===k.contextItemId);if(!O||!T?.media)return{requestId:q,result:"stale-source"};const K=g?.openId===k.snapshot.openId&&g.inputRevision===S.revision&&JSON.stringify(g.media)===JSON.stringify(T.media)?{...S,revision:T.media.saved?.revision??0}:S,se=$S(T.media,{openId:k.snapshot.openId,...k.snapshot.output?.version===2?{outputVersion:2}:{},pair:{workspaceId:W.workspaceId,agentId:W.agentId},sourceId:S.sourceId,sourceRevision:S.sourceRevision,expectedEditRevision:K.revision,edit:K});if(se.status!=="saved")return{requestId:q,result:se.status==="invalid-edit"?"failed":se.status};const C=kS({...O,clips:O.clips.map(Q=>Q.id===T.id?{...Q,media:se.media}:Q)})[k.contextItemId],x=n.drafts.updateAttachmentScreen(W,k.contextItemId,C);if(!x)return{requestId:q,result:"stale-source"};g={openId:k.snapshot.openId,media:se.media,inputRevision:S.revision};try{if(!n.drafts.isCurrentDraft(x))return{requestId:q,result:"stale-source"};await n.drafts.flushDraft(x);const Q=n.drafts.captureDraft();return!l||e(r)?.snapshot.openId!==k.snapshot.openId||!Q||Q.attachmentEpoch!==k.capture.attachmentEpoch||Q.authority!==x.authority||Q.ownerId!==x.ownerId||Q.workspaceId!==x.workspaceId||Q.agentId!==x.agentId||JSON.stringify(Q.attachments.find(pe=>pe.id===k.contextItemId)?.screen)!==JSON.stringify(C)?{requestId:q,result:"stale-source"}:(g=null,{requestId:q,result:"saved",saved:se.media.saved??void 0})}catch{return{requestId:q,result:"failed"}}}function P(S){return n.disabled()||!n.onRemove(S)?!1:(e(r)?.contextItemId===S&&w(r,null),!0)}return{get session(){return e(r)},get opening(){return e(a)},get problem(){return e(i)},open:_,save:f,remove:P,close(){w(r,null)},restoreFocus(){c?.isConnected&&c.focus()}}}var $x=E('<p role="alert"> </p>'),kx=E('<div class="recording-editor-surface svelte-cdb16"><!></div>'),xx=E("<!> <!> <!>",1);function gv(n,r){if(new.target)return fn({component:gv,...n});mn(r,!0);let a=X(r,"capture",7),i=X(r,"drafts",7),c=X(r,"disabled",7,!1),l=X(r,"onRemove",7),v=X(r,"controllerFactory",7,Jp),g=X(r,"beforeOpen",7),_=X(r,"onReviewChange",7);const f=ot(()=>v()({drafts:i(),capture:()=>a(),disabled:()=>c(),onRemove:C=>l()(C),beforeOpen:()=>g()?.()??Promise.resolve()}));ae(()=>{const C=f.opening,x=f.session;ot(()=>_()?.(C,x?.snapshot.output?.ready?{openId:x.snapshot.openId,capture:x.capture}:null))});const P=o(hy),S=o(()=>qi(a())),q=o(()=>e(S)?.clips.map(C=>({id:C.contextItemId,kind:"clip",owner:"evidence",duration:Ep(C.durationMs),recording:!1,url:a()?yf(a().workspaceId,C.path):void 0,...C.media?.saved?{summary:my(C.media.saved)}:{}}))??[]);let k=_e(null);var W={get capture(){return a()},set capture(C){a(C),Z()},get drafts(){return i()},set drafts(C){i(C),Z()},get disabled(){return c()},set disabled(C=!1){c(C),Z()},get onRemove(){return l()},set onRemove(C){l(C),Z()},get controllerFactory(){return v()},set controllerFactory(C=Jp){v(C),Z()},get beforeOpen(){return g()},set beforeOpen(C){g(C),Z()},get onReviewChange(){return _()},set onReviewChange(C){_(C),Z()},$set:vn,$on:(C,x)=>hn(r,C,x)},O=xx(),T=ye(O);{let C=o(()=>c()||f.opening);HS(T,{get items(){return e(q)},get labels(){return e(P)},get disabled(){return e(C)},onEdit:x=>void f.open(x),onMarkUp:x=>void f.open(x),get onRemove(){return f.remove}})}var D=m(T,2);{var K=C=>{var x=$x(),Q=de(x,!0);L(pe=>j(Q,pe),[()=>u.dock_captureEditor_saveFailed_label()]),p(C,x)};B(D,C=>{f.problem&&C(K)})}var se=m(D,2);{let C=o(()=>!!f.session),x=o(()=>u.dock_captureEditor_recording_title({duration:f.session?Ep(f.session.snapshot.durationMs??0):""}));A$(se,{get open(){return e(C)},size:"editor",showCloseButton:!1,get title(){return e(x)},escapeKeydownBehavior:"ignore",dismissOnInteractOutside:!1,onClose:()=>f.close(),onCloseAutoFocus:Q=>{Q.preventDefault(),f.restoreFocus()},get contentRef(){return e(k)},set contentRef(Q){w(k,Q,!0)},children:(Q,pe)=>{var Te=Wt(),he=ye(Te);{var fe=Le=>{var ue=Wt(),oe=ye(ue);Ci(oe,()=>f.session.snapshot.openId,Me=>{var ie=kx(),ee=I(ie);M$(ee,{get snapshot(){return f.session.snapshot},get shortcutDialog(){return e(k)},onClose:()=>f.close(),get onSave(){return f.save},onDelete:async()=>!!f.session&&f.remove(f.session.contextItemId)}),b(ie),p(Me,ie)}),p(Le,ue)};B(he,Le=>{f.session&&Le(fe)})}p(Q,Te)},$$slots:{default:!0}})}return p(n,O),_n(W)}const Pl=n=>JSON.stringify([n.authority,n.ownerId,n.workspaceId,n.agentId,n.attachmentEpoch,n.attachments]);function Cx(n){let r=_e(!1),a=_e(!1),i=_e(null),c=!1,l=0,v=null,g=null;async function _(S){S.abort.abort(),S.slot?.cancel(),await S.native?.dispose()}async function f(){l++;const S=g;g=null,S&&await _(S)}ro(()=>{const S=()=>{w(r,document.hasFocus(),!0)};return S(),window.addEventListener("focus",S),window.addEventListener("blur",S),()=>{window.removeEventListener("focus",S),window.removeEventListener("blur",S)}});const P=F.getReadableState().subscribe(()=>{g&&!g.current()&&f()});return qs(()=>{c=!0,P(),f()}),ae(()=>{const S=n.capture(),q=S?Pl(S):"",k=e(r)&&!e(a)&&(n.active()||e(i)?.key===q);ot(()=>{if(!k||!S){f();return}if(g?.key===q)return;if(v===q){f();return}f();const O=qi(S)?.clips.flatMap(Te=>!Te.mediaError&&Te.media?[Te.media]:[])??[],T=O[0],D=F.state.principal.snapshot,K=Bl.select(F.state,S.workspaceId);if(!T||!D||!K||n.drafts.gateActive)return;const se=wf(),C=new AbortController,x=()=>!c&&!C.signal.aborted&&Ri(F.state)===S.authority&&Bl.select(F.state,S.workspaceId)===K&&bf(se)&&!!n.capture()&&Pl(n.capture())===q,Q={key:q,capture:S,abort:C,native:null,slot:null,current:x};g=Q;const pe=l;n.drafts.flushDraft(S).then(async Te=>{if(!(g!==Q||pe!==l||!x())){if(!Te){v=q,await f();return}Q.native=Zd({workspaceId:S.workspaceId,agentId:S.agentId,draftId:crypto.randomUUID(),principalId:D.principal.id,media:structuredClone(O)},x,C.signal),Q.slot=_y(Q.native.service),v=q,Q.slot.warm(q,T,x)}}).catch(()=>{g===Q&&f()})})}),{cancel:f,async beforeEditorOpen(){w(a,!0),v=null,await f()},editorState(S,q){w(a,S,!0);const k=q?Pl(q.capture):null;q&&e(i)?.openId!==q.openId&&(v=null),w(i,q&&k?{openId:q.openId,key:k}:null)},take(S,q){const k=g;if(!k?.native||!k.slot||k.key!==Pl(S)||!k.current())return f(),null;g=null,l++;const W=k.native,O=k.slot,T=()=>k.abort.abort();return q.addEventListener("abort",T,{once:!0}),q.aborted&&T(),{service:{...W.service,takePreparedRecording:D=>O.take(k.key,D,()=>!q.aborted&&k.current())},async dispose(){q.removeEventListener("abort",T),await _(k)}}}}}var Px=E('<div role="status" class="px-3 py-1.5 text-xs text-muted-foreground" data-testid="chat-draft-loading-gate"><span> </span></div>');function pv(n,r){if(new.target)return fn({component:pv,...n});mn(r,!1);var a={$set:vn,$on:(v,g)=>hn(r,v,g)};Uf();var i=Px(),c=I(i),l=de(c,!0);return b(i),L(v=>j(l,v),[()=>u.chat_draftGate_loading_label()]),p(n,i),_n(a)}var Rx=E('<div data-new-messages-divider="" class="type-caption font-family-child my-6 flex items-center gap-2 px-2" role="separator"><div class="h-px flex-1 bg-border"></div> <span class="whitespace-nowrap px-1 font-medium text-foreground"> </span> <div class="h-px flex-1 bg-border"></div></div>');function Hd(n,r){if(new.target)return fn({component:Hd,...n});mn(r,!1);var a={$set:vn,$on:(v,g)=>hn(r,v,g)};Uf();var i=Rx(),c=m(I(i),2),l=de(c,!0);return pn(2),b(i),L((v,g)=>{Ue(i,"aria-label",v),j(l,g)},[()=>u.chat_newMessagesDivider_label(),()=>u.chat_newMessagesDivider_label()]),p(n,i),_n(a)}function Ax(n,r){if(!r||n.length===0)return null;const a=n.indexOf(r);return a===-1||a===n.length-1?null:r}function Tx(n,r,a){if(!r||n.length===0)return"none";const i=n.indexOf(r);return i===n.length-1?"none":i!==-1?"marker-loaded":a.complete?a.truncated?"marker-beyond-window":"none":"marker-pending"}function Mx(n,r){return r&&n.includes(r)?r:null}function Yp(n,r,a){return r-n<=a}const Ex=.2;function Xp(n,r,a){const i=Math.max(0,a-r),c=n-Ex*r;return Math.min(Math.max(0,c),i)}function qx(n,r,a){return n!==null&&a&&n===r}function Lx(n){return n?bw(n)&&yw(n)!==null&&typeof n.metadata?.taskNoteId=="string":!1}function Hx(n){const r=[],a=new Set;let i,c;for(const D of n.messages){if(D.agentId&&D.agentId!==n.agentId){i=void 0,c=void 0;continue}if(a.has(D.id))continue;a.add(D.id),n.breakBeforeMessageIds?.has(D.id)&&(i=void 0,c=void 0);const K=OS(D);if(K?.kind!=="turn-failure")c=void 0;else{const se=i?.seq!==void 0&&D.seq!==void 0&&Number.isSafeInteger(i.seq)&&Number.isSafeInteger(D.seq)&&D.seq===i.seq+1;(!c||!se)&&(c={key:JSON.stringify([n.agentId,"notice",D.id]),anchorMessageId:D.id,correlation:"unavailable",records:[],recordedFailureCount:0},r.push(c)),c.records.push({messageId:D.id,reason:K.reason,timestamp:D.timestamp}),c.recordedFailureCount+=1}i=D}const l=new Map;for(const D of n.queue){if(!D.requeuedAfterFailure)continue;const K=D.turnId||void 0,se=JSON.stringify([n.agentId,K?"turn":"queue",K??D.id]);let C=l.get(se);C||(C={key:se,correlation:K?"turn":"queue-entry",turnId:K,queueIds:[],state:"queued"},l.set(se,C)),C.queueIds.includes(D.id)||C.queueIds.push(D.id)}const v=[...l.values()],g=n.session?.id===n.agentId?n.session:void 0,_=g?.status===ki.Error,f=n.transientError||_&&g.stopReason||null,P=_&&!f,S=_&&(!n.transientError||n.transientError===g.stopReason)?g.stopReasonTimestamp:void 0,q=S?Sp(S):null,k=q&&f&&f===g?.stopReason?r.flatMap(D=>D.records).filter(D=>D.reason===f&&Sp(D.timestamp)===q):[],W=k.length===1?k[0].messageId:void 0,T=(g?kf(g):!1)?"attempting":v.length?"queued":f||P?"action-needed":"inactive";return{history:r,queueRecovery:v,current:{state:T,error:f,needsFallbackReason:P,timestamp:S,noticeId:W}}}function Ox(n,r){const a=n.hiddenTail[0]?.id,i=Hx({...r,messages:[...n.groups.flatMap(g=>g.messages),...n.hiddenTail],breakBeforeMessageIds:new Set(a?[a]:[])}),c=i.current.noticeId,l=i.history.map(g=>({...g,records:g.records.filter(_=>_.messageId!==c)})).filter(g=>g.records.length>0),v=new Set(l.map(g=>g.records[0].messageId));return{...i,runsByAnchor:new Map(l.map(g=>[g.records[0].messageId,g])),collapsedMessageIds:new Set(i.history.flatMap(g=>g.records.map(_=>_.messageId).filter(_=>!v.has(_))))}}var Dx=E('<div class="flex size-10 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <div class="min-w-0 flex-1"><div class="type-body truncate font-medium text-foreground"> </div> <div class="type-caption mt-0.5 line-clamp-2 text-muted-foreground"> </div></div> <div class="flex size-7 shrink-0 items-center justify-center rounded-md bg-muted/50 text-muted-foreground transition-colors group-hover:bg-muted"><!></div>',1),Fx=E('<div class="flex size-9 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <span class="type-body font-medium"> </span>',1),Nx=E('<div><div class="border-b border-border bg-muted/20 px-4 py-3"><p class="type-body font-medium text-foreground"> </p> <p class="type-caption mt-0.5 text-muted-foreground"> </p></div> <div class="max-h-[21rem] overflow-y-auto p-2"><!></div> <div class="border-t border-border bg-popover p-2"><!></div></div>'),Bx=E('<div class="mb-5"><!></div>'),Wx=E('<p data-testid="agent-welcome-description"> </p> <!>',1),Ux=E("<!> <!>",1),zx=E('<p class="mb-3 px-4 text-sm text-subtle leading-relaxed whitespace-pre-wrap" data-testid="agent-welcome-description"> </p>'),jx=E("<!> <span> </span>",1),Gx=E('<div class="mx-auto flex w-full max-w-[40rem] flex-1 flex-col px-4 pb-6 pt-4 text-subtle"><!> <!> <!></div>');function fv(n,r){if(new.target)return fn({component:fv,...n});mn(r,!0);const a=()=>ge(k,"$userOverrides$",v),i=()=>ge(q,"$specialists$",v),c=()=>ge(D,"$isGitHubAuth$",v),l=()=>ge(K,"$recentSpecialistIds$",v),[v,g]=Nr();let _=X(r,"onSpecialistChange",7),f=X(r,"session",7),P=X(r,"workspaceId",7);const S=Bn(P()??"");ae(()=>S.set(P()??""));const q=Qf(S),k=ek();ae(()=>{a()});const W=o(()=>{if(!f()||Zy(f()))return null;const N=f().metadata?.specialist||f().agentMetadata?.specialist;return N&&i().find(R=>R.id===N)||null});async function O(N){N?await Gl({specialist:N,hash:"specialists"}):await Gl({view:"create-specialist"})}let T=_e(!1);const D=tk(),K=pS(),se=o(()=>Iw(nk(i(),c()),l()));let C=_e(!1);const x=o(()=>u.chat_regularAgentWelcome_generalDescription_label()),Q=o(()=>e(W)?.name??u.chat_shared_general_fallback()),pe=o(()=>e(W)?.description??u.chat_shared_noSpecializedBehavior_label()),Te=o(()=>e(W)?e(W).defaultBehaviorPrompt||"":e(x));var he={get onSpecialistChange(){return _()},set onSpecialistChange(N){_(N),Z()},get session(){return f()},set session(N){f(N),Z()},get workspaceId(){return P()},set workspaceId(N){P(N),Z()},$set:vn,$on:(N,R)=>hn(r,N,R)},fe=Gx(),Le=I(fe);{var ue=N=>{var R=Bx(),re=I(R);fk(re,{class:"block w-full",align:"start",side:"bottom",contentClass:"w-[min(28rem,calc(100vw-2rem))]",get open(){return e(C)},set open(Y){w(C,Y,!0)},trigger:(Y,J)=>{let Se=()=>(J?.()).props;{let He=o(()=>zd("group flex h-auto min-h-(--control-height-medium) w-full cursor-pointer items-center gap-3 whitespace-normal rounded-lg border border-border bg-card px-4 py-3 text-left shadow-xs transition-colors","hover:border-input hover:bg-accent/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"));$t(Y,Li(Se,{type:"button",variant:"plain",wrapContent:!1,get class(){return e(He)},"data-testid":"specialist-picker-trigger",children:(z,Ie)=>{var Ce=Dx(),De=ye(Ce),at=I(De);{let ze=o(()=>e(W)?.id??null),Ze=o(()=>e(W)?.icon??null);pk(at,{agentId:"blank",variant:"emphasized",get specialist(){return e(ze)},get icon(){return e(Ze)}})}b(De);var lt=m(De,2),Oe=I(lt),$e=de(Oe,!0),V=m(Oe,2),ne=de(V,!0);b(lt);var Fe=m(lt,2),me=I(Fe);gt(me,{get icon(){return Na},size:10}),b(Fe),L(()=>{j($e,e(Q)),j(ne,e(pe))}),p(z,Ce)},$$slots:{default:!0}}))}},content:Y=>{var J=Nx(),Se=I(J),He=I(Se),z=de(He,!0),Ie=m(He,2),Ce=de(Ie,!0);b(Se);var De=m(Se,2),at=I(De);{let $e=o(()=>e(W)?.id??null);ew(at,{get specialists(){return e(se)},get value(){return e($e)},onchange:V=>{w(C,!1),_()?.(V)}})}b(De);var lt=m(De,2),Oe=I(lt);Tt(Oe,()=>Dr,($e,V)=>{V($e,{class:"flex h-auto w-full cursor-pointer items-center gap-3 whitespace-normal rounded-md px-3 py-2 text-left text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onSelect:()=>{w(C,!1),O()},children:(ne,Fe)=>{var me=Fx(),ze=ye(me),Ze=I(ze);gt(Ze,{get icon(){return O$},size:12}),b(ze);var ut=m(ze,2),mt=de(ut,!0);L(dt=>j(mt,dt),[()=>u.chat_regularAgentWelcome_createSpecialist_label()]),p(ne,me)},$$slots:{default:!0}})}),b(lt),b(J),L(($e,V)=>{j(z,$e),j(Ce,V)},[()=>u.workspace_createAgentSection_specialists_label(),()=>u.workspace_createAgentSection_specialists_description()]),p(Y,J)},$$slots:{trigger:!0,content:!0}}),b(R),p(N,R)};B(Le,N=>{_()&&N(ue)})}var oe=m(Le,2);{var Me=N=>{var R=Wt(),re=ye(R);{let qe=o(()=>u.chat_specialistSelector_prompt_label());Tt(re,()=>hk,(H,Y)=>{Y(H,{class:"mb-3",role:"region",get"aria-label"(){return e(qe)},children:(J,Se)=>{var He=Ux(),z=ye(He);Tt(z,()=>lv,(Ce,De)=>{De(Ce,{children:(at,lt)=>{var Oe=Wt(),$e=ye(Oe);Tt($e,()=>cv,(V,ne)=>{ne(V,{class:"type-caption font-medium",children:(Fe,me)=>{pn();var ze=dn();L(Ze=>j(ze,Ze),[()=>u.chat_specialistSelector_prompt_label()]),p(Fe,ze)},$$slots:{default:!0}})}),p(at,Oe)},$$slots:{default:!0}})});var Ie=m(z,2);Tt(Ie,()=>vk,(Ce,De)=>{De(Ce,{children:(at,lt)=>{var Oe=Wx(),$e=ye(Oe),V=de($e,!0),ne=m($e,2);$t(ne,{type:"button",variant:"link",get"aria-expanded"(){return e(T)},onclick:()=>w(T,!e(T)),class:"text-xs text-muted-foreground hover:text-foreground transition-colors mt-2 cursor-pointer",children:(Fe,me)=>{pn();var ze=dn();L(Ze=>j(ze,Ze),[()=>e(T)?u.chat_regularAgentWelcome_showLess_label():u.chat_regularAgentWelcome_showMore_label()]),p(Fe,ze)},$$slots:{default:!0}}),L(()=>{xe($e,1,`text-sm text-subtle leading-relaxed whitespace-pre-wrap break-words ${e(T)?"":"line-clamp-6"}`),j(V,e(Te))}),p(at,Oe)},$$slots:{default:!0}})}),p(J,He)},$$slots:{default:!0}})})}p(N,R)},ie=N=>{var R=zx(),re=de(R,!0);L(()=>j(re,e(Te))),p(N,R)};B(oe,N=>{e(W)?N(Me):N(ie,-1)})}var ee=m(oe,2);{var Ae=N=>{$t(N,{variant:"ghost-light",size:"sm",onclick:()=>O(e(W).id),class:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors cursor-pointer pl-1.5 mr-auto",children:(R,re)=>{var qe=jx(),H=ye(qe);gt(H,{get icon(){return H$},size:12,class:"opacity-60"});var Y=m(H,2),J=de(Y,!0);L(Se=>j(J,Se),[()=>u.chat_regularAgentWelcome_customize_label()]),p(R,qe)},$$slots:{default:!0}})};B(ee,N=>{e(W)&&N(Ae)})}b(fe),p(n,fe);var Ee=_n(he);return g(),Ee}var Vx=E('<a class="cursor-pointer underline underline-offset-2 hover:opacity-80" data-suggested-prompt-link=""> </a>'),Kx=E('<kbd data-suggested-prompt-hint=""> </kbd>'),Qx=E('<span class="type-caption"> </span>'),Jx=E('<div role="presentation" data-typography-role="body" data-suggested-prompt-row=""><span data-suggested-prompt-icon=""><!></span> <span class="min-w-0 flex-1 text-pretty" data-suggested-prompt-label=""><span role="button" tabindex="0" class="focus-visible:outline-none" data-suggested-prompt-text=""> </span><!></span> <!> <!></div>'),Yx=E('<div class="flex flex-col" data-testid="suggested-prompts-surface"><!></div>');function eu(n,r){if(new.target)return fn({component:eu,...n});mn(r,!0);let a=X(r,"prompts",7),i=X(r,"onSelect",7),c=X(r,"onEdit",7),l=X(r,"compact",7,!1),v=X(r,"showShortcutHints",7,!1),g=X(r,"reserveShortcutHintSpace",7,!1),_=X(r,"workspaceId",7);const P=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC")?"⌃":"Alt+",S=p$.replace("text-ui","type-caption");function q(x){i()(x)}function k(x,Q){x.key!=="Enter"&&x.key!==" "||(x.preventDefault(),q(Q))}function W(x,Q){x.preventDefault(),x.stopPropagation(),qd(Q,{workspaceId:_(),event:x})}function O(x,Q){(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),x.stopPropagation(),qd(Q,{workspaceId:_(),event:x}))}function T(x){return x<3}var D={get prompts(){return a()},set prompts(x){a(x),Z()},get onSelect(){return i()},set onSelect(x){i(x),Z()},get onEdit(){return c()},set onEdit(x){c(x),Z()},get compact(){return l()},set compact(x=!1){l(x),Z()},get showShortcutHints(){return v()},set showShortcutHints(x=!1){v(x),Z()},get reserveShortcutHintSpace(){return g()},set reserveShortcutHintSpace(x=!1){g(x),Z()},get workspaceId(){return _()},set workspaceId(x){_(x),Z()},$set:vn,$on:(x,Q)=>hn(r,x,Q)},K=Wt(),se=ye(K);{var C=x=>{var Q=Yx(),pe=I(Q);{const Te=(fe,Le)=>{let ue=()=>(Le?.()).item,oe=()=>(Le?.()).index;const Me=o(()=>ay(ue())),ie=o(()=>e(Me)[0]?.type==="text"?e(Me)[0].content:"");var ee=Jx(),Ae=I(ee),Ee=I(Ae);gt(Ee,{get icon(){return zf},size:16,get class(){return gr}}),b(Ae);var N=m(Ae,2),R=I(N),re=de(R,!0),qe=m(R);On(qe,17,()=>e(Me).slice(e(ie)?1:0),Y_,(z,Ie)=>{var Ce=Wt(),De=ye(Ce);{var at=Oe=>{const $e=o(()=>ry(e(Ie).url));var V=Vx(),ne=de(V,!0);L(()=>{Ue(V,"href",e($e)),Ue(V,"title",e($e)),j(ne,e(Ie).label)}),ps("click",V,Fe=>W(Fe,e($e))),ps("keydown",V,Fe=>O(Fe,e($e))),p(Oe,V)},lt=Oe=>{var $e=dn();L(()=>j($e,e(Ie).content)),p(Oe,$e)};B(De,Oe=>{e(Ie).type==="link"?Oe(at):Oe(lt,-1)})}p(z,Ce)}),b(N);var H=m(N,2);{var Y=z=>{var Ie=Kx();let Ce;var De=de(Ie);L(()=>{Ce=xe(Ie,1,`${S??""} mt-px inline-flex h-5 items-center self-start border-0 bg-transparent p-0 font-sans font-normal text-muted-foreground! opacity-100`,null,Ce,{invisible:!v()}),Ue(Ie,"aria-hidden",v()?void 0:"true"),Ue(Ie,"data-hint-visible",v()),j(De,`${P}${oe()+1}`)}),p(z,Ie)},J=o(()=>T(oe())&&(v()||g()));B(H,z=>{e(J)&&z(Y)})}var Se=m(H,2);{var He=z=>{L$(z,{side:"top",delayDuration:300,trigger:De=>{{let at=o(()=>u.chat_suggestedPrompts_editInInput_ariaLabel());$t(De,{type:"button",variant:"ghost-light",size:"icon-xs",iconOnly:!0,class:"absolute right-0.5 top-[calc(var(--operational-leading-half-slot-size)+var(--space-1)*0.5+1px)] shrink-0 -translate-y-1/2 rounded opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100",onclick:lt=>{lt.stopPropagation(),c()(ue())},get"aria-label"(){return e(at)},children:(lt,Oe)=>{gt(lt,{get icon(){return D$},size:"xs"})},$$slots:{default:!0}})}},content:De=>{var at=Qx(),lt=de(at,!0);L(Oe=>j(lt,Oe),[()=>u.chat_suggestedPrompts_edit_tooltip()]),p(De,at)},$$slots:{trigger:!0,content:!0}})};B(Se,z=>{c()&&z(He)})}b(ee),L(z=>{xe(ee,1,`${Wf} ${g$} group relative flex cursor-pointer items-center gap-[var(--operational-leading-gap)] rounded-sm border border-transparent bg-transparent px-1.5 py-0.5 text-left opacity-100 pr-9 transition-colors hover:text-foreground has-[[data-suggested-prompt-text]:focus-visible]:outline-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-offset-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-ring`),xe(Ae,1,`${Ul??""} mt-px self-start`),Ue(R,"aria-label",z),j(re,e(ie))},[()=>ny(ue())]),ps("click",R,z=>{z.stopPropagation(),q(ue())}),ps("keydown",R,z=>k(z,ue())),p(fe,ee)};let he=o(()=>l()?"[&>div>div:last-child]:gap-0":"[&>div>div:last-child]:gap-0.5");T$(pe,{get items(){return a()},virtualize:!1,onActivate:q,get class(){return`overflow-visible! [&>div>div:last-child]:flex [&>div>div:last-child]:flex-col ${e(he)??""}`},"data-testid":"suggested-prompts-list",get"data-compact"(){return l()},row:Te,$$slots:{row:!0}})}b(Q),Bt(1,Q,()=>ma,()=>({tier:"fast",y:0,scale:1})),Bt(2,Q,()=>to,()=>({tier:"fast"})),p(x,Q)};B(se,x=>{a().length>0&&x(C)})}return p(n,K),_n(D)}Ud(["click","keydown"]);var Xx=E('<section class="pb-6 pt-6"><p class="type-body mb-5 max-w-[36rem] px-1.5 text-pretty text-muted-foreground"> </p> <!></section>');function vv(n,r){if(new.target)return fn({component:vv,...n});mn(r,!0);let a=X(r,"onSelect",7),i=X(r,"compact",7,!1);const c=o(()=>[{label:u.chat_chiefEmptyState_assignedPrs_label(),prompt:u.chat_chiefEmptyState_assignedPrs_prompt()},{label:u.chat_chiefEmptyState_staleWorkspaces_label(),prompt:u.chat_chiefEmptyState_staleWorkspaces_prompt()},{label:u.chat_chiefEmptyState_agentPerformance_label(),prompt:u.chat_chiefEmptyState_agentPerformance_prompt()},{label:u.chat_chiefEmptyState_morningBrief_label(),prompt:u.chat_chiefEmptyState_morningBrief_prompt()},{label:u.chat_chiefEmptyState_randomTheme_label(),prompt:u.chat_chiefEmptyState_randomTheme_prompt()}]),l=o(()=>e(c).map(q=>q.label));function v(q){const k=e(c).find(W=>W.label===q);k&&a()(k.prompt)}var g={get onSelect(){return a()},set onSelect(q){a(q),Z()},get compact(){return i()},set compact(q=!1){i(q),Z()},$set:vn,$on:(q,k)=>hn(r,q,k)},_=Xx(),f=I(_),P=de(f,!0),S=m(f,2);return eu(S,{get prompts(){return e(l)},onSelect:v,get compact(){return i()}}),b(_),L(q=>j(P,q),[()=>u.chat_chiefEmptyState_intro_label()]),p(n,_),_n(g)}const tu=2e3,Zx=4e3,e1=Zx-tu-2;function t1(n,r=tu){const a=[];let i=0;for(let c=n.length-1;c>=0&&i<r;c-=1){const l=n[c];if(l.role!=="user"&&l.role!=="assistant")continue;const v=(l.contentBlocks??[]).filter(_=>_.type==="text").map(_=>_.text||_.content||"").join(""),g=(l.role==="assistant"?tw(v).cleanedContent:v).trim();g&&(a.unshift({role:l.role,text:g}),i+=g.length)}return a}function n1(n,r){const a=n.map(l=>`${l.role==="user"?"User":"Assistant"}: ${l.text}`).join(`
1
+ var G_=Object.defineProperty;var Ng=n=>{throw TypeError(n)};var V_=(n,r,a)=>r in n?G_(n,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[r]=a;var Js=(n,r,a)=>V_(n,typeof r!="symbol"?r+"":r,a),K_=(n,r,a)=>r.has(n)||Ng("Cannot "+a);var Ao=(n,r,a)=>(K_(n,r,"read from private field"),a?a.call(n):r.get(n)),Bg=(n,r,a)=>r.has(n)?Ng("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,a);import{t as fn,bo as X,bw as vn,bp as pf,b as hn,bm as u,bq as Nr,bs as ge,br as Li}from"./Fcr7AvC-.js";import{bs as mn,a5 as I,bf as fs,bA as b,W as p,bn as _n,aA as Z,aB as E,ca as ae,a7 as Wt,ay as ye,aD as e,cd as Bn,c9 as o,bS as m,bl as de,be as pn,b_ as L,bO as j,c5 as ot,bH as w,bV as _e,bj as qs,bk as ro,b$ as dn,ai as Ud,aj as ps,bo as Vl,br as Tr,c0 as Ot,cb as ql,ak as Q_,aw as bi,a as J_}from"./3SdAC2_C.js";import{i as B}from"./BhYXv0ZM.js";import{k as Ci}from"./Cc0763mU.js";import{g as On,i as Y_,I as eo,p as Lo,e as Eo}from"./CA6H1-bp.js";import{n as Bt,l as ma,c as to,j as Wg,k as Do,h as X_}from"./CxR-pcVt.js";import{b as ff,e as zd,f as xe,s as Ue,c as jt,g as gs}from"./BRCr02in.js";import{b as Z_}from"./goTpbPhD.js";import{b as _r}from"./Dn334wJv.js";import{m as ew,U as tw,Z as nw,X as rw,Y as aw,I as Ug,o as sw,l as ow,a2 as iw,x as zg,$ as lw,a0 as jg,r as cw,s as dw}from"./CA5vNvRD.js";import{JH as F,fp as uw,eX as gw,f4 as pw,eY as fw,f2 as vw,f1 as hw,e_ as mw,f0 as _w,eZ as ww,rw as bw,c7 as yw,i as ki,Jg as Iw,Dn as vf,Ds as Sw,Du as Gg,Dr as $w,Dt as kw,vF as xw,vH as Cw,CA as hf,cq as Pw,co as Rw,BJ as Aw,bF as Tw,Ae as Mw,Cp as id,v1 as Ew,cr as Vg,dC as qw,dD as Lw,Cz as Hw,em as Ow,CT as Dw,CS as Fw,CX as Nw,CW as Bw,cR as Ww,cU as Uw,nE as zw,es as jw,wT as Gw,CY as Vw,wV as Kw,CZ as Qw,cV as Jw,cW as Yw,nM as Xw,As as Zw,IC as eb,Ar as tb,DE as nb,wo as rb,wp as ab,za as sb,ze as ld,wk as ob,wl as ib,rU as lb,rh as cb,rf as db,f$ as ub,H_ as gb,Lv as pb,GX as fb,go as vb,p4 as hb,Jv as mb,ol as _b,Ad as wb,fu as Kg,r4 as Qg,fn as bb,fm as yb,tD as Ib,g4 as Jg,rg as Sb,ff as $b,Ck as kb,m as xb,nN as Cb,zS as Pb,z8 as Rb,EK as Ab,Ez as Yg,xj as Tb,xk as Xg,v0 as Zg,p5 as Mb,DQ as Eb,gk as qb,g2 as Lb,eV as Hb,cN as Ob,Ah as Db,LA as Fb,CF as Nb,LS as Bb,y4 as Wb,gb as Ub,fe as zb,cM as jb,cJ as Gb,cI as Vb,vt as Kb,xq as Qb,xo as Jb,cG as Yb,cF as Xb,zg as Zb,zb as ey,xp as ty}from"./D0qhIm1r.js";import{a as jd}from"./CC7to1B5.js";import{aM as ny,aL as ry,bg as ay,a7 as sy,aD as oy,aO as iy,M as mf,a0 as _f,b8 as ly,b2 as cy,as as ep,P as yl,b0 as tp,a$ as np,a_ as rp}from"./DuFY1gwd.js";import{l as wf,G as dy,I as Rd,at as uy,b1 as Ll,a9 as bf,S as gy,aW as cd,aq as py,aJ as fy,C as vy,z as yf,s as hy,A as my,v as _y,a$ as wy,aH as If,aG as Sf,aI as by,j as ap,aM as dd,aT as sp,aS as Il,aU as op,Q as ip,d as yy,e as Iy,ax as Sy,V as lp,aE as $y,c as ky,m as xy,aV as cp,ap as Cy,aw as dp,a as Py,aA as Ry,ad as up,aD as Ay,aX as gp,a_ as pp,n as fp,ae as Ty,R as My,ay as vp,am as Ey,O as qy,as as Ly,h as Hy,q as Oy,$ as ud,_ as Dy,aC as hp,a8 as Fy,f as Ny,i as By,a6 as Wy,ac as Uy}from"./DdU2snxg.js";import{f as zy,o as jy,E as Gy,C as Vy,m as Ky,a2 as mp,aa as Qy,K as Jy,e as Yy,y as Xy}from"./B0SSzYpD.js";import{a as Ri}from"./CZfU7DE3.js";import{dX as Bl,cU as $f,O as kf,W as Zy,bv as eI,aF as xf,dI as Cf,aU as qo,e9 as tI,dx as Pf,aw as Gd,dW as Vd,aN as Rf,cP as nI,V as ha,a3 as Xs,B as rI,a7 as aI,a4 as sI,M as oI,a6 as iI,ar as lI,aG as Af,aO as Hl,b6 as cI,ay as Tf,r as dI,n as Ad,H as uI,dZ as gI,aQ as pI,aK as fI,c9 as vI,aW as hI,bM as mI,bK as _I,bL as wI,c8 as bI,c7 as yI,cN as II,cM as SI,aS as $I,bb as kI,bd as xI,bg as CI,bc as PI,bl as RI,bf as AI,be as TI,bh as MI,bi as EI,bk as qI,bj as LI,ax as HI,cj as OI,ck as DI,dw as FI,dv as NI,a$ as BI,G as WI,b3 as UI,cf as zI,C as _p,d1 as jI,ba as ds,b$ as GI,X as VI,bq as KI,E as QI,ad as JI,t as YI,cX as XI,d4 as wp,Q as bp,du as ZI,cQ as gd}from"./cD292w1o.js";import{u as Mf,a as Sl,ag as eS,x as tS,ad as Ef,af as nS,ac as qf,a4 as rS,F as yp,D as aS,e as sS,n as oS,s as iS,m as lS,Y as cS,k as dS}from"./ByvcSsIj.js";import{a2 as uS,b5 as gS,cN as pS,a_ as fS,b4 as vS,c3 as hS,ca as mS,w as _S,x as wS,ce as bS}from"./D-j7vD5Z.js";import{n as yS,P as Lf,F as IS,ai as SS,r as $S,ac as kS}from"./BS1zON0P.js";import{I as xS,s as CS,H as Ip}from"./Bqd7fdCF.js";import{e as PS}from"./CL3a4Hm1.js";import{e as RS,f as AS}from"./Y8hdNZSZ.js";import{s as TS,o as Zs,b as MS,g as Wl,d as ES,l as yi}from"./CIyUrgF0.js";import{a5 as qS,a7 as LS,D as HS,N as OS,ac as Sp,X as Hf,i as DS,r as ur,v as Ai,u as ea,p as xi,x as wr,S as Kd,m as Kl,s as Ho,y as Ti,o as ao,n as so,t as $p,aa as oo,w as io,a9 as Qd,q as _a,z as Oo,J as Td,_ as kp,g as FS,F as NS,U as Of,I as Df,a8 as Ff,a6 as Ol,O as BS,E as Nf,V as WS,A as US,b as zS,ab as jS,ad as $l,G as GS,e as pd,l as VS,C as KS,f as Ys,j as xp,H as us,Q as QS,d as kl,c as JS,a as Cp,h as YS,L as XS,Y as Pp,a4 as fd,a1 as Rp,a0 as ZS,a3 as Ap,$ as Tp,T as e$,B as t$,k as n$,a2 as r$,K as a$,R as s$,P as o$,W as i$}from"./i2Q0D3-m.js";import{m as l$}from"./Dms_DO28.js";import{g as Bf}from"./2OP7IVCM.js";import{b as c$}from"./CH7HNVC2.js";import{g as d$}from"./ghzRmqKs.js";import{a as u$}from"./D9gMMVdB.js";import{q as Wf,d as gr,r as g$,e as Ul,j as p$,g as Md,i as f$,f as Ed,c as v$,A as h$,O as Mp,k as m$}from"./CzK_7_Jd.js";import{P as _$}from"./iViWtmHm.js";import{e as w$}from"./gKdztwD8.js";import{b as b$,a as y$,g as I$,c as S$,i as $$}from"./DHMxSQaO.js";import{R as k$,g as x$,W as xl,c as C$}from"./CeHL-3WK.js";import"./x4bPxhVW.js";import"./BzXQ5SMs.js";import{t as Mi}from"./CWfjuhY2.js";import{F as P$,h as R$}from"./BAtAwQ72.js";import"./O5ZlQHf9.js";import{C as A$,e as Dr,L as T$,l as Ql,d as Jl,K as Yl,h as Jd,M as Xl,S as Fa}from"./D7KhILhs.js";import{D as M$}from"./52kdRKiP.js";import{f as Ep}from"./BonA_mfc.js";import"./DU3vNstz.js";import{i as Uf}from"./BjLb7AHW.js";import{h as qp,i as Lp,g as Hp,P as Op,C as E$,m as Dl,R as q$}from"./DkQdSPDN.js";import{f as $t,ae as L$}from"./Beq_QLuz.js";import{F as gt,bs as H$,cd as O$,aw as Na,a2 as zf,c9 as D$,bf as F$,be as N$,bg as B$,aO as Dp,aj as vd,aB as hd,bB as jf,d3 as zl,cF as W$,aM as Fp,cb as Np,cK as jl,bu as U$,aS as z$,d0 as j$,a8 as Gf,ac as G$,ag as V$,cr as K$,ba as Q$,aC as Vf,cT as Bp,cz as J$,ax as Y$,cD as X$,c3 as Z$}from"./ChHRVjww.js";import{c as Kf}from"./ChTqQfQN.js";import"./DRMe5Ypb.js";import{c as Tt}from"./2z64ELW5.js";import{a4 as Qf,bf as ek,aq as tk,k as nk,X as rk,V as ak,a1 as sk,Y as ok,bv as ik,U as lk,a0 as ck,ag as dk}from"./DlnCrS3y.js";import{d as Gl,f as uk,e as gk}from"./OuI4JmWC.js";import{A as pk}from"./DON9zoQ1.js";import{D as fk}from"./C8OXQeb2.js";import"./Cz3WzTlQ.js";import{a as vk,C as hk}from"./CXygwMkb.js";import"./CpK0xLH4.js";import{C as mk}from"./B8m3-qrW.js";import{h as qd,r as _k,a as wk}from"./DIME5LWK.js";import{s as bk}from"./BVhnyyZ7.js";import{I as yk,a as Jf}from"./C3KgmGxd.js";import{L as Ik}from"./gNR_yDDX.js";import{g as Sk,f as $k,b as kk}from"./BuM8LV7z.js";import{s as Ei,g as Yn,i as xk,j as Ck,e as Wp,r as Up,f as Pk,d as Rk,a as md,h as Ak}from"./vq6mxGLA.js";import{i as zp,a as Tk}from"./Bu13V5mO.js";import{seekConversationToMessage as jp}from"./C9iwh4F-.js";import{l as Xt,o as _d,h as Yd,n as Ld,q as Mk}from"./C7b3vXLD.js";import{o as Ek}from"./CPav-V5t.js";import{A as Yf}from"./C6Af0QaF.js";import{b as Xf}from"./CLX81MHV.js";import{h as qk,f as Zf,w as Lk,g as Hk,Q as Ok,O as Dk,M as Fk,l as ev,m as Nk,J as tv,s as nv}from"./CCAtqaSn.js";import{selectCurrentWorkspaceTabId as wd}from"./_IjN0Lbt.js";import{o as Bk}from"./CDcxODgf.js";import{d as Wk}from"./B0Z-1lwJ.js";import{P as Uk}from"./BdWMbiFk.js";import{g as zk}from"./DNup87JQ.js";import{H as rv,M as jk,y as Gk,J as Vk,g as Kk,i as Qk,u as Jk,e as av,c as sv,d as Yk}from"./MFTfhUYi.js";import{c as Xk,h as Xd,f as ov,Q as Zk}from"./DejjV5ft.js";import{t as ex}from"./DAsc1V4f.js";import{s as tx}from"./BsieX9dN.js";import{i as iv}from"./DTNrtzyx.js";import{d as nx,i as rx,r as ax}from"./BwweojP5.js";import{g as sx}from"./DJZIHUd7.js";var ox=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),ix=E("<div><!></div>");function lv(n,r){if(new.target)return fn({component:lv,...n});mn(r,!0);let a=X(r,"ref",15,null),i=X(r,"class",7),c=X(r,"children",7),l=pf(r,ox);var v={get ref(){return a()},set ref(f=null){a(f),Z()},get class(){return i()},set class(f){i(f),Z()},get children(){return c()},set children(f){c(f),Z()},$set:vn,$on:(f,P)=>hn(r,f,P)},g=ix();ff(g,f=>({"data-slot":"card-header",class:f,...l}),[()=>zd("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-x-4 gap-y-1.5 pt-4 pb-2 has-data-[slot=card-action]:grid-cols-[minmax(0,1fr)_auto]",mk,i())]);var _=I(g);return Mi(_,()=>c()??fs),b(g),_r(g,f=>a(f),()=>a()),p(n,g),_n(v)}var lx=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),cx=E("<div><!></div>");function cv(n,r){if(new.target)return fn({component:cv,...n});mn(r,!0);let a=X(r,"ref",15,null),i=X(r,"class",7),c=X(r,"children",7),l=pf(r,lx);var v={get ref(){return a()},set ref(f=null){a(f),Z()},get class(){return i()},set class(f){i(f),Z()},get children(){return c()},set children(f){c(f),Z()},$set:vn,$on:(f,P)=>hn(r,f,P)},g=cx();ff(g,f=>({"data-slot":"card-title",class:f,...l}),[()=>zd("type-title min-w-0 break-words font-semibold leading-tight text-foreground",i())]);var _=I(g);return Mi(_,()=>c()??fs),b(g),_r(g,f=>a(f),()=>a()),p(n,g),_n(v)}const Cl=xS.CHAT_MEDIA,bd=TS().min(1).max(512);Zs({workspaceId:bd,agentId:bd,draftId:Wl(),principalId:bd,media:MS(yS).min(1).max(20)}).strict();const dx=Zs({sessionId:Wl()}).strict();dx.extend({control:ES("action",[Zs({action:yi("readiness")}).strict(),Zs({action:yi("export"),request:RS}).strict(),Zs({action:yi("transcribe"),request:AS}).strict(),Zs({action:yi("release"),jobId:Wl()}).strict(),Zs({action:yi("adopt"),jobId:Wl()}).strict()])}).strict();function Zd(n,r,a,i=async(c,l)=>typeof window>"u"||CS(window)!=="electron"?{ok:!1,error:"unavailable"}:PS().invoke(c,l)){let c=null,l=null,v=!1;async function g(){v=!0,a.removeEventListener("abort",_);const k=c;c=null,k&&await i(Cl.CLOSE,{sessionId:k}).catch(()=>{})}const _=()=>{g()};a.addEventListener("abort",_,{once:!0});const f=()=>{if(v||a.aborted||!r())throw new Error("media-send-retired")};async function P(){if(f(),c)return c;if(l)return l;l=(async()=>{const k=await i(Cl.BEGIN,n);if(!k.ok)throw new Error("media-export-unavailable");c=k.value.sessionId;try{return f(),c}catch(W){throw await g(),W}})();try{return await l}finally{l=null}}async function S(k){const W=await P();f();const O=await i(Cl.CONTROL,{sessionId:W,control:k});return f(),O}return{service:{exportMedia:k=>S({action:"export",request:k}),adoptMediaJob:k=>S({action:"adopt",jobId:k}),transcribeMedia:k=>S({action:"transcribe",request:k}),releaseMediaJob:async k=>c?await i(Cl.CONTROL,{sessionId:c,control:{action:"release",jobId:k}}):{ok:!0,value:void 0}},dispose:g,readiness:()=>S({action:"readiness"})}}const yd=new Set;async function ux(n){const{drafts:r,signal:a}=n,i=structuredClone(n.capture),c=structuredClone(n.items),l=structuredClone(n.payload),{workspaceId:v,agentId:g}=i,_=Ri(F.state),f=Bl.select(F.state,v),P=$f.select(F.state),S=wf(),q=JSON.stringify([_,v,g]);if(!_||!f||!P||l.wsId!==v||yd.has(q))return!1;yd.add(q);const k=new AbortController,W=()=>k.abort();a.addEventListener("abort",W,{once:!0});const O=()=>!a.aborted&&!k.signal.aborted&&Ri(F.state)===_&&Bl.select(F.state,v)===f&&bf(S)&&r.isCurrentDraft(i),T=F.getReadableState().subscribe(()=>{O()||k.abort()});let D=null;try{if(!O()||uS(c))return!1;const K=Mf(i.attachments),se=Lf(IS(v,g),K,c.map(fe=>({contextItemId:fe.id,attachmentId:fe.attachmentId,path:fe.path}))),C=new Set([...se.images,...se.clips].map(fe=>fe.contextItemId));if(K.some(([fe])=>!C.has(fe))||se.images.some(fe=>fe.mediaError)||se.clips.some(fe=>fe.mediaError)||!SS(l.text,se))throw new Error("invalid-evidence");if(D=n.warm?.take(i,k.signal)??null,!await r.flushDraft(i)||!O())return!1;const x=await zy.agents.get(g,v);if(!O())return!1;if(!x||x.workspaceId!==v||x.retiredAt||x.pendingDeleteAt||x.status==="deleted")throw new Error("unavailable");const Q=se.clips.flatMap(fe=>fe.media?[fe.media]:[]);Q.length&&!D&&(D=Zd({workspaceId:v,agentId:g,draftId:crypto.randomUUID(),principalId:P.principal.id,media:Q},O,k.signal));const pe=dy(c,se),Te=Rd(pe),he=await uy({workspaceId:v,agentId:g,evidence:se,clickedItems:c,sendItems:pe,clickedPayload:{...l,contextItems:pe,imageBlocks:Te.imageBlocks,fileBlocks:Te.fileBlocks},binding:S,service:D?.service??null,current:O,onRecord:()=>{}});return!he||!O()?!1:Ll(F,g,he)}catch{return O()&&F.dispatch(uw(g,u.dock_conversation_sendFailed_error())),!1}finally{T(),a.removeEventListener("abort",W),await D?.dispose(),yd.delete(q)}}const dv=1e4,Gp={wasBusy:!1,busySince:null,preempted:!1,prediction:null};function Vp(n){return qS(n.messageMetadata)}function gx(n,r){if(n.some(Vp)){const a=n[0];return a&&!Vp(a)&&Kp(a,r)?[a.id]:[]}return n.filter(a=>Kp(a,r)).map(a=>a.id)}function px(n){let r=null;for(const a of n)(a.status==="preparing"||a.status==="sending")&&a.createdAt>(r??-1/0)&&(r=a.createdAt);return r}function Kp(n,r){return!n.requeuedAfterFailure&&LS(n,r)}function fx(n,r){const{busy:a,queue:i,delivered:c,now:l}=r,v=r.blocked||r.interrupted,g=r.timeoutMs??dv;let _=n.prediction;if(_){const k=new Set(i.map(D=>D.id)),W=_.ids.filter(D=>k.has(D)&&!c.has(D)),O=l-_.startedAt>=g,T=n.wasBusy&&!a;!W.length||O||v&&!a||T?_=null:W.length!==_.ids.length&&(_={..._,ids:W})}const f=n.wasBusy&&!a,P=n.wasBusy?n.busySince:a?l:null,S=n.wasBusy&&n.preempted||P!==null&&r.directSendAt!==null&&r.directSendAt>P;if(!_&&f&&!v&&!S){const k=gx(i,l).filter(W=>!c.has(W));k.length&&(_={ids:k,startedAt:l})}const q={wasBusy:a,busySince:a?P:null,preempted:a&&S,prediction:_};return n.wasBusy===q.wasBusy&&n.busySince===q.busySince&&n.preempted===q.preempted&&n.prediction===q.prediction?n:q}class vx{constructor(){Js(this,"previousWorkspaceId",null);Js(this,"_isRebinding",!1);Js(this,"_generation",0);Js(this,"_rebindPromise",null);Js(this,"_rebindResolve",null)}recordMount(r){return this.previousWorkspaceId=r,r}wasWorkspaceChangedDuringMount(r){return this.previousWorkspaceId!==r}shouldRebind(r){return!r||this.previousWorkspaceId===null?!1:r!==this.previousWorkspaceId}recordRebind(r){this.previousWorkspaceId=r}hasWorkspaceChanged(r){return r!==this.previousWorkspaceId}get trackedWorkspaceId(){return this.previousWorkspaceId}get isRebinding(){return this._isRebinding}startRebind(){return this._generation++,this._isRebinding=!0,this._rebindResolve?.(),this._rebindPromise=new Promise(r=>{this._rebindResolve=r}),this._generation}endRebind(r){r!==void 0&&r!==this._generation||(this._isRebinding=!1,this._rebindResolve?.(),this._rebindPromise=null,this._rebindResolve=null)}async waitForRebind(r=5e3){if(!this._isRebinding||!this._rebindPromise)return!1;const a=Date.now()+r;for(;this._isRebinding&&this._rebindPromise;){const i=a-Date.now();if(i<=0)return!1;let c;const l=await Promise.race([this._rebindPromise.then(()=>!1),new Promise(v=>{c=setTimeout(()=>v(!0),i)})]);if(clearTimeout(c),l)return!1}return!0}}function hx(n,r){return!(n?.tabType!=="agent"||n.agentId!==r.agentId||!r.isActive||n.workspaceId&&n.workspaceId!==r.workspaceId||r.panelId&&(n.source!=="dictation"&&!r.isPanelFocused||n.panelId&&n.panelId!==r.panelId))}function Qp(n){const r=typeof n=="string"?n:n&&typeof n=="object"&&typeof n.script=="string"?n.script:void 0;return r||void 0}var mx=E('<div role="status" aria-live="polite" data-presence-typing-indicator=""><span class="inline-flex min-w-[var(--operational-leading-slot-size)] shrink-0 items-center justify-center svelte-lm4khl"><!></span> <span class="min-w-0 truncate svelte-lm4khl"> </span> <span class="inline-flex shrink-0 items-center gap-0.5 svelte-lm4khl" aria-hidden="true"><span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.2s"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.4s"></span></span></div>');function uv(n,r){if(new.target)return fn({component:uv,...n});mn(r,!0);const a=()=>ge(P,"$typing$",i),[i,c]=Nr();let l=X(r,"workspaceId",7),v=X(r,"agentId",7),g=X(r,"class",7,"");const _=Bn(""),f=Bn("");ae(()=>{_.set(l())}),ae(()=>{f.set(v())});const P=gS(_,f),S=o(()=>w$(a()));var q={get workspaceId(){return l()},set workspaceId(D){l(D),Z()},get agentId(){return v()},set agentId(D){v(D),Z()},get class(){return g()},set class(D=""){g(D),Z()},$set:vn,$on:(D,K)=>hn(r,D,K)},k=Wt(),W=ye(k);{var O=D=>{var K=mx(),se=I(K),C=I(se);_$(C,{get people(){return a()},size:12,decorative:!0}),b(se);var x=m(se,2),Q=de(x,!0);pn(2),b(K),L(()=>{xe(K,1,`${Wf} flex h-4 min-w-0 items-center gap-[var(--operational-leading-gap)] px-[var(--operational-row-inline-padding)] font-family-child font-normal text-muted-foreground text-[11px] leading-4 ${g()??""} /* a11y-ignore: user-requested compact typing status in the composer gap */`,"svelte-lm4khl"),j(Q,e(S))}),p(D,K)};B(W,D=>{e(S)&&D(O)})}p(n,k);var T=_n(q);return c(),T}const _x=50,wx=5e3,bx=500,yx=()=>({authority:()=>Ri(F.state),persistSnapshot:py,dispatch:n=>F.dispatch(n),ownerView:n=>fy.withStore(F)(n)});function Ix(n){const r=n.store??yx(),a=crypto.randomUUID();let i=_e(!1),c=_e(!1),l=_e(!1),v=null,g=null,_=0,f=!1,P=null,S=null,q=null,k=0,W=null,O=null;const T={};let D,K=_e([]),se=null,C=0,x="",Q=0,pe="";const Te=()=>{const N=n.workspaceId(),R=n.agentId();if(!N||!R||!(n.active?.()??!0))return null;const re=r.authority?.();if(!re||f)return null;const qe=n.inputValue(),H=fe(),Y=D?.shared,J=Y?.workspaceId===N&&Y.agentId===R?Y.lifetime:null,Se=JSON.stringify([re,N,R,k,J,H.map(z=>[z.id,z.attachmentId,z.path])]);Se!==pe&&(pe=Se,Q+=1);const He=JSON.stringify([re,N,R,qe,H,k]);return He!==x&&(x=He,C+=1),{authority:re,ownerId:a,workspaceId:N,agentId:R,text:qe,attachments:JSON.parse(JSON.stringify(H)),generation:C,attachmentEpoch:Q}};let he=null;const fe=()=>eS(n.contextItems(),tS(n.contextItems(),e(K))),Le=N=>{if(D=N,!N||f)return;const R=N.restore;if(O&&R?.requestId===O.requestId&&R.status!=="pending"){const{apply:H}=O;O=null,w(c,!1),R.status==="restored"&&w(K,R.draft?.attachments??[]),H(R)}const re=N.shared;if(re&&!e(c)&&g===`${re.workspaceId}\0${re.agentId}`){const H=JSON.stringify([re.provenance,re.workspaceId,re.agentId,re.lifetime,re.revision]);if(se!==H){se=H;const Y=he??v,J=Y&&n.inputValue()===Y.text&&JSON.stringify(fe())===Y.attachmentsJson;re.origin===a?he={text:re.snapshot.text,attachmentsJson:JSON.stringify(re.snapshot.attachments)}:J&&(_+=1,q&&clearTimeout(q),w(K,re.snapshot.attachments),he=v={text:re.snapshot.text,attachmentsJson:JSON.stringify(e(K))},n.setInputValue(re.snapshot.text),n.setContextItems(Sl(e(K))),n.applyEditorContent(re.snapshot.text))}}ot(Te);const qe=[];for(const H of N.saves){if(H.status==="pending")continue;qe.push(H.id);const Y=T[H.id];delete T[H.id],Y?.(H)}qe.length>0&&queueMicrotask(()=>r.dispatch(vw(a,qe)))},ue=(N,R,re)=>{const qe=crypto.randomUUID();O={requestId:qe,apply:re},w(c,!0),r.dispatch(mw(a,qe,N,R))},oe=()=>{O&&(O=null,w(c,!1),r.dispatch(ww(a)))},Me=()=>{const N=W;N&&(W=null,r.dispatch(_w(a)),D?.saves.some(R=>R.id===N)||delete T[N])};r.dispatch(gw(a));const ie=r.ownerView(a).subscribe(N=>ot(()=>Le(N))),ee=()=>{S&&(clearTimeout(S),S=null),w(l,!1)},Ae=()=>{W&&(W=null,r.dispatch(hw(a)))};ae(()=>{const N=n.active?.()??!0,R=n.workspaceId(),re=n.agentId();if(!N){ot(()=>{_+=1,g=null,oe(),P&&clearTimeout(P),P=null,ee(),q&&clearTimeout(q),q=null,w(i,!1),Ae()});return}if(!R||!re)return;const qe=`${R}\0${re}`;if(g===qe)return;const H=g!==null;g=qe;const Y=++_;ot(()=>{v=null,he=null,se=null,w(K,[]),P&&clearTimeout(P),ee(),q&&(clearTimeout(q),q=null),H&&(Ae(),n.setInputValue(""),n.contextItemsAreScoped||n.setContextItems([]),n.applyEditorContent(""));const J=gy(R,re);if(J){w(K,J.attachments),w(i,!1);const He=n.contextItems().length>0,z=J.text,Ie=JSON.stringify(J.attachments);n.setInputValue(J.text),He||n.setContextItems(Sl(J.attachments)),n.applyEditorContent(J.text),v={text:J.text,attachmentsJson:Ie},ue(R,re,Ce=>{if(Ce.status!=="restored")return;const De=Ce.draft;if(f||!(n.active?.()??!0)||g!==qe||_!==Y)return;const at=De?.text??"",lt=De?.attachments??[],Oe=JSON.stringify(lt);cd(R,re,{text:at,attachments:lt});const $e=n.inputValue()===z&&JSON.stringify(fe())===Ie;He||!$e||(at!==z&&(n.setInputValue(at),n.applyEditorContent(at)),Oe!==Ie&&n.setContextItems(Sl(lt)),v={text:at,attachmentsJson:Oe})});return}w(i,!0),S=setTimeout(()=>{S=null,(n.active?.()??!0)&&w(l,!0)},bx),P=setTimeout(()=>{(n.active?.()??!0)&&(w(i,!1),ee())},wx);const Se=()=>{!(n.active?.()??!0)||g!==qe||_!==Y||(P&&clearTimeout(P),w(i,!1),ee())};ue(R,re,He=>{if(He.status!=="restored"){Se();return}const z=He.draft;if(f||!(n.active?.()??!0)||g!==qe||_!==Y)return;const Ie=!!n.inputValue();if(!Ie&&z?.attachments?.length&&n.contextItems().length===0&&n.setContextItems(Sl(z.attachments)),!Ie&&z?.text&&(n.setInputValue(z.text),q=setTimeout(()=>{(n.active?.()??!0)&&n.inputValue()===z.text&&n.applyEditorContent(z.text)},_x)),v===null){const Ce=z?.text??"",De=z?.attachments??[];v={text:Ce,attachmentsJson:JSON.stringify(De)},cd(R,re,{text:Ce,attachments:De})}Se()})})}),ae(()=>{const N=n.active?.()??!0,R=n.workspaceId(),re=n.agentId(),qe=e(i);if(!N){ot(Me);return}if(!R||!re)return;const H=n.inputValue(),Y=fe();if(ot(Te),ot(Me),qe||v===null&&!H&&Y.length===0)return;const J=JSON.stringify(Y);if(v!==null&&v.text===H&&v.attachmentsJson===J)return;JSON.stringify(e(K))!==J&&w(K,Y);const Se=`${R}\0${re}`,He=k,z=crypto.randomUUID();T[z]=Ie=>{if(n.active?.()??!0){if(Ie.status==="saved"){g===Se&&k===He&&(v={text:H,attachmentsJson:J});return}n.onSaveError?.(new Error(Ie.error))}},ot(()=>{W=z,r.dispatch(pw(a,z,{authority:r.authority?.()??void 0,workspaceId:R,agentId:re,text:H,attachments:Y,rollback:v?{text:v.text,attachments:JSON.parse(v.attachmentsJson)}:null}))})}),ae(()=>()=>{f=!0,P&&clearTimeout(P),S&&clearTimeout(S),q&&clearTimeout(q),Ae(),ie(),r.dispatch(fw(a))});const Ee=N=>{const R=Te();return R!==null&&R.authority===N.authority&&R.ownerId===N.ownerId&&R.workspaceId===N.workspaceId&&R.agentId===N.agentId&&R.generation===N.generation&&R.text===N.text&&JSON.stringify(R.attachments)===JSON.stringify(N.attachments)};return{captureDraft:Te,isCurrentDraft:Ee,updateAttachmentScreen(N,R,re){return!Ee(N)||!N.attachments.some(qe=>qe.id===R)?null:(w(K,N.attachments.map(qe=>qe.id===R?{...qe,screen:structuredClone(re)}:qe)),Te())},async flushDraft(N){if(!Ee(N))return!1;if(!r.persistSnapshot)throw new Error("draft-shared-transport-unavailable");return await r.persistSnapshot(a,N.workspaceId,N.agentId,N,N.authority),Ee(N)},get restorePending(){return e(c)},get gateActive(){return e(i)},get gateVisible(){return e(l)},invalidatePendingRestore(){if(_+=1,k+=1,oe(),P&&(clearTimeout(P),P=null),q&&(clearTimeout(q),q=null),w(i,!1),ee(),Me(),g!==null){const[N,R]=g.split("\0");cd(N,R,{text:"",attachments:[]}),he=null,w(K,[]),v={text:"",attachmentsJson:"[]"}}}}}function qi(n){if(!n)return null;const r=Lf(JSON.stringify([n.workspaceId,n.agentId]),Mf(n.attachments),n.attachments.map(a=>({contextItemId:a.id,attachmentId:a.attachmentId,path:a.path})));return{...r,clips:r.clips.filter(a=>{const i=n.attachments.find(c=>c.id===a.contextItemId);return!!a.media&&!a.mediaError&&!!i&&a.path===i.path})}}async function Sx(n,r,a){const i=F.state.principal.snapshot,c=()=>Ri(F.state)===n.authority&&a.isCurrentDraft(n);if(!i||!c()||!await a.flushDraft(n)||!c())return{ready:!1};const l=new AbortController,v=Zd({workspaceId:n.workspaceId,agentId:n.agentId,principalId:i.principal.id,draftId:crypto.randomUUID(),media:[r]},c,l.signal);try{const g=await v.readiness();return!c()||!g.ok?{ready:!1}:g.value.find(_=>_.sourceId===r.source.id)??{ready:!1}}finally{await v.dispose()}}function Jp(n){let r=_e(null),a=_e(!1),i=_e(!1),c=null,l=!0,v=0,g=null;qs(()=>{l=!1,v++}),ae(()=>{const S=n.capture();e(r)&&(!S||S.authority!==e(r).capture.authority||S.ownerId!==e(r).capture.ownerId||S.workspaceId!==e(r).capture.workspaceId||S.agentId!==e(r).capture.agentId||S.attachmentEpoch!==e(r).capture.attachmentEpoch)&&w(r,null)});async function _(S){if(n.disabled()||e(a))return;const q=n.drafts.captureDraft(),k=qi(q),W=k?.clips.find(K=>K.contextItemId===S);if(!q||!W?.media||!k)return;const O=vy({workspaceId:q.workspaceId,agentId:q.agentId,clip:W,evidence:k,marks:k.marks}),T=yf(q.workspaceId,W.path);if(!O||!T)return;const D=++v;c=document.activeElement instanceof HTMLElement?document.activeElement:null,w(a,!0),w(i,!1);try{if(await n.beforeOpen?.(),!l||v!==D||!n.drafts.isCurrentDraft(q))return;const K=await(n.prepareOutput??Sx)(q,W.media,n.drafts);if(!l||v!==D||!n.drafts.isCurrentDraft(q))return;const{attachmentPath:se,...C}=O;w(r,{capture:q,contextItemId:S,snapshot:{...C,openId:crypto.randomUUID(),mediaUrl:T,output:K,deleteReady:!0}})}catch{l&&v===D&&w(i,!0)}finally{l&&v===D&&w(a,!1)}}async function f(S){const q=crypto.randomUUID(),k=e(r),W=n.drafts.captureDraft();if(!k||!W||W.authority!==k.capture.authority||W.ownerId!==k.capture.ownerId||W.workspaceId!==k.capture.workspaceId||W.agentId!==k.capture.agentId||W.attachmentEpoch!==k.capture.attachmentEpoch)return{requestId:q,result:"stale-source"};const O=qi(W),T=O?.clips.find(Q=>Q.contextItemId===k.contextItemId);if(!O||!T?.media)return{requestId:q,result:"stale-source"};const K=g?.openId===k.snapshot.openId&&g.inputRevision===S.revision&&JSON.stringify(g.media)===JSON.stringify(T.media)?{...S,revision:T.media.saved?.revision??0}:S,se=$S(T.media,{openId:k.snapshot.openId,...k.snapshot.output?.version===2?{outputVersion:2}:{},pair:{workspaceId:W.workspaceId,agentId:W.agentId},sourceId:S.sourceId,sourceRevision:S.sourceRevision,expectedEditRevision:K.revision,edit:K});if(se.status!=="saved")return{requestId:q,result:se.status==="invalid-edit"?"failed":se.status};const C=kS({...O,clips:O.clips.map(Q=>Q.id===T.id?{...Q,media:se.media}:Q)})[k.contextItemId],x=n.drafts.updateAttachmentScreen(W,k.contextItemId,C);if(!x)return{requestId:q,result:"stale-source"};g={openId:k.snapshot.openId,media:se.media,inputRevision:S.revision};try{if(!n.drafts.isCurrentDraft(x))return{requestId:q,result:"stale-source"};await n.drafts.flushDraft(x);const Q=n.drafts.captureDraft();return!l||e(r)?.snapshot.openId!==k.snapshot.openId||!Q||Q.attachmentEpoch!==k.capture.attachmentEpoch||Q.authority!==x.authority||Q.ownerId!==x.ownerId||Q.workspaceId!==x.workspaceId||Q.agentId!==x.agentId||JSON.stringify(Q.attachments.find(pe=>pe.id===k.contextItemId)?.screen)!==JSON.stringify(C)?{requestId:q,result:"stale-source"}:(g=null,{requestId:q,result:"saved",saved:se.media.saved??void 0})}catch{return{requestId:q,result:"failed"}}}function P(S){return n.disabled()||!n.onRemove(S)?!1:(e(r)?.contextItemId===S&&w(r,null),!0)}return{get session(){return e(r)},get opening(){return e(a)},get problem(){return e(i)},open:_,save:f,remove:P,close(){w(r,null)},restoreFocus(){c?.isConnected&&c.focus()}}}var $x=E('<p role="alert"> </p>'),kx=E('<div class="recording-editor-surface svelte-cdb16"><!></div>'),xx=E("<!> <!> <!>",1);function gv(n,r){if(new.target)return fn({component:gv,...n});mn(r,!0);let a=X(r,"capture",7),i=X(r,"drafts",7),c=X(r,"disabled",7,!1),l=X(r,"onRemove",7),v=X(r,"controllerFactory",7,Jp),g=X(r,"beforeOpen",7),_=X(r,"onReviewChange",7);const f=ot(()=>v()({drafts:i(),capture:()=>a(),disabled:()=>c(),onRemove:C=>l()(C),beforeOpen:()=>g()?.()??Promise.resolve()}));ae(()=>{const C=f.opening,x=f.session;ot(()=>_()?.(C,x?.snapshot.output?.ready?{openId:x.snapshot.openId,capture:x.capture}:null))});const P=o(hy),S=o(()=>qi(a())),q=o(()=>e(S)?.clips.map(C=>({id:C.contextItemId,kind:"clip",owner:"evidence",duration:Ep(C.durationMs),recording:!1,url:a()?yf(a().workspaceId,C.path):void 0,...C.media?.saved?{summary:my(C.media.saved)}:{}}))??[]);let k=_e(null);var W={get capture(){return a()},set capture(C){a(C),Z()},get drafts(){return i()},set drafts(C){i(C),Z()},get disabled(){return c()},set disabled(C=!1){c(C),Z()},get onRemove(){return l()},set onRemove(C){l(C),Z()},get controllerFactory(){return v()},set controllerFactory(C=Jp){v(C),Z()},get beforeOpen(){return g()},set beforeOpen(C){g(C),Z()},get onReviewChange(){return _()},set onReviewChange(C){_(C),Z()},$set:vn,$on:(C,x)=>hn(r,C,x)},O=xx(),T=ye(O);{let C=o(()=>c()||f.opening);HS(T,{get items(){return e(q)},get labels(){return e(P)},get disabled(){return e(C)},onEdit:x=>void f.open(x),onMarkUp:x=>void f.open(x),get onRemove(){return f.remove}})}var D=m(T,2);{var K=C=>{var x=$x(),Q=de(x,!0);L(pe=>j(Q,pe),[()=>u.dock_captureEditor_saveFailed_label()]),p(C,x)};B(D,C=>{f.problem&&C(K)})}var se=m(D,2);{let C=o(()=>!!f.session),x=o(()=>u.dock_captureEditor_recording_title({duration:f.session?Ep(f.session.snapshot.durationMs??0):""}));A$(se,{get open(){return e(C)},size:"editor",showCloseButton:!1,get title(){return e(x)},escapeKeydownBehavior:"ignore",dismissOnInteractOutside:!1,onClose:()=>f.close(),onCloseAutoFocus:Q=>{Q.preventDefault(),f.restoreFocus()},get contentRef(){return e(k)},set contentRef(Q){w(k,Q,!0)},children:(Q,pe)=>{var Te=Wt(),he=ye(Te);{var fe=Le=>{var ue=Wt(),oe=ye(ue);Ci(oe,()=>f.session.snapshot.openId,Me=>{var ie=kx(),ee=I(ie);M$(ee,{get snapshot(){return f.session.snapshot},get shortcutDialog(){return e(k)},onClose:()=>f.close(),get onSave(){return f.save},onDelete:async()=>!!f.session&&f.remove(f.session.contextItemId)}),b(ie),p(Me,ie)}),p(Le,ue)};B(he,Le=>{f.session&&Le(fe)})}p(Q,Te)},$$slots:{default:!0}})}return p(n,O),_n(W)}const Pl=n=>JSON.stringify([n.authority,n.ownerId,n.workspaceId,n.agentId,n.attachmentEpoch,n.attachments]);function Cx(n){let r=_e(!1),a=_e(!1),i=_e(null),c=!1,l=0,v=null,g=null;async function _(S){S.abort.abort(),S.slot?.cancel(),await S.native?.dispose()}async function f(){l++;const S=g;g=null,S&&await _(S)}ro(()=>{const S=()=>{w(r,document.hasFocus(),!0)};return S(),window.addEventListener("focus",S),window.addEventListener("blur",S),()=>{window.removeEventListener("focus",S),window.removeEventListener("blur",S)}});const P=F.getReadableState().subscribe(()=>{g&&!g.current()&&f()});return qs(()=>{c=!0,P(),f()}),ae(()=>{const S=n.capture(),q=S?Pl(S):"",k=e(r)&&!e(a)&&(n.active()||e(i)?.key===q);ot(()=>{if(!k||!S){f();return}if(g?.key===q)return;if(v===q){f();return}f();const O=qi(S)?.clips.flatMap(Te=>!Te.mediaError&&Te.media?[Te.media]:[])??[],T=O[0],D=F.state.principal.snapshot,K=Bl.select(F.state,S.workspaceId);if(!T||!D||!K||n.drafts.gateActive)return;const se=wf(),C=new AbortController,x=()=>!c&&!C.signal.aborted&&Ri(F.state)===S.authority&&Bl.select(F.state,S.workspaceId)===K&&bf(se)&&!!n.capture()&&Pl(n.capture())===q,Q={key:q,capture:S,abort:C,native:null,slot:null,current:x};g=Q;const pe=l;n.drafts.flushDraft(S).then(async Te=>{if(!(g!==Q||pe!==l||!x())){if(!Te){v=q,await f();return}Q.native=Zd({workspaceId:S.workspaceId,agentId:S.agentId,draftId:crypto.randomUUID(),principalId:D.principal.id,media:structuredClone(O)},x,C.signal),Q.slot=_y(Q.native.service),v=q,Q.slot.warm(q,T,x)}}).catch(()=>{g===Q&&f()})})}),{cancel:f,async beforeEditorOpen(){w(a,!0),v=null,await f()},editorState(S,q){w(a,S,!0);const k=q?Pl(q.capture):null;q&&e(i)?.openId!==q.openId&&(v=null),w(i,q&&k?{openId:q.openId,key:k}:null)},take(S,q){const k=g;if(!k?.native||!k.slot||k.key!==Pl(S)||!k.current())return f(),null;g=null,l++;const W=k.native,O=k.slot,T=()=>k.abort.abort();return q.addEventListener("abort",T,{once:!0}),q.aborted&&T(),{service:{...W.service,takePreparedRecording:D=>O.take(k.key,D,()=>!q.aborted&&k.current())},async dispose(){q.removeEventListener("abort",T),await _(k)}}}}}var Px=E('<div role="status" class="px-3 py-1.5 text-xs text-muted-foreground" data-testid="chat-draft-loading-gate"><span> </span></div>');function pv(n,r){if(new.target)return fn({component:pv,...n});mn(r,!1);var a={$set:vn,$on:(v,g)=>hn(r,v,g)};Uf();var i=Px(),c=I(i),l=de(c,!0);return b(i),L(v=>j(l,v),[()=>u.chat_draftGate_loading_label()]),p(n,i),_n(a)}var Rx=E('<div data-new-messages-divider="" class="type-caption font-family-child my-6 flex items-center gap-2 px-2" role="separator"><div class="h-px flex-1 bg-border"></div> <span class="whitespace-nowrap px-1 font-medium text-foreground"> </span> <div class="h-px flex-1 bg-border"></div></div>');function Hd(n,r){if(new.target)return fn({component:Hd,...n});mn(r,!1);var a={$set:vn,$on:(v,g)=>hn(r,v,g)};Uf();var i=Rx(),c=m(I(i),2),l=de(c,!0);return pn(2),b(i),L((v,g)=>{Ue(i,"aria-label",v),j(l,g)},[()=>u.chat_newMessagesDivider_label(),()=>u.chat_newMessagesDivider_label()]),p(n,i),_n(a)}function Ax(n,r){if(!r||n.length===0)return null;const a=n.indexOf(r);return a===-1||a===n.length-1?null:r}function Tx(n,r,a){if(!r||n.length===0)return"none";const i=n.indexOf(r);return i===n.length-1?"none":i!==-1?"marker-loaded":a.complete?a.truncated?"marker-beyond-window":"none":"marker-pending"}function Mx(n,r){return r&&n.includes(r)?r:null}function Yp(n,r,a){return r-n<=a}const Ex=.2;function Xp(n,r,a){const i=Math.max(0,a-r),c=n-Ex*r;return Math.min(Math.max(0,c),i)}function qx(n,r,a){return n!==null&&a&&n===r}function Lx(n){return n?bw(n)&&yw(n)!==null&&typeof n.metadata?.taskNoteId=="string":!1}function Hx(n){const r=[],a=new Set;let i,c;for(const D of n.messages){if(D.agentId&&D.agentId!==n.agentId){i=void 0,c=void 0;continue}if(a.has(D.id))continue;a.add(D.id),n.breakBeforeMessageIds?.has(D.id)&&(i=void 0,c=void 0);const K=OS(D);if(K?.kind!=="turn-failure")c=void 0;else{const se=i?.seq!==void 0&&D.seq!==void 0&&Number.isSafeInteger(i.seq)&&Number.isSafeInteger(D.seq)&&D.seq===i.seq+1;(!c||!se)&&(c={key:JSON.stringify([n.agentId,"notice",D.id]),anchorMessageId:D.id,correlation:"unavailable",records:[],recordedFailureCount:0},r.push(c)),c.records.push({messageId:D.id,reason:K.reason,timestamp:D.timestamp}),c.recordedFailureCount+=1}i=D}const l=new Map;for(const D of n.queue){if(!D.requeuedAfterFailure)continue;const K=D.turnId||void 0,se=JSON.stringify([n.agentId,K?"turn":"queue",K??D.id]);let C=l.get(se);C||(C={key:se,correlation:K?"turn":"queue-entry",turnId:K,queueIds:[],state:"queued"},l.set(se,C)),C.queueIds.includes(D.id)||C.queueIds.push(D.id)}const v=[...l.values()],g=n.session?.id===n.agentId?n.session:void 0,_=g?.status===ki.Error,f=n.transientError||_&&g.stopReason||null,P=_&&!f,S=_&&(!n.transientError||n.transientError===g.stopReason)?g.stopReasonTimestamp:void 0,q=S?Sp(S):null,k=q&&f&&f===g?.stopReason?r.flatMap(D=>D.records).filter(D=>D.reason===f&&Sp(D.timestamp)===q):[],W=k.length===1?k[0].messageId:void 0,T=(g?kf(g):!1)?"attempting":v.length?"queued":f||P?"action-needed":"inactive";return{history:r,queueRecovery:v,current:{state:T,error:f,needsFallbackReason:P,timestamp:S,noticeId:W}}}function Ox(n,r){const a=n.hiddenTail[0]?.id,i=Hx({...r,messages:[...n.groups.flatMap(g=>g.messages),...n.hiddenTail],breakBeforeMessageIds:new Set(a?[a]:[])}),c=i.current.noticeId,l=i.history.map(g=>({...g,records:g.records.filter(_=>_.messageId!==c)})).filter(g=>g.records.length>0),v=new Set(l.map(g=>g.records[0].messageId));return{...i,runsByAnchor:new Map(l.map(g=>[g.records[0].messageId,g])),collapsedMessageIds:new Set(i.history.flatMap(g=>g.records.map(_=>_.messageId).filter(_=>!v.has(_))))}}var Dx=E('<div class="flex size-10 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <div class="min-w-0 flex-1"><div class="type-body truncate font-medium text-foreground"> </div> <div class="type-caption mt-0.5 line-clamp-2 text-muted-foreground"> </div></div> <div class="flex size-7 shrink-0 items-center justify-center rounded-md bg-muted/50 text-muted-foreground transition-colors group-hover:bg-muted"><!></div>',1),Fx=E('<div class="flex size-9 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <span class="type-body font-medium"> </span>',1),Nx=E('<div><div class="border-b border-border bg-muted/20 px-4 py-3"><p class="type-body font-medium text-foreground"> </p> <p class="type-caption mt-0.5 text-muted-foreground"> </p></div> <div class="max-h-[21rem] overflow-y-auto p-2"><!></div> <div class="border-t border-border bg-popover p-2"><!></div></div>'),Bx=E('<div class="mb-5"><!></div>'),Wx=E('<p data-testid="agent-welcome-description"> </p> <!>',1),Ux=E("<!> <!>",1),zx=E('<p class="mb-3 px-4 text-sm text-subtle leading-relaxed whitespace-pre-wrap" data-testid="agent-welcome-description"> </p>'),jx=E("<!> <span> </span>",1),Gx=E('<div class="mx-auto flex w-full max-w-[40rem] flex-1 flex-col px-4 pb-6 pt-4 text-subtle"><!> <!> <!></div>');function fv(n,r){if(new.target)return fn({component:fv,...n});mn(r,!0);const a=()=>ge(k,"$userOverrides$",v),i=()=>ge(q,"$specialists$",v),c=()=>ge(D,"$isGitHubAuth$",v),l=()=>ge(K,"$recentSpecialistIds$",v),[v,g]=Nr();let _=X(r,"onSpecialistChange",7),f=X(r,"session",7),P=X(r,"workspaceId",7);const S=Bn(P()??"");ae(()=>S.set(P()??""));const q=Qf(S),k=ek();ae(()=>{a()});const W=o(()=>{if(!f()||Zy(f()))return null;const N=f().metadata?.specialist||f().agentMetadata?.specialist;return N&&i().find(R=>R.id===N)||null});async function O(N){N?await Gl({specialist:N,hash:"specialists"}):await Gl({view:"create-specialist"})}let T=_e(!1);const D=tk(),K=pS(),se=o(()=>Iw(nk(i(),c()),l()));let C=_e(!1);const x=o(()=>u.chat_regularAgentWelcome_generalDescription_label()),Q=o(()=>e(W)?.name??u.chat_shared_general_fallback()),pe=o(()=>e(W)?.description??u.chat_shared_noSpecializedBehavior_label()),Te=o(()=>e(W)?e(W).defaultBehaviorPrompt||"":e(x));var he={get onSpecialistChange(){return _()},set onSpecialistChange(N){_(N),Z()},get session(){return f()},set session(N){f(N),Z()},get workspaceId(){return P()},set workspaceId(N){P(N),Z()},$set:vn,$on:(N,R)=>hn(r,N,R)},fe=Gx(),Le=I(fe);{var ue=N=>{var R=Bx(),re=I(R);fk(re,{class:"block w-full",align:"start",side:"bottom",contentClass:"w-[min(28rem,calc(100vw-2rem))]",get open(){return e(C)},set open(Y){w(C,Y,!0)},trigger:(Y,J)=>{let Se=()=>(J?.()).props;{let He=o(()=>zd("group flex h-auto min-h-(--control-height-medium) w-full cursor-pointer items-center gap-3 whitespace-normal rounded-lg border border-border bg-card px-4 py-3 text-left shadow-xs transition-colors","hover:border-input hover:bg-accent/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"));$t(Y,Li(Se,{type:"button",variant:"plain",wrapContent:!1,get class(){return e(He)},"data-testid":"specialist-picker-trigger",children:(z,Ie)=>{var Ce=Dx(),De=ye(Ce),at=I(De);{let ze=o(()=>e(W)?.id??null),Ze=o(()=>e(W)?.icon??null);pk(at,{agentId:"blank",variant:"emphasized",get specialist(){return e(ze)},get icon(){return e(Ze)}})}b(De);var lt=m(De,2),Oe=I(lt),$e=de(Oe,!0),V=m(Oe,2),ne=de(V,!0);b(lt);var Fe=m(lt,2),me=I(Fe);gt(me,{get icon(){return Na},size:10}),b(Fe),L(()=>{j($e,e(Q)),j(ne,e(pe))}),p(z,Ce)},$$slots:{default:!0}}))}},content:Y=>{var J=Nx(),Se=I(J),He=I(Se),z=de(He,!0),Ie=m(He,2),Ce=de(Ie,!0);b(Se);var De=m(Se,2),at=I(De);{let $e=o(()=>e(W)?.id??null);ew(at,{get specialists(){return e(se)},get value(){return e($e)},onchange:V=>{w(C,!1),_()?.(V)}})}b(De);var lt=m(De,2),Oe=I(lt);Tt(Oe,()=>Dr,($e,V)=>{V($e,{class:"flex h-auto w-full cursor-pointer items-center gap-3 whitespace-normal rounded-md px-3 py-2 text-left text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onSelect:()=>{w(C,!1),O()},children:(ne,Fe)=>{var me=Fx(),ze=ye(me),Ze=I(ze);gt(Ze,{get icon(){return O$},size:12}),b(ze);var ut=m(ze,2),mt=de(ut,!0);L(dt=>j(mt,dt),[()=>u.chat_regularAgentWelcome_createSpecialist_label()]),p(ne,me)},$$slots:{default:!0}})}),b(lt),b(J),L(($e,V)=>{j(z,$e),j(Ce,V)},[()=>u.workspace_createAgentSection_specialists_label(),()=>u.workspace_createAgentSection_specialists_description()]),p(Y,J)},$$slots:{trigger:!0,content:!0}}),b(R),p(N,R)};B(Le,N=>{_()&&N(ue)})}var oe=m(Le,2);{var Me=N=>{var R=Wt(),re=ye(R);{let qe=o(()=>u.chat_specialistSelector_prompt_label());Tt(re,()=>hk,(H,Y)=>{Y(H,{class:"mb-3",role:"region",get"aria-label"(){return e(qe)},children:(J,Se)=>{var He=Ux(),z=ye(He);Tt(z,()=>lv,(Ce,De)=>{De(Ce,{children:(at,lt)=>{var Oe=Wt(),$e=ye(Oe);Tt($e,()=>cv,(V,ne)=>{ne(V,{class:"type-caption font-medium",children:(Fe,me)=>{pn();var ze=dn();L(Ze=>j(ze,Ze),[()=>u.chat_specialistSelector_prompt_label()]),p(Fe,ze)},$$slots:{default:!0}})}),p(at,Oe)},$$slots:{default:!0}})});var Ie=m(z,2);Tt(Ie,()=>vk,(Ce,De)=>{De(Ce,{children:(at,lt)=>{var Oe=Wx(),$e=ye(Oe),V=de($e,!0),ne=m($e,2);$t(ne,{type:"button",variant:"link",get"aria-expanded"(){return e(T)},onclick:()=>w(T,!e(T)),class:"text-xs text-muted-foreground hover:text-foreground transition-colors mt-2 cursor-pointer",children:(Fe,me)=>{pn();var ze=dn();L(Ze=>j(ze,Ze),[()=>e(T)?u.chat_regularAgentWelcome_showLess_label():u.chat_regularAgentWelcome_showMore_label()]),p(Fe,ze)},$$slots:{default:!0}}),L(()=>{xe($e,1,`text-sm text-subtle leading-relaxed whitespace-pre-wrap break-words ${e(T)?"":"line-clamp-6"}`),j(V,e(Te))}),p(at,Oe)},$$slots:{default:!0}})}),p(J,He)},$$slots:{default:!0}})})}p(N,R)},ie=N=>{var R=zx(),re=de(R,!0);L(()=>j(re,e(Te))),p(N,R)};B(oe,N=>{e(W)?N(Me):N(ie,-1)})}var ee=m(oe,2);{var Ae=N=>{$t(N,{variant:"ghost-light",size:"sm",onclick:()=>O(e(W).id),class:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors cursor-pointer pl-1.5 mr-auto",children:(R,re)=>{var qe=jx(),H=ye(qe);gt(H,{get icon(){return H$},size:12,class:"opacity-60"});var Y=m(H,2),J=de(Y,!0);L(Se=>j(J,Se),[()=>u.chat_regularAgentWelcome_customize_label()]),p(R,qe)},$$slots:{default:!0}})};B(ee,N=>{e(W)&&N(Ae)})}b(fe),p(n,fe);var Ee=_n(he);return g(),Ee}var Vx=E('<a class="cursor-pointer underline underline-offset-2 hover:opacity-80" data-suggested-prompt-link=""> </a>'),Kx=E('<kbd data-suggested-prompt-hint=""> </kbd>'),Qx=E('<span class="type-caption"> </span>'),Jx=E('<div role="presentation" data-typography-role="body" data-suggested-prompt-row=""><span data-suggested-prompt-icon=""><!></span> <span class="min-w-0 flex-1 text-pretty" data-suggested-prompt-label=""><span role="button" tabindex="0" class="focus-visible:outline-none" data-suggested-prompt-text=""> </span><!></span> <!> <!></div>'),Yx=E('<div class="flex flex-col" data-testid="suggested-prompts-surface"><!></div>');function eu(n,r){if(new.target)return fn({component:eu,...n});mn(r,!0);let a=X(r,"prompts",7),i=X(r,"onSelect",7),c=X(r,"onEdit",7),l=X(r,"compact",7,!1),v=X(r,"showShortcutHints",7,!1),g=X(r,"reserveShortcutHintSpace",7,!1),_=X(r,"workspaceId",7);const P=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC")?"⌃":"Alt+",S=p$.replace("text-ui","type-caption");function q(x){i()(x)}function k(x,Q){x.key!=="Enter"&&x.key!==" "||(x.preventDefault(),q(Q))}function W(x,Q){x.preventDefault(),x.stopPropagation(),qd(Q,{workspaceId:_(),event:x})}function O(x,Q){(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),x.stopPropagation(),qd(Q,{workspaceId:_(),event:x}))}function T(x){return x<3}var D={get prompts(){return a()},set prompts(x){a(x),Z()},get onSelect(){return i()},set onSelect(x){i(x),Z()},get onEdit(){return c()},set onEdit(x){c(x),Z()},get compact(){return l()},set compact(x=!1){l(x),Z()},get showShortcutHints(){return v()},set showShortcutHints(x=!1){v(x),Z()},get reserveShortcutHintSpace(){return g()},set reserveShortcutHintSpace(x=!1){g(x),Z()},get workspaceId(){return _()},set workspaceId(x){_(x),Z()},$set:vn,$on:(x,Q)=>hn(r,x,Q)},K=Wt(),se=ye(K);{var C=x=>{var Q=Yx(),pe=I(Q);{const Te=(fe,Le)=>{let ue=()=>(Le?.()).item,oe=()=>(Le?.()).index;const Me=o(()=>ay(ue())),ie=o(()=>e(Me)[0]?.type==="text"?e(Me)[0].content:"");var ee=Jx(),Ae=I(ee),Ee=I(Ae);gt(Ee,{get icon(){return zf},size:16,get class(){return gr}}),b(Ae);var N=m(Ae,2),R=I(N),re=de(R,!0),qe=m(R);On(qe,17,()=>e(Me).slice(e(ie)?1:0),Y_,(z,Ie)=>{var Ce=Wt(),De=ye(Ce);{var at=Oe=>{const $e=o(()=>ry(e(Ie).url));var V=Vx(),ne=de(V,!0);L(()=>{Ue(V,"href",e($e)),Ue(V,"title",e($e)),j(ne,e(Ie).label)}),ps("click",V,Fe=>W(Fe,e($e))),ps("keydown",V,Fe=>O(Fe,e($e))),p(Oe,V)},lt=Oe=>{var $e=dn();L(()=>j($e,e(Ie).content)),p(Oe,$e)};B(De,Oe=>{e(Ie).type==="link"?Oe(at):Oe(lt,-1)})}p(z,Ce)}),b(N);var H=m(N,2);{var Y=z=>{var Ie=Kx();let Ce;var De=de(Ie);L(()=>{Ce=xe(Ie,1,`${S??""} mt-px inline-flex h-5 items-center self-start border-0 bg-transparent p-0 font-sans font-normal text-muted-foreground! opacity-100`,null,Ce,{invisible:!v()}),Ue(Ie,"aria-hidden",v()?void 0:"true"),Ue(Ie,"data-hint-visible",v()),j(De,`${P}${oe()+1}`)}),p(z,Ie)},J=o(()=>T(oe())&&(v()||g()));B(H,z=>{e(J)&&z(Y)})}var Se=m(H,2);{var He=z=>{L$(z,{side:"top",delayDuration:300,trigger:De=>{{let at=o(()=>u.chat_suggestedPrompts_editInInput_ariaLabel());$t(De,{type:"button",variant:"ghost-light",size:"icon-xs",iconOnly:!0,class:"absolute right-0.5 top-[calc(var(--operational-leading-half-slot-size)+var(--space-1)*0.5+1px)] shrink-0 -translate-y-1/2 rounded opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100",onclick:lt=>{lt.stopPropagation(),c()(ue())},get"aria-label"(){return e(at)},children:(lt,Oe)=>{gt(lt,{get icon(){return D$},size:"xs"})},$$slots:{default:!0}})}},content:De=>{var at=Qx(),lt=de(at,!0);L(Oe=>j(lt,Oe),[()=>u.chat_suggestedPrompts_edit_tooltip()]),p(De,at)},$$slots:{trigger:!0,content:!0}})};B(Se,z=>{c()&&z(He)})}b(ee),L(z=>{xe(ee,1,`${Wf} ${g$} group relative flex cursor-pointer items-center gap-[var(--operational-leading-gap)] rounded-sm border border-transparent bg-transparent px-1.5 py-0.5 text-left opacity-100 pr-9 transition-colors hover:text-foreground has-[[data-suggested-prompt-text]:focus-visible]:outline-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-offset-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-ring`),xe(Ae,1,`${Ul??""} mt-px self-start`),Ue(R,"aria-label",z),j(re,e(ie))},[()=>ny(ue())]),ps("click",R,z=>{z.stopPropagation(),q(ue())}),ps("keydown",R,z=>k(z,ue())),p(fe,ee)};let he=o(()=>l()?"[&>div>div:last-child]:gap-0":"[&>div>div:last-child]:gap-0.5");T$(pe,{get items(){return a()},virtualize:!1,onActivate:q,get class(){return`overflow-visible! [&>div>div:last-child]:flex [&>div>div:last-child]:flex-col ${e(he)??""}`},"data-testid":"suggested-prompts-list",get"data-compact"(){return l()},row:Te,$$slots:{row:!0}})}b(Q),Bt(1,Q,()=>ma,()=>({tier:"fast",y:0,scale:1})),Bt(2,Q,()=>to,()=>({tier:"fast"})),p(x,Q)};B(se,x=>{a().length>0&&x(C)})}return p(n,K),_n(D)}Ud(["click","keydown"]);var Xx=E('<section class="pb-6 pt-6"><p class="type-body mb-5 max-w-[36rem] px-1.5 text-pretty text-muted-foreground"> </p> <!></section>');function vv(n,r){if(new.target)return fn({component:vv,...n});mn(r,!0);let a=X(r,"onSelect",7),i=X(r,"compact",7,!1);const c=o(()=>[{label:u.chat_chiefEmptyState_assignedPrs_label(),prompt:u.chat_chiefEmptyState_assignedPrs_prompt()},{label:u.chat_chiefEmptyState_staleWorkspaces_label(),prompt:u.chat_chiefEmptyState_staleWorkspaces_prompt()},{label:u.chat_chiefEmptyState_agentPerformance_label(),prompt:u.chat_chiefEmptyState_agentPerformance_prompt()},{label:u.chat_chiefEmptyState_morningBrief_label(),prompt:u.chat_chiefEmptyState_morningBrief_prompt()},{label:u.chat_chiefEmptyState_randomTheme_label(),prompt:u.chat_chiefEmptyState_randomTheme_prompt()}]),l=o(()=>e(c).map(q=>q.label));function v(q){const k=e(c).find(W=>W.label===q);k&&a()(k.prompt)}var g={get onSelect(){return a()},set onSelect(q){a(q),Z()},get compact(){return i()},set compact(q=!1){i(q),Z()},$set:vn,$on:(q,k)=>hn(r,q,k)},_=Xx(),f=I(_),P=de(f,!0),S=m(f,2);return eu(S,{get prompts(){return e(l)},onSelect:v,get compact(){return i()}}),b(_),L(q=>j(P,q),[()=>u.chat_chiefEmptyState_intro_label()]),p(n,_),_n(g)}const tu=2e3,Zx=4e3,e1=Zx-tu-2;function t1(n,r=tu){const a=[];let i=0;for(let c=n.length-1;c>=0&&i<r;c-=1){const l=n[c];if(l.role!=="user"&&l.role!=="assistant")continue;const v=(l.contentBlocks??[]).filter(_=>_.type==="text").map(_=>_.text||_.content||"").join(""),g=(l.role==="assistant"?tw(v).cleanedContent:v).trim();g&&(a.unshift({role:l.role,text:g}),i+=g.length)}return a}function n1(n,r){const a=n.map(l=>`${l.role==="user"?"User":"Assistant"}: ${l.text}`).join(`
2
2
 
3
3
  `).slice(-tu),i=r.map(l=>l.trim()).filter(Boolean);if(i.length===0)return a;const c=`Suggested prompts:
4
4
  ${i.map(l=>`- ${l}`).join(`
@@ -1 +1 @@
1
- import{n as i}from"./BqF1bVQC.js";import{o as n}from"./BCwKGJpG.js";import{m as o,JH as a,EB as s,vr as r,v1 as f}from"./D0qhIm1r.js";async function u(t,e){if(!(!t||!e)){if(t===o){await i("/"),a.dispatch(s(e)),a.dispatch(r("chief"));return}await n(t)&&a.dispatch(f(t,{agentId:e}))}}export{u as n};
1
+ import{n as i}from"./CccfsETL.js";import{o as n}from"./CDcxODgf.js";import{m as o,JH as a,EB as s,vr as r,v1 as f}from"./D0qhIm1r.js";async function u(t,e){if(!(!t||!e)){if(t===o){await i("/"),a.dispatch(s(e)),a.dispatch(r("chief"));return}await n(t)&&a.dispatch(f(t,{agentId:e}))}}export{u as n};
@@ -1,4 +1,4 @@
1
- import{g as ze}from"./BbK9qDRy.js";import{s as Xe}from"./_IIJlCYC.js";import{b as m,W as Be,a_ as Je,V as Ze,aZ as et,U as tt,b0 as st,Y as it,X as Ne,ay as qe,r as rt,am as nt,aU as at,ab as lt,aG as ct,_ as ot,a1 as ht,aP as ut,bh as ft}from"./BZnji9hP.js";var Ce=(function(){var e=m(function($,i,n,o){for(n=n||{},o=$.length;o--;n[$[o]]=i);return n},"o"),r=[1,3],u=[1,4],h=[1,5],f=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],c=[1,22],S=[2,7],d=[1,26],_=[1,27],b=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],w=[1,24],D=[1,31],O=[1,32],M=[1,30],R=[1,39],g=[1,40],p=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ae=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ee=[27,29],Ve=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],we=[1,74],De=[1,75],Oe=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],pe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],Me=[1,101],Fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],fe=[1,114],me=[1,115],Se={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:m(function(i,n,o,s,E,t,de){var l=t.length-1;switch(E){case 4:this.$=t[l].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[l].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[l-3],t[l-4]);break;case 22:s.addRequirement(t[l-5],t[l-6]),s.setClass([t[l-5]],t[l-3]);break;case 23:s.setNewReqId(t[l-2]);break;case 24:s.setNewReqText(t[l-2]);break;case 25:s.setNewReqRisk(t[l-2]);break;case 26:s.setNewReqVerifyMethod(t[l-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[l-3]);break;case 43:s.addElement(t[l-5]),s.setClass([t[l-5]],t[l-3]);break;case 44:s.setNewElementType(t[l-2]);break;case 45:s.setNewElementDocRef(t[l-2]);break;case 48:s.addRelationship(t[l-2],t[l],t[l-4]);break;case 49:s.addRelationship(t[l-2],t[l-4],t[l]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[l-2],s.defineClass(t[l-1],t[l]);break;case 58:s.setClass(t[l-1],t[l]);break;case 59:s.setClass([t[l-2]],t[l]);break;case 60:case 62:this.$=[t[l]];break;case 61:case 63:this.$=t[l-2].concat([t[l]]);break;case 64:this.$=t[l-2],s.setCssStyle(t[l-1],t[l]);break;case 65:this.$=[t[l]];break;case 66:t[l-2].push(t[l]),this.$=t[l-2];break;case 68:this.$=t[l-1]+t[l];break}},"anonymous"),table:[{3:1,4:2,6:r,9:u,11:h,13:f},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:u,11:h,13:f},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:r,9:u,11:h,13:f},{1:[2,2]},{4:17,5:c,7:13,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:c,7:42,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:43,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:44,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:45,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:46,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:47,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:48,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:49,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:50,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(p,[2,17]),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),{30:60,33:62,75:P,89:R,90:g},{30:63,33:62,75:P,89:R,90:g},{30:64,33:62,75:P,89:R,90:g},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ae,[2,81]),e(Ae,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ve,66:ve,67:Le,68:xe,69:we,70:De,71:Oe},{62:77,65:Ve,66:ve,67:Le,68:xe,69:we,70:De,71:Oe},{30:78,33:62,75:P,89:R,90:g},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:P,76:U,89:R,90:g},{5:[1,95]},{30:96,33:62,75:P,89:R,90:g},{5:[1,97]},{30:98,33:62,75:P,89:R,90:g},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(p,[2,59],{76:U}),e(p,[2,64],{76:Me}),{33:103,75:[1,102],89:R,90:g},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(p,[2,57],{76:Me}),e(p,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:fe,59:me},{27:[1,118],76:U},{33:119,89:R,90:g},{33:120,89:R,90:g},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(T,[2,68]),e(p,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(p,[2,28]),{5:[1,127]},e(p,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:fe,59:me},e(p,[2,47]),{5:[1,131]},e(p,[2,48]),e(p,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:R,90:g},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(p,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(p,[2,46]),{5:he,40:ue,56:152,57:fe,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(p,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(p,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:fe,59:me},{5:he,40:ue,56:164,57:fe,59:me},e(p,[2,23]),e(p,[2,24]),e(p,[2,25]),e(p,[2,26]),e(p,[2,44]),e(p,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:m(function(i,n){if(n.recoverable)this.trace(i);else{var o=new Error(i);throw o.hash=n,o}},"parseError"),parse:m(function(i){var n=this,o=[0],s=[],E=[null],t=[],de=this.table,l="",ge=0,$e=0,Ke=2,Pe=1,We=t.slice.call(arguments,1),y=Object.create(this.lexer),G={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(G.yy[be]=this.yy[be]);y.setInput(i,G.yy),G.yy.lexer=y,G.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var Ie=y.yylloc;t.push(Ie);var je=y.options&&y.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ge(k){o.length=o.length-2*k,E.length=E.length-k,t.length=t.length-k}m(Ge,"popStack");function Ue(){var k;return k=s.pop()||y.lex()||Pe,typeof k!="number"&&(k instanceof Array&&(s=k,k=s.pop()),k=n.symbols_[k]||k),k}m(Ue,"lex");for(var I,z,N,ke,J={},ye,F,Ye,_e;;){if(z=o[o.length-1],this.defaultActions[z]?N=this.defaultActions[z]:((I===null||typeof I>"u")&&(I=Ue()),N=de[z]&&de[z][I]),typeof N>"u"||!N.length||!N[0]){var Te="";_e=[];for(ye in de[z])this.terminals_[ye]&&ye>Ke&&_e.push("'"+this.terminals_[ye]+"'");y.showPosition?Te="Parse error on line "+(ge+1)+`:
1
+ import{g as ze}from"./CRFyRwf-.js";import{s as Xe}from"./CRIoGx5T.js";import{b as m,W as Be,a_ as Je,V as Ze,aZ as et,U as tt,b0 as st,Y as it,X as Ne,ay as qe,r as rt,am as nt,aU as at,ab as lt,aG as ct,_ as ot,a1 as ht,aP as ut,bh as ft}from"./DFNKkiho.js";var Ce=(function(){var e=m(function($,i,n,o){for(n=n||{},o=$.length;o--;n[$[o]]=i);return n},"o"),r=[1,3],u=[1,4],h=[1,5],f=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],c=[1,22],S=[2,7],d=[1,26],_=[1,27],b=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],w=[1,24],D=[1,31],O=[1,32],M=[1,30],R=[1,39],g=[1,40],p=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ae=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ee=[27,29],Ve=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],we=[1,74],De=[1,75],Oe=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],pe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],Me=[1,101],Fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],fe=[1,114],me=[1,115],Se={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:m(function(i,n,o,s,E,t,de){var l=t.length-1;switch(E){case 4:this.$=t[l].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[l].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[l-3],t[l-4]);break;case 22:s.addRequirement(t[l-5],t[l-6]),s.setClass([t[l-5]],t[l-3]);break;case 23:s.setNewReqId(t[l-2]);break;case 24:s.setNewReqText(t[l-2]);break;case 25:s.setNewReqRisk(t[l-2]);break;case 26:s.setNewReqVerifyMethod(t[l-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[l-3]);break;case 43:s.addElement(t[l-5]),s.setClass([t[l-5]],t[l-3]);break;case 44:s.setNewElementType(t[l-2]);break;case 45:s.setNewElementDocRef(t[l-2]);break;case 48:s.addRelationship(t[l-2],t[l],t[l-4]);break;case 49:s.addRelationship(t[l-2],t[l-4],t[l]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[l-2],s.defineClass(t[l-1],t[l]);break;case 58:s.setClass(t[l-1],t[l]);break;case 59:s.setClass([t[l-2]],t[l]);break;case 60:case 62:this.$=[t[l]];break;case 61:case 63:this.$=t[l-2].concat([t[l]]);break;case 64:this.$=t[l-2],s.setCssStyle(t[l-1],t[l]);break;case 65:this.$=[t[l]];break;case 66:t[l-2].push(t[l]),this.$=t[l-2];break;case 68:this.$=t[l-1]+t[l];break}},"anonymous"),table:[{3:1,4:2,6:r,9:u,11:h,13:f},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:u,11:h,13:f},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:r,9:u,11:h,13:f},{1:[2,2]},{4:17,5:c,7:13,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:c,7:42,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:43,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:44,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:45,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:46,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:47,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:48,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:49,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{4:17,5:c,7:50,8:S,9:u,11:h,13:f,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:d,22:_,23:b,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:w,72:D,74:O,77:M,89:R,90:g},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(p,[2,17]),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),{30:60,33:62,75:P,89:R,90:g},{30:63,33:62,75:P,89:R,90:g},{30:64,33:62,75:P,89:R,90:g},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ae,[2,81]),e(Ae,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ve,66:ve,67:Le,68:xe,69:we,70:De,71:Oe},{62:77,65:Ve,66:ve,67:Le,68:xe,69:we,70:De,71:Oe},{30:78,33:62,75:P,89:R,90:g},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:P,76:U,89:R,90:g},{5:[1,95]},{30:96,33:62,75:P,89:R,90:g},{5:[1,97]},{30:98,33:62,75:P,89:R,90:g},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(p,[2,59],{76:U}),e(p,[2,64],{76:Me}),{33:103,75:[1,102],89:R,90:g},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(p,[2,57],{76:Me}),e(p,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:fe,59:me},{27:[1,118],76:U},{33:119,89:R,90:g},{33:120,89:R,90:g},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(T,[2,68]),e(p,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(p,[2,28]),{5:[1,127]},e(p,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:fe,59:me},e(p,[2,47]),{5:[1,131]},e(p,[2,48]),e(p,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:R,90:g},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(p,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(p,[2,46]),{5:he,40:ue,56:152,57:fe,59:me},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(p,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(p,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:fe,59:me},{5:he,40:ue,56:164,57:fe,59:me},e(p,[2,23]),e(p,[2,24]),e(p,[2,25]),e(p,[2,26]),e(p,[2,44]),e(p,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:m(function(i,n){if(n.recoverable)this.trace(i);else{var o=new Error(i);throw o.hash=n,o}},"parseError"),parse:m(function(i){var n=this,o=[0],s=[],E=[null],t=[],de=this.table,l="",ge=0,$e=0,Ke=2,Pe=1,We=t.slice.call(arguments,1),y=Object.create(this.lexer),G={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(G.yy[be]=this.yy[be]);y.setInput(i,G.yy),G.yy.lexer=y,G.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var Ie=y.yylloc;t.push(Ie);var je=y.options&&y.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ge(k){o.length=o.length-2*k,E.length=E.length-k,t.length=t.length-k}m(Ge,"popStack");function Ue(){var k;return k=s.pop()||y.lex()||Pe,typeof k!="number"&&(k instanceof Array&&(s=k,k=s.pop()),k=n.symbols_[k]||k),k}m(Ue,"lex");for(var I,z,N,ke,J={},ye,F,Ye,_e;;){if(z=o[o.length-1],this.defaultActions[z]?N=this.defaultActions[z]:((I===null||typeof I>"u")&&(I=Ue()),N=de[z]&&de[z][I]),typeof N>"u"||!N.length||!N[0]){var Te="";_e=[];for(ye in de[z])this.terminals_[ye]&&ye>Ke&&_e.push("'"+this.terminals_[ye]+"'");y.showPosition?Te="Parse error on line "+(ge+1)+`:
2
2
  `+y.showPosition()+`
3
3
  Expecting `+_e.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Te="Parse error on line "+(ge+1)+": Unexpected "+(I==Pe?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Te,{text:y.match,token:this.terminals_[I]||I,line:y.yylineno,loc:Ie,expected:_e})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+I);switch(N[0]){case 1:o.push(I),E.push(y.yytext),t.push(y.yylloc),o.push(N[1]),I=null,$e=y.yyleng,l=y.yytext,ge=y.yylineno,Ie=y.yylloc;break;case 2:if(F=this.productions_[N[1]][1],J.$=E[E.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},je&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),ke=this.performAction.apply(J,[l,$e,ge,G.yy,N[1],E,t].concat(We)),typeof ke<"u")return ke;F&&(o=o.slice(0,-1*F*2),E=E.slice(0,-1*F),t=t.slice(0,-1*F)),o.push(this.productions_[N[1]][0]),E.push(J.$),t.push(J._$),Ye=de[o[o.length-2]][o[o.length-1]],o.push(Ye);break;case 3:return!0}}return!0},"parse")},He=(function(){var $={EOF:1,parseError:m(function(n,o){if(this.yy.parser)this.yy.parser.parseError(n,o);else throw new Error(n)},"parseError"),setInput:m(function(i,n){return this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:m(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:m(function(i){var n=i.length,o=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===s.length?this.yylloc.first_column:0)+s[s.length-o.length].length-o[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:m(function(){return this._more=!0,this},"more"),reject:m(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:m(function(i){this.unput(this.match.slice(i))},"less"),pastInput:m(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:m(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:m(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{JH as s,ij as a,mm as S,nZ as f,mz as m}from"./D0qhIm1r.js";import{u as O}from"./Xk1ND_1x.js";import{dP as d,b5 as b,dX as k}from"./cD292w1o.js";const v=s.createSelector((t,e)=>{if(b.select(t,e)&&k.select(t,e))return!1;const r=t.principal?.snapshot;return r?.capabilities.workspaceGuestRoles===!0&&(r.capabilities.hostMembership?r.principal.hostRole==="guest":!r.principal.isAdministrator)}),h=s.createSelector(t=>t.principal?.snapshot?.capabilities.remoteScripts===1),l=s.createSelector((t,e,r)=>!v.select(t,e)||!!d.select(t,e)&&r?.purpose==="saved");function o(t,e,r){return!!e&&!!r&&l.select(t,e,r)}function i(t,e){return e?t.scripts.byWorkspaceId[e]??m:m}const j=s.createSelector((t,e)=>i(t,e).initialized),W=s.createSelector((t,e)=>{const r=i(t,e);return r.activeScriptIds?r.activeScriptIds.flatMap(c=>o(t,e,r.scripts[c])?[r.scripts[c]]:[]):Object.values(r.scripts).filter(c=>!c.archivedAt&&o(t,e,c))}),C=s.createSelector((t,e)=>W.select(t,e).filter(r=>O((r.runtime??a()).status))),u=s.createSelector((t,e,r)=>{const c=i(t,e);return o(t,e,c.scripts[r])?c.scripts[r]:null}),x=s.createSelector((t,e,r)=>u.select(t,e,r)?.runtime??a()),z=s.createSelector((t,e,r)=>{const c=i(t,e);return l.select(t,e??"",c.scripts[r])?c.outputBuffers[r]??S:S}),E=s.createSelector((t,e,r,c)=>{const n=i(t,e).retainedOutputs?.[c];return n?.scriptId===r&&l.select(t,e,i(t,e).scripts[r])?n:void 0}),M=s.createSelector(t=>Object.entries(t.scripts?.byWorkspaceId??{}).filter(([,e])=>Object.keys(e.retainedOutputs??{}).length>0).map(([e])=>e).sort()),A=s.createSelector((t,e)=>!!t.scripts?.byWorkspaceId[e]?.outputStreamReady),D=s.createSelector((t,e)=>i(t,e).initialized),B=s.createSelector((t,e)=>{const r=i(t,e);return r.activeScriptIds?r.activeScriptIds.flatMap(c=>o(t,e,r.scripts[c])?[r.scripts[c]]:[]):Object.values(r.scripts).filter(c=>!c.archivedAt&&o(t,e,c))}),G=s.createSelector((t,e)=>{const r=i(t,e);return r.detectionOperation?.pending?{...r.operations,...Object.fromEntries(Object.keys(r.scripts).map(c=>[c,r.detectionOperation]))}:r.operations}),P=s.createSelector((t,e)=>i(t,e).detectionOperation),J=s.createSelector((t,e,r,c)=>{const n=i(t,r).workflowOutcomes,p=n?f(n,e):void 0;return p?.workspaceId===r&&p.resourceId===c?p:void 0}),L=s.createSelector((t,e,r)=>u.select(t,e,r)?.runtime??a()),H=s.createSelector((t,e)=>Object.values(i(t,e).scripts).filter(r=>o(t,e,r))),U=s.createSelector((t,e,r)=>i(t,e).pendingReads?.[r]),V=s.createSelector((t,e,r)=>!!u.select(t,e,r)&&!i(t,e).detectionOperation?.pending&&!i(t,e).operations[r]?.pending),X=s.createSelector((t,e)=>({nextCursor:i(t,e).nextCursor,loading:i(t,e).loading,error:i(t,e).loadError}));export{H as selectAllWorkspaceScriptEntries,V as selectCanDeleteScript,l as selectCanReadScriptDefinition,h as selectRemoteScriptsSupported,C as selectRunningScripts,u as selectScriptById,P as selectScriptDetectionOperation,W as selectScriptEntries,X as selectScriptListPageState,z as selectScriptOutput,A as selectScriptOutputStreamReady,M as selectScriptOutputViewerWorkspaceIds,U as selectScriptReadJournal,E as selectScriptRetainedOutput,x as selectScriptRuntime,J as selectScriptWorkflowOutcome,j as selectScriptsInitialized,v as selectUsesGuestScriptScope,B as selectWorkspaceScriptEntries,G as selectWorkspaceScriptOperations,L as selectWorkspaceScriptRuntime,D as selectWorkspaceScriptsInitialized};
1
+ import{JH as s,ij as a,mm as S,nZ as f,mz as m}from"./D0qhIm1r.js";import{u as O}from"./DlnCrS3y.js";import{dP as d,b5 as b,dX as k}from"./cD292w1o.js";const v=s.createSelector((t,e)=>{if(b.select(t,e)&&k.select(t,e))return!1;const r=t.principal?.snapshot;return r?.capabilities.workspaceGuestRoles===!0&&(r.capabilities.hostMembership?r.principal.hostRole==="guest":!r.principal.isAdministrator)}),h=s.createSelector(t=>t.principal?.snapshot?.capabilities.remoteScripts===1),l=s.createSelector((t,e,r)=>!v.select(t,e)||!!d.select(t,e)&&r?.purpose==="saved");function o(t,e,r){return!!e&&!!r&&l.select(t,e,r)}function i(t,e){return e?t.scripts.byWorkspaceId[e]??m:m}const j=s.createSelector((t,e)=>i(t,e).initialized),W=s.createSelector((t,e)=>{const r=i(t,e);return r.activeScriptIds?r.activeScriptIds.flatMap(c=>o(t,e,r.scripts[c])?[r.scripts[c]]:[]):Object.values(r.scripts).filter(c=>!c.archivedAt&&o(t,e,c))}),C=s.createSelector((t,e)=>W.select(t,e).filter(r=>O((r.runtime??a()).status))),u=s.createSelector((t,e,r)=>{const c=i(t,e);return o(t,e,c.scripts[r])?c.scripts[r]:null}),x=s.createSelector((t,e,r)=>u.select(t,e,r)?.runtime??a()),z=s.createSelector((t,e,r)=>{const c=i(t,e);return l.select(t,e??"",c.scripts[r])?c.outputBuffers[r]??S:S}),E=s.createSelector((t,e,r,c)=>{const n=i(t,e).retainedOutputs?.[c];return n?.scriptId===r&&l.select(t,e,i(t,e).scripts[r])?n:void 0}),M=s.createSelector(t=>Object.entries(t.scripts?.byWorkspaceId??{}).filter(([,e])=>Object.keys(e.retainedOutputs??{}).length>0).map(([e])=>e).sort()),A=s.createSelector((t,e)=>!!t.scripts?.byWorkspaceId[e]?.outputStreamReady),D=s.createSelector((t,e)=>i(t,e).initialized),B=s.createSelector((t,e)=>{const r=i(t,e);return r.activeScriptIds?r.activeScriptIds.flatMap(c=>o(t,e,r.scripts[c])?[r.scripts[c]]:[]):Object.values(r.scripts).filter(c=>!c.archivedAt&&o(t,e,c))}),G=s.createSelector((t,e)=>{const r=i(t,e);return r.detectionOperation?.pending?{...r.operations,...Object.fromEntries(Object.keys(r.scripts).map(c=>[c,r.detectionOperation]))}:r.operations}),P=s.createSelector((t,e)=>i(t,e).detectionOperation),J=s.createSelector((t,e,r,c)=>{const n=i(t,r).workflowOutcomes,p=n?f(n,e):void 0;return p?.workspaceId===r&&p.resourceId===c?p:void 0}),L=s.createSelector((t,e,r)=>u.select(t,e,r)?.runtime??a()),H=s.createSelector((t,e)=>Object.values(i(t,e).scripts).filter(r=>o(t,e,r))),U=s.createSelector((t,e,r)=>i(t,e).pendingReads?.[r]),V=s.createSelector((t,e,r)=>!!u.select(t,e,r)&&!i(t,e).detectionOperation?.pending&&!i(t,e).operations[r]?.pending),X=s.createSelector((t,e)=>({nextCursor:i(t,e).nextCursor,loading:i(t,e).loading,error:i(t,e).loadError}));export{H as selectAllWorkspaceScriptEntries,V as selectCanDeleteScript,l as selectCanReadScriptDefinition,h as selectRemoteScriptsSupported,C as selectRunningScripts,u as selectScriptById,P as selectScriptDetectionOperation,W as selectScriptEntries,X as selectScriptListPageState,z as selectScriptOutput,A as selectScriptOutputStreamReady,M as selectScriptOutputViewerWorkspaceIds,U as selectScriptReadJournal,E as selectScriptRetainedOutput,x as selectScriptRuntime,J as selectScriptWorkflowOutcome,j as selectScriptsInitialized,v as selectUsesGuestScriptScope,B as selectWorkspaceScriptEntries,G as selectWorkspaceScriptOperations,L as selectWorkspaceScriptRuntime,D as selectWorkspaceScriptsInitialized};
@@ -1,4 +1,4 @@
1
- import{k as qa,s as fa}from"./C-e2e9PC.js";import{p as ma,g as Ct,I as Wa,X as Qa,e as En}from"./CA6H1-bp.js";import{aB as Ga,cX as Ka,A as Va,a_ as xn,bZ as Xa,v as Ya}from"./C0JQvbI4.js";import{bm as c,t as Pt,bo as w,bw as Tt,b as Rt,bq as qn,bs as Re,br as Ja}from"./Fcr7AvC-.js";import{bo as Wn,bs as Ot,a5 as O,bl as U,bS as b,bA as $,b_ as x,aD as e,W as l,ay as H,a7 as Oe,bO as L,bn as Lt,c9 as u,aA as k,aB as _,ca as ze,bH as h,b$ as Qt,bV as le,cd as Mt,br as va,be as un,c5 as Za,bi as Nn,bj as er,bf as hn,am as ta,ax as na,ai as tr,aj as nr,c0 as ar}from"./3SdAC2_C.js";import{i as M}from"./BhYXv0ZM.js";import{t as _a}from"./CWfjuhY2.js";import{e as rr}from"./iMqZaR5X.js";import{s as q,g as en,f as ve,b as sr}from"./BRCr02in.js";import{a as or,n as ha}from"./CxR-pcVt.js";import{r as ir,o as lr,A as aa,L as dr}from"./BjPpzZjk.js";import{t as Dn}from"./DAsc1V4f.js";import{R as ra}from"./DkQdSPDN.js";import{I as ba}from"./C3KgmGxd.js";import"./x4bPxhVW.js";import{aO as wn,cN as ur,ax as cr,aM as pr,cH as gr,cI as fr,as as mr,au as vr,aC as _r,aI as hr,s as br,O as wr,e9 as kr,X as xr,cy as yr,c4 as $r}from"./cD292w1o.js";import{JH as J,cq as zn,co as wa,cr as kn,rw as Ar,E3 as Sr,fV as ka,E8 as Ir,bF as Cr,Ae as Pr,mP as sa,us as Tr,cu as Rr,v1 as oa,nM as Or,DP as Lr,E6 as Er,cc as Nr}from"./D0qhIm1r.js";import{A as Dr,b as Mr}from"./Qvf67TfJ.js";import{y as Fr}from"./Bqd7fdCF.js";import{l as zr}from"./BLUGgUG-.js";import{f as ia}from"./CkyxPppw.js";import{h as Br,g as jr}from"./2OP7IVCM.js";import{o as Hr,S as Ur}from"./Cx8Rw_sH.js";import"./BzXQ5SMs.js";import{ae as qr,ah as Wr,f as Mn,a1 as Qr}from"./Beq_QLuz.js";import{h as Gr,F as la}from"./BAtAwQ72.js";import"./O5ZlQHf9.js";import{C as Kr,k as Vr,j as Xr,i as Yr}from"./D7KhILhs.js";import{L as Jr}from"./BpFxCD0b.js";import{c as de}from"./2z64ELW5.js";import{c as Bn,b as da,d as jn,a as Hn,A as xa}from"./CDUMf4mn.js";import{l as Wt,b as Zr}from"./C7b3vXLD.js";import{F as es,bb as ts}from"./Xk1ND_1x.js";import{D as ns}from"./DcrCEeFN.js";import{b as as}from"./Ch9YoFhc.js";import{T as rs}from"./BQ5x_RaT.js";import"./lK1e5NlM.js";import{cl as ya,cP as ss,cO as os,bR as is,M as ls,F as yn,b5 as ds,au as us,aK as cs,aG as ps,cT as gs,be as fs,aA as ms,aL as vs,b1 as _s,ah as ua,a8 as hs,c6 as bs,ag as ws,cF as ks,an as xs,cS as ys,aD as $s}from"./ChHRVjww.js";import{b as As}from"./Dn334wJv.js";import"./Cz3WzTlQ.js";import{S as bn}from"./BnnKw3Va.js";import{E as Ss}from"./B8m3-qrW.js";import"./CpK0xLH4.js";import{f as Is}from"./BDQvAsU6.js";import{P as Cs}from"./B2-ooCTr.js";import{b as Ps,P as Ts}from"./Dbqo6rfT.js";import{h as Rs,H as Os,g as Ls}from"./vezRCn6E.js";const Es=80,Ns=10,Ds=new Ga(Ka,{renderer:{html({text:a}){return Va(a)},image({tokens:a}){return this.parser.parseInline(a)}}});function Qn(a){const n=document.createElement("template");n.innerHTML=Ds.parseInline(a,{async:!1});for(const o of n.content.querySelectorAll("br"))o.replaceWith(" ");return(n.content.textContent??"").replace(/\s+/g," ").trim()}function Ft(a){return a.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`+([^`]*?)`+/g,"$1").replace(/<[^>]+>/g,"").replace(/\\([\\`*_[\]{}()#+\-.!>])/g,"$1").replace(/[*~]/g,"").replace(/(^|[^A-Za-z0-9])_+/g,"$1").replace(/_+([^A-Za-z0-9]|$)/g,"$1").replace(/\s+/g," ").trim()}function Un(a,n){return a.slice(n).replace(/^(?:[ \t]*(?:\r\n|\n|\r))+/,"")}function Sn(a,n){return!n||n.length>Es||n.split(/\s+/).length>Ns||/[.!?;]$/.test(n)?!1:!/^[ \t]*(?:[-+*][ \t]+|\d+[.)][ \t]+|>|```|~~~|\|)/.test(a)}function tl(a){const o=a.trim().match(/^\*\*([^\r\n]+)\*\*$/);if(!o)return null;const i=Ft(o[1]);return Sn(o[0],i)?i:null}function Gn(a,n=!1,o=!0){const i=a.match(/^(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",r=a.slice(i.length).match(/^\*\*([^\r\n]+)\*\*[ \t]*(?:(?:\r\n|\n|\r)|$)/);if(!r)return null;if(n){const v=r[1],f=v.match(/\\+$/)?.[0].length??0;if(v!==v.trim()||v.includes("**")||v.startsWith("*")||v.endsWith("*")||f%2!==0)return null}const p=Ft(r[1]);return Sn(r[0],p)?{title:n&&o?Qn(r[1]):p,body:Un(a,i.length+r[0].length)}:null}function ca(a){const n=[];let o=a;for(;o.trim();){const i=Kn(o,!0),d=i.heading?{body:i.body}:Gn(o,!0,!1);if(!d)return null;n.push(o.slice(0,o.length-d.body.length)),o=d.body}return n.length?n:null}function nl(a){const n=[];let o=a;for(;o.trim();){const i=Kn(o,!0,Qn),d=i.heading?{title:i.heading,body:i.body}:Gn(o,!0);if(!d)return null;n.push(d.title),o=d.body}return n.length?n:null}function al(a){const n=Fs(a),o=[];let i=a;for(n.heading&&(o.push({title:n.heading,body:""}),i=n.body);i;){const d=Gn(i);if(!d||d.body.length>=i.length)break;o.push({title:d.title,body:""}),i=d.body}if(o.length===0){const d=a.trim(),r=Ft(d);return!d.includes(`
1
+ import{k as qa,s as fa}from"./vq6mxGLA.js";import{p as ma,g as Ct,I as Wa,X as Qa,e as En}from"./CA6H1-bp.js";import{aB as Ga,cX as Ka,A as Va,a_ as xn,bZ as Xa,v as Ya}from"./D-j7vD5Z.js";import{bm as c,t as Pt,bo as w,bw as Tt,b as Rt,bq as qn,bs as Re,br as Ja}from"./Fcr7AvC-.js";import{bo as Wn,bs as Ot,a5 as O,bl as U,bS as b,bA as $,b_ as x,aD as e,W as l,ay as H,a7 as Oe,bO as L,bn as Lt,c9 as u,aA as k,aB as _,ca as ze,bH as h,b$ as Qt,bV as le,cd as Mt,br as va,be as un,c5 as Za,bi as Nn,bj as er,bf as hn,am as ta,ax as na,ai as tr,aj as nr,c0 as ar}from"./3SdAC2_C.js";import{i as M}from"./BhYXv0ZM.js";import{t as _a}from"./CWfjuhY2.js";import{e as rr}from"./iMqZaR5X.js";import{s as q,g as en,f as ve,b as sr}from"./BRCr02in.js";import{a as or,n as ha}from"./CxR-pcVt.js";import{r as ir,o as lr,A as aa,L as dr}from"./CPav-V5t.js";import{t as Dn}from"./DAsc1V4f.js";import{R as ra}from"./DkQdSPDN.js";import{I as ba}from"./C3KgmGxd.js";import"./x4bPxhVW.js";import{aO as wn,cN as ur,ax as cr,aM as pr,cH as gr,cI as fr,as as mr,au as vr,aC as _r,aI as hr,s as br,O as wr,e9 as kr,X as xr,cy as yr,c4 as $r}from"./cD292w1o.js";import{JH as J,cq as zn,co as wa,cr as kn,rw as Ar,E3 as Sr,fV as ka,E8 as Ir,bF as Cr,Ae as Pr,mP as sa,us as Tr,cu as Rr,v1 as oa,nM as Or,DP as Lr,E6 as Er,cc as Nr}from"./D0qhIm1r.js";import{A as Dr,b as Mr}from"./CLX81MHV.js";import{y as Fr}from"./Bqd7fdCF.js";import{l as zr}from"./DTNrtzyx.js";import{f as ia}from"./OuI4JmWC.js";import{h as Br,g as jr}from"./2OP7IVCM.js";import{o as Hr,S as Ur}from"./PejVYY2W.js";import"./BzXQ5SMs.js";import{ae as qr,ah as Wr,f as Mn,a1 as Qr}from"./Beq_QLuz.js";import{h as Gr,F as la}from"./BAtAwQ72.js";import"./O5ZlQHf9.js";import{C as Kr,k as Vr,j as Xr,i as Yr}from"./D7KhILhs.js";import{L as Jr}from"./BpFxCD0b.js";import{c as de}from"./2z64ELW5.js";import{c as Bn,b as da,d as jn,a as Hn,A as xa}from"./Xr-aTNRN.js";import{l as Wt,b as Zr}from"./C7b3vXLD.js";import{F as es,bb as ts}from"./DlnCrS3y.js";import{D as ns}from"./DcrCEeFN.js";import{b as as}from"./Ch9YoFhc.js";import{T as rs}from"./BQ5x_RaT.js";import"./lK1e5NlM.js";import{cl as ya,cP as ss,cO as os,bR as is,M as ls,F as yn,b5 as ds,au as us,aK as cs,aG as ps,cT as gs,be as fs,aA as ms,aL as vs,b1 as _s,ah as ua,a8 as hs,c6 as bs,ag as ws,cF as ks,an as xs,cS as ys,aD as $s}from"./ChHRVjww.js";import{b as As}from"./Dn334wJv.js";import"./Cz3WzTlQ.js";import{S as bn}from"./BnnKw3Va.js";import{E as Ss}from"./B8m3-qrW.js";import"./CpK0xLH4.js";import{f as Is}from"./BDQvAsU6.js";import{P as Cs}from"./B2-ooCTr.js";import{b as Ps,P as Ts}from"./Dbqo6rfT.js";import{h as Rs,H as Os,g as Ls}from"./MFTfhUYi.js";const Es=80,Ns=10,Ds=new Ga(Ka,{renderer:{html({text:a}){return Va(a)},image({tokens:a}){return this.parser.parseInline(a)}}});function Qn(a){const n=document.createElement("template");n.innerHTML=Ds.parseInline(a,{async:!1});for(const o of n.content.querySelectorAll("br"))o.replaceWith(" ");return(n.content.textContent??"").replace(/\s+/g," ").trim()}function Ft(a){return a.replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/`+([^`]*?)`+/g,"$1").replace(/<[^>]+>/g,"").replace(/\\([\\`*_[\]{}()#+\-.!>])/g,"$1").replace(/[*~]/g,"").replace(/(^|[^A-Za-z0-9])_+/g,"$1").replace(/_+([^A-Za-z0-9]|$)/g,"$1").replace(/\s+/g," ").trim()}function Un(a,n){return a.slice(n).replace(/^(?:[ \t]*(?:\r\n|\n|\r))+/,"")}function Sn(a,n){return!n||n.length>Es||n.split(/\s+/).length>Ns||/[.!?;]$/.test(n)?!1:!/^[ \t]*(?:[-+*][ \t]+|\d+[.)][ \t]+|>|```|~~~|\|)/.test(a)}function tl(a){const o=a.trim().match(/^\*\*([^\r\n]+)\*\*$/);if(!o)return null;const i=Ft(o[1]);return Sn(o[0],i)?i:null}function Gn(a,n=!1,o=!0){const i=a.match(/^(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",r=a.slice(i.length).match(/^\*\*([^\r\n]+)\*\*[ \t]*(?:(?:\r\n|\n|\r)|$)/);if(!r)return null;if(n){const v=r[1],f=v.match(/\\+$/)?.[0].length??0;if(v!==v.trim()||v.includes("**")||v.startsWith("*")||v.endsWith("*")||f%2!==0)return null}const p=Ft(r[1]);return Sn(r[0],p)?{title:n&&o?Qn(r[1]):p,body:Un(a,i.length+r[0].length)}:null}function ca(a){const n=[];let o=a;for(;o.trim();){const i=Kn(o,!0),d=i.heading?{body:i.body}:Gn(o,!0,!1);if(!d)return null;n.push(o.slice(0,o.length-d.body.length)),o=d.body}return n.length?n:null}function nl(a){const n=[];let o=a;for(;o.trim();){const i=Kn(o,!0,Qn),d=i.heading?{title:i.heading,body:i.body}:Gn(o,!0);if(!d)return null;n.push(d.title),o=d.body}return n.length?n:null}function al(a){const n=Fs(a),o=[];let i=a;for(n.heading&&(o.push({title:n.heading,body:""}),i=n.body);i;){const d=Gn(i);if(!d||d.body.length>=i.length)break;o.push({title:d.title,body:""}),i=d.body}if(o.length===0){const d=a.trim(),r=Ft(d);return!d.includes(`
2
2
  `)&&Sn(d,r)?[{title:r,body:""}]:d?[{title:null,body:d}]:[]}return o[o.length-1].body=i.trim(),o}function Ms(a){const n=a.replace(/^ {0,3}/,"");return!/^(?:\s|>|`{3}|~{3}|(?:[-+*]|\d+[.)])(?:[ \t]|$)|#{1,6}(?:[ \t]|$)|<|\[[^\]]*\]:)/.test(n)&&!/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})$/.test(n)}function Kn(a,n=!1,o=Ft){const i=a.match(/^(?:\uFEFF)?(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",d=a.slice(i.length);if(n&&/^(?: {4}| {0,3}\t)/.test(d))return{heading:null,body:a};const r=d.match(/^[ \t]{0,3}#{1,6}[ \t]+([^\r\n]*?)(?:[ \t]+#+)?[ \t]*(?:\r\n|\n|\r|$)/);if(r&&Ft(r[1]))return{heading:o(r[1]),body:Un(a,i.length+r[0].length)};const p=d.match(/^([^\r\n]+)(?:\r\n|\n|\r)([ \t]{0,3})(?:=+|-+)[ \t]*(?:\r\n|\n|\r|$)/);return p&&(!n||Ms(p[1])&&!p[2].includes(" "))&&Ft(p[1])?{heading:o(p[1]),body:Un(a,i.length+p[0].length)}:{heading:null,body:a}}function Fs(a,{preserveInlineText:n=!1}={}){const o=n?Qn:Ft,i=Kn(a,!1,o);if(i.heading)return i;const d=a.match(/^(?:\uFEFF)?(?:[ \t]*(?:\r\n|\n|\r))*/)?.[0]??"",p=a.slice(d.length).match(/^([^\r\n]+)(?:\r\n|\n|\r)(?:[ \t]*(?:\r\n|\n|\r))+/);if(p){const v=Ft(p[1]),f=a.slice(d.length+p[0].length);if(f.trim()&&Sn(p[1],v))return{heading:o(p[1]),body:f}}return{heading:null,body:a}}const Gt="[--operational-row-inline-padding:var(--chat-operational-row-inline-padding,0.5rem)] [--operational-leading-slot-size:1.25rem] [--operational-leading-half-slot-size:0.625rem] [--operational-leading-gap:var(--chat-operational-leading-gap,0.5rem)]",rl="type-body font-family-child font-normal text-muted-foreground",sl=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,ol=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))] pt-1.5`,il=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))] pt-1`,ll=`${Gt} relative min-w-0 max-w-full`,dl=`${Gt} min-w-0 max-w-full pl-[calc(var(--operational-row-inline-padding)+var(--operational-leading-slot-size)+var(--operational-leading-gap))]`,ul=`${Gt} operational-group-child-row ml-2 min-w-0 w-[calc(100%-0.5rem)] max-w-[calc(100%-0.5rem)]`,cl="pt-6",pl="text-muted-foreground",gl="text-muted-foreground",$a="font-normal text-muted-foreground",fl="tool-call-container group relative block w-full min-w-0 max-w-full overflow-hidden type-body font-family-child font-normal text-muted-foreground",ml="h-[16px]! w-[16px]! shrink-0",vl=`${Gt} relative grid h-7 w-full min-w-0 max-w-full grid-cols-[var(--operational-leading-slot-size)_minmax(0,1fr)_auto] items-center gap-[var(--operational-leading-gap)] overflow-hidden rounded-md px-[var(--operational-row-inline-padding)] type-body transition-colors duration-[var(--motion-fast)] motion-reduce:transition-none`,_l=`a11y-ignore pointer-events-none flex size-[var(--operational-leading-slot-size)] min-w-[var(--operational-leading-slot-size)] shrink-0 items-center justify-center [&_svg]:size-[16px]! ${$a}`,hl=`type-body block min-w-0 max-w-full truncate overflow-hidden text-ellipsis whitespace-nowrap border-0 bg-transparent p-0 text-left ${$a}`,bl="type-body flex min-w-0 shrink-0 items-center gap-1 whitespace-nowrap",wl="h-[16px]! w-[16px]! shrink-0 opacity-60 transition-transform duration-[var(--motion-fast)] motion-reduce:transition-none";function kl(a){return qa(a,{axis:"y",duration:ma()?0:150})}function cn(a){return a.type==="thinking"||a.type==="tool_use"||a.type==="content_group"}function xl(a){const n=a?.[0];return!n||cn(n)?"":"pt-4"}function yl(a,n,o=()=>!0){const i=a[n];if(!i||!o(i)||!cn(i))return!1;let d=n-1;for(;d>=0&&!o(a[d]);)d-=1;return d>=0&&cn(a[d])}function $l(a,n,o=()=>!0,i=!1){const d=a[n];if(!d||!o(d))return"";let r=n-1;for(;r>=0&&!o(a[r]);)r-=1;if(r<0)return"";const p=a[r];if(p.type==="thinking"&&d.type==="thinking")return i||ca(p.text??p.content??"")!==null&&ca(d.text??d.content??"")!==null?"":"pt-14";const v=cn(p),f=cn(d);return v&&f?"":p.type==="thinking"&&!f?"pt-6":v||f?"pt-4":"pt-1"}const Al="shrink-0 whitespace-nowrap text-ui text-subtle focus-visible:outline-none focus-visible:text-foreground";function zs(a){if(a?.status==="halted")return c.agent_node_halted_label();if(a?.status==="resuming")return c.agent_node_resuming_label();if(a?.placement?.target==="remote"||Fr(a?.placement?.target)){if(a.placementError)return c.remoteAgent_status_failed();if(a.cloudStart)return c.remoteAgent_status_starting();if(a.effectiveIsolation==="pending")return a.setup?.state==="pending"?c.remoteAgent_status_preparingCheckout():a.setup?.state==="running"?c.remoteAgent_status_runningSetup():c.remoteAgent_status_starting()}if(a?.placement&&a.effectiveIsolation==="pending")return c.agent_node_provisioning_label()}var Bs=_('<span class="owner-fill block h-full svelte-sxf8s9"></span>'),js=_('<span class="shrink-0 text-xs text-muted-foreground"> </span>'),Hs=_('<span class="flex items-center gap-2"><span class="group-key size-1.5 shrink-0 rounded-full svelte-sxf8s9"></span> <span class="min-w-0 flex-1"> </span> <!> <span> </span></span>'),Us=_('<dd class="col-span-2 pl-[1.125rem] text-xs text-muted-foreground wrap-anywhere"> </dd>'),qs=_(`<div class="grid grid-cols-[1fr_auto] items-baseline gap-x-3 py-0.5 text-sm"><dt class="relative min-w-0 pl-[1.125rem] wrap-anywhere before:absolute before:top-2 before:left-0 before:size-1 before:rounded-full before:bg-muted-foreground before:content-['']"> </dt> <dd> </dd> <!></div>`),Ws=_('<dl class="ml-3.5 text-foreground"></dl>'),Fn=_("<!> <!>",1),Qs=_('<span class="flex items-center gap-2"><span class="min-w-0 flex-1"> </span> <span class="shrink-0 tabular-nums text-muted-foreground"> </span></span>'),Gs=_('<div class="min-w-0"><dt class="truncate text-sm text-foreground"> </dt> <dd class="text-xs text-muted-foreground wrap-anywhere"> </dd></div>'),Ks=_('<dl class="ml-3.5 flex flex-col gap-2"></dl>'),Vs=_('<section class="min-w-0" data-testid="prompt-breakdown"><div class="mb-3 flex items-baseline justify-between gap-3"><h3 class="text-sm font-medium"> </h3> <span class="shrink-0 text-sm tabular-nums text-muted-foreground"> </span></div> <div class="owner-strip mb-2 flex h-1.5 w-full overflow-hidden svelte-sxf8s9" role="img"></div> <!></section>');function Aa(a,n){const o=Wn();if(new.target)return Pt({component:Aa,...a});Ot(n,!0);let i=w(n,"breakdown",7);const d="type-body font-normal text-foreground data-[state=open]:font-normal";function r(T){return Zr(T,{maximumFractionDigits:T<1e4?1:0})}function p(T){return T==="native"?c.agent_contextBreakdown_owner_native_label():T==="intent"?c.agent_contextBreakdown_owner_intent_label():c.agent_contextBreakdown_owner_user_label()}const v=u(()=>i().owners.map(T=>c.agent_contextBreakdown_ownerShare_label({owner:p(T.owner),tokens:r(T.estTokens)})).join(", "));var f={get breakdown(){return i()},set breakdown(T){i(T),k()},$set:Tt,$on:(T,m)=>Rt(n,T,m)},S=Vs(),y=O(S),g=O(y),N=U(g,!0),F=b(g,2),Ce=U(F,!0);$(y);var D=b(y,2);Ct(D,21,()=>i().owners,T=>T.owner,(T,m)=>{var me=Bs();let ue;x(()=>{q(me,"data-owner",e(m).owner),ue=en(me,"",ue,{"flex-grow":e(m).share})}),l(T,me)}),$(D);var P=b(D,2);return de(P,()=>xa,(T,m)=>{m(T,{type:"multiple",children:(me,ue)=>{var R=Fn(),_e=H(R);Ct(_e,17,()=>i().groups,pe=>pe.kind,(pe,K)=>{var W=Oe(),ne=H(W);de(ne,()=>Bn,(ge,Fe)=>{Fe(ge,{get value(){return e(K).kind},get"data-prompt-group"(){return e(K).kind},children:(ot,G)=>{var I=Fn(),ae=H(I);de(ae,()=>da,(he,E)=>{E(he,{level:4,children:(Le,Y)=>{var Q=Oe(),Z=H(Q);de(Z,()=>jn,(V,oe)=>{oe(V,{inset:!1,class:d,children:(ee,Ee)=>{var be=Hs(),je=O(be),et=b(je,2),ut=U(et,!0),tt=b(et,2);{var at=ct=>{var Et=js(),yt=U(Et,!0);x(X=>L(yt,X),[()=>c.agent_contextBreakdown_notCounted_label()]),l(ct,Et)};M(tt,ct=>{e(K).kind==="native"&&ct(at)})}var Ne=b(tt,2),Kt=U(Ne,!0);$(be),x((ct,Et)=>{q(je,"data-kind",e(K).kind),L(ut,ct),ve(Ne,1,`shrink-0 tabular-nums ${e(K).kind==="native"?"text-muted-foreground":""}`),L(Kt,Et)},[()=>p(e(K).kind),()=>r(e(K).estTokens)]),l(ee,be)},$$slots:{default:!0}})}),l(Le,Q)},$$slots:{default:!0}})});var Be=b(ae,2);de(Be,()=>Hn,(he,E)=>{E(he,{inset:!1,children:(Le,Y)=>{var Q=Ws();Ct(Q,21,()=>e(K).rows,Z=>Z.key,(Z,V)=>{var oe=qs(),ee=O(oe),Ee=U(ee,!0),be=b(ee,2),je=U(be,!0),et=b(be,2);{var ut=tt=>{var at=Us(),Ne=U(at,!0);x(()=>L(Ne,e(V).hint)),l(tt,at)};M(et,tt=>{e(V).hint&&tt(ut)})}$(oe),x(tt=>{L(Ee,e(V).label),ve(be,1,`tabular-nums ${e(V).counted?"":"text-muted-foreground"}`),L(je,tt)},[()=>r(e(V).estTokens)]),l(Z,oe)}),$(Q),l(Le,Q)},$$slots:{default:!0}})}),l(ot,I)},$$slots:{default:!0}})}),l(pe,W)});var ce=b(_e,2);{var xe=pe=>{var K=Oe(),W=H(K);de(W,()=>Bn,(ne,ge)=>{ge(ne,{value:"hidden-skills",class:"mt-1",children:(Fe,ot)=>{var G=Fn(),I=H(G);de(I,()=>da,(Be,he)=>{he(Be,{level:4,children:(E,Le)=>{var Y=Oe(),Q=H(Y);de(Q,()=>jn,(Z,V)=>{V(Z,{inset:!1,class:d,children:(oe,ee)=>{var Ee=Qs(),be=O(Ee),je=U(be,!0),et=b(be,2),ut=U(et,!0);$(Ee),x((tt,at)=>{L(je,tt),L(ut,at)},[()=>c.agent_contextBreakdown_hiddenSkills_title(),()=>Wt(i().hiddenSkills.length)]),l(oe,Ee)},$$slots:{default:!0}})}),l(E,Y)},$$slots:{default:!0}})});var ae=b(I,2);de(ae,()=>Hn,(Be,he)=>{he(Be,{inset:!1,children:(E,Le)=>{var Y=Ks();Ct(Y,21,()=>i().hiddenSkills,Q=>Q.name,(Q,Z)=>{var V=Gs(),oe=O(V),ee=U(oe,!0),Ee=b(oe,2),be=U(Ee,!0);$(V),x(je=>{L(ee,e(Z).name),L(be,je)},[()=>[e(Z).detail,e(Z).fix].filter(Boolean).join(" · ")]),l(Q,V)}),$(Y),l(E,Y)},$$slots:{default:!0}})}),l(Fe,G)},$$slots:{default:!0}})}),l(pe,K)};M(ce,pe=>{i().hiddenSkills.length>0&&pe(xe)})}l(me,R)},$$slots:{default:!0}})}),$(S),x((T,m)=>{q(S,"aria-labelledby",`${o}-title`),q(g,"id",`${o}-title`),L(N,T),L(Ce,m),q(D,"aria-label",e(v))},[()=>c.agent_contextBreakdown_title(),()=>c.agent_contextBreakdown_tokens_label({tokens:r(i().estTokens)})]),l(a,S),Lt(f)}const Xs=["intent","user"],Ys=["systemPrompt","toolDescription","provider"],Js=["native","user","intent"],$n=a=>typeof a=="object"&&a!==null&&!Array.isArray(a),An=a=>typeof a=="number"&&Number.isFinite(a)&&a>=0,Zs=a=>a==="intent"||a==="user";function eo(a,n){if(!$n(a))return null;const{id:o,label:i,owner:d,location:r,chars:p,estTokens:v,controlHint:f}=a;if(typeof o!="string"||typeof i!="string"||!Zs(d)||typeof r!="string"||!Ys.includes(r)||!An(p)||!An(v))return null;const S=$n(f)&&typeof f.text=="string"&&f.text;return{key:`${n}:${o}`,id:o,label:i,owner:d,chars:p,estTokens:v,counted:r!=="provider",...S?{hint:S}:{}}}function to(a){if(!$n(a))return null;const{name:n,reason:o,detail:i,fix:d}=a;return[n,o,i,d].some(r=>typeof r!="string")?null:{name:n,reason:o,detail:i,fix:d}}function no(a){if(!$n(a)||a.available!==!0)return null;const{totalChars:n,estTokens:o,sections:i,hiddenSkills:d}=a;if(!An(n)||!An(o)||!Array.isArray(i)||!Array.isArray(d))return null;const r=i.map(eo).filter(f=>f!==null).sort((f,S)=>S.chars-f.chars),p=Xs.map(f=>{const S=r.filter(g=>g.counted&&g.owner===f),y=S.reduce((g,N)=>g+N.chars,0);return{owner:f,chars:y,estTokens:S.reduce((g,N)=>g+N.estTokens,0),share:n>0?y/n:0}}).filter(f=>f.chars>0),v=Js.map(f=>{const S=r.filter(y=>f==="native"?!y.counted:y.counted&&y.owner===f);return{kind:f,chars:S.reduce((y,g)=>y+g.chars,0),estTokens:S.reduce((y,g)=>y+g.estTokens,0),rows:S}}).filter(f=>f.rows.length>0);return{totalChars:n,estTokens:o,rows:r,groups:v,owners:p,hiddenSkills:d.map(to).filter(f=>f!==null)}}async function ao(a){try{const n=await Gr("agent.getSession",{agentId:a});return no(n?.session?.promptBreakdown)}catch{return null}}const pa=es.map(a=>({key:a.path.replace(/^agentFeatures\./,""),label:a.label,description:a.description}));function ro(a){const n=a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").toLowerCase().trim();return n.charAt(0).toUpperCase()+n.slice(1)}function so(a){const n=a??{},o=pa.map(r=>({key:r.key,label:r.label(),description:r.description(),enabled:n[r.key]===!0,known:!0})),i=new Set(pa.map(r=>r.key)),d=[];for(const[r,p]of Object.entries(n))i.has(r)||d.push({key:r,label:ro(r),description:null,enabled:p===!0,known:!1});return d.sort((r,p)=>r.label.localeCompare(p.label)),o.concat(d)}var oo=_('<div class="mb-6 border-b border-border pb-6"><!></div>'),io=_("<span> </span>"),lo=_('<!> <span class="sr-only"> </span>',1),uo=_('<div role="listitem" class="text-xs text-subtle" aria-hidden="true">—</div>'),co=_('<section class="min-w-0"><h4 class="text-sm font-medium mb-3"> </h4> <div role="list" class="space-y-2"></div></section>'),po=_('<div class="@container"><!> <section><h3 class="text-sm font-medium"> </h3> <p class="mb-4 mt-1 text-sm text-muted-foreground"> </p> <div class="grid grid-cols-1 gap-6 @min-[28rem]:grid-cols-2" data-testid="harness-features-list"></div></section></div>');function Sa(a,n){const o=Wn();if(new.target)return Pt({component:Sa,...a});Ot(n,!0);let i=w(n,"open",15,!1),d=w(n,"static",7,!1),r=w(n,"version",7),p=w(n,"features",7,null),v=w(n,"agentId",7),f=w(n,"breakdown",7),S=le(null);const y=u(()=>f()===void 0&&!!v());ze(()=>{if(!i()||!e(y)||!v())return;const D=v();let P=!0;return ao(D).then(T=>{P&&h(S,{agentId:D,view:T},!0)}),()=>{P=!1}});const g=u(()=>f()!==void 0?f():e(y)&&e(S)&&e(S).agentId===v()?e(S).view:null),N=u(()=>so(p())),F=u(()=>[{enabled:!0,label:c.chat_shared_valueOn_label(),rows:e(N).filter(D=>D.enabled)},{enabled:!1,label:c.chat_shared_valueOff_label(),rows:e(N).filter(D=>!D.enabled)}]);var Ce={get open(){return i()},set open(D=!1){i(D),k()},get static(){return d()},set static(D=!1){d(D),k()},get version(){return r()},set version(D){r(D),k()},get features(){return p()},set features(D=null){p(D),k()},get agentId(){return v()},set agentId(D){v(D),k()},get breakdown(){return f()},set breakdown(D){f(D),k()},$set:Tt,$on:(D,P)=>Rt(n,D,P)};{let D=u(()=>c.chat_harnessFeaturesModal_title({version:r()}));Kr(a,{get static(){return d()},get title(){return e(D)},size:"wide",get open(){return i()},set open(P){i(P)},children:(P,T)=>{var m=po(),me=O(m);{var ue=W=>{var ne=oo(),ge=O(ne);Aa(ge,{get breakdown(){return e(g)}}),$(ne),l(W,ne)};M(me,W=>{e(g)&&W(ue)})}var R=b(me,2),_e=O(R),ce=U(_e,!0),xe=b(_e,2),pe=U(xe,!0),K=b(xe,2);Ct(K,21,()=>e(F),W=>W.enabled,(W,ne)=>{var ge=co(),Fe=O(ge),ot=U(Fe,!0),G=b(Fe,2);Ct(G,21,()=>e(ne).rows,I=>I.key,(I,ae)=>{Jr(I,{role:"listitem",class:"min-h-0 px-0 py-0 [&_.truncate]:whitespace-normal","data-testid":"harness-feature-state",get"data-feature"(){return e(ae).key},get"data-enabled"(){return e(ae).enabled},title:he=>{var E=Oe(),Le=H(E);{var Y=Z=>{var V=lo(),oe=H(V);qr(oe,{get content(){return e(ae).description},side:"top",size:"sm",children:(be,je)=>{var et=io(),ut=U(et,!0);x(()=>L(ut,e(ae).label)),l(be,et)},$$slots:{default:!0}});var ee=b(oe,2),Ee=U(ee,!0);x(()=>L(Ee,e(ae).description)),l(Z,V)},Q=Z=>{var V=Qt();x(()=>L(V,e(ae).label)),l(Z,V)};M(Le,Z=>{e(ae).description?Z(Y):Z(Q,-1)})}l(he,E)},$$slots:{title:!0}})},I=>{var ae=uo();l(I,ae)}),$(G),$(ge),x(()=>{q(ge,"aria-label",e(ne).label),L(ot,e(ne).label)}),l(W,ge)}),$(K),$(R),$(m),x((W,ne)=>{q(R,"aria-labelledby",`${o}-capabilities`),q(_e,"id",`${o}-capabilities`),L(ce,W),L(pe,ne)},[()=>c.chat_harnessFeaturesModal_capabilities_title(),()=>c.chat_harnessFeaturesModal_description()]),l(P,m)},$$slots:{default:!0}})}return Lt(Ce)}var go=_('<p role="alert" class="type-body text-danger"> </p>');function Ia(a,n){if(new.target)return Pt({component:Ia,...a});Ot(n,!0);const o=()=>Re(g,"$outcome$",i),[i,d]=qn();let r=w(n,"open",15,!1),p=w(n,"agentName",7),v=w(n,"workspaceId",7),f=w(n,"agentId",7);const S=crypto.randomUUID(),y=Mt(""),g=xn(y,S),N=u(()=>o()?.workspaceId===v()&&o().agentId===f()?o():void 0),F=u(()=>e(N)?.status==="pending"),Ce=u(()=>e(N)?.status==="failed"?e(N).error:"");ze(()=>{const m=v();return f(),y.set(m),()=>J.dispatch(zn(m,S))}),ze(()=>{e(N)?.status==="succeeded"&&(r(!1),J.dispatch(wa(v(),S,e(N).requestId)))});function D(){const m=xn.select(J.state,v(),S);m?.agentId===f()&&m.status==="pending"||J.dispatch(kn(v(),S,crypto.randomUUID(),f(),{kind:"retire"}))}var P={get open(){return r()},set open(m=!1){r(m),k()},get agentName(){return p()},set agentName(m){p(m),k()},get workspaceId(){return v()},set workspaceId(m){v(m),k()},get agentId(){return f()},set agentId(m){f(m),k()},$set:Tt,$on:(m,me)=>Rt(n,m,me)};{const m=ce=>{var xe=Oe(),pe=H(xe);{var K=W=>{var ne=go(),ge=U(ne,!0);x(()=>L(ge,e(Ce))),l(W,ne)};M(pe,W=>{e(Ce)&&W(K)})}l(ce,xe)};let me=u(()=>c.modals_retireAgent_title()),ue=u(()=>c.modals_retireAgent_description({name:p()})),R=u(()=>c.modals_retireAgent_confirm_label()),_e=u(()=>c.modals_bulkActionConfirm_cancel_label());ns(a,{get title(){return e(me)},get description(){return e(ue)},get confirmLabel(){return e(R)},get cancelLabel(){return e(_e)},focusSubmit:!1,focusCancel:!0,get busy(){return e(F)},onConfirm:D,get open(){return r()},set open(ce){r(ce)},details:m,$$slots:{details:!0}})}var T=Lt(P);return d(),T}function fo({agentName:a,specialist:n}){const o=n?`{ topLevel: true, specialist: ${JSON.stringify(n)} }`:"{ topLevel: true }",i=n?`and keep the same specialist (${JSON.stringify(n)})`:"and, if you were created with a specialist, pass that exact same `specialist` value in the options";return`Please replace yourself with a fresh top-level agent and run a gradual, coordinated hand-off:
3
3
 
4
4
  1. Create your replacement now: call \`ws.agent.create(${JSON.stringify(a)}, kickoffMessage, ${o})\`. The first argument must be your EXACT current name (${JSON.stringify(a)}) ${i}. Write the kickoff message as a thorough context hand-off: the overall goal, the current state of the work, key notes and files, decisions already made, and open threads.