@intent-hq/web 2.372.3 → 2.372.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{CP03b_lt.js → -JM4IO5s.js} +1 -1
  3. package/web/app/immutable/chunks/{BDMD6FdT.js → 0x9fwj6X.js} +1 -1
  4. package/web/app/immutable/chunks/{a_hFrVUs.js → 1cfvZqIL.js} +1 -1
  5. package/web/app/immutable/chunks/{DtPlbqlO.js → 4V5RPZv7.js} +1 -1
  6. package/web/app/immutable/chunks/{BpXYSrHL.js → 6s1pPvLx.js} +4 -4
  7. package/web/app/immutable/chunks/{uMNoDmQ2.js → 8kN6wMYA.js} +1 -1
  8. package/web/app/immutable/chunks/{CuNdhmq6.js → B0rlWqYd.js} +1 -1
  9. package/web/app/immutable/chunks/{BiWBSez2.js → B62l45Uf.js} +2 -2
  10. package/web/app/immutable/chunks/{C_MA8w30.js → B7-7bZi9.js} +1 -1
  11. package/web/app/immutable/chunks/{kRDyYnu-.js → B70PGGIw.js} +1 -1
  12. package/web/app/immutable/chunks/{CCr3GhwT.js → BBFSGGQF.js} +1 -1
  13. package/web/app/immutable/chunks/{DZnf3Vcd.js → BDARQpEZ.js} +1 -1
  14. package/web/app/immutable/chunks/{Ciyw1cDk.js → BEUFwM79.js} +1 -1
  15. package/web/app/immutable/chunks/{xCNFDAsL.js → BGPjhZRB.js} +1 -1
  16. package/web/app/immutable/chunks/{CBP_r2rZ.js → BGTJWNfe.js} +1 -1
  17. package/web/app/immutable/chunks/{DQITwHBm.js → BGdVu4MB.js} +2 -2
  18. package/web/app/immutable/chunks/{pO_uIUtS.js → BHINa8Ry.js} +2 -2
  19. package/web/app/immutable/chunks/{CLkKOQIb.js → BIHiol8V.js} +1 -1
  20. package/web/app/immutable/chunks/{D9E1Sed-.js → BIoeY2kf.js} +3 -3
  21. package/web/app/immutable/chunks/{C5Ddrquv.js → BJyEBl3g.js} +1 -1
  22. package/web/app/immutable/chunks/{DTl-epgW.js → BO2BotXa.js} +1 -1
  23. package/web/app/immutable/chunks/{BjmThgx9.js → BPE9rssu.js} +3 -3
  24. package/web/app/immutable/chunks/{Byc-Gwn1.js → BTTV-GiU.js} +2 -2
  25. package/web/app/immutable/chunks/{paBp5EDQ.js → BTtsrh4I.js} +2 -2
  26. package/web/app/immutable/chunks/{DmNlyOFF.js → BTwXmxv4.js} +2 -2
  27. package/web/app/immutable/chunks/{DL1rChoc.js → Ba0RqSDe.js} +1 -1
  28. package/web/app/immutable/chunks/{D0WHOKE3.js → BcI2Qs88.js} +1 -1
  29. package/web/app/immutable/chunks/{DfvdR1t7.js → BlCrzIC_.js} +13 -13
  30. package/web/app/immutable/chunks/{s5eSUTR7.js → BlEjgaTq.js} +1 -1
  31. package/web/app/immutable/chunks/{DsATs4Yw.js → BlT-PlLX.js} +3 -3
  32. package/web/app/immutable/chunks/{DoUa1hTg.js → BmpDBFC8.js} +1 -1
  33. package/web/app/immutable/chunks/{B8GoKZxM.js → Bng2Wjmd.js} +1 -1
  34. package/web/app/immutable/chunks/{8vt0w0gB.js → BoVvYfWW.js} +1 -1
  35. package/web/app/immutable/chunks/{DO0YQnSr.js → BoqgKStq.js} +1 -1
  36. package/web/app/immutable/chunks/{-il6if-X.js → BqwlUVV2.js} +1 -1
  37. package/web/app/immutable/chunks/{CXXobfG5.js → BtmPL5YS.js} +1 -1
  38. package/web/app/immutable/chunks/{rUAQGuY9.js → BuJuLth3.js} +1 -1
  39. package/web/app/immutable/chunks/{CNc8h__d.js → BukcKDm8.js} +1 -1
  40. package/web/app/immutable/chunks/{BAcZGd3g.js → Byis73mI.js} +1 -1
  41. package/web/app/immutable/chunks/{BlPpu_gv.js → C0QlGAGX.js} +1 -1
  42. package/web/app/immutable/chunks/{BbbO1mVP.js → C0pO6HUL.js} +1 -1
  43. package/web/app/immutable/chunks/{BuHIOAsb.js → C8EZa-xD.js} +1 -1
  44. package/web/app/immutable/chunks/{CMR4RacT.js → CACF-3uP.js} +1 -1
  45. package/web/app/immutable/chunks/{BIZcpPtH.js → CDypb-9r.js} +1 -1
  46. package/web/app/immutable/chunks/{Cu_kcmjo.js → CE4gPfvG.js} +1 -1
  47. package/web/app/immutable/chunks/{DXq51U5Z.js → CEEa3RhU.js} +1 -1
  48. package/web/app/immutable/chunks/{B93aSOB6.js → CEwqW-JV.js} +1 -1
  49. package/web/app/immutable/chunks/{BjLzmoKu.js → CGn7nYWV.js} +1 -1
  50. package/web/app/immutable/chunks/{D73rJM26.js → CHpIe7_H.js} +1 -1
  51. package/web/app/immutable/chunks/{lMYobXp7.js → CIZP3oBY.js} +1 -1
  52. package/web/app/immutable/chunks/{3vi-OgRR.js → CJ-lCrFi.js} +1 -1
  53. package/web/app/immutable/chunks/{B77zwvv7.js → CMFcg3RE.js} +1 -1
  54. package/web/app/immutable/chunks/{CNW9Rwes.js → CNefgEA2.js} +1 -1
  55. package/web/app/immutable/chunks/{eWtOjdwZ.js → CRHarGqr.js} +1 -1
  56. package/web/app/immutable/chunks/{CVA75Jzf.js → CSfWCx1k.js} +1 -1
  57. package/web/app/immutable/chunks/{Dyda26aD.js → CSr8o6qm.js} +1 -1
  58. package/web/app/immutable/chunks/{CSUG4tUd.js → CVnLEltT.js} +2 -2
  59. package/web/app/immutable/chunks/{sppurVVE.js → CWm_YxN-.js} +1 -1
  60. package/web/app/immutable/chunks/{BMjTWq66.js → CYUq_fja.js} +1 -1
  61. package/web/app/immutable/chunks/{64KJqioX.js → CZ7G19nC.js} +1 -1
  62. package/web/app/immutable/chunks/{DlekFIEJ.js → CbbK8WaD.js} +1 -1
  63. package/web/app/immutable/chunks/{D4_8WlAX.js → Cd2ZM5fn.js} +1 -1
  64. package/web/app/immutable/chunks/{4WFBPbig.js → ChADavMb.js} +2 -2
  65. package/web/app/immutable/chunks/{Smn45KEu.js → CjJYMl8M.js} +1 -1
  66. package/web/app/immutable/chunks/{AzvtNQGc.js → CjoZjg16.js} +1 -1
  67. package/web/app/immutable/chunks/{D-5xnKgT.js → CnjuQpEd.js} +1 -1
  68. package/web/app/immutable/chunks/{C4tXJNlU.js → CpGAJSr-.js} +1 -1
  69. package/web/app/immutable/chunks/{D4HebHoD.js → Cqsgf1DM.js} +1 -1
  70. package/web/app/immutable/chunks/{Dr_KWcsf.js → CrrouvLD.js} +1 -1
  71. package/web/app/immutable/chunks/{DoGlKPs8.js → Csqgcuja.js} +1 -1
  72. package/web/app/immutable/chunks/{B6OWzTDz.js → Cub6NZJQ.js} +1 -1
  73. package/web/app/immutable/chunks/{0PFbquWg.js → Cuij5UQt.js} +1 -1
  74. package/web/app/immutable/chunks/{CEIGYgmC.js → CvPNqaI1.js} +1 -1
  75. package/web/app/immutable/chunks/{DXT_tHZV.js → CxNWBXR-.js} +3 -3
  76. package/web/app/immutable/chunks/{DVkhmNxg.js → D0Rl0jWy.js} +3 -3
  77. package/web/app/immutable/chunks/{BQ0lhaiw.js → D1B_DGCd.js} +1 -1
  78. package/web/app/immutable/chunks/{C8GDR5mq.js → D1gQR6EA.js} +1 -1
  79. package/web/app/immutable/chunks/{BFAXN_U2.js → D2akGP2t.js} +1 -1
  80. package/web/app/immutable/chunks/{CbGkMYMi.js → D69enMvZ.js} +1 -1
  81. package/web/app/immutable/chunks/{CmfLCgYN.js → D6nqIgl8.js} +1 -1
  82. package/web/app/immutable/chunks/{D7X_WaSL.js → D72FFXC3.js} +3 -3
  83. package/web/app/immutable/chunks/{QJaPD5ja.js → D9N7PGtO.js} +3 -3
  84. package/web/app/immutable/chunks/{DSam4kPq.js → DA_CqgBx.js} +2 -2
  85. package/web/app/immutable/chunks/{FHdlPR2E.js → DB4YPFuG.js} +1 -1
  86. package/web/app/immutable/chunks/{CygNkso5.js → DCdZE6Zv.js} +1 -1
  87. package/web/app/immutable/chunks/{Di8laZBj.js → DE0oDk53.js} +1 -1
  88. package/web/app/immutable/chunks/{Dqso2iIq.js → DE9J1g7V.js} +1 -1
  89. package/web/app/immutable/chunks/{DyOuvQsx.js → DEsEAjIo.js} +3 -3
  90. package/web/app/immutable/chunks/{D9ZsyNyz.js → DJbcK1vm.js} +1 -1
  91. package/web/app/immutable/chunks/{n1Mub_w4.js → DOOWwNKc.js} +1 -1
  92. package/web/app/immutable/chunks/{DdfA1Cl6.js → DRX7fFc0.js} +2 -2
  93. package/web/app/immutable/chunks/{DzXo18RQ.js → DYb2Jx_H.js} +1 -1
  94. package/web/app/immutable/chunks/{Dz9187FZ.js → DZXtm4_Y.js} +1 -1
  95. package/web/app/immutable/chunks/{ezsQjlt6.js → DcPlD4Yk.js} +1 -1
  96. package/web/app/immutable/chunks/{eHy-2vQk.js → DfC089Aj.js} +1 -1
  97. package/web/app/immutable/chunks/{BSXFgzj_.js → DfybFhnX.js} +1 -1
  98. package/web/app/immutable/chunks/{tDXv5z_U.js → Dl1bhT5L.js} +1 -1
  99. package/web/app/immutable/chunks/{B3agx6Zv.js → Dp1LDv4x.js} +1 -1
  100. package/web/app/immutable/chunks/{m5FEmsd9.js → DskDJYfd.js} +1 -1
  101. package/web/app/immutable/chunks/{DUnf3IJM.js → DtDGJeDZ.js} +1 -1
  102. package/web/app/immutable/chunks/{DoKriIRg.js → DthXaxFc.js} +1 -1
  103. package/web/app/immutable/chunks/{Buf2XX2m.js → DwIiGflF.js} +1 -1
  104. package/web/app/immutable/chunks/{CMd9xe_v.js → DyZwlsjA.js} +1 -1
  105. package/web/app/immutable/chunks/{CwLBVHwC.js → EYYp06eB.js} +1 -1
  106. package/web/app/immutable/chunks/{DpqgMZNx.js → Fg5V-_KH.js} +1 -1
  107. package/web/app/immutable/chunks/{DSviIBB2.js → Id9rbUde.js} +1 -1
  108. package/web/app/immutable/chunks/{B430oCRo.js → JHEpx9qH.js} +1 -1
  109. package/web/app/immutable/chunks/{D_yMjDjB.js → NDFzzX6j.js} +6 -6
  110. package/web/app/immutable/chunks/{Bmgc_Vmk.js → OKyJRSao.js} +1 -1
  111. package/web/app/immutable/chunks/{TWY-IEJw.js → PAnofhoS.js} +1 -1
  112. package/web/app/immutable/chunks/{CjmicwNO.js → RLm3umLY.js} +1 -1
  113. package/web/app/immutable/chunks/{BR-e1Dqz.js → RNLMbZ9C.js} +4 -4
  114. package/web/app/immutable/chunks/{B4N2SW_I.js → TWIpzPb0.js} +1 -1
  115. package/web/app/immutable/chunks/{DumB3eQv.js → ZVjzo5B6.js} +1 -1
  116. package/web/app/immutable/chunks/{C8F76z1j.js → _q3XqkyK.js} +1 -1
  117. package/web/app/immutable/chunks/{D4p9bnGO.js → b2N6VSvj.js} +1 -1
  118. package/web/app/immutable/chunks/{DjHgMTjl.js → f_7_jVTC.js} +3 -3
  119. package/web/app/immutable/chunks/{2gbKHQXV.js → gprpeC7D.js} +1 -1
  120. package/web/app/immutable/chunks/{CgyKOUjB.js → p9pVDf-Y.js} +1 -1
  121. package/web/app/immutable/chunks/{CvO597Pq.js → pjjCtVad.js} +1 -1
  122. package/web/app/immutable/chunks/{C2f0QCtk.js → pnLCy_6A.js} +1 -1
  123. package/web/app/immutable/chunks/{yc-ZA4uZ.js → qc5YRWua.js} +1 -1
  124. package/web/app/immutable/chunks/{DAAshoKb.js → xHTS7_DQ.js} +1 -1
  125. package/web/app/immutable/entry/{app.DDy_f4Vr.js → app.Bn2XrulZ.js} +2 -2
  126. package/web/app/immutable/entry/start.DdzwOLyS.js +1 -0
  127. package/web/app/immutable/nodes/{0.BIgrj7tk.js → 0.BCyk8Eor.js} +1 -1
  128. package/web/app/immutable/nodes/{1.BS4qG73n.js → 1.D2GMUxe6.js} +1 -1
  129. package/web/app/immutable/nodes/{10.CoUmfWJP.js → 10.CqLjvueR.js} +4 -4
  130. package/web/app/immutable/nodes/{11.Cp19-DaX.js → 11.DjHiLQV_.js} +1 -1
  131. package/web/app/immutable/nodes/{15._NKX_puo.js → 15.DBgLfjTo.js} +1 -1
  132. package/web/app/immutable/nodes/{19.CrIpgdrd.js → 19.C65aoXG7.js} +2 -2
  133. package/web/app/immutable/nodes/{2.B-ARMoF4.js → 2.DyILpfUv.js} +4 -4
  134. package/web/app/immutable/nodes/{3.CeiKZ0d6.js → 3.BUXW6SHm.js} +1 -1
  135. package/web/app/immutable/nodes/{4.-s0Jfvde.js → 4.IOdsbvEy.js} +1 -1
  136. package/web/app/immutable/nodes/{5.BIDxYMYJ.js → 5.CdjllGpy.js} +1 -1
  137. package/web/app/immutable/nodes/{6.3fDeScAq.js → 6.B9bgqfmM.js} +1 -1
  138. package/web/app/immutable/nodes/{7.DydkXABx.js → 7.CJeEPi1x.js} +1 -1
  139. package/web/app/immutable/nodes/{8.DyQruTiJ.js → 8.CoXwlNYv.js} +1 -1
  140. package/web/app/immutable/nodes/{9.D0w1njvH.js → 9.B7TZvLdB.js} +4 -4
  141. package/web/app/version.json +1 -1
  142. package/web/index.html +9 -9
  143. package/web/app/immutable/entry/start.CtWgyCM1.js +0 -1
@@ -1,4 +1,4 @@
1
- var M_=Object.defineProperty;var Ag=n=>{throw TypeError(n)};var E_=(n,r,a)=>r in n?M_(n,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[r]=a;var Qs=(n,r,a)=>E_(n,typeof r!="symbol"?r+"":r,a),q_=(n,r,a)=>r.has(n)||Ag("Cannot "+a);var Co=(n,r,a)=>(q_(n,r,"read from private field"),a?a.call(n):r.get(n)),Mg=(n,r,a)=>r.has(n)?Ag("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,a);import{t as dn,bo as Z,bw as un,bp as nf,b as gn,bm as g,bq as Dr,bs as fe,br as Ei}from"./ClpAEjbe.js";import{bs as pn,a5 as I,bf as fs,bA as b,W as p,bn as fn,aA as ee,aB as E,ca as le,a7 as Bt,ay as ye,aD as e,cd as Nn,c9 as o,bS as m,bl as de,be as In,b_ as q,bO as z,c5 as ct,bH as _,bV as _e,bj as Es,bk as to,b$ as _n,ai as Od,aj as ps,bo as Wl,br as Rr,c0 as Lt,cb as nd,aw as _i,a as L_}from"./CJxGDkBm.js";import{i as B}from"./wmcYjLAa.js";import{k as ki}from"./Xh71Wbuh.js";import{g as Hn,i as H_,I as Mo,p as Eo,e as To}from"./BwASeArv.js";import{n as Dt,l as ma,c as Zs,j as Eg,k as Ho,h as O_}from"./oXpJ1LFx.js";import{b as rf,e as Fd,f as ke,s as Ue,c as Ut,g as gs}from"./CnGVh7I3.js";import{b as F_}from"./DfTSMq0b.js";import{b as hr}from"./NtFyWdpR.js";import{m as D_,U as N_,Z as B_,X as W_,Y as U_,I as qg,o as z_,l as j_,a2 as V_,x as Lg,$ as G_,a0 as Hg,r as K_,s as Q_}from"./DyOuvQsx.js";import{Jq as O,fo as J_,eW as Y_,f3 as X_,eX as Z_,f1 as ew,f0 as tw,eZ as nw,e$ as rw,eY as aw,rs as sw,c6 as ow,i as Si,I$ as iw,D8 as af,Dd as lw,Df as Og,Dc as cw,De as dw,vB as uw,vD as gw,Cl as sf,cp as pw,cn as fw,Bu as vw,bE as hw,A0 as mw,Ca as rd,uZ as _w,cq as Fg,dB as ww,dC as bw,Ck as yw,el as Iw,CE as Sw,CD as $w,CI as kw,CH as xw,cQ as Cw,cT as Pw,nA as Rw,er as Tw,wO as Aw,CJ as Mw,wQ as Ew,CK as qw,cU as Lw,cV as Hw,nI as Ow,Ad as Fw,Dp as Dw,wj as Nw,wk as Bw,yY as Ww,z0 as ad,wf as Uw,wg as zw,rQ as jw,rd as Vw,rb as Gw,f_ as Kw,HK as Qw,Le as Jw,GI as Yw,gn as Xw,p0 as Zw,Je as eb,oh as tb,z$ as nb,ft as Dg,r0 as Ng,fm as rb,fl as ab,tz as sb,g3 as Bg,rc as ob,fe as ib,C5 as lb,m as cb,nJ as db,zE as ub,yW as gb,Ev as pb,Ek as Wg,xe as fb,xf as Ug,uY as zg,p1 as vb,DB as hb,gj as mb,g1 as _b,eU as wb,cM as bb,A3 as yb,Lj as Ib,Cq as Sb,LB as $b,x$ as kb,ga as xb,fd as Cb,cL as Pb,cI as Rb,cH as Tb,vp as Ab,xl as Mb,xj as Eb,cF as qb,cE as Lb,z2 as Hb,yZ as Ob,xk as Fb}from"./CpP1PKzF.js";import{a as Dd}from"./CC7to1B5.js";import{aB as Db,aA as Nb,b1 as Bb,_ as Wb,as as Ub,aD as zb,z as of,R as lf,aV as jb,aP as Vb,ai as jg,J as _l,aN as Vg,aM as Gg,aL as Kg}from"./DsATs4Yw.js";import{k as cf,F as Gb,G as df,ao as Kb,aX as Tl,a5 as uf,Q as Qb,aQ as sd,al as Jb,aD as Yb,B as Xb,y as gf,r as Zb,z as ey,u as ty,aV as ny,aB as pf,aA as ff,aC as ry,aG as od,aN as Qg,aM as wl,aO as Jg,P as Yg,d as ay,e as sy,as as oy,V as Xg,az as iy,c as ly,l as cy,aP as Zg,ak as dy,ar as ep,a as uy,av as gy,a9 as tp,ay as py,aR as np,aU as rp,m as ap,aa as fy,R as vy,at as sp,ah as hy,O as my,an as _y,h as wy,p as by,ax as op,a4 as yy,f as Iy,i as Sy,a2 as $y,a8 as ky}from"./DXT_tHZV.js";import{d as xy,l as Cy,x as Py,v as Ry,k as Ty,Z as ip,a5 as Ay,D as My,c as Ey}from"./BxKppgO5.js";import{g as Ci}from"./DypB-Dwi.js";import{dT as Hl,cR as vf,O as hf,W as qy,bs as Ly,aE as mf,dE as _f,aT as Ao,e4 as Hy,dt as wf,av as Nd,dS as Bd,aM as bf,cM as Oy,V as ha,a3 as Ys,B as Fy,a7 as Dy,a4 as Ny,M as By,a6 as Wy,ar as Uy,aF as yf,aN as Al,r as zy,n as $d,H as jy,dV as Vy,aP as Gy,aJ as Ky,c6 as Qy,aV as Jy,bJ as Yy,bH as Xy,bI as Zy,c5 as eI,c4 as tI,cK as nI,cJ as rI,aR as aI,b9 as sI,bb as oI,be as iI,ba as lI,bj as cI,bd as dI,bc as uI,bf as gI,bg as pI,bi as fI,bh as vI,aw as hI,ax as mI,cg as _I,ch as wI,ds as bI,dr as yI,a_ as II,G as SI,b2 as $I,cc as kI,C as lp,cZ as xI,b8 as ds,bY as CI,X as PI,E as RI,ad as TI,t as AI,cT as MI,d0 as cp,Q as dp,dq as EI,cN as id}from"./D9Ykl3eH.js";import{u as If,a as bl,ag as qI,x as LI,ad as Sf,af as HI,ac as $f,a4 as OI,F as up,D as FI,e as DI,n as NI,s as BI,m as WI,Y as UI,k as zI}from"./DlekFIEJ.js";import{a4 as jI,b5 as VI,cM as GI,a_ as KI,b4 as QI,c2 as JI,c9 as YI,w as XI,x as ZI,cd as eS}from"./eHy-2vQk.js";import{n as tS,P as kf,F as nS,ai as rS,r as aS,ac as sS}from"./CgBcONKs.js";import{I as oS,s as iS,H as gp}from"./Bqd7fdCF.js";import{e as lS}from"./CL3a4Hm1.js";import{e as cS,f as dS}from"./BqoCUMk3.js";import{s as uS,o as Xs,b as gS,g as Ol,d as pS,l as wi}from"./CIyUrgF0.js";import{a4 as fS,a6 as vS,D as hS,M as mS,ab as pp,W as _S,i as wS,r as ir,v as Pi,u as Xr,p as $i,x as mr,S as Wd,m as Ul,s as qo,y as Ri,o as no,n as ro,t as fp,a9 as ao,w as so,a8 as Ud,q as _a,z as Lo,I as kd,Z as vp,g as bS,F as yS,U as xf,H as Cf,a7 as Pf,a5 as Ml,N as IS,E as Rf,R as SS,A as $S,b as kS,aa as xS,ac as yl,e as ld,l as CS,C as PS,f as Js,j as hp,G as us,Q as RS,d as cd,c as TS,a as mp,h as AS,K as MS,X as _p,a3 as dd,a0 as wp,$ as ES,a2 as bp,_ as yp,T as qS,B as LS,k as HS,a1 as OS,J as FS,P as DS,O as NS,V as BS}from"./BQ0lhaiw.js";import{m as WS}from"./PVXvIyE8.js";import{g as Tf}from"./0LjODXcP.js";import{b as US}from"./C5TH9nNS.js";import{g as zS}from"./BriVXGmT.js";import{a as jS}from"./CvXttgUy.js";import{q as Af,d as lr,r as VS,e as Fl,j as GS,g as xd,i as KS,f as Cd,c as QS,A as JS,O as Ip,k as YS}from"./DoKriIRg.js";import{P as XS}from"./Dp3fRAus.js";import{e as ZS}from"./DemmMiIF.js";import{b as e$,a as t$,g as n$,c as r$,i as a$}from"./CNcD7ed8.js";import{R as s$,g as o$,W as Il,c as i$}from"./BFAXN_U2.js";import"./Gb7Ohwuc.js";import"./BYiyLeZ4.js";import{s as Ti}from"./WSVFXKpL.js";import{F as l$,h as c$}from"./CPDV_dyu.js";import"./Qt_rZNko.js";import{C as d$,e as Or,L as u$,l as zl,d as jl,K as Vl,h as zd,M as Gl,S as Da}from"./B06RKBOm.js";import{D as g$}from"./CHXqkR4Y.js";import{f as Sp}from"./D35mkEt2.js";import"./BoIfXiRv.js";import{i as Mf}from"./D-g0wh54.js";import{h as $p,i as kp,g as xp,P as Cp,C as p$,m as El,R as f$}from"./C1zxTHwk.js";import{f as xt,ae as v$}from"./BVi5KkOP.js";import{F as pt,bs as h$,cd as m$,aw as Na,a2 as Ef,c9 as _$,bf as w$,be as b$,bg as y$,aO as Pp,aj as ud,aB as gd,bB as qf,d3 as Dl,cF as I$,aM as Rp,cb as Tp,cK as Nl,bu as S$,aS as $$,d0 as k$,a8 as Lf,ac as x$,ag as C$,cr as P$,ba as R$,aC as Hf,cT as Ap,cz as T$,ax as A$,cD as M$,c3 as E$}from"./CtJxHvGv.js";import{c as Of}from"./ChTqQfQN.js";import"./BeYVt6Wg.js";import{c as Rt}from"./DSqSJXGX.js";import{a5 as Ff,bg as q$,ar as L$,k as H$,Y as O$,W as F$,a2 as D$,Z as N$,bw as B$,V as W$,a1 as U$,ah as z$}from"./CVA75Jzf.js";import{d as Bl,f as j$,e as V$}from"./DpqgMZNx.js";import{A as G$}from"./BCrI1nnw.js";import{D as K$}from"./DnYPeWf9.js";import"./B5wwCKYG.js";import{a as Q$,C as J$}from"./BTW5Qz3T.js";import"./V7b2Jgc1.js";import{C as Y$}from"./C7RGdxsV.js";import{h as Pd,r as X$,a as Z$}from"./paBp5EDQ.js";import{s as ek}from"./CRpGhS3h.js";import{I as tk,a as nk}from"./MZe3NxQe.js";import{L as rk}from"./CIMWDf4a.js";import{g as ak,f as sk,b as ok}from"./b89lNINv.js";import{s as Ai,g as Kn,i as ik,j as lk,e as Mp,r as Ep,f as ck,d as dk,a as pd,h as uk}from"./D0WHOKE3.js";import{i as qp,a as gk}from"./Bu13V5mO.js";import{seekConversationToMessage as Lp}from"./kRDyYnu-.js";import{l as Yt,o as fd,h as jd,n as Rd,q as pk}from"./By588DV1.js";import{o as fk}from"./Byc-Gwn1.js";import{A as Df}from"./BQgCURYe.js";import{b as Nf}from"./Dd5ei__B.js";import{g as vk,e as Bf,v as hk,f as mk,N as _k,M as wk,K as bk,k as Wf,l as yk,H as Uf,s as zf}from"./Ck2JBj0W.js";import{selectCurrentWorkspaceTabId as vd}from"./DujUyPvo.js";import{o as Ik}from"./a_hFrVUs.js";import{d as Sk}from"./B0Z-1lwJ.js";import{P as $k}from"./BHjJ9bUD.js";import{g as kk}from"./Buf2XX2m.js";import{H as jf,M as xk,y as Ck,g as Pk,i as Rk,u as Tk,e as Vf,c as Gf,d as Ak}from"./Ct82vzld.js";import{c as Mk,h as Vd,f as Kf,M as Ek}from"./B6-GEB4b.js";import{t as qk}from"./DAsc1V4f.js";import{s as Lk}from"./BsieX9dN.js";import{i as Qf}from"./D95Y9O1z.js";import{d as Hk,i as Ok,r as Fk}from"./CTV49dzf.js";import{g as Dk}from"./CsFPvReh.js";var Nk=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),Bk=E("<div><!></div>");function Jf(n,r){if(new.target)return dn({component:Jf,...n});pn(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),c=Z(r,"children",7),l=nf(r,Nk);var f={get ref(){return a()},set ref(v=null){a(v),ee()},get class(){return i()},set class(v){i(v),ee()},get children(){return c()},set children(v){c(v),ee()},$set:un,$on:(v,R)=>gn(r,v,R)},u=Bk();rf(u,v=>({"data-slot":"card-header",class:v,...l}),[()=>Fd("@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]",Y$,i())]);var w=I(u);return Ti(w,()=>c()??fs),b(u),hr(u,v=>a(v),()=>a()),p(n,u),fn(f)}var Wk=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),Uk=E("<div><!></div>");function Yf(n,r){if(new.target)return dn({component:Yf,...n});pn(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),c=Z(r,"children",7),l=nf(r,Wk);var f={get ref(){return a()},set ref(v=null){a(v),ee()},get class(){return i()},set class(v){i(v),ee()},get children(){return c()},set children(v){c(v),ee()},$set:un,$on:(v,R)=>gn(r,v,R)},u=Uk();rf(u,v=>({"data-slot":"card-title",class:v,...l}),[()=>Fd("type-title min-w-0 break-words font-semibold leading-tight text-foreground",i())]);var w=I(u);return Ti(w,()=>c()??fs),b(u),hr(u,v=>a(v),()=>a()),p(n,u),fn(f)}const Sl=oS.CHAT_MEDIA,hd=uS().min(1).max(512);Xs({workspaceId:hd,agentId:hd,draftId:Ol(),principalId:hd,media:gS(tS).min(1).max(20)}).strict();const zk=Xs({sessionId:Ol()}).strict();zk.extend({control:pS("action",[Xs({action:wi("readiness")}).strict(),Xs({action:wi("export"),request:cS}).strict(),Xs({action:wi("transcribe"),request:dS}).strict(),Xs({action:wi("release"),jobId:Ol()}).strict(),Xs({action:wi("adopt"),jobId:Ol()}).strict()])}).strict();function Gd(n,r,a,i=async(c,l)=>typeof window>"u"||iS(window)!=="electron"?{ok:!1,error:"unavailable"}:lS().invoke(c,l)){let c=null,l=null,f=!1;async function u(){f=!0,a.removeEventListener("abort",w);const x=c;c=null,x&&await i(Sl.CLOSE,{sessionId:x}).catch(()=>{})}const w=()=>{u()};a.addEventListener("abort",w,{once:!0});const v=()=>{if(f||a.aborted||!r())throw new Error("media-send-retired")};async function R(){if(v(),c)return c;if(l)return l;l=(async()=>{const x=await i(Sl.BEGIN,n);if(!x.ok)throw new Error("media-export-unavailable");c=x.value.sessionId;try{return v(),c}catch(F){throw await u(),F}})();try{return await l}finally{l=null}}async function y(x){const F=await R();v();const D=await i(Sl.CONTROL,{sessionId:F,control:x});return v(),D}return{service:{exportMedia:x=>y({action:"export",request:x}),adoptMediaJob:x=>y({action:"adopt",jobId:x}),transcribeMedia:x=>y({action:"transcribe",request:x}),releaseMediaJob:async x=>c?await i(Sl.CONTROL,{sessionId:c,control:{action:"release",jobId:x}}):{ok:!0,value:void 0}},dispose:u,readiness:()=>y({action:"readiness"})}}const md=new Set;async function jk(n){const{drafts:r,signal:a}=n,i=structuredClone(n.capture),c=structuredClone(n.items),l=structuredClone(n.payload),{workspaceId:f,agentId:u}=i,w=Ci(O.state),v=Hl.select(O.state,f),R=vf.select(O.state),y=cf(),M=JSON.stringify([w,f,u]);if(!w||!v||!R||l.wsId!==f||md.has(M))return!1;md.add(M);const x=new AbortController,F=()=>x.abort();a.addEventListener("abort",F,{once:!0});const D=()=>!a.aborted&&!x.signal.aborted&&Ci(O.state)===w&&Hl.select(O.state,f)===v&&uf(y)&&r.isCurrentDraft(i),T=O.getReadableState().subscribe(()=>{D()||x.abort()});let H=null;try{if(!D()||jI(c))return!1;const V=If(i.attachments),oe=kf(nS(f,u),V,c.map(ue=>({contextItemId:ue.id,attachmentId:ue.attachmentId,path:ue.path}))),P=new Set([...oe.images,...oe.clips].map(ue=>ue.contextItemId));if(V.some(([ue])=>!P.has(ue))||oe.images.some(ue=>ue.mediaError)||oe.clips.some(ue=>ue.mediaError)||!rS(l.text,oe))throw new Error("invalid-evidence");if(H=n.warm?.take(i,x.signal)??null,!await r.flushDraft(i)||!D())return!1;const k=await xy.agents.get(u,f);if(!D())return!1;if(!k||k.workspaceId!==f||k.retiredAt||k.pendingDeleteAt||k.status==="deleted")throw new Error("unavailable");const Q=oe.clips.flatMap(ue=>ue.media?[ue.media]:[]);Q.length&&!H&&(H=Gd({workspaceId:f,agentId:u,draftId:crypto.randomUUID(),principalId:R.principal.id,media:Q},D,x.signal));const ge=Gb(c,oe),Re=df(ge),ve=await Kb({workspaceId:f,agentId:u,evidence:oe,clickedItems:c,sendItems:ge,clickedPayload:{...l,contextItems:ge,imageBlocks:Re.imageBlocks,fileBlocks:Re.fileBlocks},binding:y,service:H?.service??null,current:D,onRecord:()=>{}});return!ve||!D()?!1:Tl(O,u,ve)}catch{return D()&&O.dispatch(J_(u,g.dock_conversation_sendFailed_error())),!1}finally{T(),a.removeEventListener("abort",F),await H?.dispose(),md.delete(M)}}const Xf=1e4,Hp={wasBusy:!1,busySince:null,preempted:!1,prediction:null};function Op(n){return fS(n.messageMetadata)}function Vk(n,r){if(n.some(Op)){const a=n[0];return a&&!Op(a)&&Fp(a,r)?[a.id]:[]}return n.filter(a=>Fp(a,r)).map(a=>a.id)}function Gk(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 Fp(n,r){return!n.requeuedAfterFailure&&vS(n,r)}function Kk(n,r){const{busy:a,queue:i,delivered:c,now:l}=r,f=r.blocked||r.interrupted,u=r.timeoutMs??Xf;let w=n.prediction;if(w){const x=new Set(i.map(H=>H.id)),F=w.ids.filter(H=>x.has(H)&&!c.has(H)),D=l-w.startedAt>=u,T=n.wasBusy&&!a;!F.length||D||f&&!a||T?w=null:F.length!==w.ids.length&&(w={...w,ids:F})}const v=n.wasBusy&&!a,R=n.wasBusy?n.busySince:a?l:null,y=n.wasBusy&&n.preempted||R!==null&&r.directSendAt!==null&&r.directSendAt>R;if(!w&&v&&!f&&!y){const x=Vk(i,l).filter(F=>!c.has(F));x.length&&(w={ids:x,startedAt:l})}const M={wasBusy:a,busySince:a?R:null,preempted:a&&y,prediction:w};return n.wasBusy===M.wasBusy&&n.busySince===M.busySince&&n.preempted===M.preempted&&n.prediction===M.prediction?n:M}class Qk{constructor(){Qs(this,"previousWorkspaceId",null);Qs(this,"_isRebinding",!1);Qs(this,"_generation",0);Qs(this,"_rebindPromise",null);Qs(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(f=>{c=setTimeout(()=>f(!0),i)})]);if(clearTimeout(c),l)return!1}return!0}}function Jk(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 Dp(n){const r=typeof n=="string"?n:n&&typeof n=="object"&&typeof n.script=="string"?n.script:void 0;return r||void 0}var Yk=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 Zf(n,r){if(new.target)return dn({component:Zf,...n});pn(r,!0);const a=()=>fe(R,"$typing$",i),[i,c]=Dr();let l=Z(r,"workspaceId",7),f=Z(r,"agentId",7),u=Z(r,"class",7,"");const w=Nn(""),v=Nn("");le(()=>{w.set(l())}),le(()=>{v.set(f())});const R=VI(w,v),y=o(()=>ZS(a()));var M={get workspaceId(){return l()},set workspaceId(H){l(H),ee()},get agentId(){return f()},set agentId(H){f(H),ee()},get class(){return u()},set class(H=""){u(H),ee()},$set:un,$on:(H,V)=>gn(r,H,V)},x=Bt(),F=ye(x);{var D=H=>{var V=Yk(),oe=I(V),P=I(oe);XS(P,{get people(){return a()},size:12,decorative:!0}),b(oe);var k=m(oe,2),Q=de(k,!0);In(2),b(V),q(()=>{ke(V,1,`${Af} 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 ${u()??""} /* a11y-ignore: user-requested compact typing status in the composer gap */`,"svelte-lm4khl"),z(Q,e(y))}),p(H,V)};B(F,H=>{e(y)&&H(D)})}p(n,x);var T=fn(M);return c(),T}const Xk=50,Zk=5e3,ex=500,tx=()=>({authority:()=>Ci(O.state),persistSnapshot:Jb,dispatch:n=>O.dispatch(n),ownerView:n=>Yb.withStore(O)(n)});function nx(n){const r=n.store??tx(),a=crypto.randomUUID();let i=_e(!1),c=_e(!1),l=_e(!1),f=null,u=null,w=0,v=!1,R=null,y=null,M=null,x=0,F=null,D=null;const T={};let H,V=_e([]),oe=null,P=0,k="",Q=0,ge="";const Re=()=>{const N=n.workspaceId(),C=n.agentId();if(!N||!C||!(n.active?.()??!0))return null;const re=r.authority?.();if(!re||v)return null;const Te=n.inputValue(),L=ue(),Y=H?.shared,J=Y?.workspaceId===N&&Y.agentId===C?Y.lifetime:null,be=JSON.stringify([re,N,C,x,J,L.map(U=>[U.id,U.attachmentId,U.path])]);be!==ge&&(ge=be,Q+=1);const Ne=JSON.stringify([re,N,C,Te,L,x]);return Ne!==k&&(k=Ne,P+=1),{authority:re,ownerId:a,workspaceId:N,agentId:C,text:Te,attachments:JSON.parse(JSON.stringify(L)),generation:P,attachmentEpoch:Q}};let ve=null;const ue=()=>qI(n.contextItems(),LI(n.contextItems(),e(V))),we=N=>{if(H=N,!N||v)return;const C=N.restore;if(D&&C?.requestId===D.requestId&&C.status!=="pending"){const{apply:L}=D;D=null,_(c,!1),C.status==="restored"&&_(V,C.draft?.attachments??[]),L(C)}const re=N.shared;if(re&&!e(c)&&u===`${re.workspaceId}\0${re.agentId}`){const L=JSON.stringify([re.provenance,re.workspaceId,re.agentId,re.lifetime,re.revision]);if(oe!==L){oe=L;const Y=ve??f,J=Y&&n.inputValue()===Y.text&&JSON.stringify(ue())===Y.attachmentsJson;re.origin===a?ve={text:re.snapshot.text,attachmentsJson:JSON.stringify(re.snapshot.attachments)}:J&&(w+=1,M&&clearTimeout(M),_(V,re.snapshot.attachments),ve=f={text:re.snapshot.text,attachmentsJson:JSON.stringify(e(V))},n.setInputValue(re.snapshot.text),n.setContextItems(bl(e(V))),n.applyEditorContent(re.snapshot.text))}}ct(Re);const Te=[];for(const L of N.saves){if(L.status==="pending")continue;Te.push(L.id);const Y=T[L.id];delete T[L.id],Y?.(L)}Te.length>0&&queueMicrotask(()=>r.dispatch(ew(a,Te)))},ne=(N,C,re)=>{const Te=crypto.randomUUID();D={requestId:Te,apply:re},_(c,!0),r.dispatch(nw(a,Te,N,C))},te=()=>{D&&(D=null,_(c,!1),r.dispatch(aw(a)))},ze=()=>{const N=F;N&&(F=null,r.dispatch(rw(a)),H?.saves.some(C=>C.id===N)||delete T[N])};r.dispatch(Y_(a));const se=r.ownerView(a).subscribe(N=>ct(()=>we(N))),he=()=>{y&&(clearTimeout(y),y=null),_(l,!1)},Me=()=>{F&&(F=null,r.dispatch(tw(a)))};le(()=>{const N=n.active?.()??!0,C=n.workspaceId(),re=n.agentId();if(!N){ct(()=>{w+=1,u=null,te(),R&&clearTimeout(R),R=null,he(),M&&clearTimeout(M),M=null,_(i,!1),Me()});return}if(!C||!re)return;const Te=`${C}\0${re}`;if(u===Te)return;const L=u!==null;u=Te;const Y=++w;ct(()=>{f=null,ve=null,oe=null,_(V,[]),R&&clearTimeout(R),he(),M&&(clearTimeout(M),M=null),L&&(Me(),n.setInputValue(""),n.contextItemsAreScoped||n.setContextItems([]),n.applyEditorContent(""));const J=Qb(C,re);if(J){_(V,J.attachments),_(i,!1);const Ne=n.contextItems().length>0,U=J.text,Ie=JSON.stringify(J.attachments);n.setInputValue(J.text),Ne||n.setContextItems(bl(J.attachments)),n.applyEditorContent(J.text),f={text:J.text,attachmentsJson:Ie},ne(C,re,Ce=>{if(Ce.status!=="restored")return;const Le=Ce.draft;if(v||!(n.active?.()??!0)||u!==Te||w!==Y)return;const st=Le?.text??"",Xe=Le?.attachments??[],He=JSON.stringify(Xe);sd(C,re,{text:st,attachments:Xe});const Pe=n.inputValue()===U&&JSON.stringify(ue())===Ie;Ne||!Pe||(st!==U&&(n.setInputValue(st),n.applyEditorContent(st)),He!==Ie&&n.setContextItems(bl(Xe)),f={text:st,attachmentsJson:He})});return}_(i,!0),y=setTimeout(()=>{y=null,(n.active?.()??!0)&&_(l,!0)},ex),R=setTimeout(()=>{(n.active?.()??!0)&&(_(i,!1),he())},Zk);const be=()=>{!(n.active?.()??!0)||u!==Te||w!==Y||(R&&clearTimeout(R),_(i,!1),he())};ne(C,re,Ne=>{if(Ne.status!=="restored"){be();return}const U=Ne.draft;if(v||!(n.active?.()??!0)||u!==Te||w!==Y)return;const Ie=!!n.inputValue();if(!Ie&&U?.attachments?.length&&n.contextItems().length===0&&n.setContextItems(bl(U.attachments)),!Ie&&U?.text&&(n.setInputValue(U.text),M=setTimeout(()=>{(n.active?.()??!0)&&n.inputValue()===U.text&&n.applyEditorContent(U.text)},Xk)),f===null){const Ce=U?.text??"",Le=U?.attachments??[];f={text:Ce,attachmentsJson:JSON.stringify(Le)},sd(C,re,{text:Ce,attachments:Le})}be()})})}),le(()=>{const N=n.active?.()??!0,C=n.workspaceId(),re=n.agentId(),Te=e(i);if(!N){ct(ze);return}if(!C||!re)return;const L=n.inputValue(),Y=ue();if(ct(Re),ct(ze),Te||f===null&&!L&&Y.length===0)return;const J=JSON.stringify(Y);if(f!==null&&f.text===L&&f.attachmentsJson===J)return;JSON.stringify(e(V))!==J&&_(V,Y);const be=`${C}\0${re}`,Ne=x,U=crypto.randomUUID();T[U]=Ie=>{if(n.active?.()??!0){if(Ie.status==="saved"){u===be&&x===Ne&&(f={text:L,attachmentsJson:J});return}n.onSaveError?.(new Error(Ie.error))}},ct(()=>{F=U,r.dispatch(X_(a,U,{authority:r.authority?.()??void 0,workspaceId:C,agentId:re,text:L,attachments:Y,rollback:f?{text:f.text,attachments:JSON.parse(f.attachmentsJson)}:null}))})}),le(()=>()=>{v=!0,R&&clearTimeout(R),y&&clearTimeout(y),M&&clearTimeout(M),Me(),se(),r.dispatch(Z_(a))});const Ee=N=>{const C=Re();return C!==null&&C.authority===N.authority&&C.ownerId===N.ownerId&&C.workspaceId===N.workspaceId&&C.agentId===N.agentId&&C.generation===N.generation&&C.text===N.text&&JSON.stringify(C.attachments)===JSON.stringify(N.attachments)};return{captureDraft:Re,isCurrentDraft:Ee,updateAttachmentScreen(N,C,re){return!Ee(N)||!N.attachments.some(Te=>Te.id===C)?null:(_(V,N.attachments.map(Te=>Te.id===C?{...Te,screen:structuredClone(re)}:Te)),Re())},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(w+=1,x+=1,te(),R&&(clearTimeout(R),R=null),M&&(clearTimeout(M),M=null),_(i,!1),he(),ze(),u!==null){const[N,C]=u.split("\0");sd(N,C,{text:"",attachments:[]}),ve=null,_(V,[]),f={text:"",attachmentsJson:"[]"}}}}}function Mi(n){if(!n)return null;const r=kf(JSON.stringify([n.workspaceId,n.agentId]),If(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 rx(n,r,a){const i=O.state.principal.snapshot,c=()=>Ci(O.state)===n.authority&&a.isCurrentDraft(n);if(!i||!c()||!await a.flushDraft(n)||!c())return{ready:!1};const l=new AbortController,f=Gd({workspaceId:n.workspaceId,agentId:n.agentId,principalId:i.principal.id,draftId:crypto.randomUUID(),media:[r]},c,l.signal);try{const u=await f.readiness();return!c()||!u.ok?{ready:!1}:u.value.find(w=>w.sourceId===r.source.id)??{ready:!1}}finally{await f.dispose()}}function Np(n){let r=_e(null),a=_e(!1),i=_e(!1),c=null,l=!0,f=0,u=null;Es(()=>{l=!1,f++}),le(()=>{const y=n.capture();e(r)&&(!y||y.authority!==e(r).capture.authority||y.ownerId!==e(r).capture.ownerId||y.workspaceId!==e(r).capture.workspaceId||y.agentId!==e(r).capture.agentId||y.attachmentEpoch!==e(r).capture.attachmentEpoch)&&_(r,null)});async function w(y){if(n.disabled()||e(a))return;const M=n.drafts.captureDraft(),x=Mi(M),F=x?.clips.find(V=>V.contextItemId===y);if(!M||!F?.media||!x)return;const D=Xb({workspaceId:M.workspaceId,agentId:M.agentId,clip:F,evidence:x,marks:x.marks}),T=gf(M.workspaceId,F.path);if(!D||!T)return;const H=++f;c=document.activeElement instanceof HTMLElement?document.activeElement:null,_(a,!0),_(i,!1);try{if(await n.beforeOpen?.(),!l||f!==H||!n.drafts.isCurrentDraft(M))return;const V=await(n.prepareOutput??rx)(M,F.media,n.drafts);if(!l||f!==H||!n.drafts.isCurrentDraft(M))return;const{attachmentPath:oe,...P}=D;_(r,{capture:M,contextItemId:y,snapshot:{...P,openId:crypto.randomUUID(),mediaUrl:T,output:V,deleteReady:!0}})}catch{l&&f===H&&_(i,!0)}finally{l&&f===H&&_(a,!1)}}async function v(y){const M=crypto.randomUUID(),x=e(r),F=n.drafts.captureDraft();if(!x||!F||F.authority!==x.capture.authority||F.ownerId!==x.capture.ownerId||F.workspaceId!==x.capture.workspaceId||F.agentId!==x.capture.agentId||F.attachmentEpoch!==x.capture.attachmentEpoch)return{requestId:M,result:"stale-source"};const D=Mi(F),T=D?.clips.find(Q=>Q.contextItemId===x.contextItemId);if(!D||!T?.media)return{requestId:M,result:"stale-source"};const V=u?.openId===x.snapshot.openId&&u.inputRevision===y.revision&&JSON.stringify(u.media)===JSON.stringify(T.media)?{...y,revision:T.media.saved?.revision??0}:y,oe=aS(T.media,{openId:x.snapshot.openId,...x.snapshot.output?.version===2?{outputVersion:2}:{},pair:{workspaceId:F.workspaceId,agentId:F.agentId},sourceId:y.sourceId,sourceRevision:y.sourceRevision,expectedEditRevision:V.revision,edit:V});if(oe.status!=="saved")return{requestId:M,result:oe.status==="invalid-edit"?"failed":oe.status};const P=sS({...D,clips:D.clips.map(Q=>Q.id===T.id?{...Q,media:oe.media}:Q)})[x.contextItemId],k=n.drafts.updateAttachmentScreen(F,x.contextItemId,P);if(!k)return{requestId:M,result:"stale-source"};u={openId:x.snapshot.openId,media:oe.media,inputRevision:y.revision};try{if(!n.drafts.isCurrentDraft(k))return{requestId:M,result:"stale-source"};await n.drafts.flushDraft(k);const Q=n.drafts.captureDraft();return!l||e(r)?.snapshot.openId!==x.snapshot.openId||!Q||Q.attachmentEpoch!==x.capture.attachmentEpoch||Q.authority!==k.authority||Q.ownerId!==k.ownerId||Q.workspaceId!==k.workspaceId||Q.agentId!==k.agentId||JSON.stringify(Q.attachments.find(ge=>ge.id===x.contextItemId)?.screen)!==JSON.stringify(P)?{requestId:M,result:"stale-source"}:(u=null,{requestId:M,result:"saved",saved:oe.media.saved??void 0})}catch{return{requestId:M,result:"failed"}}}function R(y){return n.disabled()||!n.onRemove(y)?!1:(e(r)?.contextItemId===y&&_(r,null),!0)}return{get session(){return e(r)},get opening(){return e(a)},get problem(){return e(i)},open:w,save:v,remove:R,close(){_(r,null)},restoreFocus(){c?.isConnected&&c.focus()}}}var ax=E('<p role="alert"> </p>'),sx=E('<div class="recording-editor-surface svelte-cdb16"><!></div>'),ox=E("<!> <!> <!>",1);function ev(n,r){if(new.target)return dn({component:ev,...n});pn(r,!0);let a=Z(r,"capture",7),i=Z(r,"drafts",7),c=Z(r,"disabled",7,!1),l=Z(r,"onRemove",7),f=Z(r,"controllerFactory",7,Np),u=Z(r,"beforeOpen",7),w=Z(r,"onReviewChange",7);const v=ct(()=>f()({drafts:i(),capture:()=>a(),disabled:()=>c(),onRemove:P=>l()(P),beforeOpen:()=>u()?.()??Promise.resolve()}));le(()=>{const P=v.opening,k=v.session;ct(()=>w()?.(P,k?.snapshot.output?.ready?{openId:k.snapshot.openId,capture:k.capture}:null))});const R=o(Zb),y=o(()=>Mi(a())),M=o(()=>e(y)?.clips.map(P=>({id:P.contextItemId,kind:"clip",owner:"evidence",duration:Sp(P.durationMs),recording:!1,url:a()?gf(a().workspaceId,P.path):void 0,...P.media?.saved?{summary:ey(P.media.saved)}:{}}))??[]);let x=_e(null);var F={get capture(){return a()},set capture(P){a(P),ee()},get drafts(){return i()},set drafts(P){i(P),ee()},get disabled(){return c()},set disabled(P=!1){c(P),ee()},get onRemove(){return l()},set onRemove(P){l(P),ee()},get controllerFactory(){return f()},set controllerFactory(P=Np){f(P),ee()},get beforeOpen(){return u()},set beforeOpen(P){u(P),ee()},get onReviewChange(){return w()},set onReviewChange(P){w(P),ee()},$set:un,$on:(P,k)=>gn(r,P,k)},D=ox(),T=ye(D);{let P=o(()=>c()||v.opening);hS(T,{get items(){return e(M)},get labels(){return e(R)},get disabled(){return e(P)},onEdit:k=>void v.open(k),onMarkUp:k=>void v.open(k),get onRemove(){return v.remove}})}var H=m(T,2);{var V=P=>{var k=ax(),Q=de(k,!0);q(ge=>z(Q,ge),[()=>g.dock_captureEditor_saveFailed_label()]),p(P,k)};B(H,P=>{v.problem&&P(V)})}var oe=m(H,2);{let P=o(()=>!!v.session),k=o(()=>g.dock_captureEditor_recording_title({duration:v.session?Sp(v.session.snapshot.durationMs??0):""}));d$(oe,{get open(){return e(P)},size:"editor",showCloseButton:!1,get title(){return e(k)},escapeKeydownBehavior:"ignore",dismissOnInteractOutside:!1,onClose:()=>v.close(),onCloseAutoFocus:Q=>{Q.preventDefault(),v.restoreFocus()},get contentRef(){return e(x)},set contentRef(Q){_(x,Q,!0)},children:(Q,ge)=>{var Re=Bt(),ve=ye(Re);{var ue=we=>{var ne=Bt(),te=ye(ne);ki(te,()=>v.session.snapshot.openId,ze=>{var se=sx(),he=I(se);g$(he,{get snapshot(){return v.session.snapshot},get shortcutDialog(){return e(x)},onClose:()=>v.close(),get onSave(){return v.save},onDelete:async()=>!!v.session&&v.remove(v.session.contextItemId)}),b(se),p(ze,se)}),p(we,ne)};B(ve,we=>{v.session&&we(ue)})}p(Q,Re)},$$slots:{default:!0}})}return p(n,D),fn(F)}const $l=n=>JSON.stringify([n.authority,n.ownerId,n.workspaceId,n.agentId,n.attachmentEpoch,n.attachments]);function ix(n){let r=_e(!1),a=_e(!1),i=_e(null),c=!1,l=0,f=null,u=null;async function w(y){y.abort.abort(),y.slot?.cancel(),await y.native?.dispose()}async function v(){l++;const y=u;u=null,y&&await w(y)}to(()=>{const y=()=>{_(r,document.hasFocus(),!0)};return y(),window.addEventListener("focus",y),window.addEventListener("blur",y),()=>{window.removeEventListener("focus",y),window.removeEventListener("blur",y)}});const R=O.getReadableState().subscribe(()=>{u&&!u.current()&&v()});return Es(()=>{c=!0,R(),v()}),le(()=>{const y=n.capture(),M=y?$l(y):"",x=e(r)&&!e(a)&&(n.active()||e(i)?.key===M);ct(()=>{if(!x||!y){v();return}if(u?.key===M)return;if(f===M){v();return}v();const D=Mi(y)?.clips.flatMap(Re=>!Re.mediaError&&Re.media?[Re.media]:[])??[],T=D[0],H=O.state.principal.snapshot,V=Hl.select(O.state,y.workspaceId);if(!T||!H||!V||n.drafts.gateActive)return;const oe=cf(),P=new AbortController,k=()=>!c&&!P.signal.aborted&&Ci(O.state)===y.authority&&Hl.select(O.state,y.workspaceId)===V&&uf(oe)&&!!n.capture()&&$l(n.capture())===M,Q={key:M,capture:y,abort:P,native:null,slot:null,current:k};u=Q;const ge=l;n.drafts.flushDraft(y).then(async Re=>{if(!(u!==Q||ge!==l||!k())){if(!Re){f=M,await v();return}Q.native=Gd({workspaceId:y.workspaceId,agentId:y.agentId,draftId:crypto.randomUUID(),principalId:H.principal.id,media:structuredClone(D)},k,P.signal),Q.slot=ty(Q.native.service),f=M,Q.slot.warm(M,T,k)}}).catch(()=>{u===Q&&v()})})}),{cancel:v,async beforeEditorOpen(){_(a,!0),f=null,await v()},editorState(y,M){_(a,y,!0);const x=M?$l(M.capture):null;M&&e(i)?.openId!==M.openId&&(f=null),_(i,M&&x?{openId:M.openId,key:x}:null)},take(y,M){const x=u;if(!x?.native||!x.slot||x.key!==$l(y)||!x.current())return v(),null;u=null,l++;const F=x.native,D=x.slot,T=()=>x.abort.abort();return M.addEventListener("abort",T,{once:!0}),M.aborted&&T(),{service:{...F.service,takePreparedRecording:H=>D.take(x.key,H,()=>!M.aborted&&x.current())},async dispose(){M.removeEventListener("abort",T),await w(x)}}}}}var lx=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 tv(n,r){if(new.target)return dn({component:tv,...n});pn(r,!1);var a={$set:un,$on:(f,u)=>gn(r,f,u)};Mf();var i=lx(),c=I(i),l=de(c,!0);return b(i),q(f=>z(l,f),[()=>g.chat_draftGate_loading_label()]),p(n,i),fn(a)}var cx=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 Td(n,r){if(new.target)return dn({component:Td,...n});pn(r,!1);var a={$set:un,$on:(f,u)=>gn(r,f,u)};Mf();var i=cx(),c=m(I(i),2),l=de(c,!0);return In(2),b(i),q((f,u)=>{Ue(i,"aria-label",f),z(l,u)},[()=>g.chat_newMessagesDivider_label(),()=>g.chat_newMessagesDivider_label()]),p(n,i),fn(a)}function dx(n,r){if(!r||n.length===0)return null;const a=n.indexOf(r);return a===-1||a===n.length-1?null:r}function ux(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 gx(n,r){return r&&n.includes(r)?r:null}function Bp(n,r,a){return r-n<=a}const px=.2;function Wp(n,r,a){const i=Math.max(0,a-r),c=n-px*r;return Math.min(Math.max(0,c),i)}function fx(n,r,a){return n!==null&&a&&n===r}function vx(n){return n?sw(n)&&ow(n)!==null&&typeof n.metadata?.taskNoteId=="string":!1}function hx(n){const r=[],a=new Set;let i,c;for(const H of n.messages){if(H.agentId&&H.agentId!==n.agentId){i=void 0,c=void 0;continue}if(a.has(H.id))continue;a.add(H.id),n.breakBeforeMessageIds?.has(H.id)&&(i=void 0,c=void 0);const V=mS(H);if(V?.kind!=="turn-failure")c=void 0;else{const oe=i?.seq!==void 0&&H.seq!==void 0&&Number.isSafeInteger(i.seq)&&Number.isSafeInteger(H.seq)&&H.seq===i.seq+1;(!c||!oe)&&(c={key:JSON.stringify([n.agentId,"notice",H.id]),anchorMessageId:H.id,correlation:"unavailable",records:[],recordedFailureCount:0},r.push(c)),c.records.push({messageId:H.id,reason:V.reason,timestamp:H.timestamp}),c.recordedFailureCount+=1}i=H}const l=new Map;for(const H of n.queue){if(!H.requeuedAfterFailure)continue;const V=H.turnId||void 0,oe=JSON.stringify([n.agentId,V?"turn":"queue",V??H.id]);let P=l.get(oe);P||(P={key:oe,correlation:V?"turn":"queue-entry",turnId:V,queueIds:[],state:"queued"},l.set(oe,P)),P.queueIds.includes(H.id)||P.queueIds.push(H.id)}const f=[...l.values()],u=n.session?.id===n.agentId?n.session:void 0,w=u?.status===Si.Error,v=n.transientError||w&&u.stopReason||null,R=w&&!v,y=w&&(!n.transientError||n.transientError===u.stopReason)?u.stopReasonTimestamp:void 0,M=y?pp(y):null,x=M&&v&&v===u?.stopReason?r.flatMap(H=>H.records).filter(H=>H.reason===v&&pp(H.timestamp)===M):[],F=x.length===1?x[0].messageId:void 0,T=(u?hf(u):!1)?"attempting":f.length?"queued":v||R?"action-needed":"inactive";return{history:r,queueRecovery:f,current:{state:T,error:v,needsFallbackReason:R,timestamp:y,noticeId:F}}}function mx(n,r){const a=n.hiddenTail[0]?.id,i=hx({...r,messages:[...n.groups.flatMap(u=>u.messages),...n.hiddenTail],breakBeforeMessageIds:new Set(a?[a]:[])}),c=i.current.noticeId,l=i.history.map(u=>({...u,records:u.records.filter(w=>w.messageId!==c)})).filter(u=>u.records.length>0),f=new Set(l.map(u=>u.records[0].messageId));return{...i,runsByAnchor:new Map(l.map(u=>[u.records[0].messageId,u])),collapsedMessageIds:new Set(i.history.flatMap(u=>u.records.map(w=>w.messageId).filter(w=>!f.has(w))))}}var _x=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),wx=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),bx=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>'),yx=E('<div class="mb-5"><!></div>'),Ix=E('<p data-testid="agent-welcome-description"> </p> <!>',1),Sx=E("<!> <!>",1),$x=E('<p class="mb-3 px-4 text-sm text-subtle leading-relaxed whitespace-pre-wrap" data-testid="agent-welcome-description"> </p>'),kx=E("<!> <span> </span>",1),xx=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 nv(n,r){if(new.target)return dn({component:nv,...n});pn(r,!0);const a=()=>fe(x,"$userOverrides$",f),i=()=>fe(M,"$specialists$",f),c=()=>fe(H,"$isGitHubAuth$",f),l=()=>fe(V,"$recentSpecialistIds$",f),[f,u]=Dr();let w=Z(r,"onSpecialistChange",7),v=Z(r,"session",7),R=Z(r,"workspaceId",7);const y=Nn(R()??"");le(()=>y.set(R()??""));const M=Ff(y),x=q$();le(()=>{a()});const F=o(()=>{if(!v()||qy(v()))return null;const N=v().metadata?.specialist||v().agentMetadata?.specialist;return N&&i().find(C=>C.id===N)||null});async function D(N){N?await Bl({specialist:N,hash:"specialists"}):await Bl({view:"create-specialist"})}let T=_e(!1);const H=L$(),V=GI(),oe=o(()=>iw(H$(i(),c()),l()));let P=_e(!1);const k=o(()=>g.chat_regularAgentWelcome_generalDescription_label()),Q=o(()=>e(F)?.name??g.chat_shared_general_fallback()),ge=o(()=>e(F)?.description??g.chat_shared_noSpecializedBehavior_label()),Re=o(()=>e(F)?e(F).defaultBehaviorPrompt||"":e(k));var ve={get onSpecialistChange(){return w()},set onSpecialistChange(N){w(N),ee()},get session(){return v()},set session(N){v(N),ee()},get workspaceId(){return R()},set workspaceId(N){R(N),ee()},$set:un,$on:(N,C)=>gn(r,N,C)},ue=xx(),we=I(ue);{var ne=N=>{var C=yx(),re=I(C);K$(re,{class:"block w-full",align:"start",side:"bottom",contentClass:"w-[min(28rem,calc(100vw-2rem))]",get open(){return e(P)},set open(Y){_(P,Y,!0)},trigger:(Y,J)=>{let be=()=>(J?.()).props;{let Ne=o(()=>Fd("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"));xt(Y,Ei(be,{type:"button",variant:"plain",wrapContent:!1,get class(){return e(Ne)},"data-testid":"specialist-picker-trigger",children:(U,Ie)=>{var Ce=_x(),Le=ye(Ce),st=I(Le);{let Se=o(()=>e(F)?.id??null),Ae=o(()=>e(F)?.icon??null);G$(st,{agentId:"blank",variant:"emphasized",get specialist(){return e(Se)},get icon(){return e(Ae)}})}b(Le);var Xe=m(Le,2),He=I(Xe),Pe=de(He,!0),j=m(He,2),ae=de(j,!0);b(Xe);var qe=m(Xe,2),G=I(qe);pt(G,{get icon(){return Na},size:10}),b(qe),q(()=>{z(Pe,e(Q)),z(ae,e(ge))}),p(U,Ce)},$$slots:{default:!0}}))}},content:Y=>{var J=bx(),be=I(J),Ne=I(be),U=de(Ne,!0),Ie=m(Ne,2),Ce=de(Ie,!0);b(be);var Le=m(be,2),st=I(Le);{let Pe=o(()=>e(F)?.id??null);D_(st,{get specialists(){return e(oe)},get value(){return e(Pe)},onchange:j=>{_(P,!1),w()?.(j)}})}b(Le);var Xe=m(Le,2),He=I(Xe);Rt(He,()=>Or,(Pe,j)=>{j(Pe,{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:()=>{_(P,!1),D()},children:(ae,qe)=>{var G=wx(),Se=ye(G),Ae=I(Se);pt(Ae,{get icon(){return m$},size:12}),b(Se);var je=m(Se,2),Be=de(je,!0);q(We=>z(Be,We),[()=>g.chat_regularAgentWelcome_createSpecialist_label()]),p(ae,G)},$$slots:{default:!0}})}),b(Xe),b(J),q((Pe,j)=>{z(U,Pe),z(Ce,j)},[()=>g.workspace_createAgentSection_specialists_label(),()=>g.workspace_createAgentSection_specialists_description()]),p(Y,J)},$$slots:{trigger:!0,content:!0}}),b(C),p(N,C)};B(we,N=>{w()&&N(ne)})}var te=m(we,2);{var ze=N=>{var C=Bt(),re=ye(C);{let Te=o(()=>g.chat_specialistSelector_prompt_label());Rt(re,()=>J$,(L,Y)=>{Y(L,{class:"mb-3",role:"region",get"aria-label"(){return e(Te)},children:(J,be)=>{var Ne=Sx(),U=ye(Ne);Rt(U,()=>Jf,(Ce,Le)=>{Le(Ce,{children:(st,Xe)=>{var He=Bt(),Pe=ye(He);Rt(Pe,()=>Yf,(j,ae)=>{ae(j,{class:"type-caption font-medium",children:(qe,G)=>{In();var Se=_n();q(Ae=>z(Se,Ae),[()=>g.chat_specialistSelector_prompt_label()]),p(qe,Se)},$$slots:{default:!0}})}),p(st,He)},$$slots:{default:!0}})});var Ie=m(U,2);Rt(Ie,()=>Q$,(Ce,Le)=>{Le(Ce,{children:(st,Xe)=>{var He=Ix(),Pe=ye(He),j=de(Pe,!0),ae=m(Pe,2);xt(ae,{type:"button",variant:"link",get"aria-expanded"(){return e(T)},onclick:()=>_(T,!e(T)),class:"text-xs text-muted-foreground hover:text-foreground transition-colors mt-2 cursor-pointer",children:(qe,G)=>{In();var Se=_n();q(Ae=>z(Se,Ae),[()=>e(T)?g.chat_regularAgentWelcome_showLess_label():g.chat_regularAgentWelcome_showMore_label()]),p(qe,Se)},$$slots:{default:!0}}),q(()=>{ke(Pe,1,`text-sm text-subtle leading-relaxed whitespace-pre-wrap break-words ${e(T)?"":"line-clamp-6"}`),z(j,e(Re))}),p(st,He)},$$slots:{default:!0}})}),p(J,Ne)},$$slots:{default:!0}})})}p(N,C)},se=N=>{var C=$x(),re=de(C,!0);q(()=>z(re,e(Re))),p(N,C)};B(te,N=>{e(F)?N(ze):N(se,-1)})}var he=m(te,2);{var Me=N=>{xt(N,{variant:"ghost-light",size:"sm",onclick:()=>D(e(F).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:(C,re)=>{var Te=kx(),L=ye(Te);pt(L,{get icon(){return h$},size:12,class:"opacity-60"});var Y=m(L,2),J=de(Y,!0);q(be=>z(J,be),[()=>g.chat_regularAgentWelcome_customize_label()]),p(C,Te)},$$slots:{default:!0}})};B(he,N=>{e(F)&&N(Me)})}b(ue),p(n,ue);var Ee=fn(ve);return u(),Ee}var Cx=E('<a class="cursor-pointer underline underline-offset-2 hover:opacity-80" data-suggested-prompt-link=""> </a>'),Px=E('<kbd data-suggested-prompt-hint=""> </kbd>'),Rx=E('<span class="type-caption"> </span>'),Tx=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>'),Ax=E('<div class="flex flex-col" data-testid="suggested-prompts-surface"><!></div>');function Kd(n,r){if(new.target)return dn({component:Kd,...n});pn(r,!0);let a=Z(r,"prompts",7),i=Z(r,"onSelect",7),c=Z(r,"onEdit",7),l=Z(r,"compact",7,!1),f=Z(r,"showShortcutHints",7,!1),u=Z(r,"reserveShortcutHintSpace",7,!1),w=Z(r,"workspaceId",7);const R=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC")?"⌃":"Alt+",y=GS.replace("text-ui","type-caption");function M(k){i()(k)}function x(k,Q){k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),M(Q))}function F(k,Q){k.preventDefault(),k.stopPropagation(),Pd(Q,{workspaceId:w(),event:k})}function D(k,Q){(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),k.stopPropagation(),Pd(Q,{workspaceId:w(),event:k}))}function T(k){return k<3}var H={get prompts(){return a()},set prompts(k){a(k),ee()},get onSelect(){return i()},set onSelect(k){i(k),ee()},get onEdit(){return c()},set onEdit(k){c(k),ee()},get compact(){return l()},set compact(k=!1){l(k),ee()},get showShortcutHints(){return f()},set showShortcutHints(k=!1){f(k),ee()},get reserveShortcutHintSpace(){return u()},set reserveShortcutHintSpace(k=!1){u(k),ee()},get workspaceId(){return w()},set workspaceId(k){w(k),ee()},$set:un,$on:(k,Q)=>gn(r,k,Q)},V=Bt(),oe=ye(V);{var P=k=>{var Q=Ax(),ge=I(Q);{const Re=(ue,we)=>{let ne=()=>(we?.()).item,te=()=>(we?.()).index;const ze=o(()=>Bb(ne())),se=o(()=>e(ze)[0]?.type==="text"?e(ze)[0].content:"");var he=Tx(),Me=I(he),Ee=I(Me);pt(Ee,{get icon(){return Ef},size:16,get class(){return lr}}),b(Me);var N=m(Me,2),C=I(N),re=de(C,!0),Te=m(C);Hn(Te,17,()=>e(ze).slice(e(se)?1:0),H_,(U,Ie)=>{var Ce=Bt(),Le=ye(Ce);{var st=He=>{const Pe=o(()=>Nb(e(Ie).url));var j=Cx(),ae=de(j,!0);q(()=>{Ue(j,"href",e(Pe)),Ue(j,"title",e(Pe)),z(ae,e(Ie).label)}),ps("click",j,qe=>F(qe,e(Pe))),ps("keydown",j,qe=>D(qe,e(Pe))),p(He,j)},Xe=He=>{var Pe=_n();q(()=>z(Pe,e(Ie).content)),p(He,Pe)};B(Le,He=>{e(Ie).type==="link"?He(st):He(Xe,-1)})}p(U,Ce)}),b(N);var L=m(N,2);{var Y=U=>{var Ie=Px();let Ce;var Le=de(Ie);q(()=>{Ce=ke(Ie,1,`${y??""} 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:!f()}),Ue(Ie,"aria-hidden",f()?void 0:"true"),Ue(Ie,"data-hint-visible",f()),z(Le,`${R}${te()+1}`)}),p(U,Ie)},J=o(()=>T(te())&&(f()||u()));B(L,U=>{e(J)&&U(Y)})}var be=m(L,2);{var Ne=U=>{v$(U,{side:"top",delayDuration:300,trigger:Le=>{{let st=o(()=>g.chat_suggestedPrompts_editInInput_ariaLabel());xt(Le,{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:Xe=>{Xe.stopPropagation(),c()(ne())},get"aria-label"(){return e(st)},children:(Xe,He)=>{pt(Xe,{get icon(){return _$},size:"xs"})},$$slots:{default:!0}})}},content:Le=>{var st=Rx(),Xe=de(st,!0);q(He=>z(Xe,He),[()=>g.chat_suggestedPrompts_edit_tooltip()]),p(Le,st)},$$slots:{trigger:!0,content:!0}})};B(be,U=>{c()&&U(Ne)})}b(he),q(U=>{ke(he,1,`${Af} ${VS} 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`),ke(Me,1,`${Fl??""} mt-px self-start`),Ue(C,"aria-label",U),z(re,e(se))},[()=>Db(ne())]),ps("click",C,U=>{U.stopPropagation(),M(ne())}),ps("keydown",C,U=>x(U,ne())),p(ue,he)};let ve=o(()=>l()?"[&>div>div:last-child]:gap-0":"[&>div>div:last-child]:gap-0.5");u$(ge,{get items(){return a()},virtualize:!1,onActivate:M,get class(){return`overflow-visible! [&>div>div:last-child]:flex [&>div>div:last-child]:flex-col ${e(ve)??""}`},"data-testid":"suggested-prompts-list",get"data-compact"(){return l()},row:Re,$$slots:{row:!0}})}b(Q),Dt(1,Q,()=>ma,()=>({tier:"fast",y:0,scale:1})),Dt(2,Q,()=>Zs,()=>({tier:"fast"})),p(k,Q)};B(oe,k=>{a().length>0&&k(P)})}return p(n,V),fn(H)}Od(["click","keydown"]);var Mx=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 rv(n,r){if(new.target)return dn({component:rv,...n});pn(r,!0);let a=Z(r,"onSelect",7),i=Z(r,"compact",7,!1);const c=o(()=>[{label:g.chat_chiefEmptyState_assignedPrs_label(),prompt:g.chat_chiefEmptyState_assignedPrs_prompt()},{label:g.chat_chiefEmptyState_staleWorkspaces_label(),prompt:g.chat_chiefEmptyState_staleWorkspaces_prompt()},{label:g.chat_chiefEmptyState_agentPerformance_label(),prompt:g.chat_chiefEmptyState_agentPerformance_prompt()},{label:g.chat_chiefEmptyState_morningBrief_label(),prompt:g.chat_chiefEmptyState_morningBrief_prompt()},{label:g.chat_chiefEmptyState_randomTheme_label(),prompt:g.chat_chiefEmptyState_randomTheme_prompt()}]),l=o(()=>e(c).map(M=>M.label));function f(M){const x=e(c).find(F=>F.label===M);x&&a()(x.prompt)}var u={get onSelect(){return a()},set onSelect(M){a(M),ee()},get compact(){return i()},set compact(M=!1){i(M),ee()},$set:un,$on:(M,x)=>gn(r,M,x)},w=Mx(),v=I(w),R=de(v,!0),y=m(v,2);return Kd(y,{get prompts(){return e(l)},onSelect:f,get compact(){return i()}}),b(w),q(M=>z(R,M),[()=>g.chat_chiefEmptyState_intro_label()]),p(n,w),fn(u)}const Qd=2e3,Ex=4e3,qx=Ex-Qd-2;function Lx(n,r=Qd){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 f=(l.contentBlocks??[]).filter(w=>w.type==="text").map(w=>w.text||w.content||"").join(""),u=(l.role==="assistant"?N_(f).cleanedContent:f).trim();u&&(a.unshift({role:l.role,text:u}),i+=u.length)}return a}function Hx(n,r){const a=n.map(l=>`${l.role==="user"?"User":"Assistant"}: ${l.text}`).join(`
1
+ var M_=Object.defineProperty;var Ag=n=>{throw TypeError(n)};var E_=(n,r,a)=>r in n?M_(n,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[r]=a;var Qs=(n,r,a)=>E_(n,typeof r!="symbol"?r+"":r,a),q_=(n,r,a)=>r.has(n)||Ag("Cannot "+a);var Co=(n,r,a)=>(q_(n,r,"read from private field"),a?a.call(n):r.get(n)),Mg=(n,r,a)=>r.has(n)?Ag("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,a);import{t as dn,bo as Z,bw as un,bp as nf,b as gn,bm as g,bq as Dr,bs as fe,br as Ei}from"./ClpAEjbe.js";import{bs as pn,a5 as I,bf as fs,bA as b,W as p,bn as fn,aA as ee,aB as E,ca as le,a7 as Bt,ay as ye,aD as e,cd as Nn,c9 as o,bS as m,bl as de,be as In,b_ as q,bO as z,c5 as ct,bH as _,bV as _e,bj as Es,bk as to,b$ as _n,ai as Od,aj as ps,bo as Wl,br as Rr,c0 as Lt,cb as nd,aw as _i,a as L_}from"./CJxGDkBm.js";import{i as B}from"./wmcYjLAa.js";import{k as ki}from"./Xh71Wbuh.js";import{g as Hn,i as H_,I as Mo,p as Eo,e as To}from"./BwASeArv.js";import{n as Dt,l as ma,c as Zs,j as Eg,k as Ho,h as O_}from"./oXpJ1LFx.js";import{b as rf,e as Fd,f as ke,s as Ue,c as Ut,g as gs}from"./CnGVh7I3.js";import{b as F_}from"./DfTSMq0b.js";import{b as hr}from"./NtFyWdpR.js";import{m as D_,U as N_,Z as B_,X as W_,Y as U_,I as qg,o as z_,l as j_,a2 as V_,x as Lg,$ as G_,a0 as Hg,r as K_,s as Q_}from"./DEsEAjIo.js";import{Jq as O,fo as J_,eW as Y_,f3 as X_,eX as Z_,f1 as ew,f0 as tw,eZ as nw,e$ as rw,eY as aw,rs as sw,c6 as ow,i as Si,I$ as iw,D8 as af,Dd as lw,Df as Og,Dc as cw,De as dw,vB as uw,vD as gw,Cl as sf,cp as pw,cn as fw,Bu as vw,bE as hw,A0 as mw,Ca as rd,uZ as _w,cq as Fg,dB as ww,dC as bw,Ck as yw,el as Iw,CE as Sw,CD as $w,CI as kw,CH as xw,cQ as Cw,cT as Pw,nA as Rw,er as Tw,wO as Aw,CJ as Mw,wQ as Ew,CK as qw,cU as Lw,cV as Hw,nI as Ow,Ad as Fw,Dp as Dw,wj as Nw,wk as Bw,yY as Ww,z0 as ad,wf as Uw,wg as zw,rQ as jw,rd as Vw,rb as Gw,f_ as Kw,HK as Qw,Le as Jw,GI as Yw,gn as Xw,p0 as Zw,Je as eb,oh as tb,z$ as nb,ft as Dg,r0 as Ng,fm as rb,fl as ab,tz as sb,g3 as Bg,rc as ob,fe as ib,C5 as lb,m as cb,nJ as db,zE as ub,yW as gb,Ev as pb,Ek as Wg,xe as fb,xf as Ug,uY as zg,p1 as vb,DB as hb,gj as mb,g1 as _b,eU as wb,cM as bb,A3 as yb,Lj as Ib,Cq as Sb,LB as $b,x$ as kb,ga as xb,fd as Cb,cL as Pb,cI as Rb,cH as Tb,vp as Ab,xl as Mb,xj as Eb,cF as qb,cE as Lb,z2 as Hb,yZ as Ob,xk as Fb}from"./CpP1PKzF.js";import{a as Dd}from"./CC7to1B5.js";import{aB as Db,aA as Nb,b1 as Bb,_ as Wb,as as Ub,aD as zb,z as of,R as lf,aV as jb,aP as Vb,ai as jg,J as _l,aN as Vg,aM as Gg,aL as Kg}from"./BlT-PlLX.js";import{k as cf,F as Gb,G as df,ao as Kb,aX as Tl,a5 as uf,Q as Qb,aQ as sd,al as Jb,aD as Yb,B as Xb,y as gf,r as Zb,z as ey,u as ty,aV as ny,aB as pf,aA as ff,aC as ry,aG as od,aN as Qg,aM as wl,aO as Jg,P as Yg,d as ay,e as sy,as as oy,V as Xg,az as iy,c as ly,l as cy,aP as Zg,ak as dy,ar as ep,a as uy,av as gy,a9 as tp,ay as py,aR as np,aU as rp,m as ap,aa as fy,R as vy,at as sp,ah as hy,O as my,an as _y,h as wy,p as by,ax as op,a4 as yy,f as Iy,i as Sy,a2 as $y,a8 as ky}from"./CxNWBXR-.js";import{d as xy,l as Cy,x as Py,v as Ry,k as Ty,Z as ip,a5 as Ay,D as My,c as Ey}from"./BxKppgO5.js";import{g as Ci}from"./DypB-Dwi.js";import{dT as Hl,cR as vf,O as hf,W as qy,bs as Ly,aE as mf,dE as _f,aT as Ao,e4 as Hy,dt as wf,av as Nd,dS as Bd,aM as bf,cM as Oy,V as ha,a3 as Ys,B as Fy,a7 as Dy,a4 as Ny,M as By,a6 as Wy,ar as Uy,aF as yf,aN as Al,r as zy,n as $d,H as jy,dV as Vy,aP as Gy,aJ as Ky,c6 as Qy,aV as Jy,bJ as Yy,bH as Xy,bI as Zy,c5 as eI,c4 as tI,cK as nI,cJ as rI,aR as aI,b9 as sI,bb as oI,be as iI,ba as lI,bj as cI,bd as dI,bc as uI,bf as gI,bg as pI,bi as fI,bh as vI,aw as hI,ax as mI,cg as _I,ch as wI,ds as bI,dr as yI,a_ as II,G as SI,b2 as $I,cc as kI,C as lp,cZ as xI,b8 as ds,bY as CI,X as PI,E as RI,ad as TI,t as AI,cT as MI,d0 as cp,Q as dp,dq as EI,cN as id}from"./D9Ykl3eH.js";import{u as If,a as bl,ag as qI,x as LI,ad as Sf,af as HI,ac as $f,a4 as OI,F as up,D as FI,e as DI,n as NI,s as BI,m as WI,Y as UI,k as zI}from"./CbbK8WaD.js";import{a4 as jI,b5 as VI,cM as GI,a_ as KI,b4 as QI,c2 as JI,c9 as YI,w as XI,x as ZI,cd as eS}from"./DfC089Aj.js";import{n as tS,P as kf,F as nS,ai as rS,r as aS,ac as sS}from"./CgBcONKs.js";import{I as oS,s as iS,H as gp}from"./Bqd7fdCF.js";import{e as lS}from"./CL3a4Hm1.js";import{e as cS,f as dS}from"./BqoCUMk3.js";import{s as uS,o as Xs,b as gS,g as Ol,d as pS,l as wi}from"./CIyUrgF0.js";import{a4 as fS,a6 as vS,D as hS,M as mS,ab as pp,W as _S,i as wS,r as ir,v as Pi,u as Xr,p as $i,x as mr,S as Wd,m as Ul,s as qo,y as Ri,o as no,n as ro,t as fp,a9 as ao,w as so,a8 as Ud,q as _a,z as Lo,I as kd,Z as vp,g as bS,F as yS,U as xf,H as Cf,a7 as Pf,a5 as Ml,N as IS,E as Rf,R as SS,A as $S,b as kS,aa as xS,ac as yl,e as ld,l as CS,C as PS,f as Js,j as hp,G as us,Q as RS,d as cd,c as TS,a as mp,h as AS,K as MS,X as _p,a3 as dd,a0 as wp,$ as ES,a2 as bp,_ as yp,T as qS,B as LS,k as HS,a1 as OS,J as FS,P as DS,O as NS,V as BS}from"./D1B_DGCd.js";import{m as WS}from"./PVXvIyE8.js";import{g as Tf}from"./0LjODXcP.js";import{b as US}from"./C5TH9nNS.js";import{g as zS}from"./BriVXGmT.js";import{a as jS}from"./CvXttgUy.js";import{q as Af,d as lr,r as VS,e as Fl,j as GS,g as xd,i as KS,f as Cd,c as QS,A as JS,O as Ip,k as YS}from"./DthXaxFc.js";import{P as XS}from"./Dp3fRAus.js";import{e as ZS}from"./DemmMiIF.js";import{b as e$,a as t$,g as n$,c as r$,i as a$}from"./CNcD7ed8.js";import{R as s$,g as o$,W as Il,c as i$}from"./D2akGP2t.js";import"./Gb7Ohwuc.js";import"./BYiyLeZ4.js";import{s as Ti}from"./WSVFXKpL.js";import{F as l$,h as c$}from"./CPDV_dyu.js";import"./Qt_rZNko.js";import{C as d$,e as Or,L as u$,l as zl,d as jl,K as Vl,h as zd,M as Gl,S as Da}from"./B06RKBOm.js";import{D as g$}from"./CHXqkR4Y.js";import{f as Sp}from"./D35mkEt2.js";import"./BoIfXiRv.js";import{i as Mf}from"./D-g0wh54.js";import{h as $p,i as kp,g as xp,P as Cp,C as p$,m as El,R as f$}from"./C1zxTHwk.js";import{f as xt,ae as v$}from"./BVi5KkOP.js";import{F as pt,bs as h$,cd as m$,aw as Na,a2 as Ef,c9 as _$,bf as w$,be as b$,bg as y$,aO as Pp,aj as ud,aB as gd,bB as qf,d3 as Dl,cF as I$,aM as Rp,cb as Tp,cK as Nl,bu as S$,aS as $$,d0 as k$,a8 as Lf,ac as x$,ag as C$,cr as P$,ba as R$,aC as Hf,cT as Ap,cz as T$,ax as A$,cD as M$,c3 as E$}from"./CtJxHvGv.js";import{c as Of}from"./ChTqQfQN.js";import"./BeYVt6Wg.js";import{c as Rt}from"./DSqSJXGX.js";import{a5 as Ff,bg as q$,ar as L$,k as H$,Y as O$,W as F$,a2 as D$,Z as N$,bw as B$,V as W$,a1 as U$,ah as z$}from"./CSfWCx1k.js";import{d as Bl,f as j$,e as V$}from"./Fg5V-_KH.js";import{A as G$}from"./BCrI1nnw.js";import{D as K$}from"./DnYPeWf9.js";import"./B5wwCKYG.js";import{a as Q$,C as J$}from"./BTW5Qz3T.js";import"./V7b2Jgc1.js";import{C as Y$}from"./C7RGdxsV.js";import{h as Pd,r as X$,a as Z$}from"./BTtsrh4I.js";import{s as ek}from"./CRpGhS3h.js";import{I as tk,a as nk}from"./MZe3NxQe.js";import{L as rk}from"./CIMWDf4a.js";import{g as ak,f as sk,b as ok}from"./b89lNINv.js";import{s as Ai,g as Kn,i as ik,j as lk,e as Mp,r as Ep,f as ck,d as dk,a as pd,h as uk}from"./BcI2Qs88.js";import{i as qp,a as gk}from"./Bu13V5mO.js";import{seekConversationToMessage as Lp}from"./B70PGGIw.js";import{l as Yt,o as fd,h as jd,n as Rd,q as pk}from"./By588DV1.js";import{o as fk}from"./BTTV-GiU.js";import{A as Df}from"./BQgCURYe.js";import{b as Nf}from"./Dd5ei__B.js";import{g as vk,e as Bf,v as hk,f as mk,N as _k,M as wk,K as bk,k as Wf,l as yk,H as Uf,s as zf}from"./Ck2JBj0W.js";import{selectCurrentWorkspaceTabId as vd}from"./DujUyPvo.js";import{o as Ik}from"./1cfvZqIL.js";import{d as Sk}from"./B0Z-1lwJ.js";import{P as $k}from"./BHjJ9bUD.js";import{g as kk}from"./DwIiGflF.js";import{H as jf,M as xk,y as Ck,g as Pk,i as Rk,u as Tk,e as Vf,c as Gf,d as Ak}from"./Ct82vzld.js";import{c as Mk,h as Vd,f as Kf,M as Ek}from"./B6-GEB4b.js";import{t as qk}from"./DAsc1V4f.js";import{s as Lk}from"./BsieX9dN.js";import{i as Qf}from"./D95Y9O1z.js";import{d as Hk,i as Ok,r as Fk}from"./CTV49dzf.js";import{g as Dk}from"./CsFPvReh.js";var Nk=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),Bk=E("<div><!></div>");function Jf(n,r){if(new.target)return dn({component:Jf,...n});pn(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),c=Z(r,"children",7),l=nf(r,Nk);var f={get ref(){return a()},set ref(v=null){a(v),ee()},get class(){return i()},set class(v){i(v),ee()},get children(){return c()},set children(v){c(v),ee()},$set:un,$on:(v,R)=>gn(r,v,R)},u=Bk();rf(u,v=>({"data-slot":"card-header",class:v,...l}),[()=>Fd("@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]",Y$,i())]);var w=I(u);return Ti(w,()=>c()??fs),b(u),hr(u,v=>a(v),()=>a()),p(n,u),fn(f)}var Wk=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),Uk=E("<div><!></div>");function Yf(n,r){if(new.target)return dn({component:Yf,...n});pn(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),c=Z(r,"children",7),l=nf(r,Wk);var f={get ref(){return a()},set ref(v=null){a(v),ee()},get class(){return i()},set class(v){i(v),ee()},get children(){return c()},set children(v){c(v),ee()},$set:un,$on:(v,R)=>gn(r,v,R)},u=Uk();rf(u,v=>({"data-slot":"card-title",class:v,...l}),[()=>Fd("type-title min-w-0 break-words font-semibold leading-tight text-foreground",i())]);var w=I(u);return Ti(w,()=>c()??fs),b(u),hr(u,v=>a(v),()=>a()),p(n,u),fn(f)}const Sl=oS.CHAT_MEDIA,hd=uS().min(1).max(512);Xs({workspaceId:hd,agentId:hd,draftId:Ol(),principalId:hd,media:gS(tS).min(1).max(20)}).strict();const zk=Xs({sessionId:Ol()}).strict();zk.extend({control:pS("action",[Xs({action:wi("readiness")}).strict(),Xs({action:wi("export"),request:cS}).strict(),Xs({action:wi("transcribe"),request:dS}).strict(),Xs({action:wi("release"),jobId:Ol()}).strict(),Xs({action:wi("adopt"),jobId:Ol()}).strict()])}).strict();function Gd(n,r,a,i=async(c,l)=>typeof window>"u"||iS(window)!=="electron"?{ok:!1,error:"unavailable"}:lS().invoke(c,l)){let c=null,l=null,f=!1;async function u(){f=!0,a.removeEventListener("abort",w);const x=c;c=null,x&&await i(Sl.CLOSE,{sessionId:x}).catch(()=>{})}const w=()=>{u()};a.addEventListener("abort",w,{once:!0});const v=()=>{if(f||a.aborted||!r())throw new Error("media-send-retired")};async function R(){if(v(),c)return c;if(l)return l;l=(async()=>{const x=await i(Sl.BEGIN,n);if(!x.ok)throw new Error("media-export-unavailable");c=x.value.sessionId;try{return v(),c}catch(F){throw await u(),F}})();try{return await l}finally{l=null}}async function y(x){const F=await R();v();const D=await i(Sl.CONTROL,{sessionId:F,control:x});return v(),D}return{service:{exportMedia:x=>y({action:"export",request:x}),adoptMediaJob:x=>y({action:"adopt",jobId:x}),transcribeMedia:x=>y({action:"transcribe",request:x}),releaseMediaJob:async x=>c?await i(Sl.CONTROL,{sessionId:c,control:{action:"release",jobId:x}}):{ok:!0,value:void 0}},dispose:u,readiness:()=>y({action:"readiness"})}}const md=new Set;async function jk(n){const{drafts:r,signal:a}=n,i=structuredClone(n.capture),c=structuredClone(n.items),l=structuredClone(n.payload),{workspaceId:f,agentId:u}=i,w=Ci(O.state),v=Hl.select(O.state,f),R=vf.select(O.state),y=cf(),M=JSON.stringify([w,f,u]);if(!w||!v||!R||l.wsId!==f||md.has(M))return!1;md.add(M);const x=new AbortController,F=()=>x.abort();a.addEventListener("abort",F,{once:!0});const D=()=>!a.aborted&&!x.signal.aborted&&Ci(O.state)===w&&Hl.select(O.state,f)===v&&uf(y)&&r.isCurrentDraft(i),T=O.getReadableState().subscribe(()=>{D()||x.abort()});let H=null;try{if(!D()||jI(c))return!1;const V=If(i.attachments),oe=kf(nS(f,u),V,c.map(ue=>({contextItemId:ue.id,attachmentId:ue.attachmentId,path:ue.path}))),P=new Set([...oe.images,...oe.clips].map(ue=>ue.contextItemId));if(V.some(([ue])=>!P.has(ue))||oe.images.some(ue=>ue.mediaError)||oe.clips.some(ue=>ue.mediaError)||!rS(l.text,oe))throw new Error("invalid-evidence");if(H=n.warm?.take(i,x.signal)??null,!await r.flushDraft(i)||!D())return!1;const k=await xy.agents.get(u,f);if(!D())return!1;if(!k||k.workspaceId!==f||k.retiredAt||k.pendingDeleteAt||k.status==="deleted")throw new Error("unavailable");const Q=oe.clips.flatMap(ue=>ue.media?[ue.media]:[]);Q.length&&!H&&(H=Gd({workspaceId:f,agentId:u,draftId:crypto.randomUUID(),principalId:R.principal.id,media:Q},D,x.signal));const ge=Gb(c,oe),Re=df(ge),ve=await Kb({workspaceId:f,agentId:u,evidence:oe,clickedItems:c,sendItems:ge,clickedPayload:{...l,contextItems:ge,imageBlocks:Re.imageBlocks,fileBlocks:Re.fileBlocks},binding:y,service:H?.service??null,current:D,onRecord:()=>{}});return!ve||!D()?!1:Tl(O,u,ve)}catch{return D()&&O.dispatch(J_(u,g.dock_conversation_sendFailed_error())),!1}finally{T(),a.removeEventListener("abort",F),await H?.dispose(),md.delete(M)}}const Xf=1e4,Hp={wasBusy:!1,busySince:null,preempted:!1,prediction:null};function Op(n){return fS(n.messageMetadata)}function Vk(n,r){if(n.some(Op)){const a=n[0];return a&&!Op(a)&&Fp(a,r)?[a.id]:[]}return n.filter(a=>Fp(a,r)).map(a=>a.id)}function Gk(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 Fp(n,r){return!n.requeuedAfterFailure&&vS(n,r)}function Kk(n,r){const{busy:a,queue:i,delivered:c,now:l}=r,f=r.blocked||r.interrupted,u=r.timeoutMs??Xf;let w=n.prediction;if(w){const x=new Set(i.map(H=>H.id)),F=w.ids.filter(H=>x.has(H)&&!c.has(H)),D=l-w.startedAt>=u,T=n.wasBusy&&!a;!F.length||D||f&&!a||T?w=null:F.length!==w.ids.length&&(w={...w,ids:F})}const v=n.wasBusy&&!a,R=n.wasBusy?n.busySince:a?l:null,y=n.wasBusy&&n.preempted||R!==null&&r.directSendAt!==null&&r.directSendAt>R;if(!w&&v&&!f&&!y){const x=Vk(i,l).filter(F=>!c.has(F));x.length&&(w={ids:x,startedAt:l})}const M={wasBusy:a,busySince:a?R:null,preempted:a&&y,prediction:w};return n.wasBusy===M.wasBusy&&n.busySince===M.busySince&&n.preempted===M.preempted&&n.prediction===M.prediction?n:M}class Qk{constructor(){Qs(this,"previousWorkspaceId",null);Qs(this,"_isRebinding",!1);Qs(this,"_generation",0);Qs(this,"_rebindPromise",null);Qs(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(f=>{c=setTimeout(()=>f(!0),i)})]);if(clearTimeout(c),l)return!1}return!0}}function Jk(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 Dp(n){const r=typeof n=="string"?n:n&&typeof n=="object"&&typeof n.script=="string"?n.script:void 0;return r||void 0}var Yk=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 Zf(n,r){if(new.target)return dn({component:Zf,...n});pn(r,!0);const a=()=>fe(R,"$typing$",i),[i,c]=Dr();let l=Z(r,"workspaceId",7),f=Z(r,"agentId",7),u=Z(r,"class",7,"");const w=Nn(""),v=Nn("");le(()=>{w.set(l())}),le(()=>{v.set(f())});const R=VI(w,v),y=o(()=>ZS(a()));var M={get workspaceId(){return l()},set workspaceId(H){l(H),ee()},get agentId(){return f()},set agentId(H){f(H),ee()},get class(){return u()},set class(H=""){u(H),ee()},$set:un,$on:(H,V)=>gn(r,H,V)},x=Bt(),F=ye(x);{var D=H=>{var V=Yk(),oe=I(V),P=I(oe);XS(P,{get people(){return a()},size:12,decorative:!0}),b(oe);var k=m(oe,2),Q=de(k,!0);In(2),b(V),q(()=>{ke(V,1,`${Af} 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 ${u()??""} /* a11y-ignore: user-requested compact typing status in the composer gap */`,"svelte-lm4khl"),z(Q,e(y))}),p(H,V)};B(F,H=>{e(y)&&H(D)})}p(n,x);var T=fn(M);return c(),T}const Xk=50,Zk=5e3,ex=500,tx=()=>({authority:()=>Ci(O.state),persistSnapshot:Jb,dispatch:n=>O.dispatch(n),ownerView:n=>Yb.withStore(O)(n)});function nx(n){const r=n.store??tx(),a=crypto.randomUUID();let i=_e(!1),c=_e(!1),l=_e(!1),f=null,u=null,w=0,v=!1,R=null,y=null,M=null,x=0,F=null,D=null;const T={};let H,V=_e([]),oe=null,P=0,k="",Q=0,ge="";const Re=()=>{const N=n.workspaceId(),C=n.agentId();if(!N||!C||!(n.active?.()??!0))return null;const re=r.authority?.();if(!re||v)return null;const Te=n.inputValue(),L=ue(),Y=H?.shared,J=Y?.workspaceId===N&&Y.agentId===C?Y.lifetime:null,be=JSON.stringify([re,N,C,x,J,L.map(U=>[U.id,U.attachmentId,U.path])]);be!==ge&&(ge=be,Q+=1);const Ne=JSON.stringify([re,N,C,Te,L,x]);return Ne!==k&&(k=Ne,P+=1),{authority:re,ownerId:a,workspaceId:N,agentId:C,text:Te,attachments:JSON.parse(JSON.stringify(L)),generation:P,attachmentEpoch:Q}};let ve=null;const ue=()=>qI(n.contextItems(),LI(n.contextItems(),e(V))),we=N=>{if(H=N,!N||v)return;const C=N.restore;if(D&&C?.requestId===D.requestId&&C.status!=="pending"){const{apply:L}=D;D=null,_(c,!1),C.status==="restored"&&_(V,C.draft?.attachments??[]),L(C)}const re=N.shared;if(re&&!e(c)&&u===`${re.workspaceId}\0${re.agentId}`){const L=JSON.stringify([re.provenance,re.workspaceId,re.agentId,re.lifetime,re.revision]);if(oe!==L){oe=L;const Y=ve??f,J=Y&&n.inputValue()===Y.text&&JSON.stringify(ue())===Y.attachmentsJson;re.origin===a?ve={text:re.snapshot.text,attachmentsJson:JSON.stringify(re.snapshot.attachments)}:J&&(w+=1,M&&clearTimeout(M),_(V,re.snapshot.attachments),ve=f={text:re.snapshot.text,attachmentsJson:JSON.stringify(e(V))},n.setInputValue(re.snapshot.text),n.setContextItems(bl(e(V))),n.applyEditorContent(re.snapshot.text))}}ct(Re);const Te=[];for(const L of N.saves){if(L.status==="pending")continue;Te.push(L.id);const Y=T[L.id];delete T[L.id],Y?.(L)}Te.length>0&&queueMicrotask(()=>r.dispatch(ew(a,Te)))},ne=(N,C,re)=>{const Te=crypto.randomUUID();D={requestId:Te,apply:re},_(c,!0),r.dispatch(nw(a,Te,N,C))},te=()=>{D&&(D=null,_(c,!1),r.dispatch(aw(a)))},ze=()=>{const N=F;N&&(F=null,r.dispatch(rw(a)),H?.saves.some(C=>C.id===N)||delete T[N])};r.dispatch(Y_(a));const se=r.ownerView(a).subscribe(N=>ct(()=>we(N))),he=()=>{y&&(clearTimeout(y),y=null),_(l,!1)},Me=()=>{F&&(F=null,r.dispatch(tw(a)))};le(()=>{const N=n.active?.()??!0,C=n.workspaceId(),re=n.agentId();if(!N){ct(()=>{w+=1,u=null,te(),R&&clearTimeout(R),R=null,he(),M&&clearTimeout(M),M=null,_(i,!1),Me()});return}if(!C||!re)return;const Te=`${C}\0${re}`;if(u===Te)return;const L=u!==null;u=Te;const Y=++w;ct(()=>{f=null,ve=null,oe=null,_(V,[]),R&&clearTimeout(R),he(),M&&(clearTimeout(M),M=null),L&&(Me(),n.setInputValue(""),n.contextItemsAreScoped||n.setContextItems([]),n.applyEditorContent(""));const J=Qb(C,re);if(J){_(V,J.attachments),_(i,!1);const Ne=n.contextItems().length>0,U=J.text,Ie=JSON.stringify(J.attachments);n.setInputValue(J.text),Ne||n.setContextItems(bl(J.attachments)),n.applyEditorContent(J.text),f={text:J.text,attachmentsJson:Ie},ne(C,re,Ce=>{if(Ce.status!=="restored")return;const Le=Ce.draft;if(v||!(n.active?.()??!0)||u!==Te||w!==Y)return;const st=Le?.text??"",Xe=Le?.attachments??[],He=JSON.stringify(Xe);sd(C,re,{text:st,attachments:Xe});const Pe=n.inputValue()===U&&JSON.stringify(ue())===Ie;Ne||!Pe||(st!==U&&(n.setInputValue(st),n.applyEditorContent(st)),He!==Ie&&n.setContextItems(bl(Xe)),f={text:st,attachmentsJson:He})});return}_(i,!0),y=setTimeout(()=>{y=null,(n.active?.()??!0)&&_(l,!0)},ex),R=setTimeout(()=>{(n.active?.()??!0)&&(_(i,!1),he())},Zk);const be=()=>{!(n.active?.()??!0)||u!==Te||w!==Y||(R&&clearTimeout(R),_(i,!1),he())};ne(C,re,Ne=>{if(Ne.status!=="restored"){be();return}const U=Ne.draft;if(v||!(n.active?.()??!0)||u!==Te||w!==Y)return;const Ie=!!n.inputValue();if(!Ie&&U?.attachments?.length&&n.contextItems().length===0&&n.setContextItems(bl(U.attachments)),!Ie&&U?.text&&(n.setInputValue(U.text),M=setTimeout(()=>{(n.active?.()??!0)&&n.inputValue()===U.text&&n.applyEditorContent(U.text)},Xk)),f===null){const Ce=U?.text??"",Le=U?.attachments??[];f={text:Ce,attachmentsJson:JSON.stringify(Le)},sd(C,re,{text:Ce,attachments:Le})}be()})})}),le(()=>{const N=n.active?.()??!0,C=n.workspaceId(),re=n.agentId(),Te=e(i);if(!N){ct(ze);return}if(!C||!re)return;const L=n.inputValue(),Y=ue();if(ct(Re),ct(ze),Te||f===null&&!L&&Y.length===0)return;const J=JSON.stringify(Y);if(f!==null&&f.text===L&&f.attachmentsJson===J)return;JSON.stringify(e(V))!==J&&_(V,Y);const be=`${C}\0${re}`,Ne=x,U=crypto.randomUUID();T[U]=Ie=>{if(n.active?.()??!0){if(Ie.status==="saved"){u===be&&x===Ne&&(f={text:L,attachmentsJson:J});return}n.onSaveError?.(new Error(Ie.error))}},ct(()=>{F=U,r.dispatch(X_(a,U,{authority:r.authority?.()??void 0,workspaceId:C,agentId:re,text:L,attachments:Y,rollback:f?{text:f.text,attachments:JSON.parse(f.attachmentsJson)}:null}))})}),le(()=>()=>{v=!0,R&&clearTimeout(R),y&&clearTimeout(y),M&&clearTimeout(M),Me(),se(),r.dispatch(Z_(a))});const Ee=N=>{const C=Re();return C!==null&&C.authority===N.authority&&C.ownerId===N.ownerId&&C.workspaceId===N.workspaceId&&C.agentId===N.agentId&&C.generation===N.generation&&C.text===N.text&&JSON.stringify(C.attachments)===JSON.stringify(N.attachments)};return{captureDraft:Re,isCurrentDraft:Ee,updateAttachmentScreen(N,C,re){return!Ee(N)||!N.attachments.some(Te=>Te.id===C)?null:(_(V,N.attachments.map(Te=>Te.id===C?{...Te,screen:structuredClone(re)}:Te)),Re())},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(w+=1,x+=1,te(),R&&(clearTimeout(R),R=null),M&&(clearTimeout(M),M=null),_(i,!1),he(),ze(),u!==null){const[N,C]=u.split("\0");sd(N,C,{text:"",attachments:[]}),ve=null,_(V,[]),f={text:"",attachmentsJson:"[]"}}}}}function Mi(n){if(!n)return null;const r=kf(JSON.stringify([n.workspaceId,n.agentId]),If(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 rx(n,r,a){const i=O.state.principal.snapshot,c=()=>Ci(O.state)===n.authority&&a.isCurrentDraft(n);if(!i||!c()||!await a.flushDraft(n)||!c())return{ready:!1};const l=new AbortController,f=Gd({workspaceId:n.workspaceId,agentId:n.agentId,principalId:i.principal.id,draftId:crypto.randomUUID(),media:[r]},c,l.signal);try{const u=await f.readiness();return!c()||!u.ok?{ready:!1}:u.value.find(w=>w.sourceId===r.source.id)??{ready:!1}}finally{await f.dispose()}}function Np(n){let r=_e(null),a=_e(!1),i=_e(!1),c=null,l=!0,f=0,u=null;Es(()=>{l=!1,f++}),le(()=>{const y=n.capture();e(r)&&(!y||y.authority!==e(r).capture.authority||y.ownerId!==e(r).capture.ownerId||y.workspaceId!==e(r).capture.workspaceId||y.agentId!==e(r).capture.agentId||y.attachmentEpoch!==e(r).capture.attachmentEpoch)&&_(r,null)});async function w(y){if(n.disabled()||e(a))return;const M=n.drafts.captureDraft(),x=Mi(M),F=x?.clips.find(V=>V.contextItemId===y);if(!M||!F?.media||!x)return;const D=Xb({workspaceId:M.workspaceId,agentId:M.agentId,clip:F,evidence:x,marks:x.marks}),T=gf(M.workspaceId,F.path);if(!D||!T)return;const H=++f;c=document.activeElement instanceof HTMLElement?document.activeElement:null,_(a,!0),_(i,!1);try{if(await n.beforeOpen?.(),!l||f!==H||!n.drafts.isCurrentDraft(M))return;const V=await(n.prepareOutput??rx)(M,F.media,n.drafts);if(!l||f!==H||!n.drafts.isCurrentDraft(M))return;const{attachmentPath:oe,...P}=D;_(r,{capture:M,contextItemId:y,snapshot:{...P,openId:crypto.randomUUID(),mediaUrl:T,output:V,deleteReady:!0}})}catch{l&&f===H&&_(i,!0)}finally{l&&f===H&&_(a,!1)}}async function v(y){const M=crypto.randomUUID(),x=e(r),F=n.drafts.captureDraft();if(!x||!F||F.authority!==x.capture.authority||F.ownerId!==x.capture.ownerId||F.workspaceId!==x.capture.workspaceId||F.agentId!==x.capture.agentId||F.attachmentEpoch!==x.capture.attachmentEpoch)return{requestId:M,result:"stale-source"};const D=Mi(F),T=D?.clips.find(Q=>Q.contextItemId===x.contextItemId);if(!D||!T?.media)return{requestId:M,result:"stale-source"};const V=u?.openId===x.snapshot.openId&&u.inputRevision===y.revision&&JSON.stringify(u.media)===JSON.stringify(T.media)?{...y,revision:T.media.saved?.revision??0}:y,oe=aS(T.media,{openId:x.snapshot.openId,...x.snapshot.output?.version===2?{outputVersion:2}:{},pair:{workspaceId:F.workspaceId,agentId:F.agentId},sourceId:y.sourceId,sourceRevision:y.sourceRevision,expectedEditRevision:V.revision,edit:V});if(oe.status!=="saved")return{requestId:M,result:oe.status==="invalid-edit"?"failed":oe.status};const P=sS({...D,clips:D.clips.map(Q=>Q.id===T.id?{...Q,media:oe.media}:Q)})[x.contextItemId],k=n.drafts.updateAttachmentScreen(F,x.contextItemId,P);if(!k)return{requestId:M,result:"stale-source"};u={openId:x.snapshot.openId,media:oe.media,inputRevision:y.revision};try{if(!n.drafts.isCurrentDraft(k))return{requestId:M,result:"stale-source"};await n.drafts.flushDraft(k);const Q=n.drafts.captureDraft();return!l||e(r)?.snapshot.openId!==x.snapshot.openId||!Q||Q.attachmentEpoch!==x.capture.attachmentEpoch||Q.authority!==k.authority||Q.ownerId!==k.ownerId||Q.workspaceId!==k.workspaceId||Q.agentId!==k.agentId||JSON.stringify(Q.attachments.find(ge=>ge.id===x.contextItemId)?.screen)!==JSON.stringify(P)?{requestId:M,result:"stale-source"}:(u=null,{requestId:M,result:"saved",saved:oe.media.saved??void 0})}catch{return{requestId:M,result:"failed"}}}function R(y){return n.disabled()||!n.onRemove(y)?!1:(e(r)?.contextItemId===y&&_(r,null),!0)}return{get session(){return e(r)},get opening(){return e(a)},get problem(){return e(i)},open:w,save:v,remove:R,close(){_(r,null)},restoreFocus(){c?.isConnected&&c.focus()}}}var ax=E('<p role="alert"> </p>'),sx=E('<div class="recording-editor-surface svelte-cdb16"><!></div>'),ox=E("<!> <!> <!>",1);function ev(n,r){if(new.target)return dn({component:ev,...n});pn(r,!0);let a=Z(r,"capture",7),i=Z(r,"drafts",7),c=Z(r,"disabled",7,!1),l=Z(r,"onRemove",7),f=Z(r,"controllerFactory",7,Np),u=Z(r,"beforeOpen",7),w=Z(r,"onReviewChange",7);const v=ct(()=>f()({drafts:i(),capture:()=>a(),disabled:()=>c(),onRemove:P=>l()(P),beforeOpen:()=>u()?.()??Promise.resolve()}));le(()=>{const P=v.opening,k=v.session;ct(()=>w()?.(P,k?.snapshot.output?.ready?{openId:k.snapshot.openId,capture:k.capture}:null))});const R=o(Zb),y=o(()=>Mi(a())),M=o(()=>e(y)?.clips.map(P=>({id:P.contextItemId,kind:"clip",owner:"evidence",duration:Sp(P.durationMs),recording:!1,url:a()?gf(a().workspaceId,P.path):void 0,...P.media?.saved?{summary:ey(P.media.saved)}:{}}))??[]);let x=_e(null);var F={get capture(){return a()},set capture(P){a(P),ee()},get drafts(){return i()},set drafts(P){i(P),ee()},get disabled(){return c()},set disabled(P=!1){c(P),ee()},get onRemove(){return l()},set onRemove(P){l(P),ee()},get controllerFactory(){return f()},set controllerFactory(P=Np){f(P),ee()},get beforeOpen(){return u()},set beforeOpen(P){u(P),ee()},get onReviewChange(){return w()},set onReviewChange(P){w(P),ee()},$set:un,$on:(P,k)=>gn(r,P,k)},D=ox(),T=ye(D);{let P=o(()=>c()||v.opening);hS(T,{get items(){return e(M)},get labels(){return e(R)},get disabled(){return e(P)},onEdit:k=>void v.open(k),onMarkUp:k=>void v.open(k),get onRemove(){return v.remove}})}var H=m(T,2);{var V=P=>{var k=ax(),Q=de(k,!0);q(ge=>z(Q,ge),[()=>g.dock_captureEditor_saveFailed_label()]),p(P,k)};B(H,P=>{v.problem&&P(V)})}var oe=m(H,2);{let P=o(()=>!!v.session),k=o(()=>g.dock_captureEditor_recording_title({duration:v.session?Sp(v.session.snapshot.durationMs??0):""}));d$(oe,{get open(){return e(P)},size:"editor",showCloseButton:!1,get title(){return e(k)},escapeKeydownBehavior:"ignore",dismissOnInteractOutside:!1,onClose:()=>v.close(),onCloseAutoFocus:Q=>{Q.preventDefault(),v.restoreFocus()},get contentRef(){return e(x)},set contentRef(Q){_(x,Q,!0)},children:(Q,ge)=>{var Re=Bt(),ve=ye(Re);{var ue=we=>{var ne=Bt(),te=ye(ne);ki(te,()=>v.session.snapshot.openId,ze=>{var se=sx(),he=I(se);g$(he,{get snapshot(){return v.session.snapshot},get shortcutDialog(){return e(x)},onClose:()=>v.close(),get onSave(){return v.save},onDelete:async()=>!!v.session&&v.remove(v.session.contextItemId)}),b(se),p(ze,se)}),p(we,ne)};B(ve,we=>{v.session&&we(ue)})}p(Q,Re)},$$slots:{default:!0}})}return p(n,D),fn(F)}const $l=n=>JSON.stringify([n.authority,n.ownerId,n.workspaceId,n.agentId,n.attachmentEpoch,n.attachments]);function ix(n){let r=_e(!1),a=_e(!1),i=_e(null),c=!1,l=0,f=null,u=null;async function w(y){y.abort.abort(),y.slot?.cancel(),await y.native?.dispose()}async function v(){l++;const y=u;u=null,y&&await w(y)}to(()=>{const y=()=>{_(r,document.hasFocus(),!0)};return y(),window.addEventListener("focus",y),window.addEventListener("blur",y),()=>{window.removeEventListener("focus",y),window.removeEventListener("blur",y)}});const R=O.getReadableState().subscribe(()=>{u&&!u.current()&&v()});return Es(()=>{c=!0,R(),v()}),le(()=>{const y=n.capture(),M=y?$l(y):"",x=e(r)&&!e(a)&&(n.active()||e(i)?.key===M);ct(()=>{if(!x||!y){v();return}if(u?.key===M)return;if(f===M){v();return}v();const D=Mi(y)?.clips.flatMap(Re=>!Re.mediaError&&Re.media?[Re.media]:[])??[],T=D[0],H=O.state.principal.snapshot,V=Hl.select(O.state,y.workspaceId);if(!T||!H||!V||n.drafts.gateActive)return;const oe=cf(),P=new AbortController,k=()=>!c&&!P.signal.aborted&&Ci(O.state)===y.authority&&Hl.select(O.state,y.workspaceId)===V&&uf(oe)&&!!n.capture()&&$l(n.capture())===M,Q={key:M,capture:y,abort:P,native:null,slot:null,current:k};u=Q;const ge=l;n.drafts.flushDraft(y).then(async Re=>{if(!(u!==Q||ge!==l||!k())){if(!Re){f=M,await v();return}Q.native=Gd({workspaceId:y.workspaceId,agentId:y.agentId,draftId:crypto.randomUUID(),principalId:H.principal.id,media:structuredClone(D)},k,P.signal),Q.slot=ty(Q.native.service),f=M,Q.slot.warm(M,T,k)}}).catch(()=>{u===Q&&v()})})}),{cancel:v,async beforeEditorOpen(){_(a,!0),f=null,await v()},editorState(y,M){_(a,y,!0);const x=M?$l(M.capture):null;M&&e(i)?.openId!==M.openId&&(f=null),_(i,M&&x?{openId:M.openId,key:x}:null)},take(y,M){const x=u;if(!x?.native||!x.slot||x.key!==$l(y)||!x.current())return v(),null;u=null,l++;const F=x.native,D=x.slot,T=()=>x.abort.abort();return M.addEventListener("abort",T,{once:!0}),M.aborted&&T(),{service:{...F.service,takePreparedRecording:H=>D.take(x.key,H,()=>!M.aborted&&x.current())},async dispose(){M.removeEventListener("abort",T),await w(x)}}}}}var lx=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 tv(n,r){if(new.target)return dn({component:tv,...n});pn(r,!1);var a={$set:un,$on:(f,u)=>gn(r,f,u)};Mf();var i=lx(),c=I(i),l=de(c,!0);return b(i),q(f=>z(l,f),[()=>g.chat_draftGate_loading_label()]),p(n,i),fn(a)}var cx=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 Td(n,r){if(new.target)return dn({component:Td,...n});pn(r,!1);var a={$set:un,$on:(f,u)=>gn(r,f,u)};Mf();var i=cx(),c=m(I(i),2),l=de(c,!0);return In(2),b(i),q((f,u)=>{Ue(i,"aria-label",f),z(l,u)},[()=>g.chat_newMessagesDivider_label(),()=>g.chat_newMessagesDivider_label()]),p(n,i),fn(a)}function dx(n,r){if(!r||n.length===0)return null;const a=n.indexOf(r);return a===-1||a===n.length-1?null:r}function ux(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 gx(n,r){return r&&n.includes(r)?r:null}function Bp(n,r,a){return r-n<=a}const px=.2;function Wp(n,r,a){const i=Math.max(0,a-r),c=n-px*r;return Math.min(Math.max(0,c),i)}function fx(n,r,a){return n!==null&&a&&n===r}function vx(n){return n?sw(n)&&ow(n)!==null&&typeof n.metadata?.taskNoteId=="string":!1}function hx(n){const r=[],a=new Set;let i,c;for(const H of n.messages){if(H.agentId&&H.agentId!==n.agentId){i=void 0,c=void 0;continue}if(a.has(H.id))continue;a.add(H.id),n.breakBeforeMessageIds?.has(H.id)&&(i=void 0,c=void 0);const V=mS(H);if(V?.kind!=="turn-failure")c=void 0;else{const oe=i?.seq!==void 0&&H.seq!==void 0&&Number.isSafeInteger(i.seq)&&Number.isSafeInteger(H.seq)&&H.seq===i.seq+1;(!c||!oe)&&(c={key:JSON.stringify([n.agentId,"notice",H.id]),anchorMessageId:H.id,correlation:"unavailable",records:[],recordedFailureCount:0},r.push(c)),c.records.push({messageId:H.id,reason:V.reason,timestamp:H.timestamp}),c.recordedFailureCount+=1}i=H}const l=new Map;for(const H of n.queue){if(!H.requeuedAfterFailure)continue;const V=H.turnId||void 0,oe=JSON.stringify([n.agentId,V?"turn":"queue",V??H.id]);let P=l.get(oe);P||(P={key:oe,correlation:V?"turn":"queue-entry",turnId:V,queueIds:[],state:"queued"},l.set(oe,P)),P.queueIds.includes(H.id)||P.queueIds.push(H.id)}const f=[...l.values()],u=n.session?.id===n.agentId?n.session:void 0,w=u?.status===Si.Error,v=n.transientError||w&&u.stopReason||null,R=w&&!v,y=w&&(!n.transientError||n.transientError===u.stopReason)?u.stopReasonTimestamp:void 0,M=y?pp(y):null,x=M&&v&&v===u?.stopReason?r.flatMap(H=>H.records).filter(H=>H.reason===v&&pp(H.timestamp)===M):[],F=x.length===1?x[0].messageId:void 0,T=(u?hf(u):!1)?"attempting":f.length?"queued":v||R?"action-needed":"inactive";return{history:r,queueRecovery:f,current:{state:T,error:v,needsFallbackReason:R,timestamp:y,noticeId:F}}}function mx(n,r){const a=n.hiddenTail[0]?.id,i=hx({...r,messages:[...n.groups.flatMap(u=>u.messages),...n.hiddenTail],breakBeforeMessageIds:new Set(a?[a]:[])}),c=i.current.noticeId,l=i.history.map(u=>({...u,records:u.records.filter(w=>w.messageId!==c)})).filter(u=>u.records.length>0),f=new Set(l.map(u=>u.records[0].messageId));return{...i,runsByAnchor:new Map(l.map(u=>[u.records[0].messageId,u])),collapsedMessageIds:new Set(i.history.flatMap(u=>u.records.map(w=>w.messageId).filter(w=>!f.has(w))))}}var _x=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),wx=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),bx=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>'),yx=E('<div class="mb-5"><!></div>'),Ix=E('<p data-testid="agent-welcome-description"> </p> <!>',1),Sx=E("<!> <!>",1),$x=E('<p class="mb-3 px-4 text-sm text-subtle leading-relaxed whitespace-pre-wrap" data-testid="agent-welcome-description"> </p>'),kx=E("<!> <span> </span>",1),xx=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 nv(n,r){if(new.target)return dn({component:nv,...n});pn(r,!0);const a=()=>fe(x,"$userOverrides$",f),i=()=>fe(M,"$specialists$",f),c=()=>fe(H,"$isGitHubAuth$",f),l=()=>fe(V,"$recentSpecialistIds$",f),[f,u]=Dr();let w=Z(r,"onSpecialistChange",7),v=Z(r,"session",7),R=Z(r,"workspaceId",7);const y=Nn(R()??"");le(()=>y.set(R()??""));const M=Ff(y),x=q$();le(()=>{a()});const F=o(()=>{if(!v()||qy(v()))return null;const N=v().metadata?.specialist||v().agentMetadata?.specialist;return N&&i().find(C=>C.id===N)||null});async function D(N){N?await Bl({specialist:N,hash:"specialists"}):await Bl({view:"create-specialist"})}let T=_e(!1);const H=L$(),V=GI(),oe=o(()=>iw(H$(i(),c()),l()));let P=_e(!1);const k=o(()=>g.chat_regularAgentWelcome_generalDescription_label()),Q=o(()=>e(F)?.name??g.chat_shared_general_fallback()),ge=o(()=>e(F)?.description??g.chat_shared_noSpecializedBehavior_label()),Re=o(()=>e(F)?e(F).defaultBehaviorPrompt||"":e(k));var ve={get onSpecialistChange(){return w()},set onSpecialistChange(N){w(N),ee()},get session(){return v()},set session(N){v(N),ee()},get workspaceId(){return R()},set workspaceId(N){R(N),ee()},$set:un,$on:(N,C)=>gn(r,N,C)},ue=xx(),we=I(ue);{var ne=N=>{var C=yx(),re=I(C);K$(re,{class:"block w-full",align:"start",side:"bottom",contentClass:"w-[min(28rem,calc(100vw-2rem))]",get open(){return e(P)},set open(Y){_(P,Y,!0)},trigger:(Y,J)=>{let be=()=>(J?.()).props;{let Ne=o(()=>Fd("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"));xt(Y,Ei(be,{type:"button",variant:"plain",wrapContent:!1,get class(){return e(Ne)},"data-testid":"specialist-picker-trigger",children:(U,Ie)=>{var Ce=_x(),Le=ye(Ce),st=I(Le);{let Se=o(()=>e(F)?.id??null),Ae=o(()=>e(F)?.icon??null);G$(st,{agentId:"blank",variant:"emphasized",get specialist(){return e(Se)},get icon(){return e(Ae)}})}b(Le);var Xe=m(Le,2),He=I(Xe),Pe=de(He,!0),j=m(He,2),ae=de(j,!0);b(Xe);var qe=m(Xe,2),G=I(qe);pt(G,{get icon(){return Na},size:10}),b(qe),q(()=>{z(Pe,e(Q)),z(ae,e(ge))}),p(U,Ce)},$$slots:{default:!0}}))}},content:Y=>{var J=bx(),be=I(J),Ne=I(be),U=de(Ne,!0),Ie=m(Ne,2),Ce=de(Ie,!0);b(be);var Le=m(be,2),st=I(Le);{let Pe=o(()=>e(F)?.id??null);D_(st,{get specialists(){return e(oe)},get value(){return e(Pe)},onchange:j=>{_(P,!1),w()?.(j)}})}b(Le);var Xe=m(Le,2),He=I(Xe);Rt(He,()=>Or,(Pe,j)=>{j(Pe,{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:()=>{_(P,!1),D()},children:(ae,qe)=>{var G=wx(),Se=ye(G),Ae=I(Se);pt(Ae,{get icon(){return m$},size:12}),b(Se);var je=m(Se,2),Be=de(je,!0);q(We=>z(Be,We),[()=>g.chat_regularAgentWelcome_createSpecialist_label()]),p(ae,G)},$$slots:{default:!0}})}),b(Xe),b(J),q((Pe,j)=>{z(U,Pe),z(Ce,j)},[()=>g.workspace_createAgentSection_specialists_label(),()=>g.workspace_createAgentSection_specialists_description()]),p(Y,J)},$$slots:{trigger:!0,content:!0}}),b(C),p(N,C)};B(we,N=>{w()&&N(ne)})}var te=m(we,2);{var ze=N=>{var C=Bt(),re=ye(C);{let Te=o(()=>g.chat_specialistSelector_prompt_label());Rt(re,()=>J$,(L,Y)=>{Y(L,{class:"mb-3",role:"region",get"aria-label"(){return e(Te)},children:(J,be)=>{var Ne=Sx(),U=ye(Ne);Rt(U,()=>Jf,(Ce,Le)=>{Le(Ce,{children:(st,Xe)=>{var He=Bt(),Pe=ye(He);Rt(Pe,()=>Yf,(j,ae)=>{ae(j,{class:"type-caption font-medium",children:(qe,G)=>{In();var Se=_n();q(Ae=>z(Se,Ae),[()=>g.chat_specialistSelector_prompt_label()]),p(qe,Se)},$$slots:{default:!0}})}),p(st,He)},$$slots:{default:!0}})});var Ie=m(U,2);Rt(Ie,()=>Q$,(Ce,Le)=>{Le(Ce,{children:(st,Xe)=>{var He=Ix(),Pe=ye(He),j=de(Pe,!0),ae=m(Pe,2);xt(ae,{type:"button",variant:"link",get"aria-expanded"(){return e(T)},onclick:()=>_(T,!e(T)),class:"text-xs text-muted-foreground hover:text-foreground transition-colors mt-2 cursor-pointer",children:(qe,G)=>{In();var Se=_n();q(Ae=>z(Se,Ae),[()=>e(T)?g.chat_regularAgentWelcome_showLess_label():g.chat_regularAgentWelcome_showMore_label()]),p(qe,Se)},$$slots:{default:!0}}),q(()=>{ke(Pe,1,`text-sm text-subtle leading-relaxed whitespace-pre-wrap break-words ${e(T)?"":"line-clamp-6"}`),z(j,e(Re))}),p(st,He)},$$slots:{default:!0}})}),p(J,Ne)},$$slots:{default:!0}})})}p(N,C)},se=N=>{var C=$x(),re=de(C,!0);q(()=>z(re,e(Re))),p(N,C)};B(te,N=>{e(F)?N(ze):N(se,-1)})}var he=m(te,2);{var Me=N=>{xt(N,{variant:"ghost-light",size:"sm",onclick:()=>D(e(F).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:(C,re)=>{var Te=kx(),L=ye(Te);pt(L,{get icon(){return h$},size:12,class:"opacity-60"});var Y=m(L,2),J=de(Y,!0);q(be=>z(J,be),[()=>g.chat_regularAgentWelcome_customize_label()]),p(C,Te)},$$slots:{default:!0}})};B(he,N=>{e(F)&&N(Me)})}b(ue),p(n,ue);var Ee=fn(ve);return u(),Ee}var Cx=E('<a class="cursor-pointer underline underline-offset-2 hover:opacity-80" data-suggested-prompt-link=""> </a>'),Px=E('<kbd data-suggested-prompt-hint=""> </kbd>'),Rx=E('<span class="type-caption"> </span>'),Tx=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>'),Ax=E('<div class="flex flex-col" data-testid="suggested-prompts-surface"><!></div>');function Kd(n,r){if(new.target)return dn({component:Kd,...n});pn(r,!0);let a=Z(r,"prompts",7),i=Z(r,"onSelect",7),c=Z(r,"onEdit",7),l=Z(r,"compact",7,!1),f=Z(r,"showShortcutHints",7,!1),u=Z(r,"reserveShortcutHintSpace",7,!1),w=Z(r,"workspaceId",7);const R=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC")?"⌃":"Alt+",y=GS.replace("text-ui","type-caption");function M(k){i()(k)}function x(k,Q){k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),M(Q))}function F(k,Q){k.preventDefault(),k.stopPropagation(),Pd(Q,{workspaceId:w(),event:k})}function D(k,Q){(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),k.stopPropagation(),Pd(Q,{workspaceId:w(),event:k}))}function T(k){return k<3}var H={get prompts(){return a()},set prompts(k){a(k),ee()},get onSelect(){return i()},set onSelect(k){i(k),ee()},get onEdit(){return c()},set onEdit(k){c(k),ee()},get compact(){return l()},set compact(k=!1){l(k),ee()},get showShortcutHints(){return f()},set showShortcutHints(k=!1){f(k),ee()},get reserveShortcutHintSpace(){return u()},set reserveShortcutHintSpace(k=!1){u(k),ee()},get workspaceId(){return w()},set workspaceId(k){w(k),ee()},$set:un,$on:(k,Q)=>gn(r,k,Q)},V=Bt(),oe=ye(V);{var P=k=>{var Q=Ax(),ge=I(Q);{const Re=(ue,we)=>{let ne=()=>(we?.()).item,te=()=>(we?.()).index;const ze=o(()=>Bb(ne())),se=o(()=>e(ze)[0]?.type==="text"?e(ze)[0].content:"");var he=Tx(),Me=I(he),Ee=I(Me);pt(Ee,{get icon(){return Ef},size:16,get class(){return lr}}),b(Me);var N=m(Me,2),C=I(N),re=de(C,!0),Te=m(C);Hn(Te,17,()=>e(ze).slice(e(se)?1:0),H_,(U,Ie)=>{var Ce=Bt(),Le=ye(Ce);{var st=He=>{const Pe=o(()=>Nb(e(Ie).url));var j=Cx(),ae=de(j,!0);q(()=>{Ue(j,"href",e(Pe)),Ue(j,"title",e(Pe)),z(ae,e(Ie).label)}),ps("click",j,qe=>F(qe,e(Pe))),ps("keydown",j,qe=>D(qe,e(Pe))),p(He,j)},Xe=He=>{var Pe=_n();q(()=>z(Pe,e(Ie).content)),p(He,Pe)};B(Le,He=>{e(Ie).type==="link"?He(st):He(Xe,-1)})}p(U,Ce)}),b(N);var L=m(N,2);{var Y=U=>{var Ie=Px();let Ce;var Le=de(Ie);q(()=>{Ce=ke(Ie,1,`${y??""} 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:!f()}),Ue(Ie,"aria-hidden",f()?void 0:"true"),Ue(Ie,"data-hint-visible",f()),z(Le,`${R}${te()+1}`)}),p(U,Ie)},J=o(()=>T(te())&&(f()||u()));B(L,U=>{e(J)&&U(Y)})}var be=m(L,2);{var Ne=U=>{v$(U,{side:"top",delayDuration:300,trigger:Le=>{{let st=o(()=>g.chat_suggestedPrompts_editInInput_ariaLabel());xt(Le,{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:Xe=>{Xe.stopPropagation(),c()(ne())},get"aria-label"(){return e(st)},children:(Xe,He)=>{pt(Xe,{get icon(){return _$},size:"xs"})},$$slots:{default:!0}})}},content:Le=>{var st=Rx(),Xe=de(st,!0);q(He=>z(Xe,He),[()=>g.chat_suggestedPrompts_edit_tooltip()]),p(Le,st)},$$slots:{trigger:!0,content:!0}})};B(be,U=>{c()&&U(Ne)})}b(he),q(U=>{ke(he,1,`${Af} ${VS} 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`),ke(Me,1,`${Fl??""} mt-px self-start`),Ue(C,"aria-label",U),z(re,e(se))},[()=>Db(ne())]),ps("click",C,U=>{U.stopPropagation(),M(ne())}),ps("keydown",C,U=>x(U,ne())),p(ue,he)};let ve=o(()=>l()?"[&>div>div:last-child]:gap-0":"[&>div>div:last-child]:gap-0.5");u$(ge,{get items(){return a()},virtualize:!1,onActivate:M,get class(){return`overflow-visible! [&>div>div:last-child]:flex [&>div>div:last-child]:flex-col ${e(ve)??""}`},"data-testid":"suggested-prompts-list",get"data-compact"(){return l()},row:Re,$$slots:{row:!0}})}b(Q),Dt(1,Q,()=>ma,()=>({tier:"fast",y:0,scale:1})),Dt(2,Q,()=>Zs,()=>({tier:"fast"})),p(k,Q)};B(oe,k=>{a().length>0&&k(P)})}return p(n,V),fn(H)}Od(["click","keydown"]);var Mx=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 rv(n,r){if(new.target)return dn({component:rv,...n});pn(r,!0);let a=Z(r,"onSelect",7),i=Z(r,"compact",7,!1);const c=o(()=>[{label:g.chat_chiefEmptyState_assignedPrs_label(),prompt:g.chat_chiefEmptyState_assignedPrs_prompt()},{label:g.chat_chiefEmptyState_staleWorkspaces_label(),prompt:g.chat_chiefEmptyState_staleWorkspaces_prompt()},{label:g.chat_chiefEmptyState_agentPerformance_label(),prompt:g.chat_chiefEmptyState_agentPerformance_prompt()},{label:g.chat_chiefEmptyState_morningBrief_label(),prompt:g.chat_chiefEmptyState_morningBrief_prompt()},{label:g.chat_chiefEmptyState_randomTheme_label(),prompt:g.chat_chiefEmptyState_randomTheme_prompt()}]),l=o(()=>e(c).map(M=>M.label));function f(M){const x=e(c).find(F=>F.label===M);x&&a()(x.prompt)}var u={get onSelect(){return a()},set onSelect(M){a(M),ee()},get compact(){return i()},set compact(M=!1){i(M),ee()},$set:un,$on:(M,x)=>gn(r,M,x)},w=Mx(),v=I(w),R=de(v,!0),y=m(v,2);return Kd(y,{get prompts(){return e(l)},onSelect:f,get compact(){return i()}}),b(w),q(M=>z(R,M),[()=>g.chat_chiefEmptyState_intro_label()]),p(n,w),fn(u)}const Qd=2e3,Ex=4e3,qx=Ex-Qd-2;function Lx(n,r=Qd){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 f=(l.contentBlocks??[]).filter(w=>w.type==="text").map(w=>w.text||w.content||"").join(""),u=(l.role==="assistant"?N_(f).cleanedContent:f).trim();u&&(a.unshift({role:l.role,text:u}),i+=u.length)}return a}function Hx(n,r){const a=n.map(l=>`${l.role==="user"?"User":"Assistant"}: ${l.text}`).join(`
2
2
 
3
3
  `).slice(-Qd),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,4 +1,4 @@
1
- import{I as W}from"./DzXo18RQ.js";import{p as X}from"./ezsQjlt6.js";import{b0 as z,a_ as G,aZ as Y,Y as P,U as F,V as Z,b as g,q as N,ay as A,aX as q,B as U,W as E,r as j,aV as J,a0 as K,O as Q,aO as ee}from"./BpXYSrHL.js";import{p as te}from"./2ypcXvW0.js";var L=/[─━│┃└┗├┣]/,D=/[└┗├┣]/,ne=/[─━]/,V=/^[\s│┃]+$/,T=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,$=/^\s*%%/,re=" ";function _(n){return n.some(t=>L.test(t))}g(_,"isBoxDrawingFormat");function M(n){for(const t of n){const e=D.exec(t);if(e?.index&&e.index>0)return e.index}return 4}g(M,"inferSegmentWidth");function S(n,t){return n.replace(/\bline\s+(\d+)\b/gi,(e,r)=>{const s=parseInt(r,10),i=t.get(s);return i?`line ${i}`:e})}g(S,"remapErrorLines");function R(n){const t=n.split(`
1
+ import{I as W}from"./DYb2Jx_H.js";import{p as X}from"./DcPlD4Yk.js";import{b0 as z,a_ as G,aZ as Y,Y as P,U as F,V as Z,b as g,q as N,ay as A,aX as q,B as U,W as E,r as j,aV as J,a0 as K,O as Q,aO as ee}from"./6s1pPvLx.js";import{p as te}from"./2ypcXvW0.js";var L=/[─━│┃└┗├┣]/,D=/[└┗├┣]/,ne=/[─━]/,V=/^[\s│┃]+$/,T=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,$=/^\s*%%/,re=" ";function _(n){return n.some(t=>L.test(t))}g(_,"isBoxDrawingFormat");function M(n){for(const t of n){const e=D.exec(t);if(e?.index&&e.index>0)return e.index}return 4}g(M,"inferSegmentWidth");function S(n,t){return n.replace(/\bline\s+(\d+)\b/gi,(e,r)=>{const s=parseInt(r,10),i=t.get(s);return i?`line ${i}`:e})}g(S,"remapErrorLines");function R(n){const t=n.split(`
2
2
  `),e=new Map;let r=-1;for(const[p,c]of t.entries())if(c.trim()==="treeView-beta"){r=p;break}if(r===-1)return{text:n,lineMap:e};const s=[];for(let p=r+1;p<t.length;p++){const c=t[p];c.trim()===""||$.test(c)||T.test(c)||V.test(c)||s.push(c.replace(/\t/g," "))}if(!_(s))return{text:n,lineMap:e};const i=M(s),o=[];let a=0;for(let p=0;p<=r;p++)o.push(t[p]),a++,e.set(a,p+1);for(let p=r+1;p<t.length;p++){const c=t[p],d=c.trim(),h=p+1;if(d===""){o.push(c),a++,e.set(a,h);continue}if($.test(c)){o.push(c),a++,e.set(a,h);continue}if(T.test(c)){o.push(c),a++,e.set(a,h);continue}if(V.test(c))continue;const l=c.replace(/\t/g," "),w=D.exec(l);if(w?.index!==void 0){const f=w.index,m=Math.round(f/i)+1;let u=f+1;for(;u<l.length&&ne.test(l[u]);)u++;for(;u<l.length&&l[u]===" ";)u++;const v=l.slice(u).trimEnd();if(!v)throw new Error(`Line ${h}: Empty node — expected a filename or directory name after the box-drawing prefix`);const O=re.repeat(m);o.push(O+v),a++,e.set(a,h)}else{if(/^[\s─━│┃└┗├┣]+$/.test(l))continue;if(L.test(l))o.push(c),a++,e.set(a,h);else{if(/^\s+/.test(l))throw new Error(`Line ${h}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);o.push(c),a++,e.set(a,h)}}}return{text:o.join(`
3
3
  `),lineMap:e}}g(R,"preprocessBoxDrawing");var x=new W(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),ie=g(()=>{x.reset(),j()},"clear"),oe=g(()=>x.records.stack[0],"getRoot"),se=g(()=>x.records.cnt,"getCount"),ae=Q.treeView,ce=g(()=>N(ae,E().treeView),"getConfig"),le=g((n,t,e,r,s,i)=>{for(;n<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const o={id:x.records.cnt++,level:n,name:t,nodeType:e,icon:s,cssClass:r,description:i,children:[]};x.records.stack[x.records.stack.length-1].children.push(o),x.records.stack.push(o)},"addNode"),de={clear:ie,addNode:le,getRoot:oe,getCount:se,getConfig:ce,getAccTitle:Z,getAccDescription:F,getDiagramTitle:P,setAccDescription:Y,setAccTitle:G,setDiagramTitle:z},I=de,he=g(n=>{X(n,I);for(const t of n.nodes){const e=typeof t.indent=="number"?t.indent:0;let r=t.name;const s=r.endsWith("/");s&&(r=r.slice(0,-1));const i=s?"directory":"file",o=t.classAnnotation||void 0,a=t.iconAnnotation,p=a!==void 0?a||"none":void 0,c=t.descAnnotation||void 0,d=c?J(c,E()):void 0;I.addNode(e,r,i,o,p,d)}},"populate"),pe={parse:g(async n=>{const{text:t,lineMap:e}=R(n);try{const r=await te("treeView",t);A.debug(r),he(r)}catch(r){throw e.size>0&&r instanceof Error&&(r.message=S(r.message,e)),r}},"parse")},b={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function H(n,t){const e=t?.filenameIcons?.[n];if(e)return e;const r=n.lastIndexOf(".");if(r>0){const s=n.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[s]??i?.[s.slice(1)]}}g(H,"detectIcon");function C(n,t){return n.includes(":")?n:n in b.icons||!t?`${b.prefix}:${n}`:`${t}:${n}`}g(C,"qualifyIcon");function B(n,t){if(n.icon!=="none"){if(n.icon)return C(n.icon,t.defaultIconPack);if(t.showIcons){if(n.nodeType==="file"){const e=H(n.name,t);if(e==="none")return;if(e)return C(e,t.defaultIconPack)}return`${b.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}g(B,"getNodeIcon");ee([{name:b.prefix,icons:b}]);var y=14,ge=4,fe=16,ue=g(async(n,t)=>{const e=[],r=g(i=>{const o=B(i,t);o&&e.push({icon:o,node:i}),i.children.forEach(r)},"collect");r(n);const s=await Promise.all(e.map(async({icon:i,node:o})=>({id:o.id,svg:await K(i,{height:y,width:y})})));return new Map(s.map(({id:i,svg:o})=>[i,o]))},"resolveNodeIcons"),we=g((n,t,e,r,s,i)=>{const o=r.append("g");let a="treeView-node-label";e.nodeType==="directory"&&(a+=" treeView-node-dir"),e.cssClass&&(a+=` ${e.cssClass}`);const p=y+ge,c=B(e,s),d=c!==void 0;c&&o.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${n+s.paddingX}, ${t+s.paddingY})`).html(i.get(e.id)??"");const h=o.append("text").text(e.name).attr("dominant-baseline","middle").attr("class",a),{height:l,width:w}=h.node().getBBox(),f=l+s.paddingY*2,m=n+s.paddingX+(d?p:0);h.attr("x",m),h.attr("y",t+f/2);const u=m+w,v=w+s.paddingX*2+(d?p:0);return e.BBox={x:n,y:t,width:v,height:f},e.cssClass?.split(/\s+/).includes("highlight")&&o.insert("rect",":first-child").attr("x",n).attr("y",t+1).attr("width",0).attr("height",f-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:e,nodeGroup:o,labelRightEdge:u,centerY:t+f/2}},"positionLabel"),k=g((n,t,e,r,s,i)=>n.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",s).attr("stroke-width",i).attr("class","treeView-node-line"),"positionLine"),me=g((n,t,e,r)=>{let s=0,i=0;const o=[],a=g((d,h,l,w)=>{const f=w*(l.rowIndent+l.paddingX),m=we(f,s,h,d,l,r);o.push(m);const{height:u,width:v}=h.BBox;k(d,f-l.rowIndent,s+u/2,f,s+u/2,l.lineThickness),i=Math.max(i,f+v),s+=u},"drawNode"),p=g((d,h=0)=>{a(n,d,e,h),d.children.forEach(m=>{p(m,h+1)});const{x:l,y:w,height:f}=d.BBox;if(d.children.length){const{y:m,height:u}=d.children[d.children.length-1].BBox;k(n,l+e.paddingX,w+f,l+e.paddingX,m+u/2+e.lineThickness/2,e.lineThickness)}},"processNode");p(t);const c=o.filter(d=>d.node.description);if(c.length>0){const h=Math.max(...o.map(l=>l.labelRightEdge))+fe;for(const l of c){const f=l.nodeGroup.append("text").text(l.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",h).attr("y",l.centerY).node().getBBox();i=Math.max(i,h+f.width+e.paddingX)}}for(const d of o)if(d.node.cssClass?.split(/\s+/).includes("highlight")){const h=d.nodeGroup.select(".treeView-highlight-bg");if(!h.empty()){const l=i-d.node.BBox.x+8;h.attr("width",l),i=Math.max(i,d.node.BBox.x+l+2)}}return{totalHeight:s,totalWidth:i}},"drawTree"),xe=g(async(n,t,e,r)=>{A.debug(`Rendering treeView diagram
4
4
  `+n);const s=r.db,i=s.getRoot(),o=s.getConfig(),a=q(t),p=a.append("g");p.attr("class","tree-view");const c=await ue(i,o),{totalHeight:d,totalWidth:h}=me(p,i,o,c);a.attr("viewBox",`-${o.lineThickness/2} 0 ${h} ${d}`),U(a,d,h,o.useMaxWidth)},"draw"),ve={draw:xe},be=ve,Ie={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},Ce=g(({treeView:n})=>{const{labelFontSize:t,labelColor:e,lineColor:r,iconColor:s,descriptionColor:i,highlightBg:o,highlightStroke:a}=N(Ie,n);return`
@@ -1,4 +1,4 @@
1
- import{g as ie}from"./CgyKOUjB.js";import{s as re}from"./0PFbquWg.js";import{b as p,ay as b,X as $,a1 as ae,aP as ne,bh as oe,V as le,a_ as ce,U as he,aZ as de,b0 as ue,Y as fe,T as pe,z as j,r as Se,aW as vt,am as ge,aU as ye,ab as me,aG as Te}from"./BpXYSrHL.js";import{c as Ee}from"./rUAQGuY9.js";import{aR as _e}from"./eHy-2vQk.js";var At=(function(){var t=p(function(V,o,f,n){for(f=f||{},n=V.length;n--;f[V[n]]=o);return f},"o"),e=[1,2],s=[1,3],a=[1,4],r=[2,4],c=[1,9],h=[1,11],u=[1,16],l=[1,17],m=[1,18],y=[1,19],_=[1,33],L=[1,20],N=[1,21],D=[1,22],S=[1,23],w=[1,24],C=[1,26],F=[1,27],I=[1,28],P=[1,29],v=[1,30],z=[1,31],at=[1,32],nt=[1,35],ot=[1,36],lt=[1,37],ct=[1,38],K=[1,34],g=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ht=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],It=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],mt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:p(function(o,f,n,T,E,i,B){var d=i.length-1;switch(E){case 3:return T.setRootDoc(i[d]),i[d];case 4:this.$=[];break;case 5:i[d]!="nl"&&(i[d-1].push(i[d]),this.$=i[d-1]);break;case 6:case 7:this.$=i[d];break;case 8:this.$="nl";break;case 12:this.$=i[d];break;case 13:const Q=i[d-1];Q.description=T.trimColon(i[d]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[d-2],state2:i[d]};break;case 15:const Tt=T.trimColon(i[d]);this.$={stmt:"relation",state1:i[d-3],state2:i[d-1],description:Tt};break;case 19:this.$={stmt:"state",id:i[d-3],type:"default",description:"",doc:i[d-1]};break;case 20:var G=i[d],X=i[d-2].trim();if(i[d].match(":")){var ut=i[d].split(":");G=ut[0],X=[X,ut[1]]}this.$={stmt:"state",id:G,type:"default",description:X};break;case 21:this.$={stmt:"state",id:i[d-3],type:"default",description:i[d-5],doc:i[d-1]};break;case 22:this.$={stmt:"state",id:i[d],type:"fork"};break;case 23:this.$={stmt:"state",id:i[d],type:"join"};break;case 24:this.$={stmt:"state",id:i[d],type:"choice"};break;case 25:this.$={stmt:"state",id:T.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[d-1].trim(),note:{position:i[d-2].trim(),text:i[d].trim()}};break;case 29:this.$=i[d].trim(),T.setAccTitle(this.$);break;case 30:case 31:this.$=i[d].trim(),T.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[d-3],url:i[d-2],tooltip:i[d-1]};break;case 33:this.$={stmt:"click",id:i[d-3],url:i[d-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[d-1].trim(),classes:i[d].trim()};break;case 36:this.$={stmt:"style",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 37:this.$={stmt:"applyClass",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 38:T.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:T.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:T.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:T.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[d].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,7]),t(g,[2,8]),t(g,[2,9]),t(g,[2,10]),t(g,[2,11]),t(g,[2,12],{14:[1,40],15:[1,41]}),t(g,[2,16]),{18:[1,42]},t(g,[2,18],{20:[1,43]}),{23:[1,44]},t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(g,[2,28]),{34:[1,49]},{36:[1,50]},t(g,[2,31]),{13:51,24:_,57:K},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(ht,[2,44],{58:[1,56]}),t(ht,[2,45],{58:[1,57]}),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,41]),t(g,[2,6]),t(g,[2,13]),{13:58,24:_,57:K},t(g,[2,17]),t(It,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(g,[2,29]),t(g,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(g,[2,14],{14:[1,71]}),{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,72],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(g,[2,34]),t(g,[2,35]),t(g,[2,36]),t(g,[2,37]),t(ht,[2,46]),t(ht,[2,47]),t(g,[2,15]),t(g,[2,19]),t(It,r,{7:78}),t(g,[2,26]),t(g,[2,27]),{5:[1,79]},{5:[1,80]},{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,81],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,32]),t(g,[2,33]),t(g,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:p(function(o,f){if(f.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=f,n}},"parseError"),parse:p(function(o){var f=this,n=[0],T=[],E=[null],i=[],B=this.table,d="",G=0,X=0,ut=2,Q=1,Tt=i.slice.call(arguments,1),k=Object.create(this.lexer),W={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(W.yy[Et]=this.yy[Et]);k.setInput(o,W.yy),W.yy.lexer=k,W.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var _t=k.yylloc;i.push(_t);var ee=k.options&&k.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function se(R){n.length=n.length-2*R,E.length=E.length-R,i.length=i.length-R}p(se,"popStack");function Rt(){var R;return R=T.pop()||k.lex()||Q,typeof R!="number"&&(R instanceof Array&&(T=R,R=T.pop()),R=f.symbols_[R]||R),R}p(Rt,"lex");for(var x,U,O,bt,J={},ft,Y,Nt,pt;;){if(U=n[n.length-1],this.defaultActions[U]?O=this.defaultActions[U]:((x===null||typeof x>"u")&&(x=Rt()),O=B[U]&&B[U][x]),typeof O>"u"||!O.length||!O[0]){var kt="";pt=[];for(ft in B[U])this.terminals_[ft]&&ft>ut&&pt.push("'"+this.terminals_[ft]+"'");k.showPosition?kt="Parse error on line "+(G+1)+`:
1
+ import{g as ie}from"./p9pVDf-Y.js";import{s as re}from"./Cuij5UQt.js";import{b as p,ay as b,X as $,a1 as ae,aP as ne,bh as oe,V as le,a_ as ce,U as he,aZ as de,b0 as ue,Y as fe,T as pe,z as j,r as Se,aW as vt,am as ge,aU as ye,ab as me,aG as Te}from"./6s1pPvLx.js";import{c as Ee}from"./BuJuLth3.js";import{aR as _e}from"./DfC089Aj.js";var At=(function(){var t=p(function(V,o,f,n){for(f=f||{},n=V.length;n--;f[V[n]]=o);return f},"o"),e=[1,2],s=[1,3],a=[1,4],r=[2,4],c=[1,9],h=[1,11],u=[1,16],l=[1,17],m=[1,18],y=[1,19],_=[1,33],L=[1,20],N=[1,21],D=[1,22],S=[1,23],w=[1,24],C=[1,26],F=[1,27],I=[1,28],P=[1,29],v=[1,30],z=[1,31],at=[1,32],nt=[1,35],ot=[1,36],lt=[1,37],ct=[1,38],K=[1,34],g=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ht=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],It=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],mt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:p(function(o,f,n,T,E,i,B){var d=i.length-1;switch(E){case 3:return T.setRootDoc(i[d]),i[d];case 4:this.$=[];break;case 5:i[d]!="nl"&&(i[d-1].push(i[d]),this.$=i[d-1]);break;case 6:case 7:this.$=i[d];break;case 8:this.$="nl";break;case 12:this.$=i[d];break;case 13:const Q=i[d-1];Q.description=T.trimColon(i[d]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[d-2],state2:i[d]};break;case 15:const Tt=T.trimColon(i[d]);this.$={stmt:"relation",state1:i[d-3],state2:i[d-1],description:Tt};break;case 19:this.$={stmt:"state",id:i[d-3],type:"default",description:"",doc:i[d-1]};break;case 20:var G=i[d],X=i[d-2].trim();if(i[d].match(":")){var ut=i[d].split(":");G=ut[0],X=[X,ut[1]]}this.$={stmt:"state",id:G,type:"default",description:X};break;case 21:this.$={stmt:"state",id:i[d-3],type:"default",description:i[d-5],doc:i[d-1]};break;case 22:this.$={stmt:"state",id:i[d],type:"fork"};break;case 23:this.$={stmt:"state",id:i[d],type:"join"};break;case 24:this.$={stmt:"state",id:i[d],type:"choice"};break;case 25:this.$={stmt:"state",id:T.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[d-1].trim(),note:{position:i[d-2].trim(),text:i[d].trim()}};break;case 29:this.$=i[d].trim(),T.setAccTitle(this.$);break;case 30:case 31:this.$=i[d].trim(),T.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[d-3],url:i[d-2],tooltip:i[d-1]};break;case 33:this.$={stmt:"click",id:i[d-3],url:i[d-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[d-1].trim(),classes:i[d].trim()};break;case 36:this.$={stmt:"style",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 37:this.$={stmt:"applyClass",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 38:T.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:T.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:T.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:T.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[d].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:u,17:l,19:m,22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,7]),t(g,[2,8]),t(g,[2,9]),t(g,[2,10]),t(g,[2,11]),t(g,[2,12],{14:[1,40],15:[1,41]}),t(g,[2,16]),{18:[1,42]},t(g,[2,18],{20:[1,43]}),{23:[1,44]},t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(g,[2,28]),{34:[1,49]},{36:[1,50]},t(g,[2,31]),{13:51,24:_,57:K},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(ht,[2,44],{58:[1,56]}),t(ht,[2,45],{58:[1,57]}),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,41]),t(g,[2,6]),t(g,[2,13]),{13:58,24:_,57:K},t(g,[2,17]),t(It,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(g,[2,29]),t(g,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(g,[2,14],{14:[1,71]}),{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,72],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(g,[2,34]),t(g,[2,35]),t(g,[2,36]),t(g,[2,37]),t(ht,[2,46]),t(ht,[2,47]),t(g,[2,15]),t(g,[2,19]),t(It,r,{7:78}),t(g,[2,26]),t(g,[2,27]),{5:[1,79]},{5:[1,80]},{4:c,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:u,17:l,19:m,21:[1,81],22:y,24:_,25:L,26:N,27:D,28:S,29:w,32:25,33:C,35:F,37:I,38:P,41:v,45:z,48:at,51:nt,52:ot,53:lt,54:ct,57:K},t(g,[2,32]),t(g,[2,33]),t(g,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:p(function(o,f){if(f.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=f,n}},"parseError"),parse:p(function(o){var f=this,n=[0],T=[],E=[null],i=[],B=this.table,d="",G=0,X=0,ut=2,Q=1,Tt=i.slice.call(arguments,1),k=Object.create(this.lexer),W={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(W.yy[Et]=this.yy[Et]);k.setInput(o,W.yy),W.yy.lexer=k,W.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var _t=k.yylloc;i.push(_t);var ee=k.options&&k.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function se(R){n.length=n.length-2*R,E.length=E.length-R,i.length=i.length-R}p(se,"popStack");function Rt(){var R;return R=T.pop()||k.lex()||Q,typeof R!="number"&&(R instanceof Array&&(T=R,R=T.pop()),R=f.symbols_[R]||R),R}p(Rt,"lex");for(var x,U,O,bt,J={},ft,Y,Nt,pt;;){if(U=n[n.length-1],this.defaultActions[U]?O=this.defaultActions[U]:((x===null||typeof x>"u")&&(x=Rt()),O=B[U]&&B[U][x]),typeof O>"u"||!O.length||!O[0]){var kt="";pt=[];for(ft in B[U])this.terminals_[ft]&&ft>ut&&pt.push("'"+this.terminals_[ft]+"'");k.showPosition?kt="Parse error on line "+(G+1)+`:
2
2
  `+k.showPosition()+`
3
3
  Expecting `+pt.join(", ")+", got '"+(this.terminals_[x]||x)+"'":kt="Parse error on line "+(G+1)+": Unexpected "+(x==Q?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(kt,{text:k.match,token:this.terminals_[x]||x,line:k.yylineno,loc:_t,expected:pt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+x);switch(O[0]){case 1:n.push(x),E.push(k.yytext),i.push(k.yylloc),n.push(O[1]),x=null,X=k.yyleng,d=k.yytext,G=k.yylineno,_t=k.yylloc;break;case 2:if(Y=this.productions_[O[1]][1],J.$=E[E.length-Y],J._$={first_line:i[i.length-(Y||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(Y||1)].first_column,last_column:i[i.length-1].last_column},ee&&(J._$.range=[i[i.length-(Y||1)].range[0],i[i.length-1].range[1]]),bt=this.performAction.apply(J,[d,X,G,W.yy,O[1],E,i].concat(Tt)),typeof bt<"u")return bt;Y&&(n=n.slice(0,-1*Y*2),E=E.slice(0,-1*Y),i=i.slice(0,-1*Y)),n.push(this.productions_[O[1]][0]),E.push(J.$),i.push(J._$),Nt=B[n[n.length-2]][n[n.length-1]],n.push(Nt);break;case 3:return!0}}return!0},"parse")},te=(function(){var V={EOF:1,parseError:p(function(f,n){if(this.yy.parser)this.yy.parser.parseError(f,n);else throw new Error(f)},"parseError"),setInput:p(function(o,f){return this.yy=f||this.yy||{},this._input=o,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:p(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var f=o.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:p(function(o){var f=o.length,n=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var T=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),n.length-1&&(this.yylineno-=n.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:n?(n.length===T.length?this.yylloc.first_column:0)+T[T.length-n.length].length-n[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(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:p(function(o){this.unput(this.match.slice(o))},"less"),pastInput:p(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var o=this.pastInput(),f=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{g as fe}from"./CygNkso5.js";import{b as o,ay as te,X as U,aX as ye,ad as be,ah as me,aL as ke,b3 as Ee,O as K,aV as F,ax as _e,J as Se,an as Ne,au as ce,H as le}from"./BpXYSrHL.js";var $=(function(){var e=o(function(O,s,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=s);return n},"o"),h=[1,4],p=[1,13],i=[1,12],d=[1,15],k=[1,16],m=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],E=[6,7,11],G=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],H=[1,38],T={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(s,n,r,a,u,t,M){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:p,7:[1,10],9:9,12:11,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},{6:I,7:g,10:23,11:w},e(E,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(E,[2,19]),e(E,[2,21],{15:30,24:G}),e(E,[2,22]),e(E,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},e(V,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(E,[2,16],{15:37,24:G}),e(E,[2,17]),e(E,[2,18]),e(E,[2,20],{24:H}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(E,[2,15],{24:H}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(s,n){if(n.recoverable)this.trace(s);else{var r=new Error(s);throw r.hash=n,r}},"parseError"),parse:o(function(s){var n=this,r=[0],a=[],u=[null],t=[],M=this.table,c="",W=0,ie=0,ue=2,re=1,ge=t.slice.call(arguments,1),b=Object.create(this.lexer),R={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(R.yy[J]=this.yy[J]);b.setInput(s,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;t.push(q);var de=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,u.length=u.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var _,P,x,Q,j={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((_===null||typeof _>"u")&&(_=ae()),x=M[P]&&M[P][_]),typeof x>"u"||!x.length||!x[0]){var Z="";X=[];for(z in M[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");b.showPosition?Z="Parse error on line "+(W+1)+`:
1
+ import{g as fe}from"./DCdZE6Zv.js";import{b as o,ay as te,X as U,aX as ye,ad as be,ah as me,aL as ke,b3 as Ee,O as K,aV as F,ax as _e,J as Se,an as Ne,au as ce,H as le}from"./6s1pPvLx.js";var $=(function(){var e=o(function(O,s,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=s);return n},"o"),h=[1,4],p=[1,13],i=[1,12],d=[1,15],k=[1,16],m=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],E=[6,7,11],G=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],H=[1,38],T={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(s,n,r,a,u,t,M){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:p,7:[1,10],9:9,12:11,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},{6:I,7:g,10:23,11:w},e(E,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(E,[2,19]),e(E,[2,21],{15:30,24:G}),e(E,[2,22]),e(E,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},e(V,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(E,[2,16],{15:37,24:G}),e(E,[2,17]),e(E,[2,18]),e(E,[2,20],{24:H}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(E,[2,15],{24:H}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(s,n){if(n.recoverable)this.trace(s);else{var r=new Error(s);throw r.hash=n,r}},"parseError"),parse:o(function(s){var n=this,r=[0],a=[],u=[null],t=[],M=this.table,c="",W=0,ie=0,ue=2,re=1,ge=t.slice.call(arguments,1),b=Object.create(this.lexer),R={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(R.yy[J]=this.yy[J]);b.setInput(s,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;t.push(q);var de=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,u.length=u.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var _,P,x,Q,j={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((_===null||typeof _>"u")&&(_=ae()),x=M[P]&&M[P][_]),typeof x>"u"||!x.length||!x[0]){var Z="";X=[];for(z in M[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");b.showPosition?Z="Parse error on line "+(W+1)+`:
2
2
  `+b.showPosition()+`
3
3
  Expecting `+X.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Z="Parse error on line "+(W+1)+": Unexpected "+(_==re?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Z,{text:b.match,token:this.terminals_[_]||_,line:b.yylineno,loc:q,expected:X})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+_);switch(x[0]){case 1:r.push(_),u.push(b.yytext),t.push(b.yylloc),r.push(x[1]),_=null,ie=b.yyleng,c=b.yytext,W=b.yylineno,q=b.yylloc;break;case 2:if(C=this.productions_[x[1]][1],j.$=u[u.length-C],j._$={first_line:t[t.length-(C||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(C||1)].first_column,last_column:t[t.length-1].last_column},de&&(j._$.range=[t[t.length-(C||1)].range[0],t[t.length-1].range[1]]),Q=this.performAction.apply(j,[c,ie,W,R.yy,x[1],u,t].concat(ge)),typeof Q<"u")return Q;C&&(r=r.slice(0,-1*C*2),u=u.slice(0,-1*C),t=t.slice(0,-1*C)),r.push(this.productions_[x[1]][0]),u.push(j.$),t.push(j._$),oe=M[r[r.length-2]][r[r.length-1]],r.push(oe);break;case 3:return!0}}return!0},"parse")},Y=(function(){var O={EOF:1,parseError:o(function(n,r){if(this.yy.parser)this.yy.parser.parseError(n,r);else throw new Error(n)},"parseError"),setInput:o(function(s,n){return this.yy=n||this.yy||{},this._input=s,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:o(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.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),s},"input"),unput:o(function(s){var n=s.length,r=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var a=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),r.length-1&&(this.yylineno-=r.length-1);var u=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:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(s){this.unput(this.match.slice(s))},"less"),pastInput:o(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{g as l,r as m,d as n}from"./DZnf3Vcd.js";import{p}from"./ezsQjlt6.js";import{b as t,ay as o}from"./BpXYSrHL.js";import{M as u,a as f}from"./2ypcXvW0.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),y=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),d=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(d(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},N={parser:g,db:n,renderer:m,styles:l};export{N as diagram};
1
+ import{g as l,r as m,d as n}from"./BDARQpEZ.js";import{p}from"./DcPlD4Yk.js";import{b as t,ay as o}from"./6s1pPvLx.js";import{M as u,a as f}from"./2ypcXvW0.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),y=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),d=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(d(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},N={parser:g,db:n,renderer:m,styles:l};export{N as diagram};
@@ -1 +1 @@
1
- import{t as mt,bo as h,bw as dt,bq as ut,b as ft,bs as _,bm as D}from"./ClpAEjbe.js";import{bs as vt,ca as T,aD as e,bj as gt,a7 as b,ay as m,W as d,bn as _t,c9 as i,cd as O,aA as k,bS as bt,aB as $t}from"./CJxGDkBm.js";import{i as A}from"./wmcYjLAa.js";import{k as j}from"./Xh71Wbuh.js";import{c as z}from"./DSqSJXGX.js";import{aw as It,cS as wt}from"./CtJxHvGv.js";import{dz as St,dX as ht}from"./D9Ykl3eH.js";import{S as kt,c as Ct}from"./Dqso2iIq.js";import{selectScriptById as yt,selectCanDeleteScript as xt}from"./uMNoDmQ2.js";import"./CnGVh7I3.js";import"./WSVFXKpL.js";import"./CPDV_dyu.js";import"./B5wwCKYG.js";import{M as J}from"./Dd_i7pU1.js";import{g as Dt}from"./BrMXrCxP.js";import{T as Tt}from"./CX5klKKv.js";import{t as At,e as Bt}from"./B4qsbMKj.js";import{Jq as B,Ds as Vt,vv as Wt,g$ as Rt}from"./CpP1PKzF.js";var qt=$t("<!> <!>",1);function Ht(V,c){if(new.target)return mt({component:Ht,...V});vt(c,!0);const $=()=>_(K,"$fullContext$",u),P=()=>_(Q,"$canDeleteScript$",u),X=()=>_(L,"$scriptContext$",u),E=()=>_(N,"$script$",u),W=()=>_(U,"$homeView$",u),[u,F]=ut(),G=t=>{var r=b(),n=m(r);{var f=v=>{var w=qt(),M=m(w);{let g=i(()=>D.workspace_shell_showInBottomBar_tooltip());z(M,()=>J,(S,x)=>{x(S,{get icon(){return It},get label(){return e(g)},onclick:Z,"data-move-to-bottom-bar":!0})})}var st=bt(M,2);{var nt=g=>{var S=b(),x=m(S);{let it=i(()=>D.scripts_delete_label()),ct=i(()=>P()?void 0:D.scripts_delete_disabled_description());z(x,()=>J,(lt,pt)=>{pt(lt,{get icon(){return wt},get label(){return e(it)},destructive:!0,get disabledReason(){return e(ct)},onclick:Y})})}d(g,S)};A(st,g=>{e(o)&&g(nt)})}d(v,w)};A(n,v=>{$()&&v(f)})}d(t,r)};let s=h(c,"tab",7),a=h(c,"workspaceId",7),C=h(c,"layoutId",7),l=h(c,"isActive",7);const I=i(()=>s().terminalId),o=i(()=>s().scriptId),R=Dt(),p=O(""),y=O("");T(()=>p.set(a())),T(()=>y.set(e(o)??""));const K=St(p),L=ht(p),N=yt(p,y),Q=xt(p,y),U=At(p);let q=!0;gt(()=>{q=!1});function Y(){if(!e(o))return;const t=a(),r=e(o),n=s().id;return Ct(t,r,()=>q&&l()&&a()===t&&e(o)===r&&s().id===n)}function Z(){$()&&(e(o)&&B.dispatch(Vt(a(),e(o))),B.dispatch(Wt(a(),e(I))),B.dispatch(Rt(C()??a(),s().id)))}T(()=>{if(!(!R||!l()))return R.registerActions({actions:G})});var tt={get tab(){return s()},set tab(t){s(t),k()},get workspaceId(){return a()},set workspaceId(t){a(t),k()},get layoutId(){return C()},set layoutId(t){C(t),k()},get isActive(){return l()},set isActive(t){l(t),k()},$set:dt,$on:(t,r)=>ft(c,t,r)},H=b(),et=m(H);{var rt=t=>{var r=b(),n=m(r);j(n,()=>e(o),f=>{{let v=i(()=>W()?.unavailable===!0),w=i(()=>Bt(W()));kt(f,{get scriptId(){return e(o)},get workspaceId(){return a()},class:"h-full",get runDisabled(){return e(v)},get runDisabledReason(){return e(w)}})}}),d(t,r)},at=t=>{var r=b(),n=m(r);j(n,()=>e(I),f=>{Tt(f,{get terminalId(){return e(I)},get workspaceId(){return a()},class:"h-full"})}),d(t,r)};A(et,t=>{e(o)&&l()&&X()&&($()||E())?t(rt):e(I)&&l()&&$()&&t(at,1)})}d(V,H);var ot=_t(tt);return F(),ot}export{Ht as default};
1
+ import{t as mt,bo as h,bw as dt,bq as ut,b as ft,bs as _,bm as D}from"./ClpAEjbe.js";import{bs as vt,ca as T,aD as e,bj as gt,a7 as b,ay as m,W as d,bn as _t,c9 as i,cd as O,aA as k,bS as bt,aB as $t}from"./CJxGDkBm.js";import{i as A}from"./wmcYjLAa.js";import{k as j}from"./Xh71Wbuh.js";import{c as z}from"./DSqSJXGX.js";import{aw as It,cS as wt}from"./CtJxHvGv.js";import{dz as St,dX as ht}from"./D9Ykl3eH.js";import{S as kt,c as Ct}from"./DE9J1g7V.js";import{selectScriptById as yt,selectCanDeleteScript as xt}from"./8kN6wMYA.js";import"./CnGVh7I3.js";import"./WSVFXKpL.js";import"./CPDV_dyu.js";import"./B5wwCKYG.js";import{M as J}from"./Dd_i7pU1.js";import{g as Dt}from"./BrMXrCxP.js";import{T as Tt}from"./CX5klKKv.js";import{t as At,e as Bt}from"./B4qsbMKj.js";import{Jq as B,Ds as Vt,vv as Wt,g$ as Rt}from"./CpP1PKzF.js";var qt=$t("<!> <!>",1);function Ht(V,c){if(new.target)return mt({component:Ht,...V});vt(c,!0);const $=()=>_(K,"$fullContext$",u),P=()=>_(Q,"$canDeleteScript$",u),X=()=>_(L,"$scriptContext$",u),E=()=>_(N,"$script$",u),W=()=>_(U,"$homeView$",u),[u,F]=ut(),G=t=>{var r=b(),n=m(r);{var f=v=>{var w=qt(),M=m(w);{let g=i(()=>D.workspace_shell_showInBottomBar_tooltip());z(M,()=>J,(S,x)=>{x(S,{get icon(){return It},get label(){return e(g)},onclick:Z,"data-move-to-bottom-bar":!0})})}var st=bt(M,2);{var nt=g=>{var S=b(),x=m(S);{let it=i(()=>D.scripts_delete_label()),ct=i(()=>P()?void 0:D.scripts_delete_disabled_description());z(x,()=>J,(lt,pt)=>{pt(lt,{get icon(){return wt},get label(){return e(it)},destructive:!0,get disabledReason(){return e(ct)},onclick:Y})})}d(g,S)};A(st,g=>{e(o)&&g(nt)})}d(v,w)};A(n,v=>{$()&&v(f)})}d(t,r)};let s=h(c,"tab",7),a=h(c,"workspaceId",7),C=h(c,"layoutId",7),l=h(c,"isActive",7);const I=i(()=>s().terminalId),o=i(()=>s().scriptId),R=Dt(),p=O(""),y=O("");T(()=>p.set(a())),T(()=>y.set(e(o)??""));const K=St(p),L=ht(p),N=yt(p,y),Q=xt(p,y),U=At(p);let q=!0;gt(()=>{q=!1});function Y(){if(!e(o))return;const t=a(),r=e(o),n=s().id;return Ct(t,r,()=>q&&l()&&a()===t&&e(o)===r&&s().id===n)}function Z(){$()&&(e(o)&&B.dispatch(Vt(a(),e(o))),B.dispatch(Wt(a(),e(I))),B.dispatch(Rt(C()??a(),s().id)))}T(()=>{if(!(!R||!l()))return R.registerActions({actions:G})});var tt={get tab(){return s()},set tab(t){s(t),k()},get workspaceId(){return a()},set workspaceId(t){a(t),k()},get layoutId(){return C()},set layoutId(t){C(t),k()},get isActive(){return l()},set isActive(t){l(t),k()},$set:dt,$on:(t,r)=>ft(c,t,r)},H=b(),et=m(H);{var rt=t=>{var r=b(),n=m(r);j(n,()=>e(o),f=>{{let v=i(()=>W()?.unavailable===!0),w=i(()=>Bt(W()));kt(f,{get scriptId(){return e(o)},get workspaceId(){return a()},class:"h-full",get runDisabled(){return e(v)},get runDisabledReason(){return e(w)}})}}),d(t,r)},at=t=>{var r=b(),n=m(r);j(n,()=>e(I),f=>{Tt(f,{get terminalId(){return e(I)},get workspaceId(){return a()},class:"h-full"})}),d(t,r)};A(et,t=>{e(o)&&l()&&X()&&($()||E())?t(rt):e(I)&&l()&&$()&&t(at,1)})}d(V,H);var ot=_t(tt);return F(),ot}export{Ht as default};
@@ -1 +1 @@
1
- import{b as i,aW as l,aw as d,P as o}from"./BpXYSrHL.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{g as a,m as b,w as c,p as d,x as e,y as f,h as g,f as h};
1
+ import{b as i,aW as l,aw as d,P as o}from"./6s1pPvLx.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{g as a,m as b,w as c,p as d,x as e,y as f,h as g,f as h};
@@ -1,4 +1,4 @@
1
- import{aZ as pi,U as mi,Y as $t,b0 as yi,V as bi,a_ as Ai,b as n,ay as Ut,aX as wi,B as Ci,r as Si,W as Tt,aV as Ri,q as qt,O as _i,a6 as ki,A as Ti,av as Ft}from"./BpXYSrHL.js";import{b as Xt,l as Yt}from"./CBP_r2rZ.js";var St=(function(){var e=n(function(O,r,g,u){for(g=g||{},u=O.length;u--;g[O[u]]=r);return g},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],a=[1,5],h=[1,6],c=[1,7],m=[1,5,10,12,14,16,18,19,21,23,36,37,38],f=[1,25],d=[1,26],w=[1,28],k=[1,29],P=[1,30],W=[1,31],F=[1,32],v=[1,33],z=[1,34],b=[1,35],T=[1,36],l=[1,37],I=[1,43],V=[1,42],X=[1,47],Y=[1,50],R=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],A=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],C=[1,65],M=[26,28],_={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:n(function(r,g,u,x,S,o,lt){var p=o.length-1;switch(S){case 5:x.setOrientation(o[p]);break;case 9:x.setDiagramTitle(o[p].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[p]);break;case 13:x.setLineData(o[p-1],o[p]);break;case 14:x.setBarData({text:"",type:"text"},o[p]);break;case 15:x.setBarData(o[p-1],o[p]);break;case 16:this.$=o[p].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[p].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[p-1];break;case 20:case 30:this.$=[o[p-2],...o[p]];break;case 21:case 31:this.$=[o[p]];break;case 22:this.$={value:Number(o[p-1]),label:o[p]};break;case 23:this.$={value:Number(o[p]),label:""};break;case 24:x.setXAxisTitle(o[p]);break;case 25:x.setXAxisTitle(o[p-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(o[p]);break;case 28:x.setXAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 29:this.$=o[p-1];break;case 32:x.setYAxisTitle(o[p]);break;case 33:x.setYAxisTitle(o[p-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 39:this.$={text:o[p],type:"text"};break;case 40:this.$={text:o[p],type:"text"};break;case 41:this.$={text:o[p],type:"markdown"};break;case 42:this.$=o[p];break;case 43:this.$=o[p-1]+""+o[p];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,36:a,37:h,38:c}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,36:a,37:h,38:c}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:h,38:c}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(m,[2,36]),e(m,[2,37]),e(m,[2,38]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,36:a,37:h,38:c}),{1:[2,3]},e(m,[2,5]),e(t,[2,7],{4:22,36:a,37:h,38:c}),{11:23,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:39,13:38,24:I,29:V,30:f,31:40,32:41,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:45,15:44,29:X,30:f,35:46,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:49,17:48,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:52,17:51,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{20:[1,53]},{22:[1,54]},e(R,[2,18]),{1:[2,2]},e(R,[2,8]),e(R,[2,9]),e(H,[2,39],{41:55,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l}),e(H,[2,40]),e(H,[2,41]),e(A,[2,42]),e(A,[2,44]),e(A,[2,45]),e(A,[2,46]),e(A,[2,47]),e(A,[2,48]),e(A,[2,49]),e(A,[2,50]),e(A,[2,51]),e(A,[2,52]),e(A,[2,53]),e(R,[2,10]),e(R,[2,24],{32:41,31:56,24:I,29:V}),e(R,[2,26]),e(R,[2,27]),{33:[1,57]},{11:59,30:f,34:58,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,11]),e(R,[2,32],{35:60,29:X}),e(R,[2,34]),{33:[1,61]},e(R,[2,12]),{17:62,24:Y},{25:63,27:64,29:C},e(R,[2,14]),{17:66,24:Y},e(R,[2,16]),e(R,[2,17]),e(A,[2,43]),e(R,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(R,[2,33]),{29:[1,70]},e(R,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(M,[2,23],{30:[1,73]}),e(R,[2,15]),e(R,[2,28]),e(R,[2,29]),{11:59,30:f,34:74,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,35]),e(R,[2,19]),{25:75,27:64,29:C},e(M,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:n(function(r,g){if(g.recoverable)this.trace(r);else{var u=new Error(r);throw u.hash=g,u}},"parseError"),parse:n(function(r){var g=this,u=[0],x=[],S=[null],o=[],lt=this.table,p="",dt=0,zt=0,ui=2,Vt=1,di=o.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&($.yy[bt]=this.yy[bt]);D.setInput(r,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var At=D.yylloc;o.push(At);var xi=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fi(E){u.length=u.length-2*E,S.length=S.length-E,o.length=o.length-E}n(fi,"popStack");function Ot(){var E;return E=x.pop()||D.lex()||Vt,typeof E!="number"&&(E instanceof Array&&(x=E,E=x.pop()),E=g.symbols_[E]||E),E}n(Ot,"lex");for(var L,U,B,wt,j={},xt,N,Wt,ft;;){if(U=u[u.length-1],this.defaultActions[U]?B=this.defaultActions[U]:((L===null||typeof L>"u")&&(L=Ot()),B=lt[U]&&lt[U][L]),typeof B>"u"||!B.length||!B[0]){var Ct="";ft=[];for(xt in lt[U])this.terminals_[xt]&&xt>ui&&ft.push("'"+this.terminals_[xt]+"'");D.showPosition?Ct="Parse error on line "+(dt+1)+`:
1
+ import{aZ as pi,U as mi,Y as $t,b0 as yi,V as bi,a_ as Ai,b as n,ay as Ut,aX as wi,B as Ci,r as Si,W as Tt,aV as Ri,q as qt,O as _i,a6 as ki,A as Ti,av as Ft}from"./6s1pPvLx.js";import{b as Xt,l as Yt}from"./BGTJWNfe.js";var St=(function(){var e=n(function(O,r,g,u){for(g=g||{},u=O.length;u--;g[O[u]]=r);return g},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],a=[1,5],h=[1,6],c=[1,7],m=[1,5,10,12,14,16,18,19,21,23,36,37,38],f=[1,25],d=[1,26],w=[1,28],k=[1,29],P=[1,30],W=[1,31],F=[1,32],v=[1,33],z=[1,34],b=[1,35],T=[1,36],l=[1,37],I=[1,43],V=[1,42],X=[1,47],Y=[1,50],R=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],A=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],C=[1,65],M=[26,28],_={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:n(function(r,g,u,x,S,o,lt){var p=o.length-1;switch(S){case 5:x.setOrientation(o[p]);break;case 9:x.setDiagramTitle(o[p].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[p]);break;case 13:x.setLineData(o[p-1],o[p]);break;case 14:x.setBarData({text:"",type:"text"},o[p]);break;case 15:x.setBarData(o[p-1],o[p]);break;case 16:this.$=o[p].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[p].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[p-1];break;case 20:case 30:this.$=[o[p-2],...o[p]];break;case 21:case 31:this.$=[o[p]];break;case 22:this.$={value:Number(o[p-1]),label:o[p]};break;case 23:this.$={value:Number(o[p]),label:""};break;case 24:x.setXAxisTitle(o[p]);break;case 25:x.setXAxisTitle(o[p-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(o[p]);break;case 28:x.setXAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 29:this.$=o[p-1];break;case 32:x.setYAxisTitle(o[p]);break;case 33:x.setYAxisTitle(o[p-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 39:this.$={text:o[p],type:"text"};break;case 40:this.$={text:o[p],type:"text"};break;case 41:this.$={text:o[p],type:"markdown"};break;case 42:this.$=o[p];break;case 43:this.$=o[p-1]+""+o[p];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,36:a,37:h,38:c}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,36:a,37:h,38:c}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:h,38:c}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(m,[2,36]),e(m,[2,37]),e(m,[2,38]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,36:a,37:h,38:c}),{1:[2,3]},e(m,[2,5]),e(t,[2,7],{4:22,36:a,37:h,38:c}),{11:23,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:39,13:38,24:I,29:V,30:f,31:40,32:41,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:45,15:44,29:X,30:f,35:46,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:49,17:48,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{11:52,17:51,24:Y,30:f,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},{20:[1,53]},{22:[1,54]},e(R,[2,18]),{1:[2,2]},e(R,[2,8]),e(R,[2,9]),e(H,[2,39],{41:55,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l}),e(H,[2,40]),e(H,[2,41]),e(A,[2,42]),e(A,[2,44]),e(A,[2,45]),e(A,[2,46]),e(A,[2,47]),e(A,[2,48]),e(A,[2,49]),e(A,[2,50]),e(A,[2,51]),e(A,[2,52]),e(A,[2,53]),e(R,[2,10]),e(R,[2,24],{32:41,31:56,24:I,29:V}),e(R,[2,26]),e(R,[2,27]),{33:[1,57]},{11:59,30:f,34:58,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,11]),e(R,[2,32],{35:60,29:X}),e(R,[2,34]),{33:[1,61]},e(R,[2,12]),{17:62,24:Y},{25:63,27:64,29:C},e(R,[2,14]),{17:66,24:Y},e(R,[2,16]),e(R,[2,17]),e(A,[2,43]),e(R,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(R,[2,33]),{29:[1,70]},e(R,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(M,[2,23],{30:[1,73]}),e(R,[2,15]),e(R,[2,28]),e(R,[2,29]),{11:59,30:f,34:74,39:24,40:d,41:27,42:w,43:k,44:P,45:W,46:F,47:v,48:z,49:b,50:T,51:l},e(R,[2,35]),e(R,[2,19]),{25:75,27:64,29:C},e(M,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:n(function(r,g){if(g.recoverable)this.trace(r);else{var u=new Error(r);throw u.hash=g,u}},"parseError"),parse:n(function(r){var g=this,u=[0],x=[],S=[null],o=[],lt=this.table,p="",dt=0,zt=0,ui=2,Vt=1,di=o.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&($.yy[bt]=this.yy[bt]);D.setInput(r,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var At=D.yylloc;o.push(At);var xi=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fi(E){u.length=u.length-2*E,S.length=S.length-E,o.length=o.length-E}n(fi,"popStack");function Ot(){var E;return E=x.pop()||D.lex()||Vt,typeof E!="number"&&(E instanceof Array&&(x=E,E=x.pop()),E=g.symbols_[E]||E),E}n(Ot,"lex");for(var L,U,B,wt,j={},xt,N,Wt,ft;;){if(U=u[u.length-1],this.defaultActions[U]?B=this.defaultActions[U]:((L===null||typeof L>"u")&&(L=Ot()),B=lt[U]&&lt[U][L]),typeof B>"u"||!B.length||!B[0]){var Ct="";ft=[];for(xt in lt[U])this.terminals_[xt]&&xt>ui&&ft.push("'"+this.terminals_[xt]+"'");D.showPosition?Ct="Parse error on line "+(dt+1)+`:
2
2
  `+D.showPosition()+`
3
3
  Expecting `+ft.join(", ")+", got '"+(this.terminals_[L]||L)+"'":Ct="Parse error on line "+(dt+1)+": Unexpected "+(L==Vt?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(Ct,{text:D.match,token:this.terminals_[L]||L,line:D.yylineno,loc:At,expected:ft})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+L);switch(B[0]){case 1:u.push(L),S.push(D.yytext),o.push(D.yylloc),u.push(B[1]),L=null,zt=D.yyleng,p=D.yytext,dt=D.yylineno,At=D.yylloc;break;case 2:if(N=this.productions_[B[1]][1],j.$=S[S.length-N],j._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},xi&&(j._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),wt=this.performAction.apply(j,[p,zt,dt,$.yy,B[1],S,o].concat(di)),typeof wt<"u")return wt;N&&(u=u.slice(0,-1*N*2),S=S.slice(0,-1*N),o=o.slice(0,-1*N)),u.push(this.productions_[B[1]][0]),S.push(j.$),o.push(j._$),Wt=lt[u[u.length-2]][u[u.length-1]],u.push(Wt);break;case 3:return!0}}return!0},"parse")},rt=(function(){var O={EOF:1,parseError:n(function(g,u){if(this.yy.parser)this.yy.parser.parseError(g,u);else throw new Error(g)},"parseError"),setInput:n(function(r,g){return this.yy=g||this.yy||{},this._input=r,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:n(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var g=r.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:n(function(r){var g=r.length,u=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var x=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),u.length-1&&(this.yylineno-=u.length-1);var S=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:u?(u.length===x.length?this.yylloc.first_column:0)+x[x.length-u.length].length-u[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(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:n(function(r){this.unput(this.match.slice(r))},"less"),pastInput:n(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var r=this.pastInput(),g=new Array(r.length+1).join("-");return r+this.upcomingInput()+`