@intent-hq/web 2.393.0 → 2.393.1

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 (230) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{BABLhp9e.js → 03rp11-0.js} +1 -1
  3. package/web/app/immutable/chunks/{BezqW82L.js → 0fp6eBJ2.js} +2 -2
  4. package/web/app/immutable/chunks/{HcCqNlKh.js → 2E4Z_ZFq.js} +1 -1
  5. package/web/app/immutable/chunks/{9gZxSRYR.js → 2z2xJ2W_.js} +2 -2
  6. package/web/app/immutable/chunks/54ZDusyh.js +6 -0
  7. package/web/app/immutable/chunks/{B8m3-qrW.js → 5uPsOw59.js} +1 -1
  8. package/web/app/immutable/chunks/{QEpqKBee.js → 6c2NdJk5.js} +1 -1
  9. package/web/app/immutable/chunks/{DSXyr_Fr.js → 6gbXuD_9.js} +1 -1
  10. package/web/app/immutable/chunks/{DT_y9FGD.js → 7qqqYD-I.js} +1 -1
  11. package/web/app/immutable/chunks/{BDYqZy5l.js → 8XCqMH_A.js} +1 -1
  12. package/web/app/immutable/chunks/{DRpk7IAR.js → 9hLDyNKW.js} +1 -1
  13. package/web/app/immutable/chunks/{CtX9AjBD.js → B08hyH_t.js} +1 -1
  14. package/web/app/immutable/chunks/{Pc52abky.js → B2p16ZcG.js} +1 -1
  15. package/web/app/immutable/chunks/{CDCAMh6o.js → B3G_nhPo.js} +1 -1
  16. package/web/app/immutable/chunks/{B2NCDWQj.js → B4H39zb5.js} +1 -1
  17. package/web/app/immutable/chunks/{Ds7d6UPo.js → B5JMHmH2.js} +4 -4
  18. package/web/app/immutable/chunks/{COmspkQo.js → B5rWFERE.js} +1 -1
  19. package/web/app/immutable/chunks/{DFh2QzKR.js → B7nYGmHN.js} +1 -1
  20. package/web/app/immutable/chunks/{nnHDE1dd.js → B8COfuyw.js} +1 -1
  21. package/web/app/immutable/chunks/{6_Ki4zfU.js → B8hXRSlI.js} +1 -1
  22. package/web/app/immutable/chunks/{fr4AMTgg.js → BBA4NncC.js} +1 -1
  23. package/web/app/immutable/chunks/{BeZe2Rt-.js → BBuvJMq5.js} +1 -1
  24. package/web/app/immutable/chunks/{BVRxvAzz.js → BDDEENB9.js} +1 -1
  25. package/web/app/immutable/chunks/{DDa6EINl.js → BF2WXZJV.js} +1 -1
  26. package/web/app/immutable/chunks/{BgKsHej9.js → BGBZTOoV.js} +2 -2
  27. package/web/app/immutable/chunks/{D6eyCbi1.js → BGLaHsDV.js} +1 -1
  28. package/web/app/immutable/chunks/{0IudVN8T.js → BGZDnsPV.js} +2 -2
  29. package/web/app/immutable/chunks/{Cev7VHoN.js → BGntbMwK.js} +1 -1
  30. package/web/app/immutable/chunks/{DZlDxCgn.js → BGzLfgjy.js} +1 -1
  31. package/web/app/immutable/chunks/{CTkkv_Ih.js → BHkRlfpj.js} +1 -1
  32. package/web/app/immutable/chunks/{IGNO0qoE.js → BHwv4Hfl.js} +1 -1
  33. package/web/app/immutable/chunks/{l_KiA0-X.js → BJTRhgs4.js} +1 -1
  34. package/web/app/immutable/chunks/{Ch9YoFhc.js → BLoR6-fV.js} +1 -1
  35. package/web/app/immutable/chunks/{ng4mcU_-.js → BMejr7u6.js} +1 -1
  36. package/web/app/immutable/chunks/{DP31pjuo.js → BOcncMTK.js} +3 -3
  37. package/web/app/immutable/chunks/{XAL8NtHj.js → BPoTi_yl.js} +1 -1
  38. package/web/app/immutable/chunks/{Bt1-7rTQ.js → BQr_CU_m.js} +1 -1
  39. package/web/app/immutable/chunks/{CKOT06_N.js → BSCmeu0N.js} +1 -1
  40. package/web/app/immutable/chunks/{DjD2npnM.js → BSglkeCR.js} +1 -1
  41. package/web/app/immutable/chunks/{BOpa3JL5.js → BTVapThA.js} +1 -1
  42. package/web/app/immutable/chunks/{u2ZzqP0a.js → BU9PIki-.js} +1 -1
  43. package/web/app/immutable/chunks/{CUllgFqe.js → BUHPTzFz.js} +1 -1
  44. package/web/app/immutable/chunks/{oHufBZXQ.js → BVY7HYcm.js} +1 -1
  45. package/web/app/immutable/chunks/{DXBE2Tld.js → BX6KUKcp.js} +1 -1
  46. package/web/app/immutable/chunks/{FzsqLvWW.js → BX6cGa3P.js} +1 -1
  47. package/web/app/immutable/chunks/{w6C2OuF7.js → BYFF4vXy.js} +1 -1
  48. package/web/app/immutable/chunks/{CJvysCNo.js → BZDblkH_.js} +4 -4
  49. package/web/app/immutable/chunks/{0Pskylmi.js → BZcIlO-m.js} +1 -1
  50. package/web/app/immutable/chunks/{BDY2Kajf.js → Baa59Un_.js} +1 -1
  51. package/web/app/immutable/chunks/{CzoSrhdL.js → Bb15Q1ED.js} +2 -2
  52. package/web/app/immutable/chunks/{BGIAis8Q.js → BbwMNYGv.js} +3 -3
  53. package/web/app/immutable/chunks/{DuiDeolO.js → BdvX8QCl.js} +1 -1
  54. package/web/app/immutable/chunks/{FXLHv4s7.js → BfFqg0tr.js} +1 -1
  55. package/web/app/immutable/chunks/{BKFA3yUf.js → BhzVqZCt.js} +1 -1
  56. package/web/app/immutable/chunks/{RGi81mvu.js → BiBCqvj8.js} +1 -1
  57. package/web/app/immutable/chunks/{DU59Vdu3.js → BiH1hXHp.js} +1 -1
  58. package/web/app/immutable/chunks/{BpFxCD0b.js → BjfJvx5N.js} +1 -1
  59. package/web/app/immutable/chunks/{D5ocbEo-.js → BkD1B-t7.js} +1 -1
  60. package/web/app/immutable/chunks/{CJL-iSZe.js → Bl5dZSyT.js} +2 -2
  61. package/web/app/immutable/chunks/{jphlY6bT.js → Bmw5RheL.js} +1 -1
  62. package/web/app/immutable/chunks/{CCAtqaSn.js → Bo8Bzt_n.js} +1 -1
  63. package/web/app/immutable/chunks/{3Z-66JFK.js → BoAOWVTV.js} +1 -1
  64. package/web/app/immutable/chunks/{CRm25OCR.js → Bv-YmUA0.js} +1 -1
  65. package/web/app/immutable/chunks/{7Ovc5F1W.js → Bv6jwx4N.js} +1 -1
  66. package/web/app/immutable/chunks/{CbBvi-vT.js → BvADYKOZ.js} +2 -2
  67. package/web/app/immutable/chunks/{3eHuEsL0.js → Bw9UsBZT.js} +1 -1
  68. package/web/app/immutable/chunks/{RsYrgUiV.js → Bx5_x_xs.js} +1 -1
  69. package/web/app/immutable/chunks/{BS5e_kKu.js → BxScfaS2.js} +1 -1
  70. package/web/app/immutable/chunks/{DU4Vhr-0.js → By2IWKC2.js} +1 -1
  71. package/web/app/immutable/chunks/{DfApjOPM.js → Bz-k4xjY.js} +1 -1
  72. package/web/app/immutable/chunks/{CippTVu3.js → C0tj6dfD.js} +1 -1
  73. package/web/app/immutable/chunks/{DM5kqQ1V.js → C0yEXWZT.js} +1 -1
  74. package/web/app/immutable/chunks/{DcGK_0d9.js → C12O35p-.js} +1 -1
  75. package/web/app/immutable/chunks/{AJU0I4QP.js → C2BkU_2B.js} +1 -1
  76. package/web/app/immutable/chunks/{DHwN0lRn.js → C3PqMGoR.js} +1 -1
  77. package/web/app/immutable/chunks/{D2Q6mppm.js → C4P8DeLE.js} +1 -1
  78. package/web/app/immutable/chunks/{Cxm3e0CO.js → C9DL5612.js} +1 -1
  79. package/web/app/immutable/chunks/{nrSh0aC8.js → CBDRhyjO.js} +1 -1
  80. package/web/app/immutable/chunks/{D7KhILhs.js → CBbhUF1U.js} +1 -1
  81. package/web/app/immutable/chunks/{GCJgqmLv.js → CC5YTA05.js} +1 -1
  82. package/web/app/immutable/chunks/{dEp87wve.js → CD6SknDy.js} +1 -1
  83. package/web/app/immutable/chunks/{D179JMBI.js → CFDesZJP.js} +1 -1
  84. package/web/app/immutable/chunks/{BdWMbiFk.js → CFflosJs.js} +1 -1
  85. package/web/app/immutable/chunks/{DGGucQxs.js → CFsh8rrs.js} +2 -2
  86. package/web/app/immutable/chunks/{yKdlMKAe.js → CGnjVQAU.js} +2 -2
  87. package/web/app/immutable/chunks/{CF6Vxctv.js → CHRXhmu4.js} +1 -1
  88. package/web/app/immutable/chunks/{C8OXQeb2.js → CHovwbAO.js} +1 -1
  89. package/web/app/immutable/chunks/{BnnKw3Va.js → CITlaKmU.js} +1 -1
  90. package/web/app/immutable/chunks/CK3fpDUl.js +1 -0
  91. package/web/app/immutable/chunks/{YWPnOD4T.js → CKGl1DmB.js} +1 -1
  92. package/web/app/immutable/chunks/{BI9u_QTd.js → CKuv24OA.js} +1 -1
  93. package/web/app/immutable/chunks/{BKGQPtRi.js → CLW1n4w7.js} +1 -1
  94. package/web/app/immutable/chunks/{DcJ9XwiY.js → CLXQSor9.js} +1 -1
  95. package/web/app/immutable/chunks/{DO2zAKv0.js → CMHMpoVu.js} +3 -3
  96. package/web/app/immutable/chunks/{r0vRtx-T.js → CMQzFQs4.js} +1 -1
  97. package/web/app/immutable/chunks/{B2-ooCTr.js → CMUWVW8A.js} +1 -1
  98. package/web/app/immutable/chunks/{DujlAAuA.js → CMtZLqiA.js} +1 -1
  99. package/web/app/immutable/chunks/{XSkFT3M0.js → CNZpDeJb.js} +1 -1
  100. package/web/app/immutable/chunks/{DcrCEeFN.js → CNfD8BpN.js} +1 -1
  101. package/web/app/immutable/chunks/{CPsAdpQg.js → CNzTIPQp.js} +1 -1
  102. package/web/app/immutable/chunks/{u_H5ILVa.js → CP-NTf2-.js} +1 -1
  103. package/web/app/immutable/chunks/{C-86kNuI.js → CRNqz-CU.js} +3 -3
  104. package/web/app/immutable/chunks/{GFF7xfJq.js → CS_KcnQC.js} +1 -1
  105. package/web/app/immutable/chunks/{DF6LaFyj.js → CU4LG5o2.js} +2 -2
  106. package/web/app/immutable/chunks/{WWDClKTE.js → CXuN4JFH.js} +1 -1
  107. package/web/app/immutable/chunks/Ccf5U4O_.js +1 -0
  108. package/web/app/immutable/chunks/{DhBBsVaP.js → CfAvt2Zs.js} +1 -1
  109. package/web/app/immutable/chunks/{DVhkgoDW.js → ChnCUogL.js} +1 -1
  110. package/web/app/immutable/chunks/{CkbdUYUB.js → CiezGigq.js} +1 -1
  111. package/web/app/immutable/chunks/{DOK_g7vV.js → CkT6bu2G.js} +1 -1
  112. package/web/app/immutable/chunks/{Cim9mWY1.js → Ckq6aQDS.js} +1 -1
  113. package/web/app/immutable/chunks/{DepS1LOg.js → CksNKSJb.js} +1 -1
  114. package/web/app/immutable/chunks/{D_EFP2qU.js → ClK_UzEg.js} +1 -1
  115. package/web/app/immutable/chunks/{B6Qz5J1y.js → Cmct_Ic1.js} +1 -1
  116. package/web/app/immutable/chunks/{Cz3WzTlQ.js → CpIcQB5T.js} +1 -1
  117. package/web/app/immutable/chunks/{cD292w1o.js → Cq6hdiVw.js} +1 -1
  118. package/web/app/immutable/chunks/{DWjpzYNk.js → CqVeTPQI.js} +1 -1
  119. package/web/app/immutable/chunks/{BT6sDnDt.js → CvYS01IZ.js} +1 -1
  120. package/web/app/immutable/chunks/{BieWjGd7.js → Cwn1Htr4.js} +1 -1
  121. package/web/app/immutable/chunks/{DCzxlgBs.js → CxYEPO2e.js} +1 -1
  122. package/web/app/immutable/chunks/{CXygwMkb.js → Cxf7GnmV.js} +1 -1
  123. package/web/app/immutable/chunks/{CDtaIFAl.js → CyZe9Esu.js} +1 -1
  124. package/web/app/immutable/chunks/{BZ5plXZy.js → D-IVWxYX.js} +3 -3
  125. package/web/app/immutable/chunks/{Beq_QLuz.js → D-lOH49i.js} +1 -1
  126. package/web/app/immutable/chunks/{DzeUh63h.js → D1rlIs5V.js} +2 -2
  127. package/web/app/immutable/chunks/{CEfljVcs.js → D2Y-4Hk1.js} +1 -1
  128. package/web/app/immutable/chunks/{BWtzEUuh.js → D4VyuyJv.js} +1 -1
  129. package/web/app/immutable/chunks/{BMHxxfP4.js → D5vlW2SV.js} +1 -1
  130. package/web/app/immutable/chunks/{B1jwNspC.js → D8BXRngi.js} +1 -1
  131. package/web/app/immutable/chunks/{Ct8a2yek.js → D9lcY5kd.js} +1 -1
  132. package/web/app/immutable/chunks/{DLGucGdD.js → DAvgrUpQ.js} +3 -3
  133. package/web/app/immutable/chunks/{Bu0K6ujo.js → DBMzxcUI.js} +1 -1
  134. package/web/app/immutable/chunks/{OqslD7bF.js → DBy_x3yG.js} +1 -1
  135. package/web/app/immutable/chunks/{C35-tQAa.js → DEVOS0tD.js} +1 -1
  136. package/web/app/immutable/chunks/{CWtyXmQ4.js → DGrUr-ze.js} +1 -1
  137. package/web/app/immutable/chunks/{DCgY039R.js → DJPdI2sS.js} +54 -54
  138. package/web/app/immutable/chunks/{v7NJYdhp.js → DJWOAwhC.js} +1 -1
  139. package/web/app/immutable/chunks/{BJIUXUAo.js → DJx-btvr.js} +1 -1
  140. package/web/app/immutable/chunks/{U5o8u-di.js → DKxUsLaS.js} +1 -1
  141. package/web/app/immutable/chunks/{X66bh60j.js → DMZaN70J.js} +1 -1
  142. package/web/app/immutable/chunks/{BEeu6Jyo.js → DN6txiJA.js} +1 -1
  143. package/web/app/immutable/chunks/{BVab-LI7.js → DOYZ_D5o.js} +1 -1
  144. package/web/app/immutable/chunks/{0biFhMxb.js → DOrnNMXq.js} +1 -1
  145. package/web/app/immutable/chunks/{C1SGWBXH.js → DOvLLu-_.js} +1 -1
  146. package/web/app/immutable/chunks/{BxpgiWm2.js → DRVUI7n3.js} +1 -1
  147. package/web/app/immutable/chunks/{C3KgmGxd.js → DReNFETs.js} +1 -1
  148. package/web/app/immutable/chunks/{DvEcqVUt.js → DSNCn1aQ.js} +1 -1
  149. package/web/app/immutable/chunks/{CjrqEuvI.js → DTPQbia0.js} +1 -1
  150. package/web/app/immutable/chunks/{iViWtmHm.js → DTSonUt7.js} +1 -1
  151. package/web/app/immutable/chunks/{BAlN6xXV.js → DU4u3RKB.js} +2 -2
  152. package/web/app/immutable/chunks/{CXnXrUsE.js → DUINlo9r.js} +1 -1
  153. package/web/app/immutable/chunks/{DoFGyuPK.js → DVA-DTbs.js} +1 -1
  154. package/web/app/immutable/chunks/{D1nkWdsN.js → DZYGgiAb.js} +1 -1
  155. package/web/app/immutable/chunks/{uzIA17NN.js → DdNl3Rbm.js} +3 -3
  156. package/web/app/immutable/chunks/{PWNFccPv.js → DeZREu1L.js} +1 -1
  157. package/web/app/immutable/chunks/{DfINI0LK.js → DgkHABKY.js} +1 -1
  158. package/web/app/immutable/chunks/{BK7FmI7K.js → DgmcmslQ.js} +1 -1
  159. package/web/app/immutable/chunks/{Bxf_-54V.js → DhA_Bjtj.js} +1 -1
  160. package/web/app/immutable/chunks/{8ysnd5N8.js → DjepxDVb.js} +4 -4
  161. package/web/app/immutable/chunks/{BYanH6N9.js → DkAmJv1y.js} +1 -1
  162. package/web/app/immutable/chunks/{Bb6_ZpFm.js → Dl68BOSP.js} +1 -1
  163. package/web/app/immutable/chunks/{CQzFriMx.js → Dnfzkj4w.js} +1 -1
  164. package/web/app/immutable/chunks/{DM_PIf-5.js → Do3KjvK9.js} +1 -1
  165. package/web/app/immutable/chunks/{DabFMHr_.js → Dp6gutm7.js} +4 -4
  166. package/web/app/immutable/chunks/{CBKDJPOp.js → DpmfoOfT.js} +1 -1
  167. package/web/app/immutable/chunks/{BroDUcjq.js → Dpt3eqkJ.js} +1 -1
  168. package/web/app/immutable/chunks/{BAWHRd64.js → Dq1yTcBb.js} +1 -1
  169. package/web/app/immutable/chunks/{b45PQ8TG.js → DyFjB_S6.js} +1 -1
  170. package/web/app/immutable/chunks/{B3M7htfw.js → E6pB77s3.js} +1 -1
  171. package/web/app/immutable/chunks/{UWtWVoQE.js → GLk8gkMl.js} +1 -1
  172. package/web/app/immutable/chunks/{7bKjKvMj.js → IuSiCp89.js} +1 -1
  173. package/web/app/immutable/chunks/{vA_m-Yoy.js → Jpb8pOEi.js} +1 -1
  174. package/web/app/immutable/chunks/{BHFbn3A9.js → K6U2gbY4.js} +1 -1
  175. package/web/app/immutable/chunks/{zdzlwKoA.js → LEN-2k09.js} +1 -1
  176. package/web/app/immutable/chunks/{Cad-FQZw.js → P235vPf0.js} +1 -1
  177. package/web/app/immutable/chunks/{D_YdQJM4.js → PBRs5SJ0.js} +1 -1
  178. package/web/app/immutable/chunks/{aQkb4saz.js → PIyjm_eA.js} +1 -1
  179. package/web/app/immutable/chunks/{Bh3yfjRP.js → Q3ibTFFO.js} +1 -1
  180. package/web/app/immutable/chunks/{W0kxgN1W.js → QiDikPQa.js} +1 -1
  181. package/web/app/immutable/chunks/{B9R2bql6.js → U7IKFepx.js} +1 -1
  182. package/web/app/immutable/chunks/{DzR2lw_C.js → UroPxNaS.js} +1 -1
  183. package/web/app/immutable/chunks/{YnYoZ2NK.js → X-RVyfO0.js} +1 -1
  184. package/web/app/immutable/chunks/{Dbqo6rfT.js → XMoRU8a7.js} +1 -1
  185. package/web/app/immutable/chunks/{C2RnxEnO.js → XdXjguTz.js} +1 -1
  186. package/web/app/immutable/chunks/{BQ5x_RaT.js → YAuWnPYv.js} +1 -1
  187. package/web/app/immutable/chunks/{Bttih9ri.js → _fNgz67j.js} +1 -1
  188. package/web/app/immutable/chunks/{T6UBEOFc.js → c5wypyPV.js} +1 -1
  189. package/web/app/immutable/chunks/{B_dB55pf.js → edvxHiJh.js} +3 -3
  190. package/web/app/immutable/chunks/{f5b-J-bi.js → ehKOKrdg.js} +1 -1
  191. package/web/app/immutable/chunks/{BI6MUuoX.js → kc2Bsov-.js} +1 -1
  192. package/web/app/immutable/chunks/{gNR_yDDX.js → l8tGTVLl.js} +1 -1
  193. package/web/app/immutable/chunks/{BV3fep4W.js → m2E3nD0f.js} +1 -1
  194. package/web/app/immutable/chunks/{koUs6Gjt.js → mmpnpFjh.js} +1 -1
  195. package/web/app/immutable/chunks/pYdPYEfN.js +11 -0
  196. package/web/app/immutable/chunks/{DkQdSPDN.js → qB07BmZl.js} +1 -1
  197. package/web/app/immutable/chunks/{DEOVFEjx.js → rO66Jyk4.js} +1 -1
  198. package/web/app/immutable/chunks/{52kdRKiP.js → sB9jFfB2.js} +1 -1
  199. package/web/app/immutable/chunks/{DEQnE_KB.js → wKT6CuL7.js} +1 -1
  200. package/web/app/immutable/chunks/{bX4FGmNr.js → xXSv9C4P.js} +1 -1
  201. package/web/app/immutable/chunks/{OrDYwyck.js → ye-GTjqo.js} +2 -2
  202. package/web/app/immutable/entry/{app.CiyeQuxv.js → app.BdS7izm7.js} +3 -3
  203. package/web/app/immutable/entry/start.CnycbH9m.js +1 -0
  204. package/web/app/immutable/nodes/{0.CRbxkcM2.js → 0.BISzmlhW.js} +1 -1
  205. package/web/app/immutable/nodes/{1.DqX6QaPm.js → 1.Bb1ZAxDG.js} +1 -1
  206. package/web/app/immutable/nodes/{10.BCKuK60u.js → 10.BgrCgg4r.js} +4 -4
  207. package/web/app/immutable/nodes/{11.DfT5UkBP.js → 11.BY0d-QhF.js} +4 -4
  208. package/web/app/immutable/nodes/{13.J8EpPA9A.js → 13.JtKFcm-e.js} +1 -1
  209. package/web/app/immutable/nodes/{14.C5TLXVit.js → 14.DYuGWO_d.js} +1 -1
  210. package/web/app/immutable/nodes/{15.D7dZwhi4.js → 15.DYwYAZ5-.js} +1 -1
  211. package/web/app/immutable/nodes/{16.T0PyvW1V.js → 16.PoO6JTXS.js} +1 -1
  212. package/web/app/immutable/nodes/{17.pi-yfOoM.js → 17.bczfYiNy.js} +1 -1
  213. package/web/app/immutable/nodes/{18.CTVha2lA.js → 18.D70W-aYB.js} +1 -1
  214. package/web/app/immutable/nodes/{19.Bp3Vf5X-.js → 19.Dlni-a6M.js} +2 -2
  215. package/web/app/immutable/nodes/{2.COUI43GN.js → 2.CG_3VZwe.js} +4 -4
  216. package/web/app/immutable/nodes/{20.gu-VpWFh.js → 20.7n3s-oUO.js} +1 -1
  217. package/web/app/immutable/nodes/{3.Ch8C_wLR.js → 3.Dc7zxR5A.js} +1 -1
  218. package/web/app/immutable/nodes/{4.DNtyFj6E.js → 4.BK4Q0Tjj.js} +1 -1
  219. package/web/app/immutable/nodes/{5.DibkYULx.js → 5.uyWg8rJg.js} +1 -1
  220. package/web/app/immutable/nodes/{6.Cpj-A029.js → 6.CqIhg880.js} +1 -1
  221. package/web/app/immutable/nodes/{7.CecRnFtb.js → 7.DNnSBe4i.js} +1 -1
  222. package/web/app/immutable/nodes/{8.BbuGaD-H.js → 8.BGV6mK09.js} +1 -1
  223. package/web/app/immutable/nodes/{9.BMl85hfy.js → 9.BKtZcPwn.js} +4 -4
  224. package/web/app/version.json +1 -1
  225. package/web/index.html +9 -9
  226. package/web/app/immutable/chunks/B0SSzYpD.js +0 -6
  227. package/web/app/immutable/chunks/BAtAwQ72.js +0 -11
  228. package/web/app/immutable/chunks/BGSmaq6H.js +0 -1
  229. package/web/app/immutable/chunks/TdGvVwuC.js +0 -1
  230. package/web/app/immutable/entry/start.D87x7VCJ.js +0 -1
@@ -1 +1 @@
1
- import{D as C}from"./BMHxxfP4.js";import{t as re,bo as y,bw as se,b as ae,bm as I}from"./Fcr7AvC-.js";import{bs as ne,cb as oe,c5 as ie,bH as k,aD as b,a5 as G,bA as W,b_ as R,W as E,bn as le,bV as q,c9 as F,aA as x,ay as H,bl as N,bS as L,bO as O,a7 as ce,aB as P}from"./3SdAC2_C.js";import{i as de}from"./BhYXv0ZM.js";import{k as me}from"./Cc0763mU.js";import{s as D}from"./BRCr02in.js";import{a as ue}from"./DabFMHr_.js";const K=C.shape.model,pe=C.shape.states.unwrap().element;function U(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function fe(t){return/^(?:|model|model\.(?:nodes|edges|groups)|states)$/.test(t)}function ge(t){let e=0;const s=()=>{for(;/[\t\n\r ]/.test(t[e]??"\0");)e+=1},a=(l,d)=>{if(d>64)throw new Error("JSON nesting limit exceeded");s();const f=e,m=t[e];if(m===void 0)return{complete:!1};if(m==='"'){for(e+=1;e<t.length;){const r=t[e++];if(r==="\\")e+=1;else if(r==='"')return{value:JSON.parse(t.slice(f,e)),complete:!0}}return{complete:!1}}if(m==="{"||m==="["){const r=m==="{",c=r?Object.create(null):[],h=r?"}":"]";if(e+=1,s(),t[e]===h)return e+=1,{value:c,complete:!0};for(;e<t.length;){let i="";if(r){if(t[e]!=='"')throw new Error("Expected JSON property");const _=a(l,d+1);if(!_.complete)return{value:c,complete:!1};if(i=_.value,s(),e===t.length)return{value:c,complete:!1};if(t[e++]!==":")throw new Error("Expected JSON colon")}const g=r?l?`${l}.${i}`:i:`${l}[]`,v=a(g,d+1);if((v.complete||fe(g)&&v.value!==void 0)&&(Array.isArray(c)?c.push(v.value):c[i]=v.value),!v.complete)return{value:c,complete:!1};if(s(),e===t.length)return{value:c,complete:!1};if(t[e]===h)return e+=1,{value:c,complete:!0};if(t[e++]!==",")throw new Error("Expected JSON separator");s()}return{value:c,complete:!1}}for(;e<t.length&&!/[\t\n\r ,}\]]/.test(t[e]);)e+=1;return e===t.length?{complete:!1}:{value:JSON.parse(t.slice(f,e)),complete:!0}},n=a("",0);if(s(),n.complete&&e!==t.length)throw new Error("Unexpected JSON suffix");return n}function J(t){const e=new Set;return t.filter(({id:s})=>e.has(s)?!1:(e.add(s),!0))}function z(t,e,s,a){return[t.visibleNodes,t.highlightedNodes].every(n=>n?.every(l=>e.has(l))??!0)&&[t.visibleEdges,t.highlightedEdges].every(n=>n?.every(l=>s.has(l))??!0)&&(t.visibleGroups?.every(n=>a.has(n))??!0)&&(t.camera?.focus===void 0||e.has(t.camera.focus))}function ve(t){if(!U(t)||!U(t.model))return null;const e=t.model,s=(i,g)=>Array.isArray(i)?i.filter(v=>g.safeParse(v).success):[];let a=J(s(e.nodes,K.shape.nodes.element)),n=J(s(e.groups,K.shape.groups.unwrap().element)),l=!0;for(;l;){const i=new Set(a.map(({id:u})=>u)),g=n.filter(u=>u.nodeIds.every(A=>i.has(A))),v=new Set(g.map(({id:u})=>u)),_=a.filter(u=>u.group===void 0||v.has(u.group));l=_.length!==a.length||g.length!==n.length,a=_,n=g}if(!a.length)return null;const d=new Set(a.map(({id:i})=>i)),f=J(s(e.edges,K.shape.edges.element)).filter(i=>d.has(i.from)&&d.has(i.to)),m=new Set(f.map(({id:i})=>i)),r=new Set(n.map(({id:i})=>i)),c=J(s(t.states,pe)).filter(i=>z(i,d,m,r)),h={...t,model:{...e,nodes:a,edges:f,...e.groups===void 0?{}:{groups:n}},...t.states===void 0?{}:{states:c}};return c.some(i=>i.id===h.currentStateId)||delete h.currentStateId,C.safeParse(h).success?h:null}function V(t){if(!C.safeParse(t).success)return null;const e=t,{nodes:s,edges:a,groups:n=[]}=e.model,l=e.states??[],d=new Set(s.map(({id:r})=>r)),f=new Set(a.map(({id:r})=>r)),m=new Set(n.map(({id:r})=>r));return[s,a,n,l].some(r=>new Set(r.map(({id:c})=>c)).size!==r.length)||s.some(r=>r.group!==void 0&&!m.has(r.group))||a.some(r=>!d.has(r.from)||!d.has(r.to))||n.some(r=>r.nodeIds.some(c=>!d.has(c)))||l.some(r=>!z(r,d,f,m))||e.currentStateId!==void 0&&!l.some(r=>r.id===e.currentStateId)?null:e}function Oe(t,e=!1){const s=(a,n,l)=>({rawSource:t,status:a,diagram:n,...l?{error:l}:{}});try{if(e){const n=V(JSON.parse(t));return n?s("complete",n):s("invalid",null,"Invalid diagram payload")}const a=ge(t);if(a.complete){const n=V(a.value);if(n)return s("complete",n)}return s("partial",ve(a.value))}catch{return s(e?"invalid":"partial",null,e?"Invalid diagram JSON":void 0)}}var he=P('<div class="diagram-feedback svelte-p097sp" role="alert"><strong> </strong> <span> </span></div> <pre class="diagram-source svelte-p097sp"> </pre>',1),we=P('<div class="diagram-feedback svelte-p097sp" role="status"> </div>'),Se=P('<div class="streaming-diagram svelte-p097sp"><!></div>');function _e(t,e){if(new.target)return re({component:_e,...t});ne(e,!0);let s=y(e,"diagram",7),a=y(e,"isStreaming",7,!1),n=y(e,"source",7),l=y(e,"sourceError",7),d=y(e,"viewResetKey",7),f=y(e,"onBindingClick",7),m=q(null),r=q(0),c="",h,i=!1;oe(()=>{const o=s(),p=n(),w=d(),S=a(),B=!!l();ie(()=>{i&&(w!==h||!p.startsWith(c))&&(k(m,null),k(r,b(r)+1)),i=!0,c=p,h=w,B||!S&&!o?k(m,null):o&&k(m,o,!0)})});const g=F(()=>l()?null:s()??(a()?b(m):null)),v=F(()=>!!l()||!a()&&!s());var _={get diagram(){return s()},set diagram(o){s(o),x()},get isStreaming(){return a()},set isStreaming(o=!1){a(o),x()},get source(){return n()},set source(o){n(o),x()},get sourceError(){return l()},set sourceError(o){l(o),x()},get viewResetKey(){return d()},set viewResetKey(o){d(o),x()},get onBindingClick(){return f()},set onBindingClick(o){f(o),x()},$set:se,$on:(o,p)=>ae(e,o,p)},u=Se(),A=G(u);{var M=o=>{var p=he(),w=H(p),S=G(w),B=N(S,!0),X=L(S,2),Y=N(X,!0);W(w);var j=L(w,2),Z=N(j,!0);R(($,ee,te)=>{O(B,$),O(Y,ee),D(j,"aria-label",te),O(Z,n())},[()=>I.markdown_mermaid_renderFailed_error(),()=>I.diagram_renderer_error_description(),()=>I.markdown_mermaid_viewSource_label()]),E(o,p)},Q=o=>{var p=ce(),w=H(p);me(w,()=>b(r),S=>{ue(S,{get diagram(){return b(g)},editable:!1,get viewResetKey(){return d()},get onBindingClick(){return f()}})}),E(o,p)},T=o=>{var p=we(),w=N(p,!0);R(S=>O(w,S),[()=>I.ui_spinner_loading_ariaLabel()]),E(o,p)};de(A,o=>{b(v)?o(M):b(g)?o(Q,1):o(T,-1)})}return W(u),R(()=>{D(u,"aria-busy",a()),D(u,"data-diagram-streaming",a())}),E(t,u),le(_)}export{_e as S,Oe as p};
1
+ import{D as C}from"./D5vlW2SV.js";import{t as re,bo as y,bw as se,b as ae,bm as I}from"./Fcr7AvC-.js";import{bs as ne,cb as oe,c5 as ie,bH as k,aD as b,a5 as G,bA as W,b_ as R,W as E,bn as le,bV as q,c9 as F,aA as x,ay as H,bl as N,bS as L,bO as O,a7 as ce,aB as P}from"./3SdAC2_C.js";import{i as de}from"./BhYXv0ZM.js";import{k as me}from"./Cc0763mU.js";import{s as D}from"./BRCr02in.js";import{a as ue}from"./Dp6gutm7.js";const K=C.shape.model,pe=C.shape.states.unwrap().element;function U(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function fe(t){return/^(?:|model|model\.(?:nodes|edges|groups)|states)$/.test(t)}function ge(t){let e=0;const s=()=>{for(;/[\t\n\r ]/.test(t[e]??"\0");)e+=1},a=(l,d)=>{if(d>64)throw new Error("JSON nesting limit exceeded");s();const f=e,m=t[e];if(m===void 0)return{complete:!1};if(m==='"'){for(e+=1;e<t.length;){const r=t[e++];if(r==="\\")e+=1;else if(r==='"')return{value:JSON.parse(t.slice(f,e)),complete:!0}}return{complete:!1}}if(m==="{"||m==="["){const r=m==="{",c=r?Object.create(null):[],h=r?"}":"]";if(e+=1,s(),t[e]===h)return e+=1,{value:c,complete:!0};for(;e<t.length;){let i="";if(r){if(t[e]!=='"')throw new Error("Expected JSON property");const _=a(l,d+1);if(!_.complete)return{value:c,complete:!1};if(i=_.value,s(),e===t.length)return{value:c,complete:!1};if(t[e++]!==":")throw new Error("Expected JSON colon")}const g=r?l?`${l}.${i}`:i:`${l}[]`,v=a(g,d+1);if((v.complete||fe(g)&&v.value!==void 0)&&(Array.isArray(c)?c.push(v.value):c[i]=v.value),!v.complete)return{value:c,complete:!1};if(s(),e===t.length)return{value:c,complete:!1};if(t[e]===h)return e+=1,{value:c,complete:!0};if(t[e++]!==",")throw new Error("Expected JSON separator");s()}return{value:c,complete:!1}}for(;e<t.length&&!/[\t\n\r ,}\]]/.test(t[e]);)e+=1;return e===t.length?{complete:!1}:{value:JSON.parse(t.slice(f,e)),complete:!0}},n=a("",0);if(s(),n.complete&&e!==t.length)throw new Error("Unexpected JSON suffix");return n}function J(t){const e=new Set;return t.filter(({id:s})=>e.has(s)?!1:(e.add(s),!0))}function z(t,e,s,a){return[t.visibleNodes,t.highlightedNodes].every(n=>n?.every(l=>e.has(l))??!0)&&[t.visibleEdges,t.highlightedEdges].every(n=>n?.every(l=>s.has(l))??!0)&&(t.visibleGroups?.every(n=>a.has(n))??!0)&&(t.camera?.focus===void 0||e.has(t.camera.focus))}function ve(t){if(!U(t)||!U(t.model))return null;const e=t.model,s=(i,g)=>Array.isArray(i)?i.filter(v=>g.safeParse(v).success):[];let a=J(s(e.nodes,K.shape.nodes.element)),n=J(s(e.groups,K.shape.groups.unwrap().element)),l=!0;for(;l;){const i=new Set(a.map(({id:u})=>u)),g=n.filter(u=>u.nodeIds.every(A=>i.has(A))),v=new Set(g.map(({id:u})=>u)),_=a.filter(u=>u.group===void 0||v.has(u.group));l=_.length!==a.length||g.length!==n.length,a=_,n=g}if(!a.length)return null;const d=new Set(a.map(({id:i})=>i)),f=J(s(e.edges,K.shape.edges.element)).filter(i=>d.has(i.from)&&d.has(i.to)),m=new Set(f.map(({id:i})=>i)),r=new Set(n.map(({id:i})=>i)),c=J(s(t.states,pe)).filter(i=>z(i,d,m,r)),h={...t,model:{...e,nodes:a,edges:f,...e.groups===void 0?{}:{groups:n}},...t.states===void 0?{}:{states:c}};return c.some(i=>i.id===h.currentStateId)||delete h.currentStateId,C.safeParse(h).success?h:null}function V(t){if(!C.safeParse(t).success)return null;const e=t,{nodes:s,edges:a,groups:n=[]}=e.model,l=e.states??[],d=new Set(s.map(({id:r})=>r)),f=new Set(a.map(({id:r})=>r)),m=new Set(n.map(({id:r})=>r));return[s,a,n,l].some(r=>new Set(r.map(({id:c})=>c)).size!==r.length)||s.some(r=>r.group!==void 0&&!m.has(r.group))||a.some(r=>!d.has(r.from)||!d.has(r.to))||n.some(r=>r.nodeIds.some(c=>!d.has(c)))||l.some(r=>!z(r,d,f,m))||e.currentStateId!==void 0&&!l.some(r=>r.id===e.currentStateId)?null:e}function Oe(t,e=!1){const s=(a,n,l)=>({rawSource:t,status:a,diagram:n,...l?{error:l}:{}});try{if(e){const n=V(JSON.parse(t));return n?s("complete",n):s("invalid",null,"Invalid diagram payload")}const a=ge(t);if(a.complete){const n=V(a.value);if(n)return s("complete",n)}return s("partial",ve(a.value))}catch{return s(e?"invalid":"partial",null,e?"Invalid diagram JSON":void 0)}}var he=P('<div class="diagram-feedback svelte-p097sp" role="alert"><strong> </strong> <span> </span></div> <pre class="diagram-source svelte-p097sp"> </pre>',1),we=P('<div class="diagram-feedback svelte-p097sp" role="status"> </div>'),Se=P('<div class="streaming-diagram svelte-p097sp"><!></div>');function _e(t,e){if(new.target)return re({component:_e,...t});ne(e,!0);let s=y(e,"diagram",7),a=y(e,"isStreaming",7,!1),n=y(e,"source",7),l=y(e,"sourceError",7),d=y(e,"viewResetKey",7),f=y(e,"onBindingClick",7),m=q(null),r=q(0),c="",h,i=!1;oe(()=>{const o=s(),p=n(),w=d(),S=a(),B=!!l();ie(()=>{i&&(w!==h||!p.startsWith(c))&&(k(m,null),k(r,b(r)+1)),i=!0,c=p,h=w,B||!S&&!o?k(m,null):o&&k(m,o,!0)})});const g=F(()=>l()?null:s()??(a()?b(m):null)),v=F(()=>!!l()||!a()&&!s());var _={get diagram(){return s()},set diagram(o){s(o),x()},get isStreaming(){return a()},set isStreaming(o=!1){a(o),x()},get source(){return n()},set source(o){n(o),x()},get sourceError(){return l()},set sourceError(o){l(o),x()},get viewResetKey(){return d()},set viewResetKey(o){d(o),x()},get onBindingClick(){return f()},set onBindingClick(o){f(o),x()},$set:se,$on:(o,p)=>ae(e,o,p)},u=Se(),A=G(u);{var M=o=>{var p=he(),w=H(p),S=G(w),B=N(S,!0),X=L(S,2),Y=N(X,!0);W(w);var j=L(w,2),Z=N(j,!0);R(($,ee,te)=>{O(B,$),O(Y,ee),D(j,"aria-label",te),O(Z,n())},[()=>I.markdown_mermaid_renderFailed_error(),()=>I.diagram_renderer_error_description(),()=>I.markdown_mermaid_viewSource_label()]),E(o,p)},Q=o=>{var p=ce(),w=H(p);me(w,()=>b(r),S=>{ue(S,{get diagram(){return b(g)},editable:!1,get viewResetKey(){return d()},get onBindingClick(){return f()}})}),E(o,p)},T=o=>{var p=we(),w=N(p,!0);R(S=>O(w,S),[()=>I.ui_spinner_loading_ariaLabel()]),E(o,p)};de(A,o=>{b(v)?o(M):b(g)?o(Q,1):o(T,-1)})}return W(u),R(()=>{D(u,"aria-busy",a()),D(u,"data-diagram-streaming",a())}),E(t,u),le(_)}export{_e as S,Oe as p};
@@ -1 +1 @@
1
- var nr=Object.defineProperty;var Re=l=>{throw TypeError(l)};var hr=(l,t,e)=>t in l?nr(l,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[t]=e;var u=(l,t,e)=>hr(l,typeof t!="symbol"?t+"":t,e),pe=(l,t,e)=>t.has(l)||Re("Cannot "+e);var r=(l,t,e)=>(pe(l,t,"read from private field"),e?e.call(l):t.get(l)),d=(l,t,e)=>t.has(l)?Re("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(l):t.set(l,e),ut=(l,t,e,o)=>(pe(l,t,"write to private field"),o?o.call(l,e):t.set(l,e),e),ct=(l,t,e)=>(pe(l,t,"access private method"),e);import{t as ft,bo as p,bw as vt,b as mt,br as Ct,bp as de}from"./Fcr7AvC-.js";import{c9 as c,aD as i,bH as v,bV as V,bi as ar,ca as qe,cb as lr,bs as yt,a7 as E,ay as O,W as S,bn as bt,aA as g,bo as ue,a5 as X,bf as gt,bA as $,aB as se,bS as dr}from"./3SdAC2_C.js";import{i as Z}from"./BhYXv0ZM.js";import{H as ur}from"./UWtWVoQE.js";import{au as cr,aI as pr,h as Ne,an as lt,D as ce,i as gr,d as q,a as tt,l as ie,a6 as ge,ac as ne,_ as we,J as Ce,Z as Ie,E as Pe,aR as Ge,aW as Ye,aC as ze,ap as Je,aq as Se,aF as _e,ar as Qe,a$ as at,aN as fr,aU as vr,aH as mr,aG as yr,at as Ve,am as Ze,a2 as br,av as k,ay as Nr,m as je,b as wr,c as Cr,a4 as Ir,C as Pr,g as Sr,A as _r,M as xr,F as kr,r as Hr,s as Tr,t as Ar,u as Mr,v as Or,w as Er,x as Rr,y as Vr,o as Kr,p as Fr,q as Dr,B as Br,az as ot,aS as R,a0 as Xe,$ as $e,aQ as rt,aV as Lr}from"./Beq_QLuz.js";import{t as K}from"./CWfjuhY2.js";import{b as et}from"./BRCr02in.js";var It,ae;class Ur{constructor(t,e){d(this,It,()=>{});d(this,ae,c(()=>r(this,It).call(this)));let o;e!==void 0&&(o=e),ut(this,It,()=>{try{return o}finally{o=t()}})}get current(){return i(r(this,ae))}}It=new WeakMap,ae=new WeakMap;var Q,nt,j;class Wr{constructor(t){d(this,Q);d(this,nt,c(()=>r(this,Q).candidateValues()));d(this,j);ut(this,Q,t),ut(this,j,cr("",{afterMs:1e3,getWindow:r(this,Q).getWindow})),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(t){if(!r(this,Q).enabled()||!i(r(this,nt)).length)return;r(this,j).current=r(this,j).current+t;const e=r(this,Q).getCurrentItem(),o=i(r(this,nt)).find(b=>b===e)??"",n=i(r(this,nt)).map(b=>b??""),a=pr(n,r(this,j).current,o),h=i(r(this,nt)).find(b=>b===a);return h&&r(this,Q).onMatch(h),h}resetTypeahead(){r(this,j).current=""}}Q=new WeakMap,nt=new WeakMap,j=new WeakMap;const Ke=[wr,je,Cr,Ir,Pr,Sr,_r,xr,ie,kr,Hr,Tr,Ar,Mr,Or,Er,Rr,Vr,Kr,Fr,Dr],qr=[tt,we,Ce],Gr=[q,Ie,Pe],tr=[...qr,...Gr],Yr=Nr({component:"select",parts:["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"]}),dt=new Ne("Select.Root | Combobox.Root"),er=new Ne("Select.Group | Combobox.Group"),rr=new Ne("Select.Content | Combobox.Content");var Pt,St,_t,xt,kt,Ht,Tt,At,Mt,Ot,Et,Rt;class or{constructor(t){u(this,"opts");d(this,Pt,V(!1));d(this,St,V(null));d(this,_t,V(null));u(this,"contentPresence");d(this,xt,V(null));d(this,kt,V(null));d(this,Ht,V(null));d(this,Tt,V(""));d(this,At,V(null));d(this,Mt,c(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null));d(this,Ot,c(()=>{if(this.highlightedNode)return this.highlightedNode.id}));d(this,Et,c(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null));d(this,Rt,V(!1));u(this,"isUsingKeyboard",!1);u(this,"isCombobox",!1);u(this,"domContext",new ce(()=>null));u(this,"getBitsAttr",t=>Yr.getAttr(t,this.isCombobox?"combobox":void 0));this.opts=t,this.isCombobox=t.isCombobox,this.contentPresence=new br({ref:k(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),lr(()=>{this.opts.open.current||this.setHighlightedNode(null)})}get touchedInput(){return i(r(this,Pt))}set touchedInput(t){v(r(this,Pt),t,!0)}get inputNode(){return i(r(this,St))}set inputNode(t){v(r(this,St),t,!0)}get contentNode(){return i(r(this,_t))}set contentNode(t){v(r(this,_t),t,!0)}get viewportNode(){return i(r(this,xt))}set viewportNode(t){v(r(this,xt),t,!0)}get triggerNode(){return i(r(this,kt))}set triggerNode(t){v(r(this,kt),t,!0)}get valueNode(){return i(r(this,Ht))}set valueNode(t){v(r(this,Ht),t,!0)}get valueId(){return i(r(this,Tt))}set valueId(t){v(r(this,Tt),t,!0)}get highlightedNode(){return i(r(this,At))}set highlightedNode(t){v(r(this,At),t,!0)}get highlightedValue(){return i(r(this,Mt))}set highlightedValue(t){v(r(this,Mt),t)}get highlightedId(){return i(r(this,Ot))}set highlightedId(t){v(r(this,Ot),t)}get highlightedLabel(){return i(r(this,Et))}set highlightedLabel(t){v(r(this,Et),t)}get contentIsPositioned(){return i(r(this,Rt))}set contentIsPositioned(t){v(r(this,Rt),t,!0)}setHighlightedNode(t,e=!1){this.highlightedNode=t,t&&(this.isUsingKeyboard||e)&&this.scrollHighlightedNodeIntoView(t)}scrollHighlightedNodeIntoView(t){!this.viewportNode||!this.contentIsPositioned||t.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){const t=this.contentNode;return t?Array.from(t.querySelectorAll(`[${this.getBitsAttr("item")}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(t=!1){this.setHighlightedNode(null);let e=this.getCandidateNodes();if(e.length){if(this.viewportNode){const o=this.viewportNode.getBoundingClientRect();e=e.filter(n=>{if(!this.viewportNode)return!1;const a=n.getBoundingClientRect();return a.right<=o.right&&a.left>=o.left&&a.bottom<=o.bottom&&a.top>=o.top})}this.setHighlightedNode(e[0],t)}}getNodeByValue(t){return this.getCandidateNodes().find(o=>o.dataset.value===t)??null}getLabelForValue(t){if(t==="")return"";const e=this.opts.items.current.find(n=>n.value===t)?.label;if(e!==void 0)return e;const o=this.getNodeByValue(t);if(o){const n=o.getAttribute("data-label");return n!==null&&n!==""?n:o.textContent?.trim()??t}return t}setOpen(t){this.opts.open.current=t}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}}Pt=new WeakMap,St=new WeakMap,_t=new WeakMap,xt=new WeakMap,kt=new WeakMap,Ht=new WeakMap,Tt=new WeakMap,At=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,Et=new WeakMap,Rt=new WeakMap;var Vt,Kt,Ft,Dt;class zr extends or{constructor(e){super(e);u(this,"opts");u(this,"isMulti",!1);d(this,Vt,c(()=>this.opts.value.current!==""));d(this,Kt,c(()=>this.opts.items.current.length?this.opts.items.current.find(e=>e.value===this.opts.value.current)?.label??"":""));d(this,Ft,c(()=>this.opts.items.current.length?this.opts.items.current.filter(o=>!o.disabled).map(o=>o.label):[]));d(this,Dt,c(()=>!(this.isMulti||this.opts.items.current.length===0)));this.opts=e,qe(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),at(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return i(r(this,Vt))}set hasValue(e){v(r(this,Vt),e)}get currentLabel(){return i(r(this,Kt))}set currentLabel(e){v(r(this,Kt),e)}get candidateLabels(){return i(r(this,Ft))}set candidateLabels(e){v(r(this,Ft),e)}get dataTypeaheadEnabled(){return i(r(this,Dt))}set dataTypeaheadEnabled(e){v(r(this,Dt),e)}includesItem(e){return this.opts.value.current===e}toggleItem(e,o=e){const n=this.includesItem(e)?"":e;this.opts.value.current=n,n!==""&&(this.opts.inputValue.current=o)}setInitialHighlightedNode(){Ze(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==""){const e=this.getNodeByValue(this.opts.value.current);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}Vt=new WeakMap,Kt=new WeakMap,Ft=new WeakMap,Dt=new WeakMap;var Bt;class Jr extends or{constructor(e){super(e);u(this,"opts");u(this,"isMulti",!0);d(this,Bt,c(()=>this.opts.value.current.length>0));this.opts=e,qe(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),at(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return i(r(this,Bt))}set hasValue(e){v(r(this,Bt),e)}includesItem(e){return this.opts.value.current.includes(e)}toggleItem(e,o=e){this.includesItem(e)?this.opts.value.current=this.opts.value.current.filter(n=>n!==e):this.opts.value.current=[...this.opts.value.current,e],this.opts.inputValue.current=o}setInitialHighlightedNode(){Ze(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const e=this.getNodeByValue(this.opts.value.current[0]);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}Bt=new WeakMap;class vo{static create(t){const{type:e,...o}=t,n=e==="single"?new zr(o):new Jr(o);return dt.set(n)}}var Lt;const xe=class xe{constructor(t,e){u(this,"opts");u(this,"root");u(this,"attachment");d(this,Lt,c(()=>({id:this.opts.id.current,role:"combobox",disabled:this.root.opts.disabled.current?!0:void 0,"aria-activedescendant":this.root.highlightedId,"aria-autocomplete":"list","aria-expanded":Qe(this.root.opts.open.current),"data-state":_e(this.root.opts.open.current),"data-disabled":Se(this.root.opts.disabled.current),onkeydown:this.onkeydown,oninput:this.oninput,[this.root.getBitsAttr("input")]:"",...this.attachment})));this.opts=t,this.root=e,this.attachment=lt(t.ref,o=>this.root.inputNode=o),this.root.domContext=new ce(t.ref),this.onkeydown=this.onkeydown.bind(this),this.oninput=this.oninput.bind(this),at([()=>this.root.opts.value.current,()=>this.opts.clearOnDeselect.current],([o,n],[a])=>{n&&(Array.isArray(o)&&Array.isArray(a)?o.length===0&&a.length!==0&&(this.root.opts.inputValue.current=""):o===""&&a!==""&&(this.root.opts.inputValue.current=""))})}static create(t){return new xe(t,dt.get())}onkeydown(t){if(this.root.isUsingKeyboard=!0,t.key!==je){if((t.key===q||t.key===tt)&&t.preventDefault(),!this.root.opts.open.current){if(Ke.includes(t.key)||t.key===ne||t.key===Br&&this.root.opts.inputValue.current===""||(this.root.handleOpen(),this.root.hasValue))return;const e=this.root.getCandidateNodes();if(!e.length)return;if(t.key===tt){const o=e[0];this.root.setHighlightedNode(o)}else if(t.key===q){const o=e[e.length-1];this.root.setHighlightedNode(o)}return}if(t.key===ne){this.root.handleClose();return}if(t.key===ie&&!t.isComposing){t.preventDefault();const e=this.root.highlightedValue===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti){this.root.handleClose();return}this.root.highlightedValue&&this.root.highlightedNode&&this.root.highlightedNode.isConnected&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!e&&this.root.handleClose()}if(t.key===q&&t.altKey&&this.root.handleClose(),tr.includes(t.key)){t.preventDefault();const e=this.root.getCandidateNodes(),o=this.root.highlightedNode,n=o?e.indexOf(o):-1,a=this.root.opts.loop.current;let h;if(t.key===tt?h=Ge(e,n,a):t.key===q?h=Ye(e,n,a):t.key===Ie?h=ze(e,n,10,a):t.key===we?h=Je(e,n,10,a):t.key===Ce?h=e[0]:t.key===Pe&&(h=e[e.length-1]),!h)return;this.root.setHighlightedNode(h);return}Ke.includes(t.key)||this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}oninput(t){this.root.opts.inputValue.current=t.currentTarget.value,this.root.setHighlightedToFirstCandidate()}get props(){return i(r(this,Lt))}set props(t){v(r(this,Lt),t)}};Lt=new WeakMap;let Fe=xe;var ht,pt,G,sr,fe,ve,Ut;const ke=class ke{constructor(t,e){d(this,G);u(this,"opts");u(this,"root");u(this,"attachment");d(this,ht);d(this,pt);d(this,Ut,c(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":Qe(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":_e(this.root.opts.open.current),"data-disabled":Se(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.getBitsAttr("trigger")]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment})));this.opts=t,this.root=e,this.attachment=lt(t.ref,o=>this.root.triggerNode=o),this.root.domContext=new ce(t.ref),ut(this,ht,new gr({getCurrentItem:()=>this.root.highlightedNode,onMatch:o=>{this.root.setHighlightedNode(o)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()})),ut(this,pt,new Wr({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:o=>{if(this.root.isMulti||!this.root.opts.items.current)return;const n=this.root.opts.items.current.find(a=>a.label===o);n&&(this.root.opts.value.current=n.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()})),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}static create(t){return new ke(t,dt.get())}onkeydown(t){if(this.root.isUsingKeyboard=!0,(t.key===q||t.key===tt)&&t.preventDefault(),!this.root.opts.open.current){if(t.key===ie||t.key===ge||t.key===tt||t.key===q)t.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){r(this,pt).handleTypeaheadSearch(t.key);return}if(this.root.hasValue)return;const h=this.root.getCandidateNodes();if(!h.length)return;if(t.key===tt){const b=h[0];this.root.setHighlightedNode(b)}else if(t.key===q){const b=h[h.length-1];this.root.setHighlightedNode(b)}return}if(t.key===ne){this.root.handleClose();return}if((t.key===ie||t.key===ge&&r(this,ht).search==="")&&!t.isComposing&&(t.preventDefault(),ct(this,G,ve).call(this)))return;if(t.key===q&&t.altKey&&this.root.handleClose(),tr.includes(t.key)){t.preventDefault();const h=this.root.getCandidateNodes(),b=this.root.highlightedNode,C=b?h.indexOf(b):-1,f=this.root.opts.loop.current;let y;if(t.key===tt?y=Ge(h,C,f):t.key===q?y=Ye(h,C,f):t.key===Ie?y=ze(h,C,10,f):t.key===we?y=Je(h,C,10,f):t.key===Ce?y=h[0]:t.key===Pe&&(y=h[h.length-1]),!y)return;this.root.setHighlightedNode(y);return}const e=t.ctrlKey||t.altKey||t.metaKey,o=t.key.length===1,n=t.key===ge,a=this.root.getCandidateNodes();if(t.key!==ne){if(!e&&(o||n)){!r(this,ht).handleTypeaheadSearch(t.key,a)&&n&&(t.preventDefault(),ct(this,G,ve).call(this));return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(t){t.currentTarget.focus()}onpointerdown(t){if(this.root.opts.disabled.current)return;if(t.pointerType==="touch")return t.preventDefault();const e=t.target;e?.hasPointerCapture(t.pointerId)&&e?.releasePointerCapture(t.pointerId),t.button===0&&t.ctrlKey===!1&&(this.root.opts.open.current===!1?ct(this,G,fe).call(this,t):this.root.handleClose())}onpointerup(t){this.root.opts.disabled.current||(t.preventDefault(),t.pointerType==="touch"&&(this.root.opts.open.current===!1?ct(this,G,fe).call(this,t):this.root.handleClose()))}get props(){return i(r(this,Ut))}set props(t){v(r(this,Ut),t)}};ht=new WeakMap,pt=new WeakMap,G=new WeakSet,sr=function(){this.root.opts.open.current=!0,r(this,pt).resetTypeahead(),r(this,ht).resetTypeahead()},fe=function(t){ct(this,G,sr).call(this)},ve=function(){const t=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!t?(this.root.handleClose(),!0):!1)},Ut=new WeakMap;let De=ke;var Wt,le,qt,Gt;const He=class He{constructor(t,e){u(this,"opts");u(this,"root");u(this,"attachment");d(this,Wt,V(!1));u(this,"domContext");d(this,le,c(()=>mr(this.root.isCombobox?"combobox":"select")));u(this,"onInteractOutside",t=>{if(t.target===this.root.triggerNode||t.target===this.root.inputNode){t.preventDefault();return}this.opts.onInteractOutside.current(t),!t.defaultPrevented&&this.root.handleClose()});u(this,"onEscapeKeydown",t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()});u(this,"onOpenAutoFocus",t=>{t.preventDefault()});u(this,"onCloseAutoFocus",t=>{t.preventDefault()});d(this,qt,c(()=>({open:this.root.opts.open.current})));d(this,Gt,c(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":_e(this.root.opts.open.current),...yr(this.root.contentPresence.transitionStatus),[this.root.getBitsAttr("content")]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...i(r(this,le))},onpointermove:this.onpointermove,...this.attachment})));u(this,"popperProps",{onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.root.contentIsPositioned=!0,this.isPositioned=!0)}});this.opts=t,this.root=e,this.attachment=lt(t.ref,o=>this.root.contentNode=o),this.domContext=new ce(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),vr(()=>{this.root.contentNode=null,this.root.contentIsPositioned=!1,this.isPositioned=!1}),at(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.root.contentIsPositioned=!1,this.isPositioned=!1)}),at([()=>this.isPositioned,()=>this.root.highlightedNode],()=>{!this.isPositioned||!this.root.highlightedNode||this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode)}),this.onpointermove=this.onpointermove.bind(this)}static create(t){return rr.set(new He(t,dt.get()))}get isPositioned(){return i(r(this,Wt))}set isPositioned(t){v(r(this,Wt),t,!0)}onpointermove(t){this.root.isUsingKeyboard=!1}get shouldRender(){return this.root.contentPresence.shouldRender}get snippetProps(){return i(r(this,qt))}set snippetProps(t){v(r(this,qt),t)}get props(){return i(r(this,Gt))}set props(t){v(r(this,Gt),t)}};Wt=new WeakMap,le=new WeakMap,qt=new WeakMap,Gt=new WeakMap;let he=He;var Yt,zt,Jt,Qt,Zt;const Te=class Te{constructor(t,e){u(this,"opts");u(this,"root");u(this,"attachment");d(this,Yt,c(()=>this.root.includesItem(this.opts.value.current)));d(this,zt,c(()=>this.root.highlightedValue===this.opts.value.current));u(this,"prevHighlighted",new Ur(()=>this.isHighlighted));d(this,Jt,V(!1));d(this,Qt,c(()=>({selected:this.isSelected,highlighted:this.isHighlighted})));d(this,Zt,c(()=>({id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":Se(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem(this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment})));this.opts=t,this.root=e,this.attachment=lt(t.ref),at([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),at(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}static create(t){return new Te(t,dt.get())}get isSelected(){return i(r(this,Yt))}set isSelected(t){v(r(this,Yt),t)}get isHighlighted(){return i(r(this,zt))}set isHighlighted(t){v(r(this,zt),t)}get mounted(){return i(r(this,Jt))}set mounted(t){v(r(this,Jt),t,!0)}handleSelect(){if(this.opts.disabled.current)return;const t=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!t&&this.root.handleClose()}get snippetProps(){return i(r(this,Qt))}set snippetProps(t){v(r(this,Qt),t)}onpointerdown(t){t.preventDefault()}onpointerup(t){if(!(t.defaultPrevented||!this.opts.ref.current)){if(t.pointerType==="touch"&&!fr){ar(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}t.preventDefault(),this.handleSelect(),t.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(t){t.pointerType!=="touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}get props(){return i(r(this,Zt))}set props(t){v(r(this,Zt),t)}};Yt=new WeakMap,zt=new WeakMap,Jt=new WeakMap,Qt=new WeakMap,Zt=new WeakMap;let me=Te;var jt,Xt;const Ae=class Ae{constructor(t,e){u(this,"opts");u(this,"root");d(this,jt,V(null));u(this,"attachment");d(this,Xt,c(()=>({id:this.opts.id.current,role:"group",[this.root.getBitsAttr("group")]:"","aria-labelledby":this.labelNode?.id??void 0,...this.attachment})));this.opts=t,this.root=e,this.attachment=lt(t.ref)}static create(t){return er.set(new Ae(t,dt.get()))}get labelNode(){return i(r(this,jt))}set labelNode(t){v(r(this,jt),t,!0)}get props(){return i(r(this,Xt))}set props(t){v(r(this,Xt),t)}};jt=new WeakMap,Xt=new WeakMap;let Be=Ae;var $t;const Me=class Me{constructor(t,e){u(this,"opts");u(this,"group");u(this,"attachment");d(this,$t,c(()=>({id:this.opts.id.current,[this.group.root.getBitsAttr("group-label")]:"",...this.attachment})));this.opts=t,this.group=e,this.attachment=lt(t.ref,o=>this.group.labelNode=o)}static create(t){return new Me(t,er.get())}get props(){return i(r(this,$t))}set props(t){v(r(this,$t),t)}};$t=new WeakMap;let Le=Me;var te,ee;const Oe=class Oe{constructor(t,e){u(this,"opts");u(this,"root");d(this,te,c(()=>this.root.opts.name.current!==""));d(this,ee,c(()=>({disabled:Ve(this.root.opts.disabled.current),required:Ve(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus})));this.opts=t,this.root=e,this.onfocus=this.onfocus.bind(this)}static create(t){return new Oe(t,dt.get())}get shouldRender(){return i(r(this,te))}set shouldRender(t){v(r(this,te),t)}onfocus(t){t.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}get props(){return i(r(this,ee))}set props(t){v(r(this,ee),t)}};te=new WeakMap,ee=new WeakMap;let ye=Oe;var re,oe;const Ee=class Ee{constructor(t,e){u(this,"opts");u(this,"content");u(this,"root");u(this,"attachment");d(this,re,V(0));d(this,oe,c(()=>({id:this.opts.id.current,role:"presentation",[this.root.getBitsAttr("viewport")]:"",style:{position:"relative",flex:1,overflow:"auto"},...this.attachment})));this.opts=t,this.content=e,this.root=e.root,this.attachment=lt(t.ref,o=>{this.root.viewportNode=o})}static create(t){return new Ee(t,rr.get())}get prevScrollTop(){return i(r(this,re))}set prevScrollTop(t){v(r(this,re),t,!0)}get props(){return i(r(this,oe))}set props(t){v(r(this,oe),t)}};re=new WeakMap,oe=new WeakMap;let be=Ee;function Qr(l,t){if(new.target)return ft({component:Qr,...l});yt(t,!0);let e=p(t,"value",15),o=p(t,"autocomplete",7);const n=ye.create({value:k(()=>e())});var a={get value(){return e()},set value(f){e(f),g()},get autocomplete(){return o()},set autocomplete(f){o(f),g()},$set:vt,$on:(f,y)=>mt(t,f,y)},h=E(),b=O(h);{var C=f=>{ur(f,Ct(()=>n.props,{get autocomplete(){return o()},get value(){return e()},set value(y){e(y)}}))};Z(b,f=>{n.shouldRender&&f(C)})}return S(l,h),bt(a)}var Zr=new Set(["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]),Ue=se("<div><div><!></div></div>");function jr(l,t){const e=ue();if(new.target)return ft({component:jr,...l});yt(t,!0);let o=p(t,"id",23,()=>ot(e)),n=p(t,"ref",15,null),a=p(t,"forceMount",7,!1),h=p(t,"side",7,"bottom"),b=p(t,"onInteractOutside",7,R),C=p(t,"onEscapeKeydown",7,R),f=p(t,"children",7),y=p(t,"child",7),M=p(t,"preventScroll",7,!1),W=p(t,"style",7),w=de(t,Zr);const I=he.create({id:k(()=>o()),ref:k(()=>n(),s=>n(s)),onInteractOutside:k(()=>b()),onEscapeKeydown:k(()=>C())}),N=c(()=>rt(w,I.props));var H={get id(){return o()},set id(s=ot(e)){o(s),g()},get ref(){return n()},set ref(s=null){n(s),g()},get forceMount(){return a()},set forceMount(s=!1){a(s),g()},get side(){return h()},set side(s="bottom"){h(s),g()},get onInteractOutside(){return b()},set onInteractOutside(s=R){b(s),g()},get onEscapeKeydown(){return C()},set onEscapeKeydown(s=R){C(s),g()},get children(){return f()},set children(s){f(s),g()},get child(){return y()},set child(s){y(s),g()},get preventScroll(){return M()},set preventScroll(s=!1){M(s),g()},get style(){return W()},set style(s){W(s),g()},$set:vt,$on:(s,T)=>mt(t,s,T)},F=E(),Nt=O(F);{var wt=s=>{Xe(s,Ct(()=>i(N),()=>I.popperProps,{get ref(){return I.opts.ref},get side(){return h()},get enabled(){return I.root.opts.open.current},get id(){return o()},get preventScroll(){return M()},forceMount:!0,get shouldRender(){return I.shouldRender},popper:(D,B)=>{let Y=()=>(B?.()).props,L=()=>(B?.()).wrapperProps;const z=c(()=>rt(Y(),{style:I.props.style},{style:W()}));var J=E(),st=O(J);{var A=P=>{var x=E(),U=O(x);{let it=c(()=>({props:i(z),wrapperProps:L(),...I.snippetProps}));K(U,y,()=>i(it))}S(P,x)},_=P=>{var x=Ue();et(x,()=>({...L()}));var U=X(x);et(U,()=>({...i(z)}));var it=X(U);K(it,()=>f()??gt),$(U),$(x),S(P,x)};Z(st,P=>{y()?P(A):P(_,-1)})}S(D,J)},$$slots:{popper:!0}}))},m=s=>{$e(s,Ct(()=>i(N),()=>I.popperProps,{get ref(){return I.opts.ref},get side(){return h()},get open(){return I.root.opts.open.current},get id(){return o()},get preventScroll(){return M()},forceMount:!1,get shouldRender(){return I.shouldRender},popper:(D,B)=>{let Y=()=>(B?.()).props,L=()=>(B?.()).wrapperProps;const z=c(()=>rt(Y(),{style:I.props.style},{style:W()}));var J=E(),st=O(J);{var A=P=>{var x=E(),U=O(x);{let it=c(()=>({props:i(z),wrapperProps:L(),...I.snippetProps}));K(U,y,()=>i(it))}S(P,x)},_=P=>{var x=Ue();et(x,()=>({...L()}));var U=X(x);et(U,()=>({...i(z)}));var it=X(U);K(it,()=>f()??gt),$(U),$(x),S(P,x)};Z(st,P=>{y()?P(A):P(_,-1)})}S(D,J)},$$slots:{popper:!0}}))};Z(Nt,s=>{a()?s(wt):a()||s(m,1)})}return S(l,F),bt(H)}var Xr=new Set(["$$slots","$$events","$$legacy","id","ref","forceMount","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]),We=se("<div><!></div>");function $r(l,t){const e=ue();if(new.target)return ft({component:$r,...l});yt(t,!0);let o=p(t,"id",23,()=>ot(e)),n=p(t,"ref",15,null),a=p(t,"forceMount",7,!1),h=p(t,"onInteractOutside",7,R),b=p(t,"onEscapeKeydown",7,R),C=p(t,"children",7),f=p(t,"child",7),y=p(t,"preventScroll",7,!1),M=p(t,"style",7),W=de(t,Xr);const w=he.create({id:k(()=>o()),ref:k(()=>n(),m=>n(m)),onInteractOutside:k(()=>h()),onEscapeKeydown:k(()=>b())}),I=c(()=>rt(W,w.props));var N={get id(){return o()},set id(m=ot(e)){o(m),g()},get ref(){return n()},set ref(m=null){n(m),g()},get forceMount(){return a()},set forceMount(m=!1){a(m),g()},get onInteractOutside(){return h()},set onInteractOutside(m=R){h(m),g()},get onEscapeKeydown(){return b()},set onEscapeKeydown(m=R){b(m),g()},get children(){return C()},set children(m){C(m),g()},get child(){return f()},set child(m){f(m),g()},get preventScroll(){return y()},set preventScroll(m=!1){y(m),g()},get style(){return M()},set style(m){M(m),g()},$set:vt,$on:(m,s)=>mt(t,m,s)},H=E(),F=O(H);{var Nt=m=>{Xe(m,Ct(()=>i(I),()=>w.popperProps,{get ref(){return w.opts.ref},isStatic:!0,get enabled(){return w.root.opts.open.current},get id(){return o()},get preventScroll(){return y()},forceMount:!0,get shouldRender(){return w.shouldRender},popper:(T,D)=>{let B=()=>(D?.()).props;const Y=c(()=>rt(B(),{style:w.props.style},{style:M()}));var L=E(),z=O(L);{var J=A=>{var _=E(),P=O(_);{let x=c(()=>({props:i(Y),...w.snippetProps}));K(P,f,()=>i(x))}S(A,_)},st=A=>{var _=We();et(_,()=>({...i(Y)}));var P=X(_);K(P,()=>C()??gt),$(_),S(A,_)};Z(z,A=>{f()?A(J):A(st,-1)})}S(T,L)},$$slots:{popper:!0}}))},wt=m=>{$e(m,Ct(()=>i(I),()=>w.popperProps,{get ref(){return w.opts.ref},isStatic:!0,get open(){return w.root.opts.open.current},get id(){return o()},get preventScroll(){return y()},forceMount:!1,get shouldRender(){return w.shouldRender},popper:(T,D)=>{let B=()=>(D?.()).props;const Y=c(()=>rt(B(),{style:w.props.style},{style:M()}));var L=E(),z=O(L);{var J=A=>{var _=E(),P=O(_);{let x=c(()=>({props:i(Y),...w.snippetProps}));K(P,f,()=>i(x))}S(A,_)},st=A=>{var _=We();et(_,()=>({...i(Y)}));var P=X(_);K(P,()=>C()??gt),$(_),S(A,_)};Z(z,A=>{f()?A(J):A(st,-1)})}S(T,L)},$$slots:{popper:!0}}))};Z(F,m=>{a()?m(Nt):a()||m(wt,1)})}return S(l,H),bt(N)}function ir(l,t){if(new.target)return ft({component:ir,...l});yt(t,!0);let e=p(t,"mounted",15,!1),o=p(t,"onMountedChange",7,R);Lr(()=>(e(!0),o()(!0),()=>{e(!1),o()(!1)}));var n={get mounted(){return e()},set mounted(a=!1){e(a),g()},get onMountedChange(){return o()},set onMountedChange(a=R){o(a),g()},$set:vt,$on:(a,h)=>mt(t,a,h)};return bt(n)}var to=new Set(["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]),eo=se("<div><!></div>"),ro=se("<!> <!>",1);function oo(l,t){const e=ue();if(new.target)return ft({component:oo,...l});yt(t,!0);let o=p(t,"id",23,()=>ot(e)),n=p(t,"ref",15,null),a=p(t,"value",7),h=p(t,"label",23,a),b=p(t,"disabled",7,!1),C=p(t,"children",7),f=p(t,"child",7),y=p(t,"onHighlight",7,R),M=p(t,"onUnhighlight",7,R),W=de(t,to);const w=me.create({id:k(()=>o()),ref:k(()=>n(),s=>n(s)),value:k(()=>a()),disabled:k(()=>b()),label:k(()=>h()),onHighlight:k(()=>y()),onUnhighlight:k(()=>M())}),I=c(()=>rt(W,w.props));var N={get id(){return o()},set id(s=ot(e)){o(s),g()},get ref(){return n()},set ref(s=null){n(s),g()},get value(){return a()},set value(s){a(s),g()},get label(){return h()},set label(s=a){h(s),g()},get disabled(){return b()},set disabled(s=!1){b(s),g()},get children(){return C()},set children(s){C(s),g()},get child(){return f()},set child(s){f(s),g()},get onHighlight(){return y()},set onHighlight(s=R){y(s),g()},get onUnhighlight(){return M()},set onUnhighlight(s=R){M(s),g()},$set:vt,$on:(s,T)=>mt(t,s,T)},H=ro(),F=O(H);{var Nt=s=>{var T=E(),D=O(T);{let B=c(()=>({props:i(I),...w.snippetProps}));K(D,f,()=>i(B))}S(s,T)},wt=s=>{var T=eo();et(T,()=>({...i(I)}));var D=X(T);K(D,()=>C()??gt,()=>w.snippetProps),$(T),S(s,T)};Z(F,s=>{f()?s(Nt):s(wt,-1)})}var m=dr(F,2);return ir(m,{get mounted(){return w.mounted},set mounted(s){w.mounted=s}}),S(l,H),bt(N)}var so=new Set(["$$slots","$$events","$$legacy","id","ref","children","child"]),io=se("<div><!></div>");function no(l,t){const e=ue();if(new.target)return ft({component:no,...l});yt(t,!0);let o=p(t,"id",23,()=>ot(e)),n=p(t,"ref",15,null),a=p(t,"children",7),h=p(t,"child",7),b=de(t,so);const C=be.create({id:k(()=>o()),ref:k(()=>n(),N=>n(N))}),f=c(()=>rt(b,C.props));var y={get id(){return o()},set id(N=ot(e)){o(N),g()},get ref(){return n()},set ref(N=null){n(N),g()},get children(){return a()},set children(N){a(N),g()},get child(){return h()},set child(N){h(N),g()},$set:vt,$on:(N,H)=>mt(t,N,H)},M=E(),W=O(M);{var w=N=>{var H=E(),F=O(H);K(F,h,()=>({props:i(f)})),S(N,H)},I=N=>{var H=io();et(H,()=>({...i(f)}));var F=X(H);K(F,()=>a()??gt),$(H),S(N,H)};Z(W,N=>{h()?N(w):N(I,-1)})}return S(l,M),bt(y)}export{Le as S,Be as a,Fe as b,vo as c,De as d,jr as e,$r as f,Qr as g,oo as h,no as i};
1
+ var nr=Object.defineProperty;var Re=l=>{throw TypeError(l)};var hr=(l,t,e)=>t in l?nr(l,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[t]=e;var u=(l,t,e)=>hr(l,typeof t!="symbol"?t+"":t,e),pe=(l,t,e)=>t.has(l)||Re("Cannot "+e);var r=(l,t,e)=>(pe(l,t,"read from private field"),e?e.call(l):t.get(l)),d=(l,t,e)=>t.has(l)?Re("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(l):t.set(l,e),ut=(l,t,e,o)=>(pe(l,t,"write to private field"),o?o.call(l,e):t.set(l,e),e),ct=(l,t,e)=>(pe(l,t,"access private method"),e);import{t as ft,bo as p,bw as vt,b as mt,br as Ct,bp as de}from"./Fcr7AvC-.js";import{c9 as c,aD as i,bH as v,bV as V,bi as ar,ca as qe,cb as lr,bs as yt,a7 as E,ay as O,W as S,bn as bt,aA as g,bo as ue,a5 as X,bf as gt,bA as $,aB as se,bS as dr}from"./3SdAC2_C.js";import{i as Z}from"./BhYXv0ZM.js";import{H as ur}from"./GLk8gkMl.js";import{au as cr,aI as pr,h as Ne,an as lt,D as ce,i as gr,d as q,a as tt,l as ie,a6 as ge,ac as ne,_ as we,J as Ce,Z as Ie,E as Pe,aR as Ge,aW as Ye,aC as ze,ap as Je,aq as Se,aF as _e,ar as Qe,a$ as at,aN as fr,aU as vr,aH as mr,aG as yr,at as Ve,am as Ze,a2 as br,av as k,ay as Nr,m as je,b as wr,c as Cr,a4 as Ir,C as Pr,g as Sr,A as _r,M as xr,F as kr,r as Hr,s as Tr,t as Ar,u as Mr,v as Or,w as Er,x as Rr,y as Vr,o as Kr,p as Fr,q as Dr,B as Br,az as ot,aS as R,a0 as Xe,$ as $e,aQ as rt,aV as Lr}from"./D-lOH49i.js";import{t as K}from"./CWfjuhY2.js";import{b as et}from"./BRCr02in.js";var It,ae;class Ur{constructor(t,e){d(this,It,()=>{});d(this,ae,c(()=>r(this,It).call(this)));let o;e!==void 0&&(o=e),ut(this,It,()=>{try{return o}finally{o=t()}})}get current(){return i(r(this,ae))}}It=new WeakMap,ae=new WeakMap;var Q,nt,j;class Wr{constructor(t){d(this,Q);d(this,nt,c(()=>r(this,Q).candidateValues()));d(this,j);ut(this,Q,t),ut(this,j,cr("",{afterMs:1e3,getWindow:r(this,Q).getWindow})),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(t){if(!r(this,Q).enabled()||!i(r(this,nt)).length)return;r(this,j).current=r(this,j).current+t;const e=r(this,Q).getCurrentItem(),o=i(r(this,nt)).find(b=>b===e)??"",n=i(r(this,nt)).map(b=>b??""),a=pr(n,r(this,j).current,o),h=i(r(this,nt)).find(b=>b===a);return h&&r(this,Q).onMatch(h),h}resetTypeahead(){r(this,j).current=""}}Q=new WeakMap,nt=new WeakMap,j=new WeakMap;const Ke=[wr,je,Cr,Ir,Pr,Sr,_r,xr,ie,kr,Hr,Tr,Ar,Mr,Or,Er,Rr,Vr,Kr,Fr,Dr],qr=[tt,we,Ce],Gr=[q,Ie,Pe],tr=[...qr,...Gr],Yr=Nr({component:"select",parts:["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"]}),dt=new Ne("Select.Root | Combobox.Root"),er=new Ne("Select.Group | Combobox.Group"),rr=new Ne("Select.Content | Combobox.Content");var Pt,St,_t,xt,kt,Ht,Tt,At,Mt,Ot,Et,Rt;class or{constructor(t){u(this,"opts");d(this,Pt,V(!1));d(this,St,V(null));d(this,_t,V(null));u(this,"contentPresence");d(this,xt,V(null));d(this,kt,V(null));d(this,Ht,V(null));d(this,Tt,V(""));d(this,At,V(null));d(this,Mt,c(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null));d(this,Ot,c(()=>{if(this.highlightedNode)return this.highlightedNode.id}));d(this,Et,c(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null));d(this,Rt,V(!1));u(this,"isUsingKeyboard",!1);u(this,"isCombobox",!1);u(this,"domContext",new ce(()=>null));u(this,"getBitsAttr",t=>Yr.getAttr(t,this.isCombobox?"combobox":void 0));this.opts=t,this.isCombobox=t.isCombobox,this.contentPresence=new br({ref:k(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),lr(()=>{this.opts.open.current||this.setHighlightedNode(null)})}get touchedInput(){return i(r(this,Pt))}set touchedInput(t){v(r(this,Pt),t,!0)}get inputNode(){return i(r(this,St))}set inputNode(t){v(r(this,St),t,!0)}get contentNode(){return i(r(this,_t))}set contentNode(t){v(r(this,_t),t,!0)}get viewportNode(){return i(r(this,xt))}set viewportNode(t){v(r(this,xt),t,!0)}get triggerNode(){return i(r(this,kt))}set triggerNode(t){v(r(this,kt),t,!0)}get valueNode(){return i(r(this,Ht))}set valueNode(t){v(r(this,Ht),t,!0)}get valueId(){return i(r(this,Tt))}set valueId(t){v(r(this,Tt),t,!0)}get highlightedNode(){return i(r(this,At))}set highlightedNode(t){v(r(this,At),t,!0)}get highlightedValue(){return i(r(this,Mt))}set highlightedValue(t){v(r(this,Mt),t)}get highlightedId(){return i(r(this,Ot))}set highlightedId(t){v(r(this,Ot),t)}get highlightedLabel(){return i(r(this,Et))}set highlightedLabel(t){v(r(this,Et),t)}get contentIsPositioned(){return i(r(this,Rt))}set contentIsPositioned(t){v(r(this,Rt),t,!0)}setHighlightedNode(t,e=!1){this.highlightedNode=t,t&&(this.isUsingKeyboard||e)&&this.scrollHighlightedNodeIntoView(t)}scrollHighlightedNodeIntoView(t){!this.viewportNode||!this.contentIsPositioned||t.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){const t=this.contentNode;return t?Array.from(t.querySelectorAll(`[${this.getBitsAttr("item")}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(t=!1){this.setHighlightedNode(null);let e=this.getCandidateNodes();if(e.length){if(this.viewportNode){const o=this.viewportNode.getBoundingClientRect();e=e.filter(n=>{if(!this.viewportNode)return!1;const a=n.getBoundingClientRect();return a.right<=o.right&&a.left>=o.left&&a.bottom<=o.bottom&&a.top>=o.top})}this.setHighlightedNode(e[0],t)}}getNodeByValue(t){return this.getCandidateNodes().find(o=>o.dataset.value===t)??null}getLabelForValue(t){if(t==="")return"";const e=this.opts.items.current.find(n=>n.value===t)?.label;if(e!==void 0)return e;const o=this.getNodeByValue(t);if(o){const n=o.getAttribute("data-label");return n!==null&&n!==""?n:o.textContent?.trim()??t}return t}setOpen(t){this.opts.open.current=t}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}}Pt=new WeakMap,St=new WeakMap,_t=new WeakMap,xt=new WeakMap,kt=new WeakMap,Ht=new WeakMap,Tt=new WeakMap,At=new WeakMap,Mt=new WeakMap,Ot=new WeakMap,Et=new WeakMap,Rt=new WeakMap;var Vt,Kt,Ft,Dt;class zr extends or{constructor(e){super(e);u(this,"opts");u(this,"isMulti",!1);d(this,Vt,c(()=>this.opts.value.current!==""));d(this,Kt,c(()=>this.opts.items.current.length?this.opts.items.current.find(e=>e.value===this.opts.value.current)?.label??"":""));d(this,Ft,c(()=>this.opts.items.current.length?this.opts.items.current.filter(o=>!o.disabled).map(o=>o.label):[]));d(this,Dt,c(()=>!(this.isMulti||this.opts.items.current.length===0)));this.opts=e,qe(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),at(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return i(r(this,Vt))}set hasValue(e){v(r(this,Vt),e)}get currentLabel(){return i(r(this,Kt))}set currentLabel(e){v(r(this,Kt),e)}get candidateLabels(){return i(r(this,Ft))}set candidateLabels(e){v(r(this,Ft),e)}get dataTypeaheadEnabled(){return i(r(this,Dt))}set dataTypeaheadEnabled(e){v(r(this,Dt),e)}includesItem(e){return this.opts.value.current===e}toggleItem(e,o=e){const n=this.includesItem(e)?"":e;this.opts.value.current=n,n!==""&&(this.opts.inputValue.current=o)}setInitialHighlightedNode(){Ze(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==""){const e=this.getNodeByValue(this.opts.value.current);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}Vt=new WeakMap,Kt=new WeakMap,Ft=new WeakMap,Dt=new WeakMap;var Bt;class Jr extends or{constructor(e){super(e);u(this,"opts");u(this,"isMulti",!0);d(this,Bt,c(()=>this.opts.value.current.length>0));this.opts=e,qe(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),at(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return i(r(this,Bt))}set hasValue(e){v(r(this,Bt),e)}includesItem(e){return this.opts.value.current.includes(e)}toggleItem(e,o=e){this.includesItem(e)?this.opts.value.current=this.opts.value.current.filter(n=>n!==e):this.opts.value.current=[...this.opts.value.current,e],this.opts.inputValue.current=o}setInitialHighlightedNode(){Ze(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const e=this.getNodeByValue(this.opts.value.current[0]);if(e){this.setHighlightedNode(e,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}Bt=new WeakMap;class vo{static create(t){const{type:e,...o}=t,n=e==="single"?new zr(o):new Jr(o);return dt.set(n)}}var Lt;const xe=class xe{constructor(t,e){u(this,"opts");u(this,"root");u(this,"attachment");d(this,Lt,c(()=>({id:this.opts.id.current,role:"combobox",disabled:this.root.opts.disabled.current?!0:void 0,"aria-activedescendant":this.root.highlightedId,"aria-autocomplete":"list","aria-expanded":Qe(this.root.opts.open.current),"data-state":_e(this.root.opts.open.current),"data-disabled":Se(this.root.opts.disabled.current),onkeydown:this.onkeydown,oninput:this.oninput,[this.root.getBitsAttr("input")]:"",...this.attachment})));this.opts=t,this.root=e,this.attachment=lt(t.ref,o=>this.root.inputNode=o),this.root.domContext=new ce(t.ref),this.onkeydown=this.onkeydown.bind(this),this.oninput=this.oninput.bind(this),at([()=>this.root.opts.value.current,()=>this.opts.clearOnDeselect.current],([o,n],[a])=>{n&&(Array.isArray(o)&&Array.isArray(a)?o.length===0&&a.length!==0&&(this.root.opts.inputValue.current=""):o===""&&a!==""&&(this.root.opts.inputValue.current=""))})}static create(t){return new xe(t,dt.get())}onkeydown(t){if(this.root.isUsingKeyboard=!0,t.key!==je){if((t.key===q||t.key===tt)&&t.preventDefault(),!this.root.opts.open.current){if(Ke.includes(t.key)||t.key===ne||t.key===Br&&this.root.opts.inputValue.current===""||(this.root.handleOpen(),this.root.hasValue))return;const e=this.root.getCandidateNodes();if(!e.length)return;if(t.key===tt){const o=e[0];this.root.setHighlightedNode(o)}else if(t.key===q){const o=e[e.length-1];this.root.setHighlightedNode(o)}return}if(t.key===ne){this.root.handleClose();return}if(t.key===ie&&!t.isComposing){t.preventDefault();const e=this.root.highlightedValue===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&e&&!this.root.isMulti){this.root.handleClose();return}this.root.highlightedValue&&this.root.highlightedNode&&this.root.highlightedNode.isConnected&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!e&&this.root.handleClose()}if(t.key===q&&t.altKey&&this.root.handleClose(),tr.includes(t.key)){t.preventDefault();const e=this.root.getCandidateNodes(),o=this.root.highlightedNode,n=o?e.indexOf(o):-1,a=this.root.opts.loop.current;let h;if(t.key===tt?h=Ge(e,n,a):t.key===q?h=Ye(e,n,a):t.key===Ie?h=ze(e,n,10,a):t.key===we?h=Je(e,n,10,a):t.key===Ce?h=e[0]:t.key===Pe&&(h=e[e.length-1]),!h)return;this.root.setHighlightedNode(h);return}Ke.includes(t.key)||this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}oninput(t){this.root.opts.inputValue.current=t.currentTarget.value,this.root.setHighlightedToFirstCandidate()}get props(){return i(r(this,Lt))}set props(t){v(r(this,Lt),t)}};Lt=new WeakMap;let Fe=xe;var ht,pt,G,sr,fe,ve,Ut;const ke=class ke{constructor(t,e){d(this,G);u(this,"opts");u(this,"root");u(this,"attachment");d(this,ht);d(this,pt);d(this,Ut,c(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":Qe(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":_e(this.root.opts.open.current),"data-disabled":Se(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.getBitsAttr("trigger")]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment})));this.opts=t,this.root=e,this.attachment=lt(t.ref,o=>this.root.triggerNode=o),this.root.domContext=new ce(t.ref),ut(this,ht,new gr({getCurrentItem:()=>this.root.highlightedNode,onMatch:o=>{this.root.setHighlightedNode(o)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()})),ut(this,pt,new Wr({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:o=>{if(this.root.isMulti||!this.root.opts.items.current)return;const n=this.root.opts.items.current.find(a=>a.label===o);n&&(this.root.opts.value.current=n.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()})),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}static create(t){return new ke(t,dt.get())}onkeydown(t){if(this.root.isUsingKeyboard=!0,(t.key===q||t.key===tt)&&t.preventDefault(),!this.root.opts.open.current){if(t.key===ie||t.key===ge||t.key===tt||t.key===q)t.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){r(this,pt).handleTypeaheadSearch(t.key);return}if(this.root.hasValue)return;const h=this.root.getCandidateNodes();if(!h.length)return;if(t.key===tt){const b=h[0];this.root.setHighlightedNode(b)}else if(t.key===q){const b=h[h.length-1];this.root.setHighlightedNode(b)}return}if(t.key===ne){this.root.handleClose();return}if((t.key===ie||t.key===ge&&r(this,ht).search==="")&&!t.isComposing&&(t.preventDefault(),ct(this,G,ve).call(this)))return;if(t.key===q&&t.altKey&&this.root.handleClose(),tr.includes(t.key)){t.preventDefault();const h=this.root.getCandidateNodes(),b=this.root.highlightedNode,C=b?h.indexOf(b):-1,f=this.root.opts.loop.current;let y;if(t.key===tt?y=Ge(h,C,f):t.key===q?y=Ye(h,C,f):t.key===Ie?y=ze(h,C,10,f):t.key===we?y=Je(h,C,10,f):t.key===Ce?y=h[0]:t.key===Pe&&(y=h[h.length-1]),!y)return;this.root.setHighlightedNode(y);return}const e=t.ctrlKey||t.altKey||t.metaKey,o=t.key.length===1,n=t.key===ge,a=this.root.getCandidateNodes();if(t.key!==ne){if(!e&&(o||n)){!r(this,ht).handleTypeaheadSearch(t.key,a)&&n&&(t.preventDefault(),ct(this,G,ve).call(this));return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(t){t.currentTarget.focus()}onpointerdown(t){if(this.root.opts.disabled.current)return;if(t.pointerType==="touch")return t.preventDefault();const e=t.target;e?.hasPointerCapture(t.pointerId)&&e?.releasePointerCapture(t.pointerId),t.button===0&&t.ctrlKey===!1&&(this.root.opts.open.current===!1?ct(this,G,fe).call(this,t):this.root.handleClose())}onpointerup(t){this.root.opts.disabled.current||(t.preventDefault(),t.pointerType==="touch"&&(this.root.opts.open.current===!1?ct(this,G,fe).call(this,t):this.root.handleClose()))}get props(){return i(r(this,Ut))}set props(t){v(r(this,Ut),t)}};ht=new WeakMap,pt=new WeakMap,G=new WeakSet,sr=function(){this.root.opts.open.current=!0,r(this,pt).resetTypeahead(),r(this,ht).resetTypeahead()},fe=function(t){ct(this,G,sr).call(this)},ve=function(){const t=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!t?(this.root.handleClose(),!0):!1)},Ut=new WeakMap;let De=ke;var Wt,le,qt,Gt;const He=class He{constructor(t,e){u(this,"opts");u(this,"root");u(this,"attachment");d(this,Wt,V(!1));u(this,"domContext");d(this,le,c(()=>mr(this.root.isCombobox?"combobox":"select")));u(this,"onInteractOutside",t=>{if(t.target===this.root.triggerNode||t.target===this.root.inputNode){t.preventDefault();return}this.opts.onInteractOutside.current(t),!t.defaultPrevented&&this.root.handleClose()});u(this,"onEscapeKeydown",t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()});u(this,"onOpenAutoFocus",t=>{t.preventDefault()});u(this,"onCloseAutoFocus",t=>{t.preventDefault()});d(this,qt,c(()=>({open:this.root.opts.open.current})));d(this,Gt,c(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":_e(this.root.opts.open.current),...yr(this.root.contentPresence.transitionStatus),[this.root.getBitsAttr("content")]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...i(r(this,le))},onpointermove:this.onpointermove,...this.attachment})));u(this,"popperProps",{onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.root.contentIsPositioned=!0,this.isPositioned=!0)}});this.opts=t,this.root=e,this.attachment=lt(t.ref,o=>this.root.contentNode=o),this.domContext=new ce(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),vr(()=>{this.root.contentNode=null,this.root.contentIsPositioned=!1,this.isPositioned=!1}),at(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.root.contentIsPositioned=!1,this.isPositioned=!1)}),at([()=>this.isPositioned,()=>this.root.highlightedNode],()=>{!this.isPositioned||!this.root.highlightedNode||this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode)}),this.onpointermove=this.onpointermove.bind(this)}static create(t){return rr.set(new He(t,dt.get()))}get isPositioned(){return i(r(this,Wt))}set isPositioned(t){v(r(this,Wt),t,!0)}onpointermove(t){this.root.isUsingKeyboard=!1}get shouldRender(){return this.root.contentPresence.shouldRender}get snippetProps(){return i(r(this,qt))}set snippetProps(t){v(r(this,qt),t)}get props(){return i(r(this,Gt))}set props(t){v(r(this,Gt),t)}};Wt=new WeakMap,le=new WeakMap,qt=new WeakMap,Gt=new WeakMap;let he=He;var Yt,zt,Jt,Qt,Zt;const Te=class Te{constructor(t,e){u(this,"opts");u(this,"root");u(this,"attachment");d(this,Yt,c(()=>this.root.includesItem(this.opts.value.current)));d(this,zt,c(()=>this.root.highlightedValue===this.opts.value.current));u(this,"prevHighlighted",new Ur(()=>this.isHighlighted));d(this,Jt,V(!1));d(this,Qt,c(()=>({selected:this.isSelected,highlighted:this.isHighlighted})));d(this,Zt,c(()=>({id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":Se(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem(this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment})));this.opts=t,this.root=e,this.attachment=lt(t.ref),at([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),at(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}static create(t){return new Te(t,dt.get())}get isSelected(){return i(r(this,Yt))}set isSelected(t){v(r(this,Yt),t)}get isHighlighted(){return i(r(this,zt))}set isHighlighted(t){v(r(this,zt),t)}get mounted(){return i(r(this,Jt))}set mounted(t){v(r(this,Jt),t,!0)}handleSelect(){if(this.opts.disabled.current)return;const t=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!t&&this.root.handleClose()}get snippetProps(){return i(r(this,Qt))}set snippetProps(t){v(r(this,Qt),t)}onpointerdown(t){t.preventDefault()}onpointerup(t){if(!(t.defaultPrevented||!this.opts.ref.current)){if(t.pointerType==="touch"&&!fr){ar(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}t.preventDefault(),this.handleSelect(),t.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(t){t.pointerType!=="touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}get props(){return i(r(this,Zt))}set props(t){v(r(this,Zt),t)}};Yt=new WeakMap,zt=new WeakMap,Jt=new WeakMap,Qt=new WeakMap,Zt=new WeakMap;let me=Te;var jt,Xt;const Ae=class Ae{constructor(t,e){u(this,"opts");u(this,"root");d(this,jt,V(null));u(this,"attachment");d(this,Xt,c(()=>({id:this.opts.id.current,role:"group",[this.root.getBitsAttr("group")]:"","aria-labelledby":this.labelNode?.id??void 0,...this.attachment})));this.opts=t,this.root=e,this.attachment=lt(t.ref)}static create(t){return er.set(new Ae(t,dt.get()))}get labelNode(){return i(r(this,jt))}set labelNode(t){v(r(this,jt),t,!0)}get props(){return i(r(this,Xt))}set props(t){v(r(this,Xt),t)}};jt=new WeakMap,Xt=new WeakMap;let Be=Ae;var $t;const Me=class Me{constructor(t,e){u(this,"opts");u(this,"group");u(this,"attachment");d(this,$t,c(()=>({id:this.opts.id.current,[this.group.root.getBitsAttr("group-label")]:"",...this.attachment})));this.opts=t,this.group=e,this.attachment=lt(t.ref,o=>this.group.labelNode=o)}static create(t){return new Me(t,er.get())}get props(){return i(r(this,$t))}set props(t){v(r(this,$t),t)}};$t=new WeakMap;let Le=Me;var te,ee;const Oe=class Oe{constructor(t,e){u(this,"opts");u(this,"root");d(this,te,c(()=>this.root.opts.name.current!==""));d(this,ee,c(()=>({disabled:Ve(this.root.opts.disabled.current),required:Ve(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus})));this.opts=t,this.root=e,this.onfocus=this.onfocus.bind(this)}static create(t){return new Oe(t,dt.get())}get shouldRender(){return i(r(this,te))}set shouldRender(t){v(r(this,te),t)}onfocus(t){t.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}get props(){return i(r(this,ee))}set props(t){v(r(this,ee),t)}};te=new WeakMap,ee=new WeakMap;let ye=Oe;var re,oe;const Ee=class Ee{constructor(t,e){u(this,"opts");u(this,"content");u(this,"root");u(this,"attachment");d(this,re,V(0));d(this,oe,c(()=>({id:this.opts.id.current,role:"presentation",[this.root.getBitsAttr("viewport")]:"",style:{position:"relative",flex:1,overflow:"auto"},...this.attachment})));this.opts=t,this.content=e,this.root=e.root,this.attachment=lt(t.ref,o=>{this.root.viewportNode=o})}static create(t){return new Ee(t,rr.get())}get prevScrollTop(){return i(r(this,re))}set prevScrollTop(t){v(r(this,re),t,!0)}get props(){return i(r(this,oe))}set props(t){v(r(this,oe),t)}};re=new WeakMap,oe=new WeakMap;let be=Ee;function Qr(l,t){if(new.target)return ft({component:Qr,...l});yt(t,!0);let e=p(t,"value",15),o=p(t,"autocomplete",7);const n=ye.create({value:k(()=>e())});var a={get value(){return e()},set value(f){e(f),g()},get autocomplete(){return o()},set autocomplete(f){o(f),g()},$set:vt,$on:(f,y)=>mt(t,f,y)},h=E(),b=O(h);{var C=f=>{ur(f,Ct(()=>n.props,{get autocomplete(){return o()},get value(){return e()},set value(y){e(y)}}))};Z(b,f=>{n.shouldRender&&f(C)})}return S(l,h),bt(a)}var Zr=new Set(["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]),Ue=se("<div><div><!></div></div>");function jr(l,t){const e=ue();if(new.target)return ft({component:jr,...l});yt(t,!0);let o=p(t,"id",23,()=>ot(e)),n=p(t,"ref",15,null),a=p(t,"forceMount",7,!1),h=p(t,"side",7,"bottom"),b=p(t,"onInteractOutside",7,R),C=p(t,"onEscapeKeydown",7,R),f=p(t,"children",7),y=p(t,"child",7),M=p(t,"preventScroll",7,!1),W=p(t,"style",7),w=de(t,Zr);const I=he.create({id:k(()=>o()),ref:k(()=>n(),s=>n(s)),onInteractOutside:k(()=>b()),onEscapeKeydown:k(()=>C())}),N=c(()=>rt(w,I.props));var H={get id(){return o()},set id(s=ot(e)){o(s),g()},get ref(){return n()},set ref(s=null){n(s),g()},get forceMount(){return a()},set forceMount(s=!1){a(s),g()},get side(){return h()},set side(s="bottom"){h(s),g()},get onInteractOutside(){return b()},set onInteractOutside(s=R){b(s),g()},get onEscapeKeydown(){return C()},set onEscapeKeydown(s=R){C(s),g()},get children(){return f()},set children(s){f(s),g()},get child(){return y()},set child(s){y(s),g()},get preventScroll(){return M()},set preventScroll(s=!1){M(s),g()},get style(){return W()},set style(s){W(s),g()},$set:vt,$on:(s,T)=>mt(t,s,T)},F=E(),Nt=O(F);{var wt=s=>{Xe(s,Ct(()=>i(N),()=>I.popperProps,{get ref(){return I.opts.ref},get side(){return h()},get enabled(){return I.root.opts.open.current},get id(){return o()},get preventScroll(){return M()},forceMount:!0,get shouldRender(){return I.shouldRender},popper:(D,B)=>{let Y=()=>(B?.()).props,L=()=>(B?.()).wrapperProps;const z=c(()=>rt(Y(),{style:I.props.style},{style:W()}));var J=E(),st=O(J);{var A=P=>{var x=E(),U=O(x);{let it=c(()=>({props:i(z),wrapperProps:L(),...I.snippetProps}));K(U,y,()=>i(it))}S(P,x)},_=P=>{var x=Ue();et(x,()=>({...L()}));var U=X(x);et(U,()=>({...i(z)}));var it=X(U);K(it,()=>f()??gt),$(U),$(x),S(P,x)};Z(st,P=>{y()?P(A):P(_,-1)})}S(D,J)},$$slots:{popper:!0}}))},m=s=>{$e(s,Ct(()=>i(N),()=>I.popperProps,{get ref(){return I.opts.ref},get side(){return h()},get open(){return I.root.opts.open.current},get id(){return o()},get preventScroll(){return M()},forceMount:!1,get shouldRender(){return I.shouldRender},popper:(D,B)=>{let Y=()=>(B?.()).props,L=()=>(B?.()).wrapperProps;const z=c(()=>rt(Y(),{style:I.props.style},{style:W()}));var J=E(),st=O(J);{var A=P=>{var x=E(),U=O(x);{let it=c(()=>({props:i(z),wrapperProps:L(),...I.snippetProps}));K(U,y,()=>i(it))}S(P,x)},_=P=>{var x=Ue();et(x,()=>({...L()}));var U=X(x);et(U,()=>({...i(z)}));var it=X(U);K(it,()=>f()??gt),$(U),$(x),S(P,x)};Z(st,P=>{y()?P(A):P(_,-1)})}S(D,J)},$$slots:{popper:!0}}))};Z(Nt,s=>{a()?s(wt):a()||s(m,1)})}return S(l,F),bt(H)}var Xr=new Set(["$$slots","$$events","$$legacy","id","ref","forceMount","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]),We=se("<div><!></div>");function $r(l,t){const e=ue();if(new.target)return ft({component:$r,...l});yt(t,!0);let o=p(t,"id",23,()=>ot(e)),n=p(t,"ref",15,null),a=p(t,"forceMount",7,!1),h=p(t,"onInteractOutside",7,R),b=p(t,"onEscapeKeydown",7,R),C=p(t,"children",7),f=p(t,"child",7),y=p(t,"preventScroll",7,!1),M=p(t,"style",7),W=de(t,Xr);const w=he.create({id:k(()=>o()),ref:k(()=>n(),m=>n(m)),onInteractOutside:k(()=>h()),onEscapeKeydown:k(()=>b())}),I=c(()=>rt(W,w.props));var N={get id(){return o()},set id(m=ot(e)){o(m),g()},get ref(){return n()},set ref(m=null){n(m),g()},get forceMount(){return a()},set forceMount(m=!1){a(m),g()},get onInteractOutside(){return h()},set onInteractOutside(m=R){h(m),g()},get onEscapeKeydown(){return b()},set onEscapeKeydown(m=R){b(m),g()},get children(){return C()},set children(m){C(m),g()},get child(){return f()},set child(m){f(m),g()},get preventScroll(){return y()},set preventScroll(m=!1){y(m),g()},get style(){return M()},set style(m){M(m),g()},$set:vt,$on:(m,s)=>mt(t,m,s)},H=E(),F=O(H);{var Nt=m=>{Xe(m,Ct(()=>i(I),()=>w.popperProps,{get ref(){return w.opts.ref},isStatic:!0,get enabled(){return w.root.opts.open.current},get id(){return o()},get preventScroll(){return y()},forceMount:!0,get shouldRender(){return w.shouldRender},popper:(T,D)=>{let B=()=>(D?.()).props;const Y=c(()=>rt(B(),{style:w.props.style},{style:M()}));var L=E(),z=O(L);{var J=A=>{var _=E(),P=O(_);{let x=c(()=>({props:i(Y),...w.snippetProps}));K(P,f,()=>i(x))}S(A,_)},st=A=>{var _=We();et(_,()=>({...i(Y)}));var P=X(_);K(P,()=>C()??gt),$(_),S(A,_)};Z(z,A=>{f()?A(J):A(st,-1)})}S(T,L)},$$slots:{popper:!0}}))},wt=m=>{$e(m,Ct(()=>i(I),()=>w.popperProps,{get ref(){return w.opts.ref},isStatic:!0,get open(){return w.root.opts.open.current},get id(){return o()},get preventScroll(){return y()},forceMount:!1,get shouldRender(){return w.shouldRender},popper:(T,D)=>{let B=()=>(D?.()).props;const Y=c(()=>rt(B(),{style:w.props.style},{style:M()}));var L=E(),z=O(L);{var J=A=>{var _=E(),P=O(_);{let x=c(()=>({props:i(Y),...w.snippetProps}));K(P,f,()=>i(x))}S(A,_)},st=A=>{var _=We();et(_,()=>({...i(Y)}));var P=X(_);K(P,()=>C()??gt),$(_),S(A,_)};Z(z,A=>{f()?A(J):A(st,-1)})}S(T,L)},$$slots:{popper:!0}}))};Z(F,m=>{a()?m(Nt):a()||m(wt,1)})}return S(l,H),bt(N)}function ir(l,t){if(new.target)return ft({component:ir,...l});yt(t,!0);let e=p(t,"mounted",15,!1),o=p(t,"onMountedChange",7,R);Lr(()=>(e(!0),o()(!0),()=>{e(!1),o()(!1)}));var n={get mounted(){return e()},set mounted(a=!1){e(a),g()},get onMountedChange(){return o()},set onMountedChange(a=R){o(a),g()},$set:vt,$on:(a,h)=>mt(t,a,h)};return bt(n)}var to=new Set(["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]),eo=se("<div><!></div>"),ro=se("<!> <!>",1);function oo(l,t){const e=ue();if(new.target)return ft({component:oo,...l});yt(t,!0);let o=p(t,"id",23,()=>ot(e)),n=p(t,"ref",15,null),a=p(t,"value",7),h=p(t,"label",23,a),b=p(t,"disabled",7,!1),C=p(t,"children",7),f=p(t,"child",7),y=p(t,"onHighlight",7,R),M=p(t,"onUnhighlight",7,R),W=de(t,to);const w=me.create({id:k(()=>o()),ref:k(()=>n(),s=>n(s)),value:k(()=>a()),disabled:k(()=>b()),label:k(()=>h()),onHighlight:k(()=>y()),onUnhighlight:k(()=>M())}),I=c(()=>rt(W,w.props));var N={get id(){return o()},set id(s=ot(e)){o(s),g()},get ref(){return n()},set ref(s=null){n(s),g()},get value(){return a()},set value(s){a(s),g()},get label(){return h()},set label(s=a){h(s),g()},get disabled(){return b()},set disabled(s=!1){b(s),g()},get children(){return C()},set children(s){C(s),g()},get child(){return f()},set child(s){f(s),g()},get onHighlight(){return y()},set onHighlight(s=R){y(s),g()},get onUnhighlight(){return M()},set onUnhighlight(s=R){M(s),g()},$set:vt,$on:(s,T)=>mt(t,s,T)},H=ro(),F=O(H);{var Nt=s=>{var T=E(),D=O(T);{let B=c(()=>({props:i(I),...w.snippetProps}));K(D,f,()=>i(B))}S(s,T)},wt=s=>{var T=eo();et(T,()=>({...i(I)}));var D=X(T);K(D,()=>C()??gt,()=>w.snippetProps),$(T),S(s,T)};Z(F,s=>{f()?s(Nt):s(wt,-1)})}var m=dr(F,2);return ir(m,{get mounted(){return w.mounted},set mounted(s){w.mounted=s}}),S(l,H),bt(N)}var so=new Set(["$$slots","$$events","$$legacy","id","ref","children","child"]),io=se("<div><!></div>");function no(l,t){const e=ue();if(new.target)return ft({component:no,...l});yt(t,!0);let o=p(t,"id",23,()=>ot(e)),n=p(t,"ref",15,null),a=p(t,"children",7),h=p(t,"child",7),b=de(t,so);const C=be.create({id:k(()=>o()),ref:k(()=>n(),N=>n(N))}),f=c(()=>rt(b,C.props));var y={get id(){return o()},set id(N=ot(e)){o(N),g()},get ref(){return n()},set ref(N=null){n(N),g()},get children(){return a()},set children(N){a(N),g()},get child(){return h()},set child(N){h(N),g()},$set:vt,$on:(N,H)=>mt(t,N,H)},M=E(),W=O(M);{var w=N=>{var H=E(),F=O(H);K(F,h,()=>({props:i(f)})),S(N,H)},I=N=>{var H=io();et(H,()=>({...i(f)}));var F=X(H);K(F,()=>a()??gt),$(H),S(N,H)};Z(W,N=>{h()?N(w):N(I,-1)})}return S(l,M),bt(y)}export{Le as S,Be as a,Fe as b,vo as c,De as d,jr as e,$r as f,Qr as g,oo as h,no as i};
@@ -1 +1 @@
1
- import{t as g,bo as n,br as v,bw as b,bp as h,b as x}from"./Fcr7AvC-.js";import{bs as w,a7 as S,ay as y,aD as _,W as k,bn as z,aA as i,c9 as C}from"./3SdAC2_C.js";import{c as A}from"./2z64ELW5.js";import{e as I,p as M}from"./BRCr02in.js";import{S as P}from"./DWjpzYNk.js";var W=new Set(["$$slots","$$events","$$legacy","ref","class","data-slot"]);function D(l,t){if(new.target)return g({component:D,...l});w(t,!0);let a=n(t,"ref",15,null),r=n(t,"class",7),s=n(t,"data-slot",7,"separator"),c=h(t,W);var m={get ref(){return a()},set ref(e=null){a(e),i()},get class(){return r()},set class(e){r(e),i()},get"data-slot"(){return s()},set"data-slot"(e="separator"){s(e),i()},$set:b,$on:(e,o)=>x(t,e,o)},p=S(),d=y(p);{let e=C(()=>I("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",r()));A(d,()=>P,(o,u)=>{u(o,v({get"data-slot"(){return s()},get class(){return _(e)}},()=>c,{get ref(){return a()},set ref(f){a(f)}}))})}return k(l,p),z(m)}const F=[{id:"separator-state-matrix",title:"Separator states",states:["horizontal","vertical","decorative","semantic","compact","zoom-200","light","dark"],themes:["light","dark","high-contrast"],viewport:"both"}];M({id:"separator",source:"src/lib/components/ui/separator/separator.svelte",publicImport:"$lib/components/ui/separator",legacyImports:["$lib/components/ui/separator/index.js"],exports:["Root","Separator","separatorMetadata"],category:"primitive",owner:"design-system",callers:["src/features/discussions/components/DiscussionMentionPicker.svelte","src/features/home/HomeAssistantThreads.svelte","src/features/workspace-sharing/components/WorkspaceSharingSetup.svelte","src/lib/component-catalog/renderers/ContentFieldCatalogPreview.svelte","src/lib/components/file-explorer/file-explorer-layout.svelte","src/lib/components/ui/sidebar/sidebar-separator.svelte","src/lib/components/workspace/WorkspaceAgentsList.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/separator/separator.test.ts",removalGate:"Retain while exported and orientation, semantic, and fixture tests pass.",dynamicImports:[],fixtures:F});export{D as S};
1
+ import{t as g,bo as n,br as v,bw as b,bp as h,b as x}from"./Fcr7AvC-.js";import{bs as w,a7 as S,ay as y,aD as _,W as k,bn as z,aA as i,c9 as C}from"./3SdAC2_C.js";import{c as A}from"./2z64ELW5.js";import{e as I,p as M}from"./BRCr02in.js";import{S as P}from"./CqVeTPQI.js";var W=new Set(["$$slots","$$events","$$legacy","ref","class","data-slot"]);function D(l,t){if(new.target)return g({component:D,...l});w(t,!0);let a=n(t,"ref",15,null),r=n(t,"class",7),s=n(t,"data-slot",7,"separator"),c=h(t,W);var m={get ref(){return a()},set ref(e=null){a(e),i()},get class(){return r()},set class(e){r(e),i()},get"data-slot"(){return s()},set"data-slot"(e="separator"){s(e),i()},$set:b,$on:(e,o)=>x(t,e,o)},p=S(),d=y(p);{let e=C(()=>I("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",r()));A(d,()=>P,(o,u)=>{u(o,v({get"data-slot"(){return s()},get class(){return _(e)}},()=>c,{get ref(){return a()},set ref(f){a(f)}}))})}return k(l,p),z(m)}const F=[{id:"separator-state-matrix",title:"Separator states",states:["horizontal","vertical","decorative","semantic","compact","zoom-200","light","dark"],themes:["light","dark","high-contrast"],viewport:"both"}];M({id:"separator",source:"src/lib/components/ui/separator/separator.svelte",publicImport:"$lib/components/ui/separator",legacyImports:["$lib/components/ui/separator/index.js"],exports:["Root","Separator","separatorMetadata"],category:"primitive",owner:"design-system",callers:["src/features/discussions/components/DiscussionMentionPicker.svelte","src/features/home/HomeAssistantThreads.svelte","src/features/workspace-sharing/components/WorkspaceSharingSetup.svelte","src/lib/component-catalog/renderers/ContentFieldCatalogPreview.svelte","src/lib/components/file-explorer/file-explorer-layout.svelte","src/lib/components/ui/sidebar/sidebar-separator.svelte","src/lib/components/workspace/WorkspaceAgentsList.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/separator/separator.test.ts",removalGate:"Retain while exported and orientation, semantic, and fixture tests pass.",dynamicImports:[],fixtures:F});export{D as S};
@@ -1 +1 @@
1
- import{t as bt,bo as x,bw as wt,bq as Rt,b as It,bs as g}from"./Fcr7AvC-.js";import{bs as Pt,ca as I,aD as t,c9 as s,bn as kt,bH as E,bV as M,aA as F}from"./3SdAC2_C.js";import{b as vt}from"./Dn334wJv.js";import{JH as l,eK as Ut,eL as At,t6 as Bt,op as xt,oq as Ft,Kf as Tt,Ku as Lt,Kk as _t,ou as T}from"./D0qhIm1r.js";import{t as Dt}from"./C-BsEdGZ.js";import{g as Wt}from"./DWGXN6Nr.js";import{dI as Gt,bO as Nt,bQ as Et,bN as Mt,bS as Vt,de as Ht,m as Kt}from"./cD292w1o.js";import{C as qt}from"./RsYrgUiV.js";import{V as zt}from"./CDtaIFAl.js";import{bT as Jt,bN as Ot,b8 as Qt}from"./BMHxxfP4.js";import{i as L,n as V}from"./H2jLkRRS.js";import{af as jt}from"./DLGucGdD.js";function Xt(_,$){if(new.target)return bt({component:Xt,..._});Pt($,!0);const H=()=>g(at,"$gitRoots$",c),y=()=>g(ot,"$workspace",c),K=()=>g(nt,"$ftCommits$",c),q=()=>g(lt,"$rootGitRoots$",c),S=()=>g(st,"$ftChanges$",c),z=()=>g(tt,"$foldUnchanged",c),J=()=>g(Z,"$lineWrapping",c),O=()=>g(et,"$diffSideBySide",c),Q=()=>g(rt,"$ftLoading$",c),j=()=>g(it,"$ftBoundarySha$",c),[c,X]=Rt(),Y=o=>{zt(o,{embedded:!0,showExpand:!0,get expanded(){return t(w)},onToggleExpand:()=>{E(w,!t(w)),t(w)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return z()},onToggleFold:()=>l.dispatch(_t()),get wrapEnabled(){return J()},onToggleWrap:()=>l.dispatch(Lt()),get splitEnabled(){return O()},onToggleSplit:()=>l.dispatch(Tt())})},Z=Jt(),tt=Ot(),et=Qt();let P=x($,"tab",7),m=x($,"workspaceId",7),C=x($,"isActive",7);const D=Wt(),p=Dt(()=>m()),ot=Gt(p);I(()=>{const o=m();if(!(!C()||!o||t(n)))return l.dispatch(Ut(o,"all")),()=>l.dispatch(At(o,"all"))});const n=s(()=>P().data?.gitRootId||""),at=jt(p),b=s(()=>H().find(o=>o.id===t(n))),h=s(()=>y()?.worktreePath||y()?.repositoryPath||""),k=s(()=>t(b)?.path||t(h)),st=Nt(p),nt=Et(p),it=Mt(p),rt=Vt(p),dt=s(()=>K()||[]),lt=Ht(p),f=s(()=>q()[t(n)]??Kt),ct=s(()=>t(f).status),gt=s(()=>t(f).loading),mt=s(()=>t(f).commitFiles),ut=s(()=>{const o=t(b)?.registeredCommitSha,i=o?t(f).commits.findIndex(e=>e.hash===o):-1;return i>=0?t(f).commits.slice(0,i):t(f).commits});I(()=>{const o=m(),i=t(n);o&&i&&l.dispatch(Bt(o,i,t(b)?.registeredCommitSha,100))});let w=M(!0),R=M(null);const pt=s(()=>{if(t(n))return[...(t(ct)?.files??[]).map(e=>({filePath:`${t(k)}/${e.path}`,action:"modify",additions:e.additions??0,deletions:e.deletions??0,toolName:"local",toolCallId:`root-${t(n)}-${e.staged}-${e.path}`,staged:e.staged,category:e.staged?"staged":"unstaged"})),...t(ut).flatMap(e=>(t(mt)[e.hash]??[]).map(a=>({filePath:`${t(k)}/${a.path}`,action:"modify",additions:a.additions??0,deletions:a.deletions??0,toolName:"local",toolCallId:`root-commit-${e.hash}-${a.path}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message})))];const o=S().filter(e=>e.stage==="unstaged"),i=S().filter(e=>e.stage==="staged");return[...o.map(e=>{const a=e.file||e.relativePath,r=a&&L(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-unstaged-${r}`,staged:!1,category:"unstaged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...i.map(e=>{const a=e.file||e.relativePath,r=a&&L(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-staged-${r}`,staged:!0,category:"staged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...t(dt).flatMap(e=>(e.files||[]).map(a=>{const r=typeof a=="string"?a:a.path||"",U=r&&L(r)?r:`${t(h)}/${r}`,A=typeof a=="string"?0:a.additions||0,B=typeof a=="string"?0:a.deletions||0;return{filePath:U,action:"modify",additions:A,deletions:B,toolName:"local",toolCallId:`commit-${e.hash}-${r}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message}}))]});function v(o){if(!t(h))return o;const i=V(o),e=V(t(h));return i.startsWith(`${e}/`)?i.slice(e.length+1):o}function W(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"stage",paths:o.map(v),source:"localChanges"}))}function G(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"unstage",paths:o.map(v),source:"localChanges"}))}function ht(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"discard",paths:o.map(v),source:"localChanges"}))}I(()=>{!D||!C()||D.registerActions({display:Y})});const N=crypto.randomUUID();I(()=>{const o=m();if(!(!(C()&&t(n))||!o))return l.dispatch(xt(o,N)),()=>l.dispatch(Ft(o,N))});var ft={get tab(){return P()},set tab(o){P(o),F()},get workspaceId(){return m()},set workspaceId(o){m(o),F()},get isActive(){return C()},set isActive(o){C(o),F()},$set:wt,$on:(o,i)=>It($,o,i)};{let o=s(()=>t(n)?t(gt):Q()),i=s(()=>t(n)||void 0),e=s(()=>t(n)?t(k):void 0),a=s(()=>y()?.baseRef??null),r=s(()=>t(n)?t(b)?.registeredCommitSha||null:j()||y()?.baseCommitSha||null),U=s(()=>!t(n)),A=s(()=>t(n)?void 0:d=>void W([d])),B=s(()=>t(n)?void 0:d=>void G([d])),Ct=s(()=>t(n)?void 0:d=>void ht([d])),yt=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="unstaged");W(d.map(u=>u.relativePath||u.file))}),St=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="staged");G(d.map(u=>u.relativePath||u.file))});vt(qt(_,{get isLoading(){return t(o)},get changes(){return t(pt)},get gitRootId(){return t(i)},get gitRootPath(){return t(e)},get branchBaseRef(){return t(a)},get branchBaseCommitSha(){return t(r)},get showStagingControls(){return t(U)},showCategoryFilter:!0,get onStage(){return t(A)},get onUnstage(){return t(B)},get onRevert(){return t(Ct)},get onStageAll(){return t(yt)},get onUnstageAll(){return t(St)}}),d=>E(R,d,!0),()=>t(R))}var $t=kt(ft);return X(),$t}export{Xt as default};
1
+ import{t as bt,bo as x,bw as wt,bq as Rt,b as It,bs as g}from"./Fcr7AvC-.js";import{bs as Pt,ca as I,aD as t,c9 as s,bn as kt,bH as E,bV as M,aA as F}from"./3SdAC2_C.js";import{b as vt}from"./Dn334wJv.js";import{JH as l,eK as Ut,eL as At,t6 as Bt,op as xt,oq as Ft,Kf as Tt,Ku as Lt,Kk as _t,ou as T}from"./D0qhIm1r.js";import{t as Dt}from"./C-BsEdGZ.js";import{g as Wt}from"./DWGXN6Nr.js";import{dI as Gt,bO as Nt,bQ as Et,bN as Mt,bS as Vt,de as Ht,m as Kt}from"./Cq6hdiVw.js";import{C as qt}from"./Bx5_x_xs.js";import{V as zt}from"./CyZe9Esu.js";import{bT as Jt,bN as Ot,b8 as Qt}from"./D5vlW2SV.js";import{i as L,n as V}from"./H2jLkRRS.js";import{af as jt}from"./DAvgrUpQ.js";function Xt(_,$){if(new.target)return bt({component:Xt,..._});Pt($,!0);const H=()=>g(at,"$gitRoots$",c),y=()=>g(ot,"$workspace",c),K=()=>g(nt,"$ftCommits$",c),q=()=>g(lt,"$rootGitRoots$",c),S=()=>g(st,"$ftChanges$",c),z=()=>g(tt,"$foldUnchanged",c),J=()=>g(Z,"$lineWrapping",c),O=()=>g(et,"$diffSideBySide",c),Q=()=>g(rt,"$ftLoading$",c),j=()=>g(it,"$ftBoundarySha$",c),[c,X]=Rt(),Y=o=>{zt(o,{embedded:!0,showExpand:!0,get expanded(){return t(w)},onToggleExpand:()=>{E(w,!t(w)),t(w)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return z()},onToggleFold:()=>l.dispatch(_t()),get wrapEnabled(){return J()},onToggleWrap:()=>l.dispatch(Lt()),get splitEnabled(){return O()},onToggleSplit:()=>l.dispatch(Tt())})},Z=Jt(),tt=Ot(),et=Qt();let P=x($,"tab",7),m=x($,"workspaceId",7),C=x($,"isActive",7);const D=Wt(),p=Dt(()=>m()),ot=Gt(p);I(()=>{const o=m();if(!(!C()||!o||t(n)))return l.dispatch(Ut(o,"all")),()=>l.dispatch(At(o,"all"))});const n=s(()=>P().data?.gitRootId||""),at=jt(p),b=s(()=>H().find(o=>o.id===t(n))),h=s(()=>y()?.worktreePath||y()?.repositoryPath||""),k=s(()=>t(b)?.path||t(h)),st=Nt(p),nt=Et(p),it=Mt(p),rt=Vt(p),dt=s(()=>K()||[]),lt=Ht(p),f=s(()=>q()[t(n)]??Kt),ct=s(()=>t(f).status),gt=s(()=>t(f).loading),mt=s(()=>t(f).commitFiles),ut=s(()=>{const o=t(b)?.registeredCommitSha,i=o?t(f).commits.findIndex(e=>e.hash===o):-1;return i>=0?t(f).commits.slice(0,i):t(f).commits});I(()=>{const o=m(),i=t(n);o&&i&&l.dispatch(Bt(o,i,t(b)?.registeredCommitSha,100))});let w=M(!0),R=M(null);const pt=s(()=>{if(t(n))return[...(t(ct)?.files??[]).map(e=>({filePath:`${t(k)}/${e.path}`,action:"modify",additions:e.additions??0,deletions:e.deletions??0,toolName:"local",toolCallId:`root-${t(n)}-${e.staged}-${e.path}`,staged:e.staged,category:e.staged?"staged":"unstaged"})),...t(ut).flatMap(e=>(t(mt)[e.hash]??[]).map(a=>({filePath:`${t(k)}/${a.path}`,action:"modify",additions:a.additions??0,deletions:a.deletions??0,toolName:"local",toolCallId:`root-commit-${e.hash}-${a.path}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message})))];const o=S().filter(e=>e.stage==="unstaged"),i=S().filter(e=>e.stage==="staged");return[...o.map(e=>{const a=e.file||e.relativePath,r=a&&L(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-unstaged-${r}`,staged:!1,category:"unstaged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...i.map(e=>{const a=e.file||e.relativePath,r=a&&L(a)?a:`${t(h)}/${a}`;return{filePath:r,action:"modify",additions:e.stats?.additions||0,deletions:e.stats?.deletions||0,toolName:"local",toolCallId:`local-staged-${r}`,staged:!0,category:"staged",oldContent:e.content?.oldContent,newContent:e.content?.newContent,gitlink:e.gitlink}}),...t(dt).flatMap(e=>(e.files||[]).map(a=>{const r=typeof a=="string"?a:a.path||"",U=r&&L(r)?r:`${t(h)}/${r}`,A=typeof a=="string"?0:a.additions||0,B=typeof a=="string"?0:a.deletions||0;return{filePath:U,action:"modify",additions:A,deletions:B,toolName:"local",toolCallId:`commit-${e.hash}-${r}`,staged:!1,category:"committed",commitHash:e.hash,commitMessage:e.message}}))]});function v(o){if(!t(h))return o;const i=V(o),e=V(t(h));return i.startsWith(`${e}/`)?i.slice(e.length+1):o}function W(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"stage",paths:o.map(v),source:"localChanges"}))}function G(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"unstage",paths:o.map(v),source:"localChanges"}))}function ht(o){l.dispatch(T(m(),crypto.randomUUID(),{kind:"discard",paths:o.map(v),source:"localChanges"}))}I(()=>{!D||!C()||D.registerActions({display:Y})});const N=crypto.randomUUID();I(()=>{const o=m();if(!(!(C()&&t(n))||!o))return l.dispatch(xt(o,N)),()=>l.dispatch(Ft(o,N))});var ft={get tab(){return P()},set tab(o){P(o),F()},get workspaceId(){return m()},set workspaceId(o){m(o),F()},get isActive(){return C()},set isActive(o){C(o),F()},$set:wt,$on:(o,i)=>It($,o,i)};{let o=s(()=>t(n)?t(gt):Q()),i=s(()=>t(n)||void 0),e=s(()=>t(n)?t(k):void 0),a=s(()=>y()?.baseRef??null),r=s(()=>t(n)?t(b)?.registeredCommitSha||null:j()||y()?.baseCommitSha||null),U=s(()=>!t(n)),A=s(()=>t(n)?void 0:d=>void W([d])),B=s(()=>t(n)?void 0:d=>void G([d])),Ct=s(()=>t(n)?void 0:d=>void ht([d])),yt=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="unstaged");W(d.map(u=>u.relativePath||u.file))}),St=s(()=>t(n)?void 0:()=>{const d=S().filter(u=>u.stage==="staged");G(d.map(u=>u.relativePath||u.file))});vt(qt(_,{get isLoading(){return t(o)},get changes(){return t(pt)},get gitRootId(){return t(i)},get gitRootPath(){return t(e)},get branchBaseRef(){return t(a)},get branchBaseCommitSha(){return t(r)},get showStagingControls(){return t(U)},showCategoryFilter:!0,get onStage(){return t(A)},get onUnstage(){return t(B)},get onRevert(){return t(Ct)},get onStageAll(){return t(yt)},get onUnstageAll(){return t(St)}}),d=>E(R,d,!0),()=>t(R))}var $t=kt(ft);return X(),$t}export{Xt as default};
@@ -1,4 +1,4 @@
1
- import{t as Jt,bo as v,bm as F,bw as Xt,bs as Ye,bq as Zt,b as Qt}from"./Fcr7AvC-.js";import{bs as en,c5 as Je,ca as xe,aD as t,bH as H,a5 as A,bA as I,W as L,bn as tn,c9 as d,bV as ae,cd as pt,c6 as nn,aA as m,bS as O,b_ as j,bl as Xe,bO as J,aB as T,b$ as Pe,be as sn,a7 as an,ay as Ze}from"./3SdAC2_C.js";import{i as me}from"./BhYXv0ZM.js";import{g as on,i as rn}from"./CA6H1-bp.js";import{f as ln}from"./BRCr02in.js";import{f as cn}from"./CH7HNVC2.js";import{k as dn}from"./D6H34kDj.js";import{JH as Se,ol as fn,Ad as un,sI as bt,on as hn,ad as kt}from"./D0qhIm1r.js";import{b$ as gn,dI as vn}from"./cD292w1o.js";import{c as mn}from"./ChTqQfQN.js";import{c as Lt,h as He,D as pn}from"./Bttih9ri.js";import{F as wt,ba as _t}from"./ChHRVjww.js";import{f as Qe}from"./Beq_QLuz.js";import"./BAtAwQ72.js";import{S as Ie}from"./D7KhILhs.js";import{l as bn}from"./C7b3vXLD.js";import{g as kn}from"./D_jEt7ej.js";function wn(q,c,oe,Re=1){const We=Lt(q,c,oe,"","",{context:3}),re=new Set,pe=new Set,X=_n(Re)-1,De=We.split(`
1
+ import{t as Jt,bo as v,bm as F,bw as Xt,bs as Ye,bq as Zt,b as Qt}from"./Fcr7AvC-.js";import{bs as en,c5 as Je,ca as xe,aD as t,bH as H,a5 as A,bA as I,W as L,bn as tn,c9 as d,bV as ae,cd as pt,c6 as nn,aA as m,bS as O,b_ as j,bl as Xe,bO as J,aB as T,b$ as Pe,be as sn,a7 as an,ay as Ze}from"./3SdAC2_C.js";import{i as me}from"./BhYXv0ZM.js";import{g as on,i as rn}from"./CA6H1-bp.js";import{f as ln}from"./BRCr02in.js";import{f as cn}from"./CH7HNVC2.js";import{k as dn}from"./D6H34kDj.js";import{JH as Se,ol as fn,Ad as un,sI as bt,on as hn,ad as kt}from"./D0qhIm1r.js";import{b$ as gn,dI as vn}from"./Cq6hdiVw.js";import{c as mn}from"./ChTqQfQN.js";import{c as Lt,h as He,D as pn}from"./_fNgz67j.js";import{F as wt,ba as _t}from"./ChHRVjww.js";import{f as Qe}from"./D-lOH49i.js";import"./pYdPYEfN.js";import{S as Ie}from"./CBbhUF1U.js";import{l as bn}from"./C7b3vXLD.js";import{g as kn}from"./D_jEt7ej.js";function wn(q,c,oe,Re=1){const We=Lt(q,c,oe,"","",{context:3}),re=new Set,pe=new Set,X=_n(Re)-1,De=We.split(`
2
2
  `);let s=0,R=0,le=!1;for(const $ of De)if($.startsWith("@@")){le=!0;const Z=$.match(/@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);Z&&(R=parseInt(Z[1],10),s=parseInt(Z[2],10))}else le&&($.startsWith("+")?(re.add(s+X),s++):$.startsWith("-")?(pe.add(R+X),R++):$.startsWith(" ")&&(s++,R++));return{additions:re,deletions:pe}}function _n(q){return Number.isFinite(q)&&q>1?Math.floor(q):1}var Ln=T("<div><!> <!></div>"),Cn=T('<div class="diff-skeleton svelte-1f4chm"><div class="diff-skeleton-header svelte-1f4chm"><!> <!></div> <div class="diff-skeleton-content svelte-1f4chm"></div></div>'),yn=T('<div class="error-state svelte-1f4chm"><!> <span class="text-danger text-sm ml-2"> </span></div>'),xn=T('<div class="error-state svelte-1f4chm"><!> <span class="text-subtle text-sm ml-2"> </span></div>'),Pn=T('<div class="empty-state svelte-1f4chm"><span class="text-subtle text-sm"><!></span></div>'),Sn=T('<span class="icon">+</span> ',1),Hn=T('<span class="icon">−</span> ',1),In=T('<div class="selection-action-bar svelte-1f4chm"><span class="selection-info"> </span> <!> <!></div>'),Rn=T('<div class="diff-wrapper svelte-1f4chm"><!> <div class="diff-content svelte-1f4chm"><!></div></div>'),Wn=T('<div class="tracked-change-diff-viewer svelte-1f4chm"><!></div>');function Dn(q,c){if(new.target)return Jt({component:Dn,...q});en(c,!0);const oe=()=>Ye(yt,"$read$",re),Re=()=>Ye(It,"$workspace$",re),We=()=>Ye(Rt,"$workingTreeFileContentStore",re),[re,pe]=Zt(),X=mn("TrackedChangeDiffViewer"),De=2*1024*1024;let s=v(c,"change",7),R=v(c,"active",7,!0),le=v(c,"workspaceId",7),$=v(c,"viewMode",7,"unified"),Z=v(c,"showHeader",7,!1),Ne=v(c,"foldUnchanged",7,!0),Ae=v(c,"lineWrapping",7,!1),M=v(c,"onStageHunk",7),U=v(c,"onUnstageHunk",7),et=v(c,"onOpenCommit",7),Me=v(c,"refreshKey",7),Ue=v(c,"branchBaseRef",7),Ee=v(c,"branchBaseCommitSha",7),ge=v(c,"useProvidedContent",7,!1),ce=v(c,"allowHeadReads",7,!0),Fe=v(c,"canReadHeadFiles",7),W=v(c,"lineOffset",7,1),tt=v(c,"lineStageIndicators",7),Oe=v(c,"annotations",23,()=>[]),Te=v(c,"renderAnnotation",7),$e=v(c,"virtualizer",7),G=v(c,"gitRootId",7,void 0),be=v(c,"gitRootPath",7,void 0);const de=Je(()=>le())??kn()?.workspaceId??"",Ct=Math.random().toString(36).substring(2,8),Be=`tracked-diff:${crypto.randomUUID()}`,yt=gn(de,Be),Q=d(()=>oe()?.result?.kind==="trackedDiff"?oe().result:void 0),ke=d(()=>oe()?.loading??!0),nt=d(()=>oe()?.error??null),ze=d(()=>(t(Q)?.oldContent.length??0)+(t(Q)?.newContent.length??0)>De),B=d(()=>t(ze)?"":t(Q)?.oldContent??""),V=d(()=>t(ze)?"":t(Q)?.newContent??""),ee=d(()=>ct(s()?.relativePath||s()?.file||"")),it=d(()=>t(Q)?.chunk?.chunks.length?Ut(t(Q).chunk,t(ee)):""),xt=d(()=>!t(B)&&!t(V)&&!t(it)),Pt=d(()=>!!s()?.gitlink||!!t(Q)?.gitlink),st=d(()=>W()>1?`
3
3
  `.repeat(W()-1):""),St=d(()=>t(st)+t(B)),Ht=d(()=>t(st)+t(V));let w=ae(null),Ke=ae(null),we=null,_e=ae(!1);const It=vn(de),at=pt(void 0),ot=pt(""),Rt=dn(ot,at),rt=d(Re),te=d(()=>be()||t(rt)?.worktreePath||t(rt)?.repositoryPath||""),Le=d(()=>s()?.relativePath||s()?.file||"file"),Wt=d(()=>Mt(t(Le)));let Ce=ae(null),lt=ae("");function ct(e){if(!e.startsWith("/")||!t(te))return e;const i=t(te).endsWith("/")?t(te).slice(0,-1):t(te);if(e.startsWith(i+"/"))return e.slice(i.length+1);if(e.startsWith(i)){const a=e.slice(i.length);return a.startsWith("/")?a.slice(1):a}return e}function Dt(e){return e?e.startsWith("/")?e:t(te)?`${t(te)}/${e}`:null:null}const dt=d(()=>W()>1),Nt=d(()=>t(dt)?`${t(Le)}:${He(t(B))}:off${W()}`:void 0),At=d(()=>t(dt)?`${t(Le)}:${He(t(V))}:off${W()}`:void 0);function Mt(e){const i=e.split(".").pop()?.toLowerCase();return i?{ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",py:"python",rs:"rust",go:"go",rb:"ruby",java:"java",kt:"kotlin",swift:"swift",cs:"csharp",cpp:"cpp",c:"c",h:"c",hpp:"cpp",json:"json",yaml:"yaml",yml:"yaml",toml:"toml",md:"markdown",html:"html",css:"css",scss:"scss",sql:"sql",sh:"bash",bash:"bash",zsh:"bash",svelte:"svelte",vue:"vue"}[i]:void 0}function Ut(e,i){const a=`a/${i}`,o=`b/${i}`,u=[`diff --git ${a} ${o}`,`--- ${a}`,`+++ ${o}`];for(const r of e.chunks){u.push(`@@ -${r.oldStart},${r.oldLines} +${r.newStart},${r.newLines} @@`);for(const h of r.lines){const l=h.type===kt.Addition?"+":h.type===kt.Deletion?"-":" ",g=h.content.endsWith(`
4
4
  `)?h.content.slice(0,-1):h.content;u.push(`${l}${g}`)}}return u.join(`
@@ -1,4 +1,4 @@
1
- import{t as je,bo as v,bm as c,bw as Ze,b as Xe,br as lr,bs as bt,bq as Gr}from"./Fcr7AvC-.js";import{bs as Je,ay as H,be as ht,b$ as ct,b_ as D,bO as J,W as C,bS as h,aD as e,a7 as ut,bl as ke,bn as Ye,c9 as f,aA as w,aB as re,ca as Ue,c0 as It,bH as d,a5 as ie,bA as se,bV as W,br as Rt,bk as qr,bj as Hr,bf as zo,bo as Kr,c5 as pt,aw as or,bz as Wo,cd as Jt}from"./3SdAC2_C.js";import{i as be}from"./BhYXv0ZM.js";import{c as Y}from"./2z64ELW5.js";import{g as Pr,i as Go,e as Ct,I as qo}from"./CA6H1-bp.js";import{f as xt,s as Be,g as Ho}from"./BRCr02in.js";import{b as kt}from"./Dn334wJv.js";import{b as Er}from"./iNacp7Sr.js";import{k as Ko}from"./Cc0763mU.js";import{c as Dt}from"./ChTqQfQN.js";import{a as jo}from"./CC7to1B5.js";import{f as Oe}from"./Beq_QLuz.js";import{F as Zo}from"./BAtAwQ72.js";import{m as vt}from"./DkQdSPDN.js";import{t as Xo}from"./CWfjuhY2.js";import{cp as jr,F as ye,aZ as Jo,ar as Yo,cK as Qo,aM as en,a_ as nr,a0 as dr,a2 as ur,b1 as Zr,bb as tn,a8 as rn,aw as on,aC as Xr,cT as nn,ci as Jr,bS as Yr,cn as an}from"./ChHRVjww.js";import"./DRMe5Ypb.js";import{rV as sn,JH as Se,g0 as ln,bE as dn,Ac as un,zu as cn,LI as Fr,dV as fn,bY as gn,LH as vn,v1 as wn,LF as Sr,gI as pn,un as bn,LG as mn,Ll as Lr,LE as Rr}from"./D0qhIm1r.js";import"./CpK0xLH4.js";import{R as hn,g as Yt,h as mt,f as _n,e as Ke,l as Qr,d as eo,K as yn,i as xn,k as Cn,j as In,M as to,E as kn}from"./D7KhILhs.js";import{a as ro,B as $t}from"./B5aYN90J.js";import{bK as Pn}from"./OrDYwyck.js";import{a5 as En,w as Fn,ah as Sn}from"./DzeUh63h.js";import{m as Ln,z as Rn}from"./CH7HNVC2.js";import{I as Nt}from"./C3KgmGxd.js";import{d as $n}from"./CQ409-Pj.js";import{H as Tn,I as Un}from"./Bqd7fdCF.js";import{a as An,e as Bn,h as On,g as Nn,k as Mn,p as Dn,b as oo}from"./D4WPlvMg.js";import{e as Vn}from"./DJZIHUd7.js";import{i as ar}from"./CL3a4Hm1.js";import{i as zn,a as Wn}from"./u_H5ILVa.js";import{B as Gn}from"./jphlY6bT.js";import"./Cz3WzTlQ.js";import{l as ze}from"./C7b3vXLD.js";import{M as no}from"./D179JMBI.js";import"./x4bPxhVW.js";import"./BzXQ5SMs.js";import{b as qn}from"./Ch9YoFhc.js";import"./O5ZlQHf9.js";import{t as Hn,b as Kn}from"./CXXVPWBH.js";import{T as jn}from"./B2-ooCTr.js";import{c as Zn,d as Xn}from"./Dbqo6rfT.js";import{o as $r,s as wt,n as Bt}from"./CIyUrgF0.js";import{g as Jn}from"./DWGXN6Nr.js";import{f as Yn}from"./W0kxgN1W.js";import{ay as Qn,$ as ea}from"./DLGucGdD.js";import{a_ as ta}from"./cD292w1o.js";import{i as ra}from"./DKwAaLwd.js";import{o as oa}from"./DFh2QzKR.js";function na(o,t){return o.loadURL(t)}function aa(o){return{previousUrlProp:o||null}}function Tr(o,t){o.previousUrlProp=t}function ia(o,t,n){const g=n||t;return o.previousUrlProp===g?null:(o.previousUrlProp=g,g)}function sa(o,t,n){return t?o.previousUrlProp===null?(o.previousUrlProp=t,{shouldLoad:!1,targetUrl:null}):t===o.previousUrlProp?{shouldLoad:!1,targetUrl:null}:n.webviewReady?(o.previousUrlProp=t,n.isValidBrowserUrl(t)?{shouldLoad:!0,targetUrl:t}:{shouldLoad:!1,targetUrl:null}):{shouldLoad:!1,targetUrl:null}:{shouldLoad:!1,targetUrl:null}}const ao=Dt("TabBoundsReporter"),la=150;function Qt(o,t,n){!(t>0)||!(n>0)||window.electronAPI?.invoke("browser:report-tab-bounds",{tabId:o,width:t,height:n}).catch(g=>{ao.debug("Failed to report tab bounds",{tabId:o,error:g})})}function Ur(o){window.electronAPI?.invoke("browser:report-tab-bounds",{tabId:o}).catch(t=>{ao.debug("Failed to clear tab bounds",{tabId:o,error:t})})}function io(o,t){let n=t,g;const m=typeof ResizeObserver>"u"?void 0:new ResizeObserver(P=>{if(!n)return;const b=P[P.length-1]?.contentRect;if(!b)return;const F=n;clearTimeout(g),g=setTimeout(()=>{Qt(F,b.width,b.height)},la)});if(m?.observe(o),n){const P=o.getBoundingClientRect();Qt(n,P.width,P.height)}return{update(P){if(P!==n&&(clearTimeout(g),n&&Ur(n),n=P,n)){const b=o.getBoundingClientRect();Qt(n,b.width,b.height)}},destroy(){clearTimeout(g),m?.disconnect(),n&&Ur(n)}}}function so(o){let t=o.trim();if(!t)return null;/^[a-z][a-z0-9+.-]*:\/\//i.test(t)||(t=(t.includes("localhost")||t.includes("127.0.0.1")||t.includes("0.0.0.0")?"http://":"https://")+t);try{return new URL(t),t}catch{return null}}function dt(o,t=typeof window<"u"?window.location.origin:""){return o==="about:blank"||lo(o,t)}function lo(o,t=typeof window<"u"?window.location.origin:""){if(!o)return!1;try{const n=new URL(o);return ro.NAVIGATION_ALLOWED.includes(n.protocol)&&n.origin!==t}catch{return!1}}const Mt=[{id:"iphone-se",name:"iPhone SE",category:"phone",width:375,height:667},{id:"iphone-15",name:"iPhone 15",category:"phone",width:393,height:852},{id:"pixel-8",name:"Pixel 8",category:"phone",width:412,height:915},{id:"ipad-mini",name:"iPad Mini",category:"tablet",width:768,height:1024},{id:"ipad-pro-11",name:"iPad Pro 11″",category:"tablet",width:834,height:1194},{id:"desktop-1280x800",name:"1280 × 800",category:"desktop",width:1280,height:800},{id:"desktop-1440x900",name:"1440 × 900",category:"desktop",width:1440,height:900}];function da(o){return{...o,width:o.height,height:o.width}}var ua=re('<span class="min-w-0 flex-1 truncate"> </span> <span class="type-caption ml-3 text-muted-foreground"> </span>',1),er=re("<!> <!> <!>",1),ca=re('<span class="min-w-0 flex-1"> </span> <span class="type-caption text-muted-foreground"> </span>',1),tr=re("<!> <!>",1);function cr(o,t){if(new.target)return je({component:cr,...o});Je(t,!0);let n=v(t,"viewport",7),g=v(t,"onViewportChange",7),m=v(t,"onCustom",7);const P=["phone","tablet","desktop"],b=f(()=>n().mode==="fit"?"fit":n().mode==="preset"?n().presetId:"custom");function F(u){if(u==="fit")return g()({mode:"fit"});const k=Mt.find(O=>O.id===u);k&&g()({mode:"preset",presetId:k.id,width:k.width,height:k.height})}var A={get viewport(){return n()},set viewport(u){n(u),w()},get onViewportChange(){return g()},set onViewportChange(u){g(u),w()},get onCustom(){return m()},set onCustom(u){m(u),w()},$set:Ze,$on:(u,k)=>Xe(t,u,k)},S=er(),s=H(S);Y(s,()=>hn,(u,k)=>{k(u,{get value(){return e(b)},onValueChange:F,children:(O,x)=>{var I=er(),R=H(I);Y(R,()=>Yt,(G,K)=>{K(G,{value:"fit",children:(oe,te)=>{ht();var X=ct();D(le=>J(X,le),[()=>c.browser_viewport_fitPanel_label()]),C(oe,X)},$$slots:{default:!0}})});var T=h(R,2);Pr(T,17,()=>P,Go,(G,K)=>{var oe=er(),te=H(oe);Y(te,()=>mt,(B,ae)=>{ae(B,{})});var X=h(te,2);Y(X,()=>_n,(B,ae)=>{ae(B,{children:(a,l)=>{ht();var j=ct();D(ue=>J(j,ue),[()=>e(K)==="phone"?c.browser_viewport_phoneGroup_label():e(K)==="tablet"?c.browser_viewport_tabletGroup_label():c.browser_viewport_desktopGroup_label()]),C(a,j)},$$slots:{default:!0}})});var le=h(X,2);Pr(le,17,()=>Mt.filter(B=>B.category===e(K)),B=>B.id,(B,ae)=>{var a=ut(),l=H(a);Y(l,()=>Yt,(j,ue)=>{ue(j,{get value(){return e(ae).id},children:(Ie,he)=>{var M=ua(),_=H(M),Z=ke(_,!0),V=h(_,2),z=ke(V,!0);D(y=>{J(Z,e(ae).name),J(z,y)},[()=>c.browser_viewport_dimensions_label({width:ze(e(ae).width),height:ze(e(ae).height)})]),C(Ie,M)},$$slots:{default:!0}})}),C(B,a)}),C(G,oe)});var ee=h(T,2);{var ge=G=>{var K=tr(),oe=H(K);Y(oe,()=>mt,(X,le)=>{le(X,{})});var te=h(oe,2);Y(te,()=>Yt,(X,le)=>{le(X,{value:"custom",get onSelect(){return m()},children:(B,ae)=>{var a=ca(),l=H(a),j=ke(l,!0),ue=h(l,2),Ie=ke(ue,!0);D((he,M)=>{J(j,he),J(Ie,M)},[()=>c.browser_viewport_custom_label(),()=>c.browser_viewport_dimensions_label({width:ze(n().width),height:ze(n().height)})]),C(B,a)},$$slots:{default:!0}})}),C(G,K)};be(ee,G=>{n().mode==="custom"&&G(ge)})}C(O,I)},$$slots:{default:!0}})});var L=h(s,2);{var Q=u=>{var k=tr(),O=H(k);Y(O,()=>mt,(I,R)=>{R(I,{})});var x=h(O,2);Y(x,()=>Ke,(I,R)=>{R(I,{get onSelect(){return m()},children:(T,ee)=>{ht();var ge=ct();D(G=>J(ge,G),[()=>c.browser_viewport_custom_label()]),C(T,ge)},$$slots:{default:!0}})}),C(u,k)};be(L,u=>{n().mode!=="custom"&&u(Q)})}var U=h(L,2);{var $=u=>{var k=tr(),O=H(k);Y(O,()=>mt,(I,R)=>{R(I,{})});var x=h(O,2);{let I=f(()=>c.browser_viewport_rotate_label());Y(x,()=>no,(R,T)=>{T(R,{get icon(){return jr},get label(){return e(I)},onSelect:()=>g()(da(n()))})})}C(u,k)};be(U,u=>{n().mode!=="fit"&&u($)})}return C(o,S),Ye(A)}var fa=re('<div class="grid grid-cols-2 gap-3"><label class="space-y-1 type-caption"><span> </span> <!></label> <label class="space-y-1 type-caption"><span> </span> <!></label></div>');function fr(o,t){if(new.target)return je({component:fr,...o});Je(t,!0);let n=v(t,"open",15,!1),g=v(t,"viewport",7),m=v(t,"onViewportChange",7),P=v(t,"returnFocus",7);const b=320,F=3840;let A=W(1280),S=W(800),s=W(null);function L(u){return typeof u=="number"&&Number.isInteger(u)&&u>=b&&u<=F}const Q=f(()=>L(e(A))&&L(e(S)));Ue(()=>{if(n())return()=>{It().then(()=>{P()?.isConnected&&P().focus()})}}),Ue(()=>{n()||(d(A,g().mode==="fit"?1280:g().width,!0),d(S,g().mode==="fit"?800:g().height,!0))});function U(){!e(Q)||e(A)===null||e(S)===null||(m()({mode:"custom",width:e(A),height:e(S)}),n(!1))}var $={get open(){return n()},set open(u=!1){n(u),w()},get viewport(){return g()},set viewport(u){g(u),w()},get onViewportChange(){return m()},set onViewportChange(u){m(u),w()},get returnFocus(){return P()},set returnFocus(u){P(u),w()},$set:Ze,$on:(u,k)=>Xe(t,u,k)};{let u=f(()=>c.browser_viewport_custom_label()),k=f(()=>c.browser_viewport_sizeRange_description({min:ze(b),max:ze(F)})),O=f(()=>c.browser_viewport_apply_label());qn(o,{get title(){return e(u)},get description(){return e(k)},get submitLabel(){return e(O)},get canSubmit(){return e(Q)},onSubmit:U,get initialFocus(){return e(s)},get open(){return n()},set open(x){n(x)},children:(x,I)=>{var R=fa(),T=ie(R),ee=ie(T),ge=ke(ee,!0),G=h(ee,2);{let le=f(()=>!L(e(A)));Nt(G,{type:"number",min:b,max:F,step:"1",get"aria-invalid"(){return e(le)},get value(){return e(A)},set value(B){d(A,B,!0)},get ref(){return e(s)},set ref(B){d(s,B,!0)}})}se(T);var K=h(T,2),oe=ie(K),te=ke(oe,!0),X=h(oe,2);{let le=f(()=>!L(e(S)));Nt(X,{type:"number",min:b,max:F,step:"1",get"aria-invalid"(){return e(le)},get value(){return e(S)},set value(B){d(S,B,!0)}})}se(K),se(R),D((le,B)=>{J(ge,le),J(te,B)},[()=>c.browser_viewport_width_label(),()=>c.browser_viewport_height_label()]),C(x,R)},$$slots:{default:!0}})}return Ye($)}var Ot=re("<!> <!>",1),ot=re("<!> ",1),ga=re('<!> <span class="min-w-0 flex-1 truncate"> </span>',1),va=re("<!> <!> <!> <!> <!>",1),wa=re('<!> <span class="min-w-0 flex-1"> </span> <kbd class="type-caption ml-5 text-muted-foreground" aria-hidden="true">⌘⌥I</kbd>',1),pa=re("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1);function uo(o,t){if(new.target)return je({component:uo,...o});Je(t,!0);let n=v(t,"errorCount",7,0),g=v(t,"disabled",7,!1),m=v(t,"collapsed",7,!1),P=v(t,"canGoBack",7,!1),b=v(t,"canGoForward",7,!1),F=v(t,"canSelectElement",7,!1),A=v(t,"selectingElement",7,!1),S=v(t,"viewport",23,()=>({mode:"fit"})),s=v(t,"onGoBack",7),L=v(t,"onGoForward",7),Q=v(t,"onToggleElementPicker",7),U=v(t,"onViewportChange",7),$=v(t,"onOpenExternal",7),u=v(t,"onFullScreen",7),k=v(t,"onCopyUrl",7),O=v(t,"onScreenshot",7),x=v(t,"onOpenConsole",7),I=v(t,"onOpenSource",7),R=v(t,"onOpenInspector",7),T=v(t,"onReloadWithoutCache",7);const ee=f(()=>n()>0?c.browser_overflow_triggerWithErrors_ariaLabel({count:ze(n())}):c.browser_overflow_trigger_ariaLabel()),ge=f(()=>S().mode==="preset"?Mt.find(l=>l.id===S().presetId):void 0),G=f(()=>S().mode==="fit"?c.browser_viewport_fitPanel_label():e(ge)?.name??c.browser_viewport_dimensions_label({width:ze(S().width),height:ze(S().height)}));let K=W(!1),oe=W(null),te=W(!1);async function X(){d(te,!1),await It(),d(K,!0)}var le={get errorCount(){return n()},set errorCount(l=0){n(l),w()},get disabled(){return g()},set disabled(l=!1){g(l),w()},get collapsed(){return m()},set collapsed(l=!1){m(l),w()},get canGoBack(){return P()},set canGoBack(l=!1){P(l),w()},get canGoForward(){return b()},set canGoForward(l=!1){b(l),w()},get canSelectElement(){return F()},set canSelectElement(l=!1){F(l),w()},get selectingElement(){return A()},set selectingElement(l=!1){A(l),w()},get viewport(){return S()},set viewport(l={mode:"fit"}){S(l),w()},get onGoBack(){return s()},set onGoBack(l){s(l),w()},get onGoForward(){return L()},set onGoForward(l){L(l),w()},get onToggleElementPicker(){return Q()},set onToggleElementPicker(l){Q(l),w()},get onViewportChange(){return U()},set onViewportChange(l){U(l),w()},get onOpenExternal(){return $()},set onOpenExternal(l){$(l),w()},get onFullScreen(){return u()},set onFullScreen(l){u(l),w()},get onCopyUrl(){return k()},set onCopyUrl(l){k(l),w()},get onScreenshot(){return O()},set onScreenshot(l){O(l),w()},get onOpenConsole(){return x()},set onOpenConsole(l){x(l),w()},get onOpenSource(){return I()},set onOpenSource(l){I(l),w()},get onOpenInspector(){return R()},set onOpenInspector(l){R(l),w()},get onReloadWithoutCache(){return T()},set onReloadWithoutCache(l){T(l),w()},$set:Ze,$on:(l,j)=>Xe(t,l,j)},B=Ot(),ae=H(B);Y(ae,()=>to,(l,j)=>{j(l,{get open(){return e(te)},set open(ue){d(te,ue,!0)},children:(ue,Ie)=>{var he=Ot(),M=H(he);{const Z=(V,z)=>{let y=()=>(z?.()).props;{let q=f(()=>c.browser_overflow_trigger_tooltip());Oe(V,lr(y,{variant:"ghost-light",size:"icon-xs",class:"relative",get disabled(){return g()},get tooltip(){return e(q)},tooltipSide:"bottom",get"aria-label"(){return e(ee)},"data-testid":"browser-overflow-trigger",get ref(){return e(oe)},set ref(E){d(oe,E,!0)},children:(E,Pe)=>{var fe=Ot(),Qe=H(fe);yn(Qe,{class:"size-3.5"});var nt=h(Qe,2);{var We=Fe=>{Gn(Fe,{variant:"destructive",class:"absolute -right-1.5 -top-1.5 h-4 min-w-4 px-1 text-xs leading-none","data-testid":"browser-console-error-badge",children:(Ge,at)=>{ht();var it=ct();D(Me=>J(it,Me),[()=>n()>9?"9+":ze(n())]),C(Ge,it)},$$slots:{default:!0}})};be(nt,Fe=>{n()>0&&Fe(We)})}C(E,fe)},$$slots:{default:!0}}))}};Y(M,()=>Qr,(V,z)=>{z(V,{child:Z,$$slots:{child:!0}})})}var _=h(M,2);Y(_,()=>eo,(Z,V)=>{V(Z,{align:"end",class:"w-56",onCloseAutoFocus:z=>e(K)&&z.preventDefault(),children:(z,y)=>{var q=pa(),E=H(q);{var Pe=ve=>{var we=va(),Ee=H(we);{let ce=f(()=>!P());Y(Ee,()=>Ke,(xe,De)=>{De(xe,{get disabled(){return e(ce)},get onSelect(){return s()},children:(Ne,st)=>{var Ce=ot(),He=H(Ce);ye(He,{get icon(){return dr},size:"xs",class:"w-4 text-muted-foreground"});var et=h(He);D(Ve=>J(et,` ${Ve??""}`),[()=>c.browser_embedded_goBack_ariaLabel()]),C(Ne,Ce)},$$slots:{default:!0}})})}var Re=h(Ee,2);{let ce=f(()=>!b());Y(Re,()=>Ke,(xe,De)=>{De(xe,{get disabled(){return e(ce)},get onSelect(){return L()},children:(Ne,st)=>{var Ce=ot(),He=H(Ce);ye(He,{get icon(){return ur},size:"xs",class:"w-4 text-muted-foreground"});var et=h(He);D(Ve=>J(et,` ${Ve??""}`),[()=>c.browser_embedded_goForward_ariaLabel()]),C(Ne,Ce)},$$slots:{default:!0}})})}var pe=h(Re,2);{let ce=f(()=>!F());Y(pe,()=>Ke,(xe,De)=>{De(xe,{get disabled(){return e(ce)},onSelect:()=>void Q()?.(),children:(Ne,st)=>{var Ce=ot(),He=H(Ce);ye(He,{get icon(){return nr},size:"xs",class:"w-4 text-muted-foreground"});var et=h(He);D(Ve=>J(et,` ${Ve??""}`),[()=>A()?c.browser_embedded_cancelElementSelection_ariaLabel():c.browser_embedded_selectElement_ariaLabel()]),C(Ne,Ce)},$$slots:{default:!0}})})}var me=h(pe,2);Y(me,()=>xn,(ce,xe)=>{xe(ce,{children:(De,Ne)=>{var st=Ot(),Ce=H(st);{let et=f(()=>!U());Y(Ce,()=>Cn,(Ve,ft)=>{ft(Ve,{get disabled(){return e(et)},children:(St,gt)=>{var Pt=ga(),Et=H(Pt);ye(Et,{get icon(){return Zr},size:"xs",class:"w-4 text-muted-foreground"});var Ft=h(Et,2),Ut=ke(Ft,!0);D(Lt=>J(Ut,Lt),[()=>c.browser_viewport_trigger_ariaLabel({mode:e(G)})]),C(St,Pt)},$$slots:{default:!0}})})}var He=h(Ce,2);Y(He,()=>In,(et,Ve)=>{Ve(et,{class:"w-64",children:(ft,St)=>{cr(ft,{get viewport(){return S()},onViewportChange:gt=>U()?.(gt),onCustom:X})},$$slots:{default:!0}})}),C(De,st)},$$slots:{default:!0}})});var Ae=h(me,2);Y(Ae,()=>mt,(ce,xe)=>{xe(ce,{})}),C(ve,we)};be(E,ve=>{m()&&ve(Pe)})}var fe=h(E,2);{var Qe=ve=>{var we=ut(),Ee=H(we);Y(Ee,()=>Ke,(Re,pe)=>{pe(Re,{onSelect:()=>u()(),children:(me,Ae)=>{var ce=ot(),xe=H(ce);ye(xe,{get icon(){return tn},size:"xs",class:"w-4 text-muted-foreground"});var De=h(xe);D(Ne=>J(De,` ${Ne??""}`),[()=>c.browser_overflow_fullScreen_label()]),C(me,ce)},$$slots:{default:!0}})}),C(ve,we)},nt=ve=>{var we=ut(),Ee=H(we);Y(Ee,()=>Ke,(Re,pe)=>{pe(Re,{onSelect:()=>void $()(),children:(me,Ae)=>{var ce=ot(),xe=H(ce);ye(xe,{get icon(){return rn},size:"xs",class:"w-4 text-muted-foreground"});var De=h(xe);D(Ne=>J(De,` ${Ne??""}`),[()=>c.browser_overflow_openExternal_label()]),C(me,ce)},$$slots:{default:!0}})}),C(ve,we)};be(fe,ve=>{u()?ve(Qe):$()&&ve(nt,1)})}var We=h(fe,2);Y(We,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void k()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return Jo},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_copyUrl_label()]),C(Ee,pe)},$$slots:{default:!0}})});var Fe=h(We,2);Y(Fe,()=>mt,(ve,we)=>{we(ve,{})});var Ge=h(Fe,2);Y(Ge,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void O()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return Yo},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_screenshot_label()]),C(Ee,pe)},$$slots:{default:!0}})});var at=h(Ge,2);Y(at,()=>mt,(ve,we)=>{we(ve,{})});var it=h(at,2);Y(it,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void x()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return Qo},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_console_label()]),C(Ee,pe)},$$slots:{default:!0}})});var Me=h(it,2);Y(Me,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void I()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return en},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_source_label()]),C(Ee,pe)},$$slots:{default:!0}})});var qe=h(Me,2);Y(qe,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void R()(),children:(Ee,Re)=>{var pe=wa(),me=H(pe);ye(me,{get icon(){return nr},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me,2),ce=ke(Ae,!0);ht(2),D(xe=>J(ce,xe),[()=>c.browser_overflow_inspector_label()]),C(Ee,pe)},$$slots:{default:!0}})});var Le=h(qe,2);Y(Le,()=>mt,(ve,we)=>{we(ve,{})});var _t=h(Le,2);Y(_t,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void T()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return jr},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_reloadWithoutCache_label()]),C(Ee,pe)},$$slots:{default:!0}})}),C(z,q)},$$slots:{default:!0}})}),C(ue,he)},$$slots:{default:!0}})});var a=h(ae,2);return fr(a,{get viewport(){return S()},onViewportChange:l=>U()?.(l),get returnFocus(){return e(oe)},get open(){return e(K)},set open(l){d(K,l,!0)}}),C(o,B),Ye(le)}var ba=re('<span class="truncate"> </span> <!>',1),Ar=re("<!> <!>",1);function co(o,t){if(new.target)return je({component:co,...o});Je(t,!0);let n=v(t,"viewport",7),g=v(t,"onViewportChange",7),m=W(!1),P=W(!1),b=W(null);const F=f(()=>n().mode==="preset"?Mt.find(k=>k.id===n().presetId):void 0),A=f(()=>n().mode==="fit"?"":c.browser_viewport_dimensions_label({width:ze(n().width),height:ze(n().height)})),S=f(()=>n().mode==="fit"?c.browser_viewport_fit_short_label():n().mode==="preset"&&e(F)?e(F).name:e(A)),s=f(()=>n().mode==="fit"?c.browser_viewport_fitPanel_label():e(S));async function L(){d(m,!1),await It(),d(P,!0)}var Q={get viewport(){return n()},set viewport(k){n(k),w()},get onViewportChange(){return g()},set onViewportChange(k){g(k),w()},$set:Ze,$on:(k,O)=>Xe(t,k,O)},U=Ar(),$=H(U);Y($,()=>to,(k,O)=>{O(k,{get open(){return e(m)},set open(x){d(m,x,!0)},children:(x,I)=>{var R=Ar(),T=H(R);{const ge=(G,K)=>{let oe=()=>(K?.()).props;{let te=f(()=>c.browser_viewport_trigger_ariaLabel({mode:e(s)}));Oe(G,lr(oe,{variant:"ghost-light",size:"xs",class:"h-6 max-w-36 gap-1 rounded-full bg-muted px-2 text-xs hover:bg-muted/80",get"aria-label"(){return e(te)},"data-testid":"browser-viewport-trigger",get ref(){return e(b)},set ref(X){d(b,X,!0)},children:(X,le)=>{var B=ba(),ae=H(B),a=ke(ae,!0),l=h(ae,2);ye(l,{get icon(){return on},size:"xs",class:"shrink-0"}),D(()=>J(a,e(S))),C(X,B)},$$slots:{default:!0}}))}};Y(T,()=>Qr,(G,K)=>{K(G,{child:ge,$$slots:{child:!0}})})}var ee=h(T,2);Y(ee,()=>eo,(ge,G)=>{G(ge,{align:"end",class:"w-64",onCloseAutoFocus:K=>e(P)&&K.preventDefault(),children:(K,oe)=>{cr(K,{get viewport(){return n()},get onViewportChange(){return g()},onCustom:L})},$$slots:{default:!0}})}),C(x,R)},$$slots:{default:!0}})});var u=h($,2);return fr(u,{get viewport(){return n()},get onViewportChange(){return g()},get returnFocus(){return e(b)},get open(){return e(P)},set open(k){d(P,k,!0)}}),C(o,U),Ye(Q)}var ma=re('<span data-browser-viewport-readout=""> </span> <!>',1),ha=re('<div data-browser-device-frame-container=""><div><div><!> <!></div> <!></div></div>');function fo(o,t){if(new.target)return je({component:fo,...o});Je(t,!0);const n=320,g=3840,m=150,P=24;let b=v(t,"viewport",7),F=v(t,"onViewportChange",7),A=v(t,"chromeOutside",7,!1),S=v(t,"children",7),s=W(Rt(b().mode==="fit"?n:b().width)),L=W(Rt(b().mode==="fit"?n:b().height)),Q,U=W(0),$=W(0),u=W(!1),k=null,O=0,x=0,I=0,R=0,T;const ee=f(()=>b().mode==="fit"),ge=f(()=>c.browser_viewport_dimensions_label({width:ze(e(s)),height:ze(e(L))})),G=f(()=>A()?Math.max(0,e($)-P):e($)),K=f(()=>!e(ee)&&e(U)>0&&e(G)>0?Math.min(1,e(U)/e(s),e(G)/e(L)):1),oe=f(()=>e(s)*e(K)),te=f(()=>e(L)*e(K));Ue(()=>{e(u)||b().mode==="fit"||(d(s,b().width,!0),d(L,b().height,!0))});function X(y){return Math.min(g,Math.max(n,Math.round(y)))}function le(){F()({mode:"custom",width:e(s),height:e(L)})}function B(){clearTimeout(T),T=setTimeout(le,m)}function ae(y){e(ee)||y.button!==0||(y.preventDefault(),d(u,!0),k=y.pointerId,O=y.clientX,x=y.clientY,I=e(s),R=e(L),y.currentTarget instanceof HTMLElement&&y.currentTarget.setPointerCapture?.(y.pointerId))}function a(y){!e(u)||y.pointerId!==k||(d(s,X(I+y.clientX-O),!0),d(L,X(R+y.clientY-x),!0),B())}function l(y){if(!e(u)||y.pointerId!==k)return;clearTimeout(T),d(u,!1),k=null;const q=y.currentTarget;q instanceof HTMLElement&&q.hasPointerCapture?.(y.pointerId)&&q.releasePointerCapture&&q.releasePointerCapture(y.pointerId),le()}qr(()=>{const y=(E,Pe)=>{d(U,E,!0),d($,Pe,!0)};y(Q.clientWidth,Q.clientHeight);const q=typeof ResizeObserver>"u"?void 0:new ResizeObserver(([E])=>{y(E?.contentRect.width??Q.clientWidth,E?.contentRect.height??Q.clientHeight)});return q?.observe(Q),()=>q?.disconnect()}),Hr(()=>clearTimeout(T));var j={get viewport(){return b()},set viewport(y){b(y),w()},get onViewportChange(){return F()},set onViewportChange(y){F(y),w()},get chromeOutside(){return A()},set chromeOutside(y=!1){A(y),w()},get children(){return S()},set children(y){S(y),w()},$set:Ze,$on:(y,q)=>Xe(t,y,q)},ue=ha();{const y=E=>{var Pe=ma(),fe=H(Pe),Qe=ke(fe,!0),nt=h(fe,2);{let We=f(()=>A()?"top-full":"bottom-0"),Fe=f(()=>c.browser_viewport_resizeHandle_ariaLabel());Oe(nt,{type:"button",variant:"ghost",size:"icon-xs",iconOnly:!0,get class(){return`absolute right-0 z-20 size-5 cursor-nwse-resize touch-none border-0 bg-transparent p-0 after:absolute after:bottom-1 after:right-1 after:size-2 after:border-b-2 after:border-r-2 after:border-muted-foreground ${e(We)??""}`},get"aria-label"(){return e(Fe)},"data-testid":"browser-device-resize-handle",onpointerdown:ae,onpointermove:a,onpointerup:l,onpointercancel:l})}D(()=>{xt(fe,1,`pointer-events-none absolute left-1/2 z-10 -translate-x-1/2 rounded bg-background/90 px-1.5 py-0.5 text-xs text-muted-foreground shadow-sm backdrop-blur ${A()?"top-full mt-0.5":"bottom-1"}`),J(Qe,e(ge))}),C(E,Pe)};var Ie=ie(ue),he=ie(Ie);let q;var M=ie(he);Xo(M,()=>S()??zo);var _=h(M,2);{var Z=E=>{y(E)};be(_,E=>{!e(ee)&&!A()&&E(Z)})}se(he);var V=h(he,2);{var z=E=>{y(E)};be(V,E=>{!e(ee)&&A()&&E(z)})}se(Ie),se(ue),kt(ue,E=>Q=E,()=>Q),D(()=>{xt(Ie,1,`relative ${e(ee)?"h-full w-full":""} ${A()&&!e(ee)?"mb-6":""}`),xt(he,1,`relative overflow-hidden bg-background ${e(ee)?"h-full w-full":e(u)?"ring-2 ring-primary/30":""}`),Be(he,"data-browser-device-frame",e(ee)?void 0:""),Be(he,"data-width",e(ee)?void 0:e(s)),Be(he,"data-height",e(ee)?void 0:e(L)),q=Ho(he,"",q,{width:e(ee)?void 0:`${e(oe)}px`,height:e(ee)?void 0:`${e(te)}px`})})}return D(()=>xt(ue,1,`flex h-full w-full items-center justify-center overflow-hidden ${e(ee)?"bg-background":"bg-muted/40"}`)),C(o,ue),Ye(j)}const rr=Dt("BrowserViewSlot"),Br=()=>new Promise(o=>requestAnimationFrame(()=>o())),Or=async()=>{await Br(),await Br()};function Nr(o,t){return o===t?!0:!o||!t?!1:o.x===t.x&&o.y===t.y&&o.width===t.width&&o.height===t.height}function Mr(o){const t=o.getBoundingClientRect();return t.width<=0||t.height<=0?null:{x:t.left,y:t.top,width:t.width,height:t.height}}function _a(o){return o.isConnected?typeof o.checkVisibility=="function"?o.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0}):!0:!1}function ya(o,t){let n=Dr(o,t),g=`${t.workspaceId}\0${t.tabId}`;return{update(m){const P=`${m.workspaceId}\0${m.tabId}`;if(P===g){n.update(m);return}n.destroy(),g=P,n=Dr(o,m)},destroy(){n.destroy()}}}function Dr(o,t){let n=t;const g=An(o,{tabId:n.tabId,workspaceId:n.workspaceId,url:n.url,...n.pinned===void 0?{}:{pinned:n.pinned}});n.onWebview?.(g.webview);let m=null,P=Promise.resolve(),b="live",F=0,A=null,S=null,s=!1;const L=()=>{A?.remove(),A=null},Q=x=>{m=x;const I=n.tabId;return P=On(I,x.rect,x.visible).catch(R=>rr.debug("Could not place the browser page",{tabId:I,error:R})),P},U=()=>{if(S=null,s)return;const x=Mr(o),I=n.visible&&x!==null&&_a(o)&&b!=="frozen"&&g.ready;g.ready&&(!m||m.visible!==I||x&&!Nr(m.rect,x))&&(Nr(m?.rect??null,x)||Kn(),Q({rect:x??m?.rect??null,visible:I})),S=requestAnimationFrame(U)};S=requestAnimationFrame(U);const $=async x=>{if(b="freezing",g.ready&&m?.visible)try{const I=await g.webview.capturePage?.();if(x!==F||s)return;const R=I?.toDataURL()??"";if(R){const T=document.createElement("img");if(T.alt="",T.setAttribute("aria-hidden","true"),T.dataset.browserViewSnapshot="",T.style.cssText="position:absolute;inset:0;width:100%;height:100%;pointer-events:none;",T.src=R,await T.decode().catch(()=>{}),x!==F||s||(L(),o.append(T),A=T,await Or(),x!==F||s))return}}catch(I){rr.debug("Could not snapshot the browser page",{tabId:n.tabId,error:I})}x!==F||s||(b="frozen")},u=async x=>{if(b="thawing",g.ready&&n.visible){const I=Mr(o);I&&await Q({rect:I,visible:!0}),await Or()}x!==F||s||(L(),b="live")},k=Hn({element:o,onCoveredChange(x){const I=++F;x?$(I):u(I)}});return{update(x){n=x},destroy:()=>{const x=n.tabId;s=!0,S!==null&&cancelAnimationFrame(S),S=null,k(),L(),g.dispose(),n.onWebview?.(null),P.then(()=>Bn(x).catch(I=>rr.debug("Could not take the browser page off screen",{tabId:x,error:I})))}}}var xa=re('<div class="relative h-full w-full overflow-hidden"></div>');function go(o,t){if(new.target)return je({component:go,...o});Je(t,!0);let n=v(t,"tabId",7),g=v(t,"workspaceId",7),m=v(t,"url",7),P=v(t,"pinned",7),b=v(t,"visible",7),F=v(t,"webview",15,null);var A={get tabId(){return n()},set tabId(s){n(s),w()},get workspaceId(){return g()},set workspaceId(s){g(s),w()},get url(){return m()},set url(s){m(s),w()},get pinned(){return P()},set pinned(s){P(s),w()},get visible(){return b()},set visible(s){b(s),w()},get webview(){return F()},set webview(s=null){F(s),w()},$set:Ze,$on:(s,L)=>Xe(t,s,L)},S=xa();return Ct(S,(s,L)=>ya?.(s,L),()=>({tabId:n(),workspaceId:g(),url:m(),...P()===void 0?{}:{pinned:P()},visible:b(),onWebview:s=>F(s)})),Ct(S,(s,L)=>io?.(s,L),n),D(()=>Be(S,"data-browser-view-slot",n())),C(o,S),Ye(A)}function vo(o,t){if(new.target)return je({component:vo,...o});Je(t,!0);let n=v(t,"active",7),g=v(t,"disabled",7),m=v(t,"onToggle",7);var P={get active(){return n()},set active(b){n(b),w()},get disabled(){return g()},set disabled(b){g(b),w()},get onToggle(){return m()},set onToggle(b){m(b),w()},$set:Ze,$on:(b,F)=>Xe(t,b,F)};{let b=f(()=>n()?"bg-muted text-foreground":""),F=f(()=>n()?c.browser_embedded_cancelElementSelection_tooltip():c.browser_embedded_selectElement_tooltip()),A=f(()=>n()?c.browser_embedded_cancelElementSelection_ariaLabel():c.browser_embedded_selectElement_ariaLabel());Oe(o,{variant:"ghost-light",size:"icon-xs",get class(){return e(b)},get onclick(){return m()},get disabled(){return g()},get tooltip(){return e(F)},tooltipSide:"bottom",get"aria-label"(){return e(A)},get"aria-pressed"(){return n()},"data-testid":"browser-select-element",children:(S,s)=>{ye(S,{get icon(){return nr},size:"xs"})},$$slots:{default:!0}})}return Ye(P)}var Ca=re('<span class="sr-only"> </span>'),Ia=re('<p class="min-h-0 overflow-y-auto text-sm text-foreground [overflow-wrap:anywhere]"> </p> <!>',1),ka=re("<!> <!>",1),Pa=re('<span class="inline-flex shrink-0"><!> <!></span>');function gr(o,t){const n=Kr();if(new.target)return je({component:gr,...o});Je(t,!0);let g=v(t,"label",7),m=v(t,"description",7),P=v(t,"ariaLabel",23,g),b=v(t,"tone",7,"info"),F=v(t,"actionLabel",7),A=v(t,"onAction",7),S=v(t,"actionFocusTarget",7),s=v(t,"descriptionId",7),L=W(!1),Q=!1;async function U(){Q=!0,d(L,!1),await It(),S()?.focus(),A()?.()}var $={get label(){return g()},set label(I){g(I),w()},get description(){return m()},set description(I){m(I),w()},get ariaLabel(){return P()},set ariaLabel(I=g){P(I),w()},get tone(){return b()},set tone(I="info"){b(I),w()},get actionLabel(){return F()},set actionLabel(I){F(I),w()},get onAction(){return A()},set onAction(I){A(I),w()},get actionFocusTarget(){return S()},set actionFocusTarget(I){S(I),w()},get descriptionId(){return s()},set descriptionId(I){s(I),w()},$set:Ze,$on:(I,R)=>Xe(t,I,R)},u=Pa(),k=ie(u);{var O=I=>{var R=Ca(),T=ke(R,!0);D(()=>{Be(R,"id",n),Be(R,"role",b()==="error"?"alert":"status"),J(T,m())}),C(I,R)};be(k,I=>{s()||I(O)})}var x=h(k,2);return Y(x,()=>Xn,(I,R)=>{R(I,{get open(){return e(L)},set open(T){d(L,T,!0)},children:(T,ee)=>{var ge=ka(),G=H(ge);{const oe=(te,X)=>{let le=()=>(X?.()).props;{let B=f(()=>b()==="error"?"text-danger":b()==="warning"?"text-warning-ink":"text-muted-foreground"),ae=f(()=>s()??n);Oe(te,lr(le,{variant:"ghost-light",size:"icon-compact",wrapContent:!1,get class(){return e(B)},get"aria-label"(){return P()},get"aria-describedby"(){return e(ae)},get tooltip(){return m()},get tooltipDisabled(){return e(L)},tooltipSide:"bottom",tooltipDelayDuration:300,children:(a,l)=>{{let j=f(()=>b()==="error"?Xr:b()==="warning"?nn:Zr);ye(a,{get icon(){return e(j)},size:"xs",class:"shrink-0"})}},$$slots:{default:!0}}))}};Y(G,()=>jn,(te,X)=>{X(te,{child:oe,$$slots:{child:!0}})})}var K=h(G,2);Y(K,()=>Zn,(oe,te)=>{te(oe,{align:"end",class:"flex max-h-[var(--bits-popover-content-available-height,calc(100dvh-1rem))] w-72 max-w-[calc(100vw-1rem)] flex-col gap-3 p-3",get"aria-label"(){return P()},onCloseAutoFocus:X=>{Q&&S()&&(X.preventDefault(),S().focus()),Q=!1},children:(X,le)=>{var B=Ia(),ae=H(B),a=ke(ae,!0),l=h(ae,2);{var j=ue=>{Oe(ue,{variant:"secondary",size:"sm",class:"self-start",onclick:()=>void U(),children:(Ie,he)=>{ht();var M=ct();D(()=>J(M,F())),C(Ie,M)},$$slots:{default:!0}})};be(l,ue=>{F()&&A()&&ue(j)})}D(()=>J(a,m())),C(X,B)},$$slots:{default:!0}})}),C(T,ge)},$$slots:{default:!0}})}),se(u),D(()=>Be(u,"data-browser-status",b())),C(o,u),Ye($)}function Ea(o,t,n){const g=n.width>0?t.width/n.width:1,m=n.height>0?t.height/n.height:1,P=Math.max(0,Math.floor(o.x*g)),b=Math.max(0,Math.floor(o.y*m)),F=Math.min(t.width,Math.ceil((o.x+o.width)*g)),A=Math.min(t.height,Math.ceil((o.y+o.height)*m));return{x:P,y:b,width:Math.max(0,F-P),height:Math.max(0,A-b)}}const Fa=$r({selector:wt().min(1),domPath:wt().min(1),tagName:wt().min(1),id:wt(),className:wt(),textSnippet:wt().max(120),rect:$r({x:Bt().finite(),y:Bt().finite(),width:Bt().finite().nonnegative(),height:Bt().finite().nonnegative()}).strict(),pageUrl:wt().min(1),sourceRef:wt().min(1).optional()}).strict(),Vr="__INTENT_ELEMENT_PICKED__:";function Sa(o){if(o==="__INTENT_ELEMENT_PICK_CANCELLED__")return{type:"cancelled"};if(!o.startsWith(Vr))return null;let t;try{t=JSON.parse(o.slice(Vr.length))}catch{t=null}const n=Fa.safeParse(t);return n.success?{type:"picked",element:n.data}:{type:"malformed",issues:n.error.issues}}const La=String.raw`
1
+ import{t as je,bo as v,bm as c,bw as Ze,b as Xe,br as lr,bs as bt,bq as Gr}from"./Fcr7AvC-.js";import{bs as Je,ay as H,be as ht,b$ as ct,b_ as D,bO as J,W as C,bS as h,aD as e,a7 as ut,bl as ke,bn as Ye,c9 as f,aA as w,aB as re,ca as Ue,c0 as It,bH as d,a5 as ie,bA as se,bV as W,br as Rt,bk as qr,bj as Hr,bf as zo,bo as Kr,c5 as pt,aw as or,bz as Wo,cd as Jt}from"./3SdAC2_C.js";import{i as be}from"./BhYXv0ZM.js";import{c as Y}from"./2z64ELW5.js";import{g as Pr,i as Go,e as Ct,I as qo}from"./CA6H1-bp.js";import{f as xt,s as Be,g as Ho}from"./BRCr02in.js";import{b as kt}from"./Dn334wJv.js";import{b as Er}from"./iNacp7Sr.js";import{k as Ko}from"./Cc0763mU.js";import{c as Dt}from"./ChTqQfQN.js";import{a as jo}from"./CC7to1B5.js";import{f as Oe}from"./D-lOH49i.js";import{F as Zo}from"./pYdPYEfN.js";import{m as vt}from"./qB07BmZl.js";import{t as Xo}from"./CWfjuhY2.js";import{cp as jr,F as ye,aZ as Jo,ar as Yo,cK as Qo,aM as en,a_ as nr,a0 as dr,a2 as ur,b1 as Zr,bb as tn,a8 as rn,aw as on,aC as Xr,cT as nn,ci as Jr,bS as Yr,cn as an}from"./ChHRVjww.js";import"./DRMe5Ypb.js";import{rV as sn,JH as Se,g0 as ln,bE as dn,Ac as un,zu as cn,LI as Fr,dV as fn,bY as gn,LH as vn,v1 as wn,LF as Sr,gI as pn,un as bn,LG as mn,Ll as Lr,LE as Rr}from"./D0qhIm1r.js";import"./CpK0xLH4.js";import{R as hn,g as Yt,h as mt,f as _n,e as Ke,l as Qr,d as eo,K as yn,i as xn,k as Cn,j as In,M as to,E as kn}from"./CBbhUF1U.js";import{a as ro,B as $t}from"./B5aYN90J.js";import{bK as Pn}from"./ye-GTjqo.js";import{a5 as En,w as Fn,ah as Sn}from"./D1rlIs5V.js";import{m as Ln,z as Rn}from"./CH7HNVC2.js";import{I as Nt}from"./DReNFETs.js";import{d as $n}from"./CQ409-Pj.js";import{H as Tn,I as Un}from"./Bqd7fdCF.js";import{a as An,e as Bn,h as On,g as Nn,k as Mn,p as Dn,b as oo}from"./D4WPlvMg.js";import{e as Vn}from"./DJZIHUd7.js";import{i as ar}from"./CL3a4Hm1.js";import{i as zn,a as Wn}from"./CP-NTf2-.js";import{B as Gn}from"./Bmw5RheL.js";import"./CpIcQB5T.js";import{l as ze}from"./C7b3vXLD.js";import{M as no}from"./CFDesZJP.js";import"./x4bPxhVW.js";import"./BzXQ5SMs.js";import{b as qn}from"./BLoR6-fV.js";import"./O5ZlQHf9.js";import{t as Hn,b as Kn}from"./CXXVPWBH.js";import{T as jn}from"./CMUWVW8A.js";import{c as Zn,d as Xn}from"./XMoRU8a7.js";import{o as $r,s as wt,n as Bt}from"./CIyUrgF0.js";import{g as Jn}from"./DWGXN6Nr.js";import{f as Yn}from"./QiDikPQa.js";import{ay as Qn,$ as ea}from"./DAvgrUpQ.js";import{a_ as ta}from"./Cq6hdiVw.js";import{i as ra}from"./DKwAaLwd.js";import{o as oa}from"./B7nYGmHN.js";function na(o,t){return o.loadURL(t)}function aa(o){return{previousUrlProp:o||null}}function Tr(o,t){o.previousUrlProp=t}function ia(o,t,n){const g=n||t;return o.previousUrlProp===g?null:(o.previousUrlProp=g,g)}function sa(o,t,n){return t?o.previousUrlProp===null?(o.previousUrlProp=t,{shouldLoad:!1,targetUrl:null}):t===o.previousUrlProp?{shouldLoad:!1,targetUrl:null}:n.webviewReady?(o.previousUrlProp=t,n.isValidBrowserUrl(t)?{shouldLoad:!0,targetUrl:t}:{shouldLoad:!1,targetUrl:null}):{shouldLoad:!1,targetUrl:null}:{shouldLoad:!1,targetUrl:null}}const ao=Dt("TabBoundsReporter"),la=150;function Qt(o,t,n){!(t>0)||!(n>0)||window.electronAPI?.invoke("browser:report-tab-bounds",{tabId:o,width:t,height:n}).catch(g=>{ao.debug("Failed to report tab bounds",{tabId:o,error:g})})}function Ur(o){window.electronAPI?.invoke("browser:report-tab-bounds",{tabId:o}).catch(t=>{ao.debug("Failed to clear tab bounds",{tabId:o,error:t})})}function io(o,t){let n=t,g;const m=typeof ResizeObserver>"u"?void 0:new ResizeObserver(P=>{if(!n)return;const b=P[P.length-1]?.contentRect;if(!b)return;const F=n;clearTimeout(g),g=setTimeout(()=>{Qt(F,b.width,b.height)},la)});if(m?.observe(o),n){const P=o.getBoundingClientRect();Qt(n,P.width,P.height)}return{update(P){if(P!==n&&(clearTimeout(g),n&&Ur(n),n=P,n)){const b=o.getBoundingClientRect();Qt(n,b.width,b.height)}},destroy(){clearTimeout(g),m?.disconnect(),n&&Ur(n)}}}function so(o){let t=o.trim();if(!t)return null;/^[a-z][a-z0-9+.-]*:\/\//i.test(t)||(t=(t.includes("localhost")||t.includes("127.0.0.1")||t.includes("0.0.0.0")?"http://":"https://")+t);try{return new URL(t),t}catch{return null}}function dt(o,t=typeof window<"u"?window.location.origin:""){return o==="about:blank"||lo(o,t)}function lo(o,t=typeof window<"u"?window.location.origin:""){if(!o)return!1;try{const n=new URL(o);return ro.NAVIGATION_ALLOWED.includes(n.protocol)&&n.origin!==t}catch{return!1}}const Mt=[{id:"iphone-se",name:"iPhone SE",category:"phone",width:375,height:667},{id:"iphone-15",name:"iPhone 15",category:"phone",width:393,height:852},{id:"pixel-8",name:"Pixel 8",category:"phone",width:412,height:915},{id:"ipad-mini",name:"iPad Mini",category:"tablet",width:768,height:1024},{id:"ipad-pro-11",name:"iPad Pro 11″",category:"tablet",width:834,height:1194},{id:"desktop-1280x800",name:"1280 × 800",category:"desktop",width:1280,height:800},{id:"desktop-1440x900",name:"1440 × 900",category:"desktop",width:1440,height:900}];function da(o){return{...o,width:o.height,height:o.width}}var ua=re('<span class="min-w-0 flex-1 truncate"> </span> <span class="type-caption ml-3 text-muted-foreground"> </span>',1),er=re("<!> <!> <!>",1),ca=re('<span class="min-w-0 flex-1"> </span> <span class="type-caption text-muted-foreground"> </span>',1),tr=re("<!> <!>",1);function cr(o,t){if(new.target)return je({component:cr,...o});Je(t,!0);let n=v(t,"viewport",7),g=v(t,"onViewportChange",7),m=v(t,"onCustom",7);const P=["phone","tablet","desktop"],b=f(()=>n().mode==="fit"?"fit":n().mode==="preset"?n().presetId:"custom");function F(u){if(u==="fit")return g()({mode:"fit"});const k=Mt.find(O=>O.id===u);k&&g()({mode:"preset",presetId:k.id,width:k.width,height:k.height})}var A={get viewport(){return n()},set viewport(u){n(u),w()},get onViewportChange(){return g()},set onViewportChange(u){g(u),w()},get onCustom(){return m()},set onCustom(u){m(u),w()},$set:Ze,$on:(u,k)=>Xe(t,u,k)},S=er(),s=H(S);Y(s,()=>hn,(u,k)=>{k(u,{get value(){return e(b)},onValueChange:F,children:(O,x)=>{var I=er(),R=H(I);Y(R,()=>Yt,(G,K)=>{K(G,{value:"fit",children:(oe,te)=>{ht();var X=ct();D(le=>J(X,le),[()=>c.browser_viewport_fitPanel_label()]),C(oe,X)},$$slots:{default:!0}})});var T=h(R,2);Pr(T,17,()=>P,Go,(G,K)=>{var oe=er(),te=H(oe);Y(te,()=>mt,(B,ae)=>{ae(B,{})});var X=h(te,2);Y(X,()=>_n,(B,ae)=>{ae(B,{children:(a,l)=>{ht();var j=ct();D(ue=>J(j,ue),[()=>e(K)==="phone"?c.browser_viewport_phoneGroup_label():e(K)==="tablet"?c.browser_viewport_tabletGroup_label():c.browser_viewport_desktopGroup_label()]),C(a,j)},$$slots:{default:!0}})});var le=h(X,2);Pr(le,17,()=>Mt.filter(B=>B.category===e(K)),B=>B.id,(B,ae)=>{var a=ut(),l=H(a);Y(l,()=>Yt,(j,ue)=>{ue(j,{get value(){return e(ae).id},children:(Ie,he)=>{var M=ua(),_=H(M),Z=ke(_,!0),V=h(_,2),z=ke(V,!0);D(y=>{J(Z,e(ae).name),J(z,y)},[()=>c.browser_viewport_dimensions_label({width:ze(e(ae).width),height:ze(e(ae).height)})]),C(Ie,M)},$$slots:{default:!0}})}),C(B,a)}),C(G,oe)});var ee=h(T,2);{var ge=G=>{var K=tr(),oe=H(K);Y(oe,()=>mt,(X,le)=>{le(X,{})});var te=h(oe,2);Y(te,()=>Yt,(X,le)=>{le(X,{value:"custom",get onSelect(){return m()},children:(B,ae)=>{var a=ca(),l=H(a),j=ke(l,!0),ue=h(l,2),Ie=ke(ue,!0);D((he,M)=>{J(j,he),J(Ie,M)},[()=>c.browser_viewport_custom_label(),()=>c.browser_viewport_dimensions_label({width:ze(n().width),height:ze(n().height)})]),C(B,a)},$$slots:{default:!0}})}),C(G,K)};be(ee,G=>{n().mode==="custom"&&G(ge)})}C(O,I)},$$slots:{default:!0}})});var L=h(s,2);{var Q=u=>{var k=tr(),O=H(k);Y(O,()=>mt,(I,R)=>{R(I,{})});var x=h(O,2);Y(x,()=>Ke,(I,R)=>{R(I,{get onSelect(){return m()},children:(T,ee)=>{ht();var ge=ct();D(G=>J(ge,G),[()=>c.browser_viewport_custom_label()]),C(T,ge)},$$slots:{default:!0}})}),C(u,k)};be(L,u=>{n().mode!=="custom"&&u(Q)})}var U=h(L,2);{var $=u=>{var k=tr(),O=H(k);Y(O,()=>mt,(I,R)=>{R(I,{})});var x=h(O,2);{let I=f(()=>c.browser_viewport_rotate_label());Y(x,()=>no,(R,T)=>{T(R,{get icon(){return jr},get label(){return e(I)},onSelect:()=>g()(da(n()))})})}C(u,k)};be(U,u=>{n().mode!=="fit"&&u($)})}return C(o,S),Ye(A)}var fa=re('<div class="grid grid-cols-2 gap-3"><label class="space-y-1 type-caption"><span> </span> <!></label> <label class="space-y-1 type-caption"><span> </span> <!></label></div>');function fr(o,t){if(new.target)return je({component:fr,...o});Je(t,!0);let n=v(t,"open",15,!1),g=v(t,"viewport",7),m=v(t,"onViewportChange",7),P=v(t,"returnFocus",7);const b=320,F=3840;let A=W(1280),S=W(800),s=W(null);function L(u){return typeof u=="number"&&Number.isInteger(u)&&u>=b&&u<=F}const Q=f(()=>L(e(A))&&L(e(S)));Ue(()=>{if(n())return()=>{It().then(()=>{P()?.isConnected&&P().focus()})}}),Ue(()=>{n()||(d(A,g().mode==="fit"?1280:g().width,!0),d(S,g().mode==="fit"?800:g().height,!0))});function U(){!e(Q)||e(A)===null||e(S)===null||(m()({mode:"custom",width:e(A),height:e(S)}),n(!1))}var $={get open(){return n()},set open(u=!1){n(u),w()},get viewport(){return g()},set viewport(u){g(u),w()},get onViewportChange(){return m()},set onViewportChange(u){m(u),w()},get returnFocus(){return P()},set returnFocus(u){P(u),w()},$set:Ze,$on:(u,k)=>Xe(t,u,k)};{let u=f(()=>c.browser_viewport_custom_label()),k=f(()=>c.browser_viewport_sizeRange_description({min:ze(b),max:ze(F)})),O=f(()=>c.browser_viewport_apply_label());qn(o,{get title(){return e(u)},get description(){return e(k)},get submitLabel(){return e(O)},get canSubmit(){return e(Q)},onSubmit:U,get initialFocus(){return e(s)},get open(){return n()},set open(x){n(x)},children:(x,I)=>{var R=fa(),T=ie(R),ee=ie(T),ge=ke(ee,!0),G=h(ee,2);{let le=f(()=>!L(e(A)));Nt(G,{type:"number",min:b,max:F,step:"1",get"aria-invalid"(){return e(le)},get value(){return e(A)},set value(B){d(A,B,!0)},get ref(){return e(s)},set ref(B){d(s,B,!0)}})}se(T);var K=h(T,2),oe=ie(K),te=ke(oe,!0),X=h(oe,2);{let le=f(()=>!L(e(S)));Nt(X,{type:"number",min:b,max:F,step:"1",get"aria-invalid"(){return e(le)},get value(){return e(S)},set value(B){d(S,B,!0)}})}se(K),se(R),D((le,B)=>{J(ge,le),J(te,B)},[()=>c.browser_viewport_width_label(),()=>c.browser_viewport_height_label()]),C(x,R)},$$slots:{default:!0}})}return Ye($)}var Ot=re("<!> <!>",1),ot=re("<!> ",1),ga=re('<!> <span class="min-w-0 flex-1 truncate"> </span>',1),va=re("<!> <!> <!> <!> <!>",1),wa=re('<!> <span class="min-w-0 flex-1"> </span> <kbd class="type-caption ml-5 text-muted-foreground" aria-hidden="true">⌘⌥I</kbd>',1),pa=re("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1);function uo(o,t){if(new.target)return je({component:uo,...o});Je(t,!0);let n=v(t,"errorCount",7,0),g=v(t,"disabled",7,!1),m=v(t,"collapsed",7,!1),P=v(t,"canGoBack",7,!1),b=v(t,"canGoForward",7,!1),F=v(t,"canSelectElement",7,!1),A=v(t,"selectingElement",7,!1),S=v(t,"viewport",23,()=>({mode:"fit"})),s=v(t,"onGoBack",7),L=v(t,"onGoForward",7),Q=v(t,"onToggleElementPicker",7),U=v(t,"onViewportChange",7),$=v(t,"onOpenExternal",7),u=v(t,"onFullScreen",7),k=v(t,"onCopyUrl",7),O=v(t,"onScreenshot",7),x=v(t,"onOpenConsole",7),I=v(t,"onOpenSource",7),R=v(t,"onOpenInspector",7),T=v(t,"onReloadWithoutCache",7);const ee=f(()=>n()>0?c.browser_overflow_triggerWithErrors_ariaLabel({count:ze(n())}):c.browser_overflow_trigger_ariaLabel()),ge=f(()=>S().mode==="preset"?Mt.find(l=>l.id===S().presetId):void 0),G=f(()=>S().mode==="fit"?c.browser_viewport_fitPanel_label():e(ge)?.name??c.browser_viewport_dimensions_label({width:ze(S().width),height:ze(S().height)}));let K=W(!1),oe=W(null),te=W(!1);async function X(){d(te,!1),await It(),d(K,!0)}var le={get errorCount(){return n()},set errorCount(l=0){n(l),w()},get disabled(){return g()},set disabled(l=!1){g(l),w()},get collapsed(){return m()},set collapsed(l=!1){m(l),w()},get canGoBack(){return P()},set canGoBack(l=!1){P(l),w()},get canGoForward(){return b()},set canGoForward(l=!1){b(l),w()},get canSelectElement(){return F()},set canSelectElement(l=!1){F(l),w()},get selectingElement(){return A()},set selectingElement(l=!1){A(l),w()},get viewport(){return S()},set viewport(l={mode:"fit"}){S(l),w()},get onGoBack(){return s()},set onGoBack(l){s(l),w()},get onGoForward(){return L()},set onGoForward(l){L(l),w()},get onToggleElementPicker(){return Q()},set onToggleElementPicker(l){Q(l),w()},get onViewportChange(){return U()},set onViewportChange(l){U(l),w()},get onOpenExternal(){return $()},set onOpenExternal(l){$(l),w()},get onFullScreen(){return u()},set onFullScreen(l){u(l),w()},get onCopyUrl(){return k()},set onCopyUrl(l){k(l),w()},get onScreenshot(){return O()},set onScreenshot(l){O(l),w()},get onOpenConsole(){return x()},set onOpenConsole(l){x(l),w()},get onOpenSource(){return I()},set onOpenSource(l){I(l),w()},get onOpenInspector(){return R()},set onOpenInspector(l){R(l),w()},get onReloadWithoutCache(){return T()},set onReloadWithoutCache(l){T(l),w()},$set:Ze,$on:(l,j)=>Xe(t,l,j)},B=Ot(),ae=H(B);Y(ae,()=>to,(l,j)=>{j(l,{get open(){return e(te)},set open(ue){d(te,ue,!0)},children:(ue,Ie)=>{var he=Ot(),M=H(he);{const Z=(V,z)=>{let y=()=>(z?.()).props;{let q=f(()=>c.browser_overflow_trigger_tooltip());Oe(V,lr(y,{variant:"ghost-light",size:"icon-xs",class:"relative",get disabled(){return g()},get tooltip(){return e(q)},tooltipSide:"bottom",get"aria-label"(){return e(ee)},"data-testid":"browser-overflow-trigger",get ref(){return e(oe)},set ref(E){d(oe,E,!0)},children:(E,Pe)=>{var fe=Ot(),Qe=H(fe);yn(Qe,{class:"size-3.5"});var nt=h(Qe,2);{var We=Fe=>{Gn(Fe,{variant:"destructive",class:"absolute -right-1.5 -top-1.5 h-4 min-w-4 px-1 text-xs leading-none","data-testid":"browser-console-error-badge",children:(Ge,at)=>{ht();var it=ct();D(Me=>J(it,Me),[()=>n()>9?"9+":ze(n())]),C(Ge,it)},$$slots:{default:!0}})};be(nt,Fe=>{n()>0&&Fe(We)})}C(E,fe)},$$slots:{default:!0}}))}};Y(M,()=>Qr,(V,z)=>{z(V,{child:Z,$$slots:{child:!0}})})}var _=h(M,2);Y(_,()=>eo,(Z,V)=>{V(Z,{align:"end",class:"w-56",onCloseAutoFocus:z=>e(K)&&z.preventDefault(),children:(z,y)=>{var q=pa(),E=H(q);{var Pe=ve=>{var we=va(),Ee=H(we);{let ce=f(()=>!P());Y(Ee,()=>Ke,(xe,De)=>{De(xe,{get disabled(){return e(ce)},get onSelect(){return s()},children:(Ne,st)=>{var Ce=ot(),He=H(Ce);ye(He,{get icon(){return dr},size:"xs",class:"w-4 text-muted-foreground"});var et=h(He);D(Ve=>J(et,` ${Ve??""}`),[()=>c.browser_embedded_goBack_ariaLabel()]),C(Ne,Ce)},$$slots:{default:!0}})})}var Re=h(Ee,2);{let ce=f(()=>!b());Y(Re,()=>Ke,(xe,De)=>{De(xe,{get disabled(){return e(ce)},get onSelect(){return L()},children:(Ne,st)=>{var Ce=ot(),He=H(Ce);ye(He,{get icon(){return ur},size:"xs",class:"w-4 text-muted-foreground"});var et=h(He);D(Ve=>J(et,` ${Ve??""}`),[()=>c.browser_embedded_goForward_ariaLabel()]),C(Ne,Ce)},$$slots:{default:!0}})})}var pe=h(Re,2);{let ce=f(()=>!F());Y(pe,()=>Ke,(xe,De)=>{De(xe,{get disabled(){return e(ce)},onSelect:()=>void Q()?.(),children:(Ne,st)=>{var Ce=ot(),He=H(Ce);ye(He,{get icon(){return nr},size:"xs",class:"w-4 text-muted-foreground"});var et=h(He);D(Ve=>J(et,` ${Ve??""}`),[()=>A()?c.browser_embedded_cancelElementSelection_ariaLabel():c.browser_embedded_selectElement_ariaLabel()]),C(Ne,Ce)},$$slots:{default:!0}})})}var me=h(pe,2);Y(me,()=>xn,(ce,xe)=>{xe(ce,{children:(De,Ne)=>{var st=Ot(),Ce=H(st);{let et=f(()=>!U());Y(Ce,()=>Cn,(Ve,ft)=>{ft(Ve,{get disabled(){return e(et)},children:(St,gt)=>{var Pt=ga(),Et=H(Pt);ye(Et,{get icon(){return Zr},size:"xs",class:"w-4 text-muted-foreground"});var Ft=h(Et,2),Ut=ke(Ft,!0);D(Lt=>J(Ut,Lt),[()=>c.browser_viewport_trigger_ariaLabel({mode:e(G)})]),C(St,Pt)},$$slots:{default:!0}})})}var He=h(Ce,2);Y(He,()=>In,(et,Ve)=>{Ve(et,{class:"w-64",children:(ft,St)=>{cr(ft,{get viewport(){return S()},onViewportChange:gt=>U()?.(gt),onCustom:X})},$$slots:{default:!0}})}),C(De,st)},$$slots:{default:!0}})});var Ae=h(me,2);Y(Ae,()=>mt,(ce,xe)=>{xe(ce,{})}),C(ve,we)};be(E,ve=>{m()&&ve(Pe)})}var fe=h(E,2);{var Qe=ve=>{var we=ut(),Ee=H(we);Y(Ee,()=>Ke,(Re,pe)=>{pe(Re,{onSelect:()=>u()(),children:(me,Ae)=>{var ce=ot(),xe=H(ce);ye(xe,{get icon(){return tn},size:"xs",class:"w-4 text-muted-foreground"});var De=h(xe);D(Ne=>J(De,` ${Ne??""}`),[()=>c.browser_overflow_fullScreen_label()]),C(me,ce)},$$slots:{default:!0}})}),C(ve,we)},nt=ve=>{var we=ut(),Ee=H(we);Y(Ee,()=>Ke,(Re,pe)=>{pe(Re,{onSelect:()=>void $()(),children:(me,Ae)=>{var ce=ot(),xe=H(ce);ye(xe,{get icon(){return rn},size:"xs",class:"w-4 text-muted-foreground"});var De=h(xe);D(Ne=>J(De,` ${Ne??""}`),[()=>c.browser_overflow_openExternal_label()]),C(me,ce)},$$slots:{default:!0}})}),C(ve,we)};be(fe,ve=>{u()?ve(Qe):$()&&ve(nt,1)})}var We=h(fe,2);Y(We,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void k()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return Jo},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_copyUrl_label()]),C(Ee,pe)},$$slots:{default:!0}})});var Fe=h(We,2);Y(Fe,()=>mt,(ve,we)=>{we(ve,{})});var Ge=h(Fe,2);Y(Ge,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void O()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return Yo},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_screenshot_label()]),C(Ee,pe)},$$slots:{default:!0}})});var at=h(Ge,2);Y(at,()=>mt,(ve,we)=>{we(ve,{})});var it=h(at,2);Y(it,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void x()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return Qo},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_console_label()]),C(Ee,pe)},$$slots:{default:!0}})});var Me=h(it,2);Y(Me,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void I()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return en},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_source_label()]),C(Ee,pe)},$$slots:{default:!0}})});var qe=h(Me,2);Y(qe,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void R()(),children:(Ee,Re)=>{var pe=wa(),me=H(pe);ye(me,{get icon(){return nr},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me,2),ce=ke(Ae,!0);ht(2),D(xe=>J(ce,xe),[()=>c.browser_overflow_inspector_label()]),C(Ee,pe)},$$slots:{default:!0}})});var Le=h(qe,2);Y(Le,()=>mt,(ve,we)=>{we(ve,{})});var _t=h(Le,2);Y(_t,()=>Ke,(ve,we)=>{we(ve,{onSelect:()=>void T()(),children:(Ee,Re)=>{var pe=ot(),me=H(pe);ye(me,{get icon(){return jr},size:"xs",class:"w-4 text-muted-foreground"});var Ae=h(me);D(ce=>J(Ae,` ${ce??""}`),[()=>c.browser_overflow_reloadWithoutCache_label()]),C(Ee,pe)},$$slots:{default:!0}})}),C(z,q)},$$slots:{default:!0}})}),C(ue,he)},$$slots:{default:!0}})});var a=h(ae,2);return fr(a,{get viewport(){return S()},onViewportChange:l=>U()?.(l),get returnFocus(){return e(oe)},get open(){return e(K)},set open(l){d(K,l,!0)}}),C(o,B),Ye(le)}var ba=re('<span class="truncate"> </span> <!>',1),Ar=re("<!> <!>",1);function co(o,t){if(new.target)return je({component:co,...o});Je(t,!0);let n=v(t,"viewport",7),g=v(t,"onViewportChange",7),m=W(!1),P=W(!1),b=W(null);const F=f(()=>n().mode==="preset"?Mt.find(k=>k.id===n().presetId):void 0),A=f(()=>n().mode==="fit"?"":c.browser_viewport_dimensions_label({width:ze(n().width),height:ze(n().height)})),S=f(()=>n().mode==="fit"?c.browser_viewport_fit_short_label():n().mode==="preset"&&e(F)?e(F).name:e(A)),s=f(()=>n().mode==="fit"?c.browser_viewport_fitPanel_label():e(S));async function L(){d(m,!1),await It(),d(P,!0)}var Q={get viewport(){return n()},set viewport(k){n(k),w()},get onViewportChange(){return g()},set onViewportChange(k){g(k),w()},$set:Ze,$on:(k,O)=>Xe(t,k,O)},U=Ar(),$=H(U);Y($,()=>to,(k,O)=>{O(k,{get open(){return e(m)},set open(x){d(m,x,!0)},children:(x,I)=>{var R=Ar(),T=H(R);{const ge=(G,K)=>{let oe=()=>(K?.()).props;{let te=f(()=>c.browser_viewport_trigger_ariaLabel({mode:e(s)}));Oe(G,lr(oe,{variant:"ghost-light",size:"xs",class:"h-6 max-w-36 gap-1 rounded-full bg-muted px-2 text-xs hover:bg-muted/80",get"aria-label"(){return e(te)},"data-testid":"browser-viewport-trigger",get ref(){return e(b)},set ref(X){d(b,X,!0)},children:(X,le)=>{var B=ba(),ae=H(B),a=ke(ae,!0),l=h(ae,2);ye(l,{get icon(){return on},size:"xs",class:"shrink-0"}),D(()=>J(a,e(S))),C(X,B)},$$slots:{default:!0}}))}};Y(T,()=>Qr,(G,K)=>{K(G,{child:ge,$$slots:{child:!0}})})}var ee=h(T,2);Y(ee,()=>eo,(ge,G)=>{G(ge,{align:"end",class:"w-64",onCloseAutoFocus:K=>e(P)&&K.preventDefault(),children:(K,oe)=>{cr(K,{get viewport(){return n()},get onViewportChange(){return g()},onCustom:L})},$$slots:{default:!0}})}),C(x,R)},$$slots:{default:!0}})});var u=h($,2);return fr(u,{get viewport(){return n()},get onViewportChange(){return g()},get returnFocus(){return e(b)},get open(){return e(P)},set open(k){d(P,k,!0)}}),C(o,U),Ye(Q)}var ma=re('<span data-browser-viewport-readout=""> </span> <!>',1),ha=re('<div data-browser-device-frame-container=""><div><div><!> <!></div> <!></div></div>');function fo(o,t){if(new.target)return je({component:fo,...o});Je(t,!0);const n=320,g=3840,m=150,P=24;let b=v(t,"viewport",7),F=v(t,"onViewportChange",7),A=v(t,"chromeOutside",7,!1),S=v(t,"children",7),s=W(Rt(b().mode==="fit"?n:b().width)),L=W(Rt(b().mode==="fit"?n:b().height)),Q,U=W(0),$=W(0),u=W(!1),k=null,O=0,x=0,I=0,R=0,T;const ee=f(()=>b().mode==="fit"),ge=f(()=>c.browser_viewport_dimensions_label({width:ze(e(s)),height:ze(e(L))})),G=f(()=>A()?Math.max(0,e($)-P):e($)),K=f(()=>!e(ee)&&e(U)>0&&e(G)>0?Math.min(1,e(U)/e(s),e(G)/e(L)):1),oe=f(()=>e(s)*e(K)),te=f(()=>e(L)*e(K));Ue(()=>{e(u)||b().mode==="fit"||(d(s,b().width,!0),d(L,b().height,!0))});function X(y){return Math.min(g,Math.max(n,Math.round(y)))}function le(){F()({mode:"custom",width:e(s),height:e(L)})}function B(){clearTimeout(T),T=setTimeout(le,m)}function ae(y){e(ee)||y.button!==0||(y.preventDefault(),d(u,!0),k=y.pointerId,O=y.clientX,x=y.clientY,I=e(s),R=e(L),y.currentTarget instanceof HTMLElement&&y.currentTarget.setPointerCapture?.(y.pointerId))}function a(y){!e(u)||y.pointerId!==k||(d(s,X(I+y.clientX-O),!0),d(L,X(R+y.clientY-x),!0),B())}function l(y){if(!e(u)||y.pointerId!==k)return;clearTimeout(T),d(u,!1),k=null;const q=y.currentTarget;q instanceof HTMLElement&&q.hasPointerCapture?.(y.pointerId)&&q.releasePointerCapture&&q.releasePointerCapture(y.pointerId),le()}qr(()=>{const y=(E,Pe)=>{d(U,E,!0),d($,Pe,!0)};y(Q.clientWidth,Q.clientHeight);const q=typeof ResizeObserver>"u"?void 0:new ResizeObserver(([E])=>{y(E?.contentRect.width??Q.clientWidth,E?.contentRect.height??Q.clientHeight)});return q?.observe(Q),()=>q?.disconnect()}),Hr(()=>clearTimeout(T));var j={get viewport(){return b()},set viewport(y){b(y),w()},get onViewportChange(){return F()},set onViewportChange(y){F(y),w()},get chromeOutside(){return A()},set chromeOutside(y=!1){A(y),w()},get children(){return S()},set children(y){S(y),w()},$set:Ze,$on:(y,q)=>Xe(t,y,q)},ue=ha();{const y=E=>{var Pe=ma(),fe=H(Pe),Qe=ke(fe,!0),nt=h(fe,2);{let We=f(()=>A()?"top-full":"bottom-0"),Fe=f(()=>c.browser_viewport_resizeHandle_ariaLabel());Oe(nt,{type:"button",variant:"ghost",size:"icon-xs",iconOnly:!0,get class(){return`absolute right-0 z-20 size-5 cursor-nwse-resize touch-none border-0 bg-transparent p-0 after:absolute after:bottom-1 after:right-1 after:size-2 after:border-b-2 after:border-r-2 after:border-muted-foreground ${e(We)??""}`},get"aria-label"(){return e(Fe)},"data-testid":"browser-device-resize-handle",onpointerdown:ae,onpointermove:a,onpointerup:l,onpointercancel:l})}D(()=>{xt(fe,1,`pointer-events-none absolute left-1/2 z-10 -translate-x-1/2 rounded bg-background/90 px-1.5 py-0.5 text-xs text-muted-foreground shadow-sm backdrop-blur ${A()?"top-full mt-0.5":"bottom-1"}`),J(Qe,e(ge))}),C(E,Pe)};var Ie=ie(ue),he=ie(Ie);let q;var M=ie(he);Xo(M,()=>S()??zo);var _=h(M,2);{var Z=E=>{y(E)};be(_,E=>{!e(ee)&&!A()&&E(Z)})}se(he);var V=h(he,2);{var z=E=>{y(E)};be(V,E=>{!e(ee)&&A()&&E(z)})}se(Ie),se(ue),kt(ue,E=>Q=E,()=>Q),D(()=>{xt(Ie,1,`relative ${e(ee)?"h-full w-full":""} ${A()&&!e(ee)?"mb-6":""}`),xt(he,1,`relative overflow-hidden bg-background ${e(ee)?"h-full w-full":e(u)?"ring-2 ring-primary/30":""}`),Be(he,"data-browser-device-frame",e(ee)?void 0:""),Be(he,"data-width",e(ee)?void 0:e(s)),Be(he,"data-height",e(ee)?void 0:e(L)),q=Ho(he,"",q,{width:e(ee)?void 0:`${e(oe)}px`,height:e(ee)?void 0:`${e(te)}px`})})}return D(()=>xt(ue,1,`flex h-full w-full items-center justify-center overflow-hidden ${e(ee)?"bg-background":"bg-muted/40"}`)),C(o,ue),Ye(j)}const rr=Dt("BrowserViewSlot"),Br=()=>new Promise(o=>requestAnimationFrame(()=>o())),Or=async()=>{await Br(),await Br()};function Nr(o,t){return o===t?!0:!o||!t?!1:o.x===t.x&&o.y===t.y&&o.width===t.width&&o.height===t.height}function Mr(o){const t=o.getBoundingClientRect();return t.width<=0||t.height<=0?null:{x:t.left,y:t.top,width:t.width,height:t.height}}function _a(o){return o.isConnected?typeof o.checkVisibility=="function"?o.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0}):!0:!1}function ya(o,t){let n=Dr(o,t),g=`${t.workspaceId}\0${t.tabId}`;return{update(m){const P=`${m.workspaceId}\0${m.tabId}`;if(P===g){n.update(m);return}n.destroy(),g=P,n=Dr(o,m)},destroy(){n.destroy()}}}function Dr(o,t){let n=t;const g=An(o,{tabId:n.tabId,workspaceId:n.workspaceId,url:n.url,...n.pinned===void 0?{}:{pinned:n.pinned}});n.onWebview?.(g.webview);let m=null,P=Promise.resolve(),b="live",F=0,A=null,S=null,s=!1;const L=()=>{A?.remove(),A=null},Q=x=>{m=x;const I=n.tabId;return P=On(I,x.rect,x.visible).catch(R=>rr.debug("Could not place the browser page",{tabId:I,error:R})),P},U=()=>{if(S=null,s)return;const x=Mr(o),I=n.visible&&x!==null&&_a(o)&&b!=="frozen"&&g.ready;g.ready&&(!m||m.visible!==I||x&&!Nr(m.rect,x))&&(Nr(m?.rect??null,x)||Kn(),Q({rect:x??m?.rect??null,visible:I})),S=requestAnimationFrame(U)};S=requestAnimationFrame(U);const $=async x=>{if(b="freezing",g.ready&&m?.visible)try{const I=await g.webview.capturePage?.();if(x!==F||s)return;const R=I?.toDataURL()??"";if(R){const T=document.createElement("img");if(T.alt="",T.setAttribute("aria-hidden","true"),T.dataset.browserViewSnapshot="",T.style.cssText="position:absolute;inset:0;width:100%;height:100%;pointer-events:none;",T.src=R,await T.decode().catch(()=>{}),x!==F||s||(L(),o.append(T),A=T,await Or(),x!==F||s))return}}catch(I){rr.debug("Could not snapshot the browser page",{tabId:n.tabId,error:I})}x!==F||s||(b="frozen")},u=async x=>{if(b="thawing",g.ready&&n.visible){const I=Mr(o);I&&await Q({rect:I,visible:!0}),await Or()}x!==F||s||(L(),b="live")},k=Hn({element:o,onCoveredChange(x){const I=++F;x?$(I):u(I)}});return{update(x){n=x},destroy:()=>{const x=n.tabId;s=!0,S!==null&&cancelAnimationFrame(S),S=null,k(),L(),g.dispose(),n.onWebview?.(null),P.then(()=>Bn(x).catch(I=>rr.debug("Could not take the browser page off screen",{tabId:x,error:I})))}}}var xa=re('<div class="relative h-full w-full overflow-hidden"></div>');function go(o,t){if(new.target)return je({component:go,...o});Je(t,!0);let n=v(t,"tabId",7),g=v(t,"workspaceId",7),m=v(t,"url",7),P=v(t,"pinned",7),b=v(t,"visible",7),F=v(t,"webview",15,null);var A={get tabId(){return n()},set tabId(s){n(s),w()},get workspaceId(){return g()},set workspaceId(s){g(s),w()},get url(){return m()},set url(s){m(s),w()},get pinned(){return P()},set pinned(s){P(s),w()},get visible(){return b()},set visible(s){b(s),w()},get webview(){return F()},set webview(s=null){F(s),w()},$set:Ze,$on:(s,L)=>Xe(t,s,L)},S=xa();return Ct(S,(s,L)=>ya?.(s,L),()=>({tabId:n(),workspaceId:g(),url:m(),...P()===void 0?{}:{pinned:P()},visible:b(),onWebview:s=>F(s)})),Ct(S,(s,L)=>io?.(s,L),n),D(()=>Be(S,"data-browser-view-slot",n())),C(o,S),Ye(A)}function vo(o,t){if(new.target)return je({component:vo,...o});Je(t,!0);let n=v(t,"active",7),g=v(t,"disabled",7),m=v(t,"onToggle",7);var P={get active(){return n()},set active(b){n(b),w()},get disabled(){return g()},set disabled(b){g(b),w()},get onToggle(){return m()},set onToggle(b){m(b),w()},$set:Ze,$on:(b,F)=>Xe(t,b,F)};{let b=f(()=>n()?"bg-muted text-foreground":""),F=f(()=>n()?c.browser_embedded_cancelElementSelection_tooltip():c.browser_embedded_selectElement_tooltip()),A=f(()=>n()?c.browser_embedded_cancelElementSelection_ariaLabel():c.browser_embedded_selectElement_ariaLabel());Oe(o,{variant:"ghost-light",size:"icon-xs",get class(){return e(b)},get onclick(){return m()},get disabled(){return g()},get tooltip(){return e(F)},tooltipSide:"bottom",get"aria-label"(){return e(A)},get"aria-pressed"(){return n()},"data-testid":"browser-select-element",children:(S,s)=>{ye(S,{get icon(){return nr},size:"xs"})},$$slots:{default:!0}})}return Ye(P)}var Ca=re('<span class="sr-only"> </span>'),Ia=re('<p class="min-h-0 overflow-y-auto text-sm text-foreground [overflow-wrap:anywhere]"> </p> <!>',1),ka=re("<!> <!>",1),Pa=re('<span class="inline-flex shrink-0"><!> <!></span>');function gr(o,t){const n=Kr();if(new.target)return je({component:gr,...o});Je(t,!0);let g=v(t,"label",7),m=v(t,"description",7),P=v(t,"ariaLabel",23,g),b=v(t,"tone",7,"info"),F=v(t,"actionLabel",7),A=v(t,"onAction",7),S=v(t,"actionFocusTarget",7),s=v(t,"descriptionId",7),L=W(!1),Q=!1;async function U(){Q=!0,d(L,!1),await It(),S()?.focus(),A()?.()}var $={get label(){return g()},set label(I){g(I),w()},get description(){return m()},set description(I){m(I),w()},get ariaLabel(){return P()},set ariaLabel(I=g){P(I),w()},get tone(){return b()},set tone(I="info"){b(I),w()},get actionLabel(){return F()},set actionLabel(I){F(I),w()},get onAction(){return A()},set onAction(I){A(I),w()},get actionFocusTarget(){return S()},set actionFocusTarget(I){S(I),w()},get descriptionId(){return s()},set descriptionId(I){s(I),w()},$set:Ze,$on:(I,R)=>Xe(t,I,R)},u=Pa(),k=ie(u);{var O=I=>{var R=Ca(),T=ke(R,!0);D(()=>{Be(R,"id",n),Be(R,"role",b()==="error"?"alert":"status"),J(T,m())}),C(I,R)};be(k,I=>{s()||I(O)})}var x=h(k,2);return Y(x,()=>Xn,(I,R)=>{R(I,{get open(){return e(L)},set open(T){d(L,T,!0)},children:(T,ee)=>{var ge=ka(),G=H(ge);{const oe=(te,X)=>{let le=()=>(X?.()).props;{let B=f(()=>b()==="error"?"text-danger":b()==="warning"?"text-warning-ink":"text-muted-foreground"),ae=f(()=>s()??n);Oe(te,lr(le,{variant:"ghost-light",size:"icon-compact",wrapContent:!1,get class(){return e(B)},get"aria-label"(){return P()},get"aria-describedby"(){return e(ae)},get tooltip(){return m()},get tooltipDisabled(){return e(L)},tooltipSide:"bottom",tooltipDelayDuration:300,children:(a,l)=>{{let j=f(()=>b()==="error"?Xr:b()==="warning"?nn:Zr);ye(a,{get icon(){return e(j)},size:"xs",class:"shrink-0"})}},$$slots:{default:!0}}))}};Y(G,()=>jn,(te,X)=>{X(te,{child:oe,$$slots:{child:!0}})})}var K=h(G,2);Y(K,()=>Zn,(oe,te)=>{te(oe,{align:"end",class:"flex max-h-[var(--bits-popover-content-available-height,calc(100dvh-1rem))] w-72 max-w-[calc(100vw-1rem)] flex-col gap-3 p-3",get"aria-label"(){return P()},onCloseAutoFocus:X=>{Q&&S()&&(X.preventDefault(),S().focus()),Q=!1},children:(X,le)=>{var B=Ia(),ae=H(B),a=ke(ae,!0),l=h(ae,2);{var j=ue=>{Oe(ue,{variant:"secondary",size:"sm",class:"self-start",onclick:()=>void U(),children:(Ie,he)=>{ht();var M=ct();D(()=>J(M,F())),C(Ie,M)},$$slots:{default:!0}})};be(l,ue=>{F()&&A()&&ue(j)})}D(()=>J(a,m())),C(X,B)},$$slots:{default:!0}})}),C(T,ge)},$$slots:{default:!0}})}),se(u),D(()=>Be(u,"data-browser-status",b())),C(o,u),Ye($)}function Ea(o,t,n){const g=n.width>0?t.width/n.width:1,m=n.height>0?t.height/n.height:1,P=Math.max(0,Math.floor(o.x*g)),b=Math.max(0,Math.floor(o.y*m)),F=Math.min(t.width,Math.ceil((o.x+o.width)*g)),A=Math.min(t.height,Math.ceil((o.y+o.height)*m));return{x:P,y:b,width:Math.max(0,F-P),height:Math.max(0,A-b)}}const Fa=$r({selector:wt().min(1),domPath:wt().min(1),tagName:wt().min(1),id:wt(),className:wt(),textSnippet:wt().max(120),rect:$r({x:Bt().finite(),y:Bt().finite(),width:Bt().finite().nonnegative(),height:Bt().finite().nonnegative()}).strict(),pageUrl:wt().min(1),sourceRef:wt().min(1).optional()}).strict(),Vr="__INTENT_ELEMENT_PICKED__:";function Sa(o){if(o==="__INTENT_ELEMENT_PICK_CANCELLED__")return{type:"cancelled"};if(!o.startsWith(Vr))return null;let t;try{t=JSON.parse(o.slice(Vr.length))}catch{t=null}const n=Fa.safeParse(t);return n.success?{type:"picked",element:n.data}:{type:"malformed",issues:n.error.issues}}const La=String.raw`
2
2
  (function() {
3
3
  var PICKED_PREFIX = '__INTENT_ELEMENT_PICKED__:';
4
4
  var CANCELLED = '__INTENT_ELEMENT_PICK_CANCELLED__';
@@ -1,4 +1,4 @@
1
- import{b as p,ay as C,aX as H,W as _,r as q,a6 as G,B as U,aV as j,X as K}from"./DabFMHr_.js";var A="",M="",O="",D=[],b=new Map,v=p(e=>j(e,K()),"sanitizeText"),y=p(e=>{switch(e.type){case"terminal":return{...e,value:v(e.value)};case"nonterminal":return{...e,name:v(e.name)};case"sequence":return{...e,elements:e.elements.map(y)};case"choice":return{...e,alternatives:e.alternatives.map(y)};case"optional":return{...e,element:y(e.element)};case"repetition":return{...e,element:y(e.element),separator:e.separator?y(e.separator):void 0};case"special":return{...e,text:v(e.text)}}},"sanitizeAstNode"),J=p(()=>{A="",M="",O="",D.length=0,b.clear(),q(),C.debug("[Railroad] Database cleared")},"clear"),Y=p(e=>{A=v(e),C.debug("[Railroad] Title set:",e)},"setTitle"),P=p(()=>A,"getTitle"),Q=p(e=>{const i={...e,name:v(e.name),definition:y(e.definition),comment:e.comment?v(e.comment):void 0};C.debug("[Railroad] Adding rule:",i.name),b.has(i.name)&&C.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),D.push(i),b.set(i.name,i)},"addRule"),Z=p(()=>D,"getRules"),V=p(e=>b.get(e),"getRule"),ee=p(e=>{M=v(e).replace(/^\s+/g,""),C.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),te=p(()=>M,"getAccTitle"),re=p(e=>{O=v(e).replace(/\n\s+/g,`
1
+ import{b as p,ay as C,aX as H,W as _,r as q,a6 as G,B as U,aV as j,X as K}from"./Dp6gutm7.js";var A="",M="",O="",D=[],b=new Map,v=p(e=>j(e,K()),"sanitizeText"),y=p(e=>{switch(e.type){case"terminal":return{...e,value:v(e.value)};case"nonterminal":return{...e,name:v(e.name)};case"sequence":return{...e,elements:e.elements.map(y)};case"choice":return{...e,alternatives:e.alternatives.map(y)};case"optional":return{...e,element:y(e.element)};case"repetition":return{...e,element:y(e.element),separator:e.separator?y(e.separator):void 0};case"special":return{...e,text:v(e.text)}}},"sanitizeAstNode"),J=p(()=>{A="",M="",O="",D.length=0,b.clear(),q(),C.debug("[Railroad] Database cleared")},"clear"),Y=p(e=>{A=v(e),C.debug("[Railroad] Title set:",e)},"setTitle"),P=p(()=>A,"getTitle"),Q=p(e=>{const i={...e,name:v(e.name),definition:y(e.definition),comment:e.comment?v(e.comment):void 0};C.debug("[Railroad] Adding rule:",i.name),b.has(i.name)&&C.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),D.push(i),b.set(i.name,i)},"addRule"),Z=p(()=>D,"getRules"),V=p(e=>b.get(e),"getRule"),ee=p(e=>{M=v(e).replace(/^\s+/g,""),C.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),te=p(()=>M,"getAccTitle"),re=p(e=>{O=v(e).replace(/\n\s+/g,`
2
2
  `),C.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),ie=p(()=>O,"getAccDescription"),ae=Y,ne=P,oe={clear:J,setTitle:Y,getTitle:P,addRule:Q,getRules:Z,getRule:V,setAccTitle:ee,getAccTitle:te,setAccDescription:re,getAccDescription:ie,setDiagramTitle:ae,getDiagramTitle:ne},f={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},le=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,se=/^[\w "',.-]+$/,de=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),L=p(e=>e?Object.keys(e).every(i=>i==="railroad"||de.has(i)):!1,"isRailroadStyleOptions"),ce=p(e=>e?"railroad"in e&&e.railroad?e.railroad:L(e)?e:{}:{},"extractRailroadOverrides"),me=p(e=>{if(!e||L(e))return{};const{railroad:i,svgId:n,theme:a,look:t,...r}=e;return r},"extractThemeOverrides"),m=p((e,i)=>{if(typeof e!="string")return i;const n=e.trim();return le.test(n)?n:i},"sanitizeColorValue"),X=p((e,i)=>{if(typeof e!="string")return i;const n=e.trim();return se.test(n)?n:i},"sanitizeFontFamilyValue"),F=p((e,i)=>{const n=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(n)&&n>=0?n:i},"sanitizeNumberValue"),he=p(e=>{const i=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(i)&&i>0?i:void 0},"parseThemeFontSize"),pe=p(e=>{const i=X(e.fontFamily,f.fontFamily),n=he(e.fontSize)??f.fontSize;return{...f,fontFamily:i,fontSize:n,terminalFill:m(e.secondBkg??e.secondaryColor,f.terminalFill),terminalStroke:m(e.secondaryBorderColor??e.lineColor,f.terminalStroke),terminalTextColor:m(e.secondaryTextColor??e.textColor,f.terminalTextColor),nonTerminalFill:m(e.mainBkg??e.background,f.nonTerminalFill),nonTerminalStroke:m(e.primaryBorderColor??e.lineColor,f.nonTerminalStroke),nonTerminalTextColor:m(e.primaryTextColor??e.textColor,f.nonTerminalTextColor),lineColor:m(e.lineColor,f.lineColor),markerFill:m(e.lineColor,f.markerFill),commentFill:m(e.labelBackground??e.tertiaryColor,f.commentFill),commentStroke:m(e.tertiaryBorderColor??e.lineColor,f.commentStroke),commentTextColor:m(e.tertiaryTextColor??e.textColor,f.commentTextColor),specialFill:m(e.tertiaryColor??e.secondaryColor,f.specialFill),specialStroke:m(e.tertiaryBorderColor??e.secondaryBorderColor,f.specialStroke),ruleNameColor:m(e.titleColor??e.textColor,f.ruleNameColor)}},"buildThemeDefaults"),E=p(e=>{const i=_(),n={...G(),...i.themeVariables??{},...me(e)},a=pe(n),t={...i.railroad??{},...ce(e)};return{compactMode:t.compactMode??a.compactMode,padding:F(t.padding,a.padding),verticalSeparation:F(t.verticalSeparation,a.verticalSeparation),horizontalSeparation:F(t.horizontalSeparation,a.horizontalSeparation),arcRadius:F(t.arcRadius,a.arcRadius),fontSize:F(t.fontSize,a.fontSize),fontFamily:X(t.fontFamily,a.fontFamily),terminalFill:m(t.terminalFill,a.terminalFill),terminalStroke:m(t.terminalStroke,a.terminalStroke),terminalTextColor:m(t.terminalTextColor,a.terminalTextColor),nonTerminalFill:m(t.nonTerminalFill,a.nonTerminalFill),nonTerminalStroke:m(t.nonTerminalStroke,a.nonTerminalStroke),nonTerminalTextColor:m(t.nonTerminalTextColor,a.nonTerminalTextColor),lineColor:m(t.lineColor,a.lineColor),strokeWidth:F(t.strokeWidth,a.strokeWidth),markerFill:m(t.markerFill,a.markerFill),commentFill:m(t.commentFill,a.commentFill),commentStroke:m(t.commentStroke,a.commentStroke),commentTextColor:m(t.commentTextColor,a.commentTextColor),specialFill:m(t.specialFill,a.specialFill),specialStroke:m(t.specialStroke,a.specialStroke),ruleNameColor:m(t.ruleNameColor,a.ruleNameColor),showMarkers:t.showMarkers??a.showMarkers,markerRadius:F(t.markerRadius,a.markerRadius)}},"buildRailroadStyleOptions"),Te=p(e=>{const{fontFamily:i,fontSize:n,terminalFill:a,terminalStroke:t,terminalTextColor:r,nonTerminalFill:o,nonTerminalStroke:g,nonTerminalTextColor:l,lineColor:s,strokeWidth:h,markerFill:u,commentFill:c,commentStroke:w,commentTextColor:d,specialFill:T,specialStroke:z,ruleNameColor:S}=E(e);return`
3
3
  .railroad-diagram {
4
4
  font-family: ${i};
@@ -1,2 +1,2 @@
1
- import{t as se,bo as a,bw as ie,b as ae}from"./Fcr7AvC-.js";import{bs as le,bV as oe,br as ge,ca as ue,bH as q,a5 as p,bA as m,bS as V,aD as C,b_ as P,W as w,bn as ce,c9 as W,aA as l,bl as he,bO as de,aB as I}from"./3SdAC2_C.js";import{i as me}from"./BhYXv0ZM.js";import{g as Y,i as fe}from"./CA6H1-bp.js";import{h as ve}from"./BKD7o1lQ.js";import{f as v,g as be}from"./BRCr02in.js";import{H as R}from"./CcNhqKh5.js";import{C as _e}from"./DkQdSPDN.js";function A(r){const t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return r.replace(/[&<>"']/g,n=>t[n])}const pe=300,Ce=2e6,xe=1e5,u=new Map;let X=0;function Q(r,t){return`${t}\0${r}`}function Z(r,t){const n=Q(r,t),s=u.get(n);return s===void 0?null:(u.delete(n),u.set(n,s),s)}function F(r){const t=u.get(r);t!==void 0&&(X-=r.length+t.length,u.delete(r))}function He(r,t){F(r);const n=r.length+t.length;if(!(n>xe)){for(;u.size>=pe||u.size>0&&X+n>Ce;){const s=u.keys().next().value;if(s===void 0)break;F(s)}u.set(r,t),X+=n}}function ye(){return new Promise(r=>{typeof requestIdleCallback=="function"?requestIdleCallback(()=>r(),{timeout:200}):setTimeout(r,0)})}function Ne(r,t){try{return t&&R.getLanguage(t)?R.highlight(r,{language:t}).value:R.highlightAuto(r).value}catch{return A(r)}}const k=new Map;function Le(r,t,n){const s=Q(r,t),f=u.get(s);if(f!==void 0)return Promise.resolve(f);const c=k.get(s);if(c)return c.staleChecks.push(n??(()=>!1)),c.promise;const g={staleChecks:[n??(()=>!1)],promise:Promise.resolve("")};return g.promise=ye().then(()=>{if(k.get(s)===g&&k.delete(s),g.staleChecks.every(x=>x()))return A(r);const b=Ne(r,t);return He(s,b),b}),k.set(s,g),g.promise}var we=I("<div> </div>"),ke=I('<div class="line-numbers-gutter select-none text-right flex-shrink-0 py-3 pl-3 pr-2 svelte-1irg7m4"></div>'),Ae=I("<div></div>"),Ie=I('<div><div class="absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity z-10"><!></div> <div class="flex"><!> <div><pre><code></code></pre></div></div></div>');function Se(r,t){if(new.target)return se({component:Se,...r});le(t,!0);const n=a(t,"code",7,""),s=a(t,"language",7,"plaintext"),f=a(t,"showLineNumbers",7,!1),c=a(t,"startLineNumber",7,1),g=a(t,"highlightLines",23,()=>[]),b=a(t,"fileName",7,""),x=a(t,"filename",7,""),H=a(t,"maxHeight",7,void 0),S=a(t,"noBorder",7,!1),y=a(t,"noMargin",7,!1),M=a(t,"doScroll",7,!0),B=a(t,"className",7,"");let N=oe(ge(Z(n(),s())??A(n())));ue(()=>{const e=n(),i=s(),h=Z(e,i);if(h!==null){q(N,h,!0);return}q(N,A(e),!0);let o=!1;return Le(e,i,()=>o).then(d=>{o||q(N,d,!0)}),()=>{o=!0}});const j=W(()=>C(N).split(`
1
+ import{t as se,bo as a,bw as ie,b as ae}from"./Fcr7AvC-.js";import{bs as le,bV as oe,br as ge,ca as ue,bH as q,a5 as p,bA as m,bS as V,aD as C,b_ as P,W as w,bn as ce,c9 as W,aA as l,bl as he,bO as de,aB as I}from"./3SdAC2_C.js";import{i as me}from"./BhYXv0ZM.js";import{g as Y,i as fe}from"./CA6H1-bp.js";import{h as ve}from"./BKD7o1lQ.js";import{f as v,g as be}from"./BRCr02in.js";import{H as R}from"./CcNhqKh5.js";import{C as _e}from"./qB07BmZl.js";function A(r){const t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return r.replace(/[&<>"']/g,n=>t[n])}const pe=300,Ce=2e6,xe=1e5,u=new Map;let X=0;function Q(r,t){return`${t}\0${r}`}function Z(r,t){const n=Q(r,t),s=u.get(n);return s===void 0?null:(u.delete(n),u.set(n,s),s)}function F(r){const t=u.get(r);t!==void 0&&(X-=r.length+t.length,u.delete(r))}function He(r,t){F(r);const n=r.length+t.length;if(!(n>xe)){for(;u.size>=pe||u.size>0&&X+n>Ce;){const s=u.keys().next().value;if(s===void 0)break;F(s)}u.set(r,t),X+=n}}function ye(){return new Promise(r=>{typeof requestIdleCallback=="function"?requestIdleCallback(()=>r(),{timeout:200}):setTimeout(r,0)})}function Ne(r,t){try{return t&&R.getLanguage(t)?R.highlight(r,{language:t}).value:R.highlightAuto(r).value}catch{return A(r)}}const k=new Map;function Le(r,t,n){const s=Q(r,t),f=u.get(s);if(f!==void 0)return Promise.resolve(f);const c=k.get(s);if(c)return c.staleChecks.push(n??(()=>!1)),c.promise;const g={staleChecks:[n??(()=>!1)],promise:Promise.resolve("")};return g.promise=ye().then(()=>{if(k.get(s)===g&&k.delete(s),g.staleChecks.every(x=>x()))return A(r);const b=Ne(r,t);return He(s,b),b}),k.set(s,g),g.promise}var we=I("<div> </div>"),ke=I('<div class="line-numbers-gutter select-none text-right flex-shrink-0 py-3 pl-3 pr-2 svelte-1irg7m4"></div>'),Ae=I("<div></div>"),Ie=I('<div><div class="absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity z-10"><!></div> <div class="flex"><!> <div><pre><code></code></pre></div></div></div>');function Se(r,t){if(new.target)return se({component:Se,...r});le(t,!0);const n=a(t,"code",7,""),s=a(t,"language",7,"plaintext"),f=a(t,"showLineNumbers",7,!1),c=a(t,"startLineNumber",7,1),g=a(t,"highlightLines",23,()=>[]),b=a(t,"fileName",7,""),x=a(t,"filename",7,""),H=a(t,"maxHeight",7,void 0),S=a(t,"noBorder",7,!1),y=a(t,"noMargin",7,!1),M=a(t,"doScroll",7,!0),B=a(t,"className",7,"");let N=oe(ge(Z(n(),s())??A(n())));ue(()=>{const e=n(),i=s(),h=Z(e,i);if(h!==null){q(N,h,!0);return}q(N,A(e),!0);let o=!1;return Le(e,i,()=>o).then(d=>{o||q(N,d,!0)}),()=>{o=!0}});const j=W(()=>C(N).split(`
2
2
  `)),U=W(()=>Array.from({length:C(j).length},(e,i)=>c()+i));var $={get code(){return n()},set code(e=""){n(e),l()},get language(){return s()},set language(e="plaintext"){s(e),l()},get showLineNumbers(){return f()},set showLineNumbers(e=!1){f(e),l()},get startLineNumber(){return c()},set startLineNumber(e=1){c(e),l()},get highlightLines(){return g()},set highlightLines(e=[]){g(e),l()},get fileName(){return b()},set fileName(e=""){b(e),l()},get filename(){return x()},set filename(e=""){x(e),l()},get maxHeight(){return H()},set maxHeight(e=void 0){H(e),l()},get noBorder(){return S()},set noBorder(e=!1){S(e),l()},get noMargin(){return y()},set noMargin(e=!1){y(e),l()},get doScroll(){return M()},set doScroll(e=!0){M(e),l()},get className(){return B()},set className(e=""){B(e),l()},$set:ie,$on:(e,i)=>ae(t,e,i)},_=Ie();let D;var G=p(_),ee=p(G);_e(ee,{get text(){return n()},size:"xs",class:"bg-background/80 hover:bg-hover text-muted-foreground hover:text-foreground backdrop-blur-sm"}),m(G);var J=V(G,2),K=p(J);{var te=e=>{var i=ke();Y(i,20,()=>C(U),h=>h,(h,o)=>{var d=we();let L;var re=he(d,!0);P(ne=>{L=v(d,1,"line-number svelte-1irg7m4",null,L,{highlighted:ne}),de(re,o)},[()=>g().includes(o)]),w(h,d)}),m(i),w(e,i)};me(K,e=>{f()&&e(te)})}var E=V(K,2),T=p(E);let O;var z=p(T);return Y(z,21,()=>C(j),fe,(e,i,h)=>{var o=Ae();let d;ve(o,()=>C(i)||" ",!0),m(o),P(L=>d=v(o,1,"code-line svelte-1irg7m4",null,d,{highlighted:L}),[()=>g().includes(c()+h)]),w(e,o)}),m(z),m(T),m(E),m(J),m(_),P(()=>{D=v(_,1,`code-block-container group rounded-md overflow-hidden relative ${B()??""}`,"svelte-1irg7m4",D,{"mt-3":!y(),"mb-5":!y(),"no-border":S()}),be(_,H()?`max-height: ${H()}px; overflow-y: auto;`:""),v(E,1,`flex-1 ${M()?"overflow-x-auto":""}`),O=v(T,1,"code-pre py-3 pr-3 bg-background! svelte-1irg7m4",null,O,{"pl-3":!f()}),v(z,1,`hljs language-${s()??""}`,"svelte-1irg7m4")}),w(r,_),ce($)}export{Se as C};