@intent-hq/web 2.369.1 → 2.370.0

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 (260) hide show
  1. package/bin/intent-web.mjs +113 -2
  2. package/package.json +1 -1
  3. package/web/app/immutable/chunks/{DodshHwq.js → -7AqlW5j.js} +1 -1
  4. package/web/app/immutable/chunks/{8bw9vP4h.js → 1DKpnRTj.js} +1 -1
  5. package/web/app/immutable/chunks/{Ck5xuk0H.js → 1GGKXNxU.js} +1 -1
  6. package/web/app/immutable/chunks/{DR7bEdZk.js → 1GrJvO3a.js} +1 -1
  7. package/web/app/immutable/chunks/{s1m3ujOc.js → 1pIqWRUk.js} +1 -1
  8. package/web/app/immutable/chunks/{CV10cSI4.js → 1q0xL14K.js} +1 -1
  9. package/web/app/immutable/chunks/{CWybLnJv.js → 5lieSvED.js} +1 -1
  10. package/web/app/immutable/chunks/{BPCO02B5.js → 9-nUCsGi.js} +1 -1
  11. package/web/app/immutable/chunks/{V6SVTu37.js → 9sCF_0su.js} +1 -1
  12. package/web/app/immutable/chunks/{D0Z6csIX.js → A4nvdmL6.js} +1 -1
  13. package/web/app/immutable/chunks/{9wk-Hes5.js → B-1iBpaq.js} +1 -1
  14. package/web/app/immutable/chunks/{7mowE2Gg.js → B-_ROixI.js} +2 -2
  15. package/web/app/immutable/chunks/{DvPSMnYw.js → B-kUJzil.js} +1 -1
  16. package/web/app/immutable/chunks/{iTSQ9YOi.js → B0SoVMRS.js} +1 -1
  17. package/web/app/immutable/chunks/{Cu3YXFZW.js → B1hj1DGj.js} +1 -1
  18. package/web/app/immutable/chunks/{B9EhZrTN.js → B1lYPzEU.js} +1 -1
  19. package/web/app/immutable/chunks/{BigChyTJ.js → B2AfKG58.js} +2 -2
  20. package/web/app/immutable/chunks/{DyBkeTEM.js → B3Gso1ut.js} +1 -1
  21. package/web/app/immutable/chunks/{CRwqTV0i.js → B8_Ff8zl.js} +1 -1
  22. package/web/app/immutable/chunks/{BUrTAEns.js → B9BjyTgZ.js} +1 -1
  23. package/web/app/immutable/chunks/{DsI0RDZ2.js → B9mj0qwd.js} +1 -1
  24. package/web/app/immutable/chunks/{SX1khnGy.js → BAymCgEX.js} +1 -1
  25. package/web/app/immutable/chunks/{DMl4Z5o_.js → BBWuirRW.js} +1 -1
  26. package/web/app/immutable/chunks/{DCJDf3gb.js → BCQ1W7zT.js} +3 -3
  27. package/web/app/immutable/chunks/{Dd_WBgru.js → BDA31WCY.js} +1 -1
  28. package/web/app/immutable/chunks/{D7slXRL_.js → BDcauMkX.js} +1 -1
  29. package/web/app/immutable/chunks/{CQw_RyF_.js → BEV9WkWU.js} +1 -1
  30. package/web/app/immutable/chunks/{CBZ4KqrB.js → BG2RPA7A.js} +2 -2
  31. package/web/app/immutable/chunks/{wJewnowK.js → BGT9uvaQ.js} +6 -6
  32. package/web/app/immutable/chunks/{BUHAwVs7.js → BHaE4286.js} +1 -1
  33. package/web/app/immutable/chunks/{CGOlqeU_.js → BIv0yV05.js} +1 -1
  34. package/web/app/immutable/chunks/{ie53yFct.js → BR2t5nsF.js} +2 -2
  35. package/web/app/immutable/chunks/{DUItrdZb.js → BRRvOx4M.js} +1 -1
  36. package/web/app/immutable/chunks/{BKuhcLZN.js → BSD34ZVo.js} +1 -1
  37. package/web/app/immutable/chunks/{oOuL5l8A.js → BSfkjlLx.js} +1 -1
  38. package/web/app/immutable/chunks/{B6jI9-V_.js → BSsEOl8-.js} +1 -1
  39. package/web/app/immutable/chunks/{ge7HDe-3.js → BUA7BUyu.js} +1 -1
  40. package/web/app/immutable/chunks/{CJb9CQqu.js → BVLa_5Le.js} +1 -1
  41. package/web/app/immutable/chunks/{BlIreYOW.js → BX9hgO_H.js} +1 -1
  42. package/web/app/immutable/chunks/{Bo-8pH0P.js → BYMXwcID.js} +1 -1
  43. package/web/app/immutable/chunks/{BEqf00Je.js → B_IEMfS6.js} +3 -3
  44. package/web/app/immutable/chunks/{C5rcw_c7.js → Bc7pHsTy.js} +1 -1
  45. package/web/app/immutable/chunks/{CUH5IR0E.js → Bg7YNbVH.js} +1 -1
  46. package/web/app/immutable/chunks/{nRmTo2Eh.js → BgPtjifd.js} +1 -1
  47. package/web/app/immutable/chunks/{FavPgSsK.js → BhZDGIfe.js} +1 -1
  48. package/web/app/immutable/chunks/{Dxjy2MWO.js → Bi0vr71w.js} +1 -1
  49. package/web/app/immutable/chunks/{DfSzfqox.js → BimRiD6s.js} +1 -1
  50. package/web/app/immutable/chunks/{msw9XRLE.js → BinPWBvt.js} +1 -1
  51. package/web/app/immutable/chunks/{BrAu7eNn.js → BkFHmpuY.js} +1 -1
  52. package/web/app/immutable/chunks/{6i_wfV3v.js → Blu9C_Vv.js} +1 -1
  53. package/web/app/immutable/chunks/{CgXGPBF5.js → BmBa9vQp.js} +1 -1
  54. package/web/app/immutable/chunks/{D1E6y9eQ.js → BmjF1SON.js} +1 -1
  55. package/web/app/immutable/chunks/{ByCxDC-R.js → BnNJN3Ls.js} +1 -1
  56. package/web/app/immutable/chunks/{D321NUNJ.js → BnhOIUmr.js} +1 -1
  57. package/web/app/immutable/chunks/{BxbMMWzz.js → Bp098-aN.js} +1 -1
  58. package/web/app/immutable/chunks/{BLzqYDED.js → BpEHjU4g.js} +1 -1
  59. package/web/app/immutable/chunks/Bqd7fdCF.js +1 -0
  60. package/web/app/immutable/chunks/{BuveYyQe.js → Bqm2Rf6d.js} +1 -1
  61. package/web/app/immutable/chunks/{BuLzqNKd.js → BqxcrzZH.js} +1 -1
  62. package/web/app/immutable/chunks/{TaTYmBM5.js → Bu13V5mO.js} +1 -1
  63. package/web/app/immutable/chunks/{BHfEypjS.js → BulBKnVz.js} +1 -1
  64. package/web/app/immutable/chunks/{B-F2f_Hq.js → Bus1Z5ou.js} +1 -1
  65. package/web/app/immutable/chunks/{Cl71oYkB.js → BvKqDQXM.js} +1 -1
  66. package/web/app/immutable/chunks/{ByN-IDvR.js → BvZfa6RH.js} +1 -1
  67. package/web/app/immutable/chunks/{DWsHBNeU.js → Bvo32SXP.js} +1 -1
  68. package/web/app/immutable/chunks/{nIQsF0QH.js → BwtGEQS3.js} +1 -1
  69. package/web/app/immutable/chunks/{BE2y8JEQ.js → BzFy3u2D.js} +1 -1
  70. package/web/app/immutable/chunks/{CqesqBNM.js → C0wua3Vt.js} +1 -1
  71. package/web/app/immutable/chunks/{Dxs2medA.js → C14Hgf8a.js} +1 -1
  72. package/web/app/immutable/chunks/{zhSFUcJz.js → C1AEP5wW.js} +1 -1
  73. package/web/app/immutable/chunks/{D1cY0pVs.js → C2Vj5Vs6.js} +1 -1
  74. package/web/app/immutable/chunks/{ClSUFCtq.js → C2YH0P-B.js} +1 -1
  75. package/web/app/immutable/chunks/{DQUvqa9o.js → CA2ANaNj.js} +1 -1
  76. package/web/app/immutable/chunks/{DSqj6mlv.js → CADQyVDS.js} +2 -2
  77. package/web/app/immutable/chunks/{CNn7flY0.js → CBRZjI7P.js} +2 -2
  78. package/web/app/immutable/chunks/{BDbtK9be.js → CBafvv8h.js} +1 -1
  79. package/web/app/immutable/chunks/{BnRltR11.js → CCSbqNiH.js} +1 -1
  80. package/web/app/immutable/chunks/{Wv5_ui4s.js → CCrwZkau.js} +1 -1
  81. package/web/app/immutable/chunks/{B2FXFK8l.js → CCsCF1Mh.js} +1 -1
  82. package/web/app/immutable/chunks/CFNJHO2G.js +1 -0
  83. package/web/app/immutable/chunks/{6CAGpBb_.js → CGzD6XfW.js} +1 -1
  84. package/web/app/immutable/chunks/{3_UV1UgL.js → CH7fgKro.js} +1 -1
  85. package/web/app/immutable/chunks/CK4eAyad.js +1 -0
  86. package/web/app/immutable/chunks/{Dz5OBP4z.js → CKnpbRTh.js} +4 -4
  87. package/web/app/immutable/chunks/{DCOxMTSf.js → CL3a4Hm1.js} +1 -1
  88. package/web/app/immutable/chunks/{D9NDL9ta.js → CMLBE7U6.js} +1 -1
  89. package/web/app/immutable/chunks/{Bl3mtXZn.js → CPlH-52U.js} +1 -1
  90. package/web/app/immutable/chunks/{XPs8BW44.js → CQAAihrI.js} +1 -1
  91. package/web/app/immutable/chunks/{C6T3ggVX.js → CQHtdg39.js} +1 -1
  92. package/web/app/immutable/chunks/{DdKIjYo_.js → CQ_NwL45.js} +2 -2
  93. package/web/app/immutable/chunks/{Bd_VEON_.js → CR2m4w2U.js} +1 -1
  94. package/web/app/immutable/chunks/{CFvGekuw.js → CRNfAyhd.js} +1 -1
  95. package/web/app/immutable/chunks/{C5X1QcI7.js → CRY4aELR.js} +3 -3
  96. package/web/app/immutable/chunks/{BsjFeGOg.js → CSBGusi9.js} +1 -1
  97. package/web/app/immutable/chunks/{DxejgjNm.js → CUMRLgxB.js} +1 -1
  98. package/web/app/immutable/chunks/{BOCp5eAe.js → CUNx-_2d.js} +4 -4
  99. package/web/app/immutable/chunks/{DuPd2TLf.js → CUdMuhJF.js} +1 -1
  100. package/web/app/immutable/chunks/{s97D1nrA.js → CY-vjmpy.js} +1 -1
  101. package/web/app/immutable/chunks/{C1McR-sz.js → CYKOPxuJ.js} +1 -1
  102. package/web/app/immutable/chunks/{CMqhKAKf.js → C_-WdiR8.js} +1 -1
  103. package/web/app/immutable/chunks/{PxI10rWs.js → C_E26DWe.js} +1 -1
  104. package/web/app/immutable/chunks/{CxF8L5mw.js → CaHds95Q.js} +1 -1
  105. package/web/app/immutable/chunks/{C1VlgusM.js → Caqml6gj.js} +1 -1
  106. package/web/app/immutable/chunks/{N5wpZAwp.js → CbRNm5he.js} +1 -1
  107. package/web/app/immutable/chunks/{Zldsekdv.js → CbRsc9i4.js} +1 -1
  108. package/web/app/immutable/chunks/{C7kFrL62.js → CblB0zCN.js} +1 -1
  109. package/web/app/immutable/chunks/{BQGSaBlM.js → CbyU6cEf.js} +1 -1
  110. package/web/app/immutable/chunks/{Cdw_CIdg.js → CdOh_Fmv.js} +1 -1
  111. package/web/app/immutable/chunks/{BsE4jMhr.js → CfUtc4-L.js} +1 -1
  112. package/web/app/immutable/chunks/{C6MAELkY.js → CgS_FiQI.js} +1 -1
  113. package/web/app/immutable/chunks/{CF1Tu_8c.js → Cgn_eC9-.js} +3 -3
  114. package/web/app/immutable/chunks/{XJqoy2ap.js → CgwFGLCK.js} +1 -1
  115. package/web/app/immutable/chunks/{sG8VksRm.js → Chnr0_jK.js} +1 -1
  116. package/web/app/immutable/chunks/{BR9s3igW.js → CiZzqOpk.js} +1 -1
  117. package/web/app/immutable/chunks/{ocWSyOIA.js → CjTGc2Y5.js} +1 -1
  118. package/web/app/immutable/chunks/{Cs_DX3BC.js → Cj_UUgNI.js} +1 -1
  119. package/web/app/immutable/chunks/{Bo900RGs.js → CkrbZXJF.js} +1 -1
  120. package/web/app/immutable/chunks/{DEMmGTfr.js → CmVXj6KK.js} +2 -2
  121. package/web/app/immutable/chunks/{DWjKA8Pm.js → CmW3Zqh6.js} +1 -1
  122. package/web/app/immutable/chunks/{LKW_Bid7.js → CnztNSaN.js} +1 -1
  123. package/web/app/immutable/chunks/{DvdPJ4VE.js → Cq4X6ptS.js} +1 -1
  124. package/web/app/immutable/chunks/{Da2tbXc-.js → CqVZxU_G.js} +1 -1
  125. package/web/app/immutable/chunks/{CASKMy_V.js → CqwiFk32.js} +1 -1
  126. package/web/app/immutable/chunks/{x-XvE_CJ.js → Cv2YUgTX.js} +1 -1
  127. package/web/app/immutable/chunks/{BNp3_sz0.js → CwWm64yZ.js} +1 -1
  128. package/web/app/immutable/chunks/{jRFO7UbE.js → CyWgrZMk.js} +4 -4
  129. package/web/app/immutable/chunks/{Dz2wxoQy.js → CylWx-GB.js} +1 -1
  130. package/web/app/immutable/chunks/{Boh_rcCH.js → CzS5ny-g.js} +1 -1
  131. package/web/app/immutable/chunks/{Bs9TCQJX.js → CzW29tkb.js} +1 -1
  132. package/web/app/immutable/chunks/{Cc2FSrQK.js → D-NrCL67.js} +1 -1
  133. package/web/app/immutable/chunks/{BgLPrJ77.js → D0DIS-cT.js} +1 -1
  134. package/web/app/immutable/chunks/{dP7u_sPF.js → D1V2Et17.js} +1 -1
  135. package/web/app/immutable/chunks/{CzmcyLb_.js → D1bivTve.js} +2 -2
  136. package/web/app/immutable/chunks/{CKkGJ_p-.js → D2dAlclh.js} +3 -3
  137. package/web/app/immutable/chunks/{D547g0l5.js → D5_auhOU.js} +2 -2
  138. package/web/app/immutable/chunks/{hHeBjODU.js → D69ZLPjW.js} +1 -1
  139. package/web/app/immutable/chunks/{4GHsM2YX.js → D6VfSAVQ.js} +1 -1
  140. package/web/app/immutable/chunks/{JKboQXkL.js → D6dNunKo.js} +1 -1
  141. package/web/app/immutable/chunks/{fRGswTf6.js → D9MwZkzV.js} +1 -1
  142. package/web/app/immutable/chunks/{KykWEhyB.js → DB9n2KBT.js} +1 -1
  143. package/web/app/immutable/chunks/{DH6z3AzB.js → DBdkAKrm.js} +3 -3
  144. package/web/app/immutable/chunks/{6GNWsakm.js → DCW2c0FY.js} +1 -1
  145. package/web/app/immutable/chunks/{C7Ed4dxf.js → DC_1j_gh.js} +3 -3
  146. package/web/app/immutable/chunks/{BZ5fAc9N.js → DELYEsRi.js} +1 -1
  147. package/web/app/immutable/chunks/{B_QtiZYt.js → DFBd8tOh.js} +1 -1
  148. package/web/app/immutable/chunks/{CXaVTV1g.js → DFr6bn5t.js} +3 -3
  149. package/web/app/immutable/chunks/{CPatK7EU.js → DISyGoja.js} +1 -1
  150. package/web/app/immutable/chunks/{3kQ-PiCp.js → DIukqb9l.js} +1 -1
  151. package/web/app/immutable/chunks/{CtxaFpQJ.js → DJFAYXyc.js} +1 -1
  152. package/web/app/immutable/chunks/{BR5vKj6f.js → DL1CE4TH.js} +1 -1
  153. package/web/app/immutable/chunks/{D-2bQKif.js → DONrLvvt.js} +1 -1
  154. package/web/app/immutable/chunks/{xqJuIupR.js → DRy2oEmj.js} +1 -1
  155. package/web/app/immutable/chunks/{ZYL8cEBi.js → DSacn4II.js} +1 -1
  156. package/web/app/immutable/chunks/{DcvxsgOZ.js → DUGztmZo.js} +1 -1
  157. package/web/app/immutable/chunks/{Bp0nVWtT.js → DWDPOFkL.js} +1 -1
  158. package/web/app/immutable/chunks/{Cnwc7RZW.js → DWEA_zul.js} +1 -1
  159. package/web/app/immutable/chunks/{BgDYQZ_0.js → DZIz7Wk9.js} +1 -1
  160. package/web/app/immutable/chunks/{fK0I75t-.js → DZRLhNnQ.js} +1 -1
  161. package/web/app/immutable/chunks/{BXkyhXuK.js → D_-ztW_Y.js} +1 -1
  162. package/web/app/immutable/chunks/{C_A_Ikb5.js → D_hG-oZK.js} +1 -1
  163. package/web/app/immutable/chunks/{C2jA6pM8.js → D_r5h8IL.js} +1 -1
  164. package/web/app/immutable/chunks/{aHO4L7kg.js → Dawt227W.js} +1 -1
  165. package/web/app/immutable/chunks/{Csxq8_TN.js → Db8-C0Zq.js} +1 -1
  166. package/web/app/immutable/chunks/{BpwdP8dq.js → DbCFTbwM.js} +1 -1
  167. package/web/app/immutable/chunks/{CLZkKjaI.js → DcUCHDGY.js} +1 -1
  168. package/web/app/immutable/chunks/{ByDB1X4D.js → DeE0yn_3.js} +1 -1
  169. package/web/app/immutable/chunks/{C9r0mVfa.js → Dekzflbl.js} +1 -1
  170. package/web/app/immutable/chunks/{DqgCp5ae.js → Df-HaYIr.js} +1 -1
  171. package/web/app/immutable/chunks/{s3nd6_cp.js → DgMr61cU.js} +1 -1
  172. package/web/app/immutable/chunks/{BCSEMQfF.js → DkJkWZTE.js} +1 -1
  173. package/web/app/immutable/chunks/{BDP3Y6aK.js → DksUdusM.js} +1 -1
  174. package/web/app/immutable/chunks/{CtFSFfLz.js → Dp9fBXaC.js} +1 -1
  175. package/web/app/immutable/chunks/{A9EcmNK3.js → DrOwYgbZ.js} +1 -1
  176. package/web/app/immutable/chunks/{B9I2hDG-.js → Dsn82AW0.js} +1 -1
  177. package/web/app/immutable/chunks/{DgFinDjM.js → DtHX0_aW.js} +2 -2
  178. package/web/app/immutable/chunks/{C8APJtmo.js → DtfuSWPd.js} +1 -1
  179. package/web/app/immutable/chunks/{Ct_Zx4ru.js → Dv0Jc2Nv.js} +1 -1
  180. package/web/app/immutable/chunks/{DumeSIrz.js → DvATy2o1.js} +1 -1
  181. package/web/app/immutable/chunks/{M18r7swD.js → DvrEye74.js} +1 -1
  182. package/web/app/immutable/chunks/{93RUSyHg.js → DwXKCf3Q.js} +1 -1
  183. package/web/app/immutable/chunks/{Cdhrdfve.js → DxyI4IUi.js} +1 -1
  184. package/web/app/immutable/chunks/{BLlLxRVW.js → Ev5lig9W.js} +1 -1
  185. package/web/app/immutable/chunks/{CxXkuVq5.js → EzpfJOSe.js} +1 -1
  186. package/web/app/immutable/chunks/{BsKhFZ0Q.js → FtGWFokI.js} +1 -1
  187. package/web/app/immutable/chunks/{QpGjdleN.js → Hd1u2Z-S.js} +1 -1
  188. package/web/app/immutable/chunks/{CB0sfbT7.js → Iq8JI4_0.js} +1 -1
  189. package/web/app/immutable/chunks/{C1ZHQc4S.js → MifrdpDQ.js} +1 -1
  190. package/web/app/immutable/chunks/{fXS7JPx0.js → NQru5r2h.js} +1 -1
  191. package/web/app/immutable/chunks/{WHfdsTrE.js → NqK_XT0y.js} +1 -1
  192. package/web/app/immutable/chunks/{CJHs_ufb.js → R1s5ARST.js} +1 -1
  193. package/web/app/immutable/chunks/{DK2Pie4F.js → R2N5eDxY.js} +1 -1
  194. package/web/app/immutable/chunks/{RifCGV3x.js → TE7UDCh6.js} +1 -1
  195. package/web/app/immutable/chunks/{DmhHEMPi.js → THdp5Vpk.js} +1 -1
  196. package/web/app/immutable/chunks/UGr2VEtG.js +1 -0
  197. package/web/app/immutable/chunks/{BUNNt_Jr.js → UN8KT7fR.js} +1 -1
  198. package/web/app/immutable/chunks/{B9XvejAu.js → UQXXh4U7.js} +1 -1
  199. package/web/app/immutable/chunks/{5NOp7PNZ.js → VJkCr9xp.js} +1 -1
  200. package/web/app/immutable/chunks/VdR0DXlW.js +410 -0
  201. package/web/app/immutable/chunks/{Z73Hn0_g.js → WlqVlpOk.js} +1 -1
  202. package/web/app/immutable/chunks/{0NGflniG.js → YV53nLSc.js} +1 -1
  203. package/web/app/immutable/chunks/{TrRXD94r.js → YcqSYZ1W.js} +1 -1
  204. package/web/app/immutable/chunks/{DtnAdLQg.js → ZIOU9Sxd.js} +1 -1
  205. package/web/app/immutable/chunks/{u8OBGcNi.js → _EqQOSVK.js} +1 -1
  206. package/web/app/immutable/chunks/{eln8hjjQ.js → bb5Wjkri.js} +1 -1
  207. package/web/app/immutable/chunks/{DAjaV_xN.js → cFozej4U.js} +3 -3
  208. package/web/app/immutable/chunks/{D_MzuSit.js → d1EmVp98.js} +1 -1
  209. package/web/app/immutable/chunks/{DKyvRWc2.js → eCVtubQ8.js} +1 -1
  210. package/web/app/immutable/chunks/{DllP5msd.js → f686-QUd.js} +1 -1
  211. package/web/app/immutable/chunks/{DpFiDNG-.js → fr0BmHL-.js} +1 -1
  212. package/web/app/immutable/chunks/{BUtBz-tz.js → gHT8Z5q-.js} +1 -1
  213. package/web/app/immutable/chunks/{A2MGRlHV.js → gySpGbnA.js} +2 -2
  214. package/web/app/immutable/chunks/i8PKWJT0.js +1 -0
  215. package/web/app/immutable/chunks/{DdH7Q5ij.js → ir8Qz45r.js} +1 -1
  216. package/web/app/immutable/chunks/{OcJyMtNk.js → jG-4Z8qH.js} +1 -1
  217. package/web/app/immutable/chunks/{CoNmDxYv.js → qHChsLZZ.js} +1 -1
  218. package/web/app/immutable/chunks/{B1sp_kEH.js → qi41b1Ac.js} +1 -1
  219. package/web/app/immutable/chunks/{sJt4gu2x.js → qjcf4Gb9.js} +1 -1
  220. package/web/app/immutable/chunks/{dSvJdwG_.js → qvt-0QTi.js} +3 -3
  221. package/web/app/immutable/chunks/{Cu91VTQn.js → rB5UfCey.js} +1 -1
  222. package/web/app/immutable/chunks/{DVy6H5Ng.js → sS3MW5B6.js} +1 -1
  223. package/web/app/immutable/chunks/{BbQfjn7f.js → t7yAUuZn.js} +2 -2
  224. package/web/app/immutable/chunks/{BEjEPSxp.js → tDUnXf7O.js} +1 -1
  225. package/web/app/immutable/chunks/{eLOMf9Vt.js → uCQEgTob.js} +1 -1
  226. package/web/app/immutable/chunks/{CZ_Dk1nz.js → vLtMR-kj.js} +1 -1
  227. package/web/app/immutable/chunks/{iBqqkWL_.js → wEnqV1Ol.js} +1 -1
  228. package/web/app/immutable/chunks/{Danvn_nL.js → wgljT0D3.js} +1 -1
  229. package/web/app/immutable/chunks/{DvYo8gAP.js → zye35u-t.js} +1 -1
  230. package/web/app/immutable/entry/{app.OFNFrEIR.js → app.jT7Rd2u4.js} +2 -2
  231. package/web/app/immutable/entry/start.CSuXA93h.js +1 -0
  232. package/web/app/immutable/nodes/{0.BPB4y4Pk.js → 0.9lwWQtfB.js} +1 -1
  233. package/web/app/immutable/nodes/{1.CBbBqNOx.js → 1.Ck4yEk2l.js} +1 -1
  234. package/web/app/immutable/nodes/{10.B-rk3kEM.js → 10.C4FEQjC7.js} +16 -16
  235. package/web/app/immutable/nodes/{11.P0HocOtE.js → 11.C-vXNNmX.js} +1 -1
  236. package/web/app/immutable/nodes/{13.DYH2a5Wx.js → 13.DhKVmEQi.js} +1 -1
  237. package/web/app/immutable/nodes/{14.B6MrEg8x.js → 14.INZu_e5k.js} +1 -1
  238. package/web/app/immutable/nodes/{15.DhLBijej.js → 15.DdKSdQ-h.js} +1 -1
  239. package/web/app/immutable/nodes/{16.CKbY5VRM.js → 16.Ad-t6nft.js} +1 -1
  240. package/web/app/immutable/nodes/{17.DPSU7Eqq.js → 17.pLS5JsPi.js} +1 -1
  241. package/web/app/immutable/nodes/{18.BlD6ustd.js → 18.DIVxEUeB.js} +1 -1
  242. package/web/app/immutable/nodes/{19.bgAqepNt.js → 19.BB9LuT5j.js} +2 -2
  243. package/web/app/immutable/nodes/{2.DU7oYEtS.js → 2.Bp80wZmn.js} +4 -4
  244. package/web/app/immutable/nodes/{20.Cj4TGw20.js → 20.BGTcjiLa.js} +1 -1
  245. package/web/app/immutable/nodes/{3.B4hrIG7P.js → 3.DRJnaOSe.js} +1 -1
  246. package/web/app/immutable/nodes/{4.J3HSWI_f.js → 4.p67SnElB.js} +1 -1
  247. package/web/app/immutable/nodes/{5.CS5w-vHI.js → 5.DRmIJA2c.js} +1 -1
  248. package/web/app/immutable/nodes/{6.Bf53uJQ1.js → 6.Bjeibumi.js} +1 -1
  249. package/web/app/immutable/nodes/{7.q-WiNda-.js → 7.CjIaxqZ1.js} +1 -1
  250. package/web/app/immutable/nodes/{8.eHanxjw-.js → 8.DAlxovqG.js} +1 -1
  251. package/web/app/immutable/nodes/{9.BMShc48l.js → 9.BKQZzsCi.js} +4 -4
  252. package/web/app/version.json +1 -1
  253. package/web/index.html +15 -15
  254. package/web/app/immutable/chunks/BBMzDN3i.js +0 -1
  255. package/web/app/immutable/chunks/BxTyo7yU.js +0 -1
  256. package/web/app/immutable/chunks/ClHV2gp3.js +0 -1
  257. package/web/app/immutable/chunks/CqJQ3ikU.js +0 -1
  258. package/web/app/immutable/chunks/DW3gkA_F.js +0 -1
  259. package/web/app/immutable/chunks/fd1DS8nx.js +0 -410
  260. package/web/app/immutable/entry/start.CHpPu02l.js +0 -1
@@ -1 +1 @@
1
- import{w as t,I as o}from"./CqJQ3ikU.js";import{i as r,a as s}from"./DMl4Z5o_.js";import{a as l}from"./BdWqymET.js";new l("ElectronBridge");function d(){return typeof window<"u"&&!!window.electronAPI}function p(){if(typeof window>"u"||!window.electronAPI)throw new Error("electronAPI is not available (not running in Electron environment)");return window.electronAPI}async function a(n,...e){return await r(n,...e)}function f(n,e){return s(n,i=>{e({payload:i})})}const y={async message(n,e){return await a("dialog:message",{message:n,...e})},async openDirectory(n={}){return t("nativeDialogs")?(await a(o.DIALOG.OPEN,n))?.[0]??null:null},async openFile(n={}){return t("nativeDialogs")?(await a(o.DIALOG.OPEN,{...n,mode:"file"}))?.[0]??null:null}},g={async open(n){await a("shell:openExternal",{url:n})}};export{d as a,y as d,p as e,a as i,f as l,g as s};
1
+ import{w as t,I as o}from"./Bqd7fdCF.js";import{i as r,a as s}from"./BBWuirRW.js";import{a as l}from"./BdWqymET.js";new l("ElectronBridge");function d(){return typeof window<"u"&&!!window.electronAPI}function p(){if(typeof window>"u"||!window.electronAPI)throw new Error("electronAPI is not available (not running in Electron environment)");return window.electronAPI}async function a(n,...e){return await r(n,...e)}function f(n,e){return s(n,i=>{e({payload:i})})}const y={async message(n,e){return await a("dialog:message",{message:n,...e})},async openDirectory(n={}){return t("nativeDialogs")?(await a(o.DIALOG.OPEN,n))?.[0]??null:null},async openFile(n={}){return t("nativeDialogs")?(await a(o.DIALOG.OPEN,{...n,mode:"file"}))?.[0]??null:null}},g={async open(n){await a("shell:openExternal",{url:n})}};export{d as a,y as d,p as e,a as i,f as l,g as s};
@@ -1,4 +1,4 @@
1
- var i1=Object.defineProperty;var s1=(t,e,r)=>e in t?i1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var se=(t,e,r)=>s1(t,typeof e!="symbol"?e+"":e,r);import{cO as ur,b3 as o1,dF as _l,a7 as R0,a5 as ya,a6 as l1,a4 as c1,aa as u1,am as d1,a1 as h1,e5 as p1,X as m1,bl as Ll,cR as _r,dE as Ol,b2 as f1,b6 as g1,cz as v1,cP as b1,ck as y1,dz as Ya,d_ as w1,dT as k1,aJ as Fn,aw as x1,aE as Ti,dD as $l,dQ as S1,e9 as Bl,e8 as A1}from"./XJqoy2ap.js";import{D as Ls,b4 as T1,be as E1,aC as M1}from"./B6jI9-V_.js";import{L as C1,F as i0,I as I1}from"./CqJQ3ikU.js";import{z7 as gn,J4 as E,nM as ge,nL as Se,aP as z1,i as ql,E as Re,bl as c0,k4 as Ei,m3 as vn,am as jt,m2 as Os,mc as $s,m9 as Bs,jD as Fl,gq as Xa,Hs as R1,ts as D1,AA as N1,oP as P1,mR as bn,C8 as _1,iD as L1,mm as O1,lZ as $1}from"./Zldsekdv.js";import{bm as ne}from"./51_h0jm2.js";import{l as rt}from"./DqFWZ_g1.js";import{k as B1,d as xr}from"./Cs_DX3BC.js";import{a as u0}from"./BdWqymET.js";import{o as pe,r as Gt,e as d0,s as V,_ as Ye,l as h0,g as q1,n as _e,c as or,b as Ue,u as F1,d as H1}from"./CIyUrgF0.js";import{j as Hl}from"./uXuxG9cN.js";import{u as U1}from"./LKW_Bid7.js";import{selectActiveWorkspaceIds as W1}from"./BuveYyQe.js";import{i as He}from"./DCOxMTSf.js";import{l as wa,c as Mi}from"./ChTqQfQN.js";import"./DVy6H5Ng.js";import{e as G1,h as Sr}from"./D-2bQKif.js";import{h as p0}from"./CF1Tu_8c.js";import{i as qs}from"./DMl4Z5o_.js";import{f as Ci,o as Ul,p as Wl,h as j1,m as Gl,i as V1,k as K1}from"./Bs9TCQJX.js";const Ge=[];for(let t=0;t<256;++t)Ge.push((t+256).toString(16).slice(1));function Y1(t,e=0){return(Ge[t[e+0]]+Ge[t[e+1]]+Ge[t[e+2]]+Ge[t[e+3]]+"-"+Ge[t[e+4]]+Ge[t[e+5]]+"-"+Ge[t[e+6]]+Ge[t[e+7]]+"-"+Ge[t[e+8]]+Ge[t[e+9]]+"-"+Ge[t[e+10]]+Ge[t[e+11]]+Ge[t[e+12]]+Ge[t[e+13]]+Ge[t[e+14]]+Ge[t[e+15]]).toLowerCase()}const X1=new Uint8Array(16);function Z1(){return crypto.getRandomValues(X1)}function Ii(t,e,r){return crypto.randomUUID?crypto.randomUUID():Q1(t)}function Q1(t,e,r){t=t||{};const n=t.random??t.rng?.()??Z1();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Y1(n)}function zi(t,e){if(t.repositoryIdentity===null)return null;if(t.repositoryIdentity){const{provider:a,instanceBaseUrl:i,projectPath:s}=t.repositoryIdentity,o=zi({...t,repositoryIdentity:void 0,githubUrl:`${i}/${s}`},a==="gitlab"?i:void 0);return o?.provider===a?o:null}const r=t.githubUrl;if(!r)return null;const n=/^(?:https:\/\/github\.com\/|git@github\.com:)([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?\/?$/i.exec(r);return n&&!n.slice(1).some(a=>a==="."||a==="..")?{provider:"github",instanceBaseUrl:"https://github.com",projectPath:`${n[1]}/${n[2]}`}:e?C1(r.replace(/\.git\/?$/,""),e):null}function C5(t,e){return t.type==="local"?t.plainFolder?"folder":"local":zi(t,e)?.provider==="gitlab"?"gitlab":"github"}function jl(t){const e=t.split(/[\\/]/).filter(Boolean);return e[e.length-1]??""}function I5(t){if(t.type!=="local")return{ownerPrefix:t.owner,primary:t.name};const e=jl(t.path)||t.name,r=t.owner?`${t.owner}/${t.name}`:void 0;return{primary:e,suffix:r}}function z5(t){return t.type==="local"&&t.path?t.path:void 0}const J1=["/.clones/","/.repo-cache/"];function R5(t){const e=t.replaceAll("\\","/");return J1.some(r=>e.includes(r))}function D5(t){const e=new Set;for(const r of t){const{repositoryPath:n,worktreePath:a}=r;n&&a&&n===a&&e.add(n)}return e}function ed(t){return t.includes("\\")||t.includes(":")||t.startsWith("/")?void 0:/^([^/]+)\/[^/]+$/.exec(t)?.[1]}function N5(t,e){const{selectedValue:r,selectedRepoType:n,confirmedGithubUrl:a}=t;if(!(n!=="github"||!r)){if(a){const i=e(a)?.owner;if(i)return i}return e(r)?.owner??ed(r)}}function P5(t,e){const r=e.trim().toLowerCase();return r===""?!0:[t.name,t.path,jl(t.path),t.owner,t.owner?`${t.owner}/${t.name}`:void 0].some(a=>a?.toLowerCase().includes(r)??!1)}const td="known-repos",rd=6e4;function nd({saved:t,source:e,dismissed:r,mode:n}){if(!e)return[...t];const a=new Map;if(n==="all")for(const s of[...e.repos,...t]){const o=gn(s);a.has(o)||a.set(o,s)}else{for(const s of t)a.set(gn(s),s);for(const s of e.repos)a.set(gn(s),s)}const i=[...a.values()].filter(s=>!r[gn(s)]);return n==="all"?i:i.slice(0,9)}function _5(t){const e=t.lastUsedAt?Date.parse(t.lastUsedAt):NaN;return Number.isFinite(e)?e:0}function L5({visible:t,admission:e,entry:r,readyAt:n,now:a}){return!t||!e?"skip":!r||r.admission!==e?"load":r.status==="pending"?"reuse":r.status==="ready"&&n?.requestId===r.requestId&&a-n.at<rd?"skip":"load"}function O5(t,e){if(t.type==="local")return t.plainFolder?{repoPath:t.path,plainFolder:!0}:{repoPath:t.path};const r=zi(t,e);return r?.provider==="gitlab"?{repositoryCheckoutDraft:{instanceBaseUrl:r.instanceBaseUrl,projectPath:r.projectPath}}:r?{githubUrl:`https://github.com/${r.projectPath}`,exactRemote:!0}:{githubUrl:t.githubUrl||`https://github.com/${t.path}`,exactRemote:!0}}function ad({compactFormState:t,lastSubmittedAgent:e,specialists:r,orchestratorId:n}){if(t?.isTeamMode??e?.isTeamMode??!1)return n;const i=o=>r.some(c=>c.id===o),s=t?.selectedSpecialist!==void 0?t.selectedSpecialist:e?.selectedSpecialist!==void 0?e.selectedSpecialist:i(Ls)?Ls:null;return s===null||!i(s)?null:s}const $5=E.createSelector(t=>t.workspaceInitializer.hydrated),B5=E.createSelector(t=>t.workspaceInitializer.compactFormState),q5=E.createSelector(t=>t.workspaceInitializer.onboardingFormState),F5=E.createSelector(t=>t.workspaceInitializer.lastSelectedRepo),H5=E.createSelector(t=>t.workspaceInitializer.branchByRepo),U5=E.createSelector(t=>t.workspaceInitializer.defaultParentPath),W5=E.createSelector(t=>ge(t.workspaceInitializer.recentRepos)),G5=E.createSelector((t,e)=>Se(t.workspaceInitializer.recentRepoRefreshes,e)),j5=E.createSelector((t,e)=>Se(t.workspaceInitializer.directoryStatusChecks,e)),V5=E.createSelector(t=>t.workspaceInitializer.dismissedRecentRepoKeys),K5=E.createSelector(t=>ge(t.workspaceInitializer.remoteSetups)),Y5=E.createSelector(t=>t.workspaceInitializer.lastSubmittedAgent),X5=E.createSelector(t=>t.workspaceInitializer.agentByRepo),Z5=E.createSelector(t=>t.workspaceInitializer.recentSpecialistIds),Q5=E.createSelector((t,e)=>t.workspaceInitializer.agentByRepo[e]??null),J5=E.createSelector(t=>t.workspaceInitializer.pendingGitHubPrefill),e3=E.createSelector((t,e)=>({restore:Se(t.workspaceInitializer.draftRestores,e),clear:Se(t.workspaceInitializer.draftClears,e)})),t3=E.createSelector((t,e,r)=>{const n=Se(t.workspaceInitializer.initializationOutcomes,e);return n?.resourceId===r?n:void 0}),r3=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationOutcomes,e)),n3=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationResumes,e)),a3=E.createSelector(t=>ad({compactFormState:t.workspaceInitializer.compactFormState,lastSubmittedAgent:t.workspaceInitializer.lastSubmittedAgent,specialists:E1.select(t),orchestratorId:T1.select(t)?.id??null})),id=E.createSelector(t=>{const e=t.workspaceInitializer.gitCheckRequest,r=ur.select(t);return e&&r&&o1.select(t)?JSON.stringify([r,e]):null}),i3=E.createSelector(t=>{const e=id.select(t),r=t.workspaceInitializer.gitCheck;return e&&r?.context===e?r.available:null}),sd=E.createSelector(t=>{const e=Se(t.workspaceInitializer.recentRepoRefreshes,td),r=ur.select(t);return nd({saved:ge(t.workspaceInitializer.recentRepos),source:e&&r&&e.admission===r?e:null,dismissed:t.workspaceInitializer.dismissedRecentRepoKeys,mode:"all"})}),s3=E.createSelector(t=>_l.select(t)?sd.select(t):[]),o3=E.createSelector(t=>M1.select(t)||void 0),Fs="workspace-debug-flags",yn={enableCreationAnimation:!0,animationDuration:300,enablePageTransitions:!0,enableComponentTransitions:!0,showDebugInfo:!1,showPerformanceMetrics:!1,logStateChanges:!1,enableAutofocus:!0,enableBranchCaching:!0,enableFormPersistence:!0,simulateSlowNetwork:!1,simulateErrors:!1,networkDelay:0};class od{constructor(){se(this,"flags");se(this,"listeners",new Set);this.flags=this.loadFlags()}loadFlags(){if(typeof localStorage>"u")return yn;try{const e=localStorage.getItem(Fs);if(e)return{...yn,...JSON.parse(e)}}catch(e){wa.error("Failed to load debug flags:",e)}return yn}saveFlags(){if(!(typeof localStorage>"u")){try{localStorage.setItem(Fs,JSON.stringify(this.flags))}catch(e){wa.error("Failed to save debug flags:",e)}this.listeners.forEach(e=>e(this.flags))}}get(e){return this.flags[e]}set(e,r){this.flags[e]=r,this.saveFlags()}toggle(e){typeof this.flags[e]=="boolean"&&(this.flags[e]=!this.flags[e],this.saveFlags())}reset(){this.flags={...yn},this.saveFlags()}getAll(){return{...this.flags}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}toggleDebugPanel(){this.toggle("showDebugInfo"),wa.info("Debug panel:",this.flags.showDebugInfo?"ON":"OFF")}async simulateDelay(e){return this.flags.simulateSlowNetwork&&this.flags.networkDelay>0&&await new Promise(r=>setTimeout(r,this.flags.networkDelay)),e}}const ka=new od;function l3(t){if(!t)return"";let e=t;return e=e.replace(/\*\*(.+?)\*\*/g,"$1"),e=e.replace(/__(.+?)__/g,"$1"),e=e.replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"$1"),e=e.replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"$1"),e=e.replace(/~~(.+?)~~/g,"$1"),e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),e=e.replace(/^#{1,6}\s+/gm,""),e=e.replace(/^\*+\s*/gm,""),e=e.replace(/\s*\*+$/gm,""),e.trim()}function ld(t){return t.charAt(0).toUpperCase()+t.slice(1)}function c3(t){if(!t||t.trim().length===0)return ne.workspace_sidebarHeader_branchEmpty_error();if(/[\s~^:\\?*\[\\]/.test(t))return ne.workspace_sidebarHeader_branchInvalidChars_error();if(t.includes("@{"))return ne.workspace_sidebarChanges_branchAtBrace_error({seq:"@{"});if(t==="@")return ne.workspace_sidebarChanges_branchAt_error({symbol:"@"});if(t.startsWith("."))return ne.workspace_sidebarHeader_branchStartsDot_error();if(t.endsWith(".lock"))return ne.workspace_sidebarHeader_branchEndsLock_error();if(t.includes(".."))return ne.workspace_sidebarHeader_branchDoubleDot_error();if(t.startsWith("/")||t.endsWith("/"))return ne.workspace_sidebarHeader_branchSlashEnds_error();if(t.includes("//"))return ne.workspace_sidebarHeader_branchDoubleSlash_error();if(t.startsWith("-"))return ne.workspace_sidebarHeader_branchStartsDash_error();if(t.endsWith("."))return ne.workspace_sidebarChanges_branchEndsPeriod_error();const e=t.split("/");for(const r of e){if(r.startsWith("."))return ne.workspace_sidebarChanges_branchComponentStartsDot_error();if(r.endsWith(".lock"))return ne.workspace_sidebarChanges_branchComponentEndsLock_error()}if(t.length>250)return ne.workspace_sidebarHeader_branchTooLong_error()}function u3(t,e,r,n){return e&&r?`https://github.com/${e}/${r}/pull/${t}`:n||""}function Za(t){return t==="Open"?"open":t==="Merged"?"merged":t==="Draft"?"draft":"closed"}function d3(t,e){return`${e}:${t.agentId??"manual"}`}function cd(t,e){if(t.length===0||e>=t.length)return 0;const r=Math.max(0,e);let n=0;for(let a=r;a<t.length;a++)t[a].isPushed||n++;return n}function ud(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed&&n++;return n}function dd(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed||n++;return n}function h3(t,e,r,n){const a=cd(t,e),i=n?` (origin/${n})`:"";return r?a===1?ne.workspace_sidebarChanges_addToPr_one({suffix:i}):ne.workspace_sidebarChanges_addToPr_many({count:rt(a),suffix:i}):a===1?ne.workspace_sidebarChanges_pushToRemote_one({suffix:i}):ne.workspace_sidebarChanges_pushToRemote_many({count:rt(a),suffix:i})}function p3(t,e,r){const n=ud(t,e),a=r?` (origin/${r})`:"";return n===1?ne.workspace_sidebarChanges_undoPush_one({suffix:a}):ne.workspace_sidebarChanges_undoPush_many({count:rt(n),suffix:a})}function m3(t,e){const r=dd(t,e);return r===1?ne.workspace_sidebarChanges_undoCommit_one():ne.workspace_sidebarChanges_undoCommit_many({count:rt(r)})}function f3(t,e){return e===0&&t.length>0}function g3(t,e,r,n){return!r||n==null?!1:t===r&&e===n}function v3(t,e,r){const n=`${e?"staged":"unstaged"}:${t}`;return r.has(n)}function b3(t,e,r){return r?.path===t&&r?.staged===e}function y3(t){if(t.length===0)return[];const e=new Map,r=[...t].sort((n,a)=>n.timestamp-a.timestamp);for(const n of r)for(const a of n.files??[]){const i=e.get(a.path);i?e.set(a.path,{additions:i.additions+(a.additions||0),deletions:i.deletions+(a.deletions||0)}):e.set(a.path,{additions:a.additions||0,deletions:a.deletions||0})}return Array.from(e.entries()).map(([n,a])=>({path:n,additions:a.additions,deletions:a.deletions,staged:!1}))}function w3(t,e,r){const n=new Set;let a=0,i=0;for(const s of t)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of e)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of r)for(const o of s.files||[])n.add(o.path),a+=o.additions||0,i+=o.deletions||0;return{totalFilesChanged:n.size,totalAdditions:a,totalDeletions:i}}function hd(t){const e=t?.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/\d+/i);return e?`${e[1]}/${e[2]}`:void 0}function k3(t,e,r,n,a){if(t&&t.length>0){const i=a?.split("/")[0];return t.map(s=>{const o=s.url||r(s.number),c=hd(s.url),d=c!==void 0&&c.toLowerCase()!==a?.toLowerCase()?c:void 0;return{number:s.number,title:n(s),url:o,htmlUrl:o,status:Za(s.status),createdAt:s.createdAt,updatedAt:s.updatedAt,isInMergeQueue:s.isDraft?void 0:s.isInMergeQueue,crossRepo:d,crossRepoDisplay:d?Ri(d,i):void 0}})}return e?[{number:e.number,title:n(e),url:r(e.number,e.url),htmlUrl:r(e.number,e.url),status:Za(e.status),createdAt:e.createdAt,updatedAt:e.updatedAt,isInMergeQueue:e.isDraft?void 0:e.isInMergeQueue}]:[]}function x3(t){const{prNumber:e,prUrl:r}=t;return e==null||!r?null:{id:`legacy-pr-${e}`,number:e,url:r,title:"",status:t.prStatus??z1.Open,createdAt:t.updatedAt,updatedAt:t.updatedAt}}function pd(t){const e=t.lastSnapshot?.state?.toLowerCase();return e==="merged"?"merged":e==="closed"?"closed":t.lastSnapshot?.isDraft?"draft":t.state==="completed"?"closed":"open"}function xa(t,e,r){if(e.length===0)return t;const n=r?.split("/")[0],a=t.map(i=>({...i}));for(const i of e){const s=!i.resource&&!i.monitorAvailability&&(!r||i.repo===r),o=R0(i),c=o.toLowerCase(),d=a.find(p=>!!o&&p.url.toLowerCase()===c||(i.resource||i.monitorAvailability?p.monitorIdentity===ya(i):!p.resource&&!p.monitorAvailability&&(s?!p.crossRepo&&p.number===i.prNumber:p.crossRepo===i.repo&&p.number===i.prNumber)));if(d){d.monitorAgentId=i.agentId,d.resource=i.resource,d.monitorAvailability=i.monitorAvailability,d.monitorIdentity=i.resource||i.monitorAvailability?ya(i):void 0,d.monitorSnapshot=i.lastSnapshot??d.monitorSnapshot;continue}a.push({number:i.prNumber,title:i.title??`${i.repo}${l1(i,i.prNumber)}`,resource:i.resource,monitorAvailability:i.monitorAvailability,monitorIdentity:i.resource||i.monitorAvailability?ya(i):void 0,url:o,htmlUrl:o,status:pd(i),createdAt:i.createdAt,updatedAt:i.updatedAt,monitorAgentId:i.agentId,crossRepo:s?void 0:i.repo,crossRepoDisplay:s?void 0:Ri(i.repo,n),monitorSnapshot:i.lastSnapshot,monitorOnly:!0})}return a}function Ri(t,e){return e&&t.toLowerCase().startsWith(`${e.toLowerCase()}/`)?t.slice(e.length+1):t}function S3(t,e,r,n,a){const i=r?.toLowerCase(),s=new Set;for(const S of n)S.repoOwner&&S.repoName&&s.add(`${S.repoOwner}/${S.repoName}`.toLowerCase());let o=t;const c=[],d=[];if(t.some(S=>S.crossRepo)){o=[];for(const S of t)S.crossRepo?s.has(S.crossRepo.toLowerCase())?c.push(S):d.push(S):o.push(S)}const p=[],g=[],v=[];for(const S of e){const C=S.repo.toLowerCase();R0(S)&&o.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&(!i||C===i)?p.push(S):R0(S)&&c.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&s.has(C)?g.push(S):v.push(S)}const w=xa(o,p,r),A=r?.split("/")[0],M=new Set([...w,...c,...d].map(S=>`${(S.crossRepo??r??"").toLowerCase()}#${S.number}`)),D=[...c];for(const S of n){if(!S.repoOwner||!S.repoName)continue;const C=`${S.repoOwner}/${S.repoName}`;for(const W of S.pullRequests??[]){const X=`${C.toLowerCase()}#${W.number}`;if(M.has(X))continue;M.add(X);const Y=W.url||`https://github.com/${C}/pull/${W.number}`,T=i!==void 0&&C.toLowerCase()===i;D.push({number:W.number,title:a(W),url:Y,htmlUrl:Y,status:Za(W.status),createdAt:W.createdAt,updatedAt:W.updatedAt,crossRepo:T?void 0:C,crossRepoDisplay:T?void 0:Ri(C,A)})}}return{own:w,otherRoots:xa(D,g,r),otherTracked:xa(d,v,r)}}function Hs(t){return t.status!=="open"?!1:t.monitorSnapshot?t.monitorSnapshot.isInMergeQueue===!0:t.isInMergeQueue===!0}function A3(t){const e=t.status==="merged"?ne.workspace_prSection_merged_label():t.status==="closed"?ne.workspace_prSection_closed_label():t.status==="draft"?ne.workspace_prSection_statusDraft_label():Hs(t)?ne.workspace_prSection_statusQueued_label():ne.workspace_prSection_statusOpen_label(),r=[c1(t)??e],n=Hs(t)?B1(t.monitorSnapshot?.mergeQueue):null;n&&r.push(n);const a=t.status==="merged"||t.status==="closed"?void 0:t.monitorSnapshot;return a&&(a.checks.total===null||a.checks.passed===null||a.checks.failed===null||a.checks.pending===null||a.availability&&a.availability.checks!=="available"?r.push(ne.chat_monitoredPrs_hover_checksUnknown_label()):a.checks.total>0&&r.push(ne.workspace_prSection_statusChecks_tooltip({passed:rt(a.checks.passed),failed:rt(a.checks.failed),pending:rt(a.checks.pending)})),r.push(a.approvals.have===null||a.availability&&a.availability.approvals!=="available"?ne.chat_monitoredPrs_hover_approvalsUnknown_label():a.approvals.needed!=null?ne.workspace_prSection_statusApprovalsOfNeeded_tooltip({count:rt(a.approvals.have),needed:rt(a.approvals.needed)}):ne.workspace_prSection_statusApprovals_tooltip({count:rt(a.approvals.have)})),a.approvals.changesRequested!==null&&a.approvals.changesRequested>0&&r.push(ne.workspace_prSection_statusChangesRequested_tooltip({count:rt(a.approvals.changesRequested)})),a.availability&&a.availability.discussions!=="available"?r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()):typeof a.threads.unresolved=="number"?a.threads.unresolved>0&&r.push(ne.workspace_prSection_statusUnresolvedThreads_tooltip({count:rt(a.threads.unresolved)})):a.threads.resolutionRequired&&r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()),a.mergeBlockedReason&&r.push(ld(a.mergeBlockedReason))),r.join(`
1
+ var i1=Object.defineProperty;var s1=(t,e,r)=>e in t?i1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var se=(t,e,r)=>s1(t,typeof e!="symbol"?e+"":e,r);import{cO as ur,b3 as o1,dF as _l,a7 as R0,a5 as ya,a6 as l1,a4 as c1,aa as u1,am as d1,a1 as h1,e5 as p1,X as m1,bl as Ll,cR as _r,dE as Ol,b2 as f1,b6 as g1,cz as v1,cP as b1,ck as y1,dz as Ya,d_ as w1,dT as k1,aJ as Fn,aw as x1,aE as Ti,dD as $l,dQ as S1,e9 as Bl,e8 as A1}from"./CgwFGLCK.js";import{D as Ls,b4 as T1,be as E1,aC as M1}from"./BSsEOl8-.js";import{M as C1,G as i0,I as I1}from"./Bqd7fdCF.js";import{z7 as gn,J4 as E,nM as ge,nL as Se,aP as z1,i as ql,E as Re,bl as c0,k4 as Ei,m3 as vn,am as jt,m2 as Os,mc as $s,m9 as Bs,jD as Fl,gq as Xa,Hs as R1,ts as D1,AA as N1,oP as P1,mR as bn,C8 as _1,iD as L1,mm as O1,lZ as $1}from"./CbRsc9i4.js";import{bm as ne}from"./51_h0jm2.js";import{l as rt}from"./DqFWZ_g1.js";import{k as B1,d as xr}from"./Cj_UUgNI.js";import{a as u0}from"./BdWqymET.js";import{o as pe,r as Gt,e as d0,s as V,_ as Ye,l as h0,g as q1,n as _e,c as or,b as Ue,u as F1,d as H1}from"./CIyUrgF0.js";import{j as Hl}from"./uXuxG9cN.js";import{u as U1}from"./CnztNSaN.js";import{selectActiveWorkspaceIds as W1}from"./Bqm2Rf6d.js";import{i as He}from"./CL3a4Hm1.js";import{l as wa,c as Mi}from"./ChTqQfQN.js";import"./sS3MW5B6.js";import{e as G1,h as Sr}from"./DONrLvvt.js";import{h as p0}from"./Cgn_eC9-.js";import{i as qs}from"./BBWuirRW.js";import{f as Ci,o as Ul,p as Wl,h as j1,m as Gl,i as V1,k as K1}from"./CzW29tkb.js";const Ge=[];for(let t=0;t<256;++t)Ge.push((t+256).toString(16).slice(1));function Y1(t,e=0){return(Ge[t[e+0]]+Ge[t[e+1]]+Ge[t[e+2]]+Ge[t[e+3]]+"-"+Ge[t[e+4]]+Ge[t[e+5]]+"-"+Ge[t[e+6]]+Ge[t[e+7]]+"-"+Ge[t[e+8]]+Ge[t[e+9]]+"-"+Ge[t[e+10]]+Ge[t[e+11]]+Ge[t[e+12]]+Ge[t[e+13]]+Ge[t[e+14]]+Ge[t[e+15]]).toLowerCase()}const X1=new Uint8Array(16);function Z1(){return crypto.getRandomValues(X1)}function Ii(t,e,r){return crypto.randomUUID?crypto.randomUUID():Q1(t)}function Q1(t,e,r){t=t||{};const n=t.random??t.rng?.()??Z1();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Y1(n)}function zi(t,e){if(t.repositoryIdentity===null)return null;if(t.repositoryIdentity){const{provider:a,instanceBaseUrl:i,projectPath:s}=t.repositoryIdentity,o=zi({...t,repositoryIdentity:void 0,githubUrl:`${i}/${s}`},a==="gitlab"?i:void 0);return o?.provider===a?o:null}const r=t.githubUrl;if(!r)return null;const n=/^(?:https:\/\/github\.com\/|git@github\.com:)([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+?)(?:\.git)?\/?$/i.exec(r);return n&&!n.slice(1).some(a=>a==="."||a==="..")?{provider:"github",instanceBaseUrl:"https://github.com",projectPath:`${n[1]}/${n[2]}`}:e?C1(r.replace(/\.git\/?$/,""),e):null}function C5(t,e){return t.type==="local"?t.plainFolder?"folder":"local":zi(t,e)?.provider==="gitlab"?"gitlab":"github"}function jl(t){const e=t.split(/[\\/]/).filter(Boolean);return e[e.length-1]??""}function I5(t){if(t.type!=="local")return{ownerPrefix:t.owner,primary:t.name};const e=jl(t.path)||t.name,r=t.owner?`${t.owner}/${t.name}`:void 0;return{primary:e,suffix:r}}function z5(t){return t.type==="local"&&t.path?t.path:void 0}const J1=["/.clones/","/.repo-cache/"];function R5(t){const e=t.replaceAll("\\","/");return J1.some(r=>e.includes(r))}function D5(t){const e=new Set;for(const r of t){const{repositoryPath:n,worktreePath:a}=r;n&&a&&n===a&&e.add(n)}return e}function ed(t){return t.includes("\\")||t.includes(":")||t.startsWith("/")?void 0:/^([^/]+)\/[^/]+$/.exec(t)?.[1]}function N5(t,e){const{selectedValue:r,selectedRepoType:n,confirmedGithubUrl:a}=t;if(!(n!=="github"||!r)){if(a){const i=e(a)?.owner;if(i)return i}return e(r)?.owner??ed(r)}}function P5(t,e){const r=e.trim().toLowerCase();return r===""?!0:[t.name,t.path,jl(t.path),t.owner,t.owner?`${t.owner}/${t.name}`:void 0].some(a=>a?.toLowerCase().includes(r)??!1)}const td="known-repos",rd=6e4;function nd({saved:t,source:e,dismissed:r,mode:n}){if(!e)return[...t];const a=new Map;if(n==="all")for(const s of[...e.repos,...t]){const o=gn(s);a.has(o)||a.set(o,s)}else{for(const s of t)a.set(gn(s),s);for(const s of e.repos)a.set(gn(s),s)}const i=[...a.values()].filter(s=>!r[gn(s)]);return n==="all"?i:i.slice(0,9)}function _5(t){const e=t.lastUsedAt?Date.parse(t.lastUsedAt):NaN;return Number.isFinite(e)?e:0}function L5({visible:t,admission:e,entry:r,readyAt:n,now:a}){return!t||!e?"skip":!r||r.admission!==e?"load":r.status==="pending"?"reuse":r.status==="ready"&&n?.requestId===r.requestId&&a-n.at<rd?"skip":"load"}function O5(t,e){if(t.type==="local")return t.plainFolder?{repoPath:t.path,plainFolder:!0}:{repoPath:t.path};const r=zi(t,e);return r?.provider==="gitlab"?{repositoryCheckoutDraft:{instanceBaseUrl:r.instanceBaseUrl,projectPath:r.projectPath}}:r?{githubUrl:`https://github.com/${r.projectPath}`,exactRemote:!0}:{githubUrl:t.githubUrl||`https://github.com/${t.path}`,exactRemote:!0}}function ad({compactFormState:t,lastSubmittedAgent:e,specialists:r,orchestratorId:n}){if(t?.isTeamMode??e?.isTeamMode??!1)return n;const i=o=>r.some(c=>c.id===o),s=t?.selectedSpecialist!==void 0?t.selectedSpecialist:e?.selectedSpecialist!==void 0?e.selectedSpecialist:i(Ls)?Ls:null;return s===null||!i(s)?null:s}const $5=E.createSelector(t=>t.workspaceInitializer.hydrated),B5=E.createSelector(t=>t.workspaceInitializer.compactFormState),q5=E.createSelector(t=>t.workspaceInitializer.onboardingFormState),F5=E.createSelector(t=>t.workspaceInitializer.lastSelectedRepo),H5=E.createSelector(t=>t.workspaceInitializer.branchByRepo),U5=E.createSelector(t=>t.workspaceInitializer.defaultParentPath),W5=E.createSelector(t=>ge(t.workspaceInitializer.recentRepos)),G5=E.createSelector((t,e)=>Se(t.workspaceInitializer.recentRepoRefreshes,e)),j5=E.createSelector((t,e)=>Se(t.workspaceInitializer.directoryStatusChecks,e)),V5=E.createSelector(t=>t.workspaceInitializer.dismissedRecentRepoKeys),K5=E.createSelector(t=>ge(t.workspaceInitializer.remoteSetups)),Y5=E.createSelector(t=>t.workspaceInitializer.lastSubmittedAgent),X5=E.createSelector(t=>t.workspaceInitializer.agentByRepo),Z5=E.createSelector(t=>t.workspaceInitializer.recentSpecialistIds),Q5=E.createSelector((t,e)=>t.workspaceInitializer.agentByRepo[e]??null),J5=E.createSelector(t=>t.workspaceInitializer.pendingGitHubPrefill),e3=E.createSelector((t,e)=>({restore:Se(t.workspaceInitializer.draftRestores,e),clear:Se(t.workspaceInitializer.draftClears,e)})),t3=E.createSelector((t,e,r)=>{const n=Se(t.workspaceInitializer.initializationOutcomes,e);return n?.resourceId===r?n:void 0}),r3=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationOutcomes,e)),n3=E.createSelector((t,e)=>Se(t.workspaceInitializer.initializationResumes,e)),a3=E.createSelector(t=>ad({compactFormState:t.workspaceInitializer.compactFormState,lastSubmittedAgent:t.workspaceInitializer.lastSubmittedAgent,specialists:E1.select(t),orchestratorId:T1.select(t)?.id??null})),id=E.createSelector(t=>{const e=t.workspaceInitializer.gitCheckRequest,r=ur.select(t);return e&&r&&o1.select(t)?JSON.stringify([r,e]):null}),i3=E.createSelector(t=>{const e=id.select(t),r=t.workspaceInitializer.gitCheck;return e&&r?.context===e?r.available:null}),sd=E.createSelector(t=>{const e=Se(t.workspaceInitializer.recentRepoRefreshes,td),r=ur.select(t);return nd({saved:ge(t.workspaceInitializer.recentRepos),source:e&&r&&e.admission===r?e:null,dismissed:t.workspaceInitializer.dismissedRecentRepoKeys,mode:"all"})}),s3=E.createSelector(t=>_l.select(t)?sd.select(t):[]),o3=E.createSelector(t=>M1.select(t)||void 0),Fs="workspace-debug-flags",yn={enableCreationAnimation:!0,animationDuration:300,enablePageTransitions:!0,enableComponentTransitions:!0,showDebugInfo:!1,showPerformanceMetrics:!1,logStateChanges:!1,enableAutofocus:!0,enableBranchCaching:!0,enableFormPersistence:!0,simulateSlowNetwork:!1,simulateErrors:!1,networkDelay:0};class od{constructor(){se(this,"flags");se(this,"listeners",new Set);this.flags=this.loadFlags()}loadFlags(){if(typeof localStorage>"u")return yn;try{const e=localStorage.getItem(Fs);if(e)return{...yn,...JSON.parse(e)}}catch(e){wa.error("Failed to load debug flags:",e)}return yn}saveFlags(){if(!(typeof localStorage>"u")){try{localStorage.setItem(Fs,JSON.stringify(this.flags))}catch(e){wa.error("Failed to save debug flags:",e)}this.listeners.forEach(e=>e(this.flags))}}get(e){return this.flags[e]}set(e,r){this.flags[e]=r,this.saveFlags()}toggle(e){typeof this.flags[e]=="boolean"&&(this.flags[e]=!this.flags[e],this.saveFlags())}reset(){this.flags={...yn},this.saveFlags()}getAll(){return{...this.flags}}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}toggleDebugPanel(){this.toggle("showDebugInfo"),wa.info("Debug panel:",this.flags.showDebugInfo?"ON":"OFF")}async simulateDelay(e){return this.flags.simulateSlowNetwork&&this.flags.networkDelay>0&&await new Promise(r=>setTimeout(r,this.flags.networkDelay)),e}}const ka=new od;function l3(t){if(!t)return"";let e=t;return e=e.replace(/\*\*(.+?)\*\*/g,"$1"),e=e.replace(/__(.+?)__/g,"$1"),e=e.replace(/(?<!\*)\*(?!\*)(.+?)(?<!\*)\*(?!\*)/g,"$1"),e=e.replace(/(?<!_)_(?!_)(.+?)(?<!_)_(?!_)/g,"$1"),e=e.replace(/~~(.+?)~~/g,"$1"),e=e.replace(/`([^`]+)`/g,"$1"),e=e.replace(/\[([^\]]+)\]\([^)]+\)/g,"$1"),e=e.replace(/^#{1,6}\s+/gm,""),e=e.replace(/^\*+\s*/gm,""),e=e.replace(/\s*\*+$/gm,""),e.trim()}function ld(t){return t.charAt(0).toUpperCase()+t.slice(1)}function c3(t){if(!t||t.trim().length===0)return ne.workspace_sidebarHeader_branchEmpty_error();if(/[\s~^:\\?*\[\\]/.test(t))return ne.workspace_sidebarHeader_branchInvalidChars_error();if(t.includes("@{"))return ne.workspace_sidebarChanges_branchAtBrace_error({seq:"@{"});if(t==="@")return ne.workspace_sidebarChanges_branchAt_error({symbol:"@"});if(t.startsWith("."))return ne.workspace_sidebarHeader_branchStartsDot_error();if(t.endsWith(".lock"))return ne.workspace_sidebarHeader_branchEndsLock_error();if(t.includes(".."))return ne.workspace_sidebarHeader_branchDoubleDot_error();if(t.startsWith("/")||t.endsWith("/"))return ne.workspace_sidebarHeader_branchSlashEnds_error();if(t.includes("//"))return ne.workspace_sidebarHeader_branchDoubleSlash_error();if(t.startsWith("-"))return ne.workspace_sidebarHeader_branchStartsDash_error();if(t.endsWith("."))return ne.workspace_sidebarChanges_branchEndsPeriod_error();const e=t.split("/");for(const r of e){if(r.startsWith("."))return ne.workspace_sidebarChanges_branchComponentStartsDot_error();if(r.endsWith(".lock"))return ne.workspace_sidebarChanges_branchComponentEndsLock_error()}if(t.length>250)return ne.workspace_sidebarHeader_branchTooLong_error()}function u3(t,e,r,n){return e&&r?`https://github.com/${e}/${r}/pull/${t}`:n||""}function Za(t){return t==="Open"?"open":t==="Merged"?"merged":t==="Draft"?"draft":"closed"}function d3(t,e){return`${e}:${t.agentId??"manual"}`}function cd(t,e){if(t.length===0||e>=t.length)return 0;const r=Math.max(0,e);let n=0;for(let a=r;a<t.length;a++)t[a].isPushed||n++;return n}function ud(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed&&n++;return n}function dd(t,e){if(t.length===0||e<0)return 0;const r=Math.min(e,t.length-1);let n=0;for(let a=0;a<=r;a++)t[a].isPushed||n++;return n}function h3(t,e,r,n){const a=cd(t,e),i=n?` (origin/${n})`:"";return r?a===1?ne.workspace_sidebarChanges_addToPr_one({suffix:i}):ne.workspace_sidebarChanges_addToPr_many({count:rt(a),suffix:i}):a===1?ne.workspace_sidebarChanges_pushToRemote_one({suffix:i}):ne.workspace_sidebarChanges_pushToRemote_many({count:rt(a),suffix:i})}function p3(t,e,r){const n=ud(t,e),a=r?` (origin/${r})`:"";return n===1?ne.workspace_sidebarChanges_undoPush_one({suffix:a}):ne.workspace_sidebarChanges_undoPush_many({count:rt(n),suffix:a})}function m3(t,e){const r=dd(t,e);return r===1?ne.workspace_sidebarChanges_undoCommit_one():ne.workspace_sidebarChanges_undoCommit_many({count:rt(r)})}function f3(t,e){return e===0&&t.length>0}function g3(t,e,r,n){return!r||n==null?!1:t===r&&e===n}function v3(t,e,r){const n=`${e?"staged":"unstaged"}:${t}`;return r.has(n)}function b3(t,e,r){return r?.path===t&&r?.staged===e}function y3(t){if(t.length===0)return[];const e=new Map,r=[...t].sort((n,a)=>n.timestamp-a.timestamp);for(const n of r)for(const a of n.files??[]){const i=e.get(a.path);i?e.set(a.path,{additions:i.additions+(a.additions||0),deletions:i.deletions+(a.deletions||0)}):e.set(a.path,{additions:a.additions||0,deletions:a.deletions||0})}return Array.from(e.entries()).map(([n,a])=>({path:n,additions:a.additions,deletions:a.deletions,staged:!1}))}function w3(t,e,r){const n=new Set;let a=0,i=0;for(const s of t)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of e)n.add(s.relativePath),a+=s.stats?.additions||0,i+=s.stats?.deletions||0;for(const s of r)for(const o of s.files||[])n.add(o.path),a+=o.additions||0,i+=o.deletions||0;return{totalFilesChanged:n.size,totalAdditions:a,totalDeletions:i}}function hd(t){const e=t?.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+)\/pull\/\d+/i);return e?`${e[1]}/${e[2]}`:void 0}function k3(t,e,r,n,a){if(t&&t.length>0){const i=a?.split("/")[0];return t.map(s=>{const o=s.url||r(s.number),c=hd(s.url),d=c!==void 0&&c.toLowerCase()!==a?.toLowerCase()?c:void 0;return{number:s.number,title:n(s),url:o,htmlUrl:o,status:Za(s.status),createdAt:s.createdAt,updatedAt:s.updatedAt,isInMergeQueue:s.isDraft?void 0:s.isInMergeQueue,crossRepo:d,crossRepoDisplay:d?Ri(d,i):void 0}})}return e?[{number:e.number,title:n(e),url:r(e.number,e.url),htmlUrl:r(e.number,e.url),status:Za(e.status),createdAt:e.createdAt,updatedAt:e.updatedAt,isInMergeQueue:e.isDraft?void 0:e.isInMergeQueue}]:[]}function x3(t){const{prNumber:e,prUrl:r}=t;return e==null||!r?null:{id:`legacy-pr-${e}`,number:e,url:r,title:"",status:t.prStatus??z1.Open,createdAt:t.updatedAt,updatedAt:t.updatedAt}}function pd(t){const e=t.lastSnapshot?.state?.toLowerCase();return e==="merged"?"merged":e==="closed"?"closed":t.lastSnapshot?.isDraft?"draft":t.state==="completed"?"closed":"open"}function xa(t,e,r){if(e.length===0)return t;const n=r?.split("/")[0],a=t.map(i=>({...i}));for(const i of e){const s=!i.resource&&!i.monitorAvailability&&(!r||i.repo===r),o=R0(i),c=o.toLowerCase(),d=a.find(p=>!!o&&p.url.toLowerCase()===c||(i.resource||i.monitorAvailability?p.monitorIdentity===ya(i):!p.resource&&!p.monitorAvailability&&(s?!p.crossRepo&&p.number===i.prNumber:p.crossRepo===i.repo&&p.number===i.prNumber)));if(d){d.monitorAgentId=i.agentId,d.resource=i.resource,d.monitorAvailability=i.monitorAvailability,d.monitorIdentity=i.resource||i.monitorAvailability?ya(i):void 0,d.monitorSnapshot=i.lastSnapshot??d.monitorSnapshot;continue}a.push({number:i.prNumber,title:i.title??`${i.repo}${l1(i,i.prNumber)}`,resource:i.resource,monitorAvailability:i.monitorAvailability,monitorIdentity:i.resource||i.monitorAvailability?ya(i):void 0,url:o,htmlUrl:o,status:pd(i),createdAt:i.createdAt,updatedAt:i.updatedAt,monitorAgentId:i.agentId,crossRepo:s?void 0:i.repo,crossRepoDisplay:s?void 0:Ri(i.repo,n),monitorSnapshot:i.lastSnapshot,monitorOnly:!0})}return a}function Ri(t,e){return e&&t.toLowerCase().startsWith(`${e.toLowerCase()}/`)?t.slice(e.length+1):t}function S3(t,e,r,n,a){const i=r?.toLowerCase(),s=new Set;for(const S of n)S.repoOwner&&S.repoName&&s.add(`${S.repoOwner}/${S.repoName}`.toLowerCase());let o=t;const c=[],d=[];if(t.some(S=>S.crossRepo)){o=[];for(const S of t)S.crossRepo?s.has(S.crossRepo.toLowerCase())?c.push(S):d.push(S):o.push(S)}const p=[],g=[],v=[];for(const S of e){const C=S.repo.toLowerCase();R0(S)&&o.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&(!i||C===i)?p.push(S):R0(S)&&c.some(W=>W.url===R0(S))||!S.resource&&!S.monitorAvailability&&s.has(C)?g.push(S):v.push(S)}const w=xa(o,p,r),A=r?.split("/")[0],M=new Set([...w,...c,...d].map(S=>`${(S.crossRepo??r??"").toLowerCase()}#${S.number}`)),D=[...c];for(const S of n){if(!S.repoOwner||!S.repoName)continue;const C=`${S.repoOwner}/${S.repoName}`;for(const W of S.pullRequests??[]){const X=`${C.toLowerCase()}#${W.number}`;if(M.has(X))continue;M.add(X);const Y=W.url||`https://github.com/${C}/pull/${W.number}`,T=i!==void 0&&C.toLowerCase()===i;D.push({number:W.number,title:a(W),url:Y,htmlUrl:Y,status:Za(W.status),createdAt:W.createdAt,updatedAt:W.updatedAt,crossRepo:T?void 0:C,crossRepoDisplay:T?void 0:Ri(C,A)})}}return{own:w,otherRoots:xa(D,g,r),otherTracked:xa(d,v,r)}}function Hs(t){return t.status!=="open"?!1:t.monitorSnapshot?t.monitorSnapshot.isInMergeQueue===!0:t.isInMergeQueue===!0}function A3(t){const e=t.status==="merged"?ne.workspace_prSection_merged_label():t.status==="closed"?ne.workspace_prSection_closed_label():t.status==="draft"?ne.workspace_prSection_statusDraft_label():Hs(t)?ne.workspace_prSection_statusQueued_label():ne.workspace_prSection_statusOpen_label(),r=[c1(t)??e],n=Hs(t)?B1(t.monitorSnapshot?.mergeQueue):null;n&&r.push(n);const a=t.status==="merged"||t.status==="closed"?void 0:t.monitorSnapshot;return a&&(a.checks.total===null||a.checks.passed===null||a.checks.failed===null||a.checks.pending===null||a.availability&&a.availability.checks!=="available"?r.push(ne.chat_monitoredPrs_hover_checksUnknown_label()):a.checks.total>0&&r.push(ne.workspace_prSection_statusChecks_tooltip({passed:rt(a.checks.passed),failed:rt(a.checks.failed),pending:rt(a.checks.pending)})),r.push(a.approvals.have===null||a.availability&&a.availability.approvals!=="available"?ne.chat_monitoredPrs_hover_approvalsUnknown_label():a.approvals.needed!=null?ne.workspace_prSection_statusApprovalsOfNeeded_tooltip({count:rt(a.approvals.have),needed:rt(a.approvals.needed)}):ne.workspace_prSection_statusApprovals_tooltip({count:rt(a.approvals.have)})),a.approvals.changesRequested!==null&&a.approvals.changesRequested>0&&r.push(ne.workspace_prSection_statusChangesRequested_tooltip({count:rt(a.approvals.changesRequested)})),a.availability&&a.availability.discussions!=="available"?r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()):typeof a.threads.unresolved=="number"?a.threads.unresolved>0&&r.push(ne.workspace_prSection_statusUnresolvedThreads_tooltip({count:rt(a.threads.unresolved)})):a.threads.resolutionRequired&&r.push(ne.workspace_prSection_statusUnresolvedThreadsUnknown_tooltip()),a.mergeBlockedReason&&r.push(ld(a.mergeBlockedReason))),r.join(`
2
2
  `)}function T3(t,e){return e.has(t??"manual")}function E3(t,e){return{path:t.relativePath,additions:t.stats.additions,deletions:t.stats.deletions,staged:e,status:t.status,attribution:t.attribution?.agent?{agentId:t.attribution.agent.agentId,agentName:t.attribution.agent.agentName,sessionId:t.attribution.agent.sessionId,turnNumber:t.attribution.agent.turnNumber,timestamp:t.attribution.timestamp}:void 0}}const Vl=500;function M3(t,e=Vl){const r=Math.max(0,Math.floor(e));return t.length<=r?{visible:t,shown:t.length,hiddenCount:0}:{visible:t.slice(0,r),shown:r,hiddenCount:t.length-r}}function C3(t,e,r=Vl){let n=Math.max(0,Math.floor(r)),a=0,i=0;return{groups:t.map(o=>{if(e(o))return{group:o,visibleFiles:[]};const c=Math.min(n,o.files.length);return n-=c,a+=c,i+=o.files.length-c,{group:o,visibleFiles:c===o.files.length?o.files:o.files.slice(0,c)}}),shown:a,hiddenCount:i}}function I3(t){if(t.hiddenCount<=0)return"";const e=rt(t.shown),r=rt(t.shown+t.hiddenCount);return t.hiddenCount===1?ne.workspace_fileChanges_hiddenFiles_one({shown:e,total:r}):ne.workspace_fileChanges_hiddenFiles_many({shown:e,total:r,count:rt(t.hiddenCount)})}function md(t){if(!t)return{};try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function Qa(t){return t.startsWith("@")?t.slice(1):t}function fd(t,e,r,n){const a=t.fullPath||t.path||t.filename;if(a)return Qa(String(a));const i=[r,e,n.trim()].map(Qa).filter(Boolean),s=i.find(o=>o.includes("/"))??i[0];return s?u1(s).path:void 0}function gd(t){const e=t.line??t.startLine??t.range?.start;return typeof e=="number"&&Number.isFinite(e)?e:void 0}function vd(t){if(!t||t.getAttribute("data-mention")===null)return null;const e=t.getAttribute("data-type")||"",r=t.getAttribute("data-id")||"",n=t.getAttribute("data-label")||"",a=t.getAttribute("data-uri")||"",i=md(t.getAttribute("data-meta")),s={type:e,id:r,label:n,uri:a,meta:i},o=a.startsWith("intent://")?a:typeof i.fullUrl=="string"&&i.fullUrl.startsWith("intent://")?i.fullUrl:void 0;if(o&&(s.intentUrl=o),e==="file"||e==="file-range"){const c=fd(i,n,r,t.textContent||"");c&&(s.filePath=c);const d=gd(i);d!==void 0&&(s.line=d)}else if(e==="folder"||e==="source-folder"){const c=i.fullPath||i.path||r||n,d=c?Qa(String(c)).replace(/\/+$/,""):"";d&&(s.folderPath=d)}else if(e==="note"||e==="note-range"){const c=i.noteId||r;c&&(s.note=i.isExternalLink&&i.workspaceId?{id:c,workspaceId:String(i.workspaceId)}:{id:c})}return s}function z3(t){return{sidebarTabId:"files",type:"file",filePath:`${t}/`}}function Di(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Lr=Di();function Kl(t){Lr=t}var Ir={exec:()=>null};function Yr(t){let e=[];return r=>{let n=Math.max(0,Math.min(3,r-1)),a=e[n];return a||(a=t(n),e[n]=a),a}}function ce(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Ke.caret,"$1"),r=r.replace(a,s),n},getRegex:()=>new RegExp(r,e)};return n}var bd=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),Ke={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Yr(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Yr(t=>new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Yr(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Yr(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Yr(t=>new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Yr(t=>new RegExp(`^ {0,${t}}>`))},yd=/^(?:[ \t]*(?:\n|$))+/,wd=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,kd=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,W0=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,xd=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ni=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Yl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Xl=ce(Yl).replace(/bull/g,Ni).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Sd=ce(Yl).replace(/bull/g,Ni).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Pi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Ad=/^[^\n]+/,_i=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Td=ce(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_i).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ed=ce(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Ni).getRegex(),Hn="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Li=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Md=ce("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Li).replace("tag",Hn).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Zl=t=>ce(Pi).replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hn).getRegex(),Cd=Zl(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Id=Zl(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),zd=ce(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Id).getRegex(),Oi={blockquote:zd,code:wd,def:Td,fences:kd,heading:xd,hr:W0,html:Md,lheading:Xl,list:Ed,newline:yd,paragraph:Cd,table:Ir,text:Ad},Us=ce("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hn).getRegex(),Rd={...Oi,lheading:Sd,table:Us,paragraph:ce(Pi).replace("hr",W0).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Us).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Hn).getRegex()},Dd={...Oi,html:ce(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Li).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ir,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ce(Pi).replace("hr",W0).replace("heading",` *#{1,6} *[^
3
3
  ]`).replace("lheading",Xl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Nd=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Pd=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ql=/^( {2,}|\\)\n(?!\s*$)/,_d=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Vt=/[\p{P}\p{S}]/u,m0=/[\s\p{P}\p{S}]/u,G0=/[^\s\p{P}\p{S}]/u,Ld=ce(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,m0).getRegex(),Od=/[\p{Pi}\p{Ps}"']/u,Jl=/(?!~)[\p{P}\p{S}]/u,$d=/(?!~)[\s\p{P}\p{S}]/u,Bd=/(?:[^\s\p{P}\p{S}]|~)/u,qd=ce(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",bd?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ec=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Fd=ce(ec,"u").replace(/punct/g,Vt).getRegex(),Hd=ce(ec,"u").replace(/punct/g,Jl).getRegex(),Ud=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Wd=ce(Ud,"u").replace(/openQuote/g,Od).replace(/punct/g,Vt).getRegex(),tc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Gd=ce(tc,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),jd=ce(tc,"gu").replace(/notPunctSpace/g,Bd).replace(/punctSpace/g,$d).replace(/punct/g,Jl).getRegex(),Vd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Kd=ce(Vd,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Yd=ce("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Xd="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Zd=ce(Xd,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),Qd=ce(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Vt).getRegex(),Jd="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",eh=ce(Jd,"gu").replace(/notPunctSpace/g,G0).replace(/punctSpace/g,m0).replace(/punct/g,Vt).getRegex(),th=ce(/\\(punct)/,"gu").replace(/punct/g,Vt).getRegex(),rh=ce(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),nh=ce(Li).replace("(?:-->|$)","-->").getRegex(),ah=ce("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",nh).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_n=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,ih=ce(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",_n).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),rc=ce(/^!?\[(label)\]\[(ref)\]/).replace("label",_n).replace("ref",_i).getRegex(),nc=ce(/^!?\[(ref)\](?:\[\])?/).replace("ref",_i).getRegex(),sh=ce("reflink|nolink(?!\\()","g").replace("reflink",rc).replace("nolink",nc).getRegex(),Ws=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,$i={_backpedal:Ir,anyPunctuation:th,autolink:rh,blockSkip:qd,br:Ql,code:Pd,del:Ir,delLDelim:Ir,delRDelim:Ir,emStrongLDelim:Fd,emStrongRDelimAst:Gd,emStrongRDelimUnd:Yd,escape:Nd,link:ih,nolink:nc,punctuation:Ld,reflink:rc,reflinkSearch:sh,tag:ah,text:_d,url:Ir},oh={...$i,emStrongLDelim:Wd,emStrongRDelimAst:Kd,emStrongRDelimUnd:Zd,link:ce(/^!?\[(label)\]\((.*?)\)/).replace("label",_n).getRegex(),reflink:ce(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_n).getRegex()},Ja={...$i,emStrongRDelimAst:jd,emStrongLDelim:Hd,delLDelim:Qd,delRDelim:eh,url:ce(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ws).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ce(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ws).getRegex()},lh={...Ja,br:ce(Ql).replace("{2,}","*").getRegex(),text:ce(Ja.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},wn={normal:Oi,gfm:Rd,pedantic:Dd},S0={normal:$i,gfm:Ja,breaks:lh,pedantic:oh},ch={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Gs=t=>ch[t];function Dt(t,e){if(e){if(Ke.escapeTest.test(t))return t.replace(Ke.escapeReplace,Gs)}else if(Ke.escapeTestNoEncode.test(t))return t.replace(Ke.escapeReplaceNoEncode,Gs);return t}function js(t){try{t=encodeURI(t).replace(Ke.percentDecode,"%")}catch{return null}return t}function Vs(t,e){let r=t.replace(Ke.findPipe,(i,s,o)=>{let c=!1,d=s;for(;--d>=0&&o[d]==="\\";)c=!c;return c?"|":" |"}),n=r.split(Ke.splitPipe),a=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(Ke.slashPipe,"|");return n}function tr(t,e,r){let n=t.length;if(n===0)return"";let a=0;for(;a<n&&t.charAt(n-a-1)===e;)a++;return t.slice(0,n-a)}function Ks(t){let e=t.split(`
4
4
  `),r=e.length-1;for(;r>=0&&Ke.blankLine.test(e[r]);)r--;return e.length-r<=2?t:e.slice(0,r+1).join(`
@@ -1,4 +1,4 @@
1
- var $s=Object.defineProperty;var Fs=(f,r,l)=>r in f?$s(f,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):f[r]=l;var q=(f,r,l)=>Fs(f,typeof r!="symbol"?r+"":r,l);import{t as dn,bo as y,bm as P,bw as un,bq as On,b as hn,bs as je}from"./51_h0jm2.js";import{ai as xr,bs as gn,ca as Be,aD as e,bH as m,a5 as N,bA as H,b_ as z,aw as sn,aj as ln,W as w,bn as fn,bV as J,aA as x,ay as ne,bS as C,bl as de,bO as K,aB as T,c9 as u,a7 as nt,br as tt,bj as sr,c5 as gt,c0 as Ln,a as Us,be as Tt,b$ as ft,bf as or}from"./CJxGDkBm.js";import{i as M}from"./PXCFrn2V.js";import{g as Pt,i as Hn,I as ir,e as ar}from"./Bjy4ygfJ.js";import{n as cn,l as Ws,c as Bs}from"./BxwkoIbZ.js";import{f as En,s as Ve,g as lr}from"./CpPNoOk-.js";import{b as on}from"./NtFyWdpR.js";import{J4 as Me,eK as Vs,eB as Ks,eC as js,oO as qs,nC as Vt,nG as cr,nF as In,eE as Gs,vp as Qs,vq as Xs,vs as Js,H8 as Ys,J9 as Zs,rH as eo,eJ as to}from"./Zldsekdv.js";import{c as no}from"./BxTyo7yU.js";import{F as Ne,a1 as ro,a8 as An,aw as dr,ax as ur,bS as so,aP as oo,cd as hr,bZ as gr,cq as fr}from"./DSQT151l.js";import{dE as io,bp as ao,X as lo,aN as mr,p as co}from"./XJqoy2ap.js";import{L as pr}from"./DYmzWBEk.js";import{C as an}from"./DypB-Dwi.js";import{b8 as kr,bN as uo,bT as ho}from"./D9NDL9ta.js";import{q as $e,d as go,g as fo}from"./DdH7Q5ij.js";import"./DxvSggY5.js";import"./CF1Tu_8c.js";/* empty css */import{T as Pr}from"./BlIreYOW.js";import{g as Nn}from"./D0Z6csIX.js";import{A as mo}from"./FmBB5PWm.js";import{f as ke}from"./Cdw_CIdg.js";import{C as po}from"./B9XvejAu.js";import{C as vo}from"./SX1khnGy.js";import{s as vr}from"./x-XvE_CJ.js";import{S as Dt}from"./M18r7swD.js";import{l as Rt}from"./DqFWZ_g1.js";import{G as _r}from"./Cl7NoY6M.js";import{P as _o}from"./BR5vKj6f.js";import{g as wo}from"./CgXGPBF5.js";import{a8 as bo,Y as So}from"./ie53yFct.js";import{ap as Co}from"./CXaVTV1g.js";import{L as wr}from"./jRFO7UbE.js";import{ae as yo,ad as xo,af as ko}from"./fd1DS8nx.js";function br({scrollTop:f,scrollHeight:r,height:l,fitPerfectly:a=!1,fitPerfectlyOverscroll:c=0,overscrollSize:p}){const b=l+p*2,S=a?l+c*2:b;if(r=Math.max(r,S),b>=r||a){const G=Math.max(f-c,0),h=Math.min(f+S,r);return{top:G,bottom:Math.max(h,G)}}let A=f+l/2-b/2,F=A+b;return A<0&&(A=0),F>r&&(F=r),A=Math.floor(Math.max(A,0)),{top:A,bottom:Math.ceil(Math.max(Math.min(F,r),A))}}function Po(f,r){return f==null||r==null?f===r:f.top===r.top&&f.bottom===r.bottom}const Rr=1e3,Ro=Rr*4,Lo=[0,1e-6,.99999,1],Ho={overscrollSize:Rr,intersectionObserverMargin:Ro,resizeDebugging:!1};let rn=0,Io=-1;var Pe,Ao=(Pe=class{constructor(r){q(this,"__id",`virtualizer-${++Io}`);q(this,"config");q(this,"type","simple");q(this,"intersectionObserver");q(this,"scrollTop",0);q(this,"height",0);q(this,"scrollHeight",0);q(this,"windowSpecs",{top:0,bottom:0});q(this,"root");q(this,"contentContainer");q(this,"resizeObserver");q(this,"observers",new Map);q(this,"visibleInstances",new Map);q(this,"visibleInstancesDirty",!1);q(this,"instancesChanged",new Set);q(this,"reconcileQueue",new Set);q(this,"scrollDirty",!0);q(this,"heightDirty",!0);q(this,"scrollHeightDirty",!0);q(this,"renderedObservers",0);q(this,"connectQueue",new Map);q(this,"handleContainerResize",r=>{if(this.root==null)return;let l=!1;for(const a of r){const c=a.borderBoxSize[0].blockSize;this.root instanceof Document?c!==this.scrollHeight&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: content size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c)):a.target===this.root?c!==this.height&&(this.heightDirty=!0,l=!0):a.target===this.contentContainer&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: scroller size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c))}l&&$e(this.computeRenderRangeAndEmit)});q(this,"handleWindowResize",()=>{Pe.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleWindowScroll",()=>{Pe.__STOP||this.root==null||!(this.root instanceof Document)||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleElementScroll",()=>{Pe.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"computeRenderRangeAndEmit",()=>{if(Pe.__STOP)return;const r=this.heightDirty||this.scrollHeightDirty;let l=this.instancesChanged.size>0;if(this.instancesChanged.size===0){const p=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!r&&Po(this.windowSpecs,p)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.reconcileQueue.size===0)return;this.windowSpecs=p}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;const a=this.getScrollAnchor(this.height),c=new Set;for(const p of r?this.observers.values():this.visibleInstances.values())p.onRender(r)&&c.add(p);for(const p of this.instancesChanged)c.has(p)||p.onRender(r)&&c.add(p);this.scrollFix(a);for(const p of c)this.reconcileQueue.delete(p),p.reconcileHeights();for(const p of this.reconcileQueue)p.reconcileHeights()&&(l=!0);this.reconcileQueue.clear(),l||=this.instancesChanged.size>0,l&&this.markDOMDirty(),(l||r)&&$e(this.computeRenderRangeAndEmit),c.clear(),this.instancesChanged.clear()});q(this,"handleIntersectionChange",r=>{this.scrollDirty=!0;for(const{target:l,isIntersecting:a}of r){if(!(l instanceof HTMLElement))throw new Error("Virtualizer.handleIntersectionChange: target not an HTMLElement");const c=this.observers.get(l);c!=null&&(a&&!this.visibleInstances.has(l)?(c.setVisibility(!0),this.visibleInstances.set(l,c),this.visibleInstancesDirty=!0):!a&&this.visibleInstances.has(l)&&(c.setVisibility(!1),this.visibleInstances.delete(l),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&$e(this.computeRenderRangeAndEmit)});this.config={...Ho,...r}}setup(r,l){if(this.root==null){this.root=r,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:Lo,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),r instanceof Document?this.setupWindow():this.setupElement(l),window.__INSTANCE=this,window.__TOGGLE=()=>{Pe.__STOP?(Pe.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:Pe.__lastScrollPosition}),$e(this.computeRenderRangeAndEmit)):(Pe.__lastScrollPosition=this.getScrollTop(),Pe.__STOP=!0)};for(const[a,c]of this.connectQueue.entries())this.connect(a,c);this.connectQueue.clear(),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}}instanceChanged(r,l){this.instancesChanged.add(r),l&&this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}requestHeightReconcile(r){this.reconcileQueue.add(r),$e(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}getRoot(){return this.root}isInstanceVisible(r,l){const a=this.getScrollTop(),c=this.getHeight(),p=this.config.intersectionObserverMargin,b=a-p,S=a+c+p;return!(r<b-l||r>S)}setupWindow(){if(this.root==null||!(this.root instanceof Document))throw new Error("Virtualizer.setupWindow: Invalid setup method");window.addEventListener("scroll",this.handleWindowScroll,{passive:!0}),window.addEventListener("resize",this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(r){if(this.root==null||this.root instanceof Document)throw new Error("Virtualizer.setupElement: Invalid setup method");this.root.addEventListener("scroll",this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),r??=this.root.firstElementChild??void 0,r instanceof HTMLElement&&(this.contentContainer=r,this.resizeObserver?.observe(r))}cleanUp(){go(this.computeRenderRangeAndEmit),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener("scroll",this.handleElementScroll),window.removeEventListener("scroll",this.handleWindowScroll),window.removeEventListener("resize",this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.reconcileQueue.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.scrollHeightDirty=!0}getOffsetInScrollContainer(r){return this.getScrollTop()+Kt(r,this.getScrollContainerElement())}connect(r,l){if(this.observers.has(r))throw new Error("Virtualizer.connect: instance is already connected...");return this.intersectionObserver==null?this.connectQueue.set(r,l):(this.intersectionObserver.observe(r),this.observers.set(r,l),this.instancesChanged.add(l),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)),()=>this.disconnect(r)}disconnect(r){const l=this.observers.get(r);this.connectQueue.delete(r),l!=null&&(this.intersectionObserver?.unobserve(r),this.observers.delete(r),this.instancesChanged.delete(l),this.reconcileQueue.delete(l),this.visibleInstances.delete(r)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit))}scrollFix(r){if(r==null)return;const l=this.getScrollContainerElement(),{lineIndex:a,lineOffset:c,fileElement:p,fileOffset:b,fileTypeOffset:S}=r;if(a!=null&&c!=null){const F=p.shadowRoot?.querySelector(`[data-line][data-line-index="${a}"]`);if(F instanceof HTMLElement){const G=Kt(F,l);if(G!==c){const h=G-c;this.applyScrollFix(h)}return}}const A=Kt(p,l);if(S==="top")A!==b&&this.applyScrollFix(A-b);else{const F=A+p.getBoundingClientRect().height;F!==b&&this.applyScrollFix(F-b)}}applyScrollFix(r){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+r,behavior:"instant"}):this.root.scrollTo({top:this.root.scrollTop+r,behavior:"instant"}),this.markDOMDirty()}getScrollAnchor(r){const l=this.getScrollContainerElement();let a;for(const[c]of this.visibleInstances.entries()){const p=Kt(c,l),b=p+c.offsetHeight;let S,A;b<=0?(S=b,A="bottom"):(S=p,A="top");let F,G;if(b>0&&p<r)for(const oe of c.shadowRoot?.querySelectorAll("[data-line][data-line-index]")??[]){if(!(oe instanceof HTMLElement))continue;const Te=oe.dataset.lineIndex;if(Te==null)continue;const ue=Kt(oe,l);if(!(ue<0)){F=Te,G=ue;break}}if(a?.lineOffset!=null&&G==null)continue;let h=!1;(a==null||G!=null&&(a.lineOffset==null||G<a.lineOffset)||G==null&&a.lineOffset==null&&(S>=0&&(a.fileOffset<0||S<a.fileOffset)||S<0&&a.fileOffset<0&&S>a.fileOffset))&&(h=!0),h&&(a={fileElement:c,fileTypeOffset:A,fileOffset:S,lineIndex:F,lineOffset:G})}return a}getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let r=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return r=this.clampScrollTop(r),this.scrollTop=r,r}scrollTo({top:r,behavior:l="auto"}){const{root:a}=this;if(a==null)return;const c=this.clampScrollTop(r);a instanceof Document?window.scrollTo({top:c,behavior:l}):a.scrollTo({top:c,behavior:l}),this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit)}clampScrollTop(r){return Math.max(0,Math.min(r,this.getScrollHeight()-this.getHeight()))}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}},q(Pe,"__STOP",!1),q(Pe,"__lastScrollPosition",0),Pe);function Kt(f,r){const l=f.getBoundingClientRect(),a=r?.getBoundingClientRect().top??0;return l.top-a}var Eo=T('<div class="absolute inset-0 flex items-center justify-center rounded-lg bg-background/60 backdrop-blur-[2px] transition-opacity duration-spring-moderate ease-spring-moderate motion-reduce:transition-none z-10 pointer-events-none"><div class="flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-xs font-medium text-subtle shadow-lg"><!> </div></div>'),Oo=T("<!> <!>",1),No=T('<div class="flex h-24 items-center justify-start text-left text-subtle"> </div>'),To=T('<div role="region"><!></div>');function Lr(f,r){if(new.target)return dn({component:Lr,...f});gn(r,!0);const l=()=>je(ve,"$sideBySide",a),[a,c]=On(),p=Nn()?.workspaceId??void 0;let b=y(r,"change",7),S=y(r,"foldUnchanged",7,!0),A=y(r,"allowHeadReads",7,!0),F=y(r,"canReadHeadFiles",7),G=y(r,"lineWrapping",7,!1),h=y(r,"scrollToLine",7),oe=y(r,"isAggregate",7,!1),Te=y(r,"showScrollHint",7,!1),ue=y(r,"onStageHunk",7),Q=y(r,"onUnstageHunk",7),at=y(r,"onOpenCommit",7),pt=y(r,"virtualizer",7),vt=y(r,"gitRootId",7,void 0),_t=y(r,"gitRootPath",7,void 0);const ve=kr();let Re=J(!1),Se=J(!1),Fe=J(!1),Ue=J(0),qe=J(void 0);const $=80;function ie(){m(Se,!0)}function De(){m(Se,!1),m(Fe,!1),m(Ue,0)}function Le(v){!e(Se)||e(Re)||(m(Ue,e(Ue)+Math.abs(v.deltaY)),e(Ue)>=$&&!e(Fe)&&m(Fe,!0))}function jt(){m(Re,!0),m(Fe,!1),m(Ue,0)}function qt(v){e(qe)&&!e(qe).contains(v.relatedTarget)&&m(Re,!1)}Be(()=>{(e(Re)||!e(Se))&&(m(Fe,!1),m(Ue,0))});let Lt=u(()=>{const{toolCallId:v,filePath:_e,additions:Qe,deletions:St,oldContent:re,newContent:Xe}=b(),rt="staged"in b()&&b().staged===!0,Ke="category"in b()?b().category:void 0,At="commitHash"in b()?b().commitHash:void 0,zt="gitlink"in b()?b().gitlink:void 0,Mt="isFullFileContent"in b()?b().isFullFileContent:!1;let Ct;return Ke==="committed"?Ct=an.Committed:rt?Ct=an.Staged:Ct=an.Unstaged,{id:v,file:_e,relativePath:_e,stage:Ct,commitHash:At,gitlink:zt,stats:{additions:Qe,deletions:St},attribution:{timestamp:0},content:re!==void 0||Xe!==void 0?{oldContent:re??"",newContent:Xe??"",isFullFileContent:Mt}:void 0}});const D=u(()=>b().isFullFileContent?1:("chunks"in b()?b().chunks?.[0]?.newStart:void 0)??b().startLineNumber??1);var Ht={get change(){return b()},set change(v){b(v),x()},get foldUnchanged(){return S()},set foldUnchanged(v=!0){S(v),x()},get allowHeadReads(){return A()},set allowHeadReads(v=!0){A(v),x()},get canReadHeadFiles(){return F()},set canReadHeadFiles(v){F(v),x()},get lineWrapping(){return G()},set lineWrapping(v=!1){G(v),x()},get scrollToLine(){return h()},set scrollToLine(v){h(v),x()},get isAggregate(){return oe()},set isAggregate(v=!1){oe(v),x()},get showScrollHint(){return Te()},set showScrollHint(v=!1){Te(v),x()},get onStageHunk(){return ue()},set onStageHunk(v){ue(v),x()},get onUnstageHunk(){return Q()},set onUnstageHunk(v){Q(v),x()},get onOpenCommit(){return at()},set onOpenCommit(v){at(v),x()},get virtualizer(){return pt()},set virtualizer(v){pt(v),x()},get gitRootId(){return vt()},set gitRootId(v=void 0){vt(v),x()},get gitRootPath(){return _t()},set gitRootPath(v=void 0){_t(v),x()},$set:un,$on:(v,_e)=>hn(r,v,_e)},He=To();let wt;var It=N(He);{var Ge=v=>{var _e=Oo(),Qe=ne(_e);{let Xe=u(()=>l()?"split":"unified");Pr(Qe,{get change(){return e(Lt)},get workspaceId(){return p},get viewMode(){return e(Xe)},get foldUnchanged(){return S()},get lineWrapping(){return G()},get onStageHunk(){return ue()},get onUnstageHunk(){return Q()},useProvidedContent:!0,get allowHeadReads(){return A()},get canReadHeadFiles(){return F()},get lineOffset(){return e(D)},get virtualizer(){return pt()},get gitRootId(){return vt()},get gitRootPath(){return _t()}})}var St=C(Qe,2);{var re=Xe=>{var rt=Eo(),Ke=N(rt),At=N(Ke);Ne(At,{get icon(){return ro},class:"w-3 h-3"});var zt=C(At);H(Ke),H(rt),z(Mt=>K(zt,` ${Mt??""}`),[()=>P.chat_inlineDiffItem_clickToScroll_label()]),cn(1,rt,()=>Ws,()=>({tier:"fast",y:0,scale:1})),cn(2,rt,()=>Bs,()=>({tier:"fast"})),w(Xe,rt)};M(St,Xe=>{Te()&&e(Fe)&&Xe(re)})}w(v,_e)},bt=v=>{var _e=No(),Qe=de(_e,!0);z(St=>K(Qe,St),[()=>P.chat_inlineDiffItem_noWorkspace_label()]),w(v,_e)};M(It,v=>{p?v(Ge):v(bt,-1)})}H(He),on(He,v=>m(qe,v),()=>e(qe)),z(v=>{wt=En(He,1,"inline-diff-container relative",null,wt,{focused:e(Re)}),Ve(He,"aria-label",v)},[()=>P.chat_inlineDiffItem_viewer_ariaLabel()]),sn("mouseenter",He,ie),sn("mouseleave",He,De),sn("wheel",He,Le),ln("focusin",He,jt),ln("focusout",He,qt),w(f,He);var mn=fn(Ht);return c(),mn}xr(["focusin","focusout"]);function Sr(f){return[f.stage,f.type,f.oldLineNumber??"",f.newLineNumber??"",f.content].join("\0")}function Do(f){let r=f.oldStart,l=f.newStart;return f.lines.map(a=>{const c={...a,oldLineNumber:a.oldLineNumber??a.oldNumber,newLineNumber:a.newLineNumber??a.newNumber};return c.oldLineNumber===void 0&&c.newLineNumber===void 0?a.type==="Context"?(c.oldLineNumber=r++,c.newLineNumber=l++):a.type==="Deletion"?c.oldLineNumber=r++:a.type==="Addition"&&(c.newLineNumber=l++):a.type==="Context"?(r=(c.oldLineNumber??r)+1,l=(c.newLineNumber??l)+1):a.type==="Deletion"?r=(c.oldLineNumber??r)+1:a.type==="Addition"&&(l=(c.newLineNumber??l)+1),c})}function zo(f,r){const l=f?f.split(`
1
+ var $s=Object.defineProperty;var Fs=(f,r,l)=>r in f?$s(f,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):f[r]=l;var q=(f,r,l)=>Fs(f,typeof r!="symbol"?r+"":r,l);import{t as dn,bo as y,bm as P,bw as un,bq as On,b as hn,bs as je}from"./51_h0jm2.js";import{ai as xr,bs as gn,ca as Be,aD as e,bH as m,a5 as N,bA as H,b_ as z,aw as sn,aj as ln,W as w,bn as fn,bV as J,aA as x,ay as ne,bS as C,bl as de,bO as K,aB as T,c9 as u,a7 as nt,br as tt,bj as sr,c5 as gt,c0 as Ln,a as Us,be as Tt,b$ as ft,bf as or}from"./CJxGDkBm.js";import{i as M}from"./PXCFrn2V.js";import{g as Pt,i as Hn,I as ir,e as ar}from"./Bjy4ygfJ.js";import{n as cn,l as Ws,c as Bs}from"./BxwkoIbZ.js";import{f as En,s as Ve,g as lr}from"./CpPNoOk-.js";import{b as on}from"./NtFyWdpR.js";import{J4 as Me,eK as Vs,eB as Ks,eC as js,oO as qs,nC as Vt,nG as cr,nF as In,eE as Gs,vp as Qs,vq as Xs,vs as Js,H8 as Ys,J9 as Zs,rH as eo,eJ as to}from"./CbRsc9i4.js";import{c as no}from"./i8PKWJT0.js";import{F as Ne,a1 as ro,a8 as An,aw as dr,ax as ur,bS as so,aP as oo,cd as hr,bZ as gr,cq as fr}from"./DSQT151l.js";import{dE as io,bp as ao,X as lo,aN as mr,p as co}from"./CgwFGLCK.js";import{L as pr}from"./DYmzWBEk.js";import{C as an}from"./DypB-Dwi.js";import{b8 as kr,bN as uo,bT as ho}from"./CMLBE7U6.js";import{q as $e,d as go,g as fo}from"./ir8Qz45r.js";import"./DxvSggY5.js";import"./Cgn_eC9-.js";/* empty css */import{T as Pr}from"./BX9hgO_H.js";import{g as Nn}from"./A4nvdmL6.js";import{A as mo}from"./FmBB5PWm.js";import{f as ke}from"./CdOh_Fmv.js";import{C as po}from"./UQXXh4U7.js";import{C as vo}from"./BAymCgEX.js";import{s as vr}from"./Cv2YUgTX.js";import{S as Dt}from"./DvrEye74.js";import{l as Rt}from"./DqFWZ_g1.js";import{G as _r}from"./Cl7NoY6M.js";import{P as _o}from"./DL1CE4TH.js";import{g as wo}from"./BmBa9vQp.js";import{a8 as bo,Y as So}from"./BR2t5nsF.js";import{ap as Co}from"./DFr6bn5t.js";import{L as wr}from"./CyWgrZMk.js";import{ae as yo,ad as xo,af as ko}from"./VdR0DXlW.js";function br({scrollTop:f,scrollHeight:r,height:l,fitPerfectly:a=!1,fitPerfectlyOverscroll:c=0,overscrollSize:p}){const b=l+p*2,S=a?l+c*2:b;if(r=Math.max(r,S),b>=r||a){const G=Math.max(f-c,0),h=Math.min(f+S,r);return{top:G,bottom:Math.max(h,G)}}let A=f+l/2-b/2,F=A+b;return A<0&&(A=0),F>r&&(F=r),A=Math.floor(Math.max(A,0)),{top:A,bottom:Math.ceil(Math.max(Math.min(F,r),A))}}function Po(f,r){return f==null||r==null?f===r:f.top===r.top&&f.bottom===r.bottom}const Rr=1e3,Ro=Rr*4,Lo=[0,1e-6,.99999,1],Ho={overscrollSize:Rr,intersectionObserverMargin:Ro,resizeDebugging:!1};let rn=0,Io=-1;var Pe,Ao=(Pe=class{constructor(r){q(this,"__id",`virtualizer-${++Io}`);q(this,"config");q(this,"type","simple");q(this,"intersectionObserver");q(this,"scrollTop",0);q(this,"height",0);q(this,"scrollHeight",0);q(this,"windowSpecs",{top:0,bottom:0});q(this,"root");q(this,"contentContainer");q(this,"resizeObserver");q(this,"observers",new Map);q(this,"visibleInstances",new Map);q(this,"visibleInstancesDirty",!1);q(this,"instancesChanged",new Set);q(this,"reconcileQueue",new Set);q(this,"scrollDirty",!0);q(this,"heightDirty",!0);q(this,"scrollHeightDirty",!0);q(this,"renderedObservers",0);q(this,"connectQueue",new Map);q(this,"handleContainerResize",r=>{if(this.root==null)return;let l=!1;for(const a of r){const c=a.borderBoxSize[0].blockSize;this.root instanceof Document?c!==this.scrollHeight&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: content size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c)):a.target===this.root?c!==this.height&&(this.heightDirty=!0,l=!0):a.target===this.contentContainer&&(this.scrollHeightDirty=!0,l=!0,this.config.resizeDebugging&&(console.log("Virtualizer: scroller size change",this.__id,{sizeChange:c-rn,newSize:c}),rn=c))}l&&$e(this.computeRenderRangeAndEmit)});q(this,"handleWindowResize",()=>{Pe.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleWindowScroll",()=>{Pe.__STOP||this.root==null||!(this.root instanceof Document)||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"handleElementScroll",()=>{Pe.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit))});q(this,"computeRenderRangeAndEmit",()=>{if(Pe.__STOP)return;const r=this.heightDirty||this.scrollHeightDirty;let l=this.instancesChanged.size>0;if(this.instancesChanged.size===0){const p=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!r&&Po(this.windowSpecs,p)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.reconcileQueue.size===0)return;this.windowSpecs=p}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;const a=this.getScrollAnchor(this.height),c=new Set;for(const p of r?this.observers.values():this.visibleInstances.values())p.onRender(r)&&c.add(p);for(const p of this.instancesChanged)c.has(p)||p.onRender(r)&&c.add(p);this.scrollFix(a);for(const p of c)this.reconcileQueue.delete(p),p.reconcileHeights();for(const p of this.reconcileQueue)p.reconcileHeights()&&(l=!0);this.reconcileQueue.clear(),l||=this.instancesChanged.size>0,l&&this.markDOMDirty(),(l||r)&&$e(this.computeRenderRangeAndEmit),c.clear(),this.instancesChanged.clear()});q(this,"handleIntersectionChange",r=>{this.scrollDirty=!0;for(const{target:l,isIntersecting:a}of r){if(!(l instanceof HTMLElement))throw new Error("Virtualizer.handleIntersectionChange: target not an HTMLElement");const c=this.observers.get(l);c!=null&&(a&&!this.visibleInstances.has(l)?(c.setVisibility(!0),this.visibleInstances.set(l,c),this.visibleInstancesDirty=!0):!a&&this.visibleInstances.has(l)&&(c.setVisibility(!1),this.visibleInstances.delete(l),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&$e(this.computeRenderRangeAndEmit)});this.config={...Ho,...r}}setup(r,l){if(this.root==null){this.root=r,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:Lo,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),r instanceof Document?this.setupWindow():this.setupElement(l),window.__INSTANCE=this,window.__TOGGLE=()=>{Pe.__STOP?(Pe.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:Pe.__lastScrollPosition}),$e(this.computeRenderRangeAndEmit)):(Pe.__lastScrollPosition=this.getScrollTop(),Pe.__STOP=!0)};for(const[a,c]of this.connectQueue.entries())this.connect(a,c);this.connectQueue.clear(),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}}instanceChanged(r,l){this.instancesChanged.add(r),l&&this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)}requestHeightReconcile(r){this.reconcileQueue.add(r),$e(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=br({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}getRoot(){return this.root}isInstanceVisible(r,l){const a=this.getScrollTop(),c=this.getHeight(),p=this.config.intersectionObserverMargin,b=a-p,S=a+c+p;return!(r<b-l||r>S)}setupWindow(){if(this.root==null||!(this.root instanceof Document))throw new Error("Virtualizer.setupWindow: Invalid setup method");window.addEventListener("scroll",this.handleWindowScroll,{passive:!0}),window.addEventListener("resize",this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(r){if(this.root==null||this.root instanceof Document)throw new Error("Virtualizer.setupElement: Invalid setup method");this.root.addEventListener("scroll",this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),r??=this.root.firstElementChild??void 0,r instanceof HTMLElement&&(this.contentContainer=r,this.resizeObserver?.observe(r))}cleanUp(){go(this.computeRenderRangeAndEmit),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener("scroll",this.handleElementScroll),window.removeEventListener("scroll",this.handleWindowScroll),window.removeEventListener("resize",this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.reconcileQueue.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.scrollHeightDirty=!0}getOffsetInScrollContainer(r){return this.getScrollTop()+Kt(r,this.getScrollContainerElement())}connect(r,l){if(this.observers.has(r))throw new Error("Virtualizer.connect: instance is already connected...");return this.intersectionObserver==null?this.connectQueue.set(r,l):(this.intersectionObserver.observe(r),this.observers.set(r,l),this.instancesChanged.add(l),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit)),()=>this.disconnect(r)}disconnect(r){const l=this.observers.get(r);this.connectQueue.delete(r),l!=null&&(this.intersectionObserver?.unobserve(r),this.observers.delete(r),this.instancesChanged.delete(l),this.reconcileQueue.delete(l),this.visibleInstances.delete(r)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),$e(this.computeRenderRangeAndEmit))}scrollFix(r){if(r==null)return;const l=this.getScrollContainerElement(),{lineIndex:a,lineOffset:c,fileElement:p,fileOffset:b,fileTypeOffset:S}=r;if(a!=null&&c!=null){const F=p.shadowRoot?.querySelector(`[data-line][data-line-index="${a}"]`);if(F instanceof HTMLElement){const G=Kt(F,l);if(G!==c){const h=G-c;this.applyScrollFix(h)}return}}const A=Kt(p,l);if(S==="top")A!==b&&this.applyScrollFix(A-b);else{const F=A+p.getBoundingClientRect().height;F!==b&&this.applyScrollFix(F-b)}}applyScrollFix(r){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+r,behavior:"instant"}):this.root.scrollTo({top:this.root.scrollTop+r,behavior:"instant"}),this.markDOMDirty()}getScrollAnchor(r){const l=this.getScrollContainerElement();let a;for(const[c]of this.visibleInstances.entries()){const p=Kt(c,l),b=p+c.offsetHeight;let S,A;b<=0?(S=b,A="bottom"):(S=p,A="top");let F,G;if(b>0&&p<r)for(const oe of c.shadowRoot?.querySelectorAll("[data-line][data-line-index]")??[]){if(!(oe instanceof HTMLElement))continue;const Te=oe.dataset.lineIndex;if(Te==null)continue;const ue=Kt(oe,l);if(!(ue<0)){F=Te,G=ue;break}}if(a?.lineOffset!=null&&G==null)continue;let h=!1;(a==null||G!=null&&(a.lineOffset==null||G<a.lineOffset)||G==null&&a.lineOffset==null&&(S>=0&&(a.fileOffset<0||S<a.fileOffset)||S<0&&a.fileOffset<0&&S>a.fileOffset))&&(h=!0),h&&(a={fileElement:c,fileTypeOffset:A,fileOffset:S,lineIndex:F,lineOffset:G})}return a}getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let r=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return r=this.clampScrollTop(r),this.scrollTop=r,r}scrollTo({top:r,behavior:l="auto"}){const{root:a}=this;if(a==null)return;const c=this.clampScrollTop(r);a instanceof Document?window.scrollTo({top:c,behavior:l}):a.scrollTo({top:c,behavior:l}),this.scrollDirty=!0,$e(this.computeRenderRangeAndEmit)}clampScrollTop(r){return Math.max(0,Math.min(r,this.getScrollHeight()-this.getHeight()))}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}},q(Pe,"__STOP",!1),q(Pe,"__lastScrollPosition",0),Pe);function Kt(f,r){const l=f.getBoundingClientRect(),a=r?.getBoundingClientRect().top??0;return l.top-a}var Eo=T('<div class="absolute inset-0 flex items-center justify-center rounded-lg bg-background/60 backdrop-blur-[2px] transition-opacity duration-spring-moderate ease-spring-moderate motion-reduce:transition-none z-10 pointer-events-none"><div class="flex items-center gap-2 rounded-lg border border-border bg-card px-3 py-2 text-xs font-medium text-subtle shadow-lg"><!> </div></div>'),Oo=T("<!> <!>",1),No=T('<div class="flex h-24 items-center justify-start text-left text-subtle"> </div>'),To=T('<div role="region"><!></div>');function Lr(f,r){if(new.target)return dn({component:Lr,...f});gn(r,!0);const l=()=>je(ve,"$sideBySide",a),[a,c]=On(),p=Nn()?.workspaceId??void 0;let b=y(r,"change",7),S=y(r,"foldUnchanged",7,!0),A=y(r,"allowHeadReads",7,!0),F=y(r,"canReadHeadFiles",7),G=y(r,"lineWrapping",7,!1),h=y(r,"scrollToLine",7),oe=y(r,"isAggregate",7,!1),Te=y(r,"showScrollHint",7,!1),ue=y(r,"onStageHunk",7),Q=y(r,"onUnstageHunk",7),at=y(r,"onOpenCommit",7),pt=y(r,"virtualizer",7),vt=y(r,"gitRootId",7,void 0),_t=y(r,"gitRootPath",7,void 0);const ve=kr();let Re=J(!1),Se=J(!1),Fe=J(!1),Ue=J(0),qe=J(void 0);const $=80;function ie(){m(Se,!0)}function De(){m(Se,!1),m(Fe,!1),m(Ue,0)}function Le(v){!e(Se)||e(Re)||(m(Ue,e(Ue)+Math.abs(v.deltaY)),e(Ue)>=$&&!e(Fe)&&m(Fe,!0))}function jt(){m(Re,!0),m(Fe,!1),m(Ue,0)}function qt(v){e(qe)&&!e(qe).contains(v.relatedTarget)&&m(Re,!1)}Be(()=>{(e(Re)||!e(Se))&&(m(Fe,!1),m(Ue,0))});let Lt=u(()=>{const{toolCallId:v,filePath:_e,additions:Qe,deletions:St,oldContent:re,newContent:Xe}=b(),rt="staged"in b()&&b().staged===!0,Ke="category"in b()?b().category:void 0,At="commitHash"in b()?b().commitHash:void 0,zt="gitlink"in b()?b().gitlink:void 0,Mt="isFullFileContent"in b()?b().isFullFileContent:!1;let Ct;return Ke==="committed"?Ct=an.Committed:rt?Ct=an.Staged:Ct=an.Unstaged,{id:v,file:_e,relativePath:_e,stage:Ct,commitHash:At,gitlink:zt,stats:{additions:Qe,deletions:St},attribution:{timestamp:0},content:re!==void 0||Xe!==void 0?{oldContent:re??"",newContent:Xe??"",isFullFileContent:Mt}:void 0}});const D=u(()=>b().isFullFileContent?1:("chunks"in b()?b().chunks?.[0]?.newStart:void 0)??b().startLineNumber??1);var Ht={get change(){return b()},set change(v){b(v),x()},get foldUnchanged(){return S()},set foldUnchanged(v=!0){S(v),x()},get allowHeadReads(){return A()},set allowHeadReads(v=!0){A(v),x()},get canReadHeadFiles(){return F()},set canReadHeadFiles(v){F(v),x()},get lineWrapping(){return G()},set lineWrapping(v=!1){G(v),x()},get scrollToLine(){return h()},set scrollToLine(v){h(v),x()},get isAggregate(){return oe()},set isAggregate(v=!1){oe(v),x()},get showScrollHint(){return Te()},set showScrollHint(v=!1){Te(v),x()},get onStageHunk(){return ue()},set onStageHunk(v){ue(v),x()},get onUnstageHunk(){return Q()},set onUnstageHunk(v){Q(v),x()},get onOpenCommit(){return at()},set onOpenCommit(v){at(v),x()},get virtualizer(){return pt()},set virtualizer(v){pt(v),x()},get gitRootId(){return vt()},set gitRootId(v=void 0){vt(v),x()},get gitRootPath(){return _t()},set gitRootPath(v=void 0){_t(v),x()},$set:un,$on:(v,_e)=>hn(r,v,_e)},He=To();let wt;var It=N(He);{var Ge=v=>{var _e=Oo(),Qe=ne(_e);{let Xe=u(()=>l()?"split":"unified");Pr(Qe,{get change(){return e(Lt)},get workspaceId(){return p},get viewMode(){return e(Xe)},get foldUnchanged(){return S()},get lineWrapping(){return G()},get onStageHunk(){return ue()},get onUnstageHunk(){return Q()},useProvidedContent:!0,get allowHeadReads(){return A()},get canReadHeadFiles(){return F()},get lineOffset(){return e(D)},get virtualizer(){return pt()},get gitRootId(){return vt()},get gitRootPath(){return _t()}})}var St=C(Qe,2);{var re=Xe=>{var rt=Eo(),Ke=N(rt),At=N(Ke);Ne(At,{get icon(){return ro},class:"w-3 h-3"});var zt=C(At);H(Ke),H(rt),z(Mt=>K(zt,` ${Mt??""}`),[()=>P.chat_inlineDiffItem_clickToScroll_label()]),cn(1,rt,()=>Ws,()=>({tier:"fast",y:0,scale:1})),cn(2,rt,()=>Bs,()=>({tier:"fast"})),w(Xe,rt)};M(St,Xe=>{Te()&&e(Fe)&&Xe(re)})}w(v,_e)},bt=v=>{var _e=No(),Qe=de(_e,!0);z(St=>K(Qe,St),[()=>P.chat_inlineDiffItem_noWorkspace_label()]),w(v,_e)};M(It,v=>{p?v(Ge):v(bt,-1)})}H(He),on(He,v=>m(qe,v),()=>e(qe)),z(v=>{wt=En(He,1,"inline-diff-container relative",null,wt,{focused:e(Re)}),Ve(He,"aria-label",v)},[()=>P.chat_inlineDiffItem_viewer_ariaLabel()]),sn("mouseenter",He,ie),sn("mouseleave",He,De),sn("wheel",He,Le),ln("focusin",He,jt),ln("focusout",He,qt),w(f,He);var mn=fn(Ht);return c(),mn}xr(["focusin","focusout"]);function Sr(f){return[f.stage,f.type,f.oldLineNumber??"",f.newLineNumber??"",f.content].join("\0")}function Do(f){let r=f.oldStart,l=f.newStart;return f.lines.map(a=>{const c={...a,oldLineNumber:a.oldLineNumber??a.oldNumber,newLineNumber:a.newLineNumber??a.newNumber};return c.oldLineNumber===void 0&&c.newLineNumber===void 0?a.type==="Context"?(c.oldLineNumber=r++,c.newLineNumber=l++):a.type==="Deletion"?c.oldLineNumber=r++:a.type==="Addition"&&(c.newLineNumber=l++):a.type==="Context"?(r=(c.oldLineNumber??r)+1,l=(c.newLineNumber??l)+1):a.type==="Deletion"?r=(c.oldLineNumber??r)+1:a.type==="Addition"&&(l=(c.newLineNumber??l)+1),c})}function zo(f,r){const l=f?f.split(`
2
2
  `):[],a=r?r.split(`
3
3
  `):[];if(l.length===0&&a.length===0)return[];const c=[];for(const p of l)c.push({type:"Deletion",content:p});for(const p of a)c.push({type:"Addition",content:p});return[{oldStart:1,oldLines:l.length,newStart:1,newLines:a.length,lines:c}]}function Mo(f){if(!f||f.length===0)return[];const r=[];for(const a of f){let c=a.change.chunks||[];c.length===0&&(a.change.oldContent!=null||a.change.newContent!=null)&&(c=zo(a.change.oldContent??"",a.change.newContent??"")),c.forEach((p,b)=>{r.push({hunk:p,stage:a.category,part:a,hunkIndex:b})})}if(r.length===0)return[];r.sort((a,c)=>a.hunk.newStart-c.hunk.newStart);const l=[];for(const{hunk:a,stage:c,hunkIndex:p}of r){const S=Do(a).map(A=>({type:A.type,content:A.content,oldLineNumber:A.oldLineNumber,newLineNumber:A.newLineNumber,stage:c,hunkIndex:p}));l.push({headStart:a.oldStart,headLines:a.oldLines,wtStart:a.newStart,wtLines:a.newLines,lines:S,stages:new Set([c])})}return $o(l)}function $o(f){if(f.length<=1)return f;const r=[];let l=f[0];for(let a=1;a<f.length;a++){const c=f[a],p=l.wtStart+l.wtLines;c.wtStart<=p+3?l=Fo(l,c):(r.push(l),l=c)}return r.push(l),r}function Fo(f,r){const l=new Map,a=new Map,c=new Set;for(const h of f.lines)c.add(Sr(h)),h.newLineNumber!==void 0&&l.set(h.newLineNumber,h),h.oldLineNumber!==void 0&&h.type!=="Addition"&&a.set(h.oldLineNumber,h);const p=[...f.lines];for(const h of r.lines){const oe=Sr(h);if(!c.has(oe)){if(h.type==="Context"){const Te=h.newLineNumber!==void 0?l.get(h.newLineNumber):void 0,ue=h.oldLineNumber!==void 0?a.get(h.oldLineNumber):void 0;if(Te?.type==="Context"||ue?.type==="Context"){c.add(oe);continue}}p.push(h),c.add(oe),h.newLineNumber!==void 0&&l.set(h.newLineNumber,h),h.oldLineNumber!==void 0&&h.type!=="Addition"&&a.set(h.oldLineNumber,h)}}p.sort((h,oe)=>{const Te=h.newLineNumber??h.oldLineNumber??0,ue=oe.newLineNumber??oe.oldLineNumber??0;return Te-ue});const b=new Set([...f.stages,...r.stages]),S=Math.min(f.headStart,r.headStart),A=Math.min(f.wtStart,r.wtStart),F=Math.max(f.headStart+f.headLines,r.headStart+r.headLines),G=Math.max(f.wtStart+f.wtLines,r.wtStart+r.wtLines);return{headStart:S,headLines:F-S,wtStart:A,wtLines:G-A,lines:p,stages:b}}function Uo(f){const r=[],l=[];let a=f[0]?.headStart??1,c=f[0]?.wtStart??1;const p=(b,S,A)=>{let F=S;for(;F<A;)b.push(""),F++;return F};for(const b of f){a=p(r,a,b.headStart),c=p(l,c,b.wtStart);for(const S of b.lines)S.type==="Context"?(S.oldLineNumber!==void 0&&(a=p(r,a,S.oldLineNumber)),S.newLineNumber!==void 0&&(c=p(l,c,S.newLineNumber)),r.push(S.content),l.push(S.content),a++,c++):S.type==="Deletion"?(S.oldLineNumber!==void 0&&(a=p(r,a,S.oldLineNumber)),r.push(S.content),a++):S.type==="Addition"&&(S.newLineNumber!==void 0&&(c=p(l,c,S.newLineNumber)),l.push(S.content),c++)}return{oldContent:r.join(`
4
4
  `),newContent:l.join(`
@@ -1 +1 @@
1
- import{a1 as h,Jy as w,rz as S}from"./Zldsekdv.js";import{cd as E}from"./CJxGDkBm.js";const f="intent://pair";function T(t){const e=t.trim().toLowerCase();if(!e.startsWith(f))return!1;const n=e.charAt(f.length);return n===""||n==="?"||n==="/"||n==="#"}function F(t){const e=t.trim();if(!T(e))return null;let n;try{n=new URL(e.replace(/^intent:\/\//i,"http://"))}catch{return null}const a=n.searchParams,c=(a.get("host")??"").split(",").map(d=>d.trim()).filter(d=>d.length>0),s=a.get("port")?.trim()??"",i=/^\d+$/.test(s)?Number(s):NaN,o=Number.isInteger(i)&&i>0&&i<=65535?i:null,u=(a.get("fp")??a.get("certFingerprint"))?.trim()||null,l=a.get("token")?.trim()||null,m=a.get("tc")?.trim()||null,k=a.get("mode")?.trim().toLowerCase()==="node"?"node":null;return{hosts:c,port:o,fingerprint:u,token:l,tcAddress:m,modeHint:k}}function H(t){return t.trim().replace(/([?&]token=)[^&#]*/gi,"$1••••")}const _=["agent:started","agent:completed","agent:failed","agent:idle","agent:status-changed","task:created","task:status-changed","workspace:displayStatus-changed","workspace:attention-changed","pr:linked","pr:updated","pr:unlinked","git:commit","git:pull"],L="agent:delegated";function r(t){return typeof t=="string"&&t.length>0?t:void 0}function N(t,e){if(t==="agent:failed")return"err";if(t==="agent:status-changed"){const n=r(e.status)??"";return n==="error"||n==="failed"?"err":n==="completed"?"ok":w(n)==="running"?"info":"idle"}if(t==="agent:idle")return"idle";if(t==="agent:completed")return"ok";if(t==="task:created")return"info";if(t==="task:status-changed")return r(e.newStatus)==="complete"?"ok":"info";if(t==="workspace:displayStatus-changed"){const n=r(e.displayStatus);return n==="pr_merged"||n==="complete"?"ok":n==="pr_ready"||n==="pr_queued"||n==="pr_open"?"accent":n==="needs_attention"?"warn":n==="idle"||n==="not_started"?"idle":"info"}return t==="workspace:attention-changed"?S(r(e.attention)??"")?"warn":"info":t.startsWith("pr:")?"accent":"info"}function I(t,e){switch(t){case"agent:started":case"agent:completed":case"agent:idle":return"";case"agent:failed":return r(e.error)??"";case"agent:status-changed":return"";case"task:created":return r(e.noteTitle)??r(e.noteId)??"";case"task:status-changed":return[r(e.noteTitle)??r(e.noteId),r(e.newStatus)].filter(Boolean).join(" → ");case"workspace:displayStatus-changed":return"";case"workspace:attention-changed":return r(e.attention)??"";case"pr:linked":case"pr:updated":return[typeof e.prNumber=="number"?`#${e.prNumber}`:void 0,r(e.prStatus)].filter(Boolean).join(" ");case"pr:unlinked":return"";case"git:commit":return r(e.message)??r(e.commit)??"";case"git:pull":return r(e.branch)??"";default:return""}}const b=new Set(["idle","inactive"]);function y(t,e){if(t!=="agent:status-changed")return!1;const n=(r(e.status)??"").toLowerCase();return b.has(n)}function A(t,e){return t==="workspace:attention-changed"&&r(e.attention)===h}function P(t){const e=typeof t.type=="string"?t.type:"";if(!_.includes(e))return null;const n=r(t.id),a=r(t.timestamp),c=r(t.workspaceId);if(!n||!a||!c)return null;const s=t.data&&typeof t.data=="object"?t.data:{};if(y(e,s)||A(e,s))return null;const i={id:n,ts:a,colorClass:N(e,s),source:c,kind:e,text:I(e,s)};if(e.startsWith("agent:")){const o=r(s.agentId),u=r(s.agentName);if(o&&(i.agentId=o),u&&(i.agentName=u),e==="agent:status-changed"){const l=r(s.status);l&&(i.agentStatus=l)}}if(e==="workspace:displayStatus-changed"){const o=r(s.displayStatus);o&&(i.displayStatus=o)}return i}const g=new Set;function C(t){return g.add(t),()=>g.delete(t)}function R(t){for(const e of g)e(t)}const p=E(null),x={subscribe:p.subscribe};function B(t){p.set(t)}export{L as H,_ as a,H as b,R as e,T as i,P as m,C as o,F as p,B as s,x as t};
1
+ import{a1 as h,Jy as w,rz as S}from"./CbRsc9i4.js";import{cd as E}from"./CJxGDkBm.js";const f="intent://pair";function T(t){const e=t.trim().toLowerCase();if(!e.startsWith(f))return!1;const n=e.charAt(f.length);return n===""||n==="?"||n==="/"||n==="#"}function F(t){const e=t.trim();if(!T(e))return null;let n;try{n=new URL(e.replace(/^intent:\/\//i,"http://"))}catch{return null}const a=n.searchParams,c=(a.get("host")??"").split(",").map(d=>d.trim()).filter(d=>d.length>0),s=a.get("port")?.trim()??"",i=/^\d+$/.test(s)?Number(s):NaN,o=Number.isInteger(i)&&i>0&&i<=65535?i:null,u=(a.get("fp")??a.get("certFingerprint"))?.trim()||null,l=a.get("token")?.trim()||null,m=a.get("tc")?.trim()||null,k=a.get("mode")?.trim().toLowerCase()==="node"?"node":null;return{hosts:c,port:o,fingerprint:u,token:l,tcAddress:m,modeHint:k}}function H(t){return t.trim().replace(/([?&]token=)[^&#]*/gi,"$1••••")}const _=["agent:started","agent:completed","agent:failed","agent:idle","agent:status-changed","task:created","task:status-changed","workspace:displayStatus-changed","workspace:attention-changed","pr:linked","pr:updated","pr:unlinked","git:commit","git:pull"],L="agent:delegated";function r(t){return typeof t=="string"&&t.length>0?t:void 0}function N(t,e){if(t==="agent:failed")return"err";if(t==="agent:status-changed"){const n=r(e.status)??"";return n==="error"||n==="failed"?"err":n==="completed"?"ok":w(n)==="running"?"info":"idle"}if(t==="agent:idle")return"idle";if(t==="agent:completed")return"ok";if(t==="task:created")return"info";if(t==="task:status-changed")return r(e.newStatus)==="complete"?"ok":"info";if(t==="workspace:displayStatus-changed"){const n=r(e.displayStatus);return n==="pr_merged"||n==="complete"?"ok":n==="pr_ready"||n==="pr_queued"||n==="pr_open"?"accent":n==="needs_attention"?"warn":n==="idle"||n==="not_started"?"idle":"info"}return t==="workspace:attention-changed"?S(r(e.attention)??"")?"warn":"info":t.startsWith("pr:")?"accent":"info"}function I(t,e){switch(t){case"agent:started":case"agent:completed":case"agent:idle":return"";case"agent:failed":return r(e.error)??"";case"agent:status-changed":return"";case"task:created":return r(e.noteTitle)??r(e.noteId)??"";case"task:status-changed":return[r(e.noteTitle)??r(e.noteId),r(e.newStatus)].filter(Boolean).join(" → ");case"workspace:displayStatus-changed":return"";case"workspace:attention-changed":return r(e.attention)??"";case"pr:linked":case"pr:updated":return[typeof e.prNumber=="number"?`#${e.prNumber}`:void 0,r(e.prStatus)].filter(Boolean).join(" ");case"pr:unlinked":return"";case"git:commit":return r(e.message)??r(e.commit)??"";case"git:pull":return r(e.branch)??"";default:return""}}const b=new Set(["idle","inactive"]);function y(t,e){if(t!=="agent:status-changed")return!1;const n=(r(e.status)??"").toLowerCase();return b.has(n)}function A(t,e){return t==="workspace:attention-changed"&&r(e.attention)===h}function P(t){const e=typeof t.type=="string"?t.type:"";if(!_.includes(e))return null;const n=r(t.id),a=r(t.timestamp),c=r(t.workspaceId);if(!n||!a||!c)return null;const s=t.data&&typeof t.data=="object"?t.data:{};if(y(e,s)||A(e,s))return null;const i={id:n,ts:a,colorClass:N(e,s),source:c,kind:e,text:I(e,s)};if(e.startsWith("agent:")){const o=r(s.agentId),u=r(s.agentName);if(o&&(i.agentId=o),u&&(i.agentName=u),e==="agent:status-changed"){const l=r(s.status);l&&(i.agentStatus=l)}}if(e==="workspace:displayStatus-changed"){const o=r(s.displayStatus);o&&(i.displayStatus=o)}return i}const g=new Set;function C(t){return g.add(t),()=>g.delete(t)}function R(t){for(const e of g)e(t)}const p=E(null),x={subscribe:p.subscribe};function B(t){p.set(t)}export{L as H,_ as a,H as b,R as e,T as i,P as m,C as o,F as p,B as s,x as t};
@@ -1 +1 @@
1
- import{$ as st}from"./XJqoy2ap.js";import{nL as ct,bl as ut}from"./Zldsekdv.js";import{g as dt}from"./CMiilI_P.js";import{t as ze,bo as g,bw as Ae,b as Ue,bm as u,br as mt}from"./51_h0jm2.js";import{ai as We,bs as Ee,ca as xe,aD as e,a7 as we,ay as te,W as y,bn as Te,bV as se,aA as v,a5 as pe,bS as E,bH as P,bA as ge,b_ as Y,aj as Ce,aw as Ne,bl as ye,bO as ne,aB as V,c9 as $,be as Me,b$ as Ie}from"./CJxGDkBm.js";import{i as q}from"./PXCFrn2V.js";import{k as ft}from"./C9UsZ4re.js";import{s as ke,e as qe,f as pt,g as gt}from"./CpPNoOk-.js";import{b as Se}from"./NtFyWdpR.js";import{c as me}from"./DGmOjLYi.js";import{q as He,l as Ge,d as Je,e as $e,K as Qe,h as et,M as tt}from"./M18r7swD.js";import{a as vt}from"./CC7to1B5.js";import{m as _e}from"./SX1khnGy.js";import{f as Le}from"./Cdw_CIdg.js";import"./CF1Tu_8c.js";import{l as Ke,f as nt,m as _t,a as ht}from"./DqFWZ_g1.js";import"./ChTqQfQN.js";import"./JKboQXkL.js";import"./DmhHEMPi.js";import{bL as Re}from"./B6jI9-V_.js";import{s as je}from"./DxvSggY5.js";import{F as Pe,d3 as bt,bW as wt,bX as yt,cq as xt,bF as kt,cr as Ct,aZ as Pt,a8 as Lt}from"./DSQT151l.js";import{S as Mt}from"./BgLPrJ77.js";import{n as It,g as $t}from"./BxwkoIbZ.js";import{e as De}from"./Bjy4ygfJ.js";import{i as zt,f as At}from"./BgDYQZ_0.js";import{P as Ut}from"./KAO5AtPr.js";import{h as Et}from"./D547g0l5.js";import{t as Tt}from"./DAsc1V4f.js";function Nt(i,t){return i?.isExternalLink===!0&&typeof i.workspaceId=="string"&&i.workspaceId?i.workspaceId:t||void 0}function St(i,t,o){const c=i.label||i.id||"mention";if(i.type==="member")return st(c);if(i.type==="note"&&i.id&&o){const s=Nt(i.meta,t),_=s?o(s,i.id)?.trim():void 0;if(_)return _}return c}function Bn(i,t,o){if(typeof document>"u"||!i.includes('data-type="note"'))return i;const c=document.createElement("template");c.innerHTML=i;let s=!1;for(const _ of c.content.querySelectorAll('[data-mention][data-type="note"]')){let h=null;try{h=JSON.parse(_.getAttribute("data-meta")||"{}")}catch{h=null}const I=_.textContent??"",C=St({type:"note",id:_.getAttribute("data-id"),label:I,meta:h},t,o);C!==I&&(_.textContent=C,s=!0)}return s?c.innerHTML:i}const jn=(i,t)=>{let o;try{o=dt().state}catch{return}const c=o?.workspaceNotes?.byWorkspaceId?.[i]?.notes;return c?ct(c,t)?.title:void 0};var Kt=V('<p class="mt-2 max-w-[90vw] rounded-md bg-black/60 px-3 py-1.5 text-center text-sm text-white"> </p>'),Rt=V('<div data-media-lightbox-root="" data-image-lightbox-root="" class="fixed inset-0 z-[1000] flex cursor-zoom-out flex-col items-center justify-center bg-black/80 p-4 backdrop-blur-sm" style="pointer-events: auto;" role="dialog" aria-modal="true" tabindex="-1"><div class="absolute right-4 top-4 z-[1002] flex items-center gap-1"><!> <!></div> <div class="flex min-h-0 w-full flex-1 items-center justify-center"><!></div> <!></div>');function Xe(i,t){if(new.target)return ze({component:Xe,...i});Ee(t,!0);let o=g(t,"open",15,!1),c=g(t,"ariaLabel",7),s=g(t,"closeLabel",7),_=g(t,"onClose",7),h=g(t,"openerElement",7,null),I=g(t,"children",7),C=g(t,"actions",7),T=g(t,"caption",7),w=g(t,"onKeydown",7),L=g(t,"onCopy",7);const S=zt(),d=At(b);let M=se(null),N=se(null);function b(){o()&&(o(!1),_()?.(),h()?.isConnected&&h().focus({preventScroll:!0}))}function O(n){(n.target instanceof Element?n.target:null)?.closest('[data-media-lightbox-content], [role="toolbar"], button, input')||b()}function K(n){if(w()?.(n),n.defaultPrevented||n.key!=="Tab"||!e(M))return;const r=Array.from(e(M).querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')),m=r[0],l=r[r.length-1];!m||!l||(n.shiftKey&&document.activeElement===m?(n.preventDefault(),l.focus()):!n.shiftKey&&document.activeElement===l&&(n.preventDefault(),m.focus()))}xe(()=>{if(o())return He(b)}),xe(()=>{!o()||!e(N)||requestAnimationFrame(()=>e(N)?.focus())});var ae={get open(){return o()},set open(n=!1){o(n),v()},get ariaLabel(){return c()},set ariaLabel(n){c(n),v()},get closeLabel(){return s()},set closeLabel(n){s(n),v()},get onClose(){return _()},set onClose(n){_(n),v()},get openerElement(){return h()},set openerElement(n=null){h(n),v()},get children(){return I()},set children(n){I(n),v()},get actions(){return C()},set actions(n){C(n),v()},get caption(){return T()},set caption(n){T(n),v()},get onKeydown(){return w()},set onKeydown(n){w(n),v()},get onCopy(){return L()},set onCopy(n){L(n),v()},$set:Ae,$on:(n,r)=>Ue(t,n,r)},B=we(),G=te(B);{var J=n=>{{let r=$(()=>S?.target()??"body");Ut(n,{get target(){return e(r)},zIndex:1e3,children:(m,l)=>{var f=Rt(),k=pe(f),z=pe(k);{var R=x=>{var re=we(),D=te(re);je(D,C),y(x,re)};q(z,x=>{C()&&x(R)})}var Q=E(z,2);Le(Q,{variant:"ghost",size:"icon",class:"text-white hover:bg-white/20 hover:text-white",onclick:b,get"aria-label"(){return s()},get ref(){return e(N)},set ref(x){P(N,x,!0)},children:(x,re)=>{Pe(x,{get icon(){return bt},size:"lg"})},$$slots:{default:!0}}),ge(k),De(k,x=>d?.(x));var j=E(k,2),F=pe(j);je(F,I),ge(j),De(j,x=>d?.(x));var W=E(j,2);{var ce=x=>{var re=Kt(),D=ye(re,!0);Y(()=>ne(D,T())),y(x,re)};q(W,x=>{T()&&x(ce)})}ge(f),Se(f,x=>P(M,x),()=>e(M)),Y(()=>ke(f,"aria-label",c())),Ce("click",f,O),Ce("keydown",f,K),Ne("copy",f,function(...x){L()?.apply(this,x)}),It(3,f,()=>$t,()=>({tier:"moderate"})),y(m,f)},$$slots:{default:!0}})}};q(G,n=>{o()&&n(J)})}return y(i,B),Te(ae)}We(["click","keydown"]);function Ye(i){if(!i.startsWith("workspace-file://"))return null;const o=i.slice(17).split(/[?#]/)[0].split("/"),c=o[0],s=o.slice(1);if(!c||s.length===0)return null;const _=[];for(const h of s){if(!h)return null;try{_.push(decodeURIComponent(h))}catch{return null}}return{workspaceId:c,path:_.join("/")}}function at(i){try{return new URL(i).protocol==="https:"}catch{return!1}}function Ze(i){const t=/^data:([^;,]+);base64,(.*)$/s.exec(i);return t?{mimeType:t[1],base64:t[2]}:null}function Ve(i){return at(i)||Ye(i)!==null||/^workspace-asset:\/\/[^/?#]+/.test(i)||/^data:image\/[a-z0-9.+-]+(?:;[^,]*)?,/i.test(i)}function rt(i){if(i.length===0)return 0;let t=0;return i.endsWith("==")?t=2:i.endsWith("=")&&(t=1),Math.floor(i.length*3/4)-t}function Ft(i,t){const o=atob(i),c=new Uint8Array(o.length);for(let s=0;s<o.length;s++)c[s]=o.charCodeAt(s);return new Blob([c],{type:t})}const Ot={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/avif":"avif","image/bmp":"bmp"};function Bt(i){if(i.workspacePath){const s=i.workspacePath.split("/").pop();if(s)return s}const t=(i.imageName||"image").replace(/[/\\]/g,"_");if(/\.[A-Za-z0-9]+$/.test(t))return t;const o=i.mimeType?.split(";")[0].trim().toLowerCase(),c=o&&Ot[o]||"png";return`${t}.${c}`}var jt=V('<div class="type-caption px-2 py-1 text-muted-foreground" data-testid="image-info-dimensions"> </div>'),Dt=V('<div class="type-caption px-2 py-1 text-muted-foreground" data-testid="image-info-size"> </div>'),Zt=V("<!> <!> <!>",1),Vt=V("<!> <!> <!> <!>",1),Wt=V("<!> <!>",1);function ot(i,t){if(new.target)return ze({component:ot,...i});Ee(t,!0);let o=g(t,"imageUrl",7),c=g(t,"imageName",7),s=g(t,"open",15,!1),_=g(t,"triggerClass",7),h=g(t,"contentClass",7);const I=$(()=>Ze(o())),C=$(()=>Ye(o())),T=$(()=>at(o()));let w=se(null),L=se(null),S=null;function d(){if(S===o())return;const l=S=o();P(w,null),P(L,e(I)?rt(e(I).base64):null,!0);const f=new Image;f.onload=()=>{S===l&&P(w,{width:f.naturalWidth,height:f.naturalHeight},!0)},f.src=o(),e(I)||fetch(o()).then(k=>k.ok?k.blob():null).then(k=>{k&&S===l&&P(L,k.size,!0)}).catch(()=>{})}xe(()=>{s()&&d()}),xe(()=>{if(s())return He(()=>{s(!1)})});async function M(l=o()){const f=Ze(l);if(f)return Ft(f.base64,f.mimeType);const k=await fetch(l);if(!k.ok)throw new Error(`Image fetch failed: ${k.status}`);return await k.blob()}async function N(){let l=null;try{let f=o(),k=e(I)?.mimeType;if(!e(I)){const R=await M();k=R.type,l=URL.createObjectURL(R),f=l}const z=document.createElement("a");z.href=f,z.download=Bt({workspacePath:e(C)?.path,imageName:c(),mimeType:k}),document.body.appendChild(z);try{z.click()}finally{z.remove()}}catch{_e.error(u.ui_imageActionsMenu_downloadFailed_error())}finally{l&&URL.revokeObjectURL(l)}}async function b(){if(e(C))try{await Re(e(C).path),_e.success(u.ui_imageActionsMenu_pathCopied_label())}catch{_e.error(u.ui_imageActionsMenu_copyFailed_error())}}async function O(){if(e(T))try{await Re(o()),_e.success(u.ui_imageActionsMenu_linkCopied_label())}catch{_e.error(u.ui_imageActionsMenu_copyFailed_error())}}async function K(l){let f,k;try{let z;if(l.type.split(";")[0].trim()==="image/svg+xml"){k=URL.createObjectURL(l);const j=new Image;j.src=k,await j.decode(),z=j}else z=f=await createImageBitmap(l);const R=document.createElement("canvas");R.width=z instanceof HTMLImageElement?z.naturalWidth:z.width,R.height=z instanceof HTMLImageElement?z.naturalHeight:z.height;const Q=R.getContext("2d");if(!Q)throw new Error("2d canvas context unavailable");return Q.drawImage(z,0,0),await new Promise((j,F)=>{R.toBlob(W=>W?j(W):F(new Error("canvas toBlob failed")),"image/png")})}finally{f?.close(),k&&URL.revokeObjectURL(k)}}async function ae(l=o()){try{let f=await M(l);f.type!=="image/png"&&(f=await K(f)),await navigator.clipboard.write([new ClipboardItem({"image/png":f})]),_e.success(u.ui_imageActionsMenu_imageCopied_label())}catch{_e.error(u.ui_imageActionsMenu_copyFailed_error())}}function B(l,f=o()){return l.defaultPrevented||!Ve(f)||l instanceof KeyboardEvent&&(l.key.toLowerCase()!=="c"||!(l.metaKey||l.ctrlKey)||l.altKey||l.shiftKey||l.isComposing)||vt(l.target)||document.getSelection()?.toString()?!1:(l.preventDefault(),l.stopPropagation(),l instanceof KeyboardEvent&&l.repeat||(ae(f),s(!1)),!0)}var G={handleCopy:B,get imageUrl(){return o()},set imageUrl(l){o(l),v()},get imageName(){return c()},set imageName(l){c(l),v()},get open(){return s()},set open(l=!1){s(l),v()},get triggerClass(){return _()},set triggerClass(l){_(l),v()},get contentClass(){return h()},set contentClass(l){h(l),v()},$set:Ae,$on:(l,f)=>Ue(t,l,f)},J=we(),n=te(J);{var r=l=>{var f=we(),k=te(f);me(k,()=>tt,(z,R)=>{R(z,{get open(){return s()},set open(Q){s(Q)},children:(Q,j)=>{var F=Wt(),W=te(F);{const x=(D,he)=>{let oe=()=>(he?.()).props;{let Z=$(()=>u.ui_imageActionsMenu_trigger_ariaLabel());Le(D,mt(oe,{variant:"plain",size:"icon-sm",wrapContent:!1,get active(){return s()},get"aria-label"(){return e(Z)},children:(ie,fe)=>{Qe(ie,{class:"size-3.5"})},$$slots:{default:!0}}))}};let re=$(()=>qe("flex h-7 w-7 items-center justify-center rounded-md bg-black/60 text-white","hover:bg-black/75",_()));me(W,()=>Ge,(D,he)=>{he(D,{get class(){return e(re)},onclick:oe=>oe.stopPropagation(),onkeydown:oe=>B(oe),oncopy:oe=>B(oe),child:x,$$slots:{child:!0}})})}var ce=E(W,2);me(ce,()=>Je,(x,re)=>{re(x,{get class(){return h()},align:"end",onkeydown:D=>B(D),oncopy:D=>B(D),children:(D,he)=>{var oe=Vt(),Z=te(oe);me(Z,()=>$e,(A,X)=>{X(A,{onSelect:()=>void N(),children:(U,ee)=>{Me();var le=Ie();Y(ue=>ne(le,ue),[()=>u.ui_imageActionsMenu_download_label()]),y(U,le)},$$slots:{default:!0}})});var ie=E(Z,2);me(ie,()=>$e,(A,X)=>{X(A,{onSelect:()=>void ae(),children:(U,ee)=>{Me();var le=Ie();Y(ue=>ne(le,ue),[()=>u.ui_imageActionsMenu_copyImage_label()]),y(U,le)},$$slots:{default:!0}})});var fe=E(ie,2);{var a=A=>{var X=we(),U=te(X);me(U,()=>$e,(ee,le)=>{le(ee,{onSelect:()=>void b(),children:(ue,Fe)=>{Me();var de=Ie();Y(be=>ne(de,be),[()=>u.ui_imageActionsMenu_copyPath_label()]),y(ue,de)},$$slots:{default:!0}})}),y(A,X)},p=A=>{var X=we(),U=te(X);me(U,()=>$e,(ee,le)=>{le(ee,{onSelect:()=>void O(),children:(ue,Fe)=>{Me();var de=Ie();Y(be=>ne(de,be),[()=>u.ui_imageActionsMenu_copyLink_label()]),y(ue,de)},$$slots:{default:!0}})}),y(A,X)};q(fe,A=>{e(C)?A(a):e(T)&&A(p,1)})}var H=E(fe,2);{var ve=A=>{var X=Zt(),U=te(X);me(U,()=>et,(de,be)=>{be(de,{})});var ee=E(U,2);{var le=de=>{var be=jt(),Oe=ye(be,!0);Y(Be=>ne(Oe,Be),[()=>u.ui_imageActionsMenu_dimensions_label({width:Ke(e(w).width),height:Ke(e(w).height)})]),y(de,be)};q(ee,de=>{e(w)&&de(le)})}var ue=E(ee,2);{var Fe=de=>{var be=Dt(),Oe=ye(be,!0);Y(Be=>ne(Oe,Be),[()=>nt(e(L))]),y(de,be)};q(ue,de=>{e(L)!==null&&de(Fe)})}y(A,X)};q(H,A=>{(e(w)||e(L)!==null)&&A(ve)})}y(D,oe)},$$slots:{default:!0}})}),y(Q,F)},$$slots:{default:!0}})}),y(l,f)},m=$(()=>Ve(o()));q(n,l=>{e(m)&&l(r)})}return y(i,J),Te(G)}var Ht=V('<div role="application" tabindex="0" data-testid="zoom-pan-viewport"><div class="flex h-full w-full items-center justify-center will-change-transform" data-testid="zoom-pan-content"><!></div> <div class="absolute bottom-4 left-1/2 z-10 flex -translate-x-1/2 cursor-default items-center gap-2 rounded-full bg-black/60 px-3 py-1.5 backdrop-blur-sm" role="toolbar" tabindex="-1" data-testid="zoom-pan-controls"><!> <div class="w-36"><!></div> <!> <span class="min-w-12 text-center text-xs tabular-nums text-white/90" data-testid="zoom-pan-percent"> </span> <!></div></div>');function it(i,t){if(new.target)return ze({component:it,...i});Ee(t,!0);let o=g(t,"children",7),c=g(t,"minZoom",7,.25),s=g(t,"maxZoom",7,8),_=g(t,"onScaleChange",7);const h=1.25,I=.0015,C=.01,T=4;let w=se(1),L=se(0),S=se(0),d=se(!1),M=se(null);xe(()=>{_()?.(e(w))});let N=null,b=0,O=0,K=0,ae=!1;const B=$(()=>_t(e(w),{style:"percent",maximumFractionDigits:0}));function G(a){return Math.min(s(),Math.max(c(),a))}function J(a,p,H){const ve=G(H),A=e(M)?.getBoundingClientRect(),X=A?a-A.left:0,U=A?p-A.top:0;P(L,X-(X-e(L))/e(w)*ve),P(S,U-(U-e(S))/e(w)*ve),P(w,ve,!0)}function n(a){const p=e(M)?.getBoundingClientRect();p?J(p.left+p.width/2,p.top+p.height/2,a):P(w,G(a),!0)}function r(){P(w,1),P(L,0),P(S,0)}function m(a){a.preventDefault();const p=a.ctrlKey?C:I;J(a.clientX,a.clientY,e(w)*Math.exp(-a.deltaY*p))}xe(()=>{const a=e(M);if(a)return a.addEventListener("wheel",m,{passive:!1}),()=>a.removeEventListener("wheel",m)});function l(a){if(a.metaKey||a.ctrlKey||a.altKey)return!1;if(a.key==="+"||a.key==="=")n(e(w)*h);else if(a.key==="-")n(e(w)/h);else if(a.key==="0")r();else return!1;return a.preventDefault(),!0}function f(a){if(a.button>0)return;P(d,!0),N=a.pointerId,b=a.clientX,O=a.clientY,K=0;const p=a.currentTarget;typeof p.setPointerCapture=="function"&&p.setPointerCapture(a.pointerId)}function k(a){if(!e(d)||a.pointerId!==N)return;const p=a.clientX-b,H=a.clientY-O;K+=Math.abs(p)+Math.abs(H),P(L,e(L)+p),P(S,e(S)+H),b=a.clientX,O=a.clientY}function z(a){if(!e(d)||a.pointerId!==N)return;P(d,!1),N=null,K>T&&(ae=!0);const p=a.currentTarget;typeof p.hasPointerCapture=="function"&&typeof p.releasePointerCapture=="function"&&p.hasPointerCapture(a.pointerId)&&p.releasePointerCapture(a.pointerId)}function R(a){ae&&(ae=!1,a.preventDefault(),a.stopPropagation())}function Q(a){const p=Number.parseFloat(a.currentTarget.value);Number.isFinite(p)&&n(p)}var j={handleKeydown:l,get children(){return o()},set children(a){o(a),v()},get minZoom(){return c()},set minZoom(a=.25){c(a),v()},get maxZoom(){return s()},set maxZoom(a=8){s(a),v()},get onScaleChange(){return _()},set onScaleChange(a){_(a),v()},$set:Ae,$on:(a,p)=>Ue(t,a,p)},F=Ht(),W=pe(F),ce=pe(W);je(ce,o),ge(W);var x=E(W,2),re=pe(x);{let a=$(()=>u.ui_zoomPanViewport_zoomOut_ariaLabel()),p=$(()=>u.ui_zoomPanViewport_zoomOut_ariaLabel());Le(re,{variant:"ghost",size:"icon-sm",class:"text-white hover:bg-white/20 hover:text-white",onclick:()=>n(e(w)/h),get"aria-label"(){return e(a)},get title(){return e(p)},children:(H,ve)=>{Pe(H,{get icon(){return wt}})},$$slots:{default:!0}})}var D=E(re,2),he=pe(D);{let a=$(()=>u.ui_zoomPanViewport_zoomSlider_ariaLabel()),p=$(()=>u.ui_zoomPanViewport_zoomSlider_ariaLabel());Mt(he,{class:"accent-white",get min(){return c()},get max(){return s()},step:"0.01",get value(){return e(w)},oninput:Q,get"aria-label"(){return e(a)},get title(){return e(p)},"data-testid":"zoom-pan-slider"})}ge(D);var oe=E(D,2);{let a=$(()=>u.ui_zoomPanViewport_zoomIn_ariaLabel()),p=$(()=>u.ui_zoomPanViewport_zoomIn_ariaLabel());Le(oe,{variant:"ghost",size:"icon-sm",class:"text-white hover:bg-white/20 hover:text-white",onclick:()=>n(e(w)*h),get"aria-label"(){return e(a)},get title(){return e(p)},children:(H,ve)=>{Pe(H,{get icon(){return yt}})},$$slots:{default:!0}})}var Z=E(oe,2),ie=ye(Z,!0),fe=E(Z,2);{let a=$(()=>u.ui_zoomPanViewport_resetZoom_ariaLabel()),p=$(()=>u.ui_zoomPanViewport_resetZoom_ariaLabel());Le(fe,{variant:"ghost",size:"icon-sm",class:"text-white hover:bg-white/20 hover:text-white",onclick:r,get"aria-label"(){return e(a)},get title(){return e(p)},children:(H,ve)=>{Pe(H,{get icon(){return xt}})},$$slots:{default:!0}})}return ge(x),ge(F),Se(F,a=>P(M,a),()=>e(M)),Y((a,p)=>{pt(F,1,`relative h-full w-full touch-none select-none overflow-hidden ${e(d)?"cursor-grabbing":"cursor-grab"}`),ke(F,"aria-label",a),gt(W,`transform: translate(${e(L)??""}px, ${e(S)??""}px) scale(${e(w)??""}); transform-origin: 0 0;`),ke(x,"aria-label",p),ne(ie,e(B))},[()=>u.ui_zoomPanViewport_viewport_ariaLabel(),()=>u.ui_zoomPanViewport_controls_ariaLabel()]),Ce("pointerdown",F,f),Ce("pointermove",F,k),Ce("pointerup",F,z),Ne("pointercancel",F,z),Ne("click",F,R,!0),Ce("keydown",F,l),Ce("pointerdown",x,a=>a.stopPropagation()),y(i,F),Te(j)}We(["pointerdown","pointermove","pointerup","keydown"]);var Xt=V('<img class="max-h-[90vh] max-w-[90vw] rounded-lg object-contain" draggable="false" data-media-lightbox-content=""/>');function Yt(i,t){if(new.target)return ze({component:Yt,...i});Ee(t,!0);const o=b=>{var O=we(),K=te(O);{var ae=B=>{Se(ot(B,{get imageUrl(){return s()},get imageName(){return _()},triggerClass:"h-9 w-9 bg-white/0 hover:bg-white/20",contentClass:"z-[1003]",get open(){return e(L)},set open(G){P(L,G,!0)}}),G=>P(w,G,!0),()=>e(w))};q(K,B=>{C()&&B(ae)})}y(b,O)};let c=g(t,"open",15,!1),s=g(t,"imageUrl",7),_=g(t,"imageName",23,()=>u.ui_imageLightbox_image_alt()),h=g(t,"onClose",7),I=g(t,"openerElement",7,null),C=g(t,"showActionsMenu",7,!1),T=se(void 0),w=se(void 0),L=se(!1);xe(()=>{c()||P(L,!1)});function S(b){d(b),b.defaultPrevented||e(T)?.handleKeydown(b)}function d(b){c()&&C()&&e(w)?.handleCopy(b)}function M(b){!C()||!Ve(s())||(b.preventDefault(),b.stopPropagation(),P(L,!0))}var N={get open(){return c()},set open(b=!1){c(b),v()},get imageUrl(){return s()},set imageUrl(b){s(b),v()},get imageName(){return _()},set imageName(b=u.ui_imageLightbox_image_alt()){_(b),v()},get onClose(){return h()},set onClose(b){h(b),v()},get openerElement(){return I()},set openerElement(b=null){I(b),v()},get showActionsMenu(){return C()},set showActionsMenu(b=!1){C(b),v()},$set:Ae,$on:(b,O)=>Ue(t,b,O)};{let b=$(()=>u.ui_imageLightbox_preview_ariaLabel()),O=$(()=>u.ui_imageLightbox_close_ariaLabel());Xe(i,{get ariaLabel(){return e(b)},get closeLabel(){return e(O)},get onClose(){return h()},get openerElement(){return I()},get actions(){return o},onKeydown:S,onCopy:d,get open(){return c()},set open(K){c(K)},children:(K,ae)=>{var B=we(),G=te(B);ft(G,s,J=>{Se(it(J,{children:(n,r)=>{var m=Xt();Y(()=>{ke(m,"src",s()),ke(m,"alt",_())}),Ce("contextmenu",m,M),y(n,m)},$$slots:{default:!0}}),n=>P(T,n,!0),()=>e(T))}),y(K,B)},$$slots:{default:!0}})}return Te(N)}We(["contextmenu"]);var qt=V('<div class="type-caption px-2 py-1 text-muted-foreground" data-testid="video-info-duration"> </div>'),Gt=V('<div class="type-caption px-2 py-1 text-muted-foreground" data-testid="video-info-dimensions"> </div>'),Jt=V('<div class="type-caption px-2 py-1 text-muted-foreground" data-testid="video-info-size"> </div>'),Qt=V("<!> <!> <!> <!>",1),en=V("<!> <!> <!>",1),tn=V("<!> <!>",1);function lt(i,t){if(new.target)return ze({component:lt,...i});Ee(t,!0);let o=g(t,"videoUrl",7),c=g(t,"videoName",7),s=g(t,"sourceKind",7),_=g(t,"mimeType",7),h=g(t,"open",15,!1),I=g(t,"triggerClass",7),C=g(t,"contentClass",7);const T=$(()=>Ze(o())),w=$(()=>Ye(o())),L=$(()=>s()??(e(T)?"inline":e(w)?"workspace":"remote"));let S=se(null),d=se(null),M=se(null),N=null;function b(){if(N===o())return;const n=N=o();P(S,null),P(d,null),P(M,e(T)?rt(e(T).base64):null,!0);const r=document.createElement("video");r.preload="metadata",r.onloadedmetadata=()=>{N===n&&(Number.isFinite(r.duration)&&r.duration>0&&P(S,r.duration,!0),r.videoWidth>0&&r.videoHeight>0&&P(d,{width:r.videoWidth,height:r.videoHeight},!0))},r.src=o(),e(T)||fetch(o()).then(m=>m.ok?m.blob():null).then(m=>{m&&N===n&&P(M,m.size,!0)}).catch(()=>{})}function O(){const n=e(w)?.path.split("/").pop();if(n)return n;const r=(c()||"video").replace(/[/\\]/g,"_");if(/\.[A-Za-z0-9]+$/.test(r))return r;const m=(_()??e(T)?.mimeType)==="video/webm"?"webm":"mp4";return`${r}.${m}`}async function K(){let n=null;try{let r=o();if(!e(T)){const l=await fetch(o());if(!l.ok)throw new Error(`Video fetch failed: ${l.status}`);n=URL.createObjectURL(await l.blob()),r=n}const m=document.createElement("a");m.href=r,m.download=O(),document.body.appendChild(m),m.click(),m.remove(),n&&URL.revokeObjectURL(n)}catch{n&&URL.revokeObjectURL(n),_e.error(u.ui_videoActionsMenu_downloadFailed_error())}}async function ae(n,r){try{await Re(n),_e.success(r)}catch{_e.error(u.ui_videoActionsMenu_copyFailed_error())}}xe(()=>{h()&&b()}),xe(()=>{if(h())return He(()=>{h(!1)})});var B={get videoUrl(){return o()},set videoUrl(n){o(n),v()},get videoName(){return c()},set videoName(n){c(n),v()},get sourceKind(){return s()},set sourceKind(n){s(n),v()},get mimeType(){return _()},set mimeType(n){_(n),v()},get open(){return h()},set open(n=!1){h(n),v()},get triggerClass(){return I()},set triggerClass(n){I(n),v()},get contentClass(){return C()},set contentClass(n){C(n),v()},$set:Ae,$on:(n,r)=>Ue(t,n,r)},G=we(),J=te(G);return me(J,()=>tt,(n,r)=>{r(n,{get open(){return h()},set open(m){h(m)},children:(m,l)=>{var f=tn(),k=te(f);{let R=$(()=>qe("flex h-7 w-7 items-center justify-center rounded-md bg-black/60 text-white","hover:bg-black/75",I())),Q=$(()=>u.ui_videoActionsMenu_trigger_ariaLabel());me(k,()=>Ge,(j,F)=>{F(j,{get class(){return e(R)},get"aria-label"(){return e(Q)},onclick:W=>W.stopPropagation(),children:(W,ce)=>{Qe(W,{class:"size-3.5"})},$$slots:{default:!0}})})}var z=E(k,2);me(z,()=>Je,(R,Q)=>{Q(R,{get class(){return C()},align:"end",children:(j,F)=>{var W=en(),ce=te(W);me(ce,()=>$e,(Z,ie)=>{ie(Z,{onSelect:()=>void K(),children:(fe,a)=>{Me();var p=Ie();Y(H=>ne(p,H),[()=>u.ui_videoActionsMenu_download_label()]),y(fe,p)},$$slots:{default:!0}})});var x=E(ce,2);{var re=Z=>{var ie=we(),fe=te(ie);me(fe,()=>$e,(a,p)=>{p(a,{onSelect:()=>void ae(e(w).path,u.ui_videoActionsMenu_pathCopied_label()),children:(H,ve)=>{Me();var A=Ie();Y(X=>ne(A,X),[()=>u.ui_videoActionsMenu_copyPath_label()]),y(H,A)},$$slots:{default:!0}})}),y(Z,ie)},D=Z=>{var ie=we(),fe=te(ie);me(fe,()=>$e,(a,p)=>{p(a,{onSelect:()=>void ae(o(),u.ui_videoActionsMenu_linkCopied_label()),children:(H,ve)=>{Me();var A=Ie();Y(X=>ne(A,X),[()=>u.ui_videoActionsMenu_copyLink_label()]),y(H,A)},$$slots:{default:!0}})}),y(Z,ie)};q(x,Z=>{e(L)==="workspace"&&e(w)?Z(re):e(L)==="remote"&&Z(D,1)})}var he=E(x,2);{var oe=Z=>{var ie=Qt(),fe=te(ie);me(fe,()=>et,(U,ee)=>{ee(U,{})});var a=E(fe,2);{var p=U=>{var ee=qt(),le=ye(ee,!0);Y(ue=>ne(le,ue),[()=>u.ui_videoActionsMenu_duration_label({duration:ht(e(S)*1e3)})]),y(U,ee)};q(a,U=>{e(S)!==null&&U(p)})}var H=E(a,2);{var ve=U=>{var ee=Gt(),le=ye(ee,!0);Y(ue=>ne(le,ue),[()=>u.ui_videoActionsMenu_dimensions_label({width:Ke(e(d).width),height:Ke(e(d).height)})]),y(U,ee)};q(H,U=>{e(d)&&U(ve)})}var A=E(H,2);{var X=U=>{var ee=Jt(),le=ye(ee,!0);Y(ue=>ne(le,ue),[()=>nt(e(M))]),y(U,ee)};q(A,U=>{e(M)!==null&&U(X)})}y(Z,ie)};q(he,Z=>{(e(S)!==null||e(d)||e(M)!==null)&&Z(oe)})}y(j,W)},$$slots:{default:!0}})}),y(m,f)},$$slots:{default:!0}})}),y(i,G),Te(B)}var nn=V('<p class="type-body text-white/80" role="status"> </p>'),an=V('<div data-media-lightbox-content="" data-video-lightbox-root="" class="flex max-h-[90vh] max-w-[90vw] cursor-default flex-col items-center gap-3"><video controls="" preload="metadata" playsinline="" class="max-h-[85vh] max-w-[90vw] rounded-lg bg-black object-contain shadow-(--elevation-overlay)" data-testid="chat-video-player"> </video> <!></div>',2);function rn(i,t){if(new.target)return ze({component:rn,...i});Ee(t,!0);const o=d=>{lt(d,{get videoUrl(){return s()},get videoName(){return _()},get sourceKind(){return I()},get mimeType(){return C()},triggerClass:"h-9 w-9 bg-white/0 hover:bg-white/20",contentClass:"z-[1003]"})};let c=g(t,"open",15,!1),s=g(t,"videoUrl",7),_=g(t,"videoName",23,()=>u.chat_videoBlock_fromAgent_label()),h=g(t,"poster",7),I=g(t,"sourceKind",7),C=g(t,"mimeType",7),T=g(t,"openerElement",7,null),w=g(t,"onClose",7),L=se(!1);xe(()=>{!c()||!s()||P(L,!1)});var S={get open(){return c()},set open(d=!1){c(d),v()},get videoUrl(){return s()},set videoUrl(d){s(d),v()},get videoName(){return _()},set videoName(d=u.chat_videoBlock_fromAgent_label()){_(d),v()},get poster(){return h()},set poster(d){h(d),v()},get sourceKind(){return I()},set sourceKind(d){I(d),v()},get mimeType(){return C()},set mimeType(d){C(d),v()},get openerElement(){return T()},set openerElement(d=null){T(d),v()},get onClose(){return w()},set onClose(d){w(d),v()},$set:Ae,$on:(d,M)=>Ue(t,d,M)};{let d=$(()=>u.chat_videoBlock_dialog_title({name:_()})),M=$(()=>u.chat_videoBlock_close_ariaLabel());Xe(i,{get ariaLabel(){return e(d)},get closeLabel(){return e(M)},get openerElement(){return T()},get onClose(){return w()},get actions(){return o},get open(){return c()},set open(N){c(N)},children:(N,b)=>{var O=an(),K=pe(O),ae=ye(K,!0),B=E(K,2);{var G=J=>{var n=nn(),r=ye(n,!0);Y(m=>ne(r,m),[()=>u.chat_videoBlock_unavailable_description()]),y(J,n)};q(B,J=>{e(L)&&J(G)})}ge(O),Y(J=>{ke(K,"src",s()),ke(K,"poster",h()),ke(K,"aria-label",_()),ne(ae,J)},[()=>u.chat_videoBlock_unsupported_description()]),Ne("error",K,()=>P(L,!0)),y(N,O)},$$slots:{default:!0}})}return Te(S)}var on=V('<span class="block truncate text-foreground"> </span>'),ln=V("<!> ",1),sn=V("<!> <!>",1),cn=V('<span class="flex shrink-0 flex-wrap items-center gap-1"><!> <!></span>'),un=V('<div class="type-caption flex w-fit min-w-0 max-w-full items-center gap-3 whitespace-normal py-1 text-muted-foreground" role="status" data-testid="media-unavailable"><span class="flex min-w-0 max-w-full flex-1 items-start gap-2"><span class="first-line-icon" aria-hidden="true"><!></span> <span class="min-w-0"><!> <span class="block break-words"> </span></span></span> <!></div>');function dn(i,t){if(new.target)return ze({component:dn,...i});Ee(t,!0);let o=g(t,"name",7),c=g(t,"reason",7),s=g(t,"path",7),_=g(t,"workspaceId",7),h=g(t,"onRetry",7);const I=$(()=>c()==="missing"?u.ui_mediaUnavailable_missing_description():c()==="unsupported"?u.ui_mediaUnavailable_unsupported_description():c()==="other-workspace"?u.ui_mediaUnavailable_otherWorkspace_description():c()==="invalid-link"?u.ui_mediaUnavailable_invalidLink_description():u.ui_mediaUnavailable_loadFailed_description());function C(r){r.preventDefault(),r.stopPropagation()}function T(r){C(r),h()?.()}async function w(r){if(C(r),!!s())try{await Re(s()),_e.success(u.ui_imageActionsMenu_pathCopied_label())}catch{_e.error(u.ui_imageActionsMenu_copyFailed_error())}}function L(r){if(C(r),!s()||!_())return;const m=s().split("/").map(encodeURIComponent).join("/");Et(`intent://local/file/${m}`,{workspaceId:ut(_())})}var S={get name(){return o()},set name(r){o(r),v()},get reason(){return c()},set reason(r){c(r),v()},get path(){return s()},set path(r){s(r),v()},get workspaceId(){return _()},set workspaceId(r){_(r),v()},get onRetry(){return h()},set onRetry(r){h(r),v()},$set:Ae,$on:(r,m)=>Ue(t,r,m)},d=un(),M=pe(d),N=pe(M),b=pe(N);Pe(b,{get icon(){return kt},class:"size-3.5"}),ge(N);var O=E(N,2),K=pe(O);{var ae=r=>{var m=on(),l=ye(m,!0);De(m,(f,k)=>Tt?.(f,k),o),Y(()=>ne(l,o())),y(r,m)};q(K,r=>{o()&&r(ae)})}var B=E(K,2),G=ye(B,!0);ge(O),ge(M);var J=E(M,2);{var n=r=>{var m=cn(),l=pe(m);{var f=R=>{{let Q=$(()=>u.chat_shared_retry_label());Le(R,{variant:"ghost",size:"icon-compact",get tooltip(){return e(Q)},onclick:T,children:(j,F)=>{Pe(j,{get icon(){return Ct},size:"xs"})},$$slots:{default:!0}})}};q(l,R=>{h()&&R(f)})}var k=E(l,2);{var z=R=>{var Q=sn(),j=te(Q);{var F=ce=>{Le(ce,{variant:"ghost",size:"compact",onclick:L,children:(x,re)=>{var D=ln(),he=te(D);Pe(he,{get icon(){return Lt},size:"xs"});var oe=E(he);Y(Z=>ne(oe,` ${Z??""}`),[()=>u.chat_changesPanel_openFile_tooltip()]),y(x,D)},$$slots:{default:!0}})};q(j,ce=>{_()&&c()!=="other-workspace"&&c()!=="invalid-link"&&ce(F)})}var W=E(j,2);{let ce=$(()=>u.ui_imageActionsMenu_copyPath_label());Le(W,{variant:"ghost",size:"icon-compact",get tooltip(){return e(ce)},onclick:w,children:(x,re)=>{Pe(x,{get icon(){return Pt},size:"xs"})},$$slots:{default:!0}})}y(R,Q)};q(k,R=>{s()&&R(z)})}ge(m),y(r,m)};q(J,r=>{(h()||s())&&r(n)})}return ge(d),Y(()=>{ke(d,"data-reason",c()),ne(G,e(I))}),y(i,d),Te(S)}export{ot as I,Xe as M,lt as V,it as Z,Yt as a,dn as b,rn as c,rt as d,Ft as e,Ve as f,St as m,Ye as p,Bn as r,jn as s};
1
+ import{$ as st}from"./CgwFGLCK.js";import{nL as ct,bl as ut}from"./CbRsc9i4.js";import{g as dt}from"./CMiilI_P.js";import{t as ze,bo as g,bw as Ae,b as Ue,bm as u,br as mt}from"./51_h0jm2.js";import{ai as We,bs as Ee,ca as xe,aD as e,a7 as we,ay as te,W as y,bn as Te,bV as se,aA as v,a5 as pe,bS as E,bH as P,bA as ge,b_ as Y,aj as Ce,aw as Ne,bl as ye,bO as ne,aB as V,c9 as $,be as Me,b$ as Ie}from"./CJxGDkBm.js";import{i as q}from"./PXCFrn2V.js";import{k as ft}from"./C9UsZ4re.js";import{s as ke,e as qe,f as pt,g as gt}from"./CpPNoOk-.js";import{b as Se}from"./NtFyWdpR.js";import{c as me}from"./DGmOjLYi.js";import{q as He,l as Ge,d as Je,e as $e,K as Qe,h as et,M as tt}from"./DvrEye74.js";import{a as vt}from"./CC7to1B5.js";import{m as _e}from"./BAymCgEX.js";import{f as Le}from"./CdOh_Fmv.js";import"./Cgn_eC9-.js";import{l as Ke,f as nt,m as _t,a as ht}from"./DqFWZ_g1.js";import"./ChTqQfQN.js";import"./D6dNunKo.js";import"./THdp5Vpk.js";import{bL as Re}from"./BSsEOl8-.js";import{s as je}from"./DxvSggY5.js";import{F as Pe,d3 as bt,bW as wt,bX as yt,cq as xt,bF as kt,cr as Ct,aZ as Pt,a8 as Lt}from"./DSQT151l.js";import{S as Mt}from"./D0DIS-cT.js";import{n as It,g as $t}from"./BxwkoIbZ.js";import{e as De}from"./Bjy4ygfJ.js";import{i as zt,f as At}from"./DZIz7Wk9.js";import{P as Ut}from"./KAO5AtPr.js";import{h as Et}from"./D5_auhOU.js";import{t as Tt}from"./DAsc1V4f.js";function Nt(i,t){return i?.isExternalLink===!0&&typeof i.workspaceId=="string"&&i.workspaceId?i.workspaceId:t||void 0}function St(i,t,o){const c=i.label||i.id||"mention";if(i.type==="member")return st(c);if(i.type==="note"&&i.id&&o){const s=Nt(i.meta,t),_=s?o(s,i.id)?.trim():void 0;if(_)return _}return c}function Bn(i,t,o){if(typeof document>"u"||!i.includes('data-type="note"'))return i;const c=document.createElement("template");c.innerHTML=i;let s=!1;for(const _ of c.content.querySelectorAll('[data-mention][data-type="note"]')){let h=null;try{h=JSON.parse(_.getAttribute("data-meta")||"{}")}catch{h=null}const I=_.textContent??"",C=St({type:"note",id:_.getAttribute("data-id"),label:I,meta:h},t,o);C!==I&&(_.textContent=C,s=!0)}return s?c.innerHTML:i}const jn=(i,t)=>{let o;try{o=dt().state}catch{return}const c=o?.workspaceNotes?.byWorkspaceId?.[i]?.notes;return c?ct(c,t)?.title:void 0};var Kt=V('<p class="mt-2 max-w-[90vw] rounded-md bg-black/60 px-3 py-1.5 text-center text-sm text-white"> </p>'),Rt=V('<div data-media-lightbox-root="" data-image-lightbox-root="" class="fixed inset-0 z-[1000] flex cursor-zoom-out flex-col items-center justify-center bg-black/80 p-4 backdrop-blur-sm" style="pointer-events: auto;" role="dialog" aria-modal="true" tabindex="-1"><div class="absolute right-4 top-4 z-[1002] flex items-center gap-1"><!> <!></div> <div class="flex min-h-0 w-full flex-1 items-center justify-center"><!></div> <!></div>');function Xe(i,t){if(new.target)return ze({component:Xe,...i});Ee(t,!0);let o=g(t,"open",15,!1),c=g(t,"ariaLabel",7),s=g(t,"closeLabel",7),_=g(t,"onClose",7),h=g(t,"openerElement",7,null),I=g(t,"children",7),C=g(t,"actions",7),T=g(t,"caption",7),w=g(t,"onKeydown",7),L=g(t,"onCopy",7);const S=zt(),d=At(b);let M=se(null),N=se(null);function b(){o()&&(o(!1),_()?.(),h()?.isConnected&&h().focus({preventScroll:!0}))}function O(n){(n.target instanceof Element?n.target:null)?.closest('[data-media-lightbox-content], [role="toolbar"], button, input')||b()}function K(n){if(w()?.(n),n.defaultPrevented||n.key!=="Tab"||!e(M))return;const r=Array.from(e(M).querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')),m=r[0],l=r[r.length-1];!m||!l||(n.shiftKey&&document.activeElement===m?(n.preventDefault(),l.focus()):!n.shiftKey&&document.activeElement===l&&(n.preventDefault(),m.focus()))}xe(()=>{if(o())return He(b)}),xe(()=>{!o()||!e(N)||requestAnimationFrame(()=>e(N)?.focus())});var ae={get open(){return o()},set open(n=!1){o(n),v()},get ariaLabel(){return c()},set ariaLabel(n){c(n),v()},get closeLabel(){return s()},set closeLabel(n){s(n),v()},get onClose(){return _()},set onClose(n){_(n),v()},get openerElement(){return h()},set openerElement(n=null){h(n),v()},get children(){return I()},set children(n){I(n),v()},get actions(){return C()},set actions(n){C(n),v()},get caption(){return T()},set caption(n){T(n),v()},get onKeydown(){return w()},set onKeydown(n){w(n),v()},get onCopy(){return L()},set onCopy(n){L(n),v()},$set:Ae,$on:(n,r)=>Ue(t,n,r)},B=we(),G=te(B);{var J=n=>{{let r=$(()=>S?.target()??"body");Ut(n,{get target(){return e(r)},zIndex:1e3,children:(m,l)=>{var f=Rt(),k=pe(f),z=pe(k);{var R=x=>{var re=we(),D=te(re);je(D,C),y(x,re)};q(z,x=>{C()&&x(R)})}var Q=E(z,2);Le(Q,{variant:"ghost",size:"icon",class:"text-white hover:bg-white/20 hover:text-white",onclick:b,get"aria-label"(){return s()},get ref(){return e(N)},set ref(x){P(N,x,!0)},children:(x,re)=>{Pe(x,{get icon(){return bt},size:"lg"})},$$slots:{default:!0}}),ge(k),De(k,x=>d?.(x));var j=E(k,2),F=pe(j);je(F,I),ge(j),De(j,x=>d?.(x));var W=E(j,2);{var ce=x=>{var re=Kt(),D=ye(re,!0);Y(()=>ne(D,T())),y(x,re)};q(W,x=>{T()&&x(ce)})}ge(f),Se(f,x=>P(M,x),()=>e(M)),Y(()=>ke(f,"aria-label",c())),Ce("click",f,O),Ce("keydown",f,K),Ne("copy",f,function(...x){L()?.apply(this,x)}),It(3,f,()=>$t,()=>({tier:"moderate"})),y(m,f)},$$slots:{default:!0}})}};q(G,n=>{o()&&n(J)})}return y(i,B),Te(ae)}We(["click","keydown"]);function Ye(i){if(!i.startsWith("workspace-file://"))return null;const o=i.slice(17).split(/[?#]/)[0].split("/"),c=o[0],s=o.slice(1);if(!c||s.length===0)return null;const _=[];for(const h of s){if(!h)return null;try{_.push(decodeURIComponent(h))}catch{return null}}return{workspaceId:c,path:_.join("/")}}function at(i){try{return new URL(i).protocol==="https:"}catch{return!1}}function Ze(i){const t=/^data:([^;,]+);base64,(.*)$/s.exec(i);return t?{mimeType:t[1],base64:t[2]}:null}function Ve(i){return at(i)||Ye(i)!==null||/^workspace-asset:\/\/[^/?#]+/.test(i)||/^data:image\/[a-z0-9.+-]+(?:;[^,]*)?,/i.test(i)}function rt(i){if(i.length===0)return 0;let t=0;return i.endsWith("==")?t=2:i.endsWith("=")&&(t=1),Math.floor(i.length*3/4)-t}function Ft(i,t){const o=atob(i),c=new Uint8Array(o.length);for(let s=0;s<o.length;s++)c[s]=o.charCodeAt(s);return new Blob([c],{type:t})}const Ot={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/avif":"avif","image/bmp":"bmp"};function Bt(i){if(i.workspacePath){const s=i.workspacePath.split("/").pop();if(s)return s}const t=(i.imageName||"image").replace(/[/\\]/g,"_");if(/\.[A-Za-z0-9]+$/.test(t))return t;const o=i.mimeType?.split(";")[0].trim().toLowerCase(),c=o&&Ot[o]||"png";return`${t}.${c}`}var jt=V('<div class="type-caption px-2 py-1 text-muted-foreground" data-testid="image-info-dimensions"> </div>'),Dt=V('<div class="type-caption px-2 py-1 text-muted-foreground" data-testid="image-info-size"> </div>'),Zt=V("<!> <!> <!>",1),Vt=V("<!> <!> <!> <!>",1),Wt=V("<!> <!>",1);function ot(i,t){if(new.target)return ze({component:ot,...i});Ee(t,!0);let o=g(t,"imageUrl",7),c=g(t,"imageName",7),s=g(t,"open",15,!1),_=g(t,"triggerClass",7),h=g(t,"contentClass",7);const I=$(()=>Ze(o())),C=$(()=>Ye(o())),T=$(()=>at(o()));let w=se(null),L=se(null),S=null;function d(){if(S===o())return;const l=S=o();P(w,null),P(L,e(I)?rt(e(I).base64):null,!0);const f=new Image;f.onload=()=>{S===l&&P(w,{width:f.naturalWidth,height:f.naturalHeight},!0)},f.src=o(),e(I)||fetch(o()).then(k=>k.ok?k.blob():null).then(k=>{k&&S===l&&P(L,k.size,!0)}).catch(()=>{})}xe(()=>{s()&&d()}),xe(()=>{if(s())return He(()=>{s(!1)})});async function M(l=o()){const f=Ze(l);if(f)return Ft(f.base64,f.mimeType);const k=await fetch(l);if(!k.ok)throw new Error(`Image fetch failed: ${k.status}`);return await k.blob()}async function N(){let l=null;try{let f=o(),k=e(I)?.mimeType;if(!e(I)){const R=await M();k=R.type,l=URL.createObjectURL(R),f=l}const z=document.createElement("a");z.href=f,z.download=Bt({workspacePath:e(C)?.path,imageName:c(),mimeType:k}),document.body.appendChild(z);try{z.click()}finally{z.remove()}}catch{_e.error(u.ui_imageActionsMenu_downloadFailed_error())}finally{l&&URL.revokeObjectURL(l)}}async function b(){if(e(C))try{await Re(e(C).path),_e.success(u.ui_imageActionsMenu_pathCopied_label())}catch{_e.error(u.ui_imageActionsMenu_copyFailed_error())}}async function O(){if(e(T))try{await Re(o()),_e.success(u.ui_imageActionsMenu_linkCopied_label())}catch{_e.error(u.ui_imageActionsMenu_copyFailed_error())}}async function K(l){let f,k;try{let z;if(l.type.split(";")[0].trim()==="image/svg+xml"){k=URL.createObjectURL(l);const j=new Image;j.src=k,await j.decode(),z=j}else z=f=await createImageBitmap(l);const R=document.createElement("canvas");R.width=z instanceof HTMLImageElement?z.naturalWidth:z.width,R.height=z instanceof HTMLImageElement?z.naturalHeight:z.height;const Q=R.getContext("2d");if(!Q)throw new Error("2d canvas context unavailable");return Q.drawImage(z,0,0),await new Promise((j,F)=>{R.toBlob(W=>W?j(W):F(new Error("canvas toBlob failed")),"image/png")})}finally{f?.close(),k&&URL.revokeObjectURL(k)}}async function ae(l=o()){try{let f=await M(l);f.type!=="image/png"&&(f=await K(f)),await navigator.clipboard.write([new ClipboardItem({"image/png":f})]),_e.success(u.ui_imageActionsMenu_imageCopied_label())}catch{_e.error(u.ui_imageActionsMenu_copyFailed_error())}}function B(l,f=o()){return l.defaultPrevented||!Ve(f)||l instanceof KeyboardEvent&&(l.key.toLowerCase()!=="c"||!(l.metaKey||l.ctrlKey)||l.altKey||l.shiftKey||l.isComposing)||vt(l.target)||document.getSelection()?.toString()?!1:(l.preventDefault(),l.stopPropagation(),l instanceof KeyboardEvent&&l.repeat||(ae(f),s(!1)),!0)}var G={handleCopy:B,get imageUrl(){return o()},set imageUrl(l){o(l),v()},get imageName(){return c()},set imageName(l){c(l),v()},get open(){return s()},set open(l=!1){s(l),v()},get triggerClass(){return _()},set triggerClass(l){_(l),v()},get contentClass(){return h()},set contentClass(l){h(l),v()},$set:Ae,$on:(l,f)=>Ue(t,l,f)},J=we(),n=te(J);{var r=l=>{var f=we(),k=te(f);me(k,()=>tt,(z,R)=>{R(z,{get open(){return s()},set open(Q){s(Q)},children:(Q,j)=>{var F=Wt(),W=te(F);{const x=(D,he)=>{let oe=()=>(he?.()).props;{let Z=$(()=>u.ui_imageActionsMenu_trigger_ariaLabel());Le(D,mt(oe,{variant:"plain",size:"icon-sm",wrapContent:!1,get active(){return s()},get"aria-label"(){return e(Z)},children:(ie,fe)=>{Qe(ie,{class:"size-3.5"})},$$slots:{default:!0}}))}};let re=$(()=>qe("flex h-7 w-7 items-center justify-center rounded-md bg-black/60 text-white","hover:bg-black/75",_()));me(W,()=>Ge,(D,he)=>{he(D,{get class(){return e(re)},onclick:oe=>oe.stopPropagation(),onkeydown:oe=>B(oe),oncopy:oe=>B(oe),child:x,$$slots:{child:!0}})})}var ce=E(W,2);me(ce,()=>Je,(x,re)=>{re(x,{get class(){return h()},align:"end",onkeydown:D=>B(D),oncopy:D=>B(D),children:(D,he)=>{var oe=Vt(),Z=te(oe);me(Z,()=>$e,(A,X)=>{X(A,{onSelect:()=>void N(),children:(U,ee)=>{Me();var le=Ie();Y(ue=>ne(le,ue),[()=>u.ui_imageActionsMenu_download_label()]),y(U,le)},$$slots:{default:!0}})});var ie=E(Z,2);me(ie,()=>$e,(A,X)=>{X(A,{onSelect:()=>void ae(),children:(U,ee)=>{Me();var le=Ie();Y(ue=>ne(le,ue),[()=>u.ui_imageActionsMenu_copyImage_label()]),y(U,le)},$$slots:{default:!0}})});var fe=E(ie,2);{var a=A=>{var X=we(),U=te(X);me(U,()=>$e,(ee,le)=>{le(ee,{onSelect:()=>void b(),children:(ue,Fe)=>{Me();var de=Ie();Y(be=>ne(de,be),[()=>u.ui_imageActionsMenu_copyPath_label()]),y(ue,de)},$$slots:{default:!0}})}),y(A,X)},p=A=>{var X=we(),U=te(X);me(U,()=>$e,(ee,le)=>{le(ee,{onSelect:()=>void O(),children:(ue,Fe)=>{Me();var de=Ie();Y(be=>ne(de,be),[()=>u.ui_imageActionsMenu_copyLink_label()]),y(ue,de)},$$slots:{default:!0}})}),y(A,X)};q(fe,A=>{e(C)?A(a):e(T)&&A(p,1)})}var H=E(fe,2);{var ve=A=>{var X=Zt(),U=te(X);me(U,()=>et,(de,be)=>{be(de,{})});var ee=E(U,2);{var le=de=>{var be=jt(),Oe=ye(be,!0);Y(Be=>ne(Oe,Be),[()=>u.ui_imageActionsMenu_dimensions_label({width:Ke(e(w).width),height:Ke(e(w).height)})]),y(de,be)};q(ee,de=>{e(w)&&de(le)})}var ue=E(ee,2);{var Fe=de=>{var be=Dt(),Oe=ye(be,!0);Y(Be=>ne(Oe,Be),[()=>nt(e(L))]),y(de,be)};q(ue,de=>{e(L)!==null&&de(Fe)})}y(A,X)};q(H,A=>{(e(w)||e(L)!==null)&&A(ve)})}y(D,oe)},$$slots:{default:!0}})}),y(Q,F)},$$slots:{default:!0}})}),y(l,f)},m=$(()=>Ve(o()));q(n,l=>{e(m)&&l(r)})}return y(i,J),Te(G)}var Ht=V('<div role="application" tabindex="0" data-testid="zoom-pan-viewport"><div class="flex h-full w-full items-center justify-center will-change-transform" data-testid="zoom-pan-content"><!></div> <div class="absolute bottom-4 left-1/2 z-10 flex -translate-x-1/2 cursor-default items-center gap-2 rounded-full bg-black/60 px-3 py-1.5 backdrop-blur-sm" role="toolbar" tabindex="-1" data-testid="zoom-pan-controls"><!> <div class="w-36"><!></div> <!> <span class="min-w-12 text-center text-xs tabular-nums text-white/90" data-testid="zoom-pan-percent"> </span> <!></div></div>');function it(i,t){if(new.target)return ze({component:it,...i});Ee(t,!0);let o=g(t,"children",7),c=g(t,"minZoom",7,.25),s=g(t,"maxZoom",7,8),_=g(t,"onScaleChange",7);const h=1.25,I=.0015,C=.01,T=4;let w=se(1),L=se(0),S=se(0),d=se(!1),M=se(null);xe(()=>{_()?.(e(w))});let N=null,b=0,O=0,K=0,ae=!1;const B=$(()=>_t(e(w),{style:"percent",maximumFractionDigits:0}));function G(a){return Math.min(s(),Math.max(c(),a))}function J(a,p,H){const ve=G(H),A=e(M)?.getBoundingClientRect(),X=A?a-A.left:0,U=A?p-A.top:0;P(L,X-(X-e(L))/e(w)*ve),P(S,U-(U-e(S))/e(w)*ve),P(w,ve,!0)}function n(a){const p=e(M)?.getBoundingClientRect();p?J(p.left+p.width/2,p.top+p.height/2,a):P(w,G(a),!0)}function r(){P(w,1),P(L,0),P(S,0)}function m(a){a.preventDefault();const p=a.ctrlKey?C:I;J(a.clientX,a.clientY,e(w)*Math.exp(-a.deltaY*p))}xe(()=>{const a=e(M);if(a)return a.addEventListener("wheel",m,{passive:!1}),()=>a.removeEventListener("wheel",m)});function l(a){if(a.metaKey||a.ctrlKey||a.altKey)return!1;if(a.key==="+"||a.key==="=")n(e(w)*h);else if(a.key==="-")n(e(w)/h);else if(a.key==="0")r();else return!1;return a.preventDefault(),!0}function f(a){if(a.button>0)return;P(d,!0),N=a.pointerId,b=a.clientX,O=a.clientY,K=0;const p=a.currentTarget;typeof p.setPointerCapture=="function"&&p.setPointerCapture(a.pointerId)}function k(a){if(!e(d)||a.pointerId!==N)return;const p=a.clientX-b,H=a.clientY-O;K+=Math.abs(p)+Math.abs(H),P(L,e(L)+p),P(S,e(S)+H),b=a.clientX,O=a.clientY}function z(a){if(!e(d)||a.pointerId!==N)return;P(d,!1),N=null,K>T&&(ae=!0);const p=a.currentTarget;typeof p.hasPointerCapture=="function"&&typeof p.releasePointerCapture=="function"&&p.hasPointerCapture(a.pointerId)&&p.releasePointerCapture(a.pointerId)}function R(a){ae&&(ae=!1,a.preventDefault(),a.stopPropagation())}function Q(a){const p=Number.parseFloat(a.currentTarget.value);Number.isFinite(p)&&n(p)}var j={handleKeydown:l,get children(){return o()},set children(a){o(a),v()},get minZoom(){return c()},set minZoom(a=.25){c(a),v()},get maxZoom(){return s()},set maxZoom(a=8){s(a),v()},get onScaleChange(){return _()},set onScaleChange(a){_(a),v()},$set:Ae,$on:(a,p)=>Ue(t,a,p)},F=Ht(),W=pe(F),ce=pe(W);je(ce,o),ge(W);var x=E(W,2),re=pe(x);{let a=$(()=>u.ui_zoomPanViewport_zoomOut_ariaLabel()),p=$(()=>u.ui_zoomPanViewport_zoomOut_ariaLabel());Le(re,{variant:"ghost",size:"icon-sm",class:"text-white hover:bg-white/20 hover:text-white",onclick:()=>n(e(w)/h),get"aria-label"(){return e(a)},get title(){return e(p)},children:(H,ve)=>{Pe(H,{get icon(){return wt}})},$$slots:{default:!0}})}var D=E(re,2),he=pe(D);{let a=$(()=>u.ui_zoomPanViewport_zoomSlider_ariaLabel()),p=$(()=>u.ui_zoomPanViewport_zoomSlider_ariaLabel());Mt(he,{class:"accent-white",get min(){return c()},get max(){return s()},step:"0.01",get value(){return e(w)},oninput:Q,get"aria-label"(){return e(a)},get title(){return e(p)},"data-testid":"zoom-pan-slider"})}ge(D);var oe=E(D,2);{let a=$(()=>u.ui_zoomPanViewport_zoomIn_ariaLabel()),p=$(()=>u.ui_zoomPanViewport_zoomIn_ariaLabel());Le(oe,{variant:"ghost",size:"icon-sm",class:"text-white hover:bg-white/20 hover:text-white",onclick:()=>n(e(w)*h),get"aria-label"(){return e(a)},get title(){return e(p)},children:(H,ve)=>{Pe(H,{get icon(){return yt}})},$$slots:{default:!0}})}var Z=E(oe,2),ie=ye(Z,!0),fe=E(Z,2);{let a=$(()=>u.ui_zoomPanViewport_resetZoom_ariaLabel()),p=$(()=>u.ui_zoomPanViewport_resetZoom_ariaLabel());Le(fe,{variant:"ghost",size:"icon-sm",class:"text-white hover:bg-white/20 hover:text-white",onclick:r,get"aria-label"(){return e(a)},get title(){return e(p)},children:(H,ve)=>{Pe(H,{get icon(){return xt}})},$$slots:{default:!0}})}return ge(x),ge(F),Se(F,a=>P(M,a),()=>e(M)),Y((a,p)=>{pt(F,1,`relative h-full w-full touch-none select-none overflow-hidden ${e(d)?"cursor-grabbing":"cursor-grab"}`),ke(F,"aria-label",a),gt(W,`transform: translate(${e(L)??""}px, ${e(S)??""}px) scale(${e(w)??""}); transform-origin: 0 0;`),ke(x,"aria-label",p),ne(ie,e(B))},[()=>u.ui_zoomPanViewport_viewport_ariaLabel(),()=>u.ui_zoomPanViewport_controls_ariaLabel()]),Ce("pointerdown",F,f),Ce("pointermove",F,k),Ce("pointerup",F,z),Ne("pointercancel",F,z),Ne("click",F,R,!0),Ce("keydown",F,l),Ce("pointerdown",x,a=>a.stopPropagation()),y(i,F),Te(j)}We(["pointerdown","pointermove","pointerup","keydown"]);var Xt=V('<img class="max-h-[90vh] max-w-[90vw] rounded-lg object-contain" draggable="false" data-media-lightbox-content=""/>');function Yt(i,t){if(new.target)return ze({component:Yt,...i});Ee(t,!0);const o=b=>{var O=we(),K=te(O);{var ae=B=>{Se(ot(B,{get imageUrl(){return s()},get imageName(){return _()},triggerClass:"h-9 w-9 bg-white/0 hover:bg-white/20",contentClass:"z-[1003]",get open(){return e(L)},set open(G){P(L,G,!0)}}),G=>P(w,G,!0),()=>e(w))};q(K,B=>{C()&&B(ae)})}y(b,O)};let c=g(t,"open",15,!1),s=g(t,"imageUrl",7),_=g(t,"imageName",23,()=>u.ui_imageLightbox_image_alt()),h=g(t,"onClose",7),I=g(t,"openerElement",7,null),C=g(t,"showActionsMenu",7,!1),T=se(void 0),w=se(void 0),L=se(!1);xe(()=>{c()||P(L,!1)});function S(b){d(b),b.defaultPrevented||e(T)?.handleKeydown(b)}function d(b){c()&&C()&&e(w)?.handleCopy(b)}function M(b){!C()||!Ve(s())||(b.preventDefault(),b.stopPropagation(),P(L,!0))}var N={get open(){return c()},set open(b=!1){c(b),v()},get imageUrl(){return s()},set imageUrl(b){s(b),v()},get imageName(){return _()},set imageName(b=u.ui_imageLightbox_image_alt()){_(b),v()},get onClose(){return h()},set onClose(b){h(b),v()},get openerElement(){return I()},set openerElement(b=null){I(b),v()},get showActionsMenu(){return C()},set showActionsMenu(b=!1){C(b),v()},$set:Ae,$on:(b,O)=>Ue(t,b,O)};{let b=$(()=>u.ui_imageLightbox_preview_ariaLabel()),O=$(()=>u.ui_imageLightbox_close_ariaLabel());Xe(i,{get ariaLabel(){return e(b)},get closeLabel(){return e(O)},get onClose(){return h()},get openerElement(){return I()},get actions(){return o},onKeydown:S,onCopy:d,get open(){return c()},set open(K){c(K)},children:(K,ae)=>{var B=we(),G=te(B);ft(G,s,J=>{Se(it(J,{children:(n,r)=>{var m=Xt();Y(()=>{ke(m,"src",s()),ke(m,"alt",_())}),Ce("contextmenu",m,M),y(n,m)},$$slots:{default:!0}}),n=>P(T,n,!0),()=>e(T))}),y(K,B)},$$slots:{default:!0}})}return Te(N)}We(["contextmenu"]);var qt=V('<div class="type-caption px-2 py-1 text-muted-foreground" data-testid="video-info-duration"> </div>'),Gt=V('<div class="type-caption px-2 py-1 text-muted-foreground" data-testid="video-info-dimensions"> </div>'),Jt=V('<div class="type-caption px-2 py-1 text-muted-foreground" data-testid="video-info-size"> </div>'),Qt=V("<!> <!> <!> <!>",1),en=V("<!> <!> <!>",1),tn=V("<!> <!>",1);function lt(i,t){if(new.target)return ze({component:lt,...i});Ee(t,!0);let o=g(t,"videoUrl",7),c=g(t,"videoName",7),s=g(t,"sourceKind",7),_=g(t,"mimeType",7),h=g(t,"open",15,!1),I=g(t,"triggerClass",7),C=g(t,"contentClass",7);const T=$(()=>Ze(o())),w=$(()=>Ye(o())),L=$(()=>s()??(e(T)?"inline":e(w)?"workspace":"remote"));let S=se(null),d=se(null),M=se(null),N=null;function b(){if(N===o())return;const n=N=o();P(S,null),P(d,null),P(M,e(T)?rt(e(T).base64):null,!0);const r=document.createElement("video");r.preload="metadata",r.onloadedmetadata=()=>{N===n&&(Number.isFinite(r.duration)&&r.duration>0&&P(S,r.duration,!0),r.videoWidth>0&&r.videoHeight>0&&P(d,{width:r.videoWidth,height:r.videoHeight},!0))},r.src=o(),e(T)||fetch(o()).then(m=>m.ok?m.blob():null).then(m=>{m&&N===n&&P(M,m.size,!0)}).catch(()=>{})}function O(){const n=e(w)?.path.split("/").pop();if(n)return n;const r=(c()||"video").replace(/[/\\]/g,"_");if(/\.[A-Za-z0-9]+$/.test(r))return r;const m=(_()??e(T)?.mimeType)==="video/webm"?"webm":"mp4";return`${r}.${m}`}async function K(){let n=null;try{let r=o();if(!e(T)){const l=await fetch(o());if(!l.ok)throw new Error(`Video fetch failed: ${l.status}`);n=URL.createObjectURL(await l.blob()),r=n}const m=document.createElement("a");m.href=r,m.download=O(),document.body.appendChild(m),m.click(),m.remove(),n&&URL.revokeObjectURL(n)}catch{n&&URL.revokeObjectURL(n),_e.error(u.ui_videoActionsMenu_downloadFailed_error())}}async function ae(n,r){try{await Re(n),_e.success(r)}catch{_e.error(u.ui_videoActionsMenu_copyFailed_error())}}xe(()=>{h()&&b()}),xe(()=>{if(h())return He(()=>{h(!1)})});var B={get videoUrl(){return o()},set videoUrl(n){o(n),v()},get videoName(){return c()},set videoName(n){c(n),v()},get sourceKind(){return s()},set sourceKind(n){s(n),v()},get mimeType(){return _()},set mimeType(n){_(n),v()},get open(){return h()},set open(n=!1){h(n),v()},get triggerClass(){return I()},set triggerClass(n){I(n),v()},get contentClass(){return C()},set contentClass(n){C(n),v()},$set:Ae,$on:(n,r)=>Ue(t,n,r)},G=we(),J=te(G);return me(J,()=>tt,(n,r)=>{r(n,{get open(){return h()},set open(m){h(m)},children:(m,l)=>{var f=tn(),k=te(f);{let R=$(()=>qe("flex h-7 w-7 items-center justify-center rounded-md bg-black/60 text-white","hover:bg-black/75",I())),Q=$(()=>u.ui_videoActionsMenu_trigger_ariaLabel());me(k,()=>Ge,(j,F)=>{F(j,{get class(){return e(R)},get"aria-label"(){return e(Q)},onclick:W=>W.stopPropagation(),children:(W,ce)=>{Qe(W,{class:"size-3.5"})},$$slots:{default:!0}})})}var z=E(k,2);me(z,()=>Je,(R,Q)=>{Q(R,{get class(){return C()},align:"end",children:(j,F)=>{var W=en(),ce=te(W);me(ce,()=>$e,(Z,ie)=>{ie(Z,{onSelect:()=>void K(),children:(fe,a)=>{Me();var p=Ie();Y(H=>ne(p,H),[()=>u.ui_videoActionsMenu_download_label()]),y(fe,p)},$$slots:{default:!0}})});var x=E(ce,2);{var re=Z=>{var ie=we(),fe=te(ie);me(fe,()=>$e,(a,p)=>{p(a,{onSelect:()=>void ae(e(w).path,u.ui_videoActionsMenu_pathCopied_label()),children:(H,ve)=>{Me();var A=Ie();Y(X=>ne(A,X),[()=>u.ui_videoActionsMenu_copyPath_label()]),y(H,A)},$$slots:{default:!0}})}),y(Z,ie)},D=Z=>{var ie=we(),fe=te(ie);me(fe,()=>$e,(a,p)=>{p(a,{onSelect:()=>void ae(o(),u.ui_videoActionsMenu_linkCopied_label()),children:(H,ve)=>{Me();var A=Ie();Y(X=>ne(A,X),[()=>u.ui_videoActionsMenu_copyLink_label()]),y(H,A)},$$slots:{default:!0}})}),y(Z,ie)};q(x,Z=>{e(L)==="workspace"&&e(w)?Z(re):e(L)==="remote"&&Z(D,1)})}var he=E(x,2);{var oe=Z=>{var ie=Qt(),fe=te(ie);me(fe,()=>et,(U,ee)=>{ee(U,{})});var a=E(fe,2);{var p=U=>{var ee=qt(),le=ye(ee,!0);Y(ue=>ne(le,ue),[()=>u.ui_videoActionsMenu_duration_label({duration:ht(e(S)*1e3)})]),y(U,ee)};q(a,U=>{e(S)!==null&&U(p)})}var H=E(a,2);{var ve=U=>{var ee=Gt(),le=ye(ee,!0);Y(ue=>ne(le,ue),[()=>u.ui_videoActionsMenu_dimensions_label({width:Ke(e(d).width),height:Ke(e(d).height)})]),y(U,ee)};q(H,U=>{e(d)&&U(ve)})}var A=E(H,2);{var X=U=>{var ee=Jt(),le=ye(ee,!0);Y(ue=>ne(le,ue),[()=>nt(e(M))]),y(U,ee)};q(A,U=>{e(M)!==null&&U(X)})}y(Z,ie)};q(he,Z=>{(e(S)!==null||e(d)||e(M)!==null)&&Z(oe)})}y(j,W)},$$slots:{default:!0}})}),y(m,f)},$$slots:{default:!0}})}),y(i,G),Te(B)}var nn=V('<p class="type-body text-white/80" role="status"> </p>'),an=V('<div data-media-lightbox-content="" data-video-lightbox-root="" class="flex max-h-[90vh] max-w-[90vw] cursor-default flex-col items-center gap-3"><video controls="" preload="metadata" playsinline="" class="max-h-[85vh] max-w-[90vw] rounded-lg bg-black object-contain shadow-(--elevation-overlay)" data-testid="chat-video-player"> </video> <!></div>',2);function rn(i,t){if(new.target)return ze({component:rn,...i});Ee(t,!0);const o=d=>{lt(d,{get videoUrl(){return s()},get videoName(){return _()},get sourceKind(){return I()},get mimeType(){return C()},triggerClass:"h-9 w-9 bg-white/0 hover:bg-white/20",contentClass:"z-[1003]"})};let c=g(t,"open",15,!1),s=g(t,"videoUrl",7),_=g(t,"videoName",23,()=>u.chat_videoBlock_fromAgent_label()),h=g(t,"poster",7),I=g(t,"sourceKind",7),C=g(t,"mimeType",7),T=g(t,"openerElement",7,null),w=g(t,"onClose",7),L=se(!1);xe(()=>{!c()||!s()||P(L,!1)});var S={get open(){return c()},set open(d=!1){c(d),v()},get videoUrl(){return s()},set videoUrl(d){s(d),v()},get videoName(){return _()},set videoName(d=u.chat_videoBlock_fromAgent_label()){_(d),v()},get poster(){return h()},set poster(d){h(d),v()},get sourceKind(){return I()},set sourceKind(d){I(d),v()},get mimeType(){return C()},set mimeType(d){C(d),v()},get openerElement(){return T()},set openerElement(d=null){T(d),v()},get onClose(){return w()},set onClose(d){w(d),v()},$set:Ae,$on:(d,M)=>Ue(t,d,M)};{let d=$(()=>u.chat_videoBlock_dialog_title({name:_()})),M=$(()=>u.chat_videoBlock_close_ariaLabel());Xe(i,{get ariaLabel(){return e(d)},get closeLabel(){return e(M)},get openerElement(){return T()},get onClose(){return w()},get actions(){return o},get open(){return c()},set open(N){c(N)},children:(N,b)=>{var O=an(),K=pe(O),ae=ye(K,!0),B=E(K,2);{var G=J=>{var n=nn(),r=ye(n,!0);Y(m=>ne(r,m),[()=>u.chat_videoBlock_unavailable_description()]),y(J,n)};q(B,J=>{e(L)&&J(G)})}ge(O),Y(J=>{ke(K,"src",s()),ke(K,"poster",h()),ke(K,"aria-label",_()),ne(ae,J)},[()=>u.chat_videoBlock_unsupported_description()]),Ne("error",K,()=>P(L,!0)),y(N,O)},$$slots:{default:!0}})}return Te(S)}var on=V('<span class="block truncate text-foreground"> </span>'),ln=V("<!> ",1),sn=V("<!> <!>",1),cn=V('<span class="flex shrink-0 flex-wrap items-center gap-1"><!> <!></span>'),un=V('<div class="type-caption flex w-fit min-w-0 max-w-full items-center gap-3 whitespace-normal py-1 text-muted-foreground" role="status" data-testid="media-unavailable"><span class="flex min-w-0 max-w-full flex-1 items-start gap-2"><span class="first-line-icon" aria-hidden="true"><!></span> <span class="min-w-0"><!> <span class="block break-words"> </span></span></span> <!></div>');function dn(i,t){if(new.target)return ze({component:dn,...i});Ee(t,!0);let o=g(t,"name",7),c=g(t,"reason",7),s=g(t,"path",7),_=g(t,"workspaceId",7),h=g(t,"onRetry",7);const I=$(()=>c()==="missing"?u.ui_mediaUnavailable_missing_description():c()==="unsupported"?u.ui_mediaUnavailable_unsupported_description():c()==="other-workspace"?u.ui_mediaUnavailable_otherWorkspace_description():c()==="invalid-link"?u.ui_mediaUnavailable_invalidLink_description():u.ui_mediaUnavailable_loadFailed_description());function C(r){r.preventDefault(),r.stopPropagation()}function T(r){C(r),h()?.()}async function w(r){if(C(r),!!s())try{await Re(s()),_e.success(u.ui_imageActionsMenu_pathCopied_label())}catch{_e.error(u.ui_imageActionsMenu_copyFailed_error())}}function L(r){if(C(r),!s()||!_())return;const m=s().split("/").map(encodeURIComponent).join("/");Et(`intent://local/file/${m}`,{workspaceId:ut(_())})}var S={get name(){return o()},set name(r){o(r),v()},get reason(){return c()},set reason(r){c(r),v()},get path(){return s()},set path(r){s(r),v()},get workspaceId(){return _()},set workspaceId(r){_(r),v()},get onRetry(){return h()},set onRetry(r){h(r),v()},$set:Ae,$on:(r,m)=>Ue(t,r,m)},d=un(),M=pe(d),N=pe(M),b=pe(N);Pe(b,{get icon(){return kt},class:"size-3.5"}),ge(N);var O=E(N,2),K=pe(O);{var ae=r=>{var m=on(),l=ye(m,!0);De(m,(f,k)=>Tt?.(f,k),o),Y(()=>ne(l,o())),y(r,m)};q(K,r=>{o()&&r(ae)})}var B=E(K,2),G=ye(B,!0);ge(O),ge(M);var J=E(M,2);{var n=r=>{var m=cn(),l=pe(m);{var f=R=>{{let Q=$(()=>u.chat_shared_retry_label());Le(R,{variant:"ghost",size:"icon-compact",get tooltip(){return e(Q)},onclick:T,children:(j,F)=>{Pe(j,{get icon(){return Ct},size:"xs"})},$$slots:{default:!0}})}};q(l,R=>{h()&&R(f)})}var k=E(l,2);{var z=R=>{var Q=sn(),j=te(Q);{var F=ce=>{Le(ce,{variant:"ghost",size:"compact",onclick:L,children:(x,re)=>{var D=ln(),he=te(D);Pe(he,{get icon(){return Lt},size:"xs"});var oe=E(he);Y(Z=>ne(oe,` ${Z??""}`),[()=>u.chat_changesPanel_openFile_tooltip()]),y(x,D)},$$slots:{default:!0}})};q(j,ce=>{_()&&c()!=="other-workspace"&&c()!=="invalid-link"&&ce(F)})}var W=E(j,2);{let ce=$(()=>u.ui_imageActionsMenu_copyPath_label());Le(W,{variant:"ghost",size:"icon-compact",get tooltip(){return e(ce)},onclick:w,children:(x,re)=>{Pe(x,{get icon(){return Pt},size:"xs"})},$$slots:{default:!0}})}y(R,Q)};q(k,R=>{s()&&R(z)})}ge(m),y(r,m)};q(J,r=>{(h()||s())&&r(n)})}return ge(d),Y(()=>{ke(d,"data-reason",c()),ne(G,e(I))}),y(i,d),Te(S)}export{ot as I,Xe as M,lt as V,it as Z,Yt as a,dn as b,rn as c,rt as d,Ft as e,Ve as f,St as m,Ye as p,Bn as r,jn as s};