@intent-hq/web 2.391.1 → 2.392.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{CpwS8V1F.js → 1NvRJVY9.js} +1 -1
  3. package/web/app/immutable/chunks/{B2awO10u.js → 2OP7IVCM.js} +1 -1
  4. package/web/app/immutable/chunks/{BZ27qIg1.js → 2z64ELW5.js} +1 -1
  5. package/web/app/immutable/chunks/{DLqZuVvj.js → 52kdRKiP.js} +1 -1
  6. package/web/app/immutable/chunks/{pXrAh3i2.js → 7590d3_e.js} +1 -1
  7. package/web/app/immutable/chunks/{CaX8Mme7.js → 7BHYBi88.js} +1 -1
  8. package/web/app/immutable/chunks/{DJcR4XQR.js → 8ljmIEEj.js} +1 -1
  9. package/web/app/immutable/chunks/{DXCHCOFX.js → 9ryMZ44V.js} +1 -1
  10. package/web/app/immutable/chunks/{DISm8kek.js → AVUhaNFO.js} +1 -1
  11. package/web/app/immutable/chunks/{ByP-EusE.js → B-mEBo1a.js} +1 -1
  12. package/web/app/immutable/chunks/{CVtLV3_x.js → B0SSzYpD.js} +1 -1
  13. package/web/app/immutable/chunks/{9eqoPT_C.js → B2-ooCTr.js} +1 -1
  14. package/web/app/immutable/chunks/{CedswVQA.js → B36ccT8S.js} +1 -1
  15. package/web/app/immutable/chunks/{CIxnaBAb.js → B469nFvV.js} +2 -2
  16. package/web/app/immutable/chunks/{YQwkPi_0.js → B4OBYHli.js} +1 -1
  17. package/web/app/immutable/chunks/{g5QqP-QE.js → B6Qz5J1y.js} +1 -1
  18. package/web/app/immutable/chunks/{CwOdvmTo.js → B6SGYvow.js} +3 -3
  19. package/web/app/immutable/chunks/{23FyIn6O.js → B76dt5zP.js} +1 -1
  20. package/web/app/immutable/chunks/{Dh1j4V0b.js → B77w2td3.js} +1 -1
  21. package/web/app/immutable/chunks/{DWRtOXBU.js → B8RXlIBH.js} +1 -1
  22. package/web/app/immutable/chunks/{DG3-me8H.js → B8m3-qrW.js} +1 -1
  23. package/web/app/immutable/chunks/{C5tJUrGJ.js → B8pX1T5t.js} +1 -1
  24. package/web/app/immutable/chunks/{Dt_7lHy8.js → B9-jkWWp.js} +1 -1
  25. package/web/app/immutable/chunks/{DPk2fLxi.js → B9R2bql6.js} +1 -1
  26. package/web/app/immutable/chunks/{CT8vPg_p.js → BAtAwQ72.js} +2 -2
  27. package/web/app/immutable/chunks/{DGU9U1O6.js → BBfR26V0.js} +1 -1
  28. package/web/app/immutable/chunks/{BB2vaoZ2.js → BCL-o_Md.js} +3 -3
  29. package/web/app/immutable/chunks/{C4l6men1.js → BCw-LKCu.js} +1 -1
  30. package/web/app/immutable/chunks/{CoSEZL3s.js → BCwKGJpG.js} +1 -1
  31. package/web/app/immutable/chunks/{WYNXUtt9.js → BDQvAsU6.js} +1 -1
  32. package/web/app/immutable/chunks/{KWtYfwVq.js → BE4DZU9i.js} +1 -1
  33. package/web/app/immutable/chunks/{C3JJkOFb.js → BEGGqaof.js} +1 -1
  34. package/web/app/immutable/chunks/{CyvzL5p8.js → BFO-Le8U.js} +3 -3
  35. package/web/app/immutable/chunks/{CUZpLDKB.js → BFVncOQi.js} +1 -1
  36. package/web/app/immutable/chunks/BGSmaq6H.js +1 -0
  37. package/web/app/immutable/chunks/{CEyWnfg4.js → BJIUXUAo.js} +1 -1
  38. package/web/app/immutable/chunks/{z4O7yNZ6.js → BJRZEnHw.js} +1 -1
  39. package/web/app/immutable/chunks/{Dd_KPYBw.js → BK5l06W2.js} +1 -1
  40. package/web/app/immutable/chunks/{B_JGVEqN.js → BKGQPtRi.js} +1 -1
  41. package/web/app/immutable/chunks/BKxcGjV6.js +1 -0
  42. package/web/app/immutable/chunks/{DoJ49Zrl.js → BLUGgUG-.js} +1 -1
  43. package/web/app/immutable/chunks/{C2tSFTTb.js → BN9pl0_x.js} +1 -1
  44. package/web/app/immutable/chunks/{Bpi8OSTE.js → BNNeufNk.js} +1 -1
  45. package/web/app/immutable/chunks/{DLt9OoMP.js → BPd-Q6x4.js} +1 -1
  46. package/web/app/immutable/chunks/{CV17KbhT.js → BQ5x_RaT.js} +1 -1
  47. package/web/app/immutable/chunks/{B26ZHg3s.js → BRCr02in.js} +1 -1
  48. package/web/app/immutable/chunks/{DidHgSQp.js → BRPh2Gky.js} +2 -2
  49. package/web/app/immutable/chunks/{CHIxjTWu.js → BS1zON0P.js} +1 -1
  50. package/web/app/immutable/chunks/{kkKMJ9w9.js → BS5e_kKu.js} +1 -1
  51. package/web/app/immutable/chunks/{6JlgfFWd.js → BT6sDnDt.js} +1 -1
  52. package/web/app/immutable/chunks/{BSKVcPN7.js → BVhnyyZ7.js} +1 -1
  53. package/web/app/immutable/chunks/{CH6Im5iM.js → BYfDvU8j.js} +1 -1
  54. package/web/app/immutable/chunks/{DMudvlKI.js → BZnji9hP.js} +4 -4
  55. package/web/app/immutable/chunks/{D3pRyooW.js → B_4oJZFT.js} +1 -1
  56. package/web/app/immutable/chunks/{z0xDttNV.js → B_DmwFyf.js} +3 -3
  57. package/web/app/immutable/chunks/{C1MYTxgW.js → B_GvRk21.js} +1 -1
  58. package/web/app/immutable/chunks/{BQCtWEZ2.js → BbK9qDRy.js} +1 -1
  59. package/web/app/immutable/chunks/{Ci6PI5sn.js → Bc4EBjSN.js} +1 -1
  60. package/web/app/immutable/chunks/{CiHhUIjb.js → BdWMbiFk.js} +1 -1
  61. package/web/app/immutable/chunks/{7-WRRruG.js → Bdh-SKNo.js} +1 -1
  62. package/web/app/immutable/chunks/{D9R5fzn8.js → Beq_QLuz.js} +1 -1
  63. package/web/app/immutable/chunks/{D9T_0Eev.js → Bg5K6Ci3.js} +3 -3
  64. package/web/app/immutable/chunks/{B2Ny2uiy.js → Bh3yfjRP.js} +1 -1
  65. package/web/app/immutable/chunks/{DynUeYUu.js → BhYXv0ZM.js} +1 -1
  66. package/web/app/immutable/chunks/{CKTB5KRw.js → BhxHPYvf.js} +1 -1
  67. package/web/app/immutable/chunks/{Di3gErxh.js → BirGv2ci.js} +1 -1
  68. package/web/app/immutable/chunks/{Csqi0oV3.js → Bj58rFtD.js} +1 -1
  69. package/web/app/immutable/chunks/{0R5VEpaM.js → BjEG_fCJ.js} +4 -4
  70. package/web/app/immutable/chunks/{CA-b7pAY.js → BjPpzZjk.js} +2 -2
  71. package/web/app/immutable/chunks/{CwqJ7uz4.js → Bk3dX2Ob.js} +1 -1
  72. package/web/app/immutable/chunks/{BLtLj2yz.js → BkxevPaB.js} +1 -1
  73. package/web/app/immutable/chunks/{OsJD3pkm.js → Bky3Gaqa.js} +1 -1
  74. package/web/app/immutable/chunks/{CwCvyVGi.js → BmqZzhgO.js} +1 -1
  75. package/web/app/immutable/chunks/{B28HQLvX.js → BmyNM7bS.js} +1 -1
  76. package/web/app/immutable/chunks/{BRScUzfU.js → BnGY4PVn.js} +1 -1
  77. package/web/app/immutable/chunks/{Dk7Kxi97.js → BnJ52enz.js} +1 -1
  78. package/web/app/immutable/chunks/{BZCcX8wj.js → BnbmXiW4.js} +2 -2
  79. package/web/app/immutable/chunks/{Chbrtg19.js → BnnKw3Va.js} +1 -1
  80. package/web/app/immutable/chunks/{DmQ5G_6J.js → Bo0PodRV.js} +1 -1
  81. package/web/app/immutable/chunks/{BDeGl6ee.js → Boky5e4-.js} +1 -1
  82. package/web/app/immutable/chunks/{Cxc8q3rR.js → BonA_mfc.js} +1 -1
  83. package/web/app/immutable/chunks/{DIIj7EWA.js → BpFxCD0b.js} +1 -1
  84. package/web/app/immutable/chunks/{qWgJ-CUF.js → BqF1bVQC.js} +2 -2
  85. package/web/app/immutable/chunks/{DqtLBCnq.js → BqRQBnTW.js} +1 -1
  86. package/web/app/immutable/chunks/{9GL-RXJZ.js → Bs5b-3jJ.js} +1 -1
  87. package/web/app/immutable/chunks/{BM39k1x6.js → BusD2v6a.js} +1 -1
  88. package/web/app/immutable/chunks/{Bhyo7hBL.js → Bvwrya09.js} +1 -1
  89. package/web/app/immutable/chunks/{RV6uszBL.js → Bw-Zu1Zf.js} +1 -1
  90. package/web/app/immutable/chunks/{QzxpbvSo.js → BwweojP5.js} +1 -1
  91. package/web/app/immutable/chunks/{K0WiFC8Y.js → BxCgCRwx.js} +1 -1
  92. package/web/app/immutable/chunks/{CnDgS0vt.js → ByaJIEgQ.js} +1 -1
  93. package/web/app/immutable/chunks/{DuZtgB5V.js → BybDBA-a.js} +1 -1
  94. package/web/app/immutable/chunks/{CyinuwPx.js → BzKqzACd.js} +1 -1
  95. package/web/app/immutable/chunks/{Bz80vYvX.js → BzXQ5SMs.js} +1 -1
  96. package/web/app/immutable/chunks/{Q1bO23Hj.js → C-BJXKy-.js} +1 -1
  97. package/web/app/immutable/chunks/{BSZu3BUb.js → C-e2e9PC.js} +1 -1
  98. package/web/app/immutable/chunks/{BTXzEcFX.js → C0JQvbI4.js} +1 -1
  99. package/web/app/immutable/chunks/{CAGrRNbp.js → C1SGWBXH.js} +1 -1
  100. package/web/app/immutable/chunks/{B4Yz29Q3.js → C2RnxEnO.js} +1 -1
  101. package/web/app/immutable/chunks/{DR_b4dt8.js → C3AR_gNB.js} +1 -1
  102. package/web/app/immutable/chunks/{DcraaizU.js → C3KgmGxd.js} +1 -1
  103. package/web/app/immutable/chunks/C3cVfkio.js +1 -0
  104. package/web/app/immutable/chunks/{BaXq2aUL.js → C4AJzMws.js} +46 -46
  105. package/web/app/immutable/chunks/{Cr5mKkdD.js → C6DQmPVB.js} +1 -1
  106. package/web/app/immutable/chunks/{DMEIbJII.js → C7b3vXLD.js} +1 -1
  107. package/web/app/immutable/chunks/{S3jMTv3a.js → C7q_UkFQ.js} +1 -1
  108. package/web/app/immutable/chunks/{BMTanQ2Z.js → C8OXQeb2.js} +1 -1
  109. package/web/app/immutable/chunks/{Bb-kpHQF.js → C8PR5GO9.js} +1 -1
  110. package/web/app/immutable/chunks/{DvUsJK3H.js → C8TRSNUb.js} +1 -1
  111. package/web/app/immutable/chunks/{CnFZbWXv.js → CA6H1-bp.js} +1 -1
  112. package/web/app/immutable/chunks/{gQ8VFuWN.js → CB8FMdnB.js} +2 -2
  113. package/web/app/immutable/chunks/{Bhq56Jsu.js → CCAtqaSn.js} +1 -1
  114. package/web/app/immutable/chunks/{CREbzS7Z.js → CCSQmeuF.js} +1 -1
  115. package/web/app/immutable/chunks/{CUgl7USU.js → CDD7ui9Z.js} +1 -1
  116. package/web/app/immutable/chunks/{B9Nn4kQr.js → CDUMf4mn.js} +1 -1
  117. package/web/app/immutable/chunks/{DxmPtFKv.js → CDjbPb5H.js} +1 -1
  118. package/web/app/immutable/chunks/{CAUJiTuz.js → CDtaIFAl.js} +1 -1
  119. package/web/app/immutable/chunks/{BcdTbj6d.js → CGO_zr9m.js} +1 -1
  120. package/web/app/immutable/chunks/{BkcCJyDK.js → CH7HNVC2.js} +1 -1
  121. package/web/app/immutable/chunks/{BAMJ8Hnj.js → CIqC9ucK.js} +1 -1
  122. package/web/app/immutable/chunks/{BOPrepKH.js → COmspkQo.js} +1 -1
  123. package/web/app/immutable/chunks/{GwtGeFMJ.js → CPUJ3EYc.js} +1 -1
  124. package/web/app/immutable/chunks/{Cnkux63v.js → CQPid4Qr.js} +1 -1
  125. package/web/app/immutable/chunks/{CbB6SI0i.js → CRm25OCR.js} +1 -1
  126. package/web/app/immutable/chunks/{mFWmuyR-.js → CS6als-f.js} +1 -1
  127. package/web/app/immutable/chunks/{CCzPC_cB.js → CSbEYhAV.js} +1 -1
  128. package/web/app/immutable/chunks/{DHkcvVzr.js → CTkkv_Ih.js} +1 -1
  129. package/web/app/immutable/chunks/{JiW1DfLK.js → CUtsQ_at.js} +1 -1
  130. package/web/app/immutable/chunks/{Drn9m8Tp.js → CV86ty5-.js} +1 -1
  131. package/web/app/immutable/chunks/{fCtMtGYt.js → CVZzx9IJ.js} +1 -1
  132. package/web/app/immutable/chunks/{DQpGArF7.js → CVx5OKWy.js} +1 -1
  133. package/web/app/immutable/chunks/{CGmYraIa.js → CWfjuhY2.js} +1 -1
  134. package/web/app/immutable/chunks/{CRXlvdEs.js → CWtyXmQ4.js} +1 -1
  135. package/web/app/immutable/chunks/{1-MeqddK.js → CXTQXSCs.js} +1 -1
  136. package/web/app/immutable/chunks/{CWXVdpgZ.js → CXygwMkb.js} +1 -1
  137. package/web/app/immutable/chunks/{B1lpukIv.js → CZfU7DE3.js} +1 -1
  138. package/web/app/immutable/chunks/{B2Q_FC4n.js → Ca1iiPGq.js} +3 -3
  139. package/web/app/immutable/chunks/{B7hWIBzm.js → Cb6ALa0V.js} +1 -1
  140. package/web/app/immutable/chunks/{Ao0jjYj2.js → CbSZGuz9.js} +1 -1
  141. package/web/app/immutable/chunks/{DFKhOU69.js → Cc0763mU.js} +1 -1
  142. package/web/app/immutable/chunks/{B6m0Dypi.js → CcijsN8m.js} +1 -1
  143. package/web/app/immutable/chunks/{-CpNnXIW.js → CdtwTpzR.js} +1 -1
  144. package/web/app/immutable/chunks/{C9N7yhqm.js → Ce-va2I0.js} +1 -1
  145. package/web/app/immutable/chunks/{C22cBcHz.js → Ch9YoFhc.js} +1 -1
  146. package/web/app/immutable/chunks/{COofQgO0.js → ChHRVjww.js} +1 -1
  147. package/web/app/immutable/chunks/{BlzuDW6O.js → CjrqEuvI.js} +1 -1
  148. package/web/app/immutable/chunks/{BOVldAsb.js → CkTAy7fl.js} +1 -1
  149. package/web/app/immutable/chunks/{DXXFBdjF.js → CkyxPppw.js} +1 -1
  150. package/web/app/immutable/chunks/{D49mWFig.js → CnPYlvZC.js} +1 -1
  151. package/web/app/immutable/chunks/{DUTvR2si.js → CpK0xLH4.js} +1 -1
  152. package/web/app/immutable/chunks/{jyQWudgn.js → Cq97NFfR.js} +1 -1
  153. package/web/app/immutable/chunks/{BVUW22uN.js → CqPoxrPz.js} +1 -1
  154. package/web/app/immutable/chunks/{BczcQRsN.js → CqRvL4xi.js} +1 -1
  155. package/web/app/immutable/chunks/{CAUle5iU.js → CtBzyNOX.js} +1 -1
  156. package/web/app/immutable/chunks/{BrL12o40.js → CtcGxSOx.js} +1 -1
  157. package/web/app/immutable/chunks/{CjpWOZGa.js → Cu9dGfYE.js} +1 -1
  158. package/web/app/immutable/chunks/{DJqiMUht.js → Cv-fAWZf.js} +1 -1
  159. package/web/app/immutable/chunks/{C5fxud9g.js → Cv6grH4l.js} +1 -1
  160. package/web/app/immutable/chunks/{CU15H7o_.js → Cx394IAH.js} +1 -1
  161. package/web/app/immutable/chunks/{BXwdb0J5.js → Cx8Rw_sH.js} +3 -3
  162. package/web/app/immutable/chunks/{Bx1P9uW7.js → CxR-pcVt.js} +1 -1
  163. package/web/app/immutable/chunks/{BFHmbbvG.js → CxuKWK-9.js} +2 -2
  164. package/web/app/immutable/chunks/{DF54qNJU.js → CyHB14hJ.js} +1 -1
  165. package/web/app/immutable/chunks/{D59tCG3q.js → CykElrvo.js} +2 -2
  166. package/web/app/immutable/chunks/{CTgYTdXw.js → Cz3WzTlQ.js} +1 -1
  167. package/web/app/immutable/chunks/{CiKoEJ2m.js → D0qhIm1r.js} +1 -1
  168. package/web/app/immutable/chunks/{CeoBhFo7.js → D179JMBI.js} +1 -1
  169. package/web/app/immutable/chunks/{COo5pTrI.js → D3m2Y1N8.js} +1 -1
  170. package/web/app/immutable/chunks/{DE8II0cx.js → D42wJcQ3.js} +1 -1
  171. package/web/app/immutable/chunks/{Dl1AOLZu.js → D5A4PJDt.js} +1 -1
  172. package/web/app/immutable/chunks/{Cgz4dZpP.js → D5ocbEo-.js} +1 -1
  173. package/web/app/immutable/chunks/{DoB-G8kB.js → D6H34kDj.js} +1 -1
  174. package/web/app/immutable/chunks/{aWBSU8IQ.js → D7KhILhs.js} +1 -1
  175. package/web/app/immutable/chunks/{CLMwPQBQ.js → D7VoSTzK.js} +1 -1
  176. package/web/app/immutable/chunks/{Cr9C4VDu.js → D7rh8Clb.js} +1 -1
  177. package/web/app/immutable/chunks/{SdVpHK7d.js → D7z6HEeo.js} +1 -1
  178. package/web/app/immutable/chunks/{DF15jnSX.js → D8CQQUv8.js} +1 -1
  179. package/web/app/immutable/chunks/{DyreqWqr.js → D8cNe_33.js} +1 -1
  180. package/web/app/immutable/chunks/{CzxEKNiF.js → D9gMMVdB.js} +1 -1
  181. package/web/app/immutable/chunks/{CDh2mZdS.js → DEQnE_KB.js} +1 -1
  182. package/web/app/immutable/chunks/{DcPZfWKB.js → DFRVxmWf.js} +1 -1
  183. package/web/app/immutable/chunks/{Dgo57zmq.js → DHMxSQaO.js} +1 -1
  184. package/web/app/immutable/chunks/{Dr6-g-BO.js → DITs7RNY.js} +1 -1
  185. package/web/app/immutable/chunks/{BU9me3Pg.js → DJSAkzw5.js} +1 -1
  186. package/web/app/immutable/chunks/{KaOLys0u.js → DJZIHUd7.js} +1 -1
  187. package/web/app/immutable/chunks/{HiIoMspb.js → DLPlXnVY.js} +1 -1
  188. package/web/app/immutable/chunks/{k48f0Jn8.js → DMOXpjfz.js} +1 -1
  189. package/web/app/immutable/chunks/{B7pblHOt.js → DON9zoQ1.js} +1 -1
  190. package/web/app/immutable/chunks/{CwqyVbqi.js → DP31pjuo.js} +3 -3
  191. package/web/app/immutable/chunks/{uyQciu7h.js → DPbxpEc3.js} +4 -4
  192. package/web/app/immutable/chunks/{B5-Plsom.js → DQ3EU1b-.js} +1 -1
  193. package/web/app/immutable/chunks/{BuyrOC4V.js → DQYwt0RJ.js} +1 -1
  194. package/web/app/immutable/chunks/{BFfRQORP.js → DRMe5Ypb.js} +1 -1
  195. package/web/app/immutable/chunks/{Cn4-Fvkn.js → DT_a2Oi3.js} +1 -1
  196. package/web/app/immutable/chunks/{Cxmepjfl.js → DWjpzYNk.js} +1 -1
  197. package/web/app/immutable/chunks/{bJK6npyT.js → DYrrsQ1p.js} +1 -1
  198. package/web/app/immutable/chunks/{CfDqTHT1.js → D_-4DIK6.js} +1 -1
  199. package/web/app/immutable/chunks/{BGeImWEk.js → D_jEt7ej.js} +1 -1
  200. package/web/app/immutable/chunks/{BWQPB65O.js → DbPBKS19.js} +1 -1
  201. package/web/app/immutable/chunks/{DupTZXsI.js → DbSflHPQ.js} +1 -1
  202. package/web/app/immutable/chunks/{BHgSQJqT.js → Dbqo6rfT.js} +1 -1
  203. package/web/app/immutable/chunks/{TPru2I57.js → DcrCEeFN.js} +1 -1
  204. package/web/app/immutable/chunks/{n0_jgWL7.js → DeLdUBWT.js} +1 -1
  205. package/web/app/immutable/chunks/{D3tqOSzT.js → DepS1LOg.js} +1 -1
  206. package/web/app/immutable/chunks/{DW8fwVBf.js → DfINI0LK.js} +1 -1
  207. package/web/app/immutable/chunks/{Em5CdgqH.js → DfyDNbbj.js} +4 -4
  208. package/web/app/immutable/chunks/{CktgkomQ.js → DhXSKt_a.js} +1 -1
  209. package/web/app/immutable/chunks/{DOhHP999.js → DjAFd7Fr.js} +1 -1
  210. package/web/app/immutable/chunks/{l7sDKa65.js → Dk9lUzSs.js} +1 -1
  211. package/web/app/immutable/chunks/{C3jMXj_V.js → DkQdSPDN.js} +1 -1
  212. package/web/app/immutable/chunks/{Cp-4w4r1.js → DnNE_pmq.js} +1 -1
  213. package/web/app/immutable/chunks/{BM2ubpAw.js → DoFGyuPK.js} +1 -1
  214. package/web/app/immutable/chunks/{D5Jk5CWk.js → DpDGJXfb.js} +2 -2
  215. package/web/app/immutable/chunks/{CK543FRe.js → DqQWmhFJ.js} +1 -1
  216. package/web/app/immutable/chunks/{C8E14ldW.js → DrCYFWYk.js} +1 -1
  217. package/web/app/immutable/chunks/{D7QFmXLb.js → DsDbrkJf.js} +1 -1
  218. package/web/app/immutable/chunks/{QeZhJHLb.js → DtuubiMf.js} +1 -1
  219. package/web/app/immutable/chunks/{BT8mEFV6.js → DuYgHIqV.js} +1 -1
  220. package/web/app/immutable/chunks/{BJCm9MUD.js → Dusq2uGc.js} +1 -1
  221. package/web/app/immutable/chunks/{BmaG8vdR.js → Dv2WcD53.js} +1 -1
  222. package/web/app/immutable/chunks/{zXLHCuiE.js → DvEcqVUt.js} +1 -1
  223. package/web/app/immutable/chunks/{DQNtbVVY.js → DwJUGAx4.js} +3 -3
  224. package/web/app/immutable/chunks/{CR5XXYcE.js → DwwEvwlj.js} +1 -1
  225. package/web/app/immutable/chunks/{9qqz3Jr0.js → DzNzbnYA.js} +1 -1
  226. package/web/app/immutable/chunks/{DhTLwmro.js → EK8GFErl.js} +1 -1
  227. package/web/app/immutable/chunks/Fcr7AvC-.js +1 -0
  228. package/web/app/immutable/chunks/{D__sU8Ug.js → Fiwts6D3.js} +1 -1
  229. package/web/app/immutable/chunks/{Byobtdo1.js → G_kSYo3Y.js} +1 -1
  230. package/web/app/immutable/chunks/{DcU8bi_n.js → IHdKCjQM.js} +2 -2
  231. package/web/app/immutable/chunks/{B7hGbqIM.js → IhhtpC0N.js} +1 -1
  232. package/web/app/immutable/chunks/{BS9WBIBb.js → O5ZlQHf9.js} +1 -1
  233. package/web/app/immutable/chunks/{ChYLETZB.js → OqslD7bF.js} +1 -1
  234. package/web/app/immutable/chunks/{By2YlE-l.js → Qvf67TfJ.js} +1 -1
  235. package/web/app/immutable/chunks/{DeFlL2nh.js → R2QRct6h.js} +1 -1
  236. package/web/app/immutable/chunks/{BNYZa6GV.js → Rq6GuI3F.js} +1 -1
  237. package/web/app/immutable/chunks/{Xgzr3BTD.js → T6UBEOFc.js} +1 -1
  238. package/web/app/immutable/chunks/{BpezAJRw.js → TdGvVwuC.js} +1 -1
  239. package/web/app/immutable/chunks/{DSZbBNDD.js → Tgw7Kdvt.js} +1 -1
  240. package/web/app/immutable/chunks/{P7zPRuFC.js → U5o8u-di.js} +1 -1
  241. package/web/app/immutable/chunks/{BUSErGiB.js → UWtWVoQE.js} +1 -1
  242. package/web/app/immutable/chunks/{BCLYeYwk.js → W7uazUja.js} +1 -1
  243. package/web/app/immutable/chunks/{CDUYzZ2W.js → WWDClKTE.js} +1 -1
  244. package/web/app/immutable/chunks/{DEr2A_-h.js → Xk1ND_1x.js} +2 -2
  245. package/web/app/immutable/chunks/{DlljGo_I.js → Y8hdNZSZ.js} +1 -1
  246. package/web/app/immutable/chunks/{Dh-DCh2Y.js → YsAO4v_N.js} +1 -1
  247. package/web/app/immutable/chunks/{C00PRSTi.js → Z_lXVxA_.js} +1 -1
  248. package/web/app/immutable/chunks/{C-nTKxY9.js → ZfkZCfTr.js} +1 -1
  249. package/web/app/immutable/chunks/{CLvqghA8.js → ZmAQurQV.js} +1 -1
  250. package/web/app/immutable/chunks/{CHUYHKuh.js → _IIJlCYC.js} +1 -1
  251. package/web/app/immutable/chunks/{BU3y3Xes.js → _IjN0Lbt.js} +1 -1
  252. package/web/app/immutable/chunks/{iQDlfKDR.js → cD292w1o.js} +1 -1
  253. package/web/app/immutable/chunks/{ClaP_sir.js → dvKmN4h6.js} +1 -1
  254. package/web/app/immutable/chunks/{Crey45Oa.js → f5b-J-bi.js} +1 -1
  255. package/web/app/immutable/chunks/{ZX798KkU.js → gKdztwD8.js} +1 -1
  256. package/web/app/immutable/chunks/{BdhKX9ZN.js → gNR_yDDX.js} +1 -1
  257. package/web/app/immutable/chunks/{D5al-p9o.js → ggRB4LMK.js} +1 -1
  258. package/web/app/immutable/chunks/{axwUS21u.js → ghzRmqKs.js} +1 -1
  259. package/web/app/immutable/chunks/{FM3MDwzB.js → gocm4HZf.js} +1 -1
  260. package/web/app/immutable/chunks/{DBYe3Dcp.js → i2kR60wc.js} +2 -2
  261. package/web/app/immutable/chunks/{CdTSfppl.js → iCTyujt5.js} +1 -1
  262. package/web/app/immutable/chunks/{IxxdIKNN.js → iMqZaR5X.js} +1 -1
  263. package/web/app/immutable/chunks/{BT5iyspK.js → iNacp7Sr.js} +1 -1
  264. package/web/app/immutable/chunks/{BjGqF2I6.js → iViWtmHm.js} +1 -1
  265. package/web/app/immutable/chunks/{D3JNbQ4D.js → jphlY6bT.js} +1 -1
  266. package/web/app/immutable/chunks/{JvFe2B29.js → k5fprFtz.js} +1 -1
  267. package/web/app/immutable/chunks/{DSs6r6NG.js → kSTrWIIB.js} +1 -1
  268. package/web/app/immutable/chunks/{CEA7jD1C.js → koUs6Gjt.js} +1 -1
  269. package/web/app/immutable/chunks/{rwibDzZr.js → l3Y4i65_.js} +1 -1
  270. package/web/app/immutable/chunks/{DDvFH8QS.js → lE7gD_tn.js} +1 -1
  271. package/web/app/immutable/chunks/{BTvJ4T_4.js → lK1e5NlM.js} +1 -1
  272. package/web/app/immutable/chunks/{C9wxB2bb.js → m8Q2Rt7R.js} +2 -2
  273. package/web/app/immutable/chunks/{DHvVAxAW.js → mE5-Vs-0.js} +1 -1
  274. package/web/app/immutable/chunks/{BLfqsc2a.js → mpTxy2jJ.js} +1 -1
  275. package/web/app/immutable/chunks/pUywXnJP.js +1 -0
  276. package/web/app/immutable/chunks/{DWBUvNGh.js → qLTVpfPn.js} +1 -1
  277. package/web/app/immutable/chunks/{BBcnUEuQ.js → qqJggbSF.js} +1 -1
  278. package/web/app/immutable/chunks/s_T1Uukt.js +1 -0
  279. package/web/app/immutable/chunks/{5az3n8fR.js → uPtH8pRz.js} +1 -1
  280. package/web/app/immutable/chunks/{Cn-Afla1.js → u_H5ILVa.js} +1 -1
  281. package/web/app/immutable/chunks/{sFief-xo.js → udmuNwTR.js} +1 -1
  282. package/web/app/immutable/chunks/{D5tDAzIo.js → vezRCn6E.js} +1 -1
  283. package/web/app/immutable/chunks/{CPnqf2bo.js → vpLnaArD.js} +1 -1
  284. package/web/app/immutable/chunks/{BKKCpqXK.js → w3KJAO4V.js} +2 -2
  285. package/web/app/immutable/chunks/{CiRkFhK8.js → wRT2cc73.js} +1 -1
  286. package/web/app/immutable/chunks/{BVwQph9_.js → wtJmZfcy.js} +1 -1
  287. package/web/app/immutable/chunks/{B3T1oiJl.js → x4bPxhVW.js} +1 -1
  288. package/web/app/immutable/chunks/{DnzDw_9l.js → xK5y1U34.js} +1 -1
  289. package/web/app/immutable/chunks/{Cd-qmx8U.js → y83c7yRZ.js} +1 -1
  290. package/web/app/immutable/chunks/{Cq8_4net.js → ynQC8xZQ.js} +1 -1
  291. package/web/app/immutable/chunks/{DJSvqrCI.js → zFu37m6L.js} +1 -1
  292. package/web/app/immutable/entry/{app.B0HiWR5T.js → app.aDjWpyk7.js} +3 -3
  293. package/web/app/immutable/entry/start.1qdHg029.js +1 -0
  294. package/web/app/immutable/nodes/{0.5oa9JC3V.js → 0.D_e7AeTl.js} +1 -1
  295. package/web/app/immutable/nodes/{1.dLY473QL.js → 1.DA21OvwY.js} +1 -1
  296. package/web/app/immutable/nodes/{10.Dg3iEVmH.js → 10.CSASJEbg.js} +14 -14
  297. package/web/app/immutable/nodes/{11.PFTrUEsb.js → 11.DW2JfBsq.js} +1 -1
  298. package/web/app/immutable/nodes/{12.DUMat2GN.js → 12.B8s5KuaN.js} +1 -1
  299. package/web/app/immutable/nodes/{13.BEiznOPk.js → 13.J8EpPA9A.js} +1 -1
  300. package/web/app/immutable/nodes/{14.DFolVj6c.js → 14.C5TLXVit.js} +3 -3
  301. package/web/app/immutable/nodes/{15.CGEsAjgd.js → 15.DrH3We44.js} +1 -1
  302. package/web/app/immutable/nodes/{16.cptOJ-f9.js → 16.T0PyvW1V.js} +1 -1
  303. package/web/app/immutable/nodes/{17.BVn1LtfR.js → 17.pi-yfOoM.js} +1 -1
  304. package/web/app/immutable/nodes/{18.BLC8YWHJ.js → 18.CTVha2lA.js} +1 -1
  305. package/web/app/immutable/nodes/{19.CqJycQsd.js → 19.DyUaZQFK.js} +2 -2
  306. package/web/app/immutable/nodes/{2.BaR1WF3o.js → 2.CTOsyef2.js} +4 -4
  307. package/web/app/immutable/nodes/{20.g9As4rvG.js → 20.BPfqGZ4o.js} +1 -1
  308. package/web/app/immutable/nodes/{3.DwF_25Xt.js → 3.xcZps6DB.js} +1 -1
  309. package/web/app/immutable/nodes/{4.ttOSy2Tq.js → 4.DaJkDmFI.js} +1 -1
  310. package/web/app/immutable/nodes/{5.BVpoghsD.js → 5.7rTxN-4O.js} +1 -1
  311. package/web/app/immutable/nodes/6.tsWwri9c.js +5 -0
  312. package/web/app/immutable/nodes/{7.BO56ByN2.js → 7.CDTojphP.js} +1 -1
  313. package/web/app/immutable/nodes/{8.CPtVgnSI.js → 8.BO5ffLDm.js} +1 -1
  314. package/web/app/immutable/nodes/9.D0POivb2.js +14 -0
  315. package/web/app/version.json +1 -1
  316. package/web/generated/paraglide.js +49 -49
  317. package/web/index.html +18 -18
  318. package/web/app/immutable/chunks/Bheykcr9.js +0 -1
  319. package/web/app/immutable/chunks/CDVPwJHE.js +0 -1
  320. package/web/app/immutable/chunks/CtfEuoOH.js +0 -1
  321. package/web/app/immutable/chunks/DRuLniWc.js +0 -1
  322. package/web/app/immutable/chunks/T9rMC0YB.js +0 -1
  323. package/web/app/immutable/chunks/jlu1ZSD8.js +0 -1
  324. package/web/app/immutable/entry/start.BFcXwo9Y.js +0 -1
  325. package/web/app/immutable/nodes/6.D6pOrTxH.js +0 -5
  326. package/web/app/immutable/nodes/9.cl9L6J-I.js +0 -14
@@ -1 +1 @@
1
- import{p as e}from"./B26ZHg3s.js";const t=[{id:"textarea-state-matrix",title:"Textarea states",states:["default","rest","hover","focus","empty","placeholder","disabled","read-only","invalid","error","described","auto-expand","max-height-scroll","long-content","light","dark","zoom-200","keyboard-focus","compact","reduced-motion"],themes:["light","dark","high-contrast"],viewport:"both",reducedMotion:!0}];e({id:"textarea",source:"src/lib/components/ui/textarea/textarea.svelte",publicImport:"$lib/components/ui/textarea",legacyImports:["$lib/components/ui/textarea/textarea.svelte"],exports:["Textarea","textareaMetadata"],category:"primitive",owner:"007-B2",callers:["src/features/accept-changes/components/NativeReviewAttempt.svelte","src/features/accept-changes/components/NativeSidebarReview.svelte","src/features/conversation-goal/components/GoalEditorDialog.svelte","src/features/discussions/components/DiscussionThread.svelte","src/features/hud/components/dock-composer-media.preview.svelte","src/features/hud/media-editor/screenshot/ScreenshotCanvas.svelte","src/features/machine-rail/machine-rail.preview.svelte","src/lib/component-catalog/renderers/ContentFieldCatalogPreview.svelte","src/lib/component-catalog/renderers/FieldPreviewCell.svelte","src/lib/component-catalog/renderers/ModalCatalogPreview.svelte","src/lib/components/chat/QueuedMessageList.svelte","src/lib/components/chat/proposals/ProposalCard.svelte","src/lib/components/modals/ReplaceAgentModal.svelte","src/lib/components/patterns/settings/SettingsTextarea.svelte","src/lib/components/patterns/settings/settings-textarea.preview.svelte","src/lib/components/tiptap/CommentDialog.svelte","src/lib/components/tiptap/LaunchFromSelectionDialog.svelte","src/lib/components/tiptap/MermaidBlockNodeView.svelte","src/lib/components/ui/ask-user-questions/ask-user-questions.svelte","src/lib/components/ui/message-composer/message-composer.svelte","src/lib/components/ui/text-entry-focus.preview.svelte","src/lib/components/ui/tooltip/tooltip-audit.preview.svelte","src/lib/components/workspace/PullRequestCreator.svelte","src/lib/components/workspace/WorkspaceSidebarHeader.svelte","src/lib/components/workspace/sidebar-tabs.preview.svelte","src/lib/components/workspace/sidebar/CommitDrawer.svelte","src/lib/components/workspace/sidebar/MergePanel.svelte","src/lib/components/workspace/sidebar/PRSection.svelte","src/lib/components/workspace/sidebar/WorkspaceProgressCard.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/textarea/textarea.test.ts",removalGate:"Retain while exported and binding, resize, validation, and fixture tests pass.",dynamicImports:[],fixtures:t});
1
+ import{p as e}from"./BRCr02in.js";const t=[{id:"textarea-state-matrix",title:"Textarea states",states:["default","rest","hover","focus","empty","placeholder","disabled","read-only","invalid","error","described","auto-expand","max-height-scroll","long-content","light","dark","zoom-200","keyboard-focus","compact","reduced-motion"],themes:["light","dark","high-contrast"],viewport:"both",reducedMotion:!0}];e({id:"textarea",source:"src/lib/components/ui/textarea/textarea.svelte",publicImport:"$lib/components/ui/textarea",legacyImports:["$lib/components/ui/textarea/textarea.svelte"],exports:["Textarea","textareaMetadata"],category:"primitive",owner:"007-B2",callers:["src/features/accept-changes/components/NativeReviewAttempt.svelte","src/features/accept-changes/components/NativeSidebarReview.svelte","src/features/conversation-goal/components/GoalEditorDialog.svelte","src/features/discussions/components/DiscussionThread.svelte","src/features/hud/components/dock-composer-media.preview.svelte","src/features/hud/media-editor/screenshot/ScreenshotCanvas.svelte","src/features/machine-rail/machine-rail.preview.svelte","src/lib/component-catalog/renderers/ContentFieldCatalogPreview.svelte","src/lib/component-catalog/renderers/FieldPreviewCell.svelte","src/lib/component-catalog/renderers/ModalCatalogPreview.svelte","src/lib/components/chat/QueuedMessageList.svelte","src/lib/components/chat/proposals/ProposalCard.svelte","src/lib/components/modals/ReplaceAgentModal.svelte","src/lib/components/patterns/settings/SettingsTextarea.svelte","src/lib/components/patterns/settings/settings-textarea.preview.svelte","src/lib/components/tiptap/CommentDialog.svelte","src/lib/components/tiptap/LaunchFromSelectionDialog.svelte","src/lib/components/tiptap/MermaidBlockNodeView.svelte","src/lib/components/ui/ask-user-questions/ask-user-questions.svelte","src/lib/components/ui/message-composer/message-composer.svelte","src/lib/components/ui/text-entry-focus.preview.svelte","src/lib/components/ui/tooltip/tooltip-audit.preview.svelte","src/lib/components/workspace/PullRequestCreator.svelte","src/lib/components/workspace/WorkspaceSidebarHeader.svelte","src/lib/components/workspace/sidebar-tabs.preview.svelte","src/lib/components/workspace/sidebar/CommitDrawer.svelte","src/lib/components/workspace/sidebar/MergePanel.svelte","src/lib/components/workspace/sidebar/PRSection.svelte","src/lib/components/workspace/sidebar/WorkspaceProgressCard.svelte"],replacement:null,characterizationTest:"src/lib/components/ui/textarea/textarea.test.ts",removalGate:"Retain while exported and binding, resize, validation, and fixture tests pass.",dynamicImports:[],fixtures:t});
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/Cn-Afla1.js","/app/immutable/chunks/C3jMXj_V.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/CtfEuoOH.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/DynUeYUu.js","/app/immutable/chunks/B26ZHg3s.js","/app/immutable/chunks/CGmYraIa.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/D9R5fzn8.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/CnFZbWXv.js","/app/immutable/chunks/CT8vPg_p.js","/app/immutable/chunks/BpezAJRw.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BZ27qIg1.js","/app/immutable/chunks/DFKhOU69.js","/app/immutable/chunks/DMEIbJII.js","/app/immutable/chunks/BFfRQORP.js","/app/immutable/chunks/CiKoEJ2m.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/CHIxjTWu.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/COofQgO0.js","/app/immutable/chunks/Bx1P9uW7.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.DylRFR3N.css","/app/immutable/chunks/5az3n8fR.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/CVtLV3_x.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/B1lpukIv.js","/app/immutable/chunks/iQDlfKDR.js","/app/immutable/chunks/QzxpbvSo.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/qWgJ-CUF.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/CoSEZL3s.js"])))=>i.map(i=>d[i]);
2
- import{bm as b,_ as x}from"./CtfEuoOH.js";import{m as f,JH as a,dp as P,I2 as S,zr as N,Gd as R,vV as q,r9 as W,vt as H,LM as U}from"./CiKoEJ2m.js";import{f as I}from"./CVtLV3_x.js";import{E as V}from"./CT8vPg_p.js";import{parseIntentLink as j}from"./DidHgSQp.js";import{m as y}from"./C3jMXj_V.js";import"./3SdAC2_C.js";import"./B26ZHg3s.js";import"./CGmYraIa.js";import"./ChTqQfQN.js";import"./BFfRQORP.js";import{x as B,k as C,w as L}from"./BkcCJyDK.js";import{dI as D}from"./iQDlfKDR.js";import{q as M,p as z,j as $}from"./Bhq56Jsu.js";const p="assistant-content",G=a.createSelector(t=>{const r=M.select(t),s=z.select(t),e=$.select(t).find(i=>i.agentId===s)??r.find(i=>i.isActive)??r.find(i=>i.messageCount>0)??r[0];return P(e?.agentId??null)}),O=new Map;function J(t,r=!1){const s=O.get(t)??{explicit:0,background:0},e={explicit:s.explicit+(r?0:1),background:s.background+(r?1:0)};return O.set(t,e),r?e:{explicit:e.explicit}}function k(t,r){const s=O.get(t);return s!==void 0&&r.explicit===s.explicit&&(r.background===void 0||r.background===s.background)}async function K(t){a.dispatch(q(t)),L.select(a.state,t).restoreStatus==="pending"&&await new Promise(r=>{const s=L.withStore(a)(t).subscribe(e=>{e.restoreStatus!=="pending"&&(r(),queueMicrotask(()=>s()))})})}function _(t,r,s){const e=L.select(a.state,s);if(!e.panels[p]||Object.keys(e.panels).some(i=>i!==p)){const i=e.panels[p],d=Object.values(e.panels).flatMap(n=>n.tabs.filter(o=>o.type!=="agent"||o.workspaceId!==f)),c=d.some(n=>n.id===i?.activeTabId)?i?.activeTabId??null:d.at(-1)?.id??null;a.dispatch(W(s,{root:{type:"panel",panelId:p},panels:{[p]:{id:p,tabs:d,activeTabId:c}},focusedPanelId:e.focusedPanelId===p?p:null,hiddenTabs:C.select(a.state,s)}))}a.dispatch(H(s,t,p,void 0,!0,void 0,!1,r.background||r.preserveFocus,void 0,r.background))}async function de(t,r={}){try{return await Q(t,r)}catch(s){return y.error(b.ui_linkHandler_notFound_title(),{description:s instanceof Error?s.message:String(s)}),!0}}async function Q(t,r){const s=/^intent:\/\/local\/([^/?#]+)\/agent\/([^/?#]+)$/.exec(t),e=t.startsWith("intent://")?j(t):null,i=e?.valid&&e.type==="workspace"?[t,e.resourceId]:/^\/workspace\/([^/?#]+)\/?$/.exec(t),d=/^https?:\/\//.test(t)&&!V(t);if(!i&&!s&&!d&&!(e?.valid&&["file","message","note","task"].includes(e.type))||i&&[f,"new"].includes(i[1]))return!1;const c=M.select(a.state),n=r.agentId?P(r.agentId):r.background?c.length===1?P(c[0].agentId):null:r.layoutId??G.select(a.state);if(!n)return!0;const o=J(n,r.background);if(await K(n),!k(n,o))return!0;if(i){const u=i[1],g=await I.workspaces.get(u);return k(n,o)?g?(a.dispatch(S(g)),_({type:"workspace",title:g.title,workspaceId:u,closable:!0},r,n),!0):(y.error(b.workspace_loader_notFound_title()),!0):!0}if(s)return T(s[1],s[2],r,n,o);if(d){const{resolveBrowserLinkForOpen:u}=await x(async()=>{const{resolveBrowserLinkForOpen:v}=await import("./Cn-Afla1.js").then(w=>w.b);return{resolveBrowserLinkForOpen:v}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]),import.meta.url),g=await u(t);return k(n,o)&&_({type:"browser",title:new URL(t).hostname,browserUrl:g.url,browserRequestedUrl:g.requestedUrl,workspaceId:f,closable:!0},r,n),!0}if(!e?.valid)return!1;const h=e.workspaceId??f;if(e.type==="file"){const u=await I.workspaces.get(h);return k(n,o)?u?(a.dispatch(S(u)),_({type:"file",title:e.resourceId.split("/").at(-1)??e.resourceId,filePath:e.resourceId,workspaceId:h,closable:!0,data:{line:e.line,filePathIsLiteral:!0}},r,n),!0):(y.error(b.workspace_loader_notFound_title()),!0):!0}if(e.type==="message"&&e.agentId)return T(h,e.agentId,r,n,o,e.resourceId);if(e.type!=="note"&&e.type!=="task")return!1;const l=e.workspaceId??f,[m,A]=await Promise.all([a.dispatch(N(l,e.resourceId)),Promise.resolve(D.select(a.state,l)??I.workspaces.get(l)).catch(()=>null)]);if(!k(n,o))return!0;if(!m||String(m.workspaceId)!==l)return y.error(b.ui_linkHandler_notFound_title(),{description:b.ui_linkHandler_noteNotFound_error({noteId:e.resourceId,workspaceId:l})}),!0;A&&String(A.id)===l&&a.dispatch(S(A));const E=Object.entries(B.select(a.state)).some(([u,g])=>{const v=w=>w.type==="note"&&w.noteId===String(m.id)&&(w.workspaceId??u)===l;return Object.values(g.panels).some(w=>w.tabs.some(v))||C.select(a.state,u).some(v)}),F=a.state.transientUi.byWorkspaceId[l]?.noteViewModeByNoteId[String(m.id)];return!E&&(!r.background||F===void 0)&&a.dispatch(R(l,String(m.id),"editor")),_({type:"note",title:m.title,noteId:String(m.id),workspaceId:l,closable:!0},r,n),!0}async function T(t,r,s,e,i,d){const c=await I.agents.get(r,t===f?void 0:t);t===f&&c&&(t=String(c.workspaceId));const n=t===f?null:await I.workspaces.get(t);if(!k(e,i))return!0;if(!n&&t!==f||!c||String(c.workspaceId)!==t)return y.error(b.ui_linkHandler_notFound_title()),!0;if(n&&a.dispatch(S(n)),a.dispatch(U(c)),_({type:"agent",title:c.name??r,agentId:r,workspaceId:t,closable:!0},s,e),d&&!s.background){const{openMessage:o}=await x(async()=>{const{openMessage:h}=await import("./5az3n8fR.js");return{openMessage:h}},__vite__mapDeps([32,33,34,35,4,5,21,22,23,24,3,8,25,15,2,13,14,7,9,16,36,37,38,39,27,17,6,12,40,19,41,42,43,44]),import.meta.url);o({workspaceId:t,agentId:r,messageId:d,contentAlreadyOpen:!0})}return!0}export{p as ASSISTANT_CONTENT_PANEL_ID,G as selectAssistantPanelLayoutId,de as showAssistantContent};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/u_H5ILVa.js","/app/immutable/chunks/DkQdSPDN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/Fcr7AvC-.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/BhYXv0ZM.js","/app/immutable/chunks/BRCr02in.js","/app/immutable/chunks/CWfjuhY2.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/Beq_QLuz.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/CA6H1-bp.js","/app/immutable/chunks/BAtAwQ72.js","/app/immutable/chunks/TdGvVwuC.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/2z64ELW5.js","/app/immutable/chunks/Cc0763mU.js","/app/immutable/chunks/C7b3vXLD.js","/app/immutable/chunks/DRMe5Ypb.js","/app/immutable/chunks/D0qhIm1r.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BS1zON0P.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/ChHRVjww.js","/app/immutable/chunks/CxR-pcVt.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.DylRFR3N.css","/app/immutable/chunks/uPtH8pRz.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/B0SSzYpD.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/CZfU7DE3.js","/app/immutable/chunks/cD292w1o.js","/app/immutable/chunks/BwweojP5.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/BqF1bVQC.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/BCwKGJpG.js"])))=>i.map(i=>d[i]);
2
+ import{bm as b,_ as x}from"./Fcr7AvC-.js";import{m as f,JH as a,dp as P,I2 as S,zr as N,Gd as R,vV as q,r9 as W,vt as H,LM as U}from"./D0qhIm1r.js";import{f as I}from"./B0SSzYpD.js";import{E as V}from"./BAtAwQ72.js";import{parseIntentLink as j}from"./BRPh2Gky.js";import{m as y}from"./DkQdSPDN.js";import"./3SdAC2_C.js";import"./BRCr02in.js";import"./CWfjuhY2.js";import"./ChTqQfQN.js";import"./DRMe5Ypb.js";import{x as B,k as C,w as L}from"./CH7HNVC2.js";import{dI as D}from"./cD292w1o.js";import{q as M,p as z,j as $}from"./CCAtqaSn.js";const p="assistant-content",G=a.createSelector(t=>{const r=M.select(t),s=z.select(t),e=$.select(t).find(i=>i.agentId===s)??r.find(i=>i.isActive)??r.find(i=>i.messageCount>0)??r[0];return P(e?.agentId??null)}),O=new Map;function J(t,r=!1){const s=O.get(t)??{explicit:0,background:0},e={explicit:s.explicit+(r?0:1),background:s.background+(r?1:0)};return O.set(t,e),r?e:{explicit:e.explicit}}function k(t,r){const s=O.get(t);return s!==void 0&&r.explicit===s.explicit&&(r.background===void 0||r.background===s.background)}async function K(t){a.dispatch(q(t)),L.select(a.state,t).restoreStatus==="pending"&&await new Promise(r=>{const s=L.withStore(a)(t).subscribe(e=>{e.restoreStatus!=="pending"&&(r(),queueMicrotask(()=>s()))})})}function _(t,r,s){const e=L.select(a.state,s);if(!e.panels[p]||Object.keys(e.panels).some(i=>i!==p)){const i=e.panels[p],d=Object.values(e.panels).flatMap(n=>n.tabs.filter(o=>o.type!=="agent"||o.workspaceId!==f)),c=d.some(n=>n.id===i?.activeTabId)?i?.activeTabId??null:d.at(-1)?.id??null;a.dispatch(W(s,{root:{type:"panel",panelId:p},panels:{[p]:{id:p,tabs:d,activeTabId:c}},focusedPanelId:e.focusedPanelId===p?p:null,hiddenTabs:C.select(a.state,s)}))}a.dispatch(H(s,t,p,void 0,!0,void 0,!1,r.background||r.preserveFocus,void 0,r.background))}async function de(t,r={}){try{return await Q(t,r)}catch(s){return y.error(b.ui_linkHandler_notFound_title(),{description:s instanceof Error?s.message:String(s)}),!0}}async function Q(t,r){const s=/^intent:\/\/local\/([^/?#]+)\/agent\/([^/?#]+)$/.exec(t),e=t.startsWith("intent://")?j(t):null,i=e?.valid&&e.type==="workspace"?[t,e.resourceId]:/^\/workspace\/([^/?#]+)\/?$/.exec(t),d=/^https?:\/\//.test(t)&&!V(t);if(!i&&!s&&!d&&!(e?.valid&&["file","message","note","task"].includes(e.type))||i&&[f,"new"].includes(i[1]))return!1;const c=M.select(a.state),n=r.agentId?P(r.agentId):r.background?c.length===1?P(c[0].agentId):null:r.layoutId??G.select(a.state);if(!n)return!0;const o=J(n,r.background);if(await K(n),!k(n,o))return!0;if(i){const u=i[1],g=await I.workspaces.get(u);return k(n,o)?g?(a.dispatch(S(g)),_({type:"workspace",title:g.title,workspaceId:u,closable:!0},r,n),!0):(y.error(b.workspace_loader_notFound_title()),!0):!0}if(s)return T(s[1],s[2],r,n,o);if(d){const{resolveBrowserLinkForOpen:u}=await x(async()=>{const{resolveBrowserLinkForOpen:v}=await import("./u_H5ILVa.js").then(w=>w.b);return{resolveBrowserLinkForOpen:v}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]),import.meta.url),g=await u(t);return k(n,o)&&_({type:"browser",title:new URL(t).hostname,browserUrl:g.url,browserRequestedUrl:g.requestedUrl,workspaceId:f,closable:!0},r,n),!0}if(!e?.valid)return!1;const h=e.workspaceId??f;if(e.type==="file"){const u=await I.workspaces.get(h);return k(n,o)?u?(a.dispatch(S(u)),_({type:"file",title:e.resourceId.split("/").at(-1)??e.resourceId,filePath:e.resourceId,workspaceId:h,closable:!0,data:{line:e.line,filePathIsLiteral:!0}},r,n),!0):(y.error(b.workspace_loader_notFound_title()),!0):!0}if(e.type==="message"&&e.agentId)return T(h,e.agentId,r,n,o,e.resourceId);if(e.type!=="note"&&e.type!=="task")return!1;const l=e.workspaceId??f,[m,A]=await Promise.all([a.dispatch(N(l,e.resourceId)),Promise.resolve(D.select(a.state,l)??I.workspaces.get(l)).catch(()=>null)]);if(!k(n,o))return!0;if(!m||String(m.workspaceId)!==l)return y.error(b.ui_linkHandler_notFound_title(),{description:b.ui_linkHandler_noteNotFound_error({noteId:e.resourceId,workspaceId:l})}),!0;A&&String(A.id)===l&&a.dispatch(S(A));const E=Object.entries(B.select(a.state)).some(([u,g])=>{const v=w=>w.type==="note"&&w.noteId===String(m.id)&&(w.workspaceId??u)===l;return Object.values(g.panels).some(w=>w.tabs.some(v))||C.select(a.state,u).some(v)}),F=a.state.transientUi.byWorkspaceId[l]?.noteViewModeByNoteId[String(m.id)];return!E&&(!r.background||F===void 0)&&a.dispatch(R(l,String(m.id),"editor")),_({type:"note",title:m.title,noteId:String(m.id),workspaceId:l,closable:!0},r,n),!0}async function T(t,r,s,e,i,d){const c=await I.agents.get(r,t===f?void 0:t);t===f&&c&&(t=String(c.workspaceId));const n=t===f?null:await I.workspaces.get(t);if(!k(e,i))return!0;if(!n&&t!==f||!c||String(c.workspaceId)!==t)return y.error(b.ui_linkHandler_notFound_title()),!0;if(n&&a.dispatch(S(n)),a.dispatch(U(c)),_({type:"agent",title:c.name??r,agentId:r,workspaceId:t,closable:!0},s,e),d&&!s.background){const{openMessage:o}=await x(async()=>{const{openMessage:h}=await import("./uPtH8pRz.js");return{openMessage:h}},__vite__mapDeps([32,33,34,35,4,5,21,22,23,24,3,8,25,15,2,13,14,7,9,16,36,37,38,39,27,17,6,12,40,19,41,42,43,44]),import.meta.url);o({workspaceId:t,agentId:r,messageId:d,contentAlreadyOpen:!0})}return!0}export{p as ASSISTANT_CONTENT_PANEL_ID,G as selectAssistantPanelLayoutId,de as showAssistantContent};
@@ -1 +1 @@
1
- import{t as ht,bo as U,bw as $t,bq as It,b as bt,bs as r}from"./CtfEuoOH.js";import{bs as yt,ca as k,aD as t,c9 as s,a7 as Ct,ay as Rt,W as kt,bn as wt,bH as H,bV as K,aA as E}from"./3SdAC2_C.js";import{k as At}from"./DFKhOU69.js";import{b as St}from"./Dn334wJv.js";import{JH as a,eK as Dt,eL as Pt,ol as Ut,Ad as Et,op as _t,oq as Tt,Kf as Ft,Ku as xt,Kk as Wt,vM as qt,v1 as vt}from"./CiKoEJ2m.js";import{t as Ht}from"./C-BsEdGZ.js";import{g as Kt}from"./DWGXN6Nr.js";import{dI as Lt,b$ as Nt,bQ as Ot,bU as Bt,bS as Mt}from"./iQDlfKDR.js";import{af as Gt}from"./z0xDttNV.js";import{C as Vt}from"./Cnkux63v.js";import{V as jt}from"./CAUJiTuz.js";import{bT as Jt,bN as Qt,b8 as zt}from"./BTXzEcFX.js";import{i as Xt}from"./H2jLkRRS.js";function Yt(_,f){if(new.target)return ht({component:Yt,..._});yt(f,!0);const L=()=>r(Z,"$gitRoots$",n),T=()=>r(Y,"$workspace",n),N=()=>r(st,"$ftCommits$",n),O=()=>r(ot,"$ftOlderCommits$",n),y=()=>r(tt,"$commitRead$",n),B=()=>r(z,"$foldUnchanged",n),M=()=>r(Q,"$lineWrapping",n),G=()=>r(X,"$diffSideBySide",n),V=()=>r(at,"$ftLoading$",n),[n,j]=It(),J=e=>{jt(e,{embedded:!0,showExpand:!0,get expanded(){return t(C)},onToggleExpand:()=>{H(C,!t(C)),t(C)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return B()},onToggleFold:()=>a.dispatch(Wt()),get wrapEnabled(){return M()},onToggleWrap:()=>a.dispatch(xt()),get splitEnabled(){return G()},onToggleSplit:()=>a.dispatch(Ft())})},Q=Jt(),z=Qt(),X=zt();let h=U(f,"tab",7),i=U(f,"workspaceId",7),$=U(f,"isActive",7);const F=Kt(),g=Ht(()=>i()),Y=Lt(g),Z=Gt(g),w=crypto.randomUUID(),tt=Nt(g,w),c=s(()=>h().data?.commitHash||""),x=s(()=>h().data?.commitMessage||"");k(()=>{const e=i();if(!(!$()||!e||t(d)))return a.dispatch(Dt(e,"history")),()=>a.dispatch(Pt(e,"history"))});const d=s(()=>h().data?.gitRootId||""),W=s(()=>t(d)&&L().find(e=>e.id===t(d))?.path||""),et=s(()=>t(W)||T()?.worktreePath||T()?.repositoryPath||""),st=Ot(g),ot=Bt(g),at=Mt(g),nt=s(()=>N()||[]),it=s(()=>O()||[]),p=s(()=>t(d)?void 0:t(nt).find(e=>e.hash===t(c))||t(it).find(e=>e.hash===t(c))),A=s(()=>t(p)?.files||[]),S=s(()=>y()?.request.kind==="commitDetails"&&y().request.commitHash===t(c)&&(y().request.gitRootId??"")===t(d)?y():void 0),l=s(()=>t(S)?.result?.kind==="commitDetails"?t(S).result.details:null),dt=s(()=>t(l)?t(l).fileDetails.length>0?t(l).fileDetails:t(l).files.map(e=>({path:e,additions:0,deletions:0})):[]),rt=s(()=>t(S)?.loading??!1);k(()=>{const e=t(c),o=i(),I=t(d);if(!e||!o||t(A).length>0)return;const u=crypto.randomUUID();return a.dispatch(Ut(o,w,u,{kind:"commitDetails",commitHash:e,gitRootId:I||void 0})),()=>a.dispatch(Et(o,w,u))});const ct=s(()=>t(A).length>0?t(A):t(dt));let C=K(!0),R=K(null);const lt=s(()=>t(ct).map(e=>{const o=typeof e=="string"?e:e.path||"",I=typeof e=="string"?0:e.additions||0,u=typeof e=="string"?0:e.deletions||0;return{filePath:Xt(o)?o:`${t(et)}/${o}`,action:"modify",additions:I,deletions:u,toolName:"local",toolCallId:`commit-${t(c)}-${o}`,staged:!1,category:"committed",commitHash:t(c),commitMessage:t(x)}}));k(()=>{!F||!$()||F.registerActions({display:J})});const q=crypto.randomUUID();k(()=>{const e=i();if(!(!($()&&t(d))||!e))return a.dispatch(_t(e,q)),()=>a.dispatch(Tt(e,q))});var mt={get tab(){return h()},set tab(e){h(e),E()},get workspaceId(){return i()},set workspaceId(e){i(e),E()},get isActive(){return $()},set isActive(e){$(e),E()},$set:$t,$on:(e,o)=>bt(f,e,o)},v=Ct(),gt=Rt(v);At(gt,()=>JSON.stringify([i(),t(d),t(c)]),e=>{{let o=s(()=>V()||t(rt)),I=s(()=>t(d)||void 0),u=s(()=>t(W)||void 0),ut=s(()=>({hash:t(c),message:t(x),author:t(p)?.author||t(l)?.author,authorEmail:t(p)?.authorEmail||t(l)?.authorEmail,date:t(p)?.date||t(l)?.date,agentId:t(p)?.agentId,linkedNoteId:t(p)?.linkedNoteId}));St(Vt(e,{get isLoading(){return t(o)},get changes(){return t(lt)},get gitRootId(){return t(I)},get gitRootPath(){return t(u)},get commitInfo(){return t(ut)},onOpenAgent:(b,m)=>{const D=m?.metaKey||m?.ctrlKey||!1,P=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(vt(i(),{agentId:b,openInAdjacentPanel:D,sourcePanelId:P}))},onOpenNote:(b,m)=>{const D=m?.metaKey||m?.ctrlKey||!1,P=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(qt(i(),b,{openInAdjacentPanel:D,sourcePanelId:P}))}}),b=>H(R,b,!0),()=>t(R))}}),kt(_,v);var pt=wt(mt);return j(),pt}export{Yt as default};
1
+ import{t as ht,bo as U,bw as $t,bq as It,b as bt,bs as r}from"./Fcr7AvC-.js";import{bs as yt,ca as k,aD as t,c9 as s,a7 as Ct,ay as Rt,W as kt,bn as wt,bH as H,bV as K,aA as E}from"./3SdAC2_C.js";import{k as At}from"./Cc0763mU.js";import{b as St}from"./Dn334wJv.js";import{JH as a,eK as Dt,eL as Pt,ol as Ut,Ad as Et,op as _t,oq as Tt,Kf as Ft,Ku as xt,Kk as Wt,vM as qt,v1 as vt}from"./D0qhIm1r.js";import{t as Ht}from"./C-BsEdGZ.js";import{g as Kt}from"./DWGXN6Nr.js";import{dI as Lt,b$ as Nt,bQ as Ot,bU as Bt,bS as Mt}from"./cD292w1o.js";import{af as Gt}from"./B_DmwFyf.js";import{C as Vt}from"./CQPid4Qr.js";import{V as jt}from"./CDtaIFAl.js";import{bT as Jt,bN as Qt,b8 as zt}from"./C0JQvbI4.js";import{i as Xt}from"./H2jLkRRS.js";function Yt(_,f){if(new.target)return ht({component:Yt,..._});yt(f,!0);const L=()=>r(Z,"$gitRoots$",n),T=()=>r(Y,"$workspace",n),N=()=>r(st,"$ftCommits$",n),O=()=>r(ot,"$ftOlderCommits$",n),y=()=>r(tt,"$commitRead$",n),B=()=>r(z,"$foldUnchanged",n),M=()=>r(Q,"$lineWrapping",n),G=()=>r(X,"$diffSideBySide",n),V=()=>r(at,"$ftLoading$",n),[n,j]=It(),J=e=>{jt(e,{embedded:!0,showExpand:!0,get expanded(){return t(C)},onToggleExpand:()=>{H(C,!t(C)),t(C)?t(R)?.expandAll():t(R)?.collapseAll()},get foldEnabled(){return B()},onToggleFold:()=>a.dispatch(Wt()),get wrapEnabled(){return M()},onToggleWrap:()=>a.dispatch(xt()),get splitEnabled(){return G()},onToggleSplit:()=>a.dispatch(Ft())})},Q=Jt(),z=Qt(),X=zt();let h=U(f,"tab",7),i=U(f,"workspaceId",7),$=U(f,"isActive",7);const F=Kt(),g=Ht(()=>i()),Y=Lt(g),Z=Gt(g),w=crypto.randomUUID(),tt=Nt(g,w),c=s(()=>h().data?.commitHash||""),x=s(()=>h().data?.commitMessage||"");k(()=>{const e=i();if(!(!$()||!e||t(d)))return a.dispatch(Dt(e,"history")),()=>a.dispatch(Pt(e,"history"))});const d=s(()=>h().data?.gitRootId||""),W=s(()=>t(d)&&L().find(e=>e.id===t(d))?.path||""),et=s(()=>t(W)||T()?.worktreePath||T()?.repositoryPath||""),st=Ot(g),ot=Bt(g),at=Mt(g),nt=s(()=>N()||[]),it=s(()=>O()||[]),p=s(()=>t(d)?void 0:t(nt).find(e=>e.hash===t(c))||t(it).find(e=>e.hash===t(c))),A=s(()=>t(p)?.files||[]),S=s(()=>y()?.request.kind==="commitDetails"&&y().request.commitHash===t(c)&&(y().request.gitRootId??"")===t(d)?y():void 0),l=s(()=>t(S)?.result?.kind==="commitDetails"?t(S).result.details:null),dt=s(()=>t(l)?t(l).fileDetails.length>0?t(l).fileDetails:t(l).files.map(e=>({path:e,additions:0,deletions:0})):[]),rt=s(()=>t(S)?.loading??!1);k(()=>{const e=t(c),o=i(),I=t(d);if(!e||!o||t(A).length>0)return;const u=crypto.randomUUID();return a.dispatch(Ut(o,w,u,{kind:"commitDetails",commitHash:e,gitRootId:I||void 0})),()=>a.dispatch(Et(o,w,u))});const ct=s(()=>t(A).length>0?t(A):t(dt));let C=K(!0),R=K(null);const lt=s(()=>t(ct).map(e=>{const o=typeof e=="string"?e:e.path||"",I=typeof e=="string"?0:e.additions||0,u=typeof e=="string"?0:e.deletions||0;return{filePath:Xt(o)?o:`${t(et)}/${o}`,action:"modify",additions:I,deletions:u,toolName:"local",toolCallId:`commit-${t(c)}-${o}`,staged:!1,category:"committed",commitHash:t(c),commitMessage:t(x)}}));k(()=>{!F||!$()||F.registerActions({display:J})});const q=crypto.randomUUID();k(()=>{const e=i();if(!(!($()&&t(d))||!e))return a.dispatch(_t(e,q)),()=>a.dispatch(Tt(e,q))});var mt={get tab(){return h()},set tab(e){h(e),E()},get workspaceId(){return i()},set workspaceId(e){i(e),E()},get isActive(){return $()},set isActive(e){$(e),E()},$set:$t,$on:(e,o)=>bt(f,e,o)},v=Ct(),gt=Rt(v);At(gt,()=>JSON.stringify([i(),t(d),t(c)]),e=>{{let o=s(()=>V()||t(rt)),I=s(()=>t(d)||void 0),u=s(()=>t(W)||void 0),ut=s(()=>({hash:t(c),message:t(x),author:t(p)?.author||t(l)?.author,authorEmail:t(p)?.authorEmail||t(l)?.authorEmail,date:t(p)?.date||t(l)?.date,agentId:t(p)?.agentId,linkedNoteId:t(p)?.linkedNoteId}));St(Vt(e,{get isLoading(){return t(o)},get changes(){return t(lt)},get gitRootId(){return t(I)},get gitRootPath(){return t(u)},get commitInfo(){return t(ut)},onOpenAgent:(b,m)=>{const D=m?.metaKey||m?.ctrlKey||!1,P=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(vt(i(),{agentId:b,openInAdjacentPanel:D,sourcePanelId:P}))},onOpenNote:(b,m)=>{const D=m?.metaKey||m?.ctrlKey||!1,P=m?.target?.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0;a.dispatch(qt(i(),b,{openInAdjacentPanel:D,sourcePanelId:P}))}}),b=>H(R,b,!0),()=>t(R))}}),kt(_,v);var pt=wt(mt);return j(),pt}export{Yt as default};
@@ -1,4 +1,4 @@
1
- var Cr=Object.defineProperty;var xr=(e,t,n)=>t in e?Cr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var b=(e,t,n)=>xr(e,typeof t!="symbol"?t+"":t,n);import{t as oo,bo as M,bw as ro,b as so,bs as di,bq as Lr,bm as $e}from"./CtfEuoOH.js";import{bs as ao,a5 as Me,ay as ui,bS as Xe,aD as C,bA as ke,b_ as Ie,bO as it,W as de,bl as Xt,be as Dn,bn as lo,c9 as oe,aA as I,b$ as uo,aB as ge,ai as wr,bV as Te,br as kr,ca as je,bH as Q,c5 as dt,bk as Er,bj as Rr,aj as Ar,c0 as ci}from"./3SdAC2_C.js";import{i as we}from"./DynUeYUu.js";import{f as hi,g as mn,s as fi}from"./B26ZHg3s.js";import{b as Hr}from"./goTpbPhD.js";import{b as pi}from"./Dn334wJv.js";import{h as Dr,c as rt,J as co,Y as B,Z as Zt,a as ho,k as fo,_ as Je,H as po,j as go,aW as Tr,ak as mo,U as Mr,f as Ir,e as vo,T as Fr,g as Nr,S as Pr,ad as Qe,ac as Ve,C as zr,G as bo,F as Ur,I as _r,N as mt,ar as Or,a8 as Ht,am as Dt,x as K,w as Ue,ax as wt,ay as So,D as Br,d as Vr,aj as yo,aa as ct,l as Tn,b as gi,B as mi,z as vi,aU as Wr,aA as ft,al as Gr,V as Le,X as Ut,W as $r,a9 as Tt,E as jr,i as qr,av as Co,af as Kr,ab as bi,y as xo,ap as kt,ae as Et,an as ot,aq as Lo,O as vn,ao as Si,ai as bn,n as Xr,aS as yi}from"./uyQciu7h.js";import{h as Ye}from"./DEB8jcix.js";import{g as Yr,i as Jr}from"./CnFZbWXv.js";import{F as Sn,c9 as Qr,bi as Zr,ax as es,aw as ts}from"./COofQgO0.js";import{f as Mn}from"./D9R5fzn8.js";import"./CT8vPg_p.js";import{g as ns}from"./QzxpbvSo.js";import{c as is}from"./BFfRQORP.js";import{P as os}from"./CiHhUIjb.js";import{l as Ci}from"./DMEIbJII.js";class rs extends Dr{constructor(){super(...arguments),this.tokenize=as}equals(t,n,i){return i.ignoreWhitespace?((!i.newlineIsToken||!t.includes(`
1
+ var Cr=Object.defineProperty;var xr=(e,t,n)=>t in e?Cr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var b=(e,t,n)=>xr(e,typeof t!="symbol"?t+"":t,n);import{t as oo,bo as M,bw as ro,b as so,bs as di,bq as Lr,bm as $e}from"./Fcr7AvC-.js";import{bs as ao,a5 as Me,ay as ui,bS as Xe,aD as C,bA as ke,b_ as Ie,bO as it,W as de,bl as Xt,be as Dn,bn as lo,c9 as oe,aA as I,b$ as uo,aB as ge,ai as wr,bV as Te,br as kr,ca as je,bH as Q,c5 as dt,bk as Er,bj as Rr,aj as Ar,c0 as ci}from"./3SdAC2_C.js";import{i as we}from"./BhYXv0ZM.js";import{f as hi,g as mn,s as fi}from"./BRCr02in.js";import{b as Hr}from"./goTpbPhD.js";import{b as pi}from"./Dn334wJv.js";import{h as Dr,c as rt,J as co,Y as B,Z as Zt,a as ho,k as fo,_ as Je,H as po,j as go,aW as Tr,ak as mo,U as Mr,f as Ir,e as vo,T as Fr,g as Nr,S as Pr,ad as Qe,ac as Ve,C as zr,G as bo,F as Ur,I as _r,N as mt,ar as Or,a8 as Ht,am as Dt,x as K,w as Ue,ax as wt,ay as So,D as Br,d as Vr,aj as yo,aa as ct,l as Tn,b as gi,B as mi,z as vi,aU as Wr,aA as ft,al as Gr,V as Le,X as Ut,W as $r,a9 as Tt,E as jr,i as qr,av as Co,af as Kr,ab as bi,y as xo,ap as kt,ae as Et,an as ot,aq as Lo,O as vn,ao as Si,ai as bn,n as Xr,aS as yi}from"./DPbxpEc3.js";import{h as Ye}from"./DEB8jcix.js";import{g as Yr,i as Jr}from"./CA6H1-bp.js";import{F as Sn,c9 as Qr,bi as Zr,ax as es,aw as ts}from"./ChHRVjww.js";import{f as Mn}from"./Beq_QLuz.js";import"./BAtAwQ72.js";import{g as ns}from"./BwweojP5.js";import{c as is}from"./DRMe5Ypb.js";import{P as os}from"./BdWMbiFk.js";import{l as Ci}from"./C7b3vXLD.js";class rs extends Dr{constructor(){super(...arguments),this.tokenize=as}equals(t,n,i){return i.ignoreWhitespace?((!i.newlineIsToken||!t.includes(`
2
2
  `))&&(t=t.trim()),(!i.newlineIsToken||!n.includes(`
3
3
  `))&&(n=n.trim())):i.ignoreNewlineAtEof&&!i.newlineIsToken&&(t.endsWith(`
4
4
  `)&&(t=t.slice(0,-1)),n.endsWith(`
@@ -0,0 +1 @@
1
+ import{t as lt,bo as f,bw as dt,b as ct,bm as e,br as ft,bs as we,bq as Et}from"./Fcr7AvC-.js";import{bs as pt,ay as We,be as A,b$ as D,b_ as n,bO as i,W as a,bS as o,bl as T,bn as _t,aA as g,a7 as Lt,aD as t,c9 as K,aB as k,a5 as x,bA as y,bf as gt,bo as It,bV as tt,br as Gt,ca as bt,bH as Ke,bk as zt}from"./3SdAC2_C.js";import{g as Ut,i as Ot,I as mt}from"./CA6H1-bp.js";import{c as Ft}from"./2z64ELW5.js";import{s as ot,f as Bt,c as Nt}from"./BRCr02in.js";import{f as z}from"./Beq_QLuz.js";import"./BAtAwQ72.js";import"./O5ZlQHf9.js";import{b as Rt}from"./CWtyXmQ4.js";import"./x4bPxhVW.js";import"./BzXQ5SMs.js";import{b as Ht}from"./Ch9YoFhc.js";import{i as S}from"./BhYXv0ZM.js";import{b as Mt}from"./D3yXvqwY.js";import{F as Wt,ay as Jt,c_ as qt,cn as Yt,aN as Vt,bn as jt,d0 as Qt,cK as Xt}from"./ChHRVjww.js";import"./CWfjuhY2.js";import{F as ht,G as Zt}from"./CDUMf4mn.js";import"./Cz3WzTlQ.js";/* empty css */import{C as er}from"./DkQdSPDN.js";import{L as kt}from"./gNR_yDDX.js";import{I as rt}from"./C3KgmGxd.js";import"./koUs6Gjt.js";import"./lK1e5NlM.js";import{h as tr}from"./B469nFvV.js";import{JH as $e,fC as xt,J as rr,ep as yt,r7 as sr,uC as ar,Jy as ir,oF as nr,hS as or}from"./D0qhIm1r.js";import{aB as St,aC as Kt,aD as lr,aw as dr,ax as $t,ay as cr,az as pr,aH as _r}from"./Xk1ND_1x.js";import{R as ur}from"./CCSQmeuF.js";var vr=k('<!> <p class="type-body"> </p>',1);function fr(l,r){if(new.target)return lt({component:fr,...l});pt(r,!0);let _=f(r,"open",15,!1),E=f(r,"static",7,!1),B=f(r,"title",7),u=f(r,"message",7),b=f(r,"buttons",7),m=f(r,"cancelIndex",7,0),ae=f(r,"onSelect",7);function Y(d){_(!1),ae()?.(d)}var he={get open(){return _()},set open(d=!1){_(d),g()},get static(){return E()},set static(d=!1){E(d),g()},get title(){return B()},set title(d){B(d),g()},get message(){return u()},set message(d){u(d),g()},get buttons(){return b()},set buttons(d){b(d),g()},get cancelIndex(){return m()},set cancelIndex(d=0){m(d),g()},get onSelect(){return ae()},set onSelect(d){ae(d),g()},$set:dt,$on:(d,V)=>ct(r,d,V)};return Ht(l,{get static(){return E()},role:"alertdialog",get title(){return B()},dismissOnInteractOutside:!1,focusContent:!0,onSubmit:()=>Y(b().length-1),onCancel:()=>Y(m()),get open(){return _()},set open(V){_(V)},footer:V=>{var $=Lt(),N=We($);Ut(N,17,b,Ot,(ie,ne,te)=>{{let ke=K(()=>te===m()?"ghost":te===b().length-1?"primary":"outline");z(ie,{get variant(){return t(ke)},onclick:()=>Y(te),children:(De,R)=>{A();var Te=D();n(()=>i(Te,t(ne))),a(De,Te)},$$slots:{default:!0}})}}),a(V,$)},children:(V,$)=>{var N=vr(),ie=We(N);Ft(ie,()=>Rt,(ke,De)=>{De(ke,{class:"sr-only",children:(R,Te)=>{A();var Fe=D();n(()=>i(Fe,u())),a(R,Fe)},$$slots:{default:!0}})});var ne=o(ie,2),te=T(ne,!0);n(()=>i(te,u())),a(V,N)},$$slots:{footer:!0,default:!0}}),_t(he)}const Ae={anthropicKeys:"https://console.anthropic.com/settings/keys",openAiKeys:"https://platform.openai.com/api-keys",openAiTokens:"https://developers.openai.com/codex/enterprise/access-tokens",xaiConsole:"https://console.x.ai",factoryKeys:"https://app.factory.ai/settings/api-keys",cursorDashboard:"https://cursor.com/dashboard?tab=integrations",deepseekKeys:"https://platform.deepseek.com/api_keys",auggieAuth:"https://docs.augmentcode.com/cli/setup-auggie/authentication"},gr="claude setup-token",br="auggie token print";function mr(l,r){if(r==="differentLogin")return e.settings_providerProfileKinds_differentLogin_description();if(r==="token")return l==="codex"?e.settings_providerProfileKinds_tokenCodex_description():l==="auggie"?e.settings_providerProfileKinds_tokenAuggie_description():e.settings_providerProfileKinds_tokenClaude_description();switch(l){case"codex":return e.settings_providerProfileKinds_apiKeyCodex_description();case"grok":return e.settings_providerProfileKinds_apiKeyGrok_description();case"droid":return e.settings_providerProfileKinds_apiKeyDroid_description();case"cursor":return e.settings_providerProfileKinds_apiKeyCursor_description();case"dsh":return e.settings_providerProfileKinds_apiKeyDsh_description();default:return e.settings_providerProfileKinds_apiKeyClaude_description()}}function hr(l,r){return r==="apiKey"?e.settings_providerProfileKinds_apiKey_label():l==="auggie"?e.settings_providerProfileKinds_tokenAuggie_label():e.settings_providerProfileKinds_token_label()}function Ss(l,r){return l!=="claude"&&l!=="codex"?mr(l,r):r==="token"?l==="codex"?e.settings_providerProfileKinds_tokenCodexDialog_description():e.settings_providerProfileKinds_tokenClaudeDialog_description():l==="codex"?e.settings_providerProfileKinds_apiKeyCodexDialog_description():e.settings_providerProfileKinds_apiKeyClaudeDialog_description()}function kr(l,r){if(r==="token")return l==="codex"?{steps:[e.settings_providerProfileKinds_tokenCodexStep1_label()],link:{href:Ae.openAiTokens,label:e.settings_providerProfileKinds_openAiAccessTokens_link()},eligibility:e.settings_providerProfileKinds_tokenCodexEligibility_description()}:l==="auggie"?{steps:[e.settings_providerProfileKinds_tokenAuggieStep1_label(),e.settings_providerProfileKinds_tokenAuggieStep2_label()],command:br,link:{href:Ae.auggieAuth,label:e.settings_providerProfileKinds_auggieAuthDocs_link()}}:{steps:[e.settings_providerProfileKinds_tokenClaudeStep1_label(),e.settings_providerProfileKinds_tokenClaudeStep2_label()],command:gr};switch(l){case"codex":return{steps:[e.settings_providerProfileKinds_apiKeyCodexStep1_label(),e.settings_providerProfileKinds_apiKeyCodexStep2_label()],link:{href:Ae.openAiKeys,label:e.settings_providerProfileKinds_openAiApiKeys_link()}};case"grok":return{steps:[e.settings_providerProfileKinds_apiKeyGrokStep1_label(),e.settings_providerProfileKinds_apiKeyGrokStep2_label()],link:{href:Ae.xaiConsole,label:e.settings_providerProfileKinds_xaiConsole_link()}};case"droid":return{steps:[e.settings_providerProfileKinds_apiKeyDroidStep1_label(),e.settings_providerProfileKinds_apiKeyDroidStep2_label()],link:{href:Ae.factoryKeys,label:e.settings_providerProfileKinds_factoryApiKeys_link()}};case"cursor":return{steps:[e.settings_providerProfileKinds_apiKeyCursorStep1_label(),e.settings_providerProfileKinds_apiKeyCursorStep2_label()],link:{href:Ae.cursorDashboard,label:e.settings_providerProfileKinds_cursorDashboard_link()}};case"dsh":return{steps:[e.settings_providerProfileKinds_apiKeyDshStep1_label(),e.settings_providerProfileKinds_apiKeyDshStep2_label()],link:{href:Ae.deepseekKeys,label:e.settings_providerProfileKinds_deepseekApiKeys_link()}};default:return{steps:[e.settings_providerProfileKinds_apiKeyClaudeStep1_label(),e.settings_providerProfileKinds_apiKeyClaudeStep2_label()],link:{href:Ae.anthropicKeys,label:e.settings_providerProfileKinds_anthropicConsole_link()}}}}function xr(l,r){return r?l==="apiKey"?e.settings_providerProfileKinds_apiKeyClaudeStep3_label():e.settings_providerProfileKinds_tokenClaudeStep3_label():e.settings_providerProfileKinds_pasteNoCheck_label()}function Ks(l,r){if(r==="token")return l==="codex"?e.settings_providerProfileKinds_tokenNotJwt_error():l==="auggie"?e.settings_providerProfileKinds_tokenShapeAuggie_error():e.settings_providerProfileKinds_tokenShapeClaude_error();switch(l){case"codex":return e.settings_providerProfileKinds_keyShapeCodex_error();case"grok":return e.settings_providerProfileKinds_keyShapeGrok_error();case"droid":return e.settings_providerProfileKinds_keyShapeDroid_error();case"cursor":return e.settings_providerProfileKinds_keyShapeCursor_error();case"dsh":return e.settings_providerProfileKinds_keyShapeDsh_error();default:return e.settings_providerProfileKinds_keyShapeClaude_error()}}var yr=k('<p class="type-body text-muted-foreground" data-testid="provider-profile-token-eligibility"> </p>'),Sr=k('<span class="mt-1 flex items-center gap-2" data-testid="provider-profile-setup-token"><code class="rounded border border-border bg-muted px-1.5 py-0.5 font-mono type-caption text-foreground"> </code> <!></span>'),Pt=k("<li> </li>"),Kr=k('<section class="space-y-2" data-testid="provider-profile-secret-steps"><h3 class="type-body font-medium! text-foreground"> </h3> <ol class="type-body list-decimal space-y-1 pl-5 text-muted-foreground"><li> <!></li> <!> <!></ol> <!></section>'),Ct=k('<div class="flex items-center gap-2"><!> <!></div>'),$r=k('<div class="space-y-2" data-testid="provider-profile-secret-saved"><p class="type-body text-foreground"> </p> <div class="flex items-center gap-3"><span class="type-body font-mono text-muted-foreground"> </span> <!></div></div>'),Pr=k('<span class="type-body text-muted-foreground"> </span> <!>',1),Cr=k('<span class="type-body font-mono text-muted-foreground"> </span> <!> <!>',1),wr=k('<div class="flex flex-wrap items-center gap-3" data-testid="provider-profile-base-url-saved"><span class="type-body text-foreground"> </span> <!></div>'),Ar=k('<details class="group rounded-md border border-border" data-testid="provider-profile-custom-endpoint"><summary class="flex cursor-pointer list-none items-center gap-2 px-3 py-2 type-body text-foreground [&amp;::-webkit-details-marker]:hidden"><!> </summary> <div class="space-y-2 border-t border-border px-3 py-3"><p class="type-caption text-muted-foreground"> </p> <!></div></details>'),Dr=k('<div class="space-y-5" data-testid="provider-profile-secret"><!> <!> <!> <!></div>');function Tr(l,r){if(new.target)return lt({component:Tr,...l});pt(r,!0);let _=f(r,"provider",7),E=f(r,"kind",7),B=f(r,"mode",7),u=f(r,"secret",15,""),b=f(r,"secretSaved",7,!1),m=f(r,"replacing",15,!1),ae=f(r,"secretError",7),Y=f(r,"baseUrl",15,""),he=f(r,"baseUrlSaved",7,!1),d=f(r,"baseUrlAction",15,"keep"),V=f(r,"customEndpointOpen",15,!1),$=f(r,"disabled",7,!1),N=f(r,"secretDisabled",23,$),ie=f(r,"keyCheck",7,!0),ne=f(r,"pasteStep",7,!0),te=f(r,"customEndpoint",7,!0);const ke="https://",De=K(()=>_()==="claude"&&E()==="apiKey"),R=K(()=>kr(_(),E())),Te=K(()=>xr(E(),ie())),Fe=K(()=>B()==="add"||!b()||m()),Ye=K(()=>hr(_(),E()));function st(){m(!1),u("")}var at={get provider(){return _()},set provider(s){_(s),g()},get kind(){return E()},set kind(s){E(s),g()},get mode(){return B()},set mode(s){B(s),g()},get secret(){return u()},set secret(s=""){u(s),g()},get secretSaved(){return b()},set secretSaved(s=!1){b(s),g()},get replacing(){return m()},set replacing(s=!1){m(s),g()},get secretError(){return ae()},set secretError(s){ae(s),g()},get baseUrl(){return Y()},set baseUrl(s=""){Y(s),g()},get baseUrlSaved(){return he()},set baseUrlSaved(s=!1){he(s),g()},get baseUrlAction(){return d()},set baseUrlAction(s="keep"){d(s),g()},get customEndpointOpen(){return V()},set customEndpointOpen(s=!1){V(s),g()},get disabled(){return $()},set disabled(s=!1){$(s),g()},get secretDisabled(){return N()},set secretDisabled(s=$){N(s),g()},get keyCheck(){return ie()},set keyCheck(s=!0){ie(s),g()},get pasteStep(){return ne()},set pasteStep(s=!0){ne(s),g()},get customEndpoint(){return te()},set customEndpoint(s=!0){te(s),g()},$set:dt,$on:(s,C)=>ct(r,s,C)},Be=Dr(),Ee=x(Be);{var Ve=s=>{var C=yr(),H=T(C,!0);n(()=>i(H,t(R).eligibility)),a(s,C)};S(Ee,s=>{t(R).eligibility&&s(Ve)})}var ue=o(Ee,2);{var Ne=s=>{var C=Kr(),H=x(C),oe=T(H,!0),j=o(H,2),Q=x(j),le=x(Q),xe=o(le);{var W=h=>{var L=Sr(),J=x(L),O=T(J,!0),de=o(J,2);er(de,{get text(){return t(R).command},size:"sm"}),y(L),n(()=>i(O,t(R).command)),a(h,L)};S(xe,h=>{t(R).command&&h(W)})}y(Q);var ve=o(Q,2);{var re=h=>{var L=Pt(),J=T(L,!0);n(()=>i(J,t(R).steps[1])),a(h,L)};S(ve,h=>{t(R).steps[1]&&h(re)})}var U=o(ve,2);{var M=h=>{var L=Pt(),J=T(L,!0);n(()=>i(J,t(Te))),a(h,L)};S(U,h=>{ne()&&h(M)})}y(j);var ye=o(j,2);{var Le=h=>{z(h,{variant:"link",size:"sm",get href(){return t(R).link.href},target:"_blank",rel:"noopener noreferrer",class:"h-auto px-0",children:(L,J)=>{A();var O=D();n(()=>i(O,t(R).link.label)),a(L,O)},$$slots:{default:!0}})};S(ye,h=>{t(R).link&&h(Le)})}y(C),n(h=>{i(oe,h),i(le,`${t(R).steps[0]??""} `)},[()=>E()==="apiKey"?e.settings_providerProfileKinds_apiKeyClaudeSteps_label():e.settings_providerProfileKinds_tokenSteps_label()]),a(s,C)};S(ue,s=>{(B()==="add"||m())&&s(Ne)})}var P=o(ue,2);{var je=s=>{ht(s,{get label(){return t(Ye)},get error(){return ae()},control:(H,oe=gt)=>{var j=Ct(),Q=x(j);rt(Q,ft(oe,{type:"password",autocomplete:"off",spellcheck:!1,class:"font-mono",get disabled(){return N()},"data-testid":"provider-profile-secret-input",get value(){return u()},set value(W){u(W)}}));var le=o(Q,2);{var xe=W=>{z(W,{variant:"ghost-light",size:"sm",get disabled(){return N()},onclick:st,children:(ve,re)=>{A();var U=D();n(M=>i(U,M),[()=>e.settings_providerProfileKinds_keepSaved_label()]),a(ve,U)},$$slots:{default:!0}})};S(le,W=>{B()==="edit"&&b()&&W(xe)})}y(j),a(H,j)},$$slots:{control:!0}})},Je=s=>{var C=$r(),H=x(C),oe=T(H,!0),j=o(H,2),Q=x(j),le=T(Q,!0),xe=o(Q,2);z(xe,{variant:"outline",size:"sm",get disabled(){return $()},onclick:()=>m(!0),children:(W,ve)=>{A();var re=D();n(U=>i(re,U),[()=>e.settings_providerProfileKinds_replace_label()]),a(W,re)},$$slots:{default:!0}}),y(j),y(C),n(W=>{i(oe,t(Ye)),i(le,W)},[()=>e.settings_providerProfileKinds_saved_label()]),a(s,C)};S(P,s=>{t(Fe)?s(je):s(Je,-1)})}var it=o(P,2);{var Qe=s=>{var C=Ar(),H=x(C),oe=x(H);Wt(oe,{get icon(){return Jt},class:"size-3 transition-transform group-open:rotate-90"});var j=o(oe);y(H);var Q=o(H,2),le=x(Q),xe=T(le,!0),W=o(le,2);{var ve=U=>{var M=wr(),ye=x(M),Le=T(ye,!0),h=o(ye,2);{var L=O=>{var de=Pr(),X=We(de),Pe=T(X,!0),Ie=o(X,2);z(Ie,{variant:"ghost-light",size:"sm",get disabled(){return $()},onclick:()=>d("keep"),children:(fe,ge)=>{A();var Re=D();n(Se=>i(Re,Se),[()=>e.settings_providerProfileKinds_keepSaved_label()]),a(fe,Re)},$$slots:{default:!0}}),n(fe=>i(Pe,fe),[()=>e.settings_providerProfileKinds_baseUrlRemoved_label()]),a(O,de)},J=O=>{var de=Cr(),X=We(de),Pe=T(X,!0),Ie=o(X,2);z(Ie,{variant:"outline",size:"sm",get disabled(){return $()},onclick:()=>d("replace"),children:(ge,Re)=>{A();var Se=D();n(v=>i(Se,v),[()=>e.settings_providerProfileKinds_replace_label()]),a(ge,Se)},$$slots:{default:!0}});var fe=o(Ie,2);z(fe,{variant:"ghost-light",size:"sm",get disabled(){return $()},onclick:()=>d("remove"),children:(ge,Re)=>{A();var Se=D();n(v=>i(Se,v),[()=>e.settings_providerProfiles_remove_label()]),a(ge,Se)},$$slots:{default:!0}}),n(ge=>i(Pe,ge),[()=>e.settings_providerProfileKinds_saved_label()]),a(O,de)};S(h,O=>{d()==="remove"?O(L):O(J,-1)})}y(M),n(O=>i(Le,O),[()=>e.settings_providerProfileKinds_baseUrl_label()]),a(U,M)},re=U=>{{const M=(Le,h=gt)=>{var L=Ct(),J=x(L);rt(J,ft(h,{type:"url",placeholder:ke,autocomplete:"off",spellcheck:!1,class:"font-mono",get disabled(){return $()},"data-testid":"provider-profile-base-url-input",get value(){return Y()},set value(X){Y(X)}}));var O=o(J,2);{var de=X=>{z(X,{variant:"ghost-light",size:"sm",get disabled(){return $()},onclick:()=>{d("keep"),Y("")},children:(Pe,Ie)=>{A();var fe=D();n(ge=>i(fe,ge),[()=>e.settings_providerProfileKinds_keepSaved_label()]),a(Pe,fe)},$$slots:{default:!0}})};S(O,X=>{B()==="edit"&&he()&&X(de)})}y(L),a(Le,L)};let ye=K(()=>e.settings_providerProfileKinds_baseUrl_label());ht(U,{get label(){return t(ye)},control:M,$$slots:{control:!0}})}};S(W,U=>{B()==="edit"&&he()&&d()!=="replace"?U(ve):U(re,-1)})}y(Q),y(C),n((U,M)=>{i(j,` ${U??""}`),i(xe,M)},[()=>e.settings_providerProfileKinds_customEndpoint_label(),()=>e.settings_providerProfileKinds_customEndpoint_description()]),Mt("open","toggle",C,V,V),a(s,C)};S(it,s=>{t(De)&&te()&&s(Qe)})}return y(Be),n(()=>ot(Be,"data-kind",E())),a(l,Be),_t(at)}var Er=k('<p class="text-sm text-subtle" role="status" data-testid="gitlab-instance-update-required"> </p>'),Lr=k('<p class="break-all type-caption text-subtle" data-testid="gitlab-connect-instance"> </p>'),Ir=k('<div class="max-w-sm space-y-3" data-testid="gitlab-connect-device-flow"><!> <div class="flex flex-wrap items-center gap-2 text-subtle text-sm"><!> <span> </span> <!> <!></div></div>'),Gr=k('<div class="flex flex-wrap items-center gap-2 text-subtle text-sm"><!> <span> </span> <!></div>'),zr=k('<p class="text-xs text-danger" role="alert"> </p>'),Ur=k('<div class="max-w-sm space-y-1" data-testid="gitlab-connect-token"><!> <!> <p class="text-xs text-subtle"> <!></p></div> <div class="flex flex-wrap items-center gap-2"><!> <!> <!></div>',1),Or=k('<div class="flex flex-wrap items-center gap-2"><!> <!> <!></div>'),Fr=k('<div class="max-w-sm space-y-1"><!> <!> <p class="text-xs text-subtle"> </p> <!></div> <!>',1),Br=k('<p class="text-sm text-subtle" role="status"> </p>'),Nr=k('<div class="space-y-1"><p class="text-sm text-subtle" role="status"> </p> <!></div>'),Rr=k('<p class="text-sm text-danger" role="alert"> </p>'),Hr=k('<div data-testid="gitlab-connect-form"><!> <!> <!> <!> <!></div>');function Mr(l,r){const _=It();if(new.target)return lt({component:Mr,...l});pt(r,!0);const E=()=>we(De,"$storedInstance$",d),B=()=>we(st,"$deviceGrantSupported$",d),u=()=>we(Be,"$instanceSetupSupported$",d),b=()=>we(R,"$isAuthenticating$",d),m=()=>we(Te,"$isCancelling$",d),ae=()=>we(Ye,"$deviceFlow$",d),Y=()=>we(Fe,"$cancelOutcome$",d),he=()=>we(at,"$error$",d),[d,V]=Et();let $=f(r,"compact",7,!1),N=f(r,"onCancel",7);const ie=`${_}-host`,ne=`${_}-host-help`,te=`${_}-host-error`,ke=`${_}-token`,De=St(),R=Kt(),Te=lr(),Fe=dr(),Ye=$t(),st=cr(),at=pr(),Be=_r();let Ee=tt(Gt(St.select($e.state))),Ve=tt(!1),ue=tt(""),Ne=tt(!1);const P=K(()=>ar(t(Ee))),je=K(()=>t(Ne)||t(P)===E()&&B()===!1),Je=K(()=>t(P)?nr(t(P)):null),it=K(()=>u()&&t(P)!==null&&t(ue).trim().length>0);bt(()=>{const v=E();t(Ve)||Ke(Ee,v,!0)}),bt(()=>{u()||Ke(ue,"")}),zt(()=>{const v=()=>{const c=$e.state;Kt.select(c)&&$t.select(c)&&$e.dispatch(xt())};return window.addEventListener("focus",v),()=>window.removeEventListener("focus",v)});function Qe(){!u()||!t(P)||t(P)===E()||b()||m()||$e.dispatch(sr(t(P)))}function s(){Ke(Ve,!0),Ke(ue,"")}function C(){!u()||!t(P)||b()||m()||$e.dispatch(ir(t(P)))}function H(){const v=t(ue).trim();!u()||!v||!t(P)||b()||m()||($e.dispatch(or(t(P),v)),Ke(ue,""))}function oe(){!u()||m()||(b()&&$e.dispatch(yt()),Ke(Ne,!0))}function j(){Ke(Ne,!1)}function Q(){m()||$e.dispatch(yt())}function le(){t(Je)&&tr(t(Je),{})}function xe(v){v.key==="Enter"&&(v.preventDefault(),Qe(),t(je)?document.getElementById(ke)?.focus():C())}function W(v){v.key==="Enter"&&(v.preventDefault(),H())}const ve=K(()=>$()?"sm":"xl"),re=K(()=>$()?"sm":"default");var U={get compact(){return $()},set compact(v=!1){$(v),g()},get onCancel(){return N()},set onCancel(v){N(v),g()},$set:dt,$on:(v,c)=>ct(r,v,c)},M=Hr();{const v=c=>{z(c,{variant:"ghost",size:"sm",type:"button",class:"text-muted-foreground hover:text-foreground",get disabled(){return m()},onclick:Q,children:(p,w)=>{A();var F=D();n(ce=>i(F,ce),[()=>m()?e.lib_gitlabConnect_cancelling_label():e.lib_gitlabConnect_cancel_label()]),a(p,F)},$$slots:{default:!0}})};var ye=x(M);{var Le=c=>{var p=Er(),w=T(p,!0);n(F=>i(w,F),[()=>e.lib_gitlabConnect_updateRequired_description()]),a(c,p)};S(ye,c=>{u()||c(Le)})}var h=o(ye,2);{var L=c=>{var p=Lr(),w=T(p,!0);n(()=>i(w,E())),a(c,p)};S(h,c=>{(b()||m())&&c(L)})}var J=o(h,2);{var O=c=>{var p=Ir(),w=x(p);{let ze=K(()=>e.lib_gitlabConnect_openGitlab_label());Zt(w,{get userCode(){return ae().userCode},get verificationUri(){return ae().verificationUri},get openLabel(){return t(ze)},get compact(){return $()}})}var F=o(w,2),ce=x(F);mt(ce,{size:16,class:"shrink-0"});var se=o(ce,2),He=T(se,!0),Ge=o(se,2);{let ze=K(()=>m()||!u());z(Ge,{variant:"link",size:"sm",type:"button",class:"px-0",get disabled(){return t(ze)},onclick:oe,children:(nt,ut)=>{A();var I=D();n(q=>i(I,q),[()=>e.lib_gitlabConnect_useToken_label()]),a(nt,I)},$$slots:{default:!0}})}var qe=o(Ge,2);v(qe),y(F),y(p),n(ze=>i(He,ze),[()=>e.lib_gitlabConnect_waitingForAuthorization_label()]),a(c,p)},de=c=>{var p=Gr(),w=x(p);mt(w,{size:16,class:"shrink-0"});var F=o(w,2),ce=T(F,!0),se=o(F,2);v(se),y(p),n(He=>i(ce,He),[()=>e.lib_gitlabConnect_connecting_label()]),a(c,p)},X=c=>{var p=Fr(),w=We(p),F=x(w);kt(F,{get for(){return ie},children:(I,q)=>{A();var Z=D();n(pe=>i(Z,pe),[()=>e.lib_gitlabConnect_host_label()]),a(I,Z)},$$slots:{default:!0}});var ce=o(F,2);{let I=K(()=>!u()),q=K(()=>!t(P)||void 0),Z=K(()=>t(P)?ne:`${ne} ${te}`);rt(ce,{get id(){return ie},type:"text",autocomplete:"url",spellcheck:!1,get disabled(){return t(I)},get"aria-invalid"(){return t(q)},get"aria-describedby"(){return t(Z)},get placeholder(){return rr},oninput:s,onchange:Qe,onkeydown:xe,get value(){return t(Ee)},set value(pe){Ke(Ee,pe,!0)}})}var se=o(ce,2),He=T(se,!0),Ge=o(se,2);{var qe=I=>{var q=zr(),Z=T(q,!0);n(pe=>{ot(q,"id",te),i(Z,pe)},[()=>e.lib_gitlabConnect_invalidInstance_error()]),a(I,q)};S(Ge,I=>{t(P)||I(qe)})}y(w);var ze=o(w,2);{var nt=I=>{var q=Ur(),Z=We(q),pe=x(Z);kt(pe,{get for(){return ke},children:(G,me)=>{A();var Me=D();n(ee=>i(Me,ee),[()=>e.lib_gitlabConnect_token_label()]),a(G,Me)},$$slots:{default:!0}});var Xe=o(pe,2);{let G=K(()=>!u());rt(Xe,{get id(){return ke},type:"password",autocomplete:"off",get disabled(){return t(G)},placeholder:"glpat-...",onkeydown:W,get value(){return t(ue)},set value(me){Ke(ue,me,!0)}})}var Ze=o(Xe,2),be=x(Ze),Ue=o(be);{var et=G=>{z(G,{variant:"link",size:"sm",type:"button",class:"h-auto px-0 text-xs",onclick:le,children:(me,Me)=>{A();var ee=D();n(Oe=>i(ee,Oe),[()=>e.lib_gitlabConnect_createToken_label({host:t(P)})]),a(me,ee)},$$slots:{default:!0}})};S(Ue,G=>{t(Je)&&t(P)&&G(et)})}y(Ze),y(Z);var _e=o(Z,2),Ce=x(_e);{let G=K(()=>!t(it));z(Ce,{variant:"primary",get size(){return t(ve)},type:"button",onclick:H,get disabled(){return t(G)},children:(me,Me)=>{A();var ee=D();n(Oe=>i(ee,Oe),[()=>e.lib_gitlabConnect_connect_label()]),a(me,ee)},$$slots:{default:!0}})}var vt=o(Ce,2);{var At=G=>{z(G,{variant:"ghost",get size(){return t(re)},type:"button",onclick:j,children:(me,Me)=>{A();var ee=D();n(Oe=>i(ee,Oe),[()=>e.lib_gitlabConnect_useDevice_label()]),a(me,ee)},$$slots:{default:!0}})};S(vt,G=>{t(Ne)&&!(t(P)===E()&&B()===!1)&&G(At)})}var Dt=o(vt,2);{var Tt=G=>{z(G,{variant:"ghost",get size(){return t(re)},type:"button",get onclick(){return N()},children:(me,Me)=>{A();var ee=D();n(Oe=>i(ee,Oe),[()=>e.lib_gitlabConnect_cancel_label()]),a(me,ee)},$$slots:{default:!0}})};S(Dt,G=>{N()&&G(Tt)})}y(_e),n(G=>i(be,`${G??""} `),[()=>e.lib_gitlabConnect_token_description()]),a(I,q)},ut=I=>{var q=Or(),Z=x(q);{let be=K(()=>!t(P)||!u());z(Z,{variant:"primary",get size(){return t(ve)},type:"button",onclick:C,get disabled(){return t(be)},children:(Ue,et)=>{A();var _e=D();n(Ce=>i(_e,Ce),[()=>e.lib_gitlabConnect_connect_label()]),a(Ue,_e)},$$slots:{default:!0}})}var pe=o(Z,2);{let be=K(()=>!u());z(pe,{variant:"ghost",get size(){return t(re)},type:"button",get disabled(){return t(be)},onclick:oe,children:(Ue,et)=>{A();var _e=D();n(Ce=>i(_e,Ce),[()=>e.lib_gitlabConnect_useToken_label()]),a(Ue,_e)},$$slots:{default:!0}})}var Xe=o(pe,2);{var Ze=be=>{z(be,{variant:"ghost",get size(){return t(re)},type:"button",get onclick(){return N()},children:(Ue,et)=>{A();var _e=D();n(Ce=>i(_e,Ce),[()=>e.lib_gitlabConnect_cancel_label()]),a(Ue,_e)},$$slots:{default:!0}})};S(Xe,be=>{N()&&be(Ze)})}y(q),a(I,q)};S(ze,I=>{t(je)?I(nt):I(ut,-1)})}n(I=>{ot(se,"id",ne),i(He,I)},[()=>e.lib_gitlabConnect_host_description()]),a(c,p)};S(J,c=>{(b()||m())&&ae()?c(O):b()||m()?c(de,1):c(X,-1)})}var Pe=o(J,2);{var Ie=c=>{var p=Br(),w=T(p,!0);n(F=>i(w,F),[()=>e.lib_gitlabConnect_cancelled_label()]),a(c,p)},fe=c=>{var p=Nr(),w=x(p),F=T(w,!0),ce=o(w,2);z(ce,{variant:"link",size:"sm",type:"button",class:"px-0",get disabled(){return m()},onclick:()=>$e.dispatch(xt()),children:(se,He)=>{A();var Ge=D();n(qe=>i(Ge,qe),[()=>e.lib_gitlabConnect_checkStatus_label()]),a(se,Ge)},$$slots:{default:!0}}),y(p),n(se=>i(F,se),[()=>Y()==="already-started"?e.lib_gitlabConnect_alreadyStarted_description():e.lib_gitlabConnect_cancelFailed_description()]),a(c,p)};S(Pe,c=>{Y()==="cancelled"?c(Ie):(Y()==="already-started"||Y()==="failed")&&c(fe,1)})}var ge=o(Pe,2);{var Re=c=>{var p=Rr(),w=T(p,!0);n(()=>i(w,he())),a(c,p)};S(ge,c=>{he()&&c(Re)})}y(M)}n(()=>Bt(M,1,Nt($()?"space-y-2":"space-y-4"))),a(l,M);var Se=_t(U);return V(),Se}const wt=[{id:"people",get label(){return e.workspace_peopleTile_title()},icon:qt,description:""},{id:"agents",get label(){return e.workspace_multiSelectSidebar_agentsTab_label()},icon:Yt,get description(){return e.workspace_multiSelectSidebar_agentsTab_description()}},{id:"context",get label(){return e.workspace_multiSelectSidebar_contextTab_label()},icon:ur.note,get description(){return e.workspace_multiSelectSidebar_contextTab_description()}},{id:"changes",get label(){return e.workspace_multiSelectSidebar_changesTab_label()},icon:Vt,get description(){return e.workspace_multiSelectSidebar_changesTab_description()}},{id:"files",get label(){return e.workspace_multiSelectSidebar_filesTab_label()},icon:jt,get description(){return e.workspace_multiSelectSidebar_filesTab_description()}},{id:"browser",get label(){return e.workspace_multiSelectSidebar_browserTab_label()},icon:Qt,get description(){return e.workspace_multiSelectSidebar_browserTab_description()}},{id:"shell",get label(){return e.workspace_multiSelectSidebar_shellTab_label()},icon:Xt,get description(){return e.workspace_multiSelectSidebar_shellTab_description()}}];function Wr(l){return wt.some(r=>r.id===l)}const Jr=new Set(["browser","shell"]),$s=new Set(["context","changes","files","browser","shell"]),qr=new Set(["changes"]);function Ps(l,r=!1,_=!0,E=!1,B=!1){const u=l.filter(b=>Wr(b)&&(b!=="people"||_)&&!(B&&qr.has(b))&&!(r&&Jr.has(b)&&!(b==="shell"&&E)));return new Set(u.length>0?u:["agents"])}function Yr(l){const r=new Set(l);return wt.flatMap(({id:_})=>r.has(_)?[_]:[])}function Cs(l,r){const _=new Set(l);return _.has(r)?_.size>1&&_.delete(r):_.add(r),Yr(_)}export{qr as G,$s as H,fr as M,Jr as O,Tr as P,wt as T,Mr as a,hr as b,Ks as c,mr as k,Ps as n,Yr as o,Ss as s,Cs as t};
@@ -1 +1 @@
1
- import{h8 as O,gQ as U,JV as B,KJ as H,DG as V,u6 as j,v3 as q,B9 as K,Ba as N,JT as Q,JU as z,Bb as X}from"./CiKoEJ2m.js";import{selectWorkspaceTabOrder as f,selectCurrentWorkspaceTabId as S,selectLastClosedWorkspaceTab as Y}from"./BU3y3Xes.js";import{i as Z,q as M,b as ee,j as te,l as ae}from"./BkcCJyDK.js";import{g as ne}from"./DXXFBdjF.js";import{bm as l}from"./CtfEuoOH.js";import{z as oe,S as y}from"./CT8vPg_p.js";import{B as h,S as C,Q as ce}from"./Bqd7fdCF.js";import{al as le,aj as E}from"./D5Jk5CWk.js";import{g as se}from"./rwibDzZr.js";function A(e,a){const n=f.select(e.state),o=S.select(e.state);if(!o)return null;const c=n.indexOf(o),s=c+(a==="left"?-1:1),p=n[s];return c<0||!p?null:(e.dispatch(j(o,p,a==="left"?"before":"after")),o)}function P(e){const a=S.select(e);return a&&f.select(e).includes(a)?a:null}function m(e,a,n){const o=P(e.state),c=o?`/workspace/${o}`:ne(e.state);return a!==c&&n(c),o}function ie(e,a,n,o){return e.dispatch(O(a)),m(e,n,o),a}function I(e,a){const o=a.match(/^\/workspace\/([^/]+)/)?.[1];return o?o==="new"?null:o:null}function R(e,a,n,o){if(n==="/")return D(e,a==="next"?0:"last",n,o);e.dispatch(a==="next"?Q():z());const c=S.select(e.state);if(!c)return null;const s=`/workspace/${c}`;return n!==s&&o(s),c}function re(e,a,n){const o=I(e,a);return o?ie(e,o,a,n):null}function pe(e,a,n){const o=I(e,a);if(!o)return null;const c=Z.select(e.state,o);if(!c)return null;const s=c.tabs.find(v=>v.id===c.activeTabId),p=c.tabs.length===0&&c.activeTabId===null,T=M.select(e.state,o)>1&&(p||c.tabs.length===1&&s!==void 0&&s.closable!==!1);if((!s||s.closable===!1)&&!T)return null;const g=n??se(o)?.availableCanvasWidth??void 0;return e.dispatch(U(o,void 0,g)),s?.id??c.id}function ue(e,a){const n=e.state.panelLayout.byWorkspaceId[a];return!n||n.restoreStatus==="pending"?!1:ee.select(e.state,a).length===0}function de(e,a,n){P(e.state)||e.dispatch(B(0)),m(e,a,n)}function L(e,a,{navigate:n,closeWindow:o}){return o?(o(),"window"):(m(e,a,n),null)}function be(e,a,n){const o=I(e,a);return o?pe(e,a,n.availableCanvasWidth)!==null?"panel":ue(e,o)?(e.dispatch(O(o)),f.select(e.state).length>0?(de(e,a,n.navigate),"workspace"):L(e,a,n)??"workspace"):null:f.select(e.state).length>0?null:L(e,a,n)}function fe(e,a,n){return e.dispatch(X()),m(e,a,n)}function ke(e,a,n){const o=a.match(/^\/workspace\/([^/]+)/),c=o&&o[1]!=="new"?o[1]:null,s=Y.select(e.state),p=c?ae.select(e.state,c):null;return c&&p&&(!s||p.closedAt>=s.closedAt)?p.kind==="column"?(e.dispatch(K(c)),"column"):(e.dispatch(N(c)),p.kind):s?(fe(e,a,n),"workspace"):null}function we(e,a){const n=a.match(/^\/workspace\/([^/]+)/),o=n&&n[1]!=="new"?n[1]:null;if(!o)return null;const c=q(o);return e.dispatch(c),te.select(e.state,o)}function D(e,a,n,o){const c=f.select(e.state),s=a==="last"?c.length-1:a;return s<0||s>=c.length?null:(e.dispatch(B(s)),m(e,n,o))}function We({isMac:e,register:a,store:n,getCurrentPath:o,navigate:c,openNewWorkspace:s,getRailMachineIds:p,onCreateAgent:T,onCreateNote:g,onCreateTerminal:v,onCreateBrowser:G,onWorkspaceTabMoved:W,closeWindow:F,resolveBinding:_}){const r=e?{meta:!0}:{ctrl:!0},$=oe("TOGGLE_SIDEBAR",e),k=t=>()=>t(o()),J=t=>()=>{const i=o().match(/^\/workspace\/([^/]+)/);i?.[1]&&i[1]!=="new"&&t(i[1])},u=t=>_?{binding:()=>_(t)}:{},w=t=>_?.(t)??ce(t);a({...u("global.new-space"),...r,key:"n",global:!0,description:l.workspace_shortcuts_newSpace_description(),action:s}),a({...u("panel.toggle-sidebar"),...$,global:!0,description:y.TOGGLE_SIDEBAR.label,action:()=>n.dispatch(H())}),a({...u("navigation.new-tab"),...r,key:"t",global:!0,description:l.workspace_shortcuts_newPanel_description(),action:k(t=>we(n,t))});for(const[t,i,b,d]of[["workspace.new-agent","a",l.ui_shortcuts_newAgent_label(),T],["workspace.new-note","n",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_note_label()}),g],["workspace.new-terminal","t",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_terminal_label()}),v],["workspace.new-browser","b",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_browser_label()}),G]])d&&a({...u(t),...r,key:i,alt:!0,global:!0,allowInTerminal:!0,description:b,action:J(d)});a({...u("navigation.close-tab"),...r,key:"w",global:!0,description:l.workspace_shortcuts_closePanelTab_description(),action:k(t=>be(n,t,{navigate:c,closeWindow:F}))}),a({...u("navigation.close-space-tab"),...r,key:"w",shift:!0,global:!0,description:l.workspace_shortcuts_closeSpaceTab_description(),action:k(t=>re(n,t,c))}),a({...u("navigation.reopen-tab"),...r,key:"t",shift:!0,global:!0,description:l.workspace_shortcuts_reopenClosedTabOrSpace_description(),action:k(t=>ke(n,t,c))}),a({...u("navigation.move-space-tab-left"),...r,key:"ArrowLeft",alt:!0,shift:!0,global:!0,description:y.MOVE_SPACE_TAB_LEFT.label,action:()=>{const t=A(n,"left");t&&W?.({workspaceId:t,position:f.select(n.state).indexOf(t)+1})}}),a({...u("navigation.move-space-tab-right"),...r,key:"ArrowRight",alt:!0,shift:!0,global:!0,description:y.MOVE_SPACE_TAB_RIGHT.label,action:()=>{const t=A(n,"right");t&&W?.({workspaceId:t,position:f.select(n.state).indexOf(t)+1})}});for(const[t,i]of[["next",!1],["previous",!0]]){a({...u(t==="next"?"global.next-space":"global.previous-space"),key:"Tab",ctrl:!0,shift:i,global:!0,description:t==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:k(d=>R(n,t,d,c))});const b=t==="next"?"global.next-space-alt":"global.previous-space-alt";a({...u(b),...r,key:t==="next"?"}":"{",shift:!0,global:!0,allowInTerminal:!0,preferLocal:!0,enabled:d=>!_||!h(b,d,_,e),description:t==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:k(d=>R(n,t,d,c))})}const x=t=>{t===1?c("/"):D(n,t===9?"last":t-2,o(),c)};for(let t=1;t<=9;t++)a({...r,key:String(t),binding:()=>w("navigation.go-to-device").replace(/([1-8])-9$/,String(t)),global:!0,allowInTerminal:!0,enabled:i=>E.select(n.state)&&!h("navigation.go-to-device",i,w,e),description:l.machineRail_nav_ariaLabel(),action:()=>{const i=p?.()??le.select(n.state).map(d=>d.id),b=i[t===9?i.length-1:t-1];b&&n.dispatch(V(b))}});for(let t=1;t<=9;t++)a({...r,key:String(t),binding:()=>C["navigation.go-to-device"].replace(/([1-8])-9$/,String(t)),global:!0,allowInTerminal:!0,enabled:i=>!E.select(n.state)&&w("navigation.go-to-tab")===C["navigation.go-to-tab"]&&!h("navigation.go-to-device",i,w,e),description:l.ui_shortcuts_goToTab_label(),action:()=>x(t)});for(let t=1;t<=9;t++)a({binding:()=>w("navigation.go-to-tab").replace(/([1-8])-9$/,String(t)),...r,alt:!0,key:String(t),global:!0,allowInTerminal:!0,enabled:i=>!h("navigation.go-to-tab",i,w,e),description:t===1?l.home_navigation_description():t===9?l.workspace_shortcuts_selectLastSpaceTab_description():l.workspace_shortcuts_selectSpaceTab_description({digit:t}),action:()=>x(t)})}export{be as c,We as r};
1
+ import{h8 as O,gQ as U,JV as B,KJ as H,DG as V,u6 as j,v3 as q,B9 as K,Ba as N,JT as Q,JU as z,Bb as X}from"./D0qhIm1r.js";import{selectWorkspaceTabOrder as f,selectCurrentWorkspaceTabId as S,selectLastClosedWorkspaceTab as Y}from"./_IjN0Lbt.js";import{i as Z,q as M,b as ee,j as te,l as ae}from"./CH7HNVC2.js";import{g as ne}from"./CkyxPppw.js";import{bm as l}from"./Fcr7AvC-.js";import{z as oe,S as y}from"./BAtAwQ72.js";import{B as h,S as C,Q as ce}from"./Bqd7fdCF.js";import{al as le,aj as E}from"./DpDGJXfb.js";import{g as se}from"./l3Y4i65_.js";function A(e,a){const n=f.select(e.state),o=S.select(e.state);if(!o)return null;const c=n.indexOf(o),s=c+(a==="left"?-1:1),p=n[s];return c<0||!p?null:(e.dispatch(j(o,p,a==="left"?"before":"after")),o)}function P(e){const a=S.select(e);return a&&f.select(e).includes(a)?a:null}function m(e,a,n){const o=P(e.state),c=o?`/workspace/${o}`:ne(e.state);return a!==c&&n(c),o}function ie(e,a,n,o){return e.dispatch(O(a)),m(e,n,o),a}function I(e,a){const o=a.match(/^\/workspace\/([^/]+)/)?.[1];return o?o==="new"?null:o:null}function R(e,a,n,o){if(n==="/")return D(e,a==="next"?0:"last",n,o);e.dispatch(a==="next"?Q():z());const c=S.select(e.state);if(!c)return null;const s=`/workspace/${c}`;return n!==s&&o(s),c}function re(e,a,n){const o=I(e,a);return o?ie(e,o,a,n):null}function pe(e,a,n){const o=I(e,a);if(!o)return null;const c=Z.select(e.state,o);if(!c)return null;const s=c.tabs.find(v=>v.id===c.activeTabId),p=c.tabs.length===0&&c.activeTabId===null,T=M.select(e.state,o)>1&&(p||c.tabs.length===1&&s!==void 0&&s.closable!==!1);if((!s||s.closable===!1)&&!T)return null;const g=n??se(o)?.availableCanvasWidth??void 0;return e.dispatch(U(o,void 0,g)),s?.id??c.id}function ue(e,a){const n=e.state.panelLayout.byWorkspaceId[a];return!n||n.restoreStatus==="pending"?!1:ee.select(e.state,a).length===0}function de(e,a,n){P(e.state)||e.dispatch(B(0)),m(e,a,n)}function L(e,a,{navigate:n,closeWindow:o}){return o?(o(),"window"):(m(e,a,n),null)}function be(e,a,n){const o=I(e,a);return o?pe(e,a,n.availableCanvasWidth)!==null?"panel":ue(e,o)?(e.dispatch(O(o)),f.select(e.state).length>0?(de(e,a,n.navigate),"workspace"):L(e,a,n)??"workspace"):null:f.select(e.state).length>0?null:L(e,a,n)}function fe(e,a,n){return e.dispatch(X()),m(e,a,n)}function ke(e,a,n){const o=a.match(/^\/workspace\/([^/]+)/),c=o&&o[1]!=="new"?o[1]:null,s=Y.select(e.state),p=c?ae.select(e.state,c):null;return c&&p&&(!s||p.closedAt>=s.closedAt)?p.kind==="column"?(e.dispatch(K(c)),"column"):(e.dispatch(N(c)),p.kind):s?(fe(e,a,n),"workspace"):null}function we(e,a){const n=a.match(/^\/workspace\/([^/]+)/),o=n&&n[1]!=="new"?n[1]:null;if(!o)return null;const c=q(o);return e.dispatch(c),te.select(e.state,o)}function D(e,a,n,o){const c=f.select(e.state),s=a==="last"?c.length-1:a;return s<0||s>=c.length?null:(e.dispatch(B(s)),m(e,n,o))}function We({isMac:e,register:a,store:n,getCurrentPath:o,navigate:c,openNewWorkspace:s,getRailMachineIds:p,onCreateAgent:T,onCreateNote:g,onCreateTerminal:v,onCreateBrowser:G,onWorkspaceTabMoved:W,closeWindow:F,resolveBinding:_}){const r=e?{meta:!0}:{ctrl:!0},$=oe("TOGGLE_SIDEBAR",e),k=t=>()=>t(o()),J=t=>()=>{const i=o().match(/^\/workspace\/([^/]+)/);i?.[1]&&i[1]!=="new"&&t(i[1])},u=t=>_?{binding:()=>_(t)}:{},w=t=>_?.(t)??ce(t);a({...u("global.new-space"),...r,key:"n",global:!0,description:l.workspace_shortcuts_newSpace_description(),action:s}),a({...u("panel.toggle-sidebar"),...$,global:!0,description:y.TOGGLE_SIDEBAR.label,action:()=>n.dispatch(H())}),a({...u("navigation.new-tab"),...r,key:"t",global:!0,description:l.workspace_shortcuts_newPanel_description(),action:k(t=>we(n,t))});for(const[t,i,b,d]of[["workspace.new-agent","a",l.ui_shortcuts_newAgent_label(),T],["workspace.new-note","n",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_note_label()}),g],["workspace.new-terminal","t",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_terminal_label()}),v],["workspace.new-browser","b",l.layout_panelEmptyState_newItem_tooltip({label:l.layout_panelEmptyState_browser_label()}),G]])d&&a({...u(t),...r,key:i,alt:!0,global:!0,allowInTerminal:!0,description:b,action:J(d)});a({...u("navigation.close-tab"),...r,key:"w",global:!0,description:l.workspace_shortcuts_closePanelTab_description(),action:k(t=>be(n,t,{navigate:c,closeWindow:F}))}),a({...u("navigation.close-space-tab"),...r,key:"w",shift:!0,global:!0,description:l.workspace_shortcuts_closeSpaceTab_description(),action:k(t=>re(n,t,c))}),a({...u("navigation.reopen-tab"),...r,key:"t",shift:!0,global:!0,description:l.workspace_shortcuts_reopenClosedTabOrSpace_description(),action:k(t=>ke(n,t,c))}),a({...u("navigation.move-space-tab-left"),...r,key:"ArrowLeft",alt:!0,shift:!0,global:!0,description:y.MOVE_SPACE_TAB_LEFT.label,action:()=>{const t=A(n,"left");t&&W?.({workspaceId:t,position:f.select(n.state).indexOf(t)+1})}}),a({...u("navigation.move-space-tab-right"),...r,key:"ArrowRight",alt:!0,shift:!0,global:!0,description:y.MOVE_SPACE_TAB_RIGHT.label,action:()=>{const t=A(n,"right");t&&W?.({workspaceId:t,position:f.select(n.state).indexOf(t)+1})}});for(const[t,i]of[["next",!1],["previous",!0]]){a({...u(t==="next"?"global.next-space":"global.previous-space"),key:"Tab",ctrl:!0,shift:i,global:!0,description:t==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:k(d=>R(n,t,d,c))});const b=t==="next"?"global.next-space-alt":"global.previous-space-alt";a({...u(b),...r,key:t==="next"?"}":"{",shift:!0,global:!0,allowInTerminal:!0,preferLocal:!0,enabled:d=>!_||!h(b,d,_,e),description:t==="next"?l.workspace_shortcuts_nextSpaceTab_description():l.workspace_shortcuts_previousSpaceTab_description(),action:k(d=>R(n,t,d,c))})}const x=t=>{t===1?c("/"):D(n,t===9?"last":t-2,o(),c)};for(let t=1;t<=9;t++)a({...r,key:String(t),binding:()=>w("navigation.go-to-device").replace(/([1-8])-9$/,String(t)),global:!0,allowInTerminal:!0,enabled:i=>E.select(n.state)&&!h("navigation.go-to-device",i,w,e),description:l.machineRail_nav_ariaLabel(),action:()=>{const i=p?.()??le.select(n.state).map(d=>d.id),b=i[t===9?i.length-1:t-1];b&&n.dispatch(V(b))}});for(let t=1;t<=9;t++)a({...r,key:String(t),binding:()=>C["navigation.go-to-device"].replace(/([1-8])-9$/,String(t)),global:!0,allowInTerminal:!0,enabled:i=>!E.select(n.state)&&w("navigation.go-to-tab")===C["navigation.go-to-tab"]&&!h("navigation.go-to-device",i,w,e),description:l.ui_shortcuts_goToTab_label(),action:()=>x(t)});for(let t=1;t<=9;t++)a({binding:()=>w("navigation.go-to-tab").replace(/([1-8])-9$/,String(t)),...r,alt:!0,key:String(t),global:!0,allowInTerminal:!0,enabled:i=>!h("navigation.go-to-tab",i,w,e),description:t===1?l.home_navigation_description():t===9?l.workspace_shortcuts_selectLastSpaceTab_description():l.workspace_shortcuts_selectSpaceTab_description({digit:t}),action:()=>x(t)})}export{be as c,We as r};
@@ -1,4 +1,4 @@
1
- import{g as Ut}from"./BQCtWEZ2.js";import{s as Kt}from"./CHUYHKuh.js";import{b as f,C as Tt,a_ as Zt,V as jt,aZ as Wt,U as qt,b0 as Ht,Y as Qt,X as tt,ay as F,z as Xt,r as Jt,$ as $t,am as te,aU as ee,ab as se,aG as ie,aT as re,p as ae,_ as ne,a1 as oe,aP as ce,aW as le,bh as he}from"./DMudvlKI.js";var Ct=(function(){var s=f(function(G,n,l,d){for(l=l||{},d=G.length;d--;l[G[d]]=n);return l},"o"),a=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],o=[2,2],c=[1,7],r=[1,9],u=[1,10],y=[1,11],g=[1,12],k=[1,30],C=[1,23],p=[1,24],b=[1,25],A=[1,26],v=[1,27],O=[1,19],N=[1,28],I=[1,29],x=[1,20],D=[1,18],L=[1,21],w=[1,22],Ot=[2,6],h=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],dt=[1,36],pt=[1,37],ft=[1,38],bt=[1,39],gt=[1,40],Z=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],V=[1,46],M=[1,47],j=[1,57],W=[43,51,53,54,55,74,75],q=[1,70],H=[1,68],B=[1,65],Q=[1,69],X=[1,71],et=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],st=[1,78],it=[1,77],rt=[1,76],Nt=[69,70,71,72,73],xt=[1,91],At=[6,9,45,50],z=[6,9,12,44,45,50,51,52],at=[1,101],nt=[1,100],ot=[1,99],J=[18,61],It=[1,110],Rt=[1,109],vt=[20,43,51,53,54,55],yt=[18,61,64,66],_t={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:f(function(n,l,d,i,_,t,$){var e=t.length-1;switch(_){case 1:break;case 2:this.$=[];break;case 3:this.$=t[e-1].concat(t[e]);break;case 4:this.$=t[e];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[e-4]),i.addEntity(t[e-2]),i.addRelationship(t[e-4],t[e],t[e-2],t[e-3]),this.$=[t[e-4],t[e-2]];break;case 8:i.addEntity(t[e-8]),i.addEntity(t[e-4]),i.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),i.setClass([t[e-8]],t[e-6]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-8],t[e-4]];break;case 9:i.addEntity(t[e-6]),i.addEntity(t[e-2]),i.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),i.setClass([t[e-6]],t[e-4]),this.$=[t[e-6],t[e-2]];break;case 10:i.addEntity(t[e-6]),i.addEntity(t[e-4]),i.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-6],t[e-4]];break;case 11:i.addEntity(t[e-3]),i.addAttributes(t[e-3],t[e-1]),this.$=[t[e-3]];break;case 12:i.addEntity(t[e-5]),i.addAttributes(t[e-5],t[e-1]),i.setClass([t[e-5]],t[e-3]),this.$=[t[e-5]];break;case 13:i.addEntity(t[e-2]),this.$=[t[e-2]];break;case 14:i.addEntity(t[e-4]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-4]];break;case 15:i.addEntity(t[e]),this.$=[t[e]];break;case 16:i.addEntity(t[e-2]),i.setClass([t[e-2]],t[e]),this.$=[t[e-2]];break;case 17:i.addEntity(t[e-6],t[e-4]),i.addAttributes(t[e-6],t[e-1]),this.$=[t[e-6]];break;case 18:i.addEntity(t[e-8],t[e-6]),i.addAttributes(t[e-8],t[e-1]),i.setClass([t[e-8]],t[e-3]),this.$=[t[e-8]];break;case 19:i.addEntity(t[e-5],t[e-3]),this.$=[t[e-5]];break;case 20:i.addEntity(t[e-7],t[e-5]),i.setClass([t[e-7]],t[e-2]),this.$=[t[e-7]];break;case 21:i.addEntity(t[e-3],t[e-1]);break;case 22:i.addEntity(t[e-5],t[e-3]),i.setClass([t[e-5]],t[e]);break;case 23:case 24:this.$=t[e].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[e].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[e]:(i.setDirection(t[e].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[e-2].id},t[e-1],{text:t[e-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-1],text:t[e-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-4],text:t[e-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[e];break;case 35:this.$=t[e-1]+" "+t[e];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[e-3],i.addClass(t[e-2],t[e-1]);break;case 41:case 42:case 63:case 72:this.$=[t[e]];break;case 43:case 44:this.$=t[e-2].concat([t[e]]);break;case 45:this.$=t[e-2],i.setClass(t[e-1],t[e]);break;case 46:this.$=t[e-3],i.addCssStyles(t[e-2],t[e-1]);break;case 47:this.$=[t[e]];break;case 48:t[e-2].push(t[e]),this.$=t[e-2];break;case 50:this.$=t[e-1]+t[e];break;case 58:case 84:case 85:this.$=t[e].replace(/"/g,"");break;case 64:t[e].push(t[e-1]),this.$=t[e];break;case 65:this.$={type:t[e-1],name:t[e]};break;case 66:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 67:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 68:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 69:case 71:case 74:this.$=t[e];break;case 70:this.$=t[e-1]+t[e];break;case 73:t[e-2].push(t[e]),this.$=t[e-2];break;case 75:this.$=t[e].replace(/"/g,"");break;case 76:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(a,o,{5:3}),{6:[1,4],7:5,8:6,9:c,10:8,21:r,23:u,25:y,27:g,28:13,29:14,30:15,31:16,32:17,34:k,37:C,38:p,39:b,40:A,41:v,43:O,46:N,47:I,51:x,53:D,54:L,55:w},s(a,Ot,{1:[2,1]}),s(h,[2,3]),s(h,[2,4]),s(h,[2,5]),s(h,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:dt,70:pt,71:ft,72:bt,73:gt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(h,[2,26]),s(h,[2,27]),s(h,[2,28]),s(h,[2,29]),s(h,[2,30]),s(h,o,{5:44}),s(Z,[2,58]),s(Z,[2,59]),s(Z,[2,60]),s(Z,[2,61]),s(Z,[2,62]),s(h,[2,36]),s(h,[2,37]),s(h,[2,38]),s(h,[2,39]),{15:45,43:V,44:M},{15:48,43:V,44:M},{15:49,43:V,44:M},{10:50,43:O,51:x,53:D,54:L,55:w},{10:51,43:O,51:x,53:D,54:L,55:w},{15:52,43:V,44:M},{17:53,18:[1,54],56:55,57:56,61:j},{10:58,43:O,51:x,53:D,54:L,55:w},{68:59,74:[1,60],75:[1,61]},s(W,[2,77]),s(W,[2,78]),s(W,[2,79]),s(W,[2,80]),s(W,[2,81]),s(h,[2,23]),s(h,[2,24]),s(h,[2,25]),{6:[1,63],7:5,8:6,9:c,10:8,21:r,23:u,25:y,27:g,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:k,37:C,38:p,39:b,40:A,41:v,43:O,46:N,47:I,51:x,53:D,54:L,55:w},{12:q,42:64,44:H,45:B,48:66,49:67,51:Q,52:X},s(et,[2,41]),s(et,[2,42]),{15:72,43:V,44:M,45:B},{12:q,42:73,44:H,45:B,48:66,49:67,51:Q,52:X},{6:st,9:it,19:[1,75],35:74,50:rt},{12:[1,79],14:[1,80]},s(h,[2,16],{67:35,11:81,16:[1,82],45:B,69:dt,70:pt,71:ft,72:bt,73:gt}),{18:[1,83]},s(h,[2,13]),{17:84,18:[2,63],56:55,57:56,61:j},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:dt,70:pt,71:ft,72:bt,73:gt},s(Nt,[2,82]),s(Nt,[2,83]),s(h,[2,31]),s(h,Ot),{6:st,9:it,35:90,45:xt,50:rt},{43:[1,92],44:[1,93]},s(At,[2,47],{49:94,12:q,44:H,51:Q,52:X}),s(z,[2,49]),s(z,[2,54]),s(z,[2,55]),s(z,[2,56]),s(z,[2,57]),s(h,[2,45],{45:B}),{6:st,9:it,35:95,45:xt,50:rt},s(h,[2,32]),{10:97,36:96,43:O,51:x,53:D,54:L,55:w},s(h,[2,51]),s(h,[2,52]),s(h,[2,53]),{13:98,43:at,53:nt,76:ot},{15:102,43:V,44:M},{10:103,43:O,51:x,53:D,54:L,55:w},{17:104,18:[1,105],56:55,57:56,61:j},s(h,[2,11]),{18:[2,64]},s(J,[2,65],{59:106,60:107,63:108,65:It,66:Rt}),s([18,61,65,66],[2,71]),{61:[2,70]},s(h,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(h,[2,40]),{12:q,44:H,48:113,49:67,51:Q,52:X},s(et,[2,43]),s(et,[2,44]),s(z,[2,50]),s(h,[2,46]),{10:115,20:[1,114],43:O,51:x,53:D,54:L,55:w},s(vt,[2,34]),s(h,[2,7]),s(h,[2,84]),s(h,[2,85]),s(h,[2,86]),{12:[1,116],45:B},{12:[1,118],14:[1,117]},{18:[1,119]},s(h,[2,14]),s(J,[2,66],{60:120,64:[1,121],66:Rt}),s(J,[2,67]),s(yt,[2,72]),s(J,[2,75]),s(yt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:j},{15:124,43:V,44:M},s(At,[2,48],{49:94,12:q,44:H,51:Q,52:X}),{6:st,9:it,35:125,50:rt},s(vt,[2,35]),{13:126,43:at,53:nt,76:ot},{15:127,43:V,44:M},{13:128,43:at,53:nt,76:ot},s(h,[2,12]),s(J,[2,68]),{63:129,65:It},{18:[1,130]},s(h,[2,19]),s(h,[2,22],{16:[1,131],45:B}),s(h,[2,33]),s(h,[2,10]),{12:[1,132],45:B},s(h,[2,9]),s(yt,[2,73]),s(h,[2,17]),{17:133,18:[1,134],56:55,57:56,61:j},{13:135,43:at,53:nt,76:ot},{18:[1,136]},s(h,[2,20]),s(h,[2,8]),s(h,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:f(function(n,l){if(l.recoverable)this.trace(n);else{var d=new Error(n);throw d.hash=l,d}},"parseError"),parse:f(function(n){var l=this,d=[0],i=[],_=[null],t=[],$=this.table,e="",lt=0,Dt=0,Ft=2,Lt=1,Yt=t.slice.call(arguments,1),m=Object.create(this.lexer),Y={yy:{}};for(var kt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,kt)&&(Y.yy[kt]=this.yy[kt]);m.setInput(n,Y.yy),Y.yy.lexer=m,Y.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var mt=m.yylloc;t.push(mt);var Pt=m.options&&m.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function zt(S){d.length=d.length-2*S,_.length=_.length-S,t.length=t.length-S}f(zt,"popStack");function wt(){var S;return S=i.pop()||m.lex()||Lt,typeof S!="number"&&(S instanceof Array&&(i=S,S=i.pop()),S=l.symbols_[S]||S),S}f(wt,"lex");for(var E,P,T,Et,U={},ht,R,Vt,ut;;){if(P=d[d.length-1],this.defaultActions[P]?T=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=wt()),T=$[P]&&$[P][E]),typeof T>"u"||!T.length||!T[0]){var St="";ut=[];for(ht in $[P])this.terminals_[ht]&&ht>Ft&&ut.push("'"+this.terminals_[ht]+"'");m.showPosition?St="Parse error on line "+(lt+1)+`:
1
+ import{g as Ut}from"./BbK9qDRy.js";import{s as Kt}from"./_IIJlCYC.js";import{b as f,C as Tt,a_ as Zt,V as jt,aZ as Wt,U as qt,b0 as Ht,Y as Qt,X as tt,ay as F,z as Xt,r as Jt,$ as $t,am as te,aU as ee,ab as se,aG as ie,aT as re,p as ae,_ as ne,a1 as oe,aP as ce,aW as le,bh as he}from"./BZnji9hP.js";var Ct=(function(){var s=f(function(G,n,l,d){for(l=l||{},d=G.length;d--;l[G[d]]=n);return l},"o"),a=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],o=[2,2],c=[1,7],r=[1,9],u=[1,10],y=[1,11],g=[1,12],k=[1,30],C=[1,23],p=[1,24],b=[1,25],A=[1,26],v=[1,27],O=[1,19],N=[1,28],I=[1,29],x=[1,20],D=[1,18],L=[1,21],w=[1,22],Ot=[2,6],h=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],dt=[1,36],pt=[1,37],ft=[1,38],bt=[1,39],gt=[1,40],Z=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],V=[1,46],M=[1,47],j=[1,57],W=[43,51,53,54,55,74,75],q=[1,70],H=[1,68],B=[1,65],Q=[1,69],X=[1,71],et=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],st=[1,78],it=[1,77],rt=[1,76],Nt=[69,70,71,72,73],xt=[1,91],At=[6,9,45,50],z=[6,9,12,44,45,50,51,52],at=[1,101],nt=[1,100],ot=[1,99],J=[18,61],It=[1,110],Rt=[1,109],vt=[20,43,51,53,54,55],yt=[18,61,64,66],_t={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:f(function(n,l,d,i,_,t,$){var e=t.length-1;switch(_){case 1:break;case 2:this.$=[];break;case 3:this.$=t[e-1].concat(t[e]);break;case 4:this.$=t[e];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[e-4]),i.addEntity(t[e-2]),i.addRelationship(t[e-4],t[e],t[e-2],t[e-3]),this.$=[t[e-4],t[e-2]];break;case 8:i.addEntity(t[e-8]),i.addEntity(t[e-4]),i.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),i.setClass([t[e-8]],t[e-6]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-8],t[e-4]];break;case 9:i.addEntity(t[e-6]),i.addEntity(t[e-2]),i.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),i.setClass([t[e-6]],t[e-4]),this.$=[t[e-6],t[e-2]];break;case 10:i.addEntity(t[e-6]),i.addEntity(t[e-4]),i.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-6],t[e-4]];break;case 11:i.addEntity(t[e-3]),i.addAttributes(t[e-3],t[e-1]),this.$=[t[e-3]];break;case 12:i.addEntity(t[e-5]),i.addAttributes(t[e-5],t[e-1]),i.setClass([t[e-5]],t[e-3]),this.$=[t[e-5]];break;case 13:i.addEntity(t[e-2]),this.$=[t[e-2]];break;case 14:i.addEntity(t[e-4]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-4]];break;case 15:i.addEntity(t[e]),this.$=[t[e]];break;case 16:i.addEntity(t[e-2]),i.setClass([t[e-2]],t[e]),this.$=[t[e-2]];break;case 17:i.addEntity(t[e-6],t[e-4]),i.addAttributes(t[e-6],t[e-1]),this.$=[t[e-6]];break;case 18:i.addEntity(t[e-8],t[e-6]),i.addAttributes(t[e-8],t[e-1]),i.setClass([t[e-8]],t[e-3]),this.$=[t[e-8]];break;case 19:i.addEntity(t[e-5],t[e-3]),this.$=[t[e-5]];break;case 20:i.addEntity(t[e-7],t[e-5]),i.setClass([t[e-7]],t[e-2]),this.$=[t[e-7]];break;case 21:i.addEntity(t[e-3],t[e-1]);break;case 22:i.addEntity(t[e-5],t[e-3]),i.setClass([t[e-5]],t[e]);break;case 23:case 24:this.$=t[e].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[e].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[e]:(i.setDirection(t[e].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[e-2].id},t[e-1],{text:t[e-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-1],text:t[e-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-4],text:t[e-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[e];break;case 35:this.$=t[e-1]+" "+t[e];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[e-3],i.addClass(t[e-2],t[e-1]);break;case 41:case 42:case 63:case 72:this.$=[t[e]];break;case 43:case 44:this.$=t[e-2].concat([t[e]]);break;case 45:this.$=t[e-2],i.setClass(t[e-1],t[e]);break;case 46:this.$=t[e-3],i.addCssStyles(t[e-2],t[e-1]);break;case 47:this.$=[t[e]];break;case 48:t[e-2].push(t[e]),this.$=t[e-2];break;case 50:this.$=t[e-1]+t[e];break;case 58:case 84:case 85:this.$=t[e].replace(/"/g,"");break;case 64:t[e].push(t[e-1]),this.$=t[e];break;case 65:this.$={type:t[e-1],name:t[e]};break;case 66:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 67:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 68:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 69:case 71:case 74:this.$=t[e];break;case 70:this.$=t[e-1]+t[e];break;case 73:t[e-2].push(t[e]),this.$=t[e-2];break;case 75:this.$=t[e].replace(/"/g,"");break;case 76:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(a,o,{5:3}),{6:[1,4],7:5,8:6,9:c,10:8,21:r,23:u,25:y,27:g,28:13,29:14,30:15,31:16,32:17,34:k,37:C,38:p,39:b,40:A,41:v,43:O,46:N,47:I,51:x,53:D,54:L,55:w},s(a,Ot,{1:[2,1]}),s(h,[2,3]),s(h,[2,4]),s(h,[2,5]),s(h,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:dt,70:pt,71:ft,72:bt,73:gt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(h,[2,26]),s(h,[2,27]),s(h,[2,28]),s(h,[2,29]),s(h,[2,30]),s(h,o,{5:44}),s(Z,[2,58]),s(Z,[2,59]),s(Z,[2,60]),s(Z,[2,61]),s(Z,[2,62]),s(h,[2,36]),s(h,[2,37]),s(h,[2,38]),s(h,[2,39]),{15:45,43:V,44:M},{15:48,43:V,44:M},{15:49,43:V,44:M},{10:50,43:O,51:x,53:D,54:L,55:w},{10:51,43:O,51:x,53:D,54:L,55:w},{15:52,43:V,44:M},{17:53,18:[1,54],56:55,57:56,61:j},{10:58,43:O,51:x,53:D,54:L,55:w},{68:59,74:[1,60],75:[1,61]},s(W,[2,77]),s(W,[2,78]),s(W,[2,79]),s(W,[2,80]),s(W,[2,81]),s(h,[2,23]),s(h,[2,24]),s(h,[2,25]),{6:[1,63],7:5,8:6,9:c,10:8,21:r,23:u,25:y,27:g,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:k,37:C,38:p,39:b,40:A,41:v,43:O,46:N,47:I,51:x,53:D,54:L,55:w},{12:q,42:64,44:H,45:B,48:66,49:67,51:Q,52:X},s(et,[2,41]),s(et,[2,42]),{15:72,43:V,44:M,45:B},{12:q,42:73,44:H,45:B,48:66,49:67,51:Q,52:X},{6:st,9:it,19:[1,75],35:74,50:rt},{12:[1,79],14:[1,80]},s(h,[2,16],{67:35,11:81,16:[1,82],45:B,69:dt,70:pt,71:ft,72:bt,73:gt}),{18:[1,83]},s(h,[2,13]),{17:84,18:[2,63],56:55,57:56,61:j},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:dt,70:pt,71:ft,72:bt,73:gt},s(Nt,[2,82]),s(Nt,[2,83]),s(h,[2,31]),s(h,Ot),{6:st,9:it,35:90,45:xt,50:rt},{43:[1,92],44:[1,93]},s(At,[2,47],{49:94,12:q,44:H,51:Q,52:X}),s(z,[2,49]),s(z,[2,54]),s(z,[2,55]),s(z,[2,56]),s(z,[2,57]),s(h,[2,45],{45:B}),{6:st,9:it,35:95,45:xt,50:rt},s(h,[2,32]),{10:97,36:96,43:O,51:x,53:D,54:L,55:w},s(h,[2,51]),s(h,[2,52]),s(h,[2,53]),{13:98,43:at,53:nt,76:ot},{15:102,43:V,44:M},{10:103,43:O,51:x,53:D,54:L,55:w},{17:104,18:[1,105],56:55,57:56,61:j},s(h,[2,11]),{18:[2,64]},s(J,[2,65],{59:106,60:107,63:108,65:It,66:Rt}),s([18,61,65,66],[2,71]),{61:[2,70]},s(h,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(h,[2,40]),{12:q,44:H,48:113,49:67,51:Q,52:X},s(et,[2,43]),s(et,[2,44]),s(z,[2,50]),s(h,[2,46]),{10:115,20:[1,114],43:O,51:x,53:D,54:L,55:w},s(vt,[2,34]),s(h,[2,7]),s(h,[2,84]),s(h,[2,85]),s(h,[2,86]),{12:[1,116],45:B},{12:[1,118],14:[1,117]},{18:[1,119]},s(h,[2,14]),s(J,[2,66],{60:120,64:[1,121],66:Rt}),s(J,[2,67]),s(yt,[2,72]),s(J,[2,75]),s(yt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:j},{15:124,43:V,44:M},s(At,[2,48],{49:94,12:q,44:H,51:Q,52:X}),{6:st,9:it,35:125,50:rt},s(vt,[2,35]),{13:126,43:at,53:nt,76:ot},{15:127,43:V,44:M},{13:128,43:at,53:nt,76:ot},s(h,[2,12]),s(J,[2,68]),{63:129,65:It},{18:[1,130]},s(h,[2,19]),s(h,[2,22],{16:[1,131],45:B}),s(h,[2,33]),s(h,[2,10]),{12:[1,132],45:B},s(h,[2,9]),s(yt,[2,73]),s(h,[2,17]),{17:133,18:[1,134],56:55,57:56,61:j},{13:135,43:at,53:nt,76:ot},{18:[1,136]},s(h,[2,20]),s(h,[2,8]),s(h,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:f(function(n,l){if(l.recoverable)this.trace(n);else{var d=new Error(n);throw d.hash=l,d}},"parseError"),parse:f(function(n){var l=this,d=[0],i=[],_=[null],t=[],$=this.table,e="",lt=0,Dt=0,Ft=2,Lt=1,Yt=t.slice.call(arguments,1),m=Object.create(this.lexer),Y={yy:{}};for(var kt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,kt)&&(Y.yy[kt]=this.yy[kt]);m.setInput(n,Y.yy),Y.yy.lexer=m,Y.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var mt=m.yylloc;t.push(mt);var Pt=m.options&&m.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function zt(S){d.length=d.length-2*S,_.length=_.length-S,t.length=t.length-S}f(zt,"popStack");function wt(){var S;return S=i.pop()||m.lex()||Lt,typeof S!="number"&&(S instanceof Array&&(i=S,S=i.pop()),S=l.symbols_[S]||S),S}f(wt,"lex");for(var E,P,T,Et,U={},ht,R,Vt,ut;;){if(P=d[d.length-1],this.defaultActions[P]?T=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=wt()),T=$[P]&&$[P][E]),typeof T>"u"||!T.length||!T[0]){var St="";ut=[];for(ht in $[P])this.terminals_[ht]&&ht>Ft&&ut.push("'"+this.terminals_[ht]+"'");m.showPosition?St="Parse error on line "+(lt+1)+`:
2
2
  `+m.showPosition()+`
3
3
  Expecting `+ut.join(", ")+", got '"+(this.terminals_[E]||E)+"'":St="Parse error on line "+(lt+1)+": Unexpected "+(E==Lt?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(St,{text:m.match,token:this.terminals_[E]||E,line:m.yylineno,loc:mt,expected:ut})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+E);switch(T[0]){case 1:d.push(E),_.push(m.yytext),t.push(m.yylloc),d.push(T[1]),E=null,Dt=m.yyleng,e=m.yytext,lt=m.yylineno,mt=m.yylloc;break;case 2:if(R=this.productions_[T[1]][1],U.$=_[_.length-R],U._$={first_line:t[t.length-(R||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(R||1)].first_column,last_column:t[t.length-1].last_column},Pt&&(U._$.range=[t[t.length-(R||1)].range[0],t[t.length-1].range[1]]),Et=this.performAction.apply(U,[e,Dt,lt,Y.yy,T[1],_,t].concat(Yt)),typeof Et<"u")return Et;R&&(d=d.slice(0,-1*R*2),_=_.slice(0,-1*R),t=t.slice(0,-1*R)),d.push(this.productions_[T[1]][0]),_.push(U.$),t.push(U._$),Vt=$[d[d.length-2]][d[d.length-1]],d.push(Vt);break;case 3:return!0}}return!0},"parse")},Gt=(function(){var G={EOF:1,parseError:f(function(l,d){if(this.yy.parser)this.yy.parser.parseError(l,d);else throw new Error(l)},"parseError"),setInput:f(function(n,l){return this.yy=l||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var l=n.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:f(function(n){var l=n.length,d=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1&&(this.yylineno-=d.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===i.length?this.yylloc.first_column:0)+i[i.length-d.length].length-d[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(n){this.unput(this.match.slice(n))},"less"),pastInput:f(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var n=this.pastInput(),l=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
@@ -0,0 +1 @@
1
+ import{bm as l}from"./Fcr7AvC-.js";import{JH as a}from"./D0qhIm1r.js";let D=1,d=null;const y=[],I=new Set;function K(){for(const e of I)e(d)}function v(){return typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null}function N(e){y.push({...e,id:D++,returnFocus:v()}),d||(d=y.shift()??null,K())}function ee(e){return new Promise(t=>N({kind:"confirm",options:e,resolve:t}))}function te(e){return new Promise(t=>N({kind:"prompt",options:e,resolve:t}))}function ne(e){return I.add(e),e(d),()=>I.delete(e)}function re(e,t){if(!d||d.id!==e)return;const n=d;d=y.shift()??null,n.resolve(t),n.returnFocus?.focus(),K()}const se={IS_AUTHENTICATED:"linear-auth:is-authenticated",START_AUTH:"linear-auth:start-auth",CANCEL_AUTH:"linear-auth:cancel-auth",LOGOUT:"linear-auth:logout",GET_AUTH_STATE:"linear-auth:get-auth-state",GET_STATUS:"linear-auth:get-status",FETCH_MY_ISSUES:"linear-auth:fetch-my-issues",SEARCH_ISSUES:"linear-auth:search-issues"},oe=[{value:"assigned",get label(){return l.linearAuth_filter_assigned_label()},get description(){return l.linearAuth_filter_assigned_description()}},{value:"created",get label(){return l.linearAuth_filter_created_label()},get description(){return l.linearAuth_filter_created_description()}},{value:"subscribed",get label(){return l.linearAuth_filter_subscribed_label()},get description(){return l.linearAuth_filter_subscribed_description()}},{value:"team",get label(){return l.linearAuth_filter_team_label()},get description(){return l.linearAuth_filter_team_description()}},{value:"all",get label(){return l.linearAuth_filter_all_label()},get description(){return l.linearAuth_filter_all_description()}}],ie=a.createSelector(e=>e.linearAuth.operation),ae=a.createSelector((e,t)=>e.linearAuth.operation?.consumerId===t?e.linearAuth.operation:null),ue=a.createSelector(e=>e.linearAuth.operation?.kind==="logout"&&e.linearAuth.operation.status==="pending"),ce=a.createSelector(e=>e.linearAuth.isAuthenticated),le=a.createSelector(e=>e.linearAuth.requiresDaemonAuth),fe=a.createSelector(e=>e.linearAuth.isAuthenticating),de=a.createSelector(e=>e.linearAuth.error),Ae=a.createSelector(e=>e.sentryAuth.operation),_e=a.createSelector((e,t)=>e.sentryAuth.operation?.consumerId===t?e.sentryAuth.operation:null),Ee=a.createSelector(e=>e.sentryAuth.operation?.kind==="logout"&&e.sentryAuth.operation.status==="pending"),he=a.createSelector(e=>e.sentryAuth.isAuthenticated),pe=a.createSelector(e=>e.sentryAuth.organization),Se=a.createSelector(e=>e.sentryAuth.isConnecting),ge=a.createSelector(e=>e.sentryAuth.error),ye="npx not found — install Node.js (with npm) to use Claude Code",H="********",m={claude:"claude-code",codex:"codex",grok:"grok",droid:"droid",auggie:"auggie",cursor:"cursor",dsh:"dsh"},h={claude:"CLAUDE_CONFIG_DIR",codex:"CODEX_HOME"},C={claude:{differentLogin:{set:["CLAUDE_CONFIG_DIR"],optionalSet:[],unset:["ANTHROPIC_API_KEY","ANTHROPIC_AUTH_TOKEN","CLAUDE_CODE_OAUTH_TOKEN"]},apiKey:{set:["ANTHROPIC_API_KEY"],optionalSet:["ANTHROPIC_BASE_URL"],unset:["ANTHROPIC_AUTH_TOKEN","CLAUDE_CODE_OAUTH_TOKEN"]},token:{set:["CLAUDE_CODE_OAUTH_TOKEN"],optionalSet:[],unset:["ANTHROPIC_API_KEY","ANTHROPIC_AUTH_TOKEN"]}},codex:{differentLogin:{set:["CODEX_HOME"],optionalSet:[],unset:["CODEX_ACCESS_TOKEN","CODEX_API_KEY","OPENAI_API_KEY"]},apiKey:{set:["CODEX_API_KEY"],optionalSet:[],unset:["CODEX_ACCESS_TOKEN","OPENAI_API_KEY"]},token:{set:["CODEX_ACCESS_TOKEN"],optionalSet:[],unset:["CODEX_API_KEY","OPENAI_API_KEY"]}},grok:{apiKey:{set:["XAI_API_KEY"],optionalSet:[],unset:[]}},droid:{apiKey:{set:["FACTORY_API_KEY"],optionalSet:[],unset:[]}},auggie:{token:{set:["AUGMENT_SESSION_AUTH"],optionalSet:[],unset:[]}},cursor:{apiKey:{set:["CURSOR_API_KEY"],optionalSet:[],unset:["CURSOR_AUTH_TOKEN"]}},dsh:{apiKey:{set:["DEEPSEEK_API_KEY"],optionalSet:[],unset:[]}}},w=["differentLogin","apiKey","token"];function p(e,t){const n=C[e][t];if(!n)throw new Error(`${e} has no ${t} profile kind`);return n}function P(e){return w.filter(t=>C[e][t]!==void 0)}function Ie(e){const t=P(e);return t.length===1?t[0]:void 0}function me(e,t){return C[e][t]!==void 0}const O="ANTHROPIC_BASE_URL";function F(e){return m[e]}function $(e){return Object.keys(m).find(t=>m[t]===e)}function Oe(e){return e.supportsProfiles===!0&&e.id!==void 0&&$(e.id)!==void 0}function Te(e,t){return p(t,e).set[0]}function Ce(e){return h[e]!==void 0}function U(e){const t=h[e];if(!t)throw new Error(`${e} has no account folder`);return t}function x(e){return`~/intent/profiles/${e}`}const A=e=>e.toUpperCase();function ke(e,t){if(t.length===0)return"advanced";const n=new Set,s=new Set;for(const r of t){const o=A(r.key);if(n.has(o)||s.has(o))return"advanced";(r.kind==="set"?n:s).add(o)}for(const r of P(e))if(M(p(e,r),n,s))return r==="differentLogin"&&!Y(e,t)?"advanced":r;return"advanced"}function M(e,t,n){const s=e.set.map(A),r=new Set([...s,...e.optionalSet.map(A)]);if(!s.every(i=>t.has(i))||![...t].every(i=>r.has(i)))return!1;const o=new Set(e.unset.map(A));return[...n].every(i=>o.has(i))}function Y(e,t){if(!h[e])return!1;const n=X(e,t);return n!==void 0&&n!==""&&n!==H}function X(e,t){const n=h[e];if(!n)return;const s=A(n),r=t.find(o=>o.kind==="set"&&A(o.key)===s);return r?.kind==="set"?r.value:void 0}const z=32;function G(e){return e.normalize("NFKD").replace(/\p{M}/gu,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,z).replace(/-+$/g,"")||"profile"}const S="abcdefghijklmnopqrstuvwxyz0123456789",B=4;function L(){const e=new Uint32Array(1);return globalThis.crypto.getRandomValues(e),e[0]/2**32}function q(e=L){let t="";for(let n=0;n<B;n++){const s=Math.min(S.length-1,Math.floor(e()*S.length));t+=S[s]}return t}const V=64;function Ke(e,t,n,s=L){const r=new Set([...n].map(i=>i.toLowerCase())),o=G(t);for(let i=0;i<V;i++){const c=`${o}-${q(s)}`;if(!r.has(c))return`${x(e)}/${c}`}throw new Error(`No unused profile folder found for "${o}"`)}function J(e){return e.map(t=>({key:t,kind:"unset"}))}function E(e,t){const n=e?.trim()??"";if(!n)throw new Error(`Missing ${t}`);return n}function Ne(e,t,n){const s=p(t,e),r=[];if(e==="differentLogin")r.push({key:U(t),kind:"set",value:E(n.folder,"folder")});else if(e==="apiKey"){r.push({key:s.set[0],kind:"set",value:T(t,e,E(n.apiKey,"API key"))});const o=n.baseUrl?.trim();o&&t==="claude"&&r.push({key:O,kind:"set",value:o})}else r.push({key:s.set[0],kind:"set",value:T(t,e,E(n.token,"token"))});return{baseProviderId:F(t),name:n.name.trim(),backup:n.backup??!1,env:[...r,...J(s.unset)]}}function Pe(e,t,n,s={}){const r=p(t,e),o=(u,f)=>n.find(_=>_.kind===f&&A(_.key)===A(u))?.key,i=(u,f)=>{const _=o(u,"set");if(f!==void 0){const k=E(f,u);return{key:_??u,kind:"set",value:e==="differentLogin"?k:T(t,e,k)}}if(!_)throw new Error(`Missing ${u}`);return{key:_,kind:"keep"}},c=[];if(e==="differentLogin")c.push(i(U(t),void 0));else if(e==="apiKey"){c.push(i(r.set[0],s.apiKey));const u=t==="claude"?o(O,"set"):void 0,f=t==="claude"?s.baseUrl:void 0;typeof f=="string"&&f.trim()?c.push({key:u??O,kind:"set",value:f.trim()}):f===void 0&&u&&c.push({key:u,kind:"keep"})}else c.push(i(r.set[0],s.token));for(const u of r.unset)c.push({key:o(u,"unset")??u,kind:"unset"});return c}const g="[A-Za-z0-9_-]+",R=new RegExp(`^${g}\\.${g}\\.${g}$`);function Ue(e){return R.test(e.trim())}function Z(e){let t;try{t=JSON.parse(b(e))}catch{return!1}if(typeof t!="object"||t===null||Array.isArray(t))return!1;const n=t;return typeof n.accessToken=="string"&&n.accessToken.trim()!==""&&typeof n.tenantURL=="string"&&/^https:\/\/\S+$/.test(n.tenantURL)&&Array.isArray(n.scopes)}function b(e){const t=e.trim(),n=t.split(/\r?\n/).find(o=>o.trim().startsWith("SESSION="));if(n)return n.trim().slice(8).trim();const s=t.indexOf("{"),r=t.lastIndexOf("}");return s>=0&&r>s?t.slice(s,r+1):t}function T(e,t,n){return e==="auggie"&&t==="token"?b(n):n.trim()}const j={claude:{apiKey:/^sk-ant-api\d*-[A-Za-z0-9_-]{16,}$/,token:/^sk-ant-oat\d*-[A-Za-z0-9_-]{16,}$/},codex:{apiKey:/^sk-(?!ant-)[A-Za-z0-9_-]{20,}$/,token:R},grok:{apiKey:/^xai-[A-Za-z0-9]{20,}$/},droid:{apiKey:/^fk-[A-Za-z0-9_-]{20,}$/},auggie:{token:Z},cursor:{apiKey:/^\S{32,}$/},dsh:{apiKey:/^sk-[A-Za-z0-9]{20,}$/}};function Le(e,t,n,s={}){const r=n.trim();if(e==="claude"&&t==="apiKey"&&s.customEndpoint)return/^\S+$/.test(r);const o=j[e][t];return o?typeof o=="function"?o(r):o.test(r):!1}function Re(e){if(e==="claude")return"claude auth login";if(e==="codex")return"codex login --device-auth";throw new Error(`${e} has no Different login sign-in`)}export{ue as A,le as B,ye as C,_e as D,Ae as E,ge as F,he as G,Se as H,Ee as I,pe as J,re as K,se as L,H as M,Ie as N,G as O,ne as P,oe as a,F as b,Ne as c,Pe as d,ee as e,ke as f,U as g,Ce as h,me as i,Oe as j,Ue as k,Le as l,Re as m,x as n,P as o,Ke as p,$ as q,te as r,q as s,X as t,Te as u,ae as v,ie as w,de as x,ce as y,fe as z};
@@ -1 +1 @@
1
- import{C as M}from"./B5aYN90J.js";import{a as v}from"./BdWqymET.js";import{f as D}from"./CVtLV3_x.js";import{JH as o,EB as E,DY as _,m as A,vr as O,v1 as C,gb as H,De as L,Dw as P,FB as R,Di as B}from"./CiKoEJ2m.js";import{ba as p}from"./iQDlfKDR.js";import{d as x}from"./B0Z-1lwJ.js";import{n as F}from"./qWgJ-CUF.js";import{o as W,e as q}from"./CoSEZL3s.js";const u=new v("OpenMessage"),S=150,y=15e3,N=2,Y=[150,400,800,1500,3e3],G=M;let g;function k(e){return new Promise(t=>setTimeout(t,e))}function m(e,t){const s=o.state,n=s.agentSessions?.byAgentId[e]?.messages,a=s.agentSessions?.historySegmentsByAgentId?.[e]?.messages;return!!(n?.some(r=>r.id===t)||a?.some(r=>r.id===t))}function T(e,t){const s=o.state,n=s.agentSessions?.historySegmentsByAgentId?.[e];n?.detachedFromTail!==!0||n.messages.some(r=>r.id===t)||!s.agentSessions?.byAgentId[e]?.messages?.some(r=>r.id===t)||o.dispatch(H(e))}function K(e){return o.state.chatState?.byAgentId[e]?.transcriptHydration}async function $(e,t,s){const n=Date.now()+y;let a=0;for(;Date.now()<n;){if(s.aborted)return!1;if(m(e,t))return!0;if(a>=N&&K(e)==="settled"&&!p.select(o.state,e).initialHistoryPending)return!1;a++,await k(S)}return!s.aborted&&m(e,t)}async function I(e,t,s,n){const a=Date.now()+y;for(;p.select(o.state,e).initialHistoryPending;){if(n?.aborted||Date.now()>=a)return!1;await k(S)}const r=o.state.agentSessions?.byAgentId[e];if(!r||n?.aborted)return!1;if(m(e,t))return T(e,t),!0;s??=r.workspaceId;const l=p.select(o.state,e);let c={nextToken:l.scrollbackOlderToken,prevToken:l.scrollbackGapToken,olderAnchorId:l.scrollbackOlderTokenAnchorId};o.dispatch(L(e,"seek"));const d=p.select(o.state,e).scrollbackDiscardEpoch,f=()=>!!o.state.agentSessions?.byAgentId[e]&&p.select(o.state,e).scrollbackDiscardEpoch===d;try{const i=await D.agents.getConversation(e,G,void 0,t,void 0,s);return n?.aborted||!f()||!i.messages.some(h=>h.id===t)?!1:(o.dispatch(P(e,i.messages,i.messages[0]?.seq)),i.nextToken===null&&o.dispatch(R(e)),c={nextToken:i.nextToken,prevToken:i.prevToken,olderAnchorId:i.messages[0]?.id??null},m(e,t))}catch(i){return u.warn("[seekConversationToMessage] Seek fetch failed (message may no longer exist)",{agentId:e,messageId:t,error:i}),!1}finally{f()&&o.dispatch(B(e,c))}}async function ee(e){if(e.signal?.aborted)return;g?.abort(),g=new AbortController;const t=e.signal?AbortSignal.any([g.signal,e.signal]):g.signal,{workspaceId:s,agentId:n,messageId:a,query:r,targetTabId:l}=e;u.info("[openMessage] Deep-opening conversation at message",{workspaceId:s,agentId:n,messageId:a});const c=s===A;c&&!e.contentAlreadyOpen&&(o.dispatch(E(n)),o.dispatch(_(A,n)),o.dispatch(O("chief")));const d=c?"/":q(s);if(!e.contentAlreadyOpen&&typeof window<"u"&&window.location.pathname!==d){try{c?await F(d):await W(s)}catch(w){u.warn("[openMessage] Workspace navigation failed",{workspaceId:s,error:w});return}if(t.aborted)return;if(window.location.pathname!==d){u.warn("[openMessage] Workspace navigation was not confirmed",{workspaceId:s});return}}!e.contentAlreadyOpen&&!c&&o.dispatch(C(s,{agentId:n}));const f=await $(n,a,t);f&&T(n,a);const i=f||await I(n,a,s,t);if(t.aborted)return;if(!i){u.warn("[openMessage] Message not found; conversation opened at tail",{agentId:n,messageId:a});return}const h=`open-message-${Date.now()}-${Math.random().toString(36).slice(2)}`,b={agentId:n,messageId:a,query:r,targetTabId:l,requestId:h,signal:t};for(const w of Y)setTimeout(()=>{t.aborted||x("chat:open-message",b)},w)}export{ee as openMessage,I as seekConversationToMessage};
1
+ import{C as M}from"./B5aYN90J.js";import{a as v}from"./BdWqymET.js";import{f as D}from"./B0SSzYpD.js";import{JH as o,EB as E,DY as _,m as A,vr as O,v1 as C,gb as H,De as L,Dw as P,FB as R,Di as B}from"./D0qhIm1r.js";import{ba as p}from"./cD292w1o.js";import{d as x}from"./B0Z-1lwJ.js";import{n as F}from"./BqF1bVQC.js";import{o as W,e as q}from"./BCwKGJpG.js";const u=new v("OpenMessage"),S=150,y=15e3,N=2,Y=[150,400,800,1500,3e3],G=M;let g;function k(e){return new Promise(t=>setTimeout(t,e))}function m(e,t){const s=o.state,n=s.agentSessions?.byAgentId[e]?.messages,a=s.agentSessions?.historySegmentsByAgentId?.[e]?.messages;return!!(n?.some(r=>r.id===t)||a?.some(r=>r.id===t))}function T(e,t){const s=o.state,n=s.agentSessions?.historySegmentsByAgentId?.[e];n?.detachedFromTail!==!0||n.messages.some(r=>r.id===t)||!s.agentSessions?.byAgentId[e]?.messages?.some(r=>r.id===t)||o.dispatch(H(e))}function K(e){return o.state.chatState?.byAgentId[e]?.transcriptHydration}async function $(e,t,s){const n=Date.now()+y;let a=0;for(;Date.now()<n;){if(s.aborted)return!1;if(m(e,t))return!0;if(a>=N&&K(e)==="settled"&&!p.select(o.state,e).initialHistoryPending)return!1;a++,await k(S)}return!s.aborted&&m(e,t)}async function I(e,t,s,n){const a=Date.now()+y;for(;p.select(o.state,e).initialHistoryPending;){if(n?.aborted||Date.now()>=a)return!1;await k(S)}const r=o.state.agentSessions?.byAgentId[e];if(!r||n?.aborted)return!1;if(m(e,t))return T(e,t),!0;s??=r.workspaceId;const l=p.select(o.state,e);let c={nextToken:l.scrollbackOlderToken,prevToken:l.scrollbackGapToken,olderAnchorId:l.scrollbackOlderTokenAnchorId};o.dispatch(L(e,"seek"));const d=p.select(o.state,e).scrollbackDiscardEpoch,f=()=>!!o.state.agentSessions?.byAgentId[e]&&p.select(o.state,e).scrollbackDiscardEpoch===d;try{const i=await D.agents.getConversation(e,G,void 0,t,void 0,s);return n?.aborted||!f()||!i.messages.some(h=>h.id===t)?!1:(o.dispatch(P(e,i.messages,i.messages[0]?.seq)),i.nextToken===null&&o.dispatch(R(e)),c={nextToken:i.nextToken,prevToken:i.prevToken,olderAnchorId:i.messages[0]?.id??null},m(e,t))}catch(i){return u.warn("[seekConversationToMessage] Seek fetch failed (message may no longer exist)",{agentId:e,messageId:t,error:i}),!1}finally{f()&&o.dispatch(B(e,c))}}async function ee(e){if(e.signal?.aborted)return;g?.abort(),g=new AbortController;const t=e.signal?AbortSignal.any([g.signal,e.signal]):g.signal,{workspaceId:s,agentId:n,messageId:a,query:r,targetTabId:l}=e;u.info("[openMessage] Deep-opening conversation at message",{workspaceId:s,agentId:n,messageId:a});const c=s===A;c&&!e.contentAlreadyOpen&&(o.dispatch(E(n)),o.dispatch(_(A,n)),o.dispatch(O("chief")));const d=c?"/":q(s);if(!e.contentAlreadyOpen&&typeof window<"u"&&window.location.pathname!==d){try{c?await F(d):await W(s)}catch(w){u.warn("[openMessage] Workspace navigation failed",{workspaceId:s,error:w});return}if(t.aborted)return;if(window.location.pathname!==d){u.warn("[openMessage] Workspace navigation was not confirmed",{workspaceId:s});return}}!e.contentAlreadyOpen&&!c&&o.dispatch(C(s,{agentId:n}));const f=await $(n,a,t);f&&T(n,a);const i=f||await I(n,a,s,t);if(t.aborted)return;if(!i){u.warn("[openMessage] Message not found; conversation opened at tail",{agentId:n,messageId:a});return}const h=`open-message-${Date.now()}-${Math.random().toString(36).slice(2)}`,b={agentId:n,messageId:a,query:r,targetTabId:l,requestId:h,signal:t};for(const w of Y)setTimeout(()=>{t.aborted||x("chat:open-message",b)},w)}export{ee as openMessage,I as seekConversationToMessage};
@@ -1 +1 @@
1
- import{m as t}from"./C3jMXj_V.js";import"./3SdAC2_C.js";import{bm as n}from"./CtfEuoOH.js";import"./B26ZHg3s.js";import"./CGmYraIa.js";import"./CT8vPg_p.js";import"./ChTqQfQN.js";import"./BFfRQORP.js";import"./CiKoEJ2m.js";function L(e){try{const r=new URL(e).hostname.toLowerCase();return r==="daemon.localhost"||r==="client.localhost"}catch{return!1}}const s="browser:resolve-url";function a(e){return typeof e=="object"&&e!==null&&typeof e.url=="string"&&typeof e.rewritten=="boolean"}async function l(e,r){const o={url:e,rewritten:!1};if(!r)return o;try{const i=await r(s,{url:e});return a(i)?i:o}catch{return o}}async function g(e,r){if(!r)return e;try{const o=await r(s,{url:e,mode:"rewrite-only"});return a(o)?o.url:e}catch{return e}}async function c(e){const r=await l(e,typeof window<"u"?window.electronAPI?.invoke:void 0);return r.error&&r.rewritten?r.forbidden?t.error(n.browser_linkOpen_ownerOnlyForward_error()):t.error(n.browser_embedded_resolveFailed_error(),{description:r.error}):r.warning&&t.warning(n.browser_linkOpen_loopbackAmbiguity_warning(),{description:r.warning}),{url:r.url,...r.rewritten&&r.requestedUrl!==void 0?{requestedUrl:r.requestedUrl}:{}}}const h=Object.freeze(Object.defineProperty({__proto__:null,resolveBrowserLinkForOpen:c},Symbol.toStringTag,{value:"Module"}));export{l as a,h as b,g as c,L as i,c as r};
1
+ import{m as t}from"./DkQdSPDN.js";import"./3SdAC2_C.js";import{bm as n}from"./Fcr7AvC-.js";import"./BRCr02in.js";import"./CWfjuhY2.js";import"./BAtAwQ72.js";import"./ChTqQfQN.js";import"./DRMe5Ypb.js";import"./D0qhIm1r.js";function L(e){try{const r=new URL(e).hostname.toLowerCase();return r==="daemon.localhost"||r==="client.localhost"}catch{return!1}}const s="browser:resolve-url";function a(e){return typeof e=="object"&&e!==null&&typeof e.url=="string"&&typeof e.rewritten=="boolean"}async function l(e,r){const o={url:e,rewritten:!1};if(!r)return o;try{const i=await r(s,{url:e});return a(i)?i:o}catch{return o}}async function g(e,r){if(!r)return e;try{const o=await r(s,{url:e,mode:"rewrite-only"});return a(o)?o.url:e}catch{return e}}async function c(e){const r=await l(e,typeof window<"u"?window.electronAPI?.invoke:void 0);return r.error&&r.rewritten?r.forbidden?t.error(n.browser_linkOpen_ownerOnlyForward_error()):t.error(n.browser_embedded_resolveFailed_error(),{description:r.error}):r.warning&&t.warning(n.browser_linkOpen_loopbackAmbiguity_warning(),{description:r.warning}),{url:r.url,...r.rewritten&&r.requestedUrl!==void 0?{requestedUrl:r.requestedUrl}:{}}}const h=Object.freeze(Object.defineProperty({__proto__:null,resolveBrowserLinkForOpen:c},Symbol.toStringTag,{value:"Module"}));export{l as a,h as b,g as c,L as i,c as r};
@@ -1,2 +1,2 @@
1
- import{JH as l,s2 as u,Jk as b}from"./CiKoEJ2m.js";import{at as v}from"./JvFe2B29.js";import{bJ as m}from"./iQDlfKDR.js";import{bd as S,b9 as P}from"./DEr2A_-h.js";import{K as M}from"./C8E14ldW.js";import{bm as s}from"./CtfEuoOH.js";import{l as E}from"./DMEIbJII.js";const D=l.createSelector(t=>t.backgroundAgentSettings.defaultModel),O=l.createSelector(t=>t.backgroundAgentSettings.typeOverrides),H=l.createSelector(t=>t.backgroundAgentSettings.defaultReasoningEffort),j=l.createSelector(t=>t.backgroundAgentSettings.typeReasoningEffortOverrides),w=l.createSelector(t=>t.backgroundAgentSettings),A=l.createSelector(t=>{const a=new Map,o=(e,i)=>{const n=a.get(e)??new Set;n.add(i),a.set(e,n)},f=m.select(t),d=M.select(t),g=v.select(t)[d];g&&d&&o(d,s.settings_providers_inUseDefaultModel_label({model:g})),u(d)&&!g&&o(d,s.settings_providers_inUseDefaultProvider_label());const p=t.backgroundAgentSettings?.providerId;p&&u(p)&&o(p,s.settings_providers_inUseQuickActions_label());for(const e of S.select(t)){const i=P.select(t,e.id),n=e.source?{project:s.settings_providers_pinSourceProject_label(),user:s.settings_providers_pinSourceUser_label(),bundled:s.settings_providers_pinSourceBundled_label(),builtin:s.settings_providers_pinSourceBuiltin_label(),"electron-store":s.settings_providers_pinSourceLegacy_label()}[e.source]:void 0,c=r=>n&&i?s.settings_providers_inUseSourcePath_label({reason:r,source:n,path:i}):n?s.settings_providers_inUseSource_label({reason:r,source:n}):i?s.settings_providers_inUsePath_label({reason:r,path:i}):r;if(e.codingAgent&&o(e.codingAgent,c(s.settings_providers_inUseSpecialistAgent_label({name:e.name}))),e.modelOptions?.forEach((r,_)=>{r.provider&&u(r.provider)&&o(r.provider,c(s.settings_providers_inUseSpecialistModelOption_label({name:e.name,position:E(_+1)})))}),e.defaultModel)if(e.defaultModel.includes(":")){const r=b(e.defaultModel).providerId??f;o(r,c(s.settings_providers_inUseSpecialistModel_label({name:e.name,model:e.defaultModel})))}else e.codingAgent||o(f,c(s.settings_providers_inUseSpecialistModel_label({name:e.name,model:e.defaultModel})))}return Object.fromEntries([...a].map(([e,i])=>[e,[...i].join(`
1
+ import{JH as l,s2 as u,Jk as b}from"./D0qhIm1r.js";import{at as v}from"./k5fprFtz.js";import{bJ as m}from"./cD292w1o.js";import{bd as S,b9 as P}from"./Xk1ND_1x.js";import{K as M}from"./DrCYFWYk.js";import{bm as s}from"./Fcr7AvC-.js";import{l as E}from"./C7b3vXLD.js";const D=l.createSelector(t=>t.backgroundAgentSettings.defaultModel),O=l.createSelector(t=>t.backgroundAgentSettings.typeOverrides),H=l.createSelector(t=>t.backgroundAgentSettings.defaultReasoningEffort),j=l.createSelector(t=>t.backgroundAgentSettings.typeReasoningEffortOverrides),w=l.createSelector(t=>t.backgroundAgentSettings),A=l.createSelector(t=>{const a=new Map,o=(e,i)=>{const n=a.get(e)??new Set;n.add(i),a.set(e,n)},f=m.select(t),d=M.select(t),g=v.select(t)[d];g&&d&&o(d,s.settings_providers_inUseDefaultModel_label({model:g})),u(d)&&!g&&o(d,s.settings_providers_inUseDefaultProvider_label());const p=t.backgroundAgentSettings?.providerId;p&&u(p)&&o(p,s.settings_providers_inUseQuickActions_label());for(const e of S.select(t)){const i=P.select(t,e.id),n=e.source?{project:s.settings_providers_pinSourceProject_label(),user:s.settings_providers_pinSourceUser_label(),bundled:s.settings_providers_pinSourceBundled_label(),builtin:s.settings_providers_pinSourceBuiltin_label(),"electron-store":s.settings_providers_pinSourceLegacy_label()}[e.source]:void 0,c=r=>n&&i?s.settings_providers_inUseSourcePath_label({reason:r,source:n,path:i}):n?s.settings_providers_inUseSource_label({reason:r,source:n}):i?s.settings_providers_inUsePath_label({reason:r,path:i}):r;if(e.codingAgent&&o(e.codingAgent,c(s.settings_providers_inUseSpecialistAgent_label({name:e.name}))),e.modelOptions?.forEach((r,_)=>{r.provider&&u(r.provider)&&o(r.provider,c(s.settings_providers_inUseSpecialistModelOption_label({name:e.name,position:E(_+1)})))}),e.defaultModel)if(e.defaultModel.includes(":")){const r=b(e.defaultModel).providerId??f;o(r,c(s.settings_providers_inUseSpecialistModel_label({name:e.name,model:e.defaultModel})))}else e.codingAgent||o(f,c(s.settings_providers_inUseSpecialistModel_label({name:e.name,model:e.defaultModel})))}return Object.fromEntries([...a].map(([e,i])=>[e,[...i].join(`
2
2
  `)]))});l.createSelector((t,a)=>A.select(t)[a]??null);const h=[{id:"dracula",label:"Dracula"},{id:"nord",label:"Nord"},{id:"rose-pine",label:"Rosé Pine"},{id:"tokyo-night",label:"Tokyo Night"},{id:"solarized",label:"Solarized"},{id:"github",label:"GitHub"},{id:"high-contrast",label:"High Contrast"}],J=h.map(({id:t})=>t);export{J as T,h as a,H as b,w as c,O as d,j as e,A as f,D as s};
@@ -1 +1 @@
1
- import{w1 as W,v$ as E,hq as j,hr as H,i as K,Jk as $,JH as i,ac as z,nZ as P}from"./CiKoEJ2m.js";import{bm as c}from"./CtfEuoOH.js";import{aB as J,n as X,I as G,aD as k,g as Z}from"./C8E14ldW.js";import{w as Q}from"./QzxpbvSo.js";import{cx as y,c_ as Y,cZ as v,d2 as ee}from"./iQDlfKDR.js";import{y as _}from"./Bqd7fdCF.js";const te=["connected","disconnected","unreachable","revoked","update-required"],f=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),d=e=>typeof e=="string"&&e.length>0,h=e=>typeof e=="string"&&e.length>0?e:void 0,L=e=>Number.isSafeInteger(e)&&e>=0?e:0;function ne(e){if(!f(e))return;const t=Array.isArray(e.providers)?e.providers.flatMap(a=>f(a)&&d(a.id)?[{id:a.id,...a.visible===!1?{visible:!1}:{},status:typeof a.status=="string"?a.status:"unknown",models:Array.isArray(a.models)?a.models.filter(s=>d(s)):[],...a.modelsStale===!0?{modelsStale:!0}:{}}]:[]):[],n=h(e.intentdVersion),r=oe(e.capacity),o=re(e.resources);return{...n?{intentdVersion:n}:{},providers:t,...r?{capacity:r}:{},...o?{resources:o}:{}}}function re(e){if(!f(e)||!g(e.memoryUsedBytes)||!g(e.memoryTotalBytes)||e.memoryTotalBytes===0)return;const t=e.cpuPercent;return{...g(t)&&t<=100?{cpuPercent:t}:{},memoryUsedBytes:Math.min(e.memoryUsedBytes,e.memoryTotalBytes),memoryTotalBytes:e.memoryTotalBytes}}const g=e=>Number.isSafeInteger(e)&&e>=0;function oe(e){if(!(!f(e)||!g(e.runningAgents)||!g(e.agentCap)))return{runningAgents:e.runningAgents,agentCap:e.agentCap}}function Fe(e){if(!f(e)||!d(e.id)||!d(e.name)||!d(e.fingerprint)||!te.includes(e.state)||!Number.isInteger(e.port)||!d(e.addedAt))return null;const t=f(e.platform)&&d(e.platform.os)&&d(e.platform.arch)?{os:e.platform.os,arch:e.platform.arch}:void 0,n=ne(e.capabilities),r=h(e.tcAddress),o=h(e.observedAt),a=h(e.lastConnectedAt),s=W(e.cloud),l=Number.isInteger(e.nodeProtocol)&&e.nodeProtocol>=0?e.nodeProtocol:void 0;return{id:e.id,name:e.name,...t?{platform:t}:{},hosts:Array.isArray(e.hosts)?e.hosts.filter(p=>d(p)):[],port:e.port,...r?{tcAddress:r}:{},fingerprint:e.fingerprint,state:e.state,runningAgents:L(e.runningAgents),...n?{capabilities:n}:{},...l!==void 0?{nodeProtocol:l}:{},...o?{observedAt:o}:{},addedAt:e.addedAt,...a?{lastConnectedAt:a}:{},...s?{cloud:s}:{}}}function Ue(e){if(!f(e)||!d(e.credentialId)||!d(e.backendId)||!d(e.backendName)||!d(e.createdAt))return null;const t=h(e.lastUsedAt);return{credentialId:e.credentialId,backendId:e.backendId,backendName:e.backendName,createdAt:e.createdAt,...t?{lastUsedAt:t}:{},connected:e.connected===!0,runningAgents:L(e.runningAgents)}}function qe(e){const t=(typeof e=="string"?e:"").trim().toUpperCase();return t===""?null:t}function ae(e){if(!f(e)||typeof e.name!="string")return null;const t=e.name;return e.kind==="local"?{kind:"local",name:t}:e.kind==="machine"&&d(e.nodeId)?{kind:"machine",nodeId:e.nodeId,name:t}:e.kind==="cloud"&&d(e.cloudMachineId)?{kind:"cloud",cloudMachineId:e.cloudMachineId,name:t}:null}function Ve(e){if(!Array.isArray(e))return null;const t=[];for(const n of e){const r=ae(n);if(!r)return null;t.push(r)}return t}function se(e){return e.kind==="local"?{kind:"local"}:e.kind==="machine"?{kind:"machine",nodeId:e.nodeId}:{kind:"cloud",cloudMachineId:e.cloudMachineId}}function b(e){return e.kind==="local"?"local":e.kind==="machine"?`machine:${e.nodeId}`:`cloud:${e.cloudMachineId}`}const ce={macos:"macOS",linux:"Linux",windows:"Windows"},ie={aarch64:"arm64",arm64:"arm64",x86_64:"x64",x64:"x64"};function m(e,t){const n=[e&&(ce[e]??e),t&&(ie[t]??t)].filter(r=>!!r);return n.length?n.join(" "):null}function le(e){return e?.placement?.target==="remote"||_(e?.placement?.target)}const de=new Set(["running","paused","resuming","pausing","stopping"]);function ue(e,t){if(e.placementError)return null;if(e.cloudStart)return"starting";if(!e.nodeId)return e.effectiveIsolation==="pending"?"starting":null;const n=t?.cloud?.state;return n&&de.has(n)?n:e.effectiveIsolation==="pending"?"starting":null}function N(e,t){if(!e||!le(e))return null;const n=e.nodeId??e.placement?.nodeId??"",r=t&&t.id===n?t:null;if(_(e.placement?.target))return{nodeId:n,name:e.nodeName?.trim()||j(r?.cloud?.provider??H(e.placement?.cloudMachineId)),platform:m(r?.platform?.os,r?.platform?.arch),state:"ready",cloud:{state:ue(e,r)}};const o=m(e.placement?.os,e.placement?.arch)??m(r?.platform?.os,r?.platform?.arch),a=r?.state==="revoked"?"revoked":r?.state==="unreachable"||e.nodeState==="offline"?"unreachable":"ready";return{nodeId:n,name:e.nodeName?.trim()||r?.name||c.remoteAgent_location_unknownMachine(),platform:o,state:a}}function We(e,t){if(!e)return null;const n=t&&t.id===e?t:null;return{nodeId:e,name:n?.name||c.remoteAgent_location_unknownMachine(),platform:m(n?.platform?.os,n?.platform?.arch),state:n?.state==="revoked"?"revoked":n?.state==="unreachable"?"unreachable":"ready"}}function B(e){switch(e){case"starting":return c.cloudMachines_agent_starting();case"running":return c.cloudMachines_agent_running();case"paused":return c.cloudMachines_agent_paused();case"resuming":return c.cloudMachines_agent_resuming();case"pausing":return c.cloudMachines_agent_pausing();case"stopping":return c.cloudMachines_agent_stopping();default:return null}}function je(e){const t=B(e.cloud?.state);return t?c.cloudMachines_agent_chip({machine:e.name,state:t}):e.name}function He(e){if(e.cloud){const n=B(e.cloud.state),r=c.remoteAgent_location_tooltipNoPlatform({machine:e.name});return n?c.remoteAgent_location_tooltipWithState({location:r,state:n}):r}const t=e.platform?c.remoteAgent_location_tooltip({machine:e.name,platform:e.platform}):c.remoteAgent_location_tooltipNoPlatform({machine:e.name});switch(e.state){case"unreachable":return c.remoteAgent_location_tooltipWithState({location:t,state:c.remoteMachines_state_unreachable_label()});case"revoked":return c.remoteAgent_location_tooltipWithState({location:t,state:c.remoteMachines_state_revoked_label()});default:return t}}function x(e,t){return!e||!t?null:e.placementError?"failed":t.state==="revoked"?"revoked":t.state==="unreachable"?"unreachable":e.effectiveIsolation==="pending"||e.cloudStart?"starting":e.setup?.state==="failed"?"setup-failed":e.setup?.state==="running"?"setup-running":null}function w(e){if(!e.endsWith("}"))return null;for(let t=e.indexOf(" {");t>=0;t=e.indexOf(" {",t+1))try{const n=JSON.parse(e.slice(t+1));if(n&&typeof n=="object"&&typeof n.code=="string")return{message:e.slice(0,t).trim(),data:n}}catch{}return null}function fe(e,t){const n=e.detail??"",r=w(n),o=e.code==="machine-update-required"||r?.data.code==="machine-update-required";if(o&&r?.data.reason==="prepared-checkout")return{updateRequired:o,message:c.remoteAgent_updateRequired_preparedCheckout({machine:t})};const a=E(r?.data),s=a??(e.code?E({code:e.code}):null);return s?{updateRequired:o,message:r?.message||n,cloud:s,cloudDetailKnown:!!a}:{updateRequired:o,message:r?.message||n}}function Ke(e){if(!_(e?.placement?.target)||!e.placementError||e.status!==K.Error)return null;const t=fe(e.placementError,"");return t.cloud?t:null}const me=["attachments-too-large-for-machine:","node-prompt-too-large:"],pe="remote-agent-unsupported:";function T(e){return new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(e/1048576)}function $e(e){const t=w(e)?.message??e;for(const r of me){const o=t.indexOf(r);if(o<0)continue;const a=t.slice(o+r.length).trim().replace(/^[a-z][\w]*(?:\.[\w]+)+:\s*/i,""),s=/come to (\d+) bytes\b.*?over its (\d+)-byte limit/.exec(a);return s?c.remoteAgent_attachmentsTooLargeSized_error({size:T(Number(s[1])),limit:T(Number(s[2]))}):a?c.remoteAgent_attachmentsTooLarge_error({detail:a}):c.remoteAgent_attachmentsTooLargeNoDetail_error()}const n=t.indexOf(pe);return n>=0&&/attachment/i.test(t.slice(n))?c.remoteAgent_attachmentsUnsupported_error():null}function ze(e){return _(e?.placement?.target)&&x(e,N(e))==="starting"}function Je(e,t){if(!_(e?.placement?.target))return!1;const n=N(e,t);return n?.cloud?.state==="resuming"&&x(e,n)===null}const S="",u="host:",O="cloud:";function M(e){return`${O}${e}`}function A(e){return e?.startsWith(O)&&e.slice(O.length)||null}const Xe=M("e2b");function he(e,t){return e?.find(n=>M(n.cloudMachineId)===t&&n.unavailableReason===null)}const ge=new Set(["connected","disconnected"]);function be(e){switch(e){case"unreachable":return c.remoteMachines_state_unreachable_label();case"revoked":return c.remoteMachines_state_revoked_label();case"update-required":return c.remoteMachines_state_updateRequired_label();default:return}}function I(e){return ge.has(e.state)}function _e({backendLabel:e,backendPlatform:t,machines:n,cloud:r,orchestrator:o=!1}){const a=[...o?[]:[{id:u,label:e,platform:m(t?.os,t?.arch),disabled:!1}],...n.map(s=>{const l=m(s.platform?.os,s.platform?.arch);return I(s)?{id:s.id,label:s.name,platform:l,disabled:!1}:{id:s.id,label:s.name,platform:l,disabled:!0,reason:be(s.state)}})];for(const s of r??[])a.push({id:M(s.cloudMachineId),label:s.label,platform:null,kind:"cloud",disabled:s.unavailableReason!==null,...s.unavailableReason?{reason:s.unavailableReason}:s.needsProfile?{hint:c.cloudMachines_startOn_hint()}:{}});return a}function Ge(e,t=""){return e.find(n=>n.id===u)?.label??t}function Se(e){return(e.find(t=>!t.disabled)??e[0])?.id??S}function Ze(e,t,n){if(e!==u){if(e!==S)return A(e)?void 0:e;if(n)return t.find(r=>r.id!==u&&r.kind!=="cloud"&&!r.disabled)?.id}}function Me({remoteMachinesVisible:e,supported:t,machines:n,cloud:r}){return e&&t&&(n.some(I)||(r??[]).some(o=>o.unavailableReason===null))}function Ae(e,t){return e.map(n=>{if(n.kind!=="cloud")return n;const r=t?.find(o=>M(o.cloudMachineId)===n.id)?.unavailableReason;return r?{...n,disabled:!0,reason:r,hint:void 0}:n})}function Oe(e,t,n,r){const o=r?Se(r):S;if(!e)return o;if(e===u)return!r||r.some(s=>s.id===u)?u:o;if(A(e))return he(n,e)?e:o;const a=t.find(s=>s.id===e);return a&&I(a)?a.id:o}function Qe(e,t){return t===u&&e!==u?S:t}function Ye(e,{cloudEntries:t=!1,providerOf:n}={}){if(e===u)return{target:"local"};const r=A(e);if(r){const o=n?.(r);return t&&o&&o!=="e2b"?{target:"cloud",checkout:"isolated",cloudMachineId:r}:t?{target:"e2b",checkout:"isolated",cloudMachineId:r}:{target:"e2b",checkout:"isolated"}}return e?{target:"remote",checkout:"isolated",nodeId:e}:void 0}function ve({groups:e,providerRef:t,model:n}){const r=s=>s.options.filter(l=>!l.disabled),o=e.find(s=>s.key===t),a=o?r(o):[];if(n){const s=$(n).modelId;if(a.some(l=>l.value===s))return null}else if(a.length>0)return null;if(o&&a.length>0)return{providerId:o.key,modelId:a[0].value};for(const s of e){if(s.key==="default")continue;const l=r(s);if(l.length>0)return{providerId:s.key,modelId:l[0].value}}return null}function ke(e,t,n,r){const o=e.map(b),a=o.indexOf(t),s=o.indexOf(n);if(a<0||s<0||a===s)return null;let l=s+(r==="after"?1:0);if(a<l&&(l-=1),l===a)return null;const p=[...e],[V]=p.splice(a,1);return p.splice(l,0,V),p.map(se)}function et(e,t,n){const r=e.findIndex(a=>b(a)===t),o=e[r+n];return r<0||!o?null:ke(e,t,b(o),n===-1?"before":"after")}function ye(e,t){if(e===u)return"local";const n=t==="cloud"?A(e):null;return b(n?{kind:"cloud",cloudMachineId:n}:{kind:"machine",nodeId:e})}function Ie(e,t){const n=new Map(t.map((o,a)=>[b(o),a])),r=o=>n.get(ye(o.id,o.kind))??t.length;return e.map((o,a)=>({option:o,index:a})).sort((o,a)=>r(o.option)-r(a.option)||o.index-a.index).map(({option:o})=>o)}function tt(e,t){return t==="orchestrator"?e.filter(n=>n.kind!=="local"):[...e]}const Re=i.createSelector(e=>Q.select(e)||y.select(e)),R=i.createSelector(e=>Re.select(e)&&e.remoteMachines?.supported===!0),nt=i.createSelector(e=>R.select(e)&&J.select(e)&&!y.select(e)),D=i.createSelector(e=>R.select(e)&&e.remoteMachines.machineOrder===!0&&e.remoteMachines.order!==null),Ce=i.createSelector(e=>D.select(e)?e.remoteMachines.order??[]:[]),rt=i.createSelector(e=>e.remoteMachines.orderSaving!==null),C=i.createSelector(e=>Object.values(e.remoteMachines?.machines??{}).sort((t,n)=>t.name.localeCompare(n.name))),ot=i.createSelector(e=>e.remoteMachines.localFingerprint),at=i.createSelector(e=>e.remoteMachines.pending),st=i.createSelector(e=>e.remoteMachines.failures),ct=i.createSelector(e=>e.remoteMachines.executorBackends??[]),Ee=i.createSelector((e,t)=>{if(t===z)return c.layout_daemonStatus_localConnection_label();const n=P(e.connections.connections,t);return n?X(n):t}),Te=i.createSelector(e=>Ee.select(e,e.connections.windowBackendId)),it=i.createSelector((e,t)=>(t?e.remoteMachines.machines[t]??e.cloudMachines?.machines[t]:void 0)??null),lt=i.createSelector((e,t)=>{const n=e.providerSettings?.profiles;return G({catalogProfiles:ee.select(e,t),defaultRemoteIncompatibility:v.select(e,t),defaultRemoteLaunch:Y.select(e,t),profileDefaults:Object.values(n?.defaults??{}),profilesLoadStatus:n?.loadStatus??"idle"})}),dt=i.createSelector(e=>Object.fromEntries(Object.values(e.providerSettings?.profiles?.defaults??{}).map(t=>[t.baseProviderId,t.env.length>0]))),F=i.createSelector(e=>Me({remoteMachinesVisible:R.select(e),supported:e.remoteMachines?.initialAgentPlacement===!0,machines:C.select(e),cloud:k(e)}));function Pe(e){const t=P(e.connections.connections,e.connections.windowBackendId);return t?.hostOs?{os:t.hostOs,arch:t.hostArch}:void 0}const U=i.createSelector(e=>{const t=y.select(e),n=_e({backendLabel:Te.select(e),backendPlatform:Pe(e),machines:C.select(e),cloud:k(e),orchestrator:t});return D.select(e)?Ie(n,Ce.select(e)):n}),ut=i.createSelector(e=>F.select(e)?U.select(e):[]),ft=i.createSelector(e=>e.remoteMachines?.initialAgentPlacement===!0),mt=i.createSelector((e,t,n)=>{if(!F.select(e))return S;const r=q(e,n);return Oe(t,C.select(e),r,Ae(U.select(e),r))});function q(e,t){const n=k(e);if(!n||!t)return n;const r=e.cloudMachines?.providers??{};return n.map(o=>{if(o.unavailableReason)return o;const a=Z(e,t,r[o.cloudMachineId]??null);return a?{...o,unavailableReason:a}:o})}const pt=i.createSelector((e,t)=>q(e,t));export{et as $,mt as A,ct as B,ft as C,ot as D,Ce as E,rt as F,D as G,it as H,st as I,at as J,C as K,Re as L,R as M,lt as N,nt as O,pt as P,ut as Q,U as R,S,F as T,Ge as U,M as V,A as W,Se as X,Ze as Y,Ae as Z,Qe as _,Xe as a,u as b,Ke as c,ze as d,Je as e,je as f,N as g,He as h,x as i,qe as j,tt as k,Ye as l,We as m,ve as n,b as o,m as p,ke as q,Ue as r,Ve as s,Fe as t,fe as u,$e as v,Oe as w,Ee as x,Te as y,dt as z};
1
+ import{w1 as W,v$ as E,hq as j,hr as H,i as K,Jk as $,JH as i,ac as z,nZ as P}from"./D0qhIm1r.js";import{bm as c}from"./Fcr7AvC-.js";import{aB as J,n as X,I as G,aD as k,g as Z}from"./DrCYFWYk.js";import{w as Q}from"./BwweojP5.js";import{cx as y,c_ as Y,cZ as v,d2 as ee}from"./cD292w1o.js";import{y as _}from"./Bqd7fdCF.js";const te=["connected","disconnected","unreachable","revoked","update-required"],f=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),d=e=>typeof e=="string"&&e.length>0,h=e=>typeof e=="string"&&e.length>0?e:void 0,L=e=>Number.isSafeInteger(e)&&e>=0?e:0;function ne(e){if(!f(e))return;const t=Array.isArray(e.providers)?e.providers.flatMap(a=>f(a)&&d(a.id)?[{id:a.id,...a.visible===!1?{visible:!1}:{},status:typeof a.status=="string"?a.status:"unknown",models:Array.isArray(a.models)?a.models.filter(s=>d(s)):[],...a.modelsStale===!0?{modelsStale:!0}:{}}]:[]):[],n=h(e.intentdVersion),r=oe(e.capacity),o=re(e.resources);return{...n?{intentdVersion:n}:{},providers:t,...r?{capacity:r}:{},...o?{resources:o}:{}}}function re(e){if(!f(e)||!g(e.memoryUsedBytes)||!g(e.memoryTotalBytes)||e.memoryTotalBytes===0)return;const t=e.cpuPercent;return{...g(t)&&t<=100?{cpuPercent:t}:{},memoryUsedBytes:Math.min(e.memoryUsedBytes,e.memoryTotalBytes),memoryTotalBytes:e.memoryTotalBytes}}const g=e=>Number.isSafeInteger(e)&&e>=0;function oe(e){if(!(!f(e)||!g(e.runningAgents)||!g(e.agentCap)))return{runningAgents:e.runningAgents,agentCap:e.agentCap}}function Fe(e){if(!f(e)||!d(e.id)||!d(e.name)||!d(e.fingerprint)||!te.includes(e.state)||!Number.isInteger(e.port)||!d(e.addedAt))return null;const t=f(e.platform)&&d(e.platform.os)&&d(e.platform.arch)?{os:e.platform.os,arch:e.platform.arch}:void 0,n=ne(e.capabilities),r=h(e.tcAddress),o=h(e.observedAt),a=h(e.lastConnectedAt),s=W(e.cloud),l=Number.isInteger(e.nodeProtocol)&&e.nodeProtocol>=0?e.nodeProtocol:void 0;return{id:e.id,name:e.name,...t?{platform:t}:{},hosts:Array.isArray(e.hosts)?e.hosts.filter(p=>d(p)):[],port:e.port,...r?{tcAddress:r}:{},fingerprint:e.fingerprint,state:e.state,runningAgents:L(e.runningAgents),...n?{capabilities:n}:{},...l!==void 0?{nodeProtocol:l}:{},...o?{observedAt:o}:{},addedAt:e.addedAt,...a?{lastConnectedAt:a}:{},...s?{cloud:s}:{}}}function Ue(e){if(!f(e)||!d(e.credentialId)||!d(e.backendId)||!d(e.backendName)||!d(e.createdAt))return null;const t=h(e.lastUsedAt);return{credentialId:e.credentialId,backendId:e.backendId,backendName:e.backendName,createdAt:e.createdAt,...t?{lastUsedAt:t}:{},connected:e.connected===!0,runningAgents:L(e.runningAgents)}}function qe(e){const t=(typeof e=="string"?e:"").trim().toUpperCase();return t===""?null:t}function ae(e){if(!f(e)||typeof e.name!="string")return null;const t=e.name;return e.kind==="local"?{kind:"local",name:t}:e.kind==="machine"&&d(e.nodeId)?{kind:"machine",nodeId:e.nodeId,name:t}:e.kind==="cloud"&&d(e.cloudMachineId)?{kind:"cloud",cloudMachineId:e.cloudMachineId,name:t}:null}function Ve(e){if(!Array.isArray(e))return null;const t=[];for(const n of e){const r=ae(n);if(!r)return null;t.push(r)}return t}function se(e){return e.kind==="local"?{kind:"local"}:e.kind==="machine"?{kind:"machine",nodeId:e.nodeId}:{kind:"cloud",cloudMachineId:e.cloudMachineId}}function b(e){return e.kind==="local"?"local":e.kind==="machine"?`machine:${e.nodeId}`:`cloud:${e.cloudMachineId}`}const ce={macos:"macOS",linux:"Linux",windows:"Windows"},ie={aarch64:"arm64",arm64:"arm64",x86_64:"x64",x64:"x64"};function m(e,t){const n=[e&&(ce[e]??e),t&&(ie[t]??t)].filter(r=>!!r);return n.length?n.join(" "):null}function le(e){return e?.placement?.target==="remote"||_(e?.placement?.target)}const de=new Set(["running","paused","resuming","pausing","stopping"]);function ue(e,t){if(e.placementError)return null;if(e.cloudStart)return"starting";if(!e.nodeId)return e.effectiveIsolation==="pending"?"starting":null;const n=t?.cloud?.state;return n&&de.has(n)?n:e.effectiveIsolation==="pending"?"starting":null}function N(e,t){if(!e||!le(e))return null;const n=e.nodeId??e.placement?.nodeId??"",r=t&&t.id===n?t:null;if(_(e.placement?.target))return{nodeId:n,name:e.nodeName?.trim()||j(r?.cloud?.provider??H(e.placement?.cloudMachineId)),platform:m(r?.platform?.os,r?.platform?.arch),state:"ready",cloud:{state:ue(e,r)}};const o=m(e.placement?.os,e.placement?.arch)??m(r?.platform?.os,r?.platform?.arch),a=r?.state==="revoked"?"revoked":r?.state==="unreachable"||e.nodeState==="offline"?"unreachable":"ready";return{nodeId:n,name:e.nodeName?.trim()||r?.name||c.remoteAgent_location_unknownMachine(),platform:o,state:a}}function We(e,t){if(!e)return null;const n=t&&t.id===e?t:null;return{nodeId:e,name:n?.name||c.remoteAgent_location_unknownMachine(),platform:m(n?.platform?.os,n?.platform?.arch),state:n?.state==="revoked"?"revoked":n?.state==="unreachable"?"unreachable":"ready"}}function B(e){switch(e){case"starting":return c.cloudMachines_agent_starting();case"running":return c.cloudMachines_agent_running();case"paused":return c.cloudMachines_agent_paused();case"resuming":return c.cloudMachines_agent_resuming();case"pausing":return c.cloudMachines_agent_pausing();case"stopping":return c.cloudMachines_agent_stopping();default:return null}}function je(e){const t=B(e.cloud?.state);return t?c.cloudMachines_agent_chip({machine:e.name,state:t}):e.name}function He(e){if(e.cloud){const n=B(e.cloud.state),r=c.remoteAgent_location_tooltipNoPlatform({machine:e.name});return n?c.remoteAgent_location_tooltipWithState({location:r,state:n}):r}const t=e.platform?c.remoteAgent_location_tooltip({machine:e.name,platform:e.platform}):c.remoteAgent_location_tooltipNoPlatform({machine:e.name});switch(e.state){case"unreachable":return c.remoteAgent_location_tooltipWithState({location:t,state:c.remoteMachines_state_unreachable_label()});case"revoked":return c.remoteAgent_location_tooltipWithState({location:t,state:c.remoteMachines_state_revoked_label()});default:return t}}function x(e,t){return!e||!t?null:e.placementError?"failed":t.state==="revoked"?"revoked":t.state==="unreachable"?"unreachable":e.effectiveIsolation==="pending"||e.cloudStart?"starting":e.setup?.state==="failed"?"setup-failed":e.setup?.state==="running"?"setup-running":null}function w(e){if(!e.endsWith("}"))return null;for(let t=e.indexOf(" {");t>=0;t=e.indexOf(" {",t+1))try{const n=JSON.parse(e.slice(t+1));if(n&&typeof n=="object"&&typeof n.code=="string")return{message:e.slice(0,t).trim(),data:n}}catch{}return null}function fe(e,t){const n=e.detail??"",r=w(n),o=e.code==="machine-update-required"||r?.data.code==="machine-update-required";if(o&&r?.data.reason==="prepared-checkout")return{updateRequired:o,message:c.remoteAgent_updateRequired_preparedCheckout({machine:t})};const a=E(r?.data),s=a??(e.code?E({code:e.code}):null);return s?{updateRequired:o,message:r?.message||n,cloud:s,cloudDetailKnown:!!a}:{updateRequired:o,message:r?.message||n}}function Ke(e){if(!_(e?.placement?.target)||!e.placementError||e.status!==K.Error)return null;const t=fe(e.placementError,"");return t.cloud?t:null}const me=["attachments-too-large-for-machine:","node-prompt-too-large:"],pe="remote-agent-unsupported:";function T(e){return new Intl.NumberFormat(void 0,{maximumFractionDigits:1}).format(e/1048576)}function $e(e){const t=w(e)?.message??e;for(const r of me){const o=t.indexOf(r);if(o<0)continue;const a=t.slice(o+r.length).trim().replace(/^[a-z][\w]*(?:\.[\w]+)+:\s*/i,""),s=/come to (\d+) bytes\b.*?over its (\d+)-byte limit/.exec(a);return s?c.remoteAgent_attachmentsTooLargeSized_error({size:T(Number(s[1])),limit:T(Number(s[2]))}):a?c.remoteAgent_attachmentsTooLarge_error({detail:a}):c.remoteAgent_attachmentsTooLargeNoDetail_error()}const n=t.indexOf(pe);return n>=0&&/attachment/i.test(t.slice(n))?c.remoteAgent_attachmentsUnsupported_error():null}function ze(e){return _(e?.placement?.target)&&x(e,N(e))==="starting"}function Je(e,t){if(!_(e?.placement?.target))return!1;const n=N(e,t);return n?.cloud?.state==="resuming"&&x(e,n)===null}const S="",u="host:",O="cloud:";function M(e){return`${O}${e}`}function A(e){return e?.startsWith(O)&&e.slice(O.length)||null}const Xe=M("e2b");function he(e,t){return e?.find(n=>M(n.cloudMachineId)===t&&n.unavailableReason===null)}const ge=new Set(["connected","disconnected"]);function be(e){switch(e){case"unreachable":return c.remoteMachines_state_unreachable_label();case"revoked":return c.remoteMachines_state_revoked_label();case"update-required":return c.remoteMachines_state_updateRequired_label();default:return}}function I(e){return ge.has(e.state)}function _e({backendLabel:e,backendPlatform:t,machines:n,cloud:r,orchestrator:o=!1}){const a=[...o?[]:[{id:u,label:e,platform:m(t?.os,t?.arch),disabled:!1}],...n.map(s=>{const l=m(s.platform?.os,s.platform?.arch);return I(s)?{id:s.id,label:s.name,platform:l,disabled:!1}:{id:s.id,label:s.name,platform:l,disabled:!0,reason:be(s.state)}})];for(const s of r??[])a.push({id:M(s.cloudMachineId),label:s.label,platform:null,kind:"cloud",disabled:s.unavailableReason!==null,...s.unavailableReason?{reason:s.unavailableReason}:s.needsProfile?{hint:c.cloudMachines_startOn_hint()}:{}});return a}function Ge(e,t=""){return e.find(n=>n.id===u)?.label??t}function Se(e){return(e.find(t=>!t.disabled)??e[0])?.id??S}function Ze(e,t,n){if(e!==u){if(e!==S)return A(e)?void 0:e;if(n)return t.find(r=>r.id!==u&&r.kind!=="cloud"&&!r.disabled)?.id}}function Me({remoteMachinesVisible:e,supported:t,machines:n,cloud:r}){return e&&t&&(n.some(I)||(r??[]).some(o=>o.unavailableReason===null))}function Ae(e,t){return e.map(n=>{if(n.kind!=="cloud")return n;const r=t?.find(o=>M(o.cloudMachineId)===n.id)?.unavailableReason;return r?{...n,disabled:!0,reason:r,hint:void 0}:n})}function Oe(e,t,n,r){const o=r?Se(r):S;if(!e)return o;if(e===u)return!r||r.some(s=>s.id===u)?u:o;if(A(e))return he(n,e)?e:o;const a=t.find(s=>s.id===e);return a&&I(a)?a.id:o}function Qe(e,t){return t===u&&e!==u?S:t}function Ye(e,{cloudEntries:t=!1,providerOf:n}={}){if(e===u)return{target:"local"};const r=A(e);if(r){const o=n?.(r);return t&&o&&o!=="e2b"?{target:"cloud",checkout:"isolated",cloudMachineId:r}:t?{target:"e2b",checkout:"isolated",cloudMachineId:r}:{target:"e2b",checkout:"isolated"}}return e?{target:"remote",checkout:"isolated",nodeId:e}:void 0}function ve({groups:e,providerRef:t,model:n}){const r=s=>s.options.filter(l=>!l.disabled),o=e.find(s=>s.key===t),a=o?r(o):[];if(n){const s=$(n).modelId;if(a.some(l=>l.value===s))return null}else if(a.length>0)return null;if(o&&a.length>0)return{providerId:o.key,modelId:a[0].value};for(const s of e){if(s.key==="default")continue;const l=r(s);if(l.length>0)return{providerId:s.key,modelId:l[0].value}}return null}function ke(e,t,n,r){const o=e.map(b),a=o.indexOf(t),s=o.indexOf(n);if(a<0||s<0||a===s)return null;let l=s+(r==="after"?1:0);if(a<l&&(l-=1),l===a)return null;const p=[...e],[V]=p.splice(a,1);return p.splice(l,0,V),p.map(se)}function et(e,t,n){const r=e.findIndex(a=>b(a)===t),o=e[r+n];return r<0||!o?null:ke(e,t,b(o),n===-1?"before":"after")}function ye(e,t){if(e===u)return"local";const n=t==="cloud"?A(e):null;return b(n?{kind:"cloud",cloudMachineId:n}:{kind:"machine",nodeId:e})}function Ie(e,t){const n=new Map(t.map((o,a)=>[b(o),a])),r=o=>n.get(ye(o.id,o.kind))??t.length;return e.map((o,a)=>({option:o,index:a})).sort((o,a)=>r(o.option)-r(a.option)||o.index-a.index).map(({option:o})=>o)}function tt(e,t){return t==="orchestrator"?e.filter(n=>n.kind!=="local"):[...e]}const Re=i.createSelector(e=>Q.select(e)||y.select(e)),R=i.createSelector(e=>Re.select(e)&&e.remoteMachines?.supported===!0),nt=i.createSelector(e=>R.select(e)&&J.select(e)&&!y.select(e)),D=i.createSelector(e=>R.select(e)&&e.remoteMachines.machineOrder===!0&&e.remoteMachines.order!==null),Ce=i.createSelector(e=>D.select(e)?e.remoteMachines.order??[]:[]),rt=i.createSelector(e=>e.remoteMachines.orderSaving!==null),C=i.createSelector(e=>Object.values(e.remoteMachines?.machines??{}).sort((t,n)=>t.name.localeCompare(n.name))),ot=i.createSelector(e=>e.remoteMachines.localFingerprint),at=i.createSelector(e=>e.remoteMachines.pending),st=i.createSelector(e=>e.remoteMachines.failures),ct=i.createSelector(e=>e.remoteMachines.executorBackends??[]),Ee=i.createSelector((e,t)=>{if(t===z)return c.layout_daemonStatus_localConnection_label();const n=P(e.connections.connections,t);return n?X(n):t}),Te=i.createSelector(e=>Ee.select(e,e.connections.windowBackendId)),it=i.createSelector((e,t)=>(t?e.remoteMachines.machines[t]??e.cloudMachines?.machines[t]:void 0)??null),lt=i.createSelector((e,t)=>{const n=e.providerSettings?.profiles;return G({catalogProfiles:ee.select(e,t),defaultRemoteIncompatibility:v.select(e,t),defaultRemoteLaunch:Y.select(e,t),profileDefaults:Object.values(n?.defaults??{}),profilesLoadStatus:n?.loadStatus??"idle"})}),dt=i.createSelector(e=>Object.fromEntries(Object.values(e.providerSettings?.profiles?.defaults??{}).map(t=>[t.baseProviderId,t.env.length>0]))),F=i.createSelector(e=>Me({remoteMachinesVisible:R.select(e),supported:e.remoteMachines?.initialAgentPlacement===!0,machines:C.select(e),cloud:k(e)}));function Pe(e){const t=P(e.connections.connections,e.connections.windowBackendId);return t?.hostOs?{os:t.hostOs,arch:t.hostArch}:void 0}const U=i.createSelector(e=>{const t=y.select(e),n=_e({backendLabel:Te.select(e),backendPlatform:Pe(e),machines:C.select(e),cloud:k(e),orchestrator:t});return D.select(e)?Ie(n,Ce.select(e)):n}),ut=i.createSelector(e=>F.select(e)?U.select(e):[]),ft=i.createSelector(e=>e.remoteMachines?.initialAgentPlacement===!0),mt=i.createSelector((e,t,n)=>{if(!F.select(e))return S;const r=q(e,n);return Oe(t,C.select(e),r,Ae(U.select(e),r))});function q(e,t){const n=k(e);if(!n||!t)return n;const r=e.cloudMachines?.providers??{};return n.map(o=>{if(o.unavailableReason)return o;const a=Z(e,t,r[o.cloudMachineId]??null);return a?{...o,unavailableReason:a}:o})}const pt=i.createSelector((e,t)=>q(e,t));export{et as $,mt as A,ct as B,ft as C,ot as D,Ce as E,rt as F,D as G,it as H,st as I,at as J,C as K,Re as L,R as M,lt as N,nt as O,pt as P,ut as Q,U as R,S,F as T,Ge as U,M as V,A as W,Se as X,Ze as Y,Ae as Z,Qe as _,Xe as a,u as b,Ke as c,ze as d,Je as e,je as f,N as g,He as h,x as i,qe as j,tt as k,Ye as l,We as m,ve as n,b as o,m as p,ke as q,Ue as r,Ve as s,Fe as t,fe as u,$e as v,Oe as w,Ee as x,Te as y,dt as z};
@@ -1,4 +1,4 @@
1
- import{t as Ke,bo as k,bm as Ce,bw as Ve,b as Ue,q as ur,n as vr,r as gr,o as fr,p as hr,s as mr,bs as ht,bq as pr,f as _r,l as xr,g as br,e as wr,d as kr,m as yr,j as $r,i as Sr,h as Cr,k as Nr}from"./CtfEuoOH.js";import{bs as Je,ca as Ze,aD as e,ay as be,a5 as o,bH as L,bS as n,a7 as Pt,W as i,be as st,b$ as et,b_ as M,bO as C,bA as s,bl as O,bn as qe,bV as we,aA as y,c9 as _,aB as x,br as mt}from"./3SdAC2_C.js";import{n$ as Rr,JH as ct,n6 as Tt,en as Mr,eK as Pr,eL as Lr}from"./CiKoEJ2m.js";import{i as H}from"./DynUeYUu.js";import{n as We,j as Oe,h as at}from"./Bx1P9uW7.js";import{dI as Ir,bt as Ar}from"./iQDlfKDR.js";import{a9 as jt}from"./z0xDttNV.js";import{I as it,g as Ge,i as Lt}from"./CnFZbWXv.js";import{f as xe}from"./D9R5fzn8.js";import"./CT8vPg_p.js";import{f as He,s as Er}from"./B26ZHg3s.js";import"./CGmYraIa.js";import{F as fe,a2 as Hr,cR as zr,aw as ot,ax as pt,c2 as Wr,aV as Dr,bN as Tr,bH as jr,b9 as Fr,cW as Br,cn as Gr,b6 as St,c$ as Rt,cr as _t,bo as Or,cF as Kr,au as Vr}from"./COofQgO0.js";import{i as Ur}from"./BaXq2aUL.js";import{h as Ft}from"./BKD7o1lQ.js";import{H as Bt}from"./CcNhqKh5.js";import{I as Ut}from"./DcraaizU.js";import"./B3T1oiJl.js";import{q as Jr}from"./DMEIbJII.js";import{M as Mt}from"./DQNtbVVY.js";import{B as qr}from"./D3JNbQ4D.js";import{S as Ct}from"./aWBSU8IQ.js";const Qr=[/^diff --git /,/^index\s/,/^---\s/,/^\+\+\+\s/,/^\/];function Yr($){const r=[];if(!$)return r;const d=$.split(`
1
+ import{t as Ke,bo as k,bm as Ce,bw as Ve,b as Ue,q as ur,n as vr,r as gr,o as fr,p as hr,s as mr,bs as ht,bq as pr,f as _r,l as xr,g as br,e as wr,d as kr,m as yr,j as $r,i as Sr,h as Cr,k as Nr}from"./Fcr7AvC-.js";import{bs as Je,ca as Ze,aD as e,ay as be,a5 as o,bH as L,bS as n,a7 as Pt,W as i,be as st,b$ as et,b_ as M,bO as C,bA as s,bl as O,bn as qe,bV as we,aA as y,c9 as _,aB as x,br as mt}from"./3SdAC2_C.js";import{n$ as Rr,JH as ct,n6 as Tt,en as Mr,eK as Pr,eL as Lr}from"./D0qhIm1r.js";import{i as H}from"./BhYXv0ZM.js";import{n as We,j as Oe,h as at}from"./CxR-pcVt.js";import{dI as Ir,bt as Ar}from"./cD292w1o.js";import{a9 as jt}from"./B_DmwFyf.js";import{I as it,g as Ge,i as Lt}from"./CA6H1-bp.js";import{f as xe}from"./Beq_QLuz.js";import"./BAtAwQ72.js";import{f as He,s as Er}from"./BRCr02in.js";import"./CWfjuhY2.js";import{F as fe,a2 as Hr,cR as zr,aw as ot,ax as pt,c2 as Wr,aV as Dr,bN as Tr,bH as jr,b9 as Fr,cW as Br,cn as Gr,b6 as St,c$ as Rt,cr as _t,bo as Or,cF as Kr,au as Vr}from"./ChHRVjww.js";import{i as Ur}from"./C4AJzMws.js";import{h as Ft}from"./BKD7o1lQ.js";import{H as Bt}from"./CcNhqKh5.js";import{I as Ut}from"./C3KgmGxd.js";import"./x4bPxhVW.js";import{q as Jr}from"./C7b3vXLD.js";import{M as Mt}from"./DwJUGAx4.js";import{B as qr}from"./jphlY6bT.js";import{S as Ct}from"./D7KhILhs.js";const Qr=[/^diff --git /,/^index\s/,/^---\s/,/^\+\+\+\s/,/^\/];function Yr($){const r=[];if(!$)return r;const d=$.split(`
2
2
  `);let m=null,b=0,u=0;const T=P=>{const h=P.match(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),J=h?parseInt(h[1],10):0,K=h&&h[2]?parseInt(h[2],10):null,pe=h?parseInt(h[3],10):0,q=h&&h[4]?parseInt(h[4],10):null;m={header:P,oldStart:J,oldLines:K,newStart:pe,newLines:q,lines:[]},r.push(m),b=J,u=pe};for(const P of d){if(P.startsWith("@@")){T(P);continue}if(!m)continue;const h=m;P.startsWith("+")?h.lines.push({type:"addition",content:P.slice(1),oldNum:null,newNum:u++,raw:P}):P.startsWith("-")?h.lines.push({type:"deletion",content:P.slice(1),oldNum:b++,newNum:null,raw:P}):P.startsWith(" ")?h.lines.push({type:"context",content:P.slice(1),oldNum:b++,newNum:u++,raw:P}):Qr.some(J=>J.test(P))||P.trim()===""&&h.lines.push({type:"context",content:"",oldNum:b++,newNum:u++,raw:P})}return r}var Xr=x('<div><!> <!> <!></div> <p class="text-ui text-subtle mt-1"> </p>',1);function Jt($,r){if(new.target)return Ke({component:Jt,...$});Je(r,!0);let d=k(r,"lineNumber",7,0),m=k(r,"fileName",7,""),b=k(r,"onSend",7),u=k(r,"onClose",7),T=k(r,"isSending",7,!1),P=k(r,"class",7,""),h=we(""),J=we(null);Ze(()=>{e(J)&&e(J).focus()});function K(){!e(h).trim()||T()||(b()?.(e(h).trim(),d(),m()),L(h,""))}function pe(I){I.key==="Enter"&&!I.shiftKey&&(I.preventDefault(),K()),I.key==="Escape"&&u()?.()}var q={get lineNumber(){return d()},set lineNumber(I=0){d(I),y()},get fileName(){return m()},set fileName(I=""){m(I),y()},get onSend(){return b()},set onSend(I){b(I),y()},get onClose(){return u()},set onClose(I){u(I),y()},get isSending(){return T()},set isSending(I=!1){T(I),y()},get class(){return P()},set class(I=""){P(I),y()},$set:Ve,$on:(I,he)=>Ue(r,I,he)},w=Xr(),z=be(w),de=o(z);{let I=_(()=>Ce.codeReview_inlineComment_askLine_placeholder());Ut(de,{onkeydown:pe,get placeholder(){return e(I)},get disabled(){return T()},class:"flex-1 h-8 rounded-md border border-border bg-background px-3 text-sm placeholder:text-muted-foreground disabled:opacity-50",get ref(){return e(J)},set ref(he){L(J,he,!0)},get value(){return e(h)},set value(he){L(h,he,!0)}})}var ce=n(de,2);{let I=_(()=>!e(h).trim()||T());xe(ce,{type:"button",variant:"primary",onclick:K,get disabled(){return e(I)},class:"h-8 w-8 p-0",children:(he,Ne)=>{var _e=Pt(),S=be(_e);{var E=me=>{it(me,{size:14})},Ie=me=>{fe(me,{get icon(){return Hr},class:"h-3.5 w-3.5"})};H(S,me=>{T()?me(E):me(Ie,-1)})}i(he,_e)},$$slots:{default:!0}})}var ae=n(ce,2);xe(ae,{type:"button",variant:"ghost",onclick:()=>u()?.(),class:"h-8 px-2 text-xs text-muted-foreground hover:text-foreground transition-colors",children:(I,he)=>{st();var Ne=et();M(_e=>C(Ne,_e),[()=>Ce.codeReview_inlineComment_cancel_label()]),i(I,Ne)},$$slots:{default:!0}}),s(z);var te=n(z,2),ke=O(te,!0);return M(I=>{He(z,1,`walkthrough-inline-comment flex items-center gap-2 ${P()??""}`),C(ke,I)},[()=>Ce.codeReview_inlineComment_inputHint_label()]),i($,w),qe(q)}var Zr=x('<div class="text-xs text-slate-400 dark:text-slate-500 mt-1"> </div>'),en=x('<span class="font-medium"> </span> <!>',1),tn=x('<div class="flex items-start gap-3 py-2"><div><!></div> <div class="flex-1 min-w-0"><div class="text-sm leading-relaxed text-slate-700 dark:text-slate-300"><!></div></div></div>'),rn=x('<div class="px-4 pb-3 divide-y divide-border"></div>'),nn=x('<div class="border-t border-border"><!> <!></div>'),an=x('<div class="flex items-center gap-2 px-4 py-2 text-xs text-slate-500 dark:text-slate-400 border-t border-border"><!> <span> </span></div>'),sn=x('<div class="flex items-center gap-2"><!> <!> <!></div> <p class="text-ui text-slate-400 dark:text-slate-500 mt-1"> </p>',1),on=x("<!> <span> </span>",1),ln=x('<div><div class="flex items-start gap-3 px-4 py-3"><div class="shrink-0 mt-0.5"><!></div> <div class="flex-1 min-w-0"><div class="text-sm text-slate-800 dark:text-slate-200 leading-relaxed"><!></div> <!></div> <!></div> <!> <!> <div class="border-t border-border px-4 py-2"><!></div></div>');function qt($,r){if(new.target)return Ke({component:qt,...$});Je(r,!0);let d=k(r,"annotation",7),m=k(r,"lineNumber",7),b=k(r,"fileName",7),u=k(r,"messages",23,()=>[]),T=k(r,"onSendMessage",7),P=k(r,"onClose",7),h=k(r,"isSending",7,!1),J=k(r,"isAgentResponding",7,!1),K=k(r,"timestamp",7),pe=k(r,"class",7,""),q=we(""),w=we(!1),z=we(!1),de=we(null);Ze(()=>{e(w)&&e(de)&&e(de).focus()});function ce(){!e(q).trim()||h()||(T()?.(e(q).trim(),m(),b()),L(q,""))}function ae(a){a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),ce()),a.key==="Escape"&&(e(q)?L(q,""):L(w,!1))}function te(a){switch(a){case"highlight":return Fr;case"context":return jr;case"explanation":default:return Tr}}function ke(a){switch(a){case"highlight":return"text-orange-500";case"context":return"text-blue-500";case"explanation":default:return"text-warning-ink"}}function I(a){return a?Jr(a):""}const he=_(()=>u().length>0);var Ne={get annotation(){return d()},set annotation(a){d(a),y()},get lineNumber(){return m()},set lineNumber(a){m(a),y()},get fileName(){return b()},set fileName(a){b(a),y()},get messages(){return u()},set messages(a=[]){u(a),y()},get onSendMessage(){return T()},set onSendMessage(a){T(a),y()},get onClose(){return P()},set onClose(a){P(a),y()},get isSending(){return h()},set isSending(a=!1){h(a),y()},get isAgentResponding(){return J()},set isAgentResponding(a=!1){J(a),y()},get timestamp(){return K()},set timestamp(a){K(a),y()},get class(){return pe()},set class(a=""){pe(a),y()},$set:Ve,$on:(a,D)=>Ue(r,a,D)},_e=ln(),S=o(_e),E=o(S),Ie=o(E);{let a=_(()=>te(d().type)),D=_(()=>ke(d().type));fe(Ie,{get icon(){return e(a)},get class(){return`h-4 w-4 ${e(D)??""}`}})}s(E);var me=n(E,2),v=o(me),R=o(v);Mt(R,{get content(){return d().message},className:"[&>*:first-child]:mt-0 [&>*:last-child]:mb-0"}),s(v);var A=n(v,2);{var X=a=>{var D=Zr(),Z=O(D,!0);M(ee=>C(Z,ee),[()=>I(K())]),i(a,D)};H(A,a=>{K()&&a(X)})}s(me);var ie=n(me,2);{var $e=a=>{{let D=_(()=>Ce.codeReview_commentThread_dismiss_tooltip());xe(a,{type:"button",variant:"ghost",size:"icon-compact",iconOnly:!0,get onclick(){return P()},class:"shrink-0 text-slate-400 hover:text-slate-600 dark:text-slate-500 dark:hover:text-slate-300 transition-colors",get title(){return e(D)},children:(Z,ee)=>{fe(Z,{get icon(){return zr}})},$$slots:{default:!0}})}};H(ie,a=>{P()&&a($e)})}s(S);var Se=n(S,2);{var ye=a=>{var D=nn(),Z=o(D);xe(Z,{type:"button",variant:"ghost",onclick:()=>L(z,!e(z)),class:"w-full flex items-center justify-between px-4 py-2 text-sm text-slate-600 dark:text-slate-400 hover:bg-slate-50 dark:hover:bg-slate-800/50 transition-colors",children:(Q,se)=>{var Y=en(),c=be(Y),p=O(c,!0),B=n(c,2);{let ue=_(()=>e(z)?ot:pt);fe(B,{get icon(){return e(ue)},class:"h-3 w-3"})}M(ue=>C(p,ue),[()=>Ce.codeReview_commentThread_suggestedChanges_label()]),i(Q,Y)},$$slots:{default:!0}});var ee=n(Z,2);{var re=Q=>{var se=rn();Ge(se,21,u,Y=>Y.id,(Y,c)=>{var p=tn(),B=o(p),ue=o(B);{let g=_(()=>e(c).type==="user"?Br:Gr),N=_(()=>e(c).type==="user"?"text-blue-600 dark:text-blue-400":"text-purple-600 dark:text-purple-400");fe(ue,{get icon(){return e(g)},get class(){return`h-2.5 w-2.5 ${e(N)??""}`}})}s(B);var Re=n(B,2),t=o(Re),l=o(t);Mt(l,{get content(){return e(c).content},className:"[&>*:first-child]:mt-0 [&>*:last-child]:mb-0"}),s(t),s(Re),s(p),M(()=>He(B,1,`shrink-0 flex h-5 w-5 items-center justify-center rounded-full ${e(c).type==="user"?"bg-blue-100 dark:bg-blue-900/50":"bg-purple-100 dark:bg-purple-900/50"}`)),We(3,p,()=>at,()=>({axis:"y",distance:4,tier:"moderate"})),i(Y,p)}),s(se),We(3,se,()=>Oe,()=>({tier:"moderate"})),i(Q,se)};H(ee,Q=>{e(z)&&Q(re)})}s(D),i(a,D)};H(Se,a=>{e(he)&&a(ye)})}var V=n(Se,2);{var j=a=>{var D=an(),Z=o(D);it(Z,{size:12});var ee=n(Z,2),re=O(ee,!0);s(D),M(Q=>C(re,Q),[()=>Ce.codeReview_commentThread_agentResponding_label()]),i(a,D)};H(V,a=>{J()&&a(j)})}var f=n(V,2),W=o(f);{var F=a=>{var D=sn(),Z=be(D),ee=o(Z);{let c=_(()=>Ce.codeReview_commentThread_followUp_placeholder());Ut(ee,{onkeydown:ae,get placeholder(){return e(c)},get disabled(){return h()},class:"flex-1 h-8 rounded-md border border-border bg-white dark:bg-slate-800 px-3 text-sm placeholder:text-slate-400 disabled:opacity-50",get ref(){return e(de)},set ref(p){L(de,p,!0)},get value(){return e(q)},set value(p){L(q,p,!0)}})}var re=n(ee,2);{let c=_(()=>!e(q).trim()||h());xe(re,{type:"button",variant:"primary",onclick:ce,get disabled(){return e(c)},class:"h-8 w-8 p-0",children:(p,B)=>{var ue=Pt(),Re=be(ue);{var t=g=>{it(g,{size:14})},l=g=>{fe(g,{get icon(){return Wr},class:"h-3 w-3"})};H(Re,g=>{h()?g(t):g(l,-1)})}i(p,ue)},$$slots:{default:!0}})}var Q=n(re,2);xe(Q,{type:"button",variant:"ghost",onclick:()=>{L(w,!1),L(q,"")},class:"h-8 px-2 text-xs text-slate-500 hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-200 transition-colors",children:(c,p)=>{st();var B=et();M(ue=>C(B,ue),[()=>Ce.codeReview_commentThread_cancel_label()]),i(c,B)},$$slots:{default:!0}}),s(Z);var se=n(Z,2),Y=O(se,!0);M(c=>C(Y,c),[()=>Ce.codeReview_commentThread_inputHint_label()]),We(3,Z,()=>Oe,()=>({tier:"fast"})),i(a,D)},le=a=>{xe(a,{type:"button",variant:"ghost",onclick:()=>L(w,!0),class:"flex items-center gap-1.5 text-xs text-emerald-600 dark:text-emerald-400 hover:text-emerald-700 dark:hover:text-emerald-300 transition-colors",children:(D,Z)=>{var ee=on(),re=be(ee);fe(re,{get icon(){return Dr},class:"h-3 w-3"});var Q=n(re,2),se=O(Q,!0);M(Y=>C(se,Y),[()=>Ce.codeReview_commentThread_askQuestion_label()]),i(D,ee)},$$slots:{default:!0}})};H(W,a=>{e(w)?a(F):a(le,-1)})}return s(f),s(_e),M(()=>He(_e,1,`walkthrough-comment-thread relative flex w-full flex-col bg-white shadow-sm dark:bg-slate-900 ${pe()??""}`)),We(3,_e,()=>Oe,()=>({tier:"moderate"})),i($,_e),qe(Ne)}var dn=x('<span class="text-emerald-600 dark:text-emerald-400 font-medium"> </span>'),cn=x('<!> <svg class="h-4 w-4 text-ghost shrink-0" viewBox="0 0 16 16" fill="currentColor"><path d="M3.5 1.5A1.5 1.5 0 0 1 5 0h6a1.5 1.5 0 0 1 1.5 1.5v12A1.5 1.5 0 0 1 11 15H5a1.5 1.5 0 0 1-1.5-1.5v-12zm2 0v12h6v-12H5.5z"></path></svg> <div class="flex items-baseline gap-2 flex-1 min-w-0"><span class="text-sm font-medium text-foreground truncate"> </span> <span class="text-xs text-subtle truncate hidden sm:inline"> </span></div> <div class="flex items-center gap-1 text-xs shrink-0"><!></div>',1),un=x('<div class="px-4 pb-3 -mt-1"><p class="text-sm text-subtle"> </p></div>'),vn=x('<div><div><span class="w-12 px-2 text-right text-ui text-subtle tabular-nums"> </span></div> <span> </span> <pre class="flex-1 px-1 whitespace-pre overflow-hidden text-ellipsis"><code class="hljs"></code></pre></div>'),gn=x('<div class="border-t border-border"><div class="font-mono text-xs leading-relaxed text-muted-foreground"><!> <!></div></div>'),fn=x('<span class="text-subtle">·</span> <!>',1),hn=x('<div class="flex items-center justify-end gap-2 px-3 py-1.5 bg-muted/20 border-b border-border text-xs"><!> <!></div>'),Gt=x("<!> <span> </span> <!>",1),mn=x('<div class="ml-20"><!></div>'),pn=x('<div class="ml-20 border-l-2 border-primary-ink/50 bg-muted/20"><div class="p-3"><!></div></div>'),_n=x('<div><div><span class="w-10 px-2 text-right text-ui text-subtle tabular-nums"> </span> <span class="w-10 px-2 text-right text-ui text-subtle tabular-nums"> </span></div> <span> </span> <div class="flex-1 flex items-center min-w-0 pr-2"><pre class="flex-1 px-1 whitespace-pre overflow-x-auto"><code class="hljs"></code></pre> <!></div></div> <!> <!> <!>',1),xn=x("<!> <!>",1),bn=x('<div class="relative"><!> <div class="overflow-x-auto"><div class="font-mono text-xs leading-relaxed min-w-full"></div></div></div>'),wn=x('<div><div class="flex flex-col border-b border-border"><!> <!></div> <!> <!></div>');function It($,r){if(new.target)return Ke({component:It,...$});Je(r,!0);let d=k(r,"fileName",7),m=k(r,"patch",7),b=k(r,"annotations",23,()=>[]),u=k(r,"initialCollapsed",7,!1),T=k(r,"contextLines",7,3),P=k(r,"onSendMessage",7),h=k(r,"isSending",7,!1),J=k(r,"additions",7,0),K=k(r,"deletions",7,0),pe=k(r,"fileDescription",7,""),q=k(r,"class",7,"");const w=_(()=>Yr(m())),z=_(()=>Rr(d())),de=_(()=>{const t=new Map;return!e(z)||e(z)==="text"||e(z)==="plaintext"||!Bt.getLanguage(e(z))||e(w).forEach(l=>{const g=[];if(l.lines.forEach(N=>{const G=N.content||"",U=`${N.oldNum}-${N.newNum}`;g.push({content:G,key:U})}),g.length!==0)try{const N=g.map(ne=>ne.content).join(`
3
3
  `),U=Bt.highlight(N,{language:e(z)}).value.split(`
4
4
  `);g.forEach((ne,oe)=>{oe<U.length&&t.set(ne.key,U[oe])})}catch(N){console.warn("Failed to highlight hunk:",N)}}),t});let ce=we(mt(u())),ae=we(mt(new Set)),te=we(null);const ke=_(()=>{const t=new Map;for(const l of b()){const g=t.get(l.line)||[];g.push(l),t.set(l.line,g)}return t}),I=_(()=>new Set(b().map(t=>t.line)));function he(t){if(t.type==="deletion")return[];const l=t.newNum;return l==null?[]:e(ke).get(l)||[]}function Ne(t,l,g){if(g.type==="addition"||g.type==="deletion")return!0;const N=g.newNum??g.oldNum;if(N!==null&&e(I).has(N))return!0;const G=e(w)[t];if(!G)return!1;for(let U=Math.max(0,l-T());U<=Math.min(G.lines.length-1,l+T());U++){const ne=G.lines[U];if(ne.type==="addition"||ne.type==="deletion")return!0;const oe=ne.newNum??ne.oldNum;if(oe!==null&&e(I).has(oe))return!0}for(const U of e(ae)){const[ne,oe,ve]=U.split("-").map(Number);if(ne===t&&l>=oe&&l<=ve)return!0}return!1}function _e(t){const l=e(w)[t];if(!l)return[];const g=[];let N=null;for(let G=0;G<l.lines.length;G++){const U=Ne(t,G,l.lines[G]);!U&&N===null?N=G:U&&N!==null&&(g.push({startIndex:N,endIndex:G-1,count:G-N}),N=null)}return N!==null&&g.push({startIndex:N,endIndex:l.lines.length-1,count:l.lines.length-N}),g}function S(t,l,g){const N=`${t}-${l}-${g}`;e(ae).add(N),L(ae,new Set(e(ae)),!0)}function E(){for(let t=0;t<e(w).length;t++){const l=e(w)[t];S(t,0,l.lines.length-1)}}function Ie(){L(ae,new Set,!0)}function me(t){const l=`${t.oldNum}-${t.newNum}`,g=e(de).get(l);return g!==void 0?g:v(t.content||"")}function v(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function R(t){switch(t.type){case"addition":return"bg-emerald-500/5 dark:bg-emerald-500/10";case"deletion":return"bg-red-500/5 dark:bg-red-500/10";default:return""}}function A(t){switch(t.type){case"addition":return"text-emerald-600 dark:text-emerald-400 font-medium";case"deletion":return"text-red-600 dark:text-red-400 font-medium";default:return"text-transparent"}}function X(t){switch(t.type){case"addition":return"+";case"deletion":return"-";default:return" "}}function ie(t){switch(t.type){case"addition":return"bg-emerald-500/10 dark:bg-emerald-500/15";case"deletion":return"bg-red-500/10 dark:bg-red-500/15";default:return"bg-muted/30"}}function $e(){L(ce,!e(ce))}function Se(t){L(te,t,!0)}function ye(){L(te,null)}function V(t,l,g){P()?.(t,l,g),L(te,null)}const j=_(()=>()=>{const t=d().split("/");return t[t.length-1]}),f=_(()=>()=>{const t=d().split("/");return t.length<=1?"":t.slice(0,-1).join("/")}),W=_(()=>{for(let t=0;t<e(w).length;t++)if(_e(t).length>0)return!0;return!1}),F=_(()=>{const l=[];for(let g=0;g<e(w).length&&l.length<3;g++){const N=e(w)[g];for(let G=0;G<N.lines.length&&l.length<3;G++){const U=N.lines[G];(U.type==="addition"||U.type==="deletion")&&l.push({line:U,hunkIndex:g,lineIndex:G})}}return l}),le=_(()=>{let t=0;for(const l of e(w))for(const g of l.lines)(g.type==="addition"||g.type==="deletion")&&t++;return t});let a=we(mt(new Map));function D(t){return`${t.file}:${t.line}:${t.type}`}function Z(t){return e(a).get(D(t))||[]}var ee={get fileName(){return d()},set fileName(t){d(t),y()},get patch(){return m()},set patch(t){m(t),y()},get annotations(){return b()},set annotations(t=[]){b(t),y()},get initialCollapsed(){return u()},set initialCollapsed(t=!1){u(t),y()},get contextLines(){return T()},set contextLines(t=3){T(t),y()},get onSendMessage(){return P()},set onSendMessage(t){P(t),y()},get isSending(){return h()},set isSending(t=!1){h(t),y()},get additions(){return J()},set additions(t=0){J(t),y()},get deletions(){return K()},set deletions(t=0){K(t),y()},get fileDescription(){return pe()},set fileDescription(t=""){pe(t),y()},get class(){return q()},set class(t=""){q(t),y()},$set:Ve,$on:(t,l)=>Ue(r,t,l)},re=wn(),Q=o(re),se=o(Q);xe(se,{type:"button",variant:"ghost",class:"w-full flex items-center gap-2 px-4 py-3 hover:bg-muted/30 transition-colors text-left group",onclick:$e,children:(t,l)=>{var g=cn(),N=be(g);{let Le=_(()=>e(ce)?pt:ot);fe(N,{get icon(){return e(Le)},class:"h-3 w-3 text-ghost shrink-0"})}var G=n(N,4),U=o(G),ne=O(U,!0),oe=n(U,2),ve=O(oe,!0);s(G);var Me=n(G,2),Ae=o(Me);{var De=Le=>{var Ee=dn(),Fe=O(Ee);M(()=>C(Fe,`+${J()+K()}`)),i(Le,Ee)};H(Ae,Le=>{(J()>0||K()>0)&&Le(De)})}s(Me),M((Le,Ee)=>{C(ne,Le),C(ve,Ee)},[()=>e(j)(),()=>e(f)()]),i(t,g)},$$slots:{default:!0}});var Y=n(se,2);{var c=t=>{var l=un(),g=o(l),N=O(g,!0);s(l),M(()=>C(N,pe())),i(t,l)};H(Y,t=>{pe()&&t(c)})}s(Q);var p=n(Q,2);{var B=t=>{var l=gn(),g=o(l),N=o(g);Ge(N,17,()=>e(F),({line:ne,hunkIndex:oe,lineIndex:ve})=>`preview-${oe}-${ve}`,(ne,oe)=>{let ve=()=>e(oe).line;var Me=vn(),Ae=o(Me),De=o(Ae),Le=O(De,!0);s(Ae);var Ee=n(Ae,2),Fe=O(Ee,!0),Te=n(Ee,2),ge=o(Te);Ft(ge,()=>me(ve()),!0),s(ge),s(Te),s(Me),M((Qe,Ye,Xe,tt)=>{He(Me,1,`flex ${Qe??""}`),He(Ae,1,`w-12 shrink-0 flex select-none ${Ye??""} border-r border-border`),C(Le,ve().newNum??ve().oldNum??""),He(Ee,1,`w-5 shrink-0 text-center select-none ${Xe??""}`),C(Fe,tt)},[()=>R(ve()),()=>ie(ve()),()=>A(ve()),()=>X(ve())]),i(ne,Me)});var G=n(N,2);{var U=ne=>{xe(ne,{type:"button",variant:"ghost",class:"w-full py-1.5 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/30 transition-colors text-center",onclick:$e,children:(oe,ve)=>{st();var Me=et();M(Ae=>C(Me,Ae),[()=>Ce.codeReview_fileDiff_moreLines_label({count:e(le)-e(F).length})]),i(oe,Me)},$$slots:{default:!0}})};H(G,ne=>{e(le)>e(F).length&&ne(U)})}s(g),s(l),We(3,l,()=>Oe,()=>({tier:"moderate"})),i(t,l)};H(p,t=>{e(ce)&&e(F).length>0&&t(B)})}var ue=n(p,2);{var Re=t=>{var l=bn(),g=o(l);{var N=ne=>{var oe=hn(),ve=o(oe);xe(ve,{type:"button",variant:"ghost",class:"text-muted-foreground hover:text-foreground transition-colors",onclick:E,children:(De,Le)=>{st();var Ee=et();M(Fe=>C(Ee,Fe),[()=>Ce.codeReview_fileDiff_expandAll_label()]),i(De,Ee)},$$slots:{default:!0}});var Me=n(ve,2);{var Ae=De=>{var Le=fn(),Ee=n(be(Le),2);xe(Ee,{type:"button",variant:"ghost",class:"text-muted-foreground hover:text-foreground transition-colors",onclick:Ie,children:(Fe,Te)=>{st();var ge=et();M(Qe=>C(ge,Qe),[()=>Ce.codeReview_fileDiff_collapse_label()]),i(Fe,ge)},$$slots:{default:!0}}),i(De,Le)};H(Me,De=>{e(ae).size>0&&De(Ae)})}s(oe),i(ne,oe)};H(g,ne=>{e(W)&&ne(N)})}var G=n(g,2),U=o(G);Ge(U,21,()=>e(w),Lt,(ne,oe,ve)=>{const Me=_(()=>_e(ve)),Ae=_(()=>e(Me).find(Te=>Te.startIndex===0));var De=xn(),Le=be(De);{var Ee=Te=>{xe(Te,{type:"button",variant:"ghost",class:"w-full flex items-center justify-center gap-2 py-1.5 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/30 transition-colors border-b border-border",onclick:()=>S(ve,e(Ae).startIndex,e(Ae).endIndex),children:(ge,Qe)=>{var Ye=Gt(),Xe=be(Ye);fe(Xe,{get icon(){return ot},class:"h-2.5 w-2.5"});var tt=n(Xe,2),xt=O(tt,!0),rt=n(tt,2);fe(rt,{get icon(){return ot},class:"h-2.5 w-2.5"}),M(ut=>C(xt,ut),[()=>Ce.codeReview_fileDiff_showHidden_label({count:e(Ae).count})]),i(ge,Ye)},$$slots:{default:!0}})};H(Le,Te=>{e(Ae)&&Te(Ee)})}var Fe=n(Le,2);Ge(Fe,19,()=>e(oe).lines,(Te,ge)=>`${ve}-${ge}`,(Te,ge,Qe)=>{const Ye=_(()=>`${e(ge).oldNum}-${e(ge).newNum}`),Xe=_(()=>he(e(ge))),tt=_(()=>e(te)===e(Ye)),xt=_(()=>Ne(ve,e(Qe),e(ge))),rt=_(()=>e(Me).find(lt=>lt.startIndex===e(Qe)+1));var ut=Pt(),er=be(ut);{var tr=lt=>{var At=_n(),vt=be(At),gt=o(vt),Et=o(gt),rr=O(Et,!0),nr=n(Et,2),ar=O(nr,!0);s(gt);var bt=n(gt,2),sr=O(bt,!0),Ht=n(bt,2),wt=o(Ht),zt=o(wt);Ft(zt,()=>me(e(ge)),!0),s(zt),s(wt);var or=n(wt,2);{var ir=Pe=>{{let ze=_(()=>Ce.codeReview_fileDiff_askLine_tooltip());xe(Pe,{type:"button",variant:"ghost",size:"icon-compact",iconOnly:!0,class:"size-5 opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-primary-ink transition-all shrink-0",onclick:()=>Se(e(Ye)),get title(){return e(ze)},children:(je,Be)=>{fe(je,{get icon(){return St}})},$$slots:{default:!0}})}};H(or,Pe=>{P()&&Pe(ir)})}s(Ht),s(vt);var Wt=n(vt,2);Ge(Wt,19,()=>e(Xe),(Pe,ze)=>`${Pe.line}-${ze}`,(Pe,ze)=>{var je=mn(),Be=o(je);{let nt=_(()=>e(ge).newNum??e(ge).oldNum??0),ft=_(()=>Z(e(ze)));qt(Be,{get annotation(){return e(ze)},get lineNumber(){return e(nt)},get fileName(){return d()},get messages(){return e(ft)},onSendMessage:(kt,yt,$t)=>V(kt,yt,$t),get isSending(){return h()}})}s(je),We(3,je,()=>Oe,()=>({tier:"moderate"})),i(Pe,je)});var Dt=n(Wt,2);{var lr=Pe=>{var ze=pn(),je=o(ze),Be=o(je);{let nt=_(()=>e(ge).newNum??e(ge).oldNum??0);Jt(Be,{get lineNumber(){return e(nt)},get fileName(){return d()},onSend:V,onClose:ye,get isSending(){return h()}})}s(je),s(ze),i(Pe,ze)};H(Dt,Pe=>{e(tt)&&e(Xe).length===0&&Pe(lr)})}var dr=n(Dt,2);{var cr=Pe=>{xe(Pe,{type:"button",variant:"ghost",class:"w-full flex items-center justify-center gap-2 py-1.5 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/30 transition-colors border-y border-border bg-muted/10",onclick:()=>S(ve,e(rt).startIndex,e(rt).endIndex),children:(ze,je)=>{var Be=Gt(),nt=be(Be);fe(nt,{get icon(){return St},class:"h-2.5 w-2.5"});var ft=n(nt,2),kt=O(ft,!0),yt=n(ft,2);fe(yt,{get icon(){return St},class:"h-2.5 w-2.5"}),M($t=>C(kt,$t),[()=>Ce.codeReview_fileDiff_showHidden_label({count:e(rt).count})]),i(ze,Be)},$$slots:{default:!0}})};H(dr,Pe=>{e(rt)&&Pe(cr)})}M((Pe,ze,je,Be)=>{He(vt,1,`group flex ${Pe??""} hover:bg-accent/30 transition-colors`),He(gt,1,`w-20 shrink-0 flex select-none ${ze??""} border-r border-border`),C(rr,e(ge).oldNum??""),C(ar,e(ge).newNum??""),He(bt,1,`w-5 shrink-0 text-center select-none ${je??""}`),C(sr,Be)},[()=>R(e(ge)),()=>ie(e(ge)),()=>A(e(ge)),()=>X(e(ge))]),i(lt,At)};H(er,lt=>{e(xt)&&lt(tr)})}i(Te,ut)}),i(ne,De)}),s(U),s(G),s(l),We(3,l,()=>Oe,()=>({tier:"moderate"})),i(t,l)};H(ue,t=>{e(ce)||t(Re)})}return s(re),M(()=>He(re,1,`walkthrough-file-diff overflow-hidden bg-card ${q()??""}`)),i($,re),qe(ee)}var kn=x('<div class="flex items-start gap-3"><div class="shrink-0 mt-0.5"><svg viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M2 6a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1H8a3 3 0 00-3 3v1.5a1.5 1.5 0 01-3 0V6z" clip-rule="evenodd"></path><path d="M6 12a2 2 0 012-2h8a2 2 0 012 2v2a2 2 0 01-2 2H2h2a2 2 0 002-2v-2z"></path></svg></div> <div class="flex-1 min-w-0"><h4 class="text-sm font-medium text-foreground line-clamp-2"> </h4> <p class="text-xs text-subtle mt-1 line-clamp-2"> </p> <div class="flex items-center gap-1 mt-2 text-xs text-subtle"><svg class="h-3.5 w-3.5" viewBox="0 0 16 16" fill="currentColor"><path d="M3.5 1.5A1.5 1.5 0 0 1 5 0h6a1.5 1.5 0 0 1 1.5 1.5v12A1.5 1.5 0 0 1 11 15H5a1.5 1.5 0 0 1-1.5-1.5v-12z"></path></svg> <span> </span></div></div></div>'),yn=x('<div><div class="mb-4"><h3 class="text-sm font-medium text-subtle"> </h3></div> <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3"></div></div>');function Qt($,r){if(new.target)return Ke({component:Qt,...$});Je(r,!0);let d=k(r,"categories",7),m=k(r,"onCategoryClick",7),b=k(r,"class",7,"");function u(w){const z=["bg-blue-500/10 border-blue-500/30 hover:border-blue-500/50","bg-purple-500/10 border-purple-500/30 hover:border-purple-500/50","bg-emerald-500/10 border-emerald-500/30 hover:border-emerald-500/50","bg-warning/10 border-warning/30 hover:border-warning/30","bg-rose-500/10 border-rose-500/30 hover:border-rose-500/50","bg-cyan-500/10 border-cyan-500/30 hover:border-cyan-500/50"];return z[w%z.length]}function T(w){const z=["text-blue-500","text-purple-500","text-emerald-500","text-warning-ink","text-rose-500","text-cyan-500"];return z[w%z.length]}var P={get categories(){return d()},set categories(w){d(w),y()},get onCategoryClick(){return m()},set onCategoryClick(w){m(w),y()},get class(){return b()},set class(w=""){b(w),y()},$set:Ve,$on:(w,z)=>Ue(r,w,z)},h=yn(),J=o(h),K=o(J),pe=O(K,!0);s(J);var q=n(J,2);return Ge(q,21,d,Lt,(w,z,de)=>{{let ce=_(()=>u(de));xe(w,{type:"button",variant:"ghost",get class(){return`text-left p-4 rounded-lg border transition-all duration-spring-moderate ease-spring-moderate motion-reduce:transition-none ${e(ce)??""}`},onclick:()=>m()?.(de),children:(ae,te)=>{var ke=kn(),I=o(ke),he=O(I),Ne=n(I,2),_e=o(Ne),S=O(_e,!0),E=n(_e,2),Ie=O(E,!0),me=n(E,2),v=n(o(me),2),R=O(v,!0);s(me),s(Ne),s(ke),M((A,X)=>{He(he,0,`h-5 w-5 ${A??""}`),C(S,e(z).title),C(Ie,e(z).description),C(R,X)},[()=>T(de),()=>e(z).files.length===1?Ce.codeReview_categoriesGrid_fileCount_one({count:e(z).files.length}):Ce.codeReview_categoriesGrid_fileCount_many({count:e(z).files.length})]),i(ae,ke)},$$slots:{default:!0}})}}),s(q),s(h),M(w=>{He(h,1,`walkthrough-categories-grid ${b()??""}`),C(pe,w)},[()=>Ce.codeReview_categoriesGrid_whatChanged_title()]),i($,h),qe(P)}var $n=x('<div class="w-0.5 flex-1 bg-border min-h-5"></div>'),Sn=x('<p class="text-sm text-subtle mt-2"> </p>'),Cn=x('<div class="rounded-lg border border-border bg-card p-4"><div class="flex items-center gap-2"><svg class="h-4 w-4 text-ghost" viewBox="0 0 16 16" fill="currentColor"><path d="M3.5 1.5A1.5 1.5 0 0 1 5 0h6a1.5 1.5 0 0 1 1.5 1.5v12A1.5 1.5 0 0 1 11 15H5a1.5 1.5 0 0 1-1.5-1.5v-12z"></path></svg> <span class="text-sm font-medium text-foreground"> </span></div> <!></div>'),Nn=x('<div class="flex gap-4"><div class="relative flex flex-col items-center w-3"><div></div> <div class="absolute top-4 w-2 h-2 rounded-full bg-muted-foreground/30 ring-2 ring-background"></div></div> <div class="flex-1 min-w-0 pb-4"><!></div></div>'),Rn=x('<div><div class="flex items-start gap-4 mb-4"><div class="relative flex flex-col items-center"><div></div> <!></div> <div class="flex-1 min-w-0 -mt-0.5"><h3 class="text-base font-semibold text-foreground"> </h3> <p class="text-sm text-subtle mt-1"> </p></div></div> <div class="relative"></div></div>');function Yt($,r){if(new.target)return Ke({component:Yt,...$});Je(r,!0);let d=k(r,"category",7),m=k(r,"categoryIndex",7),b=k(r,"filePatchMap",7),u=k(r,"isLast",7,!1),T=k(r,"onSendMessage",7),P=k(r,"isSending",7,!1),h=k(r,"class",7,"");function J(S){const E=["bg-blue-500","bg-purple-500","bg-emerald-500","bg-warning","bg-rose-500","bg-cyan-500"];return E[S%E.length]}const K=_(()=>d().files.map(S=>{const E=b().get(S.path);return{...S,patch:E?.patch,additions:E?.additions??0,deletions:E?.deletions??0}}));var pe={get category(){return d()},set category(S){d(S),y()},get categoryIndex(){return m()},set categoryIndex(S){m(S),y()},get filePatchMap(){return b()},set filePatchMap(S){b(S),y()},get isLast(){return u()},set isLast(S=!1){u(S),y()},get onSendMessage(){return T()},set onSendMessage(S){T(S),y()},get isSending(){return P()},set isSending(S=!1){P(S),y()},get class(){return h()},set class(S=""){h(S),y()},$set:Ve,$on:(S,E)=>Ue(r,S,E)},q=Rn(),w=o(q),z=o(w),de=o(z),ce=n(de,2);{var ae=S=>{var E=$n();i(S,E)};H(ce,S=>{(!u()||e(K).length>0)&&S(ae)})}s(z);var te=n(z,2),ke=o(te),I=O(ke,!0),he=n(ke,2),Ne=O(he,!0);s(te),s(w);var _e=n(w,2);return Ge(_e,23,()=>e(K),(S,E)=>`${m()}-${E}`,(S,E,Ie)=>{var me=Nn(),v=o(me),R=o(v);st(2),s(v);var A=n(v,2),X=o(A);{var ie=Se=>{It(Se,{get fileName(){return e(E).path},get patch(){return e(E).patch},get annotations(){return e(E).annotations},get additions(){return e(E).additions},get deletions(){return e(E).deletions},get fileDescription(){return e(E).summary},get onSendMessage(){return T()},get isSending(){return P()},class:"rounded-lg border border-border overflow-hidden"})},$e=Se=>{var ye=Cn(),V=o(ye),j=n(o(V),2),f=O(j,!0);s(V);var W=n(V,2);{var F=le=>{var a=Sn(),D=O(a,!0);M(()=>C(D,e(E).summary)),i(le,a)};H(W,le=>{e(E).summary&&le(F)})}s(ye),M(()=>C(f,e(E).path)),i(Se,ye)};H(X,Se=>{e(E).patch?Se(ie):Se($e,-1)})}s(A),s(me),M(()=>He(R,1,`w-0.5 flex-1 bg-border ${e(Ie)===e(K).length-1&&u()?"h-1/2":""}`)),i(S,me)}),s(_e),s(q),M(S=>{He(q,1,`walkthrough-category-section ${h()??""}`),Er(q,"id",`category-${m()??""}`),He(de,1,`w-3 h-3 rounded-full ${S??""} ring-4 ring-background shrink-0`),C(I,d().title),C(Ne,d().description)},[()=>J(m())]),i($,q),qe(pe)}var Mn=x('<!> <!> <span class="text-sm font-medium"> </span> <!>',1),Pn=x('<div class="flex items-center gap-2 text-sm text-subtle py-2"><!> <span> </span></div>'),Ot=x("<!> ",1),Ln=x('<div class="rounded-lg bg-danger-background/10 border border-danger/20 p-4"><p class="text-sm text-danger"> </p> <!></div>'),In=x('<h2 class="text-lg font-semibold text-foreground"> </h2>'),An=x('<p class="text-sm text-subtle italic"> </p>'),Kt=x("<div><!></div>"),En=x('<div class="space-y-8 pt-4"></div>'),Hn=x('<!> <!> <span class="text-sm font-medium text-subtle"> </span>',1),zn=x('<div class="space-y-3 pt-2"></div>'),Wn=x('<div class="pt-4 border-t border-border"><!> <!></div>'),Dn=x('<div class="flex justify-end pt-2"><!></div>'),Tn=x('<div class="space-y-6"><!> <!> <!> <!> <!> <!></div>'),jn=x('<div class="px-4 pb-4"><!> <!> <!></div>'),Fn=x('<div class="border-t border-border"><!> <!></div>');function Xt($,r){if(new.target)return Ke({component:Xt,...$});Je(r,!0);let d=k(r,"walkthrough",7),m=k(r,"status",7),b=k(r,"workspaceId",7),u=k(r,"error",7,""),T=k(r,"workspacePath",7),P=k(r,"changes",23,()=>[]),h=k(r,"onSendMessage",7),J=k(r,"isSending",7,!1),K=k(r,"onRegenerate",7),pe=k(r,"showCategoriesGrid",7,!0);const q=_(()=>m()==="running"),w=_(()=>m()==="complete"),z=_(()=>!!u());let de=we(!0),ce=we(!1),ae=we(mt(new Map));const te=_(()=>{if(d()?.categories&&d().categories.length>0)return d().categories;if(d()?.annotations&&d().annotations.length>0){const v=new Map;for(const R of d().annotations){const A=v.get(R.file)||[];A.push(R),v.set(R.file,A)}return[{title:d().title,description:d().overview,files:Array.from(v.entries()).map(([R,A])=>({path:R,annotations:A.sort((X,ie)=>X.line-ie.line)}))}]}return[]}),ke=_(()=>{if(!d()?.annotations)return new Map;const v=new Map;for(const R of d().annotations){const A=v.get(R.file)||[];A.push(R),v.set(R.file,A)}for(const[R,A]of v)v.set(R,A.sort((X,ie)=>X.line-ie.line));return v}),I=_(()=>{const v=new Set;for(const R of e(te))for(const A of R.files)v.add(A.path);for(const R of e(ke).keys())v.add(R);return v}),he=_(()=>P().filter(v=>!e(I).has(v.relativePath)));Ze(()=>{if(!d()||!T())return;const v=new Set([...e(I),...e(he).map(R=>R.relativePath)]);for(const R of v)e(ae).has(R)||Ur(b(),!0,R).then(A=>{if(A&&A.oldContent!==void 0&&A.newContent!==void 0){const X=Ne(R,A.oldContent,A.newContent);if(X){const ie=P().find($e=>$e.relativePath===R);e(ae).set(R,{patch:X,additions:ie?.stats?.additions??0,deletions:ie?.stats?.deletions??0}),L(ae,new Map(e(ae)),!0)}}}).catch(A=>{console.warn(`Failed to load diff for ${R}:`,A)})});function Ne(v,R,A){const X=R.split(`