@intent-hq/web 2.340.2 → 2.340.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 (142) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{D_lSSx1S.js → -ZizYe8A.js} +2 -2
  3. package/web/app/immutable/chunks/{IdfHcBrb.js → -dEFVrNh.js} +2 -2
  4. package/web/app/immutable/chunks/{BSsRbsMB.js → 0C6mh2Cb.js} +1 -1
  5. package/web/app/immutable/chunks/{D18Ecv4L.js → 0FrU_5Z8.js} +1 -1
  6. package/web/app/immutable/chunks/{f8MDHasY.js → 4w__Ckgh.js} +1 -1
  7. package/web/app/immutable/chunks/{EXDnM3_s.js → 4xXU2uFv.js} +1 -1
  8. package/web/app/immutable/chunks/{BDRppcbA.js → 6XCKtx_n.js} +1 -1
  9. package/web/app/immutable/chunks/{D9s4CP1c.js → 7sHGxjlZ.js} +1 -1
  10. package/web/app/immutable/chunks/{Bn40lmOa.js → 9yACX6ry.js} +1 -1
  11. package/web/app/immutable/chunks/{f_AEjkk5.js → B-IV-4X8.js} +1 -1
  12. package/web/app/immutable/chunks/{D8_nOzWn.js → B02Ft2lH.js} +1 -1
  13. package/web/app/immutable/chunks/{BuE6Eygz.js → B07CbBFu.js} +4 -4
  14. package/web/app/immutable/chunks/{C1IBY-rp.js → B1tdK-Ae.js} +1 -1
  15. package/web/app/immutable/chunks/{m6_pcI91.js → B415At74.js} +1 -1
  16. package/web/app/immutable/chunks/{BPVaItqU.js → B79OvD8n.js} +1 -1
  17. package/web/app/immutable/chunks/{CEg0De9G.js → B8Cn64Nh.js} +1 -1
  18. package/web/app/immutable/chunks/{BBWcFFhG.js → B9-yZUvW.js} +1 -1
  19. package/web/app/immutable/chunks/{sgLbXPKZ.js → B9W8ftWw.js} +1 -1
  20. package/web/app/immutable/chunks/{D0VQJT8L.js → BAWU_DW0.js} +12 -12
  21. package/web/app/immutable/chunks/{ByIZkzDE.js → BAl8Wwh_.js} +6 -6
  22. package/web/app/immutable/chunks/{LPMF1MUO.js → BD_fj1Qj.js} +1 -1
  23. package/web/app/immutable/chunks/{BNE6nViq.js → BDhuhL-X.js} +1 -1
  24. package/web/app/immutable/chunks/{CAonbHvL.js → BE5b4a_c.js} +1 -1
  25. package/web/app/immutable/chunks/{BkwB2mol.js → BGoNekbN.js} +1 -1
  26. package/web/app/immutable/chunks/{DdoxAb5E.js → BJa3qDj8.js} +1 -1
  27. package/web/app/immutable/chunks/{oE3wvz3F.js → BKvhKH1N.js} +1 -1
  28. package/web/app/immutable/chunks/{CkG5rsz4.js → BLH5QuLl.js} +1 -1
  29. package/web/app/immutable/chunks/{D_t0KxWu.js → BLsu_Mu5.js} +1 -1
  30. package/web/app/immutable/chunks/{C6SVbm9t.js → BMqyGHvT.js} +1 -1
  31. package/web/app/immutable/chunks/{D7sczzuC.js → BZSEAUt_.js} +1 -1
  32. package/web/app/immutable/chunks/{ODHkP_kN.js → B_FP_4Xg.js} +1 -1
  33. package/web/app/immutable/chunks/{DcgSIDjr.js → Ba0lB_Za.js} +1 -1
  34. package/web/app/immutable/chunks/{CJr2LVMP.js → Ba5qkGno.js} +1 -1
  35. package/web/app/immutable/chunks/{Cfmqg7ex.js → BaUdfCFE.js} +4 -4
  36. package/web/app/immutable/chunks/{BZfXXcXu.js → BbfzoNWa.js} +1 -1
  37. package/web/app/immutable/chunks/{6Kd5nT2h.js → BcdY6yt8.js} +2 -2
  38. package/web/app/immutable/chunks/{KsmYk2yz.js → BddvxHT9.js} +1 -1
  39. package/web/app/immutable/chunks/{Bb67WdXZ.js → BfapYa0w.js} +1 -1
  40. package/web/app/immutable/chunks/{DjASvlKb.js → BjY36TmK.js} +1 -1
  41. package/web/app/immutable/chunks/{kE32CEyB.js → Bjl5gIYt.js} +3 -3
  42. package/web/app/immutable/chunks/{CE65gWfP.js → BmUrB5no.js} +1 -1
  43. package/web/app/immutable/chunks/{CtDWwfc1.js → BoeU4gU2.js} +1 -1
  44. package/web/app/immutable/chunks/{cFmB6NjI.js → BvATDH-A.js} +1 -1
  45. package/web/app/immutable/chunks/{BcLuNWDd.js → C0YQhBwg.js} +2 -2
  46. package/web/app/immutable/chunks/{BxDUZwkN.js → C4e9qLKa.js} +1 -1
  47. package/web/app/immutable/chunks/{DEsaK2_s.js → C55_qVXj.js} +1 -1
  48. package/web/app/immutable/chunks/{C5uug34F.js → C6GuhOeP.js} +1 -1
  49. package/web/app/immutable/chunks/{B4H49Lvz.js → C7mrp7bl.js} +1 -1
  50. package/web/app/immutable/chunks/{ZO-rsGOh.js → C8AfBLvN.js} +1 -1
  51. package/web/app/immutable/chunks/{C45GhO0_.js → C8jIc_nA.js} +1 -1
  52. package/web/app/immutable/chunks/{lCsiS-lR.js → C9FsCYwO.js} +1 -1
  53. package/web/app/immutable/chunks/{CdOpBzi0.js → C9geMnc8.js} +1 -1
  54. package/web/app/immutable/chunks/{BwDa9T5n.js → CAnw4nhq.js} +1 -1
  55. package/web/app/immutable/chunks/{CZVWvMur.js → CBRb7Nst.js} +1 -1
  56. package/web/app/immutable/chunks/{DY0QTg0i.js → CC4YXG_O.js} +1 -1
  57. package/web/app/immutable/chunks/{CzHM4mac.js → CCzdCGOX.js} +1 -1
  58. package/web/app/immutable/chunks/{CUc7hChd.js → CE5yUFD3.js} +1 -1
  59. package/web/app/immutable/chunks/{COU9OETp.js → CEOP5zFS.js} +1 -1
  60. package/web/app/immutable/chunks/{Cgp7P5r8.js → CJstP53T.js} +3 -3
  61. package/web/app/immutable/chunks/{DZpBinKD.js → CKZK7YUP.js} +1 -1
  62. package/web/app/immutable/chunks/{nvafrjsr.js → CLGBx41M.js} +1 -1
  63. package/web/app/immutable/chunks/{DQ1yJ2LL.js → CMYfSht9.js} +1 -1
  64. package/web/app/immutable/chunks/{P26fbC8x.js → CTv-2xZI.js} +2 -2
  65. package/web/app/immutable/chunks/{CKP3sxGm.js → CZE548IM.js} +2 -2
  66. package/web/app/immutable/chunks/{CYK-PIHY.js → CnGNI1tD.js} +1 -1
  67. package/web/app/immutable/chunks/{QGyJLAMm.js → Cp6YJwqj.js} +1 -1
  68. package/web/app/immutable/chunks/{D_LOsbpY.js → Crp_evpb.js} +1 -1
  69. package/web/app/immutable/chunks/{Cl9IfZkl.js → Ct4GQFDH.js} +1 -1
  70. package/web/app/immutable/chunks/{BmB0yVlr.js → CuGEzxrR.js} +1 -1
  71. package/web/app/immutable/chunks/{DqU8XEOB.js → Cvpiafcq.js} +1 -1
  72. package/web/app/immutable/chunks/{DwtYwoux.js → CwQLuRvL.js} +1 -1
  73. package/web/app/immutable/chunks/{BKynbS2h.js → CyJlA-_o.js} +1 -1
  74. package/web/app/immutable/chunks/{DNk8Z47H.js → Cypenj1y.js} +1 -1
  75. package/web/app/immutable/chunks/{DyTa38UW.js → Cz7YByiK.js} +1 -1
  76. package/web/app/immutable/chunks/{DfzSmPSB.js → D-Wk8zWP.js} +1 -1
  77. package/web/app/immutable/chunks/{CT3GEI9u.js → D1Lg2Y74.js} +1 -1
  78. package/web/app/immutable/chunks/{dxURPdJf.js → D9bTjPyN.js} +1 -1
  79. package/web/app/immutable/chunks/{3Kvdo65f.js → DANDJ6YL.js} +1 -1
  80. package/web/app/immutable/chunks/{D9LBHruj.js → DCygeNQj.js} +1 -1
  81. package/web/app/immutable/chunks/{D4RbLG5y.js → DDpGX96O.js} +1 -1
  82. package/web/app/immutable/chunks/{CnGYs2Fc.js → DEZhhrDD.js} +1 -1
  83. package/web/app/immutable/chunks/{Cgzzb3l-.js → DFyF1avW.js} +1 -1
  84. package/web/app/immutable/chunks/{BUwalWZU.js → DJoZU-z6.js} +1 -1
  85. package/web/app/immutable/chunks/{DnVZFag3.js → DM6SjeKk.js} +1 -1
  86. package/web/app/immutable/chunks/{_-wR8Y_9.js → DOgIhDZj.js} +1 -1
  87. package/web/app/immutable/chunks/{BkZVTNCE.js → DR1XcRDf.js} +2 -2
  88. package/web/app/immutable/chunks/{DBCGdyvL.js → DRmOKL_2.js} +1 -1
  89. package/web/app/immutable/chunks/{BwD161C4.js → DTUR13hm.js} +1 -1
  90. package/web/app/immutable/chunks/{e4lO2pBq.js → DVoEDrAy.js} +1 -1
  91. package/web/app/immutable/chunks/{CaPLF-pt.js → DX9UUoob.js} +1 -1
  92. package/web/app/immutable/chunks/{Cn_PcKYx.js → DXi1-DYW.js} +1 -1
  93. package/web/app/immutable/chunks/{D9oE6G0t.js → D_KvKSAm.js} +1 -1
  94. package/web/app/immutable/chunks/{CToL3WbV.js → Dcgzu7MI.js} +3 -3
  95. package/web/app/immutable/chunks/{CiBmz_K_.js → DflRwa_L.js} +1 -1
  96. package/web/app/immutable/chunks/{DaqJTZ9F.js → DfyBtxAd.js} +1 -1
  97. package/web/app/immutable/chunks/{P7uHTJ09.js → DlAaxPlh.js} +1 -1
  98. package/web/app/immutable/chunks/{Dd4j-WEC.js → DpGVlS8y.js} +1 -1
  99. package/web/app/immutable/chunks/{aVPYoucJ.js → DpLAbmZc.js} +4 -4
  100. package/web/app/immutable/chunks/{DM9zs99A.js → DrsHBbQ8.js} +1 -1
  101. package/web/app/immutable/chunks/{BWLPyzgM.js → Ds3PrQlK.js} +1 -1
  102. package/web/app/immutable/chunks/{M_IeUJIa.js → Dv3p1j1_.js} +3 -3
  103. package/web/app/immutable/chunks/{02iZ0o97.js → DyZsvmHy.js} +1 -1
  104. package/web/app/immutable/chunks/{B4DnbNdK.js → Dycyt-8w.js} +1 -1
  105. package/web/app/immutable/chunks/{CNHveuNx.js → Ez2dzBa_.js} +3 -3
  106. package/web/app/immutable/chunks/{BHiY3_g4.js → Gl4qfiuz.js} +1 -1
  107. package/web/app/immutable/chunks/{BQWgsTNd.js → K8a_NSNR.js} +1 -1
  108. package/web/app/immutable/chunks/{BCdX_ryS.js → N8qqqh0G.js} +1 -1
  109. package/web/app/immutable/chunks/{DV-Q2Imq.js → OtM9LD2A.js} +2 -2
  110. package/web/app/immutable/chunks/{C3yAChji.js → Px5_hntL.js} +1 -1
  111. package/web/app/immutable/chunks/{C3MR6-2f.js → QEfJDbjs.js} +1 -1
  112. package/web/app/immutable/chunks/{CrdehDxu.js → R4Lxokcw.js} +1 -1
  113. package/web/app/immutable/chunks/{LQKJN9ho.js → RHkA1Az2.js} +1 -1
  114. package/web/app/immutable/chunks/{B7QWTWb8.js → X6CpS_gh.js} +1 -1
  115. package/web/app/immutable/chunks/{B0Eojz7f.js → XLA3sRO4.js} +1 -1
  116. package/web/app/immutable/chunks/{D0tip71V.js → _ruAaTW2.js} +1 -1
  117. package/web/app/immutable/chunks/{e0XMdR1L.js → gNRMLIyt.js} +1 -1
  118. package/web/app/immutable/chunks/{oKXDW-Y-.js → gn8d_QDi.js} +1 -1
  119. package/web/app/immutable/chunks/{BQYfutOx.js → hVRjl1Hx.js} +1 -1
  120. package/web/app/immutable/chunks/{EP26VtYX.js → qfpSR0Jz.js} +1 -1
  121. package/web/app/immutable/chunks/{Y-TAA21J.js → rOiaGoSK.js} +1 -1
  122. package/web/app/immutable/chunks/{BA0YX2GW.js → xCFY18Nb.js} +4 -4
  123. package/web/app/immutable/chunks/{C7iv3Nal.js → zdGnrETd.js} +1 -1
  124. package/web/app/immutable/entry/{app.EWTkCOdn.js → app.E2cBe3rZ.js} +2 -2
  125. package/web/app/immutable/entry/start.Bh3lMw8C.js +1 -0
  126. package/web/app/immutable/nodes/{0.DyKuFiaz.js → 0.DpoeXn8L.js} +1 -1
  127. package/web/app/immutable/nodes/{1._KMbmbtj.js → 1.DpkH6Oe_.js} +1 -1
  128. package/web/app/immutable/nodes/{10.DEze-Uuw.js → 10.IVheb6TO.js} +1 -1
  129. package/web/app/immutable/nodes/{14.CnjKRxBb.js → 14.B9sOwya3.js} +1 -1
  130. package/web/app/immutable/nodes/{17.CfSXp9j1.js → 17.cWqIAu-L.js} +2 -2
  131. package/web/app/immutable/nodes/{2.v4rI2Mh_.js → 2.CH9ldJpA.js} +11 -11
  132. package/web/app/immutable/nodes/{3.j4IrW3is.js → 3.Biyx4Lw3.js} +1 -1
  133. package/web/app/immutable/nodes/{4.DKmVwIen.js → 4.BKYfKkg7.js} +1 -1
  134. package/web/app/immutable/nodes/{5.BuZfMSu4.js → 5.B4icq73k.js} +1 -1
  135. package/web/app/immutable/nodes/{6.D-oyFAVb.js → 6.CuD5Jes3.js} +1 -1
  136. package/web/app/immutable/nodes/{7.CpRE1Bsk.js → 7.FcaPZM3x.js} +1 -1
  137. package/web/app/immutable/nodes/{8.DMf0uQQL.js → 8.DxUmbz7I.js} +4 -4
  138. package/web/app/immutable/nodes/{9.BPiHS8kG.js → 9.BFaKv7T9.js} +4 -4
  139. package/web/app/version.json +1 -1
  140. package/web/generated/paraglide.js +8 -8
  141. package/web/index.html +9 -9
  142. package/web/app/immutable/entry/start.2ZXczmm3.js +0 -1
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DfD-d1VI.js","/app/immutable/chunks/DBkMUdAo.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BZeUwBn0.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/ClsZrb8B.js","/app/immutable/chunks/Cv-W__h8.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/GdlMbZRO.js","/app/immutable/chunks/BtpuPEaR.js","/app/immutable/chunks/Ct5KmixI.js"])))=>i.map(i=>d[i]);
2
- import{t as Kt,br as Y,a_ as T,bz as Nt,bv as D,bt as Gt,b as Jt,bp as i,_ as Qt}from"./Cv-W__h8.js";import{bs as Yt,ca as A,bH as j,c5 as ft,aD as Z,bj as Zt,a5 as F,bS as p,bA as C,b_ as y,W as g,bn as te,cd as tt,bV as _t,c9 as ee,aA as et,bl as E,bO as k,ay as vt,aB as w}from"./DYhIMPy1.js";import{v as xt,w as re}from"./DPvDLGgX.js";import{b as se}from"./BaIAhI85.js";import{b as ae}from"./4xlJdO9z.js";import{Ir as u,C2 as ne,BU as ie,BT as oe,Il as le,BF as ce,ii as ue,iI as de}from"./DBkMUdAo.js";import{a as pe,T as me,D as fe,L as _e,o as ve}from"./BSY2iZcG.js";import{F as rt,c_ as xe,c6 as he,cW as ge}from"./BKpkoMuv.js";import{f as ht}from"./BePtUMMB.js";import{k as N}from"./DTDbZc--.js";import"./ClsZrb8B.js";import"./ChTqQfQN.js";import"./CgCdkhNg.js";import{r as be}from"./CUQ53Tah.js";import{selectScriptById as st,selectScriptRuntime as ye,selectScriptOutput as gt,selectScriptRetainedOutput as ke,selectCanDeleteScript as bt}from"./CYK-PIHY.js";import{g as we}from"./1o85IiDb.js";import{bS as Se,dL as $e,dl as yt}from"./B10dK85Q.js";import"./9s3slwY6.js";import"./Dj_1qKAG.js";import"./DUGj7TPr.js";import{c as Ae}from"./BYdX7EnG.js";import{H as kt}from"./C3yAChji.js";var wt=w("<!> ",1),Fe=w('<div class="bg-danger-background/20 border-y border-danger/20 px-3 py-1.5 flex items-center justify-between"><div class="flex items-center gap-2 text-sm text-danger font-medium"><div class="w-4 h-4 rounded-full bg-danger-background flex items-center justify-center"><!></div> <span> </span></div> <!></div>'),Ce=w('<pre class="retained-text px-3 pb-3 text-xs svelte-115p4sl"> </pre>'),Oe=w('<p class="px-3 pb-3 text-xs text-muted-foreground" role="status"> </p>'),Ie=w('<details class="retained-output border-b border-border svelte-115p4sl"><summary class="cursor-pointer px-3 py-2 text-xs text-muted-foreground"> </summary> <p class="px-3 pb-2 text-xs text-muted-foreground"> </p> <!></details>'),Le=w('<div class="px-3 py-1 text-xs text-muted-foreground"> </div>'),Re=w('<code class="text-muted-foreground font-mono text-xs"> </code>'),Be=w('<div class="flex-1 flex items-center justify-center px-4 py-8"><div class="flex items-center gap-3 text-sm"><span class="text-subtle font-mono">$</span> <!> <!></div></div>'),Te=w('<div><!> <!> <!> <!> <div><div class="xterm-output svelte-115p4sl"></div></div></div>');function De(_,m){if(new.target)return Kt({component:De,..._});Yt(m,!0);const H=()=>D(Rt,"$outputAuthority",O),o=()=>D(Ft,"$runtime$",O),v=()=>D(Ct,"$output$",O),W=()=>D(Lt,"$codeFontFamilyCSS",O),f=()=>D(Ot,"$retainedOutput$",O),St=()=>D(It,"$hidesAgentLifecycleActions$",O),at=()=>D(At,"$script$",O),[O,$t]=Gt();let S=Y(m,"scriptId",7),x=Y(m,"workspaceId",7),G=Y(m,"class",7,"");const I=tt(""),z=tt(""),nt=tt("");let J=_t(!1);A(()=>I.set(x())),A(()=>z.set(S()));let L,n=null,M=null,V=null,P=null,R=null,U=null;const At=st(I,z),Ft=ye(I,z),Ct=gt(I,z),Ot=ke(I,z,nt),It=Se(I),Lt=we(),Rt=$e(I),it=crypto.randomUUID();A(()=>{const t=x();return S(),()=>{t&&u.dispatch(ne(t,it))}}),A(()=>{const t=x(),e=S(),s=H(),r=o();if(!s||!t||!e)return;r.status,r.startedAt;const l=crypto.randomUUID();return nt.set(l),j(J,ft(()=>v().chunks.length===0),!0),u.dispatch(ie(t,e,l)),()=>u.dispatch(oe(t,e,l))});let X=_t(0);const Bt=ee(()=>o().status==="exited"&&o().exitCode!=null&&o().exitCode!==0&&o().exitCode<128);function Tt(){if(!L||n)return;P=new me(L);const t=P.getCurrentTheme();n=new fe({allowProposedApi:!0,fontFamily:W(),fontSize:13,lineHeight:1.2,letterSpacing:0,cursorBlink:!1,cursorStyle:"underline",cursorWidth:1,scrollback:1e4,allowTransparency:!0,convertEol:!0,disableStdin:!0,drawBoldTextInBrightColors:!0,theme:t}),n.attachCustomKeyEventHandler(s=>{const r=s.metaKey||s.ctrlKey;return!(r&&s.key==="`"||r&&s.key==="j"||r&&s.key==="k")}),M=new ve,n.loadAddon(M);const e=new _e((s,r)=>{try{const l=new URL(r);l.hostname==="localhost"||l.hostname==="127.0.0.1"?be(r).then(b=>{Qt(async()=>{const{getPanelLayoutManager:c}=await import("./DfD-d1VI.js").then(h=>h.p);return{getPanelLayoutManager:c}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url).then(({getPanelLayoutManager:c})=>{c(x()).openBrowserPanel(b.url,void 0,void 0,b.requestedUrl)}).catch(()=>{window.open(b.url,"_blank")})}):window.open(r,"_blank")}catch{window.open(r,"_blank")}});n.loadAddon(e),n.open(L),P.applyTheme(n),U=requestAnimationFrame(()=>{U=null,M?.fit()}),V=new ResizeObserver(()=>{M?.fit()}),V.observe(L),Dt()}function Dt(){if(!n)return;const t=gt.select(u.state,x(),S());t.chunks.length>0&&n.write(t.chunks.map(e=>e.text).join("")),j(X,t.dropped+t.chunks.length)}function ot(){R!==null&&(cancelAnimationFrame(R),R=null),U!==null&&(cancelAnimationFrame(U),U=null),V?.disconnect(),V=null,P?.dispose(),P=null;const t=n;n=null,M=null,j(X,0),t&&pe(t)}A(()=>{const t=v(),e=ft(()=>Z(X)),s=t.dropped+t.chunks.length;if(!n||s<=e)return;const r=Math.max(e-t.dropped,0);n.write(t.chunks.slice(r).map(l=>l.text).join("")),j(X,s)}),A(()=>{const t=W();n&&n.options.fontFamily!==t&&(n.options.fontFamily=t)});function Et(){u.dispatch(le(x(),S()))}function Wt(){if(!x()){N.error(i.terminal_scriptOutput_noWorkspace_error());return}u.dispatch(ue(x(),S(),f()?.text,it))}A(()=>{o().status==="idle"&&v().chunks.length===0&&ot()}),A(()=>{!(o().status==="idle"&&v().chunks.length===0)&&L&&!n&&(R!==null&&cancelAnimationFrame(R),R=requestAnimationFrame(()=>{R=null,Tt()}))}),Zt(()=>{ot()});var qt={get scriptId(){return S()},set scriptId(t){S(t),et()},get workspaceId(){return x()},set workspaceId(t){x(t),et()},get class(){return G()},set class(t=""){G(t),et()},$set:Nt,$on:(t,e)=>Jt(m,t,e)},K=Te(),lt=F(K);{var zt=t=>{var e=Fe(),s=F(e),r=F(s),l=F(r);rt(l,{get icon(){return xe},size:"xs"}),C(r);var b=p(r,2),c=E(b,!0);C(s);var h=p(s,2);{var $=a=>{ht(a,{variant:"outline",size:"sm",class:"h-7 text-xs bg-background border border-border text-danger",onclick:Wt,children:(d,B)=>{var q=wt(),mt=vt(q);rt(mt,{get icon(){return ge},size:"sm",class:"mr-1.5"});var Vt=p(mt);y(Xt=>k(Vt,` ${Xt??""}`),[()=>i.terminal_scriptOutput_askAiToFix_label()]),g(d,q)},$$slots:{default:!0}})};T(h,a=>{St()||a($)})}C(e),y(a=>k(c,a),[()=>i.terminal_scriptOutput_buildFailed_label({exitCode:o().exitCode??0})]),g(t,e)};T(lt,t=>{Z(Bt)&&t(zt)})}var ct=p(lt,2);{var Mt=t=>{var e=Ie(),s=F(e),r=E(s,!0),l=p(s,2),b=E(l,!0),c=p(l,2);{var h=a=>{var d=Ce();let B;var q=E(d,!0);y(()=>{B=re(d,"",B,{"font-family":W()}),k(q,f().text)}),g(a,d)},$=a=>{var d=Oe(),B=E(d,!0);y(q=>k(B,q),[()=>f().status==="loading"?i.terminal_scriptOutput_retainedLoading_label():i.terminal_scriptOutput_retainedUnavailable_label()]),g(a,d)};T(c,a=>{f().status==="available"?a(h):a($,-1)})}C(e),y((a,d)=>{k(r,a),k(b,d)},[()=>i.terminal_scriptOutput_retained_label(),()=>i.terminal_scriptOutput_retained_description()]),ae("open","toggle",e,a=>j(J,a),()=>Z(J)),g(t,e)};T(ct,t=>{f()&&t(Mt)})}var ut=p(ct,2);{var Pt=t=>{var e=Le(),s=E(e,!0);y(r=>k(s,r),[()=>i.terminal_scriptOutput_live_label()]),g(t,e)};T(ut,t=>{v().chunks.length>0&&f()&&t(Pt)})}var dt=p(ut,2);{var Ut=t=>{var e=Be(),s=F(e),r=p(F(s),2);{var l=c=>{var h=Re(),$=E(h,!0);y(a=>k($,a),[()=>ce(at())]),g(c,h)};T(r,c=>{at()&&c(l)})}var b=p(r,2);ht(b,{variant:"ghost",size:"xs",onclick:Et,class:"text-muted-foreground hover:text-foreground",children:(c,h)=>{var $=wt(),a=vt($);rt(a,{get icon(){return he},class:"h-3 w-3 mr-1"});var d=p(a);y(B=>k(d,` ${B??""}`),[()=>i.terminal_scriptOutput_run_label()]),g(c,$)},$$slots:{default:!0}}),C(s),C(e),g(t,e)};T(dt,t=>{o().status==="idle"&&v().chunks.length===0&&t(Ut)})}var Q=p(dt,2);let pt;var jt=F(Q);se(jt,t=>L=t,()=>L),C(Q),C(K),y(()=>{xt(K,1,`script-output-viewer ${G()??""}`,"svelte-115p4sl"),pt=xt(Q,1,"flex-1 relative overflow-hidden",null,pt,{hidden:o().status==="idle"&&v().chunks.length===0})}),g(_,K);var Ht=te(qt);return $t(),Ht}async function ar(_,m,H){const o=st.select(u.state,_,m);if(!o||!H()||!bt.select(u.state,_,m))return;const v=kt(o.runtime?.status),W=yt.select(u.state,_);if(!W){N.error(i.workspace_client_accessChanged_error());return}if(!await Ae({title:i.scripts_delete_title({name:o.name}),description:v?i.scripts_delete_running_description():i.scripts_delete_description(),confirmLabel:i.scripts_delete_label(),destructive:!0}))return;if(W!==yt.select(u.state,_)){N.error(i.workspace_client_accessChanged_error());return}const f=st.select(u.state,_,m);if(!H()||!f||f.createdAt!==o.createdAt||f.name!==o.name||!v&&kt(f.runtime?.status)||!bt.select(u.state,_,m)){N.error(i.scripts_delete_changed_error());return}u.dispatch(de(_,m,i.terminal_quakeOverlay_deleteScriptFailed_error()))}export{De as S,ar as c};
2
+ import{t as Kt,br as Y,a_ as T,bz as Nt,bv as D,bt as Gt,b as Jt,bp as i,_ as Qt}from"./Cv-W__h8.js";import{bs as Yt,ca as A,bH as j,c5 as ft,aD as Z,bj as Zt,a5 as F,bS as p,bA as C,b_ as y,W as g,bn as te,cd as tt,bV as _t,c9 as ee,aA as et,bl as E,bO as k,ay as vt,aB as w}from"./DYhIMPy1.js";import{v as xt,w as re}from"./DPvDLGgX.js";import{b as se}from"./BaIAhI85.js";import{b as ae}from"./4xlJdO9z.js";import{Ir as u,C2 as ne,BU as ie,BT as oe,Il as le,BF as ce,ii as ue,iI as de}from"./DBkMUdAo.js";import{a as pe,T as me,D as fe,L as _e,o as ve}from"./BSY2iZcG.js";import{F as rt,c_ as xe,c6 as he,cW as ge}from"./BKpkoMuv.js";import{f as ht}from"./BePtUMMB.js";import{k as N}from"./DTDbZc--.js";import"./ClsZrb8B.js";import"./ChTqQfQN.js";import"./CgCdkhNg.js";import{r as be}from"./CUQ53Tah.js";import{selectScriptById as st,selectScriptRuntime as ye,selectScriptOutput as gt,selectScriptRetainedOutput as ke,selectCanDeleteScript as bt}from"./CnGNI1tD.js";import{g as we}from"./1o85IiDb.js";import{bS as Se,dL as $e,dl as yt}from"./B10dK85Q.js";import"./9s3slwY6.js";import"./Dj_1qKAG.js";import"./DUGj7TPr.js";import{c as Ae}from"./BYdX7EnG.js";import{H as kt}from"./Px5_hntL.js";var wt=w("<!> ",1),Fe=w('<div class="bg-danger-background/20 border-y border-danger/20 px-3 py-1.5 flex items-center justify-between"><div class="flex items-center gap-2 text-sm text-danger font-medium"><div class="w-4 h-4 rounded-full bg-danger-background flex items-center justify-center"><!></div> <span> </span></div> <!></div>'),Ce=w('<pre class="retained-text px-3 pb-3 text-xs svelte-115p4sl"> </pre>'),Oe=w('<p class="px-3 pb-3 text-xs text-muted-foreground" role="status"> </p>'),Ie=w('<details class="retained-output border-b border-border svelte-115p4sl"><summary class="cursor-pointer px-3 py-2 text-xs text-muted-foreground"> </summary> <p class="px-3 pb-2 text-xs text-muted-foreground"> </p> <!></details>'),Le=w('<div class="px-3 py-1 text-xs text-muted-foreground"> </div>'),Re=w('<code class="text-muted-foreground font-mono text-xs"> </code>'),Be=w('<div class="flex-1 flex items-center justify-center px-4 py-8"><div class="flex items-center gap-3 text-sm"><span class="text-subtle font-mono">$</span> <!> <!></div></div>'),Te=w('<div><!> <!> <!> <!> <div><div class="xterm-output svelte-115p4sl"></div></div></div>');function De(_,m){if(new.target)return Kt({component:De,..._});Yt(m,!0);const H=()=>D(Rt,"$outputAuthority",O),o=()=>D(Ft,"$runtime$",O),v=()=>D(Ct,"$output$",O),W=()=>D(Lt,"$codeFontFamilyCSS",O),f=()=>D(Ot,"$retainedOutput$",O),St=()=>D(It,"$hidesAgentLifecycleActions$",O),at=()=>D(At,"$script$",O),[O,$t]=Gt();let S=Y(m,"scriptId",7),x=Y(m,"workspaceId",7),G=Y(m,"class",7,"");const I=tt(""),z=tt(""),nt=tt("");let J=_t(!1);A(()=>I.set(x())),A(()=>z.set(S()));let L,n=null,M=null,V=null,P=null,R=null,U=null;const At=st(I,z),Ft=ye(I,z),Ct=gt(I,z),Ot=ke(I,z,nt),It=Se(I),Lt=we(),Rt=$e(I),it=crypto.randomUUID();A(()=>{const t=x();return S(),()=>{t&&u.dispatch(ne(t,it))}}),A(()=>{const t=x(),e=S(),s=H(),r=o();if(!s||!t||!e)return;r.status,r.startedAt;const l=crypto.randomUUID();return nt.set(l),j(J,ft(()=>v().chunks.length===0),!0),u.dispatch(ie(t,e,l)),()=>u.dispatch(oe(t,e,l))});let X=_t(0);const Bt=ee(()=>o().status==="exited"&&o().exitCode!=null&&o().exitCode!==0&&o().exitCode<128);function Tt(){if(!L||n)return;P=new me(L);const t=P.getCurrentTheme();n=new fe({allowProposedApi:!0,fontFamily:W(),fontSize:13,lineHeight:1.2,letterSpacing:0,cursorBlink:!1,cursorStyle:"underline",cursorWidth:1,scrollback:1e4,allowTransparency:!0,convertEol:!0,disableStdin:!0,drawBoldTextInBrightColors:!0,theme:t}),n.attachCustomKeyEventHandler(s=>{const r=s.metaKey||s.ctrlKey;return!(r&&s.key==="`"||r&&s.key==="j"||r&&s.key==="k")}),M=new ve,n.loadAddon(M);const e=new _e((s,r)=>{try{const l=new URL(r);l.hostname==="localhost"||l.hostname==="127.0.0.1"?be(r).then(b=>{Qt(async()=>{const{getPanelLayoutManager:c}=await import("./DfD-d1VI.js").then(h=>h.p);return{getPanelLayoutManager:c}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url).then(({getPanelLayoutManager:c})=>{c(x()).openBrowserPanel(b.url,void 0,void 0,b.requestedUrl)}).catch(()=>{window.open(b.url,"_blank")})}):window.open(r,"_blank")}catch{window.open(r,"_blank")}});n.loadAddon(e),n.open(L),P.applyTheme(n),U=requestAnimationFrame(()=>{U=null,M?.fit()}),V=new ResizeObserver(()=>{M?.fit()}),V.observe(L),Dt()}function Dt(){if(!n)return;const t=gt.select(u.state,x(),S());t.chunks.length>0&&n.write(t.chunks.map(e=>e.text).join("")),j(X,t.dropped+t.chunks.length)}function ot(){R!==null&&(cancelAnimationFrame(R),R=null),U!==null&&(cancelAnimationFrame(U),U=null),V?.disconnect(),V=null,P?.dispose(),P=null;const t=n;n=null,M=null,j(X,0),t&&pe(t)}A(()=>{const t=v(),e=ft(()=>Z(X)),s=t.dropped+t.chunks.length;if(!n||s<=e)return;const r=Math.max(e-t.dropped,0);n.write(t.chunks.slice(r).map(l=>l.text).join("")),j(X,s)}),A(()=>{const t=W();n&&n.options.fontFamily!==t&&(n.options.fontFamily=t)});function Et(){u.dispatch(le(x(),S()))}function Wt(){if(!x()){N.error(i.terminal_scriptOutput_noWorkspace_error());return}u.dispatch(ue(x(),S(),f()?.text,it))}A(()=>{o().status==="idle"&&v().chunks.length===0&&ot()}),A(()=>{!(o().status==="idle"&&v().chunks.length===0)&&L&&!n&&(R!==null&&cancelAnimationFrame(R),R=requestAnimationFrame(()=>{R=null,Tt()}))}),Zt(()=>{ot()});var qt={get scriptId(){return S()},set scriptId(t){S(t),et()},get workspaceId(){return x()},set workspaceId(t){x(t),et()},get class(){return G()},set class(t=""){G(t),et()},$set:Nt,$on:(t,e)=>Jt(m,t,e)},K=Te(),lt=F(K);{var zt=t=>{var e=Fe(),s=F(e),r=F(s),l=F(r);rt(l,{get icon(){return xe},size:"xs"}),C(r);var b=p(r,2),c=E(b,!0);C(s);var h=p(s,2);{var $=a=>{ht(a,{variant:"outline",size:"sm",class:"h-7 text-xs bg-background border border-border text-danger",onclick:Wt,children:(d,B)=>{var q=wt(),mt=vt(q);rt(mt,{get icon(){return ge},size:"sm",class:"mr-1.5"});var Vt=p(mt);y(Xt=>k(Vt,` ${Xt??""}`),[()=>i.terminal_scriptOutput_askAiToFix_label()]),g(d,q)},$$slots:{default:!0}})};T(h,a=>{St()||a($)})}C(e),y(a=>k(c,a),[()=>i.terminal_scriptOutput_buildFailed_label({exitCode:o().exitCode??0})]),g(t,e)};T(lt,t=>{Z(Bt)&&t(zt)})}var ct=p(lt,2);{var Mt=t=>{var e=Ie(),s=F(e),r=E(s,!0),l=p(s,2),b=E(l,!0),c=p(l,2);{var h=a=>{var d=Ce();let B;var q=E(d,!0);y(()=>{B=re(d,"",B,{"font-family":W()}),k(q,f().text)}),g(a,d)},$=a=>{var d=Oe(),B=E(d,!0);y(q=>k(B,q),[()=>f().status==="loading"?i.terminal_scriptOutput_retainedLoading_label():i.terminal_scriptOutput_retainedUnavailable_label()]),g(a,d)};T(c,a=>{f().status==="available"?a(h):a($,-1)})}C(e),y((a,d)=>{k(r,a),k(b,d)},[()=>i.terminal_scriptOutput_retained_label(),()=>i.terminal_scriptOutput_retained_description()]),ae("open","toggle",e,a=>j(J,a),()=>Z(J)),g(t,e)};T(ct,t=>{f()&&t(Mt)})}var ut=p(ct,2);{var Pt=t=>{var e=Le(),s=E(e,!0);y(r=>k(s,r),[()=>i.terminal_scriptOutput_live_label()]),g(t,e)};T(ut,t=>{v().chunks.length>0&&f()&&t(Pt)})}var dt=p(ut,2);{var Ut=t=>{var e=Be(),s=F(e),r=p(F(s),2);{var l=c=>{var h=Re(),$=E(h,!0);y(a=>k($,a),[()=>ce(at())]),g(c,h)};T(r,c=>{at()&&c(l)})}var b=p(r,2);ht(b,{variant:"ghost",size:"xs",onclick:Et,class:"text-muted-foreground hover:text-foreground",children:(c,h)=>{var $=wt(),a=vt($);rt(a,{get icon(){return he},class:"h-3 w-3 mr-1"});var d=p(a);y(B=>k(d,` ${B??""}`),[()=>i.terminal_scriptOutput_run_label()]),g(c,$)},$$slots:{default:!0}}),C(s),C(e),g(t,e)};T(dt,t=>{o().status==="idle"&&v().chunks.length===0&&t(Ut)})}var Q=p(dt,2);let pt;var jt=F(Q);se(jt,t=>L=t,()=>L),C(Q),C(K),y(()=>{xt(K,1,`script-output-viewer ${G()??""}`,"svelte-115p4sl"),pt=xt(Q,1,"flex-1 relative overflow-hidden",null,pt,{hidden:o().status==="idle"&&v().chunks.length===0})}),g(_,K);var Ht=te(qt);return $t(),Ht}async function ar(_,m,H){const o=st.select(u.state,_,m);if(!o||!H()||!bt.select(u.state,_,m))return;const v=kt(o.runtime?.status),W=yt.select(u.state,_);if(!W){N.error(i.workspace_client_accessChanged_error());return}if(!await Ae({title:i.scripts_delete_title({name:o.name}),description:v?i.scripts_delete_running_description():i.scripts_delete_description(),confirmLabel:i.scripts_delete_label(),destructive:!0}))return;if(W!==yt.select(u.state,_)){N.error(i.workspace_client_accessChanged_error());return}const f=st.select(u.state,_,m);if(!H()||!f||f.createdAt!==o.createdAt||f.name!==o.name||!v&&kt(f.runtime?.status)||!bt.select(u.state,_,m)){N.error(i.scripts_delete_changed_error());return}u.dispatch(de(_,m,i.terminal_quakeOverlay_deleteScriptFailed_error()))}export{De as S,ar as c};
@@ -1,4 +1,4 @@
1
- import{g as fe}from"./B0Eojz7f.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"./aVPYoucJ.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"./XLA3sRO4.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"./DpLAbmZc.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,4 +1,4 @@
1
- var $l=Object.defineProperty;var Ol=(r,t,n)=>t in r?$l(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n;var kn=(r,t,n)=>Ol(r,typeof t!="symbol"?t+"":t,n);import{t as It,br as g,a_ as B,bz as St,b as Tt,bp as f,bt as Kn,bv as dr,bu as ql,bs as ha}from"./Cv-W__h8.js";import{ai as aa,bs as Ct,ca as sr,aD as e,bH as j,ay as xe,bS as T,a7 as Rt,W as u,a5 as z,bA as R,bn as At,c9 as s,bV as we,aA as m,b_ as $,aj as Sr,aB as I,be as gr,b$ as Or,bO as J,bf as or,c0 as Cn,bl as oe,bj as jn,c6 as Dl,bo as za,br as Yr,am as Dn,ax as Bn,bk as as,aw as va,bz as ss,cb as ms,c5 as Ha,aC as xr,cd as _o,bv as Bl}from"./DYhIMPy1.js";import{n as Tr,u as te,v as ze,g as _n,s as ps,w as _a,j as kt,l as ar,p as Yn,I as Fl,i as ya,r as zl,o as eo,X as _i,q as Wl,S as Hl,C as Ul}from"./DPvDLGgX.js";import{I as Kt,F as qa,c as ea,j as jl,s as yi,p as to,y as Vl,u as Kl,t as $r,g as oa,B as ws,E as os,S as Gl}from"./j0KL2ItM.js";import{b as cn}from"./BaIAhI85.js";import{f as Xe,bj as Ql,am as ro,bt as Zl,bx as xs,bL as Jl}from"./BePtUMMB.js";import"./9s3slwY6.js";import"./Dj_1qKAG.js";import"./DUGj7TPr.js";import{s as Ln}from"./ClsZrb8B.js";import{F as jt,a0 as zs,bc as Tn,cF as no,aq as bi,aV as wi,aG as Xl,c4 as Yl,a2 as is,aJ as ed,cI as td,cH as rd,$ as vs,as as ao,I as yo,af as nd,bq as ad,aO as sd,aT as od,bF as id,ak as ld,cx as dd,ay as bo,aL as wo,bX as ks,aE as Ua,cR as cd,c6 as ud,bj as fd,b as gd,ck as md,ac as pd,b6 as Is,cm as xa,cA as vd,a as hd}from"./BKpkoMuv.js";import{c as xi,A as _d,x as yd}from"./D2pEu7en.js";import{b as Ss,V as xo}from"./CsScj5_e.js";import{a as ki,b7 as Pr,A as Ga,ao as Ii,s as bd,n as Si,d as wd,I as xd,R as kd,ax as Id,a0 as Sd}from"./BuE6Eygz.js";import{bX as Ti,j as Qa,a6 as Ws,al as ls,F as Td,au as Za,aN as Cd,aQ as ko}from"./nvafrjsr.js";import{t as ia,o as Ad}from"./2_iuLgF6.js";import{c3 as Ja,aC as Da,cQ as Ci,cS as Vn,bU as hs,j as Md,cJ as Ai,cP as _s,cO as Mi,cM as Pi,g as Nn,aa as Pd,ab as Rd,ax as Ed,s as Nd,K as Ld,W as Io,v as Ri,dO as $d,at as Od,k as qd,u as Ts,a6 as Dd,n as Bd,O as Fd,o as zd,S as Wd,R as Hd,a0 as Ud,q as Ei,r as Ni,l as jd,cT as Vd,a4 as Kd,D as Gd,x as Qd,V as So}from"./B10dK85Q.js";import{Ir as yt,oA as Zd,t8 as Xa,np as To,uY as Li,u_ as $i,rm as Jd,xU as ds,uf as Oi,nk as qi,be as Ya,xV as Xd,q0 as Yd,sF as ec,uR as Di,nj as tc,mq as rc,g as nc,yl as ac,yi as sc,yk as oc}from"./DBkMUdAo.js";import{a2 as ic,x as Cs,a0 as lc,O as As,V as dc,_ as cc,j as uc,o as ka,M as fa,p as fc,F as gc,u as mc,s as pc,L as Ms,J as vc,y as hc,K as _c,Z as Ma,Q as ja,N as Co,m as Ao,E as yc,c as Ps,B as Mo,z as bc,v as Po,H as Pa,P as wc,G as xc,i as kc,R as Ic,T as Sc,A as Tc,g as Cc,b as Ac,D as Mc,f as Pc,e as Rc,a as Ec,C as Nc,h as Lc,U as Bi,a3 as $c,t as Oc,k as qc,d as Ro}from"./M_IeUJIa.js";import{i as Dc,e as Bc}from"./1o85IiDb.js";import{g as Rs}from"./BvFAWM27.js";import{M as Ia,C as Ra}from"./Cfmqg7ex.js";import{C as Eo}from"./CnGYs2Fc.js";import"./BZfXXcXu.js";import{P as Fc}from"./C7iv3Nal.js";import"./C9iBDSZ7.js";import{c as Fi}from"./ChTqQfQN.js";import{S as zc}from"./KsmYk2yz.js";import{D as No,M as Wc}from"./aVPYoucJ.js";import{b as Hc,s as na,c as cs}from"./cFmB6NjI.js";import{O as es,y as Es,E as Ns,B as Ls,N as Uc,m as jc,l as Vc,d as us,C as Lo,f as Kc,e as Gc,g as Qc}from"./D4RbLG5y.js";import{a as zi,s as $o}from"./BsieX9dN.js";import{f as Zc}from"./BdWqymET.js";import{c as dn}from"./CueFizU8.js";import{P as Jc}from"./BvDMLNjQ.js";import{q as $s,p as Os,z as Oo,h as Xc}from"./Bn40lmOa.js";import{R as Hs,C as ys,k as Yc,h as eu,g as tu,i as qo,P as ru}from"./DTDbZc--.js";import"./CgCdkhNg.js";import{R as Do,x as Na,o as Wi}from"./DV-Q2Imq.js";import{B as nu}from"./BlXsb3Tb.js";import{o as Hi,r as au,e as su}from"./DyTa38UW.js";import{o as Ui}from"./IdfHcBrb.js";import{g as so}from"./CmUwI5cU.js";import{a as ou,M as iu}from"./BiLjH_HB.js";import{c as Sa}from"./D4os-974.js";import{A as lu}from"./CaPLF-pt.js";import{f as du,d as cu}from"./e0XMdR1L.js";import{a8 as uu,N as fu,Y as gu,K as Bo,X as mu,v as pu}from"./kE32CEyB.js";import{a as vu}from"./CC7to1B5.js";import{G as hu}from"./GdlMbZRO.js";import{S as _u}from"./m03ON1WT.js";import{u as yu,a as bu,c as Fo,S as wu}from"./DfxQWSVU.js";import{T as Us}from"./BN_moS2U.js";import"./Czzc8yNT.js";import{g as xu}from"./B8IFnCn1.js";import{a as ku}from"./CkjMOvWd.js";import{b as Iu}from"./DAZ23kin.js";import{b as zo}from"./p7znhYIU.js";import{g as Su,i as Tu,a as Cu}from"./BZeUwBn0.js";import{n as Wo,o as Ho,b as ma,s as Ta,_ as qs,e as Au}from"./CIyUrgF0.js";import{aW as Un,B as Mu}from"./CUrYTyIw.js";import{y as Pu}from"./C3BW_tmx.js";import{c as Ru}from"./ByIZkzDE.js";function Eu(r){if(!r||typeof r!="object")return null;const t=r;if(t.type!=="script_monitor_wake"||t.source!=="system")return null;const{scriptName:n,scriptId:a,runId:o,monitorId:i,workspaceId:d,reason:c}=t;if(typeof n!="string"||typeof a!="string"||!a||typeof o!="string"||!o||typeof i!="string"||!i||typeof d!="string"||!d||c!=="finished"&&c!=="ttl-expired"&&c!=="output-match"&&c!=="line-count")return null;const v=t.trigger;return{scriptName:n,scriptId:a,runId:o,monitorId:i,workspaceId:d,reason:c,...c==="output-match"&&typeof v?.matchedLine=="string"?{matchedLine:v.matchedLine}:{}}}function Nu(r){return r?.type==="script_monitor_wake"&&!("remoteAgentId"in r)}function Lu(r,t,n,a=!1){if(!r||!t)return{edit:!1,remove:!1,sendNow:!1};const o=r.messageMetadata?.fromPrincipalId??r.author?.principalId,i=uu(r)&&r.author?.principalId!==null&&o===t;return{edit:i,remove:i||t===n||a,sendNow:(i||a)&&!ji(r)}}function Ca(r,t){if(t)return r.find(n=>n.editing&&n.editingMessageId?n.editingMessageId===t:n.id===t)}function ji(r){return Nu(r.messageMetadata)&&typeof r.messageMetadata?.monitorId=="string"}function Uo(r,t=Date.now()){const n=r.messageMetadata,a=n?.fromPrincipalId,o=n&&Object.hasOwn(n,"humanAuthor")&&!(typeof a=="string"&&a.length>0),i=r.holdKind!==void 0&&Date.parse(r.holdUntil??"")>t;return!r.editing&&!i&&!o&&!ji(r)}const j_="pl-3.5! pr-2!";var $u=I('<span class="tile-remove-slot svelte-d8pwpf"><!></span>'),jo=I('<span class="attachment-status svelte-d8pwpf"> </span>'),Ou=I('<div class="file-image tile svelte-d8pwpf" data-kind="file"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),qu=I("<!><span> </span>",1),Du=I('<img alt="" draggable="false"/>'),Bu=I('<span class="summary svelte-d8pwpf" data-clip-summary=""> </span>'),Fu=I('<span class="clip svelte-d8pwpf"><span class="record-dot svelte-d8pwpf" aria-hidden="true"></span><span class="duration svelte-d8pwpf"> </span><!></span>'),zu=I('<div class="tile svelte-d8pwpf"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),Wu=I('<div class="attachment-row svelte-d8pwpf" role="group" data-dock-media-attachments=""></div>'),Hu=I("<!> <!> <!>",1),Uu=I('<img draggable="false" class="svelte-d8pwpf"/>'),ju=I('<video controls="" playsinline="" class="svelte-d8pwpf"></video>',2),Vu=I('<div class="media-viewer svelte-d8pwpf"><!></div>'),Ku=I("<!> <!>",1);function Gu(r,t){if(new.target)return It({component:Gu,...r});Ct(t,!0);const n=(O,ye=or,pe=or)=>{var A=$u(),ge=z(A);Xe(ge,{variant:"secondary",size:"icon-sm",class:"tile-action tile-remove",get disabled(){return i()},get"aria-label"(){return pe()},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return pe()},onclick:()=>q(ye()),children:(Te,Be)=>{Ss(Te,{glyph:"x"})},$$slots:{default:!0}}),R(A),u(O,A)};let a=g(t,"items",7),o=g(t,"labels",7),i=g(t,"disabled",7,!1),d=g(t,"onMarkUp",7),c=g(t,"onEdit",7),v=g(t,"onRemove",7),h=g(t,"onRetry",7),b=g(t,"onCopy",7),k=g(t,"onMenu",7);const N=O=>O.owner==="attachment"?2:{image:0,clip:1,file:2}[O.kind],Y=s(()=>[...a()].sort((O,ye)=>N(O)-N(ye)));let S=we(null),D=we(!1),ie=we(null),X=null;const M=s(()=>a().find(O=>O.id===e(ie)));sr(()=>{(!e(M)||e(M).kind==="image"&&!W(e(M)))&&j(D,!1)});function W(O){return O.kind==="image"&&O.status!=="placing"&&O.status!=="failed"&&O.url.trim().length>0}function E(O){return O.kind==="image"?o().image(O.markCount):O.kind==="clip"?O.summary?`${o().clip(O.duration)} ${O.summary}`:o().clip(O.duration):O.name}function ne(O,ye){if(!(i()||O.kind==="file"||O.kind==="image"&&!W(O)||O.kind==="clip"&&(!O.url||O.recording))){if((O.kind==="clip"||O.kind==="image")&&c()){c()(O.id);return}X=ye,j(ie,O.id,!0),j(D,!0)}}async function q(O){i()||(e(ie)===O&&j(D,!1),v()(O),await Cn(),(!document.activeElement||document.activeElement===document.body)&&e(S)?.querySelector("button:not(:disabled)")?.focus())}function F(O){const ye=a().find(pe=>pe.id===O);i()||!ye||!W(ye)||(j(D,!1),c()?c()(O):d()(O))}function ae(O,ye){O.key!=="Delete"||i()||(O.preventDefault(),O.stopPropagation(),q(ye))}function C(O){return O.status==="placing"||O.status==="failed"?!1:O.kind==="image"?!!O.file||W(O):O.kind==="clip"&&!O.recording&&!!O.url}function ee(O,ye){const pe=Ql()?O.metaKey:O.ctrlKey,A=O.key.toLowerCase();if(pe&&!O.shiftKey&&!O.altKey&&(A==="c"||A==="x")){if(!b()||!C(ye)||(O.preventDefault(),O.stopPropagation(),A==="x"&&i()))return;b()(ye.id,A==="x");return}ae(O,ye.id)}function le(O,ye){!k()||!C(ye)||(O.preventDefault(),k()(ye.id))}var me={get items(){return a()},set items(O){a(O),m()},get labels(){return o()},set labels(O){o(O),m()},get disabled(){return i()},set disabled(O=!1){i(O),m()},get onMarkUp(){return d()},set onMarkUp(O){d(O),m()},get onEdit(){return c()},set onEdit(O){c(O),m()},get onRemove(){return v()},set onRemove(O){v(O),m()},get onRetry(){return h()},set onRetry(O){h(O),m()},get onCopy(){return b()},set onCopy(O){b(O),m()},get onMenu(){return k()},set onMenu(O){k(O),m()},$set:St,$on:(O,ye)=>Tt(t,O,ye)},_e=Ku(),Re=xe(_e);{var Le=O=>{var ye=Wu();Tr(ye,21,()=>e(Y),pe=>pe.id,(pe,A)=>{var ge=Rt(),Te=xe(ge);{var Be=P=>{var Q=Ou(),re=z(Q);{let G=s(()=>i()||e(A).status==="placing");ki(re,{get id(){return e(A).id},get name(){return e(A).file.name},get type(){return e(A).file.imageMimeType},get imageData(){return e(A).file.imageData},get imageMimeType(){return e(A).file.imageMimeType},variant:"thumbnail",thumbnailClass:"size-full",class:"size-full",get disabled(){return e(G)},get placementStatus(){return e(A).status},get placementError(){return e(A).error}})}var se=T(re,2);{var ce=G=>{var Ee=jo(),De=oe(Ee,!0);$(()=>{te(Ee,"data-failed",e(A).status==="failed"||void 0),te(Ee,"role",e(A).status==="failed"?"alert":"status"),te(Ee,"title",e(A).error),J(De,e(A).status==="failed"?e(A).error??o().attachmentFailed:o().attachmentPending)}),u(G,Ee)};B(se,G=>{e(A).status&&G(ce)})}var w=T(se,2),Se=z(w);{var Ae=G=>{Xe(G,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>h()?.(e(A).id),children:(Ee,De)=>{jt(Ee,{get icon(){return zs},size:16})},$$slots:{default:!0}})};B(Se,G=>{e(A).status==="failed"&&h()&&G(Ae)})}var L=T(Se,2);{let G=s(()=>f.chat_attachmentPreview_remove_ariaLabel({name:e(A).file.name}));n(L,()=>e(A).id,()=>e(G))}R(w),R(Q),$(()=>te(Q,"data-attachment-id",e(A).id)),Sr("keydown",Q,G=>ee(G,e(A))),Sr("contextmenu",Q,G=>le(G,e(A))),Kt(1,Q,()=>qa,()=>({tier:"fast",y:3,scale:.98})),Kt(2,Q,()=>ea,()=>({tier:"fast"})),u(P,Q)},Ce=P=>{const Q=s(()=>e(A).kind==="image"&&!W(e(A))&&e(A).status!=="failed");var re=zu(),se=z(re);{var ce=ve=>{Xe(ve,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile file",get"aria-label"(){return e(A).name},get disabled(){return i()},onkeydown:Oe=>ae(Oe,e(A).id),children:(Oe,U)=>{var ue=qu(),ot=xe(ue);jt(ot,{get icon(){return Tn},size:20});var xt=T(ot),mt=oe(xt,!0);$(()=>J(mt,e(A).name)),u(Oe,ue)},$$slots:{default:!0}})},w=ve=>{{let Oe=s(()=>E(e(A))),U=s(()=>i()||e(A).kind==="clip"&&(e(A).recording||!e(A).url));Xe(ve,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile",get"aria-label"(){return e(Oe)},get disabled(){return e(U)},onkeydown:ue=>ee(ue,e(A)),onclick:ue=>{ue.currentTarget instanceof HTMLElement&&ne(e(A),ue.currentTarget)},children:(ue,ot)=>{var xt=Rt(),mt=xe(xt);{var Ft=je=>{var bt=Du();$(()=>te(bt,"src",e(A).url)),u(je,bt)},pt=je=>{var bt=Fu(),at=T(z(bt)),dt=oe(at,!0),$e=T(at);{var ft=K=>{var _=Bu(),he=oe(_,!0);$(()=>J(he,e(A).summary)),u(K,_)};B($e,K=>{e(A).summary&&K(ft)})}R(bt),$(()=>J(dt,e(A).duration)),u(je,bt)};B(mt,je=>{e(A).kind==="image"?je(Ft):je(pt,-1)})}u(ue,xt)},$$slots:{default:!0}})}},Se=s(()=>e(A).kind!=="image"||W(e(A)));B(se,ve=>{e(A).kind==="file"?ve(ce):e(Se)&&ve(w,1)})}var Ae=T(se,2);{var L=ve=>{var Oe=jo(),U=oe(Oe,!0);$(()=>{te(Oe,"data-failed",e(A).status==="failed"||void 0),te(Oe,"role",e(A).status==="failed"?"alert":"status"),te(Oe,"title",e(A).error),J(U,e(A).status==="failed"?e(A).error??o().attachmentFailed:o().attachmentPending)}),u(ve,Oe)};B(Ae,ve=>{(e(A).status||e(Q))&&ve(L)})}var G=T(Ae,2),Ee=z(G);{var De=ve=>{Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>h()?.(e(A).id),children:(Oe,U)=>{jt(Oe,{get icon(){return zs},size:16})},$$slots:{default:!0}})},Je=ve=>{{let Oe=s(()=>c()?o().edit:o().markUp),U=s(()=>c()?o().edit:o().markUp);Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e(Oe)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(U)},onclick:()=>F(e(A).id),children:(ue,ot)=>{Ss(ue,{glyph:"pencil"})},$$slots:{default:!0}})}},Ge=s(()=>W(e(A))),Bt=ve=>{{let Oe=s(()=>c()?o().edit:o().play),U=s(()=>c()?o().edit:o().play);Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e(Oe)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(U)},onclick:ue=>{ue.currentTarget instanceof HTMLElement&&ne(e(A),ue.currentTarget)},children:(ue,ot)=>{{let xt=s(()=>c()?"pencil":"play");Ss(ue,{get glyph(){return e(xt)}})}},$$slots:{default:!0}})}};B(Ee,ve=>{e(A).status==="failed"&&h()?ve(De):e(Ge)?ve(Je,1):e(A).kind==="clip"&&!e(A).recording&&e(A).url&&ve(Bt,2)})}var ke=T(Ee,2);n(ke,()=>e(A).id,()=>o().remove),R(G),R(re),$(()=>{te(re,"data-kind",e(A).kind),te(re,"data-attachment-id",e(A).id),te(re,"aria-busy",e(Q)||void 0)}),Sr("contextmenu",re,ve=>le(ve,e(A))),Kt(1,re,()=>qa,()=>({tier:"fast",y:3,scale:.98})),Kt(2,re,()=>ea,()=>({tier:"fast"})),u(P,re)};B(Te,P=>{e(A).kind==="image"&&e(A).file?P(Be):P(Ce,-1)})}u(pe,ge)}),R(ye),cn(ye,pe=>j(S,pe),()=>e(S)),$(()=>te(ye,"aria-label",o().attachments)),u(O,ye)};B(Re,O=>{e(Y).length&&O(Le)})}var Ke=T(Re,2);{const O=pe=>{var A=Rt(),ge=xe(A);{var Te=Be=>{var Ce=Hu(),P=xe(Ce);{var Q=w=>{Xe(w,{variant:"primary",get disabled(){return i()},onclick:()=>e(M)&&F(e(M).id),children:(Se,Ae)=>{gr();var L=Or();$(()=>J(L,o().markUp)),u(Se,L)},$$slots:{default:!0}})},re=s(()=>W(e(M)));B(P,w=>{e(re)&&w(Q)})}var se=T(P,2);Xe(se,{variant:"secondary",get disabled(){return i()},onclick:()=>e(M)&&q(e(M).id),children:(w,Se)=>{gr();var Ae=Or();$(()=>J(Ae,o().remove)),u(w,Ae)},$$slots:{default:!0}});var ce=T(se,2);Xe(ce,{variant:"ghost-light",onclick:()=>{j(D,!1)},children:(w,Se)=>{gr();var Ae=Or();$(()=>J(Ae,o().done)),u(w,Ae)},$$slots:{default:!0}}),u(Be,Ce)};B(ge,Be=>{e(M)&&e(M).kind!=="file"&&Be(Te)})}u(pe,A)};let ye=s(()=>e(M)?E(e(M)):o().attachments);xi(Ke,{get title(){return e(ye)},size:"wide",showCloseButton:!1,onCloseAutoFocus:pe=>{pe.preventDefault(),X?.isConnected?X.focus():e(S)?.querySelector("button:not(:disabled)")?.focus()},get open(){return e(D)},set open(pe){j(D,pe,!0)},footer:O,children:(pe,A)=>{var ge=Rt(),Te=xe(ge);{var Be=Ce=>{var P=Vu(),Q=z(P);{var re=w=>{var Se=Uu();$(Ae=>{te(Se,"src",e(M).url),te(Se,"alt",Ae)},[()=>E(e(M))]),u(w,Se)},se=s(()=>e(M).kind==="image"&&W(e(M))),ce=w=>{var Se=ju();$(Ae=>{te(Se,"src",e(M).url),te(Se,"aria-label",Ae)},[()=>E(e(M))]),u(w,Se)};B(Q,w=>{e(se)?w(re):e(M).kind==="clip"&&e(M).url&&w(ce,1)})}R(P),u(Ce,P)};B(Te,Ce=>{e(M)&&e(M).kind!=="file"&&Ce(Be)})}u(pe,ge)},$$slots:{footer:!0,default:!0}})}return u(r,_e),At(me)}aa(["keydown","contextmenu"]);var Qu=I("<!> ",1),Zu=I('<div class="flex flex-col gap-2 px-4 py-3 bg-muted/30 border border-border rounded-lg my-4"><div class="flex items-center justify-between gap-2"><div class="flex items-center gap-2"><div class="shrink-0 text-subtle"><!></div> <div class="font-medium text-sm"> </div></div> <div class="flex items-center gap-1"><!> <!></div></div> <div class="text-xs text-subtle"> </div> <pre class="text-xs bg-background/50 rounded p-2 overflow-x-auto max-h-40 overflow-y-auto font-mono"> </pre></div>');function Vi(r,t){if(new.target)return It({component:Vi,...r});Ct(t,!0);let n=g(t,"name",7),a=g(t,"description",7),o=g(t,"content",7),i=g(t,"onUseScript",7),d=we(!1);function c(){navigator.clipboard.writeText(o()),j(d,!0),setTimeout(()=>{j(d,!1)},2e3)}function v(){i()?.({name:n(),description:a(),content:o()})}var h={get name(){return n()},set name(C){n(C),m()},get description(){return a()},set description(C){a(C),m()},get content(){return o()},set content(C){o(C),m()},get onUseScript(){return i()},set onUseScript(C){i(C),m()},$set:St,$on:(C,ee)=>Tt(t,C,ee)},b=Zu(),k=z(b),N=z(k),Y=z(N),S=z(Y);jt(S,{get icon(){return no},size:"sm"}),R(Y);var D=T(Y,2),ie=oe(D,!0);R(N);var X=T(N,2),M=z(X);Xe(M,{variant:"ghost-light",size:"sm",onclick:c,class:"h-7 px-2",children:(C,ee)=>{var le=Qu(),me=xe(le);{let Re=s(()=>e(d)?bi:wi);jt(me,{get icon(){return e(Re)},class:"mr-1"})}var _e=T(me);$(Re=>J(_e,` ${Re??""}`),[()=>e(d)?f.chat_shared_copied_label():f.chat_shared_copy_label()]),u(C,le)},$$slots:{default:!0}});var W=T(M,2);{var E=C=>{Xe(C,{variant:"ghost-light",size:"sm",onclick:v,class:"h-7 px-2",children:(ee,le)=>{gr();var me=Or();$(_e=>J(me,_e),[()=>f.chat_setupScriptCard_useScript_label()]),u(ee,me)},$$slots:{default:!0}})};B(W,C=>{i()&&C(E)})}R(X),R(k);var ne=T(k,2),q=oe(ne,!0),F=T(ne,2),ae=oe(F,!0);return R(b),$(()=>{J(ie,n()),J(q,a()),J(ae,o())}),u(r,b),At(h)}const wr={toolStart:/(?:\x1B\[\d+m)?🔧\s+(?:Tool call:\s+)?(.+?)(?:\x1B\[0m)?$/,toolDetail:/(?:[└├]─\s+(.+)$|^\s{3,}(.+)$)/,toolResult:/(?:\x1B\[\d+m)?📋\s+Tool result:\s+(.+?)(?:\x1B\[0m)?$/,toolSuccess:/[✓✔✅]\s+(.+)$/,toolError:/[❌✗❎]\s+(.+)$/,sessionInfo:/[Ss]ession:\s*([a-f0-9-]+)/,resumedSession:/📂?\s*Resumed session/i,assistantMarker:/🤖/,systemMarker:/💻/,userMarker:/👤/,thinkingMarker:/🤔\s*Thinking/i,waitingMarker:/^⏳\s+Running/i,indexingProgress:/^Indexing:\s*\[.*\]\s*\d+%/,agentDigest:/<agent_digest>([\s\S]*?)<\/agent_digest>/,setupScript:/<setup_script\s+name="([^"]+)"\s+description="([^"]+)">([\s\S]*?)<\/setup_script>/};class Ju{constructor(){kn(this,"buffer","");kn(this,"currentToolName",null);kn(this,"currentToolId",null);kn(this,"lastToolId",null);kn(this,"currentToolParams",[]);kn(this,"currentToolResultContent",[]);kn(this,"inToolResult",!1);kn(this,"inCodeBlock",!1);kn(this,"codeBlockLanguage","");kn(this,"codeBlockContent","");kn(this,"characterBuffer","");kn(this,"inCharacterMode",!1);kn(this,"emittedToolIds",new Set)}parseChunk(t){if(this.isMarkerLine(t.trim())){const o=[];if(this.inToolResult&&this.currentToolResultContent.length>0){const c=this.currentToolResultContent.some(h=>h.startsWith("❌")||h.startsWith("Error:")),v=this.currentToolResultContent.map(h=>h.replace(/^❌\s*/,"").replace(/^Error:\s*/,"")).join(`
1
+ var $l=Object.defineProperty;var Ol=(r,t,n)=>t in r?$l(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n;var kn=(r,t,n)=>Ol(r,typeof t!="symbol"?t+"":t,n);import{t as It,br as g,a_ as B,bz as St,b as Tt,bp as f,bt as Kn,bv as dr,bu as ql,bs as ha}from"./Cv-W__h8.js";import{ai as aa,bs as Ct,ca as sr,aD as e,bH as j,ay as xe,bS as T,a7 as Rt,W as u,a5 as z,bA as R,bn as At,c9 as s,bV as we,aA as m,b_ as $,aj as Sr,aB as I,be as gr,b$ as Or,bO as J,bf as or,c0 as Cn,bl as oe,bj as jn,c6 as Dl,bo as za,br as Yr,am as Dn,ax as Bn,bk as as,aw as va,bz as ss,cb as ms,c5 as Ha,aC as xr,cd as _o,bv as Bl}from"./DYhIMPy1.js";import{n as Tr,u as te,v as ze,g as _n,s as ps,w as _a,j as kt,l as ar,p as Yn,I as Fl,i as ya,r as zl,o as eo,X as _i,q as Wl,S as Hl,C as Ul}from"./DPvDLGgX.js";import{I as Kt,F as qa,c as ea,j as jl,s as yi,p as to,y as Vl,u as Kl,t as $r,g as oa,B as ws,E as os,S as Gl}from"./j0KL2ItM.js";import{b as cn}from"./BaIAhI85.js";import{f as Xe,bj as Ql,am as ro,bt as Zl,bx as xs,bL as Jl}from"./BePtUMMB.js";import"./9s3slwY6.js";import"./Dj_1qKAG.js";import"./DUGj7TPr.js";import{s as Ln}from"./ClsZrb8B.js";import{F as jt,a0 as zs,bc as Tn,cF as no,aq as bi,aV as wi,aG as Xl,c4 as Yl,a2 as is,aJ as ed,cI as td,cH as rd,$ as vs,as as ao,I as yo,af as nd,bq as ad,aO as sd,aT as od,bF as id,ak as ld,cx as dd,ay as bo,aL as wo,bX as ks,aE as Ua,cR as cd,c6 as ud,bj as fd,b as gd,ck as md,ac as pd,b6 as Is,cm as xa,cA as vd,a as hd}from"./BKpkoMuv.js";import{c as xi,A as _d,x as yd}from"./D2pEu7en.js";import{b as Ss,V as xo}from"./CsScj5_e.js";import{a as ki,b7 as Pr,A as Ga,ao as Ii,s as bd,n as Si,d as wd,I as xd,R as kd,ax as Id,a0 as Sd}from"./B07CbBFu.js";import{bX as Ti,j as Qa,a6 as Ws,al as ls,F as Td,au as Za,aN as Cd,aQ as ko}from"./CLGBx41M.js";import{t as ia,o as Ad}from"./2_iuLgF6.js";import{c3 as Ja,aC as Da,cQ as Ci,cS as Vn,bU as hs,j as Md,cJ as Ai,cP as _s,cO as Mi,cM as Pi,g as Nn,aa as Pd,ab as Rd,ax as Ed,s as Nd,K as Ld,W as Io,v as Ri,dO as $d,at as Od,k as qd,u as Ts,a6 as Dd,n as Bd,O as Fd,o as zd,S as Wd,R as Hd,a0 as Ud,q as Ei,r as Ni,l as jd,cT as Vd,a4 as Kd,D as Gd,x as Qd,V as So}from"./B10dK85Q.js";import{Ir as yt,oA as Zd,t8 as Xa,np as To,uY as Li,u_ as $i,rm as Jd,xU as ds,uf as Oi,nk as qi,be as Ya,xV as Xd,q0 as Yd,sF as ec,uR as Di,nj as tc,mq as rc,g as nc,yl as ac,yi as sc,yk as oc}from"./DBkMUdAo.js";import{a2 as ic,x as Cs,a0 as lc,O as As,V as dc,_ as cc,j as uc,o as ka,M as fa,p as fc,F as gc,u as mc,s as pc,L as Ms,J as vc,y as hc,K as _c,Z as Ma,Q as ja,N as Co,m as Ao,E as yc,c as Ps,B as Mo,z as bc,v as Po,H as Pa,P as wc,G as xc,i as kc,R as Ic,T as Sc,A as Tc,g as Cc,b as Ac,D as Mc,f as Pc,e as Rc,a as Ec,C as Nc,h as Lc,U as Bi,a3 as $c,t as Oc,k as qc,d as Ro}from"./Dv3p1j1_.js";import{i as Dc,e as Bc}from"./1o85IiDb.js";import{g as Rs}from"./BvFAWM27.js";import{M as Ia,C as Ra}from"./BaUdfCFE.js";import{C as Eo}from"./DEZhhrDD.js";import"./BbfzoNWa.js";import{P as Fc}from"./zdGnrETd.js";import"./C9iBDSZ7.js";import{c as Fi}from"./ChTqQfQN.js";import{S as zc}from"./BddvxHT9.js";import{D as No,M as Wc}from"./DpLAbmZc.js";import{b as Hc,s as na,c as cs}from"./BvATDH-A.js";import{O as es,y as Es,E as Ns,B as Ls,N as Uc,m as jc,l as Vc,d as us,C as Lo,f as Kc,e as Gc,g as Qc}from"./DDpGX96O.js";import{a as zi,s as $o}from"./BsieX9dN.js";import{f as Zc}from"./BdWqymET.js";import{c as dn}from"./CueFizU8.js";import{P as Jc}from"./BvDMLNjQ.js";import{q as $s,p as Os,z as Oo,h as Xc}from"./9yACX6ry.js";import{R as Hs,C as ys,k as Yc,h as eu,g as tu,i as qo,P as ru}from"./DTDbZc--.js";import"./CgCdkhNg.js";import{R as Do,x as Na,o as Wi}from"./OtM9LD2A.js";import{B as nu}from"./BlXsb3Tb.js";import{o as Hi,r as au,e as su}from"./Cz7YByiK.js";import{o as Ui}from"./-dEFVrNh.js";import{g as so}from"./CmUwI5cU.js";import{a as ou,M as iu}from"./BiLjH_HB.js";import{c as Sa}from"./D4os-974.js";import{A as lu}from"./DX9UUoob.js";import{f as du,d as cu}from"./gNRMLIyt.js";import{a8 as uu,N as fu,Y as gu,K as Bo,X as mu,v as pu}from"./Bjl5gIYt.js";import{a as vu}from"./CC7to1B5.js";import{G as hu}from"./GdlMbZRO.js";import{S as _u}from"./m03ON1WT.js";import{u as yu,a as bu,c as Fo,S as wu}from"./DfxQWSVU.js";import{T as Us}from"./BN_moS2U.js";import"./Czzc8yNT.js";import{g as xu}from"./B8IFnCn1.js";import{a as ku}from"./CkjMOvWd.js";import{b as Iu}from"./DAZ23kin.js";import{b as zo}from"./p7znhYIU.js";import{g as Su,i as Tu,a as Cu}from"./BZeUwBn0.js";import{n as Wo,o as Ho,b as ma,s as Ta,_ as qs,e as Au}from"./CIyUrgF0.js";import{aW as Un,B as Mu}from"./CUrYTyIw.js";import{y as Pu}from"./C3BW_tmx.js";import{c as Ru}from"./BAl8Wwh_.js";function Eu(r){if(!r||typeof r!="object")return null;const t=r;if(t.type!=="script_monitor_wake"||t.source!=="system")return null;const{scriptName:n,scriptId:a,runId:o,monitorId:i,workspaceId:d,reason:c}=t;if(typeof n!="string"||typeof a!="string"||!a||typeof o!="string"||!o||typeof i!="string"||!i||typeof d!="string"||!d||c!=="finished"&&c!=="ttl-expired"&&c!=="output-match"&&c!=="line-count")return null;const v=t.trigger;return{scriptName:n,scriptId:a,runId:o,monitorId:i,workspaceId:d,reason:c,...c==="output-match"&&typeof v?.matchedLine=="string"?{matchedLine:v.matchedLine}:{}}}function Nu(r){return r?.type==="script_monitor_wake"&&!("remoteAgentId"in r)}function Lu(r,t,n,a=!1){if(!r||!t)return{edit:!1,remove:!1,sendNow:!1};const o=r.messageMetadata?.fromPrincipalId??r.author?.principalId,i=uu(r)&&r.author?.principalId!==null&&o===t;return{edit:i,remove:i||t===n||a,sendNow:(i||a)&&!ji(r)}}function Ca(r,t){if(t)return r.find(n=>n.editing&&n.editingMessageId?n.editingMessageId===t:n.id===t)}function ji(r){return Nu(r.messageMetadata)&&typeof r.messageMetadata?.monitorId=="string"}function Uo(r,t=Date.now()){const n=r.messageMetadata,a=n?.fromPrincipalId,o=n&&Object.hasOwn(n,"humanAuthor")&&!(typeof a=="string"&&a.length>0),i=r.holdKind!==void 0&&Date.parse(r.holdUntil??"")>t;return!r.editing&&!i&&!o&&!ji(r)}const j_="pl-3.5! pr-2!";var $u=I('<span class="tile-remove-slot svelte-d8pwpf"><!></span>'),jo=I('<span class="attachment-status svelte-d8pwpf"> </span>'),Ou=I('<div class="file-image tile svelte-d8pwpf" data-kind="file"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),qu=I("<!><span> </span>",1),Du=I('<img alt="" draggable="false"/>'),Bu=I('<span class="summary svelte-d8pwpf" data-clip-summary=""> </span>'),Fu=I('<span class="clip svelte-d8pwpf"><span class="record-dot svelte-d8pwpf" aria-hidden="true"></span><span class="duration svelte-d8pwpf"> </span><!></span>'),zu=I('<div class="tile svelte-d8pwpf"><!> <!> <div class="tile-actions svelte-d8pwpf"><!> <!></div></div>'),Wu=I('<div class="attachment-row svelte-d8pwpf" role="group" data-dock-media-attachments=""></div>'),Hu=I("<!> <!> <!>",1),Uu=I('<img draggable="false" class="svelte-d8pwpf"/>'),ju=I('<video controls="" playsinline="" class="svelte-d8pwpf"></video>',2),Vu=I('<div class="media-viewer svelte-d8pwpf"><!></div>'),Ku=I("<!> <!>",1);function Gu(r,t){if(new.target)return It({component:Gu,...r});Ct(t,!0);const n=(O,ye=or,pe=or)=>{var A=$u(),ge=z(A);Xe(ge,{variant:"secondary",size:"icon-sm",class:"tile-action tile-remove",get disabled(){return i()},get"aria-label"(){return pe()},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return pe()},onclick:()=>q(ye()),children:(Te,Be)=>{Ss(Te,{glyph:"x"})},$$slots:{default:!0}}),R(A),u(O,A)};let a=g(t,"items",7),o=g(t,"labels",7),i=g(t,"disabled",7,!1),d=g(t,"onMarkUp",7),c=g(t,"onEdit",7),v=g(t,"onRemove",7),h=g(t,"onRetry",7),b=g(t,"onCopy",7),k=g(t,"onMenu",7);const N=O=>O.owner==="attachment"?2:{image:0,clip:1,file:2}[O.kind],Y=s(()=>[...a()].sort((O,ye)=>N(O)-N(ye)));let S=we(null),D=we(!1),ie=we(null),X=null;const M=s(()=>a().find(O=>O.id===e(ie)));sr(()=>{(!e(M)||e(M).kind==="image"&&!W(e(M)))&&j(D,!1)});function W(O){return O.kind==="image"&&O.status!=="placing"&&O.status!=="failed"&&O.url.trim().length>0}function E(O){return O.kind==="image"?o().image(O.markCount):O.kind==="clip"?O.summary?`${o().clip(O.duration)} ${O.summary}`:o().clip(O.duration):O.name}function ne(O,ye){if(!(i()||O.kind==="file"||O.kind==="image"&&!W(O)||O.kind==="clip"&&(!O.url||O.recording))){if((O.kind==="clip"||O.kind==="image")&&c()){c()(O.id);return}X=ye,j(ie,O.id,!0),j(D,!0)}}async function q(O){i()||(e(ie)===O&&j(D,!1),v()(O),await Cn(),(!document.activeElement||document.activeElement===document.body)&&e(S)?.querySelector("button:not(:disabled)")?.focus())}function F(O){const ye=a().find(pe=>pe.id===O);i()||!ye||!W(ye)||(j(D,!1),c()?c()(O):d()(O))}function ae(O,ye){O.key!=="Delete"||i()||(O.preventDefault(),O.stopPropagation(),q(ye))}function C(O){return O.status==="placing"||O.status==="failed"?!1:O.kind==="image"?!!O.file||W(O):O.kind==="clip"&&!O.recording&&!!O.url}function ee(O,ye){const pe=Ql()?O.metaKey:O.ctrlKey,A=O.key.toLowerCase();if(pe&&!O.shiftKey&&!O.altKey&&(A==="c"||A==="x")){if(!b()||!C(ye)||(O.preventDefault(),O.stopPropagation(),A==="x"&&i()))return;b()(ye.id,A==="x");return}ae(O,ye.id)}function le(O,ye){!k()||!C(ye)||(O.preventDefault(),k()(ye.id))}var me={get items(){return a()},set items(O){a(O),m()},get labels(){return o()},set labels(O){o(O),m()},get disabled(){return i()},set disabled(O=!1){i(O),m()},get onMarkUp(){return d()},set onMarkUp(O){d(O),m()},get onEdit(){return c()},set onEdit(O){c(O),m()},get onRemove(){return v()},set onRemove(O){v(O),m()},get onRetry(){return h()},set onRetry(O){h(O),m()},get onCopy(){return b()},set onCopy(O){b(O),m()},get onMenu(){return k()},set onMenu(O){k(O),m()},$set:St,$on:(O,ye)=>Tt(t,O,ye)},_e=Ku(),Re=xe(_e);{var Le=O=>{var ye=Wu();Tr(ye,21,()=>e(Y),pe=>pe.id,(pe,A)=>{var ge=Rt(),Te=xe(ge);{var Be=P=>{var Q=Ou(),re=z(Q);{let G=s(()=>i()||e(A).status==="placing");ki(re,{get id(){return e(A).id},get name(){return e(A).file.name},get type(){return e(A).file.imageMimeType},get imageData(){return e(A).file.imageData},get imageMimeType(){return e(A).file.imageMimeType},variant:"thumbnail",thumbnailClass:"size-full",class:"size-full",get disabled(){return e(G)},get placementStatus(){return e(A).status},get placementError(){return e(A).error}})}var se=T(re,2);{var ce=G=>{var Ee=jo(),De=oe(Ee,!0);$(()=>{te(Ee,"data-failed",e(A).status==="failed"||void 0),te(Ee,"role",e(A).status==="failed"?"alert":"status"),te(Ee,"title",e(A).error),J(De,e(A).status==="failed"?e(A).error??o().attachmentFailed:o().attachmentPending)}),u(G,Ee)};B(se,G=>{e(A).status&&G(ce)})}var w=T(se,2),Se=z(w);{var Ae=G=>{Xe(G,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>h()?.(e(A).id),children:(Ee,De)=>{jt(Ee,{get icon(){return zs},size:16})},$$slots:{default:!0}})};B(Se,G=>{e(A).status==="failed"&&h()&&G(Ae)})}var L=T(Se,2);{let G=s(()=>f.chat_attachmentPreview_remove_ariaLabel({name:e(A).file.name}));n(L,()=>e(A).id,()=>e(G))}R(w),R(Q),$(()=>te(Q,"data-attachment-id",e(A).id)),Sr("keydown",Q,G=>ee(G,e(A))),Sr("contextmenu",Q,G=>le(G,e(A))),Kt(1,Q,()=>qa,()=>({tier:"fast",y:3,scale:.98})),Kt(2,Q,()=>ea,()=>({tier:"fast"})),u(P,Q)},Ce=P=>{const Q=s(()=>e(A).kind==="image"&&!W(e(A))&&e(A).status!=="failed");var re=zu(),se=z(re);{var ce=ve=>{Xe(ve,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile file",get"aria-label"(){return e(A).name},get disabled(){return i()},onkeydown:Oe=>ae(Oe,e(A).id),children:(Oe,U)=>{var ue=qu(),ot=xe(ue);jt(ot,{get icon(){return Tn},size:20});var xt=T(ot),mt=oe(xt,!0);$(()=>J(mt,e(A).name)),u(Oe,ue)},$$slots:{default:!0}})},w=ve=>{{let Oe=s(()=>E(e(A))),U=s(()=>i()||e(A).kind==="clip"&&(e(A).recording||!e(A).url));Xe(ve,{type:"button",variant:"ghost",wrapContent:!1,class:"open-tile",get"aria-label"(){return e(Oe)},get disabled(){return e(U)},onkeydown:ue=>ee(ue,e(A)),onclick:ue=>{ue.currentTarget instanceof HTMLElement&&ne(e(A),ue.currentTarget)},children:(ue,ot)=>{var xt=Rt(),mt=xe(xt);{var Ft=je=>{var bt=Du();$(()=>te(bt,"src",e(A).url)),u(je,bt)},pt=je=>{var bt=Fu(),at=T(z(bt)),dt=oe(at,!0),$e=T(at);{var ft=K=>{var _=Bu(),he=oe(_,!0);$(()=>J(he,e(A).summary)),u(K,_)};B($e,K=>{e(A).summary&&K(ft)})}R(bt),$(()=>J(dt,e(A).duration)),u(je,bt)};B(mt,je=>{e(A).kind==="image"?je(Ft):je(pt,-1)})}u(ue,xt)},$$slots:{default:!0}})}},Se=s(()=>e(A).kind!=="image"||W(e(A)));B(se,ve=>{e(A).kind==="file"?ve(ce):e(Se)&&ve(w,1)})}var Ae=T(se,2);{var L=ve=>{var Oe=jo(),U=oe(Oe,!0);$(()=>{te(Oe,"data-failed",e(A).status==="failed"||void 0),te(Oe,"role",e(A).status==="failed"?"alert":"status"),te(Oe,"title",e(A).error),J(U,e(A).status==="failed"?e(A).error??o().attachmentFailed:o().attachmentPending)}),u(ve,Oe)};B(Ae,ve=>{(e(A).status||e(Q))&&ve(L)})}var G=T(Ae,2),Ee=z(G);{var De=ve=>{Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return o().retry},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return o().retry},onclick:()=>h()?.(e(A).id),children:(Oe,U)=>{jt(Oe,{get icon(){return zs},size:16})},$$slots:{default:!0}})},Je=ve=>{{let Oe=s(()=>c()?o().edit:o().markUp),U=s(()=>c()?o().edit:o().markUp);Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e(Oe)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(U)},onclick:()=>F(e(A).id),children:(ue,ot)=>{Ss(ue,{glyph:"pencil"})},$$slots:{default:!0}})}},Ge=s(()=>W(e(A))),Bt=ve=>{{let Oe=s(()=>c()?o().edit:o().play),U=s(()=>c()?o().edit:o().play);Xe(ve,{variant:"primary",size:"icon-sm",class:"tile-action",get disabled(){return i()},get"aria-label"(){return e(Oe)},tooltipContentClass:"dock-chrome-tooltip",get tooltip(){return e(U)},onclick:ue=>{ue.currentTarget instanceof HTMLElement&&ne(e(A),ue.currentTarget)},children:(ue,ot)=>{{let xt=s(()=>c()?"pencil":"play");Ss(ue,{get glyph(){return e(xt)}})}},$$slots:{default:!0}})}};B(Ee,ve=>{e(A).status==="failed"&&h()?ve(De):e(Ge)?ve(Je,1):e(A).kind==="clip"&&!e(A).recording&&e(A).url&&ve(Bt,2)})}var ke=T(Ee,2);n(ke,()=>e(A).id,()=>o().remove),R(G),R(re),$(()=>{te(re,"data-kind",e(A).kind),te(re,"data-attachment-id",e(A).id),te(re,"aria-busy",e(Q)||void 0)}),Sr("contextmenu",re,ve=>le(ve,e(A))),Kt(1,re,()=>qa,()=>({tier:"fast",y:3,scale:.98})),Kt(2,re,()=>ea,()=>({tier:"fast"})),u(P,re)};B(Te,P=>{e(A).kind==="image"&&e(A).file?P(Be):P(Ce,-1)})}u(pe,ge)}),R(ye),cn(ye,pe=>j(S,pe),()=>e(S)),$(()=>te(ye,"aria-label",o().attachments)),u(O,ye)};B(Re,O=>{e(Y).length&&O(Le)})}var Ke=T(Re,2);{const O=pe=>{var A=Rt(),ge=xe(A);{var Te=Be=>{var Ce=Hu(),P=xe(Ce);{var Q=w=>{Xe(w,{variant:"primary",get disabled(){return i()},onclick:()=>e(M)&&F(e(M).id),children:(Se,Ae)=>{gr();var L=Or();$(()=>J(L,o().markUp)),u(Se,L)},$$slots:{default:!0}})},re=s(()=>W(e(M)));B(P,w=>{e(re)&&w(Q)})}var se=T(P,2);Xe(se,{variant:"secondary",get disabled(){return i()},onclick:()=>e(M)&&q(e(M).id),children:(w,Se)=>{gr();var Ae=Or();$(()=>J(Ae,o().remove)),u(w,Ae)},$$slots:{default:!0}});var ce=T(se,2);Xe(ce,{variant:"ghost-light",onclick:()=>{j(D,!1)},children:(w,Se)=>{gr();var Ae=Or();$(()=>J(Ae,o().done)),u(w,Ae)},$$slots:{default:!0}}),u(Be,Ce)};B(ge,Be=>{e(M)&&e(M).kind!=="file"&&Be(Te)})}u(pe,A)};let ye=s(()=>e(M)?E(e(M)):o().attachments);xi(Ke,{get title(){return e(ye)},size:"wide",showCloseButton:!1,onCloseAutoFocus:pe=>{pe.preventDefault(),X?.isConnected?X.focus():e(S)?.querySelector("button:not(:disabled)")?.focus()},get open(){return e(D)},set open(pe){j(D,pe,!0)},footer:O,children:(pe,A)=>{var ge=Rt(),Te=xe(ge);{var Be=Ce=>{var P=Vu(),Q=z(P);{var re=w=>{var Se=Uu();$(Ae=>{te(Se,"src",e(M).url),te(Se,"alt",Ae)},[()=>E(e(M))]),u(w,Se)},se=s(()=>e(M).kind==="image"&&W(e(M))),ce=w=>{var Se=ju();$(Ae=>{te(Se,"src",e(M).url),te(Se,"aria-label",Ae)},[()=>E(e(M))]),u(w,Se)};B(Q,w=>{e(se)?w(re):e(M).kind==="clip"&&e(M).url&&w(ce,1)})}R(P),u(Ce,P)};B(Te,Ce=>{e(M)&&e(M).kind!=="file"&&Ce(Be)})}u(pe,ge)},$$slots:{footer:!0,default:!0}})}return u(r,_e),At(me)}aa(["keydown","contextmenu"]);var Qu=I("<!> ",1),Zu=I('<div class="flex flex-col gap-2 px-4 py-3 bg-muted/30 border border-border rounded-lg my-4"><div class="flex items-center justify-between gap-2"><div class="flex items-center gap-2"><div class="shrink-0 text-subtle"><!></div> <div class="font-medium text-sm"> </div></div> <div class="flex items-center gap-1"><!> <!></div></div> <div class="text-xs text-subtle"> </div> <pre class="text-xs bg-background/50 rounded p-2 overflow-x-auto max-h-40 overflow-y-auto font-mono"> </pre></div>');function Vi(r,t){if(new.target)return It({component:Vi,...r});Ct(t,!0);let n=g(t,"name",7),a=g(t,"description",7),o=g(t,"content",7),i=g(t,"onUseScript",7),d=we(!1);function c(){navigator.clipboard.writeText(o()),j(d,!0),setTimeout(()=>{j(d,!1)},2e3)}function v(){i()?.({name:n(),description:a(),content:o()})}var h={get name(){return n()},set name(C){n(C),m()},get description(){return a()},set description(C){a(C),m()},get content(){return o()},set content(C){o(C),m()},get onUseScript(){return i()},set onUseScript(C){i(C),m()},$set:St,$on:(C,ee)=>Tt(t,C,ee)},b=Zu(),k=z(b),N=z(k),Y=z(N),S=z(Y);jt(S,{get icon(){return no},size:"sm"}),R(Y);var D=T(Y,2),ie=oe(D,!0);R(N);var X=T(N,2),M=z(X);Xe(M,{variant:"ghost-light",size:"sm",onclick:c,class:"h-7 px-2",children:(C,ee)=>{var le=Qu(),me=xe(le);{let Re=s(()=>e(d)?bi:wi);jt(me,{get icon(){return e(Re)},class:"mr-1"})}var _e=T(me);$(Re=>J(_e,` ${Re??""}`),[()=>e(d)?f.chat_shared_copied_label():f.chat_shared_copy_label()]),u(C,le)},$$slots:{default:!0}});var W=T(M,2);{var E=C=>{Xe(C,{variant:"ghost-light",size:"sm",onclick:v,class:"h-7 px-2",children:(ee,le)=>{gr();var me=Or();$(_e=>J(me,_e),[()=>f.chat_setupScriptCard_useScript_label()]),u(ee,me)},$$slots:{default:!0}})};B(W,C=>{i()&&C(E)})}R(X),R(k);var ne=T(k,2),q=oe(ne,!0),F=T(ne,2),ae=oe(F,!0);return R(b),$(()=>{J(ie,n()),J(q,a()),J(ae,o())}),u(r,b),At(h)}const wr={toolStart:/(?:\x1B\[\d+m)?🔧\s+(?:Tool call:\s+)?(.+?)(?:\x1B\[0m)?$/,toolDetail:/(?:[└├]─\s+(.+)$|^\s{3,}(.+)$)/,toolResult:/(?:\x1B\[\d+m)?📋\s+Tool result:\s+(.+?)(?:\x1B\[0m)?$/,toolSuccess:/[✓✔✅]\s+(.+)$/,toolError:/[❌✗❎]\s+(.+)$/,sessionInfo:/[Ss]ession:\s*([a-f0-9-]+)/,resumedSession:/📂?\s*Resumed session/i,assistantMarker:/🤖/,systemMarker:/💻/,userMarker:/👤/,thinkingMarker:/🤔\s*Thinking/i,waitingMarker:/^⏳\s+Running/i,indexingProgress:/^Indexing:\s*\[.*\]\s*\d+%/,agentDigest:/<agent_digest>([\s\S]*?)<\/agent_digest>/,setupScript:/<setup_script\s+name="([^"]+)"\s+description="([^"]+)">([\s\S]*?)<\/setup_script>/};class Ju{constructor(){kn(this,"buffer","");kn(this,"currentToolName",null);kn(this,"currentToolId",null);kn(this,"lastToolId",null);kn(this,"currentToolParams",[]);kn(this,"currentToolResultContent",[]);kn(this,"inToolResult",!1);kn(this,"inCodeBlock",!1);kn(this,"codeBlockLanguage","");kn(this,"codeBlockContent","");kn(this,"characterBuffer","");kn(this,"inCharacterMode",!1);kn(this,"emittedToolIds",new Set)}parseChunk(t){if(this.isMarkerLine(t.trim())){const o=[];if(this.inToolResult&&this.currentToolResultContent.length>0){const c=this.currentToolResultContent.some(h=>h.startsWith("❌")||h.startsWith("Error:")),v=this.currentToolResultContent.map(h=>h.replace(/^❌\s*/,"").replace(/^Error:\s*/,"")).join(`
2
2
  `);o.push({type:"tool_result",content:v,metadata:{toolId:this.currentToolId,isError:c}}),this.lastToolId=this.currentToolId,this.currentToolId=null,this.inToolResult=!1,this.currentToolResultContent=[]}const i=t.indexOf("🤖"),d=t.substring(i+2);if(this.inCharacterMode=!0,this.characterBuffer="",d&&d.trim()&&d!==`
3
3
  `){const c=d.replace(/^\n/,"");c&&(this.characterBuffer=c)}return o}if(this.inCharacterMode){if(t.trim()===""&&this.characterBuffer==="")return[];if(t.includes(`
4
4
  `)&&this.characterBuffer.length>0){const o=t.substring(0,t.indexOf(`
@@ -1,4 +1,4 @@
1
- import{g as st}from"./B0Eojz7f.js";import{g as it}from"./D_LOsbpY.js";import{s as at}from"./BUwalWZU.js";import{b as f,ay as we,X as F,a1 as rt,aP as nt,bh as Ve,aW as fe,a_ as lt,V as ut,aZ as ot,U as ct,b0 as ht,Y as dt,z as I,r as pt,$ as At,am as ft,aU as gt,ab as mt,x as Ct,aV as bt,aI as U}from"./aVPYoucJ.js";import{c as kt}from"./DBCGdyvL.js";import{aP as Et}from"./nvafrjsr.js";var Pe=(function(){var t=f(function(O,c,d,p){for(d=d||{},p=O.length;p--;d[O[p]]=c);return d},"o"),i=[1,18],a=[1,19],r=[1,20],n=[1,41],u=[1,26],h=[1,42],o=[1,24],g=[1,25],m=[1,32],_=[1,33],Y=[1,34],b=[1,45],me=[1,35],Ce=[1,36],be=[1,37],ke=[1,38],Ee=[1,27],Te=[1,28],ye=[1,29],De=[1,30],Fe=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],Be=[1,9],A=[1,8,9],te=[1,58],se=[1,59],ie=[1,60],ae=[1,61],re=[1,62],_e=[1,63],Se=[1,64],S=[1,8,9,41],Me=[1,77],R=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ne=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],le=[13,60,86,100,102,103],K=[13,60,73,74,86,100,102,103],Re=[13,60,68,69,70,71,72,86,100,102,103],ue=[1,103],W=[1,121],Q=[1,117],X=[1,113],j=[1,119],H=[1,114],q=[1,115],J=[1,116],Z=[1,118],$=[1,120],Ge=[22,50,60,61,82,86,87,88,89,90],Ue=[1,128],oe=[12,39],Ne=[1,8,9,39,41,44,46],ce=[1,8,9,22],ze=[1,153],Ye=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Le={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(c,d,p,l,C,e,ee){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:l.addMember(e[s-1],l.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:u,48:h,51:o,52:g,54:m,56:_,57:Y,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(Be,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:te,69:se,70:ie,71:ae,72:re,73:_e,74:Se}),{39:[1,65]},t(S,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Me,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(R,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(R,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ne,[2,133]),t(ne,[2,134]),t(ne,[2,135]),t(ne,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(Be,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:r,42:n,46:u,48:h,51:o,52:g,54:m,56:_,57:Y,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:u,48:h,51:o,52:g,54:m,56:_,57:Y,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:te,69:se,70:ie,71:ae,72:re,73:_e,74:Se},t(A,[2,64]),{67:93,73:_e,74:Se},t(le,[2,83],{66:94,68:te,69:se,70:ie,71:ae,72:re}),t(K,[2,84]),t(K,[2,85]),t(K,[2,86]),t(K,[2,87]),t(K,[2,88]),t(Re,[2,89]),t(Re,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:h,54:m,56:_},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ue},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:W,50:Q,59:110,60:X,82:j,84:111,85:112,86:H,87:q,88:J,89:Z,90:$},{60:[1,122]},{13:Me,55:123},t(S,[2,72]),t(S,[2,138]),{22:W,50:Q,59:124,60:X,61:[1,125],82:j,84:111,85:112,86:H,87:q,88:J,89:Z,90:$},t(Ge,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(R,[2,16]),t(R,[2,17]),t(R,[2,18]),{11:127,12:Ue,39:[2,36]},t(oe,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(oe,[2,10]),t(Ne,[2,55],{11:131,12:Ue}),t(Be,[2,7]),{9:[1,132]},t(ce,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(le,[2,82],{66:136,68:te,69:se,70:ie,71:ae,72:re}),t(le,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:h,54:m,56:_},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(S,[2,48],{39:[1,142]}),{41:[1,143]},t(S,[2,50]),{41:[2,61],45:144,51:ue},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:ze}),t(Ye,[2,107],{85:154,22:W,50:Q,60:X,82:j,86:H,87:q,88:J,89:Z,90:$}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(S,[2,71]),t(A,[2,73],{61:ze}),{60:[1,155]},t(R,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(oe,[2,12]),t(Ne,[2,56]),{1:[2,4]},t(ce,[2,69]),t(ce,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(le,[2,80]),t(S,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:h,54:m,56:_},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:h,54:m,56:_},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:h,54:m,56:_},{45:163,51:ue},t(S,[2,49]),{41:[2,62]},t(S,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:W,50:Q,60:X,82:j,84:169,85:112,86:H,87:q,88:J,89:Z,90:$},t(x,[2,110]),t(Ge,[2,75]),{14:[1,170]},t(oe,[2,11]),t(ce,[2,70]),t(S,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ue},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(Ye,[2,108],{85:154,22:W,50:Q,60:X,82:j,86:H,87:q,88:J,89:Z,90:$}),t(Ne,[2,8]),t(S,[2,51]),{41:[1,175]},t(S,[2,54]),t(A,[2,104]),t(S,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(c,d){if(d.recoverable)this.trace(c);else{var p=new Error(c);throw p.hash=d,p}},"parseError"),parse:f(function(c){var d=this,p=[0],l=[],C=[null],e=[],ee=this.table,s="",de=0,Ke=0,Ze=2,We=1,$e=e.slice.call(arguments,1),D=Object.create(this.lexer),V={yy:{}};for(var xe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xe)&&(V.yy[xe]=this.yy[xe]);D.setInput(c,V.yy),V.yy.lexer=D,V.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var ve=D.yylloc;e.push(ve);var et=D.options&&D.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tt(N){p.length=p.length-2*N,C.length=C.length-N,e.length=e.length-N}f(tt,"popStack");function Qe(){var N;return N=l.pop()||D.lex()||We,typeof N!="number"&&(N instanceof Array&&(l=N,N=l.pop()),N=d.symbols_[N]||N),N}f(Qe,"lex");for(var B,P,L,Ie,G={},pe,v,Xe,Ae;;){if(P=p[p.length-1],this.defaultActions[P]?L=this.defaultActions[P]:((B===null||typeof B>"u")&&(B=Qe()),L=ee[P]&&ee[P][B]),typeof L>"u"||!L.length||!L[0]){var Oe="";Ae=[];for(pe in ee[P])this.terminals_[pe]&&pe>Ze&&Ae.push("'"+this.terminals_[pe]+"'");D.showPosition?Oe="Parse error on line "+(de+1)+`:
1
+ import{g as st}from"./XLA3sRO4.js";import{g as it}from"./Crp_evpb.js";import{s as at}from"./DJoZU-z6.js";import{b as f,ay as we,X as F,a1 as rt,aP as nt,bh as Ve,aW as fe,a_ as lt,V as ut,aZ as ot,U as ct,b0 as ht,Y as dt,z as I,r as pt,$ as At,am as ft,aU as gt,ab as mt,x as Ct,aV as bt,aI as U}from"./DpLAbmZc.js";import{c as kt}from"./DRmOKL_2.js";import{aP as Et}from"./CLGBx41M.js";var Pe=(function(){var t=f(function(O,c,d,p){for(d=d||{},p=O.length;p--;d[O[p]]=c);return d},"o"),i=[1,18],a=[1,19],r=[1,20],n=[1,41],u=[1,26],h=[1,42],o=[1,24],g=[1,25],m=[1,32],_=[1,33],Y=[1,34],b=[1,45],me=[1,35],Ce=[1,36],be=[1,37],ke=[1,38],Ee=[1,27],Te=[1,28],ye=[1,29],De=[1,30],Fe=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],Be=[1,9],A=[1,8,9],te=[1,58],se=[1,59],ie=[1,60],ae=[1,61],re=[1,62],_e=[1,63],Se=[1,64],S=[1,8,9,41],Me=[1,77],R=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ne=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],le=[13,60,86,100,102,103],K=[13,60,73,74,86,100,102,103],Re=[13,60,68,69,70,71,72,86,100,102,103],ue=[1,103],W=[1,121],Q=[1,117],X=[1,113],j=[1,119],H=[1,114],q=[1,115],J=[1,116],Z=[1,118],$=[1,120],Ge=[22,50,60,61,82,86,87,88,89,90],Ue=[1,128],oe=[12,39],Ne=[1,8,9,39,41,44,46],ce=[1,8,9,22],ze=[1,153],Ye=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Le={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(c,d,p,l,C,e,ee){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:l.addMember(e[s-1],l.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:u,48:h,51:o,52:g,54:m,56:_,57:Y,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(Be,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:te,69:se,70:ie,71:ae,72:re,73:_e,74:Se}),{39:[1,65]},t(S,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Me,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(R,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(R,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ne,[2,133]),t(ne,[2,134]),t(ne,[2,135]),t(ne,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(Be,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:r,42:n,46:u,48:h,51:o,52:g,54:m,56:_,57:Y,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:u,48:h,51:o,52:g,54:m,56:_,57:Y,60:b,62:me,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:te,69:se,70:ie,71:ae,72:re,73:_e,74:Se},t(A,[2,64]),{67:93,73:_e,74:Se},t(le,[2,83],{66:94,68:te,69:se,70:ie,71:ae,72:re}),t(K,[2,84]),t(K,[2,85]),t(K,[2,86]),t(K,[2,87]),t(K,[2,88]),t(Re,[2,89]),t(Re,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:h,54:m,56:_},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ue},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:W,50:Q,59:110,60:X,82:j,84:111,85:112,86:H,87:q,88:J,89:Z,90:$},{60:[1,122]},{13:Me,55:123},t(S,[2,72]),t(S,[2,138]),{22:W,50:Q,59:124,60:X,61:[1,125],82:j,84:111,85:112,86:H,87:q,88:J,89:Z,90:$},t(Ge,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(R,[2,16]),t(R,[2,17]),t(R,[2,18]),{11:127,12:Ue,39:[2,36]},t(oe,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(oe,[2,10]),t(Ne,[2,55],{11:131,12:Ue}),t(Be,[2,7]),{9:[1,132]},t(ce,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(le,[2,82],{66:136,68:te,69:se,70:ie,71:ae,72:re}),t(le,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:h,54:m,56:_},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(S,[2,48],{39:[1,142]}),{41:[1,143]},t(S,[2,50]),{41:[2,61],45:144,51:ue},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:ze}),t(Ye,[2,107],{85:154,22:W,50:Q,60:X,82:j,86:H,87:q,88:J,89:Z,90:$}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(S,[2,71]),t(A,[2,73],{61:ze}),{60:[1,155]},t(R,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(oe,[2,12]),t(Ne,[2,56]),{1:[2,4]},t(ce,[2,69]),t(ce,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(le,[2,80]),t(S,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:h,54:m,56:_},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:h,54:m,56:_},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:h,54:m,56:_},{45:163,51:ue},t(S,[2,49]),{41:[2,62]},t(S,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:W,50:Q,60:X,82:j,84:169,85:112,86:H,87:q,88:J,89:Z,90:$},t(x,[2,110]),t(Ge,[2,75]),{14:[1,170]},t(oe,[2,11]),t(ce,[2,70]),t(S,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ue},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(Ye,[2,108],{85:154,22:W,50:Q,60:X,82:j,86:H,87:q,88:J,89:Z,90:$}),t(Ne,[2,8]),t(S,[2,51]),{41:[1,175]},t(S,[2,54]),t(A,[2,104]),t(S,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(c,d){if(d.recoverable)this.trace(c);else{var p=new Error(c);throw p.hash=d,p}},"parseError"),parse:f(function(c){var d=this,p=[0],l=[],C=[null],e=[],ee=this.table,s="",de=0,Ke=0,Ze=2,We=1,$e=e.slice.call(arguments,1),D=Object.create(this.lexer),V={yy:{}};for(var xe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xe)&&(V.yy[xe]=this.yy[xe]);D.setInput(c,V.yy),V.yy.lexer=D,V.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var ve=D.yylloc;e.push(ve);var et=D.options&&D.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tt(N){p.length=p.length-2*N,C.length=C.length-N,e.length=e.length-N}f(tt,"popStack");function Qe(){var N;return N=l.pop()||D.lex()||We,typeof N!="number"&&(N instanceof Array&&(l=N,N=l.pop()),N=d.symbols_[N]||N),N}f(Qe,"lex");for(var B,P,L,Ie,G={},pe,v,Xe,Ae;;){if(P=p[p.length-1],this.defaultActions[P]?L=this.defaultActions[P]:((B===null||typeof B>"u")&&(B=Qe()),L=ee[P]&&ee[P][B]),typeof L>"u"||!L.length||!L[0]){var Oe="";Ae=[];for(pe in ee[P])this.terminals_[pe]&&pe>Ze&&Ae.push("'"+this.terminals_[pe]+"'");D.showPosition?Oe="Parse error on line "+(de+1)+`:
2
2
  `+D.showPosition()+`
3
3
  Expecting `+Ae.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Oe="Parse error on line "+(de+1)+": Unexpected "+(B==We?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Oe,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:ve,expected:Ae})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+B);switch(L[0]){case 1:p.push(B),C.push(D.yytext),e.push(D.yylloc),p.push(L[1]),B=null,Ke=D.yyleng,s=D.yytext,de=D.yylineno,ve=D.yylloc;break;case 2:if(v=this.productions_[L[1]][1],G.$=C[C.length-v],G._$={first_line:e[e.length-(v||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(v||1)].first_column,last_column:e[e.length-1].last_column},et&&(G._$.range=[e[e.length-(v||1)].range[0],e[e.length-1].range[1]]),Ie=this.performAction.apply(G,[s,Ke,de,V.yy,L[1],C,e].concat($e)),typeof Ie<"u")return Ie;v&&(p=p.slice(0,-1*v*2),C=C.slice(0,-1*v),e=e.slice(0,-1*v)),p.push(this.productions_[L[1]][0]),C.push(G.$),e.push(G._$),Xe=ee[p[p.length-2]][p[p.length-1]],p.push(Xe);break;case 3:return!0}}return!0},"parse")},Je=(function(){var O={EOF:1,parseError:f(function(d,p){if(this.yy.parser)this.yy.parser.parseError(d,p);else throw new Error(d)},"parseError"),setInput:f(function(c,d){return this.yy=d||this.yy||{},this._input=c,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:f(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var d=c.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:f(function(c){var d=c.length,p=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var l=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),p.length-1&&(this.yylineno-=p.length-1);var C=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:p?(p.length===l.length?this.yylloc.first_column:0)+l[l.length-p.length].length-p[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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:f(function(c){this.unput(this.match.slice(c))},"less"),pastInput:f(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var c=this.pastInput(),d=new Array(c.length+1).join("-");return c+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{t as Ye,br as h,a_ as M,bz as Ze,b as $e,bt as nt,bp as k,bv as je}from"./Cv-W__h8.js";import{bo as st,bs as et,a7 as L,ay as y,aD as e,bS as U,W as c,a5 as Pe,bA as De,bH as j,bl as _e,b_ as oe,bO as de,bn as tt,bf as Ve,bV as Ee,aA as v,c9 as w,aB as H,be as it,b$ as lt,bj as dt,cd as ct,ca as Xe,bk as ut}from"./DYhIMPy1.js";import{i as G}from"./CEpchTPD.js";import{Ir as Le,mT as pt,uv as ft}from"./DBkMUdAo.js";import{b8 as ht}from"./C3yAChji.js";import{cn as vt}from"./B10dK85Q.js";import{c as gt}from"./ChTqQfQN.js";import{i as Ue,t as He}from"./H2jLkRRS.js";import{w as _t}from"./GdlMbZRO.js";import{d as mt}from"./B0Z-1lwJ.js";import{F as Re,as as bt,at as kt,cQ as Je,aV as qe,bc as wt,ak as yt,aj as At,cN as Ge}from"./BKpkoMuv.js";import{k as K,w as Ft}from"./DTDbZc--.js";import{n as Wt,u as Ne,v as xe,g as Te,j as Ct}from"./DPvDLGgX.js";import{s as xt}from"./ClsZrb8B.js";import{f as It,ai as Pt,aX as Dt}from"./BePtUMMB.js";import"./CgCdkhNg.js";import{c as Q}from"./D4os-974.js";import{a as Mt,r as Et}from"./BQYfutOx.js";import{M as Ot,t as Be}from"./2_iuLgF6.js";import{l as Ke,o as St,n as Rt,R as Nt,m as Tt,k as Bt,g as zt,i as jt}from"./D2pEu7en.js";import{m as ze}from"./BvDMLNjQ.js";var Vt=H('<img alt="" class="size-4"/>'),Xt=H('<span class="min-w-0 flex-1 text-left"><span class="block truncate"> </span> <span class="block text-muted-foreground" aria-hidden="true" data-menu-action-reason=""> </span></span>'),Lt=H("<span> </span>"),Ut=H('<span data-menu-action-detail=""> </span>'),Ht=H('<span aria-hidden="true"><!></span>'),Qe=H("<!> <!> <!>",1),Jt=H('<div class="my-1 h-px bg-border" role="separator"></div>'),Me=H("<!> <!>",1),qt=H('<!> <p data-menu-action-note=""> </p>',1),Gt=H('<span class="flex size-4 shrink-0 items-center justify-center" aria-hidden="true"><!></span> <!> <!>',1),Kt=H('<p data-menu-action-note=""> </p>'),Qt=H('<div class="pl-4"><!> <!></div>'),Yt=H('<span class="sr-only"> </span>');function me(be,d){const ke=st();if(new.target)return Ye({component:me,...be});et(d,!0);const Ie=(p,r=Ve)=>{var O=L(),S=y(O);{var V=W=>{const x=w(()=>Mt(r().editor));var X=L(),m=y(X);{var f=s=>{var i=Vt();oe(()=>Ne(i,"src",`data:image/png;base64,${r().editor.iconBase64??""}`)),c(s,i)},o=s=>{var i=L(),b=y(i);Q(b,()=>e(x),(T,ae)=>{ae(T,{size:16})}),c(s,i)},N=s=>{{let i=w(()=>Et(r().editor.category));Re(s,{get icon(){return e(i)},size:16})}};M(m,s=>{r().editor.iconBase64?s(f):e(x)?s(o,1):s(N,-1)})}c(W,X)},R=W=>{var x=L(),X=y(x);xt(X,()=>r().iconSnippet),c(W,x)},q=W=>{{let x=w(()=>r().variant==="destructive"?"text-current":"text-muted-foreground");Re(W,{get icon(){return r().icon},get weight(){return J()},size:16,get class(){return e(x)}})}};M(S,W=>{r().editor?W(V):r().iconSnippet?W(R,1):r().icon&&W(q,2)})}c(p,O)},ne=(p,r=Ve)=>{var O=Qe(),S=y(O);{var V=m=>{var f=Xt(),o=Pe(f),N=_e(o,!0);Te(o,(b,T)=>Be?.(b,T),()=>r().label);var s=U(o,2),i=_e(s,!0);De(f),oe(()=>{de(N,r().label),de(i,r().disabledReason)}),c(m,f)},R=m=>{var f=Lt(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().label),oe(()=>{xe(f,1,`min-w-0 truncate text-left ${r().detail?"flex-[1_0_auto]":"flex-1"}`),de(o,r().label)}),c(m,f)};M(S,m=>{r().disabledReason?m(V):m(R,-1)})}var q=U(S,2);{var W=m=>{var f=Ut(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().detail),oe(()=>{xe(f,1,`ml-4 min-w-0 truncate ${(r().detailTone==="danger"?"text-danger":ze)??""}`),de(o,r().detail)}),c(m,f)};M(q,m=>{r().detail&&m(W)})}var x=U(q,2);{var X=m=>{var f=Ht(),o=Pe(f);Pt(o,{children:(N,s)=>{it();var i=lt();oe(b=>de(i,b),[()=>Dt(r().shortcut)]),c(N,i)},$$slots:{default:!0}}),De(f),oe(()=>xe(f,1,Ct(E()?"ml-4 flex h-lh shrink-0 items-center":"ml-4"))),c(m,f)};M(x,m=>{r().shortcut&&m(X)})}c(p,O)};let we=h(d,"actions",7),E=h(d,"menu",7),J=h(d,"iconWeight",7),u=h(d,"onClose",7),A=h(d,"selection",7),F=Ee(null);function Y(p){p.disabled||p.disabledReason!==void 0||(p.onClick(),u()?.())}var ce={get actions(){return we()},set actions(p){we(p),v()},get menu(){return E()},set menu(p){E(p),v()},get iconWeight(){return J()},set iconWeight(p){J(p),v()},get onClose(){return u()},set onClose(p){u(p),v()},get selection(){return A()},set selection(p){A(p),v()},$set:Ze,$on:(p,r)=>$e(d,p,r)},se=L(),ie=y(se);return Wt(ie,17,we,p=>p.id,(p,r)=>{const O=i=>{Ie(i,()=>e(r))},S=w(()=>!!(e(r).editor||e(r).iconSnippet||e(r).icon)),V=w(()=>e(r).disabled||e(r).disabledReason!==void 0),R=w(()=>e(r).disabledReason?`${ke}-${e(r).id}-reason`:void 0);var q=Qe(),W=y(q);{var x=i=>{var b=L(),T=y(b);{var ae=a=>{var n=L(),g=y(n);Q(g,()=>Ke,(C,P)=>{P(C,{})}),c(a,n)},ue=a=>{var n=Jt();c(a,n)};M(T,a=>{E()?a(ae):a(ue,-1)})}c(i,b)};M(W,i=>{e(r).dividerBefore&&i(x)})}var X=U(W,2);{var m=i=>{var b=L(),T=y(b);{var ae=g=>{var C=L(),P=y(C);Q(P,()=>Tt,(I,D)=>{D(I,{children:(B,Z)=>{var $=Me(),pe=y($);{let te=w(()=>e(S)?O:void 0);Q(pe,()=>St,(fe,he)=>{he(fe,{get leading(){return e(te)},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},get"data-action-id"(){return e(r).id},children:(ve,ye)=>{ne(ve,()=>e(r))},$$slots:{default:!0}})})}var ee=U(pe,2);{let te=w(()=>e(r).note?`${ke}-${e(r).id}-note`:void 0);Q(ee,()=>Rt,(fe,he)=>{he(fe,{class:"w-60",get"aria-describedby"(){return e(te)},children:(ve,ye)=>{var t=Me(),l=y(t);{var _=re=>{var Ae=Me(),Fe=y(Ae);{let Ce=w(()=>e(r).submenu.find(ge=>ge.checked)?.id??"");Q(Fe,()=>Nt,(ge,Se)=>{Se(ge,{get value(){return e(Ce)},get"aria-label"(){return e(r).label},children:(rt,$t)=>{{let at=w(()=>e(r).submenu.filter(ot=>ot.checked!==void 0));me(rt,{get actions(){return e(at)},selection:"single",get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})}},$$slots:{default:!0}})})}var We=U(Fe,2);{let Ce=w(()=>e(r).submenu.filter(ge=>ge.checked===void 0));me(We,{get actions(){return e(Ce)},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})}c(re,Ae)},z=re=>{me(re,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})};M(l,re=>{e(r).selection==="single"?re(_):re(z,-1)})}var le=U(l,2);{var Oe=re=>{var Ae=qt(),Fe=y(Ae);Q(Fe,()=>Ke,(ge,Se)=>{Se(ge,{})});var We=U(Fe,2),Ce=_e(We,!0);oe(()=>{Ne(We,"id",`${ke}-${e(r).id}-note`),xe(We,1,`type-caption px-2 py-1 ${ze}`),de(Ce,e(r).note)}),c(re,Ae)};M(le,re=>{e(r).note&&re(Oe)})}c(ve,t)},$$slots:{default:!0}})})}c(B,$)},$$slots:{default:!0}})}),c(g,C)},ue=g=>{var C=L(),P=y(C);{let I=w(()=>e(S)?O:void 0);Q(P,()=>Bt,(D,B)=>{B(D,{get leading(){return e(I)},get value(){return e(r).id},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},a=g=>{var C=L(),P=y(C);{let I=w(()=>e(S)?O:void 0);Q(P,()=>zt,(D,B)=>{B(D,{get leading(){return e(I)},get checked(){return e(r).checked},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},n=g=>{var C=L(),P=y(C);{let I=w(()=>e(S)?O:void 0),D=w(()=>e(r).variant==="destructive");Q(P,()=>jt,(B,Z)=>{Z(B,{get leading(){return e(I)},get destructive(){return e(D)},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:($,pe)=>{ne($,()=>e(r))},$$slots:{default:!0}})})}c(g,C)};M(T,g=>{e(r).submenu?g(ae):A()==="single"&&e(r).checked!==void 0?g(ue,1):e(r).checked!==void 0?g(a,2):g(n,-1)})}c(i,b)},f=i=>{me(i,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})},o=i=>{var b=Me(),T=y(b);{let a=w(()=>e(r).variant==="destructive"?"text-danger hover:text-danger":""),n=w(()=>e(r).submenu?e(F)===e(r).id:void 0);It(T,{variant:"ghost",size:"sm",get class(){return`w-full justify-start gap-2 ${e(a)??""}`},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},get"aria-expanded"(){return e(n)},onclick:()=>e(r).submenu?j(F,e(F)===e(r).id?null:e(r).id,!0):Y(e(r)),children:(g,C)=>{var P=Gt(),I=y(P),D=Pe(I);Ie(D,()=>e(r)),De(I);var B=U(I,2);ne(B,()=>e(r));var Z=U(B,2);{var $=ee=>{{let te=w(()=>e(F)===e(r).id?bt:kt);Re(ee,{get icon(){return e(te)},size:12})}},pe=ee=>{var te=L(),fe=y(te);{let he=w(()=>e(r).checked?"checked":"empty");Q(fe,()=>Ot,(ve,ye)=>{ye(ve,{get state(){return e(he)}})})}c(ee,te)};M(Z,ee=>{e(r).submenu?ee($):e(r).checked!==void 0&&ee(pe,1)})}c(g,P)},$$slots:{default:!0}})}var ae=U(T,2);{var ue=a=>{var n=Qt(),g=Pe(n);me(g,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}});var C=U(g,2);{var P=I=>{var D=Kt(),B=_e(D,!0);oe(()=>{xe(D,1,`type-caption px-2 py-1 ${ze}`),de(B,e(r).note)}),c(I,D)};M(C,I=>{e(r).note&&I(P)})}De(n),c(a,n)};M(ae,a=>{e(r).submenu&&e(F)===e(r).id&&a(ue)})}c(i,b)};M(X,i=>{E()?i(m):e(r).id==="open-in"&&e(r).submenu?i(f,1):i(o,-1)})}var N=U(X,2);{var s=i=>{var b=Yt(),T=_e(b,!0);oe(()=>{Ne(b,"id",e(R)),de(T,e(r).disabledReason)}),c(i,b)};M(N,i=>{e(r).disabledReason&&i(s)})}c(p,q)}),c(be,se),tt(ce)}function Zt(be,d){if(new.target)return Ye({component:Zt,...be});et(d,!0);const ke=()=>je(T,"$installedEditors$",ne),Ie=()=>je(ue,"$isWorkspaceHostLocal$",ne),[ne,we]=nt();let E=h(d,"layout",7,"list"),J=h(d,"iconWeight",7),u=h(d,"filePath",7,""),A=h(d,"workspaceId",7,""),F=h(d,"isDirectory",7,!0),Y=h(d,"onDelete",7,void 0),ce=h(d,"onArchive",7,void 0),se=h(d,"onUnarchive",7,void 0),ie=h(d,"isArchived",7,!1),p=h(d,"onClose",7,void 0),r=h(d,"showDeleteOption",7,!0),O=h(d,"showArchiveOption",7,!1),S=h(d,"showPathCopy",7,!0),V=h(d,"showFileNameCopy",7,!1),R=h(d,"showFileActions",7,!0),q=h(d,"workspaceFolderPath",7,""),W=h(d,"isDiff",7,!1),x=h(d,"isWorkspaceRoot",7,!1),X=h(d,"additionalActions",23,()=>[]),m=h(d,"showDeleteFileOption",7,!1),f=h(d,"onFileDeleted",7,void 0);const o=gt("WorkspaceActionsMenu");let N=!1;dt(()=>{N=!0});function s(){N||p()?.()}const i=_t("externalEditors"),b=ct(A());Xe(()=>{b.set(A())});const T=ht(b),ae=w(ke),ue=vt(b);let a=Ee(""),n=Ee(""),g=Ee(!1);ut(()=>{Le.dispatch(pt())}),Xe(()=>{u()&&A()?G("workspace:get",{id:A()}).then(t=>{if(t&&t.success&&t.data){const l=t.data,_=l.worktreePath||l.repositoryPath||l.path,z=q()==="__WORKSPACE_ROOT__"?_:q()||_;if(z){const le=z.replace(/\\/g,"/");x()?j(a,le,!0):Ue(u())?j(a,u().replace(/\\/g,"/"),!0):j(a,`${le}/${u()}`.replace(/\/+/g,"/"),!0),j(n,le,!0),o.info("[WorkspaceActionsMenu] Resolved file path:",{filePath:u(),workspacePath:z,resolvedPath:e(a)})}else j(a,u()),j(n,""),l.status!=="archived"&&l.status!=="deleted"&&o.warn("[WorkspaceActionsMenu] No workspace path found:",l)}else j(a,u()),j(n,""),t?.error&&!t.error.includes("not found")&&o.warn("[WorkspaceActionsMenu] Workspace not available:",t)}).catch(t=>{j(a,u()),j(n,""),t?.message?.includes("not found")||o.error("[WorkspaceActionsMenu] Failed to resolve path:",t)}):(j(a,u()),o.info("[WorkspaceActionsMenu] Using filePath directly:",{filePath:u(),workspaceId:A()}))});async function C(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for VSCode");return}try{if(W()&&!F()){o.info("[WorkspaceActionsMenu] Opening diff in VSCode:",{resolvedPath:e(a)}),await G("vscode:open-git-diff",{filePath:e(a),workspacePath:e(n)||void 0}),s();return}let t=e(a);if(e(n))!F()&&!x()?t={folder:e(n),file:e(a)}:t=e(n);else if(!F()){const l=e(a).includes("\\")?"\\":"/",_=e(a).split(l);_.length>1&&(t={folder:_.slice(0,-1).join(l),file:e(a)})}await G("vscode:open",t),s()}catch(t){o.error("Failed to open in VSCode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"VS Code"}))}}async function P(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for JetBrains");return}try{let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t=e(n)),await G("jetbrains:open",t),s()}catch(t){o.error("Failed to open in JetBrains:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"JetBrains"}))}}async function I(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for Xcode");return}try{if(A()&&e(n)){Le.dispatch(ft(A(),e(n),F()?void 0:e(a))),s();return}let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t={folder:e(n)}),await G("xcode:open",t),s()}catch(t){o.error("Failed to open in Xcode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"Xcode"}))}}async function D(t){if(o.info("[WorkspaceActionsMenu] openInEditor called",{editorId:t.id,appName:t.appName,handlerType:t.handlerType,resolvedPath:e(a),isDirectory:F()}),!e(a)){o.warn("[WorkspaceActionsMenu] openInEditor: No resolved path, aborting");return}const l=F()?e(a):e(a).substring(0,e(a).lastIndexOf("/"));o.info(`[WorkspaceActionsMenu] openInEditor: targetPath=${l}, handlerType=${t.handlerType}`);try{switch(t.handlerType){case"finder":o.info("[WorkspaceActionsMenu] openInEditor: Invoking shell:showItemInFolder"),await G("shell:showItemInFolder",{path:l});break;case"vscode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInVSCode"),await C();return;case"jetbrains":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInJetBrains"),await P();return;case"xcode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInXcode"),await I();return;case"generic":default:{o.info(`[WorkspaceActionsMenu] openInEditor: Invoking external-editors:open for ${t.id}`);const _=await G("external-editors:open",{editorId:t.id,path:l});o.info("[WorkspaceActionsMenu] openInEditor: external-editors:open result",_);break}}s()}catch(_){o.error(`[WorkspaceActionsMenu] Failed to open in ${t.appName}:`,_),K.error(_ instanceof Error?_.message:k.ui_workspaceActions_openFailed_error({name:t.appName}))}}async function B(){if(!e(a)){o.warn("No resolved path for openWithOther");return}try{let t=e(a);F()&&e(n)&&(t=e(n));const l=await G("external-editors:open-with-other",{path:t});if(!l?.success){l?.error!=="No application selected"&&(o.error("Failed to open with other app:",l?.error),K.error(l?.error||k.ui_workspaceActions_openOtherFailed_error()));return}s()}catch(t){o.error("Failed to open with other app:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openOtherFailed_error())}}async function Z(){if(e(a))try{await navigator.clipboard.writeText(He(e(a))),s()}catch(t){o.error("Failed to copy path:",t)}}async function $(){if(u())try{let t=u().replace(/\\/g,"/");if(Ue(u())&&e(n)){const l=e(n).endsWith("/")?e(n):e(n)+"/";t.startsWith(l)&&(t=t.slice(l.length))}await navigator.clipboard.writeText(He(t)),s()}catch(t){o.error("Failed to copy workspace path:",t)}}async function pe(){if(u())try{const t=u().split(/[/\\]/).pop()||"";await navigator.clipboard.writeText(t),s()}catch(t){o.error("Failed to copy file name:",t)}}function ee(){Y()&&(Y()(),s())}async function te(){if(!(!A()||!e(a)||e(g))){j(g,!0);try{const t=u().split(/[/\\]/).pop()||"file",l=e(a);let _="";try{_=(await G("file:read",{path:l,workspaceId:A()}))?.data?.content??""}catch{}const z=await G("file:delete",{path:l,workspaceId:A()});if(z?.success){f()?.(),s();const le=K.warning(k.ui_workspaceActions_deletedFile_label({name:t}),Ft({duration:15e3,action:{label:k.ui_workspaceActions_undo_label(),onClick:async()=>{try{await G("file:write",{path:l,content:_,workspaceId:A()}),mt("file:changed",{workspaceId:A(),type:"create",filePath:l}),K.dismiss(le)}catch(Oe){o.error("[WorkspaceActionsMenu] Failed to restore file",Oe),K.error(k.ui_workspaceActions_restoreFileFailed_error())}}}}))}else K.error(k.ui_workspaceActions_deleteFileFailedDetail_error({error:z?.error||k.ui_workspaceActions_unknown_error()}))}catch(t){o.error("[WorkspaceActionsMenu] Error deleting file",t),K.error(k.ui_workspaceActions_deleteFileFailed_error())}finally{j(g,!1)}}}function fe(){ie()&&se()?(se()(),s()):!ie()&&ce()&&(ce()(),s())}const he=w(()=>{const t=[];R()&&(i&&Ie()&&t.push({id:"open-in",label:k.ui_openCombo_openInApp_tooltip(),icon:Je,onClick:()=>{},submenu:[...e(ae).map(_=>({id:`editor:${_.id}`,label:k.ui_workspaceActions_openIn_label({name:_.name}),editor:_,onClick:()=>{D(_)}})),{id:"choose-app",label:k.ui_workspaceActions_chooseApp_label(),icon:Je,onClick:()=>{B()}}]}),S()&&t.push({id:"copy-absolute-path",label:k.ui_workspaceActions_copyAbsolutePath_label(),icon:qe,disabled:!e(a),dividerBefore:t.length>0,onClick:()=>{Z()}}),S()&&!x()&&t.push({id:"copy-relative-path",label:k.ui_workspaceActions_copyRelativePath_label(),icon:qe,disabled:!u(),onClick:()=>{$()}}),V()&&!F()&&t.push({id:"copy-file-name",label:k.ui_workspaceActions_copyFileName_label(),icon:wt,disabled:!u(),onClick:()=>{pe()}}));const l=_=>_.map(z=>({...z,submenu:z.submenu?l(z.submenu):void 0,onClick:()=>{z.onClick(),s()}}));return t.push(...l(X())),O()&&(ce()||se())&&t.push({id:"archive-workspace",label:ie()?k.ui_workspaceActions_unarchiveSpace_label():k.ui_workspaceActions_archiveSpace_label(),icon:ie()?yt:At,dividerBefore:t.length>0,onClick:fe}),r()&&Y()&&t.push({id:"delete-workspace",label:k.ui_workspaceActions_deleteSpace_label(),icon:Ge,variant:"destructive",dividerBefore:t.length>0&&t.at(-1)?.id!=="archive-workspace",onClick:ee}),m()&&!F()&&t.push({id:"delete-file",label:k.ui_workspaceActions_deleteFile_label(),icon:Ge,variant:"destructive",disabled:e(g)||!e(a)||!A(),dividerBefore:t.length>0,onClick:()=>{te()}}),t});var ve={get layout(){return E()},set layout(t="list"){E(t),v()},get iconWeight(){return J()},set iconWeight(t){J(t),v()},get filePath(){return u()},set filePath(t=""){u(t),v()},get workspaceId(){return A()},set workspaceId(t=""){A(t),v()},get isDirectory(){return F()},set isDirectory(t=!0){F(t),v()},get onDelete(){return Y()},set onDelete(t=void 0){Y(t),v()},get onArchive(){return ce()},set onArchive(t=void 0){ce(t),v()},get onUnarchive(){return se()},set onUnarchive(t=void 0){se(t),v()},get isArchived(){return ie()},set isArchived(t=!1){ie(t),v()},get onClose(){return p()},set onClose(t=void 0){p(t),v()},get showDeleteOption(){return r()},set showDeleteOption(t=!0){r(t),v()},get showArchiveOption(){return O()},set showArchiveOption(t=!1){O(t),v()},get showPathCopy(){return S()},set showPathCopy(t=!0){S(t),v()},get showFileNameCopy(){return V()},set showFileNameCopy(t=!1){V(t),v()},get showFileActions(){return R()},set showFileActions(t=!0){R(t),v()},get workspaceFolderPath(){return q()},set workspaceFolderPath(t=""){q(t),v()},get isDiff(){return W()},set isDiff(t=!1){W(t),v()},get isWorkspaceRoot(){return x()},set isWorkspaceRoot(t=!1){x(t),v()},get additionalActions(){return X()},set additionalActions(t=[]){X(t),v()},get showDeleteFileOption(){return m()},set showDeleteFileOption(t=!1){m(t),v()},get onFileDeleted(){return f()},set onFileDeleted(t=void 0){f(t),v()},$set:Ze,$on:(t,l)=>$e(d,t,l)};{let t=w(()=>E()!=="list");me(be,{get actions(){return e(he)},get menu(){return e(t)},get iconWeight(){return J()}})}var ye=tt(ve);return we(),ye}export{Zt as default};
1
+ import{t as Ye,br as h,a_ as M,bz as Ze,b as $e,bt as nt,bp as k,bv as je}from"./Cv-W__h8.js";import{bo as st,bs as et,a7 as L,ay as y,aD as e,bS as U,W as c,a5 as Pe,bA as De,bH as j,bl as _e,b_ as oe,bO as de,bn as tt,bf as Ve,bV as Ee,aA as v,c9 as w,aB as H,be as it,b$ as lt,bj as dt,cd as ct,ca as Xe,bk as ut}from"./DYhIMPy1.js";import{i as G}from"./CEpchTPD.js";import{Ir as Le,mT as pt,uv as ft}from"./DBkMUdAo.js";import{b8 as ht}from"./Px5_hntL.js";import{cn as vt}from"./B10dK85Q.js";import{c as gt}from"./ChTqQfQN.js";import{i as Ue,t as He}from"./H2jLkRRS.js";import{w as _t}from"./GdlMbZRO.js";import{d as mt}from"./B0Z-1lwJ.js";import{F as Re,as as bt,at as kt,cQ as Je,aV as qe,bc as wt,ak as yt,aj as At,cN as Ge}from"./BKpkoMuv.js";import{k as K,w as Ft}from"./DTDbZc--.js";import{n as Wt,u as Ne,v as xe,g as Te,j as Ct}from"./DPvDLGgX.js";import{s as xt}from"./ClsZrb8B.js";import{f as It,ai as Pt,aX as Dt}from"./BePtUMMB.js";import"./CgCdkhNg.js";import{c as Q}from"./D4os-974.js";import{a as Mt,r as Et}from"./hVRjl1Hx.js";import{M as Ot,t as Be}from"./2_iuLgF6.js";import{l as Ke,o as St,n as Rt,R as Nt,m as Tt,k as Bt,g as zt,i as jt}from"./D2pEu7en.js";import{m as ze}from"./BvDMLNjQ.js";var Vt=H('<img alt="" class="size-4"/>'),Xt=H('<span class="min-w-0 flex-1 text-left"><span class="block truncate"> </span> <span class="block text-muted-foreground" aria-hidden="true" data-menu-action-reason=""> </span></span>'),Lt=H("<span> </span>"),Ut=H('<span data-menu-action-detail=""> </span>'),Ht=H('<span aria-hidden="true"><!></span>'),Qe=H("<!> <!> <!>",1),Jt=H('<div class="my-1 h-px bg-border" role="separator"></div>'),Me=H("<!> <!>",1),qt=H('<!> <p data-menu-action-note=""> </p>',1),Gt=H('<span class="flex size-4 shrink-0 items-center justify-center" aria-hidden="true"><!></span> <!> <!>',1),Kt=H('<p data-menu-action-note=""> </p>'),Qt=H('<div class="pl-4"><!> <!></div>'),Yt=H('<span class="sr-only"> </span>');function me(be,d){const ke=st();if(new.target)return Ye({component:me,...be});et(d,!0);const Ie=(p,r=Ve)=>{var O=L(),S=y(O);{var V=W=>{const x=w(()=>Mt(r().editor));var X=L(),m=y(X);{var f=s=>{var i=Vt();oe(()=>Ne(i,"src",`data:image/png;base64,${r().editor.iconBase64??""}`)),c(s,i)},o=s=>{var i=L(),b=y(i);Q(b,()=>e(x),(T,ae)=>{ae(T,{size:16})}),c(s,i)},N=s=>{{let i=w(()=>Et(r().editor.category));Re(s,{get icon(){return e(i)},size:16})}};M(m,s=>{r().editor.iconBase64?s(f):e(x)?s(o,1):s(N,-1)})}c(W,X)},R=W=>{var x=L(),X=y(x);xt(X,()=>r().iconSnippet),c(W,x)},q=W=>{{let x=w(()=>r().variant==="destructive"?"text-current":"text-muted-foreground");Re(W,{get icon(){return r().icon},get weight(){return J()},size:16,get class(){return e(x)}})}};M(S,W=>{r().editor?W(V):r().iconSnippet?W(R,1):r().icon&&W(q,2)})}c(p,O)},ne=(p,r=Ve)=>{var O=Qe(),S=y(O);{var V=m=>{var f=Xt(),o=Pe(f),N=_e(o,!0);Te(o,(b,T)=>Be?.(b,T),()=>r().label);var s=U(o,2),i=_e(s,!0);De(f),oe(()=>{de(N,r().label),de(i,r().disabledReason)}),c(m,f)},R=m=>{var f=Lt(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().label),oe(()=>{xe(f,1,`min-w-0 truncate text-left ${r().detail?"flex-[1_0_auto]":"flex-1"}`),de(o,r().label)}),c(m,f)};M(S,m=>{r().disabledReason?m(V):m(R,-1)})}var q=U(S,2);{var W=m=>{var f=Ut(),o=_e(f,!0);Te(f,(N,s)=>Be?.(N,s),()=>r().detail),oe(()=>{xe(f,1,`ml-4 min-w-0 truncate ${(r().detailTone==="danger"?"text-danger":ze)??""}`),de(o,r().detail)}),c(m,f)};M(q,m=>{r().detail&&m(W)})}var x=U(q,2);{var X=m=>{var f=Ht(),o=Pe(f);Pt(o,{children:(N,s)=>{it();var i=lt();oe(b=>de(i,b),[()=>Dt(r().shortcut)]),c(N,i)},$$slots:{default:!0}}),De(f),oe(()=>xe(f,1,Ct(E()?"ml-4 flex h-lh shrink-0 items-center":"ml-4"))),c(m,f)};M(x,m=>{r().shortcut&&m(X)})}c(p,O)};let we=h(d,"actions",7),E=h(d,"menu",7),J=h(d,"iconWeight",7),u=h(d,"onClose",7),A=h(d,"selection",7),F=Ee(null);function Y(p){p.disabled||p.disabledReason!==void 0||(p.onClick(),u()?.())}var ce={get actions(){return we()},set actions(p){we(p),v()},get menu(){return E()},set menu(p){E(p),v()},get iconWeight(){return J()},set iconWeight(p){J(p),v()},get onClose(){return u()},set onClose(p){u(p),v()},get selection(){return A()},set selection(p){A(p),v()},$set:Ze,$on:(p,r)=>$e(d,p,r)},se=L(),ie=y(se);return Wt(ie,17,we,p=>p.id,(p,r)=>{const O=i=>{Ie(i,()=>e(r))},S=w(()=>!!(e(r).editor||e(r).iconSnippet||e(r).icon)),V=w(()=>e(r).disabled||e(r).disabledReason!==void 0),R=w(()=>e(r).disabledReason?`${ke}-${e(r).id}-reason`:void 0);var q=Qe(),W=y(q);{var x=i=>{var b=L(),T=y(b);{var ae=a=>{var n=L(),g=y(n);Q(g,()=>Ke,(C,P)=>{P(C,{})}),c(a,n)},ue=a=>{var n=Jt();c(a,n)};M(T,a=>{E()?a(ae):a(ue,-1)})}c(i,b)};M(W,i=>{e(r).dividerBefore&&i(x)})}var X=U(W,2);{var m=i=>{var b=L(),T=y(b);{var ae=g=>{var C=L(),P=y(C);Q(P,()=>Tt,(I,D)=>{D(I,{children:(B,Z)=>{var $=Me(),pe=y($);{let te=w(()=>e(S)?O:void 0);Q(pe,()=>St,(fe,he)=>{he(fe,{get leading(){return e(te)},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},get"data-action-id"(){return e(r).id},children:(ve,ye)=>{ne(ve,()=>e(r))},$$slots:{default:!0}})})}var ee=U(pe,2);{let te=w(()=>e(r).note?`${ke}-${e(r).id}-note`:void 0);Q(ee,()=>Rt,(fe,he)=>{he(fe,{class:"w-60",get"aria-describedby"(){return e(te)},children:(ve,ye)=>{var t=Me(),l=y(t);{var _=re=>{var Ae=Me(),Fe=y(Ae);{let Ce=w(()=>e(r).submenu.find(ge=>ge.checked)?.id??"");Q(Fe,()=>Nt,(ge,Se)=>{Se(ge,{get value(){return e(Ce)},get"aria-label"(){return e(r).label},children:(rt,$t)=>{{let at=w(()=>e(r).submenu.filter(ot=>ot.checked!==void 0));me(rt,{get actions(){return e(at)},selection:"single",get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})}},$$slots:{default:!0}})})}var We=U(Fe,2);{let Ce=w(()=>e(r).submenu.filter(ge=>ge.checked===void 0));me(We,{get actions(){return e(Ce)},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})}c(re,Ae)},z=re=>{me(re,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})};M(l,re=>{e(r).selection==="single"?re(_):re(z,-1)})}var le=U(l,2);{var Oe=re=>{var Ae=qt(),Fe=y(Ae);Q(Fe,()=>Ke,(ge,Se)=>{Se(ge,{})});var We=U(Fe,2),Ce=_e(We,!0);oe(()=>{Ne(We,"id",`${ke}-${e(r).id}-note`),xe(We,1,`type-caption px-2 py-1 ${ze}`),de(Ce,e(r).note)}),c(re,Ae)};M(le,re=>{e(r).note&&re(Oe)})}c(ve,t)},$$slots:{default:!0}})})}c(B,$)},$$slots:{default:!0}})}),c(g,C)},ue=g=>{var C=L(),P=y(C);{let I=w(()=>e(S)?O:void 0);Q(P,()=>Bt,(D,B)=>{B(D,{get leading(){return e(I)},get value(){return e(r).id},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},a=g=>{var C=L(),P=y(C);{let I=w(()=>e(S)?O:void 0);Q(P,()=>zt,(D,B)=>{B(D,{get leading(){return e(I)},get checked(){return e(r).checked},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},closeOnSelect:!0,onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:(Z,$)=>{ne(Z,()=>e(r))},$$slots:{default:!0}})})}c(g,C)},n=g=>{var C=L(),P=y(C);{let I=w(()=>e(S)?O:void 0),D=w(()=>e(r).variant==="destructive");Q(P,()=>jt,(B,Z)=>{Z(B,{get leading(){return e(I)},get destructive(){return e(D)},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},onSelect:()=>Y(e(r)),get"data-action-id"(){return e(r).id},children:($,pe)=>{ne($,()=>e(r))},$$slots:{default:!0}})})}c(g,C)};M(T,g=>{e(r).submenu?g(ae):A()==="single"&&e(r).checked!==void 0?g(ue,1):e(r).checked!==void 0?g(a,2):g(n,-1)})}c(i,b)},f=i=>{me(i,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}})},o=i=>{var b=Me(),T=y(b);{let a=w(()=>e(r).variant==="destructive"?"text-danger hover:text-danger":""),n=w(()=>e(r).submenu?e(F)===e(r).id:void 0);It(T,{variant:"ghost",size:"sm",get class(){return`w-full justify-start gap-2 ${e(a)??""}`},get disabled(){return e(V)},get"aria-describedby"(){return e(R)},get"aria-expanded"(){return e(n)},onclick:()=>e(r).submenu?j(F,e(F)===e(r).id?null:e(r).id,!0):Y(e(r)),children:(g,C)=>{var P=Gt(),I=y(P),D=Pe(I);Ie(D,()=>e(r)),De(I);var B=U(I,2);ne(B,()=>e(r));var Z=U(B,2);{var $=ee=>{{let te=w(()=>e(F)===e(r).id?bt:kt);Re(ee,{get icon(){return e(te)},size:12})}},pe=ee=>{var te=L(),fe=y(te);{let he=w(()=>e(r).checked?"checked":"empty");Q(fe,()=>Ot,(ve,ye)=>{ye(ve,{get state(){return e(he)}})})}c(ee,te)};M(Z,ee=>{e(r).submenu?ee($):e(r).checked!==void 0&&ee(pe,1)})}c(g,P)},$$slots:{default:!0}})}var ae=U(T,2);{var ue=a=>{var n=Qt(),g=Pe(n);me(g,{get actions(){return e(r).submenu},get menu(){return E()},get iconWeight(){return J()},get onClose(){return u()}});var C=U(g,2);{var P=I=>{var D=Kt(),B=_e(D,!0);oe(()=>{xe(D,1,`type-caption px-2 py-1 ${ze}`),de(B,e(r).note)}),c(I,D)};M(C,I=>{e(r).note&&I(P)})}De(n),c(a,n)};M(ae,a=>{e(r).submenu&&e(F)===e(r).id&&a(ue)})}c(i,b)};M(X,i=>{E()?i(m):e(r).id==="open-in"&&e(r).submenu?i(f,1):i(o,-1)})}var N=U(X,2);{var s=i=>{var b=Yt(),T=_e(b,!0);oe(()=>{Ne(b,"id",e(R)),de(T,e(r).disabledReason)}),c(i,b)};M(N,i=>{e(r).disabledReason&&i(s)})}c(p,q)}),c(be,se),tt(ce)}function Zt(be,d){if(new.target)return Ye({component:Zt,...be});et(d,!0);const ke=()=>je(T,"$installedEditors$",ne),Ie=()=>je(ue,"$isWorkspaceHostLocal$",ne),[ne,we]=nt();let E=h(d,"layout",7,"list"),J=h(d,"iconWeight",7),u=h(d,"filePath",7,""),A=h(d,"workspaceId",7,""),F=h(d,"isDirectory",7,!0),Y=h(d,"onDelete",7,void 0),ce=h(d,"onArchive",7,void 0),se=h(d,"onUnarchive",7,void 0),ie=h(d,"isArchived",7,!1),p=h(d,"onClose",7,void 0),r=h(d,"showDeleteOption",7,!0),O=h(d,"showArchiveOption",7,!1),S=h(d,"showPathCopy",7,!0),V=h(d,"showFileNameCopy",7,!1),R=h(d,"showFileActions",7,!0),q=h(d,"workspaceFolderPath",7,""),W=h(d,"isDiff",7,!1),x=h(d,"isWorkspaceRoot",7,!1),X=h(d,"additionalActions",23,()=>[]),m=h(d,"showDeleteFileOption",7,!1),f=h(d,"onFileDeleted",7,void 0);const o=gt("WorkspaceActionsMenu");let N=!1;dt(()=>{N=!0});function s(){N||p()?.()}const i=_t("externalEditors"),b=ct(A());Xe(()=>{b.set(A())});const T=ht(b),ae=w(ke),ue=vt(b);let a=Ee(""),n=Ee(""),g=Ee(!1);ut(()=>{Le.dispatch(pt())}),Xe(()=>{u()&&A()?G("workspace:get",{id:A()}).then(t=>{if(t&&t.success&&t.data){const l=t.data,_=l.worktreePath||l.repositoryPath||l.path,z=q()==="__WORKSPACE_ROOT__"?_:q()||_;if(z){const le=z.replace(/\\/g,"/");x()?j(a,le,!0):Ue(u())?j(a,u().replace(/\\/g,"/"),!0):j(a,`${le}/${u()}`.replace(/\/+/g,"/"),!0),j(n,le,!0),o.info("[WorkspaceActionsMenu] Resolved file path:",{filePath:u(),workspacePath:z,resolvedPath:e(a)})}else j(a,u()),j(n,""),l.status!=="archived"&&l.status!=="deleted"&&o.warn("[WorkspaceActionsMenu] No workspace path found:",l)}else j(a,u()),j(n,""),t?.error&&!t.error.includes("not found")&&o.warn("[WorkspaceActionsMenu] Workspace not available:",t)}).catch(t=>{j(a,u()),j(n,""),t?.message?.includes("not found")||o.error("[WorkspaceActionsMenu] Failed to resolve path:",t)}):(j(a,u()),o.info("[WorkspaceActionsMenu] Using filePath directly:",{filePath:u(),workspaceId:A()}))});async function C(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for VSCode");return}try{if(W()&&!F()){o.info("[WorkspaceActionsMenu] Opening diff in VSCode:",{resolvedPath:e(a)}),await G("vscode:open-git-diff",{filePath:e(a),workspacePath:e(n)||void 0}),s();return}let t=e(a);if(e(n))!F()&&!x()?t={folder:e(n),file:e(a)}:t=e(n);else if(!F()){const l=e(a).includes("\\")?"\\":"/",_=e(a).split(l);_.length>1&&(t={folder:_.slice(0,-1).join(l),file:e(a)})}await G("vscode:open",t),s()}catch(t){o.error("Failed to open in VSCode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"VS Code"}))}}async function P(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for JetBrains");return}try{let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t=e(n)),await G("jetbrains:open",t),s()}catch(t){o.error("Failed to open in JetBrains:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"JetBrains"}))}}async function I(){if(!e(a)){o.warn("[WorkspaceActionsMenu] No resolved path for Xcode");return}try{if(A()&&e(n)){Le.dispatch(ft(A(),e(n),F()?void 0:e(a))),s();return}let t=e(a);e(n)&&!F()?t={folder:e(n),file:e(a)}:e(n)&&(t={folder:e(n)}),await G("xcode:open",t),s()}catch(t){o.error("Failed to open in Xcode:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openFailed_error({name:"Xcode"}))}}async function D(t){if(o.info("[WorkspaceActionsMenu] openInEditor called",{editorId:t.id,appName:t.appName,handlerType:t.handlerType,resolvedPath:e(a),isDirectory:F()}),!e(a)){o.warn("[WorkspaceActionsMenu] openInEditor: No resolved path, aborting");return}const l=F()?e(a):e(a).substring(0,e(a).lastIndexOf("/"));o.info(`[WorkspaceActionsMenu] openInEditor: targetPath=${l}, handlerType=${t.handlerType}`);try{switch(t.handlerType){case"finder":o.info("[WorkspaceActionsMenu] openInEditor: Invoking shell:showItemInFolder"),await G("shell:showItemInFolder",{path:l});break;case"vscode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInVSCode"),await C();return;case"jetbrains":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInJetBrains"),await P();return;case"xcode":o.info("[WorkspaceActionsMenu] openInEditor: Delegating to openInXcode"),await I();return;case"generic":default:{o.info(`[WorkspaceActionsMenu] openInEditor: Invoking external-editors:open for ${t.id}`);const _=await G("external-editors:open",{editorId:t.id,path:l});o.info("[WorkspaceActionsMenu] openInEditor: external-editors:open result",_);break}}s()}catch(_){o.error(`[WorkspaceActionsMenu] Failed to open in ${t.appName}:`,_),K.error(_ instanceof Error?_.message:k.ui_workspaceActions_openFailed_error({name:t.appName}))}}async function B(){if(!e(a)){o.warn("No resolved path for openWithOther");return}try{let t=e(a);F()&&e(n)&&(t=e(n));const l=await G("external-editors:open-with-other",{path:t});if(!l?.success){l?.error!=="No application selected"&&(o.error("Failed to open with other app:",l?.error),K.error(l?.error||k.ui_workspaceActions_openOtherFailed_error()));return}s()}catch(t){o.error("Failed to open with other app:",t),K.error(t instanceof Error?t.message:k.ui_workspaceActions_openOtherFailed_error())}}async function Z(){if(e(a))try{await navigator.clipboard.writeText(He(e(a))),s()}catch(t){o.error("Failed to copy path:",t)}}async function $(){if(u())try{let t=u().replace(/\\/g,"/");if(Ue(u())&&e(n)){const l=e(n).endsWith("/")?e(n):e(n)+"/";t.startsWith(l)&&(t=t.slice(l.length))}await navigator.clipboard.writeText(He(t)),s()}catch(t){o.error("Failed to copy workspace path:",t)}}async function pe(){if(u())try{const t=u().split(/[/\\]/).pop()||"";await navigator.clipboard.writeText(t),s()}catch(t){o.error("Failed to copy file name:",t)}}function ee(){Y()&&(Y()(),s())}async function te(){if(!(!A()||!e(a)||e(g))){j(g,!0);try{const t=u().split(/[/\\]/).pop()||"file",l=e(a);let _="";try{_=(await G("file:read",{path:l,workspaceId:A()}))?.data?.content??""}catch{}const z=await G("file:delete",{path:l,workspaceId:A()});if(z?.success){f()?.(),s();const le=K.warning(k.ui_workspaceActions_deletedFile_label({name:t}),Ft({duration:15e3,action:{label:k.ui_workspaceActions_undo_label(),onClick:async()=>{try{await G("file:write",{path:l,content:_,workspaceId:A()}),mt("file:changed",{workspaceId:A(),type:"create",filePath:l}),K.dismiss(le)}catch(Oe){o.error("[WorkspaceActionsMenu] Failed to restore file",Oe),K.error(k.ui_workspaceActions_restoreFileFailed_error())}}}}))}else K.error(k.ui_workspaceActions_deleteFileFailedDetail_error({error:z?.error||k.ui_workspaceActions_unknown_error()}))}catch(t){o.error("[WorkspaceActionsMenu] Error deleting file",t),K.error(k.ui_workspaceActions_deleteFileFailed_error())}finally{j(g,!1)}}}function fe(){ie()&&se()?(se()(),s()):!ie()&&ce()&&(ce()(),s())}const he=w(()=>{const t=[];R()&&(i&&Ie()&&t.push({id:"open-in",label:k.ui_openCombo_openInApp_tooltip(),icon:Je,onClick:()=>{},submenu:[...e(ae).map(_=>({id:`editor:${_.id}`,label:k.ui_workspaceActions_openIn_label({name:_.name}),editor:_,onClick:()=>{D(_)}})),{id:"choose-app",label:k.ui_workspaceActions_chooseApp_label(),icon:Je,onClick:()=>{B()}}]}),S()&&t.push({id:"copy-absolute-path",label:k.ui_workspaceActions_copyAbsolutePath_label(),icon:qe,disabled:!e(a),dividerBefore:t.length>0,onClick:()=>{Z()}}),S()&&!x()&&t.push({id:"copy-relative-path",label:k.ui_workspaceActions_copyRelativePath_label(),icon:qe,disabled:!u(),onClick:()=>{$()}}),V()&&!F()&&t.push({id:"copy-file-name",label:k.ui_workspaceActions_copyFileName_label(),icon:wt,disabled:!u(),onClick:()=>{pe()}}));const l=_=>_.map(z=>({...z,submenu:z.submenu?l(z.submenu):void 0,onClick:()=>{z.onClick(),s()}}));return t.push(...l(X())),O()&&(ce()||se())&&t.push({id:"archive-workspace",label:ie()?k.ui_workspaceActions_unarchiveSpace_label():k.ui_workspaceActions_archiveSpace_label(),icon:ie()?yt:At,dividerBefore:t.length>0,onClick:fe}),r()&&Y()&&t.push({id:"delete-workspace",label:k.ui_workspaceActions_deleteSpace_label(),icon:Ge,variant:"destructive",dividerBefore:t.length>0&&t.at(-1)?.id!=="archive-workspace",onClick:ee}),m()&&!F()&&t.push({id:"delete-file",label:k.ui_workspaceActions_deleteFile_label(),icon:Ge,variant:"destructive",disabled:e(g)||!e(a)||!A(),dividerBefore:t.length>0,onClick:()=>{te()}}),t});var ve={get layout(){return E()},set layout(t="list"){E(t),v()},get iconWeight(){return J()},set iconWeight(t){J(t),v()},get filePath(){return u()},set filePath(t=""){u(t),v()},get workspaceId(){return A()},set workspaceId(t=""){A(t),v()},get isDirectory(){return F()},set isDirectory(t=!0){F(t),v()},get onDelete(){return Y()},set onDelete(t=void 0){Y(t),v()},get onArchive(){return ce()},set onArchive(t=void 0){ce(t),v()},get onUnarchive(){return se()},set onUnarchive(t=void 0){se(t),v()},get isArchived(){return ie()},set isArchived(t=!1){ie(t),v()},get onClose(){return p()},set onClose(t=void 0){p(t),v()},get showDeleteOption(){return r()},set showDeleteOption(t=!0){r(t),v()},get showArchiveOption(){return O()},set showArchiveOption(t=!1){O(t),v()},get showPathCopy(){return S()},set showPathCopy(t=!0){S(t),v()},get showFileNameCopy(){return V()},set showFileNameCopy(t=!1){V(t),v()},get showFileActions(){return R()},set showFileActions(t=!0){R(t),v()},get workspaceFolderPath(){return q()},set workspaceFolderPath(t=""){q(t),v()},get isDiff(){return W()},set isDiff(t=!1){W(t),v()},get isWorkspaceRoot(){return x()},set isWorkspaceRoot(t=!1){x(t),v()},get additionalActions(){return X()},set additionalActions(t=[]){X(t),v()},get showDeleteFileOption(){return m()},set showDeleteFileOption(t=!1){m(t),v()},get onFileDeleted(){return f()},set onFileDeleted(t=void 0){f(t),v()},$set:Ze,$on:(t,l)=>$e(d,t,l)};{let t=w(()=>E()!=="list");me(be,{get actions(){return e(he)},get menu(){return e(t)},get iconWeight(){return J()}})}var ye=tt(ve);return we(),ye}export{Zt as default};
@@ -1 +1 @@
1
- import{g as l,r as m,d as a}from"./DqU8XEOB.js";import{p}from"./Cl9IfZkl.js";import{b as t,ay as o}from"./aVPYoucJ.js";import{M as u,b as c}from"./BbcRDMCy.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=y(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),y=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),v=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(v(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},$={parser:b,db:a,renderer:m,styles:l};export{$ as diagram};
1
+ import{g as l,r as m,d as a}from"./Cvpiafcq.js";import{p}from"./Ct4GQFDH.js";import{b as t,ay as o}from"./DpLAbmZc.js";import{M as u,b as c}from"./BbcRDMCy.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=y(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),y=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),v=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(v(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},$={parser:b,db:a,renderer:m,styles:l};export{$ as diagram};