@intent-hq/web 2.359.0 → 2.360.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 (322) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{Dwycp9kz.js → -UDhr0q5.js} +1 -1
  3. package/web/app/immutable/chunks/{DYd8nNWc.js → 1R56Qj8Y.js} +1 -1
  4. package/web/app/immutable/chunks/{DoZBqkYF.js → 32iKFv4-.js} +1 -1
  5. package/web/app/immutable/chunks/{Cl9D9QD8.js → 4f4S0sUh.js} +1 -1
  6. package/web/app/immutable/chunks/{j2jTU61E.js → 4kuiywlQ.js} +1 -1
  7. package/web/app/immutable/chunks/{0GiDyxSH.js → 5nGPNxrH.js} +1 -1
  8. package/web/app/immutable/chunks/{DrJhzfF1.js → 6HkyTXcq.js} +1 -1
  9. package/web/app/immutable/chunks/{B2VWtQXD.js → 8JflFTpI.js} +1 -1
  10. package/web/app/immutable/chunks/{BM8PGEcO.js → 9GiEkE-P.js} +1 -1
  11. package/web/app/immutable/chunks/{BjRCAf8X.js → 9y5vkRaS.js} +1 -1
  12. package/web/app/immutable/chunks/{C-KmDSVv.js → A91xcSiw.js} +1 -1
  13. package/web/app/immutable/chunks/{BR6nXvi2.js → B-wvdvfF.js} +1 -1
  14. package/web/app/immutable/chunks/{_KJ048jX.js → B2pIq9fg.js} +1 -1
  15. package/web/app/immutable/chunks/{D5XiG13m.js → B34oQCN1.js} +1 -1
  16. package/web/app/immutable/chunks/{8RYLPrR5.js → B3fJGWt9.js} +1 -1
  17. package/web/app/immutable/chunks/{C0HpRgD4.js → B4P8KmTp.js} +1 -1
  18. package/web/app/immutable/chunks/{C8BKrcE1.js → B4R_0jQo.js} +1 -1
  19. package/web/app/immutable/chunks/{vkhyqDoZ.js → B5IW1VlE.js} +1 -1
  20. package/web/app/immutable/chunks/{CzCt7LFa.js → B6OxFt0S.js} +1 -1
  21. package/web/app/immutable/chunks/{CS2E7BOf.js → B7KiQTDj.js} +2 -2
  22. package/web/app/immutable/chunks/{BDu_-2pO.js → B7hW9x49.js} +1 -1
  23. package/web/app/immutable/chunks/B8PCLBxN.js +1 -0
  24. package/web/app/immutable/chunks/{vKIItbxs.js → BBFx0QAL.js} +1 -1
  25. package/web/app/immutable/chunks/{CNjFQiNk.js → BBnLbsoD.js} +3 -3
  26. package/web/app/immutable/chunks/{CfdrPzuS.js → BCnWCh48.js} +3 -3
  27. package/web/app/immutable/chunks/{CeXrdQTj.js → BDrSOwDu.js} +1 -1
  28. package/web/app/immutable/chunks/{t1Reg1-l.js → BEJv0Pc9.js} +1 -1
  29. package/web/app/immutable/chunks/{GLifdN8w.js → BFPmZe29.js} +1 -1
  30. package/web/app/immutable/chunks/{Bff7OX_M.js → BFeZEby1.js} +1 -1
  31. package/web/app/immutable/chunks/{DNvbM_Jw.js → BFoEwS3N.js} +14 -14
  32. package/web/app/immutable/chunks/{DNhi2pnC.js → BGGHmOCQ.js} +1 -1
  33. package/web/app/immutable/chunks/{Bxt1GZdu.js → BHUOcy1d.js} +1 -1
  34. package/web/app/immutable/chunks/{BomWh1eD.js → BHlsW_o1.js} +1 -1
  35. package/web/app/immutable/chunks/{C-ZYRRid.js → BJtZTy_N.js} +1 -1
  36. package/web/app/immutable/chunks/{YNY2RV1c.js → BL0zmkuy.js} +1 -1
  37. package/web/app/immutable/chunks/{B_VapsyM.js → BLyqJ_tX.js} +1 -1
  38. package/web/app/immutable/chunks/{CVwloYeX.js → BMl2xNoL.js} +1 -1
  39. package/web/app/immutable/chunks/{-6O_hwvF.js → BNoTLiJq.js} +1 -1
  40. package/web/app/immutable/chunks/{B08-5Fsn.js → BOCQKOZ_.js} +1 -1
  41. package/web/app/immutable/chunks/{Bn81D_5T.js → BOWtLHmq.js} +1 -1
  42. package/web/app/immutable/chunks/{fXQtWVk2.js → BREs1pEK.js} +1 -1
  43. package/web/app/immutable/chunks/{Ci5YRbmm.js → BRT5I2VH.js} +1 -1
  44. package/web/app/immutable/chunks/{Clfqtwbt.js → BSWgqRaC.js} +1 -1
  45. package/web/app/immutable/chunks/{pYgZjzLi.js → BVSy1i1c.js} +1 -1
  46. package/web/app/immutable/chunks/{DB4pEg85.js → BVtazWzZ.js} +1 -1
  47. package/web/app/immutable/chunks/{CWnW1H_r.js → BWW2m17x.js} +1 -1
  48. package/web/app/immutable/chunks/{Blu36gU0.js → BX-wlbf1.js} +1 -1
  49. package/web/app/immutable/chunks/{DtAi5eiG.js → BX3Qm7r_.js} +1 -1
  50. package/web/app/immutable/chunks/{B7ID5lhM.js → BXVqjGzF.js} +1 -1
  51. package/web/app/immutable/chunks/{CfTOR9Xs.js → BY8Zvp_5.js} +1 -1
  52. package/web/app/immutable/chunks/{BghNeZnO.js → BYHyHMOf.js} +1 -1
  53. package/web/app/immutable/chunks/{DyM6oXRa.js → B_PtieXN.js} +1 -1
  54. package/web/app/immutable/chunks/{CmjC2IOn.js → BctdwcHy.js} +1 -1
  55. package/web/app/immutable/chunks/{lJ2hrkPe.js → Bd92b52s.js} +1 -1
  56. package/web/app/immutable/chunks/{CILpVksu.js → Bd_P-L3U.js} +2 -2
  57. package/web/app/immutable/chunks/{BDECMwd0.js → BdkhvtBn.js} +3 -3
  58. package/web/app/immutable/chunks/{XsqUZwYc.js → Be4cU-9x.js} +1 -1
  59. package/web/app/immutable/chunks/{CdQskv_M.js → BeCv1r50.js} +1 -1
  60. package/web/app/immutable/chunks/{C9k6syqr.js → BeJ9dLu2.js} +1 -1
  61. package/web/app/immutable/chunks/{C61zN4kC.js → BifMsF0g.js} +1 -1
  62. package/web/app/immutable/chunks/{jg75CCgI.js → BioI1i4g.js} +2 -2
  63. package/web/app/immutable/chunks/{utZHhb7g.js → BkAhwE4C.js} +1 -1
  64. package/web/app/immutable/chunks/{K9El2yPE.js → BkqaxMfg.js} +1 -1
  65. package/web/app/immutable/chunks/{DrjLBq4b.js → BkzHDegO.js} +2 -2
  66. package/web/app/immutable/chunks/{Dvz4y7lb.js → Bldr-p8H.js} +1 -1
  67. package/web/app/immutable/chunks/{BO1UvMYh.js → BmCHTIDH.js} +1 -1
  68. package/web/app/immutable/chunks/{D7Fu5qfY.js → BnE71Sxv.js} +1 -1
  69. package/web/app/immutable/chunks/{BKkJ5wmq.js → BoPOsJod.js} +1 -1
  70. package/web/app/immutable/chunks/{BEUX_9Gf.js → BpCBwtvA.js} +1 -1
  71. package/web/app/immutable/chunks/{Cqo5h0cq.js → BpE3z_V4.js} +1 -1
  72. package/web/app/immutable/chunks/{C3DfjxaV.js → BpozSsrs.js} +1 -1
  73. package/web/app/immutable/chunks/{Di9Z0x4r.js → BqCQZYkF.js} +1 -1
  74. package/web/app/immutable/chunks/{BNdkWvF7.js → BrbwH5yU.js} +1 -1
  75. package/web/app/immutable/chunks/{DvKZFqCo.js → Brujc5Qs.js} +1 -1
  76. package/web/app/immutable/chunks/{fPif4XLT.js → BsRAiU3M.js} +1 -1
  77. package/web/app/immutable/chunks/{BTTOyJaN.js → BsRUTEry.js} +1 -1
  78. package/web/app/immutable/chunks/{BUwnMspE.js → BsVek4ep.js} +1 -1
  79. package/web/app/immutable/chunks/{C0LUTbI7.js → Bsozz-8j.js} +1 -1
  80. package/web/app/immutable/chunks/{DJtAtlMe.js → Bst2sLeL.js} +1 -1
  81. package/web/app/immutable/chunks/{CFYbMOQh.js → BtWZ63FE.js} +1 -1
  82. package/web/app/immutable/chunks/{Da2l_kGL.js → BuHRLZKa.js} +1 -1
  83. package/web/app/immutable/chunks/{B5OEBl_F.js → Bvu_tazq.js} +1 -1
  84. package/web/app/immutable/chunks/{BibvkaKz.js → Bx2B90L7.js} +1 -1
  85. package/web/app/immutable/chunks/{EM0-8M4u.js → Bx903o6z.js} +1 -1
  86. package/web/app/immutable/chunks/{Chk2VmFC.js → BzFtQkIk.js} +1 -1
  87. package/web/app/immutable/chunks/{waNhHeBe.js → BzhmxD74.js} +1 -1
  88. package/web/app/immutable/chunks/{D1AHHNz_.js → C0GOL7QH.js} +1 -1
  89. package/web/app/immutable/chunks/{CjyYp1d6.js → C0s3H3cX.js} +1 -1
  90. package/web/app/immutable/chunks/{bDYVRgHv.js → C2Q_f-Ao.js} +1 -1
  91. package/web/app/immutable/chunks/{BN2Xx7qY.js → C2gV5GaR.js} +4 -4
  92. package/web/app/immutable/chunks/{CwN0y7xj.js → C54_KTzu.js} +4 -4
  93. package/web/app/immutable/chunks/{CMOu7J7m.js → C5hIBQ3i.js} +1 -1
  94. package/web/app/immutable/chunks/{BlfSgRgz.js → C6gTWqQd.js} +1 -1
  95. package/web/app/immutable/chunks/{C9g6kBvz.js → C7xMm-xs.js} +1 -1
  96. package/web/app/immutable/chunks/{CELWxQ_U.js → C8PDklve.js} +1 -1
  97. package/web/app/immutable/chunks/{CkjVC7MP.js → C9JwZT8z.js} +1 -1
  98. package/web/app/immutable/chunks/{B8TUirrt.js → C9m9xaQX.js} +1 -1
  99. package/web/app/immutable/chunks/{ZlUXDv9w.js → CB0BBmB3.js} +2 -2
  100. package/web/app/immutable/chunks/{BGfY3mAg.js → CB8Kg0_N.js} +1 -1
  101. package/web/app/immutable/chunks/{CQGkGXEd.js → CCW4xg3d.js} +1 -1
  102. package/web/app/immutable/chunks/{Ba7JIG6D.js → CCq7LQoR.js} +1 -1
  103. package/web/app/immutable/chunks/{o4jWsDx5.js → CDAGrCMS.js} +1 -1
  104. package/web/app/immutable/chunks/{CvCQt2D9.js → CDCwuoNC.js} +1 -1
  105. package/web/app/immutable/chunks/{BJrEWx4G.js → CEdXFb7B.js} +1 -1
  106. package/web/app/immutable/chunks/{CQeKyPfB.js → CFPO-Gdn.js} +1 -1
  107. package/web/app/immutable/chunks/{D3dCNwq6.js → CGpu-8LN.js} +4 -4
  108. package/web/app/immutable/chunks/{BiD0cL9w.js → CIBrW7Ku.js} +1 -1
  109. package/web/app/immutable/chunks/{wSDPkPFW.js → CIQ39w4Y.js} +1 -1
  110. package/web/app/immutable/chunks/{o7jQDkBd.js → CJD0yCmp.js} +1 -1
  111. package/web/app/immutable/chunks/{_9zJA_sE.js → CJftmRaI.js} +2 -2
  112. package/web/app/immutable/chunks/{CjCKLQJ9.js → CJmMm5OV.js} +3 -3
  113. package/web/app/immutable/chunks/{Cy1jfWDK.js → CJx5kB-H.js} +1 -1
  114. package/web/app/immutable/chunks/{wV3FJ8_B.js → CK9vN0Vx.js} +1 -1
  115. package/web/app/immutable/chunks/{DaBtQ4Rq.js → CKZSqILX.js} +1 -1
  116. package/web/app/immutable/chunks/{BhHMFSp2.js → CLN26_YU.js} +1 -1
  117. package/web/app/immutable/chunks/{yfZcC2N6.js → CMFCeNSK.js} +1 -1
  118. package/web/app/immutable/chunks/{tkvqiJWu.js → CMPYMsb3.js} +1 -1
  119. package/web/app/immutable/chunks/{Dqvqq37X.js → CMUpwbv3.js} +1 -1
  120. package/web/app/immutable/chunks/{DB3uT95Q.js → CMlZAr5p.js} +1 -1
  121. package/web/app/immutable/chunks/{B_41a3se.js → CNfKBI6L.js} +1 -1
  122. package/web/app/immutable/chunks/{BKY4Q0TT.js → CO3XLT45.js} +1 -1
  123. package/web/app/immutable/chunks/{BNSN6XCP.js → COnJo1Ps.js} +1 -1
  124. package/web/app/immutable/chunks/COqplkxR.js +1 -0
  125. package/web/app/immutable/chunks/{D_eImbVR.js → CS70Dx2B.js} +1 -1
  126. package/web/app/immutable/chunks/{DM_khyu7.js → CSKp9zzd.js} +1 -1
  127. package/web/app/immutable/chunks/{RqQMOZAT.js → CU4KWWbD.js} +1 -1
  128. package/web/app/immutable/chunks/{Dwp84kQu.js → CVmPa1mG.js} +1 -1
  129. package/web/app/immutable/chunks/{CabY5Ajz.js → CWwVTuEX.js} +1 -1
  130. package/web/app/immutable/chunks/{D_LNh-Ja.js → CWz2XNBO.js} +1 -1
  131. package/web/app/immutable/chunks/{Bzcuhxw_.js → CXFlWWO4.js} +1 -1
  132. package/web/app/immutable/chunks/{BFfFhR1D.js → CZ-QhNUI.js} +1 -1
  133. package/web/app/immutable/chunks/{G3F9ni6B.js → C_9mGNUw.js} +1 -1
  134. package/web/app/immutable/chunks/{ZY6P3elZ.js → Ca98gcvs.js} +1 -1
  135. package/web/app/immutable/chunks/{CEM8KTTx.js → Cak06Ipv.js} +1 -1
  136. package/web/app/immutable/chunks/{BtBvnlNb.js → Cb4SpXNJ.js} +1 -1
  137. package/web/app/immutable/chunks/{cw-15yhi.js → Cd1q1wWY.js} +1 -1
  138. package/web/app/immutable/chunks/{Dh18lLbG.js → CdEPpK5c.js} +1 -1
  139. package/web/app/immutable/chunks/{DR4IFZXy.js → CdIWJpFL.js} +1 -1
  140. package/web/app/immutable/chunks/{CMxGr_ey.js → CeXNhl9e.js} +1 -1
  141. package/web/app/immutable/chunks/{Dp6TtOQM.js → CgGU0gTh.js} +1 -1
  142. package/web/app/immutable/chunks/{MlkHiaSF.js → ChjOKBnG.js} +1 -1
  143. package/web/app/immutable/chunks/{C_ZgD3DB.js → Cho0-9KA.js} +1 -1
  144. package/web/app/immutable/chunks/{DfUAlDfK.js → Ci0DCXei.js} +1 -1
  145. package/web/app/immutable/chunks/{CwnD43Xy.js → CiPzAmKo.js} +1 -1
  146. package/web/app/immutable/chunks/{g7hC9VeO.js → CjPOxOh3.js} +1 -1
  147. package/web/app/immutable/chunks/{D-sEMjzy.js → CkWz1mLV.js} +1 -1
  148. package/web/app/immutable/chunks/{B0RvqECX.js → CkY0UrZh.js} +1 -1
  149. package/web/app/immutable/chunks/{CIOI2vcP.js → CkdaiT2c.js} +1 -1
  150. package/web/app/immutable/chunks/{FdrUgkC6.js → CktoO_4b.js} +1 -1
  151. package/web/app/immutable/chunks/{Dl4PtwLv.js → ClPEPp33.js} +1 -1
  152. package/web/app/immutable/chunks/{CQ2L5Zaq.js → CmQUy1iX.js} +1 -1
  153. package/web/app/immutable/chunks/Cn0dUMcV.js +1 -0
  154. package/web/app/immutable/chunks/{CrTnLjrr.js → Con90c3P.js} +1 -1
  155. package/web/app/immutable/chunks/{BWvY9nb-.js → CpYOvNz6.js} +1 -1
  156. package/web/app/immutable/chunks/{CZhfnI2G.js → Crm_Oabm.js} +1 -1
  157. package/web/app/immutable/chunks/{Ce7GGwjY.js → CsZJMlJ8.js} +1 -1
  158. package/web/app/immutable/chunks/{BZWFeX8A.js → CsxWziDD.js} +1 -1
  159. package/web/app/immutable/chunks/{DB5XpEWp.js → CukxP3bH.js} +1 -1
  160. package/web/app/immutable/chunks/{CIe_IdcQ.js → CurjThIN.js} +1 -1
  161. package/web/app/immutable/chunks/{C5SRkSUi.js → CwhU2GJj.js} +1 -1
  162. package/web/app/immutable/chunks/{DWHgu0is.js → CycTTYyM.js} +1 -1
  163. package/web/app/immutable/chunks/{DHAp2Kc0.js → CzX6D7dd.js} +1 -1
  164. package/web/app/immutable/chunks/{dvtB8PCn.js → CzaiY1Hd.js} +1 -1
  165. package/web/app/immutable/chunks/{6myNhyGM.js → CzxOAjWm.js} +1 -1
  166. package/web/app/immutable/chunks/{klnEQWHo.js → D0TCMhf8.js} +1 -1
  167. package/web/app/immutable/chunks/{C7eqIAuZ.js → D0bF1ewx.js} +1 -1
  168. package/web/app/immutable/chunks/{5wkpHjhE.js → D0j6Pw9H.js} +1 -1
  169. package/web/app/immutable/chunks/{Dla5GTQo.js → D2BBYrzr.js} +1 -1
  170. package/web/app/immutable/chunks/{CGVGh8Xh.js → D3nmUaz-.js} +1 -1
  171. package/web/app/immutable/chunks/{CvLyzc7I.js → D3rExJpy.js} +2 -2
  172. package/web/app/immutable/chunks/{lzlrZOOx.js → D6WUVWA7.js} +3 -3
  173. package/web/app/immutable/chunks/{BsfZKUyJ.js → D6ag701e.js} +1 -1
  174. package/web/app/immutable/chunks/{D5TVVdCO.js → D77SC-WI.js} +1 -1
  175. package/web/app/immutable/chunks/{B3gMfjd-.js → D79Xzbwc.js} +1 -1
  176. package/web/app/immutable/chunks/{CzOKs-9h.js → D7XN10mW.js} +1 -1
  177. package/web/app/immutable/chunks/{DhJiUMGh.js → D7saN_TE.js} +1 -1
  178. package/web/app/immutable/chunks/{DS1-LIJo.js → D88N7fik.js} +1 -1
  179. package/web/app/immutable/chunks/{D7S6-tcN.js → D9e6EkDi.js} +1 -1
  180. package/web/app/immutable/chunks/{DY_VgpBE.js → DA1JRBSr.js} +1 -1
  181. package/web/app/immutable/chunks/{CUgyGwcZ.js → DB1FUARM.js} +1 -1
  182. package/web/app/immutable/chunks/{XDFbJjVz.js → DB2nf3HK.js} +1 -1
  183. package/web/app/immutable/chunks/{D2C9COn-.js → DB5oJv4b.js} +2 -2
  184. package/web/app/immutable/chunks/{BQqk8D2k.js → DBeaWkI6.js} +1 -1
  185. package/web/app/immutable/chunks/{DkXhJ1BL.js → DCAdK-TK.js} +1 -1
  186. package/web/app/immutable/chunks/{YDiGw5NX.js → DDEi4ohI.js} +3 -3
  187. package/web/app/immutable/chunks/{BxzohA4k.js → DEFiLw0G.js} +1 -1
  188. package/web/app/immutable/chunks/{CW-B1B_2.js → DFA3fNuM.js} +1 -1
  189. package/web/app/immutable/chunks/{hpioGaKy.js → DFngs4Y1.js} +2 -2
  190. package/web/app/immutable/chunks/{10-QywS9.js → DG1-cBAz.js} +1 -1
  191. package/web/app/immutable/chunks/{Di3YCBTy.js → DKvrlewQ.js} +2 -2
  192. package/web/app/immutable/chunks/{CJGJtaIh.js → DLx-21ka.js} +1 -1
  193. package/web/app/immutable/chunks/{DVqlnAf4.js → DMDLNgZw.js} +1 -1
  194. package/web/app/immutable/chunks/{CZnzjQ8w.js → DNSvJh5E.js} +1 -1
  195. package/web/app/immutable/chunks/{DMicUhyp.js → DODIyxsG.js} +1 -1
  196. package/web/app/immutable/chunks/{BAB5cGdR.js → DP1Kxs4G.js} +1 -1
  197. package/web/app/immutable/chunks/{C-6RTvqK.js → DRfuH7ia.js} +1 -1
  198. package/web/app/immutable/chunks/{DJXbxolz.js → DSGWdxMc.js} +1 -1
  199. package/web/app/immutable/chunks/{BveCGFpc.js → DSgbJdfR.js} +1 -1
  200. package/web/app/immutable/chunks/{BosvHmXn.js → DT7EyIEo.js} +1 -1
  201. package/web/app/immutable/chunks/{C9c1XoGB.js → DTY9Anmi.js} +3 -3
  202. package/web/app/immutable/chunks/{ADgiB_JD.js → DTzZbirR.js} +1 -1
  203. package/web/app/immutable/chunks/{BwCXlNwV.js → DUUOaZUX.js} +1 -1
  204. package/web/app/immutable/chunks/{R_gbTJLb.js → DUyvq6BR.js} +1 -1
  205. package/web/app/immutable/chunks/{CdhsB6Tk.js → DYhAW_nh.js} +1 -1
  206. package/web/app/immutable/chunks/{CZuwX70n.js → DYv-ImbG.js} +1 -1
  207. package/web/app/immutable/chunks/{i6o2muyh.js → D_tjJvUn.js} +1 -1
  208. package/web/app/immutable/chunks/{DCDVRPan.js → Db1vsTVc.js} +1 -1
  209. package/web/app/immutable/chunks/{CLgO49-n.js → Dcity0ZX.js} +1 -1
  210. package/web/app/immutable/chunks/{BJKM0aco.js → DcsVySxU.js} +2 -2
  211. package/web/app/immutable/chunks/{DreRsNdo.js → DdAEgsrh.js} +2 -2
  212. package/web/app/immutable/chunks/{CbwoPYB3.js → DfCpph1F.js} +1 -1
  213. package/web/app/immutable/chunks/{DE2DQy0T.js → DfQtmVKc.js} +1 -1
  214. package/web/app/immutable/chunks/{By3Fe9OQ.js → DhbB133w.js} +1 -1
  215. package/web/app/immutable/chunks/{Uz0kppPo.js → DjkW13rw.js} +1 -1
  216. package/web/app/immutable/chunks/{g1QznGhp.js → DkGGr_35.js} +1 -1
  217. package/web/app/immutable/chunks/{C5Pv37ZW.js → DlVBS_bY.js} +1 -1
  218. package/web/app/immutable/chunks/{bqipvca_.js → DmOmVRF-.js} +1 -1
  219. package/web/app/immutable/chunks/{B_3LwjEE.js → DmSe6pPh.js} +1 -1
  220. package/web/app/immutable/chunks/{BFZDKSps.js → DmfXn75c.js} +1 -1
  221. package/web/app/immutable/chunks/{uDkSpspe.js → Dn7IHtB4.js} +1 -1
  222. package/web/app/immutable/chunks/{CmxpZd0C.js → DnR6iKmC.js} +1 -1
  223. package/web/app/immutable/chunks/{DsLK0lhE.js → Dqbu3Xgt.js} +1 -1
  224. package/web/app/immutable/chunks/{BnFk2thR.js → DqvZHD0T.js} +1 -1
  225. package/web/app/immutable/chunks/{BqUNG33_.js → DrPmlbuk.js} +1 -1
  226. package/web/app/immutable/chunks/{BPDm13z6.js → Drhk0kLj.js} +1 -1
  227. package/web/app/immutable/chunks/{BpJkEHyp.js → DsB0QHTZ.js} +1 -1
  228. package/web/app/immutable/chunks/{BgwmEIlo.js → DsDqvgC9.js} +2 -2
  229. package/web/app/immutable/chunks/{CUF6AFLj.js → Dt2PgbAx.js} +1 -1
  230. package/web/app/immutable/chunks/{XfZ7vUz0.js → DtrdP8PT.js} +1 -1
  231. package/web/app/immutable/chunks/{BduQZGB-.js → Dw86rOY4.js} +1 -1
  232. package/web/app/immutable/chunks/{CHJwDFbB.js → Dwc9p0hU.js} +1 -1
  233. package/web/app/immutable/chunks/{BH8Pvo2Y.js → DxFe9Sj2.js} +1 -1
  234. package/web/app/immutable/chunks/{BjE588G3.js → DzCNJq2j.js} +1 -1
  235. package/web/app/immutable/chunks/{CHwCT_tY.js → EBip0AWO.js} +1 -1
  236. package/web/app/immutable/chunks/{CyqRVYAu.js → ELAGDjsa.js} +6 -6
  237. package/web/app/immutable/chunks/{Dv95zz7s.js → F5q6OMDX.js} +1 -1
  238. package/web/app/immutable/chunks/{C-3h7Yfn.js → FNy8h0Ka.js} +1 -1
  239. package/web/app/immutable/chunks/{Bh3EI3zr.js → HjEy7vfo.js} +1 -1
  240. package/web/app/immutable/chunks/{CWYIb5h_.js → HxrItRGs.js} +1 -1
  241. package/web/app/immutable/chunks/{COizPexY.js → LQm_WUG-.js} +1 -1
  242. package/web/app/immutable/chunks/{CRQ7p08H.js → MNJDbe1l.js} +1 -1
  243. package/web/app/immutable/chunks/{ryJoABjA.js → MQB3-RUl.js} +1 -1
  244. package/web/app/immutable/chunks/{BRhTL40m.js → NtBDgvZ2.js} +1 -1
  245. package/web/app/immutable/chunks/NtxbXOxK.js +1 -0
  246. package/web/app/immutable/chunks/{CDthvhNa.js → O077287M.js} +1 -1
  247. package/web/app/immutable/chunks/{BldMt0qe.js → OJdRtUTM.js} +1 -1
  248. package/web/app/immutable/chunks/{BNxYYK1k.js → OfJYxV7d.js} +1 -1
  249. package/web/app/immutable/chunks/{YXtDIgke.js → OvgkhrA7.js} +1 -1
  250. package/web/app/immutable/chunks/{yFbmvZcp.js → P3QocI-G.js} +1 -1
  251. package/web/app/immutable/chunks/{BddjjpyI.js → S6AtfZPI.js} +1 -1
  252. package/web/app/immutable/chunks/{CUqDFxUi.js → SM6VUydw.js} +1 -1
  253. package/web/app/immutable/chunks/{Cq94dOBc.js → SXQhdPre.js} +1 -1
  254. package/web/app/immutable/chunks/{ByA2IWok.js → S_DaaRo9.js} +3 -3
  255. package/web/app/immutable/chunks/{q9ZyJAa1.js → SmHZXgwN.js} +1 -1
  256. package/web/app/immutable/chunks/{Bm2P91T0.js → UunyqK3Z.js} +1 -1
  257. package/web/app/immutable/chunks/{DiJNvptO.js → W6sF2Cur.js} +1 -1
  258. package/web/app/immutable/chunks/{wM59GHbh.js → WoXHXc-b.js} +1 -1
  259. package/web/app/immutable/chunks/{CLp5K2Cv.js → XFXlU9Ox.js} +1 -1
  260. package/web/app/immutable/chunks/{MqeYlZEc.js → Z14_HVFv.js} +1 -1
  261. package/web/app/immutable/chunks/{DRzVKoEr.js → ZdVOG1YL.js} +1 -1
  262. package/web/app/immutable/chunks/{DryREkHP.js → ZyHSqKKz.js} +1 -1
  263. package/web/app/immutable/chunks/{Cb35PO19.js → a-uzFDRe.js} +1 -1
  264. package/web/app/immutable/chunks/{BiVxPdNt.js → b_O4pZtc.js} +1 -1
  265. package/web/app/immutable/chunks/{WVUqAkKa.js → cNKe5jVM.js} +1 -1
  266. package/web/app/immutable/chunks/{BtE8ng9B.js → cPv_DFdy.js} +1 -1
  267. package/web/app/immutable/chunks/{DUpzlKAB.js → dRfjsn2g.js} +1 -1
  268. package/web/app/immutable/chunks/{B-Q3uU6_.js → frxcf8rJ.js} +1 -1
  269. package/web/app/immutable/chunks/{DgrkG05k.js → guxjwWAr.js} +1 -1
  270. package/web/app/immutable/chunks/{C2sr3EWe.js → h3NGlSjH.js} +1 -1
  271. package/web/app/immutable/chunks/{FQFJV7C0.js → h9OLCnwu.js} +1 -1
  272. package/web/app/immutable/chunks/{CCAjvk0X.js → hCt1V8jO.js} +3 -3
  273. package/web/app/immutable/chunks/{DqJHcisc.js → hLkstuSa.js} +1 -1
  274. package/web/app/immutable/chunks/{DCtyzj03.js → jSlXIbXa.js} +1 -1
  275. package/web/app/immutable/chunks/{DiW8XnY5.js → kBqzcezI.js} +1 -1
  276. package/web/app/immutable/chunks/{CMziHXPQ.js → kNipFpJ2.js} +1 -1
  277. package/web/app/immutable/chunks/{Fd-rEJnu.js → liwjXrkc.js} +1 -1
  278. package/web/app/immutable/chunks/{Dk51AkwK.js → oB7eN-Qf.js} +1 -1
  279. package/web/app/immutable/chunks/{Bn37CRsE.js → oIy1WGn7.js} +1 -1
  280. package/web/app/immutable/chunks/{BrJIlZXG.js → plaTXQg3.js} +1 -1
  281. package/web/app/immutable/chunks/{DrzhapyO.js → puisNM3r.js} +1 -1
  282. package/web/app/immutable/chunks/{BpMUTlD3.js → qW1_mixC.js} +1 -1
  283. package/web/app/immutable/chunks/{Bl7A2mT8.js → qzRpsGdv.js} +1 -1
  284. package/web/app/immutable/chunks/{BugaF9Gz.js → roVeGd8G.js} +1 -1
  285. package/web/app/immutable/chunks/{Bw4cxMjz.js → tU-erPwy.js} +1 -1
  286. package/web/app/immutable/chunks/{D5HWvTpD.js → tguQ0uKY.js} +1 -1
  287. package/web/app/immutable/chunks/{BTLBASJX.js → wZqQTU3s.js} +1 -1
  288. package/web/app/immutable/chunks/{D94cTefs.js → yerK1wE4.js} +3 -3
  289. package/web/app/immutable/chunks/{BL7BGzQb.js → z-LfKEyT.js} +1 -1
  290. package/web/app/immutable/chunks/{CNgTnn6E.js → zKe1EQER.js} +1 -1
  291. package/web/app/immutable/chunks/{CLGFCqMt.js → zsS-jFOF.js} +1 -1
  292. package/web/app/immutable/entry/{app.B_j9AtYN.js → app.xn8bouEy.js} +3 -3
  293. package/web/app/immutable/entry/start.8SWo5eaL.js +1 -0
  294. package/web/app/immutable/nodes/{0.DI5KXj3q.js → 0.Czkxq6nC.js} +1 -1
  295. package/web/app/immutable/nodes/{1.BvUSq5GT.js → 1.CO4mj6IJ.js} +1 -1
  296. package/web/app/immutable/nodes/{10.ybliADtC.js → 10.BComrAcc.js} +5 -5
  297. package/web/app/immutable/nodes/{11.CWdfbS9L.js → 11.CNzRS9fn.js} +1 -1
  298. package/web/app/immutable/nodes/{12.DSU3TNHa.js → 12.C2n7WplF.js} +1 -1
  299. package/web/app/immutable/nodes/{13.B395oPY5.js → 13.D60oIlHW.js} +1 -1
  300. package/web/app/immutable/nodes/{14.DPnho-i5.js → 14.RHTyY8ed.js} +3 -3
  301. package/web/app/immutable/nodes/{15.IPdMXrpa.js → 15.DXCA05Q9.js} +1 -1
  302. package/web/app/immutable/nodes/{16.Cw2bhRT9.js → 16.BHGcOoK4.js} +1 -1
  303. package/web/app/immutable/nodes/{17.B-8GZWIV.js → 17.DMb17SuB.js} +1 -1
  304. package/web/app/immutable/nodes/{18.B_8rjYQB.js → 18.DZXncr1W.js} +1 -1
  305. package/web/app/immutable/nodes/{19.xCKjx5de.js → 19.BtsQ8Lfg.js} +2 -2
  306. package/web/app/immutable/nodes/{2.4eqTbGC7.js → 2.9HsLNQbg.js} +4 -4
  307. package/web/app/immutable/nodes/{20.DOuPBU4q.js → 20.JY9Qq_nG.js} +1 -1
  308. package/web/app/immutable/nodes/{3.gnGgxc2q.js → 3.BlmNm3mg.js} +1 -1
  309. package/web/app/immutable/nodes/{4.DhWSCpDA.js → 4.Cpy2Xerc.js} +1 -1
  310. package/web/app/immutable/nodes/{5.D-CLZiU3.js → 5.DeXJEhFX.js} +1 -1
  311. package/web/app/immutable/nodes/{6.D8GgaYC7.js → 6.Bpl-_47P.js} +1 -1
  312. package/web/app/immutable/nodes/{7.CYuvhsU8.js → 7.B1PEqe7o.js} +1 -1
  313. package/web/app/immutable/nodes/{8.Cfa_YzNb.js → 8.DEBn-U8f.js} +1 -1
  314. package/web/app/immutable/nodes/{9.Cjn8-jSI.js → 9.DtFfiQ9-.js} +4 -4
  315. package/web/app/version.json +1 -1
  316. package/web/generated/paraglide.js +45 -45
  317. package/web/index.html +18 -18
  318. package/web/app/immutable/chunks/ClwCcrCE.js +0 -1
  319. package/web/app/immutable/chunks/D4MngzTk.js +0 -1
  320. package/web/app/immutable/chunks/DkN1HOvv.js +0 -1
  321. package/web/app/immutable/chunks/cRhti_97.js +0 -1
  322. package/web/app/immutable/entry/start.D5KmTXnC.js +0 -1
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/D2C9COn-.js","/app/immutable/chunks/D4MngzTk.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/BwCXlNwV.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/C-KmDSVv.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/C3DfjxaV.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/DWPd-rzt.js","/app/immutable/chunks/GLifdN8w.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/BJKM0aco.js","/app/immutable/chunks/D7Fu5qfY.js","/app/immutable/chunks/DrzhapyO.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/DTWXK3Yd.js","/app/immutable/chunks/BV4GrhSx.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/bDYVRgHv.js","/app/immutable/chunks/CS2E7BOf.js","/app/immutable/chunks/pYgZjzLi.js","/app/immutable/chunks/BqUNG33_.js","/app/immutable/chunks/DJtAtlMe.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/DCtyzj03.js","/app/immutable/chunks/o4jWsDx5.js","/app/immutable/chunks/Cl9D9QD8.js","/app/immutable/chunks/Di9Z0x4r.js","/app/immutable/chunks/BiVxPdNt.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/BddjjpyI.js","/app/immutable/chunks/utZHhb7g.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/lJ2hrkPe.js","/app/immutable/chunks/DJXbxolz.js","/app/immutable/chunks/BpMUTlD3.js","/app/immutable/chunks/yfZcC2N6.js","/app/immutable/chunks/R_gbTJLb.js","/app/immutable/chunks/tkvqiJWu.js","/app/immutable/chunks/BgwmEIlo.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/B3bYRRle.js","/app/immutable/chunks/i6o2muyh.js","/app/immutable/chunks/CQGkGXEd.js","/app/immutable/chunks/BFZDKSps.js"])))=>i.map(i=>d[i]);
2
- import{bm as y,_ as h}from"./D4MngzTk.js";import{a as H}from"./BdWqymET.js";import{IS as k,i as A,Hm as M,Gm as C,bh as S,v6 as D,v4 as j,vl as B,no as V}from"./BwCXlNwV.js";import{bK as z}from"./C9g6kBvz.js";import{k as W}from"./pYgZjzLi.js";import"./CJxGDkBm.js";import"./DrzhapyO.js";import"./C3DfjxaV.js";import{R as $,F as I,E as N,Q as T}from"./BJKM0aco.js";import"./ChTqQfQN.js";import"./BiVxPdNt.js";import{o as G}from"./DJXbxolz.js";import{i as R}from"./DTWXK3Yd.js";function K(e,t){const a=e?.closest("[data-workspace-link-target]")?.dataset.workspaceLinkTarget;return{openInWorkspace:!!t&&a===t,panelId:e?.closest("[data-panel-id]")?.dataset.panelId,assistantLayoutId:e?.closest("[data-assistant-layout-id]")?.dataset.assistantLayoutId}}const o=new H("LinkHandler");async function q(e,t){try{const a=t.event?.target,n=K(a instanceof Element?a:null,t.workspaceId),i=t.openInWorkspace??n.openInWorkspace,r=i?void 0:t.sourcePanelId||n.panelId,{assistantLayoutId:c}=n;if(t={...t,openInWorkspace:i,sourcePanelId:r},t.customHandler&&await t.customHandler(e))return o.debug("Link handled by custom handler",{url:e}),!0;if(/^workspace-asset:/i.test(e.trim()))return W.error(y.ui_linkHandler_assetUnavailable_error()),!1;const l=$(e),{event:d}=t,u=l&&d&&!I(t)?t.githubLinkDefaultAction??G.select(k.state):void 0,f=!u||u==="open-in-app";if(t.workspaceId===A&&!t.forceExternal&&f){const{showAssistantContent:p}=await h(async()=>{const{showAssistantContent:m}=await import("./D2C9COn-.js");return{showAssistantContent:m}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]),import.meta.url),g=t.rawHref?.startsWith("/workspace/")?t.rawHref:e;if(await p(g,{layoutId:c}))return!0}if(e.startsWith("intent://"))return await Q(e,{...t,sourcePanelId:r});if(e.startsWith("devspace://"))return await X(e,{...t,sourcePanelId:r});const s=te(e,t.rawHref);if(s)return await ae(s.path,{...t,sourcePanelId:r},s.fromResolvedUrl);if(e.startsWith("http://")||e.startsWith("https://")){if(N(e))return o.debug("Auth URL detected, opening in external browser",{url:e}),await w(e);if(t.forceExternal)return await w(e);if(i&&f||I(t))return t.workspaceId?await b(e,t.workspaceId,{...t,assistantLayoutId:c}):(o.debug("No workspaceId available, opening in external browser",{url:e}),await w(e));if(l&&d&&u)switch(u){case"open-in-browser":return await w(e);case"open-in-app":return t.workspaceId?await b(e,t.workspaceId,{...t,assistantLayoutId:c}):await w(e);case"copy-link":return await z(e),!0;case"start-workspace":return k.dispatch(M({...l,url:e})),k.dispatch(C(!0)),!0;case"show-choices":return await ne(e,l,d,t,c)}return await w(e)}return e.startsWith("file://")?t.canOpenFile?.()===!1?!1:await x(e):(o.warn("Unknown link type, falling back to external browser",{url:e}),await w(e))}catch(a){return o.error("Failed to handle link",{url:e,error:a}),!1}}async function Q(e,t){try{const{parseIntentLink:a,handleIntentLink:n}=await h(async()=>{const{parseIntentLink:c,handleIntentLink:l}=await import("./CS2E7BOf.js");return{parseIntentLink:c,handleIntentLink:l}},__vite__mapDeps([24,1,2,25,11,7,26,16,8,17,27,28,29,14,15,10,18,30,31,32,33,3,4,5,6,9,34,35,36,37,38,39,40,22,41,42,23]),import.meta.url),i=a(e);if(t.canOpenFile&&i.type==="file"&&!t.canOpenFile())return!1;const r=i.workspaceId?S(i.workspaceId):t.workspaceId;return i.valid&&i.type!=="workspace"&&await _(r,t),L(t),await n(e,{workspaceId:t.openInWorkspace?r:t.workspaceId,sourcePanelId:t.sourcePanelId,openInAdjacentPanel:t.openInAdjacentPanel??I(t),openInNewAdjacentPanel:t.openInNewAdjacentPanel??!1})}catch(a){return o.error("Failed to handle intent link",{url:e,error:a}),!1}}async function X(e,t){try{const a=e.match(/^devspace:\/\/terminal\/(.+)$/);if(a){if(!t.workspaceId)return o.warn("Cannot open terminal without workspaceId",{url:e}),!1;const n=decodeURIComponent(a[1]);o.debug("Opening terminal from devspace link",{terminalId:n,workspaceId:t.workspaceId}),await _(t.workspaceId,t),L(t);const i={type:"terminal",title:y.layout_tabTypes_terminal_title(),terminalId:n,closable:!0};return I(t)?k.dispatch(D(t.workspaceId,i,t.sourcePanelId)):k.dispatch(j(t.workspaceId,i)),!0}return o.warn("Unhandled devspace:// link type",{url:e}),!1}catch(a){return o.error("Failed to handle devspace link",{url:e,error:a}),!1}}const Y=/^[a-z][a-z0-9+.-]*:/i,O=/^[a-z]:\/(?!\/)/i;function E(e){return e.replace(/\\/g,"/")}function Z(e){try{return E(decodeURIComponent(e))}catch{return null}}function J(e){return e.split("/").some(t=>t==="..")}function ee(e){const t=e.split("/").filter(a=>a&&a!==".");return t.length===0||t.some(a=>a==="..")?null:t.join("/")}async function _(e,t){if(!t.openInWorkspace||!e)return;const{openAndShowWorkspace:a}=await h(async()=>{const{openAndShowWorkspace:n}=await import("./tkvqiJWu.js").then(i=>i.s);return{openAndShowWorkspace:n}},__vite__mapDeps([45,4,2,3,5,6,7,8,1,9,10,11,46,47]),import.meta.url);try{await a(e)}catch(n){throw W.error(y.ui_linkHandler_navigationFailed_title(),{description:n instanceof Error?n.message:y.ui_linkHandler_unknownError_label()}),n}}function L(e){!e.workspaceId||!e.sourcePanelId||k.dispatch(V(e.workspaceId,e.sourcePanelId))}function te(e,t){const a=t??e;if(a){if(a.startsWith("#"))return null;const n=T(a).path;if(!a.startsWith("//")&&(O.test(E(n))||!Y.test(n)))return{path:a,fromResolvedUrl:!1}}if((e.startsWith("http://")||e.startsWith("https://"))&&typeof window<"u")try{const n=new URL(e);if(n.origin===window.location.origin)return{path:n.pathname+n.hash,fromResolvedUrl:!0}}catch{}return null}async function ae(e,t,a){try{if(t.canOpenFile?.()===!1)return!1;const n=T(e),i=Z(n.path);if(!i||i.includes("\0"))return!1;let r=i;const{line:c,column:l}=n,{workspaceId:d}=t;if(!d)return o.warn("Cannot open file link without workspaceId",{path:r}),!1;if(J(r))return o.warn("Rejected file link with path traversal",{path:r}),!1;if(r.startsWith("/")||O.test(r)){const{selectWorkspaceById:s}=await h(async()=>{const{selectWorkspaceById:P}=await import("./lJ2hrkPe.js").then(U=>U.dZ);return{selectWorkspaceById:P}},__vite__mapDeps([40,10,7,1,2,3,4,5,6,8,9,11,35,30,26,16,17,29,22,14,15,18,41,32]),import.meta.url),p=s.select(k.state,d),g=p?.worktreePath??p?.path,m=g?E(g):void 0,v=m?.endsWith("/")?m.slice(0,-1):m;if(v&&r.startsWith(`${v}/`))r=r.slice(v.length+1);else if(a)r=r.replace(/^\/+/,"");else{o.debug("Absolute path outside workspace root, opening in external editor",{path:r});const P=c===void 0?"":`:${c}${l===void 0?"":`:${l}`}`;return await x(`file://${r}${P}`)}}const u=ee(r);if(!u)return o.warn("Rejected invalid workspace file link",{path:r}),!1;r=u;const f=I(t);return await _(d,t),L(t),k.dispatch(B(d,r,{filePathIsLiteral:!0,line:c,openInAdjacentPanel:f,...t.sourcePanelId?{sourcePanelId:t.sourcePanelId}:{}})),o.debug("Opened file link in workspace file viewer",{path:r,workspaceId:d,line:c}),!0}catch(n){return o.error("Failed to open file link",{target:e,error:n}),!1}}async function ne(e,t,a,{workspaceId:n,openInWorkspace:i,sourcePanelId:r},c){try{const{showLinkActionMenu:l}=await h(async()=>{const{showLinkActionMenu:p}=await import("./B3bYRRle.js");return{showLinkActionMenu:p}},__vite__mapDeps([48,2]),import.meta.url),d=a.target instanceof HTMLElement?a.target:null;let u=a instanceof MouseEvent?a.clientX:0,f=a instanceof MouseEvent?a.clientY:0;if(u===0&&f===0&&d){const p=d.getBoundingClientRect();u=p.left,f=p.bottom}const s=l({url:e,gitHubRef:t,x:u,y:f,workspaceId:n,anchorElement:d,openInWorkspace:i??!1,sourcePanelId:r,assistantLayoutId:c});return t.kind==="pr"&&re(s,e),o.debug("Opened link action menu",{url:e,workspaceId:n}),!0}catch(l){return o.warn("Failed to open link action menu, falling back to external browser",{url:e,error:l}),await w(e)}}function re(e,t){h(async()=>{const{loadLinkActionMenuLinkedWorkspaces:a}=await import("./i6o2muyh.js");return{loadLinkActionMenuLinkedWorkspaces:a}},__vite__mapDeps([49,12,13,1,2,3,4,5,6,7,8,9,10,11,14,15,16,17,18,19,20,21,22,23,40,35,30,26,29,41,32,48]),import.meta.url).then(({loadLinkActionMenuLinkedWorkspaces:a})=>a(e,t)).catch(a=>{o.debug("PR workspace lookup unavailable",{url:t,error:a})})}async function ie(e){try{return await _(e,{openInWorkspace:!0}),!0}catch(t){return o.warn("Failed to open linked workspace",{workspaceId:e,error:t}),!1}}async function b(e,t,a={}){if(t===A){try{const{showAssistantContent:i}=await h(async()=>{const{showAssistantContent:r}=await import("./D2C9COn-.js");return{showAssistantContent:r}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]),import.meta.url);if(await i(e,{layoutId:a.assistantLayoutId}))return!0}catch(i){o.warn("Assistant panel unavailable, opening in external browser",{url:e,error:i})}return await w(e)}try{await _(t,a)}catch(i){return o.warn("Failed to enter workspace for in-app link",{url:e,workspaceId:t,error:i}),!1}const n=a.openInWorkspace?void 0:a.sourcePanelId;return await F(e,t,n)}async function F(e,t,a){let n=e,i;try{const{resolveBrowserLinkForOpen:r}=await h(async()=>{const{resolveBrowserLinkForOpen:l}=await import("./CQGkGXEd.js").then(d=>d.b);return{resolveBrowserLinkForOpen:l}},__vite__mapDeps([50,25,11,7,1,2,26,16,8,17,27,28,29,14,15,10,18,30,31,32,33,3,4,5,6,9,34,35,36,37,38,39]),import.meta.url),c=await r(e);n=c.url,i=c.requestedUrl}catch(r){o.warn("URL resolution failed, opening the URL unresolved",{url:e,error:r})}try{L({workspaceId:t,sourcePanelId:a});const{getPanelLayoutManager:r}=await h(async()=>{const{getPanelLayoutManager:l}=await import("./BFZDKSps.js").then(d=>d.p);return{getPanelLayoutManager:l}},__vite__mapDeps([51,3,4,2,5,6,7,8,1,9,10,11,43]),import.meta.url);return r(t).openBrowserPanel(n,void 0,a,i),o.debug("Opened URL in browser panel",{url:e,targetUrl:n,workspaceId:t}),!0}catch(r){return o.warn("Failed to open URL in browser panel, falling back to external browser",{url:e,error:r}),await w(n)}}async function w(e){try{return await R("shell:openExternal",{url:e}),o.debug("Opened URL in external browser",{url:e}),!0}catch(t){return o.error("Failed to open URL in external browser",{url:e,error:t}),!1}}async function x(e){try{const t=e.replace("file://","");return typeof window<"u"&&window.electronAPI?(await R("shell:openExternal",{url:`vscode://file/${t}`}),o.debug("Opened file in external editor",{filePath:t}),!0):!1}catch(t){return o.error("Failed to open file in external editor",{url:e,error:t}),!1}}function oe(e,t={}){let a=null,n=null,i=null;async function r(){if(!n||!i){const u=await h(()=>import("./BJKM0aco.js").then(f=>f.K),__vite__mapDeps([14,1,2,11,7,15,10,16,8,17,18]),import.meta.url);n=u.showLinkTooltip,i=u.hideLinkTooltip}}function c(u){const s=u.target.closest("a");if(s?.href&&!s.href.startsWith("intent://")&&!s.href.startsWith("devspace://")){if(s===a)return;a=s;const p=t.workspaceId??s.closest("[data-workspace-id]")?.dataset.workspaceId??s.closest("[data-workspace-surface]")?.dataset.workspaceSurface;r().then(()=>{a===s&&n&&n(s,s.href,p)})}else a&&(a=null,i?.())}function l(u){const s=u.target.closest("a");if(s&&s===a){const p=u.relatedTarget;if(p&&s.contains(p))return;a=null,i?.()}}function d(){a&&(a=null,i?.())}return e.addEventListener("mouseover",c),e.addEventListener("mouseout",l),e.addEventListener("click",d),()=>{e.removeEventListener("mouseover",c),e.removeEventListener("mouseout",l),e.removeEventListener("click",d),i?.()}}const ge=Object.freeze(Object.defineProperty({__proto__:null,createLinkTooltipHandler:oe,handleLink:q,openInBrowserPanel:F,openInExternalBrowser:w,openLinkInApp:b,openLinkedWorkspace:ie},Symbol.toStringTag,{value:"Module"}));export{b as a,ie as b,oe as c,q as h,ge as l,w as o,K as r};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DB5oJv4b.js","/app/immutable/chunks/NtxbXOxK.js","/app/immutable/chunks/CJxGDkBm.js","/app/immutable/chunks/DUUOaZUX.js","/app/immutable/chunks/PVXvIyE8.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/A91xcSiw.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BpozSsrs.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/DWPd-rzt.js","/app/immutable/chunks/BFPmZe29.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/DcsVySxU.js","/app/immutable/chunks/BnE71Sxv.js","/app/immutable/chunks/puisNM3r.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/DTWXK3Yd.js","/app/immutable/chunks/BV4GrhSx.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/C2Q_f-Ao.js","/app/immutable/chunks/B7KiQTDj.js","/app/immutable/chunks/BVSy1i1c.js","/app/immutable/chunks/DrPmlbuk.js","/app/immutable/chunks/Bst2sLeL.js","/app/immutable/chunks/NtFyWdpR.js","/app/immutable/chunks/jSlXIbXa.js","/app/immutable/chunks/CDAGrCMS.js","/app/immutable/chunks/4f4S0sUh.js","/app/immutable/chunks/BqCQZYkF.js","/app/immutable/chunks/b_O4pZtc.js","/app/immutable/chunks/DJfJ5NWH.js","/app/immutable/chunks/S6AtfZPI.js","/app/immutable/chunks/BkAhwE4C.js","/app/immutable/chunks/BoIfXiRv.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/Bd92b52s.js","/app/immutable/chunks/DSGWdxMc.js","/app/immutable/chunks/qW1_mixC.js","/app/immutable/chunks/CMFCeNSK.js","/app/immutable/chunks/DUyvq6BR.js","/app/immutable/chunks/CMPYMsb3.js","/app/immutable/chunks/DsDqvgC9.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/B3bYRRle.js","/app/immutable/chunks/D_tjJvUn.js","/app/immutable/chunks/CCW4xg3d.js","/app/immutable/chunks/DmfXn75c.js"])))=>i.map(i=>d[i]);
2
+ import{bm as y,_ as h}from"./NtxbXOxK.js";import{a as H}from"./BdWqymET.js";import{IS as k,i as A,Hm as M,Gm as C,bh as S,v6 as D,v4 as j,vl as B,no as V}from"./DUUOaZUX.js";import{bK as z}from"./C7xMm-xs.js";import{k as W}from"./BVSy1i1c.js";import"./CJxGDkBm.js";import"./puisNM3r.js";import"./BpozSsrs.js";import{R as $,F as I,E as N,Q as T}from"./DcsVySxU.js";import"./ChTqQfQN.js";import"./b_O4pZtc.js";import{o as G}from"./DSGWdxMc.js";import{i as R}from"./DTWXK3Yd.js";function K(e,t){const a=e?.closest("[data-workspace-link-target]")?.dataset.workspaceLinkTarget;return{openInWorkspace:!!t&&a===t,panelId:e?.closest("[data-panel-id]")?.dataset.panelId,assistantLayoutId:e?.closest("[data-assistant-layout-id]")?.dataset.assistantLayoutId}}const o=new H("LinkHandler");async function q(e,t){try{const a=t.event?.target,n=K(a instanceof Element?a:null,t.workspaceId),i=t.openInWorkspace??n.openInWorkspace,r=i?void 0:t.sourcePanelId||n.panelId,{assistantLayoutId:c}=n;if(t={...t,openInWorkspace:i,sourcePanelId:r},t.customHandler&&await t.customHandler(e))return o.debug("Link handled by custom handler",{url:e}),!0;if(/^workspace-asset:/i.test(e.trim()))return W.error(y.ui_linkHandler_assetUnavailable_error()),!1;const l=$(e),{event:d}=t,u=l&&d&&!I(t)?t.githubLinkDefaultAction??G.select(k.state):void 0,f=!u||u==="open-in-app";if(t.workspaceId===A&&!t.forceExternal&&f){const{showAssistantContent:p}=await h(async()=>{const{showAssistantContent:m}=await import("./DB5oJv4b.js");return{showAssistantContent:m}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]),import.meta.url),g=t.rawHref?.startsWith("/workspace/")?t.rawHref:e;if(await p(g,{layoutId:c}))return!0}if(e.startsWith("intent://"))return await Q(e,{...t,sourcePanelId:r});if(e.startsWith("devspace://"))return await X(e,{...t,sourcePanelId:r});const s=te(e,t.rawHref);if(s)return await ae(s.path,{...t,sourcePanelId:r},s.fromResolvedUrl);if(e.startsWith("http://")||e.startsWith("https://")){if(N(e))return o.debug("Auth URL detected, opening in external browser",{url:e}),await w(e);if(t.forceExternal)return await w(e);if(i&&f||I(t))return t.workspaceId?await b(e,t.workspaceId,{...t,assistantLayoutId:c}):(o.debug("No workspaceId available, opening in external browser",{url:e}),await w(e));if(l&&d&&u)switch(u){case"open-in-browser":return await w(e);case"open-in-app":return t.workspaceId?await b(e,t.workspaceId,{...t,assistantLayoutId:c}):await w(e);case"copy-link":return await z(e),!0;case"start-workspace":return k.dispatch(M({...l,url:e})),k.dispatch(C(!0)),!0;case"show-choices":return await ne(e,l,d,t,c)}return await w(e)}return e.startsWith("file://")?t.canOpenFile?.()===!1?!1:await x(e):(o.warn("Unknown link type, falling back to external browser",{url:e}),await w(e))}catch(a){return o.error("Failed to handle link",{url:e,error:a}),!1}}async function Q(e,t){try{const{parseIntentLink:a,handleIntentLink:n}=await h(async()=>{const{parseIntentLink:c,handleIntentLink:l}=await import("./B7KiQTDj.js");return{parseIntentLink:c,handleIntentLink:l}},__vite__mapDeps([24,1,2,25,11,7,26,16,8,17,27,28,29,14,15,10,18,30,31,32,33,3,4,5,6,9,34,35,36,37,38,39,40,22,41,42,23]),import.meta.url),i=a(e);if(t.canOpenFile&&i.type==="file"&&!t.canOpenFile())return!1;const r=i.workspaceId?S(i.workspaceId):t.workspaceId;return i.valid&&i.type!=="workspace"&&await _(r,t),L(t),await n(e,{workspaceId:t.openInWorkspace?r:t.workspaceId,sourcePanelId:t.sourcePanelId,openInAdjacentPanel:t.openInAdjacentPanel??I(t),openInNewAdjacentPanel:t.openInNewAdjacentPanel??!1})}catch(a){return o.error("Failed to handle intent link",{url:e,error:a}),!1}}async function X(e,t){try{const a=e.match(/^devspace:\/\/terminal\/(.+)$/);if(a){if(!t.workspaceId)return o.warn("Cannot open terminal without workspaceId",{url:e}),!1;const n=decodeURIComponent(a[1]);o.debug("Opening terminal from devspace link",{terminalId:n,workspaceId:t.workspaceId}),await _(t.workspaceId,t),L(t);const i={type:"terminal",title:y.layout_tabTypes_terminal_title(),terminalId:n,closable:!0};return I(t)?k.dispatch(D(t.workspaceId,i,t.sourcePanelId)):k.dispatch(j(t.workspaceId,i)),!0}return o.warn("Unhandled devspace:// link type",{url:e}),!1}catch(a){return o.error("Failed to handle devspace link",{url:e,error:a}),!1}}const Y=/^[a-z][a-z0-9+.-]*:/i,O=/^[a-z]:\/(?!\/)/i;function E(e){return e.replace(/\\/g,"/")}function Z(e){try{return E(decodeURIComponent(e))}catch{return null}}function J(e){return e.split("/").some(t=>t==="..")}function ee(e){const t=e.split("/").filter(a=>a&&a!==".");return t.length===0||t.some(a=>a==="..")?null:t.join("/")}async function _(e,t){if(!t.openInWorkspace||!e)return;const{openAndShowWorkspace:a}=await h(async()=>{const{openAndShowWorkspace:n}=await import("./CMPYMsb3.js").then(i=>i.s);return{openAndShowWorkspace:n}},__vite__mapDeps([45,4,2,3,5,6,7,8,1,9,10,11,46,47]),import.meta.url);try{await a(e)}catch(n){throw W.error(y.ui_linkHandler_navigationFailed_title(),{description:n instanceof Error?n.message:y.ui_linkHandler_unknownError_label()}),n}}function L(e){!e.workspaceId||!e.sourcePanelId||k.dispatch(V(e.workspaceId,e.sourcePanelId))}function te(e,t){const a=t??e;if(a){if(a.startsWith("#"))return null;const n=T(a).path;if(!a.startsWith("//")&&(O.test(E(n))||!Y.test(n)))return{path:a,fromResolvedUrl:!1}}if((e.startsWith("http://")||e.startsWith("https://"))&&typeof window<"u")try{const n=new URL(e);if(n.origin===window.location.origin)return{path:n.pathname+n.hash,fromResolvedUrl:!0}}catch{}return null}async function ae(e,t,a){try{if(t.canOpenFile?.()===!1)return!1;const n=T(e),i=Z(n.path);if(!i||i.includes("\0"))return!1;let r=i;const{line:c,column:l}=n,{workspaceId:d}=t;if(!d)return o.warn("Cannot open file link without workspaceId",{path:r}),!1;if(J(r))return o.warn("Rejected file link with path traversal",{path:r}),!1;if(r.startsWith("/")||O.test(r)){const{selectWorkspaceById:s}=await h(async()=>{const{selectWorkspaceById:P}=await import("./Bd92b52s.js").then(U=>U.dZ);return{selectWorkspaceById:P}},__vite__mapDeps([40,10,7,1,2,3,4,5,6,8,9,11,35,30,26,16,17,29,22,14,15,18,41,32]),import.meta.url),p=s.select(k.state,d),g=p?.worktreePath??p?.path,m=g?E(g):void 0,v=m?.endsWith("/")?m.slice(0,-1):m;if(v&&r.startsWith(`${v}/`))r=r.slice(v.length+1);else if(a)r=r.replace(/^\/+/,"");else{o.debug("Absolute path outside workspace root, opening in external editor",{path:r});const P=c===void 0?"":`:${c}${l===void 0?"":`:${l}`}`;return await x(`file://${r}${P}`)}}const u=ee(r);if(!u)return o.warn("Rejected invalid workspace file link",{path:r}),!1;r=u;const f=I(t);return await _(d,t),L(t),k.dispatch(B(d,r,{filePathIsLiteral:!0,line:c,openInAdjacentPanel:f,...t.sourcePanelId?{sourcePanelId:t.sourcePanelId}:{}})),o.debug("Opened file link in workspace file viewer",{path:r,workspaceId:d,line:c}),!0}catch(n){return o.error("Failed to open file link",{target:e,error:n}),!1}}async function ne(e,t,a,{workspaceId:n,openInWorkspace:i,sourcePanelId:r},c){try{const{showLinkActionMenu:l}=await h(async()=>{const{showLinkActionMenu:p}=await import("./B3bYRRle.js");return{showLinkActionMenu:p}},__vite__mapDeps([48,2]),import.meta.url),d=a.target instanceof HTMLElement?a.target:null;let u=a instanceof MouseEvent?a.clientX:0,f=a instanceof MouseEvent?a.clientY:0;if(u===0&&f===0&&d){const p=d.getBoundingClientRect();u=p.left,f=p.bottom}const s=l({url:e,gitHubRef:t,x:u,y:f,workspaceId:n,anchorElement:d,openInWorkspace:i??!1,sourcePanelId:r,assistantLayoutId:c});return t.kind==="pr"&&re(s,e),o.debug("Opened link action menu",{url:e,workspaceId:n}),!0}catch(l){return o.warn("Failed to open link action menu, falling back to external browser",{url:e,error:l}),await w(e)}}function re(e,t){h(async()=>{const{loadLinkActionMenuLinkedWorkspaces:a}=await import("./D_tjJvUn.js");return{loadLinkActionMenuLinkedWorkspaces:a}},__vite__mapDeps([49,12,13,1,2,3,4,5,6,7,8,9,10,11,14,15,16,17,18,19,20,21,22,23,40,35,30,26,29,41,32,48]),import.meta.url).then(({loadLinkActionMenuLinkedWorkspaces:a})=>a(e,t)).catch(a=>{o.debug("PR workspace lookup unavailable",{url:t,error:a})})}async function ie(e){try{return await _(e,{openInWorkspace:!0}),!0}catch(t){return o.warn("Failed to open linked workspace",{workspaceId:e,error:t}),!1}}async function b(e,t,a={}){if(t===A){try{const{showAssistantContent:i}=await h(async()=>{const{showAssistantContent:r}=await import("./DB5oJv4b.js");return{showAssistantContent:r}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]),import.meta.url);if(await i(e,{layoutId:a.assistantLayoutId}))return!0}catch(i){o.warn("Assistant panel unavailable, opening in external browser",{url:e,error:i})}return await w(e)}try{await _(t,a)}catch(i){return o.warn("Failed to enter workspace for in-app link",{url:e,workspaceId:t,error:i}),!1}const n=a.openInWorkspace?void 0:a.sourcePanelId;return await F(e,t,n)}async function F(e,t,a){let n=e,i;try{const{resolveBrowserLinkForOpen:r}=await h(async()=>{const{resolveBrowserLinkForOpen:l}=await import("./CCW4xg3d.js").then(d=>d.b);return{resolveBrowserLinkForOpen:l}},__vite__mapDeps([50,25,11,7,1,2,26,16,8,17,27,28,29,14,15,10,18,30,31,32,33,3,4,5,6,9,34,35,36,37,38,39]),import.meta.url),c=await r(e);n=c.url,i=c.requestedUrl}catch(r){o.warn("URL resolution failed, opening the URL unresolved",{url:e,error:r})}try{L({workspaceId:t,sourcePanelId:a});const{getPanelLayoutManager:r}=await h(async()=>{const{getPanelLayoutManager:l}=await import("./DmfXn75c.js").then(d=>d.p);return{getPanelLayoutManager:l}},__vite__mapDeps([51,3,4,2,5,6,7,8,1,9,10,11,43]),import.meta.url);return r(t).openBrowserPanel(n,void 0,a,i),o.debug("Opened URL in browser panel",{url:e,targetUrl:n,workspaceId:t}),!0}catch(r){return o.warn("Failed to open URL in browser panel, falling back to external browser",{url:e,error:r}),await w(n)}}async function w(e){try{return await R("shell:openExternal",{url:e}),o.debug("Opened URL in external browser",{url:e}),!0}catch(t){return o.error("Failed to open URL in external browser",{url:e,error:t}),!1}}async function x(e){try{const t=e.replace("file://","");return typeof window<"u"&&window.electronAPI?(await R("shell:openExternal",{url:`vscode://file/${t}`}),o.debug("Opened file in external editor",{filePath:t}),!0):!1}catch(t){return o.error("Failed to open file in external editor",{url:e,error:t}),!1}}function oe(e,t={}){let a=null,n=null,i=null;async function r(){if(!n||!i){const u=await h(()=>import("./DcsVySxU.js").then(f=>f.K),__vite__mapDeps([14,1,2,11,7,15,10,16,8,17,18]),import.meta.url);n=u.showLinkTooltip,i=u.hideLinkTooltip}}function c(u){const s=u.target.closest("a");if(s?.href&&!s.href.startsWith("intent://")&&!s.href.startsWith("devspace://")){if(s===a)return;a=s;const p=t.workspaceId??s.closest("[data-workspace-id]")?.dataset.workspaceId??s.closest("[data-workspace-surface]")?.dataset.workspaceSurface;r().then(()=>{a===s&&n&&n(s,s.href,p)})}else a&&(a=null,i?.())}function l(u){const s=u.target.closest("a");if(s&&s===a){const p=u.relatedTarget;if(p&&s.contains(p))return;a=null,i?.()}}function d(){a&&(a=null,i?.())}return e.addEventListener("mouseover",c),e.addEventListener("mouseout",l),e.addEventListener("click",d),()=>{e.removeEventListener("mouseover",c),e.removeEventListener("mouseout",l),e.removeEventListener("click",d),i?.()}}const ge=Object.freeze(Object.defineProperty({__proto__:null,createLinkTooltipHandler:oe,handleLink:q,openInBrowserPanel:F,openInExternalBrowser:w,openLinkInApp:b,openLinkedWorkspace:ie},Symbol.toStringTag,{value:"Module"}));export{b as a,ie as b,oe as c,q as h,ge as l,w as o,K as r};
@@ -1 +1 @@
1
- import{t as h,bo as o,bw as v,bs as z,bq as H,b as w}from"./D4MngzTk.js";import{bs as L,b_ as f,W as p,bn as u,aA as l,aB as k,aC as D}from"./CJxGDkBm.js";import{s as c,f as d,c as x}from"./DrzhapyO.js";import{c as T}from"./BiVxPdNt.js";const y="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='%23222326'%20width='200'%20height='200'%20viewBox='0%200%20100%20100'%3e%3cpath%20d='M1.22541%2061.5228c-.2225-.9485.90748-1.5459%201.59638-.857L39.3342%2097.1782c.6889.6889.0915%201.8189-.857%201.5964C20.0515%2094.4522%205.54779%2079.9485%201.22541%2061.5228ZM.00189135%2046.8891c-.01764375.2833.08887215.5599.28957165.7606L52.3503%2099.7085c.2007.2007.4773.3075.7606.2896%202.3692-.1476%204.6938-.46%206.9624-.9259.7645-.157%201.0301-1.0963.4782-1.6481L2.57595%2039.4485c-.55186-.5519-1.49117-.2863-1.648174.4782-.465915%202.2686-.77832%204.5932-.92588465%206.9624ZM4.21093%2029.7054c-.16649.3738-.08169.8106.20765%201.1l64.77602%2064.776c.2894.2894.7262.3742%201.1.2077%201.7861-.7956%203.5171-1.6927%205.1855-2.684.5521-.328.6373-1.0867.1832-1.5407L8.43566%2024.3367c-.45409-.4541-1.21271-.3689-1.54074.1832-.99132%201.6684-1.88843%203.3994-2.68399%205.1855ZM12.6587%2018.074c-.3701-.3701-.393-.9637-.0443-1.3541C21.7795%206.45931%2035.1114%200%2049.9519%200%2077.5927%200%20100%2022.4073%20100%2050.0481c0%2014.8405-6.4593%2028.1724-16.7199%2037.3375-.3903.3487-.984.3258-1.3542-.0443L12.6587%2018.074Z'%20/%3e%3c/svg%3e",B="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='%23fff'%20width='200'%20height='200'%20viewBox='0%200%20100%20100'%3e%3cpath%20d='M1.22541%2061.5228c-.2225-.9485.90748-1.5459%201.59638-.857L39.3342%2097.1782c.6889.6889.0915%201.8189-.857%201.5964C20.0515%2094.4522%205.54779%2079.9485%201.22541%2061.5228ZM.00189135%2046.8891c-.01764375.2833.08887215.5599.28957165.7606L52.3503%2099.7085c.2007.2007.4773.3075.7606.2896%202.3692-.1476%204.6938-.46%206.9624-.9259.7645-.157%201.0301-1.0963.4782-1.6481L2.57595%2039.4485c-.55186-.5519-1.49117-.2863-1.648174.4782-.465915%202.2686-.77832%204.5932-.92588465%206.9624ZM4.21093%2029.7054c-.16649.3738-.08169.8106.20765%201.1l64.77602%2064.776c.2894.2894.7262.3742%201.1.2077%201.7861-.7956%203.5171-1.6927%205.1855-2.684.5521-.328.6373-1.0867.1832-1.5407L8.43566%2024.3367c-.45409-.4541-1.21271-.3689-1.54074.1832-.99132%201.6684-1.88843%203.3994-2.68399%205.1855ZM12.6587%2018.074c-.3701-.3701-.393-.9637-.0443-1.3541C21.7795%206.45931%2035.1114%200%2049.9519%200%2077.5927%200%20100%2022.4073%20100%2050.0481c0%2014.8405-6.4593%2028.1724-16.7199%2037.3375-.3903.3487-.984.3258-1.3542-.0443L12.6587%2018.074Z'%20/%3e%3c/svg%3e";var I=k("<img/>");function S(C,e){if(new.target)return h({component:S,...C});L(e,!0);const a=()=>z(m,"$isDarkTheme",i),[i,g]=H();let s=o(e,"size",7,16),t=o(e,"class",7,"");const m=T(),_="Linear";var b={get size(){return s()},set size(n=16){s(n),l()},get class(){return t()},set class(n=""){t(n),l()},$set:v,$on:(n,Z)=>w(e,n,Z)},r=I();c(r,"alt",_),f(()=>{c(r,"src",a()?B:y),c(r,"width",s()),c(r,"height",s()),d(r,1,x(t()))}),p(C,r);var M=u(b);return g(),M}var N=D('<svg viewBox="0 0 278 245" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M160.822 12.5546C158.514 8.72421 155.255 5.5554 151.361 3.35567C147.467 1.15594 143.071 0 138.599 0C134.127 0 129.731 1.15594 125.838 3.35567C121.944 5.5554 118.685 8.72421 116.377 12.5546L79.8216 75.1657C107.749 89.1085 131.543 110.114 148.841 136.096C166.14 162.078 176.341 192.133 178.433 223.277H152.766C150.679 196.581 141.656 170.892 126.592 148.754C111.528 126.616 90.9439 108.795 66.8771 97.0546L33.0438 155.555C46.5734 161.622 58.3603 170.994 67.3207 182.809C76.281 194.623 82.1272 208.501 84.3216 223.166H25.3771C24.6781 223.116 24.0023 222.894 23.4108 222.518C22.8193 222.142 22.3306 221.625 21.9889 221.013C21.6471 220.401 21.463 219.714 21.4532 219.013C21.4434 218.312 21.6082 217.62 21.9327 216.999L38.266 189.221C32.7323 184.604 26.408 181.028 19.5994 178.666L3.43269 206.444C1.74966 209.33 0.657047 212.523 0.218326 215.835C-0.220395 219.148 0.00352239 222.515 0.877069 225.74C1.75062 228.966 3.25638 231.985 5.30688 234.624C7.35738 237.262 9.91174 239.467 12.8216 241.11C16.6554 243.27 20.9767 244.418 25.3771 244.444H106.099C107.599 225.944 104.295 207.371 96.5084 190.522C88.7219 173.674 76.7165 159.123 61.6549 148.277L74.4882 126.055C93.4962 139.11 108.771 156.896 118.806 177.657C128.841 198.419 133.289 221.438 131.71 244.444H200.099C201.692 209.593 194.11 174.936 178.112 143.934C162.114 112.932 138.26 86.6713 108.933 67.7769L134.877 23.3324C135.455 22.3638 136.393 21.6627 137.485 21.3818C138.578 21.1008 139.737 21.2628 140.71 21.8324C143.655 23.4435 253.433 214.999 255.488 217.221C255.85 217.871 256.035 218.604 256.022 219.347C256.01 220.091 255.802 220.818 255.418 221.455C255.035 222.092 254.49 222.616 253.839 222.975C253.188 223.334 252.454 223.515 251.71 223.499H225.266C225.599 230.573 225.599 237.629 225.266 244.666H251.822C255.194 244.688 258.537 244.041 261.657 242.762C264.777 241.484 267.613 239.599 270 237.217C272.387 234.835 274.278 232.003 275.563 228.886C276.849 225.768 277.503 222.427 277.488 219.055C277.492 214.601 276.302 210.227 274.044 206.388L160.822 12.5546Z"></path></svg>');function q(C,e){if(new.target)return h({component:q,...C});L(e,!0);let a=o(e,"size",7,16),i=o(e,"class",7,"");var g={get size(){return a()},set size(t=16){a(t),l()},get class(){return i()},set class(t=""){i(t),l()},$set:v,$on:(t,m)=>w(e,t,m)},s=N();return f(()=>{c(s,"width",a()),c(s,"height",a()),d(s,0,x(i()))}),p(C,s),u(g)}export{S as L,q as S};
1
+ import{t as h,bo as o,bw as v,bs as z,bq as H,b as w}from"./NtxbXOxK.js";import{bs as L,b_ as f,W as p,bn as u,aA as l,aB as k,aC as D}from"./CJxGDkBm.js";import{s as c,f as d,c as x}from"./puisNM3r.js";import{c as T}from"./b_O4pZtc.js";const y="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='%23222326'%20width='200'%20height='200'%20viewBox='0%200%20100%20100'%3e%3cpath%20d='M1.22541%2061.5228c-.2225-.9485.90748-1.5459%201.59638-.857L39.3342%2097.1782c.6889.6889.0915%201.8189-.857%201.5964C20.0515%2094.4522%205.54779%2079.9485%201.22541%2061.5228ZM.00189135%2046.8891c-.01764375.2833.08887215.5599.28957165.7606L52.3503%2099.7085c.2007.2007.4773.3075.7606.2896%202.3692-.1476%204.6938-.46%206.9624-.9259.7645-.157%201.0301-1.0963.4782-1.6481L2.57595%2039.4485c-.55186-.5519-1.49117-.2863-1.648174.4782-.465915%202.2686-.77832%204.5932-.92588465%206.9624ZM4.21093%2029.7054c-.16649.3738-.08169.8106.20765%201.1l64.77602%2064.776c.2894.2894.7262.3742%201.1.2077%201.7861-.7956%203.5171-1.6927%205.1855-2.684.5521-.328.6373-1.0867.1832-1.5407L8.43566%2024.3367c-.45409-.4541-1.21271-.3689-1.54074.1832-.99132%201.6684-1.88843%203.3994-2.68399%205.1855ZM12.6587%2018.074c-.3701-.3701-.393-.9637-.0443-1.3541C21.7795%206.45931%2035.1114%200%2049.9519%200%2077.5927%200%20100%2022.4073%20100%2050.0481c0%2014.8405-6.4593%2028.1724-16.7199%2037.3375-.3903.3487-.984.3258-1.3542-.0443L12.6587%2018.074Z'%20/%3e%3c/svg%3e",B="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='%23fff'%20width='200'%20height='200'%20viewBox='0%200%20100%20100'%3e%3cpath%20d='M1.22541%2061.5228c-.2225-.9485.90748-1.5459%201.59638-.857L39.3342%2097.1782c.6889.6889.0915%201.8189-.857%201.5964C20.0515%2094.4522%205.54779%2079.9485%201.22541%2061.5228ZM.00189135%2046.8891c-.01764375.2833.08887215.5599.28957165.7606L52.3503%2099.7085c.2007.2007.4773.3075.7606.2896%202.3692-.1476%204.6938-.46%206.9624-.9259.7645-.157%201.0301-1.0963.4782-1.6481L2.57595%2039.4485c-.55186-.5519-1.49117-.2863-1.648174.4782-.465915%202.2686-.77832%204.5932-.92588465%206.9624ZM4.21093%2029.7054c-.16649.3738-.08169.8106.20765%201.1l64.77602%2064.776c.2894.2894.7262.3742%201.1.2077%201.7861-.7956%203.5171-1.6927%205.1855-2.684.5521-.328.6373-1.0867.1832-1.5407L8.43566%2024.3367c-.45409-.4541-1.21271-.3689-1.54074.1832-.99132%201.6684-1.88843%203.3994-2.68399%205.1855ZM12.6587%2018.074c-.3701-.3701-.393-.9637-.0443-1.3541C21.7795%206.45931%2035.1114%200%2049.9519%200%2077.5927%200%20100%2022.4073%20100%2050.0481c0%2014.8405-6.4593%2028.1724-16.7199%2037.3375-.3903.3487-.984.3258-1.3542-.0443L12.6587%2018.074Z'%20/%3e%3c/svg%3e";var I=k("<img/>");function S(C,e){if(new.target)return h({component:S,...C});L(e,!0);const a=()=>z(m,"$isDarkTheme",i),[i,g]=H();let s=o(e,"size",7,16),t=o(e,"class",7,"");const m=T(),_="Linear";var b={get size(){return s()},set size(n=16){s(n),l()},get class(){return t()},set class(n=""){t(n),l()},$set:v,$on:(n,Z)=>w(e,n,Z)},r=I();c(r,"alt",_),f(()=>{c(r,"src",a()?B:y),c(r,"width",s()),c(r,"height",s()),d(r,1,x(t()))}),p(C,r);var M=u(b);return g(),M}var N=D('<svg viewBox="0 0 278 245" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M160.822 12.5546C158.514 8.72421 155.255 5.5554 151.361 3.35567C147.467 1.15594 143.071 0 138.599 0C134.127 0 129.731 1.15594 125.838 3.35567C121.944 5.5554 118.685 8.72421 116.377 12.5546L79.8216 75.1657C107.749 89.1085 131.543 110.114 148.841 136.096C166.14 162.078 176.341 192.133 178.433 223.277H152.766C150.679 196.581 141.656 170.892 126.592 148.754C111.528 126.616 90.9439 108.795 66.8771 97.0546L33.0438 155.555C46.5734 161.622 58.3603 170.994 67.3207 182.809C76.281 194.623 82.1272 208.501 84.3216 223.166H25.3771C24.6781 223.116 24.0023 222.894 23.4108 222.518C22.8193 222.142 22.3306 221.625 21.9889 221.013C21.6471 220.401 21.463 219.714 21.4532 219.013C21.4434 218.312 21.6082 217.62 21.9327 216.999L38.266 189.221C32.7323 184.604 26.408 181.028 19.5994 178.666L3.43269 206.444C1.74966 209.33 0.657047 212.523 0.218326 215.835C-0.220395 219.148 0.00352239 222.515 0.877069 225.74C1.75062 228.966 3.25638 231.985 5.30688 234.624C7.35738 237.262 9.91174 239.467 12.8216 241.11C16.6554 243.27 20.9767 244.418 25.3771 244.444H106.099C107.599 225.944 104.295 207.371 96.5084 190.522C88.7219 173.674 76.7165 159.123 61.6549 148.277L74.4882 126.055C93.4962 139.11 108.771 156.896 118.806 177.657C128.841 198.419 133.289 221.438 131.71 244.444H200.099C201.692 209.593 194.11 174.936 178.112 143.934C162.114 112.932 138.26 86.6713 108.933 67.7769L134.877 23.3324C135.455 22.3638 136.393 21.6627 137.485 21.3818C138.578 21.1008 139.737 21.2628 140.71 21.8324C143.655 23.4435 253.433 214.999 255.488 217.221C255.85 217.871 256.035 218.604 256.022 219.347C256.01 220.091 255.802 220.818 255.418 221.455C255.035 222.092 254.49 222.616 253.839 222.975C253.188 223.334 252.454 223.515 251.71 223.499H225.266C225.599 230.573 225.599 237.629 225.266 244.666H251.822C255.194 244.688 258.537 244.041 261.657 242.762C264.777 241.484 267.613 239.599 270 237.217C272.387 234.835 274.278 232.003 275.563 228.886C276.849 225.768 277.503 222.427 277.488 219.055C277.492 214.601 276.302 210.227 274.044 206.388L160.822 12.5546Z"></path></svg>');function q(C,e){if(new.target)return h({component:q,...C});L(e,!0);let a=o(e,"size",7,16),i=o(e,"class",7,"");var g={get size(){return a()},set size(t=16){a(t),l()},get class(){return i()},set class(t=""){i(t),l()},$set:v,$on:(t,m)=>w(e,t,m)},s=N();return f(()=>{c(s,"width",a()),c(s,"height",a()),d(s,0,x(i()))}),p(C,s),u(g)}export{S as L,q as S};
@@ -1 +1 @@
1
- import{t as Ce,bo as r,bw as we,bp as Ye,b as Se,bm as O}from"./D4MngzTk.js";import{bs as xe,aD as a,a5 as H,bA as N,b_ as M,W as w,bn as Be,c9 as z,bH as m,aA as s,aB as ke,bV as A,bf as Oe,bS as ge,be as ye,b$ as ve,bO as _e,ca as Ze,a7 as V,ay as T}from"./CJxGDkBm.js";import{i as he}from"./BqUNG33_.js";import{s as R}from"./C3DfjxaV.js";import{c as Ae}from"./o4jWsDx5.js";import{a_ as $e,aa as et,f as De}from"./DJtAtlMe.js";import"./BJKM0aco.js";import{O as tt}from"./C-3h7Yfn.js";import{a as rt,D as st}from"./DsLK0lhE.js";import{b as nt,e as Ke,s as Pe,c as at,f as ot}from"./DrzhapyO.js";import"./DfUAlDfK.js";import{e as it}from"./BpMs8swj.js";import{b as ut}from"./NtFyWdpR.js";import{i as lt}from"./CC7to1B5.js";import"./COizPexY.js";import"./CELWxQ_U.js";var ct=new Set(["$$slots","$$events","$$legacy","children","onSubmit","busy","enterKey","modEnter","class"]),ft=ke('<form><fieldset class="contents"><!></fieldset></form>');function ze(K,t){if(new.target)return Ce({component:ze,...K});xe(t,!0);let l=r(t,"children",7),d=r(t,"onSubmit",7),b=r(t,"busy",7,!1),f=r(t,"enterKey",7,"submit"),g=r(t,"modEnter",7,"submit"),h=r(t,"class",7),L=Ye(t,ct),i,y=A(!1);const v=z(()=>b()||a(y));async function E(n){if(n.preventDefault(),!a(v)){m(y,!0);try{await d()(n)}finally{m(y,!1)}}}function S(n){if(n.key!=="Enter"||n.isComposing||n.defaultPrevented||a(v))return;const _=n.target,x=lt(_),D=_.closest('button, a[href], select, summary, [role="button"], [role="link"], [role="checkbox"], [role="radio"], [role="switch"], [role="tab"], [role="menuitem"], [role="option"], [role="combobox"], [role="slider"]');if(D&&i.contains(D)||_ instanceof HTMLInputElement&&!["text","search","email","url","tel","password","number"].includes(_.type))return;const k=n.metaKey||n.ctrlKey;(k?g()==="submit":!x&&f()==="submit")?(n.preventDefault(),i.requestSubmit()):(!x||k)&&n.preventDefault()}var p={get children(){return l()},set children(n){l(n),s()},get onSubmit(){return d()},set onSubmit(n){d(n),s()},get busy(){return b()},set busy(n=!1){b(n),s()},get enterKey(){return f()},set enterKey(n="submit"){f(n),s()},get modEnter(){return g()},set modEnter(n="submit"){g(n),s()},get class(){return h()},set class(n){h(n),s()},$set:we,$on:(n,_)=>Se(t,n,_)},u=ft();nt(u,n=>({"data-slot":"form","aria-busy":a(v)||void 0,class:n,onsubmit:E,onkeydown:S,...L}),[()=>Ke("grid gap-4",h())]);var C=H(u),o=H(C);return R(o,l),N(C),N(u),ut(u,n=>i=n,()=>i),M(()=>{C.disabled=a(v),Pe(C,"aria-busy",a(v)||void 0)}),w(K,u),Be(p)}var mt=ke('<div data-slot="form-actions"><div data-slot="form-actions-destructive" class="flex items-center"><!></div> <div data-slot="form-actions-end" class="ml-auto flex items-center gap-2"><!> <!> <!></div></div>');function Ve(K,t){if(new.target)return Ce({component:Ve,...K});xe(t,!0);let l=r(t,"destructive",7),d=r(t,"secondary",7),b=r(t,"primary",7),f=r(t,"hint",7),g=r(t,"class",7);const h=$e();var L={get destructive(){return l()},set destructive(o){l(o),s()},get secondary(){return d()},set secondary(o){d(o),s()},get primary(){return b()},set primary(o){b(o),s()},get hint(){return f()},set hint(o){f(o),s()},get class(){return g()},set class(o){g(o),s()},$set:we,$on:(o,n)=>Se(t,o,n)},i=mt(),y=H(i),v=H(y);R(v,()=>l()??Oe),N(y);var E=ge(y,2),S=H(E);{var p=o=>{et(o,{children:(n,_)=>{ye();var x=ve();M(()=>_e(x,f())),w(n,x)},$$slots:{default:!0}})};he(S,o=>{f()&&o(p)})}var u=ge(S,2);R(u,()=>d()??Oe);var C=ge(u,2);return R(C,b),N(E),N(i),M(o=>{Pe(i,"data-size",h),ot(i,1,o)},[()=>at(Ke("flex items-center justify-between",h==="compact"?"gap-2":"gap-3",g()))]),w(K,i),Be(L)}function dt(K,t){if(new.target)return Ce({component:dt,...K});xe(t,!0);let l=r(t,"open",15,!1),d=r(t,"static",7,!1),b=r(t,"title",7),f=r(t,"description",7),g=r(t,"titleId",7),h=r(t,"descriptionId",7),L=r(t,"children",7),i=r(t,"footer",7),y=r(t,"submitLabel",23,()=>O.modals_bulkActionConfirm_confirm_label()),v=r(t,"cancelLabel",23,()=>O.modals_bulkActionConfirm_cancel_label()),E=r(t,"submitVariant",7,"primary"),S=r(t,"canSubmit",7,!0),p=r(t,"busy",7,!1),u=r(t,"submitBusy",7,!1),C=r(t,"role",7,"dialog"),o=r(t,"dismissOnInteractOutside",7,!0),n=r(t,"showCancel",7,!0),_=r(t,"showCloseButton",7,!0),x=r(t,"closeLabel",23,()=>O.ui_dialog_close_ariaLabel()),D=r(t,"class",7),k=r(t,"size",7,"default"),j=r(t,"initialFocus",7),X=r(t,"focusContent",7,!1),q=r(t,"focusSubmit",7,!1),Y=r(t,"focusCancel",7,!1),W=r(t,"escapeKeydownBehavior",7,"close"),Z=r(t,"enterKey",7,"submit"),$=r(t,"modEnter",7,"submit"),ee=r(t,"onfocusin",7),te=r(t,"onCloseAutoFocus",7),re=r(t,"onSubmit",7),se=r(t,"onCancel",7),ne=A(!1),G=A(""),ae=A(!1),J=A(null),oe=A(null),ie=A(null);const B=z(()=>p()||a(ne));Ze(()=>{l()&&(m(ae,!1),m(G,""))});function ue(){a(B)||a(ae)||(m(ae,!0),l(!1),se()?.())}async function Te(){if(!(a(B)||u()||!S())){m(ne,!0),m(G,"");try{await re()()}catch{m(G,O.ui_dialog_submitFailed_error(),!0)}finally{m(ne,!1)}}}function He(e){const F=j()??(Y()?a(oe):q()?a(ie):X()?a(J):null);F&&(F.focus(),F.ownerDocument.activeElement===F&&e.preventDefault())}var Ne={get open(){return l()},set open(e=!1){l(e),s()},get static(){return d()},set static(e=!1){d(e),s()},get title(){return b()},set title(e){b(e),s()},get description(){return f()},set description(e){f(e),s()},get titleId(){return g()},set titleId(e){g(e),s()},get descriptionId(){return h()},set descriptionId(e){h(e),s()},get children(){return L()},set children(e){L(e),s()},get footer(){return i()},set footer(e){i(e),s()},get submitLabel(){return y()},set submitLabel(e=O.modals_bulkActionConfirm_confirm_label()){y(e),s()},get cancelLabel(){return v()},set cancelLabel(e=O.modals_bulkActionConfirm_cancel_label()){v(e),s()},get submitVariant(){return E()},set submitVariant(e="primary"){E(e),s()},get canSubmit(){return S()},set canSubmit(e=!0){S(e),s()},get busy(){return p()},set busy(e=!1){p(e),s()},get submitBusy(){return u()},set submitBusy(e=!1){u(e),s()},get role(){return C()},set role(e="dialog"){C(e),s()},get dismissOnInteractOutside(){return o()},set dismissOnInteractOutside(e=!0){o(e),s()},get showCancel(){return n()},set showCancel(e=!0){n(e),s()},get showCloseButton(){return _()},set showCloseButton(e=!0){_(e),s()},get closeLabel(){return x()},set closeLabel(e=O.ui_dialog_close_ariaLabel()){x(e),s()},get class(){return D()},set class(e){D(e),s()},get size(){return k()},set size(e="default"){k(e),s()},get initialFocus(){return j()},set initialFocus(e){j(e),s()},get focusContent(){return X()},set focusContent(e=!1){X(e),s()},get focusSubmit(){return q()},set focusSubmit(e=!1){q(e),s()},get focusCancel(){return Y()},set focusCancel(e=!1){Y(e),s()},get escapeKeydownBehavior(){return W()},set escapeKeydownBehavior(e="close"){W(e),s()},get enterKey(){return Z()},set enterKey(e="submit"){Z(e),s()},get modEnter(){return $()},set modEnter(e="submit"){$(e),s()},get onfocusin(){return ee()},set onfocusin(e){ee(e),s()},get onCloseAutoFocus(){return te()},set onCloseAutoFocus(e){te(e),s()},get onSubmit(){return re()},set onSubmit(e){re(e),s()},get onCancel(){return se()},set onCancel(e){se(e),s()},$set:we,$on:(e,F)=>Se(t,e,F)},Ee=V(),Re=T(Ee);return Ae(Re,()=>tt,(e,F)=>{F(e,{get open(){return l()},get staticPosition(){return d()},onOpenChange:le=>!le&&ue(),children:(le,bt)=>{var Fe=V(),Me=T(Fe);{let je=z(()=>Ke("flex min-h-0 flex-col overflow-hidden p-0",D()));Ae(Me,()=>rt,(qe,We)=>{We(qe,{get role(){return C()},get size(){return k()},get class(){return a(je)},get closeDisabled(){return a(B)},get showCloseButton(){return _()},get closeLabel(){return x()},get escapeKeydownBehavior(){return W()},onOpenAutoFocus:He,get onCloseAutoFocus(){return te()},get onfocusin(){return ee()},onkeydown:c=>{c.key==="Escape"&&it(a(J),c)||c.key==="Escape"&&W()==="close"&&(c.preventDefault(),c.stopPropagation(),ue())},onInteractOutside:c=>(a(B)||!o())&&c.preventDefault(),onEscapeKeydown:c=>a(B)&&c.preventDefault(),get ref(){return a(J)},set ref(c){m(J,c,!0)},children:(c,gt)=>{ze(c,{onSubmit:Te,get busy(){return a(B)},get enterKey(){return Z()},get modEnter(){return $()},class:"flex min-h-0 min-w-0 flex-1 flex-col",children:(Ge,yt)=>{st(Ge,{get title(){return b()},get description(){return f()},get titleId(){return g()},get descriptionId(){return h()},get children(){return L()},get error(){return a(G)},footer:Je=>{var Le=V(),Qe=T(Le);{var Ue=P=>{var ce=V(),pe=T(ce);R(pe,i),w(P,ce)},Xe=P=>{Ve(P,{secondary:fe=>{var Q=V(),me=T(Q);{var de=I=>{De(I,{variant:"ghost-light",get disabled(){return a(B)},onclick:ue,get ref(){return a(oe)},set ref(U){m(oe,U,!0)},children:(U,be)=>{ye();var Ie=ve();M(()=>_e(Ie,v())),w(U,Ie)},$$slots:{default:!0}})};he(me,I=>{n()&&I(de)})}w(fe,Q)},primary:fe=>{{let Q=z(()=>q()?"focus-visible:outline focus-visible:-outline-offset-1":void 0),me=z(()=>a(B)||u()),de=z(()=>!S()||a(B)||u());De(fe,{type:"submit",get variant(){return E()},get class(){return a(Q)},get loading(){return a(me)},get disabled(){return a(de)},get ref(){return a(ie)},set ref(I){m(ie,I,!0)},children:(I,U)=>{ye();var be=ve();M(()=>_e(be,y())),w(I,be)},$$slots:{default:!0}})}},$$slots:{secondary:!0,primary:!0}})};he(Qe,P=>{i()?P(Ue):P(Xe,-1)})}w(Je,Le)},$$slots:{footer:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})})}w(le,Fe)},$$slots:{default:!0}})}),w(K,Ee),Be(Ne)}export{ze as F,Ve as a,dt as b};
1
+ import{t as Ce,bo as r,bw as we,bp as Ye,b as Se,bm as O}from"./NtxbXOxK.js";import{bs as xe,aD as a,a5 as H,bA as N,b_ as M,W as w,bn as Be,c9 as z,bH as m,aA as s,aB as ke,bV as A,bf as Oe,bS as ge,be as ye,b$ as ve,bO as _e,ca as Ze,a7 as V,ay as T}from"./CJxGDkBm.js";import{i as he}from"./DrPmlbuk.js";import{s as R}from"./BpozSsrs.js";import{c as Ae}from"./CDAGrCMS.js";import{a_ as $e,aa as et,f as De}from"./Bst2sLeL.js";import"./DcsVySxU.js";import{O as tt}from"./FNy8h0Ka.js";import{a as rt,D as st}from"./Dqbu3Xgt.js";import{b as nt,e as Ke,s as Pe,c as at,f as ot}from"./puisNM3r.js";import"./Ci0DCXei.js";import{e as it}from"./BpMs8swj.js";import{b as ut}from"./NtFyWdpR.js";import{i as lt}from"./CC7to1B5.js";import"./LQm_WUG-.js";import"./C8PDklve.js";var ct=new Set(["$$slots","$$events","$$legacy","children","onSubmit","busy","enterKey","modEnter","class"]),ft=ke('<form><fieldset class="contents"><!></fieldset></form>');function ze(K,t){if(new.target)return Ce({component:ze,...K});xe(t,!0);let l=r(t,"children",7),d=r(t,"onSubmit",7),b=r(t,"busy",7,!1),f=r(t,"enterKey",7,"submit"),g=r(t,"modEnter",7,"submit"),h=r(t,"class",7),L=Ye(t,ct),i,y=A(!1);const v=z(()=>b()||a(y));async function E(n){if(n.preventDefault(),!a(v)){m(y,!0);try{await d()(n)}finally{m(y,!1)}}}function S(n){if(n.key!=="Enter"||n.isComposing||n.defaultPrevented||a(v))return;const _=n.target,x=lt(_),D=_.closest('button, a[href], select, summary, [role="button"], [role="link"], [role="checkbox"], [role="radio"], [role="switch"], [role="tab"], [role="menuitem"], [role="option"], [role="combobox"], [role="slider"]');if(D&&i.contains(D)||_ instanceof HTMLInputElement&&!["text","search","email","url","tel","password","number"].includes(_.type))return;const k=n.metaKey||n.ctrlKey;(k?g()==="submit":!x&&f()==="submit")?(n.preventDefault(),i.requestSubmit()):(!x||k)&&n.preventDefault()}var p={get children(){return l()},set children(n){l(n),s()},get onSubmit(){return d()},set onSubmit(n){d(n),s()},get busy(){return b()},set busy(n=!1){b(n),s()},get enterKey(){return f()},set enterKey(n="submit"){f(n),s()},get modEnter(){return g()},set modEnter(n="submit"){g(n),s()},get class(){return h()},set class(n){h(n),s()},$set:we,$on:(n,_)=>Se(t,n,_)},u=ft();nt(u,n=>({"data-slot":"form","aria-busy":a(v)||void 0,class:n,onsubmit:E,onkeydown:S,...L}),[()=>Ke("grid gap-4",h())]);var C=H(u),o=H(C);return R(o,l),N(C),N(u),ut(u,n=>i=n,()=>i),M(()=>{C.disabled=a(v),Pe(C,"aria-busy",a(v)||void 0)}),w(K,u),Be(p)}var mt=ke('<div data-slot="form-actions"><div data-slot="form-actions-destructive" class="flex items-center"><!></div> <div data-slot="form-actions-end" class="ml-auto flex items-center gap-2"><!> <!> <!></div></div>');function Ve(K,t){if(new.target)return Ce({component:Ve,...K});xe(t,!0);let l=r(t,"destructive",7),d=r(t,"secondary",7),b=r(t,"primary",7),f=r(t,"hint",7),g=r(t,"class",7);const h=$e();var L={get destructive(){return l()},set destructive(o){l(o),s()},get secondary(){return d()},set secondary(o){d(o),s()},get primary(){return b()},set primary(o){b(o),s()},get hint(){return f()},set hint(o){f(o),s()},get class(){return g()},set class(o){g(o),s()},$set:we,$on:(o,n)=>Se(t,o,n)},i=mt(),y=H(i),v=H(y);R(v,()=>l()??Oe),N(y);var E=ge(y,2),S=H(E);{var p=o=>{et(o,{children:(n,_)=>{ye();var x=ve();M(()=>_e(x,f())),w(n,x)},$$slots:{default:!0}})};he(S,o=>{f()&&o(p)})}var u=ge(S,2);R(u,()=>d()??Oe);var C=ge(u,2);return R(C,b),N(E),N(i),M(o=>{Pe(i,"data-size",h),ot(i,1,o)},[()=>at(Ke("flex items-center justify-between",h==="compact"?"gap-2":"gap-3",g()))]),w(K,i),Be(L)}function dt(K,t){if(new.target)return Ce({component:dt,...K});xe(t,!0);let l=r(t,"open",15,!1),d=r(t,"static",7,!1),b=r(t,"title",7),f=r(t,"description",7),g=r(t,"titleId",7),h=r(t,"descriptionId",7),L=r(t,"children",7),i=r(t,"footer",7),y=r(t,"submitLabel",23,()=>O.modals_bulkActionConfirm_confirm_label()),v=r(t,"cancelLabel",23,()=>O.modals_bulkActionConfirm_cancel_label()),E=r(t,"submitVariant",7,"primary"),S=r(t,"canSubmit",7,!0),p=r(t,"busy",7,!1),u=r(t,"submitBusy",7,!1),C=r(t,"role",7,"dialog"),o=r(t,"dismissOnInteractOutside",7,!0),n=r(t,"showCancel",7,!0),_=r(t,"showCloseButton",7,!0),x=r(t,"closeLabel",23,()=>O.ui_dialog_close_ariaLabel()),D=r(t,"class",7),k=r(t,"size",7,"default"),j=r(t,"initialFocus",7),X=r(t,"focusContent",7,!1),q=r(t,"focusSubmit",7,!1),Y=r(t,"focusCancel",7,!1),W=r(t,"escapeKeydownBehavior",7,"close"),Z=r(t,"enterKey",7,"submit"),$=r(t,"modEnter",7,"submit"),ee=r(t,"onfocusin",7),te=r(t,"onCloseAutoFocus",7),re=r(t,"onSubmit",7),se=r(t,"onCancel",7),ne=A(!1),G=A(""),ae=A(!1),J=A(null),oe=A(null),ie=A(null);const B=z(()=>p()||a(ne));Ze(()=>{l()&&(m(ae,!1),m(G,""))});function ue(){a(B)||a(ae)||(m(ae,!0),l(!1),se()?.())}async function Te(){if(!(a(B)||u()||!S())){m(ne,!0),m(G,"");try{await re()()}catch{m(G,O.ui_dialog_submitFailed_error(),!0)}finally{m(ne,!1)}}}function He(e){const F=j()??(Y()?a(oe):q()?a(ie):X()?a(J):null);F&&(F.focus(),F.ownerDocument.activeElement===F&&e.preventDefault())}var Ne={get open(){return l()},set open(e=!1){l(e),s()},get static(){return d()},set static(e=!1){d(e),s()},get title(){return b()},set title(e){b(e),s()},get description(){return f()},set description(e){f(e),s()},get titleId(){return g()},set titleId(e){g(e),s()},get descriptionId(){return h()},set descriptionId(e){h(e),s()},get children(){return L()},set children(e){L(e),s()},get footer(){return i()},set footer(e){i(e),s()},get submitLabel(){return y()},set submitLabel(e=O.modals_bulkActionConfirm_confirm_label()){y(e),s()},get cancelLabel(){return v()},set cancelLabel(e=O.modals_bulkActionConfirm_cancel_label()){v(e),s()},get submitVariant(){return E()},set submitVariant(e="primary"){E(e),s()},get canSubmit(){return S()},set canSubmit(e=!0){S(e),s()},get busy(){return p()},set busy(e=!1){p(e),s()},get submitBusy(){return u()},set submitBusy(e=!1){u(e),s()},get role(){return C()},set role(e="dialog"){C(e),s()},get dismissOnInteractOutside(){return o()},set dismissOnInteractOutside(e=!0){o(e),s()},get showCancel(){return n()},set showCancel(e=!0){n(e),s()},get showCloseButton(){return _()},set showCloseButton(e=!0){_(e),s()},get closeLabel(){return x()},set closeLabel(e=O.ui_dialog_close_ariaLabel()){x(e),s()},get class(){return D()},set class(e){D(e),s()},get size(){return k()},set size(e="default"){k(e),s()},get initialFocus(){return j()},set initialFocus(e){j(e),s()},get focusContent(){return X()},set focusContent(e=!1){X(e),s()},get focusSubmit(){return q()},set focusSubmit(e=!1){q(e),s()},get focusCancel(){return Y()},set focusCancel(e=!1){Y(e),s()},get escapeKeydownBehavior(){return W()},set escapeKeydownBehavior(e="close"){W(e),s()},get enterKey(){return Z()},set enterKey(e="submit"){Z(e),s()},get modEnter(){return $()},set modEnter(e="submit"){$(e),s()},get onfocusin(){return ee()},set onfocusin(e){ee(e),s()},get onCloseAutoFocus(){return te()},set onCloseAutoFocus(e){te(e),s()},get onSubmit(){return re()},set onSubmit(e){re(e),s()},get onCancel(){return se()},set onCancel(e){se(e),s()},$set:we,$on:(e,F)=>Se(t,e,F)},Ee=V(),Re=T(Ee);return Ae(Re,()=>tt,(e,F)=>{F(e,{get open(){return l()},get staticPosition(){return d()},onOpenChange:le=>!le&&ue(),children:(le,bt)=>{var Fe=V(),Me=T(Fe);{let je=z(()=>Ke("flex min-h-0 flex-col overflow-hidden p-0",D()));Ae(Me,()=>rt,(qe,We)=>{We(qe,{get role(){return C()},get size(){return k()},get class(){return a(je)},get closeDisabled(){return a(B)},get showCloseButton(){return _()},get closeLabel(){return x()},get escapeKeydownBehavior(){return W()},onOpenAutoFocus:He,get onCloseAutoFocus(){return te()},get onfocusin(){return ee()},onkeydown:c=>{c.key==="Escape"&&it(a(J),c)||c.key==="Escape"&&W()==="close"&&(c.preventDefault(),c.stopPropagation(),ue())},onInteractOutside:c=>(a(B)||!o())&&c.preventDefault(),onEscapeKeydown:c=>a(B)&&c.preventDefault(),get ref(){return a(J)},set ref(c){m(J,c,!0)},children:(c,gt)=>{ze(c,{onSubmit:Te,get busy(){return a(B)},get enterKey(){return Z()},get modEnter(){return $()},class:"flex min-h-0 min-w-0 flex-1 flex-col",children:(Ge,yt)=>{st(Ge,{get title(){return b()},get description(){return f()},get titleId(){return g()},get descriptionId(){return h()},get children(){return L()},get error(){return a(G)},footer:Je=>{var Le=V(),Qe=T(Le);{var Ue=P=>{var ce=V(),pe=T(ce);R(pe,i),w(P,ce)},Xe=P=>{Ve(P,{secondary:fe=>{var Q=V(),me=T(Q);{var de=I=>{De(I,{variant:"ghost-light",get disabled(){return a(B)},onclick:ue,get ref(){return a(oe)},set ref(U){m(oe,U,!0)},children:(U,be)=>{ye();var Ie=ve();M(()=>_e(Ie,v())),w(U,Ie)},$$slots:{default:!0}})};he(me,I=>{n()&&I(de)})}w(fe,Q)},primary:fe=>{{let Q=z(()=>q()?"focus-visible:outline focus-visible:-outline-offset-1":void 0),me=z(()=>a(B)||u()),de=z(()=>!S()||a(B)||u());De(fe,{type:"submit",get variant(){return E()},get class(){return a(Q)},get loading(){return a(me)},get disabled(){return a(de)},get ref(){return a(ie)},set ref(I){m(ie,I,!0)},children:(I,U)=>{ye();var be=ve();M(()=>_e(be,y())),w(I,be)},$$slots:{default:!0}})}},$$slots:{secondary:!0,primary:!0}})};he(Qe,P=>{i()?P(Ue):P(Xe,-1)})}w(Je,Le)},$$slots:{footer:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})})}w(le,Fe)},$$slots:{default:!0}})}),w(K,Ee),Be(Ne)}export{ze as F,Ve as a,dt as b};
@@ -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"./D4MngzTk.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"./NtxbXOxK.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{gW as O,gC as U,J4 as P,JU as H,C_ as q,tJ as N,uG as V,Au as j,Av as z,J2 as K,J3 as Q,Aw as X}from"./BwCXlNwV.js";import{selectWorkspaceTabOrder as f,selectCurrentWorkspaceTabId as S,selectLastClosedWorkspaceTab as Y}from"./BpMUTlD3.js";import{i as Z,q as M,b as ee,j as te,l as ae}from"./yfZcC2N6.js";import{g as ne}from"./CLgO49-n.js";import{bm as l}from"./D4MngzTk.js";import{z as oe,S as y}from"./BJKM0aco.js";import{B as h,S as x,P as ce}from"./DWPd-rzt.js";import{aa as le,a8 as E}from"./CILpVksu.js";import{g as se}from"./BFfFhR1D.js";function A(e,a){const n=f.select(e.state),o=S.select(e.state);if(!o)return null;const c=n.indexOf(o),s=c+(a==="left"?-1:1),p=n[s];return c<0||!p?null:(e.dispatch(N(o,p,a==="left"?"before":"after")),o)}function B(e){const a=S.select(e);return a&&f.select(e).includes(a)?a:null}function m(e,a,n){const o=B(e.state),c=o?`/workspace/${o}`:ne(e.state);return a!==c&&n(c),o}function ie(e,a,n,o){return e.dispatch(O(a)),m(e,n,o),a}function I(e,a){const o=a.match(/^\/workspace\/([^/]+)/)?.[1];return o?o==="new"?null:o:null}function R(e,a,n,o){if(n==="/")return G(e,a==="next"?0:"last",n,o);e.dispatch(a==="next"?K():Q());const c=S.select(e.state);if(!c)return null;const s=`/workspace/${c}`;return n!==s&&o(s),c}function re(e,a,n){const o=I(e,a);return o?ie(e,o,a,n):null}function pe(e,a,n){const o=I(e,a);if(!o)return null;const c=Z.select(e.state,o);if(!c)return null;const s=c.tabs.find(v=>v.id===c.activeTabId),p=c.tabs.length===0&&c.activeTabId===null,g=M.select(e.state,o)>1&&(p||c.tabs.length===1&&s!==void 0&&s.closable!==!1);if((!s||s.closable===!1)&&!g)return null;const T=n??se(o)?.availableCanvasWidth??void 0;return e.dispatch(U(o,void 0,T)),s?.id??c.id}function ue(e,a){const n=e.state.panelLayout.byWorkspaceId[a];return!n||n.restoreStatus==="pending"?!1:ee.select(e.state,a).length===0}function de(e,a,n){B(e.state)||e.dispatch(P(0)),m(e,a,n)}function L(e,a,{navigate:n,closeWindow:o}){return o?(o(),"window"):(m(e,a,n),null)}function be(e,a,n){const o=I(e,a);return o?pe(e,a,n.availableCanvasWidth)!==null?"panel":ue(e,o)?(e.dispatch(O(o)),f.select(e.state).length>0?(de(e,a,n.navigate),"workspace"):L(e,a,n)??"workspace"):null:f.select(e.state).length>0?null:L(e,a,n)}function fe(e,a,n){return e.dispatch(X()),m(e,a,n)}function ke(e,a,n){const o=a.match(/^\/workspace\/([^/]+)/),c=o&&o[1]!=="new"?o[1]:null,s=Y.select(e.state),p=c?ae.select(e.state,c):null;return c&&p&&(!s||p.closedAt>=s.closedAt)?p.kind==="column"?(e.dispatch(j(c)),"column"):(e.dispatch(z(c)),p.kind):s?(fe(e,a,n),"workspace"):null}function we(e,a){const n=a.match(/^\/workspace\/([^/]+)/),o=n&&n[1]!=="new"?n[1]:null;if(!o)return null;const c=V(o);return e.dispatch(c),te.select(e.state,o)}function G(e,a,n,o){const c=f.select(e.state),s=a==="last"?c.length-1:a;return s<0||s>=c.length?null:(e.dispatch(P(s)),m(e,n,o))}function We({isMac:e,register:a,store:n,getCurrentPath:o,navigate:c,openNewWorkspace:s,getRailMachineIds:p,onCreateAgent:g,onCreateNote:T,onCreateTerminal:v,onCreateBrowser:D,onWorkspaceTabMoved:W,closeWindow:F,resolveBinding:_}){const r=e?{meta:!0}:{ctrl:!0},J=oe("TOGGLE_SIDEBAR",e),k=t=>()=>t(o()),$=t=>()=>{const i=o().match(/^\/workspace\/([^/]+)/);i?.[1]&&i[1]!=="new"&&t(i[1])},u=t=>_?{binding:()=>_(t)}:{},w=t=>_?.(t)??ce(t);a({...u("global.new-space"),...r,key:"n",global:!0,description:l.workspace_shortcuts_newSpace_description(),action:s}),a({...u("panel.toggle-sidebar"),...J,global:!0,description:y.TOGGLE_SIDEBAR.label,action:()=>n.dispatch(H())}),a({...u("navigation.new-tab"),...r,key:"t",global:!0,description:l.workspace_shortcuts_newPanel_description(),action:k(t=>we(n,t))});for(const[t,i,b,d]of[["workspace.new-agent","a",l.ui_shortcuts_newAgent_label(),g],["workspace.new-note","n",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_note_label()}),T],["workspace.new-terminal","t",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_terminal_label()}),v],["workspace.new-browser","b",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_browser_label()}),D]])d&&a({...u(t),...r,key:i,alt:!0,global:!0,allowInTerminal:!0,description:b,action:$(d)});a({...u("navigation.close-tab"),...r,key:"w",global:!0,description:l.workspace_shortcuts_closePanelTab_description(),action:k(t=>be(n,t,{navigate:c,closeWindow:F}))}),a({...u("navigation.close-space-tab"),...r,key:"w",shift:!0,global:!0,description:l.workspace_shortcuts_closeSpaceTab_description(),action:k(t=>re(n,t,c))}),a({...u("navigation.reopen-tab"),...r,key:"t",shift:!0,global:!0,description:l.workspace_shortcuts_reopenClosedTabOrSpace_description(),action:k(t=>ke(n,t,c))}),a({...u("navigation.move-space-tab-left"),...r,key:"ArrowLeft",alt:!0,shift:!0,global:!0,description:y.MOVE_SPACE_TAB_LEFT.label,action:()=>{const t=A(n,"left");t&&W?.({workspaceId:t,position:f.select(n.state).indexOf(t)+1})}}),a({...u("navigation.move-space-tab-right"),...r,key:"ArrowRight",alt:!0,shift:!0,global:!0,description:y.MOVE_SPACE_TAB_RIGHT.label,action:()=>{const t=A(n,"right");t&&W?.({workspaceId:t,position:f.select(n.state).indexOf(t)+1})}});for(const[t,i]of[["next",!1],["previous",!0]]){a({...u(t==="next"?"global.next-space":"global.previous-space"),key:"Tab",ctrl:!0,shift:i,global:!0,description:t==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:k(d=>R(n,t,d,c))});const b=t==="next"?"global.next-space-alt":"global.previous-space-alt";a({...u(b),...r,key:t==="next"?"}":"{",shift:!0,global:!0,allowInTerminal:!0,preferLocal:!0,enabled:d=>!_||!h(b,d,_,e),description:t==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:k(d=>R(n,t,d,c))})}const C=t=>{t===1?c("/"):G(n,t===9?"last":t-2,o(),c)};for(let t=1;t<=9;t++)a({...r,key:String(t),binding:()=>w("navigation.go-to-device").replace(/([1-8])-9$/,String(t)),global:!0,allowInTerminal:!0,enabled:i=>E.select(n.state)&&!h("navigation.go-to-device",i,w,e),description:l.machineRail_nav_ariaLabel(),action:()=>{const i=p?.()??le.select(n.state).map(d=>d.id),b=i[t===9?i.length-1:t-1];b&&n.dispatch(q(b))}});for(let t=1;t<=9;t++)a({...r,key:String(t),binding:()=>x["navigation.go-to-device"].replace(/([1-8])-9$/,String(t)),global:!0,allowInTerminal:!0,enabled:i=>!E.select(n.state)&&w("navigation.go-to-tab")===x["navigation.go-to-tab"]&&!h("navigation.go-to-device",i,w,e),description:l.ui_shortcuts_goToTab_label(),action:()=>C(t)});for(let t=1;t<=9;t++)a({binding:()=>w("navigation.go-to-tab").replace(/([1-8])-9$/,String(t)),...r,alt:!0,key:String(t),global:!0,allowInTerminal:!0,enabled:i=>!h("navigation.go-to-tab",i,w,e),description:t===1?l.home_navigation_description():t===9?l.workspace_shortcuts_selectLastSpaceTab_description():l.workspace_shortcuts_selectSpaceTab_description({digit:t}),action:()=>C(t)})}export{be as c,We as r};
1
+ import{gW as O,gC as U,J4 as P,JU as H,C_ as q,tJ as N,uG as V,Au as j,Av as z,J2 as K,J3 as Q,Aw as X}from"./DUUOaZUX.js";import{selectWorkspaceTabOrder as f,selectCurrentWorkspaceTabId as S,selectLastClosedWorkspaceTab as Y}from"./qW1_mixC.js";import{i as Z,q as M,b as ee,j as te,l as ae}from"./CMFCeNSK.js";import{g as ne}from"./Dcity0ZX.js";import{bm as l}from"./NtxbXOxK.js";import{z as oe,S as y}from"./DcsVySxU.js";import{B as h,S as x,P as ce}from"./DWPd-rzt.js";import{aa as le,a8 as E}from"./Bd_P-L3U.js";import{g as se}from"./CZ-QhNUI.js";function A(e,a){const n=f.select(e.state),o=S.select(e.state);if(!o)return null;const c=n.indexOf(o),s=c+(a==="left"?-1:1),p=n[s];return c<0||!p?null:(e.dispatch(N(o,p,a==="left"?"before":"after")),o)}function B(e){const a=S.select(e);return a&&f.select(e).includes(a)?a:null}function m(e,a,n){const o=B(e.state),c=o?`/workspace/${o}`:ne(e.state);return a!==c&&n(c),o}function ie(e,a,n,o){return e.dispatch(O(a)),m(e,n,o),a}function I(e,a){const o=a.match(/^\/workspace\/([^/]+)/)?.[1];return o?o==="new"?null:o:null}function R(e,a,n,o){if(n==="/")return G(e,a==="next"?0:"last",n,o);e.dispatch(a==="next"?K():Q());const c=S.select(e.state);if(!c)return null;const s=`/workspace/${c}`;return n!==s&&o(s),c}function re(e,a,n){const o=I(e,a);return o?ie(e,o,a,n):null}function pe(e,a,n){const o=I(e,a);if(!o)return null;const c=Z.select(e.state,o);if(!c)return null;const s=c.tabs.find(v=>v.id===c.activeTabId),p=c.tabs.length===0&&c.activeTabId===null,g=M.select(e.state,o)>1&&(p||c.tabs.length===1&&s!==void 0&&s.closable!==!1);if((!s||s.closable===!1)&&!g)return null;const T=n??se(o)?.availableCanvasWidth??void 0;return e.dispatch(U(o,void 0,T)),s?.id??c.id}function ue(e,a){const n=e.state.panelLayout.byWorkspaceId[a];return!n||n.restoreStatus==="pending"?!1:ee.select(e.state,a).length===0}function de(e,a,n){B(e.state)||e.dispatch(P(0)),m(e,a,n)}function L(e,a,{navigate:n,closeWindow:o}){return o?(o(),"window"):(m(e,a,n),null)}function be(e,a,n){const o=I(e,a);return o?pe(e,a,n.availableCanvasWidth)!==null?"panel":ue(e,o)?(e.dispatch(O(o)),f.select(e.state).length>0?(de(e,a,n.navigate),"workspace"):L(e,a,n)??"workspace"):null:f.select(e.state).length>0?null:L(e,a,n)}function fe(e,a,n){return e.dispatch(X()),m(e,a,n)}function ke(e,a,n){const o=a.match(/^\/workspace\/([^/]+)/),c=o&&o[1]!=="new"?o[1]:null,s=Y.select(e.state),p=c?ae.select(e.state,c):null;return c&&p&&(!s||p.closedAt>=s.closedAt)?p.kind==="column"?(e.dispatch(j(c)),"column"):(e.dispatch(z(c)),p.kind):s?(fe(e,a,n),"workspace"):null}function we(e,a){const n=a.match(/^\/workspace\/([^/]+)/),o=n&&n[1]!=="new"?n[1]:null;if(!o)return null;const c=V(o);return e.dispatch(c),te.select(e.state,o)}function G(e,a,n,o){const c=f.select(e.state),s=a==="last"?c.length-1:a;return s<0||s>=c.length?null:(e.dispatch(P(s)),m(e,n,o))}function We({isMac:e,register:a,store:n,getCurrentPath:o,navigate:c,openNewWorkspace:s,getRailMachineIds:p,onCreateAgent:g,onCreateNote:T,onCreateTerminal:v,onCreateBrowser:D,onWorkspaceTabMoved:W,closeWindow:F,resolveBinding:_}){const r=e?{meta:!0}:{ctrl:!0},J=oe("TOGGLE_SIDEBAR",e),k=t=>()=>t(o()),$=t=>()=>{const i=o().match(/^\/workspace\/([^/]+)/);i?.[1]&&i[1]!=="new"&&t(i[1])},u=t=>_?{binding:()=>_(t)}:{},w=t=>_?.(t)??ce(t);a({...u("global.new-space"),...r,key:"n",global:!0,description:l.workspace_shortcuts_newSpace_description(),action:s}),a({...u("panel.toggle-sidebar"),...J,global:!0,description:y.TOGGLE_SIDEBAR.label,action:()=>n.dispatch(H())}),a({...u("navigation.new-tab"),...r,key:"t",global:!0,description:l.workspace_shortcuts_newPanel_description(),action:k(t=>we(n,t))});for(const[t,i,b,d]of[["workspace.new-agent","a",l.ui_shortcuts_newAgent_label(),g],["workspace.new-note","n",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_note_label()}),T],["workspace.new-terminal","t",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_terminal_label()}),v],["workspace.new-browser","b",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_browser_label()}),D]])d&&a({...u(t),...r,key:i,alt:!0,global:!0,allowInTerminal:!0,description:b,action:$(d)});a({...u("navigation.close-tab"),...r,key:"w",global:!0,description:l.workspace_shortcuts_closePanelTab_description(),action:k(t=>be(n,t,{navigate:c,closeWindow:F}))}),a({...u("navigation.close-space-tab"),...r,key:"w",shift:!0,global:!0,description:l.workspace_shortcuts_closeSpaceTab_description(),action:k(t=>re(n,t,c))}),a({...u("navigation.reopen-tab"),...r,key:"t",shift:!0,global:!0,description:l.workspace_shortcuts_reopenClosedTabOrSpace_description(),action:k(t=>ke(n,t,c))}),a({...u("navigation.move-space-tab-left"),...r,key:"ArrowLeft",alt:!0,shift:!0,global:!0,description:y.MOVE_SPACE_TAB_LEFT.label,action:()=>{const t=A(n,"left");t&&W?.({workspaceId:t,position:f.select(n.state).indexOf(t)+1})}}),a({...u("navigation.move-space-tab-right"),...r,key:"ArrowRight",alt:!0,shift:!0,global:!0,description:y.MOVE_SPACE_TAB_RIGHT.label,action:()=>{const t=A(n,"right");t&&W?.({workspaceId:t,position:f.select(n.state).indexOf(t)+1})}});for(const[t,i]of[["next",!1],["previous",!0]]){a({...u(t==="next"?"global.next-space":"global.previous-space"),key:"Tab",ctrl:!0,shift:i,global:!0,description:t==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:k(d=>R(n,t,d,c))});const b=t==="next"?"global.next-space-alt":"global.previous-space-alt";a({...u(b),...r,key:t==="next"?"}":"{",shift:!0,global:!0,allowInTerminal:!0,preferLocal:!0,enabled:d=>!_||!h(b,d,_,e),description:t==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:k(d=>R(n,t,d,c))})}const C=t=>{t===1?c("/"):G(n,t===9?"last":t-2,o(),c)};for(let t=1;t<=9;t++)a({...r,key:String(t),binding:()=>w("navigation.go-to-device").replace(/([1-8])-9$/,String(t)),global:!0,allowInTerminal:!0,enabled:i=>E.select(n.state)&&!h("navigation.go-to-device",i,w,e),description:l.machineRail_nav_ariaLabel(),action:()=>{const i=p?.()??le.select(n.state).map(d=>d.id),b=i[t===9?i.length-1:t-1];b&&n.dispatch(q(b))}});for(let t=1;t<=9;t++)a({...r,key:String(t),binding:()=>x["navigation.go-to-device"].replace(/([1-8])-9$/,String(t)),global:!0,allowInTerminal:!0,enabled:i=>!E.select(n.state)&&w("navigation.go-to-tab")===x["navigation.go-to-tab"]&&!h("navigation.go-to-device",i,w,e),description:l.ui_shortcuts_goToTab_label(),action:()=>C(t)});for(let t=1;t<=9;t++)a({binding:()=>w("navigation.go-to-tab").replace(/([1-8])-9$/,String(t)),...r,alt:!0,key:String(t),global:!0,allowInTerminal:!0,enabled:i=>!h("navigation.go-to-tab",i,w,e),description:t===1?l.home_navigation_description():t===9?l.workspace_shortcuts_selectLastSpaceTab_description():l.workspace_shortcuts_selectSpaceTab_description({digit:t}),action:()=>C(t)})}export{be as c,We as r};
@@ -1 +1 @@
1
- import{t as N,bo as s,bw as T,b as k,bp as B,br as X}from"./D4MngzTk.js";import{bo as Y,bs as D,a7 as y,ay as _,W as m,bn as G,aA as o,aD as b,a5 as Q,bf as R,bA as j,c9 as P,aB as O,bS as Z}from"./CJxGDkBm.js";import{i as M}from"./BqUNG33_.js";import{s as z}from"./C3DfjxaV.js";import{c as $}from"./o4jWsDx5.js";import{F as ee}from"./BddjjpyI.js";import{b as te,e as re}from"./DrzhapyO.js";import{b as ne}from"./8gFeUK_j.js";import{u as ae}from"./Cn4uSlRl.js";import"./C-ZYRRid.js";import{az as H,O as se,av as L,aQ as oe}from"./DJtAtlMe.js";var ie=new Set(["$$slots","$$events","$$legacy","children","child","ref","id"]),le=O("<div><!></div>");function q(g,t){const l=Y();if(new.target)return N({component:q,...g});D(t,!0);let c=s(t,"children",7),i=s(t,"child",7),a=s(t,"ref",15,null),u=s(t,"id",23,()=>H(l)),d=B(t,ie);const x=se.create({id:L(()=>u()),ref:L(()=>a(),e=>a(e))}),p=P(()=>oe(d,x.props));var I={get children(){return c()},set children(e){c(e),o()},get child(){return i()},set child(e){i(e),o()},get ref(){return a()},set ref(e=null){a(e),o()},get id(){return u()},set id(e=H(l)){u(e),o()},$set:T,$on:(e,n)=>k(t,e,n)},f=y(),C=_(f);{var r=e=>{var n=y(),h=_(n);z(h,i,()=>({props:b(p)})),m(e,n)},v=e=>{var n=le();te(n,()=>({...b(p)}));var h=Q(n);z(h,()=>c()??R),j(n),m(e,n)};M(C,e=>{i()?e(r):e(v,-1)})}return m(g,f),G(I)}var ce=new Set(["$$slots","$$events","$$legacy","ref","class","children","icon","iconWeight","alignIconColumn"]),ue=O('<span data-slot="menu-item-leading" class="first-line-icon w-(--menu-icon-size)" aria-hidden="true"><!></span>'),de=O("<!> <!>",1);function me(g,t){if(new.target)return N({component:me,...g});D(t,!0);let l=s(t,"ref",15,null),c=s(t,"class",7),i=s(t,"children",7),a=s(t,"icon",7),u=s(t,"iconWeight",7),d=s(t,"alignIconColumn",7,!0),x=B(t,ce);const p=ae(()=>!!a());var I={get ref(){return l()},set ref(r=null){l(r),o()},get class(){return c()},set class(r){c(r),o()},get children(){return i()},set children(r){i(r),o()},get icon(){return a()},set icon(r){a(r),o()},get iconWeight(){return u()},set iconWeight(r){u(r),o()},get alignIconColumn(){return d()},set alignIconColumn(r=!0){d(r),o()},$set:T,$on:(r,v)=>k(t,r,v)},f=y(),C=_(f);{let r=P(()=>re(ne,"flex min-h-0 items-start gap-2.5 px-2.5 py-1 font-medium text-muted-foreground",!d()&&"menu-section-label px-2 leading-(--text-caption-line-height) text-muted-foreground",c()));$(C,()=>q,(v,e)=>{e(v,X({"data-slot":"menu-label",get class(){return b(r)}},()=>x,{get ref(){return l()},set ref(n){l(n)},children:(n,h)=>{var A=de(),F=_(A);{var E=S=>{var W=ue(),U=Q(W);{var V=w=>{ee(w,{get icon(){return a()},get weight(){return u()},size:"xs",class:"size-4 text-muted-foreground"})};M(U,w=>{a()&&w(V)})}j(W),m(S,W)},J=P(()=>a()||d()&&p());M(F,S=>{b(J)&&S(E)})}var K=Z(F,2);z(K,()=>i()??R),m(n,A)},$$slots:{default:!0}}))})}return m(g,f),G(I)}export{me as M};
1
+ import{t as N,bo as s,bw as T,b as k,bp as B,br as X}from"./NtxbXOxK.js";import{bo as Y,bs as D,a7 as y,ay as _,W as m,bn as G,aA as o,aD as b,a5 as Q,bf as R,bA as j,c9 as P,aB as O,bS as Z}from"./CJxGDkBm.js";import{i as M}from"./DrPmlbuk.js";import{s as z}from"./BpozSsrs.js";import{c as $}from"./CDAGrCMS.js";import{F as ee}from"./S6AtfZPI.js";import{b as te,e as re}from"./puisNM3r.js";import{b as ne}from"./8gFeUK_j.js";import{u as ae}from"./Cn4uSlRl.js";import"./BJtZTy_N.js";import{az as H,O as se,av as L,aQ as oe}from"./Bst2sLeL.js";var ie=new Set(["$$slots","$$events","$$legacy","children","child","ref","id"]),le=O("<div><!></div>");function q(g,t){const l=Y();if(new.target)return N({component:q,...g});D(t,!0);let c=s(t,"children",7),i=s(t,"child",7),a=s(t,"ref",15,null),u=s(t,"id",23,()=>H(l)),d=B(t,ie);const x=se.create({id:L(()=>u()),ref:L(()=>a(),e=>a(e))}),p=P(()=>oe(d,x.props));var I={get children(){return c()},set children(e){c(e),o()},get child(){return i()},set child(e){i(e),o()},get ref(){return a()},set ref(e=null){a(e),o()},get id(){return u()},set id(e=H(l)){u(e),o()},$set:T,$on:(e,n)=>k(t,e,n)},f=y(),C=_(f);{var r=e=>{var n=y(),h=_(n);z(h,i,()=>({props:b(p)})),m(e,n)},v=e=>{var n=le();te(n,()=>({...b(p)}));var h=Q(n);z(h,()=>c()??R),j(n),m(e,n)};M(C,e=>{i()?e(r):e(v,-1)})}return m(g,f),G(I)}var ce=new Set(["$$slots","$$events","$$legacy","ref","class","children","icon","iconWeight","alignIconColumn"]),ue=O('<span data-slot="menu-item-leading" class="first-line-icon w-(--menu-icon-size)" aria-hidden="true"><!></span>'),de=O("<!> <!>",1);function me(g,t){if(new.target)return N({component:me,...g});D(t,!0);let l=s(t,"ref",15,null),c=s(t,"class",7),i=s(t,"children",7),a=s(t,"icon",7),u=s(t,"iconWeight",7),d=s(t,"alignIconColumn",7,!0),x=B(t,ce);const p=ae(()=>!!a());var I={get ref(){return l()},set ref(r=null){l(r),o()},get class(){return c()},set class(r){c(r),o()},get children(){return i()},set children(r){i(r),o()},get icon(){return a()},set icon(r){a(r),o()},get iconWeight(){return u()},set iconWeight(r){u(r),o()},get alignIconColumn(){return d()},set alignIconColumn(r=!0){d(r),o()},$set:T,$on:(r,v)=>k(t,r,v)},f=y(),C=_(f);{let r=P(()=>re(ne,"flex min-h-0 items-start gap-2.5 px-2.5 py-1 font-medium text-muted-foreground",!d()&&"menu-section-label px-2 leading-(--text-caption-line-height) text-muted-foreground",c()));$(C,()=>q,(v,e)=>{e(v,X({"data-slot":"menu-label",get class(){return b(r)}},()=>x,{get ref(){return l()},set ref(n){l(n)},children:(n,h)=>{var A=de(),F=_(A);{var E=S=>{var W=ue(),U=Q(W);{var V=w=>{ee(w,{get icon(){return a()},get weight(){return u()},size:"xs",class:"size-4 text-muted-foreground"})};M(U,w=>{a()&&w(V)})}j(W),m(S,W)},J=P(()=>a()||d()&&p());M(F,S=>{b(J)&&S(E)})}var K=Z(F,2);z(K,()=>i()??R),m(n,A)},$$slots:{default:!0}}))})}return m(g,f),G(I)}export{me as M};
@@ -1 +1 @@
1
- import{IS as p,BV as o,aR as d,aS as l,aT as a}from"./BwCXlNwV.js";import{i as x,c}from"./CMiilI_P.js";import{w as f}from"./EjOa78um.js";const C=t=>{if(typeof window>"u")return;const e=window;e.intent?.reduxContext&&(e.intent.reduxContext===t&&(e.intent.reduxContext=void 0),Array.isArray(e.intent.reduxContext)&&(e.intent.reduxContext=e.intent.reduxContext.filter(i=>i!==t)))},R=t=>{if(typeof window>"u")return;const e=window;if(e.intent=e.intent||{},e.intent.reduxContext===t)console.log("Context is exposed already");else if(!e.intent.reduxContext)e.intent.reduxContext=t;else{const n=[];e.intent.reduxContext=n.concat(e.intent.reduxContext).concat(t),e.isStorybook?console.log("Multiple Redux stores initialized:",e.intent.reduxContext):console.error("Multiple Redux stores initialized:",e.intent.reduxContext)}e.intent.debug||(e.intent.debug={});const i=n=>{if(n==="true")return!0;if(n==="false")return!1},r=n=>{const g=i(o.getItem(n))??!1;o.setItem(n,String(!g))},u=n=>{o.getItem(n)?o.removeItem(n):o.setItem(n,"true")},s=()=>{console.log("Redux logging preference updated. Reload to take effect.")};e.intent.enableReduxLogging=()=>{o.setItem(d,"true"),s()},e.intent.disableReduxLogging=()=>{o.setItem(d,"false"),s()},e.intent.debug.toggleReduxLogs=()=>{r(d),s()},e.intent.debug.toggleStateReferenceChecks=()=>{u(l)},e.intent.debug.toggleStructuredCloneChecks=()=>{u(a)}},m=(t,e)=>{const i=t.init(f(e)),r={store:t,dispose:()=>{C(r);try{i()}finally{c(t)}}};return R(r),x(t),r};export{m as initAppStore,p as store};
1
+ import{IS as p,BV as o,aR as d,aS as l,aT as a}from"./DUUOaZUX.js";import{i as x,c}from"./CMiilI_P.js";import{w as f}from"./EjOa78um.js";const C=t=>{if(typeof window>"u")return;const e=window;e.intent?.reduxContext&&(e.intent.reduxContext===t&&(e.intent.reduxContext=void 0),Array.isArray(e.intent.reduxContext)&&(e.intent.reduxContext=e.intent.reduxContext.filter(i=>i!==t)))},R=t=>{if(typeof window>"u")return;const e=window;if(e.intent=e.intent||{},e.intent.reduxContext===t)console.log("Context is exposed already");else if(!e.intent.reduxContext)e.intent.reduxContext=t;else{const n=[];e.intent.reduxContext=n.concat(e.intent.reduxContext).concat(t),e.isStorybook?console.log("Multiple Redux stores initialized:",e.intent.reduxContext):console.error("Multiple Redux stores initialized:",e.intent.reduxContext)}e.intent.debug||(e.intent.debug={});const i=n=>{if(n==="true")return!0;if(n==="false")return!1},r=n=>{const g=i(o.getItem(n))??!1;o.setItem(n,String(!g))},u=n=>{o.getItem(n)?o.removeItem(n):o.setItem(n,"true")},s=()=>{console.log("Redux logging preference updated. Reload to take effect.")};e.intent.enableReduxLogging=()=>{o.setItem(d,"true"),s()},e.intent.disableReduxLogging=()=>{o.setItem(d,"false"),s()},e.intent.debug.toggleReduxLogs=()=>{r(d),s()},e.intent.debug.toggleStateReferenceChecks=()=>{u(l)},e.intent.debug.toggleStructuredCloneChecks=()=>{u(a)}},m=(t,e)=>{const i=t.init(f(e)),r={store:t,dispose:()=>{C(r);try{i()}finally{c(t)}}};return R(r),x(t),r};export{m as initAppStore,p as store};
@@ -1 +1 @@
1
- import{a0 as Ot,l as xt,ao as Pt,aX as kt}from"./CJxGDkBm.js";import{B as St,_ as Tt}from"./D4MngzTk.js";function en(t,e,...n){var r=new St(t);Ot(()=>{const a=e()??null;Pt&&a==null&&kt(),r.ensure(a,a&&(o=>a(o,...n)))},xt)}const nn={custom:"custom"},Ft="system";function j(t){try{const e=new Intl.Locale(t).maximize();return{language:e.language??"",script:e.script??"",region:e.region??""}}catch{return null}}function dt(t,e){const n=t.toLowerCase();return e.find(r=>r.toLowerCase()===n)}function Wt(t,e,n){for(const r of t){if(typeof r!="string"||r.trim()==="")continue;const a=dt(r,e);if(a)return a;const o=j(r);if(!o||o.language==="")continue;const s=e.filter(u=>{const l=j(u);return l!==null&&l.language===o.language&&l.script===o.script});if(s.length>0)return s.find(l=>j(l)?.region===o.region)??s[0]}return n}function Yt(t,e,n,r){if(typeof t=="string"&&t.trim()!==""&&t!==Ft){const a=dt(t,n);if(a)return a}return Wt(e,n,r)}const U=globalThis.__INTENT_PARAGLIDE_I18N__.runtime,mt=U.baseLocale,lt=U.locales,Nt=(...t)=>U.overwriteGetLocale(...t),ht=6048e5,Et=864e5,H=43200,K=1440,Z=Symbol.for("constructDateFrom");function k(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Z in t?t[Z](e):t instanceof Date?new t.constructor(e):new Date(e)}function M(t,e){return k(e||t,t)}let Ct={};function X(){return Ct}function I(t,e){const n=X(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=M(t,e?.in),o=a.getDay(),s=(o<r?7:0)+o-r;return a.setDate(a.getDate()-s),a.setHours(0,0,0,0),a}function R(t,e){return I(t,{...e,weekStartsOn:1})}function gt(t,e){const n=M(t,e?.in),r=n.getFullYear(),a=k(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const o=R(a),s=k(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const u=R(s);return n.getTime()>=o.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function $(t){const e=M(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function Q(t,...e){const n=k.bind(null,t||e.find(r=>typeof r=="object"));return e.map(n)}function tt(t,e){const n=M(t,e?.in);return n.setHours(0,0,0,0),n}function _t(t,e,n){const[r,a]=Q(n?.in,t,e),o=tt(r),s=tt(a),u=+o-$(o),l=+s-$(s);return Math.round((u-l)/Et)}function qt(t,e){const n=gt(t,e),r=k(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),R(r)}function L(t,e){const n=+M(t)-+M(e);return n<0?-1:n>0?1:n}function It(t){return k(t,Date.now())}function Xt(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function At(t){return!(!Xt(t)&&typeof t!="number"||isNaN(+M(t)))}function Ht(t,e,n){const[r,a]=Q(n?.in,t,e),o=r.getFullYear()-a.getFullYear(),s=r.getMonth()-a.getMonth();return o*12+s}function Lt(t){return e=>{const r=(t?Math[t]:Math.trunc)(e);return r===0?0:r}}function Rt(t,e){return+M(t)-+M(e)}function $t(t,e){const n=M(t,e?.in);return n.setHours(23,59,59,999),n}function Gt(t,e){const n=M(t,e?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Qt(t,e){const n=M(t,e?.in);return+$t(n,e)==+Gt(n,e)}function Bt(t,e,n){const[r,a,o]=Q(n?.in,t,t,e),s=L(a,o),u=Math.abs(Ht(a,o));if(u<1)return 0;a.getMonth()===1&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-s*u);let l=L(a,o)===-s;Qt(r)&&u===1&&L(r,o)===1&&(l=!1);const b=s*(u-+l);return b===0?0:b}function jt(t,e,n){const r=Rt(t,e)/1e3;return Lt(n?.roundingMethod)(r)}function Vt(t,e){const n=M(t,e?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Jt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},zt=(t,e,n)=>{let r;const a=Jt[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function V(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Ut={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Kt={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Zt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},te={date:V({formats:Ut,defaultWidth:"full"}),time:V({formats:Kt,defaultWidth:"full"}),dateTime:V({formats:Zt,defaultWidth:"full"})},ee={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ne=(t,e,n,r)=>ee[t];function _(t){return(e,n)=>{const r=n?.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const s=t.defaultFormattingWidth||t.defaultWidth,u=n?.width?String(n.width):s;a=t.formattingValues[u]||t.formattingValues[s]}else{const s=t.defaultWidth,u=n?.width?String(n.width):t.defaultWidth;a=t.values[u]||t.values[s]}const o=t.argumentCallback?t.argumentCallback(e):e;return a[o]}}const re={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ae={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},oe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ie={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},se={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ue={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ce=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},fe={ordinalNumber:ce,era:_({values:re,defaultWidth:"wide"}),quarter:_({values:ae,defaultWidth:"wide",argumentCallback:t=>t-1}),month:_({values:oe,defaultWidth:"wide"}),day:_({values:ie,defaultWidth:"wide"}),dayPeriod:_({values:se,defaultWidth:"wide",formattingValues:ue,defaultFormattingWidth:"wide"})};function q(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],o=e.match(a);if(!o)return null;const s=o[0],u=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(u)?me(u,g=>g.test(s)):de(u,g=>g.test(s));let b;b=t.valueCallback?t.valueCallback(l):l,b=n.valueCallback?n.valueCallback(b):b;const h=e.slice(s.length);return{value:b,rest:h}}}function de(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function me(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function le(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],o=e.match(t.parsePattern);if(!o)return null;let s=t.valueCallback?t.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;const u=e.slice(a.length);return{value:s,rest:u}}}const he=/^(\d+)(th|st|nd|rd)?/i,ge=/\d+/i,we={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ye={any:[/^b/i,/^(a|c)/i]},be={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Me={any:[/1/i,/2/i,/3/i,/4/i]},De={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},pe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ve={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Oe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},xe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Pe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ke={ordinalNumber:le({matchPattern:he,parsePattern:ge,valueCallback:t=>parseInt(t,10)}),era:q({matchPatterns:we,defaultMatchWidth:"wide",parsePatterns:ye,defaultParseWidth:"any"}),quarter:q({matchPatterns:be,defaultMatchWidth:"wide",parsePatterns:Me,defaultParseWidth:"any",valueCallback:t=>t+1}),month:q({matchPatterns:De,defaultMatchWidth:"wide",parsePatterns:pe,defaultParseWidth:"any"}),day:q({matchPatterns:ve,defaultMatchWidth:"wide",parsePatterns:Oe,defaultParseWidth:"any"}),dayPeriod:q({matchPatterns:xe,defaultMatchWidth:"any",parsePatterns:Pe,defaultParseWidth:"any"})},wt={code:"en-US",formatDistance:zt,formatLong:te,formatRelative:ne,localize:fe,match:ke,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Se(t,e){const n=M(t,e?.in);return _t(n,Vt(n))+1}function Te(t,e){const n=M(t,e?.in),r=+R(n)-+qt(n);return Math.round(r/ht)+1}function yt(t,e){const n=M(t,e?.in),r=n.getFullYear(),a=X(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=k(e?.in||t,0);s.setFullYear(r+1,0,o),s.setHours(0,0,0,0);const u=I(s,e),l=k(e?.in||t,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const b=I(l,e);return+n>=+u?r+1:+n>=+b?r:r-1}function Fe(t,e){const n=X(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=yt(t,e),o=k(e?.in||t,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),I(o,e)}function We(t,e){const n=M(t,e?.in),r=+I(n,e)-+Fe(n,e);return Math.round(r/ht)+1}function m(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const F={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return m(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):m(n+1,2)},d(t,e){return m(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return m(t.getHours()%12||12,e.length)},H(t,e){return m(t.getHours(),e.length)},m(t,e){return m(t.getMinutes(),e.length)},s(t,e){return m(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return m(a,e.length)}},C={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},et={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return F.y(t,e)},Y:function(t,e,n,r){const a=yt(t,r),o=a>0?a:1-a;if(e==="YY"){const s=o%100;return m(s,2)}return e==="Yo"?n.ordinalNumber(o,{unit:"year"}):m(o,e.length)},R:function(t,e){const n=gt(t);return m(n,e.length)},u:function(t,e){const n=t.getFullYear();return m(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return m(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return m(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return F.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return m(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=We(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):m(a,e.length)},I:function(t,e,n){const r=Te(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):m(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):F.d(t,e)},D:function(t,e,n){const r=Se(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):m(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return m(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return m(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return m(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=C.noon:r===0?a=C.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=C.evening:r>=12?a=C.afternoon:r>=4?a=C.morning:a=C.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return F.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):F.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):m(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):m(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):F.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):F.s(t,e)},S:function(t,e){return F.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return rt(r);case"XXXX":case"XX":return N(r);case"XXXXX":case"XXX":default:return N(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return rt(r);case"xxxx":case"xx":return N(r);case"xxxxx":case"xxx":default:return N(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+nt(r,":");case"OOOO":default:return"GMT"+N(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+nt(r,":");case"zzzz":default:return"GMT"+N(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return m(r,e.length)},T:function(t,e,n){return m(+t,e.length)}};function nt(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),o=r%60;return o===0?n+String(a):n+String(a)+e+m(o,2)}function rt(t,e){return t%60===0?(t>0?"-":"+")+m(Math.abs(t)/60,2):N(t,e)}function N(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=m(Math.trunc(r/60),2),o=m(r%60,2);return n+a+e+o}const at=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},bt=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Ye=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return at(t,e);let o;switch(r){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;case"PPPP":default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",at(r,e)).replace("{{time}}",bt(a,e))},Ne={p:bt,P:Ye},Ee=/^D+$/,Ce=/^Y+$/,_e=["D","DD","YY","YYYY"];function qe(t){return Ee.test(t)}function Ie(t){return Ce.test(t)}function Xe(t,e,n){const r=Ae(t,e,n);if(console.warn(r),_e.includes(t))throw new RangeError(r)}function Ae(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const He=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Le=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Re=/^'([^]*?)'?$/,$e=/''/g,Ge=/[a-zA-Z]/;function Qe(t,e,n){const r=X(),a=n?.locale??r.locale??wt,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,u=M(t,n?.in);if(!At(u))throw new RangeError("Invalid time value");let l=e.match(Le).map(h=>{const g=h[0];if(g==="p"||g==="P"){const w=Ne[g];return w(h,a.formatLong)}return h}).join("").match(He).map(h=>{if(h==="''")return{isToken:!1,value:"'"};const g=h[0];if(g==="'")return{isToken:!1,value:Be(h)};if(et[g])return{isToken:!0,value:h};if(g.match(Ge))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:h}});a.localize.preprocessor&&(l=a.localize.preprocessor(u,l));const b={firstWeekContainsDate:o,weekStartsOn:s,locale:a};return l.map(h=>{if(!h.isToken)return h.value;const g=h.value;(!n?.useAdditionalWeekYearTokens&&Ie(g)||!n?.useAdditionalDayOfYearTokens&&qe(g))&&Xe(g,e,String(t));const w=et[g[0]];return w(u,g,a.localize,b)}).join("")}function Be(t){const e=t.match(Re);return e?e[1].replace($e,"'"):t}function je(t,e,n){const r=X(),a=n?.locale??r.locale??wt,o=2520,s=L(t,e);if(isNaN(s))throw new RangeError("Invalid time value");const u=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:s}),[l,b]=Q(n?.in,...s>0?[e,t]:[t,e]),h=jt(b,l),g=($(b)-$(l))/1e3,w=Math.round((h-g)/60);let S;if(w<2)return n?.includeSeconds?h<5?a.formatDistance("lessThanXSeconds",5,u):h<10?a.formatDistance("lessThanXSeconds",10,u):h<20?a.formatDistance("lessThanXSeconds",20,u):h<40?a.formatDistance("halfAMinute",0,u):h<60?a.formatDistance("lessThanXMinutes",1,u):a.formatDistance("xMinutes",1,u):w===0?a.formatDistance("lessThanXMinutes",1,u):a.formatDistance("xMinutes",w,u);if(w<45)return a.formatDistance("xMinutes",w,u);if(w<90)return a.formatDistance("aboutXHours",1,u);if(w<K){const x=Math.round(w/60);return a.formatDistance("aboutXHours",x,u)}else{if(w<o)return a.formatDistance("xDays",1,u);if(w<H){const x=Math.round(w/K);return a.formatDistance("xDays",x,u)}else if(w<H*2)return S=Math.round(w/H),a.formatDistance("aboutXMonths",S,u)}if(S=Bt(b,l),S<12){const x=Math.round(w/H);return a.formatDistance("xMonths",x,u)}else{const x=S%12,E=Math.trunc(S/12);return x<3?a.formatDistance("aboutXYears",E,u):x<9?a.formatDistance("overXYears",E,u):a.formatDistance("almostXYears",E+1,u)}}function Ve(t,e){return je(t,It(t),e)}const ot=new Map,it=new Map,st=new Map;function P(t,e){const n=`${t}|${JSON.stringify(e)}`;let r=ot.get(n);return r||(r=new Intl.NumberFormat(t,e),ot.set(n,r)),r}function Y(t,e){const n=`${t}|${JSON.stringify(e)}`;let r=it.get(n);return r||(r=new Intl.DateTimeFormat(t,e),it.set(n,r)),r}function J(t,e){const n=`${t}|${JSON.stringify(e)}`;let r=st.get(n);return r||(r=new Intl.RelativeTimeFormat(t,e),st.set(n,r)),r}const z=new Map;async function Je(t){if(t==="en"||z.has(t))return;const e=await Tt(()=>import("./BugaF9Gz.js"),[],import.meta.url),[n]=t.split("-"),a=[t.replace(/-/g,""),n].map(o=>e[o]).find(o=>o!=null&&typeof o=="object");z.set(t,a)}function ut(t){return z.get(t)}function O(t){const e=t instanceof Date?t:new Date(t);return Number.isNaN(e.getTime())?null:e}function ze(t){const e=Math.round(t/1e3),n=Math.abs(e);if(n<10)return{value:0,unit:"second"};if(n<60)return{value:e,unit:"second"};const r=Math.trunc(e/60);if(Math.abs(r)<60)return{value:r,unit:"minute"};const a=Math.trunc(e/3600);if(Math.abs(a)<24)return{value:a,unit:"hour"};const o=Math.trunc(e/86400);if(Math.abs(o)<7)return{value:o,unit:"day"};if(Math.abs(o)<30)return{value:Math.trunc(o/7),unit:"week"};const s=Math.trunc(o/30);return Math.abs(s)<12?{value:s,unit:"month"}:{value:Math.trunc(o/365),unit:"year"}}function ct(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}function ft(t,e){return t.charAt(0).toLocaleUpperCase(e)+t.slice(1)}function rn(t){function e(c,f){return P(t(),f??{}).format(c)}function n(c){return Number.isFinite(c)?P(t(),{maximumFractionDigits:0}).format(c):"0"}function r(c,f){if(!Number.isFinite(c))return n(0);const i=f?.maximumFractionDigits??(Math.abs(c)<1e3?0:1);return P(t(),{notation:"compact",compactDisplay:"short",minimumFractionDigits:0,maximumFractionDigits:i}).format(c)}function a(c,f,i){if(!Number.isFinite(c))return"";const d=t(),y=c!==0&&Math.abs(c)<1,D=i?.fractionDigits!==void 0?{minimumFractionDigits:i.fractionDigits,maximumFractionDigits:i.fractionDigits}:y?{minimumFractionDigits:2,maximumFractionDigits:4}:{};try{return P(d,{style:"currency",currency:f,...D}).format(c)}catch{return`${P(d,{minimumFractionDigits:i?.fractionDigits??2,maximumFractionDigits:i?.fractionDigits??(y?4:2)}).format(c)} ${f}`}}function o(c){if(!Number.isFinite(c)||c<0)return"";const f=["B","Ki","Mi","Gi","Ti"];let i=c,d=0;for(;i>=1024&&d<f.length-1;)i/=1024,d++;return`${P(t(),{maximumSignificantDigits:3,useGrouping:!1}).format(i)}${f[d]}`}function s(c,f){const i=O(c);if(!i)return"";const d=f?.now??new Date,{value:y,unit:D}=ze(i.getTime()-d.getTime());return J(t(),{numeric:"auto",style:f?.style==="narrow"?"narrow":"long"}).format(y,D)}function u(c,f){const i=O(c);if(!i)return"";const d=f?.now??new Date,y=t(),D=d.getTime()-i.getTime(),p=Math.floor(D/6e4),v=(B,vt)=>P(y,{style:"unit",unit:B,unitDisplay:"narrow"}).format(vt);if(D<=0)return J(y,{numeric:"auto"}).format(0,"second");if(p<1)return v("second",Math.floor(D/1e3));if(p<60)return v("minute",p);const T=Math.floor(p/60);if(T<24)return v("hour",T);const W=Math.floor(T/24);if(W<7)return v("day",W);const A=Math.floor(W/7);return A<5?v("week",A):w(i,{now:d})}function l(c){if(!Number.isFinite(c))return"";const f=t(),i=(A,B)=>P(f,{style:"unit",unit:A,unitDisplay:"narrow"}).format(B),d=Math.max(0,Math.round(c/1e3)),y=d%60,D=Math.floor(d/60);if(D===0)return i("second",y);const p=D%60,v=Math.floor(D/60);if(v===0)return y===0?i("minute",p):`${i("minute",p)} ${i("second",y)}`;const T=v%24,W=Math.floor(v/24);return W===0?p===0?i("hour",T):`${i("hour",T)} ${i("minute",p)}`:T===0?i("day",W):`${i("day",W)} ${i("hour",T)}`}function b(c){if(!Number.isFinite(c))return"";const f=t(),i=(y,D)=>P(f,{style:"unit",unit:y,unitDisplay:"narrow"}).format(D),d=Math.max(0,c);return d<6e4?i("second",Math.round(d/1e3)):d<36e5?i("minute",Math.floor(d/6e4)):d<864e5?i("hour",Math.floor(d/36e5)):i("day",Math.floor(d/864e5))}function h(c,f){const i=O(c);if(!i)return"";const d=f?.seconds?{hour:"2-digit",minute:"2-digit",second:"2-digit"}:{hour:"numeric",minute:"2-digit"};return Y(t(),d).format(i)}function g(c){const f=O(c);return f?Y(t(),{dateStyle:"medium"}).format(f):""}function w(c,f){const i=O(c);if(!i)return"";const d=f?.now??new Date,y=i.getFullYear()===d.getFullYear();return Y(t(),{month:"short",day:"numeric",...y?{}:{year:"numeric"}}).format(i)}function S(c){const f=O(c);return f?Y(t(),{dateStyle:"medium",timeStyle:"short"}).format(f):""}function x(c){const f=O(c);return f?Y(t(),{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(f):""}function E(c){const f=O(c);return f?Y(t(),{weekday:"long"}).format(f):""}function Mt(c,f){const i=O(c);if(!i)return"";const d=f?.now??new Date,y=t(),D=J(y,{numeric:"auto"});if(ct(i,d))return ft(D.format(0,"day"),y);const p=new Date(d);if(p.setDate(p.getDate()-1),ct(i,p))return ft(D.format(-1,"day"),y);const v=new Date(d);return v.setDate(v.getDate()-7),i>v&&i<d?E(i):Y(y,{weekday:"long",month:"long",day:"numeric",...i.getFullYear()===d.getFullYear()?{}:{year:"numeric"}}).format(i)}function Dt(c,f){const i=O(c);return i?Ve(i,{addSuffix:f?.addSuffix??!0,locale:ut(t())}):""}function pt(c,f){const i=O(c);return i?Qe(i,f,{locale:ut(t())}):""}return{formatNumber:e,formatInteger:n,formatCompactNumber:r,formatCurrency:a,formatBytesBinary:o,formatRelativeTime:s,formatCompactRelativeTime:u,formatCompactDuration:l,formatSalientDuration:b,formatTime:h,formatDate:g,formatShortDate:w,formatDateTime:S,formatFullDateTime:x,formatWeekday:E,formatDaySeparator:Mt,formatDistanceToNow:Dt,formatDatePattern:pt}}let G=mt;Nt(()=>G);function Ue(){return typeof navigator>"u"?[]:Array.isArray(navigator.languages)&&navigator.languages.length>0?navigator.languages:navigator.language?[navigator.language]:[]}function an(){return lt}function Ke(t){return Yt(t,Ue(),lt,mt)}function on(t){G=Ke(t),Je(G)}function sn(){return G}function un(t){let e=t;try{const n=new Intl.Locale(t).maximize();n.language==="zh"&&n.script&&(e=`zh-${n.script}`)}catch{}try{const n=new Intl.DisplayNames([t],{type:"language"}).of(e);if(n&&n!==e)return n.charAt(0).toLocaleUpperCase(t)+n.slice(1)}catch{}return t}export{Ft as S,nn as Z,on as a,V as b,_ as c,q as d,le as e,rn as f,_t as g,wt as h,zt as i,ne as j,sn as k,an as l,un as m,lt as n,fe as o,ke as p,Q as q,Ke as r,en as s,I as t,M as u};
1
+ import{a0 as Ot,l as xt,ao as Pt,aX as kt}from"./CJxGDkBm.js";import{B as St,_ as Tt}from"./NtxbXOxK.js";function en(t,e,...n){var r=new St(t);Ot(()=>{const a=e()??null;Pt&&a==null&&kt(),r.ensure(a,a&&(o=>a(o,...n)))},xt)}const nn={custom:"custom"},Ft="system";function j(t){try{const e=new Intl.Locale(t).maximize();return{language:e.language??"",script:e.script??"",region:e.region??""}}catch{return null}}function dt(t,e){const n=t.toLowerCase();return e.find(r=>r.toLowerCase()===n)}function Wt(t,e,n){for(const r of t){if(typeof r!="string"||r.trim()==="")continue;const a=dt(r,e);if(a)return a;const o=j(r);if(!o||o.language==="")continue;const s=e.filter(u=>{const l=j(u);return l!==null&&l.language===o.language&&l.script===o.script});if(s.length>0)return s.find(l=>j(l)?.region===o.region)??s[0]}return n}function Yt(t,e,n,r){if(typeof t=="string"&&t.trim()!==""&&t!==Ft){const a=dt(t,n);if(a)return a}return Wt(e,n,r)}const U=globalThis.__INTENT_PARAGLIDE_I18N__.runtime,mt=U.baseLocale,lt=U.locales,Nt=(...t)=>U.overwriteGetLocale(...t),ht=6048e5,Et=864e5,H=43200,K=1440,Z=Symbol.for("constructDateFrom");function k(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Z in t?t[Z](e):t instanceof Date?new t.constructor(e):new Date(e)}function M(t,e){return k(e||t,t)}let Ct={};function X(){return Ct}function I(t,e){const n=X(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=M(t,e?.in),o=a.getDay(),s=(o<r?7:0)+o-r;return a.setDate(a.getDate()-s),a.setHours(0,0,0,0),a}function R(t,e){return I(t,{...e,weekStartsOn:1})}function gt(t,e){const n=M(t,e?.in),r=n.getFullYear(),a=k(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const o=R(a),s=k(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const u=R(s);return n.getTime()>=o.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function $(t){const e=M(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function Q(t,...e){const n=k.bind(null,t||e.find(r=>typeof r=="object"));return e.map(n)}function tt(t,e){const n=M(t,e?.in);return n.setHours(0,0,0,0),n}function _t(t,e,n){const[r,a]=Q(n?.in,t,e),o=tt(r),s=tt(a),u=+o-$(o),l=+s-$(s);return Math.round((u-l)/Et)}function qt(t,e){const n=gt(t,e),r=k(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),R(r)}function L(t,e){const n=+M(t)-+M(e);return n<0?-1:n>0?1:n}function It(t){return k(t,Date.now())}function Xt(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function At(t){return!(!Xt(t)&&typeof t!="number"||isNaN(+M(t)))}function Ht(t,e,n){const[r,a]=Q(n?.in,t,e),o=r.getFullYear()-a.getFullYear(),s=r.getMonth()-a.getMonth();return o*12+s}function Lt(t){return e=>{const r=(t?Math[t]:Math.trunc)(e);return r===0?0:r}}function Rt(t,e){return+M(t)-+M(e)}function $t(t,e){const n=M(t,e?.in);return n.setHours(23,59,59,999),n}function Gt(t,e){const n=M(t,e?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Qt(t,e){const n=M(t,e?.in);return+$t(n,e)==+Gt(n,e)}function Bt(t,e,n){const[r,a,o]=Q(n?.in,t,t,e),s=L(a,o),u=Math.abs(Ht(a,o));if(u<1)return 0;a.getMonth()===1&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-s*u);let l=L(a,o)===-s;Qt(r)&&u===1&&L(r,o)===1&&(l=!1);const b=s*(u-+l);return b===0?0:b}function jt(t,e,n){const r=Rt(t,e)/1e3;return Lt(n?.roundingMethod)(r)}function Vt(t,e){const n=M(t,e?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Jt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},zt=(t,e,n)=>{let r;const a=Jt[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function V(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Ut={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Kt={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Zt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},te={date:V({formats:Ut,defaultWidth:"full"}),time:V({formats:Kt,defaultWidth:"full"}),dateTime:V({formats:Zt,defaultWidth:"full"})},ee={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ne=(t,e,n,r)=>ee[t];function _(t){return(e,n)=>{const r=n?.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const s=t.defaultFormattingWidth||t.defaultWidth,u=n?.width?String(n.width):s;a=t.formattingValues[u]||t.formattingValues[s]}else{const s=t.defaultWidth,u=n?.width?String(n.width):t.defaultWidth;a=t.values[u]||t.values[s]}const o=t.argumentCallback?t.argumentCallback(e):e;return a[o]}}const re={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ae={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},oe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ie={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},se={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ue={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ce=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},fe={ordinalNumber:ce,era:_({values:re,defaultWidth:"wide"}),quarter:_({values:ae,defaultWidth:"wide",argumentCallback:t=>t-1}),month:_({values:oe,defaultWidth:"wide"}),day:_({values:ie,defaultWidth:"wide"}),dayPeriod:_({values:se,defaultWidth:"wide",formattingValues:ue,defaultFormattingWidth:"wide"})};function q(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],o=e.match(a);if(!o)return null;const s=o[0],u=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(u)?me(u,g=>g.test(s)):de(u,g=>g.test(s));let b;b=t.valueCallback?t.valueCallback(l):l,b=n.valueCallback?n.valueCallback(b):b;const h=e.slice(s.length);return{value:b,rest:h}}}function de(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function me(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function le(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],o=e.match(t.parsePattern);if(!o)return null;let s=t.valueCallback?t.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;const u=e.slice(a.length);return{value:s,rest:u}}}const he=/^(\d+)(th|st|nd|rd)?/i,ge=/\d+/i,we={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ye={any:[/^b/i,/^(a|c)/i]},be={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Me={any:[/1/i,/2/i,/3/i,/4/i]},De={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},pe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ve={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Oe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},xe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Pe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ke={ordinalNumber:le({matchPattern:he,parsePattern:ge,valueCallback:t=>parseInt(t,10)}),era:q({matchPatterns:we,defaultMatchWidth:"wide",parsePatterns:ye,defaultParseWidth:"any"}),quarter:q({matchPatterns:be,defaultMatchWidth:"wide",parsePatterns:Me,defaultParseWidth:"any",valueCallback:t=>t+1}),month:q({matchPatterns:De,defaultMatchWidth:"wide",parsePatterns:pe,defaultParseWidth:"any"}),day:q({matchPatterns:ve,defaultMatchWidth:"wide",parsePatterns:Oe,defaultParseWidth:"any"}),dayPeriod:q({matchPatterns:xe,defaultMatchWidth:"any",parsePatterns:Pe,defaultParseWidth:"any"})},wt={code:"en-US",formatDistance:zt,formatLong:te,formatRelative:ne,localize:fe,match:ke,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Se(t,e){const n=M(t,e?.in);return _t(n,Vt(n))+1}function Te(t,e){const n=M(t,e?.in),r=+R(n)-+qt(n);return Math.round(r/ht)+1}function yt(t,e){const n=M(t,e?.in),r=n.getFullYear(),a=X(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=k(e?.in||t,0);s.setFullYear(r+1,0,o),s.setHours(0,0,0,0);const u=I(s,e),l=k(e?.in||t,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const b=I(l,e);return+n>=+u?r+1:+n>=+b?r:r-1}function Fe(t,e){const n=X(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=yt(t,e),o=k(e?.in||t,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),I(o,e)}function We(t,e){const n=M(t,e?.in),r=+I(n,e)-+Fe(n,e);return Math.round(r/ht)+1}function m(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const F={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return m(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):m(n+1,2)},d(t,e){return m(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return m(t.getHours()%12||12,e.length)},H(t,e){return m(t.getHours(),e.length)},m(t,e){return m(t.getMinutes(),e.length)},s(t,e){return m(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return m(a,e.length)}},C={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},et={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return F.y(t,e)},Y:function(t,e,n,r){const a=yt(t,r),o=a>0?a:1-a;if(e==="YY"){const s=o%100;return m(s,2)}return e==="Yo"?n.ordinalNumber(o,{unit:"year"}):m(o,e.length)},R:function(t,e){const n=gt(t);return m(n,e.length)},u:function(t,e){const n=t.getFullYear();return m(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return m(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return m(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return F.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return m(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=We(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):m(a,e.length)},I:function(t,e,n){const r=Te(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):m(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):F.d(t,e)},D:function(t,e,n){const r=Se(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):m(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return m(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return m(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return m(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=C.noon:r===0?a=C.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=C.evening:r>=12?a=C.afternoon:r>=4?a=C.morning:a=C.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return F.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):F.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):m(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):m(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):F.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):F.s(t,e)},S:function(t,e){return F.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return rt(r);case"XXXX":case"XX":return N(r);case"XXXXX":case"XXX":default:return N(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return rt(r);case"xxxx":case"xx":return N(r);case"xxxxx":case"xxx":default:return N(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+nt(r,":");case"OOOO":default:return"GMT"+N(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+nt(r,":");case"zzzz":default:return"GMT"+N(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return m(r,e.length)},T:function(t,e,n){return m(+t,e.length)}};function nt(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),o=r%60;return o===0?n+String(a):n+String(a)+e+m(o,2)}function rt(t,e){return t%60===0?(t>0?"-":"+")+m(Math.abs(t)/60,2):N(t,e)}function N(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=m(Math.trunc(r/60),2),o=m(r%60,2);return n+a+e+o}const at=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},bt=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Ye=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return at(t,e);let o;switch(r){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;case"PPPP":default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",at(r,e)).replace("{{time}}",bt(a,e))},Ne={p:bt,P:Ye},Ee=/^D+$/,Ce=/^Y+$/,_e=["D","DD","YY","YYYY"];function qe(t){return Ee.test(t)}function Ie(t){return Ce.test(t)}function Xe(t,e,n){const r=Ae(t,e,n);if(console.warn(r),_e.includes(t))throw new RangeError(r)}function Ae(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const He=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Le=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Re=/^'([^]*?)'?$/,$e=/''/g,Ge=/[a-zA-Z]/;function Qe(t,e,n){const r=X(),a=n?.locale??r.locale??wt,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,u=M(t,n?.in);if(!At(u))throw new RangeError("Invalid time value");let l=e.match(Le).map(h=>{const g=h[0];if(g==="p"||g==="P"){const w=Ne[g];return w(h,a.formatLong)}return h}).join("").match(He).map(h=>{if(h==="''")return{isToken:!1,value:"'"};const g=h[0];if(g==="'")return{isToken:!1,value:Be(h)};if(et[g])return{isToken:!0,value:h};if(g.match(Ge))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:h}});a.localize.preprocessor&&(l=a.localize.preprocessor(u,l));const b={firstWeekContainsDate:o,weekStartsOn:s,locale:a};return l.map(h=>{if(!h.isToken)return h.value;const g=h.value;(!n?.useAdditionalWeekYearTokens&&Ie(g)||!n?.useAdditionalDayOfYearTokens&&qe(g))&&Xe(g,e,String(t));const w=et[g[0]];return w(u,g,a.localize,b)}).join("")}function Be(t){const e=t.match(Re);return e?e[1].replace($e,"'"):t}function je(t,e,n){const r=X(),a=n?.locale??r.locale??wt,o=2520,s=L(t,e);if(isNaN(s))throw new RangeError("Invalid time value");const u=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:s}),[l,b]=Q(n?.in,...s>0?[e,t]:[t,e]),h=jt(b,l),g=($(b)-$(l))/1e3,w=Math.round((h-g)/60);let S;if(w<2)return n?.includeSeconds?h<5?a.formatDistance("lessThanXSeconds",5,u):h<10?a.formatDistance("lessThanXSeconds",10,u):h<20?a.formatDistance("lessThanXSeconds",20,u):h<40?a.formatDistance("halfAMinute",0,u):h<60?a.formatDistance("lessThanXMinutes",1,u):a.formatDistance("xMinutes",1,u):w===0?a.formatDistance("lessThanXMinutes",1,u):a.formatDistance("xMinutes",w,u);if(w<45)return a.formatDistance("xMinutes",w,u);if(w<90)return a.formatDistance("aboutXHours",1,u);if(w<K){const x=Math.round(w/60);return a.formatDistance("aboutXHours",x,u)}else{if(w<o)return a.formatDistance("xDays",1,u);if(w<H){const x=Math.round(w/K);return a.formatDistance("xDays",x,u)}else if(w<H*2)return S=Math.round(w/H),a.formatDistance("aboutXMonths",S,u)}if(S=Bt(b,l),S<12){const x=Math.round(w/H);return a.formatDistance("xMonths",x,u)}else{const x=S%12,E=Math.trunc(S/12);return x<3?a.formatDistance("aboutXYears",E,u):x<9?a.formatDistance("overXYears",E,u):a.formatDistance("almostXYears",E+1,u)}}function Ve(t,e){return je(t,It(t),e)}const ot=new Map,it=new Map,st=new Map;function P(t,e){const n=`${t}|${JSON.stringify(e)}`;let r=ot.get(n);return r||(r=new Intl.NumberFormat(t,e),ot.set(n,r)),r}function Y(t,e){const n=`${t}|${JSON.stringify(e)}`;let r=it.get(n);return r||(r=new Intl.DateTimeFormat(t,e),it.set(n,r)),r}function J(t,e){const n=`${t}|${JSON.stringify(e)}`;let r=st.get(n);return r||(r=new Intl.RelativeTimeFormat(t,e),st.set(n,r)),r}const z=new Map;async function Je(t){if(t==="en"||z.has(t))return;const e=await Tt(()=>import("./roVeGd8G.js"),[],import.meta.url),[n]=t.split("-"),a=[t.replace(/-/g,""),n].map(o=>e[o]).find(o=>o!=null&&typeof o=="object");z.set(t,a)}function ut(t){return z.get(t)}function O(t){const e=t instanceof Date?t:new Date(t);return Number.isNaN(e.getTime())?null:e}function ze(t){const e=Math.round(t/1e3),n=Math.abs(e);if(n<10)return{value:0,unit:"second"};if(n<60)return{value:e,unit:"second"};const r=Math.trunc(e/60);if(Math.abs(r)<60)return{value:r,unit:"minute"};const a=Math.trunc(e/3600);if(Math.abs(a)<24)return{value:a,unit:"hour"};const o=Math.trunc(e/86400);if(Math.abs(o)<7)return{value:o,unit:"day"};if(Math.abs(o)<30)return{value:Math.trunc(o/7),unit:"week"};const s=Math.trunc(o/30);return Math.abs(s)<12?{value:s,unit:"month"}:{value:Math.trunc(o/365),unit:"year"}}function ct(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}function ft(t,e){return t.charAt(0).toLocaleUpperCase(e)+t.slice(1)}function rn(t){function e(c,f){return P(t(),f??{}).format(c)}function n(c){return Number.isFinite(c)?P(t(),{maximumFractionDigits:0}).format(c):"0"}function r(c,f){if(!Number.isFinite(c))return n(0);const i=f?.maximumFractionDigits??(Math.abs(c)<1e3?0:1);return P(t(),{notation:"compact",compactDisplay:"short",minimumFractionDigits:0,maximumFractionDigits:i}).format(c)}function a(c,f,i){if(!Number.isFinite(c))return"";const d=t(),y=c!==0&&Math.abs(c)<1,D=i?.fractionDigits!==void 0?{minimumFractionDigits:i.fractionDigits,maximumFractionDigits:i.fractionDigits}:y?{minimumFractionDigits:2,maximumFractionDigits:4}:{};try{return P(d,{style:"currency",currency:f,...D}).format(c)}catch{return`${P(d,{minimumFractionDigits:i?.fractionDigits??2,maximumFractionDigits:i?.fractionDigits??(y?4:2)}).format(c)} ${f}`}}function o(c){if(!Number.isFinite(c)||c<0)return"";const f=["B","Ki","Mi","Gi","Ti"];let i=c,d=0;for(;i>=1024&&d<f.length-1;)i/=1024,d++;return`${P(t(),{maximumSignificantDigits:3,useGrouping:!1}).format(i)}${f[d]}`}function s(c,f){const i=O(c);if(!i)return"";const d=f?.now??new Date,{value:y,unit:D}=ze(i.getTime()-d.getTime());return J(t(),{numeric:"auto",style:f?.style==="narrow"?"narrow":"long"}).format(y,D)}function u(c,f){const i=O(c);if(!i)return"";const d=f?.now??new Date,y=t(),D=d.getTime()-i.getTime(),p=Math.floor(D/6e4),v=(B,vt)=>P(y,{style:"unit",unit:B,unitDisplay:"narrow"}).format(vt);if(D<=0)return J(y,{numeric:"auto"}).format(0,"second");if(p<1)return v("second",Math.floor(D/1e3));if(p<60)return v("minute",p);const T=Math.floor(p/60);if(T<24)return v("hour",T);const W=Math.floor(T/24);if(W<7)return v("day",W);const A=Math.floor(W/7);return A<5?v("week",A):w(i,{now:d})}function l(c){if(!Number.isFinite(c))return"";const f=t(),i=(A,B)=>P(f,{style:"unit",unit:A,unitDisplay:"narrow"}).format(B),d=Math.max(0,Math.round(c/1e3)),y=d%60,D=Math.floor(d/60);if(D===0)return i("second",y);const p=D%60,v=Math.floor(D/60);if(v===0)return y===0?i("minute",p):`${i("minute",p)} ${i("second",y)}`;const T=v%24,W=Math.floor(v/24);return W===0?p===0?i("hour",T):`${i("hour",T)} ${i("minute",p)}`:T===0?i("day",W):`${i("day",W)} ${i("hour",T)}`}function b(c){if(!Number.isFinite(c))return"";const f=t(),i=(y,D)=>P(f,{style:"unit",unit:y,unitDisplay:"narrow"}).format(D),d=Math.max(0,c);return d<6e4?i("second",Math.round(d/1e3)):d<36e5?i("minute",Math.floor(d/6e4)):d<864e5?i("hour",Math.floor(d/36e5)):i("day",Math.floor(d/864e5))}function h(c,f){const i=O(c);if(!i)return"";const d=f?.seconds?{hour:"2-digit",minute:"2-digit",second:"2-digit"}:{hour:"numeric",minute:"2-digit"};return Y(t(),d).format(i)}function g(c){const f=O(c);return f?Y(t(),{dateStyle:"medium"}).format(f):""}function w(c,f){const i=O(c);if(!i)return"";const d=f?.now??new Date,y=i.getFullYear()===d.getFullYear();return Y(t(),{month:"short",day:"numeric",...y?{}:{year:"numeric"}}).format(i)}function S(c){const f=O(c);return f?Y(t(),{dateStyle:"medium",timeStyle:"short"}).format(f):""}function x(c){const f=O(c);return f?Y(t(),{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(f):""}function E(c){const f=O(c);return f?Y(t(),{weekday:"long"}).format(f):""}function Mt(c,f){const i=O(c);if(!i)return"";const d=f?.now??new Date,y=t(),D=J(y,{numeric:"auto"});if(ct(i,d))return ft(D.format(0,"day"),y);const p=new Date(d);if(p.setDate(p.getDate()-1),ct(i,p))return ft(D.format(-1,"day"),y);const v=new Date(d);return v.setDate(v.getDate()-7),i>v&&i<d?E(i):Y(y,{weekday:"long",month:"long",day:"numeric",...i.getFullYear()===d.getFullYear()?{}:{year:"numeric"}}).format(i)}function Dt(c,f){const i=O(c);return i?Ve(i,{addSuffix:f?.addSuffix??!0,locale:ut(t())}):""}function pt(c,f){const i=O(c);return i?Qe(i,f,{locale:ut(t())}):""}return{formatNumber:e,formatInteger:n,formatCompactNumber:r,formatCurrency:a,formatBytesBinary:o,formatRelativeTime:s,formatCompactRelativeTime:u,formatCompactDuration:l,formatSalientDuration:b,formatTime:h,formatDate:g,formatShortDate:w,formatDateTime:S,formatFullDateTime:x,formatWeekday:E,formatDaySeparator:Mt,formatDistanceToNow:Dt,formatDatePattern:pt}}let G=mt;Nt(()=>G);function Ue(){return typeof navigator>"u"?[]:Array.isArray(navigator.languages)&&navigator.languages.length>0?navigator.languages:navigator.language?[navigator.language]:[]}function an(){return lt}function Ke(t){return Yt(t,Ue(),lt,mt)}function on(t){G=Ke(t),Je(G)}function sn(){return G}function un(t){let e=t;try{const n=new Intl.Locale(t).maximize();n.language==="zh"&&n.script&&(e=`zh-${n.script}`)}catch{}try{const n=new Intl.DisplayNames([t],{type:"language"}).of(e);if(n&&n!==e)return n.charAt(0).toLocaleUpperCase(t)+n.slice(1)}catch{}return t}export{Ft as S,nn as Z,on as a,V as b,_ as c,q as d,le as e,rn as f,_t as g,wt as h,zt as i,ne as j,sn as k,an as l,un as m,lt as n,fe as o,ke as p,Q as q,Ke as r,en as s,I as t,M as u};
@@ -1 +1 @@
1
- import{f as a,k as t}from"./C3DfjxaV.js";const{formatNumber:o,formatInteger:e,formatCompactNumber:m,formatCurrency:s,formatBytesBinary:f,formatRelativeTime:i,formatCompactRelativeTime:c,formatCompactDuration:n,formatSalientDuration:D,formatTime:l,formatDate:p,formatShortDate:u,formatDateTime:T,formatFullDateTime:y,formatDaySeparator:C,formatDistanceToNow:b,formatDatePattern:g}=a(t);export{n as a,m as b,c,s as d,p as e,f,g,T as h,C as i,b as j,y as k,e as l,o as m,i as n,D as o,u as p,l as q};
1
+ import{f as a,k as t}from"./BpozSsrs.js";const{formatNumber:o,formatInteger:e,formatCompactNumber:m,formatCurrency:s,formatBytesBinary:f,formatRelativeTime:i,formatCompactRelativeTime:c,formatCompactDuration:n,formatSalientDuration:D,formatTime:l,formatDate:p,formatShortDate:u,formatDateTime:T,formatFullDateTime:y,formatDaySeparator:C,formatDistanceToNow:b,formatDatePattern:g}=a(t);export{n as a,m as b,c,s as d,p as e,f,g,T as h,C as i,b as j,y as k,e as l,o as m,i as n,D as o,u as p,l as q};