@intent-hq/web 2.375.1 → 2.376.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (324) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/{Dn-hGN0g.js → -Hb5Lymn.js} +1 -1
  3. package/web/app/immutable/chunks/{CQ6jYKtE.js → -bihBnD_.js} +1 -1
  4. package/web/app/immutable/chunks/{DKUOdUyV.js → 0rEEjvhW.js} +1 -1
  5. package/web/app/immutable/chunks/1KDVFF23.js +1 -0
  6. package/web/app/immutable/chunks/{Xgzrv-dN.js → 1wMLd-77.js} +1 -1
  7. package/web/app/immutable/chunks/{BX9IoE2d.js → 26zQgwyJ.js} +1 -1
  8. package/web/app/immutable/chunks/{DSiF4FpM.js → 2WaF6vs_.js} +1 -1
  9. package/web/app/immutable/chunks/{C7Uh4cHO.js → 2tp4E25F.js} +1 -1
  10. package/web/app/immutable/chunks/{Bd6SODL5.js → 471Fgn_p.js} +1 -1
  11. package/web/app/immutable/chunks/{Cpr2SOSC.js → 6FXzbKIf.js} +1 -1
  12. package/web/app/immutable/chunks/{CYYyuCBb.js → 6GF_gyTS.js} +1 -1
  13. package/web/app/immutable/chunks/{DQiheiDa.js → 6HwVA3Xi.js} +48 -48
  14. package/web/app/immutable/chunks/{DODG7FHv.js → 6NqQpMgA.js} +1 -1
  15. package/web/app/immutable/chunks/{DY61j2wq.js → 7n3mxV6t.js} +1 -1
  16. package/web/app/immutable/chunks/{B_jbAa0I.js → 8PIbpdJu.js} +1 -1
  17. package/web/app/immutable/chunks/{C-7W2F0B.js → 8UE1B61A.js} +1 -1
  18. package/web/app/immutable/chunks/{B4SJ0wZk.js → 8VOCP3Xx.js} +1 -1
  19. package/web/app/immutable/chunks/{B4n9OEnJ.js → B4wiFjXK.js} +1 -1
  20. package/web/app/immutable/chunks/{CUXVMwZ6.js → B5n1Er-h.js} +1 -1
  21. package/web/app/immutable/chunks/B61tWwOC.js +1 -0
  22. package/web/app/immutable/chunks/{BDsVnMYl.js → B6ZbCtHN.js} +1 -1
  23. package/web/app/immutable/chunks/{CM4xaytB.js → B6Zf-ZTX.js} +1 -1
  24. package/web/app/immutable/chunks/{YfYAjqUM.js → B77YOXDU.js} +1 -1
  25. package/web/app/immutable/chunks/{BTKPx9nP.js → B85xL2lt.js} +3 -3
  26. package/web/app/immutable/chunks/{D3HVFnZe.js → B8tcC_lC.js} +1 -1
  27. package/web/app/immutable/chunks/{67uMgcnU.js → B9F4r5fH.js} +1 -1
  28. package/web/app/immutable/chunks/{CtX28OJm.js → BA7mfVzm.js} +1 -1
  29. package/web/app/immutable/chunks/{kFANwwYX.js → BEbBWmo4.js} +1 -1
  30. package/web/app/immutable/chunks/{C7TJE1vk.js → BEv4fIdD.js} +1 -1
  31. package/web/app/immutable/chunks/{C9EedYBu.js → BFT4wQs3.js} +1 -1
  32. package/web/app/immutable/chunks/{DNozBV3M.js → BGql-rAX.js} +1 -1
  33. package/web/app/immutable/chunks/{iykV4pvb.js → BHsQzwHt.js} +1 -1
  34. package/web/app/immutable/chunks/{Ds6Uj2aI.js → BIGkxv6Q.js} +1 -1
  35. package/web/app/immutable/chunks/{BWtq4mC4.js → BIwMjRQQ.js} +1 -1
  36. package/web/app/immutable/chunks/{CzEqpD5b.js → BLNcc2k4.js} +1 -1
  37. package/web/app/immutable/chunks/{BbzFLKZE.js → BMScw2DS.js} +1 -1
  38. package/web/app/immutable/chunks/{gsUgKMwT.js → BMfUzLG6.js} +1 -1
  39. package/web/app/immutable/chunks/{DD_c8x6U.js → BOZ6hjJI.js} +2 -2
  40. package/web/app/immutable/chunks/{mM-wy2h5.js → BP7XtCsE.js} +1 -1
  41. package/web/app/immutable/chunks/{NgEAPl8f.js → BPo1GPk4.js} +2 -2
  42. package/web/app/immutable/chunks/{CF0098kp.js → BPqKxoH8.js} +1 -1
  43. package/web/app/immutable/chunks/{BKPOvbtV.js → BPx3dFHu.js} +1 -1
  44. package/web/app/immutable/chunks/{DuPkRrZF.js → BSyKFBWd.js} +1 -1
  45. package/web/app/immutable/chunks/{DaUQbJQJ.js → BWBQA0E0.js} +1 -1
  46. package/web/app/immutable/chunks/{dqvdjjXR.js → BWIYTJ4a.js} +3 -3
  47. package/web/app/immutable/chunks/{BDXSQt10.js → BWyPNph7.js} +2 -2
  48. package/web/app/immutable/chunks/{MBA6k0j3.js → BYBN65Dm.js} +1 -1
  49. package/web/app/immutable/chunks/{CiD4x8Gl.js → BZytk_HL.js} +1 -1
  50. package/web/app/immutable/chunks/{ChbTF48b.js → BaO0hXxI.js} +1 -1
  51. package/web/app/immutable/chunks/{-18XT1CI.js → BblwdMxR.js} +1 -1
  52. package/web/app/immutable/chunks/{DIylOQL5.js → BcEldzTj.js} +1 -1
  53. package/web/app/immutable/chunks/{D_o67XD6.js → BcliNPZw.js} +2 -2
  54. package/web/app/immutable/chunks/{CRl6sOjh.js → Bco7_wmI.js} +1 -1
  55. package/web/app/immutable/chunks/{B_3JIPw3.js → BdBn1UvT.js} +1 -1
  56. package/web/app/immutable/chunks/{SMT1sep4.js → BdNdGDSe.js} +1 -1
  57. package/web/app/immutable/chunks/{DppdhMsn.js → BdaN2XXm.js} +1 -1
  58. package/web/app/immutable/chunks/{CMFbZICM.js → Bdn-RKqv.js} +2 -2
  59. package/web/app/immutable/chunks/{MyWfy8xc.js → BePTHsT0.js} +1 -1
  60. package/web/app/immutable/chunks/{PZRS5x7m.js → Bek4Es60.js} +1 -1
  61. package/web/app/immutable/chunks/{H3ekn9Mt.js → BjRLyMd2.js} +1 -1
  62. package/web/app/immutable/chunks/{5mmUTVhd.js → BjYingUt.js} +1 -1
  63. package/web/app/immutable/chunks/{DZ8q1fkg.js → BkcFLgQ7.js} +1 -1
  64. package/web/app/immutable/chunks/{C1m4pSe1.js → BkmrZjpE.js} +1 -1
  65. package/web/app/immutable/chunks/{ClkC2csJ.js → BlXvVwTG.js} +1 -1
  66. package/web/app/immutable/chunks/{DqujvsHK.js → BntFPxwt.js} +1 -1
  67. package/web/app/immutable/chunks/{CZJDTQJi.js → Bo5PTszQ.js} +1 -1
  68. package/web/app/immutable/chunks/{CkRR8JwL.js → BoLBqPln.js} +1 -1
  69. package/web/app/immutable/chunks/{CSbK1_CV.js → BpT_ybtH.js} +2 -2
  70. package/web/app/immutable/chunks/{BOsHJKjO.js → BpimY2Bn.js} +2 -2
  71. package/web/app/immutable/chunks/{eGxC9Zfx.js → Br9RT7xb.js} +1 -1
  72. package/web/app/immutable/chunks/{BsknvdQb.js → Bs1CY0TU.js} +1 -1
  73. package/web/app/immutable/chunks/{DV_Q2hiQ.js → Bt2C0fwl.js} +2 -2
  74. package/web/app/immutable/chunks/{DgOwYCT0.js → BtT-JO5g.js} +1 -1
  75. package/web/app/immutable/chunks/{Dgn5Otg4.js → Bu4YAtNq.js} +1 -1
  76. package/web/app/immutable/chunks/{BCKmKE5y.js → BuFlry2f.js} +1 -1
  77. package/web/app/immutable/chunks/{Bk5eDkyv.js → BuXc_maR.js} +1 -1
  78. package/web/app/immutable/chunks/{DvOdp8Jx.js → Bv5YjDej.js} +1 -1
  79. package/web/app/immutable/chunks/{ChoM6f6w.js → BvjVhe2e.js} +1 -1
  80. package/web/app/immutable/chunks/{Bu7GfLOK.js → BvvCJG4x.js} +1 -1
  81. package/web/app/immutable/chunks/{BSroN1Rt.js → ByJyX5qZ.js} +1 -1
  82. package/web/app/immutable/chunks/{C_GpcLP2.js → BzwPeFzF.js} +1 -1
  83. package/web/app/immutable/chunks/{Q5HWwxnx.js → C0kzahSL.js} +1 -1
  84. package/web/app/immutable/chunks/{vXh-PQQZ.js → C0nXBDlv.js} +1 -1
  85. package/web/app/immutable/chunks/{COIbDYtT.js → C22LcJ65.js} +3 -3
  86. package/web/app/immutable/chunks/{U6kzE96u.js → C3beNZjc.js} +1 -1
  87. package/web/app/immutable/chunks/{DINI7WNX.js → C3iIVLbv.js} +1 -1
  88. package/web/app/immutable/chunks/{tnfQ532f.js → C4cfJuJM.js} +1 -1
  89. package/web/app/immutable/chunks/{iwQqOlmN.js → C7Ibt0hX.js} +1 -1
  90. package/web/app/immutable/chunks/{fXti0RCR.js → C7hm9bSX.js} +1 -1
  91. package/web/app/immutable/chunks/{CiJWG6bO.js → C82gBCX8.js} +1 -1
  92. package/web/app/immutable/chunks/{CXjIzVpl.js → C9x6kmJK.js} +1 -1
  93. package/web/app/immutable/chunks/{BmC0p6X8.js → CALsJq65.js} +1 -1
  94. package/web/app/immutable/chunks/{CnMgdwKG.js → CBLFNmYJ.js} +1 -1
  95. package/web/app/immutable/chunks/{DaysnCXK.js → CBmGf0Ke.js} +1 -1
  96. package/web/app/immutable/chunks/{gcpLbmeh.js → CCEqDzPP.js} +1 -1
  97. package/web/app/immutable/chunks/{DgH7yAy-.js → CCWqLSpV.js} +1 -1
  98. package/web/app/immutable/chunks/{C5l6D9GX.js → CClsvy7n.js} +1 -1
  99. package/web/app/immutable/chunks/{CFqcGY4P.js → CEgHOs22.js} +1 -1
  100. package/web/app/immutable/chunks/{GlvfRTgI.js → CEqmtghP.js} +1 -1
  101. package/web/app/immutable/chunks/{RLFGU-s6.js → CFLXlno6.js} +1 -1
  102. package/web/app/immutable/chunks/{E0KBz4I2.js → CGx1Vpie.js} +1 -1
  103. package/web/app/immutable/chunks/{Zw1KxEm0.js → CIzlkLuu.js} +1 -1
  104. package/web/app/immutable/chunks/{D806p2LW.js → CJBG3N9y.js} +3 -3
  105. package/web/app/immutable/chunks/{D5HhSqbc.js → CJJ2D2db.js} +1 -1
  106. package/web/app/immutable/chunks/{LAC4SG96.js → CJfYXtXQ.js} +1 -1
  107. package/web/app/immutable/chunks/{C0JDt0nm.js → CKGNYRrS.js} +2 -2
  108. package/web/app/immutable/chunks/{P3O1Bi5N.js → CKKDDlBT.js} +1 -1
  109. package/web/app/immutable/chunks/{Cy9qAjIU.js → CL6yJ0UM.js} +1 -1
  110. package/web/app/immutable/chunks/{DGlNRMU1.js → CLG1DPRT.js} +2 -2
  111. package/web/app/immutable/chunks/{qPYbzgcC.js → CMgAi196.js} +1 -1
  112. package/web/app/immutable/chunks/{zjXa9LeK.js → CMn7jvlN.js} +1 -1
  113. package/web/app/immutable/chunks/{LGfIT3MS.js → CN0Csvus.js} +3 -3
  114. package/web/app/immutable/chunks/{Ctusnxiu.js → CN9rXc7J.js} +1 -1
  115. package/web/app/immutable/chunks/{DfdqseMI.js → COK2QQN9.js} +1 -1
  116. package/web/app/immutable/chunks/{LDe4IsYZ.js → COZ3dQ_A.js} +1 -1
  117. package/web/app/immutable/chunks/{IVk1JAtP.js → CPEu2Vil.js} +1 -1
  118. package/web/app/immutable/chunks/{DSiZ9qTg.js → CQQvsDes.js} +1 -1
  119. package/web/app/immutable/chunks/{Cq76BY90.js → CQww8mRz.js} +1 -1
  120. package/web/app/immutable/chunks/{CberoJl6.js → CQx3pm4t.js} +1 -1
  121. package/web/app/immutable/chunks/{uE6SDSU_.js → CSepGuJ-.js} +1 -1
  122. package/web/app/immutable/chunks/CT6GHk2v.js +1 -0
  123. package/web/app/immutable/chunks/{BxVNHcGR.js → CTDEoCzv.js} +1 -1
  124. package/web/app/immutable/chunks/{oJ_ZL_ms.js → CToFQRbb.js} +1 -1
  125. package/web/app/immutable/chunks/{alEgYZuT.js → CUUAtNdA.js} +1 -1
  126. package/web/app/immutable/chunks/CW7lfTzm.js +177 -0
  127. package/web/app/immutable/chunks/{C58p8xFm.js → CWFWI1JB.js} +1 -1
  128. package/web/app/immutable/chunks/{S7_elIn6.js → CX4bqTrJ.js} +1 -1
  129. package/web/app/immutable/chunks/{y-lOZYhA.js → CXfim-2t.js} +1 -1
  130. package/web/app/immutable/chunks/{D9JbOH_S.js → CXgy6Mbb.js} +1 -1
  131. package/web/app/immutable/chunks/{D1JjMDax.js → CYCawVEx.js} +1 -1
  132. package/web/app/immutable/chunks/{BlyKuyB7.js → CZw2t1gL.js} +1 -1
  133. package/web/app/immutable/chunks/{kuwy0JZA.js → C_0xgdqY.js} +1 -1
  134. package/web/app/immutable/chunks/{DzVqblgy.js → C_BHeuK7.js} +1 -1
  135. package/web/app/immutable/chunks/{DuDStABj.js → Ca9qLvAG.js} +1 -1
  136. package/web/app/immutable/chunks/{6JKrky9_.js → CbnYiL9b.js} +1 -1
  137. package/web/app/immutable/chunks/{CHUCX9T6.js → CdgNuFkc.js} +1 -1
  138. package/web/app/immutable/chunks/{DZCvTRBp.js → CdpTO1ew.js} +1 -1
  139. package/web/app/immutable/chunks/{CHLHWub0.js → CfCk_l9B.js} +1 -1
  140. package/web/app/immutable/chunks/{DoIr8Q2r.js → Ch-pFfsN.js} +1 -1
  141. package/web/app/immutable/chunks/{xS3xfMki.js → Cihg5T05.js} +1 -1
  142. package/web/app/immutable/chunks/{fXwGuYzr.js → CihneiLA.js} +1 -1
  143. package/web/app/immutable/chunks/{DgaiTQpw.js → CjK2zm52.js} +1 -1
  144. package/web/app/immutable/chunks/{BJuNVIII.js → CkrblKaH.js} +1 -1
  145. package/web/app/immutable/chunks/{gSg6l32T.js → CmdE1AJL.js} +1 -1
  146. package/web/app/immutable/chunks/{C44hzh9R.js → CntPxeXh.js} +1 -1
  147. package/web/app/immutable/chunks/{1KCpY35B.js → Co4Bm5eY.js} +1 -1
  148. package/web/app/immutable/chunks/{BjWOzuMm.js → CpIVKWwx.js} +4 -4
  149. package/web/app/immutable/chunks/{D_Y9WK2x.js → CqM0ozU7.js} +1 -1
  150. package/web/app/immutable/chunks/{B4mmdCiF.js → CqsFOLCu.js} +1 -1
  151. package/web/app/immutable/chunks/{l4TJFOXC.js → CrNPV-Vp.js} +1 -1
  152. package/web/app/immutable/chunks/{DgIh2Fs6.js → CrgJwS7n.js} +1 -1
  153. package/web/app/immutable/chunks/{CFhbo3o1.js → Cs85XoQa.js} +1 -1
  154. package/web/app/immutable/chunks/{DZmV2kHY.js → CtECFAby.js} +1 -1
  155. package/web/app/immutable/chunks/{D6GBnYDv.js → CtguhKZB.js} +1 -1
  156. package/web/app/immutable/chunks/{C-JwFHXS.js → CuAAvi1f.js} +1 -1
  157. package/web/app/immutable/chunks/{DHqMqA41.js → CvZrEuUX.js} +1 -1
  158. package/web/app/immutable/chunks/{m8gDbIPC.js → Cvp_IOBl.js} +2 -2
  159. package/web/app/immutable/chunks/{D6hUzfgH.js → Cw3skelK.js} +1 -1
  160. package/web/app/immutable/chunks/{CGG7txTQ.js → CwBMToxu.js} +1 -1
  161. package/web/app/immutable/chunks/{B3fU6XQp.js → D-rGNJzU.js} +1 -1
  162. package/web/app/immutable/chunks/{TodMLsNs.js → D1DNtybi.js} +1 -1
  163. package/web/app/immutable/chunks/{grQh-L5q.js → D2eaIIb4.js} +2 -2
  164. package/web/app/immutable/chunks/{DJ2vnC9G.js → D4EwlENg.js} +1 -1
  165. package/web/app/immutable/chunks/{CFUDIGea.js → D4gtBVLN.js} +1 -1
  166. package/web/app/immutable/chunks/{BepABSAk.js → D4lP_X71.js} +1 -1
  167. package/web/app/immutable/chunks/{o1gxvTJU.js → D5bd-ecJ.js} +1 -1
  168. package/web/app/immutable/chunks/{CpYW1yE7.js → D5raGlU7.js} +2 -2
  169. package/web/app/immutable/chunks/{B5CW3gDe.js → D6W9Whdp.js} +3 -3
  170. package/web/app/immutable/chunks/{Byjmi-8z.js → D7u67tV0.js} +2 -2
  171. package/web/app/immutable/chunks/{BkLJnbD1.js → D7vAVIvz.js} +1 -1
  172. package/web/app/immutable/chunks/{D85P44Dj.js → D8B7qxXm.js} +1 -1
  173. package/web/app/immutable/chunks/{Db_i0IkD.js → D8XqXEXt.js} +1 -1
  174. package/web/app/immutable/chunks/{DoQnqQZn.js → DCibR4Jk.js} +1 -1
  175. package/web/app/immutable/chunks/{BowQ7sBM.js → DDFAsI-l.js} +1 -1
  176. package/web/app/immutable/chunks/{LNZr9DCJ.js → DHSWOw-U.js} +1 -1
  177. package/web/app/immutable/chunks/{C6GJZLOP.js → DHbv9I-C.js} +1 -1
  178. package/web/app/immutable/chunks/{jG67l4Uo.js → DIDOx8hd.js} +2 -2
  179. package/web/app/immutable/chunks/{D_otNUZh.js → DJk5np0g.js} +1 -1
  180. package/web/app/immutable/chunks/{CBl7oWeN.js → DKHSbBis.js} +1 -1
  181. package/web/app/immutable/chunks/{D-ls8znw.js → DKIi_opT.js} +1 -1
  182. package/web/app/immutable/chunks/{5uDsFopc.js → DM4cCUDd.js} +1 -1
  183. package/web/app/immutable/chunks/{B6CxzJhM.js → DOEOrBL9.js} +1 -1
  184. package/web/app/immutable/chunks/{CyyqjEBc.js → DOMMuuHJ.js} +1 -1
  185. package/web/app/immutable/chunks/{kFRDyP-N.js → DPF9_zKV.js} +1 -1
  186. package/web/app/immutable/chunks/{C6jYe9up.js → DPLDRqMC.js} +1 -1
  187. package/web/app/immutable/chunks/{BO3WriTy.js → DPbnmxjX.js} +1 -1
  188. package/web/app/immutable/chunks/{CBtQnhwT.js → DPztwkUP.js} +1 -1
  189. package/web/app/immutable/chunks/{DinWeICM.js → DQGdnFBd.js} +1 -1
  190. package/web/app/immutable/chunks/{mdoDOmuU.js → DQmW4_9G.js} +1 -1
  191. package/web/app/immutable/chunks/{DzfHkSZF.js → DS5B84mn.js} +1 -1
  192. package/web/app/immutable/chunks/{P-zm4ktU.js → DSvyONiq.js} +1 -1
  193. package/web/app/immutable/chunks/{jaSHlZjt.js → DT8FaJbg.js} +1 -1
  194. package/web/app/immutable/chunks/{BIo9gpGl.js → DUT4xhYi.js} +1 -1
  195. package/web/app/immutable/chunks/{D6YX_GFv.js → DVok8lSR.js} +1 -1
  196. package/web/app/immutable/chunks/{CdvXSvOC.js → DX_ZPiRZ.js} +1 -1
  197. package/web/app/immutable/chunks/{BmEIQ8E-.js → DY-U3TFa.js} +1 -1
  198. package/web/app/immutable/chunks/{COUB9dHY.js → DYGC3eZn.js} +1 -1
  199. package/web/app/immutable/chunks/{Jcrj5YZi.js → DZEGFjPx.js} +1 -1
  200. package/web/app/immutable/chunks/{BrFnR1vI.js → DZbKPa1t.js} +1 -1
  201. package/web/app/immutable/chunks/{PCtwJJ25.js → D_xvUCUD.js} +1 -1
  202. package/web/app/immutable/chunks/{DoA3JmdK.js → DbSttgXv.js} +1 -1
  203. package/web/app/immutable/chunks/{3rxHCGTW.js → DcZr-m_l.js} +1 -1
  204. package/web/app/immutable/chunks/{DK-vph3Z.js → DdJ4cD_u.js} +1 -1
  205. package/web/app/immutable/chunks/{Dtveg46I.js → DeDQhZv5.js} +1 -1
  206. package/web/app/immutable/chunks/{pZsrsFnW.js → Deoe5X7L.js} +1 -1
  207. package/web/app/immutable/chunks/{B7ydANq7.js → Dfq_rEeO.js} +1 -1
  208. package/web/app/immutable/chunks/{BE5ZU7pI.js → DhW_HWBK.js} +1 -1
  209. package/web/app/immutable/chunks/{CYWgGrsf.js → Dh_eorhd.js} +1 -1
  210. package/web/app/immutable/chunks/{ChJ4msi3.js → Dhj-Oo-y.js} +1 -1
  211. package/web/app/immutable/chunks/{CBHXSekd.js → DiEy7mCR.js} +1 -1
  212. package/web/app/immutable/chunks/{F-NRzkEu.js → DiLFzwi3.js} +1 -1
  213. package/web/app/immutable/chunks/{BZSs3eKh.js → DiP5BH15.js} +1 -1
  214. package/web/app/immutable/chunks/{Bb_mQye1.js → Div7CQPf.js} +1 -1
  215. package/web/app/immutable/chunks/{DK3AlKip.js → DjBxG6q0.js} +3 -3
  216. package/web/app/immutable/chunks/{BifXEk-G.js → Dk0afiu6.js} +1 -1
  217. package/web/app/immutable/chunks/{CpV-ehZ5.js → DkYquFOp.js} +1 -1
  218. package/web/app/immutable/chunks/DmnStjtN.js +1 -0
  219. package/web/app/immutable/chunks/{DZBnfhEV.js → Dmy603At.js} +1 -1
  220. package/web/app/immutable/chunks/{DJuFWuFo.js → Dn7Cyi1s.js} +1 -1
  221. package/web/app/immutable/chunks/{CBRC7st2.js → Domj4ONg.js} +2 -2
  222. package/web/app/immutable/chunks/{CQxAYjD7.js → DpMsJtM0.js} +1 -1
  223. package/web/app/immutable/chunks/{kZanyiqf.js → DpSAF6fh.js} +1 -1
  224. package/web/app/immutable/chunks/{XyC5Phh7.js → DpgIqMGp.js} +1 -1
  225. package/web/app/immutable/chunks/{aToNeEMa.js → DqPe5uyz.js} +1 -1
  226. package/web/app/immutable/chunks/{DmQm2Dw6.js → DtEw_Okh.js} +1 -1
  227. package/web/app/immutable/chunks/{Di9CSB6H.js → DtYDlbcb.js} +1 -1
  228. package/web/app/immutable/chunks/{Bw0E8D92.js → Dv6PZjTW.js} +1 -1
  229. package/web/app/immutable/chunks/{yqs-hTyP.js → DvwOszqf.js} +1 -1
  230. package/web/app/immutable/chunks/{DTutiDCZ.js → DzTe1W0Z.js} +1 -1
  231. package/web/app/immutable/chunks/{CFtfWLBC.js → Dzl5aoA8.js} +1 -1
  232. package/web/app/immutable/chunks/{DyiA0AJU.js → DzsC5hAQ.js} +1 -1
  233. package/web/app/immutable/chunks/{Dv3EtVHJ.js → EmfdzzTF.js} +1 -1
  234. package/web/app/immutable/chunks/{K7F-rH-C.js → IB26d-_M.js} +4 -4
  235. package/web/app/immutable/chunks/{BL39LNxU.js → IdqO6uHC.js} +1 -1
  236. package/web/app/immutable/chunks/{B5bnHhgO.js → J9vGyyn3.js} +1 -1
  237. package/web/app/immutable/chunks/{a-OtAcF_.js → K0CA4l_-.js} +3 -3
  238. package/web/app/immutable/chunks/{DbCeN0Lt.js → KImhPY_I.js} +1 -1
  239. package/web/app/immutable/chunks/{DUXVcIKV.js → KS10KUQ4.js} +1 -1
  240. package/web/app/immutable/chunks/{DVcCnfZH.js → KaHKnBKn.js} +1 -1
  241. package/web/app/immutable/chunks/{C-nutp9J.js → L0PmMCK6.js} +1 -1
  242. package/web/app/immutable/chunks/{YbP7yBkb.js → LFlj1pUW.js} +1 -1
  243. package/web/app/immutable/chunks/{4r36FIB7.js → MujvTDgv.js} +1 -1
  244. package/web/app/immutable/chunks/{QjNLPDal.js → Mw2Z7eLx.js} +1 -1
  245. package/web/app/immutable/chunks/{DtBx3nLm.js → NEcXJ8Qo.js} +1 -1
  246. package/web/app/immutable/chunks/{CJZ6Gu1k.js → Ow3KARwj.js} +1 -1
  247. package/web/app/immutable/chunks/{CCEQVSjx.js → P27dN3C7.js} +1 -1
  248. package/web/app/immutable/chunks/{BK0rB8kZ.js → Pqx84Da9.js} +1 -1
  249. package/web/app/immutable/chunks/{8TUe2kcz.js → PtMxuYy8.js} +1 -1
  250. package/web/app/immutable/chunks/Q-Hp56ht.js +6 -0
  251. package/web/app/immutable/chunks/{zrdFYBgX.js → Qzhec1TY.js} +1 -1
  252. package/web/app/immutable/chunks/{Cr9glZDh.js → RyWl3sPF.js} +1 -1
  253. package/web/app/immutable/chunks/{BReER1n3.js → THm8CnE2.js} +1 -1
  254. package/web/app/immutable/chunks/{C-zY3GF-.js → UHs-xfbd.js} +1 -1
  255. package/web/app/immutable/chunks/{CqJcYBUx.js → UaQjBP_O.js} +1 -1
  256. package/web/app/immutable/chunks/{D0Ayz4Dm.js → Ug7t_gUQ.js} +1 -1
  257. package/web/app/immutable/chunks/{DXwcjaPR.js → Ydj2ePK_.js} +2 -2
  258. package/web/app/immutable/chunks/{1Wzdy1K8.js → YopO0YfH.js} +6 -6
  259. package/web/app/immutable/chunks/{DgiJ63hc.js → ZWIGjqdM.js} +3 -3
  260. package/web/app/immutable/chunks/{BQg4hK6W.js → Zg9SWWIQ.js} +1 -1
  261. package/web/app/immutable/chunks/{Cwvt_P5T.js → a0CN3en2.js} +1 -1
  262. package/web/app/immutable/chunks/{njprJ3WZ.js → aqQCGQpk.js} +1 -1
  263. package/web/app/immutable/chunks/{BYC0ucSR.js → bcfKuKQn.js} +1 -1
  264. package/web/app/immutable/chunks/{BHni5QqW.js → cP-p0FYL.js} +1 -1
  265. package/web/app/immutable/chunks/{DMqmqAT4.js → dIyiVmNx.js} +1 -1
  266. package/web/app/immutable/chunks/{DcNvIFJV.js → ebxZ5PPm.js} +1 -1
  267. package/web/app/immutable/chunks/{DVNEvaXi.js → fFnyP4ej.js} +1 -1
  268. package/web/app/immutable/chunks/{eZSKfAFO.js → gY6D1J3N.js} +1 -1
  269. package/web/app/immutable/chunks/{B9-EoZ1p.js → iNDSBgu7.js} +1 -1
  270. package/web/app/immutable/chunks/{BLYFfqzj.js → jUAybD8G.js} +1 -1
  271. package/web/app/immutable/chunks/{ChGLvrw4.js → kZL4nf_J.js} +4 -4
  272. package/web/app/immutable/chunks/{B0O5mhBM.js → mnnjJoDI.js} +1 -1
  273. package/web/app/immutable/chunks/{DyT0mOdr.js → my69Ox9w.js} +4 -4
  274. package/web/app/immutable/chunks/{DQAJLaJ3.js → nHwpsxWy.js} +1 -1
  275. package/web/app/immutable/chunks/{Dqtmunn7.js → pIjvEfMB.js} +5 -5
  276. package/web/app/immutable/chunks/{BY16_RoT.js → q9cUG1dc.js} +1 -1
  277. package/web/app/immutable/chunks/{DRPKvmfX.js → qg2KHuAY.js} +1 -1
  278. package/web/app/immutable/chunks/{D1HPSWvP.js → qyBT4DY2.js} +1 -1
  279. package/web/app/immutable/chunks/{Cn8hCY5y.js → rCkv5VsR.js} +2 -2
  280. package/web/app/immutable/chunks/{hK5d1dQ0.js → rHK6sLv4.js} +1 -1
  281. package/web/app/immutable/chunks/{BevEoYEw.js → sEj9k2KM.js} +1 -1
  282. package/web/app/immutable/chunks/{qkmjEtXH.js → sZBOVpM6.js} +3 -3
  283. package/web/app/immutable/chunks/{CyaIe0jD.js → tGL9OSFf.js} +1 -1
  284. package/web/app/immutable/chunks/{mF8ZdCMN.js → thdnIk1K.js} +1 -1
  285. package/web/app/immutable/chunks/{t4bVJhrn.js → ucKP4cAm.js} +4 -4
  286. package/web/app/immutable/chunks/{BBiqqybB.js → wfSdTH77.js} +1 -1
  287. package/web/app/immutable/chunks/{Ilt_8E2i.js → x8bssjcx.js} +1 -1
  288. package/web/app/immutable/chunks/{Cin575hV.js → xFC1lhKl.js} +1 -1
  289. package/web/app/immutable/chunks/{Bl8fHOk-.js → xIoxAtek.js} +1 -1
  290. package/web/app/immutable/chunks/{DCTwUEO7.js → xJBWkpxc.js} +1 -1
  291. package/web/app/immutable/chunks/{DkkEizQf.js → zzl2tBQf.js} +1 -1
  292. package/web/app/immutable/entry/{app.B-3yrq60.js → app.YY31OTuo.js} +3 -3
  293. package/web/app/immutable/entry/start.DBl7cnaM.js +1 -0
  294. package/web/app/immutable/nodes/{0.Dr7z-ndg.js → 0.I2U7Nyeq.js} +1 -1
  295. package/web/app/immutable/nodes/{1.DszvgcVt.js → 1.CgZVKAf9.js} +1 -1
  296. package/web/app/immutable/nodes/{10.mpjVYgcT.js → 10.CsryZO2H.js} +5 -5
  297. package/web/app/immutable/nodes/{11.d9OIWvmS.js → 11.BTowiakT.js} +1 -1
  298. package/web/app/immutable/nodes/{12.hNKUSgvY.js → 12.S6PrlAwz.js} +1 -1
  299. package/web/app/immutable/nodes/{13.NTcuwB8X.js → 13.Bs_o-uwb.js} +1 -1
  300. package/web/app/immutable/nodes/{14.C4hEzDzc.js → 14.CIZDoMeA.js} +3 -3
  301. package/web/app/immutable/nodes/{15.BGv16BME.js → 15.CzU59iiE.js} +1 -1
  302. package/web/app/immutable/nodes/{16.BLKEYdtz.js → 16.BgJmXimX.js} +1 -1
  303. package/web/app/immutable/nodes/{17.Cw1VnAlL.js → 17.BWRlIYI7.js} +1 -1
  304. package/web/app/immutable/nodes/{18.BC2tc74_.js → 18.BV2orlA1.js} +1 -1
  305. package/web/app/immutable/nodes/{19.BLf_cCOa.js → 19.vtvcgUzO.js} +2 -2
  306. package/web/app/immutable/nodes/{2.DT49t-u_.js → 2.xEZtPl1l.js} +4 -4
  307. package/web/app/immutable/nodes/{20.CAN0HPlm.js → 20.DLg8hCzP.js} +1 -1
  308. package/web/app/immutable/nodes/{3.CHLlivF3.js → 3.hyVEcKKo.js} +1 -1
  309. package/web/app/immutable/nodes/{4.D2tKSs2v.js → 4.CdWgO8Xv.js} +1 -1
  310. package/web/app/immutable/nodes/{5.B9Lx7aa1.js → 5.BhLUauX8.js} +1 -1
  311. package/web/app/immutable/nodes/{6.BXEdmXk5.js → 6.B3Vi01S1.js} +1 -1
  312. package/web/app/immutable/nodes/{7.Cg1blkaN.js → 7.DW7p588B.js} +1 -1
  313. package/web/app/immutable/nodes/{8.B5g4h2T5.js → 8.Bt8gdMyu.js} +1 -1
  314. package/web/app/immutable/nodes/{9.CQeYWw6-.js → 9.BSZ1-MKZ.js} +4 -4
  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/B6sO6A0G.js +0 -1
  319. package/web/app/immutable/chunks/BSev9KPj.js +0 -1
  320. package/web/app/immutable/chunks/Bv8Gaorn.js +0 -1
  321. package/web/app/immutable/chunks/CAEqRKhy.js +0 -1
  322. package/web/app/immutable/chunks/Dr4PDf9D.js +0 -6
  323. package/web/app/immutable/chunks/EZ4dI6hS.js +0 -177
  324. package/web/app/immutable/entry/start.DZZRsHd3.js +0 -1
@@ -1,4 +1,4 @@
1
- import{J4 as j,Jr as r,sl as me,nX as m,BU as Se,nW as g,m as F,rT as K,BV as q,i as ye,nJ as $,A as be}from"./NgEAPl8f.js";import{k as ve}from"./uXuxG9cN.js";import{selectCurrentWorkspaceTabId as he}from"./-18XT1CI.js";import{s as Ce}from"./BWtq4mC4.js";import{cR as Ee,cf as w,cd as Me,cc as Ie,co as Ae,bJ as ke,t as we,cJ as P,O as Pe,e8 as _e,dS as U,aJ as Oe,cA as Re}from"./CpV-ehZ5.js";import{J as _,K as Te}from"./5uDsFopc.js";import{P as Le,c as Ne}from"./B5aYN90J.js";import{bm as R}from"./Bv8Gaorn.js";import{l as Be}from"./C44hzh9R.js";function He(e,t,n){if(!e||!n?.length)return null;const o=new Set(n);if(t!==null&&!o.has(t))return null;const c=e.lastIndexOf("/"),s=c>=0?e.slice(c+1):"",a=o.has(s)?e.slice(0,c):e;return t===null?a:`${a}/${t}`}const xe={major:5,minor:2};function De(e){const{major:t,minor:n}=xe;return ve(e,t,n)}function E(e,t,n){const o=j(e);return o.providerId&&n(o.providerId)===t?o.modelId:e}function C(e,t){const n=t(e);if(n)return n;const o=/\/(minimal|low|medium|high|xhigh|max|ultra|none)$/i.exec(e);if(!o||o.index===0)return;const c=t(e.slice(0,o.index)),s=o[1].toLowerCase();return c?`${c} (${s.charAt(0).toUpperCase()}${s.slice(1)})`:void 0}function We(e,t){return JSON.stringify([t||null,e])}const je=r.createSelector((e,t)=>(t?e.providerModels?.byWorkspaceId?.[t]:e.providerModels?.byProviderId)??{}),Bt=r.createSelector((e,t,n)=>je.select(e,n)[t]),Ht=r.createSelector(e=>e.providerModels?.clearEpoch??0),xt=r.createSelector((e,t)=>(t?e.providerModels?.requestsByWorkspaceId?.[t]?.map:e.providerModels?.requests?.map)??{}),Fe=r.createSelector(e=>Object.fromEntries(Object.values(e.providerModels?.observers?.map??{}).flatMap(({providerIds:t,workspaceId:n})=>t.map(o=>[We(o,n),{providerId:o,workspaceId:n}])))),Dt=r.createSelector(e=>Object.keys(Fe.select(e)).sort()),Ke=r.createSelector((e,t,n)=>me(e.providerModels?.learnedNames??{},t,n)),Wt=r.createSelector(e=>e.providerModels.learnedNames),jt=r.createSelector(e=>e.model),Ft=r.createSelector(e=>{const t=Ee.select(e),n=w.select(e);if(!t||n!=="owner"&&n!=="member")return null;const o=_.select(e);return n==="member"&&!o?null:JSON.stringify([t,o,n==="member"?Me.select(e):null])});function Q(e,t){return t??_.select(e)}const O=r.createSelector((e,t)=>{const n=Q(e,t),o=e.model.availableModelsProviderId===n?m(e.model.availableModels):[],c=Ie.select(e),s=Ae.select(e)?c?.defaultProviderId===n?c.defaultModelId:null:e.model.providerModels[n];return s||(Te.select(e).includes(n)?Se(o):"")}),qe=r.createSelector((e,t)=>O.select(e,t)!==""),Kt=r.createSelector(e=>_.select(e)!==""||qe.select(e)),$e=r.createSelector(e=>e.model.availableModels),qt=r.createSelector(e=>m($e.select(e))),$t=r.createSelector(e=>e.model.availableModelsProviderId),J=r.createSelector((e,t)=>{const n=Q(e,t);return e.model.loadingState[n]??null}),Ut=r.createSelector((e,t)=>J.select(e,t)?.status==="loading"),Qt=r.createSelector((e,t)=>{const n=J.select(e,t);return n?.status!=="error"?null:n.error??null}),Jt=r.createSelector(e=>{const t={};for(const[n,o]of Object.entries(e.model.loadingState))o.warning&&(t[n]=o.warning);return t}),Gt=r.createSelector(e=>{const t={};for(const[n,o]of Object.entries(e.model.loadingState))o.stale&&(t[n]=!0);return t}),Yt=r.createSelector(e=>{const t={};for(const[n,o]of Object.entries(e.model.loadingState))o.warning&&o.warningKind&&(t[n]=o.warningKind);return t}),zt=r.createSelector(e=>e.model.providerModels),Vt=r.createSelector(e=>e.model.defaultReasoningEffort),Xt=r.createSelector(e=>e.model.modelPickerCollapsedGroups),Zt=r.createSelector((e,t)=>e.model.fallbackInfoByAgentId[t]??null),Ue=r.createSelector((e,t,n,o)=>{const c=d=>P.select(e,d,o),s=c(t),a=E(n,s,c),l=e.model?.availableModels;if(!o&&l&&(!s||s===e.model.availableModelsProviderId)){const d=g(l,n)??g(l,a);if(d)return d}const i=o?e.providerModels?.byWorkspaceId?.[o]?.[s]:e.providerModels?.byProviderId?.[s];return i?.models.find(d=>d.value===n)??i?.models.find(d=>E(d.value,s,c)===a)}),en=r.createSelector((e,t,n,o)=>{const c=d=>P.select(e,d,o),s=c(t),a=E(n,s,c),l=d=>Ue.select(e,s,d,o)?.label,i=d=>Ke.select(e,s,d);return C(n,l)??(a!==n?C(a,l):void 0)??i(n)??C(a,i)}),Qe=r.createSelector((e,t)=>{if(!t)return;const n=e.model?.availableModels;if(!n)return;const o=M(t);return g(n,o)?.effortLevels});function M(e){const t=j(e).modelId,n=t.indexOf("/");return n>0?t.slice(0,n):t}const Je=r.createSelector((e,t,n,o)=>{if(n){if(!o&&(!t||t===e.model?.availableModelsProviderId)){const c=Qe.select(e,n);if(c)return c}if(t){const c=M(n);return(o?e.providerModels?.byWorkspaceId?.[o]?.[t]:e.providerModels?.byProviderId[t])?.models.find(a=>M(a.value)===c)?.effortLevels}}}),Ge=r.createSelector((e,t)=>{const n=e.agentSessions?.byAgentId[t];if(!n)return;if(Array.isArray(n.effortLevels)&&n.effortLevels.length>0)return n.effortLevels;const o=n.workspaceId?e.providerCatalog?.byWorkspaceId?.[n.workspaceId]?.settings??[]:void 0,c=o?.find(b=>b.path==="model.defaultProvider")?.value,s=o?typeof c=="string"?c:"":ke.select(e),a=we(n,s),l=P.select(e,a??s,n.workspaceId),i=o?.find(b=>b.path==="model.providerDefaults")?.value,d=i&&typeof i=="object"?i[l]:void 0,v=n.model??(o?typeof d=="string"?d:"":O.select(e,l));return Je.select(e,l,v,n.workspaceId)}),G="application/vnd.intent.question+json";function Ye(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.label=="string"&&t.label.length>0&&(t.description===void 0||typeof t.description=="string")}function ze(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.attachmentId=="string"&&typeof t.header=="string"&&t.header.length>0&&typeof t.question=="string"&&t.question.length>0&&(t.explanation===void 0||typeof t.explanation=="string")&&Array.isArray(t.options)&&t.options.length>=2&&t.options.every(Ye)&&(t.multiSelect===void 0||typeof t.multiSelect=="boolean")}function tn(e){if(!e||typeof e!="object")return!1;const t=e;if(t.type!=="resource")return!1;const n=t.resource;return typeof n=="object"&&n!==null&&n.mimeType===G}function Ve(e){if(!e||typeof e!="object")return null;const t=e,n=t.resource??t.metadata?.resource??t;if(!n||typeof n!="object"||n.mimeType!==G||typeof n.text!="string")return null;try{const o=JSON.parse(n.text);return ze(o)?o:null}catch{return null}}const Xe="attachmentId",Ze=/^tar-[0-9a-f]{12}$/;function Y(e){if(!e||typeof e!="object")return null;const t=e;if(t.type!=="resource")return null;const n=t.resource;return!n||typeof n!="object"||typeof n.uri!="string"||typeof n.mimeType!="string"||typeof n.text!="string"||n.name!==void 0&&typeof n.name!="string"?null:n}function z(e){const t=Y(e);if(!t)return null;try{const n=JSON.parse(t.text);if(!n||typeof n!="object"||Array.isArray(n))return null;const o=n[Xe];return typeof o=="string"&&Ze.test(o)?o:null}catch{return null}}function I(e){return Array.isArray(e)?`[${e.map(I).join(",")}]`:e&&typeof e=="object"?`{${Object.entries(e).sort(([n],[o])=>n<o?-1:n>o?1:0).map(([n,o])=>`${JSON.stringify(n)}:${I(o)}`).join(",")}}`:JSON.stringify(e)??"undefined"}function et(e){const t=Y(e);if(!t)return null;if(t.mimeType===Le)try{const o=JSON.parse(t.text);if(Ne(o))return`proposal:${o.kind}:${o.applyToolCallId??o.preview.title}:${I(o.payload)}`}catch{}const n=z(e);return n?`nonce:${n}`:t.uri.length>0?`uri:${t.uri}:${t.text}`:null}function T(e){return z(e)!==null}function tt(e){const t=new Map,n=[];for(const o of e){const c=et(o);if(c===null){n.push(o);continue}const s=t.get(c);if(s===void 0){t.set(c,n.length),n.push(o);continue}T(o)&&!T(n[s])&&(n[s]=o)}return n}function V(e,t){if(typeof t!="string"||t.length===0)return!1;const n=e?.dismissedQuestionsMessageId;return typeof n=="string"&&n===t}function nt(e){if(e.skipped)return"(skipped)";const t=[...e.selectedLabels],n=e.imageBlocks?.length??0,o=n===0?"":n===1?R.chat_questionWizard_imagesAttached_label_one():R.chat_questionWizard_imagesAttached_label_many({count:Be(n)});return(e.freeText||n>0)&&t.push(`(Other) ${[e.freeText,o].filter(Boolean).join(" ")}`),t.length===0?"(skipped)":t.join(", ")}function ot(e){return e.map(t=>`Q: ${t.question.question}
1
+ import{J4 as j,Jr as r,sl as me,nX as m,BU as Se,nW as g,m as F,rT as K,BV as q,i as ye,nJ as $,A as be}from"./BPo1GPk4.js";import{k as ve}from"./uXuxG9cN.js";import{selectCurrentWorkspaceTabId as he}from"./BblwdMxR.js";import{s as Ce}from"./BIwMjRQQ.js";import{cR as Ee,cf as w,cd as Me,cc as Ie,co as Ae,bJ as ke,t as we,cJ as P,O as Pe,e8 as _e,dS as U,aJ as Oe,cA as Re}from"./DkYquFOp.js";import{J as _,K as Te}from"./DM4cCUDd.js";import{P as Le,c as Ne}from"./B5aYN90J.js";import{bm as R}from"./1KDVFF23.js";import{l as Be}from"./CntPxeXh.js";function He(e,t,n){if(!e||!n?.length)return null;const o=new Set(n);if(t!==null&&!o.has(t))return null;const c=e.lastIndexOf("/"),s=c>=0?e.slice(c+1):"",a=o.has(s)?e.slice(0,c):e;return t===null?a:`${a}/${t}`}const xe={major:5,minor:2};function De(e){const{major:t,minor:n}=xe;return ve(e,t,n)}function E(e,t,n){const o=j(e);return o.providerId&&n(o.providerId)===t?o.modelId:e}function C(e,t){const n=t(e);if(n)return n;const o=/\/(minimal|low|medium|high|xhigh|max|ultra|none)$/i.exec(e);if(!o||o.index===0)return;const c=t(e.slice(0,o.index)),s=o[1].toLowerCase();return c?`${c} (${s.charAt(0).toUpperCase()}${s.slice(1)})`:void 0}function We(e,t){return JSON.stringify([t||null,e])}const je=r.createSelector((e,t)=>(t?e.providerModels?.byWorkspaceId?.[t]:e.providerModels?.byProviderId)??{}),Bt=r.createSelector((e,t,n)=>je.select(e,n)[t]),Ht=r.createSelector(e=>e.providerModels?.clearEpoch??0),xt=r.createSelector((e,t)=>(t?e.providerModels?.requestsByWorkspaceId?.[t]?.map:e.providerModels?.requests?.map)??{}),Fe=r.createSelector(e=>Object.fromEntries(Object.values(e.providerModels?.observers?.map??{}).flatMap(({providerIds:t,workspaceId:n})=>t.map(o=>[We(o,n),{providerId:o,workspaceId:n}])))),Dt=r.createSelector(e=>Object.keys(Fe.select(e)).sort()),Ke=r.createSelector((e,t,n)=>me(e.providerModels?.learnedNames??{},t,n)),Wt=r.createSelector(e=>e.providerModels.learnedNames),jt=r.createSelector(e=>e.model),Ft=r.createSelector(e=>{const t=Ee.select(e),n=w.select(e);if(!t||n!=="owner"&&n!=="member")return null;const o=_.select(e);return n==="member"&&!o?null:JSON.stringify([t,o,n==="member"?Me.select(e):null])});function Q(e,t){return t??_.select(e)}const O=r.createSelector((e,t)=>{const n=Q(e,t),o=e.model.availableModelsProviderId===n?m(e.model.availableModels):[],c=Ie.select(e),s=Ae.select(e)?c?.defaultProviderId===n?c.defaultModelId:null:e.model.providerModels[n];return s||(Te.select(e).includes(n)?Se(o):"")}),qe=r.createSelector((e,t)=>O.select(e,t)!==""),Kt=r.createSelector(e=>_.select(e)!==""||qe.select(e)),$e=r.createSelector(e=>e.model.availableModels),qt=r.createSelector(e=>m($e.select(e))),$t=r.createSelector(e=>e.model.availableModelsProviderId),J=r.createSelector((e,t)=>{const n=Q(e,t);return e.model.loadingState[n]??null}),Ut=r.createSelector((e,t)=>J.select(e,t)?.status==="loading"),Qt=r.createSelector((e,t)=>{const n=J.select(e,t);return n?.status!=="error"?null:n.error??null}),Jt=r.createSelector(e=>{const t={};for(const[n,o]of Object.entries(e.model.loadingState))o.warning&&(t[n]=o.warning);return t}),Gt=r.createSelector(e=>{const t={};for(const[n,o]of Object.entries(e.model.loadingState))o.stale&&(t[n]=!0);return t}),Yt=r.createSelector(e=>{const t={};for(const[n,o]of Object.entries(e.model.loadingState))o.warning&&o.warningKind&&(t[n]=o.warningKind);return t}),zt=r.createSelector(e=>e.model.providerModels),Vt=r.createSelector(e=>e.model.defaultReasoningEffort),Xt=r.createSelector(e=>e.model.modelPickerCollapsedGroups),Zt=r.createSelector((e,t)=>e.model.fallbackInfoByAgentId[t]??null),Ue=r.createSelector((e,t,n,o)=>{const c=d=>P.select(e,d,o),s=c(t),a=E(n,s,c),l=e.model?.availableModels;if(!o&&l&&(!s||s===e.model.availableModelsProviderId)){const d=g(l,n)??g(l,a);if(d)return d}const i=o?e.providerModels?.byWorkspaceId?.[o]?.[s]:e.providerModels?.byProviderId?.[s];return i?.models.find(d=>d.value===n)??i?.models.find(d=>E(d.value,s,c)===a)}),en=r.createSelector((e,t,n,o)=>{const c=d=>P.select(e,d,o),s=c(t),a=E(n,s,c),l=d=>Ue.select(e,s,d,o)?.label,i=d=>Ke.select(e,s,d);return C(n,l)??(a!==n?C(a,l):void 0)??i(n)??C(a,i)}),Qe=r.createSelector((e,t)=>{if(!t)return;const n=e.model?.availableModels;if(!n)return;const o=M(t);return g(n,o)?.effortLevels});function M(e){const t=j(e).modelId,n=t.indexOf("/");return n>0?t.slice(0,n):t}const Je=r.createSelector((e,t,n,o)=>{if(n){if(!o&&(!t||t===e.model?.availableModelsProviderId)){const c=Qe.select(e,n);if(c)return c}if(t){const c=M(n);return(o?e.providerModels?.byWorkspaceId?.[o]?.[t]:e.providerModels?.byProviderId[t])?.models.find(a=>M(a.value)===c)?.effortLevels}}}),Ge=r.createSelector((e,t)=>{const n=e.agentSessions?.byAgentId[t];if(!n)return;if(Array.isArray(n.effortLevels)&&n.effortLevels.length>0)return n.effortLevels;const o=n.workspaceId?e.providerCatalog?.byWorkspaceId?.[n.workspaceId]?.settings??[]:void 0,c=o?.find(b=>b.path==="model.defaultProvider")?.value,s=o?typeof c=="string"?c:"":ke.select(e),a=we(n,s),l=P.select(e,a??s,n.workspaceId),i=o?.find(b=>b.path==="model.providerDefaults")?.value,d=i&&typeof i=="object"?i[l]:void 0,v=n.model??(o?typeof d=="string"?d:"":O.select(e,l));return Je.select(e,l,v,n.workspaceId)}),G="application/vnd.intent.question+json";function Ye(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.label=="string"&&t.label.length>0&&(t.description===void 0||typeof t.description=="string")}function ze(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.attachmentId=="string"&&typeof t.header=="string"&&t.header.length>0&&typeof t.question=="string"&&t.question.length>0&&(t.explanation===void 0||typeof t.explanation=="string")&&Array.isArray(t.options)&&t.options.length>=2&&t.options.every(Ye)&&(t.multiSelect===void 0||typeof t.multiSelect=="boolean")}function tn(e){if(!e||typeof e!="object")return!1;const t=e;if(t.type!=="resource")return!1;const n=t.resource;return typeof n=="object"&&n!==null&&n.mimeType===G}function Ve(e){if(!e||typeof e!="object")return null;const t=e,n=t.resource??t.metadata?.resource??t;if(!n||typeof n!="object"||n.mimeType!==G||typeof n.text!="string")return null;try{const o=JSON.parse(n.text);return ze(o)?o:null}catch{return null}}const Xe="attachmentId",Ze=/^tar-[0-9a-f]{12}$/;function Y(e){if(!e||typeof e!="object")return null;const t=e;if(t.type!=="resource")return null;const n=t.resource;return!n||typeof n!="object"||typeof n.uri!="string"||typeof n.mimeType!="string"||typeof n.text!="string"||n.name!==void 0&&typeof n.name!="string"?null:n}function z(e){const t=Y(e);if(!t)return null;try{const n=JSON.parse(t.text);if(!n||typeof n!="object"||Array.isArray(n))return null;const o=n[Xe];return typeof o=="string"&&Ze.test(o)?o:null}catch{return null}}function I(e){return Array.isArray(e)?`[${e.map(I).join(",")}]`:e&&typeof e=="object"?`{${Object.entries(e).sort(([n],[o])=>n<o?-1:n>o?1:0).map(([n,o])=>`${JSON.stringify(n)}:${I(o)}`).join(",")}}`:JSON.stringify(e)??"undefined"}function et(e){const t=Y(e);if(!t)return null;if(t.mimeType===Le)try{const o=JSON.parse(t.text);if(Ne(o))return`proposal:${o.kind}:${o.applyToolCallId??o.preview.title}:${I(o.payload)}`}catch{}const n=z(e);return n?`nonce:${n}`:t.uri.length>0?`uri:${t.uri}:${t.text}`:null}function T(e){return z(e)!==null}function tt(e){const t=new Map,n=[];for(const o of e){const c=et(o);if(c===null){n.push(o);continue}const s=t.get(c);if(s===void 0){t.set(c,n.length),n.push(o);continue}T(o)&&!T(n[s])&&(n[s]=o)}return n}function V(e,t){if(typeof t!="string"||t.length===0)return!1;const n=e?.dismissedQuestionsMessageId;return typeof n=="string"&&n===t}function nt(e){if(e.skipped)return"(skipped)";const t=[...e.selectedLabels],n=e.imageBlocks?.length??0,o=n===0?"":n===1?R.chat_questionWizard_imagesAttached_label_one():R.chat_questionWizard_imagesAttached_label_many({count:Be(n)});return(e.freeText||n>0)&&t.push(`(Other) ${[e.freeText,o].filter(Boolean).join(" ")}`),t.length===0?"(skipped)":t.join(", ")}function ot(e){return e.map(t=>`Q: ${t.question.question}
2
2
  A: ${nt(t)}`).join(`
3
3
 
4
4
  `)}const X="question_answers";function rt(e){return{type:X,answeredQuestionsMessageId:e}}function nn(e,t){const n=e.flatMap(o=>o.skipped?[]:o.imageBlocks??[]);return{text:ot(e),messageMetadata:rt(t),...n.length>0?{imageBlocks:n}:{}}}function L(e){if(!e||typeof e!="object")return null;const t=e;if(t.type!==X)return null;const n=t.answeredQuestionsMessageId;return typeof n=="string"&&n.length>0?n:null}function N(e){const t=L(e),n=t?[t]:[];if(e&&typeof e=="object"&&"mergedMessageMetadata"in e){const o=e.mergedMessageMetadata;if(Array.isArray(o))for(const c of o){const s=L(c);s&&!n.includes(s)&&n.push(s)}}return n}function Z(e){if(!e)return[];const t=N(e.metadata);if(t.length)return t;const n=Array.isArray(e.contentBlocks)?e.contentBlocks:[];return[...new Set(n.flatMap(o=>o.type==="text"?N(o.messageMetadata):[]))]}function ee(e){return e===void 0?{kind:"absent"}:e===""?{kind:"cleared"}:{kind:"set",messageId:e}}function B(e){return tt(e.contentBlocks??[]).map(Ve).filter(t=>t!==null)}function te(e,t){return e.some(n=>n.role==="user"&&Z(n).includes(t))}function H(e,t){return e.some(n=>Z({metadata:n.messageMetadata}).includes(t))}function st(e,t,n=!1,o,c=[]){if(n||e.length===0)return null;const s=ee(o);if(s.kind==="cleared")return null;if(s.kind==="set"){const a=e.find(i=>i.id===s.messageId);if(!a||a.role!=="assistant"||a.isStreaming||te(e,s.messageId)||H(c,s.messageId))return null;const l=B(a);return l.length>0?{messageId:a.id,questions:l}:null}if(t)return null;for(let a=e.length-1;a>=0;a--){const l=e[a];if(l.role==="system")continue;if(l.role!=="assistant"||l.isStreaming||H(c,l.id))return null;const i=B(l);return i.length>0?{messageId:l.id,questions:i}:null}return null}function ct(e){const t=st(e.messages??[],Pe(_e(e)),!1,e.metadata?.pendingQuestionsMessageId);return!t||V(e.metadata,t.messageId)?null:t}function at(e){if(ct(e)!==null)return!0;const t=ee(e.metadata?.pendingQuestionsMessageId);if(t.kind!=="set")return!1;const n=e.messages??[];return n.some(o=>o.id===t.messageId)||te(n,t.messageId)?!1:!V(e.metadata,t.messageId)}const ne=0,A=1,lt=2,f=4,oe=6,it=[2,3,4,5,0,1],dt=16777215,re=689407,se=3199320,ce=16766474,ae=16752394,k=16726832,le=6607615,ut=12540658,y=.9,ft=.5,ie=.25,pt=.25,gt={unassigned:{c:0,b:0,e:ne,s:0},idle:{c:dt,b:.12,e:A,s:0},running:{c:re,b:.6,e:f,s:ft},unread:{c:le,b:.4,e:f,s:ie},complete:{c:se,b:.5,e:A,s:0},attention:{c:ce,b:.8,e:f,s:y},blocked:{c:ae,b:.75,e:f,s:y},failed:{c:k,b:.7,e:f,s:y}},mt={e:ne,b:0,s:0,m:0,c:0},x=.35,St=.75,D=4;function yt(e){const n=(Math.min(Math.max(e,1),D)-1)/(D-1);return x+n*(St-x)}const bt={dark:mt,complete:{e:A,b:.25,s:0,m:0,c:se},unread:{e:f,b:.4,s:ie,m:0,c:le},question:{e:f,b:.8,s:y,m:0,c:ce},blocked:{e:f,b:.8,s:y,m:0,c:ae},failed:{e:f,b:.8,s:y,m:0,c:k},recording:{e:f,b:.8,s:y,m:0,c:k},disconnected:{e:lt,b:.2,s:pt,m:0,c:ut}};function on(e){const t=[];for(let n=0;n<oe;n+=1){const o=e[n]??"unassigned";t.push({id:it[n],...gt[o]})}return t.sort((n,o)=>n.id-o.id),t}function rn(e){const t=e.kind==="running"?{e:f,b:.5,s:yt(e.runningCount),m:0,c:re}:bt[e.kind];return{keys:{...t},ambient:{...t}}}function de(e){return $(e)?.kind==="blocker"}function ue(e){return $(e)?.kind==="discussion"||at(e)}function fe(e){return e.status===ye.Error}function W(e,t){const n=e.workspaceAgents.byWorkspaceId[t]?.foregroundAgentIds??[],o=e.agentSessions?.byAgentId??{},c=[];for(const s of n){const a=o[String(s)];a&&c.push(a)}return c}const vt=new Set(["complete","pr_queued","pr_ready","pr_open","pr_merged"]);function pe(e){return e.activity==="agent_running"||e.displayStatus==="in_progress"}function ge(e){return e.displayStatus!==void 0&&vt.has(e.displayStatus)}function ht(e,t){return t.some(fe)?"failed":t.some(de)?"blocked":t.some(ue)?"attention":pe(e)?"running":e.attention==="unread"?"unread":ge(e)?"complete":"idle"}function Ct(e){if(e.daemonHealth?.health==="down")return{keys:new Array(oe).fill("unassigned"),ambient:{kind:"disconnected"}};const t=m(e.workspace.workspaces).filter(u=>u.id!==F&&K(u)),n=new Map;for(const u of t)n.set(u.id,u);const c=q(e.hardwareConsole.keyPins,t,e.hardwareConsole.excludedWorkspaceIds??[]).map(u=>{const S=u===null?void 0:n.get(u);return S?ht(S,W(e,S.id)):"unassigned"});let s=!1,a=!1,l=!1,i=0,d=!1,v=!1;const b=new Set(e.tabState.workspaceStacks.flat());for(const u of t){if(!b.has(u.id))continue;const S=W(e,u.id);S.some(fe)&&(s=!0),S.some(de)&&(a=!0),S.some(ue)&&(l=!0),pe(u)&&(i+=1),u.attention==="unread"&&(d=!0),ge(u)&&(v=!0)}let p;return e.hardwareConsole.pttRecording===!0?p={kind:"recording"}:s?p={kind:"failed"}:a?p={kind:"blocked"}:l?p={kind:"question"}:d?p={kind:"unread"}:i>0?p={kind:"running",runningCount:i}:v?p={kind:"complete"}:p={kind:"dark"},{keys:c,ambient:p}}const sn=r.createSelector(e=>{const t=w.select(e);return t==="guest"||t==="member"}),cn=r.createSelector(e=>{const t=e.hardwareConsole;if(w.select(e)!=="owner"||!t?.isConsoleOwner||!t.enabledHydrationSucceeded||!t.actionMappingHydrationSucceeded)return null;const n=o=>be.filter((c,s)=>t.actionMappingByModel[o][s]==="cycle-open-windows");return JSON.stringify({enabled:t.enabled,keysByModel:{"creator-micro-2":n("creator-micro-2"),"codex-micro":n("codex-micro")}})}),an=r.createSelector(e=>e.hardwareConsole.enabled),ln=r.createSelector(e=>e.hardwareConsole.encoderBehavior),dn=r.createSelector(e=>e.hardwareConsole.encoderBehaviorSaveFailed),un=r.createSelector(e=>e.hardwareConsole.isConsoleOwner),fn=r.createSelector(e=>e.hardwareConsole.promptPickerLimit),pn=r.createSelector(e=>e.hardwareConsole.actionMappingByModel),gn=r.createSelector(e=>e.hardwareConsole.cycleScopeByFamily),mn=r.createSelector(e=>e.hardwareConsole.keyPins),Sn=r.createSelector(e=>e.hardwareConsole.excludedWorkspaceIds),yn=r.createSelector(e=>e.hardwareConsole.promptUsage),Et=r.createSelector(e=>{const t=U.select(e).filter(K);return q(e.hardwareConsole.keyPins,t,e.hardwareConsole.excludedWorkspaceIds)}),bn=r.createSelector((e,t)=>{const n=e.hardwareConsole.keyPins.indexOf(t);return n===-1?null:n}),vn=r.createSelector((e,t)=>{const n=Et.select(e).indexOf(t);return n===-1?null:n}),hn=r.createSelector(e=>e.hardwareConsole.radialPrompt),Cn=r.createSelector(e=>e.hardwareConsole.encoderHudWorkspaceId),En=r.createSelector(e=>{const t=e.hardwareConsole.encoderHudWorkspaceId;return t===null?null:U.select(e).find(n=>n.id===t)?.title??null}),Mn=r.createSelector(e=>e.hardwareConsole.actionHudLabel),In=r.createSelector(e=>e.hardwareConsole.pttRecording),An=r.createSelector(e=>e.hardwareConsole.pttRecording&&e.hardwareConsole.pttRecordingSource==="key"),kn=r.createSelector(e=>e.hardwareConsole.pttRecordingStartedAt),wn=r.createSelector(e=>e.hardwareConsole.pttInputLevels),Pn=r.createSelector(e=>e.hardwareConsole.voiceTranscribing),_n=r.createSelector(e=>Ct(e)),Mt=r.createSelector((e,t,n)=>{const o=e.agentSessions.byAgentId[n];if(!o||o.workspaceId!==t)return null;const c=Ge.select(e,n);if(!c?.length)return null;const s=Oe.select(e,n),a=o.model??O.select(e,s),l=e.daemonHealth.stats?.protocolVersion,i=De(l)?He(a,null,c):a;return{key:JSON.stringify([t,n,s,i,c]),workspaceId:t,agentId:n,levels:c}}),It=r.createSelector(e=>{const t=e.hardwareConsole;if(!t.enabled||!t.isConsoleOwner||!t.encoderBehaviorHydrated||t.encoderBehavior!=="agent-effort")return null;const n=he.select(e);if(!n||n===F||Re.select(e,n))return null;const o=Ce.select(e,n);return o?.type!=="agent"||!o.agentId||o.workspaceId&&o.workspaceId!==n?null:Mt.select(e,n,o.agentId)}),On=r.createSelector(e=>{const t=e.hardwareConsole.encoderEffortFeedback;return!t||It.select(e)?.key!==t.target.key?null:(e.agentSessions.byAgentId[t.target.agentId]?.reasoningEffort??null)===t.effort?t:null}),At=[],Rn=r.createSelector((e,t)=>g(e.connections.workflows,t)),Tn=r.createSelector(e=>({writing:e.connections.keychainWritesPending>0,loadFailed:e.connections.keychainLoadError,saveFailed:e.connections.keychainSaveError})),Ln=r.createSelector(e=>e.connections.selfPublication),Nn=r.createSelector(e=>e.connections.selfPublicationBusy),Bn=r.createSelector((e,t)=>({guest:g(e.guestSessions.sessions,t),connection:g(e.connections.connections,t)})),Hn=r.createSelector(e=>m(e.connections.connections).filter(t=>!t.displayOnly)),xn=r.createSelector(e=>m(e.connections.connections).filter(t=>!t.displayOnly&&t.daemonMode!=="node")),Dn=r.createSelector(e=>m(e.connections.connections).filter(t=>!t.displayOnly&&!t.isLocal)),Wn=r.createSelector(e=>e.connections.hasReceivedList);r.createSelector((e,t)=>g(e.connections.connections,t)?.status??"not-open");const jn=r.createSelector(e=>e.connections.windowBackendId),Fn=r.createSelector(e=>{const{connections:t,windowBackendId:n}=e.connections;return g(t,n)??null}),Kn=r.createSelector(e=>e.connections.pinnedVersion),qn=r.createSelector(e=>e.connections.connectedIds);r.createSelector(e=>e.connections.status);const $n=r.createSelector(e=>e.connections.status==="connecting"||e.connections.openingIds.length>0);r.createSelector((e,t)=>e.connections.openingIds.includes(t));r.createSelector(e=>e.connections.error);const Un=r.createSelector(e=>e.connections.certMismatch),Qn=r.createSelector(e=>{const t={};for(const[n,o]of Object.entries(e.connections.certWarnings))t[n]=m(o);return t}),Jn=r.createSelector(e=>{const t=e.connections.certWarnings[e.connections.windowBackendId];return t?m(t):At}),Gn=r.createSelector(e=>{const{authRejected:t,windowBackendId:n}=e.connections;return t&&t.id===n?t:null}),Yn=r.createSelector(e=>{const{protocolMismatch:t,windowBackendId:n}=e.connections;return t&&t.id===n?t:null}),zn=r.createSelector(e=>{const{protocolMismatch:t,windowBackendId:n,protocolMismatchModalDismissed:o}=e.connections;return!t||t.id!==n||o?null:t}),Vn=r.createSelector(e=>e.connections.keychainSync),Xn=r.createSelector(e=>e.connections.browserHost?.manageConnections===!0),Zn=r.createSelector(e=>e.connections.browserHost?.backendBound===!1),eo=r.createSelector(e=>{const t=e.connections.browserHost;return t?.manageConnections===!0&&!t.tailcatAvailable}),h=new Map;function to(e){return h.has(e)}function no(e){return h.get(e)}function oo(e){h.set(e.agentId,e)}function ro(e){h.delete(e)}export{mn as $,oe as A,Jt as B,qt as C,$t as D,xn as E,Qn as F,qn as G,Un as H,Bn as I,Rn as J,Hn as K,Wn as L,Fn as M,Jn as N,jn as O,Vt as P,Mt as Q,On as R,It as S,Cn as T,En as U,pn as V,gn as W,an as X,ln as Y,dn as Z,Sn as _,Ct as a,Et as a0,yn as a1,hn as a2,_n as a3,Kt as a4,Xn as a5,eo as a6,$n as a7,un as a8,Ut as a9,In as aA,kn as aB,Dn as aC,O as aD,Ln as aE,Nn as aF,sn as aG,Pn as aH,cn as aI,bn as aJ,vn as aK,at as aL,ct as aM,oo as aN,De as aO,Tn as aa,Vn as ab,Ke as ac,Wt as ad,Qt as ae,Ft as af,Ue as ag,en as ah,Qe as ai,Zt as aj,Xt as ak,jt as al,Zn as am,Dt as an,Fe as ao,Kn as ap,fn as aq,zn as ar,Je as as,zt as at,Bt as au,je as av,Ht as aw,xt as ax,wn as ay,An as az,nn as b,He as c,rn as d,on as e,ee as f,tt as g,st as h,Z as i,no as j,Ve as k,to as l,V as m,tn as n,te as o,H as p,E as q,We as r,ro as s,C as t,Mn as u,Gn as v,Yn as w,Ge as x,Gt as y,Yt as z};
@@ -1,4 +1,4 @@
1
- var N_=Object.defineProperty;var Fg=n=>{throw TypeError(n)};var B_=(n,r,a)=>r in n?N_(n,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[r]=a;var Js=(n,r,a)=>B_(n,typeof r!="symbol"?r+"":r,a),W_=(n,r,a)=>r.has(n)||Fg("Cannot "+a);var Ro=(n,r,a)=>(W_(n,r,"read from private field"),a?a.call(n):r.get(n)),Dg=(n,r,a)=>r.has(n)?Fg("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,a);import{t as ln,bo as Z,bw as dn,bp as cf,b as cn,bm as g,bq as Ur,bs as pe,br as qi}from"./Bv8Gaorn.js";import{bs as un,a5 as S,bf as fs,bA as y,W as p,bn as gn,aA as ee,aB as E,ca as ie,a7 as Ot,ay as ye,aD as e,cd as Bn,c9 as o,bS as _,bl as de,be as vn,b_ as q,bO as j,c5 as dt,bH as w,bV as he,bj as Es,bk as no,b$ as on,ai as Bc,aj as ps,bo as jl,br as Mr,c0 as qt,cb as sc,aw as wi,a as U_}from"./3SdAC2_C.js";import{i as N}from"./BQg4hK6W.js";import{k as xi}from"./ChJ4msi3.js";import{g as Dn,i as z_,I as qo,p as Lo,e as Mo}from"./D1JjMDax.js";import{n as Lt,l as ma,c as eo,j as Ng,k as Fo,h as j_}from"./DgaiTQpw.js";import{b as uf,e as Wc,f as ke,s as Ne,c as Wt,g as gs}from"./D85P44Dj.js";import{b as G_}from"./goTpbPhD.js";import{b as wr}from"./Dn334wJv.js";import{m as V_,U as K_,Z as Q_,X as J_,Y as Y_,I as Bg,o as X_,l as Z_,a2 as ew,x as Wg,$ as tw,a0 as Ug,r as nw,s as rw}from"./D806p2LW.js";import{Jr as O,fo as aw,eW as sw,f3 as ow,eX as iw,f1 as lw,f0 as dw,eZ as cw,e$ as uw,eY as gw,rt as pw,c6 as fw,i as $i,J0 as vw,D9 as gf,De as hw,Dg as zg,Dd as mw,Df as _w,vC as ww,vE as bw,Cm as pf,cp as yw,cn as Iw,Bv as Sw,bE as $w,A1 as kw,Cb as oc,u_ as xw,cq as jg,dB as Cw,dC as Pw,Cl as Rw,el as Tw,CF as Aw,CE as Mw,CJ as Ew,CI as qw,cQ as Lw,cT as Hw,nB as Ow,er as Fw,wP as Dw,CK as Nw,wR as Bw,CL as Ww,cU as Uw,cV as zw,nJ as jw,Ae as Gw,Dq as Vw,wk as Kw,wl as Qw,yZ as Jw,z1 as ic,wg as Yw,wh as Xw,rR as Zw,re as eb,rc as tb,f_ as nb,HL as rb,Lf as ab,GJ as sb,gn as ob,p1 as ib,Jf as lb,oi as db,A0 as cb,ft as Gg,r1 as Vg,fm as ub,fl as gb,tA as pb,g3 as Kg,rd as fb,fe as vb,C6 as hb,m as mb,nK as _b,zF as wb,yX as bb,Ew as yb,El as Qg,xf as Ib,xg as Jg,uZ as Yg,p2 as Sb,DC as $b,gj as kb,g1 as xb,eU as Cb,cM as Pb,A4 as Rb,Lk as Tb,Cr as Ab,LC as Mb,y0 as Eb,ga as qb,fd as Lb,cL as Hb,cI as Ob,cH as Fb,vq as Db,xm as Nb,xk as Bb,cF as Wb,cE as Ub,z3 as zb,y_ as jb,xl as Gb}from"./NgEAPl8f.js";import{a as Uc}from"./CC7to1B5.js";import{aM as Vb,aL as Kb,bg as Qb,a7 as Jb,aD as Yb,aO as Xb,M as ff,a0 as vf,b8 as Zb,b2 as ey,as as Xg,P as bl,b0 as Zg,a$ as ep,a_ as tp}from"./BjWOzuMm.js";import{k as hf,F as ty,G as Cc,ar as ny,a_ as El,a8 as mf,Q as ry,aT as lc,ao as ay,aG as sy,B as oy,y as _f,r as iy,z as ly,u as dy,aY as cy,aE as wf,aD as bf,aF as uy,aJ as dc,aQ as np,aP as yl,aR as rp,P as ap,d as gy,e as py,av as fy,V as sp,aC as vy,c as hy,l as my,aS as op,an as _y,au as ip,a as wy,ay as by,ac as lp,aB as yy,aU as dp,aX as cp,m as up,ad as Iy,R as Sy,aw as gp,ak as $y,O as ky,aq as xy,h as Cy,p as Py,_ as cc,Z as Ry,aA as pp,a7 as Ty,f as Ay,i as My,a5 as Ey,ab as qy}from"./Dqtmunn7.js";import{f as Ly,o as Hy,E as Oy,C as Fy,m as Dy,a2 as fp,aa as Ny,K as By,e as Wy,y as Uy}from"./Dr4PDf9D.js";import{g as Pi}from"./DypB-Dwi.js";import{dW as Dl,cU as yf,O as If,W as zy,bv as jy,aF as Sf,dH as $f,aV as Eo,e8 as Gy,dw as kf,aw as zc,dV as jc,aO as xf,cP as Vy,V as ha,a3 as Xs,B as Ky,a7 as Qy,a4 as Jy,M as Yy,a6 as Xy,ar as Zy,aG as Cf,aP as ql,r as eI,n as Pc,H as tI,dY as nI,aR as rI,aK as aI,c9 as sI,aX as oI,bM as iI,bK as lI,bL as dI,c8 as cI,c7 as uI,cN as gI,cM as pI,aT as fI,bb as vI,bd as hI,bg as mI,bc as _I,bl as wI,bf as bI,be as yI,bh as II,bi as SI,bk as $I,bj as kI,ax as xI,ay as CI,cj as PI,ck as RI,dv as TI,du as AI,b0 as MI,G as EI,b4 as qI,cf as LI,C as vp,d0 as HI,ba as cs,b$ as OI,X as FI,bq as DI,E as NI,ad as BI,t as WI,cW as UI,d3 as hp,Q as mp,dt as zI,cQ as uc}from"./CpV-ehZ5.js";import{u as Pf,a as Il,ag as jI,x as GI,ad as Rf,af as VI,ac as Tf,a4 as KI,F as _p,D as QI,e as JI,n as YI,s as XI,m as ZI,Y as eS,k as tS}from"./DXwcjaPR.js";import{a2 as nS,b4 as rS,cL as aS,aZ as sS,b3 as oS,c1 as iS,c8 as lS,w as dS,x as cS,cc as uS}from"./m8gDbIPC.js";import{n as gS,P as Af,F as pS,ai as fS,r as vS,ac as hS}from"./8TUe2kcz.js";import{I as mS,s as _S,H as wp}from"./Bqd7fdCF.js";import{e as wS}from"./CL3a4Hm1.js";import{e as bS,f as yS}from"./fXti0RCR.js";import{s as IS,o as Zs,b as SS,g as Nl,d as $S,l as bi}from"./CIyUrgF0.js";import{a5 as kS,a7 as xS,D as CS,N as PS,ac as bp,X as RS,i as TS,r as cr,v as Ri,u as na,p as ki,x as br,S as Gc,m as Gl,s as Ho,y as Ti,o as ro,n as ao,t as yp,aa as so,w as oo,a9 as Vc,q as _a,z as Oo,J as Rc,_ as Ip,g as AS,F as MS,U as Mf,I as Ef,a8 as qf,a6 as Ll,O as ES,E as Lf,V as qS,A as LS,b as HS,ab as OS,ad as Sl,G as FS,e as gc,l as DS,C as NS,f as Ys,j as Sp,H as us,Q as BS,d as $l,c as WS,a as $p,h as US,L as zS,Y as kp,a4 as pc,a1 as xp,a0 as jS,a3 as Cp,$ as Pp,T as GS,B as VS,k as KS,a2 as QS,K as JS,R as YS,P as XS,W as ZS}from"./EZ4dI6hS.js";import{m as e$}from"./Dms_DO28.js";import{g as Hf}from"./BJuNVIII.js";import{b as t$}from"./BWtq4mC4.js";import{g as n$}from"./CtX28OJm.js";import{a as r$}from"./C5l6D9GX.js";import{q as Of,d as ur,r as a$,e as Bl,j as s$,g as Tc,i as o$,f as Ac,c as i$,A as l$,O as Rp,k as d$}from"./qkmjEtXH.js";import{P as c$}from"./XyC5Phh7.js";import{e as u$}from"./GlvfRTgI.js";import{b as g$,a as p$,g as f$,c as v$,i as h$}from"./kFRDyP-N.js";import{R as m$,g as _$,W as kl,c as w$}from"./S7_elIn6.js";import"./DoIr8Q2r.js";import"./BL39LNxU.js";import{s as Ai}from"./DZBnfhEV.js";import{F as b$,h as y$}from"./CSbK1_CV.js";import"./CnMgdwKG.js";import{C as I$,e as Br,L as S$,l as Vl,d as Kl,K as Ql,h as Kc,M as Jl,S as Da}from"./C6GJZLOP.js";import{D as $$}from"./DvOdp8Jx.js";import{f as Tp}from"./DQAJLaJ3.js";import"./DU3vNstz.js";import{i as Ff}from"./BjLb7AHW.js";import{h as Ap,i as Mp,g as Ep,P as qp,C as k$,m as Hl,R as x$}from"./BkLJnbD1.js";import{f as It,ae as C$}from"./BO3WriTy.js";import{F as ft,bs as P$,cd as R$,aw as Na,a2 as Df,c9 as T$,bf as A$,be as M$,bg as E$,aO as Lp,aj as fc,aB as vc,bB as Nf,d3 as Wl,cF as q$,aM as Hp,cb as Op,cK as Ul,bu as L$,aS as H$,d0 as O$,a8 as Bf,ac as F$,ag as D$,cr as N$,ba as B$,aC as Wf,cT as Fp,cz as W$,ax as U$,cD as z$,c3 as j$}from"./CiD4x8Gl.js";import{c as Uf}from"./ChTqQfQN.js";import"./BLYFfqzj.js";import{c as Rt}from"./kZanyiqf.js";import{a5 as zf,bg as G$,ar as V$,k as K$,Y as Q$,W as J$,a2 as Y$,Z as X$,bw as Z$,V as ek,a1 as tk,ah as nk}from"./kuwy0JZA.js";import{d as zl,f as rk,e as ak}from"./C1m4pSe1.js";import{A as sk}from"./DIylOQL5.js";import{D as ok}from"./D6YX_GFv.js";import"./CFtfWLBC.js";import{a as ik,C as lk}from"./CJZ6Gu1k.js";import"./COUB9dHY.js";import{C as dk}from"./D6GBnYDv.js";import{h as Mc,r as ck,a as uk}from"./BOsHJKjO.js";import{s as gk}from"./C-JwFHXS.js";import{I as pk,a as jf}from"./DCTwUEO7.js";import{L as fk}from"./Xgzrv-dN.js";import{g as vk,f as hk,b as mk}from"./qPYbzgcC.js";import{s as Mi,g as Yn,i as _k,j as wk,e as Dp,r as Np,f as bk,d as yk,a as hc,h as Ik}from"./CCEQVSjx.js";import{i as Bp,a as Sk}from"./Bu13V5mO.js";import{seekConversationToMessage as Wp}from"./C7TJE1vk.js";import{l as Kt,o as mc,h as Qc,n as Ec,q as $k}from"./C44hzh9R.js";import{o as kk}from"./CpYW1yE7.js";import{A as Gf}from"./CZJDTQJi.js";import{b as Vf}from"./PZRS5x7m.js";import{g as xk,e as Kf,v as Ck,f as Pk,N as Rk,M as Tk,K as Ak,k as Qf,l as Mk,H as Jf,s as Yf}from"./CM4xaytB.js";import{selectCurrentWorkspaceTabId as _c}from"./-18XT1CI.js";import{o as Ek}from"./YfYAjqUM.js";import{d as qk}from"./B0Z-1lwJ.js";import{P as Lk}from"./BBiqqybB.js";import{g as Hk}from"./DyiA0AJU.js";import{H as Xf,M as Ok,y as Fk,g as Dk,i as Nk,u as Bk,e as Zf,c as ev,d as Wk}from"./DgOwYCT0.js";import{c as Uk,h as Jc,f as tv,M as zk}from"./5uDsFopc.js";import{t as jk}from"./DAsc1V4f.js";import{s as Gk}from"./BsieX9dN.js";import{i as nv}from"./B4n9OEnJ.js";import{d as Vk,i as Kk,r as Qk}from"./iwQqOlmN.js";import{g as Jk}from"./MBA6k0j3.js";var Yk=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),Xk=E("<div><!></div>");function rv(n,r){if(new.target)return ln({component:rv,...n});un(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),d=Z(r,"children",7),l=cf(r,Yk);var f={get ref(){return a()},set ref(v=null){a(v),ee()},get class(){return i()},set class(v){i(v),ee()},get children(){return d()},set children(v){d(v),ee()},$set:dn,$on:(v,R)=>cn(r,v,R)},u=Xk();uf(u,v=>({"data-slot":"card-header",class:v,...l}),[()=>Wc("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-x-4 gap-y-1.5 pt-4 pb-2 has-data-[slot=card-action]:grid-cols-[minmax(0,1fr)_auto]",dk,i())]);var b=S(u);return Ai(b,()=>d()??fs),y(u),wr(u,v=>a(v),()=>a()),p(n,u),gn(f)}var Zk=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),ex=E("<div><!></div>");function av(n,r){if(new.target)return ln({component:av,...n});un(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),d=Z(r,"children",7),l=cf(r,Zk);var f={get ref(){return a()},set ref(v=null){a(v),ee()},get class(){return i()},set class(v){i(v),ee()},get children(){return d()},set children(v){d(v),ee()},$set:dn,$on:(v,R)=>cn(r,v,R)},u=ex();uf(u,v=>({"data-slot":"card-title",class:v,...l}),[()=>Wc("type-title min-w-0 break-words font-semibold leading-tight text-foreground",i())]);var b=S(u);return Ai(b,()=>d()??fs),y(u),wr(u,v=>a(v),()=>a()),p(n,u),gn(f)}const xl=mS.CHAT_MEDIA,wc=IS().min(1).max(512);Zs({workspaceId:wc,agentId:wc,draftId:Nl(),principalId:wc,media:SS(gS).min(1).max(20)}).strict();const tx=Zs({sessionId:Nl()}).strict();tx.extend({control:$S("action",[Zs({action:bi("readiness")}).strict(),Zs({action:bi("export"),request:bS}).strict(),Zs({action:bi("transcribe"),request:yS}).strict(),Zs({action:bi("release"),jobId:Nl()}).strict(),Zs({action:bi("adopt"),jobId:Nl()}).strict()])}).strict();function Yc(n,r,a,i=async(d,l)=>typeof window>"u"||_S(window)!=="electron"?{ok:!1,error:"unavailable"}:wS().invoke(d,l)){let d=null,l=null,f=!1;async function u(){f=!0,a.removeEventListener("abort",b);const x=d;d=null,x&&await i(xl.CLOSE,{sessionId:x}).catch(()=>{})}const b=()=>{u()};a.addEventListener("abort",b,{once:!0});const v=()=>{if(f||a.aborted||!r())throw new Error("media-send-retired")};async function R(){if(v(),d)return d;if(l)return l;l=(async()=>{const x=await i(xl.BEGIN,n);if(!x.ok)throw new Error("media-export-unavailable");d=x.value.sessionId;try{return v(),d}catch(F){throw await u(),F}})();try{return await l}finally{l=null}}async function I(x){const F=await R();v();const D=await i(xl.CONTROL,{sessionId:F,control:x});return v(),D}return{service:{exportMedia:x=>I({action:"export",request:x}),adoptMediaJob:x=>I({action:"adopt",jobId:x}),transcribeMedia:x=>I({action:"transcribe",request:x}),releaseMediaJob:async x=>d?await i(xl.CONTROL,{sessionId:d,control:{action:"release",jobId:x}}):{ok:!0,value:void 0}},dispose:u,readiness:()=>I({action:"readiness"})}}const bc=new Set;async function nx(n){const{drafts:r,signal:a}=n,i=structuredClone(n.capture),d=structuredClone(n.items),l=structuredClone(n.payload),{workspaceId:f,agentId:u}=i,b=Pi(O.state),v=Dl.select(O.state,f),R=yf.select(O.state),I=hf(),M=JSON.stringify([b,f,u]);if(!b||!v||!R||l.wsId!==f||bc.has(M))return!1;bc.add(M);const x=new AbortController,F=()=>x.abort();a.addEventListener("abort",F,{once:!0});const D=()=>!a.aborted&&!x.signal.aborted&&Pi(O.state)===b&&Dl.select(O.state,f)===v&&mf(I)&&r.isCurrentDraft(i),T=O.getReadableState().subscribe(()=>{D()||x.abort()});let H=null;try{if(!D()||nS(d))return!1;const V=Pf(i.attachments),oe=Af(pS(f,u),V,d.map(ce=>({contextItemId:ce.id,attachmentId:ce.attachmentId,path:ce.path}))),P=new Set([...oe.images,...oe.clips].map(ce=>ce.contextItemId));if(V.some(([ce])=>!P.has(ce))||oe.images.some(ce=>ce.mediaError)||oe.clips.some(ce=>ce.mediaError)||!fS(l.text,oe))throw new Error("invalid-evidence");if(H=n.warm?.take(i,x.signal)??null,!await r.flushDraft(i)||!D())return!1;const k=await Ly.agents.get(u,f);if(!D())return!1;if(!k||k.workspaceId!==f||k.retiredAt||k.pendingDeleteAt||k.status==="deleted")throw new Error("unavailable");const J=oe.clips.flatMap(ce=>ce.media?[ce.media]:[]);J.length&&!H&&(H=Yc({workspaceId:f,agentId:u,draftId:crypto.randomUUID(),principalId:R.principal.id,media:J},D,x.signal));const ge=ty(d,oe),Te=Cc(ge),ve=await ny({workspaceId:f,agentId:u,evidence:oe,clickedItems:d,sendItems:ge,clickedPayload:{...l,contextItems:ge,imageBlocks:Te.imageBlocks,fileBlocks:Te.fileBlocks},binding:I,service:H?.service??null,current:D,onRecord:()=>{}});return!ve||!D()?!1:El(O,u,ve)}catch{return D()&&O.dispatch(aw(u,g.dock_conversation_sendFailed_error())),!1}finally{T(),a.removeEventListener("abort",F),await H?.dispose(),bc.delete(M)}}const sv=1e4,Up={wasBusy:!1,busySince:null,preempted:!1,prediction:null};function zp(n){return kS(n.messageMetadata)}function rx(n,r){if(n.some(zp)){const a=n[0];return a&&!zp(a)&&jp(a,r)?[a.id]:[]}return n.filter(a=>jp(a,r)).map(a=>a.id)}function ax(n){let r=null;for(const a of n)(a.status==="preparing"||a.status==="sending")&&a.createdAt>(r??-1/0)&&(r=a.createdAt);return r}function jp(n,r){return!n.requeuedAfterFailure&&xS(n,r)}function sx(n,r){const{busy:a,queue:i,delivered:d,now:l}=r,f=r.blocked||r.interrupted,u=r.timeoutMs??sv;let b=n.prediction;if(b){const x=new Set(i.map(H=>H.id)),F=b.ids.filter(H=>x.has(H)&&!d.has(H)),D=l-b.startedAt>=u,T=n.wasBusy&&!a;!F.length||D||f&&!a||T?b=null:F.length!==b.ids.length&&(b={...b,ids:F})}const v=n.wasBusy&&!a,R=n.wasBusy?n.busySince:a?l:null,I=n.wasBusy&&n.preempted||R!==null&&r.directSendAt!==null&&r.directSendAt>R;if(!b&&v&&!f&&!I){const x=rx(i,l).filter(F=>!d.has(F));x.length&&(b={ids:x,startedAt:l})}const M={wasBusy:a,busySince:a?R:null,preempted:a&&I,prediction:b};return n.wasBusy===M.wasBusy&&n.busySince===M.busySince&&n.preempted===M.preempted&&n.prediction===M.prediction?n:M}class ox{constructor(){Js(this,"previousWorkspaceId",null);Js(this,"_isRebinding",!1);Js(this,"_generation",0);Js(this,"_rebindPromise",null);Js(this,"_rebindResolve",null)}recordMount(r){return this.previousWorkspaceId=r,r}wasWorkspaceChangedDuringMount(r){return this.previousWorkspaceId!==r}shouldRebind(r){return!r||this.previousWorkspaceId===null?!1:r!==this.previousWorkspaceId}recordRebind(r){this.previousWorkspaceId=r}hasWorkspaceChanged(r){return r!==this.previousWorkspaceId}get trackedWorkspaceId(){return this.previousWorkspaceId}get isRebinding(){return this._isRebinding}startRebind(){return this._generation++,this._isRebinding=!0,this._rebindResolve?.(),this._rebindPromise=new Promise(r=>{this._rebindResolve=r}),this._generation}endRebind(r){r!==void 0&&r!==this._generation||(this._isRebinding=!1,this._rebindResolve?.(),this._rebindPromise=null,this._rebindResolve=null)}async waitForRebind(r=5e3){if(!this._isRebinding||!this._rebindPromise)return!1;const a=Date.now()+r;for(;this._isRebinding&&this._rebindPromise;){const i=a-Date.now();if(i<=0)return!1;let d;const l=await Promise.race([this._rebindPromise.then(()=>!1),new Promise(f=>{d=setTimeout(()=>f(!0),i)})]);if(clearTimeout(d),l)return!1}return!0}}function ix(n,r){return!(n?.tabType!=="agent"||n.agentId!==r.agentId||!r.isActive||n.workspaceId&&n.workspaceId!==r.workspaceId||r.panelId&&(n.source!=="dictation"&&!r.isPanelFocused||n.panelId&&n.panelId!==r.panelId))}function Gp(n){const r=typeof n=="string"?n:n&&typeof n=="object"&&typeof n.script=="string"?n.script:void 0;return r||void 0}var lx=E('<div role="status" aria-live="polite" data-presence-typing-indicator=""><span class="inline-flex min-w-[var(--operational-leading-slot-size)] shrink-0 items-center justify-center svelte-lm4khl"><!></span> <span class="min-w-0 truncate svelte-lm4khl"> </span> <span class="inline-flex shrink-0 items-center gap-0.5 svelte-lm4khl" aria-hidden="true"><span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.2s"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.4s"></span></span></div>');function ov(n,r){if(new.target)return ln({component:ov,...n});un(r,!0);const a=()=>pe(R,"$typing$",i),[i,d]=Ur();let l=Z(r,"workspaceId",7),f=Z(r,"agentId",7),u=Z(r,"class",7,"");const b=Bn(""),v=Bn("");ie(()=>{b.set(l())}),ie(()=>{v.set(f())});const R=rS(b,v),I=o(()=>u$(a()));var M={get workspaceId(){return l()},set workspaceId(H){l(H),ee()},get agentId(){return f()},set agentId(H){f(H),ee()},get class(){return u()},set class(H=""){u(H),ee()},$set:dn,$on:(H,V)=>cn(r,H,V)},x=Ot(),F=ye(x);{var D=H=>{var V=lx(),oe=S(V),P=S(oe);c$(P,{get people(){return a()},size:12,decorative:!0}),y(oe);var k=_(oe,2),J=de(k,!0);vn(2),y(V),q(()=>{ke(V,1,`${Of} flex h-4 min-w-0 items-center gap-[var(--operational-leading-gap)] px-[var(--operational-row-inline-padding)] font-family-child font-normal text-muted-foreground text-[11px] leading-4 ${u()??""} /* a11y-ignore: user-requested compact typing status in the composer gap */`,"svelte-lm4khl"),j(J,e(I))}),p(H,V)};N(F,H=>{e(I)&&H(D)})}p(n,x);var T=gn(M);return d(),T}const dx=50,cx=5e3,ux=500,gx=()=>({authority:()=>Pi(O.state),persistSnapshot:ay,dispatch:n=>O.dispatch(n),ownerView:n=>sy.withStore(O)(n)});function px(n){const r=n.store??gx(),a=crypto.randomUUID();let i=he(!1),d=he(!1),l=he(!1),f=null,u=null,b=0,v=!1,R=null,I=null,M=null,x=0,F=null,D=null;const T={};let H,V=he([]),oe=null,P=0,k="",J=0,ge="";const Te=()=>{const B=n.workspaceId(),C=n.agentId();if(!B||!C||!(n.active?.()??!0))return null;const re=r.authority?.();if(!re||v)return null;const Me=n.inputValue(),L=ce(),X=H?.shared,Y=X?.workspaceId===B&&X.agentId===C?X.lifetime:null,be=JSON.stringify([re,B,C,x,Y,L.map(z=>[z.id,z.attachmentId,z.path])]);be!==ge&&(ge=be,J+=1);const De=JSON.stringify([re,B,C,Me,L,x]);return De!==k&&(k=De,P+=1),{authority:re,ownerId:a,workspaceId:B,agentId:C,text:Me,attachments:JSON.parse(JSON.stringify(L)),generation:P,attachmentEpoch:J}};let ve=null;const ce=()=>jI(n.contextItems(),GI(n.contextItems(),e(V))),we=B=>{if(H=B,!B||v)return;const C=B.restore;if(D&&C?.requestId===D.requestId&&C.status!=="pending"){const{apply:L}=D;D=null,w(d,!1),C.status==="restored"&&w(V,C.draft?.attachments??[]),L(C)}const re=B.shared;if(re&&!e(d)&&u===`${re.workspaceId}\0${re.agentId}`){const L=JSON.stringify([re.provenance,re.workspaceId,re.agentId,re.lifetime,re.revision]);if(oe!==L){oe=L;const X=ve??f,Y=X&&n.inputValue()===X.text&&JSON.stringify(ce())===X.attachmentsJson;re.origin===a?ve={text:re.snapshot.text,attachmentsJson:JSON.stringify(re.snapshot.attachments)}:Y&&(b+=1,M&&clearTimeout(M),w(V,re.snapshot.attachments),ve=f={text:re.snapshot.text,attachmentsJson:JSON.stringify(e(V))},n.setInputValue(re.snapshot.text),n.setContextItems(Il(e(V))),n.applyEditorContent(re.snapshot.text))}}dt(Te);const Me=[];for(const L of B.saves){if(L.status==="pending")continue;Me.push(L.id);const X=T[L.id];delete T[L.id],X?.(L)}Me.length>0&&queueMicrotask(()=>r.dispatch(lw(a,Me)))},ne=(B,C,re)=>{const Me=crypto.randomUUID();D={requestId:Me,apply:re},w(d,!0),r.dispatch(cw(a,Me,B,C))},te=()=>{D&&(D=null,w(d,!1),r.dispatch(gw(a)))},Be=()=>{const B=F;B&&(F=null,r.dispatch(uw(a)),H?.saves.some(C=>C.id===B)||delete T[B])};r.dispatch(sw(a));const se=r.ownerView(a).subscribe(B=>dt(()=>we(B))),me=()=>{I&&(clearTimeout(I),I=null),w(l,!1)},Ee=()=>{F&&(F=null,r.dispatch(dw(a)))};ie(()=>{const B=n.active?.()??!0,C=n.workspaceId(),re=n.agentId();if(!B){dt(()=>{b+=1,u=null,te(),R&&clearTimeout(R),R=null,me(),M&&clearTimeout(M),M=null,w(i,!1),Ee()});return}if(!C||!re)return;const Me=`${C}\0${re}`;if(u===Me)return;const L=u!==null;u=Me;const X=++b;dt(()=>{f=null,ve=null,oe=null,w(V,[]),R&&clearTimeout(R),me(),M&&(clearTimeout(M),M=null),L&&(Ee(),n.setInputValue(""),n.contextItemsAreScoped||n.setContextItems([]),n.applyEditorContent(""));const Y=ry(C,re);if(Y){w(V,Y.attachments),w(i,!1);const De=n.contextItems().length>0,z=Y.text,Ie=JSON.stringify(Y.attachments);n.setInputValue(Y.text),De||n.setContextItems(Il(Y.attachments)),n.applyEditorContent(Y.text),f={text:Y.text,attachmentsJson:Ie},ne(C,re,Ce=>{if(Ce.status!=="restored")return;const He=Ce.draft;if(v||!(n.active?.()??!0)||u!==Me||b!==X)return;const st=He?.text??"",Je=He?.attachments??[],Oe=JSON.stringify(Je);lc(C,re,{text:st,attachments:Je});const Pe=n.inputValue()===z&&JSON.stringify(ce())===Ie;De||!Pe||(st!==z&&(n.setInputValue(st),n.applyEditorContent(st)),Oe!==Ie&&n.setContextItems(Il(Je)),f={text:st,attachmentsJson:Oe})});return}w(i,!0),I=setTimeout(()=>{I=null,(n.active?.()??!0)&&w(l,!0)},ux),R=setTimeout(()=>{(n.active?.()??!0)&&(w(i,!1),me())},cx);const be=()=>{!(n.active?.()??!0)||u!==Me||b!==X||(R&&clearTimeout(R),w(i,!1),me())};ne(C,re,De=>{if(De.status!=="restored"){be();return}const z=De.draft;if(v||!(n.active?.()??!0)||u!==Me||b!==X)return;const Ie=!!n.inputValue();if(!Ie&&z?.attachments?.length&&n.contextItems().length===0&&n.setContextItems(Il(z.attachments)),!Ie&&z?.text&&(n.setInputValue(z.text),M=setTimeout(()=>{(n.active?.()??!0)&&n.inputValue()===z.text&&n.applyEditorContent(z.text)},dx)),f===null){const Ce=z?.text??"",He=z?.attachments??[];f={text:Ce,attachmentsJson:JSON.stringify(He)},lc(C,re,{text:Ce,attachments:He})}be()})})}),ie(()=>{const B=n.active?.()??!0,C=n.workspaceId(),re=n.agentId(),Me=e(i);if(!B){dt(Be);return}if(!C||!re)return;const L=n.inputValue(),X=ce();if(dt(Te),dt(Be),Me||f===null&&!L&&X.length===0)return;const Y=JSON.stringify(X);if(f!==null&&f.text===L&&f.attachmentsJson===Y)return;JSON.stringify(e(V))!==Y&&w(V,X);const be=`${C}\0${re}`,De=x,z=crypto.randomUUID();T[z]=Ie=>{if(n.active?.()??!0){if(Ie.status==="saved"){u===be&&x===De&&(f={text:L,attachmentsJson:Y});return}n.onSaveError?.(new Error(Ie.error))}},dt(()=>{F=z,r.dispatch(ow(a,z,{authority:r.authority?.()??void 0,workspaceId:C,agentId:re,text:L,attachments:X,rollback:f?{text:f.text,attachments:JSON.parse(f.attachmentsJson)}:null}))})}),ie(()=>()=>{v=!0,R&&clearTimeout(R),I&&clearTimeout(I),M&&clearTimeout(M),Ee(),se(),r.dispatch(iw(a))});const qe=B=>{const C=Te();return C!==null&&C.authority===B.authority&&C.ownerId===B.ownerId&&C.workspaceId===B.workspaceId&&C.agentId===B.agentId&&C.generation===B.generation&&C.text===B.text&&JSON.stringify(C.attachments)===JSON.stringify(B.attachments)};return{captureDraft:Te,isCurrentDraft:qe,updateAttachmentScreen(B,C,re){return!qe(B)||!B.attachments.some(Me=>Me.id===C)?null:(w(V,B.attachments.map(Me=>Me.id===C?{...Me,screen:structuredClone(re)}:Me)),Te())},async flushDraft(B){if(!qe(B))return!1;if(!r.persistSnapshot)throw new Error("draft-shared-transport-unavailable");return await r.persistSnapshot(a,B.workspaceId,B.agentId,B,B.authority),qe(B)},get restorePending(){return e(d)},get gateActive(){return e(i)},get gateVisible(){return e(l)},invalidatePendingRestore(){if(b+=1,x+=1,te(),R&&(clearTimeout(R),R=null),M&&(clearTimeout(M),M=null),w(i,!1),me(),Be(),u!==null){const[B,C]=u.split("\0");lc(B,C,{text:"",attachments:[]}),ve=null,w(V,[]),f={text:"",attachmentsJson:"[]"}}}}}function Ei(n){if(!n)return null;const r=Af(JSON.stringify([n.workspaceId,n.agentId]),Pf(n.attachments),n.attachments.map(a=>({contextItemId:a.id,attachmentId:a.attachmentId,path:a.path})));return{...r,clips:r.clips.filter(a=>{const i=n.attachments.find(d=>d.id===a.contextItemId);return!!a.media&&!a.mediaError&&!!i&&a.path===i.path})}}async function fx(n,r,a){const i=O.state.principal.snapshot,d=()=>Pi(O.state)===n.authority&&a.isCurrentDraft(n);if(!i||!d()||!await a.flushDraft(n)||!d())return{ready:!1};const l=new AbortController,f=Yc({workspaceId:n.workspaceId,agentId:n.agentId,principalId:i.principal.id,draftId:crypto.randomUUID(),media:[r]},d,l.signal);try{const u=await f.readiness();return!d()||!u.ok?{ready:!1}:u.value.find(b=>b.sourceId===r.source.id)??{ready:!1}}finally{await f.dispose()}}function Vp(n){let r=he(null),a=he(!1),i=he(!1),d=null,l=!0,f=0,u=null;Es(()=>{l=!1,f++}),ie(()=>{const I=n.capture();e(r)&&(!I||I.authority!==e(r).capture.authority||I.ownerId!==e(r).capture.ownerId||I.workspaceId!==e(r).capture.workspaceId||I.agentId!==e(r).capture.agentId||I.attachmentEpoch!==e(r).capture.attachmentEpoch)&&w(r,null)});async function b(I){if(n.disabled()||e(a))return;const M=n.drafts.captureDraft(),x=Ei(M),F=x?.clips.find(V=>V.contextItemId===I);if(!M||!F?.media||!x)return;const D=oy({workspaceId:M.workspaceId,agentId:M.agentId,clip:F,evidence:x,marks:x.marks}),T=_f(M.workspaceId,F.path);if(!D||!T)return;const H=++f;d=document.activeElement instanceof HTMLElement?document.activeElement:null,w(a,!0),w(i,!1);try{if(await n.beforeOpen?.(),!l||f!==H||!n.drafts.isCurrentDraft(M))return;const V=await(n.prepareOutput??fx)(M,F.media,n.drafts);if(!l||f!==H||!n.drafts.isCurrentDraft(M))return;const{attachmentPath:oe,...P}=D;w(r,{capture:M,contextItemId:I,snapshot:{...P,openId:crypto.randomUUID(),mediaUrl:T,output:V,deleteReady:!0}})}catch{l&&f===H&&w(i,!0)}finally{l&&f===H&&w(a,!1)}}async function v(I){const M=crypto.randomUUID(),x=e(r),F=n.drafts.captureDraft();if(!x||!F||F.authority!==x.capture.authority||F.ownerId!==x.capture.ownerId||F.workspaceId!==x.capture.workspaceId||F.agentId!==x.capture.agentId||F.attachmentEpoch!==x.capture.attachmentEpoch)return{requestId:M,result:"stale-source"};const D=Ei(F),T=D?.clips.find(J=>J.contextItemId===x.contextItemId);if(!D||!T?.media)return{requestId:M,result:"stale-source"};const V=u?.openId===x.snapshot.openId&&u.inputRevision===I.revision&&JSON.stringify(u.media)===JSON.stringify(T.media)?{...I,revision:T.media.saved?.revision??0}:I,oe=vS(T.media,{openId:x.snapshot.openId,...x.snapshot.output?.version===2?{outputVersion:2}:{},pair:{workspaceId:F.workspaceId,agentId:F.agentId},sourceId:I.sourceId,sourceRevision:I.sourceRevision,expectedEditRevision:V.revision,edit:V});if(oe.status!=="saved")return{requestId:M,result:oe.status==="invalid-edit"?"failed":oe.status};const P=hS({...D,clips:D.clips.map(J=>J.id===T.id?{...J,media:oe.media}:J)})[x.contextItemId],k=n.drafts.updateAttachmentScreen(F,x.contextItemId,P);if(!k)return{requestId:M,result:"stale-source"};u={openId:x.snapshot.openId,media:oe.media,inputRevision:I.revision};try{if(!n.drafts.isCurrentDraft(k))return{requestId:M,result:"stale-source"};await n.drafts.flushDraft(k);const J=n.drafts.captureDraft();return!l||e(r)?.snapshot.openId!==x.snapshot.openId||!J||J.attachmentEpoch!==x.capture.attachmentEpoch||J.authority!==k.authority||J.ownerId!==k.ownerId||J.workspaceId!==k.workspaceId||J.agentId!==k.agentId||JSON.stringify(J.attachments.find(ge=>ge.id===x.contextItemId)?.screen)!==JSON.stringify(P)?{requestId:M,result:"stale-source"}:(u=null,{requestId:M,result:"saved",saved:oe.media.saved??void 0})}catch{return{requestId:M,result:"failed"}}}function R(I){return n.disabled()||!n.onRemove(I)?!1:(e(r)?.contextItemId===I&&w(r,null),!0)}return{get session(){return e(r)},get opening(){return e(a)},get problem(){return e(i)},open:b,save:v,remove:R,close(){w(r,null)},restoreFocus(){d?.isConnected&&d.focus()}}}var vx=E('<p role="alert"> </p>'),hx=E('<div class="recording-editor-surface svelte-cdb16"><!></div>'),mx=E("<!> <!> <!>",1);function iv(n,r){if(new.target)return ln({component:iv,...n});un(r,!0);let a=Z(r,"capture",7),i=Z(r,"drafts",7),d=Z(r,"disabled",7,!1),l=Z(r,"onRemove",7),f=Z(r,"controllerFactory",7,Vp),u=Z(r,"beforeOpen",7),b=Z(r,"onReviewChange",7);const v=dt(()=>f()({drafts:i(),capture:()=>a(),disabled:()=>d(),onRemove:P=>l()(P),beforeOpen:()=>u()?.()??Promise.resolve()}));ie(()=>{const P=v.opening,k=v.session;dt(()=>b()?.(P,k?.snapshot.output?.ready?{openId:k.snapshot.openId,capture:k.capture}:null))});const R=o(iy),I=o(()=>Ei(a())),M=o(()=>e(I)?.clips.map(P=>({id:P.contextItemId,kind:"clip",owner:"evidence",duration:Tp(P.durationMs),recording:!1,url:a()?_f(a().workspaceId,P.path):void 0,...P.media?.saved?{summary:ly(P.media.saved)}:{}}))??[]);let x=he(null);var F={get capture(){return a()},set capture(P){a(P),ee()},get drafts(){return i()},set drafts(P){i(P),ee()},get disabled(){return d()},set disabled(P=!1){d(P),ee()},get onRemove(){return l()},set onRemove(P){l(P),ee()},get controllerFactory(){return f()},set controllerFactory(P=Vp){f(P),ee()},get beforeOpen(){return u()},set beforeOpen(P){u(P),ee()},get onReviewChange(){return b()},set onReviewChange(P){b(P),ee()},$set:dn,$on:(P,k)=>cn(r,P,k)},D=mx(),T=ye(D);{let P=o(()=>d()||v.opening);CS(T,{get items(){return e(M)},get labels(){return e(R)},get disabled(){return e(P)},onEdit:k=>void v.open(k),onMarkUp:k=>void v.open(k),get onRemove(){return v.remove}})}var H=_(T,2);{var V=P=>{var k=vx(),J=de(k,!0);q(ge=>j(J,ge),[()=>g.dock_captureEditor_saveFailed_label()]),p(P,k)};N(H,P=>{v.problem&&P(V)})}var oe=_(H,2);{let P=o(()=>!!v.session),k=o(()=>g.dock_captureEditor_recording_title({duration:v.session?Tp(v.session.snapshot.durationMs??0):""}));I$(oe,{get open(){return e(P)},size:"editor",showCloseButton:!1,get title(){return e(k)},escapeKeydownBehavior:"ignore",dismissOnInteractOutside:!1,onClose:()=>v.close(),onCloseAutoFocus:J=>{J.preventDefault(),v.restoreFocus()},get contentRef(){return e(x)},set contentRef(J){w(x,J,!0)},children:(J,ge)=>{var Te=Ot(),ve=ye(Te);{var ce=we=>{var ne=Ot(),te=ye(ne);xi(te,()=>v.session.snapshot.openId,Be=>{var se=hx(),me=S(se);$$(me,{get snapshot(){return v.session.snapshot},get shortcutDialog(){return e(x)},onClose:()=>v.close(),get onSave(){return v.save},onDelete:async()=>!!v.session&&v.remove(v.session.contextItemId)}),y(se),p(Be,se)}),p(we,ne)};N(ve,we=>{v.session&&we(ce)})}p(J,Te)},$$slots:{default:!0}})}return p(n,D),gn(F)}const Cl=n=>JSON.stringify([n.authority,n.ownerId,n.workspaceId,n.agentId,n.attachmentEpoch,n.attachments]);function _x(n){let r=he(!1),a=he(!1),i=he(null),d=!1,l=0,f=null,u=null;async function b(I){I.abort.abort(),I.slot?.cancel(),await I.native?.dispose()}async function v(){l++;const I=u;u=null,I&&await b(I)}no(()=>{const I=()=>{w(r,document.hasFocus(),!0)};return I(),window.addEventListener("focus",I),window.addEventListener("blur",I),()=>{window.removeEventListener("focus",I),window.removeEventListener("blur",I)}});const R=O.getReadableState().subscribe(()=>{u&&!u.current()&&v()});return Es(()=>{d=!0,R(),v()}),ie(()=>{const I=n.capture(),M=I?Cl(I):"",x=e(r)&&!e(a)&&(n.active()||e(i)?.key===M);dt(()=>{if(!x||!I){v();return}if(u?.key===M)return;if(f===M){v();return}v();const D=Ei(I)?.clips.flatMap(Te=>!Te.mediaError&&Te.media?[Te.media]:[])??[],T=D[0],H=O.state.principal.snapshot,V=Dl.select(O.state,I.workspaceId);if(!T||!H||!V||n.drafts.gateActive)return;const oe=hf(),P=new AbortController,k=()=>!d&&!P.signal.aborted&&Pi(O.state)===I.authority&&Dl.select(O.state,I.workspaceId)===V&&mf(oe)&&!!n.capture()&&Cl(n.capture())===M,J={key:M,capture:I,abort:P,native:null,slot:null,current:k};u=J;const ge=l;n.drafts.flushDraft(I).then(async Te=>{if(!(u!==J||ge!==l||!k())){if(!Te){f=M,await v();return}J.native=Yc({workspaceId:I.workspaceId,agentId:I.agentId,draftId:crypto.randomUUID(),principalId:H.principal.id,media:structuredClone(D)},k,P.signal),J.slot=dy(J.native.service),f=M,J.slot.warm(M,T,k)}}).catch(()=>{u===J&&v()})})}),{cancel:v,async beforeEditorOpen(){w(a,!0),f=null,await v()},editorState(I,M){w(a,I,!0);const x=M?Cl(M.capture):null;M&&e(i)?.openId!==M.openId&&(f=null),w(i,M&&x?{openId:M.openId,key:x}:null)},take(I,M){const x=u;if(!x?.native||!x.slot||x.key!==Cl(I)||!x.current())return v(),null;u=null,l++;const F=x.native,D=x.slot,T=()=>x.abort.abort();return M.addEventListener("abort",T,{once:!0}),M.aborted&&T(),{service:{...F.service,takePreparedRecording:H=>D.take(x.key,H,()=>!M.aborted&&x.current())},async dispose(){M.removeEventListener("abort",T),await b(x)}}}}}var wx=E('<div role="status" class="px-3 py-1.5 text-xs text-muted-foreground" data-testid="chat-draft-loading-gate"><span> </span></div>');function lv(n,r){if(new.target)return ln({component:lv,...n});un(r,!1);var a={$set:dn,$on:(f,u)=>cn(r,f,u)};Ff();var i=wx(),d=S(i),l=de(d,!0);return y(i),q(f=>j(l,f),[()=>g.chat_draftGate_loading_label()]),p(n,i),gn(a)}var bx=E('<div data-new-messages-divider="" class="type-caption font-family-child my-6 flex items-center gap-2 px-2" role="separator"><div class="h-px flex-1 bg-border"></div> <span class="whitespace-nowrap px-1 font-medium text-foreground"> </span> <div class="h-px flex-1 bg-border"></div></div>');function qc(n,r){if(new.target)return ln({component:qc,...n});un(r,!1);var a={$set:dn,$on:(f,u)=>cn(r,f,u)};Ff();var i=bx(),d=_(S(i),2),l=de(d,!0);return vn(2),y(i),q((f,u)=>{Ne(i,"aria-label",f),j(l,u)},[()=>g.chat_newMessagesDivider_label(),()=>g.chat_newMessagesDivider_label()]),p(n,i),gn(a)}function yx(n,r){if(!r||n.length===0)return null;const a=n.indexOf(r);return a===-1||a===n.length-1?null:r}function Ix(n,r,a){if(!r||n.length===0)return"none";const i=n.indexOf(r);return i===n.length-1?"none":i!==-1?"marker-loaded":a.complete?a.truncated?"marker-beyond-window":"none":"marker-pending"}function Sx(n,r){return r&&n.includes(r)?r:null}function Kp(n,r,a){return r-n<=a}const $x=.2;function Qp(n,r,a){const i=Math.max(0,a-r),d=n-$x*r;return Math.min(Math.max(0,d),i)}function kx(n,r,a){return n!==null&&a&&n===r}function xx(n){return n?pw(n)&&fw(n)!==null&&typeof n.metadata?.taskNoteId=="string":!1}function Cx(n){const r=[],a=new Set;let i,d;for(const H of n.messages){if(H.agentId&&H.agentId!==n.agentId){i=void 0,d=void 0;continue}if(a.has(H.id))continue;a.add(H.id),n.breakBeforeMessageIds?.has(H.id)&&(i=void 0,d=void 0);const V=PS(H);if(V?.kind!=="turn-failure")d=void 0;else{const oe=i?.seq!==void 0&&H.seq!==void 0&&Number.isSafeInteger(i.seq)&&Number.isSafeInteger(H.seq)&&H.seq===i.seq+1;(!d||!oe)&&(d={key:JSON.stringify([n.agentId,"notice",H.id]),anchorMessageId:H.id,correlation:"unavailable",records:[],recordedFailureCount:0},r.push(d)),d.records.push({messageId:H.id,reason:V.reason,timestamp:H.timestamp}),d.recordedFailureCount+=1}i=H}const l=new Map;for(const H of n.queue){if(!H.requeuedAfterFailure)continue;const V=H.turnId||void 0,oe=JSON.stringify([n.agentId,V?"turn":"queue",V??H.id]);let P=l.get(oe);P||(P={key:oe,correlation:V?"turn":"queue-entry",turnId:V,queueIds:[],state:"queued"},l.set(oe,P)),P.queueIds.includes(H.id)||P.queueIds.push(H.id)}const f=[...l.values()],u=n.session?.id===n.agentId?n.session:void 0,b=u?.status===$i.Error,v=n.transientError||b&&u.stopReason||null,R=b&&!v,I=b&&(!n.transientError||n.transientError===u.stopReason)?u.stopReasonTimestamp:void 0,M=I?bp(I):null,x=M&&v&&v===u?.stopReason?r.flatMap(H=>H.records).filter(H=>H.reason===v&&bp(H.timestamp)===M):[],F=x.length===1?x[0].messageId:void 0,T=(u?If(u):!1)?"attempting":f.length?"queued":v||R?"action-needed":"inactive";return{history:r,queueRecovery:f,current:{state:T,error:v,needsFallbackReason:R,timestamp:I,noticeId:F}}}function Px(n,r){const a=n.hiddenTail[0]?.id,i=Cx({...r,messages:[...n.groups.flatMap(u=>u.messages),...n.hiddenTail],breakBeforeMessageIds:new Set(a?[a]:[])}),d=i.current.noticeId,l=i.history.map(u=>({...u,records:u.records.filter(b=>b.messageId!==d)})).filter(u=>u.records.length>0),f=new Set(l.map(u=>u.records[0].messageId));return{...i,runsByAnchor:new Map(l.map(u=>[u.records[0].messageId,u])),collapsedMessageIds:new Set(i.history.flatMap(u=>u.records.map(b=>b.messageId).filter(b=>!f.has(b))))}}var Rx=E('<div class="flex size-10 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <div class="min-w-0 flex-1"><div class="type-body truncate font-medium text-foreground"> </div> <div class="type-caption mt-0.5 line-clamp-2 text-muted-foreground"> </div></div> <div class="flex size-7 shrink-0 items-center justify-center rounded-md bg-muted/50 text-muted-foreground transition-colors group-hover:bg-muted"><!></div>',1),Tx=E('<div class="flex size-9 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <span class="type-body font-medium"> </span>',1),Ax=E('<div><div class="border-b border-border bg-muted/20 px-4 py-3"><p class="type-body font-medium text-foreground"> </p> <p class="type-caption mt-0.5 text-muted-foreground"> </p></div> <div class="max-h-[21rem] overflow-y-auto p-2"><!></div> <div class="border-t border-border bg-popover p-2"><!></div></div>'),Mx=E('<div class="mb-5"><!></div>'),Ex=E('<p data-testid="agent-welcome-description"> </p> <!>',1),qx=E("<!> <!>",1),Lx=E('<p class="mb-3 px-4 text-sm text-subtle leading-relaxed whitespace-pre-wrap" data-testid="agent-welcome-description"> </p>'),Hx=E("<!> <span> </span>",1),Ox=E('<div class="mx-auto flex w-full max-w-[40rem] flex-1 flex-col px-4 pb-6 pt-4 text-subtle"><!> <!> <!></div>');function dv(n,r){if(new.target)return ln({component:dv,...n});un(r,!0);const a=()=>pe(x,"$userOverrides$",f),i=()=>pe(M,"$specialists$",f),d=()=>pe(H,"$isGitHubAuth$",f),l=()=>pe(V,"$recentSpecialistIds$",f),[f,u]=Ur();let b=Z(r,"onSpecialistChange",7),v=Z(r,"session",7),R=Z(r,"workspaceId",7);const I=Bn(R()??"");ie(()=>I.set(R()??""));const M=zf(I),x=G$();ie(()=>{a()});const F=o(()=>{if(!v()||zy(v()))return null;const B=v().metadata?.specialist||v().agentMetadata?.specialist;return B&&i().find(C=>C.id===B)||null});async function D(B){B?await zl({specialist:B,hash:"specialists"}):await zl({view:"create-specialist"})}let T=he(!1);const H=V$(),V=aS(),oe=o(()=>vw(K$(i(),d()),l()));let P=he(!1);const k=o(()=>g.chat_regularAgentWelcome_generalDescription_label()),J=o(()=>e(F)?.name??g.chat_shared_general_fallback()),ge=o(()=>e(F)?.description??g.chat_shared_noSpecializedBehavior_label()),Te=o(()=>e(F)?e(F).defaultBehaviorPrompt||"":e(k));var ve={get onSpecialistChange(){return b()},set onSpecialistChange(B){b(B),ee()},get session(){return v()},set session(B){v(B),ee()},get workspaceId(){return R()},set workspaceId(B){R(B),ee()},$set:dn,$on:(B,C)=>cn(r,B,C)},ce=Ox(),we=S(ce);{var ne=B=>{var C=Mx(),re=S(C);ok(re,{class:"block w-full",align:"start",side:"bottom",contentClass:"w-[min(28rem,calc(100vw-2rem))]",get open(){return e(P)},set open(X){w(P,X,!0)},trigger:(X,Y)=>{let be=()=>(Y?.()).props;{let De=o(()=>Wc("group flex h-auto min-h-(--control-height-medium) w-full cursor-pointer items-center gap-3 whitespace-normal rounded-lg border border-border bg-card px-4 py-3 text-left shadow-xs transition-colors","hover:border-input hover:bg-accent/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"));It(X,qi(be,{type:"button",variant:"plain",wrapContent:!1,get class(){return e(De)},"data-testid":"specialist-picker-trigger",children:(z,Ie)=>{var Ce=Rx(),He=ye(Ce),st=S(He);{let Se=o(()=>e(F)?.id??null),Ae=o(()=>e(F)?.icon??null);sk(st,{agentId:"blank",variant:"emphasized",get specialist(){return e(Se)},get icon(){return e(Ae)}})}y(He);var Je=_(He,2),Oe=S(Je),Pe=de(Oe,!0),G=_(Oe,2),ae=de(G,!0);y(Je);var Le=_(Je,2),Q=S(Le);ft(Q,{get icon(){return Na},size:10}),y(Le),q(()=>{j(Pe,e(J)),j(ae,e(ge))}),p(z,Ce)},$$slots:{default:!0}}))}},content:X=>{var Y=Ax(),be=S(Y),De=S(be),z=de(De,!0),Ie=_(De,2),Ce=de(Ie,!0);y(be);var He=_(be,2),st=S(He);{let Pe=o(()=>e(F)?.id??null);V_(st,{get specialists(){return e(oe)},get value(){return e(Pe)},onchange:G=>{w(P,!1),b()?.(G)}})}y(He);var Je=_(He,2),Oe=S(Je);Rt(Oe,()=>Br,(Pe,G)=>{G(Pe,{class:"flex h-auto w-full cursor-pointer items-center gap-3 whitespace-normal rounded-md px-3 py-2 text-left text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onSelect:()=>{w(P,!1),D()},children:(ae,Le)=>{var Q=Tx(),Se=ye(Q),Ae=S(Se);ft(Ae,{get icon(){return R$},size:12}),y(Se);var ze=_(Se,2),Ge=de(ze,!0);q(We=>j(Ge,We),[()=>g.chat_regularAgentWelcome_createSpecialist_label()]),p(ae,Q)},$$slots:{default:!0}})}),y(Je),y(Y),q((Pe,G)=>{j(z,Pe),j(Ce,G)},[()=>g.workspace_createAgentSection_specialists_label(),()=>g.workspace_createAgentSection_specialists_description()]),p(X,Y)},$$slots:{trigger:!0,content:!0}}),y(C),p(B,C)};N(we,B=>{b()&&B(ne)})}var te=_(we,2);{var Be=B=>{var C=Ot(),re=ye(C);{let Me=o(()=>g.chat_specialistSelector_prompt_label());Rt(re,()=>lk,(L,X)=>{X(L,{class:"mb-3",role:"region",get"aria-label"(){return e(Me)},children:(Y,be)=>{var De=qx(),z=ye(De);Rt(z,()=>rv,(Ce,He)=>{He(Ce,{children:(st,Je)=>{var Oe=Ot(),Pe=ye(Oe);Rt(Pe,()=>av,(G,ae)=>{ae(G,{class:"type-caption font-medium",children:(Le,Q)=>{vn();var Se=on();q(Ae=>j(Se,Ae),[()=>g.chat_specialistSelector_prompt_label()]),p(Le,Se)},$$slots:{default:!0}})}),p(st,Oe)},$$slots:{default:!0}})});var Ie=_(z,2);Rt(Ie,()=>ik,(Ce,He)=>{He(Ce,{children:(st,Je)=>{var Oe=Ex(),Pe=ye(Oe),G=de(Pe,!0),ae=_(Pe,2);It(ae,{type:"button",variant:"link",get"aria-expanded"(){return e(T)},onclick:()=>w(T,!e(T)),class:"text-xs text-muted-foreground hover:text-foreground transition-colors mt-2 cursor-pointer",children:(Le,Q)=>{vn();var Se=on();q(Ae=>j(Se,Ae),[()=>e(T)?g.chat_regularAgentWelcome_showLess_label():g.chat_regularAgentWelcome_showMore_label()]),p(Le,Se)},$$slots:{default:!0}}),q(()=>{ke(Pe,1,`text-sm text-subtle leading-relaxed whitespace-pre-wrap break-words ${e(T)?"":"line-clamp-6"}`),j(G,e(Te))}),p(st,Oe)},$$slots:{default:!0}})}),p(Y,De)},$$slots:{default:!0}})})}p(B,C)},se=B=>{var C=Lx(),re=de(C,!0);q(()=>j(re,e(Te))),p(B,C)};N(te,B=>{e(F)?B(Be):B(se,-1)})}var me=_(te,2);{var Ee=B=>{It(B,{variant:"ghost-light",size:"sm",onclick:()=>D(e(F).id),class:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors cursor-pointer pl-1.5 mr-auto",children:(C,re)=>{var Me=Hx(),L=ye(Me);ft(L,{get icon(){return P$},size:12,class:"opacity-60"});var X=_(L,2),Y=de(X,!0);q(be=>j(Y,be),[()=>g.chat_regularAgentWelcome_customize_label()]),p(C,Me)},$$slots:{default:!0}})};N(me,B=>{e(F)&&B(Ee)})}y(ce),p(n,ce);var qe=gn(ve);return u(),qe}var Fx=E('<a class="cursor-pointer underline underline-offset-2 hover:opacity-80" data-suggested-prompt-link=""> </a>'),Dx=E('<kbd data-suggested-prompt-hint=""> </kbd>'),Nx=E('<span class="type-caption"> </span>'),Bx=E('<div role="presentation" data-typography-role="body" data-suggested-prompt-row=""><span data-suggested-prompt-icon=""><!></span> <span class="min-w-0 flex-1 text-pretty" data-suggested-prompt-label=""><span role="button" tabindex="0" class="focus-visible:outline-none" data-suggested-prompt-text=""> </span><!></span> <!> <!></div>'),Wx=E('<div class="flex flex-col" data-testid="suggested-prompts-surface"><!></div>');function Xc(n,r){if(new.target)return ln({component:Xc,...n});un(r,!0);let a=Z(r,"prompts",7),i=Z(r,"onSelect",7),d=Z(r,"onEdit",7),l=Z(r,"compact",7,!1),f=Z(r,"showShortcutHints",7,!1),u=Z(r,"reserveShortcutHintSpace",7,!1),b=Z(r,"workspaceId",7);const R=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC")?"⌃":"Alt+",I=s$.replace("text-ui","type-caption");function M(k){i()(k)}function x(k,J){k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),M(J))}function F(k,J){k.preventDefault(),k.stopPropagation(),Mc(J,{workspaceId:b(),event:k})}function D(k,J){(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),k.stopPropagation(),Mc(J,{workspaceId:b(),event:k}))}function T(k){return k<3}var H={get prompts(){return a()},set prompts(k){a(k),ee()},get onSelect(){return i()},set onSelect(k){i(k),ee()},get onEdit(){return d()},set onEdit(k){d(k),ee()},get compact(){return l()},set compact(k=!1){l(k),ee()},get showShortcutHints(){return f()},set showShortcutHints(k=!1){f(k),ee()},get reserveShortcutHintSpace(){return u()},set reserveShortcutHintSpace(k=!1){u(k),ee()},get workspaceId(){return b()},set workspaceId(k){b(k),ee()},$set:dn,$on:(k,J)=>cn(r,k,J)},V=Ot(),oe=ye(V);{var P=k=>{var J=Wx(),ge=S(J);{const Te=(ce,we)=>{let ne=()=>(we?.()).item,te=()=>(we?.()).index;const Be=o(()=>Qb(ne())),se=o(()=>e(Be)[0]?.type==="text"?e(Be)[0].content:"");var me=Bx(),Ee=S(me),qe=S(Ee);ft(qe,{get icon(){return Df},size:16,get class(){return ur}}),y(Ee);var B=_(Ee,2),C=S(B),re=de(C,!0),Me=_(C);Dn(Me,17,()=>e(Be).slice(e(se)?1:0),z_,(z,Ie)=>{var Ce=Ot(),He=ye(Ce);{var st=Oe=>{const Pe=o(()=>Kb(e(Ie).url));var G=Fx(),ae=de(G,!0);q(()=>{Ne(G,"href",e(Pe)),Ne(G,"title",e(Pe)),j(ae,e(Ie).label)}),ps("click",G,Le=>F(Le,e(Pe))),ps("keydown",G,Le=>D(Le,e(Pe))),p(Oe,G)},Je=Oe=>{var Pe=on();q(()=>j(Pe,e(Ie).content)),p(Oe,Pe)};N(He,Oe=>{e(Ie).type==="link"?Oe(st):Oe(Je,-1)})}p(z,Ce)}),y(B);var L=_(B,2);{var X=z=>{var Ie=Dx();let Ce;var He=de(Ie);q(()=>{Ce=ke(Ie,1,`${I??""} mt-px inline-flex h-5 items-center self-start border-0 bg-transparent p-0 font-sans font-normal text-muted-foreground! opacity-100`,null,Ce,{invisible:!f()}),Ne(Ie,"aria-hidden",f()?void 0:"true"),Ne(Ie,"data-hint-visible",f()),j(He,`${R}${te()+1}`)}),p(z,Ie)},Y=o(()=>T(te())&&(f()||u()));N(L,z=>{e(Y)&&z(X)})}var be=_(L,2);{var De=z=>{C$(z,{side:"top",delayDuration:300,trigger:He=>{{let st=o(()=>g.chat_suggestedPrompts_editInInput_ariaLabel());It(He,{type:"button",variant:"ghost-light",size:"icon-xs",iconOnly:!0,class:"absolute right-0.5 top-[calc(var(--operational-leading-half-slot-size)+var(--space-1)*0.5+1px)] shrink-0 -translate-y-1/2 rounded opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100",onclick:Je=>{Je.stopPropagation(),d()(ne())},get"aria-label"(){return e(st)},children:(Je,Oe)=>{ft(Je,{get icon(){return T$},size:"xs"})},$$slots:{default:!0}})}},content:He=>{var st=Nx(),Je=de(st,!0);q(Oe=>j(Je,Oe),[()=>g.chat_suggestedPrompts_edit_tooltip()]),p(He,st)},$$slots:{trigger:!0,content:!0}})};N(be,z=>{d()&&z(De)})}y(me),q(z=>{ke(me,1,`${Of} ${a$} group relative flex cursor-pointer items-center gap-[var(--operational-leading-gap)] rounded-sm border border-transparent bg-transparent px-1.5 py-0.5 text-left opacity-100 pr-9 transition-colors hover:text-foreground has-[[data-suggested-prompt-text]:focus-visible]:outline-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-offset-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-ring`),ke(Ee,1,`${Bl??""} mt-px self-start`),Ne(C,"aria-label",z),j(re,e(se))},[()=>Vb(ne())]),ps("click",C,z=>{z.stopPropagation(),M(ne())}),ps("keydown",C,z=>x(z,ne())),p(ce,me)};let ve=o(()=>l()?"[&>div>div:last-child]:gap-0":"[&>div>div:last-child]:gap-0.5");S$(ge,{get items(){return a()},virtualize:!1,onActivate:M,get class(){return`overflow-visible! [&>div>div:last-child]:flex [&>div>div:last-child]:flex-col ${e(ve)??""}`},"data-testid":"suggested-prompts-list",get"data-compact"(){return l()},row:Te,$$slots:{row:!0}})}y(J),Lt(1,J,()=>ma,()=>({tier:"fast",y:0,scale:1})),Lt(2,J,()=>eo,()=>({tier:"fast"})),p(k,J)};N(oe,k=>{a().length>0&&k(P)})}return p(n,V),gn(H)}Bc(["click","keydown"]);var Ux=E('<section class="pb-6 pt-6"><p class="type-body mb-5 max-w-[36rem] px-1.5 text-pretty text-muted-foreground"> </p> <!></section>');function cv(n,r){if(new.target)return ln({component:cv,...n});un(r,!0);let a=Z(r,"onSelect",7),i=Z(r,"compact",7,!1);const d=o(()=>[{label:g.chat_chiefEmptyState_assignedPrs_label(),prompt:g.chat_chiefEmptyState_assignedPrs_prompt()},{label:g.chat_chiefEmptyState_staleWorkspaces_label(),prompt:g.chat_chiefEmptyState_staleWorkspaces_prompt()},{label:g.chat_chiefEmptyState_agentPerformance_label(),prompt:g.chat_chiefEmptyState_agentPerformance_prompt()},{label:g.chat_chiefEmptyState_morningBrief_label(),prompt:g.chat_chiefEmptyState_morningBrief_prompt()},{label:g.chat_chiefEmptyState_randomTheme_label(),prompt:g.chat_chiefEmptyState_randomTheme_prompt()}]),l=o(()=>e(d).map(M=>M.label));function f(M){const x=e(d).find(F=>F.label===M);x&&a()(x.prompt)}var u={get onSelect(){return a()},set onSelect(M){a(M),ee()},get compact(){return i()},set compact(M=!1){i(M),ee()},$set:dn,$on:(M,x)=>cn(r,M,x)},b=Ux(),v=S(b),R=de(v,!0),I=_(v,2);return Xc(I,{get prompts(){return e(l)},onSelect:f,get compact(){return i()}}),y(b),q(M=>j(R,M),[()=>g.chat_chiefEmptyState_intro_label()]),p(n,b),gn(u)}const Zc=2e3,zx=4e3,jx=zx-Zc-2;function Gx(n,r=Zc){const a=[];let i=0;for(let d=n.length-1;d>=0&&i<r;d-=1){const l=n[d];if(l.role!=="user"&&l.role!=="assistant")continue;const f=(l.contentBlocks??[]).filter(b=>b.type==="text").map(b=>b.text||b.content||"").join(""),u=(l.role==="assistant"?K_(f).cleanedContent:f).trim();u&&(a.unshift({role:l.role,text:u}),i+=u.length)}return a}function Vx(n,r){const a=n.map(l=>`${l.role==="user"?"User":"Assistant"}: ${l.text}`).join(`
1
+ var N_=Object.defineProperty;var Fg=n=>{throw TypeError(n)};var B_=(n,r,a)=>r in n?N_(n,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[r]=a;var Js=(n,r,a)=>B_(n,typeof r!="symbol"?r+"":r,a),W_=(n,r,a)=>r.has(n)||Fg("Cannot "+a);var Ro=(n,r,a)=>(W_(n,r,"read from private field"),a?a.call(n):r.get(n)),Dg=(n,r,a)=>r.has(n)?Fg("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,a);import{t as ln,bo as Z,bw as dn,bp as cf,b as cn,bm as g,bq as Ur,bs as pe,br as qi}from"./1KDVFF23.js";import{bs as un,a5 as S,bf as fs,bA as y,W as p,bn as gn,aA as ee,aB as E,ca as ie,a7 as Ot,ay as ye,aD as e,cd as Bn,c9 as o,bS as _,bl as de,be as vn,b_ as q,bO as j,c5 as dt,bH as w,bV as he,bj as Es,bk as no,b$ as on,ai as Bc,aj as ps,bo as jl,br as Mr,c0 as qt,cb as sc,aw as wi,a as U_}from"./3SdAC2_C.js";import{i as N}from"./Zg9SWWIQ.js";import{k as xi}from"./Dhj-Oo-y.js";import{g as Dn,i as z_,I as qo,p as Lo,e as Mo}from"./CYCawVEx.js";import{n as Lt,l as ma,c as eo,j as Ng,k as Fo,h as j_}from"./CjK2zm52.js";import{b as uf,e as Wc,f as ke,s as Ne,c as Wt,g as gs}from"./D8B7qxXm.js";import{b as G_}from"./goTpbPhD.js";import{b as wr}from"./Dn334wJv.js";import{m as V_,U as K_,Z as Q_,X as J_,Y as Y_,I as Bg,o as X_,l as Z_,a2 as ew,x as Wg,$ as tw,a0 as Ug,r as nw,s as rw}from"./CJBG3N9y.js";import{Jr as O,fo as aw,eW as sw,f3 as ow,eX as iw,f1 as lw,f0 as dw,eZ as cw,e$ as uw,eY as gw,rt as pw,c6 as fw,i as $i,J0 as vw,D9 as gf,De as hw,Dg as zg,Dd as mw,Df as _w,vC as ww,vE as bw,Cm as pf,cp as yw,cn as Iw,Bv as Sw,bE as $w,A1 as kw,Cb as oc,u_ as xw,cq as jg,dB as Cw,dC as Pw,Cl as Rw,el as Tw,CF as Aw,CE as Mw,CJ as Ew,CI as qw,cQ as Lw,cT as Hw,nB as Ow,er as Fw,wP as Dw,CK as Nw,wR as Bw,CL as Ww,cU as Uw,cV as zw,nJ as jw,Ae as Gw,Dq as Vw,wk as Kw,wl as Qw,yZ as Jw,z1 as ic,wg as Yw,wh as Xw,rR as Zw,re as eb,rc as tb,f_ as nb,HL as rb,Lf as ab,GJ as sb,gn as ob,p1 as ib,Jf as lb,oi as db,A0 as cb,ft as Gg,r1 as Vg,fm as ub,fl as gb,tA as pb,g3 as Kg,rd as fb,fe as vb,C6 as hb,m as mb,nK as _b,zF as wb,yX as bb,Ew as yb,El as Qg,xf as Ib,xg as Jg,uZ as Yg,p2 as Sb,DC as $b,gj as kb,g1 as xb,eU as Cb,cM as Pb,A4 as Rb,Lk as Tb,Cr as Ab,LC as Mb,y0 as Eb,ga as qb,fd as Lb,cL as Hb,cI as Ob,cH as Fb,vq as Db,xm as Nb,xk as Bb,cF as Wb,cE as Ub,z3 as zb,y_ as jb,xl as Gb}from"./BPo1GPk4.js";import{a as Uc}from"./CC7to1B5.js";import{aM as Vb,aL as Kb,bg as Qb,a7 as Jb,aD as Yb,aO as Xb,M as ff,a0 as vf,b8 as Zb,b2 as ey,as as Xg,P as bl,b0 as Zg,a$ as ep,a_ as tp}from"./CpIVKWwx.js";import{k as hf,F as ty,G as Cc,ar as ny,a_ as El,a8 as mf,Q as ry,aT as lc,ao as ay,aG as sy,B as oy,y as _f,r as iy,z as ly,u as dy,aY as cy,aE as wf,aD as bf,aF as uy,aJ as dc,aQ as np,aP as yl,aR as rp,P as ap,d as gy,e as py,av as fy,V as sp,aC as vy,c as hy,l as my,aS as op,an as _y,au as ip,a as wy,ay as by,ac as lp,aB as yy,aU as dp,aX as cp,m as up,ad as Iy,R as Sy,aw as gp,ak as $y,O as ky,aq as xy,h as Cy,p as Py,_ as cc,Z as Ry,aA as pp,a7 as Ty,f as Ay,i as My,a5 as Ey,ab as qy}from"./pIjvEfMB.js";import{f as Ly,o as Hy,E as Oy,C as Fy,m as Dy,a2 as fp,aa as Ny,K as By,e as Wy,y as Uy}from"./Q-Hp56ht.js";import{g as Pi}from"./DypB-Dwi.js";import{dW as Dl,cU as yf,O as If,W as zy,bv as jy,aF as Sf,dH as $f,aV as Eo,e8 as Gy,dw as kf,aw as zc,dV as jc,aO as xf,cP as Vy,V as ha,a3 as Xs,B as Ky,a7 as Qy,a4 as Jy,M as Yy,a6 as Xy,ar as Zy,aG as Cf,aP as ql,r as eI,n as Pc,H as tI,dY as nI,aR as rI,aK as aI,c9 as sI,aX as oI,bM as iI,bK as lI,bL as dI,c8 as cI,c7 as uI,cN as gI,cM as pI,aT as fI,bb as vI,bd as hI,bg as mI,bc as _I,bl as wI,bf as bI,be as yI,bh as II,bi as SI,bk as $I,bj as kI,ax as xI,ay as CI,cj as PI,ck as RI,dv as TI,du as AI,b0 as MI,G as EI,b4 as qI,cf as LI,C as vp,d0 as HI,ba as cs,b$ as OI,X as FI,bq as DI,E as NI,ad as BI,t as WI,cW as UI,d3 as hp,Q as mp,dt as zI,cQ as uc}from"./DkYquFOp.js";import{u as Pf,a as Il,ag as jI,x as GI,ad as Rf,af as VI,ac as Tf,a4 as KI,F as _p,D as QI,e as JI,n as YI,s as XI,m as ZI,Y as eS,k as tS}from"./Ydj2ePK_.js";import{a2 as nS,b5 as rS,cM as aS,a_ as sS,b4 as oS,c2 as iS,c9 as lS,w as dS,x as cS,cd as uS}from"./Cvp_IOBl.js";import{n as gS,P as Af,F as pS,ai as fS,r as vS,ac as hS}from"./PtMxuYy8.js";import{I as mS,s as _S,H as wp}from"./Bqd7fdCF.js";import{e as wS}from"./CL3a4Hm1.js";import{e as bS,f as yS}from"./C7hm9bSX.js";import{s as IS,o as Zs,b as SS,g as Nl,d as $S,l as bi}from"./CIyUrgF0.js";import{a5 as kS,a7 as xS,D as CS,N as PS,ac as bp,X as RS,i as TS,r as cr,v as Ri,u as na,p as ki,x as br,S as Gc,m as Gl,s as Ho,y as Ti,o as ro,n as ao,t as yp,aa as so,w as oo,a9 as Vc,q as _a,z as Oo,J as Rc,_ as Ip,g as AS,F as MS,U as Mf,I as Ef,a8 as qf,a6 as Ll,O as ES,E as Lf,V as qS,A as LS,b as HS,ab as OS,ad as Sl,G as FS,e as gc,l as DS,C as NS,f as Ys,j as Sp,H as us,Q as BS,d as $l,c as WS,a as $p,h as US,L as zS,Y as kp,a4 as pc,a1 as xp,a0 as jS,a3 as Cp,$ as Pp,T as GS,B as VS,k as KS,a2 as QS,K as JS,R as YS,P as XS,W as ZS}from"./CW7lfTzm.js";import{m as e$}from"./Dms_DO28.js";import{g as Hf}from"./CkrblKaH.js";import{b as t$}from"./BIwMjRQQ.js";import{g as n$}from"./BA7mfVzm.js";import{a as r$}from"./CClsvy7n.js";import{q as Of,d as ur,r as a$,e as Bl,j as s$,g as Tc,i as o$,f as Ac,c as i$,A as l$,O as Rp,k as d$}from"./sZBOVpM6.js";import{P as c$}from"./DpgIqMGp.js";import{e as u$}from"./CEqmtghP.js";import{b as g$,a as p$,g as f$,c as v$,i as h$}from"./DPF9_zKV.js";import{R as m$,g as _$,W as kl,c as w$}from"./CX4bqTrJ.js";import"./Ch-pFfsN.js";import"./IdqO6uHC.js";import{s as Ai}from"./Dmy603At.js";import{F as b$,h as y$}from"./BpT_ybtH.js";import"./CBLFNmYJ.js";import{C as I$,e as Br,L as S$,l as Vl,d as Kl,K as Ql,h as Kc,M as Jl,S as Da}from"./DHbv9I-C.js";import{D as $$}from"./Bv5YjDej.js";import{f as Tp}from"./nHwpsxWy.js";import"./DU3vNstz.js";import{i as Ff}from"./BjLb7AHW.js";import{h as Ap,i as Mp,g as Ep,P as qp,C as k$,m as Hl,R as x$}from"./D7vAVIvz.js";import{f as It,ae as C$}from"./DPbnmxjX.js";import{F as ft,bs as P$,cd as R$,aw as Na,a2 as Df,c9 as T$,bf as A$,be as M$,bg as E$,aO as Lp,aj as fc,aB as vc,bB as Nf,d3 as Wl,cF as q$,aM as Hp,cb as Op,cK as Ul,bu as L$,aS as H$,d0 as O$,a8 as Bf,ac as F$,ag as D$,cr as N$,ba as B$,aC as Wf,cT as Fp,cz as W$,ax as U$,cD as z$,c3 as j$}from"./BZytk_HL.js";import{c as Uf}from"./ChTqQfQN.js";import"./jUAybD8G.js";import{c as Rt}from"./DpSAF6fh.js";import{a5 as zf,bg as G$,ar as V$,k as K$,Y as Q$,W as J$,a2 as Y$,Z as X$,bw as Z$,V as ek,a1 as tk,ah as nk}from"./C_0xgdqY.js";import{d as zl,f as rk,e as ak}from"./BkmrZjpE.js";import{A as sk}from"./BcEldzTj.js";import{D as ok}from"./DVok8lSR.js";import"./Dzl5aoA8.js";import{a as ik,C as lk}from"./Ow3KARwj.js";import"./DYGC3eZn.js";import{C as dk}from"./CtguhKZB.js";import{h as Mc,r as ck,a as uk}from"./BpimY2Bn.js";import{s as gk}from"./CuAAvi1f.js";import{I as pk,a as jf}from"./xJBWkpxc.js";import{L as fk}from"./1wMLd-77.js";import{g as vk,f as hk,b as mk}from"./CMgAi196.js";import{s as Mi,g as Yn,i as _k,j as wk,e as Dp,r as Np,f as bk,d as yk,a as hc,h as Ik}from"./P27dN3C7.js";import{i as Bp,a as Sk}from"./Bu13V5mO.js";import{seekConversationToMessage as Wp}from"./BEv4fIdD.js";import{l as Kt,o as mc,h as Qc,n as Ec,q as $k}from"./CntPxeXh.js";import{o as kk}from"./D5raGlU7.js";import{A as Gf}from"./Bo5PTszQ.js";import{b as Vf}from"./Bek4Es60.js";import{g as xk,e as Kf,v as Ck,f as Pk,N as Rk,M as Tk,K as Ak,k as Qf,l as Mk,H as Jf,s as Yf}from"./B6Zf-ZTX.js";import{selectCurrentWorkspaceTabId as _c}from"./BblwdMxR.js";import{o as Ek}from"./B77YOXDU.js";import{d as qk}from"./B0Z-1lwJ.js";import{P as Lk}from"./wfSdTH77.js";import{g as Hk}from"./DzsC5hAQ.js";import{H as Xf,M as Ok,y as Fk,g as Dk,i as Nk,u as Bk,e as Zf,c as ev,d as Wk}from"./BtT-JO5g.js";import{c as Uk,h as Jc,f as tv,M as zk}from"./DM4cCUDd.js";import{t as jk}from"./DAsc1V4f.js";import{s as Gk}from"./BsieX9dN.js";import{i as nv}from"./B4wiFjXK.js";import{d as Vk,i as Kk,r as Qk}from"./C7Ibt0hX.js";import{g as Jk}from"./BYBN65Dm.js";var Yk=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),Xk=E("<div><!></div>");function rv(n,r){if(new.target)return ln({component:rv,...n});un(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),d=Z(r,"children",7),l=cf(r,Yk);var f={get ref(){return a()},set ref(v=null){a(v),ee()},get class(){return i()},set class(v){i(v),ee()},get children(){return d()},set children(v){d(v),ee()},$set:dn,$on:(v,R)=>cn(r,v,R)},u=Xk();uf(u,v=>({"data-slot":"card-header",class:v,...l}),[()=>Wc("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-x-4 gap-y-1.5 pt-4 pb-2 has-data-[slot=card-action]:grid-cols-[minmax(0,1fr)_auto]",dk,i())]);var b=S(u);return Ai(b,()=>d()??fs),y(u),wr(u,v=>a(v),()=>a()),p(n,u),gn(f)}var Zk=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),ex=E("<div><!></div>");function av(n,r){if(new.target)return ln({component:av,...n});un(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),d=Z(r,"children",7),l=cf(r,Zk);var f={get ref(){return a()},set ref(v=null){a(v),ee()},get class(){return i()},set class(v){i(v),ee()},get children(){return d()},set children(v){d(v),ee()},$set:dn,$on:(v,R)=>cn(r,v,R)},u=ex();uf(u,v=>({"data-slot":"card-title",class:v,...l}),[()=>Wc("type-title min-w-0 break-words font-semibold leading-tight text-foreground",i())]);var b=S(u);return Ai(b,()=>d()??fs),y(u),wr(u,v=>a(v),()=>a()),p(n,u),gn(f)}const xl=mS.CHAT_MEDIA,wc=IS().min(1).max(512);Zs({workspaceId:wc,agentId:wc,draftId:Nl(),principalId:wc,media:SS(gS).min(1).max(20)}).strict();const tx=Zs({sessionId:Nl()}).strict();tx.extend({control:$S("action",[Zs({action:bi("readiness")}).strict(),Zs({action:bi("export"),request:bS}).strict(),Zs({action:bi("transcribe"),request:yS}).strict(),Zs({action:bi("release"),jobId:Nl()}).strict(),Zs({action:bi("adopt"),jobId:Nl()}).strict()])}).strict();function Yc(n,r,a,i=async(d,l)=>typeof window>"u"||_S(window)!=="electron"?{ok:!1,error:"unavailable"}:wS().invoke(d,l)){let d=null,l=null,f=!1;async function u(){f=!0,a.removeEventListener("abort",b);const x=d;d=null,x&&await i(xl.CLOSE,{sessionId:x}).catch(()=>{})}const b=()=>{u()};a.addEventListener("abort",b,{once:!0});const v=()=>{if(f||a.aborted||!r())throw new Error("media-send-retired")};async function R(){if(v(),d)return d;if(l)return l;l=(async()=>{const x=await i(xl.BEGIN,n);if(!x.ok)throw new Error("media-export-unavailable");d=x.value.sessionId;try{return v(),d}catch(F){throw await u(),F}})();try{return await l}finally{l=null}}async function I(x){const F=await R();v();const D=await i(xl.CONTROL,{sessionId:F,control:x});return v(),D}return{service:{exportMedia:x=>I({action:"export",request:x}),adoptMediaJob:x=>I({action:"adopt",jobId:x}),transcribeMedia:x=>I({action:"transcribe",request:x}),releaseMediaJob:async x=>d?await i(xl.CONTROL,{sessionId:d,control:{action:"release",jobId:x}}):{ok:!0,value:void 0}},dispose:u,readiness:()=>I({action:"readiness"})}}const bc=new Set;async function nx(n){const{drafts:r,signal:a}=n,i=structuredClone(n.capture),d=structuredClone(n.items),l=structuredClone(n.payload),{workspaceId:f,agentId:u}=i,b=Pi(O.state),v=Dl.select(O.state,f),R=yf.select(O.state),I=hf(),M=JSON.stringify([b,f,u]);if(!b||!v||!R||l.wsId!==f||bc.has(M))return!1;bc.add(M);const x=new AbortController,F=()=>x.abort();a.addEventListener("abort",F,{once:!0});const D=()=>!a.aborted&&!x.signal.aborted&&Pi(O.state)===b&&Dl.select(O.state,f)===v&&mf(I)&&r.isCurrentDraft(i),T=O.getReadableState().subscribe(()=>{D()||x.abort()});let H=null;try{if(!D()||nS(d))return!1;const V=Pf(i.attachments),oe=Af(pS(f,u),V,d.map(ce=>({contextItemId:ce.id,attachmentId:ce.attachmentId,path:ce.path}))),P=new Set([...oe.images,...oe.clips].map(ce=>ce.contextItemId));if(V.some(([ce])=>!P.has(ce))||oe.images.some(ce=>ce.mediaError)||oe.clips.some(ce=>ce.mediaError)||!fS(l.text,oe))throw new Error("invalid-evidence");if(H=n.warm?.take(i,x.signal)??null,!await r.flushDraft(i)||!D())return!1;const k=await Ly.agents.get(u,f);if(!D())return!1;if(!k||k.workspaceId!==f||k.retiredAt||k.pendingDeleteAt||k.status==="deleted")throw new Error("unavailable");const J=oe.clips.flatMap(ce=>ce.media?[ce.media]:[]);J.length&&!H&&(H=Yc({workspaceId:f,agentId:u,draftId:crypto.randomUUID(),principalId:R.principal.id,media:J},D,x.signal));const ge=ty(d,oe),Te=Cc(ge),ve=await ny({workspaceId:f,agentId:u,evidence:oe,clickedItems:d,sendItems:ge,clickedPayload:{...l,contextItems:ge,imageBlocks:Te.imageBlocks,fileBlocks:Te.fileBlocks},binding:I,service:H?.service??null,current:D,onRecord:()=>{}});return!ve||!D()?!1:El(O,u,ve)}catch{return D()&&O.dispatch(aw(u,g.dock_conversation_sendFailed_error())),!1}finally{T(),a.removeEventListener("abort",F),await H?.dispose(),bc.delete(M)}}const sv=1e4,Up={wasBusy:!1,busySince:null,preempted:!1,prediction:null};function zp(n){return kS(n.messageMetadata)}function rx(n,r){if(n.some(zp)){const a=n[0];return a&&!zp(a)&&jp(a,r)?[a.id]:[]}return n.filter(a=>jp(a,r)).map(a=>a.id)}function ax(n){let r=null;for(const a of n)(a.status==="preparing"||a.status==="sending")&&a.createdAt>(r??-1/0)&&(r=a.createdAt);return r}function jp(n,r){return!n.requeuedAfterFailure&&xS(n,r)}function sx(n,r){const{busy:a,queue:i,delivered:d,now:l}=r,f=r.blocked||r.interrupted,u=r.timeoutMs??sv;let b=n.prediction;if(b){const x=new Set(i.map(H=>H.id)),F=b.ids.filter(H=>x.has(H)&&!d.has(H)),D=l-b.startedAt>=u,T=n.wasBusy&&!a;!F.length||D||f&&!a||T?b=null:F.length!==b.ids.length&&(b={...b,ids:F})}const v=n.wasBusy&&!a,R=n.wasBusy?n.busySince:a?l:null,I=n.wasBusy&&n.preempted||R!==null&&r.directSendAt!==null&&r.directSendAt>R;if(!b&&v&&!f&&!I){const x=rx(i,l).filter(F=>!d.has(F));x.length&&(b={ids:x,startedAt:l})}const M={wasBusy:a,busySince:a?R:null,preempted:a&&I,prediction:b};return n.wasBusy===M.wasBusy&&n.busySince===M.busySince&&n.preempted===M.preempted&&n.prediction===M.prediction?n:M}class ox{constructor(){Js(this,"previousWorkspaceId",null);Js(this,"_isRebinding",!1);Js(this,"_generation",0);Js(this,"_rebindPromise",null);Js(this,"_rebindResolve",null)}recordMount(r){return this.previousWorkspaceId=r,r}wasWorkspaceChangedDuringMount(r){return this.previousWorkspaceId!==r}shouldRebind(r){return!r||this.previousWorkspaceId===null?!1:r!==this.previousWorkspaceId}recordRebind(r){this.previousWorkspaceId=r}hasWorkspaceChanged(r){return r!==this.previousWorkspaceId}get trackedWorkspaceId(){return this.previousWorkspaceId}get isRebinding(){return this._isRebinding}startRebind(){return this._generation++,this._isRebinding=!0,this._rebindResolve?.(),this._rebindPromise=new Promise(r=>{this._rebindResolve=r}),this._generation}endRebind(r){r!==void 0&&r!==this._generation||(this._isRebinding=!1,this._rebindResolve?.(),this._rebindPromise=null,this._rebindResolve=null)}async waitForRebind(r=5e3){if(!this._isRebinding||!this._rebindPromise)return!1;const a=Date.now()+r;for(;this._isRebinding&&this._rebindPromise;){const i=a-Date.now();if(i<=0)return!1;let d;const l=await Promise.race([this._rebindPromise.then(()=>!1),new Promise(f=>{d=setTimeout(()=>f(!0),i)})]);if(clearTimeout(d),l)return!1}return!0}}function ix(n,r){return!(n?.tabType!=="agent"||n.agentId!==r.agentId||!r.isActive||n.workspaceId&&n.workspaceId!==r.workspaceId||r.panelId&&(n.source!=="dictation"&&!r.isPanelFocused||n.panelId&&n.panelId!==r.panelId))}function Gp(n){const r=typeof n=="string"?n:n&&typeof n=="object"&&typeof n.script=="string"?n.script:void 0;return r||void 0}var lx=E('<div role="status" aria-live="polite" data-presence-typing-indicator=""><span class="inline-flex min-w-[var(--operational-leading-slot-size)] shrink-0 items-center justify-center svelte-lm4khl"><!></span> <span class="min-w-0 truncate svelte-lm4khl"> </span> <span class="inline-flex shrink-0 items-center gap-0.5 svelte-lm4khl" aria-hidden="true"><span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.2s"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.4s"></span></span></div>');function ov(n,r){if(new.target)return ln({component:ov,...n});un(r,!0);const a=()=>pe(R,"$typing$",i),[i,d]=Ur();let l=Z(r,"workspaceId",7),f=Z(r,"agentId",7),u=Z(r,"class",7,"");const b=Bn(""),v=Bn("");ie(()=>{b.set(l())}),ie(()=>{v.set(f())});const R=rS(b,v),I=o(()=>u$(a()));var M={get workspaceId(){return l()},set workspaceId(H){l(H),ee()},get agentId(){return f()},set agentId(H){f(H),ee()},get class(){return u()},set class(H=""){u(H),ee()},$set:dn,$on:(H,V)=>cn(r,H,V)},x=Ot(),F=ye(x);{var D=H=>{var V=lx(),oe=S(V),P=S(oe);c$(P,{get people(){return a()},size:12,decorative:!0}),y(oe);var k=_(oe,2),J=de(k,!0);vn(2),y(V),q(()=>{ke(V,1,`${Of} flex h-4 min-w-0 items-center gap-[var(--operational-leading-gap)] px-[var(--operational-row-inline-padding)] font-family-child font-normal text-muted-foreground text-[11px] leading-4 ${u()??""} /* a11y-ignore: user-requested compact typing status in the composer gap */`,"svelte-lm4khl"),j(J,e(I))}),p(H,V)};N(F,H=>{e(I)&&H(D)})}p(n,x);var T=gn(M);return d(),T}const dx=50,cx=5e3,ux=500,gx=()=>({authority:()=>Pi(O.state),persistSnapshot:ay,dispatch:n=>O.dispatch(n),ownerView:n=>sy.withStore(O)(n)});function px(n){const r=n.store??gx(),a=crypto.randomUUID();let i=he(!1),d=he(!1),l=he(!1),f=null,u=null,b=0,v=!1,R=null,I=null,M=null,x=0,F=null,D=null;const T={};let H,V=he([]),oe=null,P=0,k="",J=0,ge="";const Te=()=>{const B=n.workspaceId(),C=n.agentId();if(!B||!C||!(n.active?.()??!0))return null;const re=r.authority?.();if(!re||v)return null;const Me=n.inputValue(),L=ce(),X=H?.shared,Y=X?.workspaceId===B&&X.agentId===C?X.lifetime:null,be=JSON.stringify([re,B,C,x,Y,L.map(z=>[z.id,z.attachmentId,z.path])]);be!==ge&&(ge=be,J+=1);const De=JSON.stringify([re,B,C,Me,L,x]);return De!==k&&(k=De,P+=1),{authority:re,ownerId:a,workspaceId:B,agentId:C,text:Me,attachments:JSON.parse(JSON.stringify(L)),generation:P,attachmentEpoch:J}};let ve=null;const ce=()=>jI(n.contextItems(),GI(n.contextItems(),e(V))),we=B=>{if(H=B,!B||v)return;const C=B.restore;if(D&&C?.requestId===D.requestId&&C.status!=="pending"){const{apply:L}=D;D=null,w(d,!1),C.status==="restored"&&w(V,C.draft?.attachments??[]),L(C)}const re=B.shared;if(re&&!e(d)&&u===`${re.workspaceId}\0${re.agentId}`){const L=JSON.stringify([re.provenance,re.workspaceId,re.agentId,re.lifetime,re.revision]);if(oe!==L){oe=L;const X=ve??f,Y=X&&n.inputValue()===X.text&&JSON.stringify(ce())===X.attachmentsJson;re.origin===a?ve={text:re.snapshot.text,attachmentsJson:JSON.stringify(re.snapshot.attachments)}:Y&&(b+=1,M&&clearTimeout(M),w(V,re.snapshot.attachments),ve=f={text:re.snapshot.text,attachmentsJson:JSON.stringify(e(V))},n.setInputValue(re.snapshot.text),n.setContextItems(Il(e(V))),n.applyEditorContent(re.snapshot.text))}}dt(Te);const Me=[];for(const L of B.saves){if(L.status==="pending")continue;Me.push(L.id);const X=T[L.id];delete T[L.id],X?.(L)}Me.length>0&&queueMicrotask(()=>r.dispatch(lw(a,Me)))},ne=(B,C,re)=>{const Me=crypto.randomUUID();D={requestId:Me,apply:re},w(d,!0),r.dispatch(cw(a,Me,B,C))},te=()=>{D&&(D=null,w(d,!1),r.dispatch(gw(a)))},Be=()=>{const B=F;B&&(F=null,r.dispatch(uw(a)),H?.saves.some(C=>C.id===B)||delete T[B])};r.dispatch(sw(a));const se=r.ownerView(a).subscribe(B=>dt(()=>we(B))),me=()=>{I&&(clearTimeout(I),I=null),w(l,!1)},Ee=()=>{F&&(F=null,r.dispatch(dw(a)))};ie(()=>{const B=n.active?.()??!0,C=n.workspaceId(),re=n.agentId();if(!B){dt(()=>{b+=1,u=null,te(),R&&clearTimeout(R),R=null,me(),M&&clearTimeout(M),M=null,w(i,!1),Ee()});return}if(!C||!re)return;const Me=`${C}\0${re}`;if(u===Me)return;const L=u!==null;u=Me;const X=++b;dt(()=>{f=null,ve=null,oe=null,w(V,[]),R&&clearTimeout(R),me(),M&&(clearTimeout(M),M=null),L&&(Ee(),n.setInputValue(""),n.contextItemsAreScoped||n.setContextItems([]),n.applyEditorContent(""));const Y=ry(C,re);if(Y){w(V,Y.attachments),w(i,!1);const De=n.contextItems().length>0,z=Y.text,Ie=JSON.stringify(Y.attachments);n.setInputValue(Y.text),De||n.setContextItems(Il(Y.attachments)),n.applyEditorContent(Y.text),f={text:Y.text,attachmentsJson:Ie},ne(C,re,Ce=>{if(Ce.status!=="restored")return;const He=Ce.draft;if(v||!(n.active?.()??!0)||u!==Me||b!==X)return;const st=He?.text??"",Je=He?.attachments??[],Oe=JSON.stringify(Je);lc(C,re,{text:st,attachments:Je});const Pe=n.inputValue()===z&&JSON.stringify(ce())===Ie;De||!Pe||(st!==z&&(n.setInputValue(st),n.applyEditorContent(st)),Oe!==Ie&&n.setContextItems(Il(Je)),f={text:st,attachmentsJson:Oe})});return}w(i,!0),I=setTimeout(()=>{I=null,(n.active?.()??!0)&&w(l,!0)},ux),R=setTimeout(()=>{(n.active?.()??!0)&&(w(i,!1),me())},cx);const be=()=>{!(n.active?.()??!0)||u!==Me||b!==X||(R&&clearTimeout(R),w(i,!1),me())};ne(C,re,De=>{if(De.status!=="restored"){be();return}const z=De.draft;if(v||!(n.active?.()??!0)||u!==Me||b!==X)return;const Ie=!!n.inputValue();if(!Ie&&z?.attachments?.length&&n.contextItems().length===0&&n.setContextItems(Il(z.attachments)),!Ie&&z?.text&&(n.setInputValue(z.text),M=setTimeout(()=>{(n.active?.()??!0)&&n.inputValue()===z.text&&n.applyEditorContent(z.text)},dx)),f===null){const Ce=z?.text??"",He=z?.attachments??[];f={text:Ce,attachmentsJson:JSON.stringify(He)},lc(C,re,{text:Ce,attachments:He})}be()})})}),ie(()=>{const B=n.active?.()??!0,C=n.workspaceId(),re=n.agentId(),Me=e(i);if(!B){dt(Be);return}if(!C||!re)return;const L=n.inputValue(),X=ce();if(dt(Te),dt(Be),Me||f===null&&!L&&X.length===0)return;const Y=JSON.stringify(X);if(f!==null&&f.text===L&&f.attachmentsJson===Y)return;JSON.stringify(e(V))!==Y&&w(V,X);const be=`${C}\0${re}`,De=x,z=crypto.randomUUID();T[z]=Ie=>{if(n.active?.()??!0){if(Ie.status==="saved"){u===be&&x===De&&(f={text:L,attachmentsJson:Y});return}n.onSaveError?.(new Error(Ie.error))}},dt(()=>{F=z,r.dispatch(ow(a,z,{authority:r.authority?.()??void 0,workspaceId:C,agentId:re,text:L,attachments:X,rollback:f?{text:f.text,attachments:JSON.parse(f.attachmentsJson)}:null}))})}),ie(()=>()=>{v=!0,R&&clearTimeout(R),I&&clearTimeout(I),M&&clearTimeout(M),Ee(),se(),r.dispatch(iw(a))});const qe=B=>{const C=Te();return C!==null&&C.authority===B.authority&&C.ownerId===B.ownerId&&C.workspaceId===B.workspaceId&&C.agentId===B.agentId&&C.generation===B.generation&&C.text===B.text&&JSON.stringify(C.attachments)===JSON.stringify(B.attachments)};return{captureDraft:Te,isCurrentDraft:qe,updateAttachmentScreen(B,C,re){return!qe(B)||!B.attachments.some(Me=>Me.id===C)?null:(w(V,B.attachments.map(Me=>Me.id===C?{...Me,screen:structuredClone(re)}:Me)),Te())},async flushDraft(B){if(!qe(B))return!1;if(!r.persistSnapshot)throw new Error("draft-shared-transport-unavailable");return await r.persistSnapshot(a,B.workspaceId,B.agentId,B,B.authority),qe(B)},get restorePending(){return e(d)},get gateActive(){return e(i)},get gateVisible(){return e(l)},invalidatePendingRestore(){if(b+=1,x+=1,te(),R&&(clearTimeout(R),R=null),M&&(clearTimeout(M),M=null),w(i,!1),me(),Be(),u!==null){const[B,C]=u.split("\0");lc(B,C,{text:"",attachments:[]}),ve=null,w(V,[]),f={text:"",attachmentsJson:"[]"}}}}}function Ei(n){if(!n)return null;const r=Af(JSON.stringify([n.workspaceId,n.agentId]),Pf(n.attachments),n.attachments.map(a=>({contextItemId:a.id,attachmentId:a.attachmentId,path:a.path})));return{...r,clips:r.clips.filter(a=>{const i=n.attachments.find(d=>d.id===a.contextItemId);return!!a.media&&!a.mediaError&&!!i&&a.path===i.path})}}async function fx(n,r,a){const i=O.state.principal.snapshot,d=()=>Pi(O.state)===n.authority&&a.isCurrentDraft(n);if(!i||!d()||!await a.flushDraft(n)||!d())return{ready:!1};const l=new AbortController,f=Yc({workspaceId:n.workspaceId,agentId:n.agentId,principalId:i.principal.id,draftId:crypto.randomUUID(),media:[r]},d,l.signal);try{const u=await f.readiness();return!d()||!u.ok?{ready:!1}:u.value.find(b=>b.sourceId===r.source.id)??{ready:!1}}finally{await f.dispose()}}function Vp(n){let r=he(null),a=he(!1),i=he(!1),d=null,l=!0,f=0,u=null;Es(()=>{l=!1,f++}),ie(()=>{const I=n.capture();e(r)&&(!I||I.authority!==e(r).capture.authority||I.ownerId!==e(r).capture.ownerId||I.workspaceId!==e(r).capture.workspaceId||I.agentId!==e(r).capture.agentId||I.attachmentEpoch!==e(r).capture.attachmentEpoch)&&w(r,null)});async function b(I){if(n.disabled()||e(a))return;const M=n.drafts.captureDraft(),x=Ei(M),F=x?.clips.find(V=>V.contextItemId===I);if(!M||!F?.media||!x)return;const D=oy({workspaceId:M.workspaceId,agentId:M.agentId,clip:F,evidence:x,marks:x.marks}),T=_f(M.workspaceId,F.path);if(!D||!T)return;const H=++f;d=document.activeElement instanceof HTMLElement?document.activeElement:null,w(a,!0),w(i,!1);try{if(await n.beforeOpen?.(),!l||f!==H||!n.drafts.isCurrentDraft(M))return;const V=await(n.prepareOutput??fx)(M,F.media,n.drafts);if(!l||f!==H||!n.drafts.isCurrentDraft(M))return;const{attachmentPath:oe,...P}=D;w(r,{capture:M,contextItemId:I,snapshot:{...P,openId:crypto.randomUUID(),mediaUrl:T,output:V,deleteReady:!0}})}catch{l&&f===H&&w(i,!0)}finally{l&&f===H&&w(a,!1)}}async function v(I){const M=crypto.randomUUID(),x=e(r),F=n.drafts.captureDraft();if(!x||!F||F.authority!==x.capture.authority||F.ownerId!==x.capture.ownerId||F.workspaceId!==x.capture.workspaceId||F.agentId!==x.capture.agentId||F.attachmentEpoch!==x.capture.attachmentEpoch)return{requestId:M,result:"stale-source"};const D=Ei(F),T=D?.clips.find(J=>J.contextItemId===x.contextItemId);if(!D||!T?.media)return{requestId:M,result:"stale-source"};const V=u?.openId===x.snapshot.openId&&u.inputRevision===I.revision&&JSON.stringify(u.media)===JSON.stringify(T.media)?{...I,revision:T.media.saved?.revision??0}:I,oe=vS(T.media,{openId:x.snapshot.openId,...x.snapshot.output?.version===2?{outputVersion:2}:{},pair:{workspaceId:F.workspaceId,agentId:F.agentId},sourceId:I.sourceId,sourceRevision:I.sourceRevision,expectedEditRevision:V.revision,edit:V});if(oe.status!=="saved")return{requestId:M,result:oe.status==="invalid-edit"?"failed":oe.status};const P=hS({...D,clips:D.clips.map(J=>J.id===T.id?{...J,media:oe.media}:J)})[x.contextItemId],k=n.drafts.updateAttachmentScreen(F,x.contextItemId,P);if(!k)return{requestId:M,result:"stale-source"};u={openId:x.snapshot.openId,media:oe.media,inputRevision:I.revision};try{if(!n.drafts.isCurrentDraft(k))return{requestId:M,result:"stale-source"};await n.drafts.flushDraft(k);const J=n.drafts.captureDraft();return!l||e(r)?.snapshot.openId!==x.snapshot.openId||!J||J.attachmentEpoch!==x.capture.attachmentEpoch||J.authority!==k.authority||J.ownerId!==k.ownerId||J.workspaceId!==k.workspaceId||J.agentId!==k.agentId||JSON.stringify(J.attachments.find(ge=>ge.id===x.contextItemId)?.screen)!==JSON.stringify(P)?{requestId:M,result:"stale-source"}:(u=null,{requestId:M,result:"saved",saved:oe.media.saved??void 0})}catch{return{requestId:M,result:"failed"}}}function R(I){return n.disabled()||!n.onRemove(I)?!1:(e(r)?.contextItemId===I&&w(r,null),!0)}return{get session(){return e(r)},get opening(){return e(a)},get problem(){return e(i)},open:b,save:v,remove:R,close(){w(r,null)},restoreFocus(){d?.isConnected&&d.focus()}}}var vx=E('<p role="alert"> </p>'),hx=E('<div class="recording-editor-surface svelte-cdb16"><!></div>'),mx=E("<!> <!> <!>",1);function iv(n,r){if(new.target)return ln({component:iv,...n});un(r,!0);let a=Z(r,"capture",7),i=Z(r,"drafts",7),d=Z(r,"disabled",7,!1),l=Z(r,"onRemove",7),f=Z(r,"controllerFactory",7,Vp),u=Z(r,"beforeOpen",7),b=Z(r,"onReviewChange",7);const v=dt(()=>f()({drafts:i(),capture:()=>a(),disabled:()=>d(),onRemove:P=>l()(P),beforeOpen:()=>u()?.()??Promise.resolve()}));ie(()=>{const P=v.opening,k=v.session;dt(()=>b()?.(P,k?.snapshot.output?.ready?{openId:k.snapshot.openId,capture:k.capture}:null))});const R=o(iy),I=o(()=>Ei(a())),M=o(()=>e(I)?.clips.map(P=>({id:P.contextItemId,kind:"clip",owner:"evidence",duration:Tp(P.durationMs),recording:!1,url:a()?_f(a().workspaceId,P.path):void 0,...P.media?.saved?{summary:ly(P.media.saved)}:{}}))??[]);let x=he(null);var F={get capture(){return a()},set capture(P){a(P),ee()},get drafts(){return i()},set drafts(P){i(P),ee()},get disabled(){return d()},set disabled(P=!1){d(P),ee()},get onRemove(){return l()},set onRemove(P){l(P),ee()},get controllerFactory(){return f()},set controllerFactory(P=Vp){f(P),ee()},get beforeOpen(){return u()},set beforeOpen(P){u(P),ee()},get onReviewChange(){return b()},set onReviewChange(P){b(P),ee()},$set:dn,$on:(P,k)=>cn(r,P,k)},D=mx(),T=ye(D);{let P=o(()=>d()||v.opening);CS(T,{get items(){return e(M)},get labels(){return e(R)},get disabled(){return e(P)},onEdit:k=>void v.open(k),onMarkUp:k=>void v.open(k),get onRemove(){return v.remove}})}var H=_(T,2);{var V=P=>{var k=vx(),J=de(k,!0);q(ge=>j(J,ge),[()=>g.dock_captureEditor_saveFailed_label()]),p(P,k)};N(H,P=>{v.problem&&P(V)})}var oe=_(H,2);{let P=o(()=>!!v.session),k=o(()=>g.dock_captureEditor_recording_title({duration:v.session?Tp(v.session.snapshot.durationMs??0):""}));I$(oe,{get open(){return e(P)},size:"editor",showCloseButton:!1,get title(){return e(k)},escapeKeydownBehavior:"ignore",dismissOnInteractOutside:!1,onClose:()=>v.close(),onCloseAutoFocus:J=>{J.preventDefault(),v.restoreFocus()},get contentRef(){return e(x)},set contentRef(J){w(x,J,!0)},children:(J,ge)=>{var Te=Ot(),ve=ye(Te);{var ce=we=>{var ne=Ot(),te=ye(ne);xi(te,()=>v.session.snapshot.openId,Be=>{var se=hx(),me=S(se);$$(me,{get snapshot(){return v.session.snapshot},get shortcutDialog(){return e(x)},onClose:()=>v.close(),get onSave(){return v.save},onDelete:async()=>!!v.session&&v.remove(v.session.contextItemId)}),y(se),p(Be,se)}),p(we,ne)};N(ve,we=>{v.session&&we(ce)})}p(J,Te)},$$slots:{default:!0}})}return p(n,D),gn(F)}const Cl=n=>JSON.stringify([n.authority,n.ownerId,n.workspaceId,n.agentId,n.attachmentEpoch,n.attachments]);function _x(n){let r=he(!1),a=he(!1),i=he(null),d=!1,l=0,f=null,u=null;async function b(I){I.abort.abort(),I.slot?.cancel(),await I.native?.dispose()}async function v(){l++;const I=u;u=null,I&&await b(I)}no(()=>{const I=()=>{w(r,document.hasFocus(),!0)};return I(),window.addEventListener("focus",I),window.addEventListener("blur",I),()=>{window.removeEventListener("focus",I),window.removeEventListener("blur",I)}});const R=O.getReadableState().subscribe(()=>{u&&!u.current()&&v()});return Es(()=>{d=!0,R(),v()}),ie(()=>{const I=n.capture(),M=I?Cl(I):"",x=e(r)&&!e(a)&&(n.active()||e(i)?.key===M);dt(()=>{if(!x||!I){v();return}if(u?.key===M)return;if(f===M){v();return}v();const D=Ei(I)?.clips.flatMap(Te=>!Te.mediaError&&Te.media?[Te.media]:[])??[],T=D[0],H=O.state.principal.snapshot,V=Dl.select(O.state,I.workspaceId);if(!T||!H||!V||n.drafts.gateActive)return;const oe=hf(),P=new AbortController,k=()=>!d&&!P.signal.aborted&&Pi(O.state)===I.authority&&Dl.select(O.state,I.workspaceId)===V&&mf(oe)&&!!n.capture()&&Cl(n.capture())===M,J={key:M,capture:I,abort:P,native:null,slot:null,current:k};u=J;const ge=l;n.drafts.flushDraft(I).then(async Te=>{if(!(u!==J||ge!==l||!k())){if(!Te){f=M,await v();return}J.native=Yc({workspaceId:I.workspaceId,agentId:I.agentId,draftId:crypto.randomUUID(),principalId:H.principal.id,media:structuredClone(D)},k,P.signal),J.slot=dy(J.native.service),f=M,J.slot.warm(M,T,k)}}).catch(()=>{u===J&&v()})})}),{cancel:v,async beforeEditorOpen(){w(a,!0),f=null,await v()},editorState(I,M){w(a,I,!0);const x=M?Cl(M.capture):null;M&&e(i)?.openId!==M.openId&&(f=null),w(i,M&&x?{openId:M.openId,key:x}:null)},take(I,M){const x=u;if(!x?.native||!x.slot||x.key!==Cl(I)||!x.current())return v(),null;u=null,l++;const F=x.native,D=x.slot,T=()=>x.abort.abort();return M.addEventListener("abort",T,{once:!0}),M.aborted&&T(),{service:{...F.service,takePreparedRecording:H=>D.take(x.key,H,()=>!M.aborted&&x.current())},async dispose(){M.removeEventListener("abort",T),await b(x)}}}}}var wx=E('<div role="status" class="px-3 py-1.5 text-xs text-muted-foreground" data-testid="chat-draft-loading-gate"><span> </span></div>');function lv(n,r){if(new.target)return ln({component:lv,...n});un(r,!1);var a={$set:dn,$on:(f,u)=>cn(r,f,u)};Ff();var i=wx(),d=S(i),l=de(d,!0);return y(i),q(f=>j(l,f),[()=>g.chat_draftGate_loading_label()]),p(n,i),gn(a)}var bx=E('<div data-new-messages-divider="" class="type-caption font-family-child my-6 flex items-center gap-2 px-2" role="separator"><div class="h-px flex-1 bg-border"></div> <span class="whitespace-nowrap px-1 font-medium text-foreground"> </span> <div class="h-px flex-1 bg-border"></div></div>');function qc(n,r){if(new.target)return ln({component:qc,...n});un(r,!1);var a={$set:dn,$on:(f,u)=>cn(r,f,u)};Ff();var i=bx(),d=_(S(i),2),l=de(d,!0);return vn(2),y(i),q((f,u)=>{Ne(i,"aria-label",f),j(l,u)},[()=>g.chat_newMessagesDivider_label(),()=>g.chat_newMessagesDivider_label()]),p(n,i),gn(a)}function yx(n,r){if(!r||n.length===0)return null;const a=n.indexOf(r);return a===-1||a===n.length-1?null:r}function Ix(n,r,a){if(!r||n.length===0)return"none";const i=n.indexOf(r);return i===n.length-1?"none":i!==-1?"marker-loaded":a.complete?a.truncated?"marker-beyond-window":"none":"marker-pending"}function Sx(n,r){return r&&n.includes(r)?r:null}function Kp(n,r,a){return r-n<=a}const $x=.2;function Qp(n,r,a){const i=Math.max(0,a-r),d=n-$x*r;return Math.min(Math.max(0,d),i)}function kx(n,r,a){return n!==null&&a&&n===r}function xx(n){return n?pw(n)&&fw(n)!==null&&typeof n.metadata?.taskNoteId=="string":!1}function Cx(n){const r=[],a=new Set;let i,d;for(const H of n.messages){if(H.agentId&&H.agentId!==n.agentId){i=void 0,d=void 0;continue}if(a.has(H.id))continue;a.add(H.id),n.breakBeforeMessageIds?.has(H.id)&&(i=void 0,d=void 0);const V=PS(H);if(V?.kind!=="turn-failure")d=void 0;else{const oe=i?.seq!==void 0&&H.seq!==void 0&&Number.isSafeInteger(i.seq)&&Number.isSafeInteger(H.seq)&&H.seq===i.seq+1;(!d||!oe)&&(d={key:JSON.stringify([n.agentId,"notice",H.id]),anchorMessageId:H.id,correlation:"unavailable",records:[],recordedFailureCount:0},r.push(d)),d.records.push({messageId:H.id,reason:V.reason,timestamp:H.timestamp}),d.recordedFailureCount+=1}i=H}const l=new Map;for(const H of n.queue){if(!H.requeuedAfterFailure)continue;const V=H.turnId||void 0,oe=JSON.stringify([n.agentId,V?"turn":"queue",V??H.id]);let P=l.get(oe);P||(P={key:oe,correlation:V?"turn":"queue-entry",turnId:V,queueIds:[],state:"queued"},l.set(oe,P)),P.queueIds.includes(H.id)||P.queueIds.push(H.id)}const f=[...l.values()],u=n.session?.id===n.agentId?n.session:void 0,b=u?.status===$i.Error,v=n.transientError||b&&u.stopReason||null,R=b&&!v,I=b&&(!n.transientError||n.transientError===u.stopReason)?u.stopReasonTimestamp:void 0,M=I?bp(I):null,x=M&&v&&v===u?.stopReason?r.flatMap(H=>H.records).filter(H=>H.reason===v&&bp(H.timestamp)===M):[],F=x.length===1?x[0].messageId:void 0,T=(u?If(u):!1)?"attempting":f.length?"queued":v||R?"action-needed":"inactive";return{history:r,queueRecovery:f,current:{state:T,error:v,needsFallbackReason:R,timestamp:I,noticeId:F}}}function Px(n,r){const a=n.hiddenTail[0]?.id,i=Cx({...r,messages:[...n.groups.flatMap(u=>u.messages),...n.hiddenTail],breakBeforeMessageIds:new Set(a?[a]:[])}),d=i.current.noticeId,l=i.history.map(u=>({...u,records:u.records.filter(b=>b.messageId!==d)})).filter(u=>u.records.length>0),f=new Set(l.map(u=>u.records[0].messageId));return{...i,runsByAnchor:new Map(l.map(u=>[u.records[0].messageId,u])),collapsedMessageIds:new Set(i.history.flatMap(u=>u.records.map(b=>b.messageId).filter(b=>!f.has(b))))}}var Rx=E('<div class="flex size-10 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <div class="min-w-0 flex-1"><div class="type-body truncate font-medium text-foreground"> </div> <div class="type-caption mt-0.5 line-clamp-2 text-muted-foreground"> </div></div> <div class="flex size-7 shrink-0 items-center justify-center rounded-md bg-muted/50 text-muted-foreground transition-colors group-hover:bg-muted"><!></div>',1),Tx=E('<div class="flex size-9 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <span class="type-body font-medium"> </span>',1),Ax=E('<div><div class="border-b border-border bg-muted/20 px-4 py-3"><p class="type-body font-medium text-foreground"> </p> <p class="type-caption mt-0.5 text-muted-foreground"> </p></div> <div class="max-h-[21rem] overflow-y-auto p-2"><!></div> <div class="border-t border-border bg-popover p-2"><!></div></div>'),Mx=E('<div class="mb-5"><!></div>'),Ex=E('<p data-testid="agent-welcome-description"> </p> <!>',1),qx=E("<!> <!>",1),Lx=E('<p class="mb-3 px-4 text-sm text-subtle leading-relaxed whitespace-pre-wrap" data-testid="agent-welcome-description"> </p>'),Hx=E("<!> <span> </span>",1),Ox=E('<div class="mx-auto flex w-full max-w-[40rem] flex-1 flex-col px-4 pb-6 pt-4 text-subtle"><!> <!> <!></div>');function dv(n,r){if(new.target)return ln({component:dv,...n});un(r,!0);const a=()=>pe(x,"$userOverrides$",f),i=()=>pe(M,"$specialists$",f),d=()=>pe(H,"$isGitHubAuth$",f),l=()=>pe(V,"$recentSpecialistIds$",f),[f,u]=Ur();let b=Z(r,"onSpecialistChange",7),v=Z(r,"session",7),R=Z(r,"workspaceId",7);const I=Bn(R()??"");ie(()=>I.set(R()??""));const M=zf(I),x=G$();ie(()=>{a()});const F=o(()=>{if(!v()||zy(v()))return null;const B=v().metadata?.specialist||v().agentMetadata?.specialist;return B&&i().find(C=>C.id===B)||null});async function D(B){B?await zl({specialist:B,hash:"specialists"}):await zl({view:"create-specialist"})}let T=he(!1);const H=V$(),V=aS(),oe=o(()=>vw(K$(i(),d()),l()));let P=he(!1);const k=o(()=>g.chat_regularAgentWelcome_generalDescription_label()),J=o(()=>e(F)?.name??g.chat_shared_general_fallback()),ge=o(()=>e(F)?.description??g.chat_shared_noSpecializedBehavior_label()),Te=o(()=>e(F)?e(F).defaultBehaviorPrompt||"":e(k));var ve={get onSpecialistChange(){return b()},set onSpecialistChange(B){b(B),ee()},get session(){return v()},set session(B){v(B),ee()},get workspaceId(){return R()},set workspaceId(B){R(B),ee()},$set:dn,$on:(B,C)=>cn(r,B,C)},ce=Ox(),we=S(ce);{var ne=B=>{var C=Mx(),re=S(C);ok(re,{class:"block w-full",align:"start",side:"bottom",contentClass:"w-[min(28rem,calc(100vw-2rem))]",get open(){return e(P)},set open(X){w(P,X,!0)},trigger:(X,Y)=>{let be=()=>(Y?.()).props;{let De=o(()=>Wc("group flex h-auto min-h-(--control-height-medium) w-full cursor-pointer items-center gap-3 whitespace-normal rounded-lg border border-border bg-card px-4 py-3 text-left shadow-xs transition-colors","hover:border-input hover:bg-accent/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"));It(X,qi(be,{type:"button",variant:"plain",wrapContent:!1,get class(){return e(De)},"data-testid":"specialist-picker-trigger",children:(z,Ie)=>{var Ce=Rx(),He=ye(Ce),st=S(He);{let Se=o(()=>e(F)?.id??null),Ae=o(()=>e(F)?.icon??null);sk(st,{agentId:"blank",variant:"emphasized",get specialist(){return e(Se)},get icon(){return e(Ae)}})}y(He);var Je=_(He,2),Oe=S(Je),Pe=de(Oe,!0),G=_(Oe,2),ae=de(G,!0);y(Je);var Le=_(Je,2),Q=S(Le);ft(Q,{get icon(){return Na},size:10}),y(Le),q(()=>{j(Pe,e(J)),j(ae,e(ge))}),p(z,Ce)},$$slots:{default:!0}}))}},content:X=>{var Y=Ax(),be=S(Y),De=S(be),z=de(De,!0),Ie=_(De,2),Ce=de(Ie,!0);y(be);var He=_(be,2),st=S(He);{let Pe=o(()=>e(F)?.id??null);V_(st,{get specialists(){return e(oe)},get value(){return e(Pe)},onchange:G=>{w(P,!1),b()?.(G)}})}y(He);var Je=_(He,2),Oe=S(Je);Rt(Oe,()=>Br,(Pe,G)=>{G(Pe,{class:"flex h-auto w-full cursor-pointer items-center gap-3 whitespace-normal rounded-md px-3 py-2 text-left text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onSelect:()=>{w(P,!1),D()},children:(ae,Le)=>{var Q=Tx(),Se=ye(Q),Ae=S(Se);ft(Ae,{get icon(){return R$},size:12}),y(Se);var ze=_(Se,2),Ge=de(ze,!0);q(We=>j(Ge,We),[()=>g.chat_regularAgentWelcome_createSpecialist_label()]),p(ae,Q)},$$slots:{default:!0}})}),y(Je),y(Y),q((Pe,G)=>{j(z,Pe),j(Ce,G)},[()=>g.workspace_createAgentSection_specialists_label(),()=>g.workspace_createAgentSection_specialists_description()]),p(X,Y)},$$slots:{trigger:!0,content:!0}}),y(C),p(B,C)};N(we,B=>{b()&&B(ne)})}var te=_(we,2);{var Be=B=>{var C=Ot(),re=ye(C);{let Me=o(()=>g.chat_specialistSelector_prompt_label());Rt(re,()=>lk,(L,X)=>{X(L,{class:"mb-3",role:"region",get"aria-label"(){return e(Me)},children:(Y,be)=>{var De=qx(),z=ye(De);Rt(z,()=>rv,(Ce,He)=>{He(Ce,{children:(st,Je)=>{var Oe=Ot(),Pe=ye(Oe);Rt(Pe,()=>av,(G,ae)=>{ae(G,{class:"type-caption font-medium",children:(Le,Q)=>{vn();var Se=on();q(Ae=>j(Se,Ae),[()=>g.chat_specialistSelector_prompt_label()]),p(Le,Se)},$$slots:{default:!0}})}),p(st,Oe)},$$slots:{default:!0}})});var Ie=_(z,2);Rt(Ie,()=>ik,(Ce,He)=>{He(Ce,{children:(st,Je)=>{var Oe=Ex(),Pe=ye(Oe),G=de(Pe,!0),ae=_(Pe,2);It(ae,{type:"button",variant:"link",get"aria-expanded"(){return e(T)},onclick:()=>w(T,!e(T)),class:"text-xs text-muted-foreground hover:text-foreground transition-colors mt-2 cursor-pointer",children:(Le,Q)=>{vn();var Se=on();q(Ae=>j(Se,Ae),[()=>e(T)?g.chat_regularAgentWelcome_showLess_label():g.chat_regularAgentWelcome_showMore_label()]),p(Le,Se)},$$slots:{default:!0}}),q(()=>{ke(Pe,1,`text-sm text-subtle leading-relaxed whitespace-pre-wrap break-words ${e(T)?"":"line-clamp-6"}`),j(G,e(Te))}),p(st,Oe)},$$slots:{default:!0}})}),p(Y,De)},$$slots:{default:!0}})})}p(B,C)},se=B=>{var C=Lx(),re=de(C,!0);q(()=>j(re,e(Te))),p(B,C)};N(te,B=>{e(F)?B(Be):B(se,-1)})}var me=_(te,2);{var Ee=B=>{It(B,{variant:"ghost-light",size:"sm",onclick:()=>D(e(F).id),class:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors cursor-pointer pl-1.5 mr-auto",children:(C,re)=>{var Me=Hx(),L=ye(Me);ft(L,{get icon(){return P$},size:12,class:"opacity-60"});var X=_(L,2),Y=de(X,!0);q(be=>j(Y,be),[()=>g.chat_regularAgentWelcome_customize_label()]),p(C,Me)},$$slots:{default:!0}})};N(me,B=>{e(F)&&B(Ee)})}y(ce),p(n,ce);var qe=gn(ve);return u(),qe}var Fx=E('<a class="cursor-pointer underline underline-offset-2 hover:opacity-80" data-suggested-prompt-link=""> </a>'),Dx=E('<kbd data-suggested-prompt-hint=""> </kbd>'),Nx=E('<span class="type-caption"> </span>'),Bx=E('<div role="presentation" data-typography-role="body" data-suggested-prompt-row=""><span data-suggested-prompt-icon=""><!></span> <span class="min-w-0 flex-1 text-pretty" data-suggested-prompt-label=""><span role="button" tabindex="0" class="focus-visible:outline-none" data-suggested-prompt-text=""> </span><!></span> <!> <!></div>'),Wx=E('<div class="flex flex-col" data-testid="suggested-prompts-surface"><!></div>');function Xc(n,r){if(new.target)return ln({component:Xc,...n});un(r,!0);let a=Z(r,"prompts",7),i=Z(r,"onSelect",7),d=Z(r,"onEdit",7),l=Z(r,"compact",7,!1),f=Z(r,"showShortcutHints",7,!1),u=Z(r,"reserveShortcutHintSpace",7,!1),b=Z(r,"workspaceId",7);const R=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC")?"⌃":"Alt+",I=s$.replace("text-ui","type-caption");function M(k){i()(k)}function x(k,J){k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),M(J))}function F(k,J){k.preventDefault(),k.stopPropagation(),Mc(J,{workspaceId:b(),event:k})}function D(k,J){(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),k.stopPropagation(),Mc(J,{workspaceId:b(),event:k}))}function T(k){return k<3}var H={get prompts(){return a()},set prompts(k){a(k),ee()},get onSelect(){return i()},set onSelect(k){i(k),ee()},get onEdit(){return d()},set onEdit(k){d(k),ee()},get compact(){return l()},set compact(k=!1){l(k),ee()},get showShortcutHints(){return f()},set showShortcutHints(k=!1){f(k),ee()},get reserveShortcutHintSpace(){return u()},set reserveShortcutHintSpace(k=!1){u(k),ee()},get workspaceId(){return b()},set workspaceId(k){b(k),ee()},$set:dn,$on:(k,J)=>cn(r,k,J)},V=Ot(),oe=ye(V);{var P=k=>{var J=Wx(),ge=S(J);{const Te=(ce,we)=>{let ne=()=>(we?.()).item,te=()=>(we?.()).index;const Be=o(()=>Qb(ne())),se=o(()=>e(Be)[0]?.type==="text"?e(Be)[0].content:"");var me=Bx(),Ee=S(me),qe=S(Ee);ft(qe,{get icon(){return Df},size:16,get class(){return ur}}),y(Ee);var B=_(Ee,2),C=S(B),re=de(C,!0),Me=_(C);Dn(Me,17,()=>e(Be).slice(e(se)?1:0),z_,(z,Ie)=>{var Ce=Ot(),He=ye(Ce);{var st=Oe=>{const Pe=o(()=>Kb(e(Ie).url));var G=Fx(),ae=de(G,!0);q(()=>{Ne(G,"href",e(Pe)),Ne(G,"title",e(Pe)),j(ae,e(Ie).label)}),ps("click",G,Le=>F(Le,e(Pe))),ps("keydown",G,Le=>D(Le,e(Pe))),p(Oe,G)},Je=Oe=>{var Pe=on();q(()=>j(Pe,e(Ie).content)),p(Oe,Pe)};N(He,Oe=>{e(Ie).type==="link"?Oe(st):Oe(Je,-1)})}p(z,Ce)}),y(B);var L=_(B,2);{var X=z=>{var Ie=Dx();let Ce;var He=de(Ie);q(()=>{Ce=ke(Ie,1,`${I??""} mt-px inline-flex h-5 items-center self-start border-0 bg-transparent p-0 font-sans font-normal text-muted-foreground! opacity-100`,null,Ce,{invisible:!f()}),Ne(Ie,"aria-hidden",f()?void 0:"true"),Ne(Ie,"data-hint-visible",f()),j(He,`${R}${te()+1}`)}),p(z,Ie)},Y=o(()=>T(te())&&(f()||u()));N(L,z=>{e(Y)&&z(X)})}var be=_(L,2);{var De=z=>{C$(z,{side:"top",delayDuration:300,trigger:He=>{{let st=o(()=>g.chat_suggestedPrompts_editInInput_ariaLabel());It(He,{type:"button",variant:"ghost-light",size:"icon-xs",iconOnly:!0,class:"absolute right-0.5 top-[calc(var(--operational-leading-half-slot-size)+var(--space-1)*0.5+1px)] shrink-0 -translate-y-1/2 rounded opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100",onclick:Je=>{Je.stopPropagation(),d()(ne())},get"aria-label"(){return e(st)},children:(Je,Oe)=>{ft(Je,{get icon(){return T$},size:"xs"})},$$slots:{default:!0}})}},content:He=>{var st=Nx(),Je=de(st,!0);q(Oe=>j(Je,Oe),[()=>g.chat_suggestedPrompts_edit_tooltip()]),p(He,st)},$$slots:{trigger:!0,content:!0}})};N(be,z=>{d()&&z(De)})}y(me),q(z=>{ke(me,1,`${Of} ${a$} group relative flex cursor-pointer items-center gap-[var(--operational-leading-gap)] rounded-sm border border-transparent bg-transparent px-1.5 py-0.5 text-left opacity-100 pr-9 transition-colors hover:text-foreground has-[[data-suggested-prompt-text]:focus-visible]:outline-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-offset-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-ring`),ke(Ee,1,`${Bl??""} mt-px self-start`),Ne(C,"aria-label",z),j(re,e(se))},[()=>Vb(ne())]),ps("click",C,z=>{z.stopPropagation(),M(ne())}),ps("keydown",C,z=>x(z,ne())),p(ce,me)};let ve=o(()=>l()?"[&>div>div:last-child]:gap-0":"[&>div>div:last-child]:gap-0.5");S$(ge,{get items(){return a()},virtualize:!1,onActivate:M,get class(){return`overflow-visible! [&>div>div:last-child]:flex [&>div>div:last-child]:flex-col ${e(ve)??""}`},"data-testid":"suggested-prompts-list",get"data-compact"(){return l()},row:Te,$$slots:{row:!0}})}y(J),Lt(1,J,()=>ma,()=>({tier:"fast",y:0,scale:1})),Lt(2,J,()=>eo,()=>({tier:"fast"})),p(k,J)};N(oe,k=>{a().length>0&&k(P)})}return p(n,V),gn(H)}Bc(["click","keydown"]);var Ux=E('<section class="pb-6 pt-6"><p class="type-body mb-5 max-w-[36rem] px-1.5 text-pretty text-muted-foreground"> </p> <!></section>');function cv(n,r){if(new.target)return ln({component:cv,...n});un(r,!0);let a=Z(r,"onSelect",7),i=Z(r,"compact",7,!1);const d=o(()=>[{label:g.chat_chiefEmptyState_assignedPrs_label(),prompt:g.chat_chiefEmptyState_assignedPrs_prompt()},{label:g.chat_chiefEmptyState_staleWorkspaces_label(),prompt:g.chat_chiefEmptyState_staleWorkspaces_prompt()},{label:g.chat_chiefEmptyState_agentPerformance_label(),prompt:g.chat_chiefEmptyState_agentPerformance_prompt()},{label:g.chat_chiefEmptyState_morningBrief_label(),prompt:g.chat_chiefEmptyState_morningBrief_prompt()},{label:g.chat_chiefEmptyState_randomTheme_label(),prompt:g.chat_chiefEmptyState_randomTheme_prompt()}]),l=o(()=>e(d).map(M=>M.label));function f(M){const x=e(d).find(F=>F.label===M);x&&a()(x.prompt)}var u={get onSelect(){return a()},set onSelect(M){a(M),ee()},get compact(){return i()},set compact(M=!1){i(M),ee()},$set:dn,$on:(M,x)=>cn(r,M,x)},b=Ux(),v=S(b),R=de(v,!0),I=_(v,2);return Xc(I,{get prompts(){return e(l)},onSelect:f,get compact(){return i()}}),y(b),q(M=>j(R,M),[()=>g.chat_chiefEmptyState_intro_label()]),p(n,b),gn(u)}const Zc=2e3,zx=4e3,jx=zx-Zc-2;function Gx(n,r=Zc){const a=[];let i=0;for(let d=n.length-1;d>=0&&i<r;d-=1){const l=n[d];if(l.role!=="user"&&l.role!=="assistant")continue;const f=(l.contentBlocks??[]).filter(b=>b.type==="text").map(b=>b.text||b.content||"").join(""),u=(l.role==="assistant"?K_(f).cleanedContent:f).trim();u&&(a.unshift({role:l.role,text:u}),i+=u.length)}return a}function Vx(n,r){const a=n.map(l=>`${l.role==="user"?"User":"Assistant"}: ${l.text}`).join(`
2
2
 
3
3
  `).slice(-Zc),i=r.map(l=>l.trim()).filter(Boolean);if(i.length===0)return a;const d=`Suggested prompts:
4
4
  ${i.map(l=>`- ${l}`).join(`