@intent-hq/web 2.378.0 → 2.379.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 (326) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/assets/{0.CntaSdOs.css → 0.CTPF0Qlx.css} +1 -1
  3. package/web/app/immutable/chunks/{CI7RbtEr.js → -WAhkWcN.js} +1 -1
  4. package/web/app/immutable/chunks/{DrJzqwYl.js → 3LDzw5hr.js} +1 -1
  5. package/web/app/immutable/chunks/{BqwJFhy0.js → 3gy7b498.js} +1 -1
  6. package/web/app/immutable/chunks/{DxRn1b69.js → 5JKCI89x.js} +1 -1
  7. package/web/app/immutable/chunks/{Cha0m9_p.js → 7xVzJhz9.js} +3 -3
  8. package/web/app/immutable/chunks/{H1XKoyU7.js → 95fFKc_B.js} +1 -1
  9. package/web/app/immutable/chunks/{BiyXqzpr.js → 99N6trPd.js} +1 -1
  10. package/web/app/immutable/chunks/{Ct7u3x4Z.js → 9Oy7dzP1.js} +1 -1
  11. package/web/app/immutable/chunks/{BOjnK0ib.js → 9Wfd5HgS.js} +1 -1
  12. package/web/app/immutable/chunks/{C9q9AVLE.js → ASj4zc4i.js} +1 -1
  13. package/web/app/immutable/chunks/{CDK1PUhb.js → AX9GlL7f.js} +1 -1
  14. package/web/app/immutable/chunks/{D7x-7T1z.js → B-VOV29o.js} +1 -1
  15. package/web/app/immutable/chunks/{Bzs3gWUn.js → B-qkLMcw.js} +1 -1
  16. package/web/app/immutable/chunks/{CWdPByc8.js → B08HT3WC.js} +1 -1
  17. package/web/app/immutable/chunks/{DhZiRE53.js → B09v4S72.js} +1 -1
  18. package/web/app/immutable/chunks/{bWHoQAZ0.js → B0xk6zYz.js} +1 -1
  19. package/web/app/immutable/chunks/{BR7wr0TX.js → B1sTTKq-.js} +1 -1
  20. package/web/app/immutable/chunks/{B8vdzcge.js → B23p8GKo.js} +1 -1
  21. package/web/app/immutable/chunks/{DuKUDTXp.js → B2kxgCpF.js} +4 -4
  22. package/web/app/immutable/chunks/{FJwOmaJn.js → B5OCsMya.js} +1 -1
  23. package/web/app/immutable/chunks/{DHOJXRBs.js → B5qu4FK-.js} +1 -1
  24. package/web/app/immutable/chunks/{YCbY89i6.js → B5x8b2Md.js} +1 -1
  25. package/web/app/immutable/chunks/{BFBac69t.js → B61Vm2jJ.js} +1 -1
  26. package/web/app/immutable/chunks/{CMRXj5iU.js → B6ARnCFm.js} +1 -1
  27. package/web/app/immutable/chunks/{CYF61-VE.js → B7Mft14L.js} +3 -3
  28. package/web/app/immutable/chunks/{DNg21Y1b.js → B7QvV8MS.js} +1 -1
  29. package/web/app/immutable/chunks/{C_iKPxuE.js → B7pJ0oQN.js} +3 -3
  30. package/web/app/immutable/chunks/{D7wqIX40.js → B90WO3Nw.js} +1 -1
  31. package/web/app/immutable/chunks/{CqsHYBSd.js → B9QnX69E.js} +1 -1
  32. package/web/app/immutable/chunks/{Bjpdj-Rz.js → BAaqzMEP.js} +1 -1
  33. package/web/app/immutable/chunks/{D3e1peXC.js → BBibLZN0.js} +1 -1
  34. package/web/app/immutable/chunks/{B6IP3G-s.js → BDciodIO.js} +1 -1
  35. package/web/app/immutable/chunks/{BRHA9tcr.js → BED17zwc.js} +2 -2
  36. package/web/app/immutable/chunks/BEKwCWB-.js +1 -0
  37. package/web/app/immutable/chunks/{DwpTtGo9.js → BFHz4Mic.js} +4 -4
  38. package/web/app/immutable/chunks/{BKSCrb1m.js → BGpvxEza.js} +1 -1
  39. package/web/app/immutable/chunks/{RKhqePYS.js → BHl8a9sq.js} +1 -1
  40. package/web/app/immutable/chunks/{Dn1azdNN.js → BI0xIaK5.js} +1 -1
  41. package/web/app/immutable/chunks/{D1DuB8m6.js → BIpZTv4V.js} +1 -1
  42. package/web/app/immutable/chunks/{NppR00xP.js → BLp3-Mdk.js} +2 -2
  43. package/web/app/immutable/chunks/{D5n4bmLW.js → BMz9z95U.js} +1 -1
  44. package/web/app/immutable/chunks/{DPVg7jvq.js → BOIa3b7l.js} +1 -1
  45. package/web/app/immutable/chunks/{BGsL8K0y.js → BOVF8j6B.js} +1 -1
  46. package/web/app/immutable/chunks/{Y8mQJY9P.js → BOlkYOOx.js} +1 -1
  47. package/web/app/immutable/chunks/{DkuxYFAh.js → BOrCm7f7.js} +1 -1
  48. package/web/app/immutable/chunks/{1RAMMSz2.js → BQiJMsZZ.js} +1 -1
  49. package/web/app/immutable/chunks/{D95TUop3.js → BSD-ntGx.js} +1 -1
  50. package/web/app/immutable/chunks/{CDLMG5g2.js → BT1eR3Bj.js} +1 -1
  51. package/web/app/immutable/chunks/{BMqjLC9C.js → BUOJIxHm.js} +1 -1
  52. package/web/app/immutable/chunks/{BupGSW0e.js → BVGm2-7m.js} +1 -1
  53. package/web/app/immutable/chunks/{DRCQRBOX.js → BVVYfWqp.js} +1 -1
  54. package/web/app/immutable/chunks/{nNR5liVx.js → BVdTA_y5.js} +1 -1
  55. package/web/app/immutable/chunks/{DNxs15P5.js → BVhmKG23.js} +1 -1
  56. package/web/app/immutable/chunks/{CH6hoQCh.js → BWP_R2MA.js} +1 -1
  57. package/web/app/immutable/chunks/{Dl5T14-N.js → BXA0q2RP.js} +1 -1
  58. package/web/app/immutable/chunks/{BDWzwjAw.js → BXEhOBKy.js} +1 -1
  59. package/web/app/immutable/chunks/{CMITzGAq.js → BXWV2GsM.js} +1 -1
  60. package/web/app/immutable/chunks/{DNAYSx3o.js → BZD36hSJ.js} +1 -1
  61. package/web/app/immutable/chunks/{dC4Ouk4t.js → BZi270zL.js} +1 -1
  62. package/web/app/immutable/chunks/{DXvCGoHo.js → B_7rDlJA.js} +1 -1
  63. package/web/app/immutable/chunks/{C9XPvdvP.js → B_SqXKMX.js} +1 -1
  64. package/web/app/immutable/chunks/{C1-QjOg0.js → B_rj1oI3.js} +1 -1
  65. package/web/app/immutable/chunks/{D4BcrleY.js → BblUoKwU.js} +1 -1
  66. package/web/app/immutable/chunks/{DXxnoOGg.js → BhP2yLip.js} +1 -1
  67. package/web/app/immutable/chunks/{CC73Ord3.js → Bjc6stZr.js} +1 -1
  68. package/web/app/immutable/chunks/{AHKUBHmH.js → BkE4ThRL.js} +2 -2
  69. package/web/app/immutable/chunks/{DpwIptaI.js → BkK6L2aU.js} +1 -1
  70. package/web/app/immutable/chunks/{DAkxD-CW.js → Bln5N5gf.js} +1 -1
  71. package/web/app/immutable/chunks/{B16ZhAkF.js → Bm1YRNX5.js} +1 -1
  72. package/web/app/immutable/chunks/{BRyCucnb.js → BmMxtG34.js} +1 -1
  73. package/web/app/immutable/chunks/{CQco45Cg.js → BmusT0yN.js} +3 -3
  74. package/web/app/immutable/chunks/{C5Zy1enh.js → BncYKhak.js} +1 -1
  75. package/web/app/immutable/chunks/{ChB7enBh.js → BpUidpA4.js} +1 -1
  76. package/web/app/immutable/chunks/{DLE3vveN.js → BpzZdAGA.js} +1 -1
  77. package/web/app/immutable/chunks/{CuWqPurf.js → BpznkfWn.js} +1 -1
  78. package/web/app/immutable/chunks/{Bf_h69U3.js → Bqdjarag.js} +1 -1
  79. package/web/app/immutable/chunks/{yYqgfv9t.js → BqnC5jpg.js} +1 -1
  80. package/web/app/immutable/chunks/{IclfFZoe.js → Bqvx2p-8.js} +1 -1
  81. package/web/app/immutable/chunks/{DEsbP_jO.js → BrF70gz7.js} +1 -1
  82. package/web/app/immutable/chunks/{qdAkw__e.js → Bs9C3yw5.js} +1 -1
  83. package/web/app/immutable/chunks/{yTn_UE0E.js → BtupVFyT.js} +1 -1
  84. package/web/app/immutable/chunks/{BOW58NW5.js → Bue8rt91.js} +1 -1
  85. package/web/app/immutable/chunks/{a3l5znCa.js → BwJyU0G0.js} +2 -2
  86. package/web/app/immutable/chunks/{DzEfixuL.js → Bwe4xLDo.js} +1 -1
  87. package/web/app/immutable/chunks/{BTiEQBIg.js → Bx1sm-W9.js} +1 -1
  88. package/web/app/immutable/chunks/{DTPgmjai.js → Bx3lRAzK.js} +1 -1
  89. package/web/app/immutable/chunks/{BFxBQddb.js → Byz3i90Q.js} +1 -1
  90. package/web/app/immutable/chunks/{DdNx-LMu.js → Bz1UdUMu.js} +1 -1
  91. package/web/app/immutable/chunks/{Cr0HizBS.js → Bz43dY69.js} +1 -1
  92. package/web/app/immutable/chunks/{Dv-DK4ZQ.js → C-662HWr.js} +1 -1
  93. package/web/app/immutable/chunks/{8ScDICwb.js → C-6kZjgn.js} +1 -1
  94. package/web/app/immutable/chunks/{250ka2gI.js → C-QdzJwG.js} +1 -1
  95. package/web/app/immutable/chunks/{C4F64iPQ.js → C-jJNcMR.js} +1 -1
  96. package/web/app/immutable/chunks/{B1Weu8fb.js → C-nHSAUo.js} +3 -3
  97. package/web/app/immutable/chunks/{BPRCBm84.js → C0EhdYGV.js} +1 -1
  98. package/web/app/immutable/chunks/{Brh3GO3O.js → C3puOFC3.js} +1 -1
  99. package/web/app/immutable/chunks/{JIE_7jo4.js → C6CbeYqw.js} +1 -1
  100. package/web/app/immutable/chunks/{C7FWeTQP.js → C6Xyba22.js} +1 -1
  101. package/web/app/immutable/chunks/{Di1597mK.js → C6w4HIHS.js} +4 -4
  102. package/web/app/immutable/chunks/{DhPOXvW2.js → C8VLUX_C.js} +1 -1
  103. package/web/app/immutable/chunks/{DWx-rRFl.js → C99ttMY5.js} +1 -1
  104. package/web/app/immutable/chunks/{CGwoBkMN.js → C9BFhP02.js} +1 -1
  105. package/web/app/immutable/chunks/{Crl5h76T.js → C9of0fiN.js} +1 -1
  106. package/web/app/immutable/chunks/{0KXDpLHs.js → CAMYapEA.js} +1 -1
  107. package/web/app/immutable/chunks/{TE5M669U.js → CB6JpnWC.js} +1 -1
  108. package/web/app/immutable/chunks/{DAFCfCw4.js → CBcFUe2n.js} +1 -1
  109. package/web/app/immutable/chunks/{B1cgGcI0.js → CBm8wTeU.js} +1 -1
  110. package/web/app/immutable/chunks/{CtssBApV.js → CBoDYG4N.js} +1 -1
  111. package/web/app/immutable/chunks/{ER2tmGzm.js → CC4qGxb7.js} +1 -1
  112. package/web/app/immutable/chunks/{Kl08LBTM.js → CCZp7LCQ.js} +1 -1
  113. package/web/app/immutable/chunks/{DzRCnjNV.js → CDYyrBGY.js} +1 -1
  114. package/web/app/immutable/chunks/{PbmSZkiX.js → CEAmSotY.js} +1 -1
  115. package/web/app/immutable/chunks/{SORTQVEW.js → CEeEOvCL.js} +1 -1
  116. package/web/app/immutable/chunks/{u_aTJYPF.js → CFLU9fq8.js} +1 -1
  117. package/web/app/immutable/chunks/{D5TWWYRb.js → CFTAk3la.js} +1 -1
  118. package/web/app/immutable/chunks/{Cc2CqLcV.js → CFg7iVIZ.js} +1 -1
  119. package/web/app/immutable/chunks/{DsALDj-G.js → CFxNovSS.js} +1 -1
  120. package/web/app/immutable/chunks/{C7hiMHci.js → CGFkplEn.js} +1 -1
  121. package/web/app/immutable/chunks/{DufyJpiq.js → CGnn93LH.js} +1 -1
  122. package/web/app/immutable/chunks/{Mvzzws-D.js → CGuufzS0.js} +1 -1
  123. package/web/app/immutable/chunks/{Bb3DLwd-.js → CHKsRESt.js} +1 -1
  124. package/web/app/immutable/chunks/CHWIPzMj.js +1 -0
  125. package/web/app/immutable/chunks/{CG1uBvn1.js → CI1ntq87.js} +1 -1
  126. package/web/app/immutable/chunks/{CqB0bCAG.js → CJ3l-lGj.js} +2 -2
  127. package/web/app/immutable/chunks/{BIx2KRjJ.js → CKC2M8j1.js} +1 -1
  128. package/web/app/immutable/chunks/{D2Vwu3SP.js → CKhPlHZj.js} +1 -1
  129. package/web/app/immutable/chunks/{fs3EIvPV.js → CPE--RtJ.js} +1 -1
  130. package/web/app/immutable/chunks/{DuNaiyu-.js → CPp2qH2q.js} +1 -1
  131. package/web/app/immutable/chunks/{BSJqN5vZ.js → CRSdOrSC.js} +1 -1
  132. package/web/app/immutable/chunks/{DaOZBaPJ.js → CR_d2Ton.js} +1 -1
  133. package/web/app/immutable/chunks/{C_AcfC1L.js → CSCM9u80.js} +4 -4
  134. package/web/app/immutable/chunks/{CDuekMJZ.js → CUV6PvQK.js} +1 -1
  135. package/web/app/immutable/chunks/{uh7Y9z2F.js → CWVqIb-d.js} +1 -1
  136. package/web/app/immutable/chunks/{DPL73Y_l.js → CWcntBOg.js} +1 -1
  137. package/web/app/immutable/chunks/{UZmeM7G7.js → CWgzsPKB.js} +1 -1
  138. package/web/app/immutable/chunks/{Cdn6MckB.js → CYv_coXk.js} +1 -1
  139. package/web/app/immutable/chunks/{Ck_gSwZK.js → CZ4sJNRy.js} +1 -1
  140. package/web/app/immutable/chunks/{egYaebOi.js → C_T3jbC9.js} +1 -1
  141. package/web/app/immutable/chunks/{CON-zxWG.js → C_VUI8Os.js} +1 -1
  142. package/web/app/immutable/chunks/{D22DhEZM.js → C_a7D1qz.js} +1 -1
  143. package/web/app/immutable/chunks/{D9x2HEXw.js → CeGIZnmi.js} +2 -2
  144. package/web/app/immutable/chunks/{Gw1t2Srm.js → CeOa9B5I.js} +1 -1
  145. package/web/app/immutable/chunks/{BturI3jj.js → CezXhCS3.js} +1 -1
  146. package/web/app/immutable/chunks/{Bl3WKtdy.js → CfiSkM8N.js} +1 -1
  147. package/web/app/immutable/chunks/{C-4lCpez.js → Cg7Nu4Va.js} +1 -1
  148. package/web/app/immutable/chunks/{CcC3AMEc.js → CkCYZCke.js} +1 -1
  149. package/web/app/immutable/chunks/{WZfEgods.js → Cl2rjjSj.js} +1 -1
  150. package/web/app/immutable/chunks/{CcBZUrE6.js → Cl7-Lh5E.js} +1 -1
  151. package/web/app/immutable/chunks/{CpL_C-GJ.js → Clz72PsI.js} +1 -1
  152. package/web/app/immutable/chunks/{CpRRerrb.js → CmE98hO-.js} +1 -1
  153. package/web/app/immutable/chunks/{BgXHwBod.js → CoCpxnqY.js} +6 -6
  154. package/web/app/immutable/chunks/{B9ibu-4g.js → CpK9Zfzc.js} +1 -1
  155. package/web/app/immutable/chunks/{Du66vBdT.js → CpasQsOr.js} +1 -1
  156. package/web/app/immutable/chunks/{BcG7yxE2.js → CprGZ_vQ.js} +1 -1
  157. package/web/app/immutable/chunks/{CZ6S_xft.js → Cq8HYngI.js} +1 -1
  158. package/web/app/immutable/chunks/{DBX7lh1O.js → CsXyRQ8j.js} +55 -55
  159. package/web/app/immutable/chunks/{Dal4fUVD.js → CtJv8xMf.js} +1 -1
  160. package/web/app/immutable/chunks/{BH0cA3lf.js → CuKET43j.js} +2 -2
  161. package/web/app/immutable/chunks/{B12Be-IL.js → Cum-TdZd.js} +1 -1
  162. package/web/app/immutable/chunks/{q7CfEA0Z.js → CwSTmJL9.js} +1 -1
  163. package/web/app/immutable/chunks/{ypTw5Sl1.js → CxWH-8GW.js} +1 -1
  164. package/web/app/immutable/chunks/{D_zFSOgZ.js → CxdlCefM.js} +1 -1
  165. package/web/app/immutable/chunks/{C_yzewkM.js → Cy7afLsK.js} +1 -1
  166. package/web/app/immutable/chunks/{CfrT9tcw.js → CzU9DzbS.js} +2 -2
  167. package/web/app/immutable/chunks/{N88c9xuK.js → D-Cja9EW.js} +1 -1
  168. package/web/app/immutable/chunks/{XUs6uy3h.js → D-vbvcep.js} +1 -1
  169. package/web/app/immutable/chunks/{Dollk5ZG.js → D0LnBaLt.js} +1 -1
  170. package/web/app/immutable/chunks/{BR2JfJtY.js → D2KpwJIq.js} +1 -1
  171. package/web/app/immutable/chunks/{C7zasWUf.js → D3OvqZhX.js} +2 -2
  172. package/web/app/immutable/chunks/{C6oWsXP5.js → D3hR-AME.js} +1 -1
  173. package/web/app/immutable/chunks/{CEswnMLF.js → D4EK6U-m.js} +1 -1
  174. package/web/app/immutable/chunks/{BP3qefPW.js → D5uBa-Ne.js} +1 -1
  175. package/web/app/immutable/chunks/{BQaHhd4d.js → D5yaIVD5.js} +1 -1
  176. package/web/app/immutable/chunks/{B3PM4xsG.js → D7IJPBQY.js} +2 -2
  177. package/web/app/immutable/chunks/{C-Rjcf-U.js → D8DBejPV.js} +1 -1
  178. package/web/app/immutable/chunks/{D2h8OBcY.js → DA2RRspt.js} +1 -1
  179. package/web/app/immutable/chunks/{BhxN6u9j.js → DBsXclsv.js} +1 -1
  180. package/web/app/immutable/chunks/{BGa2D4m6.js → DC1aoXyY.js} +1 -1
  181. package/web/app/immutable/chunks/{CSfG5Ybw.js → DCpFqaYA.js} +3 -3
  182. package/web/app/immutable/chunks/{DumVye9M.js → DD2BajRb.js} +1 -1
  183. package/web/app/immutable/chunks/{jRZT2QjD.js → DDfMifm6.js} +1 -1
  184. package/web/app/immutable/chunks/{ByjFf28U.js → DDtBtnNz.js} +1 -1
  185. package/web/app/immutable/chunks/{CHWbLwXf.js → DED90qCG.js} +1 -1
  186. package/web/app/immutable/chunks/{B0m0-2MI.js → DF8x1-0S.js} +1 -1
  187. package/web/app/immutable/chunks/{83xTN5fk.js → DFztsOdi.js} +1 -1
  188. package/web/app/immutable/chunks/{GAJ0U6Fj.js → DGfmWFo_.js} +1 -1
  189. package/web/app/immutable/chunks/{D1mB9_6q.js → DH2vm-1i.js} +1 -1
  190. package/web/app/immutable/chunks/{ha_PYGcR.js → DIZhZiBE.js} +1 -1
  191. package/web/app/immutable/chunks/{DK4nL43d.js → DInAnkwK.js} +1 -1
  192. package/web/app/immutable/chunks/{DJrPi4os.js → DJ6GAsDd.js} +1 -1
  193. package/web/app/immutable/chunks/{eqIwOdFV.js → DJM-jC4D.js} +1 -1
  194. package/web/app/immutable/chunks/{BmET8lGk.js → DKpBQuZo.js} +1 -1
  195. package/web/app/immutable/chunks/{DFMLCzQx.js → DMkatOMg.js} +1 -1
  196. package/web/app/immutable/chunks/{DZ6X6WRI.js → DNhGGhpW.js} +1 -1
  197. package/web/app/immutable/chunks/{DIweBffD.js → DOPKn6Qc.js} +1 -1
  198. package/web/app/immutable/chunks/{BK9wcqQr.js → DPWIkUJh.js} +1 -1
  199. package/web/app/immutable/chunks/{DzCaG8dx.js → DPbAP8qP.js} +1 -1
  200. package/web/app/immutable/chunks/DS9Nses5.js +1 -0
  201. package/web/app/immutable/chunks/{BvR4li8f.js → DSQXi-HI.js} +1 -1
  202. package/web/app/immutable/chunks/{CN5rDbbI.js → DVBcpomn.js} +3 -3
  203. package/web/app/immutable/chunks/{CQaQS_9E.js → DW6LpaLb.js} +1 -1
  204. package/web/app/immutable/chunks/{B50wbSca.js → DXujHnPt.js} +1 -1
  205. package/web/app/immutable/chunks/{BT9wsXKO.js → DZBWbkQT.js} +1 -1
  206. package/web/app/immutable/chunks/{DsNGTbSH.js → D_gp0b_i.js} +1 -1
  207. package/web/app/immutable/chunks/{Brv29rn8.js → D_p0cMgQ.js} +1 -1
  208. package/web/app/immutable/chunks/{1ppucs3B.js → DaHFtoCa.js} +1 -1
  209. package/web/app/immutable/chunks/{Cweq-0-O.js → DaNzos5O.js} +1 -1
  210. package/web/app/immutable/chunks/{B4CGkc2Z.js → DaauQgcE.js} +1 -1
  211. package/web/app/immutable/chunks/{2bm1-WPv.js → DavOW4Pn.js} +1 -1
  212. package/web/app/immutable/chunks/{CWOgcDNw.js → DbYmdzfs.js} +1 -1
  213. package/web/app/immutable/chunks/{BaifPKCC.js → Dc7HNZUt.js} +1 -1
  214. package/web/app/immutable/chunks/{BhaVZ25C.js → DdAvLI3S.js} +1 -1
  215. package/web/app/immutable/chunks/{B_kNlUD-.js → Dg1VUJOX.js} +1 -1
  216. package/web/app/immutable/chunks/{BB-o-_x6.js → DhbIivmf.js} +1 -1
  217. package/web/app/immutable/chunks/{Qetkvafr.js → DlGq0K29.js} +1 -1
  218. package/web/app/immutable/chunks/{BIcRvrKV.js → Dlhp692a.js} +1 -1
  219. package/web/app/immutable/chunks/{CtXwHt_m.js → Dm5sb2T9.js} +1 -1
  220. package/web/app/immutable/chunks/{BHWU1Psx.js → DmzyDWxY.js} +1 -1
  221. package/web/app/immutable/chunks/{rS28LQlr.js → DnPj8kAJ.js} +1 -1
  222. package/web/app/immutable/chunks/{DZMdKpsk.js → DnuPDvKn.js} +1 -1
  223. package/web/app/immutable/chunks/{BWIk2_6S.js → DoQcVvIo.js} +1 -1
  224. package/web/app/immutable/chunks/{Dnhf6K_4.js → DpOnLCwB.js} +1 -1
  225. package/web/app/immutable/chunks/{1FvEkC51.js → DrJBkQ-6.js} +1 -1
  226. package/web/app/immutable/chunks/{CUkvXPuX.js → Drf7hLVf.js} +1 -1
  227. package/web/app/immutable/chunks/{CBcz8VK6.js → Ds2ZtSdQ.js} +1 -1
  228. package/web/app/immutable/chunks/{DyvHB1Xe.js → DsOeQrzx.js} +1 -1
  229. package/web/app/immutable/chunks/{BLB-tbz2.js → DtR7mmzX.js} +1 -1
  230. package/web/app/immutable/chunks/{u_ejDIBY.js → DtgMvDnf.js} +1 -1
  231. package/web/app/immutable/chunks/{CbKyR6Kf.js → DvRDNe8t.js} +2 -2
  232. package/web/app/immutable/chunks/{7FbFoR5r.js → Dw3sD88n.js} +1 -1
  233. package/web/app/immutable/chunks/{DQg0oSRW.js → Dwv8zw-4.js} +1 -1
  234. package/web/app/immutable/chunks/{BAduOJD2.js → DxTOze69.js} +1 -1
  235. package/web/app/immutable/chunks/{CL61Lx-U.js → DyRcp3T7.js} +1 -1
  236. package/web/app/immutable/chunks/{CcIA3l7Z.js → Dym3QysO.js} +1 -1
  237. package/web/app/immutable/chunks/{BuvlavTl.js → DzUGhIyX.js} +1 -1
  238. package/web/app/immutable/chunks/{CJPgBxaF.js → DzyqDyL5.js} +1 -1
  239. package/web/app/immutable/chunks/{Dof5KDCr.js → EVnmmycb.js} +1 -1
  240. package/web/app/immutable/chunks/EyifK0YY.js +1 -0
  241. package/web/app/immutable/chunks/{CuTVPcxo.js → JtSO6K6S.js} +1 -1
  242. package/web/app/immutable/chunks/{DK-gr9PF.js → Jy2VtQ-j.js} +1 -1
  243. package/web/app/immutable/chunks/{DaNk_UZD.js → LqqBQeq2.js} +1 -1
  244. package/web/app/immutable/chunks/M46vYfPG.js +1 -0
  245. package/web/app/immutable/chunks/{CxfjSsAX.js → MpQYVCAl.js} +1 -1
  246. package/web/app/immutable/chunks/{D0boXdmz.js → P8ajY_OC.js} +1 -1
  247. package/web/app/immutable/chunks/{O62vZaBr.js → Q-AtJOxP.js} +1 -1
  248. package/web/app/immutable/chunks/{Bn7ZmTkF.js → QgUSWdkO.js} +2 -2
  249. package/web/app/immutable/chunks/{CVvdpvXK.js → R5mMERAP.js} +3 -3
  250. package/web/app/immutable/chunks/{4nEMohmP.js → Rx9iChBc.js} +1 -1
  251. package/web/app/immutable/chunks/{h37VgGKw.js → T8wSaQKw.js} +1 -1
  252. package/web/app/immutable/chunks/{DYg3sgSl.js → U_nfJe6p.js} +1 -1
  253. package/web/app/immutable/chunks/{D1u6MWVh.js → VpUwDjJ_.js} +1 -1
  254. package/web/app/immutable/chunks/{DP0ovMwg.js → XMeuZ35b.js} +1 -1
  255. package/web/app/immutable/chunks/XslshjYv.js +1 -0
  256. package/web/app/immutable/chunks/{D2524wRl.js → Yqp_UZB_.js} +1 -1
  257. package/web/app/immutable/chunks/{8jMj1OGX.js → ZANjZw72.js} +1 -1
  258. package/web/app/immutable/chunks/{D1mEn0KC.js → ZEAS6srh.js} +1 -1
  259. package/web/app/immutable/chunks/{Be253aOc.js → ZUA6bo0t.js} +1 -1
  260. package/web/app/immutable/chunks/{Bd1sW9PE.js → _H8LGW4O.js} +1 -1
  261. package/web/app/immutable/chunks/{AF10H5eK.js → a3c0uoAC.js} +1 -1
  262. package/web/app/immutable/chunks/{DRG3CbTe.js → asAq0Q4G.js} +1 -1
  263. package/web/app/immutable/chunks/{BxsHp3SH.js → d-SabBb_.js} +1 -1
  264. package/web/app/immutable/chunks/{GIg9PMOU.js → dlAoKLi8.js} +1 -1
  265. package/web/app/immutable/chunks/{Ci7no3-D.js → ePwjer8w.js} +1 -1
  266. package/web/app/immutable/chunks/{jBPLh4Hv.js → eapM1N3E.js} +1 -1
  267. package/web/app/immutable/chunks/{BO7alE7_.js → g4xg1V0H.js} +4 -4
  268. package/web/app/immutable/chunks/{DUtR3SZU.js → gFHNPMAw.js} +1 -1
  269. package/web/app/immutable/chunks/{DWoxVXOI.js → icAEjhzY.js} +1 -1
  270. package/web/app/immutable/chunks/{CVmi7DTf.js → jCrYQ4Ri.js} +2 -2
  271. package/web/app/immutable/chunks/{PxI72ehJ.js → lJ4MSEIh.js} +1 -1
  272. package/web/app/immutable/chunks/{oZTI_u9n.js → lWlirZMs.js} +1 -1
  273. package/web/app/immutable/chunks/{DyyOhufN.js → o551VboC.js} +1 -1
  274. package/web/app/immutable/chunks/{CtZ-vglf.js → ohZ0BtRB.js} +1 -1
  275. package/web/app/immutable/chunks/{BHSnSmbO.js → ouMJlHY1.js} +1 -1
  276. package/web/app/immutable/chunks/{CPZGjCPW.js → pElsZ4dt.js} +1 -1
  277. package/web/app/immutable/chunks/{Dx1gCWLU.js → pV_14PeY.js} +1 -1
  278. package/web/app/immutable/chunks/{DmQDTavV.js → rCQAZGb3.js} +2 -2
  279. package/web/app/immutable/chunks/{BYge7mVb.js → sASsqJNT.js} +1 -1
  280. package/web/app/immutable/chunks/{C62iVnTg.js → s_zHQBKW.js} +1 -1
  281. package/web/app/immutable/chunks/{Cn-uVT14.js → tOpgiK5L.js} +1 -1
  282. package/web/app/immutable/chunks/{1wWPoJ5Q.js → tp06XFI7.js} +1 -1
  283. package/web/app/immutable/chunks/{D4SYJpS6.js → tsVy-iyH.js} +1 -1
  284. package/web/app/immutable/chunks/{BL9pxyXQ.js → uN_eK4W9.js} +1 -1
  285. package/web/app/immutable/chunks/{Btv0cBol.js → uod76J5c.js} +1 -1
  286. package/web/app/immutable/chunks/{Ddfl3sUZ.js → v1zTkmPU.js} +1 -1
  287. package/web/app/immutable/chunks/{4K9ZZSJu.js → w4-ZULNa.js} +1 -1
  288. package/web/app/immutable/chunks/{7CEHC6fO.js → wOi8eNbH.js} +1 -1
  289. package/web/app/immutable/chunks/{D-GPCP_y.js → waJ4nm9k.js} +1 -1
  290. package/web/app/immutable/chunks/{Dm98AfRw.js → wwOYCksJ.js} +1 -1
  291. package/web/app/immutable/chunks/{DjBfsgFx.js → yQuAS-d_.js} +1 -1
  292. package/web/app/immutable/chunks/{DzQEubr_.js → z2dT_sfg.js} +1 -1
  293. package/web/app/immutable/entry/{app.DnvWkWuC.js → app.Bg9ukl2W.js} +3 -3
  294. package/web/app/immutable/entry/start.DrKu0acT.js +1 -0
  295. package/web/app/immutable/nodes/{0.BHNsHbq6.js → 0.w7cQ0D88.js} +1 -1
  296. package/web/app/immutable/nodes/{1.CxKhOECT.js → 1.4ql_JuYe.js} +1 -1
  297. package/web/app/immutable/nodes/{10.mSXX1b86.js → 10.Db5zVRj1.js} +5 -5
  298. package/web/app/immutable/nodes/{11.LQ-kpfGf.js → 11.5Xli6dPl.js} +1 -1
  299. package/web/app/immutable/nodes/{12.moZNbeME.js → 12.Dmc_y_qK.js} +1 -1
  300. package/web/app/immutable/nodes/{13.B9ngkS9V.js → 13.DZTGM0cb.js} +1 -1
  301. package/web/app/immutable/nodes/{14.BvKaKKlx.js → 14.BJwsFDEF.js} +3 -3
  302. package/web/app/immutable/nodes/{15.VPLfb8v_.js → 15.DMW9u33y.js} +1 -1
  303. package/web/app/immutable/nodes/{16.Bfi41nCp.js → 16.BcrbQLum.js} +1 -1
  304. package/web/app/immutable/nodes/{17.BaloRRSg.js → 17.8JKljX5l.js} +1 -1
  305. package/web/app/immutable/nodes/{18.DPo7p8bY.js → 18.YeTMHnFS.js} +1 -1
  306. package/web/app/immutable/nodes/{19.CavDiJik.js → 19.CTmJfPwB.js} +2 -2
  307. package/web/app/immutable/nodes/{2.kzpobJJm.js → 2.bsXLvGyt.js} +4 -4
  308. package/web/app/immutable/nodes/{20.EaJ-UneM.js → 20.C1sgyqm8.js} +1 -1
  309. package/web/app/immutable/nodes/{3.DZFV57al.js → 3.JBWvrxuJ.js} +1 -1
  310. package/web/app/immutable/nodes/{4.Dfre4p0n.js → 4.D6e8o0bC.js} +1 -1
  311. package/web/app/immutable/nodes/{5.BnBSTXSN.js → 5.BiCuWA6k.js} +1 -1
  312. package/web/app/immutable/nodes/{6.BYj21cDV.js → 6.IF1PmeP7.js} +1 -1
  313. package/web/app/immutable/nodes/{7.CvDxUVa8.js → 7.BlK4mw1L.js} +1 -1
  314. package/web/app/immutable/nodes/{8.CTVkGhmt.js → 8.CUVVZTwf.js} +1 -1
  315. package/web/app/immutable/nodes/9.JkDekIr4.js +12 -0
  316. package/web/app/version.json +1 -1
  317. package/web/generated/paraglide.js +49 -49
  318. package/web/index.html +19 -19
  319. package/web/app/immutable/chunks/2CFsxajB.js +0 -1
  320. package/web/app/immutable/chunks/2CQlphfn.js +0 -1
  321. package/web/app/immutable/chunks/6QXvr4x0.js +0 -1
  322. package/web/app/immutable/chunks/BOaPEJcS.js +0 -1
  323. package/web/app/immutable/chunks/CXjastM3.js +0 -1
  324. package/web/app/immutable/chunks/Cr_KTPcL.js +0 -1
  325. package/web/app/immutable/entry/start.D5h2aGMe.js +0 -1
  326. package/web/app/immutable/nodes/9.Dq4n-Ddo.js +0 -12
@@ -1 +1 @@
1
- var j=Object.defineProperty;var V=(s,e,t)=>e in s?j(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var n=(s,e,t)=>V(s,typeof e!="symbol"?e+"":e,t);import{f as x,j as G,p as z}from"./uXuxG9cN.js";import{u as J,o as T,_ as C,s as b,l as _,n as U}from"./CIyUrgF0.js";import{bm as $}from"./2CQlphfn.js";class u extends Error{constructor(t){super(t.message);n(this,"code");n(this,"data");n(this,"rpcCode");this.name="BackendError",this.code=t.code,this.data=t.data,this.rpcCode=t.rpcCode}}function Ee(s){return!s||typeof s!="object"?!1:typeof s.rpcCode=="number"}const K=-32003;function Ce(s){return!s||typeof s!="object"?!1:s.rpcCode===K}const Ae=x.refine(s=>s.repository.provider==="github"&&s.kind==="pull-request"||s.repository.provider==="gitlab"&&s.kind==="merge-request"),Oe=J([T({state:C(["available","pending","reconnect-required","restricted","disabled","unsupported","unavailable","unknown"])}),T({state:_("backoff"),retryAt:b()}),T({state:_("unresolved"),reason:C(["missing-provenance","unverified-import","invalid-target","missing-authority","unknown"]).catch("unknown")})]).catch({state:"unknown"}),_e=T({backendId:b().min(1),sessionId:b().min(1),workspaceId:b().min(1)}).strict();function v(s){return typeof s=="number"&&Number.isSafeInteger(s)&&s>=1}function Ne(s){if(s.resource||s.monitorAvailability||s.title===null||s.url===null||s.lastSnapshot===null)return!1;const e=s.lastSnapshot;return!e||!e.availability&&e.isDraft!==null&&e.hasConflicts!==null&&e.isBehind!==null&&Object.values(e.checks).every(t=>t!==null)&&e.approvals.decision!==null&&e.approvals.have!==null&&e.approvals.changesRequested!==null}const Ie=new Set(["agent.getConversation","agent.listUserMessages","agent.getMessageBlock","chat.subscribe","chat.unsubscribe"]);class Y{constructor(e,t,i,o,a,d,R){n(this,"ready");n(this,"acknowledged",!1);n(this,"closed",!1);n(this,"id",0);n(this,"pending",new Map);n(this,"listeners",new Set);n(this,"rejectReady");n(this,"timer");this.socket=e,this.currentSource=o,this.timeoutMs=a,this.onFailure=R,this.ready=new Promise((m,r)=>{this.rejectReady=r,e.onopen=()=>{if(!this.current())return this.fail();this.send("client.hello",{clientId:t,connectionRole:"review-monitor",capabilities:{reviewMonitoring:i}}).then(f=>{const c=f;if(!this.current()||c?.clientId!==t||c?.connectionRole!=="review-monitor"||!v(c?.server?.capabilities?.reviewMonitoring))return this.fail();this.acknowledged=!0,clearTimeout(this.timer),m()},()=>this.fail())}}),this.timer=setTimeout(()=>this.fail(),d),e.onerror=()=>this.fail(),e.onclose=()=>this.fail(),e.onmessage=({data:m})=>{if(!this.current()||typeof m!="string")return;let r;try{r=JSON.parse(m)}catch{return}if(!r||typeof r!="object")return;if(typeof r.method=="string"){if(r.id!=null){try{e.send(JSON.stringify({jsonrpc:"2.0",id:r.id,error:{code:-32601,message:"Method not found"}}))}catch{this.fail()}return}if(this.acknowledged)for(const c of[...this.listeners])c({method:r.method,params:r.params});return}if(typeof r.id!="number")return;const f=this.pending.get(r.id);if(f)if(this.pending.delete(r.id),clearTimeout(f.timer),r.error){const c=r.error.data,g=c&&typeof c=="object"&&"code"in c&&typeof c.code=="string"?c.code:"SERVER_ERROR";f.reject(new u({code:g,message:typeof r.error.message=="string"?r.error.message:"Monitor request failed",data:c,rpcCode:typeof r.error.code=="number"?r.error.code:void 0}))}else f.resolve(r.result)}}current(){return!this.closed&&this.currentSource()}onNotification(e){return this.listeners.add(e),()=>this.listeners.delete(e)}request(e,t){return!this.acknowledged||e==="client.hello"?Promise.reject(this.unavailable()):this.send(e,t)}close(){if(this.closed)return;this.closed=!0,this.acknowledged=!1,clearTimeout(this.timer);const e=this.unavailable();this.rejectReady(e);for(const t of this.pending.values())clearTimeout(t.timer),t.reject(e);this.pending.clear(),this.listeners.clear(),this.socket.onopen=this.socket.onmessage=this.socket.onerror=this.socket.onclose=null;try{this.socket.close()}catch{}}fail(){this.closed||(this.close(),this.onFailure())}unavailable(){return new u({code:"PR_MONITOR_SESSION_RETIRED",message:"Monitor attachment unavailable"})}send(e,t){if(!this.current())return Promise.reject(this.unavailable());const i=++this.id;return new Promise((o,a)=>{const d=setTimeout(()=>{this.pending.delete(i),a(new u({code:"TIMEOUT",message:`JSON-RPC request timed out: ${e}`}))},this.timeoutMs);this.pending.set(i,{resolve:o,reject:a,timer:d});try{this.socket.send(JSON.stringify({jsonrpc:"2.0",id:i,method:e,params:t}))}catch{this.fail()}})}}const X=["agentNodes","localNodeIsolation","agentPlatformRouting","workspaceMembershipEvents","rawScreenshotRetention","chiefAttachments","noteTruncatedRead","remoteMachines","remoteInitialAgent","remoteMachineClaim","machineOrder","remoteLinkTraffic","cloudMachines","cloudMachineEntries","cloudMachineProviders"];function Q(s){return Object.freeze(Object.fromEntries(X.map(e=>[e,s?.[e]===1?1:0])))}function Z(s){if(!G(s,11,1))throw new Error($.files_secondaryRoot_unsupported_error())}function ee(s,e,t){te(s,e)&&Z(t)}function te(s,e){if(s!=="file.read"&&s!=="file.readChunk")return!1;const t=e?.gitRootId;return typeof t=="string"&&!!t.trim()}const N=-32012,se="system.startupStatus",ne=1e3,L=1e3,F=3e4,w=U().int().nonnegative().max(Number.MAX_SAFE_INTEGER),ie=T({completedNotes:w,totalNotes:w,processedSourceBytes:w,totalSourceBytes:w}).refine(s=>s.completedNotes<=s.totalNotes&&s.processedSourceBytes<=s.totalSourceBytes),oe=T({startupStatus:_(1),daemonVersion:b().min(1).optional(),attemptId:b().min(1),phase:C(["preparing","indexing","finalizing","ready","failed"]),elapsedMs:w,phaseElapsedMs:w,progressAgeMs:w,retryAfterMs:U().int().min(L).max(F).optional(),progress:ie.optional(),estimatedRemainingMs:w.optional(),finalizingStep:C(["anchors","committing","services"]).optional(),failure:T({code:b().min(1),message:b().min(1)}).optional()}).refine(s=>(s.phase==="ready"||s.phase==="failed"?s.retryAfterMs===void 0:s.retryAfterMs!==void 0)&&(s.phase==="finalizing"?s.finalizingStep!==void 0:s.finalizingStep===void 0)&&(s.phase==="failed"?s.failure!==void 0:s.failure===void 0)&&(s.estimatedRemainingMs===void 0||s.phase==="indexing"));function B(s){const e=oe.safeParse(s);return e.success?e.data:null}function P(s){const e=typeof s=="number"&&Number.isFinite(s)?s:ne;return Math.min(F,Math.max(L,e))}function re(s){const e=s;return typeof e.rpcCode=="number"?e.rpcCode:typeof e.code=="number"?e.code:void 0}function q(s){if(!s||typeof s!="object"||re(s)!==N)return;const e=s.data??{},t=B(e.startup);if(e.code==="daemon-startup-failed"){const i=e.startup?.failure?.message,o=s.message;return{kind:"failed",message:typeof i=="string"&&i.trim()?i:typeof o=="string"?o:"",snapshot:t}}if(!(e.code!=="daemon-not-ready"||e.retryable!==!0))return{kind:"not-ready",retryAfterMs:P(e.retryAfterMs),snapshot:t}}function D(s){const e=s.snapshot??void 0;return s.state==="failed"?{code:N,message:"Daemon startup failed",data:{code:"daemon-startup-failed",retryable:!1,startup:e}}:{code:N,message:"Daemon not ready",data:{code:"daemon-not-ready",retryable:!0,retryAfterMs:P(e?.retryAfterMs),startup:e}}}const ae=5e3,ce=5e3,le=3e4;function he(s){const e=s.snapshot;return JSON.stringify([s.state,s.available,e?.attemptId,e?.phase,e?.finalizingStep,e?.progress?.completedNotes,e?.progress?.totalNotes,e?.estimatedRemainingMs===void 0,(e?.progressAgeMs??0)>=le])}class ue{constructor(e){n(this,"generation",0);n(this,"timer",null);n(this,"snapshot",null);n(this,"lastKey",null);n(this,"lastPublishedAt",0);this.host=e}start(e){this.stop(),this.snapshot=e.snapshot??this.snapshot,this.publish({state:"starting",snapshot:this.snapshot,available:e.snapshot!==null},!0),this.schedule(e.retryAfterMs)}stop(){this.generation++,this.timer&&(clearTimeout(this.timer),this.timer=null)}reset(){this.stop(),this.snapshot=null,this.lastKey=null,this.lastPublishedAt=0}publish(e,t=!1){const i=he(e),o=Date.now();!t&&i===this.lastKey&&o-this.lastPublishedAt<ce||(this.lastKey=i,this.lastPublishedAt=o,this.host.publish(e))}schedule(e){const t=this.generation;this.timer=setTimeout(()=>{if(this.timer=null,t!==this.generation)return;const i=()=>this.poll(t);this.host.track?this.host.track(i):i()},e)}async poll(e){let t;try{t=B(await this.host.request())}catch(i){if(e!==this.generation)return;const o=q(i);if(o?.kind==="failed"){this.stop(),this.host.fail(o.message,o.snapshot);return}if(o?.kind==="not-ready"){this.snapshot=o.snapshot??this.snapshot,this.publish({state:"starting",snapshot:this.snapshot,available:o.snapshot!==null}),this.schedule(o.retryAfterMs);return}this.unavailable();return}if(e===this.generation){if(t===null){this.unavailable();return}if(this.snapshot=t,t.phase==="failed"){this.stop(),this.host.fail(t.failure?.message??"",t);return}if(t.phase==="ready"){this.stop(),this.publish({state:"starting",snapshot:t,available:!0},!0),this.host.handoff(!0);return}this.publish({state:"starting",snapshot:t,available:!0}),this.schedule(P(t.retryAfterMs))}}unavailable(){this.stop(),this.publish({state:"starting",snapshot:this.snapshot,available:!1},!0),this.host.handoff(!1)}}function Pe(s=(()=>{const e=globalThis.__INTENT_RUNTIME_CONFIG__;return e?.intentdWsUrl!==void 0?e.intentdWsUrl:typeof process>"u"?void 0:""})()){if(typeof s!="string")return;const e=s.trim();if(!e)return;if(e.startsWith("/")&&!e.startsWith("//")&&!e.includes("\\")){const o=globalThis.location;if(o?.host&&(o.protocol==="http:"||o.protocol==="https:"))return`${o.protocol==="https:"?"wss:":"ws:"}//${o.host}${e}`;console.warn("[browser-websocket-transport] Ignoring same-origin WebSocket path without an HTTP page origin");return}let t;try{t=new URL(e)}catch{console.warn("[browser-websocket-transport] Ignoring browser WebSocket URL: expected ws:// or wss://");return}if(t.protocol!=="ws:"&&t.protocol!=="wss:"){console.warn("[browser-websocket-transport] Ignoring browser WebSocket URL: expected ws:// or wss://");return}const i=t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]";if(t.protocol==="ws:"&&!i){console.warn("[browser-websocket-transport] Ignoring insecure remote WebSocket URL: use wss://");return}return e}function de(s){try{const e=new URL(s);return e.username="",e.password="",e.search="",e.hash="",e.toString()}catch{return s.replace(/[?#].*$/,"").replace(/^([a-z][a-z0-9+.-]*:\/\/)[^/]*@/i,"$1")}}const fe={[-32700]:"PARSE_ERROR",[-32600]:"INVALID_REQUEST",[-32601]:"METHOD_NOT_FOUND",[-32602]:"INVALID_PARAMS",[-32603]:"INTERNAL_ERROR"};function pe(s){const e=fe[s];return e||(s<=-32e3&&s>=-32099?"SERVER_ERROR":"UNKNOWN_ERROR")}function me(s){if(s&&typeof s=="object"&&"code"in s){const e=s.code;if(typeof e=="string"&&e.length>0)return e}}function O(s){const e=me(s.data)??pe(s.code),t=s.data&&typeof s.data=="object"?{...s.data,code:e}:typeof s.data=="string"&&s.data.length>0?{code:e,detail:s.data}:{code:e};return{code:e,message:s.message,data:t,rpcCode:s.code}}function E(s){if(s instanceof u)return s;const e=s instanceof Error?s.message:String(s);return new u({code:"TRANSPORT_ERROR",message:e,data:{code:"TRANSPORT_ERROR"}})}const ge=3e4,Re=1e3,ye=3e4,Se=1e4,be=5e3;class we{constructor(e){n(this,"url");n(this,"webSocketFactory");n(this,"requestTimeoutMs");n(this,"reconnectDelayMs");n(this,"maxReconnectDelayMs");n(this,"connectTimeoutMs");n(this,"socket",null);n(this,"connected",!1);n(this,"connecting",!1);n(this,"disposed",!1);n(this,"requestId",0);n(this,"currentReconnectDelay");n(this,"reconnectTimer",null);n(this,"connectTimer",null);n(this,"connectWaiters",[]);n(this,"clientId");n(this,"helloConfirmed",!1);n(this,"acknowledgedHello",null);n(this,"nodeCapabilities",null);n(this,"capabilityHelloGeneration",0);n(this,"reviewMonitoring");n(this,"reviewMonitoringRecipient");n(this,"reviewMonitoringEnabled",!1);n(this,"ordinaryHello",!1);n(this,"monitorRetry",null);n(this,"monitorRetirements",new Set);n(this,"monitorReady",new Set);n(this,"protocolVersion",null);n(this,"helloError",new u({code:"UNAVAILABLE",message:"client.hello has not completed on this connection"}));n(this,"pending",new Map);n(this,"hasBeenConnected",!1);n(this,"hasConnectionFailed",!1);n(this,"notificationHandlers",new Set);n(this,"reconnectedHandlers",new Set);n(this,"statusHandlers",new Set);n(this,"lastNotifiedStatus","disconnected");n(this,"startupState",null);n(this,"startupSocket",null);n(this,"startupPoller",new ue({request:()=>{const e=this.startupSocket;return e?this.requestOnSocket(se,void 0,{timeoutMs:ae},e):Promise.reject(this.startupRefusal())},publish:e=>this.updateStartup(e),handoff:e=>this.startupHandoff(e),fail:(e,t)=>this.failStartup(e,t)}));n(this,"startupHandlers",new Set);this.reviewMonitoringEnabled=v(e.reviewMonitoring),this.reviewMonitoringRecipient=v(e.reviewMonitoring)?e.reviewMonitoring:void 0,this.url=e.url,this.webSocketFactory=e.webSocketFactory??(t=>new WebSocket(t)),this.requestTimeoutMs=e.requestTimeoutMs??ge,this.reconnectDelayMs=e.reconnectDelayMs??Re,this.maxReconnectDelayMs=e.maxReconnectDelayMs??ye,this.connectTimeoutMs=e.connectTimeoutMs??Se,this.currentReconnectDelay=this.reconnectDelayMs}isAvailable(){return!this.disposed}async readPrincipal(){if(this.disposed)throw new u({code:"UNAVAILABLE",message:"Backend transport disposed"});const e=await this.ensureConnected(),t=this.capabilityHelloGeneration,i=structuredClone(this.acknowledgedHello),o=()=>!this.disposed&&this.connected&&this.socket===e&&this.capabilityHelloGeneration===t&&this.acknowledgedHello!==null;if(!o())throw this.helloError;const a=await this.requestOnSocket("principal.me",{},void 0,e);if(!o())throw new u({code:"UNAVAILABLE",message:"Principal discovery connection changed"});return{hello:i,principal:a}}async observeNodeCapabilities(){if(this.disposed)throw new u({code:"UNAVAILABLE",message:"Backend transport disposed"});const e=await this.ensureConnected();if(this.disposed||!this.connected||this.socket!==e)throw new u({code:"UNAVAILABLE",message:"Backend connection changed"});return{server:{capabilities:this.nodeCapabilities}}}onMonitorReconnected(e){this.monitorReady.add(e);const t=this.onReconnected(e);return()=>{this.monitorReady.delete(e),t()}}prMonitorBackendId(){return de(this.url)}async capturePrMonitorSession(e){const t=await this.ensureConnected(),i=this.capabilityHelloGeneration,o=()=>new u({code:"PR_MONITOR_SESSION_RETIRED",message:"Monitor connection unavailable"});let a,d=!1;const R=new Set,m=new Set,r=()=>{if(!d){d=!0,this.monitorRetirements.delete(r),a?.close();for(const l of R)l();R.clear()}},f=()=>!d&&!this.disposed&&this.connected&&this.helloConfirmed&&this.socket===t&&i===this.capabilityHelloGeneration,c=()=>f()&&(!a||a.current());if(!c())throw o();this.monitorRetirements.add(r);const g=v(this.reviewMonitoring);let M=g?"consumer-pending":"unsupported";if(g&&this.reviewMonitoringEnabled&&this.ordinaryHello&&this.clientId)try{if(a=new Y(this.webSocketFactory(this.url),this.clientId,Math.min(this.reviewMonitoringRecipient,this.reviewMonitoring),f,this.requestTimeoutMs,this.connectTimeoutMs,()=>{const l=f();r(),l&&this.scheduleMonitorRecovery(t,i)}),await a.ready,!c())throw o();M="supported"}catch(l){const p=f();throw r(),p&&this.scheduleMonitorRecovery(t,i),l}const y=(l,p)=>a?a.request(l,p):this.requestOnSocket(l,p,void 0,t);return{origin:{backendId:this.prMonitorBackendId(),sessionId:crypto.randomUUID(),workspaceId:e},support:M,onRetired(l){return c()?(R.add(l),()=>{R.delete(l)}):(l(),()=>{})},onNotification:l=>(a??this).onNotification(p=>{c()&&l(p)}),request:async(l,p)=>{if(!c()||M==="consumer-pending"||p.workspaceId!==e)throw o();const k=await y(l,p),h=l==="events.subscribe"?k?.subscriptionId:void 0;if(!c())throw h&&this.socket===t&&this.connected&&i===this.capabilityHelloGeneration&&y("events.unsubscribe",{workspaceId:e,subscriptionId:h}).catch(()=>{}),o();return h&&m.add(h),l==="events.unsubscribe"&&m.delete(String(p.subscriptionId)),k},release:async()=>{const l=c();r(),l&&!a&&await Promise.all([...m].map(p=>this.requestOnSocket("events.unsubscribe",{workspaceId:e,subscriptionId:p},void 0,t).catch(()=>{})))}}}request(e,t,i){return this.requestOnSocket(e,t,i)}requestOnSocket(e,t,i,o){if(i?.localMachine)return Promise.reject(new u({code:"UNAVAILABLE",message:"Local machine requests require the desktop bridge"}));if(this.disposed)return Promise.reject(new u({code:"UNAVAILABLE",message:"Backend transport disposed"}));if(!o&&this.startupState?.state==="starting")return Promise.reject(new u(O(D(this.startupState))));const a=++this.requestId,d=i?.timeoutMs,R=typeof d=="number"&&Number.isFinite(d)&&d>0?d:this.requestTimeoutMs;return new Promise((m,r)=>{let f=!1;const c=setTimeout(()=>{f=!0,this.pending.delete(a),r(new u({code:"TIMEOUT",message:`JSON-RPC request timed out: ${e}`,data:{code:"TIMEOUT"}}))},R),g=y=>{clearTimeout(c),r(E(y))},M=y=>{if(f)return;if(this.disposed||this.socket!==y){g(new u({code:"TRANSPORT_ERROR",message:"Connection replaced"}));return}if(e==="presence.update"&&!this.helloConfirmed){g(this.helloError);return}try{ee(e,t,this.protocolVersion)}catch(h){g(h);return}let l=e==="client.hello"&&this.clientId?{clientId:this.clientId,...t}:t;if(e==="client.hello"){const h={...l},S={...h.capabilities};Object.prototype.hasOwnProperty.call(S,"reviewMonitoring")&&(this.reviewMonitoringEnabled=this.reviewMonitoringRecipient!==void 0&&v(S.reviewMonitoring)),delete S.reviewMonitoring,delete h.connectionRole,h.capabilities!==void 0&&(h.capabilities=S),l=h}const p=JSON.stringify({jsonrpc:"2.0",id:a,method:e,params:l}),k=e==="client.hello"?++this.capabilityHelloGeneration:0;if(e==="client.hello"){this.helloConfirmed=!1,this.ordinaryHello=!1,this.clearMonitorRecovery(),this.nodeCapabilities=null,this.reviewMonitoring=void 0;for(const h of[...this.monitorRetirements])h();this.acknowledgedHello=null}this.pending.set(a,{method:e,timeout:c,resolve:h=>{if(e==="client.hello"&&this.socket===y&&k===this.capabilityHelloGeneration){const S=h?.clientId;if(typeof S=="string"&&S.length>0){const H=h.server?.capabilities;if(this.clientId=S,this.reviewMonitoring=H?.reviewMonitoring,this.ordinaryHello=h.connectionRole===void 0,this.acknowledgedHello=structuredClone(h),this.nodeCapabilities=Q(H),this.protocolVersion=z(h.protocolVersion),this.helloConfirmed=!0,this.connected)for(const W of this.monitorReady)W()}}m(h)},reject:r});try{y.send(p)}catch(h){clearTimeout(c),this.pending.delete(a),r(E(h))}};o?M(o):this.connected&&this.socket?M(this.socket):this.ensureConnected().then(M,g)})}async subscribe(e){return this.request("events.subscribe",e)}async unsubscribe(e,t){try{await this.request("events.unsubscribe",{subscriptionId:e,...t!==void 0?{workspaceId:t}:{}})}catch{}}onNotification(e){return this.notificationHandlers.add(e),()=>this.notificationHandlers.delete(e)}onReconnected(e){return this.reconnectedHandlers.add(e),()=>this.reconnectedHandlers.delete(e)}getConnectionStatus(){return this.connected?"connected":this.connecting?"connecting":"disconnected"}getStartupState(){return this.startupState}onStartupChange(e){return this.startupHandlers.add(e),()=>this.startupHandlers.delete(e)}onConnectionStatusChange(e){return this.statusHandlers.add(e),()=>this.statusHandlers.delete(e)}dispose(){if(this.disposed)return;this.disposed=!0,this.clearReconnect(),this.clearConnectTimer();const e=new u({code:"UNAVAILABLE",message:"Backend transport disposed"});this.failPending(e),this.failWaiters(e),this.teardownSocket(),this.connected=!1,this.connecting=!1,this.notifyStatusChange(),this.notificationHandlers.clear(),this.reconnectedHandlers.clear(),this.statusHandlers.clear(),this.startupHandlers.clear()}ensureConnected(){return this.connected&&this.socket?Promise.resolve(this.socket):new Promise((e,t)=>{this.connectWaiters.push({resolve:e,reject:t}),this.start()})}start(){this.disposed||this.socket||this.connecting||this.reconnectTimer||this.connect()}connect(){this.clearReconnect(),this.connecting=!0,this.notifyStatusChange();let e;try{e=this.webSocketFactory(this.url)}catch(t){this.connecting=!1,this.onConnectionFailure(E(t));return}this.socket=e,this.helloConfirmed=!1,this.connectTimer=setTimeout(()=>{this.connectTimer=null,!(this.socket!==e||this.connected)&&(this.connecting=!1,this.onConnectionFailure(new u({code:"TRANSPORT_ERROR",message:`WebSocket connect attempt timed out after ${this.connectTimeoutMs}ms`})))},this.connectTimeoutMs),e.onopen=()=>{this.socket===e&&this.onConnected(e)},e.onmessage=t=>{this.socket===e&&this.onMessage(t.data)},e.onerror=null,e.onclose=()=>{this.socket===e&&(this.connecting=!1,this.onConnectionFailure(new u({code:"TRANSPORT_ERROR",message:"WebSocket connection closed"})))}}onConnected(e){this.clearConnectTimer(),this.performHelloHandshake(e)}async performHelloHandshake(e){try{await this.requestOnSocket("client.hello",{},{timeoutMs:Math.min(this.requestTimeoutMs,be)},e)}catch(o){if(this.disposed||this.socket!==e)return;const a=q(o);if(a){this.enterStartup(e,a);return}this.helloError=E(o)}if(this.disposed||this.socket!==e)return;this.startupPoller.reset(),this.startupSocket=null;const t=this.startupState!==null;this.startupState=null,this.connecting=!1,this.connected=!0,this.currentReconnectDelay=this.reconnectDelayMs;const i=this.hasBeenConnected||this.hasConnectionFailed;if(this.hasBeenConnected=!0,this.hasConnectionFailed=!1,this.notifyStatusChange(),t)for(const o of[...this.startupHandlers])o(null);if(this.flushWaiters(e),i)for(const o of[...this.reconnectedHandlers])o()}onConnectionFailure(e){if(this.clearConnectTimer(),!this.disposed){if(this.startupSocket!==null&&this.startupSocket===this.socket){this.startupHandoff(!0);return}this.startupState?.state==="starting"&&(this.startupPoller.reset(),this.updateStartup(null)),this.hasConnectionFailed=!0,this.connected=!1,this.notifyStatusChange(),this.teardownSocket(),this.failPending(e),this.failWaiters(e),this.scheduleReconnect()}}notifyStatusChange(){const e=this.getConnectionStatus();if(e!==this.lastNotifiedStatus){this.lastNotifiedStatus=e;for(const t of[...this.statusHandlers])t(e)}}onMessage(e){if(typeof e!="string")return;let t;try{t=JSON.parse(e)}catch{console.warn("[browser-websocket-transport] Dropping unparseable frame");return}if(!t||typeof t!="object")return;const i=typeof t.method=="string",o=t.id!=null;if(i&&o){this.sendFrame({jsonrpc:"2.0",id:t.id,error:{code:-32601,message:`Method not found: ${String(t.method)}`}});return}if(o){const a=Number(t.id),d=this.pending.get(a);if(!d)return;this.pending.delete(a),clearTimeout(d.timeout),t.error?d.reject(new u(O(t.error))):d.resolve(t.result);return}if(i){const a={method:t.method,params:t.params};for(const d of[...this.notificationHandlers])d(a)}}sendFrame(e){try{this.socket?.send(JSON.stringify(e))}catch{}}scheduleReconnect(){if(this.disposed||this.reconnectTimer)return;const e=this.currentReconnectDelay;this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.currentReconnectDelay=Math.min(e*2,this.maxReconnectDelayMs),this.disposed||this.connect()},e)}clearReconnect(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}clearConnectTimer(){this.connectTimer&&(clearTimeout(this.connectTimer),this.connectTimer=null)}scheduleMonitorRecovery(e,t){this.monitorRetry||this.disposed||(this.monitorRetry=setTimeout(()=>{if(this.monitorRetry=null,!this.disposed&&this.connected&&this.socket===e&&this.capabilityHelloGeneration===t)for(const i of[...this.monitorReady])i()},this.reconnectDelayMs))}clearMonitorRecovery(){this.monitorRetry&&clearTimeout(this.monitorRetry),this.monitorRetry=null}teardownSocket(){this.startupPoller.stop(),this.startupSocket=null,this.reviewMonitoring=void 0,this.clearMonitorRecovery();for(const t of[...this.monitorRetirements])t();if(this.acknowledgedHello=null,this.nodeCapabilities=null,this.capabilityHelloGeneration+=1,this.protocolVersion=null,!this.socket)return;const e=this.socket;this.socket=null,e.onopen=null,e.onmessage=null,e.onerror=null,e.onclose=null;try{e.close()}catch{}}updateStartup(e){this.startupState=e?Object.freeze({...e}):null;for(const t of[...this.startupHandlers])t(this.startupState)}startupRefusal(){return this.startupState?new u(O(D(this.startupState))):new u({code:"TRANSPORT_ERROR",message:"WebSocket connection closed"})}enterStartup(e,t){if(this.hasConnectionFailed=!0,t.kind==="failed"){this.failStartup(t.message,t.snapshot);return}this.startupSocket=e,this.startupPoller.start(t),this.failWaiters(this.startupRefusal())}startupHandoff(e){const t=this.startupRefusal();if(this.teardownSocket(),this.failPending(t),this.disposed)return;this.connecting=!0,this.notifyStatusChange(),this.clearReconnect();let i=this.reconnectDelayMs;e?this.currentReconnectDelay=this.reconnectDelayMs:(i=this.currentReconnectDelay,this.currentReconnectDelay=Math.min(i*2,this.maxReconnectDelayMs)),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.disposed||this.connect()},i)}failStartup(e,t){this.startupPoller.stop(),this.startupSocket=null,this.hasConnectionFailed=!0,this.updateStartup({state:"failed",snapshot:t,available:t!==null,message:e}),this.connecting=!1,this.onConnectionFailure(this.startupRefusal())}failPending(e){for(const t of this.pending.values())clearTimeout(t.timeout),t.reject(e);this.pending.clear()}flushWaiters(e){const t=this.connectWaiters;this.connectWaiters=[];for(const i of t)i.resolve(e)}failWaiters(e){const t=this.connectWaiters;this.connectWaiters=[];for(const i of t)i.reject(e)}}function He(s){return new we(s)}let A=null;const I=new Set;function De(s){A=s;for(const e of[...I])e(s)}function Ue(){return A}function Le(s){return I.add(s),A&&s(A),()=>I.delete(s)}export{u as B,Oe as M,_e as P,Ie as R,Ae as a,Ce as b,He as c,Ne as d,Pe as e,v as f,Ue as g,Ee as i,Le as o,De as r,de as s};
1
+ var j=Object.defineProperty;var V=(s,e,t)=>e in s?j(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var n=(s,e,t)=>V(s,typeof e!="symbol"?e+"":e,t);import{f as x,j as G,p as z}from"./uXuxG9cN.js";import{u as J,o as T,_ as C,s as b,l as _,n as U}from"./CIyUrgF0.js";import{bm as $}from"./CHWIPzMj.js";class u extends Error{constructor(t){super(t.message);n(this,"code");n(this,"data");n(this,"rpcCode");this.name="BackendError",this.code=t.code,this.data=t.data,this.rpcCode=t.rpcCode}}function Ee(s){return!s||typeof s!="object"?!1:typeof s.rpcCode=="number"}const K=-32003;function Ce(s){return!s||typeof s!="object"?!1:s.rpcCode===K}const Ae=x.refine(s=>s.repository.provider==="github"&&s.kind==="pull-request"||s.repository.provider==="gitlab"&&s.kind==="merge-request"),Oe=J([T({state:C(["available","pending","reconnect-required","restricted","disabled","unsupported","unavailable","unknown"])}),T({state:_("backoff"),retryAt:b()}),T({state:_("unresolved"),reason:C(["missing-provenance","unverified-import","invalid-target","missing-authority","unknown"]).catch("unknown")})]).catch({state:"unknown"}),_e=T({backendId:b().min(1),sessionId:b().min(1),workspaceId:b().min(1)}).strict();function v(s){return typeof s=="number"&&Number.isSafeInteger(s)&&s>=1}function Ne(s){if(s.resource||s.monitorAvailability||s.title===null||s.url===null||s.lastSnapshot===null)return!1;const e=s.lastSnapshot;return!e||!e.availability&&e.isDraft!==null&&e.hasConflicts!==null&&e.isBehind!==null&&Object.values(e.checks).every(t=>t!==null)&&e.approvals.decision!==null&&e.approvals.have!==null&&e.approvals.changesRequested!==null}const Ie=new Set(["agent.getConversation","agent.listUserMessages","agent.getMessageBlock","chat.subscribe","chat.unsubscribe"]);class Y{constructor(e,t,i,o,a,d,R){n(this,"ready");n(this,"acknowledged",!1);n(this,"closed",!1);n(this,"id",0);n(this,"pending",new Map);n(this,"listeners",new Set);n(this,"rejectReady");n(this,"timer");this.socket=e,this.currentSource=o,this.timeoutMs=a,this.onFailure=R,this.ready=new Promise((m,r)=>{this.rejectReady=r,e.onopen=()=>{if(!this.current())return this.fail();this.send("client.hello",{clientId:t,connectionRole:"review-monitor",capabilities:{reviewMonitoring:i}}).then(f=>{const c=f;if(!this.current()||c?.clientId!==t||c?.connectionRole!=="review-monitor"||!v(c?.server?.capabilities?.reviewMonitoring))return this.fail();this.acknowledged=!0,clearTimeout(this.timer),m()},()=>this.fail())}}),this.timer=setTimeout(()=>this.fail(),d),e.onerror=()=>this.fail(),e.onclose=()=>this.fail(),e.onmessage=({data:m})=>{if(!this.current()||typeof m!="string")return;let r;try{r=JSON.parse(m)}catch{return}if(!r||typeof r!="object")return;if(typeof r.method=="string"){if(r.id!=null){try{e.send(JSON.stringify({jsonrpc:"2.0",id:r.id,error:{code:-32601,message:"Method not found"}}))}catch{this.fail()}return}if(this.acknowledged)for(const c of[...this.listeners])c({method:r.method,params:r.params});return}if(typeof r.id!="number")return;const f=this.pending.get(r.id);if(f)if(this.pending.delete(r.id),clearTimeout(f.timer),r.error){const c=r.error.data,g=c&&typeof c=="object"&&"code"in c&&typeof c.code=="string"?c.code:"SERVER_ERROR";f.reject(new u({code:g,message:typeof r.error.message=="string"?r.error.message:"Monitor request failed",data:c,rpcCode:typeof r.error.code=="number"?r.error.code:void 0}))}else f.resolve(r.result)}}current(){return!this.closed&&this.currentSource()}onNotification(e){return this.listeners.add(e),()=>this.listeners.delete(e)}request(e,t){return!this.acknowledged||e==="client.hello"?Promise.reject(this.unavailable()):this.send(e,t)}close(){if(this.closed)return;this.closed=!0,this.acknowledged=!1,clearTimeout(this.timer);const e=this.unavailable();this.rejectReady(e);for(const t of this.pending.values())clearTimeout(t.timer),t.reject(e);this.pending.clear(),this.listeners.clear(),this.socket.onopen=this.socket.onmessage=this.socket.onerror=this.socket.onclose=null;try{this.socket.close()}catch{}}fail(){this.closed||(this.close(),this.onFailure())}unavailable(){return new u({code:"PR_MONITOR_SESSION_RETIRED",message:"Monitor attachment unavailable"})}send(e,t){if(!this.current())return Promise.reject(this.unavailable());const i=++this.id;return new Promise((o,a)=>{const d=setTimeout(()=>{this.pending.delete(i),a(new u({code:"TIMEOUT",message:`JSON-RPC request timed out: ${e}`}))},this.timeoutMs);this.pending.set(i,{resolve:o,reject:a,timer:d});try{this.socket.send(JSON.stringify({jsonrpc:"2.0",id:i,method:e,params:t}))}catch{this.fail()}})}}const X=["agentNodes","localNodeIsolation","agentPlatformRouting","workspaceMembershipEvents","rawScreenshotRetention","chiefAttachments","noteTruncatedRead","remoteMachines","remoteInitialAgent","remoteMachineClaim","machineOrder","remoteLinkTraffic","cloudMachines","cloudMachineEntries","cloudMachineProviders"];function Q(s){return Object.freeze(Object.fromEntries(X.map(e=>[e,s?.[e]===1?1:0])))}function Z(s){if(!G(s,11,1))throw new Error($.files_secondaryRoot_unsupported_error())}function ee(s,e,t){te(s,e)&&Z(t)}function te(s,e){if(s!=="file.read"&&s!=="file.readChunk")return!1;const t=e?.gitRootId;return typeof t=="string"&&!!t.trim()}const N=-32012,se="system.startupStatus",ne=1e3,L=1e3,F=3e4,w=U().int().nonnegative().max(Number.MAX_SAFE_INTEGER),ie=T({completedNotes:w,totalNotes:w,processedSourceBytes:w,totalSourceBytes:w}).refine(s=>s.completedNotes<=s.totalNotes&&s.processedSourceBytes<=s.totalSourceBytes),oe=T({startupStatus:_(1),daemonVersion:b().min(1).optional(),attemptId:b().min(1),phase:C(["preparing","indexing","finalizing","ready","failed"]),elapsedMs:w,phaseElapsedMs:w,progressAgeMs:w,retryAfterMs:U().int().min(L).max(F).optional(),progress:ie.optional(),estimatedRemainingMs:w.optional(),finalizingStep:C(["anchors","committing","services"]).optional(),failure:T({code:b().min(1),message:b().min(1)}).optional()}).refine(s=>(s.phase==="ready"||s.phase==="failed"?s.retryAfterMs===void 0:s.retryAfterMs!==void 0)&&(s.phase==="finalizing"?s.finalizingStep!==void 0:s.finalizingStep===void 0)&&(s.phase==="failed"?s.failure!==void 0:s.failure===void 0)&&(s.estimatedRemainingMs===void 0||s.phase==="indexing"));function B(s){const e=oe.safeParse(s);return e.success?e.data:null}function P(s){const e=typeof s=="number"&&Number.isFinite(s)?s:ne;return Math.min(F,Math.max(L,e))}function re(s){const e=s;return typeof e.rpcCode=="number"?e.rpcCode:typeof e.code=="number"?e.code:void 0}function q(s){if(!s||typeof s!="object"||re(s)!==N)return;const e=s.data??{},t=B(e.startup);if(e.code==="daemon-startup-failed"){const i=e.startup?.failure?.message,o=s.message;return{kind:"failed",message:typeof i=="string"&&i.trim()?i:typeof o=="string"?o:"",snapshot:t}}if(!(e.code!=="daemon-not-ready"||e.retryable!==!0))return{kind:"not-ready",retryAfterMs:P(e.retryAfterMs),snapshot:t}}function D(s){const e=s.snapshot??void 0;return s.state==="failed"?{code:N,message:"Daemon startup failed",data:{code:"daemon-startup-failed",retryable:!1,startup:e}}:{code:N,message:"Daemon not ready",data:{code:"daemon-not-ready",retryable:!0,retryAfterMs:P(e?.retryAfterMs),startup:e}}}const ae=5e3,ce=5e3,le=3e4;function he(s){const e=s.snapshot;return JSON.stringify([s.state,s.available,e?.attemptId,e?.phase,e?.finalizingStep,e?.progress?.completedNotes,e?.progress?.totalNotes,e?.estimatedRemainingMs===void 0,(e?.progressAgeMs??0)>=le])}class ue{constructor(e){n(this,"generation",0);n(this,"timer",null);n(this,"snapshot",null);n(this,"lastKey",null);n(this,"lastPublishedAt",0);this.host=e}start(e){this.stop(),this.snapshot=e.snapshot??this.snapshot,this.publish({state:"starting",snapshot:this.snapshot,available:e.snapshot!==null},!0),this.schedule(e.retryAfterMs)}stop(){this.generation++,this.timer&&(clearTimeout(this.timer),this.timer=null)}reset(){this.stop(),this.snapshot=null,this.lastKey=null,this.lastPublishedAt=0}publish(e,t=!1){const i=he(e),o=Date.now();!t&&i===this.lastKey&&o-this.lastPublishedAt<ce||(this.lastKey=i,this.lastPublishedAt=o,this.host.publish(e))}schedule(e){const t=this.generation;this.timer=setTimeout(()=>{if(this.timer=null,t!==this.generation)return;const i=()=>this.poll(t);this.host.track?this.host.track(i):i()},e)}async poll(e){let t;try{t=B(await this.host.request())}catch(i){if(e!==this.generation)return;const o=q(i);if(o?.kind==="failed"){this.stop(),this.host.fail(o.message,o.snapshot);return}if(o?.kind==="not-ready"){this.snapshot=o.snapshot??this.snapshot,this.publish({state:"starting",snapshot:this.snapshot,available:o.snapshot!==null}),this.schedule(o.retryAfterMs);return}this.unavailable();return}if(e===this.generation){if(t===null){this.unavailable();return}if(this.snapshot=t,t.phase==="failed"){this.stop(),this.host.fail(t.failure?.message??"",t);return}if(t.phase==="ready"){this.stop(),this.publish({state:"starting",snapshot:t,available:!0},!0),this.host.handoff(!0);return}this.publish({state:"starting",snapshot:t,available:!0}),this.schedule(P(t.retryAfterMs))}}unavailable(){this.stop(),this.publish({state:"starting",snapshot:this.snapshot,available:!1},!0),this.host.handoff(!1)}}function Pe(s=(()=>{const e=globalThis.__INTENT_RUNTIME_CONFIG__;return e?.intentdWsUrl!==void 0?e.intentdWsUrl:typeof process>"u"?void 0:""})()){if(typeof s!="string")return;const e=s.trim();if(!e)return;if(e.startsWith("/")&&!e.startsWith("//")&&!e.includes("\\")){const o=globalThis.location;if(o?.host&&(o.protocol==="http:"||o.protocol==="https:"))return`${o.protocol==="https:"?"wss:":"ws:"}//${o.host}${e}`;console.warn("[browser-websocket-transport] Ignoring same-origin WebSocket path without an HTTP page origin");return}let t;try{t=new URL(e)}catch{console.warn("[browser-websocket-transport] Ignoring browser WebSocket URL: expected ws:// or wss://");return}if(t.protocol!=="ws:"&&t.protocol!=="wss:"){console.warn("[browser-websocket-transport] Ignoring browser WebSocket URL: expected ws:// or wss://");return}const i=t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]";if(t.protocol==="ws:"&&!i){console.warn("[browser-websocket-transport] Ignoring insecure remote WebSocket URL: use wss://");return}return e}function de(s){try{const e=new URL(s);return e.username="",e.password="",e.search="",e.hash="",e.toString()}catch{return s.replace(/[?#].*$/,"").replace(/^([a-z][a-z0-9+.-]*:\/\/)[^/]*@/i,"$1")}}const fe={[-32700]:"PARSE_ERROR",[-32600]:"INVALID_REQUEST",[-32601]:"METHOD_NOT_FOUND",[-32602]:"INVALID_PARAMS",[-32603]:"INTERNAL_ERROR"};function pe(s){const e=fe[s];return e||(s<=-32e3&&s>=-32099?"SERVER_ERROR":"UNKNOWN_ERROR")}function me(s){if(s&&typeof s=="object"&&"code"in s){const e=s.code;if(typeof e=="string"&&e.length>0)return e}}function O(s){const e=me(s.data)??pe(s.code),t=s.data&&typeof s.data=="object"?{...s.data,code:e}:typeof s.data=="string"&&s.data.length>0?{code:e,detail:s.data}:{code:e};return{code:e,message:s.message,data:t,rpcCode:s.code}}function E(s){if(s instanceof u)return s;const e=s instanceof Error?s.message:String(s);return new u({code:"TRANSPORT_ERROR",message:e,data:{code:"TRANSPORT_ERROR"}})}const ge=3e4,Re=1e3,ye=3e4,Se=1e4,be=5e3;class we{constructor(e){n(this,"url");n(this,"webSocketFactory");n(this,"requestTimeoutMs");n(this,"reconnectDelayMs");n(this,"maxReconnectDelayMs");n(this,"connectTimeoutMs");n(this,"socket",null);n(this,"connected",!1);n(this,"connecting",!1);n(this,"disposed",!1);n(this,"requestId",0);n(this,"currentReconnectDelay");n(this,"reconnectTimer",null);n(this,"connectTimer",null);n(this,"connectWaiters",[]);n(this,"clientId");n(this,"helloConfirmed",!1);n(this,"acknowledgedHello",null);n(this,"nodeCapabilities",null);n(this,"capabilityHelloGeneration",0);n(this,"reviewMonitoring");n(this,"reviewMonitoringRecipient");n(this,"reviewMonitoringEnabled",!1);n(this,"ordinaryHello",!1);n(this,"monitorRetry",null);n(this,"monitorRetirements",new Set);n(this,"monitorReady",new Set);n(this,"protocolVersion",null);n(this,"helloError",new u({code:"UNAVAILABLE",message:"client.hello has not completed on this connection"}));n(this,"pending",new Map);n(this,"hasBeenConnected",!1);n(this,"hasConnectionFailed",!1);n(this,"notificationHandlers",new Set);n(this,"reconnectedHandlers",new Set);n(this,"statusHandlers",new Set);n(this,"lastNotifiedStatus","disconnected");n(this,"startupState",null);n(this,"startupSocket",null);n(this,"startupPoller",new ue({request:()=>{const e=this.startupSocket;return e?this.requestOnSocket(se,void 0,{timeoutMs:ae},e):Promise.reject(this.startupRefusal())},publish:e=>this.updateStartup(e),handoff:e=>this.startupHandoff(e),fail:(e,t)=>this.failStartup(e,t)}));n(this,"startupHandlers",new Set);this.reviewMonitoringEnabled=v(e.reviewMonitoring),this.reviewMonitoringRecipient=v(e.reviewMonitoring)?e.reviewMonitoring:void 0,this.url=e.url,this.webSocketFactory=e.webSocketFactory??(t=>new WebSocket(t)),this.requestTimeoutMs=e.requestTimeoutMs??ge,this.reconnectDelayMs=e.reconnectDelayMs??Re,this.maxReconnectDelayMs=e.maxReconnectDelayMs??ye,this.connectTimeoutMs=e.connectTimeoutMs??Se,this.currentReconnectDelay=this.reconnectDelayMs}isAvailable(){return!this.disposed}async readPrincipal(){if(this.disposed)throw new u({code:"UNAVAILABLE",message:"Backend transport disposed"});const e=await this.ensureConnected(),t=this.capabilityHelloGeneration,i=structuredClone(this.acknowledgedHello),o=()=>!this.disposed&&this.connected&&this.socket===e&&this.capabilityHelloGeneration===t&&this.acknowledgedHello!==null;if(!o())throw this.helloError;const a=await this.requestOnSocket("principal.me",{},void 0,e);if(!o())throw new u({code:"UNAVAILABLE",message:"Principal discovery connection changed"});return{hello:i,principal:a}}async observeNodeCapabilities(){if(this.disposed)throw new u({code:"UNAVAILABLE",message:"Backend transport disposed"});const e=await this.ensureConnected();if(this.disposed||!this.connected||this.socket!==e)throw new u({code:"UNAVAILABLE",message:"Backend connection changed"});return{server:{capabilities:this.nodeCapabilities}}}onMonitorReconnected(e){this.monitorReady.add(e);const t=this.onReconnected(e);return()=>{this.monitorReady.delete(e),t()}}prMonitorBackendId(){return de(this.url)}async capturePrMonitorSession(e){const t=await this.ensureConnected(),i=this.capabilityHelloGeneration,o=()=>new u({code:"PR_MONITOR_SESSION_RETIRED",message:"Monitor connection unavailable"});let a,d=!1;const R=new Set,m=new Set,r=()=>{if(!d){d=!0,this.monitorRetirements.delete(r),a?.close();for(const l of R)l();R.clear()}},f=()=>!d&&!this.disposed&&this.connected&&this.helloConfirmed&&this.socket===t&&i===this.capabilityHelloGeneration,c=()=>f()&&(!a||a.current());if(!c())throw o();this.monitorRetirements.add(r);const g=v(this.reviewMonitoring);let M=g?"consumer-pending":"unsupported";if(g&&this.reviewMonitoringEnabled&&this.ordinaryHello&&this.clientId)try{if(a=new Y(this.webSocketFactory(this.url),this.clientId,Math.min(this.reviewMonitoringRecipient,this.reviewMonitoring),f,this.requestTimeoutMs,this.connectTimeoutMs,()=>{const l=f();r(),l&&this.scheduleMonitorRecovery(t,i)}),await a.ready,!c())throw o();M="supported"}catch(l){const p=f();throw r(),p&&this.scheduleMonitorRecovery(t,i),l}const y=(l,p)=>a?a.request(l,p):this.requestOnSocket(l,p,void 0,t);return{origin:{backendId:this.prMonitorBackendId(),sessionId:crypto.randomUUID(),workspaceId:e},support:M,onRetired(l){return c()?(R.add(l),()=>{R.delete(l)}):(l(),()=>{})},onNotification:l=>(a??this).onNotification(p=>{c()&&l(p)}),request:async(l,p)=>{if(!c()||M==="consumer-pending"||p.workspaceId!==e)throw o();const k=await y(l,p),h=l==="events.subscribe"?k?.subscriptionId:void 0;if(!c())throw h&&this.socket===t&&this.connected&&i===this.capabilityHelloGeneration&&y("events.unsubscribe",{workspaceId:e,subscriptionId:h}).catch(()=>{}),o();return h&&m.add(h),l==="events.unsubscribe"&&m.delete(String(p.subscriptionId)),k},release:async()=>{const l=c();r(),l&&!a&&await Promise.all([...m].map(p=>this.requestOnSocket("events.unsubscribe",{workspaceId:e,subscriptionId:p},void 0,t).catch(()=>{})))}}}request(e,t,i){return this.requestOnSocket(e,t,i)}requestOnSocket(e,t,i,o){if(i?.localMachine)return Promise.reject(new u({code:"UNAVAILABLE",message:"Local machine requests require the desktop bridge"}));if(this.disposed)return Promise.reject(new u({code:"UNAVAILABLE",message:"Backend transport disposed"}));if(!o&&this.startupState?.state==="starting")return Promise.reject(new u(O(D(this.startupState))));const a=++this.requestId,d=i?.timeoutMs,R=typeof d=="number"&&Number.isFinite(d)&&d>0?d:this.requestTimeoutMs;return new Promise((m,r)=>{let f=!1;const c=setTimeout(()=>{f=!0,this.pending.delete(a),r(new u({code:"TIMEOUT",message:`JSON-RPC request timed out: ${e}`,data:{code:"TIMEOUT"}}))},R),g=y=>{clearTimeout(c),r(E(y))},M=y=>{if(f)return;if(this.disposed||this.socket!==y){g(new u({code:"TRANSPORT_ERROR",message:"Connection replaced"}));return}if(e==="presence.update"&&!this.helloConfirmed){g(this.helloError);return}try{ee(e,t,this.protocolVersion)}catch(h){g(h);return}let l=e==="client.hello"&&this.clientId?{clientId:this.clientId,...t}:t;if(e==="client.hello"){const h={...l},S={...h.capabilities};Object.prototype.hasOwnProperty.call(S,"reviewMonitoring")&&(this.reviewMonitoringEnabled=this.reviewMonitoringRecipient!==void 0&&v(S.reviewMonitoring)),delete S.reviewMonitoring,delete h.connectionRole,h.capabilities!==void 0&&(h.capabilities=S),l=h}const p=JSON.stringify({jsonrpc:"2.0",id:a,method:e,params:l}),k=e==="client.hello"?++this.capabilityHelloGeneration:0;if(e==="client.hello"){this.helloConfirmed=!1,this.ordinaryHello=!1,this.clearMonitorRecovery(),this.nodeCapabilities=null,this.reviewMonitoring=void 0;for(const h of[...this.monitorRetirements])h();this.acknowledgedHello=null}this.pending.set(a,{method:e,timeout:c,resolve:h=>{if(e==="client.hello"&&this.socket===y&&k===this.capabilityHelloGeneration){const S=h?.clientId;if(typeof S=="string"&&S.length>0){const H=h.server?.capabilities;if(this.clientId=S,this.reviewMonitoring=H?.reviewMonitoring,this.ordinaryHello=h.connectionRole===void 0,this.acknowledgedHello=structuredClone(h),this.nodeCapabilities=Q(H),this.protocolVersion=z(h.protocolVersion),this.helloConfirmed=!0,this.connected)for(const W of this.monitorReady)W()}}m(h)},reject:r});try{y.send(p)}catch(h){clearTimeout(c),this.pending.delete(a),r(E(h))}};o?M(o):this.connected&&this.socket?M(this.socket):this.ensureConnected().then(M,g)})}async subscribe(e){return this.request("events.subscribe",e)}async unsubscribe(e,t){try{await this.request("events.unsubscribe",{subscriptionId:e,...t!==void 0?{workspaceId:t}:{}})}catch{}}onNotification(e){return this.notificationHandlers.add(e),()=>this.notificationHandlers.delete(e)}onReconnected(e){return this.reconnectedHandlers.add(e),()=>this.reconnectedHandlers.delete(e)}getConnectionStatus(){return this.connected?"connected":this.connecting?"connecting":"disconnected"}getStartupState(){return this.startupState}onStartupChange(e){return this.startupHandlers.add(e),()=>this.startupHandlers.delete(e)}onConnectionStatusChange(e){return this.statusHandlers.add(e),()=>this.statusHandlers.delete(e)}dispose(){if(this.disposed)return;this.disposed=!0,this.clearReconnect(),this.clearConnectTimer();const e=new u({code:"UNAVAILABLE",message:"Backend transport disposed"});this.failPending(e),this.failWaiters(e),this.teardownSocket(),this.connected=!1,this.connecting=!1,this.notifyStatusChange(),this.notificationHandlers.clear(),this.reconnectedHandlers.clear(),this.statusHandlers.clear(),this.startupHandlers.clear()}ensureConnected(){return this.connected&&this.socket?Promise.resolve(this.socket):new Promise((e,t)=>{this.connectWaiters.push({resolve:e,reject:t}),this.start()})}start(){this.disposed||this.socket||this.connecting||this.reconnectTimer||this.connect()}connect(){this.clearReconnect(),this.connecting=!0,this.notifyStatusChange();let e;try{e=this.webSocketFactory(this.url)}catch(t){this.connecting=!1,this.onConnectionFailure(E(t));return}this.socket=e,this.helloConfirmed=!1,this.connectTimer=setTimeout(()=>{this.connectTimer=null,!(this.socket!==e||this.connected)&&(this.connecting=!1,this.onConnectionFailure(new u({code:"TRANSPORT_ERROR",message:`WebSocket connect attempt timed out after ${this.connectTimeoutMs}ms`})))},this.connectTimeoutMs),e.onopen=()=>{this.socket===e&&this.onConnected(e)},e.onmessage=t=>{this.socket===e&&this.onMessage(t.data)},e.onerror=null,e.onclose=()=>{this.socket===e&&(this.connecting=!1,this.onConnectionFailure(new u({code:"TRANSPORT_ERROR",message:"WebSocket connection closed"})))}}onConnected(e){this.clearConnectTimer(),this.performHelloHandshake(e)}async performHelloHandshake(e){try{await this.requestOnSocket("client.hello",{},{timeoutMs:Math.min(this.requestTimeoutMs,be)},e)}catch(o){if(this.disposed||this.socket!==e)return;const a=q(o);if(a){this.enterStartup(e,a);return}this.helloError=E(o)}if(this.disposed||this.socket!==e)return;this.startupPoller.reset(),this.startupSocket=null;const t=this.startupState!==null;this.startupState=null,this.connecting=!1,this.connected=!0,this.currentReconnectDelay=this.reconnectDelayMs;const i=this.hasBeenConnected||this.hasConnectionFailed;if(this.hasBeenConnected=!0,this.hasConnectionFailed=!1,this.notifyStatusChange(),t)for(const o of[...this.startupHandlers])o(null);if(this.flushWaiters(e),i)for(const o of[...this.reconnectedHandlers])o()}onConnectionFailure(e){if(this.clearConnectTimer(),!this.disposed){if(this.startupSocket!==null&&this.startupSocket===this.socket){this.startupHandoff(!0);return}this.startupState?.state==="starting"&&(this.startupPoller.reset(),this.updateStartup(null)),this.hasConnectionFailed=!0,this.connected=!1,this.notifyStatusChange(),this.teardownSocket(),this.failPending(e),this.failWaiters(e),this.scheduleReconnect()}}notifyStatusChange(){const e=this.getConnectionStatus();if(e!==this.lastNotifiedStatus){this.lastNotifiedStatus=e;for(const t of[...this.statusHandlers])t(e)}}onMessage(e){if(typeof e!="string")return;let t;try{t=JSON.parse(e)}catch{console.warn("[browser-websocket-transport] Dropping unparseable frame");return}if(!t||typeof t!="object")return;const i=typeof t.method=="string",o=t.id!=null;if(i&&o){this.sendFrame({jsonrpc:"2.0",id:t.id,error:{code:-32601,message:`Method not found: ${String(t.method)}`}});return}if(o){const a=Number(t.id),d=this.pending.get(a);if(!d)return;this.pending.delete(a),clearTimeout(d.timeout),t.error?d.reject(new u(O(t.error))):d.resolve(t.result);return}if(i){const a={method:t.method,params:t.params};for(const d of[...this.notificationHandlers])d(a)}}sendFrame(e){try{this.socket?.send(JSON.stringify(e))}catch{}}scheduleReconnect(){if(this.disposed||this.reconnectTimer)return;const e=this.currentReconnectDelay;this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.currentReconnectDelay=Math.min(e*2,this.maxReconnectDelayMs),this.disposed||this.connect()},e)}clearReconnect(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}clearConnectTimer(){this.connectTimer&&(clearTimeout(this.connectTimer),this.connectTimer=null)}scheduleMonitorRecovery(e,t){this.monitorRetry||this.disposed||(this.monitorRetry=setTimeout(()=>{if(this.monitorRetry=null,!this.disposed&&this.connected&&this.socket===e&&this.capabilityHelloGeneration===t)for(const i of[...this.monitorReady])i()},this.reconnectDelayMs))}clearMonitorRecovery(){this.monitorRetry&&clearTimeout(this.monitorRetry),this.monitorRetry=null}teardownSocket(){this.startupPoller.stop(),this.startupSocket=null,this.reviewMonitoring=void 0,this.clearMonitorRecovery();for(const t of[...this.monitorRetirements])t();if(this.acknowledgedHello=null,this.nodeCapabilities=null,this.capabilityHelloGeneration+=1,this.protocolVersion=null,!this.socket)return;const e=this.socket;this.socket=null,e.onopen=null,e.onmessage=null,e.onerror=null,e.onclose=null;try{e.close()}catch{}}updateStartup(e){this.startupState=e?Object.freeze({...e}):null;for(const t of[...this.startupHandlers])t(this.startupState)}startupRefusal(){return this.startupState?new u(O(D(this.startupState))):new u({code:"TRANSPORT_ERROR",message:"WebSocket connection closed"})}enterStartup(e,t){if(this.hasConnectionFailed=!0,t.kind==="failed"){this.failStartup(t.message,t.snapshot);return}this.startupSocket=e,this.startupPoller.start(t),this.failWaiters(this.startupRefusal())}startupHandoff(e){const t=this.startupRefusal();if(this.teardownSocket(),this.failPending(t),this.disposed)return;this.connecting=!0,this.notifyStatusChange(),this.clearReconnect();let i=this.reconnectDelayMs;e?this.currentReconnectDelay=this.reconnectDelayMs:(i=this.currentReconnectDelay,this.currentReconnectDelay=Math.min(i*2,this.maxReconnectDelayMs)),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.disposed||this.connect()},i)}failStartup(e,t){this.startupPoller.stop(),this.startupSocket=null,this.hasConnectionFailed=!0,this.updateStartup({state:"failed",snapshot:t,available:t!==null,message:e}),this.connecting=!1,this.onConnectionFailure(this.startupRefusal())}failPending(e){for(const t of this.pending.values())clearTimeout(t.timeout),t.reject(e);this.pending.clear()}flushWaiters(e){const t=this.connectWaiters;this.connectWaiters=[];for(const i of t)i.resolve(e)}failWaiters(e){const t=this.connectWaiters;this.connectWaiters=[];for(const i of t)i.reject(e)}}function He(s){return new we(s)}let A=null;const I=new Set;function De(s){A=s;for(const e of[...I])e(s)}function Ue(){return A}function Le(s){return I.add(s),A&&s(A),()=>I.delete(s)}export{u as B,Oe as M,_e as P,Ie as R,Ae as a,Ce as b,He as c,Ne as d,Pe as e,v as f,Ue as g,Ee as i,Le as o,De as r,de as s};
@@ -1 +1 @@
1
- import{t as E,bw as W,bs as p,bq as B,b as J}from"./2CQlphfn.js";import{bs as L,ca as c,bk as R,bn as j}from"./3SdAC2_C.js";import{q as h,p as m,s as y,m as V}from"./jRZT2QjD.js";import"./DhZiRE53.js";import"./DTPgmjai.js";import"./Bn7ZmTkF.js";import"./ChTqQfQN.js";import"./Gw1t2Srm.js";import{Jt as t,I$ as b,p1 as a,qW as z,km as g}from"./eqIwOdFV.js";function F(N,T){if(new.target)return E({component:F,...N});L(T,!0);const r=()=>p(v,"$ownsNotice$",l),D=()=>p(x,"$toastVisible$",l),u=()=>p(O,"$status$",l),S=()=>p(k,"$dismissedAt$",l),[l,U]=B(),o=t.createSelector(s=>{const e=s.machineRail;return!e.enabled||e.shownId===""||e.shownId===s.connections.windowBackendId}),v=o(),x=h(),O=m(),k=y(),A=1440*60*1e3;let i,$;const I=new Set;function _(s){I.add(s),V.dismiss(s)}function f(){if(!o.select(t.state))return;i!==void 0&&_(i);const s=V.update({onDismiss:()=>{i!==s||!o.select(t.state)||(n(),m.select(t.state)==="downloaded"?t.dispatch(g(Date.now())):t.dispatch(a()))},onAutoDismiss:()=>{i!==s||!o.select(t.state)||(n(),t.dispatch(a()))}},{duration:1/0,onDismiss:e=>{if(I.delete(e.id)||i!==e.id||!o.select(t.state))return;if(i=void 0,m.select(t.state)==="downloaded"&&o.select(t.state)){t.dispatch(g(Date.now()));return}t.dispatch(a())}});i=s}function n(){i!==void 0&&(_(i),i=void 0)}c(()=>{r()&&D()&&i===void 0&&f()}),c(()=>{const s=u();if(!r()){n(),$=void 0;return}if(s!==$){if(s==="downloading")i===void 0&&f(),h.select(t.state)||t.dispatch(b());else if(s==="downloaded"){const e=y.select(t.state);e==null||Date.now()-e>=A?(i===void 0&&f(),h.select(t.state)||t.dispatch(b())):(n(),t.dispatch(a()))}s==="idle"&&(n(),t.dispatch(a())),$=s}}),c(()=>{u()==="downloaded"&&!D()&&S()!==null&&n()}),c(()=>{const s=u(),e=S();if(!r()||s!=="downloaded"||e==null)return;const d=Date.now()-e,w=A-d;if(w<=0)return;const M=setTimeout(()=>{m.select(t.state)==="downloaded"&&o.select(t.state)&&(f(),t.dispatch(b()))},w);return()=>clearTimeout(M)}),c(()=>{const s=u();if(r()&&(s==="not-available"||s==="error")){const d=setTimeout(()=>{o.select(t.state)&&(n(),t.dispatch(a()))},s==="error"?5500:3500);return()=>clearTimeout(d)}}),R(()=>(t.dispatch(z()),()=>{n()}));var q={$set:W,$on:(s,e)=>J(T,s,e)},C=j(q);return U(),C}export{F as default};
1
+ import{t as E,bw as W,bs as p,bq as B,b as J}from"./CHWIPzMj.js";import{bs as L,ca as c,bk as R,bn as j}from"./3SdAC2_C.js";import{q as h,p as m,s as y,m as V}from"./DDfMifm6.js";import"./B09v4S72.js";import"./Bx3lRAzK.js";import"./QgUSWdkO.js";import"./ChTqQfQN.js";import"./CeOa9B5I.js";import{Jt as t,I$ as b,p1 as a,qW as z,km as g}from"./DJM-jC4D.js";function F(N,T){if(new.target)return E({component:F,...N});L(T,!0);const r=()=>p(v,"$ownsNotice$",l),D=()=>p(x,"$toastVisible$",l),u=()=>p(O,"$status$",l),S=()=>p(k,"$dismissedAt$",l),[l,U]=B(),o=t.createSelector(s=>{const e=s.machineRail;return!e.enabled||e.shownId===""||e.shownId===s.connections.windowBackendId}),v=o(),x=h(),O=m(),k=y(),A=1440*60*1e3;let i,$;const I=new Set;function _(s){I.add(s),V.dismiss(s)}function f(){if(!o.select(t.state))return;i!==void 0&&_(i);const s=V.update({onDismiss:()=>{i!==s||!o.select(t.state)||(n(),m.select(t.state)==="downloaded"?t.dispatch(g(Date.now())):t.dispatch(a()))},onAutoDismiss:()=>{i!==s||!o.select(t.state)||(n(),t.dispatch(a()))}},{duration:1/0,onDismiss:e=>{if(I.delete(e.id)||i!==e.id||!o.select(t.state))return;if(i=void 0,m.select(t.state)==="downloaded"&&o.select(t.state)){t.dispatch(g(Date.now()));return}t.dispatch(a())}});i=s}function n(){i!==void 0&&(_(i),i=void 0)}c(()=>{r()&&D()&&i===void 0&&f()}),c(()=>{const s=u();if(!r()){n(),$=void 0;return}if(s!==$){if(s==="downloading")i===void 0&&f(),h.select(t.state)||t.dispatch(b());else if(s==="downloaded"){const e=y.select(t.state);e==null||Date.now()-e>=A?(i===void 0&&f(),h.select(t.state)||t.dispatch(b())):(n(),t.dispatch(a()))}s==="idle"&&(n(),t.dispatch(a())),$=s}}),c(()=>{u()==="downloaded"&&!D()&&S()!==null&&n()}),c(()=>{const s=u(),e=S();if(!r()||s!=="downloaded"||e==null)return;const d=Date.now()-e,w=A-d;if(w<=0)return;const M=setTimeout(()=>{m.select(t.state)==="downloaded"&&o.select(t.state)&&(f(),t.dispatch(b()))},w);return()=>clearTimeout(M)}),c(()=>{const s=u();if(r()&&(s==="not-available"||s==="error")){const d=setTimeout(()=>{o.select(t.state)&&(n(),t.dispatch(a()))},s==="error"?5500:3500);return()=>clearTimeout(d)}}),R(()=>(t.dispatch(z()),()=>{n()}));var q={$set:W,$on:(s,e)=>J(T,s,e)},C=j(q);return U(),C}export{F as default};