@intent-hq/web 2.310.3 → 2.310.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 (145) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{lqs_HYEw.js → 1JT3Hvwn.js} +1 -1
  3. package/web/app/immutable/chunks/{Bpofk5Ge.js → 3XXjzHG3.js} +1 -1
  4. package/web/app/immutable/chunks/{BhWJ-mUa.js → 5lKAUCkv.js} +1 -1
  5. package/web/app/immutable/chunks/{C72YfPmr.js → 5mT5QCH0.js} +2 -2
  6. package/web/app/immutable/chunks/{WaYTk5P-.js → 9Pt4_UCK.js} +1 -1
  7. package/web/app/immutable/chunks/{DpbPS--w.js → AdEBgfMz.js} +1 -1
  8. package/web/app/immutable/chunks/{C87YV7yB.js → B-BihkPv.js} +4 -4
  9. package/web/app/immutable/chunks/{Dr9n9KYD.js → B31DSOXx.js} +1 -1
  10. package/web/app/immutable/chunks/{FTZaXc8b.js → B6i2HXcd.js} +1 -1
  11. package/web/app/immutable/chunks/{PR2rc_KV.js → B72MiU4f.js} +2 -2
  12. package/web/app/immutable/chunks/{_GDZ01fB.js → B7hiL__h.js} +1 -1
  13. package/web/app/immutable/chunks/{jU5_8m_P.js → B939T8ee.js} +1 -1
  14. package/web/app/immutable/chunks/{h6Xb9K7f.js → BAFIBxJn.js} +1 -1
  15. package/web/app/immutable/chunks/{D5gGhPeB.js → BHfh0Z1C.js} +1 -1
  16. package/web/app/immutable/chunks/{DICP2Iar.js → BI8wduE-.js} +1 -1
  17. package/web/app/immutable/chunks/{CUMlGGeg.js → BIU8-rPj.js} +1 -1
  18. package/web/app/immutable/chunks/{B7s4-XTz.js → BIiORJal.js} +4 -4
  19. package/web/app/immutable/chunks/{C_tu278J.js → BJKiZYvw.js} +1 -1
  20. package/web/app/immutable/chunks/{oEWQ7BWN.js → BNFZ_TXS.js} +1 -1
  21. package/web/app/immutable/chunks/{DWqMBuHP.js → BNXdIr_O.js} +1 -1
  22. package/web/app/immutable/chunks/{CcUMYVEM.js → BNsTgNha.js} +1 -1
  23. package/web/app/immutable/chunks/{DAmyup4Q.js → BPO8n77e.js} +2 -2
  24. package/web/app/immutable/chunks/{DLTK7s08.js → BR2WgFAY.js} +1 -1
  25. package/web/app/immutable/chunks/{BI_SwxaN.js → BRD3o4b9.js} +1 -1
  26. package/web/app/immutable/chunks/{YqBgboHy.js → BTjbZv4v.js} +1 -1
  27. package/web/app/immutable/chunks/{Dx4xDmS-.js → BVaDxTbw.js} +1 -1
  28. package/web/app/immutable/chunks/{kHJUvxPR.js → BXYHRMR5.js} +1 -1
  29. package/web/app/immutable/chunks/{B1s3oEqm.js → BZC0V7Vm.js} +2 -2
  30. package/web/app/immutable/chunks/{ry72TFIz.js → BZCsjPbo.js} +2 -2
  31. package/web/app/immutable/chunks/{X-Frg4xt.js → BdmhOhOr.js} +1 -1
  32. package/web/app/immutable/chunks/{BrV7vQ-C.js → BhEmEnro.js} +1 -1
  33. package/web/app/immutable/chunks/{CeijcUhC.js → BlOiaItm.js} +1 -1
  34. package/web/app/immutable/chunks/{Bhw4MKUW.js → BoADm99c.js} +1 -1
  35. package/web/app/immutable/chunks/{xPs_63iv.js → BqgH4F9Q.js} +1 -1
  36. package/web/app/immutable/chunks/{BHnD9zfx.js → BrrIbgjH.js} +1 -1
  37. package/web/app/immutable/chunks/{CPi1vTiT.js → BttTHeg3.js} +2 -2
  38. package/web/app/immutable/chunks/{NHQiGgbv.js → BwF5HhIs.js} +1 -1
  39. package/web/app/immutable/chunks/{ibC6Wlul.js → Bx1ulVFG.js} +1 -1
  40. package/web/app/immutable/chunks/{BYxB_o2p.js → BxV9jjnn.js} +1 -1
  41. package/web/app/immutable/chunks/{Dj7a19mR.js → C1CC06Ey.js} +1 -1
  42. package/web/app/immutable/chunks/{Q48HTbqK.js → C501DddF.js} +1 -1
  43. package/web/app/immutable/chunks/{wh3Y68il.js → C5AqVWW_.js} +1 -1
  44. package/web/app/immutable/chunks/{DR30pTuY.js → C5G0q6V9.js} +3 -3
  45. package/web/app/immutable/chunks/{CrdTEIp7.js → C5egmBj1.js} +1 -1
  46. package/web/app/immutable/chunks/{fyjA8lOg.js → C6Gqnk62.js} +1 -1
  47. package/web/app/immutable/chunks/{DAhqFWJw.js → C8qwdo8h.js} +1 -1
  48. package/web/app/immutable/chunks/{D2ffSQ9J.js → CAiJGbLo.js} +1 -1
  49. package/web/app/immutable/chunks/{DH-0T9oO.js → CF7FcFf9.js} +1 -1
  50. package/web/app/immutable/chunks/{CnIb6mve.js → CGnNcckt.js} +1 -1
  51. package/web/app/immutable/chunks/{B2JLNOy6.js → CHJhHJ8c.js} +1 -1
  52. package/web/app/immutable/chunks/{Bd0N6Q84.js → CK49eRBK.js} +1 -1
  53. package/web/app/immutable/chunks/{DhDem5lD.js → CMbRA5qt.js} +1 -1
  54. package/web/app/immutable/chunks/{BDPXN-l5.js → CNC6BMwU.js} +1 -1
  55. package/web/app/immutable/chunks/{DHf042m3.js → CPIehcPz.js} +1 -1
  56. package/web/app/immutable/chunks/{OEEtadht.js → CR2tijk0.js} +1 -1
  57. package/web/app/immutable/chunks/{D5XrjD_m.js → CR_mHSu4.js} +1 -1
  58. package/web/app/immutable/chunks/{DStbB4cJ.js → CSxLglEe.js} +1 -1
  59. package/web/app/immutable/chunks/{Cstq9SM5.js → CUzjOAua.js} +1 -1
  60. package/web/app/immutable/chunks/{BENBNSN7.js → CVH8gLyV.js} +1 -1
  61. package/web/app/immutable/chunks/{BakMVsPT.js → CVmHwhPc.js} +2 -2
  62. package/web/app/immutable/chunks/{bBO0iA4_.js → CYjqtZFX.js} +1 -1
  63. package/web/app/immutable/chunks/{Ci2_N-bK.js → CYpaiDaV.js} +1 -1
  64. package/web/app/immutable/chunks/{D7ePuUtq.js → CaBSUvc-.js} +1 -1
  65. package/web/app/immutable/chunks/{D2ojbL4J.js → CkwlIwj7.js} +1 -1
  66. package/web/app/immutable/chunks/{7xAw-BT0.js → CmaYPN9s.js} +1 -1
  67. package/web/app/immutable/chunks/{C3nOF7W6.js → CmqlgQan.js} +1 -1
  68. package/web/app/immutable/chunks/{CuzanJ4G.js → CoW30tTg.js} +1 -1
  69. package/web/app/immutable/chunks/{lG67Zx5D.js → CqR3T6Kd.js} +3 -3
  70. package/web/app/immutable/chunks/{DJ4er0zy.js → CrR4jweF.js} +1 -1
  71. package/web/app/immutable/chunks/{CQI-dvtu.js → CrWQjKj_.js} +3 -3
  72. package/web/app/immutable/chunks/{BGcL9rs9.js → CroKe-wc.js} +1 -1
  73. package/web/app/immutable/chunks/{YDWB9C4j.js → CsQkh7b3.js} +1 -1
  74. package/web/app/immutable/chunks/{CTaTQq2B.js → CvCSRZBy.js} +1 -1
  75. package/web/app/immutable/chunks/{BUlPMLws.js → CvOoeN0T.js} +1 -1
  76. package/web/app/immutable/chunks/{Ccfa6x-j.js → CxJcdmSd.js} +1 -1
  77. package/web/app/immutable/chunks/{DV_gHrZ4.js → D-0ZUYIk.js} +1 -1
  78. package/web/app/immutable/chunks/{Bn-4GS40.js → D-4XO7pN.js} +2 -2
  79. package/web/app/immutable/chunks/{CHFvnHJS.js → D4qyaNt3.js} +1 -1
  80. package/web/app/immutable/chunks/{iX-41BqF.js → D4z4ooVN.js} +1 -1
  81. package/web/app/immutable/chunks/{CVyfvlNb.js → DAg5pMRd.js} +1 -1
  82. package/web/app/immutable/chunks/{BmpVZmDT.js → DCuJDyNf.js} +1 -1
  83. package/web/app/immutable/chunks/{ap51LBWo.js → DI608D-i.js} +1 -1
  84. package/web/app/immutable/chunks/{EF47gh5F.js → DIiJKmmV.js} +1 -1
  85. package/web/app/immutable/chunks/{B53WwE3a.js → DJ1cdtAZ.js} +1 -1
  86. package/web/app/immutable/chunks/{DxBZwGJl.js → DKr5x03c.js} +1 -1
  87. package/web/app/immutable/chunks/{cMysCMc_.js → DL-yibpy.js} +1 -1
  88. package/web/app/immutable/chunks/{CK1qXB1I.js → DNlvdlMF.js} +1 -1
  89. package/web/app/immutable/chunks/{D9RktmhG.js → DPXd3fU6.js} +1 -1
  90. package/web/app/immutable/chunks/{Sd4DhpzB.js → DR0NE2_C.js} +1 -1
  91. package/web/app/immutable/chunks/{lh2cjQS1.js → DTCRTrPV.js} +1 -1
  92. package/web/app/immutable/chunks/{CiPifYNB.js → DTj6_2dz.js} +1 -1
  93. package/web/app/immutable/chunks/{BfZK-g4H.js → DXMKw2so.js} +1 -1
  94. package/web/app/immutable/chunks/{ClKsLSpN.js → DYZ36vW7.js} +1 -1
  95. package/web/app/immutable/chunks/{aloh9OcN.js → DeYZGX2s.js} +1 -1
  96. package/web/app/immutable/chunks/{lb9Uy5lM.js → Df6f-k6w.js} +1 -1
  97. package/web/app/immutable/chunks/{BRvgBsbx.js → Dgaq6o9Y.js} +1 -1
  98. package/web/app/immutable/chunks/{2rlMb19F.js → Dkq5Coq_.js} +1 -1
  99. package/web/app/immutable/chunks/{DM80xiYc.js → DmX5G2mi.js} +1 -1
  100. package/web/app/immutable/chunks/{BpXeqZkK.js → Dmhbab3K.js} +6 -6
  101. package/web/app/immutable/chunks/{C-1nTNwc.js → Dp1Yxyun.js} +1 -1
  102. package/web/app/immutable/chunks/{BP6OqM9o.js → DrZyb3e_.js} +1 -1
  103. package/web/app/immutable/chunks/{BFXzH5IE.js → DsgnOGWk.js} +1 -1
  104. package/web/app/immutable/chunks/{DPWD_Z0m.js → DxdqGRL1.js} +1 -1
  105. package/web/app/immutable/chunks/{CEXJj_TX.js → DzUxh_ps.js} +1 -1
  106. package/web/app/immutable/chunks/{Cl430GWg.js → ENpFvA2b.js} +5 -5
  107. package/web/app/immutable/chunks/{D3lH_sy-.js → F27tZ3Lo.js} +1 -1
  108. package/web/app/immutable/chunks/{B_mbXOka.js → IeOyBdV1.js} +1 -1
  109. package/web/app/immutable/chunks/{dpdLM1Cx.js → NtwUb2T_.js} +1 -1
  110. package/web/app/immutable/chunks/{ryFwnMjp.js → PtwmLAp4.js} +1 -1
  111. package/web/app/immutable/chunks/{B7VncZW5.js → WU_Tlex0.js} +1 -1
  112. package/web/app/immutable/chunks/{DqPGIq9m.js → _e7d73p6.js} +1 -1
  113. package/web/app/immutable/chunks/{BMMFveB2.js → ckbdI_sO.js} +6 -6
  114. package/web/app/immutable/chunks/{D9zTmP-H.js → eVx-WSd7.js} +1 -1
  115. package/web/app/immutable/chunks/{CLEySo6k.js → flwRPGfq.js} +1 -1
  116. package/web/app/immutable/chunks/{CNxOtEoC.js → iCXhZwLL.js} +1 -1
  117. package/web/app/immutable/chunks/{Dn1Hge9W.js → iU779rtf.js} +1 -1
  118. package/web/app/immutable/chunks/{CSiG9Hvp.js → lH4z0y-c.js} +1 -1
  119. package/web/app/immutable/chunks/{uOEty9O6.js → nRjRQ-e8.js} +1 -1
  120. package/web/app/immutable/chunks/{BfPWAh77.js → p-l1WyaF.js} +1 -1
  121. package/web/app/immutable/chunks/{DPjuFI2m.js → r8JiSeiY.js} +1 -1
  122. package/web/app/immutable/chunks/{Cd_IIsl2.js → uI2-sxxt.js} +1 -1
  123. package/web/app/immutable/chunks/{D-QdqmeZ.js → uK-hZG4d.js} +1 -1
  124. package/web/app/immutable/chunks/{6Z5k9P1U.js → v3BNQvm3.js} +4 -4
  125. package/web/app/immutable/chunks/{BSel_zEu.js → v5CNLLlH.js} +1 -1
  126. package/web/app/immutable/chunks/{D0gJOzJU.js → wUteoXUE.js} +1 -1
  127. package/web/app/immutable/chunks/{CCDTjxXZ.js → x5DAOZ-l.js} +1 -1
  128. package/web/app/immutable/entry/{app.np0VAfbg.js → app.9TYubmA2.js} +2 -2
  129. package/web/app/immutable/entry/start.DzrqTCos.js +1 -0
  130. package/web/app/immutable/nodes/{0.DoZAnEaT.js → 0.CwEPgBsQ.js} +1 -1
  131. package/web/app/immutable/nodes/{1.BfLNDde5.js → 1.DWK38N4h.js} +1 -1
  132. package/web/app/immutable/nodes/{10.WVRhKQHR.js → 10.DaUeIEdW.js} +1 -1
  133. package/web/app/immutable/nodes/{14.BGrxllXE.js → 14.2lmprMDP.js} +1 -1
  134. package/web/app/immutable/nodes/{16.CkZkKSWx.js → 16.COW42S3C.js} +2 -2
  135. package/web/app/immutable/nodes/{2.COM3w17g.js → 2.SI3oSw-U.js} +3 -3
  136. package/web/app/immutable/nodes/{3.BhRx3b1m.js → 3.BdAb9qv8.js} +1 -1
  137. package/web/app/immutable/nodes/{4.C02hhSi-.js → 4.BPPplmHC.js} +1 -1
  138. package/web/app/immutable/nodes/{5.Dgt2hWD3.js → 5.mnYZAvZj.js} +1 -1
  139. package/web/app/immutable/nodes/{6.KyP4WP5g.js → 6.DokpGs5-.js} +1 -1
  140. package/web/app/immutable/nodes/{7.BxnoAMeX.js → 7.7huKB9rr.js} +1 -1
  141. package/web/app/immutable/nodes/{8.CnlHpTsC.js → 8.Oo8AlOBc.js} +2 -2
  142. package/web/app/immutable/nodes/{9.CJ1_wepy.js → 9.DkJDLBQi.js} +1 -1
  143. package/web/app/version.json +1 -1
  144. package/web/index.html +9 -9
  145. package/web/app/immutable/entry/start.BGCfjmAX.js +0 -1
@@ -1,6 +1,6 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/B1s3oEqm.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/7rNOGHzs.js","/app/immutable/chunks/CQ4a5a4v.js","/app/immutable/chunks/DsNWmyox.js","/app/immutable/chunks/DzMmhJrp.js","/app/immutable/chunks/DmsDslNo.js","/app/immutable/chunks/UyBYtOpv.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/Bgegixo2.js","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/CiENRH6A.js","/app/immutable/chunks/DCaHy20k.js","/app/immutable/chunks/CzrrO9Ap.js","/app/immutable/chunks/BlOn95cv.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/DZX-XWnb.js","/app/immutable/chunks/DbAK3Zju.js","/app/immutable/chunks/CRwmdgt6.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/DSjRkndX.js","/app/immutable/chunks/Ck-Ax5yG.js","/app/immutable/chunks/CFejQM6t.js","/app/immutable/chunks/D2AmAQEr.js","/app/immutable/chunks/CKEqC8_B.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/assets/observe-overflow.CJJmE3_P.css","/app/immutable/chunks/CB-g50lR.js","/app/immutable/chunks/CPQdU3ZA.js","/app/immutable/chunks/DNen9YXB.js","/app/immutable/chunks/KQTrHxko.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/C_n9DeKj.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/D-cnPaTJ.js","/app/immutable/assets/pending-agent-deletions.UE5obH5A.css","/app/immutable/chunks/CUrlpJj4.js","/app/immutable/chunks/FY5ry3XL.js","/app/immutable/chunks/DFHyIdsA.js","/app/immutable/assets/SettingsPage.D8u26cHZ.css","/app/immutable/chunks/BaQ9zUUl.js","/app/immutable/chunks/lfJ8pseq.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/eHLf0w_s.js","/app/immutable/chunks/BJzHxIyr.js","/app/immutable/chunks/C_tu278J.js","/app/immutable/chunks/BkBdyRjM.js","/app/immutable/chunks/D4jXWSLn.js","/app/immutable/chunks/PR2rc_KV.js","/app/immutable/chunks/D5XrjD_m.js","/app/immutable/chunks/BpXeqZkK.js","/app/immutable/chunks/ryFwnMjp.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/DH-0T9oO.js","/app/immutable/assets/directory-picker-service.CzNEA6Ot.css","/app/immutable/chunks/X-Frg4xt.js","/app/immutable/chunks/Cl430GWg.js","/app/immutable/chunks/Sd4DhpzB.js","/app/immutable/chunks/yAjP_kdp.js","/app/immutable/chunks/B7s4-XTz.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/BGspgxWf.js","/app/immutable/chunks/DlodKoXT.js","/app/immutable/assets/AttachmentPreview.BCSCCZGm.css","/app/immutable/assets/DiagramPresentation.Bfi3xHm0.css","/app/immutable/chunks/D2ffSQ9J.js","/app/immutable/assets/StreamingDiagramRenderer.BShsSvPz.css"])))=>i.map(i=>d[i]);
2
- var za=Object.defineProperty;var Ba=(a,t,r)=>t in a?za(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r;var lt=(a,t,r)=>Ba(a,typeof t!="symbol"?t+"":t,r);import{bo as A,t as tt,bq as I,a_ as ie,by as at,b as rt,bs as Va,bu as Jt,_ as ka}from"./7rNOGHzs.js";import{bs as nt,a5 as H,aD as e,bA as L,b_ as X,W as N,bn as st,c9 as E,aA as M,aB as z,ca as kt,bk as ya,c6 as Ka,cd as Wt,bV as ne,bS as O,ay as Fe,bl as me,bO as ge,ai as xa,a7 as Ut,c0 as ja,bf as Ht,bH as q,aw as Ne,aj as Ae,be as Ga,c3 as ut,bb as Mt,aF as Ya,br as Qa,bj as Ja}from"./B8o4lNgr.js";import{d as Za,f as $a,k as qe,l as Ct,s as Z,a as Xe,h as zt,i as Xa}from"./DmsDslNo.js";import{aN as er,cU as tr,L as ar,av as rr,di as nr,V as sr,dl as Aa,B as or,$ as ir}from"./KQTrHxko.js";import{t as Bt}from"./Ck-Ax5yG.js";import{a6 as cr,aj as lr,A as dr,o as ur,a3 as Ia,s as Vt,a2 as Kt,az as yt,aW as Ma,n as fr,aB as pr,aV as mr}from"./B7s4-XTz.js";import{l as Zt}from"./DR30pTuY.js";import{bJ as gr,bG as vr,bH as $t,ap as hr}from"./CB-g50lR.js";import{w as dt,P as br}from"./DSjRkndX.js";import{f as jt,bc as Nt}from"./Bgegixo2.js";import{t as Oe,v as wr,H as It,E as Xt,c as ea}from"./DzMmhJrp.js";import{qY as Ca,Hq as ve,lZ as _r,fD as kr,mU as yr,tu as xr,a as Ar,v4 as Ir,se as Mr,qG as Cr,g as Sr,bi as ta,u9 as Rr,s2 as Er,ub as Pr}from"./CRwmdgt6.js";import{c as Tr,l as ht}from"./ChTqQfQN.js";import{o as Fr}from"./DH-0T9oO.js";import{aP as Lr,aQ as aa,bz as Wr,aA as Hr,by as Nr,aE as qr,c_ as Or,cO as Dr,F as bt,ax as ra,bH as Ur,bC as zr}from"./CFejQM6t.js";import{l as Br}from"./CPQdU3ZA.js";import{p as Vr,cW as wt,cV as na,an as Kr,cY as Sa,a7 as St,aE as Ra,aV as jr,aw as Gr,a6 as sa,r as Yr,aM as Qr,aR as Jr,F as Zr}from"./Sd4DhpzB.js";import{s as qt}from"./CQ4a5a4v.js";import{b as et}from"./D2g8BuR1.js";import{s as $r}from"./DZX-XWnb.js";import{c as Xr,u as en,s as tn,a as an}from"./D2AmAQEr.js";import{N as oa,J as ia}from"./B1s3oEqm.js";import{g as ca}from"./DsNWmyox.js";import{X as la}from"./yAjP_kdp.js";const rn=new Set(["failed","blocked","needs_attention","in_progress"]),nn={failed:{visual:"icon",icon:Dr,className:"text-foreground"},blocked:{visual:"icon",icon:Or,className:"text-danger"},needs_attention:{visual:"icon",icon:qr,className:"text-warning-ink"},in_progress:{visual:"dot",icon:null,className:"workspace-status-color-active"},waiting:{visual:"icon",icon:Nr,className:"text-muted-foreground"},unread:{visual:"dot",icon:null,className:"workspace-status-color-unread"},not_started:{visual:"dot",icon:null,className:"text-muted-foreground/35"},idle:{visual:"dot",icon:null,className:"text-muted-foreground/35"},complete:{visual:"icon",icon:Hr,className:"text-success"},pr_queued:{visual:"icon",icon:Wr,className:"text-info"},pr_ready:{visual:"icon",icon:aa,className:"text-success"},pr_open:{visual:"icon",icon:aa,className:"text-info"},pr_merged:{visual:"icon",icon:Lr,className:"text-purple-500"}};function sn(a){switch(a){case"failed":return A.workspace_statusIcon_failed_label();case"blocked":return A.workspace_statusIcon_blocked_label();case"needs_attention":return A.workspace_statusIcon_needsAttention_label();case"in_progress":return A.workspace_statusIcon_inProgress_label();case"waiting":return A.workspace_taskStatus_waiting_label();case"unread":return A.layout_activeCard_unread_header();case"not_started":return A.workspace_statusIcon_notStarted_label();case"idle":return A.workspace_statusIcon_idle_label();case"complete":return A.workspace_statusIcon_complete_label();case"pr_queued":return A.workspace_statusIcon_prQueued_label();case"pr_ready":return A.workspace_statusIcon_prReady_label();case"pr_open":return A.workspace_statusIcon_prOpen_label();case"pr_merged":return A.workspace_statusIcon_prMerged_label()}}function on(a){const t=Ca(a.displayStatus)?a.displayStatus:"not_started";return rn.has(t)?t:a.attention==="unread"?"unread":a.waiting===!0?"waiting":t}function Ea(a){const t=a==="waiting"||a==="unread"||Ca(a)?a:"not_started",r=sn(t);return{state:t,...nn[t],label:r,tooltip:r,accessibleName:r}}var cn=z('<span class="workspace-status-dot svelte-14zk5l0" data-workspace-status-dot=""></span>'),ln=z("<span><!></span>");function Pa(a,t){if(new.target)return tt({component:Pa,...a});nt(t,!0);let r=I(t,"status",7),l=I(t,"size",7,14),c=I(t,"decorative",7,!1),u=I(t,"class",7);const s=E(()=>Ea(r()));var o={get status(){return r()},set status(m){r(m),M()},get size(){return l()},set size(m=14){l(m),M()},get decorative(){return c()},set decorative(m=!1){c(m),M()},get class(){return u()},set class(m){u(m),M()},$set:at,$on:(m,k)=>rt(t,m,k)},g=ln(),x=H(g);{var b=m=>{var k=cn();N(m,k)},w=m=>{bt(m,{get icon(){return e(s).icon},class:"size-full!"})};ie(x,m=>{e(s).visual==="dot"?m(b):e(s).icon&&m(w,1)})}return L(g),X(m=>{qe(g,1,m,"svelte-14zk5l0"),Ct(g,`width: ${l()??""}px; height: ${l()??""}px;`),Z(g,"role",c()?void 0:"img"),Z(g,"aria-label",c()?void 0:e(s).accessibleName),Z(g,"aria-hidden",c()?"true":void 0),Z(g,"title",c()?void 0:e(s).tooltip),Z(g,"data-workspace-status",e(s).state),Z(g,"data-workspace-status-visual",e(s).visual),Z(g,"data-workspace-status-icon",e(s).icon?.iconName)},[()=>Za($a("workspace-status-icon inline-flex shrink-0 items-center justify-center forced-colors:text-[CanvasText]",e(s).className,u()))]),N(a,g),st(o)}const Gt=6e4,Yt=60*Gt,Qt=24*Yt,da=30*Qt;function dn(a,t=new Date){if(a==null)return null;const r=a instanceof Date?a:new Date(a),l=r.getTime(),c=t.getTime();if(!Number.isFinite(l)||!Number.isFinite(c))return null;const u=Math.max(0,c-l);let s;u<Gt?s="<1m":u<Yt?s=`${Oe(Math.floor(u/Gt))}m`:u<Qt?s=`${Oe(Math.floor(u/Yt))}h`:u<da?s=`${Oe(Math.floor(u/Qt))}d`:s=`${Oe(Math.floor(u/da))}mo`;const o=l>c?t:r,g=wr(o,{now:t});return g?{compact:s,accessible:g,dateTime:r.toISOString()}:null}var un=z('<div><div class="grid gap-0.5 px-5 pt-4"><div class="flex min-w-0 items-center justify-between gap-3"><!> <!></div> <!> <!></div> <div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><div class="grid" data-workspace-hover-card-activity=""><!></div> <div class="pull-requests grid" data-workspace-hover-card-pr-column=""><!></div></div></div>'),fn=z('<p class="type-caption mt-1 min-w-0 line-clamp-3 text-muted-foreground" data-workspace-hover-card-summary=""> </p>'),pn=z('<span class="shrink-0 text-muted-foreground" data-workspace-hover-card-question-meta=""><span aria-hidden="true"> </span></span>'),mn=z('<span class="row-span-2 flex h-(--text-caption-line-height) items-center" aria-hidden="true"><!></span><span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-agent-name=""> </span><time class="type-caption whitespace-nowrap text-muted-foreground" data-workspace-hover-card-agent-time=""> </time> <span class="agent-detail type-caption flex min-w-0 items-start gap-1.5 text-muted-foreground svelte-1vax087" data-workspace-hover-card-agent-detail=""><span class="min-w-0 truncate" data-workspace-hover-card-agent-context=""> </span><!></span>',1),ua=z('<div role="listitem"><!></div>'),gn=z('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-overflow=""><span> </span> <!></div>'),vn=z('<section class="activity min-w-0" data-workspace-hover-card-activity="" data-workspace-hover-card-agent-table=""><div class="-mx-2 grid gap-2" role="list"></div> <!></section>'),hn=z('<!> <span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-pr-title=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-status=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-number=""> </span>',1),bn=z('<div class="grid w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center gap-x-2 rounded-sm px-2 py-0 text-left" data-workspace-hover-card-pr-row=""><!></div>'),wn=z('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-pr-overflow=""><span> </span> <!></div>'),_n=z('<section class="pull-requests min-w-0" data-workspace-hover-card-pr-column=""><div class="-mx-2 grid min-w-0 gap-2" role="list" data-workspace-hover-card-pr-list=""></div> <!></section>'),kn=z('<div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><!> <!></div>',1),yn=z('<header data-workspace-hover-card-header=""><div class="min-w-0" data-workspace-hover-card-identity=""><div class="flex min-w-0 items-center justify-between gap-3"><h2 class="type-body min-w-0 truncate font-medium text-foreground" data-workspace-hover-card-title=""> </h2> <span class="type-caption flex shrink-0 items-center gap-1.5 text-muted-foreground" data-workspace-hover-card-status=""><span class="truncate" data-workspace-hover-card-status-label=""> </span><!></span></div> <div class="type-caption mt-0.5 min-w-0 truncate text-muted-foreground" data-workspace-hover-card-repo=""> </div> <!></div></header> <!>',1),xn=z('<section class="workspace-hover-card shrink-0 overflow-hidden rounded-md bg-background text-left text-foreground shadow-(--elevation-overlay) ring-1 ring-border svelte-1vax087" data-workspace-hover-card="" data-workspace-hover-card-layout="landscape"><!></section>');function An(a,t){if(new.target)return tt({component:An,...a});nt(t,!0);const r=()=>Jt(T,"$workspaceAgents$",c),l=()=>Jt(i,"$prMonitors$",c),[c,u]=Va(),s=Tr("WorkspaceHoverCard");let o=I(t,"workspace",7),g=I(t,"isLoading",7,!1),x=I(t,"activeAgentIds",23,()=>[]),b=I(t,"loadAgentSessions",7,!0),w=I(t,"onkeydown",7),m=I(t,"staticData",7,!1);const k=Wt("");function U(){return m()?Wt([]):er(k)}function B(){return m()?Wt([]):tr(k)}const T=U(),i=B();kt(()=>k.set(o()?.id??""));let p=ne(0);ya(()=>Zt.subscribe(()=>Ka(p)));let _=E(()=>o()?.agentSummary?.agentIds??[]),P=E(()=>(e(p),o()?Zt.getStreamingAgentIdsForWorkspace(o().id):[])),D=null,Y=new Set;kt(()=>{if(!o()||!b())return;const d=String(o().id);D!==d&&(D=d,Y=new Set);for(const C of new Set([...e(_).slice(0,6),...x(),...e(P)]))Y.has(C)||(ve.dispatch(_r(d,C)),Y.add(C))});function se(d){return[d.name,d.context,d.questionMeta?.accessible,d.updated.accessible].filter(Boolean).join(". ")}function Ce(d){return d?d.kind==="attention"?d.attention.reason?.trim()||null:"text"in d&&d.text.trim()||null:null}function le(d){return dn(d.lastActivity||d.updatedAt||d.createdAt)??{compact:"—",accessible:A.workspace_hoverCard_noRecentActivity_label()}}function y(d){const C=String(d.status).toLowerCase(),F=yr(d),J=lr(d),be=J==="question"?gr(d):null,pe=Ce(rr.select(ve.state,String(d.id)));let we,Ee,_e,n,f,W,S=!1;if(J==="question"){we="attention",Ee="question",_e=be?.questions[0]?.question.trim()||pe||A.workspace_hoverCard_question_label(),n="question",f=1;const K=be?.questions.length??0;K>1&&(W={compact:`${Oe(1)}/${Oe(K)}`,accessible:A.chat_questionWizard_stepCounter_label({current:1,total:K})})}else if(J==="attention-discussion")we="attention",Ee="discussion",_e=F?.reason?.trim()||A.chat_agentCard_attentionDiscussion_label(),n="attention-discussion",f=1;else if(J==="attention-blocker"||C==="blocked")we="attention",Ee="blocker",_e=F?.reason?.trim()||A.chat_agentCard_attentionBlocker_label(),n="attention-blocker",f=0;else if(d.hasUnread)we="attention",Ee="unread",_e=pe||A.chat_newMessagesDivider_label(),S=!!pe,n="unread",f=2;else if(d.isStreaming||d.isProcessing||x().includes(String(d.id))||e(P).includes(String(d.id))||["active","busy","processing","responding","running","streaming","in_progress"].includes(C))we="active",_e=pe||A.workspace_devScripts_running_label(),S=!!pe,n=d.isProcessing?"responding":"running",f=3;else if(["waiting","pending","queued","starting"].includes(C))we="waiting",_e=pe||A.workspace_taskStatus_waiting_label(),S=!!pe,n="waiting",f=4;else return null;const j=d.agentMetadata??d.metadata;return{id:String(d.id),name:d.name?.trim()||A.workspace_fileChanges_agent_label(),group:we,attentionKind:Ee,avatarState:n,specialist:j?.specialist,context:_e,questionMeta:W,contextIsPreview:S,updated:le(d),priority:f}}let Q=E(()=>{const d=o()?.agentSummary,C=new Map;if(Array.isArray(d?.agents))for(const F of d.agents)F&&typeof F=="object"&&typeof F.id=="string"&&C.set(F.id,F.parentAgentId);return r().filter(F=>{const J=C.get(String(F.id));return!(kr(F)!=="topLevel"||typeof J=="string"&&J||F.pendingDeleteAt||F.retiredAt||String(F.status).toLowerCase()==="deleted")})}),oe=E(()=>e(Q).map(y).filter(d=>d!==null).sort((d,C)=>d.priority-C.priority)),Le=E(()=>e(oe).slice(0,6)),Me=E(()=>Math.max(0,e(oe).length-6)),fe=E(()=>o()?.repositoryName?o().repositoryOwner?`${o().repositoryOwner} / ${o().repositoryName}`:o().repositoryName:A.workspace_hoverCard_localRepository_label()),Ve=E(()=>on(o()??{})),ke=E(()=>Ea(e(Ve))),ee=E(()=>o()?.statusMessage?.trim()||"");function Se(d){if(!d)return null;const C=d.activePullRequest??d.pullRequests?.[0]??null;return C||(d.prStatus?{id:`legacy-pr-${d.prNumber??"workspace"}`,number:d.prNumber??0,url:d.prUrl??"",title:A.workspace_hoverCard_pullRequest_label(),status:d.prStatus,createdAt:d.updatedAt,updatedAt:d.updatedAt}:null)}let ft=E(()=>o()?m()?Se(o()):nr.select(ve.state,o().id)??Se(o()):null),Ie=E(()=>{if(!o()||ar(o()))return[];const d=o().repositoryOwner&&o().repositoryName?`${o().repositoryOwner}/${o().repositoryName}`:void 0;return cr({workspacePRs:o().pullRequests,activePR:e(ft),monitors:l(),workspaceRepo:d,buildPrUrl:(C,F)=>Vr(C,o().repositoryOwner,o().repositoryName,F),getDisplayTitle:C=>C.title})}),ot=E(()=>e(Ie).slice(0,3)),De=E(()=>Math.max(0,e(Ie).length-3)),ce=E(()=>e(oe).length>0),Ke=E(()=>e(Ie).length>0),v=E(()=>e(ce)||e(Ke));function h(d){const C=d.resource?.repository.provider==="gitlab"?`${d.repo} !${d.number}`:d.repo?A.workspace_card_prBadge_repoLine_tooltip({repo:d.repo,number:d.number}):A.workspace_card_prBadge_label({number:` #${d.number}`});return[sr(C,d),d.title,d.details].filter(Boolean).join(`
3
- `)}function ae(d,C){if(d.stopPropagation(),!o()||!b())return;const F=o().id;Br.select(ve.state)!==F&&Fr(F).catch(J=>{s.warn("Failed to switch workspace for hover-card agent",{agentId:C,error:J})}),ve.dispatch(xr(F,{agentId:C}))}function V(d,C){if(d.stopPropagation(),!o()||!C.url)return;const F=o().id;ka(async()=>{const{handleLink:J}=await import("./B1s3oEqm.js").then(be=>be.Q);return{handleLink:J}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56]),import.meta.url).then(({handleLink:J})=>J(C.url,{workspaceId:F,event:d}))}var te={get workspace(){return o()},set workspace(d){o(d),M()},get isLoading(){return g()},set isLoading(d=!1){g(d),M()},get activeAgentIds(){return x()},set activeAgentIds(d=[]){x(d),M()},get loadAgentSessions(){return b()},set loadAgentSessions(d=!0){b(d),M()},get onkeydown(){return w()},set onkeydown(d){w(d),M()},get staticData(){return m()},set staticData(d=!1){m(d),M()},$set:at,$on:(d,C)=>rt(t,d,C)},he=xn(),re=H(he);{var Re=d=>{var C=un(),F=H(C),J=H(F),be=H(J);dt(be,{class:"h-7 min-w-0 max-w-64 flex-1"});var pe=O(be,2);dt(pe,{class:"h-5 w-20 shrink-0"}),L(J);var we=O(J,2);dt(we,{class:"h-4 w-40"});var Ee=O(we,2);dt(Ee,{class:"mt-2 h-10 w-full"}),L(F);var _e=O(F,4),n=H(_e),f=H(n);dt(f,{class:"h-10 w-full"}),L(n);var W=O(n,2),S=H(W);dt(S,{class:"h-10 w-full"}),L(W),L(_e),L(C),N(d,C)},Ue=d=>{var C=yn(),F=Fe(C);let J;var be=H(F),pe=H(be),we=H(pe),Ee=me(we,!0),_e=O(we,2),n=H(_e),f=me(n,!0),W=O(n);Pa(W,{get status(){return e(Ve)},size:16,decorative:!0}),L(_e),L(pe);var S=O(pe,2),j=me(S,!0),K=O(S,2);{var $=ue=>{var We=fn(),xt=me(We,!0);Xe(We,(At,Rt)=>Bt?.(At,Rt),()=>e(ee)),X(()=>ge(xt,e(ee))),N(ue,We)};ie(K,ue=>{e(ee)&&ue($)})}L(be),L(F);var Pe=O(F,2);{var de=ue=>{var We=kn(),xt=O(Fe(We),2),At=H(xt);{var Rt=Ye=>{var ze=vn(),Ge=H(ze);zt(Ge,21,()=>e(Le),G=>G.id,(G,R)=>{var ye=ua(),Qe=H(ye);{let Je=E(()=>se(e(R)));jt(Qe,{variant:"plain",wrapContent:!1,class:"grid h-auto! min-h-8 w-full min-w-0 cursor-pointer grid-cols-[1rem_minmax(0,1fr)_auto] items-start justify-normal gap-x-2 gap-y-0 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(Je)},"data-workspace-hover-card-agent-row":!0,get"data-agent-group-row"(){return e(R).group},get"data-attention-kind"(){return e(R).attentionKind},get onkeydown(){return w()},onclick:Be=>ae(Be,e(R).id),children:(Be,pt)=>{var Te=mn(),xe=Fe(Te),He=H(xe);{let $e=E(()=>e(R).specialist??null);dr(He,{get agentId(){return e(R).id},variant:"compact",get state(){return e(R).avatarState},get specialist(){return e($e)}})}L(xe);var it=O(xe),Tt=me(it,!0),Ze=O(it),Ft=me(Ze,!0),mt=O(Ze,2),gt=H(mt),Lt=me(gt,!0);Xe(gt,($e,ct)=>Bt?.($e,ct),()=>e(R).context);var qa=O(gt);{var Oa=$e=>{var ct=pn(),Da=H(ct),Ua=me(Da,!0);L(ct),X(()=>{Z(ct,"aria-label",e(R).questionMeta.accessible),ge(Ua,e(R).questionMeta.compact)}),N($e,ct)};ie(qa,$e=>{e(R).questionMeta&&$e(Oa)})}L(mt),X(()=>{ge(Tt,e(R).name),Z(Ze,"datetime",e(R).updated.dateTime),Z(Ze,"aria-label",e(R).updated.accessible),ge(Ft,e(R).updated.compact),Z(mt,"data-workspace-hover-card-agent-preview",e(R).contextIsPreview||void 0),ge(Lt,e(R).context)}),N(Be,Te)},$$slots:{default:!0}})}L(ye),N(G,ye)}),L(Ge);var Et=O(Ge,2);{var Pt=G=>{var R=gn(),ye=H(R),Qe=me(ye,!0),Je=O(ye,2);bt(Je,{get icon(){return ra},size:10}),L(R),X(Be=>ge(Qe,Be),[()=>A.workspace_hoverCard_moreAgents_label({count:Oe(e(Me))})]),N(G,R)};ie(Et,G=>{e(Me)&&G(Pt)})}L(ze),X(G=>Z(ze,"aria-label",G),[()=>A.workspace_multiSelectSidebar_agentsTab_label()]),N(Ye,ze)};ie(At,Ye=>{e(ce)&&Ye(Rt)})}var Ha=O(At,2);{var Na=Ye=>{var ze=_n(),Ge=H(ze);zt(Ge,21,()=>e(ot),G=>G.identity,(G,R)=>{var ye=ua();{const pt=Te=>{var xe=hn(),He=Fe(xe);bt(He,{get icon(){return e(R).statusIcon},size:16,get class(){return`shrink-0 justify-self-start ${e(R).foregroundClass??""}`}});var it=O(He,2),Tt=me(it,!0),Ze=O(it,2),Ft=me(Ze,!0),mt=O(Ze,2),gt=me(mt,!0);X(Lt=>{ge(Tt,Lt),ge(Ft,e(R).accessibleStateLabel),ge(gt,e(R).numberLabel??`#${e(R).number}`)},[()=>e(R).title||(e(R).resource?.repository.provider==="gitlab"?A.workspace_hoverCard_mergeRequest_label():A.workspace_hoverCard_pullRequest_label())]),N(Te,xe)};var Qe=H(ye);{var Je=Te=>{{let xe=E(()=>h(e(R)));jt(Te,{variant:"plain",wrapContent:!1,class:"grid h-auto! w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center justify-normal gap-x-2 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(xe)},"data-workspace-hover-card-pr-row":!0,get"data-pr-identity"(){return e(R).identity},get"data-pr-status"(){return e(R).status},get onkeydown(){return w()},onclick:He=>V(He,e(R)),children:(He,it)=>{pt(He)},$$slots:{default:!0}})}},Be=Te=>{var xe=bn(),He=H(xe);pt(He),L(xe),X(()=>{Z(xe,"data-pr-identity",e(R).identity),Z(xe,"data-pr-status",e(R).status)}),N(Te,xe)};ie(Qe,Te=>{e(R).url?Te(Je):Te(Be,-1)})}L(ye)}X(pt=>Z(ye,"aria-label",pt),[()=>e(R).url?void 0:h(e(R))]),N(G,ye)}),L(Ge);var Et=O(Ge,2);{var Pt=G=>{var R=wn(),ye=H(R),Qe=me(ye,!0),Je=O(ye,2);bt(Je,{get icon(){return ra},size:10}),L(R),X(Be=>ge(Qe,Be),[()=>A.workspace_hoverCard_moreItems_label({count:Oe(e(De))})]),N(G,R)};ie(Et,G=>{e(De)&&G(Pt)})}L(ze),X((G,R)=>{Z(ze,"aria-label",G),Z(Ge,"aria-label",R)},[()=>e(Ie).every(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_mergeRequests_label():e(Ie).some(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_reviews_label():A.workspace_hoverCard_pullRequests_label(),()=>e(Ie).every(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_mergeRequests_label():e(Ie).some(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_reviews_label():A.workspace_hoverCard_pullRequests_label()]),N(Ye,ze)};ie(Ha,Ye=>{e(Ke)&&Ye(Na)})}L(xt),N(ue,We)};ie(Pe,ue=>{e(v)&&ue(de)})}X(ue=>{J=qe(F,1,"min-w-0 px-5 pt-4",null,J,{"pb-4":!e(v)}),ge(Ee,ue),ge(f,e(ke).label),ge(j,e(fe))},[()=>o().title||A.workspace_links_untitled_label()]),N(d,C)};ie(re,d=>{g()||!o()?d(Re):d(Ue,-1)})}L(he),N(a,he);var je=st(te);return u(),je}const fa=800,Ss=175,In=300;function Mn(){let a=0,t=null;const r=new Set,l=new Set;function c(){return a>0||t!==null?0:fa}function u(){const o=c();r.forEach(g=>g(o))}function s(){t!==null&&(clearTimeout(t),t=null)}return{get currentOpenDelay(){return c()},subscribe(o){return r.add(o),o(c()),()=>r.delete(o)},notifyOpened(){const o=a===0&&t===null;s(),a+=1,o&&u()},notifyClosed(){a!==0&&(a-=1,!(a>0)&&(s(),t=setTimeout(()=>{t=null,u()},In)))},deferClose(o){return l.add(o),()=>l.delete(o)},settleDeferredCloses(){const o=[...l];l.clear(),o.forEach(g=>g())},reset(){const o=c()!==fa;s(),a=0,l.clear(),o&&u()}}}const Rs=Mn();function Ot(a){const t=Aa.select(ve.state,a);return t!==void 0&&Cr(t)}function Cn(a,t){if(!Ot(a))return[];const r=vr.select(ve.state,a),l=$t.select(ve.state,a),c=hr.select(ve.state),u=[];for(let s=0;s<Ar;s+=1){const o=c[s],g=o&&o!==a?Aa.select(ve.state,o):void 0;u.push({id:`assign-micro-key-${s+1}`,label:g?A.workspace_card_assignOccupiedMicroKey_label({number:Oe(s+1),title:g.title}):A.workspace_card_assignMicroKeyNumber_label({number:Oe(s+1)}),checked:r===s,closeOnSelect:!0,onClick:()=>{Ot(a)&&ve.dispatch(Ir(s,a)),t()}})}return l!==null&&(u.push({type:"separator"}),u.push({id:"unassign-micro-key",label:A.workspace_card_unassignMicroKey_label(),onClick:()=>{Ot(a)&&$t.select(ve.state,a)===l&&ve.dispatch(Mr(l)),t()}})),u}function Es(a,{connected:t,onClose:r}){if(!t)return[];const l=Cn(a,r);if(l.length===0)return[];const c=l.filter(s=>"id"in s&&s.id!=="unassign-micro-key"),u=l.find(s=>"id"in s&&s.id==="unassign-micro-key");return[{id:"assign-micro-key",label:A.workspace_card_assignMicroKey_label(),icon:Ur,onClick:()=>{},selection:"single",submenu:c},...u?[u]:[]]}var Sn=z('<div data-static-position="" role="tooltip"><!></div>'),pa=z('<div role="tooltip"><!></div>');function Rn(a,t){if(new.target)return tt({component:Rn,...a});nt(t,!0);let r=I(t,"id",7),l=I(t,"anchor",7),c=I(t,"position",7,"right"),u=I(t,"absolute",7,!1),s=I(t,"anchorElement",7,null),o=I(t,"staticPosition",7,!1),g=I(t,"class",7,""),x=I(t,"children",7),b=I(t,"onmouseenter",7),w=I(t,"onmouseleave",7),m=I(t,"onfocusin",7),k=I(t,"onfocusout",7);const U=Xr(en()+2);tn(U);const B=an(U),T=8,i=4;let p=ne(null),_=ne(""),P=ne(void 0);const D=E(()=>c()==="bottom-right"||c()==="bottom-left"),Y=E(()=>c()==="top"),se=E(()=>o()?"relative":u()?"absolute":"fixed"),Ce=E(()=>c()==="right"?{x:-4,y:0}:c()==="bottom"?{x:4,y:0}:e(Y)?{x:0,y:4}:{x:0,y:-4});function le(v,h,ae){return Math.max(h,Math.min(ae,v))}let y=null,Q=null;function oe(){return!y?.isConnected||Q!==l()?!1:y.style.getPropertyValue("anchor-name").includes(l())||getComputedStyle(y).getPropertyValue("anchor-name").includes(l())}function Le(){return s()?s():(oe()||(y=Array.from(document.querySelectorAll('[style*="anchor-name"]')).find(v=>{const h=v.style.getPropertyValue("anchor-name"),ae=getComputedStyle(v).getPropertyValue("anchor-name");return h.includes(l())||ae.includes(l())})??null,Q=y?l():null),y)}function Me(){if(o()||u()||!e(p))return;const v=Le();if(!v)return;const h=v.getBoundingClientRect(),ae=e(p).getBoundingClientRect(),V=window.innerWidth||document.documentElement.clientWidth,te=window.innerHeight||document.documentElement.clientHeight,he=ae.width||e(p).offsetWidth,re=ae.height||e(p).offsetHeight,Re=Math.max(0,h.top-i-T),Ue=Math.max(0,te-h.bottom-i-T),je=e(Y)?!(Re<re&&Ue>Re):e(D)&&Ue<re&&Re>Ue;let d=h.left,C=h.bottom+i,F=je?Re:Ue;if(c()==="right"){const J=h.left-i-T,be=V-h.right-i-T;d=be>=he||be>=J?h.right+i:h.left-he-i,C=h.top,F=Math.max(0,te-T*2)}else c()==="bottom"?(d=h.left-he-i,C=h.bottom-re):(e(Y)||e(D))&&(c()==="bottom-left"?d=h.right-he:e(Y)&&(d=h.left+h.width/2-he/2),C=je?h.top-Math.min(re,F)-i:h.bottom+i);d=le(d,T,Math.max(T,V-he-T)),C=le(C,T,Math.max(T,te-Math.min(re,F)-T)),q(P,`${F}px`),q(_,`left: ${d}px; top: ${C}px;`)}let fe=!1;async function Ve(){fe||(fe=!0,await ja(),fe=!1,Me())}let ke=null;function ee(){ke||(ke=$r(()=>{ke=null,Me()}))}function Se(v){const h=s()??(oe()?y:null);h&&v.target instanceof Node&&!v.target.contains(h)||ee()}kt(()=>{const v=e(p),h=s();o()||u()||!v||!h||Ve()}),ya(()=>{if(o())return;let v=null;return Ve().then(()=>{if(!u()&&typeof ResizeObserver<"u"){v=new ResizeObserver(ee),e(p)&&v.observe(e(p));const h=Le();h&&v.observe(h)}}),window.addEventListener("resize",ee),window.addEventListener("scroll",Se,!0),()=>{v?.disconnect(),window.removeEventListener("resize",ee),window.removeEventListener("scroll",Se,!0),ke?.(),ke=null}});var ft={get id(){return r()},set id(v){r(v),M()},get anchor(){return l()},set anchor(v){l(v),M()},get position(){return c()},set position(v="right"){c(v),M()},get absolute(){return u()},set absolute(v=!1){u(v),M()},get anchorElement(){return s()},set anchorElement(v=null){s(v),M()},get staticPosition(){return o()},set staticPosition(v=!1){o(v),M()},get class(){return g()},set class(v=""){g(v),M()},get children(){return x()},set children(v){x(v),M()},get onmouseenter(){return b()},set onmouseenter(v){b(v),M()},get onmouseleave(){return w()},set onmouseleave(v){w(v),M()},get onfocusin(){return m()},set onfocusin(v){m(v),M()},get onfocusout(){return k()},set onfocusout(v){k(v),M()},$set:at,$on:(v,h)=>rt(t,v,h)},Ie=Ut(),ot=Fe(Ie);{var De=v=>{var h=Sn(),ae=H(h);qt(ae,()=>x()??Ht),L(h),et(h,V=>q(p,V),()=>e(p)),X(()=>{Z(h,"id",r()),qe(h,1,e(se)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${B} `+g()),Z(h,"data-surface-level",U)}),N(v,h)},ce=v=>{var h=pa();let ae;var V=H(h);qt(V,()=>x()??Ht),L(h),et(h,te=>q(p,te),()=>e(p)),X(()=>{Z(h,"id",r()),qe(h,1,e(se)+` z-50 w-64 flex flex-col border border-border pointer-events-none ${B} `+g()),Z(h,"data-surface-level",U),ae=Ct(h,"",ae,{"position-anchor":l(),right:c()==="bottom"?"anchor(left)":void 0,left:c()==="right"?"anchor(right)":e(D)?"anchor(left)":e(Y)?"anchor(center)":void 0,top:c()==="right"?"anchor(top)":e(D)?"anchor(bottom)":void 0,bottom:c()==="bottom"?"anchor(bottom)":e(Y)?"anchor(top)":void 0,"margin-right":c()==="bottom"?"8px":void 0,"margin-left":c()==="right"?"8px":void 0,"margin-top":e(D)?"4px":void 0,"margin-bottom":e(Y)?"4px":void 0,translate:e(Y)?"-50% 0":void 0})}),Ne("mouseenter",h,function(...te){b()?.apply(this,te)}),Ne("mouseleave",h,function(...te){w()?.apply(this,te)}),Ae("focusin",h,function(...te){m()?.apply(this,te)}),Ae("focusout",h,function(...te){k()?.apply(this,te)}),It(1,h,()=>Xt,()=>({tier:"fast",...e(Ce),scale:.96})),It(2,h,()=>ea,()=>({tier:"fast"})),N(v,h)},Ke=v=>{br(v,{zIndex:50,children:(h,ae)=>{var V=pa();let te;var he=H(V);qt(he,()=>x()??Ht),L(V),et(V,re=>q(p,re),()=>e(p)),X(()=>{Z(V,"id",r()),qe(V,1,e(se)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${B} `+g()),Z(V,"data-surface-level",U),te=Ct(V,e(_),te,{"max-height":e(P)})}),Ne("mouseenter",V,function(...re){b()?.apply(this,re)}),Ne("mouseleave",V,function(...re){w()?.apply(this,re)}),Ae("focusin",V,function(...re){m()?.apply(this,re)}),Ae("focusout",V,function(...re){k()?.apply(this,re)}),It(1,V,()=>Xt,()=>({tier:"fast",...e(Ce),scale:.96})),It(2,V,()=>ea,()=>({tier:"fast"})),N(h,V)},$$slots:{default:!0}})};ie(ot,v=>{o()?v(De):u()?v(ce,1):v(Ke,-1)})}return N(a,Ie),st(ft)}xa(["focusin","focusout"]);function _t(a,t){return t||/^(?:https?:|data:|blob:|workspace-asset:)/i.test(a.trim())}function En(a,t){if(t||!a)return a;const r=document.createElement("template");r.innerHTML=a;for(const l of r.content.querySelectorAll("img, video")){const c=l.getAttribute("src")||l.getAttribute("data-media-src")||"",u=[...l.querySelectorAll("source")];if(!_t(c,!1)||u.some(o=>!_t(o.getAttribute("src")||"",!1))){const o=document.createElement("img");o.setAttribute("alt",l.getAttribute("alt")||l.getAttribute("data-name")||""),o.setAttribute("data-media-unavailable","node-owned"),l.replaceWith(o);continue}l.removeAttribute("srcset");const s=l.getAttribute("poster");s&&!_t(s,!1)&&l.removeAttribute("poster")}return r.innerHTML}const Pn=[/(^|[^\\])\$(?!\$)(?=\S)(?:\\.|[^\\$\n])+?\$(?!\$)/,/(^|[^\\])\\\((?:\\.|[^\\\n])*?\\\)/,/^(?: {0,3})(?:\$\$|\\\[)/m,/^\s*[-*]\s*\[[ x]\]/m,/```/,/`[^`]+`/,/\|.*\|/,/\[.*\]\(.*\)/,/!\[.*\]\(.*\)/,/<[a-z][\s\S]*>/i,/^#{1,6}\s/m,/^\s*>\s/m,/\*\*[^*]+\*\*/,/\*[^*]+\*/,/_[^_]+_/,/~~[^~]+~~/,/^[-*_]{3,}\s*$/m,/^\s*[-*+]\s/m,/^\s*\d+\.\s/m];function Tn(a){return a&&(Pn.some(t=>t.test(a))||or(a,"markdown"))?"static":"simple"}var Fn=z("<!> <!>",1);function Ta(a,t){if(new.target)return tt({component:Ta,...a});nt(t,!0);let r=I(t,"workspaceId",7),l=I(t,"canUseMedia",7),c=ne(null),u=ne(null),s=ne(!1),o=ne(!1);function g(_){q(c,{url:_.getAttribute("src")||"",name:_.getAttribute("alt")||void 0,opener:_},!0),q(s,!0)}function x(_){const P=na(_.getAttribute("href")||"",r());return P&&l()(P)?(q(c,{url:P,name:_.textContent?.trim()||void 0,opener:_,assetLink:!0},!0),q(s,!0),!0):b(_)}function b(_){const P=wt(_.getAttribute("href")||"",r());return!P||!l()(P.url)?!1:(q(u,{url:P.url,mimeType:P.mimeType,name:_.textContent?.trim()||void 0,opener:_},!0),q(o,!0),!0)}kt(()=>{e(u)&&!wt(e(u).url,r())&&(q(o,!1),q(u,null)),e(c)?.assetLink&&!na(e(c).url,r())&&(q(s,!1),q(c,null))});var w={openImage:g,openAsset:x,get workspaceId(){return r()},set workspaceId(_){r(_),M()},get canUseMedia(){return l()},set canUseMedia(_){l(_),M()},$set:at,$on:(_,P)=>rt(t,_,P)},m=Fn(),k=Fe(m);{var U=_=>{ur(_,{get imageUrl(){return e(c).url},get imageName(){return e(c).name},get openerElement(){return e(c).opener},showActionsMenu:!0,get open(){return e(s)},set open(P){q(s,P,!0)}})},B=E(()=>e(c)&&l()(e(c).url));ie(k,_=>{e(B)&&_(U)})}var T=O(k,2);{var i=_=>{Ia(_,{get videoUrl(){return e(u).url},get videoName(){return e(u).name},get mimeType(){return e(u).mimeType},sourceKind:"workspace",get openerElement(){return e(u).opener},get open(){return e(o)},set open(P){q(o,P,!0)}})},p=E(()=>e(u)&&wt(e(u).url,r())&&l()(e(u).url));ie(T,_=>{e(p)&&_(i)})}return N(a,m),st(w)}var Ln=z('<div class="flex items-center gap-2"><!> <!></div>'),Wn=z('<div class="absolute inset-0 flex items-center justify-center bg-muted text-muted-foreground" aria-hidden="true"><svg viewBox="0 0 24 24" class="size-10" fill="none"><rect x="3" y="5" width="18" height="14" rx="2" stroke="currentColor"></rect><path d="m10 9 5 3-5 3V9Z" fill="currentColor"></path></svg></div> <video preload="metadata" playsinline="" tabindex="-1" aria-hidden="true"></video> <span class="absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/20 motion-reduce:transition-none forced-colors:bg-transparent" aria-hidden="true"><span class="flex size-11 items-center justify-center rounded-full border border-white/70 bg-black/60 text-white shadow-(--elevation-raised) forced-colors:border forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]"><svg viewBox="0 0 20 20" class="ml-0.5 size-5" fill="currentColor"><path d="m7 5 7 5-7 5V5Z"></path></svg></span></span>',3),Hn=z('<div class="group relative aspect-video w-full max-h-40 max-w-2xl" style="width: min(100%, calc(10rem * 16 / 9));"><!> <!></div>'),Nn=z('<div class="my-2 min-w-0 max-w-2xl" data-chat-video=""><!></div> <!>',1);function Fa(a,t){if(new.target)return tt({component:Fa,...a});nt(t,!0);let r=I(t,"source",7),l=I(t,"name",23,()=>A.chat_videoBlock_fromAgent_label()),c=I(t,"poster",7),u=I(t,"allowFileMedia",7,!0),s=I(t,"canOpenFile",7),o=ne(!1),g=ne(!1),x=ne(!1),b=ne(null);const w=E(()=>r().kind==="inline"?`data:${r().mimeType};base64,${r().data}`:r().url);function m(y){return _t(y,u()&&s()?.()!==!1)}const k=E(()=>!m(e(w))),U=E(()=>yt(e(w))),B=E(()=>{if(!(!c()||!m(c()))){if(/^data:image\/(?:gif|jpeg|png|webp);base64,[a-z0-9+/=]+$/i.test(c()))return c();try{const y=new URL(c());return(y.protocol==="https:"||y.protocol==="workspace-file:")&&!y.username&&!y.password?c():void 0}catch{return}}});function T(){q(g,!0),q(x,!1)}var i={get source(){return r()},set source(y){r(y),M()},get name(){return l()},set name(y=A.chat_videoBlock_fromAgent_label()){l(y),M()},get poster(){return c()},set poster(y){c(y),M()},get allowFileMedia(){return u()},set allowFileMedia(y=!0){u(y),M()},get canOpenFile(){return s()},set canOpenFile(y){s(y),M()},$set:at,$on:(y,Q)=>rt(t,y,Q)},p=Nn(),_=Fe(p),P=H(_);{var D=y=>{Vt(y,{get name(){return l()},reason:"load-failed"})},Y=y=>{var Q=Ln(),oe=H(Q);{let Me=E(()=>e(U)?.path),fe=E(()=>e(U)?.workspaceId);Vt(oe,{get name(){return l()},reason:"load-failed",get path(){return e(Me)},get workspaceId(){return e(fe)}})}var Le=O(oe,2);Kt(Le,{get videoUrl(){return e(w)},get videoName(){return l()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType}}),L(Q),N(y,Q)},se=y=>{var Q=Hn(),oe=H(Q);{let Me=E(()=>A.chat_videoBlock_play_ariaLabel({name:l()}));jt(oe,{type:"button",variant:"ghost",size:"default",class:"relative block size-full cursor-pointer overflow-hidden rounded-lg border border-border bg-muted/40 p-0 shadow-(--elevation-raised) focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 forced-colors:border",get"aria-label"(){return e(Me)},"data-testid":"chat-video-snapshot",onclick:()=>{m(e(w))&&q(o,!0)},get ref(){return e(b)},set ref(fe){q(b,fe,!0)},children:(fe,Ve)=>{var ke=Wn(),ee=O(Fe(ke),2);ee.muted=!0,Ga(2),X(()=>{Z(ee,"src",e(w)),Z(ee,"poster",e(B)),qe(ee,1,`pointer-events-none absolute inset-0 size-full object-contain transition-opacity motion-reduce:transition-none ${e(B)||e(g)&&!e(x)?"opacity-100":"opacity-0"}`)}),Ne("loadeddata",ee,T),Ne("error",ee,()=>q(x,!0)),N(fe,ke)},$$slots:{default:!0}})}var Le=O(oe,2);Kt(Le,{get videoUrl(){return e(w)},get videoName(){return l()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},triggerClass:"absolute right-1.5 top-1.5 opacity-0 transition-opacity focus-visible:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100"}),L(Q),N(y,Q)};ie(P,y=>{e(k)?y(D):e(x)?y(Y,1):y(se,-1)})}L(_);var Ce=O(_,2);{var le=y=>{Ia(y,{get videoUrl(){return e(w)},get videoName(){return l()},get poster(){return e(B)},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},get openerElement(){return e(b)},get open(){return e(o)},set open(Q){q(o,Q,!0)}})};ie(Ce,y=>{!e(x)&&!e(k)&&y(le)})}return N(a,p),st(i)}const qn=/^\s*!\[([^\]\n]*)\]\((?:<)?((?:intent:\/\/local\/|workspace-file:\/\/|workspace-asset:\/\/)[^)\s>]+)(?:>)?\)\s*$/,On=/^ {0,3}(`{3,}|~{3,})(.*)$/;function ma(a,t){if(typeof a!="string"||!a||a!==a.trim())return null;if(a.startsWith("workspace-asset://"))return wt(a,t);if(a.startsWith("workspace-file://")){const l=yt(a);if(!l||l.workspaceId!==t)return null;const c=Sa(a);return c?la(c,t):null}const r=a.startsWith("intent://")?a:`intent://local/file/${a}`;return la(r,t)}function Dn(a,t){if(a.startsWith("workspace-file://")){const r=yt(a);if(!r||r.workspaceId!==t)return!1;const l=Sa(a);return!!l&&!!St(l,t)}return!!St(a,t,{readOnly:!0})}function Un(a,t){return(t===0||!a[t-1].trim())&&(t===a.length-1||!a[t+1].trim())}function zn(a,t,r){const l=r[0];return a.findIndex((c,u)=>{if(u<=t)return!1;const s=c.trim();return s.length>=r.length&&s.split("").every(o=>o===l)})}function Bn(a,t){const r=a.split(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/BZC0V7Vm.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/7rNOGHzs.js","/app/immutable/chunks/CQ4a5a4v.js","/app/immutable/chunks/DsNWmyox.js","/app/immutable/chunks/DzMmhJrp.js","/app/immutable/chunks/DmsDslNo.js","/app/immutable/chunks/UyBYtOpv.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/Bgegixo2.js","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/CiENRH6A.js","/app/immutable/chunks/DCaHy20k.js","/app/immutable/chunks/CzrrO9Ap.js","/app/immutable/chunks/BlOn95cv.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/DZX-XWnb.js","/app/immutable/chunks/DbAK3Zju.js","/app/immutable/chunks/CRwmdgt6.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/DSjRkndX.js","/app/immutable/chunks/Ck-Ax5yG.js","/app/immutable/chunks/CFejQM6t.js","/app/immutable/chunks/D2AmAQEr.js","/app/immutable/chunks/CKEqC8_B.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/assets/observe-overflow.CJJmE3_P.css","/app/immutable/chunks/CB-g50lR.js","/app/immutable/chunks/CPQdU3ZA.js","/app/immutable/chunks/DNen9YXB.js","/app/immutable/chunks/KQTrHxko.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/C_n9DeKj.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/D-cnPaTJ.js","/app/immutable/assets/pending-agent-deletions.UE5obH5A.css","/app/immutable/chunks/CUrlpJj4.js","/app/immutable/chunks/FY5ry3XL.js","/app/immutable/chunks/DFHyIdsA.js","/app/immutable/assets/SettingsPage.D8u26cHZ.css","/app/immutable/chunks/BaQ9zUUl.js","/app/immutable/chunks/lfJ8pseq.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/eHLf0w_s.js","/app/immutable/chunks/BJzHxIyr.js","/app/immutable/chunks/BJKiZYvw.js","/app/immutable/chunks/BkBdyRjM.js","/app/immutable/chunks/D4jXWSLn.js","/app/immutable/chunks/B72MiU4f.js","/app/immutable/chunks/CR_mHSu4.js","/app/immutable/chunks/Dmhbab3K.js","/app/immutable/chunks/PtwmLAp4.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/CF7FcFf9.js","/app/immutable/assets/directory-picker-service.CzNEA6Ot.css","/app/immutable/chunks/BdmhOhOr.js","/app/immutable/chunks/ENpFvA2b.js","/app/immutable/chunks/DR0NE2_C.js","/app/immutable/chunks/yAjP_kdp.js","/app/immutable/chunks/BIiORJal.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/BGspgxWf.js","/app/immutable/chunks/DlodKoXT.js","/app/immutable/assets/AttachmentPreview.BCSCCZGm.css","/app/immutable/assets/DiagramPresentation.Bfi3xHm0.css","/app/immutable/chunks/CAiJGbLo.js","/app/immutable/assets/StreamingDiagramRenderer.BShsSvPz.css"])))=>i.map(i=>d[i]);
2
+ var za=Object.defineProperty;var Ba=(a,t,r)=>t in a?za(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r;var lt=(a,t,r)=>Ba(a,typeof t!="symbol"?t+"":t,r);import{bo as A,t as tt,bq as I,a_ as ie,by as at,b as rt,bs as Va,bu as Jt,_ as ka}from"./7rNOGHzs.js";import{bs as nt,a5 as H,aD as e,bA as L,b_ as X,W as N,bn as st,c9 as E,aA as M,aB as z,ca as kt,bk as ya,c6 as Ka,cd as Wt,bV as ne,bS as O,ay as Fe,bl as me,bO as ge,ai as xa,a7 as Ut,c0 as ja,bf as Ht,bH as q,aw as Ne,aj as Ae,be as Ga,c3 as ut,bb as Mt,aF as Ya,br as Qa,bj as Ja}from"./B8o4lNgr.js";import{d as Za,f as $a,k as qe,l as Ct,s as Z,a as Xe,h as zt,i as Xa}from"./DmsDslNo.js";import{aN as er,cU as tr,L as ar,av as rr,di as nr,V as sr,dl as Aa,B as or,$ as ir}from"./KQTrHxko.js";import{t as Bt}from"./Ck-Ax5yG.js";import{a6 as cr,aj as lr,A as dr,o as ur,a3 as Ia,s as Vt,a2 as Kt,az as yt,aW as Ma,n as fr,aB as pr,aV as mr}from"./BIiORJal.js";import{l as Zt}from"./C5G0q6V9.js";import{bJ as gr,bG as vr,bH as $t,ap as hr}from"./CB-g50lR.js";import{w as dt,P as br}from"./DSjRkndX.js";import{f as jt,bc as Nt}from"./Bgegixo2.js";import{t as Oe,v as wr,H as It,E as Xt,c as ea}from"./DzMmhJrp.js";import{qY as Ca,Hq as ve,lZ as _r,fD as kr,mU as yr,tu as xr,a as Ar,v4 as Ir,se as Mr,qG as Cr,g as Sr,bi as ta,u9 as Rr,s2 as Er,ub as Pr}from"./CRwmdgt6.js";import{c as Tr,l as ht}from"./ChTqQfQN.js";import{o as Fr}from"./CF7FcFf9.js";import{aP as Lr,aQ as aa,bz as Wr,aA as Hr,by as Nr,aE as qr,c_ as Or,cO as Dr,F as bt,ax as ra,bH as Ur,bC as zr}from"./CFejQM6t.js";import{l as Br}from"./CPQdU3ZA.js";import{p as Vr,cW as wt,cV as na,an as Kr,cY as Sa,a7 as St,aE as Ra,aV as jr,aw as Gr,a6 as sa,r as Yr,aM as Qr,aR as Jr,F as Zr}from"./DR0NE2_C.js";import{s as qt}from"./CQ4a5a4v.js";import{b as et}from"./D2g8BuR1.js";import{s as $r}from"./DZX-XWnb.js";import{c as Xr,u as en,s as tn,a as an}from"./D2AmAQEr.js";import{N as oa,J as ia}from"./BZC0V7Vm.js";import{g as ca}from"./DsNWmyox.js";import{X as la}from"./yAjP_kdp.js";const rn=new Set(["failed","blocked","needs_attention","in_progress"]),nn={failed:{visual:"icon",icon:Dr,className:"text-foreground"},blocked:{visual:"icon",icon:Or,className:"text-danger"},needs_attention:{visual:"icon",icon:qr,className:"text-warning-ink"},in_progress:{visual:"dot",icon:null,className:"workspace-status-color-active"},waiting:{visual:"icon",icon:Nr,className:"text-muted-foreground"},unread:{visual:"dot",icon:null,className:"workspace-status-color-unread"},not_started:{visual:"dot",icon:null,className:"text-muted-foreground/35"},idle:{visual:"dot",icon:null,className:"text-muted-foreground/35"},complete:{visual:"icon",icon:Hr,className:"text-success"},pr_queued:{visual:"icon",icon:Wr,className:"text-info"},pr_ready:{visual:"icon",icon:aa,className:"text-success"},pr_open:{visual:"icon",icon:aa,className:"text-info"},pr_merged:{visual:"icon",icon:Lr,className:"text-purple-500"}};function sn(a){switch(a){case"failed":return A.workspace_statusIcon_failed_label();case"blocked":return A.workspace_statusIcon_blocked_label();case"needs_attention":return A.workspace_statusIcon_needsAttention_label();case"in_progress":return A.workspace_statusIcon_inProgress_label();case"waiting":return A.workspace_taskStatus_waiting_label();case"unread":return A.layout_activeCard_unread_header();case"not_started":return A.workspace_statusIcon_notStarted_label();case"idle":return A.workspace_statusIcon_idle_label();case"complete":return A.workspace_statusIcon_complete_label();case"pr_queued":return A.workspace_statusIcon_prQueued_label();case"pr_ready":return A.workspace_statusIcon_prReady_label();case"pr_open":return A.workspace_statusIcon_prOpen_label();case"pr_merged":return A.workspace_statusIcon_prMerged_label()}}function on(a){const t=Ca(a.displayStatus)?a.displayStatus:"not_started";return rn.has(t)?t:a.attention==="unread"?"unread":a.waiting===!0?"waiting":t}function Ea(a){const t=a==="waiting"||a==="unread"||Ca(a)?a:"not_started",r=sn(t);return{state:t,...nn[t],label:r,tooltip:r,accessibleName:r}}var cn=z('<span class="workspace-status-dot svelte-14zk5l0" data-workspace-status-dot=""></span>'),ln=z("<span><!></span>");function Pa(a,t){if(new.target)return tt({component:Pa,...a});nt(t,!0);let r=I(t,"status",7),l=I(t,"size",7,14),c=I(t,"decorative",7,!1),u=I(t,"class",7);const s=E(()=>Ea(r()));var o={get status(){return r()},set status(m){r(m),M()},get size(){return l()},set size(m=14){l(m),M()},get decorative(){return c()},set decorative(m=!1){c(m),M()},get class(){return u()},set class(m){u(m),M()},$set:at,$on:(m,k)=>rt(t,m,k)},g=ln(),x=H(g);{var b=m=>{var k=cn();N(m,k)},w=m=>{bt(m,{get icon(){return e(s).icon},class:"size-full!"})};ie(x,m=>{e(s).visual==="dot"?m(b):e(s).icon&&m(w,1)})}return L(g),X(m=>{qe(g,1,m,"svelte-14zk5l0"),Ct(g,`width: ${l()??""}px; height: ${l()??""}px;`),Z(g,"role",c()?void 0:"img"),Z(g,"aria-label",c()?void 0:e(s).accessibleName),Z(g,"aria-hidden",c()?"true":void 0),Z(g,"title",c()?void 0:e(s).tooltip),Z(g,"data-workspace-status",e(s).state),Z(g,"data-workspace-status-visual",e(s).visual),Z(g,"data-workspace-status-icon",e(s).icon?.iconName)},[()=>Za($a("workspace-status-icon inline-flex shrink-0 items-center justify-center forced-colors:text-[CanvasText]",e(s).className,u()))]),N(a,g),st(o)}const Gt=6e4,Yt=60*Gt,Qt=24*Yt,da=30*Qt;function dn(a,t=new Date){if(a==null)return null;const r=a instanceof Date?a:new Date(a),l=r.getTime(),c=t.getTime();if(!Number.isFinite(l)||!Number.isFinite(c))return null;const u=Math.max(0,c-l);let s;u<Gt?s="<1m":u<Yt?s=`${Oe(Math.floor(u/Gt))}m`:u<Qt?s=`${Oe(Math.floor(u/Yt))}h`:u<da?s=`${Oe(Math.floor(u/Qt))}d`:s=`${Oe(Math.floor(u/da))}mo`;const o=l>c?t:r,g=wr(o,{now:t});return g?{compact:s,accessible:g,dateTime:r.toISOString()}:null}var un=z('<div><div class="grid gap-0.5 px-5 pt-4"><div class="flex min-w-0 items-center justify-between gap-3"><!> <!></div> <!> <!></div> <div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><div class="grid" data-workspace-hover-card-activity=""><!></div> <div class="pull-requests grid" data-workspace-hover-card-pr-column=""><!></div></div></div>'),fn=z('<p class="type-caption mt-1 min-w-0 line-clamp-3 text-muted-foreground" data-workspace-hover-card-summary=""> </p>'),pn=z('<span class="shrink-0 text-muted-foreground" data-workspace-hover-card-question-meta=""><span aria-hidden="true"> </span></span>'),mn=z('<span class="row-span-2 flex h-(--text-caption-line-height) items-center" aria-hidden="true"><!></span><span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-agent-name=""> </span><time class="type-caption whitespace-nowrap text-muted-foreground" data-workspace-hover-card-agent-time=""> </time> <span class="agent-detail type-caption flex min-w-0 items-start gap-1.5 text-muted-foreground svelte-1vax087" data-workspace-hover-card-agent-detail=""><span class="min-w-0 truncate" data-workspace-hover-card-agent-context=""> </span><!></span>',1),ua=z('<div role="listitem"><!></div>'),gn=z('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-overflow=""><span> </span> <!></div>'),vn=z('<section class="activity min-w-0" data-workspace-hover-card-activity="" data-workspace-hover-card-agent-table=""><div class="-mx-2 grid gap-2" role="list"></div> <!></section>'),hn=z('<!> <span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-pr-title=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-status=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-number=""> </span>',1),bn=z('<div class="grid w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center gap-x-2 rounded-sm px-2 py-0 text-left" data-workspace-hover-card-pr-row=""><!></div>'),wn=z('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-pr-overflow=""><span> </span> <!></div>'),_n=z('<section class="pull-requests min-w-0" data-workspace-hover-card-pr-column=""><div class="-mx-2 grid min-w-0 gap-2" role="list" data-workspace-hover-card-pr-list=""></div> <!></section>'),kn=z('<div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><!> <!></div>',1),yn=z('<header data-workspace-hover-card-header=""><div class="min-w-0" data-workspace-hover-card-identity=""><div class="flex min-w-0 items-center justify-between gap-3"><h2 class="type-body min-w-0 truncate font-medium text-foreground" data-workspace-hover-card-title=""> </h2> <span class="type-caption flex shrink-0 items-center gap-1.5 text-muted-foreground" data-workspace-hover-card-status=""><span class="truncate" data-workspace-hover-card-status-label=""> </span><!></span></div> <div class="type-caption mt-0.5 min-w-0 truncate text-muted-foreground" data-workspace-hover-card-repo=""> </div> <!></div></header> <!>',1),xn=z('<section class="workspace-hover-card shrink-0 overflow-hidden rounded-md bg-background text-left text-foreground shadow-(--elevation-overlay) ring-1 ring-border svelte-1vax087" data-workspace-hover-card="" data-workspace-hover-card-layout="landscape"><!></section>');function An(a,t){if(new.target)return tt({component:An,...a});nt(t,!0);const r=()=>Jt(T,"$workspaceAgents$",c),l=()=>Jt(i,"$prMonitors$",c),[c,u]=Va(),s=Tr("WorkspaceHoverCard");let o=I(t,"workspace",7),g=I(t,"isLoading",7,!1),x=I(t,"activeAgentIds",23,()=>[]),b=I(t,"loadAgentSessions",7,!0),w=I(t,"onkeydown",7),m=I(t,"staticData",7,!1);const k=Wt("");function U(){return m()?Wt([]):er(k)}function B(){return m()?Wt([]):tr(k)}const T=U(),i=B();kt(()=>k.set(o()?.id??""));let p=ne(0);ya(()=>Zt.subscribe(()=>Ka(p)));let _=E(()=>o()?.agentSummary?.agentIds??[]),P=E(()=>(e(p),o()?Zt.getStreamingAgentIdsForWorkspace(o().id):[])),D=null,Y=new Set;kt(()=>{if(!o()||!b())return;const d=String(o().id);D!==d&&(D=d,Y=new Set);for(const C of new Set([...e(_).slice(0,6),...x(),...e(P)]))Y.has(C)||(ve.dispatch(_r(d,C)),Y.add(C))});function se(d){return[d.name,d.context,d.questionMeta?.accessible,d.updated.accessible].filter(Boolean).join(". ")}function Ce(d){return d?d.kind==="attention"?d.attention.reason?.trim()||null:"text"in d&&d.text.trim()||null:null}function le(d){return dn(d.lastActivity||d.updatedAt||d.createdAt)??{compact:"—",accessible:A.workspace_hoverCard_noRecentActivity_label()}}function y(d){const C=String(d.status).toLowerCase(),F=yr(d),J=lr(d),be=J==="question"?gr(d):null,pe=Ce(rr.select(ve.state,String(d.id)));let we,Ee,_e,n,f,W,S=!1;if(J==="question"){we="attention",Ee="question",_e=be?.questions[0]?.question.trim()||pe||A.workspace_hoverCard_question_label(),n="question",f=1;const K=be?.questions.length??0;K>1&&(W={compact:`${Oe(1)}/${Oe(K)}`,accessible:A.chat_questionWizard_stepCounter_label({current:1,total:K})})}else if(J==="attention-discussion")we="attention",Ee="discussion",_e=F?.reason?.trim()||A.chat_agentCard_attentionDiscussion_label(),n="attention-discussion",f=1;else if(J==="attention-blocker"||C==="blocked")we="attention",Ee="blocker",_e=F?.reason?.trim()||A.chat_agentCard_attentionBlocker_label(),n="attention-blocker",f=0;else if(d.hasUnread)we="attention",Ee="unread",_e=pe||A.chat_newMessagesDivider_label(),S=!!pe,n="unread",f=2;else if(d.isStreaming||d.isProcessing||x().includes(String(d.id))||e(P).includes(String(d.id))||["active","busy","processing","responding","running","streaming","in_progress"].includes(C))we="active",_e=pe||A.workspace_devScripts_running_label(),S=!!pe,n=d.isProcessing?"responding":"running",f=3;else if(["waiting","pending","queued","starting"].includes(C))we="waiting",_e=pe||A.workspace_taskStatus_waiting_label(),S=!!pe,n="waiting",f=4;else return null;const j=d.agentMetadata??d.metadata;return{id:String(d.id),name:d.name?.trim()||A.workspace_fileChanges_agent_label(),group:we,attentionKind:Ee,avatarState:n,specialist:j?.specialist,context:_e,questionMeta:W,contextIsPreview:S,updated:le(d),priority:f}}let Q=E(()=>{const d=o()?.agentSummary,C=new Map;if(Array.isArray(d?.agents))for(const F of d.agents)F&&typeof F=="object"&&typeof F.id=="string"&&C.set(F.id,F.parentAgentId);return r().filter(F=>{const J=C.get(String(F.id));return!(kr(F)!=="topLevel"||typeof J=="string"&&J||F.pendingDeleteAt||F.retiredAt||String(F.status).toLowerCase()==="deleted")})}),oe=E(()=>e(Q).map(y).filter(d=>d!==null).sort((d,C)=>d.priority-C.priority)),Le=E(()=>e(oe).slice(0,6)),Me=E(()=>Math.max(0,e(oe).length-6)),fe=E(()=>o()?.repositoryName?o().repositoryOwner?`${o().repositoryOwner} / ${o().repositoryName}`:o().repositoryName:A.workspace_hoverCard_localRepository_label()),Ve=E(()=>on(o()??{})),ke=E(()=>Ea(e(Ve))),ee=E(()=>o()?.statusMessage?.trim()||"");function Se(d){if(!d)return null;const C=d.activePullRequest??d.pullRequests?.[0]??null;return C||(d.prStatus?{id:`legacy-pr-${d.prNumber??"workspace"}`,number:d.prNumber??0,url:d.prUrl??"",title:A.workspace_hoverCard_pullRequest_label(),status:d.prStatus,createdAt:d.updatedAt,updatedAt:d.updatedAt}:null)}let ft=E(()=>o()?m()?Se(o()):nr.select(ve.state,o().id)??Se(o()):null),Ie=E(()=>{if(!o()||ar(o()))return[];const d=o().repositoryOwner&&o().repositoryName?`${o().repositoryOwner}/${o().repositoryName}`:void 0;return cr({workspacePRs:o().pullRequests,activePR:e(ft),monitors:l(),workspaceRepo:d,buildPrUrl:(C,F)=>Vr(C,o().repositoryOwner,o().repositoryName,F),getDisplayTitle:C=>C.title})}),ot=E(()=>e(Ie).slice(0,3)),De=E(()=>Math.max(0,e(Ie).length-3)),ce=E(()=>e(oe).length>0),Ke=E(()=>e(Ie).length>0),v=E(()=>e(ce)||e(Ke));function h(d){const C=d.resource?.repository.provider==="gitlab"?`${d.repo} !${d.number}`:d.repo?A.workspace_card_prBadge_repoLine_tooltip({repo:d.repo,number:d.number}):A.workspace_card_prBadge_label({number:` #${d.number}`});return[sr(C,d),d.title,d.details].filter(Boolean).join(`
3
+ `)}function ae(d,C){if(d.stopPropagation(),!o()||!b())return;const F=o().id;Br.select(ve.state)!==F&&Fr(F).catch(J=>{s.warn("Failed to switch workspace for hover-card agent",{agentId:C,error:J})}),ve.dispatch(xr(F,{agentId:C}))}function V(d,C){if(d.stopPropagation(),!o()||!C.url)return;const F=o().id;ka(async()=>{const{handleLink:J}=await import("./BZC0V7Vm.js").then(be=>be.Q);return{handleLink:J}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56]),import.meta.url).then(({handleLink:J})=>J(C.url,{workspaceId:F,event:d}))}var te={get workspace(){return o()},set workspace(d){o(d),M()},get isLoading(){return g()},set isLoading(d=!1){g(d),M()},get activeAgentIds(){return x()},set activeAgentIds(d=[]){x(d),M()},get loadAgentSessions(){return b()},set loadAgentSessions(d=!0){b(d),M()},get onkeydown(){return w()},set onkeydown(d){w(d),M()},get staticData(){return m()},set staticData(d=!1){m(d),M()},$set:at,$on:(d,C)=>rt(t,d,C)},he=xn(),re=H(he);{var Re=d=>{var C=un(),F=H(C),J=H(F),be=H(J);dt(be,{class:"h-7 min-w-0 max-w-64 flex-1"});var pe=O(be,2);dt(pe,{class:"h-5 w-20 shrink-0"}),L(J);var we=O(J,2);dt(we,{class:"h-4 w-40"});var Ee=O(we,2);dt(Ee,{class:"mt-2 h-10 w-full"}),L(F);var _e=O(F,4),n=H(_e),f=H(n);dt(f,{class:"h-10 w-full"}),L(n);var W=O(n,2),S=H(W);dt(S,{class:"h-10 w-full"}),L(W),L(_e),L(C),N(d,C)},Ue=d=>{var C=yn(),F=Fe(C);let J;var be=H(F),pe=H(be),we=H(pe),Ee=me(we,!0),_e=O(we,2),n=H(_e),f=me(n,!0),W=O(n);Pa(W,{get status(){return e(Ve)},size:16,decorative:!0}),L(_e),L(pe);var S=O(pe,2),j=me(S,!0),K=O(S,2);{var $=ue=>{var We=fn(),xt=me(We,!0);Xe(We,(At,Rt)=>Bt?.(At,Rt),()=>e(ee)),X(()=>ge(xt,e(ee))),N(ue,We)};ie(K,ue=>{e(ee)&&ue($)})}L(be),L(F);var Pe=O(F,2);{var de=ue=>{var We=kn(),xt=O(Fe(We),2),At=H(xt);{var Rt=Ye=>{var ze=vn(),Ge=H(ze);zt(Ge,21,()=>e(Le),G=>G.id,(G,R)=>{var ye=ua(),Qe=H(ye);{let Je=E(()=>se(e(R)));jt(Qe,{variant:"plain",wrapContent:!1,class:"grid h-auto! min-h-8 w-full min-w-0 cursor-pointer grid-cols-[1rem_minmax(0,1fr)_auto] items-start justify-normal gap-x-2 gap-y-0 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(Je)},"data-workspace-hover-card-agent-row":!0,get"data-agent-group-row"(){return e(R).group},get"data-attention-kind"(){return e(R).attentionKind},get onkeydown(){return w()},onclick:Be=>ae(Be,e(R).id),children:(Be,pt)=>{var Te=mn(),xe=Fe(Te),He=H(xe);{let $e=E(()=>e(R).specialist??null);dr(He,{get agentId(){return e(R).id},variant:"compact",get state(){return e(R).avatarState},get specialist(){return e($e)}})}L(xe);var it=O(xe),Tt=me(it,!0),Ze=O(it),Ft=me(Ze,!0),mt=O(Ze,2),gt=H(mt),Lt=me(gt,!0);Xe(gt,($e,ct)=>Bt?.($e,ct),()=>e(R).context);var qa=O(gt);{var Oa=$e=>{var ct=pn(),Da=H(ct),Ua=me(Da,!0);L(ct),X(()=>{Z(ct,"aria-label",e(R).questionMeta.accessible),ge(Ua,e(R).questionMeta.compact)}),N($e,ct)};ie(qa,$e=>{e(R).questionMeta&&$e(Oa)})}L(mt),X(()=>{ge(Tt,e(R).name),Z(Ze,"datetime",e(R).updated.dateTime),Z(Ze,"aria-label",e(R).updated.accessible),ge(Ft,e(R).updated.compact),Z(mt,"data-workspace-hover-card-agent-preview",e(R).contextIsPreview||void 0),ge(Lt,e(R).context)}),N(Be,Te)},$$slots:{default:!0}})}L(ye),N(G,ye)}),L(Ge);var Et=O(Ge,2);{var Pt=G=>{var R=gn(),ye=H(R),Qe=me(ye,!0),Je=O(ye,2);bt(Je,{get icon(){return ra},size:10}),L(R),X(Be=>ge(Qe,Be),[()=>A.workspace_hoverCard_moreAgents_label({count:Oe(e(Me))})]),N(G,R)};ie(Et,G=>{e(Me)&&G(Pt)})}L(ze),X(G=>Z(ze,"aria-label",G),[()=>A.workspace_multiSelectSidebar_agentsTab_label()]),N(Ye,ze)};ie(At,Ye=>{e(ce)&&Ye(Rt)})}var Ha=O(At,2);{var Na=Ye=>{var ze=_n(),Ge=H(ze);zt(Ge,21,()=>e(ot),G=>G.identity,(G,R)=>{var ye=ua();{const pt=Te=>{var xe=hn(),He=Fe(xe);bt(He,{get icon(){return e(R).statusIcon},size:16,get class(){return`shrink-0 justify-self-start ${e(R).foregroundClass??""}`}});var it=O(He,2),Tt=me(it,!0),Ze=O(it,2),Ft=me(Ze,!0),mt=O(Ze,2),gt=me(mt,!0);X(Lt=>{ge(Tt,Lt),ge(Ft,e(R).accessibleStateLabel),ge(gt,e(R).numberLabel??`#${e(R).number}`)},[()=>e(R).title||(e(R).resource?.repository.provider==="gitlab"?A.workspace_hoverCard_mergeRequest_label():A.workspace_hoverCard_pullRequest_label())]),N(Te,xe)};var Qe=H(ye);{var Je=Te=>{{let xe=E(()=>h(e(R)));jt(Te,{variant:"plain",wrapContent:!1,class:"grid h-auto! w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center justify-normal gap-x-2 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(xe)},"data-workspace-hover-card-pr-row":!0,get"data-pr-identity"(){return e(R).identity},get"data-pr-status"(){return e(R).status},get onkeydown(){return w()},onclick:He=>V(He,e(R)),children:(He,it)=>{pt(He)},$$slots:{default:!0}})}},Be=Te=>{var xe=bn(),He=H(xe);pt(He),L(xe),X(()=>{Z(xe,"data-pr-identity",e(R).identity),Z(xe,"data-pr-status",e(R).status)}),N(Te,xe)};ie(Qe,Te=>{e(R).url?Te(Je):Te(Be,-1)})}L(ye)}X(pt=>Z(ye,"aria-label",pt),[()=>e(R).url?void 0:h(e(R))]),N(G,ye)}),L(Ge);var Et=O(Ge,2);{var Pt=G=>{var R=wn(),ye=H(R),Qe=me(ye,!0),Je=O(ye,2);bt(Je,{get icon(){return ra},size:10}),L(R),X(Be=>ge(Qe,Be),[()=>A.workspace_hoverCard_moreItems_label({count:Oe(e(De))})]),N(G,R)};ie(Et,G=>{e(De)&&G(Pt)})}L(ze),X((G,R)=>{Z(ze,"aria-label",G),Z(Ge,"aria-label",R)},[()=>e(Ie).every(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_mergeRequests_label():e(Ie).some(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_reviews_label():A.workspace_hoverCard_pullRequests_label(),()=>e(Ie).every(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_mergeRequests_label():e(Ie).some(G=>G.resource?.repository.provider==="gitlab")?A.workspace_hoverCard_reviews_label():A.workspace_hoverCard_pullRequests_label()]),N(Ye,ze)};ie(Ha,Ye=>{e(Ke)&&Ye(Na)})}L(xt),N(ue,We)};ie(Pe,ue=>{e(v)&&ue(de)})}X(ue=>{J=qe(F,1,"min-w-0 px-5 pt-4",null,J,{"pb-4":!e(v)}),ge(Ee,ue),ge(f,e(ke).label),ge(j,e(fe))},[()=>o().title||A.workspace_links_untitled_label()]),N(d,C)};ie(re,d=>{g()||!o()?d(Re):d(Ue,-1)})}L(he),N(a,he);var je=st(te);return u(),je}const fa=800,Ss=175,In=300;function Mn(){let a=0,t=null;const r=new Set,l=new Set;function c(){return a>0||t!==null?0:fa}function u(){const o=c();r.forEach(g=>g(o))}function s(){t!==null&&(clearTimeout(t),t=null)}return{get currentOpenDelay(){return c()},subscribe(o){return r.add(o),o(c()),()=>r.delete(o)},notifyOpened(){const o=a===0&&t===null;s(),a+=1,o&&u()},notifyClosed(){a!==0&&(a-=1,!(a>0)&&(s(),t=setTimeout(()=>{t=null,u()},In)))},deferClose(o){return l.add(o),()=>l.delete(o)},settleDeferredCloses(){const o=[...l];l.clear(),o.forEach(g=>g())},reset(){const o=c()!==fa;s(),a=0,l.clear(),o&&u()}}}const Rs=Mn();function Ot(a){const t=Aa.select(ve.state,a);return t!==void 0&&Cr(t)}function Cn(a,t){if(!Ot(a))return[];const r=vr.select(ve.state,a),l=$t.select(ve.state,a),c=hr.select(ve.state),u=[];for(let s=0;s<Ar;s+=1){const o=c[s],g=o&&o!==a?Aa.select(ve.state,o):void 0;u.push({id:`assign-micro-key-${s+1}`,label:g?A.workspace_card_assignOccupiedMicroKey_label({number:Oe(s+1),title:g.title}):A.workspace_card_assignMicroKeyNumber_label({number:Oe(s+1)}),checked:r===s,closeOnSelect:!0,onClick:()=>{Ot(a)&&ve.dispatch(Ir(s,a)),t()}})}return l!==null&&(u.push({type:"separator"}),u.push({id:"unassign-micro-key",label:A.workspace_card_unassignMicroKey_label(),onClick:()=>{Ot(a)&&$t.select(ve.state,a)===l&&ve.dispatch(Mr(l)),t()}})),u}function Es(a,{connected:t,onClose:r}){if(!t)return[];const l=Cn(a,r);if(l.length===0)return[];const c=l.filter(s=>"id"in s&&s.id!=="unassign-micro-key"),u=l.find(s=>"id"in s&&s.id==="unassign-micro-key");return[{id:"assign-micro-key",label:A.workspace_card_assignMicroKey_label(),icon:Ur,onClick:()=>{},selection:"single",submenu:c},...u?[u]:[]]}var Sn=z('<div data-static-position="" role="tooltip"><!></div>'),pa=z('<div role="tooltip"><!></div>');function Rn(a,t){if(new.target)return tt({component:Rn,...a});nt(t,!0);let r=I(t,"id",7),l=I(t,"anchor",7),c=I(t,"position",7,"right"),u=I(t,"absolute",7,!1),s=I(t,"anchorElement",7,null),o=I(t,"staticPosition",7,!1),g=I(t,"class",7,""),x=I(t,"children",7),b=I(t,"onmouseenter",7),w=I(t,"onmouseleave",7),m=I(t,"onfocusin",7),k=I(t,"onfocusout",7);const U=Xr(en()+2);tn(U);const B=an(U),T=8,i=4;let p=ne(null),_=ne(""),P=ne(void 0);const D=E(()=>c()==="bottom-right"||c()==="bottom-left"),Y=E(()=>c()==="top"),se=E(()=>o()?"relative":u()?"absolute":"fixed"),Ce=E(()=>c()==="right"?{x:-4,y:0}:c()==="bottom"?{x:4,y:0}:e(Y)?{x:0,y:4}:{x:0,y:-4});function le(v,h,ae){return Math.max(h,Math.min(ae,v))}let y=null,Q=null;function oe(){return!y?.isConnected||Q!==l()?!1:y.style.getPropertyValue("anchor-name").includes(l())||getComputedStyle(y).getPropertyValue("anchor-name").includes(l())}function Le(){return s()?s():(oe()||(y=Array.from(document.querySelectorAll('[style*="anchor-name"]')).find(v=>{const h=v.style.getPropertyValue("anchor-name"),ae=getComputedStyle(v).getPropertyValue("anchor-name");return h.includes(l())||ae.includes(l())})??null,Q=y?l():null),y)}function Me(){if(o()||u()||!e(p))return;const v=Le();if(!v)return;const h=v.getBoundingClientRect(),ae=e(p).getBoundingClientRect(),V=window.innerWidth||document.documentElement.clientWidth,te=window.innerHeight||document.documentElement.clientHeight,he=ae.width||e(p).offsetWidth,re=ae.height||e(p).offsetHeight,Re=Math.max(0,h.top-i-T),Ue=Math.max(0,te-h.bottom-i-T),je=e(Y)?!(Re<re&&Ue>Re):e(D)&&Ue<re&&Re>Ue;let d=h.left,C=h.bottom+i,F=je?Re:Ue;if(c()==="right"){const J=h.left-i-T,be=V-h.right-i-T;d=be>=he||be>=J?h.right+i:h.left-he-i,C=h.top,F=Math.max(0,te-T*2)}else c()==="bottom"?(d=h.left-he-i,C=h.bottom-re):(e(Y)||e(D))&&(c()==="bottom-left"?d=h.right-he:e(Y)&&(d=h.left+h.width/2-he/2),C=je?h.top-Math.min(re,F)-i:h.bottom+i);d=le(d,T,Math.max(T,V-he-T)),C=le(C,T,Math.max(T,te-Math.min(re,F)-T)),q(P,`${F}px`),q(_,`left: ${d}px; top: ${C}px;`)}let fe=!1;async function Ve(){fe||(fe=!0,await ja(),fe=!1,Me())}let ke=null;function ee(){ke||(ke=$r(()=>{ke=null,Me()}))}function Se(v){const h=s()??(oe()?y:null);h&&v.target instanceof Node&&!v.target.contains(h)||ee()}kt(()=>{const v=e(p),h=s();o()||u()||!v||!h||Ve()}),ya(()=>{if(o())return;let v=null;return Ve().then(()=>{if(!u()&&typeof ResizeObserver<"u"){v=new ResizeObserver(ee),e(p)&&v.observe(e(p));const h=Le();h&&v.observe(h)}}),window.addEventListener("resize",ee),window.addEventListener("scroll",Se,!0),()=>{v?.disconnect(),window.removeEventListener("resize",ee),window.removeEventListener("scroll",Se,!0),ke?.(),ke=null}});var ft={get id(){return r()},set id(v){r(v),M()},get anchor(){return l()},set anchor(v){l(v),M()},get position(){return c()},set position(v="right"){c(v),M()},get absolute(){return u()},set absolute(v=!1){u(v),M()},get anchorElement(){return s()},set anchorElement(v=null){s(v),M()},get staticPosition(){return o()},set staticPosition(v=!1){o(v),M()},get class(){return g()},set class(v=""){g(v),M()},get children(){return x()},set children(v){x(v),M()},get onmouseenter(){return b()},set onmouseenter(v){b(v),M()},get onmouseleave(){return w()},set onmouseleave(v){w(v),M()},get onfocusin(){return m()},set onfocusin(v){m(v),M()},get onfocusout(){return k()},set onfocusout(v){k(v),M()},$set:at,$on:(v,h)=>rt(t,v,h)},Ie=Ut(),ot=Fe(Ie);{var De=v=>{var h=Sn(),ae=H(h);qt(ae,()=>x()??Ht),L(h),et(h,V=>q(p,V),()=>e(p)),X(()=>{Z(h,"id",r()),qe(h,1,e(se)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${B} `+g()),Z(h,"data-surface-level",U)}),N(v,h)},ce=v=>{var h=pa();let ae;var V=H(h);qt(V,()=>x()??Ht),L(h),et(h,te=>q(p,te),()=>e(p)),X(()=>{Z(h,"id",r()),qe(h,1,e(se)+` z-50 w-64 flex flex-col border border-border pointer-events-none ${B} `+g()),Z(h,"data-surface-level",U),ae=Ct(h,"",ae,{"position-anchor":l(),right:c()==="bottom"?"anchor(left)":void 0,left:c()==="right"?"anchor(right)":e(D)?"anchor(left)":e(Y)?"anchor(center)":void 0,top:c()==="right"?"anchor(top)":e(D)?"anchor(bottom)":void 0,bottom:c()==="bottom"?"anchor(bottom)":e(Y)?"anchor(top)":void 0,"margin-right":c()==="bottom"?"8px":void 0,"margin-left":c()==="right"?"8px":void 0,"margin-top":e(D)?"4px":void 0,"margin-bottom":e(Y)?"4px":void 0,translate:e(Y)?"-50% 0":void 0})}),Ne("mouseenter",h,function(...te){b()?.apply(this,te)}),Ne("mouseleave",h,function(...te){w()?.apply(this,te)}),Ae("focusin",h,function(...te){m()?.apply(this,te)}),Ae("focusout",h,function(...te){k()?.apply(this,te)}),It(1,h,()=>Xt,()=>({tier:"fast",...e(Ce),scale:.96})),It(2,h,()=>ea,()=>({tier:"fast"})),N(v,h)},Ke=v=>{br(v,{zIndex:50,children:(h,ae)=>{var V=pa();let te;var he=H(V);qt(he,()=>x()??Ht),L(V),et(V,re=>q(p,re),()=>e(p)),X(()=>{Z(V,"id",r()),qe(V,1,e(se)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${B} `+g()),Z(V,"data-surface-level",U),te=Ct(V,e(_),te,{"max-height":e(P)})}),Ne("mouseenter",V,function(...re){b()?.apply(this,re)}),Ne("mouseleave",V,function(...re){w()?.apply(this,re)}),Ae("focusin",V,function(...re){m()?.apply(this,re)}),Ae("focusout",V,function(...re){k()?.apply(this,re)}),It(1,V,()=>Xt,()=>({tier:"fast",...e(Ce),scale:.96})),It(2,V,()=>ea,()=>({tier:"fast"})),N(h,V)},$$slots:{default:!0}})};ie(ot,v=>{o()?v(De):u()?v(ce,1):v(Ke,-1)})}return N(a,Ie),st(ft)}xa(["focusin","focusout"]);function _t(a,t){return t||/^(?:https?:|data:|blob:|workspace-asset:)/i.test(a.trim())}function En(a,t){if(t||!a)return a;const r=document.createElement("template");r.innerHTML=a;for(const l of r.content.querySelectorAll("img, video")){const c=l.getAttribute("src")||l.getAttribute("data-media-src")||"",u=[...l.querySelectorAll("source")];if(!_t(c,!1)||u.some(o=>!_t(o.getAttribute("src")||"",!1))){const o=document.createElement("img");o.setAttribute("alt",l.getAttribute("alt")||l.getAttribute("data-name")||""),o.setAttribute("data-media-unavailable","node-owned"),l.replaceWith(o);continue}l.removeAttribute("srcset");const s=l.getAttribute("poster");s&&!_t(s,!1)&&l.removeAttribute("poster")}return r.innerHTML}const Pn=[/(^|[^\\])\$(?!\$)(?=\S)(?:\\.|[^\\$\n])+?\$(?!\$)/,/(^|[^\\])\\\((?:\\.|[^\\\n])*?\\\)/,/^(?: {0,3})(?:\$\$|\\\[)/m,/^\s*[-*]\s*\[[ x]\]/m,/```/,/`[^`]+`/,/\|.*\|/,/\[.*\]\(.*\)/,/!\[.*\]\(.*\)/,/<[a-z][\s\S]*>/i,/^#{1,6}\s/m,/^\s*>\s/m,/\*\*[^*]+\*\*/,/\*[^*]+\*/,/_[^_]+_/,/~~[^~]+~~/,/^[-*_]{3,}\s*$/m,/^\s*[-*+]\s/m,/^\s*\d+\.\s/m];function Tn(a){return a&&(Pn.some(t=>t.test(a))||or(a,"markdown"))?"static":"simple"}var Fn=z("<!> <!>",1);function Ta(a,t){if(new.target)return tt({component:Ta,...a});nt(t,!0);let r=I(t,"workspaceId",7),l=I(t,"canUseMedia",7),c=ne(null),u=ne(null),s=ne(!1),o=ne(!1);function g(_){q(c,{url:_.getAttribute("src")||"",name:_.getAttribute("alt")||void 0,opener:_},!0),q(s,!0)}function x(_){const P=na(_.getAttribute("href")||"",r());return P&&l()(P)?(q(c,{url:P,name:_.textContent?.trim()||void 0,opener:_,assetLink:!0},!0),q(s,!0),!0):b(_)}function b(_){const P=wt(_.getAttribute("href")||"",r());return!P||!l()(P.url)?!1:(q(u,{url:P.url,mimeType:P.mimeType,name:_.textContent?.trim()||void 0,opener:_},!0),q(o,!0),!0)}kt(()=>{e(u)&&!wt(e(u).url,r())&&(q(o,!1),q(u,null)),e(c)?.assetLink&&!na(e(c).url,r())&&(q(s,!1),q(c,null))});var w={openImage:g,openAsset:x,get workspaceId(){return r()},set workspaceId(_){r(_),M()},get canUseMedia(){return l()},set canUseMedia(_){l(_),M()},$set:at,$on:(_,P)=>rt(t,_,P)},m=Fn(),k=Fe(m);{var U=_=>{ur(_,{get imageUrl(){return e(c).url},get imageName(){return e(c).name},get openerElement(){return e(c).opener},showActionsMenu:!0,get open(){return e(s)},set open(P){q(s,P,!0)}})},B=E(()=>e(c)&&l()(e(c).url));ie(k,_=>{e(B)&&_(U)})}var T=O(k,2);{var i=_=>{Ia(_,{get videoUrl(){return e(u).url},get videoName(){return e(u).name},get mimeType(){return e(u).mimeType},sourceKind:"workspace",get openerElement(){return e(u).opener},get open(){return e(o)},set open(P){q(o,P,!0)}})},p=E(()=>e(u)&&wt(e(u).url,r())&&l()(e(u).url));ie(T,_=>{e(p)&&_(i)})}return N(a,m),st(w)}var Ln=z('<div class="flex items-center gap-2"><!> <!></div>'),Wn=z('<div class="absolute inset-0 flex items-center justify-center bg-muted text-muted-foreground" aria-hidden="true"><svg viewBox="0 0 24 24" class="size-10" fill="none"><rect x="3" y="5" width="18" height="14" rx="2" stroke="currentColor"></rect><path d="m10 9 5 3-5 3V9Z" fill="currentColor"></path></svg></div> <video preload="metadata" playsinline="" tabindex="-1" aria-hidden="true"></video> <span class="absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/20 motion-reduce:transition-none forced-colors:bg-transparent" aria-hidden="true"><span class="flex size-11 items-center justify-center rounded-full border border-white/70 bg-black/60 text-white shadow-(--elevation-raised) forced-colors:border forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]"><svg viewBox="0 0 20 20" class="ml-0.5 size-5" fill="currentColor"><path d="m7 5 7 5-7 5V5Z"></path></svg></span></span>',3),Hn=z('<div class="group relative aspect-video w-full max-h-40 max-w-2xl" style="width: min(100%, calc(10rem * 16 / 9));"><!> <!></div>'),Nn=z('<div class="my-2 min-w-0 max-w-2xl" data-chat-video=""><!></div> <!>',1);function Fa(a,t){if(new.target)return tt({component:Fa,...a});nt(t,!0);let r=I(t,"source",7),l=I(t,"name",23,()=>A.chat_videoBlock_fromAgent_label()),c=I(t,"poster",7),u=I(t,"allowFileMedia",7,!0),s=I(t,"canOpenFile",7),o=ne(!1),g=ne(!1),x=ne(!1),b=ne(null);const w=E(()=>r().kind==="inline"?`data:${r().mimeType};base64,${r().data}`:r().url);function m(y){return _t(y,u()&&s()?.()!==!1)}const k=E(()=>!m(e(w))),U=E(()=>yt(e(w))),B=E(()=>{if(!(!c()||!m(c()))){if(/^data:image\/(?:gif|jpeg|png|webp);base64,[a-z0-9+/=]+$/i.test(c()))return c();try{const y=new URL(c());return(y.protocol==="https:"||y.protocol==="workspace-file:")&&!y.username&&!y.password?c():void 0}catch{return}}});function T(){q(g,!0),q(x,!1)}var i={get source(){return r()},set source(y){r(y),M()},get name(){return l()},set name(y=A.chat_videoBlock_fromAgent_label()){l(y),M()},get poster(){return c()},set poster(y){c(y),M()},get allowFileMedia(){return u()},set allowFileMedia(y=!0){u(y),M()},get canOpenFile(){return s()},set canOpenFile(y){s(y),M()},$set:at,$on:(y,Q)=>rt(t,y,Q)},p=Nn(),_=Fe(p),P=H(_);{var D=y=>{Vt(y,{get name(){return l()},reason:"load-failed"})},Y=y=>{var Q=Ln(),oe=H(Q);{let Me=E(()=>e(U)?.path),fe=E(()=>e(U)?.workspaceId);Vt(oe,{get name(){return l()},reason:"load-failed",get path(){return e(Me)},get workspaceId(){return e(fe)}})}var Le=O(oe,2);Kt(Le,{get videoUrl(){return e(w)},get videoName(){return l()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType}}),L(Q),N(y,Q)},se=y=>{var Q=Hn(),oe=H(Q);{let Me=E(()=>A.chat_videoBlock_play_ariaLabel({name:l()}));jt(oe,{type:"button",variant:"ghost",size:"default",class:"relative block size-full cursor-pointer overflow-hidden rounded-lg border border-border bg-muted/40 p-0 shadow-(--elevation-raised) focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 forced-colors:border",get"aria-label"(){return e(Me)},"data-testid":"chat-video-snapshot",onclick:()=>{m(e(w))&&q(o,!0)},get ref(){return e(b)},set ref(fe){q(b,fe,!0)},children:(fe,Ve)=>{var ke=Wn(),ee=O(Fe(ke),2);ee.muted=!0,Ga(2),X(()=>{Z(ee,"src",e(w)),Z(ee,"poster",e(B)),qe(ee,1,`pointer-events-none absolute inset-0 size-full object-contain transition-opacity motion-reduce:transition-none ${e(B)||e(g)&&!e(x)?"opacity-100":"opacity-0"}`)}),Ne("loadeddata",ee,T),Ne("error",ee,()=>q(x,!0)),N(fe,ke)},$$slots:{default:!0}})}var Le=O(oe,2);Kt(Le,{get videoUrl(){return e(w)},get videoName(){return l()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},triggerClass:"absolute right-1.5 top-1.5 opacity-0 transition-opacity focus-visible:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100"}),L(Q),N(y,Q)};ie(P,y=>{e(k)?y(D):e(x)?y(Y,1):y(se,-1)})}L(_);var Ce=O(_,2);{var le=y=>{Ia(y,{get videoUrl(){return e(w)},get videoName(){return l()},get poster(){return e(B)},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},get openerElement(){return e(b)},get open(){return e(o)},set open(Q){q(o,Q,!0)}})};ie(Ce,y=>{!e(x)&&!e(k)&&y(le)})}return N(a,p),st(i)}const qn=/^\s*!\[([^\]\n]*)\]\((?:<)?((?:intent:\/\/local\/|workspace-file:\/\/|workspace-asset:\/\/)[^)\s>]+)(?:>)?\)\s*$/,On=/^ {0,3}(`{3,}|~{3,})(.*)$/;function ma(a,t){if(typeof a!="string"||!a||a!==a.trim())return null;if(a.startsWith("workspace-asset://"))return wt(a,t);if(a.startsWith("workspace-file://")){const l=yt(a);if(!l||l.workspaceId!==t)return null;const c=Sa(a);return c?la(c,t):null}const r=a.startsWith("intent://")?a:`intent://local/file/${a}`;return la(r,t)}function Dn(a,t){if(a.startsWith("workspace-file://")){const r=yt(a);if(!r||r.workspaceId!==t)return!1;const l=Sa(a);return!!l&&!!St(l,t)}return!!St(a,t,{readOnly:!0})}function Un(a,t){return(t===0||!a[t-1].trim())&&(t===a.length-1||!a[t+1].trim())}function zn(a,t,r){const l=r[0];return a.findIndex((c,u)=>{if(u<=t)return!1;const s=c.trim();return s.length>=r.length&&s.split("").every(o=>o===l)})}function Bn(a,t){const r=a.split(`
4
4
  `),l=[];let c=[];const u=()=>{const s=c.join(`
5
5
  `);s.trim()&&l.push({type:"markdown",content:s}),c=[]};for(let s=0;s<r.length;s+=1){const o=r[s].match(On);if(o){const k=zn(r,s,o[1]);if(k>s){const U=r.slice(s,k+1);if(o[2].trim()==="ws-block:video")try{const B=JSON.parse(r.slice(s+1,k).join(`
6
- `)),T=ma(B?.path,t);if(T){u(),l.push({type:"video",source:T,name:typeof B.path=="string"?B.path:void 0,poster:typeof B.poster=="string"?B.poster:void 0}),s=k;continue}}catch{}c.push(...U),s=k;continue}c.push(...r.slice(s));break}const x=!/^(?: {4}|\t)/.test(r[s])&&Un(r,s)?r[s].match(qn):null;if(!x){c.push(r[s]);continue}const[,b,w]=x,m=ma(w,t);m?(u(),l.push({type:"video",source:m,name:b||void 0})):w.startsWith("workspace-asset://")&&!Kr(w)||Dn(w,t)?c.push(r[s]):c.push(`[${b}](${w})`)}return u(),l}function vt(a){return Ma(a.getAttribute("src")||"")}function Dt(a){return a instanceof HTMLImageElement?a:a instanceof HTMLAnchorElement?a.querySelector("img"):null}function Vn(a,t){const r=a.getBoundingClientRect(),l=t.getBoundingClientRect();return{top:r.top-l.top+6,right:l.right-r.right+6}}function ga(a,t){const r=document.activeElement;return!!(r&&(r===a||r===a?.closest("a")||t?.contains(r)))}function Kn(a,t){const r=a.getAttribute("src")||"",l=yt(r)?.path??Ra(r,t)?.path;if(l)return l;if(r.startsWith("workspace-asset://")){const c=r.split(/[?#]/)[0].split("/").pop();if(c)return c}if(r&&!/^[a-z][a-z0-9+.-]*:/i.test(r)&&!r.startsWith("//"))try{return decodeURI(r)}catch{return r}return a.getAttribute("alt")||void 0}const La="data-image-sized",va=a=>typeof a=="number"&&Number.isInteger(a)&&a>0;function jn(a){try{return encodeURI(a).replace(/%25/g,"%")}catch{return null}}function Gn(a){return a.startsWith("workspace-file://")?a.split(/[?#]/)[0]:a}function Yn(a,t,r){const l=new Map;for(const[c,u]of Object.entries(a)){if(!u||!va(u.width)||!va(u.height))continue;const s={width:u.width,height:u.height},o=new Set([c]),g=jn(c);g&&o.add(g);for(const x of[...o]){const b=St(x,t);if(b&&o.add(b),r!==void 0){const w=jr(x,r);if(w){const m=St(`intent://local/file/${w.split("/").map(encodeURIComponent).join("/")}`,t);m&&o.add(m)}}}for(const x of o)l.has(x)||l.set(x,s)}return l}function Qn(a,t,r,l){if(!t||!a.includes("<img"))return a;const c=Yn(t,r,l);return c.size===0?a:a.replace(/<img\b(?:[^>"']|"[^"]*"|'[^']*')*>/gi,u=>{if(/\s(?:width|height)="/i.test(u))return u;const s=/\ssrc="([^"]*)"/i.exec(u);if(!s)return u;const o=Gn(s[1].replace(/&amp;/g,"&")),g=c.get(o);return g?u.replace(/\s*\/?>$/,` width="${g.width}" height="${g.height}" ${La}="">`):u})}function ha(a,t){let r=t,l,c=!1,u=!1;const s=new Map;function o(){for(const[b,{component:w,source:m}]of s)ut(w),a.contains(b)&&b.replaceWith(m);s.clear()}function g(){if(!u){for(const[b,{component:w}]of s)a.contains(b)||(ut(w),s.delete(b));if(r.enabled)for(const b of a.querySelectorAll("pre > code")){if(b.closest("[data-markdown-diagram]"))continue;const w=[...b.classList].find(T=>T.startsWith("language-"))?.slice(9);let m;if(w==="mermaid")m="mermaid";else if(w==="diagram"||w==="ws-block:diagram")m="diagram";else if(w==="ws-block")try{if(JSON.parse(b.textContent??"").type!=="diagram")continue;m="diagram"}catch{continue}else continue;const k=b.parentElement;if(!k)continue;if(!l){c||(c=!0,ka(()=>import("./X-Frg4xt.js"),__vite__mapDeps([57,2,1,58,46,59,32,14,7,18,19,20,21,3,12,24,11,6,8,33,9,10,13,15,34,5,47,48,49,50,29,30,31,35,36,37,60,0,4,16,17,22,23,25,26,27,28,38,39,40,41,42,43,44,45,51,52,53,54,55,56,61,62,63,64,65,66,67,68]),import.meta.url).then(T=>{l=T.default,c=!1,g()}).catch(T=>{c=!1,ht.error("Failed to load the Markdown diagram renderer",{error:T})}));return}const U=document.createElement("div");U.dataset.markdownDiagram=m,k.replaceWith(U);const B=Mt(l,{target:U,context:r.context,props:{kind:m,source:b.textContent??"",workspaceId:r.workspaceId}});s.set(U,{component:B,source:k})}}}const x=new MutationObserver(g);return x.observe(a,{childList:!0,subtree:!0}),queueMicrotask(g),{update(b){(r.enabled!==b.enabled||r.workspaceId!==b.workspaceId)&&o(),r=b,g()},destroy(){u=!0,x.disconnect(),o()}}}var Jn=z('<span class="min-w-0 max-w-full truncate"> </span>'),Zn=z('<span class="type-caption flex min-w-0 max-w-full items-start gap-2 whitespace-normal py-1 text-muted-foreground" role="status" data-testid="media-loading-placeholder"><span class="first-line-icon" aria-hidden="true"><!></span> <span class="flex min-w-0 flex-wrap items-baseline gap-x-1.5"><span> </span> <!></span></span>');function Wa(a,t){if(new.target)return tt({component:Wa,...a});nt(t,!0);let r=I(t,"name",7);var l={get name(){return r()},set name(m){r(m),M()},$set:at,$on:(m,k)=>rt(t,m,k)},c=Zn(),u=H(c),s=H(u);bt(s,{get icon(){return zr},class:"size-3.5"}),L(u);var o=O(u,2),g=H(o),x=me(g,!0),b=O(g,2);{var w=m=>{var k=Jn(),U=me(k,!0);Xe(k,(B,T)=>Bt?.(B,T),r),X(()=>ge(U,r())),N(m,k)};ie(b,m=>{r()&&m(w)})}return L(o),L(c),X(m=>ge(x,m),[()=>A.ui_mediaLoadingPlaceholder_title_label()]),N(a,c),st(l)}const ba="markdown-image-frame";function $n(a,t){const r=new Map,l=new Map,c=new Map,u=[300,1e3];let s=!1;function o(i){let p=l.get(i);return p||(p={source:i.getAttribute("src")||"",workspaceId:t.getWorkspaceId(),retries:0,failureHandled:!1},l.set(i,p)),p}function g(i){const p=o(i);return!s&&a.contains(p.fallbackHost??i)&&p.workspaceId===t.getWorkspaceId()&&t.canUseMedia(p.source)&&!i.hasAttribute("data-media-unavailable")&&!i.hasAttribute("data-media-unsupported")&&sa(p.source)!==null}function x(i,p=!1){if(!g(i))return;const _=o(i),P=sa(_.source);if(!P)return;const D=_.fallbackHost,Y=D?.contains(document.activeElement)??!1;if(_.failureHandled=!1,_.fallbackHost=void 0,p&&(_.retries=0),i.removeAttribute("src"),i.setAttribute("src",P),D){const se=r.get(D);se&&ut(se),r.delete(D),D.replaceWith(i),U(),Y&&a.contains(i)&&i.focus()}}function b(i){const p=o(i);s||!a.contains(i)||p.failureHandled||(p.failureHandled=!0,g(i)&&p.retries<u.length?p.timer=setTimeout(()=>{p.timer=void 0,x(i)},u[p.retries++]):k(i,"load-failed"))}function w(i){const p=i.parentElement;return p?.classList.contains(ba)?p:null}function m(i){const p=Number(i.getAttribute("width")),_=Number(i.getAttribute("height"));if(!(p>0&&_>0))return;const P=document.createElement("span");P.className=ba,P.style.aspectRatio=`${p} / ${_}`,P.style.setProperty("--image-aspect-ratio",`${p} / ${_}`),P.style.width=`min(${p}px, 100%)`,P.dataset.loaded="false",i.replaceWith(P),P.appendChild(i);const D=P.appendChild(document.createElement("span"));D.className="markdown-image-frame-placeholder",r.set(D,Mt(Wa,{target:D,props:{name:Kn(i,t.getWorkspaceId())}}));const Y=()=>{if(c.delete(i),s||!a.contains(P))return;P.dataset.loaded="true";const se=r.get(D);se&&(ut(se),r.delete(D)),D.remove()};i.complete&&i.naturalWidth>0?Y():(c.set(i,Y),i.addEventListener("load",Y,{once:!0}))}function k(i,p){const _=i.getAttribute("src")||i.getAttribute("data-media-src")||"",P=yt(_),D=Ra(_,t.getWorkspaceId()),Y=P?.path??D?.path,se=P?.workspaceId??D?.workspaceId,Ce=i.getAttribute("data-name")||i.getAttribute("alt")||Y?.split("/").pop()||void 0,le=document.createElement(i instanceof HTMLVideoElement?"div":"span");le.className="media-unavailable-host",(w(i)??i).replaceWith(le),t.onMediaRemoved(i);let y;if(i instanceof HTMLImageElement&&p==="load-failed"){const oe=o(i);oe.fallbackHost=le,g(i)&&(y=()=>x(i,!0))}const Q=Mt(Vt,{target:le,props:{name:Ce,reason:p,path:Y,workspaceId:se,onRetry:y}});if(r.set(le,Q),i instanceof HTMLVideoElement){le.classList.add("flex","items-center","gap-2");const oe=le.appendChild(document.createElement("span"));r.set(oe,Mt(Kt,{target:oe,props:{videoUrl:_,videoName:Ce,sourceKind:"workspace",mimeType:wt(_,t.getWorkspaceId())?.mimeType}}))}}function U(){if(!s){for(const i of a.querySelectorAll("img"))vt(i)&&!i.closest("a")&&(i.tabIndex=0,i.setAttribute("role","button")),!(i.hasAttribute("data-media-unsupported")||i.hasAttribute("data-media-unavailable"))&&(o(i),i.hasAttribute(La)&&!w(i)&&m(i),i.getAttribute("src")&&i.complete&&i.naturalWidth===0&&b(i));for(const i of a.querySelectorAll("[data-media-unsupported]"))k(i,"unsupported");for(const i of a.querySelectorAll("[data-media-unavailable]"))k(i,Gr(i));for(const[i,p]of l)a.contains(p.fallbackHost??i)||(p.timer!==void 0&&clearTimeout(p.timer),l.delete(i));for(const[i,p]of c)a.contains(i)||(i.removeEventListener("load",p),c.delete(i));for(const[i,p]of r)a.contains(i)||(ut(p),r.delete(i))}}function B(i){const p=i.target;(p instanceof HTMLImageElement||p instanceof HTMLVideoElement)&&(p instanceof HTMLImageElement?b(p):k(p,"load-failed"))}const T=new MutationObserver(U);return T.observe(a,{childList:!0,subtree:!0}),a.addEventListener("error",B,!0),queueMicrotask(U),{destroy(){s=!0,T.disconnect();for(const i of l.values())i.timer!==void 0&&clearTimeout(i.timer);l.clear();for(const[i,p]of c)i.removeEventListener("load",p);c.clear(),a.removeEventListener("error",B,!0);for(const i of r.values())ut(i);r.clear()}}}var Xn=z('<div class="image-actions-overlay absolute z-10 svelte-nzvuq5" data-testid="markdown-image-actions-overlay"><!></div>'),es=z("<div></div>"),wa=z('<div role="group"><!> <!></div>'),ts=z('<div><p class="whitespace-pre-wrap svelte-nzvuq5"> </p></div>'),as=z("<!> <!>",1);function _a(a,t){if(new.target)return tt({component:_a,...a});nt(t,!0);const r=n=>{var f=Ut(),W=Fe(f);{var S=K=>{var $=Xn(),Pe=H($);{let de=E(()=>e(ce).getAttribute("src")||""),ue=E(()=>e(ce).getAttribute("alt")||void 0);et(fr(Pe,{get imageUrl(){return e(de)},get imageName(){return e(ue)},get open(){return e(v)},set open(We){q(v,We,!0)}}),We=>q(h,We,!0),()=>e(h))}L($),et($,de=>q(ae,de),()=>e(ae)),X(()=>Ct($,`top: ${e(Ke).top??""}px; right: ${e(Ke).right??""}px;`)),N(K,$)},j=E(()=>e(ce)&&Q(e(ce).getAttribute("src")||""));ie(W,K=>{e(j)&&K(S)})}N(n,f)};let l=I(t,"content",7),c=I(t,"isStreaming",7,!1),u=I(t,"className",7,""),s=I(t,"workspaceId",23,()=>ca()?.workspaceId??void 0),o=I(t,"relativeMediaBase",7),g=I(t,"onCodeBlockAction",7),x=I(t,"onFileClick",7),b=I(t,"canOpenFile",7),w=I(t,"allowFileMedia",7,!0),m=I(t,"taskBlockRenderMode",7,"placeholder"),k=I(t,"chatImageThumbnails",7,!1),U=I(t,"forceExternalLinks",7,!1),B=I(t,"renderRichFencesAsCode",7,!1),T=I(t,"renderDiagrams",7,!1),i=I(t,"allowSanitizedHtml",7,!1),p=I(t,"media",7);const _=Yr(),P=Ya(),D=E(()=>Bn(l(),s())),Y=E(()=>e(D).some(n=>n.type==="video")),se=E(()=>!e(Y)&&e(D).length===1&&e(D)[0].type==="markdown"?e(D)[0].content:l()),Ce=E(()=>Tn(e(se)));let le=ne(null),y=ne("");function Q(n){return _t(n,w()&&b()?.()!==!1)}const oe=E(()=>En(e(y),w()&&b()?.()!==!1)),Le=E(()=>pr(e(oe),s(),mr)),Me=E(()=>`<div class="markdown-content">${e(Le)}</div>`);let fe=0;const Ve=150;let ke=-1/0,ee=null,Se=null;async function ft(n,f,W,S){try{const j=await Qr(n,{...f,readOnly:!0});if(S!==fe)return;q(y,Qn(j,W,f?.workspaceId,f?.relativeMediaBase),!0)}catch(j){if(S!==fe)return;ht.error("Failed to process markdown:",j);const K=n.replace(/[&<>"']/g,$=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[$]||$);q(y,`<p>${K}</p>`)}}function Ie(){if(!Se)return;const n=Ve-(performance.now()-ke);if(n>0){ee=setTimeout(()=>{ee=null,Ie()},n);return}const f=Se;Se=null,ke=performance.now(),f()}function ot(){ee!==null&&(clearTimeout(ee),ee=null),Se=null,ke=-1/0}kt(()=>{const n=e(se),f={allowEmpty:!0,skipIfHTML:!1,preserveAnchors:!0,taskBlockRenderMode:m(),workspaceId:s(),relativeMediaBase:o()??(s()&&s()!==Sr?"":void 0),renderRichFencesAsCode:B()||T(),processPrimitives:!T(),allowSanitizedHtml:i(),renderMath:!c(),workspaceFileVersion:_},W=p(),S=++fe,j=()=>void ft(n,f,W,S);c()?(Se=j,ee===null&&Ie()):(ot(),j())});let De=ne(void 0),ce=ne(null),Ke=ne(Qa({top:0,right:0})),v=ne(!1),h=ne(void 0),ae=ne(null);function V(n){if(n.type==="mouseover"&&ga(e(ce),e(ae)))return;const f=n.target,W=Dt(f);if(W&&vt(W)&&Q(W.getAttribute("src")||"")){if(e(ce)===W)return;q(ce,W,!0),q(Ke,Vn(W,n.currentTarget),!0)}else if(e(ce)&&!e(v)){if(f instanceof Node&&e(ae)?.contains(f))return;q(ce,null)}}function te(){!e(v)&&!ga(e(ce),e(ae))&&q(ce,null)}function he(n){const f=Dt(n.target);!f||!vt(f)||!Q(f.getAttribute("src")||"")||(n.preventDefault(),n.stopPropagation(),V(n),q(v,!0))}function re(n){return $n(n,{getWorkspaceId:()=>s(),canUseMedia:Q,onMediaRemoved:f=>{e(ce)===f&&q(ce,null)}})}function Re(n){const f=n.target,W=f.closest("a");if(!W&&f instanceof HTMLImageElement){const j=f.getAttribute("src")||"";if(Ma(j)&&Q(j)){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(De)?.openImage(f);return}}if(W?.href){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(De)?.openAsset(W))return;const j=d(n),K=s()?ta(s()):void 0;ia(W.href,{workspaceId:K,canOpenFile:b(),sourcePanelId:j,event:n,rawHref:W.getAttribute("href")??void 0,...U()?{forceExternal:!0}:{}});return}const S=Jr(f.closest("[data-mention]"));if(S){const{type:j,meta:K}=S;if(j==="file"&&S.filePath){if(b()?.()===!1)return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const $=S.filePath;ht.debug("[MarkdownViewer] File mention clicked",{filePath:$,meta:K});const Pe=d(n),de=Nt({event:n});if(x())x()($,{line:S.line,openInAdjacentPanel:de,sourcePanelId:Pe});else{const ue=s();ue&&ve.dispatch(Rr(ue,$,{line:S.line,openInAdjacentPanel:de,sourcePanelId:Pe}))}}else if(S.folderPath!==void 0){if(b()?.()===!1||!s())return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),ve.dispatch(Er(s(),Zr(S.folderPath)))}else if(j==="note"&&S.note){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const $=S.note.id;ht.debug("[MarkdownViewer] Note mention clicked",{noteId:$,meta:K});const Pe=d(n),de=Nt({event:n});if(S.note.workspaceId&&S.note.workspaceId!==s()){ia(ir($,S.note.workspaceId),{workspaceId:s()?ta(s()):void 0,sourcePanelId:Pe,event:n});return}const ue=s();ue&&ve.dispatch(Pr(ue,$,{openInAdjacentPanel:de,sourcePanelId:Pe}))}}}function Ue(n){if(je(n),!n.defaultPrevented){if(n.target instanceof HTMLImageElement&&vt(n.target)&&(n.key==="Enter"||n.key===" ")){Re(n);return}n.key!=="Enter"||!Nt({event:n})||Re(n)}}function je(n){const f=Dt(n.target);!f||!vt(f)||!Q(f.getAttribute("src")||"")||e(h)?.handleCopy(n,f.getAttribute("src")||"")}function d(n){const f=n.target;if(f instanceof HTMLElement)return f.closest("[data-panel-id]")?.dataset.panelId}Ja(()=>{fe+=1,ot()});var C={get content(){return l()},set content(n){l(n),M()},get isStreaming(){return c()},set isStreaming(n=!1){c(n),M()},get className(){return u()},set className(n=""){u(n),M()},get workspaceId(){return s()},set workspaceId(n=ca()?.workspaceId??void 0){s(n),M()},get relativeMediaBase(){return o()},set relativeMediaBase(n){o(n),M()},get onCodeBlockAction(){return g()},set onCodeBlockAction(n){g(n),M()},get onFileClick(){return x()},set onFileClick(n){x(n),M()},get canOpenFile(){return b()},set canOpenFile(n){b(n),M()},get allowFileMedia(){return w()},set allowFileMedia(n=!0){w(n),M()},get taskBlockRenderMode(){return m()},set taskBlockRenderMode(n="placeholder"){m(n),M()},get chatImageThumbnails(){return k()},set chatImageThumbnails(n=!1){k(n),M()},get forceExternalLinks(){return U()},set forceExternalLinks(n=!1){U(n),M()},get renderRichFencesAsCode(){return B()},set renderRichFencesAsCode(n=!1){B(n),M()},get renderDiagrams(){return T()},set renderDiagrams(n=!1){T(n),M()},get allowSanitizedHtml(){return i()},set allowSanitizedHtml(n=!1){i(n),M()},get media(){return p()},set media(n){p(n),M()},$set:at,$on:(n,f)=>rt(t,n,f)},F=as(),J=Fe(F);{var be=n=>{var f=es();zt(f,21,()=>e(D),Xa,(W,S)=>{var j=Ut(),K=Fe(j);{var $=de=>{Fa(de,{get allowFileMedia(){return w()},get canOpenFile(){return b()},get source(){return e(S).source},get name(){return e(S).name},get poster(){return e(S).poster}})},Pe=de=>{_a(de,{get content(){return e(S).content},get isStreaming(){return c()},get workspaceId(){return s()},get relativeMediaBase(){return o()},get onCodeBlockAction(){return g()},get onFileClick(){return x()},get canOpenFile(){return b()},get allowFileMedia(){return w()},get taskBlockRenderMode(){return m()},get chatImageThumbnails(){return k()},get forceExternalLinks(){return U()},get renderRichFencesAsCode(){return B()},get renderDiagrams(){return T()},get allowSanitizedHtml(){return i()},get media(){return p()}})};ie(K,de=>{e(S).type==="video"?de($):de(Pe,-1)})}N(W,j)}),L(f),X(()=>qe(f,1,`markdown-video-segments ${u()??""}`,"svelte-nzvuq5")),N(n,f)},pe=n=>{var f=wa();let W;var S=H(f);oa(S,()=>e(Me));var j=O(S,2);r(j),L(f),Xe(f,K=>re?.(K)),Xe(f,(K,$)=>ha?.(K,$),()=>({enabled:T(),workspaceId:s(),context:P})),X(()=>W=qe(f,1,`markdown-viewer streaming-content ${u()??""}`,"svelte-nzvuq5",W,{"chat-image-thumbnails":k()})),Ae("click",f,Re),Ae("keydown",f,Ue),Ne("copy",f,je),Ae("contextmenu",f,he),Ae("mouseover",f,V),Ae("focusin",f,V),Ne("mouseleave",f,te),N(n,f)},we=n=>{var f=ts(),W=H(f),S=me(W,!0);L(f),X(()=>{qe(f,1,`markdown-viewer simple-content ${u()??""}`,"svelte-nzvuq5"),ge(S,e(se))}),N(n,f)},Ee=n=>{var f=wa();let W;var S=H(f);oa(S,()=>e(Me));var j=O(S,2);r(j),L(f),et(f,K=>q(le,K),()=>e(le)),Xe(f,K=>re?.(K)),Xe(f,(K,$)=>ha?.(K,$),()=>({enabled:T(),workspaceId:s(),context:P})),X(()=>W=qe(f,1,`markdown-viewer static-content ${u()??""}`,"svelte-nzvuq5",W,{"chat-image-thumbnails":k()})),Ae("click",f,Re),Ae("keydown",f,Ue),Ne("copy",f,je),Ae("contextmenu",f,he),Ae("mouseover",f,V),Ae("focusin",f,V),Ne("mouseleave",f,te),N(n,f)};ie(J,n=>{e(Y)?n(be):c()?n(pe,1):e(Ce)==="simple"&&!i()?n(we,2):n(Ee,-1)})}var _e=O(J,2);return et(Ta(_e,{get workspaceId(){return s()},canUseMedia:Q}),n=>q(De,n,!0),()=>e(De)),N(a,F),st(C)}xa(["click","keydown","contextmenu","mouseover","focusin"]);class Ps{constructor(t){lt(this,"container");lt(this,"previousFocus",null);lt(this,"firstFocusable",null);lt(this,"lastFocusable",null);lt(this,"handleKeyDown");this.container=t,this.handleKeyDown=this.onKeyDown.bind(this)}activate(){this.previousFocus=document.activeElement;const t=this.container.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])');t.length>0&&(this.firstFocusable=t[0],this.lastFocusable=t[t.length-1],this.firstFocusable.focus()),document.addEventListener("keydown",this.handleKeyDown)}deactivate(){document.removeEventListener("keydown",this.handleKeyDown),this.previousFocus&&this.previousFocus.focus()}onKeyDown(t){t.key==="Tab"&&(!this.firstFocusable||!this.lastFocusable||(t.shiftKey?document.activeElement===this.firstFocusable&&(t.preventDefault(),this.lastFocusable.focus()):document.activeElement===this.lastFocusable&&(t.preventDefault(),this.firstFocusable.focus())))}}function Ts(a,t){const r=x=>{const b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(x);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null},l=x=>{const[b,w,m]=[x.r,x.g,x.b].map(k=>(k=k/255,k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4)));return .2126*b+.7152*w+.0722*m},c=r(a),u=r(t);if(!c||!u)return ht.warn("Invalid color values for contrast check",{foreground:a,background:t}),{ratio:0,passes:{aa:!1,aaa:!1}};const s=l(c),o=l(u),g=(Math.max(s,o)+.05)/(Math.min(s,o)+.05);return{ratio:g,passes:{aa:g>=4.5,aaa:g>=7}}}export{Fa as C,Ps as F,Rn as H,_a as M,Ss as W,Wa as a,fa as b,An as c,Pa as d,Ts as e,Cn as f,Es as g,Ea as h,on as r,Bn as s,Rs as w};
6
+ `)),T=ma(B?.path,t);if(T){u(),l.push({type:"video",source:T,name:typeof B.path=="string"?B.path:void 0,poster:typeof B.poster=="string"?B.poster:void 0}),s=k;continue}}catch{}c.push(...U),s=k;continue}c.push(...r.slice(s));break}const x=!/^(?: {4}|\t)/.test(r[s])&&Un(r,s)?r[s].match(qn):null;if(!x){c.push(r[s]);continue}const[,b,w]=x,m=ma(w,t);m?(u(),l.push({type:"video",source:m,name:b||void 0})):w.startsWith("workspace-asset://")&&!Kr(w)||Dn(w,t)?c.push(r[s]):c.push(`[${b}](${w})`)}return u(),l}function vt(a){return Ma(a.getAttribute("src")||"")}function Dt(a){return a instanceof HTMLImageElement?a:a instanceof HTMLAnchorElement?a.querySelector("img"):null}function Vn(a,t){const r=a.getBoundingClientRect(),l=t.getBoundingClientRect();return{top:r.top-l.top+6,right:l.right-r.right+6}}function ga(a,t){const r=document.activeElement;return!!(r&&(r===a||r===a?.closest("a")||t?.contains(r)))}function Kn(a,t){const r=a.getAttribute("src")||"",l=yt(r)?.path??Ra(r,t)?.path;if(l)return l;if(r.startsWith("workspace-asset://")){const c=r.split(/[?#]/)[0].split("/").pop();if(c)return c}if(r&&!/^[a-z][a-z0-9+.-]*:/i.test(r)&&!r.startsWith("//"))try{return decodeURI(r)}catch{return r}return a.getAttribute("alt")||void 0}const La="data-image-sized",va=a=>typeof a=="number"&&Number.isInteger(a)&&a>0;function jn(a){try{return encodeURI(a).replace(/%25/g,"%")}catch{return null}}function Gn(a){return a.startsWith("workspace-file://")?a.split(/[?#]/)[0]:a}function Yn(a,t,r){const l=new Map;for(const[c,u]of Object.entries(a)){if(!u||!va(u.width)||!va(u.height))continue;const s={width:u.width,height:u.height},o=new Set([c]),g=jn(c);g&&o.add(g);for(const x of[...o]){const b=St(x,t);if(b&&o.add(b),r!==void 0){const w=jr(x,r);if(w){const m=St(`intent://local/file/${w.split("/").map(encodeURIComponent).join("/")}`,t);m&&o.add(m)}}}for(const x of o)l.has(x)||l.set(x,s)}return l}function Qn(a,t,r,l){if(!t||!a.includes("<img"))return a;const c=Yn(t,r,l);return c.size===0?a:a.replace(/<img\b(?:[^>"']|"[^"]*"|'[^']*')*>/gi,u=>{if(/\s(?:width|height)="/i.test(u))return u;const s=/\ssrc="([^"]*)"/i.exec(u);if(!s)return u;const o=Gn(s[1].replace(/&amp;/g,"&")),g=c.get(o);return g?u.replace(/\s*\/?>$/,` width="${g.width}" height="${g.height}" ${La}="">`):u})}function ha(a,t){let r=t,l,c=!1,u=!1;const s=new Map;function o(){for(const[b,{component:w,source:m}]of s)ut(w),a.contains(b)&&b.replaceWith(m);s.clear()}function g(){if(!u){for(const[b,{component:w}]of s)a.contains(b)||(ut(w),s.delete(b));if(r.enabled)for(const b of a.querySelectorAll("pre > code")){if(b.closest("[data-markdown-diagram]"))continue;const w=[...b.classList].find(T=>T.startsWith("language-"))?.slice(9);let m;if(w==="mermaid")m="mermaid";else if(w==="diagram"||w==="ws-block:diagram")m="diagram";else if(w==="ws-block")try{if(JSON.parse(b.textContent??"").type!=="diagram")continue;m="diagram"}catch{continue}else continue;const k=b.parentElement;if(!k)continue;if(!l){c||(c=!0,ka(()=>import("./BdmhOhOr.js"),__vite__mapDeps([57,2,1,58,46,59,32,14,7,18,19,20,21,3,12,24,11,6,8,33,9,10,13,15,34,5,47,48,49,50,29,30,31,35,36,37,60,0,4,16,17,22,23,25,26,27,28,38,39,40,41,42,43,44,45,51,52,53,54,55,56,61,62,63,64,65,66,67,68]),import.meta.url).then(T=>{l=T.default,c=!1,g()}).catch(T=>{c=!1,ht.error("Failed to load the Markdown diagram renderer",{error:T})}));return}const U=document.createElement("div");U.dataset.markdownDiagram=m,k.replaceWith(U);const B=Mt(l,{target:U,context:r.context,props:{kind:m,source:b.textContent??"",workspaceId:r.workspaceId}});s.set(U,{component:B,source:k})}}}const x=new MutationObserver(g);return x.observe(a,{childList:!0,subtree:!0}),queueMicrotask(g),{update(b){(r.enabled!==b.enabled||r.workspaceId!==b.workspaceId)&&o(),r=b,g()},destroy(){u=!0,x.disconnect(),o()}}}var Jn=z('<span class="min-w-0 max-w-full truncate"> </span>'),Zn=z('<span class="type-caption flex min-w-0 max-w-full items-start gap-2 whitespace-normal py-1 text-muted-foreground" role="status" data-testid="media-loading-placeholder"><span class="first-line-icon" aria-hidden="true"><!></span> <span class="flex min-w-0 flex-wrap items-baseline gap-x-1.5"><span> </span> <!></span></span>');function Wa(a,t){if(new.target)return tt({component:Wa,...a});nt(t,!0);let r=I(t,"name",7);var l={get name(){return r()},set name(m){r(m),M()},$set:at,$on:(m,k)=>rt(t,m,k)},c=Zn(),u=H(c),s=H(u);bt(s,{get icon(){return zr},class:"size-3.5"}),L(u);var o=O(u,2),g=H(o),x=me(g,!0),b=O(g,2);{var w=m=>{var k=Jn(),U=me(k,!0);Xe(k,(B,T)=>Bt?.(B,T),r),X(()=>ge(U,r())),N(m,k)};ie(b,m=>{r()&&m(w)})}return L(o),L(c),X(m=>ge(x,m),[()=>A.ui_mediaLoadingPlaceholder_title_label()]),N(a,c),st(l)}const ba="markdown-image-frame";function $n(a,t){const r=new Map,l=new Map,c=new Map,u=[300,1e3];let s=!1;function o(i){let p=l.get(i);return p||(p={source:i.getAttribute("src")||"",workspaceId:t.getWorkspaceId(),retries:0,failureHandled:!1},l.set(i,p)),p}function g(i){const p=o(i);return!s&&a.contains(p.fallbackHost??i)&&p.workspaceId===t.getWorkspaceId()&&t.canUseMedia(p.source)&&!i.hasAttribute("data-media-unavailable")&&!i.hasAttribute("data-media-unsupported")&&sa(p.source)!==null}function x(i,p=!1){if(!g(i))return;const _=o(i),P=sa(_.source);if(!P)return;const D=_.fallbackHost,Y=D?.contains(document.activeElement)??!1;if(_.failureHandled=!1,_.fallbackHost=void 0,p&&(_.retries=0),i.removeAttribute("src"),i.setAttribute("src",P),D){const se=r.get(D);se&&ut(se),r.delete(D),D.replaceWith(i),U(),Y&&a.contains(i)&&i.focus()}}function b(i){const p=o(i);s||!a.contains(i)||p.failureHandled||(p.failureHandled=!0,g(i)&&p.retries<u.length?p.timer=setTimeout(()=>{p.timer=void 0,x(i)},u[p.retries++]):k(i,"load-failed"))}function w(i){const p=i.parentElement;return p?.classList.contains(ba)?p:null}function m(i){const p=Number(i.getAttribute("width")),_=Number(i.getAttribute("height"));if(!(p>0&&_>0))return;const P=document.createElement("span");P.className=ba,P.style.aspectRatio=`${p} / ${_}`,P.style.setProperty("--image-aspect-ratio",`${p} / ${_}`),P.style.width=`min(${p}px, 100%)`,P.dataset.loaded="false",i.replaceWith(P),P.appendChild(i);const D=P.appendChild(document.createElement("span"));D.className="markdown-image-frame-placeholder",r.set(D,Mt(Wa,{target:D,props:{name:Kn(i,t.getWorkspaceId())}}));const Y=()=>{if(c.delete(i),s||!a.contains(P))return;P.dataset.loaded="true";const se=r.get(D);se&&(ut(se),r.delete(D)),D.remove()};i.complete&&i.naturalWidth>0?Y():(c.set(i,Y),i.addEventListener("load",Y,{once:!0}))}function k(i,p){const _=i.getAttribute("src")||i.getAttribute("data-media-src")||"",P=yt(_),D=Ra(_,t.getWorkspaceId()),Y=P?.path??D?.path,se=P?.workspaceId??D?.workspaceId,Ce=i.getAttribute("data-name")||i.getAttribute("alt")||Y?.split("/").pop()||void 0,le=document.createElement(i instanceof HTMLVideoElement?"div":"span");le.className="media-unavailable-host",(w(i)??i).replaceWith(le),t.onMediaRemoved(i);let y;if(i instanceof HTMLImageElement&&p==="load-failed"){const oe=o(i);oe.fallbackHost=le,g(i)&&(y=()=>x(i,!0))}const Q=Mt(Vt,{target:le,props:{name:Ce,reason:p,path:Y,workspaceId:se,onRetry:y}});if(r.set(le,Q),i instanceof HTMLVideoElement){le.classList.add("flex","items-center","gap-2");const oe=le.appendChild(document.createElement("span"));r.set(oe,Mt(Kt,{target:oe,props:{videoUrl:_,videoName:Ce,sourceKind:"workspace",mimeType:wt(_,t.getWorkspaceId())?.mimeType}}))}}function U(){if(!s){for(const i of a.querySelectorAll("img"))vt(i)&&!i.closest("a")&&(i.tabIndex=0,i.setAttribute("role","button")),!(i.hasAttribute("data-media-unsupported")||i.hasAttribute("data-media-unavailable"))&&(o(i),i.hasAttribute(La)&&!w(i)&&m(i),i.getAttribute("src")&&i.complete&&i.naturalWidth===0&&b(i));for(const i of a.querySelectorAll("[data-media-unsupported]"))k(i,"unsupported");for(const i of a.querySelectorAll("[data-media-unavailable]"))k(i,Gr(i));for(const[i,p]of l)a.contains(p.fallbackHost??i)||(p.timer!==void 0&&clearTimeout(p.timer),l.delete(i));for(const[i,p]of c)a.contains(i)||(i.removeEventListener("load",p),c.delete(i));for(const[i,p]of r)a.contains(i)||(ut(p),r.delete(i))}}function B(i){const p=i.target;(p instanceof HTMLImageElement||p instanceof HTMLVideoElement)&&(p instanceof HTMLImageElement?b(p):k(p,"load-failed"))}const T=new MutationObserver(U);return T.observe(a,{childList:!0,subtree:!0}),a.addEventListener("error",B,!0),queueMicrotask(U),{destroy(){s=!0,T.disconnect();for(const i of l.values())i.timer!==void 0&&clearTimeout(i.timer);l.clear();for(const[i,p]of c)i.removeEventListener("load",p);c.clear(),a.removeEventListener("error",B,!0);for(const i of r.values())ut(i);r.clear()}}}var Xn=z('<div class="image-actions-overlay absolute z-10 svelte-nzvuq5" data-testid="markdown-image-actions-overlay"><!></div>'),es=z("<div></div>"),wa=z('<div role="group"><!> <!></div>'),ts=z('<div><p class="whitespace-pre-wrap svelte-nzvuq5"> </p></div>'),as=z("<!> <!>",1);function _a(a,t){if(new.target)return tt({component:_a,...a});nt(t,!0);const r=n=>{var f=Ut(),W=Fe(f);{var S=K=>{var $=Xn(),Pe=H($);{let de=E(()=>e(ce).getAttribute("src")||""),ue=E(()=>e(ce).getAttribute("alt")||void 0);et(fr(Pe,{get imageUrl(){return e(de)},get imageName(){return e(ue)},get open(){return e(v)},set open(We){q(v,We,!0)}}),We=>q(h,We,!0),()=>e(h))}L($),et($,de=>q(ae,de),()=>e(ae)),X(()=>Ct($,`top: ${e(Ke).top??""}px; right: ${e(Ke).right??""}px;`)),N(K,$)},j=E(()=>e(ce)&&Q(e(ce).getAttribute("src")||""));ie(W,K=>{e(j)&&K(S)})}N(n,f)};let l=I(t,"content",7),c=I(t,"isStreaming",7,!1),u=I(t,"className",7,""),s=I(t,"workspaceId",23,()=>ca()?.workspaceId??void 0),o=I(t,"relativeMediaBase",7),g=I(t,"onCodeBlockAction",7),x=I(t,"onFileClick",7),b=I(t,"canOpenFile",7),w=I(t,"allowFileMedia",7,!0),m=I(t,"taskBlockRenderMode",7,"placeholder"),k=I(t,"chatImageThumbnails",7,!1),U=I(t,"forceExternalLinks",7,!1),B=I(t,"renderRichFencesAsCode",7,!1),T=I(t,"renderDiagrams",7,!1),i=I(t,"allowSanitizedHtml",7,!1),p=I(t,"media",7);const _=Yr(),P=Ya(),D=E(()=>Bn(l(),s())),Y=E(()=>e(D).some(n=>n.type==="video")),se=E(()=>!e(Y)&&e(D).length===1&&e(D)[0].type==="markdown"?e(D)[0].content:l()),Ce=E(()=>Tn(e(se)));let le=ne(null),y=ne("");function Q(n){return _t(n,w()&&b()?.()!==!1)}const oe=E(()=>En(e(y),w()&&b()?.()!==!1)),Le=E(()=>pr(e(oe),s(),mr)),Me=E(()=>`<div class="markdown-content">${e(Le)}</div>`);let fe=0;const Ve=150;let ke=-1/0,ee=null,Se=null;async function ft(n,f,W,S){try{const j=await Qr(n,{...f,readOnly:!0});if(S!==fe)return;q(y,Qn(j,W,f?.workspaceId,f?.relativeMediaBase),!0)}catch(j){if(S!==fe)return;ht.error("Failed to process markdown:",j);const K=n.replace(/[&<>"']/g,$=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[$]||$);q(y,`<p>${K}</p>`)}}function Ie(){if(!Se)return;const n=Ve-(performance.now()-ke);if(n>0){ee=setTimeout(()=>{ee=null,Ie()},n);return}const f=Se;Se=null,ke=performance.now(),f()}function ot(){ee!==null&&(clearTimeout(ee),ee=null),Se=null,ke=-1/0}kt(()=>{const n=e(se),f={allowEmpty:!0,skipIfHTML:!1,preserveAnchors:!0,taskBlockRenderMode:m(),workspaceId:s(),relativeMediaBase:o()??(s()&&s()!==Sr?"":void 0),renderRichFencesAsCode:B()||T(),processPrimitives:!T(),allowSanitizedHtml:i(),renderMath:!c(),workspaceFileVersion:_},W=p(),S=++fe,j=()=>void ft(n,f,W,S);c()?(Se=j,ee===null&&Ie()):(ot(),j())});let De=ne(void 0),ce=ne(null),Ke=ne(Qa({top:0,right:0})),v=ne(!1),h=ne(void 0),ae=ne(null);function V(n){if(n.type==="mouseover"&&ga(e(ce),e(ae)))return;const f=n.target,W=Dt(f);if(W&&vt(W)&&Q(W.getAttribute("src")||"")){if(e(ce)===W)return;q(ce,W,!0),q(Ke,Vn(W,n.currentTarget),!0)}else if(e(ce)&&!e(v)){if(f instanceof Node&&e(ae)?.contains(f))return;q(ce,null)}}function te(){!e(v)&&!ga(e(ce),e(ae))&&q(ce,null)}function he(n){const f=Dt(n.target);!f||!vt(f)||!Q(f.getAttribute("src")||"")||(n.preventDefault(),n.stopPropagation(),V(n),q(v,!0))}function re(n){return $n(n,{getWorkspaceId:()=>s(),canUseMedia:Q,onMediaRemoved:f=>{e(ce)===f&&q(ce,null)}})}function Re(n){const f=n.target,W=f.closest("a");if(!W&&f instanceof HTMLImageElement){const j=f.getAttribute("src")||"";if(Ma(j)&&Q(j)){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(De)?.openImage(f);return}}if(W?.href){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(De)?.openAsset(W))return;const j=d(n),K=s()?ta(s()):void 0;ia(W.href,{workspaceId:K,canOpenFile:b(),sourcePanelId:j,event:n,rawHref:W.getAttribute("href")??void 0,...U()?{forceExternal:!0}:{}});return}const S=Jr(f.closest("[data-mention]"));if(S){const{type:j,meta:K}=S;if(j==="file"&&S.filePath){if(b()?.()===!1)return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const $=S.filePath;ht.debug("[MarkdownViewer] File mention clicked",{filePath:$,meta:K});const Pe=d(n),de=Nt({event:n});if(x())x()($,{line:S.line,openInAdjacentPanel:de,sourcePanelId:Pe});else{const ue=s();ue&&ve.dispatch(Rr(ue,$,{line:S.line,openInAdjacentPanel:de,sourcePanelId:Pe}))}}else if(S.folderPath!==void 0){if(b()?.()===!1||!s())return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),ve.dispatch(Er(s(),Zr(S.folderPath)))}else if(j==="note"&&S.note){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const $=S.note.id;ht.debug("[MarkdownViewer] Note mention clicked",{noteId:$,meta:K});const Pe=d(n),de=Nt({event:n});if(S.note.workspaceId&&S.note.workspaceId!==s()){ia(ir($,S.note.workspaceId),{workspaceId:s()?ta(s()):void 0,sourcePanelId:Pe,event:n});return}const ue=s();ue&&ve.dispatch(Pr(ue,$,{openInAdjacentPanel:de,sourcePanelId:Pe}))}}}function Ue(n){if(je(n),!n.defaultPrevented){if(n.target instanceof HTMLImageElement&&vt(n.target)&&(n.key==="Enter"||n.key===" ")){Re(n);return}n.key!=="Enter"||!Nt({event:n})||Re(n)}}function je(n){const f=Dt(n.target);!f||!vt(f)||!Q(f.getAttribute("src")||"")||e(h)?.handleCopy(n,f.getAttribute("src")||"")}function d(n){const f=n.target;if(f instanceof HTMLElement)return f.closest("[data-panel-id]")?.dataset.panelId}Ja(()=>{fe+=1,ot()});var C={get content(){return l()},set content(n){l(n),M()},get isStreaming(){return c()},set isStreaming(n=!1){c(n),M()},get className(){return u()},set className(n=""){u(n),M()},get workspaceId(){return s()},set workspaceId(n=ca()?.workspaceId??void 0){s(n),M()},get relativeMediaBase(){return o()},set relativeMediaBase(n){o(n),M()},get onCodeBlockAction(){return g()},set onCodeBlockAction(n){g(n),M()},get onFileClick(){return x()},set onFileClick(n){x(n),M()},get canOpenFile(){return b()},set canOpenFile(n){b(n),M()},get allowFileMedia(){return w()},set allowFileMedia(n=!0){w(n),M()},get taskBlockRenderMode(){return m()},set taskBlockRenderMode(n="placeholder"){m(n),M()},get chatImageThumbnails(){return k()},set chatImageThumbnails(n=!1){k(n),M()},get forceExternalLinks(){return U()},set forceExternalLinks(n=!1){U(n),M()},get renderRichFencesAsCode(){return B()},set renderRichFencesAsCode(n=!1){B(n),M()},get renderDiagrams(){return T()},set renderDiagrams(n=!1){T(n),M()},get allowSanitizedHtml(){return i()},set allowSanitizedHtml(n=!1){i(n),M()},get media(){return p()},set media(n){p(n),M()},$set:at,$on:(n,f)=>rt(t,n,f)},F=as(),J=Fe(F);{var be=n=>{var f=es();zt(f,21,()=>e(D),Xa,(W,S)=>{var j=Ut(),K=Fe(j);{var $=de=>{Fa(de,{get allowFileMedia(){return w()},get canOpenFile(){return b()},get source(){return e(S).source},get name(){return e(S).name},get poster(){return e(S).poster}})},Pe=de=>{_a(de,{get content(){return e(S).content},get isStreaming(){return c()},get workspaceId(){return s()},get relativeMediaBase(){return o()},get onCodeBlockAction(){return g()},get onFileClick(){return x()},get canOpenFile(){return b()},get allowFileMedia(){return w()},get taskBlockRenderMode(){return m()},get chatImageThumbnails(){return k()},get forceExternalLinks(){return U()},get renderRichFencesAsCode(){return B()},get renderDiagrams(){return T()},get allowSanitizedHtml(){return i()},get media(){return p()}})};ie(K,de=>{e(S).type==="video"?de($):de(Pe,-1)})}N(W,j)}),L(f),X(()=>qe(f,1,`markdown-video-segments ${u()??""}`,"svelte-nzvuq5")),N(n,f)},pe=n=>{var f=wa();let W;var S=H(f);oa(S,()=>e(Me));var j=O(S,2);r(j),L(f),Xe(f,K=>re?.(K)),Xe(f,(K,$)=>ha?.(K,$),()=>({enabled:T(),workspaceId:s(),context:P})),X(()=>W=qe(f,1,`markdown-viewer streaming-content ${u()??""}`,"svelte-nzvuq5",W,{"chat-image-thumbnails":k()})),Ae("click",f,Re),Ae("keydown",f,Ue),Ne("copy",f,je),Ae("contextmenu",f,he),Ae("mouseover",f,V),Ae("focusin",f,V),Ne("mouseleave",f,te),N(n,f)},we=n=>{var f=ts(),W=H(f),S=me(W,!0);L(f),X(()=>{qe(f,1,`markdown-viewer simple-content ${u()??""}`,"svelte-nzvuq5"),ge(S,e(se))}),N(n,f)},Ee=n=>{var f=wa();let W;var S=H(f);oa(S,()=>e(Me));var j=O(S,2);r(j),L(f),et(f,K=>q(le,K),()=>e(le)),Xe(f,K=>re?.(K)),Xe(f,(K,$)=>ha?.(K,$),()=>({enabled:T(),workspaceId:s(),context:P})),X(()=>W=qe(f,1,`markdown-viewer static-content ${u()??""}`,"svelte-nzvuq5",W,{"chat-image-thumbnails":k()})),Ae("click",f,Re),Ae("keydown",f,Ue),Ne("copy",f,je),Ae("contextmenu",f,he),Ae("mouseover",f,V),Ae("focusin",f,V),Ne("mouseleave",f,te),N(n,f)};ie(J,n=>{e(Y)?n(be):c()?n(pe,1):e(Ce)==="simple"&&!i()?n(we,2):n(Ee,-1)})}var _e=O(J,2);return et(Ta(_e,{get workspaceId(){return s()},canUseMedia:Q}),n=>q(De,n,!0),()=>e(De)),N(a,F),st(C)}xa(["click","keydown","contextmenu","mouseover","focusin"]);class Ps{constructor(t){lt(this,"container");lt(this,"previousFocus",null);lt(this,"firstFocusable",null);lt(this,"lastFocusable",null);lt(this,"handleKeyDown");this.container=t,this.handleKeyDown=this.onKeyDown.bind(this)}activate(){this.previousFocus=document.activeElement;const t=this.container.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])');t.length>0&&(this.firstFocusable=t[0],this.lastFocusable=t[t.length-1],this.firstFocusable.focus()),document.addEventListener("keydown",this.handleKeyDown)}deactivate(){document.removeEventListener("keydown",this.handleKeyDown),this.previousFocus&&this.previousFocus.focus()}onKeyDown(t){t.key==="Tab"&&(!this.firstFocusable||!this.lastFocusable||(t.shiftKey?document.activeElement===this.firstFocusable&&(t.preventDefault(),this.lastFocusable.focus()):document.activeElement===this.lastFocusable&&(t.preventDefault(),this.firstFocusable.focus())))}}function Ts(a,t){const r=x=>{const b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(x);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null},l=x=>{const[b,w,m]=[x.r,x.g,x.b].map(k=>(k=k/255,k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4)));return .2126*b+.7152*w+.0722*m},c=r(a),u=r(t);if(!c||!u)return ht.warn("Invalid color values for contrast check",{foreground:a,background:t}),{ratio:0,passes:{aa:!1,aaa:!1}};const s=l(c),o=l(u),g=(Math.max(s,o)+.05)/(Math.min(s,o)+.05);return{ratio:g,passes:{aa:g>=4.5,aaa:g>=7}}}export{Fa as C,Ps as F,Rn as H,_a as M,Ss as W,Wa as a,fa as b,An as c,Pa as d,Ts as e,Cn as f,Es as g,Ea as h,on as r,Bn as s,Rs as w};
@@ -1 +1 @@
1
- import{t as ue,bq as b,a_ as I,by as fe,b as pe,bo as y}from"./7rNOGHzs.js";import{bs as ge,a7 as X,ay as E,W as _,bn as ve,aA as m,a5 as V,aD as e,bS as j,bl as Z,b_ as z,bO as ee,bA as G,aB as P,bf as be,c9 as i}from"./B8o4lNgr.js";import{h as _e,k as N,s as f,l as O}from"./DmsDslNo.js";import{F as me,br as he,bq as xe}from"./CFejQM6t.js";import{f as ye,am as ke}from"./Bgegixo2.js";import{s as Se}from"./B1s3oEqm.js";import{t as H}from"./DzMmhJrp.js";import{a as te,p as we,b as ze,d as Pe}from"./DECwqQGV.js";var $e=P('<span aria-hidden="true"></span>'),Ie=P('<span class="absolute -right-0.5 -bottom-0.5 inline-flex items-center justify-center rounded-full bg-background text-foreground" aria-hidden="true"><!></span>'),Me=P('<span><span data-presence-avatar-tile=""><!></span> <!> <!></span>'),Ae=P('<!> <span class="sr-only"> </span>',1),Ce=P('<span class="inline-flex shrink-0 items-center justify-center rounded-full border border-background bg-muted px-1 font-medium leading-none text-muted-foreground"> </span>'),Le=P('<span role="group" data-presence-avatar-stack=""><!> <!></span>');function Ve(J,u){if(new.target)return ue({component:Ve,...J});ge(u,!0);const R=(t,a=be)=>{const k=i(()=>Pe(a())),L=i(()=>a().online===!1);var d=Me();let l;var r=V(d);let v;var $=V(r);{let n=i(()=>ze(a()));Se($,{fill:!0,get avatarUrl(){return a().avatarUrl},get label(){return e(n)}})}G(r);var S=j(r,2);{var D=n=>{var s=$e();z(()=>{N(s,1,`absolute -right-0.5 -top-0.5 h-1.5 w-1.5 rounded-full border border-background ${a().online?"bg-success":"bg-muted-foreground"}`),f(s,"data-presence-status",a().online?"online":"offline")}),_(n,s)};I(S,n=>{o()==="stack"&&a().hostRole&&a().online!==void 0&&n(D)})}var Y=j(S,2);{var c=n=>{var s=Ie();let h;var w=V(s);{let x=i(()=>a().identity.provider==="gitlab"?he:xe);me(w,{get icon(){return e(x)}})}G(s),z(x=>{f(s,"data-presence-identity-provider",a().identity.provider),f(s,"data-presence-identity-host",a().identity.host),h=O(s,"",h,{width:`${e(W)??""}px`,height:`${e(W)??""}px`,"font-size":x})},[()=>`${Math.round(e(W)*.8)}px`]),_(n,s)};I(Y,n=>{o()==="stack"&&a().identity&&n(c)})}G(d),z(n=>{N(d,1,`relative inline-flex shrink-0 rounded-full border ${o()==="tile"?"border-border":`border-background ${e(k)?ne[e(k)]:""}`}`),f(d,"data-presence-avatar",a().principalId),f(d,"data-presence-ring",o()==="stack"?e(k)??void 0:void 0),f(d,"data-presence-offline",e(L)||void 0),f(d,"data-presence-self",a().self||void 0),l=O(d,"",l,{width:`${g()??""}px`,height:`${g()??""}px`}),N(r,1,`inline-flex h-full w-full items-center justify-center overflow-hidden rounded-full font-medium leading-none ${o()==="tile"?"bg-muted text-muted-foreground":"text-primary-foreground"} ${e(L)||o()==="tile"&&a().viewing===!1?"grayscale":""}`),v=O(r,"",v,{"font-size":e(K),"background-color":n})},[()=>o()==="stack"?we(a().principalId):void 0]),_(t,d)};let p=b(u,"people",7),M=b(u,"maxVisible",7,3),g=b(u,"size",7,16),o=b(u,"variant",7,"stack"),A=b(u,"side",7,"bottom"),q=b(u,"decorative",7,!1),C=b(u,"action",7),B=b(u,"class",7,"");const ae=i(()=>p().slice(0,M())),F=i(()=>Math.max(0,p().length-M())),T=i(()=>p().filter(t=>!t.self&&t.online!==!1).length),U=i(()=>p().filter(t=>!t.self&&t.online===!1).length),re=i(()=>e(T)===1?y.presence_avatarStack_people_one():e(T)>1?y.presence_avatarStack_people_many({count:H(e(T))}):e(U)===0?y.presence_avatarStack_onlyYou_label():e(U)===1?y.presence_avatarStack_offline_one():y.presence_avatarStack_offline_many({count:H(e(U))})),K=i(()=>`${Math.max(8,Math.round(g()*.55))}px`),W=i(()=>Math.max(9,Math.round(g()*.5))),ne={owner:"ring-2 ring-info",member:"ring-2 ring-success",guest:"ring-2 ring-warning-ink",offline:"ring-2 ring-muted-foreground/40"};var se={get people(){return p()},set people(t){p(t),m()},get maxVisible(){return M()},set maxVisible(t=3){M(t),m()},get size(){return g()},set size(t=16){g(t),m()},get variant(){return o()},set variant(t="stack"){o(t),m()},get side(){return A()},set side(t="bottom"){A(t),m()},get decorative(){return q()},set decorative(t=!1){q(t),m()},get action(){return C()},set action(t){C(t),m()},get class(){return B()},set class(t=""){B(t),m()},$set:fe,$on:(t,a)=>pe(u,t,a)},Q=X(),ie=E(Q);{var le=t=>{var a=Le(),k=V(a);_e(k,17,()=>e(ae),l=>l.principalId,(l,r)=>{var v=X(),$=E(v);{var S=c=>{const n=i(()=>{const{label:s,onSelect:h}=C()(e(r));return{personLabel:s,onSelect:h}});{let s=i(()=>e(n).onSelect?void 0:!0),h=i(()=>e(n).onSelect??void 0);ye(c,{variant:"plain",wrapContent:!1,class:"h-auto rounded-full p-0 aria-disabled:opacity-100",get tooltip(){return e(n).personLabel},get tooltipSide(){return A()},get"aria-label"(){return e(n).personLabel},get"aria-disabled"(){return e(s)},get onclick(){return e(h)},get"data-presence-person-button"(){return e(r).principalId},children:(w,x)=>{R(w,()=>e(r))},$$slots:{default:!0}})}},D=c=>{R(c,()=>e(r))},Y=c=>{{let n=i(()=>te(e(r)));ke(c,{get content(){return e(n)},get side(){return A()},children:(s,h)=>{var w=Ae(),x=E(w);R(x,()=>e(r));var oe=j(x,2),de=Z(oe,!0);z(ce=>ee(de,ce),[()=>te(e(r))]),_(s,w)},$$slots:{default:!0}})}};I($,c=>{C()?c(S):q()?c(D,1):c(Y,-1)})}_(l,v)});var L=j(k,2);{var d=l=>{var r=Ce();let v;var $=Z(r,!0);z(S=>{f(r,"data-presence-overflow",e(F)),v=O(r,"",v,{"min-width":`${g()??""}px`,height:`${g()??""}px`,"font-size":e(K)}),ee($,S)},[()=>y.presence_avatarStack_more_label({count:H(e(F))})]),_(l,r)};I(L,l=>{e(F)>0&&l(d)})}G(a),z(l=>{N(a,1,`inline-flex items-center ${o()==="tile"?"flex-wrap gap-1.25":"-space-x-1"} ${B()??""}`),f(a,"aria-label",l),f(a,"data-presence-count",p().length)},[()=>o()==="tile"?y.workspace_peopleTile_title():e(re)]),_(t,a)};I(ie,t=>{p().length>0&&t(le)})}return _(J,Q),ve(se)}export{Ve as P};
1
+ import{t as ue,bq as b,a_ as I,by as fe,b as pe,bo as y}from"./7rNOGHzs.js";import{bs as ge,a7 as X,ay as E,W as _,bn as ve,aA as m,a5 as V,aD as e,bS as j,bl as Z,b_ as z,bO as ee,bA as G,aB as P,bf as be,c9 as i}from"./B8o4lNgr.js";import{h as _e,k as N,s as f,l as O}from"./DmsDslNo.js";import{F as me,br as he,bq as xe}from"./CFejQM6t.js";import{f as ye,am as ke}from"./Bgegixo2.js";import{s as Se}from"./BZC0V7Vm.js";import{t as H}from"./DzMmhJrp.js";import{a as te,p as we,b as ze,d as Pe}from"./DECwqQGV.js";var $e=P('<span aria-hidden="true"></span>'),Ie=P('<span class="absolute -right-0.5 -bottom-0.5 inline-flex items-center justify-center rounded-full bg-background text-foreground" aria-hidden="true"><!></span>'),Me=P('<span><span data-presence-avatar-tile=""><!></span> <!> <!></span>'),Ae=P('<!> <span class="sr-only"> </span>',1),Ce=P('<span class="inline-flex shrink-0 items-center justify-center rounded-full border border-background bg-muted px-1 font-medium leading-none text-muted-foreground"> </span>'),Le=P('<span role="group" data-presence-avatar-stack=""><!> <!></span>');function Ve(J,u){if(new.target)return ue({component:Ve,...J});ge(u,!0);const R=(t,a=be)=>{const k=i(()=>Pe(a())),L=i(()=>a().online===!1);var d=Me();let l;var r=V(d);let v;var $=V(r);{let n=i(()=>ze(a()));Se($,{fill:!0,get avatarUrl(){return a().avatarUrl},get label(){return e(n)}})}G(r);var S=j(r,2);{var D=n=>{var s=$e();z(()=>{N(s,1,`absolute -right-0.5 -top-0.5 h-1.5 w-1.5 rounded-full border border-background ${a().online?"bg-success":"bg-muted-foreground"}`),f(s,"data-presence-status",a().online?"online":"offline")}),_(n,s)};I(S,n=>{o()==="stack"&&a().hostRole&&a().online!==void 0&&n(D)})}var Y=j(S,2);{var c=n=>{var s=Ie();let h;var w=V(s);{let x=i(()=>a().identity.provider==="gitlab"?he:xe);me(w,{get icon(){return e(x)}})}G(s),z(x=>{f(s,"data-presence-identity-provider",a().identity.provider),f(s,"data-presence-identity-host",a().identity.host),h=O(s,"",h,{width:`${e(W)??""}px`,height:`${e(W)??""}px`,"font-size":x})},[()=>`${Math.round(e(W)*.8)}px`]),_(n,s)};I(Y,n=>{o()==="stack"&&a().identity&&n(c)})}G(d),z(n=>{N(d,1,`relative inline-flex shrink-0 rounded-full border ${o()==="tile"?"border-border":`border-background ${e(k)?ne[e(k)]:""}`}`),f(d,"data-presence-avatar",a().principalId),f(d,"data-presence-ring",o()==="stack"?e(k)??void 0:void 0),f(d,"data-presence-offline",e(L)||void 0),f(d,"data-presence-self",a().self||void 0),l=O(d,"",l,{width:`${g()??""}px`,height:`${g()??""}px`}),N(r,1,`inline-flex h-full w-full items-center justify-center overflow-hidden rounded-full font-medium leading-none ${o()==="tile"?"bg-muted text-muted-foreground":"text-primary-foreground"} ${e(L)||o()==="tile"&&a().viewing===!1?"grayscale":""}`),v=O(r,"",v,{"font-size":e(K),"background-color":n})},[()=>o()==="stack"?we(a().principalId):void 0]),_(t,d)};let p=b(u,"people",7),M=b(u,"maxVisible",7,3),g=b(u,"size",7,16),o=b(u,"variant",7,"stack"),A=b(u,"side",7,"bottom"),q=b(u,"decorative",7,!1),C=b(u,"action",7),B=b(u,"class",7,"");const ae=i(()=>p().slice(0,M())),F=i(()=>Math.max(0,p().length-M())),T=i(()=>p().filter(t=>!t.self&&t.online!==!1).length),U=i(()=>p().filter(t=>!t.self&&t.online===!1).length),re=i(()=>e(T)===1?y.presence_avatarStack_people_one():e(T)>1?y.presence_avatarStack_people_many({count:H(e(T))}):e(U)===0?y.presence_avatarStack_onlyYou_label():e(U)===1?y.presence_avatarStack_offline_one():y.presence_avatarStack_offline_many({count:H(e(U))})),K=i(()=>`${Math.max(8,Math.round(g()*.55))}px`),W=i(()=>Math.max(9,Math.round(g()*.5))),ne={owner:"ring-2 ring-info",member:"ring-2 ring-success",guest:"ring-2 ring-warning-ink",offline:"ring-2 ring-muted-foreground/40"};var se={get people(){return p()},set people(t){p(t),m()},get maxVisible(){return M()},set maxVisible(t=3){M(t),m()},get size(){return g()},set size(t=16){g(t),m()},get variant(){return o()},set variant(t="stack"){o(t),m()},get side(){return A()},set side(t="bottom"){A(t),m()},get decorative(){return q()},set decorative(t=!1){q(t),m()},get action(){return C()},set action(t){C(t),m()},get class(){return B()},set class(t=""){B(t),m()},$set:fe,$on:(t,a)=>pe(u,t,a)},Q=X(),ie=E(Q);{var le=t=>{var a=Le(),k=V(a);_e(k,17,()=>e(ae),l=>l.principalId,(l,r)=>{var v=X(),$=E(v);{var S=c=>{const n=i(()=>{const{label:s,onSelect:h}=C()(e(r));return{personLabel:s,onSelect:h}});{let s=i(()=>e(n).onSelect?void 0:!0),h=i(()=>e(n).onSelect??void 0);ye(c,{variant:"plain",wrapContent:!1,class:"h-auto rounded-full p-0 aria-disabled:opacity-100",get tooltip(){return e(n).personLabel},get tooltipSide(){return A()},get"aria-label"(){return e(n).personLabel},get"aria-disabled"(){return e(s)},get onclick(){return e(h)},get"data-presence-person-button"(){return e(r).principalId},children:(w,x)=>{R(w,()=>e(r))},$$slots:{default:!0}})}},D=c=>{R(c,()=>e(r))},Y=c=>{{let n=i(()=>te(e(r)));ke(c,{get content(){return e(n)},get side(){return A()},children:(s,h)=>{var w=Ae(),x=E(w);R(x,()=>e(r));var oe=j(x,2),de=Z(oe,!0);z(ce=>ee(de,ce),[()=>te(e(r))]),_(s,w)},$$slots:{default:!0}})}};I($,c=>{C()?c(S):q()?c(D,1):c(Y,-1)})}_(l,v)});var L=j(k,2);{var d=l=>{var r=Ce();let v;var $=Z(r,!0);z(S=>{f(r,"data-presence-overflow",e(F)),v=O(r,"",v,{"min-width":`${g()??""}px`,height:`${g()??""}px`,"font-size":e(K)}),ee($,S)},[()=>y.presence_avatarStack_more_label({count:H(e(F))})]),_(l,r)};I(L,l=>{e(F)>0&&l(d)})}G(a),z(l=>{N(a,1,`inline-flex items-center ${o()==="tile"?"flex-wrap gap-1.25":"-space-x-1"} ${B()??""}`),f(a,"aria-label",l),f(a,"data-presence-count",p().length)},[()=>o()==="tile"?y.workspace_peopleTile_title():e(re)]),_(t,a)};I(ie,t=>{p().length>0&&t(le)})}return _(J,Q),ve(se)}export{Ve as P};
@@ -1,4 +1,4 @@
1
- import{bi as xt,a9 as _t,bf as vt,a5 as bt,bg as St,a6 as wt,c as y,a8 as lt,V as Lt,bc as X,bl as Et,w as At,G as Tt}from"./Cl430GWg.js";import{o as Mt}from"./CmKTTxBW.js";function Nt(t){for(var n=t.length/6|0,s=new Array(n),a=0;a<n;)s[a]="#"+t.slice(a*6,++a*6);return s}const Ct=Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ct(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s<a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function pt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function nt(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let u of t)(u=+n(u,++a,t))&&(s+=u)}return s}function Pt(t){return t.target.depth}function It(t){return t.depth}function Ot(t,n){return n-1-t.height}function kt(t,n){return t.sourceLinks.length?t.depth:n-1}function $t(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function q(t){return function(){return t}}function ut(t,n){return Q(t.source,n.source)||t.index-n.index}function ht(t,n){return Q(t.target,n.target)||t.index-n.index}function Q(t,n){return t.y0-n.y0}function it(t){return t.value}function Dt(t){return t.index}function jt(t){return t.nodes}function zt(t){return t.links}function ft(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function yt({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const u of n.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of n.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Bt(){let t=0,n=0,s=1,a=1,u=24,x=8,g,k=Dt,o=kt,l,h,m=jt,_=zt,d=6;function v(){const i={nodes:m.apply(null,arguments),links:_.apply(null,arguments)};return T(i),A(i),M(i),I(i),S(i),yt(i),i}v.update=function(i){return yt(i),i},v.nodeId=function(i){return arguments.length?(k=typeof i=="function"?i:q(i),v):k},v.nodeAlign=function(i){return arguments.length?(o=typeof i=="function"?i:q(i),v):o},v.nodeSort=function(i){return arguments.length?(l=i,v):l},v.nodeWidth=function(i){return arguments.length?(u=+i,v):u},v.nodePadding=function(i){return arguments.length?(x=g=+i,v):x},v.nodes=function(i){return arguments.length?(m=typeof i=="function"?i:q(i),v):m},v.links=function(i){return arguments.length?(_=typeof i=="function"?i:q(i),v):_},v.linkSort=function(i){return arguments.length?(h=i,v):h},v.size=function(i){return arguments.length?(t=n=0,s=+i[0],a=+i[1],v):[s-t,a-n]},v.extent=function(i){return arguments.length?(t=+i[0][0],s=+i[1][0],n=+i[0][1],a=+i[1][1],v):[[t,n],[s,a]]},v.iterations=function(i){return arguments.length?(d=+i,v):d};function T({nodes:i,links:f}){for(const[e,r]of i.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(i.map((e,r)=>[k(e,r,i),e]));for(const[e,r]of f.entries()){r.index=e;let{source:p,target:b}=r;typeof p!="object"&&(p=r.source=ft(c,p)),typeof b!="object"&&(b=r.target=ft(c,b)),p.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of i)e.sort(h),r.sort(h)}function A({nodes:i}){for(const f of i)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function M({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const p of c){p.depth=r;for(const{target:b}of p.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const p of c){p.height=r;for(const{source:b}of p.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:i}){const f=ct(i,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of i){const p=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=p,r.x0=t+p*c,r.x1=r.x0+u,e[p]?e[p].push(r):e[p]=[r]}if(l)for(const r of e)r.sort(l);return e}function D(i){const f=pt(i,c=>(a-n-(c.length-1)*g)/nt(c,it));for(const c of i){let e=n;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+g;for(const p of r.sourceLinks)p.width=p.value*f}e=(a-e+g)/(c.length+1);for(let r=0;r<c.length;++r){const p=c[r];p.y0+=e*(r+1),p.y1+=e*(r+1)}w(c)}}function S(i){const f=N(i);g=Math.min(x,(a-n)/(ct(f,c=>c.length)-1)),D(f);for(let c=0;c<d;++c){const e=Math.pow(.99,c),r=Math.max(1-e,(c+1)/d);V(f,e,r),C(f,e,r)}}function C(i,f,c){for(let e=1,r=i.length;e<r;++e){const p=i[e];for(const b of p){let L=0,B=0;for(const{source:Y,value:et}of b.targetLinks){let H=et*(b.layer-Y.layer);L+=P(Y,b)*H,B+=H}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}l===void 0&&p.sort(Q),j(p,c)}}function V(i,f,c){for(let e=i.length,r=e-2;r>=0;--r){const p=i[r];for(const b of p){let L=0,B=0;for(const{target:Y,value:et}of b.sourceLinks){let H=et*(Y.layer-b.layer);L+=E(b,Y)*H,B+=H}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}l===void 0&&p.sort(Q),j(p,c)}}function j(i,f){const c=i.length>>1,e=i[c];O(i,e.y0-g,c-1,f),R(i,e.y1+g,c+1,f),O(i,a,i.length-1,f),R(i,n,0,f)}function R(i,f,c,e){for(;c<i.length;++c){const r=i[c],p=(f-r.y0)*e;p>1e-6&&(r.y0+=p,r.y1+=p),f=r.y1+g}}function O(i,f,c,e){for(;c>=0;--c){const r=i[c],p=(r.y1-f)*e;p>1e-6&&(r.y0-=p,r.y1-=p),f=r.y0-g}}function z({sourceLinks:i,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ht);for(const{target:{targetLinks:c}}of i)c.sort(ut)}}function w(i){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of i)f.sort(ht),c.sort(ut)}function P(i,f){let c=i.y0-(i.sourceLinks.length-1)*g/2;for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c+=r+g}for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c-=r}return c}function E(i,f){let c=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c+=r+g}for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c-=r}return c}return v}var rt=Math.PI,st=2*rt,F=1e-6,Ft=st-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function mt(){return new ot}ot.prototype=mt.prototype={constructor:ot,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,u,x){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+u)+","+(this._y1=+x)},arcTo:function(t,n,s,a,u){t=+t,n=+n,s=+s,a=+a,u=+u;var x=this._x1,g=this._y1,k=s-t,o=a-n,l=x-t,h=g-n,m=l*l+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(m>F)if(!(Math.abs(h*k-o*l)>F)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var _=s-x,d=a-g,v=k*k+o*o,T=_*_+d*d,A=Math.sqrt(v),M=Math.sqrt(m),I=u*Math.tan((rt-Math.acos((v+m-T)/(2*A*M)))/2),N=I/M,D=I/A;Math.abs(N-1)>F&&(this._+="L"+(t+N*l)+","+(n+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>l*d)+","+(this._x1=t+D*k)+","+(this._y1=n+D*o)}},arc:function(t,n,s,a,u,x){t=+t,n=+n,s=+s,x=!!x;var g=s*Math.cos(a),k=s*Math.sin(a),o=t+g,l=n+k,h=1^x,m=x?a-u:u-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+l:(Math.abs(this._x1-o)>F||Math.abs(this._y1-l)>F)&&(this._+="L"+o+","+l),s&&(m<0&&(m=m%st+st),m>Ft?this._+="A"+s+","+s+",0,1,"+h+","+(t-g)+","+(n-k)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=l):m>F&&(this._+="A"+s+","+s+",0,"+ +(m>=rt)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=n+s*Math.sin(u))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Vt(t){return t[0]}function Rt(t){return t[1]}var Wt=Array.prototype.slice;function Gt(t){return t.source}function Ut(t){return t.target}function Yt(t){var n=Gt,s=Ut,a=Vt,u=Rt,x=null;function g(){var k,o=Wt.call(arguments),l=n.apply(this,o),h=s.apply(this,o);if(x||(x=k=mt()),t(x,+a.apply(this,(o[0]=l,o)),+u.apply(this,o),+a.apply(this,(o[0]=h,o)),+u.apply(this,o)),k)return x=null,k+""||null}return g.source=function(k){return arguments.length?(n=k,g):n},g.target=function(k){return arguments.length?(s=k,g):s},g.x=function(k){return arguments.length?(a=typeof k=="function"?k:dt(+k),g):a},g.y=function(k){return arguments.length?(u=typeof k=="function"?k:dt(+k),g):u},g.context=function(k){return arguments.length?(x=k??null,g):x},g}function Ht(t,n,s,a,u){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,u,a,u)}function Xt(){return Yt(Ht)}function qt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Xt().source(qt).target(Qt)}var at=(function(){var t=y(function(k,o,l,h){for(l=l||{},h=k.length;h--;l[k[h]]=o);return l},"o"),n=[1,9],s=[1,10],a=[1,5,10,12],u={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:y(function(o,l,h,m,_,d,v){var T=d.length-1;switch(_){case 7:const A=m.findOrCreateNode(d[T-4].trim().replaceAll('""','"')),M=m.findOrCreateNode(d[T-2].trim().replaceAll('""','"')),I=parseFloat(d[T].trim());m.addLink(A,M,I);break;case 8:case 9:case 11:this.$=d[T];break;case 10:this.$=d[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:y(function(o,l){if(l.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=l,h}},"parseError"),parse:y(function(o){var l=this,h=[0],m=[],_=[null],d=[],v=this.table,T="",A=0,M=0,I=2,N=1,D=d.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(C.yy[V]=this.yy[V]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var j=S.yylloc;d.push(j);var R=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,d.length=d.length-L}y(O,"popStack");function z(){var L;return L=m.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(m=L,L=m.pop()),L=l.symbols_[L]||L),L}y(z,"lex");for(var w,P,E,i,f={},c,e,r,p;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=z()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";p=[];for(c in v[P])this.terminals_[c]&&c>I&&p.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`:
1
+ import{bi as xt,a9 as _t,bf as vt,a5 as bt,bg as St,a6 as wt,c as y,a8 as lt,V as Lt,bc as X,bl as Et,w as At,G as Tt}from"./ENpFvA2b.js";import{o as Mt}from"./CmKTTxBW.js";function Nt(t){for(var n=t.length/6|0,s=new Array(n),a=0;a<n;)s[a]="#"+t.slice(a*6,++a*6);return s}const Ct=Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ct(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s<a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function pt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function nt(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let u of t)(u=+n(u,++a,t))&&(s+=u)}return s}function Pt(t){return t.target.depth}function It(t){return t.depth}function Ot(t,n){return n-1-t.height}function kt(t,n){return t.sourceLinks.length?t.depth:n-1}function $t(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function q(t){return function(){return t}}function ut(t,n){return Q(t.source,n.source)||t.index-n.index}function ht(t,n){return Q(t.target,n.target)||t.index-n.index}function Q(t,n){return t.y0-n.y0}function it(t){return t.value}function Dt(t){return t.index}function jt(t){return t.nodes}function zt(t){return t.links}function ft(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function yt({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const u of n.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of n.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Bt(){let t=0,n=0,s=1,a=1,u=24,x=8,g,k=Dt,o=kt,l,h,m=jt,_=zt,d=6;function v(){const i={nodes:m.apply(null,arguments),links:_.apply(null,arguments)};return T(i),A(i),M(i),I(i),S(i),yt(i),i}v.update=function(i){return yt(i),i},v.nodeId=function(i){return arguments.length?(k=typeof i=="function"?i:q(i),v):k},v.nodeAlign=function(i){return arguments.length?(o=typeof i=="function"?i:q(i),v):o},v.nodeSort=function(i){return arguments.length?(l=i,v):l},v.nodeWidth=function(i){return arguments.length?(u=+i,v):u},v.nodePadding=function(i){return arguments.length?(x=g=+i,v):x},v.nodes=function(i){return arguments.length?(m=typeof i=="function"?i:q(i),v):m},v.links=function(i){return arguments.length?(_=typeof i=="function"?i:q(i),v):_},v.linkSort=function(i){return arguments.length?(h=i,v):h},v.size=function(i){return arguments.length?(t=n=0,s=+i[0],a=+i[1],v):[s-t,a-n]},v.extent=function(i){return arguments.length?(t=+i[0][0],s=+i[1][0],n=+i[0][1],a=+i[1][1],v):[[t,n],[s,a]]},v.iterations=function(i){return arguments.length?(d=+i,v):d};function T({nodes:i,links:f}){for(const[e,r]of i.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(i.map((e,r)=>[k(e,r,i),e]));for(const[e,r]of f.entries()){r.index=e;let{source:p,target:b}=r;typeof p!="object"&&(p=r.source=ft(c,p)),typeof b!="object"&&(b=r.target=ft(c,b)),p.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of i)e.sort(h),r.sort(h)}function A({nodes:i}){for(const f of i)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function M({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const p of c){p.depth=r;for(const{target:b}of p.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const p of c){p.height=r;for(const{source:b}of p.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:i}){const f=ct(i,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of i){const p=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=p,r.x0=t+p*c,r.x1=r.x0+u,e[p]?e[p].push(r):e[p]=[r]}if(l)for(const r of e)r.sort(l);return e}function D(i){const f=pt(i,c=>(a-n-(c.length-1)*g)/nt(c,it));for(const c of i){let e=n;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+g;for(const p of r.sourceLinks)p.width=p.value*f}e=(a-e+g)/(c.length+1);for(let r=0;r<c.length;++r){const p=c[r];p.y0+=e*(r+1),p.y1+=e*(r+1)}w(c)}}function S(i){const f=N(i);g=Math.min(x,(a-n)/(ct(f,c=>c.length)-1)),D(f);for(let c=0;c<d;++c){const e=Math.pow(.99,c),r=Math.max(1-e,(c+1)/d);V(f,e,r),C(f,e,r)}}function C(i,f,c){for(let e=1,r=i.length;e<r;++e){const p=i[e];for(const b of p){let L=0,B=0;for(const{source:Y,value:et}of b.targetLinks){let H=et*(b.layer-Y.layer);L+=P(Y,b)*H,B+=H}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}l===void 0&&p.sort(Q),j(p,c)}}function V(i,f,c){for(let e=i.length,r=e-2;r>=0;--r){const p=i[r];for(const b of p){let L=0,B=0;for(const{target:Y,value:et}of b.sourceLinks){let H=et*(Y.layer-b.layer);L+=E(b,Y)*H,B+=H}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}l===void 0&&p.sort(Q),j(p,c)}}function j(i,f){const c=i.length>>1,e=i[c];O(i,e.y0-g,c-1,f),R(i,e.y1+g,c+1,f),O(i,a,i.length-1,f),R(i,n,0,f)}function R(i,f,c,e){for(;c<i.length;++c){const r=i[c],p=(f-r.y0)*e;p>1e-6&&(r.y0+=p,r.y1+=p),f=r.y1+g}}function O(i,f,c,e){for(;c>=0;--c){const r=i[c],p=(r.y1-f)*e;p>1e-6&&(r.y0-=p,r.y1-=p),f=r.y0-g}}function z({sourceLinks:i,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ht);for(const{target:{targetLinks:c}}of i)c.sort(ut)}}function w(i){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of i)f.sort(ht),c.sort(ut)}function P(i,f){let c=i.y0-(i.sourceLinks.length-1)*g/2;for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c+=r+g}for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c-=r}return c}function E(i,f){let c=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c+=r+g}for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c-=r}return c}return v}var rt=Math.PI,st=2*rt,F=1e-6,Ft=st-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function mt(){return new ot}ot.prototype=mt.prototype={constructor:ot,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,u,x){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+u)+","+(this._y1=+x)},arcTo:function(t,n,s,a,u){t=+t,n=+n,s=+s,a=+a,u=+u;var x=this._x1,g=this._y1,k=s-t,o=a-n,l=x-t,h=g-n,m=l*l+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(m>F)if(!(Math.abs(h*k-o*l)>F)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var _=s-x,d=a-g,v=k*k+o*o,T=_*_+d*d,A=Math.sqrt(v),M=Math.sqrt(m),I=u*Math.tan((rt-Math.acos((v+m-T)/(2*A*M)))/2),N=I/M,D=I/A;Math.abs(N-1)>F&&(this._+="L"+(t+N*l)+","+(n+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>l*d)+","+(this._x1=t+D*k)+","+(this._y1=n+D*o)}},arc:function(t,n,s,a,u,x){t=+t,n=+n,s=+s,x=!!x;var g=s*Math.cos(a),k=s*Math.sin(a),o=t+g,l=n+k,h=1^x,m=x?a-u:u-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+l:(Math.abs(this._x1-o)>F||Math.abs(this._y1-l)>F)&&(this._+="L"+o+","+l),s&&(m<0&&(m=m%st+st),m>Ft?this._+="A"+s+","+s+",0,1,"+h+","+(t-g)+","+(n-k)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=l):m>F&&(this._+="A"+s+","+s+",0,"+ +(m>=rt)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=n+s*Math.sin(u))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Vt(t){return t[0]}function Rt(t){return t[1]}var Wt=Array.prototype.slice;function Gt(t){return t.source}function Ut(t){return t.target}function Yt(t){var n=Gt,s=Ut,a=Vt,u=Rt,x=null;function g(){var k,o=Wt.call(arguments),l=n.apply(this,o),h=s.apply(this,o);if(x||(x=k=mt()),t(x,+a.apply(this,(o[0]=l,o)),+u.apply(this,o),+a.apply(this,(o[0]=h,o)),+u.apply(this,o)),k)return x=null,k+""||null}return g.source=function(k){return arguments.length?(n=k,g):n},g.target=function(k){return arguments.length?(s=k,g):s},g.x=function(k){return arguments.length?(a=typeof k=="function"?k:dt(+k),g):a},g.y=function(k){return arguments.length?(u=typeof k=="function"?k:dt(+k),g):u},g.context=function(k){return arguments.length?(x=k??null,g):x},g}function Ht(t,n,s,a,u){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,u,a,u)}function Xt(){return Yt(Ht)}function qt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Xt().source(qt).target(Qt)}var at=(function(){var t=y(function(k,o,l,h){for(l=l||{},h=k.length;h--;l[k[h]]=o);return l},"o"),n=[1,9],s=[1,10],a=[1,5,10,12],u={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:y(function(o,l,h,m,_,d,v){var T=d.length-1;switch(_){case 7:const A=m.findOrCreateNode(d[T-4].trim().replaceAll('""','"')),M=m.findOrCreateNode(d[T-2].trim().replaceAll('""','"')),I=parseFloat(d[T].trim());m.addLink(A,M,I);break;case 8:case 9:case 11:this.$=d[T];break;case 10:this.$=d[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:y(function(o,l){if(l.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=l,h}},"parseError"),parse:y(function(o){var l=this,h=[0],m=[],_=[null],d=[],v=this.table,T="",A=0,M=0,I=2,N=1,D=d.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(C.yy[V]=this.yy[V]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var j=S.yylloc;d.push(j);var R=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,d.length=d.length-L}y(O,"popStack");function z(){var L;return L=m.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(m=L,L=m.pop()),L=l.symbols_[L]||L),L}y(z,"lex");for(var w,P,E,i,f={},c,e,r,p;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=z()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";p=[];for(c in v[P])this.terminals_[c]&&c>I&&p.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`:
2
2
  `+S.showPosition()+`
3
3
  Expecting `+p.join(", ")+", got '"+(this.terminals_[w]||w)+"'":b="Parse error on line "+(A+1)+": Unexpected "+(w==N?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(b,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:j,expected:p})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+w);switch(E[0]){case 1:h.push(w),_.push(S.yytext),d.push(S.yylloc),h.push(E[1]),w=null,M=S.yyleng,T=S.yytext,A=S.yylineno,j=S.yylloc;break;case 2:if(e=this.productions_[E[1]][1],f.$=_[_.length-e],f._$={first_line:d[d.length-(e||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(e||1)].first_column,last_column:d[d.length-1].last_column},R&&(f._$.range=[d[d.length-(e||1)].range[0],d[d.length-1].range[1]]),i=this.performAction.apply(f,[T,M,A,C.yy,E[1],_,d].concat(D)),typeof i<"u")return i;e&&(h=h.slice(0,-1*e*2),_=_.slice(0,-1*e),d=d.slice(0,-1*e)),h.push(this.productions_[E[1]][0]),_.push(f.$),d.push(f._$),r=v[h[h.length-2]][h[h.length-1]],h.push(r);break;case 3:return!0}}return!0},"parse")},x=(function(){var k={EOF:1,parseError:y(function(l,h){if(this.yy.parser)this.yy.parser.parseError(l,h);else throw new Error(l)},"parseError"),setInput:y(function(o,l){return this.yy=l||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:y(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var l=o.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:y(function(o){var l=o.length,h=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var m=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),h.length-1&&(this.yylineno-=h.length-1);var _=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:h?(h.length===m.length?this.yylloc.first_column:0)+m[m.length-h.length].length-h[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:y(function(){return this._more=!0,this},"more"),reject:y(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:y(function(o){this.unput(this.match.slice(o))},"less"),pastInput:y(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:y(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:y(function(){var o=this.pastInput(),l=new Array(o.length+1).join("-");return o+this.upcomingInput()+`