@intent-hq/web 2.292.0 → 2.292.2

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 (250) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/assets/0.DvlMYzZB.css +1 -0
  3. package/web/app/immutable/assets/5.DBgC2kSL.css +1 -0
  4. package/web/app/immutable/chunks/{o8OJf27v.js → -g6HPSpm.js} +1 -1
  5. package/web/app/immutable/chunks/{D0FrwYUQ.js → 06CP606v.js} +1 -1
  6. package/web/app/immutable/chunks/{DHSIOEln.js → 0c_MAvHq.js} +1 -1
  7. package/web/app/immutable/chunks/{BUN1yF1L.js → 0icrH9cf.js} +1 -1
  8. package/web/app/immutable/chunks/{BgntEy_5.js → 0k-rvyGo.js} +1 -1
  9. package/web/app/immutable/chunks/{aLb41s5K.js → 4gO2zcBv.js} +1 -1
  10. package/web/app/immutable/chunks/{l7ze94qr.js → 5SjfvWPi.js} +1 -1
  11. package/web/app/immutable/chunks/{Bp70Vk4U.js → 755iX0_8.js} +1 -1
  12. package/web/app/immutable/chunks/{BXWlOAyO.js → 9-D0Q0S6.js} +1 -1
  13. package/web/app/immutable/chunks/{BW3vrEnw.js → 9Pov1PHF.js} +5 -5
  14. package/web/app/immutable/chunks/{C2-6X3Z3.js → B4pPTpp_.js} +2 -2
  15. package/web/app/immutable/chunks/{Bgg-wBTF.js → B5GamWhx.js} +1 -1
  16. package/web/app/immutable/chunks/{HECvQSCC.js → B6FrmuSL.js} +1 -1
  17. package/web/app/immutable/chunks/{a-vNpAtT.js → B6ZWdQk3.js} +1 -1
  18. package/web/app/immutable/chunks/{DhMj2plM.js → B6mMXRA1.js} +1 -1
  19. package/web/app/immutable/chunks/{DshT-ERa.js → B6rxT1rd.js} +1 -1
  20. package/web/app/immutable/chunks/B7gOkTaS.js +324 -0
  21. package/web/app/immutable/chunks/{DDghWae5.js → B8W3GGYq.js} +1 -1
  22. package/web/app/immutable/chunks/{DP7kbgS0.js → B982JlpQ.js} +1 -1
  23. package/web/app/immutable/chunks/{BrbLiL_x.js → B9UcZ8hB.js} +1 -1
  24. package/web/app/immutable/chunks/{gjFD8LCr.js → BAAkmbP1.js} +1 -1
  25. package/web/app/immutable/chunks/{C4WMSxMK.js → BBW6O_MW.js} +1 -1
  26. package/web/app/immutable/chunks/{CdL46F2Z.js → BCX3VjTL.js} +1 -1
  27. package/web/app/immutable/chunks/{Cppe-wSX.js → BDfuDlh3.js} +1 -1
  28. package/web/app/immutable/chunks/{CXbFPa4P.js → BGJxMF_1.js} +1 -1
  29. package/web/app/immutable/chunks/{CmtSXIlz.js → BJ9BJ5kr.js} +1 -1
  30. package/web/app/immutable/chunks/{QwMkFOLD.js → BL2SnmmN.js} +1 -1
  31. package/web/app/immutable/chunks/{C4tLIUi-.js → BMURLuFo.js} +1 -1
  32. package/web/app/immutable/chunks/{GM1mBWt-.js → BMigEFDf.js} +1 -1
  33. package/web/app/immutable/chunks/{IoeO06yf.js → BNUfRoau.js} +1 -1
  34. package/web/app/immutable/chunks/{BE4lD4BS.js → BNaYrmBt.js} +1 -1
  35. package/web/app/immutable/chunks/{CWhinB9Y.js → BNmJe_fB.js} +12 -12
  36. package/web/app/immutable/chunks/{Bn8I_2eM.js → BNyX9jNr.js} +1 -1
  37. package/web/app/immutable/chunks/{xgWQsr-g.js → BOeezh42.js} +3 -3
  38. package/web/app/immutable/chunks/{1gqakjEk.js → BPKxTIFu.js} +1 -1
  39. package/web/app/immutable/chunks/{9a62qcQ7.js → BQnKtOqS.js} +1 -1
  40. package/web/app/immutable/chunks/{ClioxoZj.js → BS6j7OE5.js} +1 -1
  41. package/web/app/immutable/chunks/{h3ky2Xtl.js → BSkHzXor.js} +1 -1
  42. package/web/app/immutable/chunks/{3Y9y-sdV.js → BUYS7rif.js} +1 -1
  43. package/web/app/immutable/chunks/{BHNxqf_R.js → BUlvUEKW.js} +1 -1
  44. package/web/app/immutable/chunks/{DCuB-wUt.js → BVMJedK4.js} +1 -1
  45. package/web/app/immutable/chunks/{D7_sioj1.js → BW2PW2g6.js} +1 -1
  46. package/web/app/immutable/chunks/{h1uEjX6Q.js → BWg4csX2.js} +1 -1
  47. package/web/app/immutable/chunks/{DKmM0bqR.js → BZQ9g1LX.js} +1 -1
  48. package/web/app/immutable/chunks/{B2hdZBro.js → BZk3o0D4.js} +1 -1
  49. package/web/app/immutable/chunks/{Tbbe1dbh.js → BZzTwe10.js} +1 -1
  50. package/web/app/immutable/chunks/{BFY-b65a.js → Ba8-1FHo.js} +1 -1
  51. package/web/app/immutable/chunks/{Uc38XdXI.js → BaPbYStu.js} +1 -1
  52. package/web/app/immutable/chunks/{DNMw7H4R.js → BaT1EUX1.js} +1 -1
  53. package/web/app/immutable/chunks/{BaqlfWKa.js → Bal--q4v.js} +1 -1
  54. package/web/app/immutable/chunks/{47q6TsqV.js → BaqTNCTY.js} +7 -7
  55. package/web/app/immutable/chunks/{BLqH6j99.js → BcYgPYED.js} +1 -1
  56. package/web/app/immutable/chunks/{DWGee_yL.js → Bh9BKMsM.js} +1 -1
  57. package/web/app/immutable/chunks/{DWQ1jwFW.js → Bi_XhyyE.js} +1 -1
  58. package/web/app/immutable/chunks/{fqEAyqsN.js → BluiuFfy.js} +1 -1
  59. package/web/app/immutable/chunks/{Cowgfae1.js → Bo_2xd9j.js} +1 -1
  60. package/web/app/immutable/chunks/{CgjVDtx1.js → BpHN1kIK.js} +1 -1
  61. package/web/app/immutable/chunks/{4tDE6wja.js → BqJBJZqA.js} +1 -1
  62. package/web/app/immutable/chunks/{CKHgkzsh.js → Bqm96CUD.js} +1 -1
  63. package/web/app/immutable/chunks/{B-68oH2S.js → BrBBHBKk.js} +1 -1
  64. package/web/app/immutable/chunks/{DI0BmYmu.js → BsXlY_j6.js} +1 -1
  65. package/web/app/immutable/chunks/{DUgG-2k6.js → Bsr5f7H7.js} +1 -1
  66. package/web/app/immutable/chunks/{D44dgkjW.js → BtOZE8-p.js} +2 -2
  67. package/web/app/immutable/chunks/{B-dUAUrx.js → Btm5xkvu.js} +1 -1
  68. package/web/app/immutable/chunks/{LldlwJUi.js → Bvl8Oxba.js} +1 -1
  69. package/web/app/immutable/chunks/{C99wXtMe.js → BxlgI-wG.js} +1 -1
  70. package/web/app/immutable/chunks/{B5iywc0c.js → BzlGto81.js} +1 -1
  71. package/web/app/immutable/chunks/{DsSlZ8Hs.js → C16OaEIp.js} +1 -1
  72. package/web/app/immutable/chunks/{RKlkXviB.js → C1QeO17D.js} +1 -1
  73. package/web/app/immutable/chunks/{CekHYIsk.js → C2FQclZr.js} +1 -1
  74. package/web/app/immutable/chunks/{BSwJfQ4v.js → C3frK44m.js} +1 -1
  75. package/web/app/immutable/chunks/{DKaqc51P.js → C5mI5hjq.js} +1 -1
  76. package/web/app/immutable/chunks/{BGSYASTg.js → C6Oo8BXq.js} +1 -1
  77. package/web/app/immutable/chunks/{DGzLoy-z.js → C6e-2qm-.js} +1 -1
  78. package/web/app/immutable/chunks/{D0lwnaH3.js → C7GMlsQo.js} +1 -1
  79. package/web/app/immutable/chunks/{n50bwg6w.js → C7MuVaSF.js} +2 -2
  80. package/web/app/immutable/chunks/{Duw-IZjh.js → CB-ZN9Uq.js} +1 -1
  81. package/web/app/immutable/chunks/{BnQ8VATH.js → CBgR5nXI.js} +1 -1
  82. package/web/app/immutable/chunks/{BRCenWT1.js → CCXwqeRn.js} +1 -1
  83. package/web/app/immutable/chunks/{DQ0fhYWC.js → CDBtKfA5.js} +1 -1
  84. package/web/app/immutable/chunks/{DkZNeDFv.js → CDKc6BIg.js} +1 -1
  85. package/web/app/immutable/chunks/{BGhLlR2Z.js → CFniM5qB.js} +1 -1
  86. package/web/app/immutable/chunks/{BekOxliD.js → CGhxkrID.js} +1 -1
  87. package/web/app/immutable/chunks/{C2v5W_yU.js → CIJAu6bi.js} +1 -1
  88. package/web/app/immutable/chunks/{BjdiF3NU.js → CJ5pAPpY.js} +1 -1
  89. package/web/app/immutable/chunks/{DvbSI76r.js → CJcny7E2.js} +2 -2
  90. package/web/app/immutable/chunks/{CsY3AFxY.js → CJhyAq2H.js} +1 -1
  91. package/web/app/immutable/chunks/{DRKAw6pI.js → CJpj7lk7.js} +1 -1
  92. package/web/app/immutable/chunks/{B4RPI3PE.js → CKJsoFTP.js} +1 -1
  93. package/web/app/immutable/chunks/{H0XHH9Lx.js → CKcgUe6r.js} +1 -1
  94. package/web/app/immutable/chunks/{xO5nwwWo.js → CKxaBxPr.js} +1 -1
  95. package/web/app/immutable/chunks/{CyFgel5k.js → CLfThpJq.js} +1 -1
  96. package/web/app/immutable/chunks/{DYFkelx6.js → CLfafQTB.js} +1 -1
  97. package/web/app/immutable/chunks/{B3HK-q5A.js → CNIQVMU4.js} +1 -1
  98. package/web/app/immutable/chunks/{Bc_8WxDl.js → CN_OP-b-.js} +1 -1
  99. package/web/app/immutable/chunks/{DBNNnuPG.js → CWD3GqNk.js} +1 -1
  100. package/web/app/immutable/chunks/{bHHGnVsz.js → CWt47ruh.js} +1 -1
  101. package/web/app/immutable/chunks/{BhHMVKkK.js → CXUQsTIM.js} +1 -1
  102. package/web/app/immutable/chunks/CXhBPURx.js +1 -0
  103. package/web/app/immutable/chunks/{B5F8O-gO.js → C_8YlGDA.js} +1 -1
  104. package/web/app/immutable/chunks/{BvW_0loN.js → C_km1Zzs.js} +1 -1
  105. package/web/app/immutable/chunks/{DVnaYm9M.js → CaYE_9eh.js} +1 -1
  106. package/web/app/immutable/chunks/{C4QILlBJ.js → Cc7prgX7.js} +1 -1
  107. package/web/app/immutable/chunks/{CNx8jMag.js → CduLLDtl.js} +3 -3
  108. package/web/app/immutable/chunks/{CRhEb0yi.js → Cim0jDEO.js} +3 -3
  109. package/web/app/immutable/chunks/{CUtP3PhY.js → CjWNs3hA.js} +1 -1
  110. package/web/app/immutable/chunks/{D7mzoI7P.js → Cn8FrGio.js} +1 -1
  111. package/web/app/immutable/chunks/{DyJ_15yQ.js → CpvtLd5_.js} +1 -1
  112. package/web/app/immutable/chunks/{s0Q29iiv.js → CqMkgp96.js} +1 -1
  113. package/web/app/immutable/chunks/{Corw6Jrh.js → CrDYXSjm.js} +1 -1
  114. package/web/app/immutable/chunks/{BTkrC1UW.js → CsL35l_T.js} +1 -1
  115. package/web/app/immutable/chunks/{-GL8Xg-u.js → CsQ2FSIs.js} +1 -1
  116. package/web/app/immutable/chunks/{DsD7VXOH.js → CttvdLl2.js} +1 -1
  117. package/web/app/immutable/chunks/{W4t3dmSv.js → Cugu1F8N.js} +1 -1
  118. package/web/app/immutable/chunks/{C5vF3pAx.js → CvPs_8UD.js} +1 -1
  119. package/web/app/immutable/chunks/{YNqVM6Pn.js → Cxik8d0T.js} +1 -1
  120. package/web/app/immutable/chunks/{CabEUy8J.js → Cyt8YDgF.js} +1 -1
  121. package/web/app/immutable/chunks/{BL9BSWt_.js → D08_U0B1.js} +1 -1
  122. package/web/app/immutable/chunks/{Bw0bJwpw.js → D0pB9PrJ.js} +1 -1
  123. package/web/app/immutable/chunks/{lbGH4X3r.js → D2avzeRb.js} +1 -1
  124. package/web/app/immutable/chunks/{DhCIIOya.js → D3DoEc8v.js} +1 -1
  125. package/web/app/immutable/chunks/{BEsSRpwf.js → D3RlZ9WF.js} +1 -1
  126. package/web/app/immutable/chunks/{Vj7OREkP.js → D4YIggqT.js} +1 -1
  127. package/web/app/immutable/chunks/{DDI0uI_H.js → D5sJ2bUJ.js} +1 -1
  128. package/web/app/immutable/chunks/{Cal0nWOf.js → D74BjVjF.js} +1 -1
  129. package/web/app/immutable/chunks/{DBLawIp_.js → D74IXn65.js} +1 -1
  130. package/web/app/immutable/chunks/{Cxk1hw1U.js → D7n0G88C.js} +1 -1
  131. package/web/app/immutable/chunks/{BHL5MsfB.js → D8yPtwVB.js} +1 -1
  132. package/web/app/immutable/chunks/{Bqwi0BWF.js → DBUouGIr.js} +1 -1
  133. package/web/app/immutable/chunks/{DOVovLIq.js → DCKEIO-U.js} +1 -1
  134. package/web/app/immutable/chunks/{B-gmfAcJ.js → DEiZJ0yd.js} +1 -1
  135. package/web/app/immutable/chunks/{DRkmccaa.js → DFA3yOc-.js} +1 -1
  136. package/web/app/immutable/chunks/{D_J63Zyl.js → DFlL22UR.js} +2 -2
  137. package/web/app/immutable/chunks/{BrMgU118.js → DH6mjHQD.js} +1 -1
  138. package/web/app/immutable/chunks/DHqL-9TB.js +1 -0
  139. package/web/app/immutable/chunks/DIZ4FVb2.js +18 -0
  140. package/web/app/immutable/chunks/{DUl0e4O4.js → DInKHbl0.js} +1 -1
  141. package/web/app/immutable/chunks/{DtYBp20I.js → DLpUeiQt.js} +1 -1
  142. package/web/app/immutable/chunks/{CwQ4F1Ab.js → DLuzW_sw.js} +1 -1
  143. package/web/app/immutable/chunks/{kslXii-P.js → DMsHebUD.js} +1 -1
  144. package/web/app/immutable/chunks/{Bi0GbwSO.js → DOIfYJL0.js} +1 -1
  145. package/web/app/immutable/chunks/{Dn9JK5a2.js → DOiAjI4X.js} +1 -1
  146. package/web/app/immutable/chunks/{CFBVUms-.js → DPXetxx7.js} +1 -1
  147. package/web/app/immutable/chunks/{BZNhUzh7.js → DPgIFT9a.js} +1 -1
  148. package/web/app/immutable/chunks/{qiHCX_SZ.js → DRXZKet6.js} +1 -1
  149. package/web/app/immutable/chunks/{73DumGL9.js → DU55s1te.js} +1 -1
  150. package/web/app/immutable/chunks/{BRyWfrpo.js → DULsS44V.js} +1 -1
  151. package/web/app/immutable/chunks/{C9iz-mkw.js → DV_kwNjV.js} +1 -1
  152. package/web/app/immutable/chunks/{BcLb4U6k.js → DV_mjaDS.js} +1 -1
  153. package/web/app/immutable/chunks/{wozemaTW.js → DXt4bqo0.js} +3 -3
  154. package/web/app/immutable/chunks/{CW4guVPa.js → DYc78UPr.js} +1 -1
  155. package/web/app/immutable/chunks/{ZWPXcFOT.js → DZEyizFV.js} +1 -1
  156. package/web/app/immutable/chunks/{CeOSarF3.js → DbIzlA5K.js} +1 -1
  157. package/web/app/immutable/chunks/{Xj89EZIy.js → DbR25MIl.js} +1 -1
  158. package/web/app/immutable/chunks/{CvLqwfko.js → Dc9RwHk1.js} +1 -1
  159. package/web/app/immutable/chunks/{BDaXmtmH.js → DcDNc2X4.js} +1 -1
  160. package/web/app/immutable/chunks/{C3J1SYpT.js → DdRUG063.js} +1 -1
  161. package/web/app/immutable/chunks/{CIP1ZfWd.js → DdaG7Cca.js} +2 -2
  162. package/web/app/immutable/chunks/{BA_vIobR.js → DdkpKwl0.js} +1 -1
  163. package/web/app/immutable/chunks/{ClCKezvS.js → DeCG5uo6.js} +2 -2
  164. package/web/app/immutable/chunks/{BJrl0upY.js → DeVZOPW7.js} +1 -1
  165. package/web/app/immutable/chunks/{CFvkwWFr.js → DeimPXf2.js} +1 -1
  166. package/web/app/immutable/chunks/{CehXkbc-.js → Df4yP1J2.js} +1 -1
  167. package/web/app/immutable/chunks/{Cm5CZ7YY.js → Dg6tVjEn.js} +1 -1
  168. package/web/app/immutable/chunks/{ZvX5e3AH.js → Dg93Tv7B.js} +1 -1
  169. package/web/app/immutable/chunks/{Du8OSMBA.js → DgtWaWFZ.js} +1 -1
  170. package/web/app/immutable/chunks/{CRtL6sYK.js → Dh1NyToj.js} +1 -1
  171. package/web/app/immutable/chunks/{lr5ofxhO.js → Dh9qgtqK.js} +1 -1
  172. package/web/app/immutable/chunks/{C1YheCPG.js → DhkHgLRA.js} +1 -1
  173. package/web/app/immutable/chunks/{DHfLNRUe.js → Di18wyjg.js} +1 -1
  174. package/web/app/immutable/chunks/{DB0od0be.js → DiGqo-KH.js} +1 -1
  175. package/web/app/immutable/chunks/{D2Fb9aao.js → Djt5RN4M.js} +1 -1
  176. package/web/app/immutable/chunks/{C6yKW00v.js → DkwBacqz.js} +1 -1
  177. package/web/app/immutable/chunks/{9RsJ-LA0.js → Dky-2Jfq.js} +1 -1
  178. package/web/app/immutable/chunks/{Bebubi_u.js → DkzDjzB9.js} +2 -2
  179. package/web/app/immutable/chunks/{an5t-R7s.js → Dl-1cK26.js} +1 -1
  180. package/web/app/immutable/chunks/{Dj03b8fr.js → DlWNLllN.js} +1 -1
  181. package/web/app/immutable/chunks/{VIItGFPL.js → Dn1B9mMU.js} +3 -3
  182. package/web/app/immutable/chunks/{BGFHZ0Gn.js → DofGY-1I.js} +1 -1
  183. package/web/app/immutable/chunks/{y6VRBo2M.js → DuQHnwpD.js} +1 -1
  184. package/web/app/immutable/chunks/{CDGvuOsQ.js → Dw1YkpRi.js} +1 -1
  185. package/web/app/immutable/chunks/{D3jsqDWq.js → DyWVLmAp.js} +1 -1
  186. package/web/app/immutable/chunks/{CtFCyWOY.js → DyqEo12-.js} +1 -1
  187. package/web/app/immutable/chunks/{B7Wb6zTq.js → K1lMPseK.js} +1 -1
  188. package/web/app/immutable/chunks/{Bdylonvo.js → LMWUF5gW.js} +1 -1
  189. package/web/app/immutable/chunks/{_3D340Va.js → LXOG-o0_.js} +1 -1
  190. package/web/app/immutable/chunks/{DY3dk38M.js → Ly5i90Nv.js} +1 -1
  191. package/web/app/immutable/chunks/{DwDCAMLG.js → M2HNRaSd.js} +1 -1
  192. package/web/app/immutable/chunks/{Brep-rEI.js → OT3S-JEx.js} +3 -3
  193. package/web/app/immutable/chunks/{D8DZcNyr.js → PTBua5Xh.js} +1 -1
  194. package/web/app/immutable/chunks/{Bu8Bi7-A.js → Q73TKJJV.js} +1 -1
  195. package/web/app/immutable/chunks/{BxWSOWVO.js → QOrjinFU.js} +3 -3
  196. package/web/app/immutable/chunks/{DYtAwHmE.js → RM6OQSCe.js} +1 -1
  197. package/web/app/immutable/chunks/{xKX_8KWn.js → SR358tmD.js} +1 -1
  198. package/web/app/immutable/chunks/{BnbR-3eC.js → SxaNyqKY.js} +1 -1
  199. package/web/app/immutable/chunks/{aVsZmAEF.js → V8s0XlXE.js} +1 -1
  200. package/web/app/immutable/chunks/{CJhZDVuE.js → WIFxQL3B.js} +6 -6
  201. package/web/app/immutable/chunks/{BrdmgcMW.js → WtfFsxX1.js} +1 -1
  202. package/web/app/immutable/chunks/{CNB2bBwk.js → XsSJjm3Z.js} +8 -8
  203. package/web/app/immutable/chunks/{DlAbpA5d.js → YOgmIoTW.js} +1 -1
  204. package/web/app/immutable/chunks/{Dm7OUuES.js → ZpS8pGBT.js} +1 -1
  205. package/web/app/immutable/chunks/{FNHey2fE.js → cg-GVC1x.js} +1 -1
  206. package/web/app/immutable/chunks/{WTd8htj2.js → d6W1ZPqA.js} +1 -1
  207. package/web/app/immutable/chunks/{BdllAkCb.js → gE1gxY1Y.js} +1 -1
  208. package/web/app/immutable/chunks/{0EWUI_tF.js → hI2h2HCD.js} +1 -1
  209. package/web/app/immutable/chunks/{EpMOyykO.js → hO5lTYJC.js} +1 -1
  210. package/web/app/immutable/chunks/{CACMvEIk.js → o5rKfw07.js} +1 -1
  211. package/web/app/immutable/chunks/{D8dxdzMn.js → olmjZOKg.js} +1 -1
  212. package/web/app/immutable/chunks/{D1gMbWP8.js → pO3bPIuE.js} +1 -1
  213. package/web/app/immutable/chunks/{DN9Sgz-I.js → pTVl2JiY.js} +1 -1
  214. package/web/app/immutable/chunks/{ObcETXIn.js → qDe1FahS.js} +4 -4
  215. package/web/app/immutable/chunks/{CHF-Yq0C.js → rzBANR1d.js} +1 -1
  216. package/web/app/immutable/chunks/{z5Kqmpp_.js → tKJW3PqB.js} +1 -1
  217. package/web/app/immutable/chunks/{aCBgdpmi.js → uCtJ9vOe.js} +4 -4
  218. package/web/app/immutable/chunks/{BhEPk3lK.js → uZvRsrHT.js} +1 -1
  219. package/web/app/immutable/chunks/{D8a7wHlQ.js → vAfS3WCg.js} +1 -1
  220. package/web/app/immutable/chunks/{U2CIkvme.js → xt2PoXl6.js} +1 -1
  221. package/web/app/immutable/chunks/{BiTsq1kw.js → zL-pIvaA.js} +1 -1
  222. package/web/app/immutable/chunks/{DQ7w3NbE.js → zqim2n1k.js} +1 -1
  223. package/web/app/immutable/entry/{app.D05YlZME.js → app.VT7TaiVu.js} +2 -2
  224. package/web/app/immutable/entry/start.290_qSid.js +1 -0
  225. package/web/app/immutable/nodes/{0.LnuswXdL.js → 0.BqGgzWCn.js} +1 -1
  226. package/web/app/immutable/nodes/{1.BBz2p_l7.js → 1.C4zqRLiW.js} +1 -1
  227. package/web/app/immutable/nodes/{10.Bkss7kyV.js → 10.e5SLQ0Dz.js} +1 -1
  228. package/web/app/immutable/nodes/{12.ahtCER6A.js → 12.ovtxIhM8.js} +1 -1
  229. package/web/app/immutable/nodes/{13.DYGu0QHS.js → 13.Bu_iJM_J.js} +1 -1
  230. package/web/app/immutable/nodes/{14.CHRRgsAs.js → 14.BfSKkaSq.js} +1 -1
  231. package/web/app/immutable/nodes/{15.De0cpvot.js → 15.LrePapt-.js} +1 -1
  232. package/web/app/immutable/nodes/{16.DJqmOr4R.js → 16.BXG5rqkJ.js} +2 -2
  233. package/web/app/immutable/nodes/2.TpeCpptI.js +9 -0
  234. package/web/app/immutable/nodes/{3.CjrKR4es.js → 3.BUPhRmT2.js} +1 -1
  235. package/web/app/immutable/nodes/{4.Cc1Wrh3X.js → 4.DsmDqqJv.js} +1 -1
  236. package/web/app/immutable/nodes/{5.riH2s22o.js → 5.DAbG3X_i.js} +1 -1
  237. package/web/app/immutable/nodes/{6.DFzfBxxH.js → 6.CsCXGtvb.js} +1 -1
  238. package/web/app/immutable/nodes/{7.DuBvggKz.js → 7.Cc-Pwt7d.js} +1 -1
  239. package/web/app/immutable/nodes/{8.D0_snN-z.js → 8.B7-LYwR0.js} +4 -4
  240. package/web/app/immutable/nodes/{9.FxuJzZaQ.js → 9.CSCz9Oh5.js} +4 -4
  241. package/web/app/version.json +1 -1
  242. package/web/index.html +10 -10
  243. package/web/app/immutable/assets/0.Hnrlh_nF.css +0 -1
  244. package/web/app/immutable/assets/5.MJsnOXij.css +0 -1
  245. package/web/app/immutable/chunks/CZOawK4P.js +0 -18
  246. package/web/app/immutable/chunks/Cf3hiWsI.js +0 -1
  247. package/web/app/immutable/chunks/Dmk6CuVf.js +0 -324
  248. package/web/app/immutable/chunks/l87kbv25.js +0 -1
  249. package/web/app/immutable/entry/start.CltNpI3_.js +0 -1
  250. package/web/app/immutable/nodes/2.0WZE4VZ1.js +0 -9
@@ -1 +1 @@
1
- import{b as t,a,s as r,S as s}from"./o8OJf27v.js";import{a as i}from"./47q6TsqV.js";import"./CJhZDVuE.js";import"./BDaXmtmH.js";var u={parser:r,get db(){return new s(2)},renderer:a,styles:t,init:i(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{u as diagram};
1
+ import{b as t,a,s as r,S as s}from"./-g6HPSpm.js";import{a as i}from"./BaqTNCTY.js";import"./WIFxQL3B.js";import"./DcDNc2X4.js";var u={parser:r,get db(){return new s(2)},renderer:a,styles:t,init:i(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{u as diagram};
@@ -1,8 +1,8 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/D8DZcNyr.js","/app/immutable/chunks/9RsJ-LA0.js","/app/immutable/chunks/DMsRLycu.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/ZX1TUMY0.js","/app/immutable/chunks/CpHIRYx9.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/CNB2bBwk.js","/app/immutable/chunks/BsvsTmot.js","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/i6wjEWTF.js","/app/immutable/chunks/CY7B0zXs.js","/app/immutable/chunks/Dg4AJKkW.js","/app/immutable/chunks/DVkfuwKw.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/AEjnVR5F.js","/app/immutable/chunks/utwal-1U.js","/app/immutable/chunks/Ba4gy30X.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/D2AmAQEr.js","/app/immutable/chunks/Cy5UaoOp.js","/app/immutable/chunks/CUrlpJj4.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/CAZb3-k9.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/DdwJKoPl.js","/app/immutable/chunks/4tDE6wja.js","/app/immutable/chunks/BdrU1VNg.js","/app/immutable/chunks/BJzHxIyr.js","/app/immutable/chunks/D7gNyfhu.js","/app/immutable/chunks/DypB-Dwi.js"])))=>i.map(i=>d[i]);
2
- import{z as te,N as ne,x as se,dA as D,cD as C,dk as re,ak as oe,a$ as N,y as ae,dL as ie}from"./CZOawK4P.js";import{_ as v,bo as S}from"./DMsRLycu.js";import{u4 as ue,zK as V,mB as f,u6 as ce,AX as F,Gt as c,cs as le,ct as de,mC as W,mo as fe,c as $,fv as me,g as pe,kS as ge,cA as he}from"./Ba4gy30X.js";import{bM as Se}from"./Uc38XdXI.js";import{x as ye,J as Ae,ag as be,ao as Me}from"./Brep-rEI.js";import{a as H}from"./DypB-Dwi.js";import{s as we}from"./Bw0bJwpw.js";import{by as Ie}from"./CNB2bBwk.js";import{C as _e}from"./BdrU1VNg.js";import{q as Ce,v as ve}from"./AEjnVR5F.js";import{a as Te}from"./a-vNpAtT.js";function Re(e){try{return new URL(e.pageUrl).hostname||e.pageUrl}catch{return e.pageUrl}}function bt(e,t){return e.targetAgentId===t}function Mt(e){const t=e.element,n=e.viewport,s=Re(e),r=t?`<${t.tagName.toLowerCase()}> · ${s}`:e.title||s,o=["<browser-element-capture>",`Page URL: ${e.pageUrl}`,`Page title: ${e.title}`,...t?[`DOM path: ${t.domPath}`,`CSS selector: ${t.selector}`,`Text snippet: ${t.textSnippet}`,...t.sourceRef?[`Source ref: ${t.sourceRef}`]:[],...n?[`Viewport: ${n.width}×${n.height}`]:[],`Element bounds: ${t.rect.width}×${t.rect.height} at (${t.rect.x}, ${t.rect.y})`]:[],"</browser-element-capture>"].join(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/PTBua5Xh.js","/app/immutable/chunks/Dky-2Jfq.js","/app/immutable/chunks/DMsRLycu.js","/app/immutable/chunks/B8o4lNgr.js","/app/immutable/chunks/ZX1TUMY0.js","/app/immutable/chunks/CpHIRYx9.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/XsSJjm3Z.js","/app/immutable/chunks/BsvsTmot.js","/app/immutable/chunks/D2g8BuR1.js","/app/immutable/chunks/i6wjEWTF.js","/app/immutable/chunks/CY7B0zXs.js","/app/immutable/chunks/Dg4AJKkW.js","/app/immutable/chunks/DVkfuwKw.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/AEjnVR5F.js","/app/immutable/chunks/utwal-1U.js","/app/immutable/chunks/Ba4gy30X.js","/app/immutable/chunks/CjSUqH7t.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/D5B1sycf.js","/app/immutable/chunks/D2AmAQEr.js","/app/immutable/chunks/Cy5UaoOp.js","/app/immutable/chunks/CUrlpJj4.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/CAZb3-k9.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/DdwJKoPl.js","/app/immutable/chunks/BqJBJZqA.js","/app/immutable/chunks/BdrU1VNg.js","/app/immutable/chunks/BJzHxIyr.js","/app/immutable/chunks/D7gNyfhu.js","/app/immutable/chunks/DypB-Dwi.js"])))=>i.map(i=>d[i]);
2
+ import{z as te,N as ne,x as se,dA as D,cD as C,dk as re,ak as oe,a$ as N,y as ae,dL as ie}from"./DIZ4FVb2.js";import{_ as v,bo as S}from"./DMsRLycu.js";import{u4 as ue,zK as V,mB as f,u6 as ce,AX as F,Gt as c,cs as le,ct as de,mC as W,mo as fe,c as $,fv as me,g as pe,kS as ge,cA as he}from"./Ba4gy30X.js";import{bM as Se}from"./BaPbYStu.js";import{x as ye,J as Ae,ag as be,ao as Me}from"./OT3S-JEx.js";import{a as H}from"./DypB-Dwi.js";import{s as we}from"./D0pB9PrJ.js";import{by as Ie}from"./XsSJjm3Z.js";import{C as _e}from"./BdrU1VNg.js";import{q as Ce,v as ve}from"./AEjnVR5F.js";import{a as Te}from"./B6ZWdQk3.js";function Re(e){try{return new URL(e.pageUrl).hostname||e.pageUrl}catch{return e.pageUrl}}function bt(e,t){return e.targetAgentId===t}function Mt(e){const t=e.element,n=e.viewport,s=Re(e),r=t?`<${t.tagName.toLowerCase()}> · ${s}`:e.title||s,o=["<browser-element-capture>",`Page URL: ${e.pageUrl}`,`Page title: ${e.title}`,...t?[`DOM path: ${t.domPath}`,`CSS selector: ${t.selector}`,`Text snippet: ${t.textSnippet}`,...t.sourceRef?[`Source ref: ${t.sourceRef}`]:[],...n?[`Viewport: ${n.width}×${n.height}`]:[],`Element bounds: ${t.rect.width}×${t.rect.height} at (${t.rect.x}, ${t.rect.y})`]:[],"</browser-element-capture>"].join(`
3
3
  `);return[{id:`${e.id}-image`,type:"file",label:r,imageData:e.image.data,imageMimeType:e.image.mimeType},{id:`${e.id}-context`,type:"selection",label:r,content:o}]}function $e(e,t){const n=t.filter(s=>s.type==="selection").flatMap(s=>s.content?.trim()?[s.content.trim()]:[]);return[e.trim(),...n].filter(Boolean).join(`
4
4
  `)}function ke(e){const t=e.filter(s=>(s.imageData||s.attachmentId)&&s.imageMimeType).map(s=>s.attachmentId?{type:"image",attachmentId:s.attachmentId,...s.imageMimeType.includes("/")?{mimeType:s.imageMimeType}:{}}:{type:"image",data:s.imageData,mimeType:s.imageMimeType,...s.placementFileName?{placementFileName:s.placementFileName}:{}}),n=e.filter(s=>s.attachmentId&&!s.imageMimeType).map(s=>({type:"file",attachmentId:s.attachmentId,fileName:s.label,...s.attachmentMimeType?{mimeType:s.attachmentMimeType}:{},...s.attachmentSize!==void 0?{size:s.attachmentSize}:{}}));return{imageBlocks:t,fileBlocks:n}}function Ee(e=[],t=[],n=[]){const s=[];for(const r of t)r.type==="file"&&r.filePath?s.push(`[Currently viewing file: ${r.filePath}]`):r.type==="diff"&&r.filePath?s.push(`[Currently viewing diff for: ${r.filePath}]`):r.type==="note"&&r.noteId?s.push(`[Currently viewing note: "${r.label}" (ID: ${r.noteId}). Read it with ws.note.read("${r.noteId}").]`):r.type==="spec"?s.push("[Currently viewing: Spec]"):r.type==="browser"&&r.browserUrl&&s.push(`[Currently viewing browser: ${r.browserUrl}]`);for(const r of n){const o=r.text.trim(),a=o.length>500?o.substring(0,500)+"...":o,i=r.sourceLabel?` from ${r.sourceLabel}`:"";s.push(`[Selected text${i}:
5
5
  \`\`\`
6
6
  ${a}
7
7
  \`\`\`]`)}return $e(s.join(`
8
- `),e)}function wt(e,t,n){if(e==="suggested-prompt")return{fields:{},hasAttachments:!1,cleanup:{clearInput:!1,followBottom:!0,historyText:null}};const s=n(),{imageBlocks:r,fileBlocks:o}=ke(s.contextItems);return{fields:{contextItems:s.contextItems,workspaceContextStr:Ee(s.contextItems,s.checkedPanels,s.checkedSelections),noteIds:s.noteIds,...r.length>0?{imageBlocks:r}:{},...o.length>0?{fileBlocks:o}:{},...s.pickedMentions?{messageMetadata:s.pickedMentions}:{}},hasAttachments:r.length>0||o.length>0,cleanup:{clearInput:!0,followBottom:!0,historyText:t}}}function It(e,t){if(e)return e.model}function Le({messages:e,pendingInitialPrompt:t,pendingContextReferenceCount:n=0}){return e.length>0||!!t||n>0}function _t({session:e,messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:s=0}){return!(e?te(e):!1)&&!Le({messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:s})}function Ct(e){return ne(e.messageMetadata)}function vt(e,t){const n=new Set;for(const s of t){const r=se(s.metadata);r&&n.add(r)}return n.size===0?[...e]:e.filter(s=>!n.has(s.id))}function xe(e){return{id:e.id,appMessageId:e.appMessageId,role:"user",timestamp:new Date(e.createdAt??0).toISOString(),contentBlocks:[...e.content?[{type:"text",text:e.content}]:[],...e.imageBlocks??[],...e.fileBlocks??[]],metadata:e.messageMetadata,...e.author!==void 0?{author:e.author}:{}}}function Tt(e){return xe({...e,createdAt:Date.parse(e.queuedAt)})}const Pe="chat-read:",y=new Map,T=new Set;function Rt(e,t){let n=y.get(e);n||(n=new Set,y.set(e,n)),n.add(t)}function $t(e,t){const n=y.get(e);if(!(!n||!n.delete(t))&&n.size===0){y.delete(e);for(const s of[...T])s(e)}}function kt(e){return T.add(e),()=>T.delete(e)}function Et(e){return y.has(e)}function Lt(e){const t=y.get(e);if(!t)return!1;for(const n of t)if(!n.startsWith(Pe))return!0;return!1}function De(e,t,n){const s=e.state.pendingSubmissions.byAgentId[t.agentId];if(!s||!V(s.scope,t))return null;const r={...structuredClone(n),id:crypto.randomUUID(),createdAt:Date.now()};e.dispatch(ce(t,r));const o=e.state.pendingSubmissions.byAgentId[t.agentId];return o&&f(o.submissions,r.id)?r:null}function He(e,t,n,s,r){const o=D.select(e.state,n),a=C.select(e.state)?.principal.id,i=H(e.state);if(!o||!a||!i)return null;const u=ye(t,n),l={agentId:t,workspaceId:n,principalId:a,participation:o,authority:i,owner:u.key,lifetime:e.state.pendingSubmissions.byAgentId[t]?.scope.lifetime??crypto.randomUUID()},m=()=>u.isCurrent(e.state.agentSessions?.byAgentId[t]?.workspaceId)&&D.select(e.state,n)===o&&C.select(e.state)?.principal.id===a&&H(e.state)===i;if(!m())return null;e.dispatch(ue(l,s,re.select(e.state,n)));const d=De(e,l,r);return d?{scope:l,submission:d,isCurrent:()=>{const h=e.state.pendingSubmissions.byAgentId[t];return m()&&!!h&&V(h.scope,l)&&(!!f(h.operations,d.id)||!!f(h.submissions,d.id))}}:null}function R(e,t,n){if(!n.text.trim()&&!n.imageBlocks?.length&&!n.fileBlocks?.length)return null;const s=n.userAppMessageId??Ae();return He(e,t,n.wsId,C.select(e.state)?.capabilities.submissionCorrelation,{content:n.text.trim(),appMessageId:s,destination:!n.forceSubmit&&oe.select(e.state,t)?"queue":"conversation",contextItems:n.contextItems,imageBlocks:n.imageBlocks,fileBlocks:n.fileBlocks,messageMetadata:n.messageMetadata})}function Be(e,t,n){const s=R(e,t,n);return s?(e.dispatch(F(t,{...n,userAppMessageId:s.submission.appMessageId,submission:{scope:s.scope,id:s.submission.id}})),!0):!1}async function Oe(e,t,n,s){const r=n.submission;if(!r)return"legacy";const o=r.reference,a=()=>o.scope.agentId===e&&o.scope.workspaceId===t&&N.select(c.state,e)===n?Se.select(c.state,o.scope):void 0,i=a();if(!i)return null;if(!i.supported)return"legacy";const u={wsId:t,text:n.text,imageBlocks:n.options?.imageBlocks,fileBlocks:n.options?.fileBlocks,noteIds:n.options?.noteIds,messageMetadata:n.options?.messageMetadata,model:s??n.options?.model};if(r.outcome==="rejected"){const p=f(i.tombstones,o.id);return f(i.submissions,o.id)||p&&p.reason!=="rejected"?null:R(c,e,u)}if(r.outcome==="accepted")return R(c,e,u);await Promise.all([be(e,t).catch(()=>{}),Me(e,t).catch(()=>{})]);const l=a();if(!l||f(l.submissions,o.id)?.status!=="uncertain")return null;const{notify:m}=await v(async()=>{const{notify:p}=await import("./D8DZcNyr.js").then(ee=>ee.i);return{notify:p}},__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]),import.meta.url);if(a()!==l)return null;let d=!1;const h=()=>{d=!0};return m.warning(S.agent_chatSend_uncertainRetry_description(),{key:`submission-retry:${t}:${e}:${o.id}`,duration:Number.POSITIVE_INFINITY,action:{label:S.agent_chatSend_resend_label(),onClick:()=>{if(d)return;d=!0;const p=a();!p||p.generation!==l.generation||p.submissions!==l.submissions||p.observationVersion!==l.observationVersion||f(p.submissions,o.id)?.status!=="uncertain"||Be(c,e,u)}},cancel:{label:S.chat_richInput_cancel_label(),onClick:h},onDismiss:h}),null}async function xt(e,t,n){const s=N.select(c.state,e),r=s?.submission?await Oe(e,t,s,n):"legacy";if(r){if(r==="legacy"){await c.dispatch(n===void 0?le(e,t):de(e,t,n));return}!r.isCurrent()||!s||c.dispatch(F(e,{wsId:t,text:s.text,imageBlocks:s.options?.imageBlocks,fileBlocks:s.options?.fileBlocks,noteIds:s.options?.noteIds,messageMetadata:s.options?.messageMetadata,model:n??s.options?.model,userAppMessageId:r.submission.appMessageId,submission:{scope:r.scope,id:r.submission.id}}))}}const Pt=c.createSelector((e,t)=>{const n=f(e.chatDrafts.owners,t);return n?{restore:n.restore,saves:W(n.saves)}:void 0});function Ue(e,t){return t.workspaceId===e&&!t.retiredAt&&!t.pendingDeleteAt&&t.status!==$.Deleted&&!t.notificationsMuted&&me(t)==="topLevel"}function Ne(e){const t=e.metadata?.pendingQuestionsMessageId;return typeof t=="string"&&t.length>0&&!we(e.metadata,t)?t:null}function Ve(e){return e.status===$.Error&&!ae(ie(e))}function Dt(e,t){return t.filter(n=>Ue(e,n)).flatMap(n=>{const s=fe(n),r=Ne(n),o=n.status===$.Error;if(!s&&!r&&!o)return[];const a=s?.timestamp??(o?n.stopReasonTimestamp:void 0);return[{agentId:n.id,agentName:n.name,kind:s?.kind??(o?"failed":"question"),reason:s?.reason,timestamp:a&&Number.isFinite(Date.parse(a))?a:void 0,questionMessageId:r,canRetry:Ve(n)}]})}function Ht(e){return e.displayStatus==="failed"?"failed":e.displayStatus==="blocked"?"blocked":e.attention==="review_required"?"review":e.displayStatus==="needs_attention"?"question":e.activity==="agent_running"||e.displayStatus==="in_progress"?"running":e.scriptsRunning===!0?"scripts_running":e.backgroundTasksRunning===!0?"background_tasks_running":e.displayStatus==="pr_ready"?"pr_ready":e.displayStatus==="pr_merged"?"merged":e.displayStatus==="complete"?"complete":e.attention==="unread"?"unread":e.displayStatus==="pr_open"||e.displayStatus==="pr_queued"?e.displayStatus:"idle"}function Bt(e){const t=e.kind==="prs"?e.organization?.trim().toLowerCase():void 0;return{key:JSON.stringify([e.kind,e.workspaceId,t||null,[...new Set((t?[]:e.repositories).map(n=>JSON.stringify([n.key,n.owner,n.name])))].sort()]),hasGitHubRepositories:!!t||e.repositories.some(n=>!!n.owner),hasLocalRepositories:!t&&e.repositories.some(n=>!n.owner)}}function k(e){const t=Ie(e);if(t?.kind!=="pr"||!Number.isSafeInteger(t.number)||t.number<=0)return null;const n=t.owner.toLowerCase(),s=t.repo.toLowerCase();return{owner:n,repo:s,number:t.number,id:`${n}/${s}#${t.number}`,url:`https://github.com/${n}/${s}/pull/${t.number}`}}function Ot(e,t,n,s){const r=e.filter(o=>s?s.includes(o.id):n?o.repositoryOwner?.toLowerCase()===n.toLowerCase():t.some(a=>a.owner?.toLowerCase()===o.repositoryOwner?.toLowerCase()&&a.name.toLowerCase()===o.repositoryName?.toLowerCase()));return[...new Map(r.flatMap(o=>[...(o.pullRequests??[]).map(a=>a.url),o.activePullRequest?.url,o.prUrl]).flatMap(o=>{const a=o?k(o):null;return a?[[a.id,{owner:a.owner,repo:a.repo,number:a.number}]]:[]})).values()].sort((o,a)=>`${o.owner}/${o.repo}#${o.number}`.localeCompare(`${a.owner}/${a.repo}#${a.number}`))}function Ut(e,t){const[n]=t;return t.length!==1||e.owner?.toLowerCase()!==n?.owner?.toLowerCase()||e.repo?.toLowerCase()!==n?.name.toLowerCase()}const Nt=c.createSelector(e=>e.homeIntegrations),Vt=c.createSelector(e=>{const t=e.homeIntegrations;return!t.linkedItems||!Object.keys(t.linkedItems).length?t:{...t,items:[...new Map([...Object.values(t.linkedItems),...t.items].map(n=>[n.id,n])).values()].sort((n,s)=>(s.updatedAt??"").localeCompare(n.updatedAt??""))}}),q=c.createSelector(e=>W(e.workspace.workspaces).flatMap(t=>[...(t.pullRequests??[]).map(n=>n.url),t.activePullRequest?.url,t.prUrl].filter(n=>!!n).map(n=>({url:k(n)?.url??n.replace(/\/$/,"").toLowerCase(),workspaceId:t.id,name:t.title||t.id})))),Ft=c.createSelector(e=>{const t=e.homeIntegrations.detail?.url,n=t?k(t)?.url??t.replace(/\/$/,"").toLowerCase():void 0;return q.select(e).find(s=>s.url===n)??null}),Wt=c.createSelector(e=>q.select(e).map(t=>t.url));function qt(e){return ve(e)}function Fe(e){return Ce(e)}function We(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function w(e){if(e.length===0)return[];const t=[];let n=null;for(const s of e){const r=s.timestamp?typeof s.timestamp=="string"?new Date(s.timestamp):s.timestamp:new Date;(!n||!We(n.date,r))&&(n={date:r,label:Fe(r),messages:[]},t.push(n)),n.messages.push(s)}return t}function Gt(e){const t=new Map;return e.map(({date:n})=>{const s=`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`,r=t.get(s)??0;return t.set(s,r+1),r===0?s:`${s}#${r}`})}function Kt(e,t){const n=new Map;let s=t?null:void 0;for(const[r,o]of e.groups.entries()){r===e.gapBeforeGroupIndex&&(s=void 0);for(const a of o.messages)s!==void 0&&n.set(a.id,s),a.role==="user"&&!Te(a)&&(s=a)}return n}function qe(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}function _(e,t){const n=new Map;return e.map(s=>{const r=`${t}-${qe(s.date)}`,o=(n.get(r)??0)+1;return n.set(r,o),{...s,groupKey:o===1?r:`${r}-${o}`}})}function Ge(e,t){if(e.length===0||t.length===0)return e;const n=new Set(t.map(o=>o.id)),s=new Set(t.map(o=>o.appMessageId).filter(o=>typeof o=="string"&&o.length>0)),r=e.filter(o=>!n.has(o.id)&&!(typeof o.appMessageId=="string"&&o.appMessageId.length>0&&s.has(o.appMessageId)));return r.length===e.length?e:r}function jt(e,t,n){if(e=Ge(e,t),e.length===0)return{groups:w(t),gapBeforeGroupIndex:null};if(!n)return{groups:_(w([...e,...t]),"d"),gapBeforeGroupIndex:null};const s=_(w(e),"h"),r=_(w(t),"t");return{groups:[...s,...r],gapBeforeGroupIndex:s.length}}function zt(e){const{scrollTop:t,threshold:n,fetching:s,exhausted:r,historyCount:o,tailCount:a,tailTruncated:i,totalMessages:u,spacerAbove:l=0}=e;return t>n+l||s||r?!1:o>0||i||u>a+o}const Qt=300;function Yt(e){const{fetching:t,chainEvaluationPending:n,visible:s,hideArmed:r}=e;return t||n?s&&!r?"none":"show":s&&!r?"arm-hide":"none"}const B=24,Ke=320;function E(e){return Number.isFinite(e)?Math.min(Ke,Math.max(B,e)):B}const je=.2,ze=.12;function Qe(e,t,n=je){const s=E(t);return e===null||!Number.isFinite(e)?s:e+n*(s-e)}function Xt(e,t){const n=E(t??Number.NaN);return{above:Math.round(Math.max(0,e.above)*n),below:Math.round(Math.max(0,e.below)*n)}}function Jt(e){const{totalMessages:t,residentCount:n,exhausted:s,residentContentHeight:r,currentSpacerHeight:o,viewportHeight:a}=e;let i=e.rowHeightEma;n>0&&r>0&&(i=Qe(i,r/n));const u=e.unloadedRows??t-n,m=s||t<=0||n<=0||u<=0||i===null?0:Math.round(u*i),d=Math.abs(m-o);return d===0?{spacerHeight:o,rowHeightEma:i,applied:!1,scrollTopDelta:0}:m===0||o===0||d>o*ze||a>0&&d>a?{spacerHeight:m,rowHeightEma:i,applied:!0,scrollTopDelta:m-o}:{spacerHeight:o,rowHeightEma:i,applied:!1,scrollTopDelta:0}}const Ye=_e,Xe=2;function Zt(e){const{scrollTop:t,spacerAboveHeight:n,rowHeightEstimate:s,pageSize:r=Ye,nearPages:o=Xe}=e;if(n<=0||t>=n)return"serial";const a=E(s??Number.NaN);return(n-Math.max(0,t))/a>o*r?"seek":"serial"}const G=200,Je=1;function en(e,t,n=G){const s=t.timestamp-n;return[...e.filter(r=>r.timestamp>=s),t]}function tn(e){const{samples:t,viewportHeight:n,windowMs:s=G,viewportFactor:r=Je}=e;if(n<=0||t.length<2)return"gentle";const o=t[t.length-1].timestamp-s,a=t.filter(u=>u.timestamp>=o);if(a.length<2)return"gentle";let i=0;for(let u=1;u<a.length;u+=1)i+=Math.abs(a[u].scrollTop-a[u-1].scrollTop);return i>n*r?"rapid":"gentle"}function nn(e){const{scrollTop:t,spacerAboveHeight:n,unloadedRowsAbove:s}=e;if(s<=0||n<=0)return 0;const r=Math.min(1,Math.max(0,t/n));return Math.min(s-1,Math.max(0,Math.floor(r*s)))}function sn(e){const{totalMessages:t,residentCount:n,exhausted:s,startOrdinalEstimate:r,gapToTail:o}=e,a=Math.max(0,t-n);if(a===0)return{above:0,below:0};if(!o)return{above:s?0:a,below:0};if(s)return{above:0,below:a};if(r!==null){const u=Math.min(a,Math.max(0,Math.round(r)));return{above:u,below:a-u}}const i=Math.min(a,Math.max(0,Math.round(e.holeRowsEstimate??0)));return{above:a-i,below:i}}function rn(e){const{exhausted:t,historyCount:n,tailCount:s,tailTruncated:r,totalMessages:o}=e;return t?!0:n>0?!1:!r&&o<=s}const K=new Map;function j(e,t){return`${e}\0${t}`}function on(e,t){return K.get(j(e,t))}function an(e,t,n){K.set(j(e,t),n)}const un=c.createSelector((e,t,n)=>{const s=e.chatPanelUi.byWorkspaceId[t];return s?f(s.userMessageIndexes,n):void 0}),cn=c.createSelector((e,t,n)=>{const s=e.chatPanelUi.byWorkspaceId[t];return s?f(s.retryAgents,n):void 0});function Ze(e){e=Math.max(0,e);const t=Math.floor(e/1e3);if(t<10){const o=e/1e3,a=o.toFixed(1);return a.endsWith(".0")?`${Math.round(o)}s`:`${a}s`}if(t<60)return`${t}s`;const n=Math.floor(t/3600),s=Math.floor(t%3600/60),r=t%60;return n>0?`${n}h ${s}m ${r}s`:`${s}m ${r}s`}function ln(e){return Ze(Math.max(1e3,Math.round(e/1e3)*1e3))}const et=new Set(["launch","init","session-create","session-load","prompt"]),tt=new Set(["tool-call","tool-waiting"]);function nt(e){let t=null;for(const n of e)(!t||n.timestamp>=t.timestamp)&&(t=n);return t}function dn(e){return e&&et.has(e)?"pulse":e&&tt.has(e)?"twist":"bloom"}const z="stalled";function fn(e,t){const n=nt(e);return!n||n.phase!==z||typeof t=="number"&&t>n.timestamp?null:n}function mn(e){let t=null;for(const n of e)n.phase!==z&&(!t||n.timestamp>=t.timestamp)&&(t=n);return t}const O={get title(){return S.chat_streamingStatus_sessionCorrupted_title()},get message(){return S.chat_streamingStatus_sessionCorrupted_message()}};function pn(e,t){return e?t===!0?{corrupted:!0,title:O.title,message:O.message,detail:e}:{corrupted:!1,title:S.chat_streamingStatus_responseFailed_label(),message:e,detail:null}:null}const gn=c.createSelector((e,t)=>e.unreadTracking.dividerSessionByAgentId[t]??null),hn=c.createSelector(e=>e.unreadTracking.currentlyViewedAgentId),Sn=c.createSelector(e=>{const t=[];for(const o of Object.values(e.panelLayout.byWorkspaceId))for(const a of Object.values(o.panels))for(const i of a.tabs)i.type==="agent"&&i.agentId&&t.push(i.agentId);const n=Object.keys(e.unreadTracking.dividerSessionByAgentId),s=new Set(e.agentSessions.agentIdsByWorkspace[pe]??[]);return{chiefCardVisible:e.sidebarNav.panelItem==="chief",chiefSessionAgentIds:n.filter(o=>s.has(o)),dividerSessionAgentIds:n,openAgentTabIds:t}}),yn=c.createSelector((e,t)=>f(e.questionUi.consumers,t)),st=3e4,b=new Map;function An(e,t){const n=b.get(e);n&&clearTimeout(n.timer);const s=setTimeout(()=>b.delete(e),st);b.set(e,{value:t,timer:s})}function bn(e){const t=b.get(e);if(t)return clearTimeout(t.timer),b.delete(e),t.value}const Q=c.createSelector((e,t,n)=>e.agentWorkers?.byKey[he(t,n)]??ge),rt=c.createSelector((e,t,n)=>{const s=Q.select(e,t,n);return s.status==="unsupported"?[]:(s.snapshot?.workers??[]).filter(r=>r.status==="running"||r.status==="unknown")}),Mn=c.createSelector((e,t,n)=>{const s=Q.select(e,t,n);return s.status==="failed"?!0:s.status!=="ready"||!s.snapshot?!1:s.snapshot.truncated?!0:s.snapshot.support.status!=="supported"&&rt.select(e,t,n).length>0}),ot=1e3,Y={requireViewedAndFocused:!0,requireAssistantTail:!0},M=new Map,g=new Map;let A=null;function L(e){(e===void 0||A===e)&&(A=null)}const at=200;function it(e,t){if(g.delete(e),g.set(e,t),g.size>at){const n=g.keys().next().value;n!==void 0&&g.delete(n)}}function X(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(!n.isStreaming&&typeof n.id=="string"&&n.id.length>0)return n}return null}function wn(e){return X(e)?.id??null}function In(e){x(e,{requireViewedAndFocused:!0})}function _n(e){x(e,{requireViewedAndFocused:!1})}function Cn(e){L(),x(e,Y)}function vn(e){A===e&&(M.has(e)||(A=null,P(e,Y)))}function Tn(e){for(const t of e)typeof t!="string"||t.length===0||(J(t),L(t),P(t,{requireViewedAndFocused:!1}))}function J(e){const t=M.get(e);t&&(clearTimeout(t.timer),M.delete(e))}function x(e,t){J(e),L(e);const n=setTimeout(()=>{M.delete(e),P(e,t)},ot);M.set(e,{timer:n,gates:t})}let U=null;function ut(){return U??=Promise.all([v(()=>import("./CAZb3-k9.js"),__vite__mapDeps([25,17,18,3,19,20,13,5,8,2,11,26,27]),import.meta.url),v(()=>import("./4tDE6wja.js").then(e=>e.X),__vite__mapDeps([28,29,18,3,17,19,20,13,5,8,2,11,7,4,6,9,10,12,14,30,31,32]),import.meta.url)]).then(([e,t])=>({appStore:e.store,appClient:t.appClient})),U}async function P(e,t){let n=null;try{const{appStore:s,appClient:r}=await ut(),o=s.state;if(t.requireViewedAndFocused&&(o.unreadTracking?.currentlyViewedAgentId!==e||typeof document<"u"&&!document.hasFocus()))return;const a=o.agentSessions?.byAgentId[e];if(!a)return;const i=typeof a.workspaceId=="string"?a.workspaceId:"";if(i.length===0)return;if(t.requireAssistantTail&&o.chatState?.byAgentId[e]?.initialHistoryPending){A=e;return}const u=X(a.messages??[]);if(!u){t.requireAssistantTail&&(A=e);return}if(t.requireAssistantTail&&u.role!=="assistant")return;const l=u.id;if(g.get(e)===l)return;it(e,l),n=l,!(await r.agents.markSeen({workspaceId:i,agentId:e,messageId:l})).success&&g.get(e)===n&&g.delete(e)}catch{n!==null&&g.get(e)===n&&g.delete(e)}}const I=new Map;function Z(e,t){return`${e}\0${t}`}function Rn(e,t){return I.get(Z(e,t))}function $n(e,t,n){I.set(Z(e,t),n)}function kn(e){if(e.length===0)return;const t=new Set(e);for(const n of[...I.keys()]){const s=n.slice(n.indexOf("\0")+1);t.has(s)&&I.delete(n)}}export{xt as $,Et as A,Lt as B,Kt as C,rn as D,Ct as E,nn as F,Tn as G,Pe as H,vn as I,In as J,_n as K,Cn as L,ot as M,wn as N,Qt as O,Yt as P,vt as Q,G as R,kt as S,xe as T,wt as U,B as V,Oe as W,Tt as X,Jt as Y,$t as Z,L as _,Rt as a,It as a0,Xt as a1,rt as a2,Q as a3,Mn as a4,Pt as a5,hn as a6,Sn as a7,gn as a8,Nt as a9,Ft as aa,Vt as ab,Wt as ac,q as ad,yn as ae,cn as af,un as ag,$n as ah,an as ai,zt as aj,Ut as ak,sn as al,An as am,Be as an,bn as ao,R as b,en as c,bt as d,Mt as e,Gt as f,Ee as g,_t as h,tn as i,Zt as j,kn as k,Ot as l,jt as m,pn as n,Bt as o,Ge as p,ke as q,ln as r,qt as s,fn as t,Rn as u,on as v,Dt as w,Ht as x,mn as y,dn as z};
8
+ `),e)}function wt(e,t,n){if(e==="suggested-prompt")return{fields:{},hasAttachments:!1,cleanup:{clearInput:!1,followBottom:!0,historyText:null}};const s=n(),{imageBlocks:r,fileBlocks:o}=ke(s.contextItems);return{fields:{contextItems:s.contextItems,workspaceContextStr:Ee(s.contextItems,s.checkedPanels,s.checkedSelections),noteIds:s.noteIds,...r.length>0?{imageBlocks:r}:{},...o.length>0?{fileBlocks:o}:{},...s.pickedMentions?{messageMetadata:s.pickedMentions}:{}},hasAttachments:r.length>0||o.length>0,cleanup:{clearInput:!0,followBottom:!0,historyText:t}}}function It(e,t){if(e)return e.model}function Le({messages:e,pendingInitialPrompt:t,pendingContextReferenceCount:n=0}){return e.length>0||!!t||n>0}function _t({session:e,messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:s=0}){return!(e?te(e):!1)&&!Le({messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:s})}function Ct(e){return ne(e.messageMetadata)}function vt(e,t){const n=new Set;for(const s of t){const r=se(s.metadata);r&&n.add(r)}return n.size===0?[...e]:e.filter(s=>!n.has(s.id))}function xe(e){return{id:e.id,appMessageId:e.appMessageId,role:"user",timestamp:new Date(e.createdAt??0).toISOString(),contentBlocks:[...e.content?[{type:"text",text:e.content}]:[],...e.imageBlocks??[],...e.fileBlocks??[]],metadata:e.messageMetadata,...e.author!==void 0?{author:e.author}:{}}}function Tt(e){return xe({...e,createdAt:Date.parse(e.queuedAt)})}const Pe="chat-read:",y=new Map,T=new Set;function Rt(e,t){let n=y.get(e);n||(n=new Set,y.set(e,n)),n.add(t)}function $t(e,t){const n=y.get(e);if(!(!n||!n.delete(t))&&n.size===0){y.delete(e);for(const s of[...T])s(e)}}function kt(e){return T.add(e),()=>T.delete(e)}function Et(e){return y.has(e)}function Lt(e){const t=y.get(e);if(!t)return!1;for(const n of t)if(!n.startsWith(Pe))return!0;return!1}function De(e,t,n){const s=e.state.pendingSubmissions.byAgentId[t.agentId];if(!s||!V(s.scope,t))return null;const r={...structuredClone(n),id:crypto.randomUUID(),createdAt:Date.now()};e.dispatch(ce(t,r));const o=e.state.pendingSubmissions.byAgentId[t.agentId];return o&&f(o.submissions,r.id)?r:null}function He(e,t,n,s,r){const o=D.select(e.state,n),a=C.select(e.state)?.principal.id,i=H(e.state);if(!o||!a||!i)return null;const u=ye(t,n),l={agentId:t,workspaceId:n,principalId:a,participation:o,authority:i,owner:u.key,lifetime:e.state.pendingSubmissions.byAgentId[t]?.scope.lifetime??crypto.randomUUID()},m=()=>u.isCurrent(e.state.agentSessions?.byAgentId[t]?.workspaceId)&&D.select(e.state,n)===o&&C.select(e.state)?.principal.id===a&&H(e.state)===i;if(!m())return null;e.dispatch(ue(l,s,re.select(e.state,n)));const d=De(e,l,r);return d?{scope:l,submission:d,isCurrent:()=>{const h=e.state.pendingSubmissions.byAgentId[t];return m()&&!!h&&V(h.scope,l)&&(!!f(h.operations,d.id)||!!f(h.submissions,d.id))}}:null}function R(e,t,n){if(!n.text.trim()&&!n.imageBlocks?.length&&!n.fileBlocks?.length)return null;const s=n.userAppMessageId??Ae();return He(e,t,n.wsId,C.select(e.state)?.capabilities.submissionCorrelation,{content:n.text.trim(),appMessageId:s,destination:!n.forceSubmit&&oe.select(e.state,t)?"queue":"conversation",contextItems:n.contextItems,imageBlocks:n.imageBlocks,fileBlocks:n.fileBlocks,messageMetadata:n.messageMetadata})}function Be(e,t,n){const s=R(e,t,n);return s?(e.dispatch(F(t,{...n,userAppMessageId:s.submission.appMessageId,submission:{scope:s.scope,id:s.submission.id}})),!0):!1}async function Oe(e,t,n,s){const r=n.submission;if(!r)return"legacy";const o=r.reference,a=()=>o.scope.agentId===e&&o.scope.workspaceId===t&&N.select(c.state,e)===n?Se.select(c.state,o.scope):void 0,i=a();if(!i)return null;if(!i.supported)return"legacy";const u={wsId:t,text:n.text,imageBlocks:n.options?.imageBlocks,fileBlocks:n.options?.fileBlocks,noteIds:n.options?.noteIds,messageMetadata:n.options?.messageMetadata,model:s??n.options?.model};if(r.outcome==="rejected"){const p=f(i.tombstones,o.id);return f(i.submissions,o.id)||p&&p.reason!=="rejected"?null:R(c,e,u)}if(r.outcome==="accepted")return R(c,e,u);await Promise.all([be(e,t).catch(()=>{}),Me(e,t).catch(()=>{})]);const l=a();if(!l||f(l.submissions,o.id)?.status!=="uncertain")return null;const{notify:m}=await v(async()=>{const{notify:p}=await import("./PTBua5Xh.js").then(ee=>ee.i);return{notify:p}},__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]),import.meta.url);if(a()!==l)return null;let d=!1;const h=()=>{d=!0};return m.warning(S.agent_chatSend_uncertainRetry_description(),{key:`submission-retry:${t}:${e}:${o.id}`,duration:Number.POSITIVE_INFINITY,action:{label:S.agent_chatSend_resend_label(),onClick:()=>{if(d)return;d=!0;const p=a();!p||p.generation!==l.generation||p.submissions!==l.submissions||p.observationVersion!==l.observationVersion||f(p.submissions,o.id)?.status!=="uncertain"||Be(c,e,u)}},cancel:{label:S.chat_richInput_cancel_label(),onClick:h},onDismiss:h}),null}async function xt(e,t,n){const s=N.select(c.state,e),r=s?.submission?await Oe(e,t,s,n):"legacy";if(r){if(r==="legacy"){await c.dispatch(n===void 0?le(e,t):de(e,t,n));return}!r.isCurrent()||!s||c.dispatch(F(e,{wsId:t,text:s.text,imageBlocks:s.options?.imageBlocks,fileBlocks:s.options?.fileBlocks,noteIds:s.options?.noteIds,messageMetadata:s.options?.messageMetadata,model:n??s.options?.model,userAppMessageId:r.submission.appMessageId,submission:{scope:r.scope,id:r.submission.id}}))}}const Pt=c.createSelector((e,t)=>{const n=f(e.chatDrafts.owners,t);return n?{restore:n.restore,saves:W(n.saves)}:void 0});function Ue(e,t){return t.workspaceId===e&&!t.retiredAt&&!t.pendingDeleteAt&&t.status!==$.Deleted&&!t.notificationsMuted&&me(t)==="topLevel"}function Ne(e){const t=e.metadata?.pendingQuestionsMessageId;return typeof t=="string"&&t.length>0&&!we(e.metadata,t)?t:null}function Ve(e){return e.status===$.Error&&!ae(ie(e))}function Dt(e,t){return t.filter(n=>Ue(e,n)).flatMap(n=>{const s=fe(n),r=Ne(n),o=n.status===$.Error;if(!s&&!r&&!o)return[];const a=s?.timestamp??(o?n.stopReasonTimestamp:void 0);return[{agentId:n.id,agentName:n.name,kind:s?.kind??(o?"failed":"question"),reason:s?.reason,timestamp:a&&Number.isFinite(Date.parse(a))?a:void 0,questionMessageId:r,canRetry:Ve(n)}]})}function Ht(e){return e.displayStatus==="failed"?"failed":e.displayStatus==="blocked"?"blocked":e.attention==="review_required"?"review":e.displayStatus==="needs_attention"?"question":e.activity==="agent_running"||e.displayStatus==="in_progress"?"running":e.scriptsRunning===!0?"scripts_running":e.backgroundTasksRunning===!0?"background_tasks_running":e.displayStatus==="pr_ready"?"pr_ready":e.displayStatus==="pr_merged"?"merged":e.displayStatus==="complete"?"complete":e.attention==="unread"?"unread":e.displayStatus==="pr_open"||e.displayStatus==="pr_queued"?e.displayStatus:"idle"}function Bt(e){const t=e.kind==="prs"?e.organization?.trim().toLowerCase():void 0;return{key:JSON.stringify([e.kind,e.workspaceId,t||null,[...new Set((t?[]:e.repositories).map(n=>JSON.stringify([n.key,n.owner,n.name])))].sort()]),hasGitHubRepositories:!!t||e.repositories.some(n=>!!n.owner),hasLocalRepositories:!t&&e.repositories.some(n=>!n.owner)}}function k(e){const t=Ie(e);if(t?.kind!=="pr"||!Number.isSafeInteger(t.number)||t.number<=0)return null;const n=t.owner.toLowerCase(),s=t.repo.toLowerCase();return{owner:n,repo:s,number:t.number,id:`${n}/${s}#${t.number}`,url:`https://github.com/${n}/${s}/pull/${t.number}`}}function Ot(e,t,n,s){const r=e.filter(o=>s?s.includes(o.id):n?o.repositoryOwner?.toLowerCase()===n.toLowerCase():t.some(a=>a.owner?.toLowerCase()===o.repositoryOwner?.toLowerCase()&&a.name.toLowerCase()===o.repositoryName?.toLowerCase()));return[...new Map(r.flatMap(o=>[...(o.pullRequests??[]).map(a=>a.url),o.activePullRequest?.url,o.prUrl]).flatMap(o=>{const a=o?k(o):null;return a?[[a.id,{owner:a.owner,repo:a.repo,number:a.number}]]:[]})).values()].sort((o,a)=>`${o.owner}/${o.repo}#${o.number}`.localeCompare(`${a.owner}/${a.repo}#${a.number}`))}function Ut(e,t){const[n]=t;return t.length!==1||e.owner?.toLowerCase()!==n?.owner?.toLowerCase()||e.repo?.toLowerCase()!==n?.name.toLowerCase()}const Nt=c.createSelector(e=>e.homeIntegrations),Vt=c.createSelector(e=>{const t=e.homeIntegrations;return!t.linkedItems||!Object.keys(t.linkedItems).length?t:{...t,items:[...new Map([...Object.values(t.linkedItems),...t.items].map(n=>[n.id,n])).values()].sort((n,s)=>(s.updatedAt??"").localeCompare(n.updatedAt??""))}}),q=c.createSelector(e=>W(e.workspace.workspaces).flatMap(t=>[...(t.pullRequests??[]).map(n=>n.url),t.activePullRequest?.url,t.prUrl].filter(n=>!!n).map(n=>({url:k(n)?.url??n.replace(/\/$/,"").toLowerCase(),workspaceId:t.id,name:t.title||t.id})))),Ft=c.createSelector(e=>{const t=e.homeIntegrations.detail?.url,n=t?k(t)?.url??t.replace(/\/$/,"").toLowerCase():void 0;return q.select(e).find(s=>s.url===n)??null}),Wt=c.createSelector(e=>q.select(e).map(t=>t.url));function qt(e){return ve(e)}function Fe(e){return Ce(e)}function We(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function w(e){if(e.length===0)return[];const t=[];let n=null;for(const s of e){const r=s.timestamp?typeof s.timestamp=="string"?new Date(s.timestamp):s.timestamp:new Date;(!n||!We(n.date,r))&&(n={date:r,label:Fe(r),messages:[]},t.push(n)),n.messages.push(s)}return t}function Gt(e){const t=new Map;return e.map(({date:n})=>{const s=`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`,r=t.get(s)??0;return t.set(s,r+1),r===0?s:`${s}#${r}`})}function Kt(e,t){const n=new Map;let s=t?null:void 0;for(const[r,o]of e.groups.entries()){r===e.gapBeforeGroupIndex&&(s=void 0);for(const a of o.messages)s!==void 0&&n.set(a.id,s),a.role==="user"&&!Te(a)&&(s=a)}return n}function qe(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}function _(e,t){const n=new Map;return e.map(s=>{const r=`${t}-${qe(s.date)}`,o=(n.get(r)??0)+1;return n.set(r,o),{...s,groupKey:o===1?r:`${r}-${o}`}})}function Ge(e,t){if(e.length===0||t.length===0)return e;const n=new Set(t.map(o=>o.id)),s=new Set(t.map(o=>o.appMessageId).filter(o=>typeof o=="string"&&o.length>0)),r=e.filter(o=>!n.has(o.id)&&!(typeof o.appMessageId=="string"&&o.appMessageId.length>0&&s.has(o.appMessageId)));return r.length===e.length?e:r}function jt(e,t,n){if(e=Ge(e,t),e.length===0)return{groups:w(t),gapBeforeGroupIndex:null};if(!n)return{groups:_(w([...e,...t]),"d"),gapBeforeGroupIndex:null};const s=_(w(e),"h"),r=_(w(t),"t");return{groups:[...s,...r],gapBeforeGroupIndex:s.length}}function zt(e){const{scrollTop:t,threshold:n,fetching:s,exhausted:r,historyCount:o,tailCount:a,tailTruncated:i,totalMessages:u,spacerAbove:l=0}=e;return t>n+l||s||r?!1:o>0||i||u>a+o}const Qt=300;function Yt(e){const{fetching:t,chainEvaluationPending:n,visible:s,hideArmed:r}=e;return t||n?s&&!r?"none":"show":s&&!r?"arm-hide":"none"}const B=24,Ke=320;function E(e){return Number.isFinite(e)?Math.min(Ke,Math.max(B,e)):B}const je=.2,ze=.12;function Qe(e,t,n=je){const s=E(t);return e===null||!Number.isFinite(e)?s:e+n*(s-e)}function Xt(e,t){const n=E(t??Number.NaN);return{above:Math.round(Math.max(0,e.above)*n),below:Math.round(Math.max(0,e.below)*n)}}function Jt(e){const{totalMessages:t,residentCount:n,exhausted:s,residentContentHeight:r,currentSpacerHeight:o,viewportHeight:a}=e;let i=e.rowHeightEma;n>0&&r>0&&(i=Qe(i,r/n));const u=e.unloadedRows??t-n,m=s||t<=0||n<=0||u<=0||i===null?0:Math.round(u*i),d=Math.abs(m-o);return d===0?{spacerHeight:o,rowHeightEma:i,applied:!1,scrollTopDelta:0}:m===0||o===0||d>o*ze||a>0&&d>a?{spacerHeight:m,rowHeightEma:i,applied:!0,scrollTopDelta:m-o}:{spacerHeight:o,rowHeightEma:i,applied:!1,scrollTopDelta:0}}const Ye=_e,Xe=2;function Zt(e){const{scrollTop:t,spacerAboveHeight:n,rowHeightEstimate:s,pageSize:r=Ye,nearPages:o=Xe}=e;if(n<=0||t>=n)return"serial";const a=E(s??Number.NaN);return(n-Math.max(0,t))/a>o*r?"seek":"serial"}const G=200,Je=1;function en(e,t,n=G){const s=t.timestamp-n;return[...e.filter(r=>r.timestamp>=s),t]}function tn(e){const{samples:t,viewportHeight:n,windowMs:s=G,viewportFactor:r=Je}=e;if(n<=0||t.length<2)return"gentle";const o=t[t.length-1].timestamp-s,a=t.filter(u=>u.timestamp>=o);if(a.length<2)return"gentle";let i=0;for(let u=1;u<a.length;u+=1)i+=Math.abs(a[u].scrollTop-a[u-1].scrollTop);return i>n*r?"rapid":"gentle"}function nn(e){const{scrollTop:t,spacerAboveHeight:n,unloadedRowsAbove:s}=e;if(s<=0||n<=0)return 0;const r=Math.min(1,Math.max(0,t/n));return Math.min(s-1,Math.max(0,Math.floor(r*s)))}function sn(e){const{totalMessages:t,residentCount:n,exhausted:s,startOrdinalEstimate:r,gapToTail:o}=e,a=Math.max(0,t-n);if(a===0)return{above:0,below:0};if(!o)return{above:s?0:a,below:0};if(s)return{above:0,below:a};if(r!==null){const u=Math.min(a,Math.max(0,Math.round(r)));return{above:u,below:a-u}}const i=Math.min(a,Math.max(0,Math.round(e.holeRowsEstimate??0)));return{above:a-i,below:i}}function rn(e){const{exhausted:t,historyCount:n,tailCount:s,tailTruncated:r,totalMessages:o}=e;return t?!0:n>0?!1:!r&&o<=s}const K=new Map;function j(e,t){return`${e}\0${t}`}function on(e,t){return K.get(j(e,t))}function an(e,t,n){K.set(j(e,t),n)}const un=c.createSelector((e,t,n)=>{const s=e.chatPanelUi.byWorkspaceId[t];return s?f(s.userMessageIndexes,n):void 0}),cn=c.createSelector((e,t,n)=>{const s=e.chatPanelUi.byWorkspaceId[t];return s?f(s.retryAgents,n):void 0});function Ze(e){e=Math.max(0,e);const t=Math.floor(e/1e3);if(t<10){const o=e/1e3,a=o.toFixed(1);return a.endsWith(".0")?`${Math.round(o)}s`:`${a}s`}if(t<60)return`${t}s`;const n=Math.floor(t/3600),s=Math.floor(t%3600/60),r=t%60;return n>0?`${n}h ${s}m ${r}s`:`${s}m ${r}s`}function ln(e){return Ze(Math.max(1e3,Math.round(e/1e3)*1e3))}const et=new Set(["launch","init","session-create","session-load","prompt"]),tt=new Set(["tool-call","tool-waiting"]);function nt(e){let t=null;for(const n of e)(!t||n.timestamp>=t.timestamp)&&(t=n);return t}function dn(e){return e&&et.has(e)?"pulse":e&&tt.has(e)?"twist":"bloom"}const z="stalled";function fn(e,t){const n=nt(e);return!n||n.phase!==z||typeof t=="number"&&t>n.timestamp?null:n}function mn(e){let t=null;for(const n of e)n.phase!==z&&(!t||n.timestamp>=t.timestamp)&&(t=n);return t}const O={get title(){return S.chat_streamingStatus_sessionCorrupted_title()},get message(){return S.chat_streamingStatus_sessionCorrupted_message()}};function pn(e,t){return e?t===!0?{corrupted:!0,title:O.title,message:O.message,detail:e}:{corrupted:!1,title:S.chat_streamingStatus_responseFailed_label(),message:e,detail:null}:null}const gn=c.createSelector((e,t)=>e.unreadTracking.dividerSessionByAgentId[t]??null),hn=c.createSelector(e=>e.unreadTracking.currentlyViewedAgentId),Sn=c.createSelector(e=>{const t=[];for(const o of Object.values(e.panelLayout.byWorkspaceId))for(const a of Object.values(o.panels))for(const i of a.tabs)i.type==="agent"&&i.agentId&&t.push(i.agentId);const n=Object.keys(e.unreadTracking.dividerSessionByAgentId),s=new Set(e.agentSessions.agentIdsByWorkspace[pe]??[]);return{chiefCardVisible:e.sidebarNav.panelItem==="chief",chiefSessionAgentIds:n.filter(o=>s.has(o)),dividerSessionAgentIds:n,openAgentTabIds:t}}),yn=c.createSelector((e,t)=>f(e.questionUi.consumers,t)),st=3e4,b=new Map;function An(e,t){const n=b.get(e);n&&clearTimeout(n.timer);const s=setTimeout(()=>b.delete(e),st);b.set(e,{value:t,timer:s})}function bn(e){const t=b.get(e);if(t)return clearTimeout(t.timer),b.delete(e),t.value}const Q=c.createSelector((e,t,n)=>e.agentWorkers?.byKey[he(t,n)]??ge),rt=c.createSelector((e,t,n)=>{const s=Q.select(e,t,n);return s.status==="unsupported"?[]:(s.snapshot?.workers??[]).filter(r=>r.status==="running"||r.status==="unknown")}),Mn=c.createSelector((e,t,n)=>{const s=Q.select(e,t,n);return s.status==="failed"?!0:s.status!=="ready"||!s.snapshot?!1:s.snapshot.truncated?!0:s.snapshot.support.status!=="supported"&&rt.select(e,t,n).length>0}),ot=1e3,Y={requireViewedAndFocused:!0,requireAssistantTail:!0},M=new Map,g=new Map;let A=null;function L(e){(e===void 0||A===e)&&(A=null)}const at=200;function it(e,t){if(g.delete(e),g.set(e,t),g.size>at){const n=g.keys().next().value;n!==void 0&&g.delete(n)}}function X(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(!n.isStreaming&&typeof n.id=="string"&&n.id.length>0)return n}return null}function wn(e){return X(e)?.id??null}function In(e){x(e,{requireViewedAndFocused:!0})}function _n(e){x(e,{requireViewedAndFocused:!1})}function Cn(e){L(),x(e,Y)}function vn(e){A===e&&(M.has(e)||(A=null,P(e,Y)))}function Tn(e){for(const t of e)typeof t!="string"||t.length===0||(J(t),L(t),P(t,{requireViewedAndFocused:!1}))}function J(e){const t=M.get(e);t&&(clearTimeout(t.timer),M.delete(e))}function x(e,t){J(e),L(e);const n=setTimeout(()=>{M.delete(e),P(e,t)},ot);M.set(e,{timer:n,gates:t})}let U=null;function ut(){return U??=Promise.all([v(()=>import("./CAZb3-k9.js"),__vite__mapDeps([25,17,18,3,19,20,13,5,8,2,11,26,27]),import.meta.url),v(()=>import("./BqJBJZqA.js").then(e=>e.X),__vite__mapDeps([28,29,18,3,17,19,20,13,5,8,2,11,7,4,6,9,10,12,14,30,31,32]),import.meta.url)]).then(([e,t])=>({appStore:e.store,appClient:t.appClient})),U}async function P(e,t){let n=null;try{const{appStore:s,appClient:r}=await ut(),o=s.state;if(t.requireViewedAndFocused&&(o.unreadTracking?.currentlyViewedAgentId!==e||typeof document<"u"&&!document.hasFocus()))return;const a=o.agentSessions?.byAgentId[e];if(!a)return;const i=typeof a.workspaceId=="string"?a.workspaceId:"";if(i.length===0)return;if(t.requireAssistantTail&&o.chatState?.byAgentId[e]?.initialHistoryPending){A=e;return}const u=X(a.messages??[]);if(!u){t.requireAssistantTail&&(A=e);return}if(t.requireAssistantTail&&u.role!=="assistant")return;const l=u.id;if(g.get(e)===l)return;it(e,l),n=l,!(await r.agents.markSeen({workspaceId:i,agentId:e,messageId:l})).success&&g.get(e)===n&&g.delete(e)}catch{n!==null&&g.get(e)===n&&g.delete(e)}}const I=new Map;function Z(e,t){return`${e}\0${t}`}function Rn(e,t){return I.get(Z(e,t))}function $n(e,t,n){I.set(Z(e,t),n)}function kn(e){if(e.length===0)return;const t=new Set(e);for(const n of[...I.keys()]){const s=n.slice(n.indexOf("\0")+1);t.has(s)&&I.delete(n)}}export{xt as $,Et as A,Lt as B,Kt as C,rn as D,Ct as E,nn as F,Tn as G,Pe as H,vn as I,In as J,_n as K,Cn as L,ot as M,wn as N,Qt as O,Yt as P,vt as Q,G as R,kt as S,xe as T,wt as U,B as V,Oe as W,Tt as X,Jt as Y,$t as Z,L as _,Rt as a,It as a0,Xt as a1,rt as a2,Q as a3,Mn as a4,Pt as a5,hn as a6,Sn as a7,gn as a8,Nt as a9,Ft as aa,Vt as ab,Wt as ac,q as ad,yn as ae,cn as af,un as ag,$n as ah,an as ai,zt as aj,Ut as ak,sn as al,An as am,Be as an,bn as ao,R as b,en as c,bt as d,Mt as e,Gt as f,Ee as g,_t as h,tn as i,Zt as j,kn as k,Ot as l,jt as m,pn as n,Bt as o,Ge as p,ke as q,ln as r,qt as s,fn as t,Rn as u,on as v,Dt as w,Ht as x,mn as y,dn as z};
@@ -1,4 +1,4 @@
1
- import{a as e}from"./47q6TsqV.js";var l=e(()=>`
1
+ import{a as e}from"./BaqTNCTY.js";var l=e(()=>`
2
2
  /* Font Awesome icon styling - consolidated */
3
3
  .label-icon {
4
4
  display: inline-block;
@@ -1,4 +1,4 @@
1
- import{p as B}from"./DkZNeDFv.js";import{f as b,$ as m,c4 as C,a6 as S,bC as w,c7 as D,aL as P,c9 as T,aP as z,aK as E,c6 as F,aN as A,ax as W,a0 as _}from"./CJhZDVuE.js";import{p as N}from"./D4PNghsG.js";var L=W.packet,u,v=(u=class{constructor(){this.packet=[],this.setAccTitle=D,this.getAccTitle=P,this.setDiagramTitle=T,this.getDiagramTitle=z,this.getAccDescription=E,this.setAccDescription=F}getConfig(){const t=m({...L,...A().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){_(),this.packet=[]}},b(u,"PacketDB"),u),M=1e4,Y=b((e,t)=>{B(e,t);let r=-1,s=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:i,bits:d,label:c}of e.blocks){if(a!==void 0&&i!==void 0&&i<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??=a+(d??1)-1,d??=i-a+1,r=i,w.debug(`Packet block ${a} - ${r} with label ${c}`);s.length<=l+1&&t.getPacket().length<M;){const[p,o]=I({start:a,end:i,bits:d,label:c},n,l);if(s.push(p),p.end+1===n*l&&(t.pushWord(s),s=[],n++),!o)break;({start:a,end:i,bits:d,label:c}=o)}}t.pushWord(s)},"populate"),I=b((e,t,r)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];const s=t*r-1,n=t*r;return[{start:e.start,end:s,label:e.label,bits:s-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:b(async e=>{const t=await N("packet",e),r=x.parser?.yy;if(!(r instanceof v))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");w.debug(t),Y(t,r)},"parse")},K=b((e,t,r,s)=>{const n=s.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),o=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(o?0:a),k=d*c+2,f=C(t);f.attr("viewBox",`0 0 ${k} ${g}`),S(f,g,k,l.useMaxWidth);for(const[y,$]of p.entries())O(f,$,y,l);f.append("text").text(o).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=b((e,t,r,{rowHeight:s,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=r*(s+l)+l;for(const o of t){const h=o.start%i*a+1,g=(o.end-o.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!d)continue;const k=o.end===o.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),j={draw:K},G={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},H=b(({packet:e}={})=>{const t=m(G,e);return`
1
+ import{p as B}from"./CDKc6BIg.js";import{f as b,$ as m,c4 as C,a6 as S,bC as w,c7 as D,aL as P,c9 as T,aP as z,aK as E,c6 as F,aN as A,ax as W,a0 as _}from"./WIFxQL3B.js";import{p as N}from"./D4PNghsG.js";var L=W.packet,u,v=(u=class{constructor(){this.packet=[],this.setAccTitle=D,this.getAccTitle=P,this.setDiagramTitle=T,this.getDiagramTitle=z,this.getAccDescription=E,this.setAccDescription=F}getConfig(){const t=m({...L,...A().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){_(),this.packet=[]}},b(u,"PacketDB"),u),M=1e4,Y=b((e,t)=>{B(e,t);let r=-1,s=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:i,bits:d,label:c}of e.blocks){if(a!==void 0&&i!==void 0&&i<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??=a+(d??1)-1,d??=i-a+1,r=i,w.debug(`Packet block ${a} - ${r} with label ${c}`);s.length<=l+1&&t.getPacket().length<M;){const[p,o]=I({start:a,end:i,bits:d,label:c},n,l);if(s.push(p),p.end+1===n*l&&(t.pushWord(s),s=[],n++),!o)break;({start:a,end:i,bits:d,label:c}=o)}}t.pushWord(s)},"populate"),I=b((e,t,r)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];const s=t*r-1,n=t*r;return[{start:e.start,end:s,label:e.label,bits:s-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:b(async e=>{const t=await N("packet",e),r=x.parser?.yy;if(!(r instanceof v))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");w.debug(t),Y(t,r)},"parse")},K=b((e,t,r,s)=>{const n=s.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),o=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(o?0:a),k=d*c+2,f=C(t);f.attr("viewBox",`0 0 ${k} ${g}`),S(f,g,k,l.useMaxWidth);for(const[y,$]of p.entries())O(f,$,y,l);f.append("text").text(o).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=b((e,t,r,{rowHeight:s,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=r*(s+l)+l;for(const o of t){const h=o.start%i*a+1,g=(o.end-o.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!d)continue;const k=o.end===o.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),j={draw:K},G={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},H=b(({packet:e}={})=>{const t=m(G,e);return`
2
2
  .packetByte {
3
3
  font-size: ${t.byteFontSize};
4
4
  }
@@ -1 +1 @@
1
- import{bG as b,d9 as _,df as P,bA as k,aQ as C}from"./CZOawK4P.js";import{c as v}from"./ChTqQfQN.js";import{bo as m}from"./DMsRLycu.js";import{Gt as y}from"./Ba4gy30X.js";const A={narrowWidth:600,shortHeight:500,wideWidth:900};function I(e,c,t){let i;e<A.narrowWidth?i=2:(e<A.wideWidth,i=Math.min(3,t));let o;c<A.shortHeight?o=2:o=Math.min(3,Math.ceil(t/i));const n=i*o;return{columns:i,rows:o,maxItems:n}}const h=v("PresetExecutor");async function H(e,c,t){switch(h.info("Applying content preset",{presetId:e,context:t}),e){case"planning":return W(c,t);case"agents-row":return D(c,t);case"changes":return G(c,t);case"review":return L(c,t);default:return c.applyPreset(e),!0}}async function W(e,c){const{workspaceId:t}=c,i=b.select(y.state,t),o=i.length>0?i.reduce((n,r)=>{const l=n.createdAt?new Date(n.createdAt).getTime():1/0;return(r.createdAt?new Date(r.createdAt).getTime():1/0)<l?r:n}):void 0;return e.batchMutations(()=>{const n=e.createGridLayout(2);return o&&e.openTab({type:"agent",title:o.name||m.layout_tabTypes_agent_title(),agentId:o.id,closable:!0,workspaceId:t},n[0]),e.openTab({type:"note",title:m.layout_shared_spec_title(),noteId:"spec",closable:!0,workspaceId:t},n[1]),!0})}async function D(e,c){const{workspaceId:t,containerWidth:i,containerHeight:o}=c,n=6,r=y.state,l=b.select(r,t),p=C.select(r,t).sort((s,a)=>{const d=s.status==="active"||s.isProcessing,u=a.status==="active"||a.isProcessing;if(d&&!u)return-1;if(!d&&u)return 1;const f=s.lastActivity?new Date(s.lastActivity).getTime():s.updatedAt?new Date(s.updatedAt).getTime():0;return(a.lastActivity?new Date(a.lastActivity).getTime():a.updatedAt?new Date(a.updatedAt).getTime():0)-f});h.info("Agents row preset - agent counts",{total:l.length+p.length,foreground:l.length,background:p.length});const g=[...l,...p.slice(0,n-l.length)].slice(0,n);if(g.length===0)return h.info("No agents to display for agents-row preset"),!1;const T=I(i,o,g.length);return h.info("Agent tiling calculated",{tiling:T,agentCount:g.length}),e.batchMutations(()=>{const s=e.createGridLayout(g.length);h.info("Created grid layout for agents",{panelIds:s,panelCount:s.length,agentCount:g.length});for(let a=0;a<g.length;a++){const d=s[a];d&&e.openTab({type:"agent",title:g[a].name||m.layout_tabTypes_agent_title(),agentId:g[a].id,closable:!0,workspaceId:t},d)}return!0})}async function G(e,c){const{workspaceId:t,containerWidth:i,containerHeight:o}=c,n=y.state,r=_.select(n,t),l=P.select(n,t),p=k.select(n,t),g=l.map(a=>({path:a.relativePath,type:"unstaged"})),T=r.map(a=>({path:a.relativePath,type:"staged"}));let s=[...g,...T].slice(0,6);return s.length===0&&p.length>0&&p[0].files&&(s=p[0].files.slice(0,6).map(a=>({path:a.path,type:"committed"}))),e.batchMutations(()=>{if(s.length===0){h.info("No changes to display for changes preset");const u=e.createGridLayout(1);return e.openTab({type:"changes",title:m.layout_tabTypes_changes_title(),closable:!0,workspaceId:t},u[0]),!0}const a=I(i,o,s.length);h.info("Changes tiling calculated",{tiling:a,fileCount:s.length});const d=e.createGridLayout(s.length);h.info("Created grid layout for changes",{panelIds:d,panelCount:d.length,fileCount:s.length});for(let u=0;u<s.length;u++){const f=s[u],w=f.path.split("/").pop()||f.path;e.openTab({type:"diff",title:w,diffPath:f.path,closable:!0,workspaceId:t,data:{staged:f.type==="staged"}},d[u])}return!0})}async function L(e,c){const{workspaceId:t}=c,i=b.select(y.state,t),o=i.length>0?i.reduce((n,r)=>{const l=n.createdAt?new Date(n.createdAt).getTime():1/0;return(r.createdAt?new Date(r.createdAt).getTime():1/0)<l?r:n}):void 0;return e.batchMutations(()=>{const n=e.createGridLayout(2);return o&&e.openTab({type:"agent",title:o.name||m.layout_presetExecutor_coordinator_fallback(),agentId:o.id,closable:!0,workspaceId:t},n[0]),e.openTab({type:"local-changes",title:m.layout_presetExecutor_allChanges_title(),closable:!0,workspaceId:t},n[1]),!0})}export{H as applyContentPreset};
1
+ import{bG as b,d9 as _,df as P,bA as k,aQ as C}from"./DIZ4FVb2.js";import{c as v}from"./ChTqQfQN.js";import{bo as m}from"./DMsRLycu.js";import{Gt as y}from"./Ba4gy30X.js";const A={narrowWidth:600,shortHeight:500,wideWidth:900};function I(e,c,t){let i;e<A.narrowWidth?i=2:(e<A.wideWidth,i=Math.min(3,t));let o;c<A.shortHeight?o=2:o=Math.min(3,Math.ceil(t/i));const n=i*o;return{columns:i,rows:o,maxItems:n}}const h=v("PresetExecutor");async function H(e,c,t){switch(h.info("Applying content preset",{presetId:e,context:t}),e){case"planning":return W(c,t);case"agents-row":return D(c,t);case"changes":return G(c,t);case"review":return L(c,t);default:return c.applyPreset(e),!0}}async function W(e,c){const{workspaceId:t}=c,i=b.select(y.state,t),o=i.length>0?i.reduce((n,r)=>{const l=n.createdAt?new Date(n.createdAt).getTime():1/0;return(r.createdAt?new Date(r.createdAt).getTime():1/0)<l?r:n}):void 0;return e.batchMutations(()=>{const n=e.createGridLayout(2);return o&&e.openTab({type:"agent",title:o.name||m.layout_tabTypes_agent_title(),agentId:o.id,closable:!0,workspaceId:t},n[0]),e.openTab({type:"note",title:m.layout_shared_spec_title(),noteId:"spec",closable:!0,workspaceId:t},n[1]),!0})}async function D(e,c){const{workspaceId:t,containerWidth:i,containerHeight:o}=c,n=6,r=y.state,l=b.select(r,t),p=C.select(r,t).sort((s,a)=>{const d=s.status==="active"||s.isProcessing,u=a.status==="active"||a.isProcessing;if(d&&!u)return-1;if(!d&&u)return 1;const f=s.lastActivity?new Date(s.lastActivity).getTime():s.updatedAt?new Date(s.updatedAt).getTime():0;return(a.lastActivity?new Date(a.lastActivity).getTime():a.updatedAt?new Date(a.updatedAt).getTime():0)-f});h.info("Agents row preset - agent counts",{total:l.length+p.length,foreground:l.length,background:p.length});const g=[...l,...p.slice(0,n-l.length)].slice(0,n);if(g.length===0)return h.info("No agents to display for agents-row preset"),!1;const T=I(i,o,g.length);return h.info("Agent tiling calculated",{tiling:T,agentCount:g.length}),e.batchMutations(()=>{const s=e.createGridLayout(g.length);h.info("Created grid layout for agents",{panelIds:s,panelCount:s.length,agentCount:g.length});for(let a=0;a<g.length;a++){const d=s[a];d&&e.openTab({type:"agent",title:g[a].name||m.layout_tabTypes_agent_title(),agentId:g[a].id,closable:!0,workspaceId:t},d)}return!0})}async function G(e,c){const{workspaceId:t,containerWidth:i,containerHeight:o}=c,n=y.state,r=_.select(n,t),l=P.select(n,t),p=k.select(n,t),g=l.map(a=>({path:a.relativePath,type:"unstaged"})),T=r.map(a=>({path:a.relativePath,type:"staged"}));let s=[...g,...T].slice(0,6);return s.length===0&&p.length>0&&p[0].files&&(s=p[0].files.slice(0,6).map(a=>({path:a.path,type:"committed"}))),e.batchMutations(()=>{if(s.length===0){h.info("No changes to display for changes preset");const u=e.createGridLayout(1);return e.openTab({type:"changes",title:m.layout_tabTypes_changes_title(),closable:!0,workspaceId:t},u[0]),!0}const a=I(i,o,s.length);h.info("Changes tiling calculated",{tiling:a,fileCount:s.length});const d=e.createGridLayout(s.length);h.info("Created grid layout for changes",{panelIds:d,panelCount:d.length,fileCount:s.length});for(let u=0;u<s.length;u++){const f=s[u],w=f.path.split("/").pop()||f.path;e.openTab({type:"diff",title:w,diffPath:f.path,closable:!0,workspaceId:t,data:{staged:f.type==="staged"}},d[u])}return!0})}async function L(e,c){const{workspaceId:t}=c,i=b.select(y.state,t),o=i.length>0?i.reduce((n,r)=>{const l=n.createdAt?new Date(n.createdAt).getTime():1/0;return(r.createdAt?new Date(r.createdAt).getTime():1/0)<l?r:n}):void 0;return e.batchMutations(()=>{const n=e.createGridLayout(2);return o&&e.openTab({type:"agent",title:o.name||m.layout_presetExecutor_coordinator_fallback(),agentId:o.id,closable:!0,workspaceId:t},n[0]),e.openTab({type:"local-changes",title:m.layout_presetExecutor_allChanges_title(),closable:!0,workspaceId:t},n[1]),!0})}export{H as applyContentPreset};