@intent-hq/web 2.385.2 → 2.387.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (328) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/assets/0.DSZNT9Vm.css +1 -0
  3. package/web/app/immutable/chunks/{CBueLH7U.js → -2rOENSl.js} +1 -1
  4. package/web/app/immutable/chunks/{-8sNsc56.js → -hTxjwFO.js} +1 -1
  5. package/web/app/immutable/chunks/{DJPIUVkw.js → 0Kw0mmSW.js} +1 -1
  6. package/web/app/immutable/chunks/{deEweluJ.js → 6NStP9u7.js} +1 -1
  7. package/web/app/immutable/chunks/{BzirSHSv.js → 6uD0LviT.js} +1 -1
  8. package/web/app/immutable/chunks/{Dxd7AQYv.js → 9fNNDfgo.js} +1 -1
  9. package/web/app/immutable/chunks/{C9ew0Hx2.js → AXzVloaq.js} +1 -1
  10. package/web/app/immutable/chunks/{TT8yXpG-.js → AfZNmzF0.js} +1 -1
  11. package/web/app/immutable/chunks/{BSUnflvl.js → B-bGycam.js} +1 -1
  12. package/web/app/immutable/chunks/{Da-Blgd9.js → B0RPkrmZ.js} +1 -1
  13. package/web/app/immutable/chunks/{pomj9evG.js → B1TtNV9x.js} +1 -1
  14. package/web/app/immutable/chunks/{DPtj8tX0.js → B3QTKmHy.js} +1 -1
  15. package/web/app/immutable/chunks/{BdU-kPC9.js → B3ziY5oo.js} +2 -2
  16. package/web/app/immutable/chunks/{DE32K02M.js → B6-aVrNf.js} +4 -4
  17. package/web/app/immutable/chunks/{CMq0sOjt.js → B79iAtSu.js} +2 -2
  18. package/web/app/immutable/chunks/{B433f4mk.js → B7esq_NU.js} +1 -1
  19. package/web/app/immutable/chunks/{BByf3ILj.js → B9BALnhr.js} +1 -1
  20. package/web/app/immutable/chunks/{nw_ZiYCy.js → B9GWGWit.js} +1 -1
  21. package/web/app/immutable/chunks/{TC7OsYhy.js → BAAQt1ZW.js} +1 -1
  22. package/web/app/immutable/chunks/{DVz0ewou.js → BC5HDfRR.js} +1 -1
  23. package/web/app/immutable/chunks/BC6tIXxU.js +1 -0
  24. package/web/app/immutable/chunks/{l7vsMvdj.js → BFMlH_mp.js} +2 -2
  25. package/web/app/immutable/chunks/{f5nWqjrx.js → BFi0zRRv.js} +1 -1
  26. package/web/app/immutable/chunks/{DM1_VFfD.js → BH3eRhvI.js} +1 -1
  27. package/web/app/immutable/chunks/{BlIRL_82.js → BIfjK4Wy.js} +1 -1
  28. package/web/app/immutable/chunks/{BmC9h1kv.js → BJEUIKTL.js} +1 -1
  29. package/web/app/immutable/chunks/{SbTG0nwQ.js → BJbm_MWC.js} +1 -1
  30. package/web/app/immutable/chunks/{Mko8tFZb.js → BK0IkwFP.js} +2 -2
  31. package/web/app/immutable/chunks/{D7Dfbf5g.js → BLMhg4vm.js} +1 -1
  32. package/web/app/immutable/chunks/{Dvi4g0xk.js → BLhJfI63.js} +1 -1
  33. package/web/app/immutable/chunks/{C50zlWbZ.js → BNDTLRE1.js} +1 -1
  34. package/web/app/immutable/chunks/{A0KsbysW.js → BOyRg328.js} +1 -1
  35. package/web/app/immutable/chunks/{CJB-ebPL.js → BP-cDE7g.js} +1 -1
  36. package/web/app/immutable/chunks/{lD0hZ5-I.js → BPscmH6M.js} +1 -1
  37. package/web/app/immutable/chunks/{CEEUgGO1.js → BQ8hOnRo.js} +1 -1
  38. package/web/app/immutable/chunks/{BD9db4FR.js → BQhBnAuP.js} +1 -1
  39. package/web/app/immutable/chunks/{JM7CQkWC.js → BRRnx9NG.js} +1 -1
  40. package/web/app/immutable/chunks/{CPI5xBWX.js → BSt1DBgt.js} +1 -1
  41. package/web/app/immutable/chunks/{BoznPtpa.js → BSu_WKe5.js} +1 -1
  42. package/web/app/immutable/chunks/{8jMQM9h0.js → BUsnh1ZW.js} +1 -1
  43. package/web/app/immutable/chunks/{RHSH5iZ7.js → BVYisuIY.js} +1 -1
  44. package/web/app/immutable/chunks/{IkcYx7DF.js → BVmCM-pH.js} +1 -1
  45. package/web/app/immutable/chunks/{Dxfvrgme.js → BWJopR_X.js} +1 -1
  46. package/web/app/immutable/chunks/{CFmT7rsG.js → BXlN4FOb.js} +1 -1
  47. package/web/app/immutable/chunks/{BXJzIaQM.js → BaOiWDrc.js} +1 -1
  48. package/web/app/immutable/chunks/{C-PQQ8rb.js → Bajx4HLb.js} +1 -1
  49. package/web/app/immutable/chunks/{DhVTc7Ol.js → Bbae4OrB.js} +2 -2
  50. package/web/app/immutable/chunks/{BbuLzldI.js → Bbs1UlDC.js} +1 -1
  51. package/web/app/immutable/chunks/{DnKqeAaM.js → BcrN1yjB.js} +1 -1
  52. package/web/app/immutable/chunks/{sSXTMg2P.js → BfQFKWzJ.js} +1 -1
  53. package/web/app/immutable/chunks/{DSiGyv9Y.js → Bj4IsLvN.js} +1 -1
  54. package/web/app/immutable/chunks/{BCZTn_fp.js → BkcO6l5G.js} +1 -1
  55. package/web/app/immutable/chunks/{Cv0qomAl.js → Bl72eYFn.js} +1 -1
  56. package/web/app/immutable/chunks/{B5uejTJk.js → BlAMrm5X.js} +1 -1
  57. package/web/app/immutable/chunks/{7ZsTr9xa.js → BlJAndP6.js} +1 -1
  58. package/web/app/immutable/chunks/{pnbUAKkx.js → Blt813S0.js} +1 -1
  59. package/web/app/immutable/chunks/{D1fDU8Ti.js → Bm3beBRj.js} +1 -1
  60. package/web/app/immutable/chunks/{OGqbAD_O.js → BmM9C7Gu.js} +1 -1
  61. package/web/app/immutable/chunks/{CmyAIpbY.js → Bmm_g7di.js} +4 -4
  62. package/web/app/immutable/chunks/{CD-M_2xD.js → BoUQWR1c.js} +1 -1
  63. package/web/app/immutable/chunks/{BECK4OaG.js → BoZ2kJyE.js} +1 -1
  64. package/web/app/immutable/chunks/{wiGlLVr-.js → BpXDXz8J.js} +1 -1
  65. package/web/app/immutable/chunks/{7y3Z0Q49.js → BpwKnO7b.js} +3 -3
  66. package/web/app/immutable/chunks/{tLFaYuVN.js → Bq7euxCs.js} +1 -1
  67. package/web/app/immutable/chunks/{CI0C7_h-.js → Bsdq-idi.js} +1 -1
  68. package/web/app/immutable/chunks/{CfYakquS.js → Bsru2omj.js} +1 -1
  69. package/web/app/immutable/chunks/{D_VvdZe2.js → Bstq-Mm1.js} +1 -1
  70. package/web/app/immutable/chunks/{CPvH5Ru2.js → Bt11uxE8.js} +4 -4
  71. package/web/app/immutable/chunks/{BdEtT3Ti.js → BtchneSc.js} +1 -1
  72. package/web/app/immutable/chunks/{3qVSmuIV.js → Bu67WlMm.js} +1 -1
  73. package/web/app/immutable/chunks/{CvZTDgJa.js → BuTcdZo7.js} +1 -1
  74. package/web/app/immutable/chunks/{Bf_nrOhg.js → BuXXIZt7.js} +1 -1
  75. package/web/app/immutable/chunks/{DsfORPYa.js → BudPFdIj.js} +1 -1
  76. package/web/app/immutable/chunks/{SRhgUz9l.js → BuiwW61u.js} +1 -1
  77. package/web/app/immutable/chunks/{4PAYwk2I.js → BvjgIPau.js} +1 -1
  78. package/web/app/immutable/chunks/{DEs9kPtf.js → BxTCsbTV.js} +1 -1
  79. package/web/app/immutable/chunks/{BoG8wR7s.js → ByBw1QkA.js} +1 -1
  80. package/web/app/immutable/chunks/{CmTojxTj.js → Byr10Y9u.js} +1 -1
  81. package/web/app/immutable/chunks/{BLvtkZ8G.js → C-y1uW-U.js} +1 -1
  82. package/web/app/immutable/chunks/{B4I8lQNP.js → C07_BcWL.js} +1 -1
  83. package/web/app/immutable/chunks/{BHqp2vwo.js → C2zt__Wj.js} +1 -1
  84. package/web/app/immutable/chunks/{B3IS1jjn.js → C4t02ICg.js} +2 -2
  85. package/web/app/immutable/chunks/{2ZJE_wyo.js → C53ouDFl.js} +1 -1
  86. package/web/app/immutable/chunks/{DzqKdIr-.js → C6rcni5e.js} +1 -1
  87. package/web/app/immutable/chunks/{CAfPEsZt.js → C7ajdkO4.js} +1 -1
  88. package/web/app/immutable/chunks/{O49gK3tp.js → C8Wy-uTf.js} +1 -1
  89. package/web/app/immutable/chunks/{DYbZIRJE.js → CACH34FC.js} +1 -1
  90. package/web/app/immutable/chunks/{FVS6L2WV.js → CAiDxi6i.js} +3 -3
  91. package/web/app/immutable/chunks/{5-0LQoqd.js → CBbdbU2x.js} +1 -1
  92. package/web/app/immutable/chunks/{BTepRW_m.js → CCzan1r_.js} +4 -4
  93. package/web/app/immutable/chunks/{0pEQEOm6.js → CD9WEaPg.js} +1 -1
  94. package/web/app/immutable/chunks/{DV7x43jt.js → CEap7Fwz.js} +1 -1
  95. package/web/app/immutable/chunks/{BV1ayWTC.js → CG28d89U.js} +1 -1
  96. package/web/app/immutable/chunks/{C_SKcJv7.js → CGdXewiA.js} +1 -1
  97. package/web/app/immutable/chunks/{CjjWPVbV.js → CHApvLbz.js} +3 -3
  98. package/web/app/immutable/chunks/{DWa-2rkZ.js → CIWQMI37.js} +1 -1
  99. package/web/app/immutable/chunks/{zB9UbdEg.js → CIlqcFRn.js} +1 -1
  100. package/web/app/immutable/chunks/{BqARUxDK.js → CJ7hw6mW.js} +1 -1
  101. package/web/app/immutable/chunks/{DDb9H7X6.js → CKcb8dge.js} +3 -3
  102. package/web/app/immutable/chunks/{BzEFG3NN.js → CMsGHYhn.js} +1 -1
  103. package/web/app/immutable/chunks/{Dmx5wWLe.js → CNl453qs.js} +1 -1
  104. package/web/app/immutable/chunks/{B6eTPmJH.js → COVS9Crf.js} +1 -1
  105. package/web/app/immutable/chunks/{iCWz6IE9.js → CPdyCf2B.js} +1 -1
  106. package/web/app/immutable/chunks/{HC_j1BdV.js → CQA1q0F9.js} +1 -1
  107. package/web/app/immutable/chunks/{B5anfoVk.js → CS6HVyHp.js} +1 -1
  108. package/web/app/immutable/chunks/{DVJBGL7F.js → CSlvwZw1.js} +1 -1
  109. package/web/app/immutable/chunks/{BSygKG3g.js → CTVz-pXS.js} +3 -3
  110. package/web/app/immutable/chunks/{7KxcPj98.js → CTowDLQa.js} +1 -1
  111. package/web/app/immutable/chunks/{BQLaE7V5.js → CULu7FSf.js} +1 -1
  112. package/web/app/immutable/chunks/{C2YpPfAS.js → CUxtJz1o.js} +1 -1
  113. package/web/app/immutable/chunks/{CoJyxFcH.js → CV5qbjYN.js} +1 -1
  114. package/web/app/immutable/chunks/{0MXBpkLa.js → CVd7xnlx.js} +1 -1
  115. package/web/app/immutable/chunks/{7HiVLHLh.js → CW4vzFn_.js} +1 -1
  116. package/web/app/immutable/chunks/{CVuncf5f.js → CY2g-8Xo.js} +1 -1
  117. package/web/app/immutable/chunks/{CObW_WD-.js → CY4ZK6xA.js} +3 -3
  118. package/web/app/immutable/chunks/{rXKOJqUt.js → CZB2ndi9.js} +1 -1
  119. package/web/app/immutable/chunks/{CuPx_r7k.js → CZex5Cac.js} +1 -1
  120. package/web/app/immutable/chunks/{DAUvP6UD.js → C_4qh07f.js} +1 -1
  121. package/web/app/immutable/chunks/{B2jyBWIj.js → CbQ8NVeY.js} +1 -1
  122. package/web/app/immutable/chunks/{B5NaFcis.js → CbQYR4R2.js} +3 -3
  123. package/web/app/immutable/chunks/{D40Fo-pJ.js → CcgSaDDB.js} +1 -1
  124. package/web/app/immutable/chunks/CeeeYtIE.js +1 -0
  125. package/web/app/immutable/chunks/{CV2tdNDf.js → CfIVswBm.js} +1 -1
  126. package/web/app/immutable/chunks/{VeUh5OMZ.js → CfaCrhAh.js} +1 -1
  127. package/web/app/immutable/chunks/{C9p4fddz.js → CggFXl4B.js} +1 -1
  128. package/web/app/immutable/chunks/{6paLMka3.js → Chg0KuUy.js} +2 -2
  129. package/web/app/immutable/chunks/{CTW83wJs.js → Ci75CkmK.js} +1 -1
  130. package/web/app/immutable/chunks/{CWOQ_pUA.js → CisSEUth.js} +1 -1
  131. package/web/app/immutable/chunks/{2qYrAiyX.js → Ck8ZqpbB.js} +1 -1
  132. package/web/app/immutable/chunks/{DHcX7CG0.js → ClQE9kQf.js} +1 -1
  133. package/web/app/immutable/chunks/{CgCJQyTf.js → ClSbVEed.js} +1 -1
  134. package/web/app/immutable/chunks/{BLKFshyr.js → CmhKJ6Ie.js} +1 -1
  135. package/web/app/immutable/chunks/{lTwh0Wzj.js → CndJcn8K.js} +1 -1
  136. package/web/app/immutable/chunks/{Clo7aK1n.js → Co9CFvqw.js} +1 -1
  137. package/web/app/immutable/chunks/{3iG5yoX3.js → CoAfXTHr.js} +1 -1
  138. package/web/app/immutable/chunks/CoCy46Yy.js +1 -0
  139. package/web/app/immutable/chunks/{DLQIjfwi.js → CoOgBJzu.js} +1 -1
  140. package/web/app/immutable/chunks/{CQMFoUkp.js → Cq8MD_3v.js} +1 -1
  141. package/web/app/immutable/chunks/{DpITHrfz.js → CqGq5PHb.js} +1 -1
  142. package/web/app/immutable/chunks/{Bi_Yd73A.js → CrL2Nk6a.js} +1 -1
  143. package/web/app/immutable/chunks/{CzXIAWau.js → CrZlcn4Y.js} +1 -1
  144. package/web/app/immutable/chunks/{D-rRuAXZ.js → CrpUtGFn.js} +1 -1
  145. package/web/app/immutable/chunks/{CiWHn2aR.js → CrvtnK13.js} +2 -2
  146. package/web/app/immutable/chunks/{94vL4WlW.js → CrwLq8nY.js} +1 -1
  147. package/web/app/immutable/chunks/{CXZbeRE-.js → Cs-DtA5c.js} +1 -1
  148. package/web/app/immutable/chunks/{6xdvppss.js → CtDIyzmZ.js} +1 -1
  149. package/web/app/immutable/chunks/{CL4ty7oi.js → Cuqu6DgP.js} +1 -1
  150. package/web/app/immutable/chunks/{BIGqOuh0.js → Cw2fqKk9.js} +1 -1
  151. package/web/app/immutable/chunks/{9GO97JAL.js → CwCTYQp7.js} +1 -1
  152. package/web/app/immutable/chunks/{COWlXo8C.js → CxMr7p-O.js} +3 -3
  153. package/web/app/immutable/chunks/{CCyecAzB.js → Cyr0PKv3.js} +1 -1
  154. package/web/app/immutable/chunks/{BuFDqZnJ.js → CzTSi5lc.js} +1 -1
  155. package/web/app/immutable/chunks/{HU1Ksz8U.js → CzjElr82.js} +1 -1
  156. package/web/app/immutable/chunks/{ada9rZfE.js → D-DyBHf9.js} +1 -1
  157. package/web/app/immutable/chunks/{BTvTyEgq.js → D-aEx3GL.js} +2 -2
  158. package/web/app/immutable/chunks/{DbqTt-YM.js → D1R1FWjP.js} +1 -1
  159. package/web/app/immutable/chunks/{CYSndAne.js → D1YPh_5n.js} +1 -1
  160. package/web/app/immutable/chunks/{kAZ_zPIu.js → D24Of5Kd.js} +1 -1
  161. package/web/app/immutable/chunks/{C0Zo7HuP.js → D25lWS8Q.js} +1 -1
  162. package/web/app/immutable/chunks/{NC6gsHNQ.js → D2ch709U.js} +1 -1
  163. package/web/app/immutable/chunks/{BNa9zzEx.js → D2kIeaeO.js} +1 -1
  164. package/web/app/immutable/chunks/{BgDnzAo4.js → D2y-zN_4.js} +1 -1
  165. package/web/app/immutable/chunks/{fHygQTSC.js → D3waRWO1.js} +1 -1
  166. package/web/app/immutable/chunks/{DcOkWaeN.js → D48_y-cl.js} +1 -1
  167. package/web/app/immutable/chunks/{DX9N1RQz.js → D49zWKPf.js} +1 -1
  168. package/web/app/immutable/chunks/{4g_iHoQm.js → D5wnbxHp.js} +1 -1
  169. package/web/app/immutable/chunks/{CletI6Pa.js → D7AX9X0W.js} +1 -1
  170. package/web/app/immutable/chunks/{CCEmXQBN.js → DCL7QtVR.js} +1 -1
  171. package/web/app/immutable/chunks/{U7dpdlAf.js → DEQDOTA1.js} +1 -1
  172. package/web/app/immutable/chunks/{DlpH_aW2.js → DGK5CsQK.js} +1 -1
  173. package/web/app/immutable/chunks/{BrMDbquN.js → DGj-492Z.js} +2 -2
  174. package/web/app/immutable/chunks/{B8HnjSSF.js → DIEHuZ8f.js} +1 -1
  175. package/web/app/immutable/chunks/{Cy9hcA7q.js → DIoT8eB4.js} +1 -1
  176. package/web/app/immutable/chunks/{BPuz5cN_.js → DJivXy66.js} +2 -2
  177. package/web/app/immutable/chunks/{BXv1gq_o.js → DKeBnsgS.js} +1 -1
  178. package/web/app/immutable/chunks/DLO_0egf.js +1 -0
  179. package/web/app/immutable/chunks/{yDmmPu6L.js → DLttsd3i.js} +1 -1
  180. package/web/app/immutable/chunks/{BSgFpkqa.js → DMV5KQix.js} +1 -1
  181. package/web/app/immutable/chunks/DNZCPKpq.js +3 -0
  182. package/web/app/immutable/chunks/{BWCYowXB.js → DNnmVx8j.js} +1 -1
  183. package/web/app/immutable/chunks/DP0K41jk.js +1 -0
  184. package/web/app/immutable/chunks/{BmFHmusU.js → DP2r4UWt.js} +1 -1
  185. package/web/app/immutable/chunks/{B6d1Nolc.js → DPG1HUgG.js} +1 -1
  186. package/web/app/immutable/chunks/{BvbeTrka.js → DPjr22dV.js} +1 -1
  187. package/web/app/immutable/chunks/{LQRHF1eM.js → DPmNtGFj.js} +1 -1
  188. package/web/app/immutable/chunks/{bKvZbiNk.js → DQ8CqY9L.js} +2 -2
  189. package/web/app/immutable/chunks/{IwNEzJ15.js → DQpDIYyw.js} +1 -1
  190. package/web/app/immutable/chunks/{CrsbEWnE.js → DRLJuUwT.js} +1 -1
  191. package/web/app/immutable/chunks/{B5stdxh5.js → DRXgE6SQ.js} +1 -1
  192. package/web/app/immutable/chunks/{Ex_x2wO5.js → DU1ubslo.js} +1 -1
  193. package/web/app/immutable/chunks/{ClYR_2Js.js → DUFN_Pzm.js} +1 -1
  194. package/web/app/immutable/chunks/{CNSshwg_.js → DWqaYE81.js} +1 -1
  195. package/web/app/immutable/chunks/{BY0BGmY0.js → DXI99C-u.js} +1 -1
  196. package/web/app/immutable/chunks/{DI71nFp4.js → D_5u7gP_.js} +1 -1
  197. package/web/app/immutable/chunks/{D7P3vklT.js → D_AhXAPc.js} +1 -1
  198. package/web/app/immutable/chunks/{BMnuRHbZ.js → DaMlaKH_.js} +2 -2
  199. package/web/app/immutable/chunks/{CsmNoTJl.js → Db1BGAZN.js} +1 -1
  200. package/web/app/immutable/chunks/{COjWFpJP.js → DcRqMoeH.js} +1 -1
  201. package/web/app/immutable/chunks/{BO8Bp7Ht.js → Dd3UnPYB.js} +1 -1
  202. package/web/app/immutable/chunks/{C1AUaRa8.js → DdLy5J3P.js} +1 -1
  203. package/web/app/immutable/chunks/{B_75gRww.js → DezlVQ1h.js} +1 -1
  204. package/web/app/immutable/chunks/{DPR_clFy.js → Dga6E45c.js} +1 -1
  205. package/web/app/immutable/chunks/{Bu-RLSv9.js → DgtVALrr.js} +1 -1
  206. package/web/app/immutable/chunks/{CIJ-7Xzd.js → DhVLJG6D.js} +1 -1
  207. package/web/app/immutable/chunks/{C63WwVct.js → DkERMj5B.js} +1 -1
  208. package/web/app/immutable/chunks/{DGMrUmNq.js → DkJYBjJg.js} +1 -1
  209. package/web/app/immutable/chunks/{BSntxgH1.js → DkOk28fz.js} +1 -1
  210. package/web/app/immutable/chunks/{BDsciJGp.js → Dk_Hc5oq.js} +1 -1
  211. package/web/app/immutable/chunks/{DGv69LVd.js → DlfbUU6o.js} +1 -1
  212. package/web/app/immutable/chunks/{odj5qcEP.js → DlwTP-AJ.js} +1 -1
  213. package/web/app/immutable/chunks/{CU_-vK2M.js → Dm98YBgx.js} +3 -3
  214. package/web/app/immutable/chunks/{BhQMKzoM.js → DmWvRjk6.js} +1 -1
  215. package/web/app/immutable/chunks/{CDAnHxmJ.js → DmpdpJAo.js} +1 -1
  216. package/web/app/immutable/chunks/{DhLHwyRV.js → Dn_aCJkC.js} +1 -1
  217. package/web/app/immutable/chunks/{BVuLEX_p.js → Do-SaITx.js} +1 -1
  218. package/web/app/immutable/chunks/{c0c_b7yh.js → DoY7_Wfd.js} +1 -1
  219. package/web/app/immutable/chunks/{CXeB7YFK.js → DqEoTQds.js} +1 -1
  220. package/web/app/immutable/chunks/{B7y9pKDL.js → DtVrXGBM.js} +1 -1
  221. package/web/app/immutable/chunks/{Do2KlQU0.js → DtkIwON_.js} +1 -1
  222. package/web/app/immutable/chunks/{BRKjDAGC.js → DuoQQplG.js} +1 -1
  223. package/web/app/immutable/chunks/{B5tvpTFB.js → DwGyIIXK.js} +1 -1
  224. package/web/app/immutable/chunks/{DlUpt_0u.js → DwbEs_9r.js} +1 -1
  225. package/web/app/immutable/chunks/{COgn_CzG.js → DwiE5WsI.js} +1 -1
  226. package/web/app/immutable/chunks/{DiURwJNX.js → DxSE2XEK.js} +1 -1
  227. package/web/app/immutable/chunks/{Cp02CBjf.js → DxnZvDv0.js} +1 -1
  228. package/web/app/immutable/chunks/{418Agcsp.js → Dy9FYRX8.js} +1 -1
  229. package/web/app/immutable/chunks/{BKMQo7oP.js → DzTn7KcX.js} +1 -1
  230. package/web/app/immutable/chunks/{CXDUvPYf.js → ELYZilX0.js} +1 -1
  231. package/web/app/immutable/chunks/{7mo0aYB5.js → ExR0UceK.js} +1 -1
  232. package/web/app/immutable/chunks/{Bc1vJq_Z.js → FLpsgWeB.js} +1 -1
  233. package/web/app/immutable/chunks/{B5q4SHo9.js → GTsIF2uA.js} +1 -1
  234. package/web/app/immutable/chunks/{BwPwF85e.js → HLNbJ-7M.js} +1 -1
  235. package/web/app/immutable/chunks/{B2CniqS1.js → Hi2H4bj8.js} +1 -1
  236. package/web/app/immutable/chunks/{DZScoaNb.js → I9b9apiN.js} +1 -1
  237. package/web/app/immutable/chunks/{PhAbES0t.js → Idk978zJ.js} +1 -1
  238. package/web/app/immutable/chunks/{DQT1hnTe.js → Ii0VTY5h.js} +1 -1
  239. package/web/app/immutable/chunks/{jBG7W4tL.js → ItBm4ElA.js} +1 -1
  240. package/web/app/immutable/chunks/{BJgwBOBz.js → Jk9a4xPx.js} +1 -1
  241. package/web/app/immutable/chunks/{BW1iql_y.js → KtEuoG00.js} +1 -1
  242. package/web/app/immutable/chunks/{DtqPBHQj.js → L3K71tUU.js} +1 -1
  243. package/web/app/immutable/chunks/{Bv_xG3nA.js → Lk7a_7W9.js} +1 -1
  244. package/web/app/immutable/chunks/{nwO3KCpP.js → Mmc_61iE.js} +1 -1
  245. package/web/app/immutable/chunks/{DlU1rxYV.js → R5lmOJFS.js} +1 -1
  246. package/web/app/immutable/chunks/{B6FGs8l2.js → RTRAqswA.js} +1 -1
  247. package/web/app/immutable/chunks/{CTgU1bby.js → T-5C1GqS.js} +1 -1
  248. package/web/app/immutable/chunks/{B5qiyEpH.js → UYAhegVx.js} +1 -1
  249. package/web/app/immutable/chunks/{h8JtxU_T.js → UsbmbYa0.js} +1 -1
  250. package/web/app/immutable/chunks/{pMP23LzB.js → VcnbZvDh.js} +1 -1
  251. package/web/app/immutable/chunks/{gU2qspu9.js → WvHbj6rB.js} +1 -1
  252. package/web/app/immutable/chunks/{jnsEVh0o.js → XK8g38bo.js} +1 -1
  253. package/web/app/immutable/chunks/{B0qb2Ymj.js → Y2a1lhL9.js} +1 -1
  254. package/web/app/immutable/chunks/YLhFQnIu.js +1 -0
  255. package/web/app/immutable/chunks/{DLCFUd4s.js → YeOAvjnW.js} +1 -1
  256. package/web/app/immutable/chunks/{Dval4sTX.js → _3Ca9E4W.js} +1 -1
  257. package/web/app/immutable/chunks/{BZkfp4xg.js → _duPkHC1.js} +1 -1
  258. package/web/app/immutable/chunks/{BuBXySe4.js → aR8LYT4O.js} +1 -1
  259. package/web/app/immutable/chunks/{CIaruUrd.js → cEIzYo-d.js} +1 -1
  260. package/web/app/immutable/chunks/{dmZv6JOg.js → cPsAlOmH.js} +1 -1
  261. package/web/app/immutable/chunks/{jVbx5uZK.js → cc1gQUub.js} +1 -1
  262. package/web/app/immutable/chunks/{j67P3UNv.js → cpPIph2M.js} +2 -2
  263. package/web/app/immutable/chunks/{QRUY44Ff.js → d028N8d2.js} +1 -1
  264. package/web/app/immutable/chunks/{BDOuZgzG.js → ewL2yuZ8.js} +1 -1
  265. package/web/app/immutable/chunks/{BbLh3POL.js → g08hegP2.js} +1 -1
  266. package/web/app/immutable/chunks/{YHt5oaBn.js → gHZWxIPZ.js} +1 -1
  267. package/web/app/immutable/chunks/{BgQadJDW.js → gJJMUdOI.js} +1 -1
  268. package/web/app/immutable/chunks/{CGYPBD6G.js → gwv5JQYH.js} +1 -1
  269. package/web/app/immutable/chunks/{C8LrJXqa.js → iAKTK0Nq.js} +1 -1
  270. package/web/app/immutable/chunks/{B8QvP_8b.js → j5ppcWWU.js} +1 -1
  271. package/web/app/immutable/chunks/{BcKrkXju.js → jAIXVFR4.js} +1 -1
  272. package/web/app/immutable/chunks/{C2F2Vd1P.js → kvtKUeBe.js} +1 -1
  273. package/web/app/immutable/chunks/{BjlMkd10.js → lZ7zkdkp.js} +1 -1
  274. package/web/app/immutable/chunks/{B_4WsP9b.js → mUNs8NSR.js} +1 -1
  275. package/web/app/immutable/chunks/{C-zB-6G6.js → oBIu7LTI.js} +1 -1
  276. package/web/app/immutable/chunks/{BPxN1acN.js → oHUzFHtp.js} +2 -2
  277. package/web/app/immutable/chunks/{BVkAOJlr.js → pHYq50Ny.js} +1 -1
  278. package/web/app/immutable/chunks/{BvMBgdHo.js → pJyYpzre.js} +1 -1
  279. package/web/app/immutable/chunks/{DmvYOHFs.js → qm1BBGRe.js} +13 -13
  280. package/web/app/immutable/chunks/{BJO0de_7.js → qoDJOBiM.js} +1 -1
  281. package/web/app/immutable/chunks/{KReSIZSD.js → r2R1I-D0.js} +1 -1
  282. package/web/app/immutable/chunks/{Cp9EK0r2.js → rlNXEIUc.js} +1 -1
  283. package/web/app/immutable/chunks/{CR-JVxLD.js → scTXKJzg.js} +1 -1
  284. package/web/app/immutable/chunks/{BVl79jmM.js → tVmNccZ-.js} +1 -1
  285. package/web/app/immutable/chunks/{3uhIXwkT.js → w-7j2Qtq.js} +1 -1
  286. package/web/app/immutable/chunks/{CHto7_WH.js → x2AHvZeQ.js} +1 -1
  287. package/web/app/immutable/chunks/{DuAAGnM9.js → xPYDsdm4.js} +1 -1
  288. package/web/app/immutable/chunks/{Dp8FVKoA.js → xzksWQ-h.js} +1 -1
  289. package/web/app/immutable/chunks/{CA4P_FmX.js → ygDvZWWC.js} +1 -1
  290. package/web/app/immutable/chunks/{7OH6WUSt.js → z91bgOZ6.js} +1 -1
  291. package/web/app/immutable/chunks/{BtBQ5qfh.js → z_SeEaJQ.js} +1 -1
  292. package/web/app/immutable/chunks/{C-G2u0Oe.js → zxxqPN9_.js} +1 -1
  293. package/web/app/immutable/entry/{app.CgTOio8y.js → app.DOLk01Bm.js} +3 -3
  294. package/web/app/immutable/entry/start.CIQw0TYU.js +1 -0
  295. package/web/app/immutable/nodes/{0.C2oVsoB8.js → 0.qPBEcapg.js} +1 -1
  296. package/web/app/immutable/nodes/{1.riWgWdpy.js → 1.Bi3sNEdL.js} +1 -1
  297. package/web/app/immutable/nodes/10.DHyl6QAs.js +39 -0
  298. package/web/app/immutable/nodes/{11.exvXwEGT.js → 11.pqpLvrmB.js} +1 -1
  299. package/web/app/immutable/nodes/{12.D6rxlIQy.js → 12.C5GV0W_U.js} +1 -1
  300. package/web/app/immutable/nodes/{13.CHYsmiD_.js → 13.BpCKbOND.js} +1 -1
  301. package/web/app/immutable/nodes/{14.mG-YN9pn.js → 14.DomreN-2.js} +3 -3
  302. package/web/app/immutable/nodes/{15.D2k47bXC.js → 15.CKbUOFrf.js} +1 -1
  303. package/web/app/immutable/nodes/{16.BsFtzH0D.js → 16.BcdRdVBS.js} +1 -1
  304. package/web/app/immutable/nodes/{17.me_aOx8O.js → 17.C5h-oNNo.js} +1 -1
  305. package/web/app/immutable/nodes/{18.BO1oZWgm.js → 18.vgJOUK1N.js} +1 -1
  306. package/web/app/immutable/nodes/{19.DPrP9Wtk.js → 19.3QLuvvWY.js} +2 -2
  307. package/web/app/immutable/nodes/{2.BpY-66TB.js → 2.CSj73FLT.js} +4 -4
  308. package/web/app/immutable/nodes/{20.LbRPieV_.js → 20.CuOgTm-x.js} +1 -1
  309. package/web/app/immutable/nodes/{3.CriVb5Fs.js → 3.BUbQ5Tes.js} +1 -1
  310. package/web/app/immutable/nodes/{4.dRoX-MYE.js → 4.Byn29Mul.js} +1 -1
  311. package/web/app/immutable/nodes/{5.Bn3YBx-4.js → 5.CMHzkmR-.js} +1 -1
  312. package/web/app/immutable/nodes/{6.CgMdV-V1.js → 6.N0CPg2uE.js} +1 -1
  313. package/web/app/immutable/nodes/{7.FdAsp1bX.js → 7.4Szvqobl.js} +1 -1
  314. package/web/app/immutable/nodes/{8.Da7xrRMP.js → 8.BKw9KMbS.js} +1 -1
  315. package/web/app/immutable/nodes/{9.BnLzowQ-.js → 9.BBJWosck.js} +4 -4
  316. package/web/app/version.json +1 -1
  317. package/web/generated/paraglide.js +49 -49
  318. package/web/index.html +19 -19
  319. package/web/app/immutable/assets/0.BmwjvpSF.css +0 -1
  320. package/web/app/immutable/chunks/CCIZBeez.js +0 -1
  321. package/web/app/immutable/chunks/CXdnCPBf.js +0 -3
  322. package/web/app/immutable/chunks/Cp7Byf5d.js +0 -1
  323. package/web/app/immutable/chunks/DWIoipce.js +0 -1
  324. package/web/app/immutable/chunks/Dws-34a7.js +0 -1
  325. package/web/app/immutable/chunks/DxC0zTSc.js +0 -1
  326. package/web/app/immutable/chunks/Whej1Dge.js +0 -1
  327. package/web/app/immutable/entry/start.oAnCLCVf.js +0 -1
  328. package/web/app/immutable/nodes/10.DbjaWIBW.js +0 -39
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/CI0C7_h-.js","/app/immutable/chunks/4g_iHoQm.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/8jMQM9h0.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/D-rRuAXZ.js","/app/immutable/chunks/Dws-34a7.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/SbTG0nwQ.js","/app/immutable/chunks/CGYPBD6G.js","/app/immutable/chunks/B5tvpTFB.js","/app/immutable/chunks/DLCFUd4s.js","/app/immutable/chunks/BD9db4FR.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/C-zB-6G6.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/BPuz5cN_.js","/app/immutable/chunks/7KxcPj98.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/Dval4sTX.js","/app/immutable/chunks/B8HnjSSF.js","/app/immutable/chunks/DtqPBHQj.js","/app/immutable/chunks/tLFaYuVN.js","/app/immutable/chunks/B6eTPmJH.js","/app/immutable/chunks/rXKOJqUt.js","/app/immutable/chunks/BIGqOuh0.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/5-0LQoqd.js","/app/immutable/chunks/DcOkWaeN.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/Bc1vJq_Z.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/DlUpt_0u.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/B_QPRXJ5.js","/app/immutable/chunks/DJPIUVkw.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js"])))=>i.map(i=>d[i]);
2
- var Rt=Object.defineProperty;var xt=(e,t,n)=>t in e?Rt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Pe=(e,t,n)=>xt(e,typeof t!="symbol"?t+"":t,n);import{Jx as M,m as be,nY as R,wt as Pt,Cr as Ge,wv as Bt,DF as Ye,cK as Lt,cL as Ot,nZ as Je,nL as Ut,i as ke,fV as $t,ma as Nt,cS as Ht}from"./4g_iHoQm.js";import{J as Ft,Z as Kt,dW as Be,cU as pe,dH as Wt,ax as qt,be as Xe,I as jt,e8 as Vt}from"./SbTG0nwQ.js";import{e as zt,b as ae,F as Gt,y as re,_ as _e,G as Yt,C as Jt,W as Qe,v as Xt,u as Qt,M as Zt}from"./8jMQM9h0.js";import{D as Le,a as en,d as tn}from"./CQcEqK4G.js";import{m as nn,g as Ze,r as an,k as rn,D as sn}from"./sSXTMg2P.js";import{e as on}from"./CL3a4Hm1.js";import{z as et,O as cn,R as ln}from"./Bqd7fdCF.js";import{a as dn}from"./BwPwF85e.js";import{f as un}from"./CletI6Pa.js";import{bm as h,_ as fe}from"./Dws-34a7.js";import{a8 as tt,aA as se,I as he,a as nt,n as at,cS as rt,e as st,aI as ot,M as mn,aa as pn,aV as Oe,d as le,C as fn,cT as hn,U as gn,a4 as yn,aJ as wn,b_ as bn}from"./BoG8wR7s.js";import{W as kn,L as _n,w as vn,R as Sn,h as it,M as An}from"./BPuz5cN_.js";import{l as H,i as Mn,n as In}from"./B8HnjSSF.js";import{b as Tn}from"./DJPIUVkw.js";import{K as Cn,P as En,as as Dn,aC as Rn}from"./CmyAIpbY.js";import{a as Ue,b as xn,g as Pn}from"./DypB-Dwi.js";import{m as Bn}from"./B_4WsP9b.js";import{m as Ln}from"./rXKOJqUt.js";import"./3SdAC2_C.js";import"./BD9db4FR.js";import"./D-rRuAXZ.js";import"./ChTqQfQN.js";import"./DcOkWaeN.js";import{i as ct}from"./Dms_DO28.js";import{C as On}from"./B5aYN90J.js";import{i as Un}from"./CNSshwg_.js";import{o as O,e as $n,l as z,s as C,n as ce,b as Nn,d as Hn,c as Fn}from"./CIyUrgF0.js";const Vr=M.createSelector((e,t)=>e.unreadTracking.dividerSessionByAgentId[t]??null),zr=M.createSelector(e=>e.unreadTracking.currentlyViewedAgentId),Gr=M.createSelector(e=>{const t=[];for(const s of Object.values(e.panelLayout.byWorkspaceId))for(const o of Object.values(s.panels))for(const i of o.tabs)i.type==="agent"&&i.agentId&&t.push(i.agentId);const n=Object.keys(e.unreadTracking.dividerSessionByAgentId),a=new Set(e.agentSessions.agentIdsByWorkspace[be]??[]);return{chiefCardVisible:e.sidebarNav.panelItem==="chief",chiefSessionAgentIds:n.filter(s=>a.has(s)),dividerSessionAgentIds:n,openAgentTabIds:t}});function Yr(e,t){if(e)return e.model}function Kn({messages:e,pendingInitialPrompt:t,pendingContextReferenceCount:n=0}){return e.length>0||!!t||n>0}function Jr({session:e,messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:a=0}){return!(e?Ft(e):!1)&&!Kn({messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:a})}function Xr(e){return Kt(e.messageMetadata)}function Wn(e){return{id:e.id,appMessageId:e.appMessageId,role:"user",timestamp:new Date(e.createdAt??0).toISOString(),contentBlocks:[...e.content?[{type:"text",text:e.content}]:[],...e.imageBlocks??[],...e.fileBlocks??[]],metadata:e.messageMetadata,...e.author!==void 0?{author:e.author}:{}}}function Qr(e){return Wn({...e,createdAt:Date.parse(e.queuedAt)})}const qn=8*1024*1024,jn=3*1024*1024;function Vn(e){return Math.ceil(Math.max(0,e)/3)*4}function zn(e){const t=e.promptBase64Bytes;return e.mimeType==="image/jpeg"&&Number.isSafeInteger(e.size)&&e.size>0&&e.size<=jn&&typeof t=="number"&&t===Vn(e.size)?t:null}async function lt(e,t,n,a,r=()=>{}){const s=()=>{if(!a())throw new Error("media-send-retired")};if(s(),r("overlay-render"),!n.exportMedia)throw new Error("media-export-unavailable");const o=dn(e.source,e.saved);if(o.length>1e4)throw new Error("media-animation-layer-limit");const i=[];for(const c of o)s(),i.push({...c,png:await nn(e.source,e.saved,c.atMs)});s(),r("export");const l=await n.exportMedia({outputVersion:zt,jobId:t,media:e,layers:i});if(s(),!l.ok)throw new Error(["media-export-failed",l.error].filter(Boolean).join(":"));return{jobId:t,value:l.value}}const ve={CLIPBOARD_WRITE:"dock-media:clipboard-write",CLIPBOARD_READ:"dock-media:clipboard-read",MENU:"dock-media:menu"};function $e(e,t){return Math.max(0,(e.pausedAt??t)-e.startedAt-(e.pausedMs??0))}function ge(e,t){if(!t?.startsWith(".intent/attachments/"))return;const n=t.split("/").map(encodeURIComponent).join("/"),a=tt(`intent://local/file/${n}`,e);return a?.kind==="video"?a.url:void 0}function Gn(e){const t=e.video==="full"?h.dock_captureEditor_videoFull_label():h.dock_captureEditor_videoHighlights_label(),n=e.voice==="audio"?h.dock_captureEditor_voiceAudio_label():e.voice==="transcript"?h.dock_captureEditor_voiceTranscript_label():h.dock_captureEditor_voiceOff_summary();return`${t} · ${n}`}function Yn(e,t,n,a){if(a?.error==="permission")return a.kind==="pick"?"accessibility":"screen";if(e==="permission"||t==="permission")return"screen";if(n?.startsWith("microphone-permission"))return"microphone";if(n?.startsWith("speech-permission"))return"speech"}const V=un;function Zr(e){const{view:t,items:n,local:a,labels:r,copy:s}=e,o=t.speech.error??t.speech.capability?.reason??null,i=Yn(t.captureError,t.clips.find(y=>y.status==="failed"&&y.error==="permission")?.error??null,o,t.annotationIssue),l=t.annotationIssue?.error==="unavailable"?s?.annotationUnavailable:void 0,c=t.annotationIssue,d=t.captureError==="permission",u=c?.error==="permission"&&c.kind!=="pick",g=c?.error==="permission"&&c.kind==="pick",p=o?.startsWith("speech-permission")?"speech":o?.startsWith("microphone-permission")||o==="permission"?"microphone":void 0,m={},w={},f=(y,D,$)=>{m[y]=D,$&&(w[y]=$)};s&&(d&&(f("capture",s.permission,"screen"),t.recording||f("record",s.permission,"screen")),u&&!t.annotating&&f("annotate",s.permission,"screen"),g&&(f("pick",s.accessibilityPermission,"accessibility"),t.tool==="pick"&&!t.annotating&&f("annotate",s.accessibilityPermission,"accessibility")),p&&!t.dictation&&f("mic",(o&&r.speechError?.(o))??s.speechPermission,p));const k=y=>{const D=w[y];D&&e.actions.onOpenSettings(D)},_=new Set(t.evidenceOwnedItemIds),I=t.clips.find(y=>y.status==="recording"),S=t.clips.length>=ae.clips,v=t.capabilities,B=t.speech.available,E=new Set(t.clips.filter(y=>y.status==="recording"||y.status==="placing"||!!y.media).flatMap(y=>y.captureHistory?.map(D=>D.image.id)??[])),P=[...t.tiles.filter(({image:y,marks:D})=>!!y.media||y.source!=="annotate"||!E.has(y.id)||D.some(({mark:$})=>!$.clipId)).map(({image:y,marks:D})=>({kind:"image",id:y.contextItemId,url:a.previews[y.id]??"",markCount:D.length,owner:"evidence",...a.previews[y.id]?{}:{status:"placing"}})),...t.clips.filter(y=>!y.discarding).map(y=>({kind:"clip",id:y.contextItemId??y.id,duration:V(y.status==="recording"?$e(y,a.now):y.durationMs),recording:y.status==="recording",...y.media?.saved?{summary:Gn(y.media.saved)}:{},...y.status==="ready"&&ge(e.workspaceId,y.path)?{url:ge(e.workspaceId,y.path)}:{},owner:"evidence",...y.status==="placing"?{status:"placing"}:{},...y.status==="failed"?{status:"failed",...y.error==="limit"?{error:h.dock_composer_clipTooLarge_error()}:{}}:{}})),...n.filter(y=>!_.has(y.id)).map(y=>({...y.imageData&&y.imageMimeType?{kind:"image",id:y.id,url:`data:${y.imageMimeType};base64,${y.imageData}`,markCount:0,file:{name:y.label,imageData:y.imageData,imageMimeType:y.imageMimeType}}:{kind:"file",id:y.id,name:y.label},owner:"attachment",...y.placementStatus==="placing"?{status:"placing"}:{},...y.placementStatus==="failed"?{status:"failed",error:y.placementError}:{}}))];return{mediaStatus:t.recording?{kind:"recording",label:r.recording}:t.annotating?{kind:"annotating",label:r.annotating}:void 0,...i?{settingsPane:i}:{},...l?{annotationNotice:l}:{},labels:r,attachments:P,...s?{placeholder:t.dictation?"":s.idle}:{},state:{captureRevision:t.captureAccepted,capturePending:t.capturePending,captureDisabled:!v.capture||t.captureDisabled,...t.captureDisabled?{captureTooltip:r.captureLimit}:{},captureMode:t.evidence?.annotation?"fullscreen":t.captureMode,captureModesAvailable:!!v.captureModes&&!t.evidence?.annotation,annotationActive:t.annotating,tool:t.tool,toolUsed:t.toolUsed,annotationDisabled:!v.annotate,recording:t.recording&&!I?.discarding,recordingDisabled:!!I?.discarding||!t.recording&&(!v.record||S),...S&&!t.recording?{recordingTooltip:r.clipLimit}:{},recordingTime:V(I?$e(I,a.now):0),dictating:!!t.dictation,dictationPending:t.speech.pending||t.dictation?.status==="transcribing",dictationDisabled:!B&&!t.dictation&&!m.mic,...t.speech.error&&r.speechError?{dictationTooltip:r.speechError(t.speech.error)}:{},dictationTime:t.dictation?V(a.now-t.dictation.startedAt):V(0),inputLevels:t.speech.levels,...Object.keys(m).length?{alerts:m}:{}},...e.actions,...t.fileAttachmentsEnabled===!1?{onEdit:void 0}:{},onAlert:k,beforeSubmit:e.beforeSubmit}}const Se=()=>globalThis.electronAPI,Jn=["image/png","image/jpeg","image/webp"],Ne=e=>Jn.includes(e??"")?e:null;function He(e){const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a+=1)n[a]=t.charCodeAt(a);return n}async function es(e,t){const{view:n,items:a,previews:r}=t,s=n.tiles.find(({image:c})=>c.id===e||c.contextItemId===e);if(s){const c=a.find(p=>p.id===s.image.contextItemId),d=s.image.media;if(s.image.mediaError)return null;if(d?.saved){if(!t.createSavedPreviewUrl||!t.revokeUrl)return null;const p={...d,saved:d.saved},m=await t.createSavedPreviewUrl(t.workspaceId,p);try{const w=await t.fetchBytes(m),f=p.saved.crop;return{kind:"image",name:c?.label||"screenshot.png",mimeType:"image/png",bytes:w,intent:{pixels:{mimeType:"image/png",width:Math.max(1,Math.round(f?.w??p.source.width)),height:Math.max(1,Math.round(f?.h??p.source.height)),displayScale:s.image.displayScale,capturedAt:s.image.capturedAt},raw:w,marks:[]}}}finally{t.revokeUrl(m)}}const u=Ne(c?.imageMimeType),g=r[s.image.id];return!c?.imageData||!u||!g?null:{kind:"image",name:c.label||"screenshot.png",mimeType:"image/png",bytes:await t.fetchBytes(g),intent:{pixels:{mimeType:u,width:s.image.width,height:s.image.height,displayScale:s.image.displayScale,capturedAt:s.image.capturedAt,...s.image.hash?{hash:s.image.hash}:{}},raw:He(c.imageData),marks:s.marks.map(({mark:p})=>({tool:p.tool,geometry:p.geometry,bounds:p.bounds,element:p.element}))}}}const o=n.clips.find(c=>c.id===e||c.contextItemId===e);if(o){const c=o.status==="ready"?ge(t.workspaceId,o.path):null;if(!c)return null;const d=a.find(g=>g.id===o.contextItemId),u=await t.fetchBytes(c);if(!Qn(u))throw new Error("Not a recording file");return{kind:"clip",name:d?.label||`recording-${o.id.slice(0,8)}.mp4`,mimeType:d?.attachmentMimeType||"video/mp4",bytes:u,durationMs:o.durationMs,hasMicAudio:o.hasMicAudio}}const i=a.find(c=>c.id===e),l=Ne(i?.imageMimeType);return i?.imageData&&l?{kind:"image",name:i.label||"image",mimeType:l,bytes:He(i.imageData)}:null}async function Xn(e){const t=await fetch(e);if(!t.ok)throw new Error(`Media request failed (${t.status})`);const n=new Uint8Array(await t.arrayBuffer()),a=Number(t.headers.get("content-length")??Number.NaN);if(n.byteLength===0||Number.isFinite(a)&&a!==n.byteLength)throw new Error("Media response was incomplete");return n}function Qn(e){return e.byteLength>8&&String.fromCharCode(...e.subarray(4,8))==="ftyp"}async function ts(e){try{return(await Se()?.invoke(ve.CLIPBOARD_WRITE,e))?.ok===!0}catch{return!1}}async function Zn(){try{return await Se()?.invoke(ve.CLIPBOARD_READ,{})??null}catch{return null}}async function ns(e){try{const t=await Se()?.invoke(ve.MENU,{canCut:e});return t?.action==="copy"||t?.action==="cut"?t.action:null}catch{return null}}const Fe=new WeakSet;async function ea(e,t){const[n]=e;if(e.length!==1||!n||n.size!==t.size)return!1;try{const a=await crypto.subtle.digest("SHA-256",await n.arrayBuffer());return Array.from(new Uint8Array(a),s=>s.toString(16).padStart(2,"0")).join("")===t.sha256}catch{return!1}}function as(e,{onIntentMedia:t,isCurrent:n,read:a=Zn}){const r=e.clipboardData;if(Fe.has(e)||!r||r.files.length===0)return!1;const s=e.target,o=Array.from(r.files),i=r.types.filter(l=>l!=="Files").map(l=>[l,r.getData(l)]);return e.preventDefault(),e.stopImmediatePropagation(),a().catch(()=>null).then(async l=>{if(!n())return;if(l&&await ea(o,l)){n()&&t(l);return}if(!n()||!(s instanceof Node)||!s.isConnected)return;const c=new DataTransfer;for(const u of o)c.items.add(u);for(const[u,g]of i)c.setData(u,g);const d=new ClipboardEvent("paste",{clipboardData:c,bubbles:!0,cancelable:!0});Fe.add(d),s.dispatchEvent(d)}),!0}function ta(e){const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return n}function na(e){let t="";for(let a=0;a<e.length;a+=32768)t+=String.fromCharCode(...e.subarray(a,a+32768));return btoa(t)}function dt(e){let t=0;return e.endsWith("==")?t=2:e.endsWith("=")&&(t=1),Math.floor(e.length*3/4)-t}async function aa(e){const t=await crypto.subtle.digest("SHA-256",e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength));return Array.from(new Uint8Array(t)).map(n=>n.toString(16).padStart(2,"0")).join("")}const ut={placeAttachment:ot,beginAttachmentUpload:st,sendAttachmentUploadChunk:rt,commitAttachmentUpload:at,abortAttachmentUpload:nt,getAttachmentInfo:he,mintIdempotencyKey:se};async function Ae(e,t,n,a=ut){const{idempotencyKey:r}=n,s={...r!==void 0?{idempotencyKey:r}:{},...n.rawScreenshot!==void 0?{rawScreenshot:n.rawScreenshot}:{}},o=async m=>hn(m,r)?Oe(e,r,a.getAttachmentInfo):void 0;if(dt(n.data)<=mn)try{return await a.placeAttachment(e,t,{data:n.data,mimeType:n.mimeType,...s})}catch(m){const w=await o(m);if(w)return w;throw m}const i=ta(n.data),l=await aa(i);let c,d;try{({uploadId:c,maxChunkBytes:d}=await a.beginAttachmentUpload(e,t,i.byteLength,l,{mimeType:n.mimeType,...s}))}catch(m){if(r!==void 0&&pn(m)){const w=await Oe(e,r,a.getAttachmentInfo);if(w)return w}throw m}const u=Math.min(gn,d),g=Math.ceil(i.byteLength/u);let p=!1;try{for(let m=0;m<g;m++){const w=i.subarray(m*u,(m+1)*u);await a.sendAttachmentUploadChunk(c,m,na(w),e)}return p=!0,await a.commitAttachmentUpload(c,e)}catch(m){const w=p?await o(m):void 0;if(w)return w;throw await a.abortAttachmentUpload(c,e).catch(()=>{}),m}}function ra(e,t){return yn(e,`image-${Date.now()}-${t+1}`)}class Me extends Error{constructor(n,a){super(n);Pe(this,"retryBlocks");this.name="ImagePlacementError",this.retryBlocks=a}}function sa(e,t){return e instanceof Me?e.retryBlocks:t}async function oa(e,t,n=ut,a=()=>!0){const r=l=>(...c)=>(le(a),l(...c));n={placeAttachment:r(n.placeAttachment),beginAttachmentUpload:r(n.beginAttachmentUpload),sendAttachmentUploadChunk:r(n.sendAttachmentUploadChunk),commitAttachmentUpload:r(n.commitAttachmentUpload),abortAttachmentUpload:r(n.abortAttachmentUpload),getAttachmentInfo:r(n.getAttachmentInfo),mintIdempotencyKey:r(n.mintIdempotencyKey)};const s=[],o=[],i=[];for(let l=0;l<t.length;l++){le(a);const c=t[l];if("attachmentId"in c&&c.attachmentId){const p={type:"image",attachmentId:c.attachmentId,...c.mimeType?{mimeType:c.mimeType}:{}};s.push(p),o.push(p);continue}const d=c,u=d.placementFileName??ra(d.mimeType,l),g=n.mintIdempotencyKey(d.placementIdempotencyKey);try{const p=await Ae(e,u,{data:d.data,mimeType:d.mimeType,...g!==void 0?{idempotencyKey:g}:{}},n),m={type:"image",attachmentId:p.attachmentId,...p.mimeType??d.mimeType?{mimeType:p.mimeType??d.mimeType}:{}};s.push(m),o.push(m)}catch(p){const m=fn(p);i.push(m?`${u} (${m})`:u),o.push(g!==void 0?{...d,placementIdempotencyKey:g,placementFileName:u}:d)}}if(i.length>0)throw new Me(h.chat_imagePlacement_failed_error({names:i.join(", ")}),o);return le(a),s}const rs=Object.freeze(Object.defineProperty({__proto__:null,ImagePlacementError:Me,base64DecodedBytes:dt,imageRetryBlocks:sa,placeImageAttachment:Ae,toImageReferenceBlocks:oa},Symbol.toStringTag,{value:"Module"}));function mt(){try{return kn()}catch{return null}}function ia(){return{backendId:M.state.connections.windowBackendId??null,generation:M.state.daemonHealth.connectionGeneration,transport:mt()}}class Ie extends Error{constructor(){super("dock-evidence-backend-changed")}}function N(e,t){return async(...n)=>{e();const a=await t(...n);return e(),a}}const K={current:e=>mt()===e.transport&&M.state.daemonHealth.connectionGeneration===e.generation&&(M.state.connections.windowBackendId??null)===e.backendId,capabilities:()=>_n(),placeImage:(e,t,n,a)=>Ae(e,t,n,{placeAttachment:N(a,ot),beginAttachmentUpload:N(a,st),sendAttachmentUploadChunk:N(a,rt),commitAttachmentUpload:N(a,at),abortAttachmentUpload:N(a,nt),getAttachmentInfo:N(a,he),mintIdempotencyKey:se}),lookup:(e,t)=>he({workspaceId:e,idempotencyKey:t}),mintKey:se};function Y(e){return K.current(e)}function ca(e,t){const n=M.state.dockConversation;return{generation:n.generation,authority:n.authority,clearRevision:R(n.drafts,Gt(e,t))?.clearRevision??0,binding:ia()}}function ss(e,t,n){const a=ca(e,t);return a.generation===n.generation&&a.authority===n.authority&&a.clearRevision===n.clearRevision&&Y(n.binding)}function pt(e,t){return()=>{if(!e.current(t))throw new Ie}}const ft=Object.freeze({rawRetention:!1,chiefAttachments:!1});function os(e){return e!==ft}const de=new Map;function ht(e,t=K){const n=`${e.backendId}:${e.generation}`;let a=de.get(n);if(!a){const r=pt(t,e);a=(async()=>{r();const o=await t.capabilities();r();const i=o?.server?.capabilities;if(!i||typeof i!="object")throw new Error("unobserved");return{rawRetention:i.rawScreenshotRetention===1,chiefAttachments:i.chiefAttachments===1}})().catch(()=>(de.delete(n),ft)),de.set(n,a)}return a}class ee extends Error{constructor(t){super(`dock-raw-retention-contract:${t}`),this.reason=t}}function gt(e){const{rpcCode:t,code:n}=e??{};return t===-32602||n==="INVALID_PARAMS"}function la(e){const t=String(e?.message??"");return gt(e)&&(t.includes("rawScreenshotExpired:")||/expired at .*not renewable/i.test(t))}function da(e,t,n){const a=e.rawScreenshot;if(!a||a.compositeAttachmentId!==t)return null;const r=Date.parse(a.expiresAt);return Number.isFinite(r)?a.expired||r<=n?"expired":{attachmentId:e.attachmentId,expiresAt:a.expiresAt}:null}function Ke(e){return{ok:!0,path:e.path,fileName:e.fileName,size:e.size,attachmentId:e.attachmentId,...e.mimeType?{mimeType:e.mimeType}:{},uploadedAt:e.uploadedAt,replayed:!0,...e.rawScreenshot?{rawScreenshot:e.rawScreenshot}:{}}}class ua extends Error{constructor(t,n){super("dock-evidence-placement-failed"),this.imageId=t,this.failure=n}}const We=e=>e.split("/")[1]?.replace("jpeg","jpg")||"png";async function ma(e){const t=e.api??K,n=e.now??Date.now,a=pt(t,e.binding);a();const r=await ht(e.binding,t);a();const s=r.rawRetention&&(e.workspaceId!==be||r.chiefAttachments),o=[];for(const i of e.images){const l=e.records[i.image.id];let c=l&&l.signature===i.signature&&l.workspaceId===e.workspaceId&&l.backendId===e.binding.backendId?l:{imageId:i.image.id,signature:i.signature,workspaceId:e.workspaceId,backendId:e.binding.backendId,compositeKey:null,rawKey:null,composite:null,raw:null,rawSettled:!1};const d=u=>{c=u,e.onRecord(u)};try{if(!c.composite){const g=c.compositeKey,p=t.mintKey(g??void 0)??null;p!==c.compositeKey&&d({...c,compositeKey:p});let m;g&&p===g&&(a(),m=await t.lookup(e.workspaceId,p).then(Ke).catch(()=>{}),a()),m||(a(),m=await t.placeImage(e.workspaceId,`screenshot-${i.image.id.slice(0,8)}.${We(i.composite.mimeType)}`,{data:i.composite.base64,mimeType:i.composite.mimeType,...p?{idempotencyKey:p}:{}},a),a()),d({...c,composite:{attachmentId:m.attachmentId,mimeType:m.mimeType??i.composite.mimeType}})}const u=c.composite.attachmentId;if(s&&i.raw&&!c.raw&&!c.rawSettled){const g=c.rawKey,p=t.mintKey(g??void 0);if(p){p!==c.rawKey&&d({...c,rawKey:p});let m;g&&p===g&&(a(),m=await t.lookup(e.workspaceId,p).then(Ke).catch(()=>{}),a());try{m||(a(),m=await t.placeImage(e.workspaceId,`screenshot-${i.image.id.slice(0,8)}-original.${We(i.raw.mimeType)}`,{data:i.raw.base64,mimeType:i.raw.mimeType,idempotencyKey:p,rawScreenshot:{compositeAttachmentId:u}},a),a());const w=da(m,u,n());if(w==="expired")d({...c,rawSettled:!0});else if(w)d({...c,raw:w});else throw new ee("echo")}catch(w){if(la(w))d({...c,rawSettled:!0});else throw w instanceof ee?w:gt(w)?new ee("refused"):w}}else throw new ee("unkeyed")}}catch(u){throw u instanceof Ie?u:new ua(i.image.id,u)}o.push(c)}return o}async function is(e,t,n,a){const r=()=>{if(!K.current(a))throw new Ie};r();const s=await K.placeImage(e,t,{...n,idempotencyKey:K.mintKey()},r);return r(),s}const pa=new Set(["invalid-saved-edit","media-send-retired","transcript-unavailable","transcript-pending","invalid-edit","stale-source","legacy-baked-marks","timing-unavailable","audio-unavailable","media-source-unavailable","media-export-unavailable","media-animation-layer-limit","media-export-failed","legacy-original-unavailable","capture-render-unavailable","capture-blur-unavailable","stale-source-pixels","not-a-screenshot","not-admitted","unavailable","dock-evidence-missing-pixels","draft-restore-failed","image-budget-exceeded"]),fa=new Set(["unavailable","permission","failed","busy","cancelled","limit"]);class L extends Error{constructor(t,n){super(n),this.stage=t,this.code=n,this.name="DockSendError"}}function oe(e){const t=e instanceof Error?e.message:typeof e=="string"?e:"";if(t.length>64)return"unclassified";const[n,...a]=t.split(":");return!pa.has(n)||a.length>2?"unclassified":n!=="media-export-failed"?a.length?"unclassified":n:[n,...a.map(r=>fa.has(r)?r:"other")].join(":")}function cs(e,t){return e instanceof L?{stage:e.stage,code:oe(e.code)}:{stage:t,code:oe(e)}}function W(e){if(!e||e.source.kind!=="recording")return!1;const t=e.source,n=e.saved??re(t,t.capturedMarks??[],e.transcript);if(n.video!=="full"||n.voice!=="audio"||n.crop||n.blurRegions.length||n.blurStrokes?.length)return!1;const a=_e(n,t,e.transcript);return t.visuals==="clean"?!a.errors.length&&!a.muted&&n.cuts.length===0&&!n.marks.some(r=>r.included)&&a.marks.length===0&&a.transcript===null&&a.kept.length===1&&a.kept[0].startMs===0&&a.kept[0].endMs===t.durationMs&&a.clips.length===1&&a.clips[0].startMs===0&&a.clips[0].endMs===t.durationMs:!a.errors.length&&!a.muted&&a.clips.length===1&&a.clips[0].startMs===0&&a.clips[0].endMs>=t.durationMs}async function ha(e,t,n,a,r,s){const o={images:{},files:[],frames:[],framePromptBytes:[],metadata:[]};let i="validate";try{const l=()=>{if(!r()||!Y(n))throw new Error("media-send-retired")};for(const c of[...t.images,...t.clips]){if(i="validate",s?.stage(i),c.mediaError)throw new Error("invalid-saved-edit");if(!c.media||W(c.media))continue;l();const d=structuredClone(c.media),u=d.source;let g=d.saved??re(u,u.capturedMarks??[],d.transcript),p=crypto.randomUUID();try{if(u.kind==="recording"&&g.voice==="transcript"&&d.transcript?.status!=="ready"){if(i="transcribe",s?.stage(i),!a?.transcribeMedia)throw new Error("transcript-unavailable");const f=await a.transcribeMedia({jobId:p,media:d});if(l(),!f.ok)throw new Error("transcript-unavailable");d.transcript=f.value,d.saved||(g=re(u,u.capturedMarks??[],d.transcript))}i="plan",s?.stage(i);const m=_e(g,u,d.transcript);if(m.errors.length)throw new Error(m.errors[0]);const w={id:c.id,kind:u.kind,video:g.video,voice:g.voice,transcript:m.transcript,batches:u.batches,marks:m.marks.map(({n:f,mark:k,frameAtMs:_})=>({n:f,id:k.id,at_ms:_,kind:k.kind,label:k.label,note:k.note,context:k.context,geometry:k.geometry}))};if(u.kind==="screenshot"){i="screenshot-source",s?.stage(i);const f=u.path.split("/").map(encodeURIComponent).join("/"),k=tt(`intent://local/file/${f}`,e);if(!k||k.kind!=="image")throw new Error("media-source-unavailable");const _=await Xn(k.url);l();const I={base64:Ze(_.buffer.slice(_.byteOffset,_.byteOffset+_.byteLength)),mimeType:/\.jpe?g$/i.test(u.path)?"image/jpeg":/\.webp$/i.test(u.path)?"image/webp":"image/png"};i="screenshot-render",s?.stage(i),o.images[c.id]=await an(u,g,I),l()}else{if(!m.clips.length){w.video_attachment_id=null,w.frames=[],w.kept_ms=[],o.metadata.push(w);continue}const f={...d,saved:g};let k=await a?.takePreparedRecording?.(f);if(k&&(p=k.jobId),l(),!k){if(!a)throw new Error("media-export-unavailable");k=await lt(f,p,a,()=>r()&&Y(n),S=>{i=S,s?.stage(S),S==="export"&&s?.exportAttempt(p)})}p=k.jobId,i="placement",s?.stage(i);const _=[k.value.video,...k.value.frames],I=[];for(let S=0;S<_.length;S++){l();const v=_[S],B=`capture-${c.id.slice(0,12)}-${S}.${S===0?"mp4":v.mimeType==="image/jpeg"?"jpg":"png"}`,E=await wn(e,B,{sourcePath:v.sourcePath,mimeType:v.mimeType,idempotencyKey:se()},void 0,void 0,()=>r()&&Y(n));l(),S===0?o.files.push({type:"file",attachmentId:E.attachmentId,fileName:B,mimeType:E.mimeType??v.mimeType,size:E.size}):(o.frames.push({type:"image",attachmentId:E.attachmentId,mimeType:v.mimeType==="image/jpeg"?"image/jpeg":"image/png"}),o.framePromptBytes.push(zn(v))),I.push(E.attachmentId)}w.video_attachment_id=I[0],w.frames=k.value.frames.map((S,v)=>({mark_id:S.markId,attachment_id:I[v+1]})),w.kept_ms=m.clips}o.metadata.push(w)}finally{s?.stage("release"),await a?.releaseMediaJob?.(p).catch(()=>{})}}return o}catch(l){throw l instanceof L?l:new L(i,oe(l))}}const ue=1568,ga=.85;async function ya(e,t){const n=Math.round(e.length*3/4/1024),a=await wa(e,t),{width:r,height:s}=a,o=r>ue||s>ue;let i=r,l=s;if(o){const f=ue/Math.max(r,s);i=Math.round(r*f),l=Math.round(s*f)}const c=new OffscreenCanvas(i,l),d=c.getContext("2d");if(!d)throw new Error("Failed to get 2D canvas context for image resize");d.drawImage(a,0,0,i,l);let u=t;ba(d,i,l)||(u="image/jpeg");const g=await c.convertToBlob({type:u,quality:u==="image/jpeg"?ga:void 0}),p=g.type||u,m=await ka(g),w=Math.round(m.length*3/4/1024);return console.debug(`[image-resize] ${r}×${s} → ${i}×${l} | ${t} → ${p} | ${n} KB → ${w} KB`),{base64:m,mimeType:p}}async function wa(e,t){const n=atob(e),a=new Uint8Array(n.length);for(let s=0;s<n.length;s++)a[s]=n.charCodeAt(s);const r=new Blob([a],{type:t});return createImageBitmap(r)}function ba(e,t,n){const r=e.getImageData(0,0,t,n).data;for(let s=3;s<r.length;s+=4)if(r[s]<255)return!0;return!1}async function ka(e){const t=await e.arrayBuffer(),n=new Uint8Array(t);let a="";for(let r=0;r<n.length;r++)a+=String.fromCharCode(n[r]);return btoa(a)}const T={...Le,badge:Le.badgeRadius*2};function _a(e,t,n=1,a=0){const r=Math.max(1,e.displayScale)*n,s=[],o=i=>i*n;for(const{n:i,mark:l}of t){const c=l.geometry;if(c.kind==="rect")s.push({kind:"rect",x:o(c.x),y:o(c.y),w:o(c.w),h:o(c.h),width:T.stroke*r});else if(c.kind==="path")s.push({kind:"path",points:c.points.map(m=>({x:o(m.x),y:o(m.y)})),width:T.pen*r});else{const m={x:o(c.from.x),y:o(c.from.y)},w={x:o(c.to.x),y:o(c.to.y)};s.push({kind:"arrow",from:m,to:w,head:Ia(m,w,T.arrowHead*r),width:T.stroke*r})}if(!T.showNumbers)continue;const d=Math.max(a,T.badge/2*r),u=o(l.bounds.x+l.bounds.w),g=o(l.bounds.y),p=tn({x:o(l.bounds.x),y:g,w:u-o(l.bounds.x),h:o(l.bounds.h)},{x:0,y:0,w:o(e.width),h:o(e.height)},r,d);s.push({kind:"badge",...p,radius:d,label:String(i),font:d*T.badgeTextScale})}return s}function va(e,t){"letterSpacing"in e&&(e.letterSpacing="0px"),"wordSpacing"in e&&(e.wordSpacing="0px");const n=(a,r,s)=>{e.strokeStyle=T.halo,e.lineWidth=a+T.haloWidth*r,s(),e.strokeStyle=T.accent,e.lineWidth=a,s()};e.strokeStyle=T.accent,e.lineCap="round",e.lineJoin="round";for(const a of t)if(a.kind==="rect")n(a.width,a.width/T.stroke,()=>e.strokeRect(a.x,a.y,a.w,a.h));else if(a.kind==="path"||a.kind==="arrow"){e.lineWidth=a.width,e.beginPath();const r=a.kind==="path"?a.points:[a.from,a.to];a.kind==="arrow"&&r.forEach((o,i)=>i?e.lineTo(o.x,o.y):e.moveTo(o.x,o.y)),a.kind==="arrow"&&(e.moveTo(a.head.left.x,a.head.left.y),e.lineTo(a.to.x,a.to.y),e.lineTo(a.head.right.x,a.head.right.y));const s=a.kind==="path"?new Path2D(en(a.points)):null;n(a.width,a.width/(a.kind==="path"?T.pen:T.stroke),()=>s?e.stroke(s):e.stroke())}else e.fillStyle=T.paper,e.beginPath(),e.arc(a.x,a.y,a.radius,0,Math.PI*2),e.closePath(),e.fill(),e.strokeStyle=T.accent,e.lineWidth=T.badgeOutline*a.radius/T.badgeRadius,e.stroke(),e.fillStyle=T.ink,e.font=`600 ${a.font}px ${T.badgeFontFamily}`,e.textAlign="center",e.textBaseline="middle",e.fillText(a.label,a.x,a.y)}async function Sa(e,t){const n=Uint8Array.from(atob(e),a=>a.charCodeAt(0));return createImageBitmap(new Blob([n],{type:t}))}async function Aa(e){const t=await e.convertToBlob({type:"image/png"});return Ze(await t.arrayBuffer())}async function yt(e,t,n,a,r=0){await rn();const s=await Sa(e.base64,e.mimeType);try{const o=Math.min(1,a/Math.max(t.width,t.height)),i=new OffscreenCanvas(Math.max(1,Math.round(t.width*o)),Math.max(1,Math.round(t.height*o))),l=i.getContext("2d");if(!l)throw new Error("dock-evidence-canvas-unavailable");return l.drawImage(s,0,0,i.width,i.height),va(l,_a(t,n,o,r)),i}finally{s.close()}}async function Ma(e,t,n){const a=await yt(e,t,n,Math.max(t.width,t.height));return ya(await Aa(a),"image/png")}async function ls(e,t,n,a=384){const r=await yt(e,t,n,a,a/32);return URL.createObjectURL(await r.convertToBlob({type:"image/png"}))}function Ia(e,t,n=T.arrowHead){const a=Math.atan2(t.y-e.y,t.x-e.x),r=T.arrowSpread;return{left:{x:t.x-n*Math.cos(a-r),y:t.y-n*Math.sin(a-r)},right:{x:t.x-n*Math.cos(a+r),y:t.y-n*Math.sin(a+r)}}}function ds(e,t){const n=Yt(t??void 0),a=new Set(t?.clips.filter(r=>!!r.media&&!W(r.media)).map(r=>r.contextItemId));return e.filter(r=>!n.has(r.id)&&!a.has(r.id))}async function us({workspaceId:e,agentId:t,evidence:n,clickedItems:a,sendItems:r,clickedPayload:s,binding:o,service:i,current:l,onRecord:c,timing:d}){const u=()=>{if(!l()||!Y(o))throw new L("validate","media-send-retired")};if(u(),n?.images.some(b=>b.mediaError)||n?.clips.some(b=>b.mediaError))throw new L("validate","invalid-saved-edit");const g=b=>!!b.media&&!W(b.media),p=n?{workspaceId:e,agentId:t,appUrl:`intent://local/workspace/${encodeURIComponent(e)}`,clipAttachmentIds:Object.fromEntries(n.clips.map(b=>[b.id,a.find(A=>A.id===b.contextItemId)?.attachmentId??null]))}:null;for(const b of n?.clips??[]){if(!b.media||!W(b.media))continue;const A=a.find(Q=>Q.id===b.contextItemId);if(!A||A.attachmentId!==b.media.source.attachmentId||A.path!==b.media.source.path||A.placementStatus!==void 0&&A.placementStatus!=="placed")throw new L("validate","legacy-original-unavailable")}const m=n?await ha(e,n,o,i,l,d):{images:{},files:[],frames:[],framePromptBytes:[],metadata:[]},w=new Set(n?.clips.filter(b=>g(b)||!!b.media&&W(b.media)).map(b=>b.id)),f=new Set(n?.clips.filter(b=>w.has(b.id)).flatMap(b=>(b.captureHistory??[]).map(A=>A.image.id))),k=(n?.images??[]).filter(b=>b.source!=="annotate"||!!b.media||!f.has(b.id)||n.marks.some(A=>A.imageId===b.id&&!(A.clipId&&w.has(A.clipId))));d?.stage("burn");let _=[];try{_=n?await Ta({...n,images:k},a,m.images):[]}catch(b){throw new L("burn",oe(b))}if(m.framePromptBytes.reduce((b,A)=>b+(A??0),0)>qn)throw new L("validate","image-budget-exceeded");const S=new Set(n?.images.filter(b=>b.media).map(b=>b.id)),v=n?{...n,images:k.map(b=>m.images[b.id]?{...b,width:m.images[b.id].width,height:m.images[b.id].height}:b),clips:n.clips.filter(b=>!g(b)),marks:n.marks.filter(b=>!S.has(b.imageId)&&!n.clips.some(A=>g(A)&&A.id===b.clipId))}:null;u();const B=m.metadata.some(b=>typeof b.transcript=="string"&&b.transcript.trim());if(!s.text.trim()&&!r.length&&!s.workspaceContextStr?.trim()&&!_.length&&!m.files.length&&!m.frames.length&&!s.imageBlocks?.length&&!s.fileBlocks?.length&&!B)return null;let E=_,P=null;d?.stage("placement");const xe=n?await ht(o):null;if(u(),n&&(e!==be||xe?.chiefAttachments)){const b=await ma({workspaceId:e,binding:o,images:k.map((A,Q)=>{const Z=a.find(Dt=>Dt.id===A.contextItemId);return{image:A,signature:Jt(n,A.id),composite:{base64:_[Q].data,mimeType:_[Q].mimeType},raw:!A.media&&Z?.imageData&&Z.imageMimeType?{base64:Z.imageData,mimeType:Z.imageMimeType}:null}}),records:n?.placements??{},onRecord:c});u(),E=b.map(A=>({type:"image",attachmentId:A.composite.attachmentId,mimeType:A.composite.mimeType})),P=Object.fromEntries(b.map(A=>[A.imageId,{attachmentId:A.composite.attachmentId,raw:A.raw}]))}const y=new Map(n?Qe(n).map(({n:b,mark:A})=>[A.id,b]):[]),D=p&&P?{...p,imageAttachments:P,markNumbers:y}:p&&{...p,markNumbers:y},$=n&&D?{...s,imageBlocks:[...E,...m.frames,...s.imageBlocks??[]],fileBlocks:[...s.fileBlocks??[],...m.files],workspaceContextStr:[Qt(v,D),m.metadata.length?`[Edited capture outputs]
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/Bsdq-idi.js","/app/immutable/chunks/D5wnbxHp.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BUsnh1ZW.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/CrpUtGFn.js","/app/immutable/chunks/YLhFQnIu.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/BJbm_MWC.js","/app/immutable/chunks/gwv5JQYH.js","/app/immutable/chunks/DwGyIIXK.js","/app/immutable/chunks/YeOAvjnW.js","/app/immutable/chunks/BQhBnAuP.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/oBIu7LTI.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/DJivXy66.js","/app/immutable/chunks/CTowDLQa.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/_3Ca9E4W.js","/app/immutable/chunks/DIEHuZ8f.js","/app/immutable/chunks/L3K71tUU.js","/app/immutable/chunks/Bq7euxCs.js","/app/immutable/chunks/COVS9Crf.js","/app/immutable/chunks/CZB2ndi9.js","/app/immutable/chunks/Cw2fqKk9.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/CBbdbU2x.js","/app/immutable/chunks/D48_y-cl.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/FLpsgWeB.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.B1j5oT2y.css","/app/immutable/chunks/DwbEs_9r.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/B_QPRXJ5.js","/app/immutable/chunks/0Kw0mmSW.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js"])))=>i.map(i=>d[i]);
2
+ var Rt=Object.defineProperty;var xt=(e,t,n)=>t in e?Rt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Pe=(e,t,n)=>xt(e,typeof t!="symbol"?t+"":t,n);import{Jx as M,m as be,nY as R,wt as Pt,Cr as Ge,wv as Bt,DF as Ye,cK as Lt,cL as Ot,nZ as Je,nL as Ut,i as ke,fV as $t,ma as Nt,cS as Ht}from"./D5wnbxHp.js";import{J as Ft,Z as Kt,dW as Be,cU as pe,dH as Wt,ax as qt,be as Xe,I as jt,e8 as Vt}from"./BJbm_MWC.js";import{e as zt,b as ae,F as Gt,y as re,_ as _e,G as Yt,C as Jt,W as Qe,v as Xt,u as Qt,M as Zt}from"./BUsnh1ZW.js";import{D as Le,a as en,d as tn}from"./CQcEqK4G.js";import{m as nn,g as Ze,r as an,k as rn,D as sn}from"./BfQFKWzJ.js";import{e as on}from"./CL3a4Hm1.js";import{z as et,O as cn,R as ln}from"./Bqd7fdCF.js";import{a as dn}from"./HLNbJ-7M.js";import{f as un}from"./D7AX9X0W.js";import{bm as h,_ as fe}from"./YLhFQnIu.js";import{a8 as tt,aA as se,I as he,a as nt,n as at,cS as rt,e as st,aI as ot,M as mn,aa as pn,aV as Oe,d as le,C as fn,cT as hn,U as gn,a4 as yn,aJ as wn,b_ as bn}from"./ByBw1QkA.js";import{W as kn,L as _n,w as vn,R as Sn,h as it,M as An}from"./DJivXy66.js";import{l as H,i as Mn,n as In}from"./DIEHuZ8f.js";import{b as Tn}from"./0Kw0mmSW.js";import{K as Cn,P as En,as as Dn,aC as Rn}from"./Bmm_g7di.js";import{a as Ue,b as xn,g as Pn}from"./DypB-Dwi.js";import{m as Bn}from"./mUNs8NSR.js";import{m as Ln}from"./CZB2ndi9.js";import"./3SdAC2_C.js";import"./BQhBnAuP.js";import"./CrpUtGFn.js";import"./ChTqQfQN.js";import"./D48_y-cl.js";import{i as ct}from"./Dms_DO28.js";import{C as On}from"./B5aYN90J.js";import{i as Un}from"./DWqaYE81.js";import{o as O,e as $n,l as z,s as C,n as ce,b as Nn,d as Hn,c as Fn}from"./CIyUrgF0.js";const Vr=M.createSelector((e,t)=>e.unreadTracking.dividerSessionByAgentId[t]??null),zr=M.createSelector(e=>e.unreadTracking.currentlyViewedAgentId),Gr=M.createSelector(e=>{const t=[];for(const s of Object.values(e.panelLayout.byWorkspaceId))for(const o of Object.values(s.panels))for(const i of o.tabs)i.type==="agent"&&i.agentId&&t.push(i.agentId);const n=Object.keys(e.unreadTracking.dividerSessionByAgentId),a=new Set(e.agentSessions.agentIdsByWorkspace[be]??[]);return{chiefCardVisible:e.sidebarNav.panelItem==="chief",chiefSessionAgentIds:n.filter(s=>a.has(s)),dividerSessionAgentIds:n,openAgentTabIds:t}});function Yr(e,t){if(e)return e.model}function Kn({messages:e,pendingInitialPrompt:t,pendingContextReferenceCount:n=0}){return e.length>0||!!t||n>0}function Jr({session:e,messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:a=0}){return!(e?Ft(e):!1)&&!Kn({messages:t,pendingInitialPrompt:n,pendingContextReferenceCount:a})}function Xr(e){return Kt(e.messageMetadata)}function Wn(e){return{id:e.id,appMessageId:e.appMessageId,role:"user",timestamp:new Date(e.createdAt??0).toISOString(),contentBlocks:[...e.content?[{type:"text",text:e.content}]:[],...e.imageBlocks??[],...e.fileBlocks??[]],metadata:e.messageMetadata,...e.author!==void 0?{author:e.author}:{}}}function Qr(e){return Wn({...e,createdAt:Date.parse(e.queuedAt)})}const qn=8*1024*1024,jn=3*1024*1024;function Vn(e){return Math.ceil(Math.max(0,e)/3)*4}function zn(e){const t=e.promptBase64Bytes;return e.mimeType==="image/jpeg"&&Number.isSafeInteger(e.size)&&e.size>0&&e.size<=jn&&typeof t=="number"&&t===Vn(e.size)?t:null}async function lt(e,t,n,a,r=()=>{}){const s=()=>{if(!a())throw new Error("media-send-retired")};if(s(),r("overlay-render"),!n.exportMedia)throw new Error("media-export-unavailable");const o=dn(e.source,e.saved);if(o.length>1e4)throw new Error("media-animation-layer-limit");const i=[];for(const c of o)s(),i.push({...c,png:await nn(e.source,e.saved,c.atMs)});s(),r("export");const l=await n.exportMedia({outputVersion:zt,jobId:t,media:e,layers:i});if(s(),!l.ok)throw new Error(["media-export-failed",l.error].filter(Boolean).join(":"));return{jobId:t,value:l.value}}const ve={CLIPBOARD_WRITE:"dock-media:clipboard-write",CLIPBOARD_READ:"dock-media:clipboard-read",MENU:"dock-media:menu"};function $e(e,t){return Math.max(0,(e.pausedAt??t)-e.startedAt-(e.pausedMs??0))}function ge(e,t){if(!t?.startsWith(".intent/attachments/"))return;const n=t.split("/").map(encodeURIComponent).join("/"),a=tt(`intent://local/file/${n}`,e);return a?.kind==="video"?a.url:void 0}function Gn(e){const t=e.video==="full"?h.dock_captureEditor_videoFull_label():h.dock_captureEditor_videoHighlights_label(),n=e.voice==="audio"?h.dock_captureEditor_voiceAudio_label():e.voice==="transcript"?h.dock_captureEditor_voiceTranscript_label():h.dock_captureEditor_voiceOff_summary();return`${t} · ${n}`}function Yn(e,t,n,a){if(a?.error==="permission")return a.kind==="pick"?"accessibility":"screen";if(e==="permission"||t==="permission")return"screen";if(n?.startsWith("microphone-permission"))return"microphone";if(n?.startsWith("speech-permission"))return"speech"}const V=un;function Zr(e){const{view:t,items:n,local:a,labels:r,copy:s}=e,o=t.speech.error??t.speech.capability?.reason??null,i=Yn(t.captureError,t.clips.find(y=>y.status==="failed"&&y.error==="permission")?.error??null,o,t.annotationIssue),l=t.annotationIssue?.error==="unavailable"?s?.annotationUnavailable:void 0,c=t.annotationIssue,d=t.captureError==="permission",u=c?.error==="permission"&&c.kind!=="pick",g=c?.error==="permission"&&c.kind==="pick",p=o?.startsWith("speech-permission")?"speech":o?.startsWith("microphone-permission")||o==="permission"?"microphone":void 0,m={},w={},f=(y,D,$)=>{m[y]=D,$&&(w[y]=$)};s&&(d&&(f("capture",s.permission,"screen"),t.recording||f("record",s.permission,"screen")),u&&!t.annotating&&f("annotate",s.permission,"screen"),g&&(f("pick",s.accessibilityPermission,"accessibility"),t.tool==="pick"&&!t.annotating&&f("annotate",s.accessibilityPermission,"accessibility")),p&&!t.dictation&&f("mic",(o&&r.speechError?.(o))??s.speechPermission,p));const k=y=>{const D=w[y];D&&e.actions.onOpenSettings(D)},_=new Set(t.evidenceOwnedItemIds),I=t.clips.find(y=>y.status==="recording"),S=t.clips.length>=ae.clips,v=t.capabilities,B=t.speech.available,E=new Set(t.clips.filter(y=>y.status==="recording"||y.status==="placing"||!!y.media).flatMap(y=>y.captureHistory?.map(D=>D.image.id)??[])),P=[...t.tiles.filter(({image:y,marks:D})=>!!y.media||y.source!=="annotate"||!E.has(y.id)||D.some(({mark:$})=>!$.clipId)).map(({image:y,marks:D})=>({kind:"image",id:y.contextItemId,url:a.previews[y.id]??"",markCount:D.length,owner:"evidence",...a.previews[y.id]?{}:{status:"placing"}})),...t.clips.filter(y=>!y.discarding).map(y=>({kind:"clip",id:y.contextItemId??y.id,duration:V(y.status==="recording"?$e(y,a.now):y.durationMs),recording:y.status==="recording",...y.media?.saved?{summary:Gn(y.media.saved)}:{},...y.status==="ready"&&ge(e.workspaceId,y.path)?{url:ge(e.workspaceId,y.path)}:{},owner:"evidence",...y.status==="placing"?{status:"placing"}:{},...y.status==="failed"?{status:"failed",...y.error==="limit"?{error:h.dock_composer_clipTooLarge_error()}:{}}:{}})),...n.filter(y=>!_.has(y.id)).map(y=>({...y.imageData&&y.imageMimeType?{kind:"image",id:y.id,url:`data:${y.imageMimeType};base64,${y.imageData}`,markCount:0,file:{name:y.label,imageData:y.imageData,imageMimeType:y.imageMimeType}}:{kind:"file",id:y.id,name:y.label},owner:"attachment",...y.placementStatus==="placing"?{status:"placing"}:{},...y.placementStatus==="failed"?{status:"failed",error:y.placementError}:{}}))];return{mediaStatus:t.recording?{kind:"recording",label:r.recording}:t.annotating?{kind:"annotating",label:r.annotating}:void 0,...i?{settingsPane:i}:{},...l?{annotationNotice:l}:{},labels:r,attachments:P,...s?{placeholder:t.dictation?"":s.idle}:{},state:{captureRevision:t.captureAccepted,capturePending:t.capturePending,captureDisabled:!v.capture||t.captureDisabled,...t.captureDisabled?{captureTooltip:r.captureLimit}:{},captureMode:t.evidence?.annotation?"fullscreen":t.captureMode,captureModesAvailable:!!v.captureModes&&!t.evidence?.annotation,annotationActive:t.annotating,tool:t.tool,toolUsed:t.toolUsed,annotationDisabled:!v.annotate,recording:t.recording&&!I?.discarding,recordingDisabled:!!I?.discarding||!t.recording&&(!v.record||S),...S&&!t.recording?{recordingTooltip:r.clipLimit}:{},recordingTime:V(I?$e(I,a.now):0),dictating:!!t.dictation,dictationPending:t.speech.pending||t.dictation?.status==="transcribing",dictationDisabled:!B&&!t.dictation&&!m.mic,...t.speech.error&&r.speechError?{dictationTooltip:r.speechError(t.speech.error)}:{},dictationTime:t.dictation?V(a.now-t.dictation.startedAt):V(0),inputLevels:t.speech.levels,...Object.keys(m).length?{alerts:m}:{}},...e.actions,...t.fileAttachmentsEnabled===!1?{onEdit:void 0}:{},onAlert:k,beforeSubmit:e.beforeSubmit}}const Se=()=>globalThis.electronAPI,Jn=["image/png","image/jpeg","image/webp"],Ne=e=>Jn.includes(e??"")?e:null;function He(e){const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a+=1)n[a]=t.charCodeAt(a);return n}async function es(e,t){const{view:n,items:a,previews:r}=t,s=n.tiles.find(({image:c})=>c.id===e||c.contextItemId===e);if(s){const c=a.find(p=>p.id===s.image.contextItemId),d=s.image.media;if(s.image.mediaError)return null;if(d?.saved){if(!t.createSavedPreviewUrl||!t.revokeUrl)return null;const p={...d,saved:d.saved},m=await t.createSavedPreviewUrl(t.workspaceId,p);try{const w=await t.fetchBytes(m),f=p.saved.crop;return{kind:"image",name:c?.label||"screenshot.png",mimeType:"image/png",bytes:w,intent:{pixels:{mimeType:"image/png",width:Math.max(1,Math.round(f?.w??p.source.width)),height:Math.max(1,Math.round(f?.h??p.source.height)),displayScale:s.image.displayScale,capturedAt:s.image.capturedAt},raw:w,marks:[]}}}finally{t.revokeUrl(m)}}const u=Ne(c?.imageMimeType),g=r[s.image.id];return!c?.imageData||!u||!g?null:{kind:"image",name:c.label||"screenshot.png",mimeType:"image/png",bytes:await t.fetchBytes(g),intent:{pixels:{mimeType:u,width:s.image.width,height:s.image.height,displayScale:s.image.displayScale,capturedAt:s.image.capturedAt,...s.image.hash?{hash:s.image.hash}:{}},raw:He(c.imageData),marks:s.marks.map(({mark:p})=>({tool:p.tool,geometry:p.geometry,bounds:p.bounds,element:p.element}))}}}const o=n.clips.find(c=>c.id===e||c.contextItemId===e);if(o){const c=o.status==="ready"?ge(t.workspaceId,o.path):null;if(!c)return null;const d=a.find(g=>g.id===o.contextItemId),u=await t.fetchBytes(c);if(!Qn(u))throw new Error("Not a recording file");return{kind:"clip",name:d?.label||`recording-${o.id.slice(0,8)}.mp4`,mimeType:d?.attachmentMimeType||"video/mp4",bytes:u,durationMs:o.durationMs,hasMicAudio:o.hasMicAudio}}const i=a.find(c=>c.id===e),l=Ne(i?.imageMimeType);return i?.imageData&&l?{kind:"image",name:i.label||"image",mimeType:l,bytes:He(i.imageData)}:null}async function Xn(e){const t=await fetch(e);if(!t.ok)throw new Error(`Media request failed (${t.status})`);const n=new Uint8Array(await t.arrayBuffer()),a=Number(t.headers.get("content-length")??Number.NaN);if(n.byteLength===0||Number.isFinite(a)&&a!==n.byteLength)throw new Error("Media response was incomplete");return n}function Qn(e){return e.byteLength>8&&String.fromCharCode(...e.subarray(4,8))==="ftyp"}async function ts(e){try{return(await Se()?.invoke(ve.CLIPBOARD_WRITE,e))?.ok===!0}catch{return!1}}async function Zn(){try{return await Se()?.invoke(ve.CLIPBOARD_READ,{})??null}catch{return null}}async function ns(e){try{const t=await Se()?.invoke(ve.MENU,{canCut:e});return t?.action==="copy"||t?.action==="cut"?t.action:null}catch{return null}}const Fe=new WeakSet;async function ea(e,t){const[n]=e;if(e.length!==1||!n||n.size!==t.size)return!1;try{const a=await crypto.subtle.digest("SHA-256",await n.arrayBuffer());return Array.from(new Uint8Array(a),s=>s.toString(16).padStart(2,"0")).join("")===t.sha256}catch{return!1}}function as(e,{onIntentMedia:t,isCurrent:n,read:a=Zn}){const r=e.clipboardData;if(Fe.has(e)||!r||r.files.length===0)return!1;const s=e.target,o=Array.from(r.files),i=r.types.filter(l=>l!=="Files").map(l=>[l,r.getData(l)]);return e.preventDefault(),e.stopImmediatePropagation(),a().catch(()=>null).then(async l=>{if(!n())return;if(l&&await ea(o,l)){n()&&t(l);return}if(!n()||!(s instanceof Node)||!s.isConnected)return;const c=new DataTransfer;for(const u of o)c.items.add(u);for(const[u,g]of i)c.setData(u,g);const d=new ClipboardEvent("paste",{clipboardData:c,bubbles:!0,cancelable:!0});Fe.add(d),s.dispatchEvent(d)}),!0}function ta(e){const t=atob(e),n=new Uint8Array(t.length);for(let a=0;a<t.length;a++)n[a]=t.charCodeAt(a);return n}function na(e){let t="";for(let a=0;a<e.length;a+=32768)t+=String.fromCharCode(...e.subarray(a,a+32768));return btoa(t)}function dt(e){let t=0;return e.endsWith("==")?t=2:e.endsWith("=")&&(t=1),Math.floor(e.length*3/4)-t}async function aa(e){const t=await crypto.subtle.digest("SHA-256",e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength));return Array.from(new Uint8Array(t)).map(n=>n.toString(16).padStart(2,"0")).join("")}const ut={placeAttachment:ot,beginAttachmentUpload:st,sendAttachmentUploadChunk:rt,commitAttachmentUpload:at,abortAttachmentUpload:nt,getAttachmentInfo:he,mintIdempotencyKey:se};async function Ae(e,t,n,a=ut){const{idempotencyKey:r}=n,s={...r!==void 0?{idempotencyKey:r}:{},...n.rawScreenshot!==void 0?{rawScreenshot:n.rawScreenshot}:{}},o=async m=>hn(m,r)?Oe(e,r,a.getAttachmentInfo):void 0;if(dt(n.data)<=mn)try{return await a.placeAttachment(e,t,{data:n.data,mimeType:n.mimeType,...s})}catch(m){const w=await o(m);if(w)return w;throw m}const i=ta(n.data),l=await aa(i);let c,d;try{({uploadId:c,maxChunkBytes:d}=await a.beginAttachmentUpload(e,t,i.byteLength,l,{mimeType:n.mimeType,...s}))}catch(m){if(r!==void 0&&pn(m)){const w=await Oe(e,r,a.getAttachmentInfo);if(w)return w}throw m}const u=Math.min(gn,d),g=Math.ceil(i.byteLength/u);let p=!1;try{for(let m=0;m<g;m++){const w=i.subarray(m*u,(m+1)*u);await a.sendAttachmentUploadChunk(c,m,na(w),e)}return p=!0,await a.commitAttachmentUpload(c,e)}catch(m){const w=p?await o(m):void 0;if(w)return w;throw await a.abortAttachmentUpload(c,e).catch(()=>{}),m}}function ra(e,t){return yn(e,`image-${Date.now()}-${t+1}`)}class Me extends Error{constructor(n,a){super(n);Pe(this,"retryBlocks");this.name="ImagePlacementError",this.retryBlocks=a}}function sa(e,t){return e instanceof Me?e.retryBlocks:t}async function oa(e,t,n=ut,a=()=>!0){const r=l=>(...c)=>(le(a),l(...c));n={placeAttachment:r(n.placeAttachment),beginAttachmentUpload:r(n.beginAttachmentUpload),sendAttachmentUploadChunk:r(n.sendAttachmentUploadChunk),commitAttachmentUpload:r(n.commitAttachmentUpload),abortAttachmentUpload:r(n.abortAttachmentUpload),getAttachmentInfo:r(n.getAttachmentInfo),mintIdempotencyKey:r(n.mintIdempotencyKey)};const s=[],o=[],i=[];for(let l=0;l<t.length;l++){le(a);const c=t[l];if("attachmentId"in c&&c.attachmentId){const p={type:"image",attachmentId:c.attachmentId,...c.mimeType?{mimeType:c.mimeType}:{}};s.push(p),o.push(p);continue}const d=c,u=d.placementFileName??ra(d.mimeType,l),g=n.mintIdempotencyKey(d.placementIdempotencyKey);try{const p=await Ae(e,u,{data:d.data,mimeType:d.mimeType,...g!==void 0?{idempotencyKey:g}:{}},n),m={type:"image",attachmentId:p.attachmentId,...p.mimeType??d.mimeType?{mimeType:p.mimeType??d.mimeType}:{}};s.push(m),o.push(m)}catch(p){const m=fn(p);i.push(m?`${u} (${m})`:u),o.push(g!==void 0?{...d,placementIdempotencyKey:g,placementFileName:u}:d)}}if(i.length>0)throw new Me(h.chat_imagePlacement_failed_error({names:i.join(", ")}),o);return le(a),s}const rs=Object.freeze(Object.defineProperty({__proto__:null,ImagePlacementError:Me,base64DecodedBytes:dt,imageRetryBlocks:sa,placeImageAttachment:Ae,toImageReferenceBlocks:oa},Symbol.toStringTag,{value:"Module"}));function mt(){try{return kn()}catch{return null}}function ia(){return{backendId:M.state.connections.windowBackendId??null,generation:M.state.daemonHealth.connectionGeneration,transport:mt()}}class Ie extends Error{constructor(){super("dock-evidence-backend-changed")}}function N(e,t){return async(...n)=>{e();const a=await t(...n);return e(),a}}const K={current:e=>mt()===e.transport&&M.state.daemonHealth.connectionGeneration===e.generation&&(M.state.connections.windowBackendId??null)===e.backendId,capabilities:()=>_n(),placeImage:(e,t,n,a)=>Ae(e,t,n,{placeAttachment:N(a,ot),beginAttachmentUpload:N(a,st),sendAttachmentUploadChunk:N(a,rt),commitAttachmentUpload:N(a,at),abortAttachmentUpload:N(a,nt),getAttachmentInfo:N(a,he),mintIdempotencyKey:se}),lookup:(e,t)=>he({workspaceId:e,idempotencyKey:t}),mintKey:se};function Y(e){return K.current(e)}function ca(e,t){const n=M.state.dockConversation;return{generation:n.generation,authority:n.authority,clearRevision:R(n.drafts,Gt(e,t))?.clearRevision??0,binding:ia()}}function ss(e,t,n){const a=ca(e,t);return a.generation===n.generation&&a.authority===n.authority&&a.clearRevision===n.clearRevision&&Y(n.binding)}function pt(e,t){return()=>{if(!e.current(t))throw new Ie}}const ft=Object.freeze({rawRetention:!1,chiefAttachments:!1});function os(e){return e!==ft}const de=new Map;function ht(e,t=K){const n=`${e.backendId}:${e.generation}`;let a=de.get(n);if(!a){const r=pt(t,e);a=(async()=>{r();const o=await t.capabilities();r();const i=o?.server?.capabilities;if(!i||typeof i!="object")throw new Error("unobserved");return{rawRetention:i.rawScreenshotRetention===1,chiefAttachments:i.chiefAttachments===1}})().catch(()=>(de.delete(n),ft)),de.set(n,a)}return a}class ee extends Error{constructor(t){super(`dock-raw-retention-contract:${t}`),this.reason=t}}function gt(e){const{rpcCode:t,code:n}=e??{};return t===-32602||n==="INVALID_PARAMS"}function la(e){const t=String(e?.message??"");return gt(e)&&(t.includes("rawScreenshotExpired:")||/expired at .*not renewable/i.test(t))}function da(e,t,n){const a=e.rawScreenshot;if(!a||a.compositeAttachmentId!==t)return null;const r=Date.parse(a.expiresAt);return Number.isFinite(r)?a.expired||r<=n?"expired":{attachmentId:e.attachmentId,expiresAt:a.expiresAt}:null}function Ke(e){return{ok:!0,path:e.path,fileName:e.fileName,size:e.size,attachmentId:e.attachmentId,...e.mimeType?{mimeType:e.mimeType}:{},uploadedAt:e.uploadedAt,replayed:!0,...e.rawScreenshot?{rawScreenshot:e.rawScreenshot}:{}}}class ua extends Error{constructor(t,n){super("dock-evidence-placement-failed"),this.imageId=t,this.failure=n}}const We=e=>e.split("/")[1]?.replace("jpeg","jpg")||"png";async function ma(e){const t=e.api??K,n=e.now??Date.now,a=pt(t,e.binding);a();const r=await ht(e.binding,t);a();const s=r.rawRetention&&(e.workspaceId!==be||r.chiefAttachments),o=[];for(const i of e.images){const l=e.records[i.image.id];let c=l&&l.signature===i.signature&&l.workspaceId===e.workspaceId&&l.backendId===e.binding.backendId?l:{imageId:i.image.id,signature:i.signature,workspaceId:e.workspaceId,backendId:e.binding.backendId,compositeKey:null,rawKey:null,composite:null,raw:null,rawSettled:!1};const d=u=>{c=u,e.onRecord(u)};try{if(!c.composite){const g=c.compositeKey,p=t.mintKey(g??void 0)??null;p!==c.compositeKey&&d({...c,compositeKey:p});let m;g&&p===g&&(a(),m=await t.lookup(e.workspaceId,p).then(Ke).catch(()=>{}),a()),m||(a(),m=await t.placeImage(e.workspaceId,`screenshot-${i.image.id.slice(0,8)}.${We(i.composite.mimeType)}`,{data:i.composite.base64,mimeType:i.composite.mimeType,...p?{idempotencyKey:p}:{}},a),a()),d({...c,composite:{attachmentId:m.attachmentId,mimeType:m.mimeType??i.composite.mimeType}})}const u=c.composite.attachmentId;if(s&&i.raw&&!c.raw&&!c.rawSettled){const g=c.rawKey,p=t.mintKey(g??void 0);if(p){p!==c.rawKey&&d({...c,rawKey:p});let m;g&&p===g&&(a(),m=await t.lookup(e.workspaceId,p).then(Ke).catch(()=>{}),a());try{m||(a(),m=await t.placeImage(e.workspaceId,`screenshot-${i.image.id.slice(0,8)}-original.${We(i.raw.mimeType)}`,{data:i.raw.base64,mimeType:i.raw.mimeType,idempotencyKey:p,rawScreenshot:{compositeAttachmentId:u}},a),a());const w=da(m,u,n());if(w==="expired")d({...c,rawSettled:!0});else if(w)d({...c,raw:w});else throw new ee("echo")}catch(w){if(la(w))d({...c,rawSettled:!0});else throw w instanceof ee?w:gt(w)?new ee("refused"):w}}else throw new ee("unkeyed")}}catch(u){throw u instanceof Ie?u:new ua(i.image.id,u)}o.push(c)}return o}async function is(e,t,n,a){const r=()=>{if(!K.current(a))throw new Ie};r();const s=await K.placeImage(e,t,{...n,idempotencyKey:K.mintKey()},r);return r(),s}const pa=new Set(["invalid-saved-edit","media-send-retired","transcript-unavailable","transcript-pending","invalid-edit","stale-source","legacy-baked-marks","timing-unavailable","audio-unavailable","media-source-unavailable","media-export-unavailable","media-animation-layer-limit","media-export-failed","legacy-original-unavailable","capture-render-unavailable","capture-blur-unavailable","stale-source-pixels","not-a-screenshot","not-admitted","unavailable","dock-evidence-missing-pixels","draft-restore-failed","image-budget-exceeded"]),fa=new Set(["unavailable","permission","failed","busy","cancelled","limit"]);class L extends Error{constructor(t,n){super(n),this.stage=t,this.code=n,this.name="DockSendError"}}function oe(e){const t=e instanceof Error?e.message:typeof e=="string"?e:"";if(t.length>64)return"unclassified";const[n,...a]=t.split(":");return!pa.has(n)||a.length>2?"unclassified":n!=="media-export-failed"?a.length?"unclassified":n:[n,...a.map(r=>fa.has(r)?r:"other")].join(":")}function cs(e,t){return e instanceof L?{stage:e.stage,code:oe(e.code)}:{stage:t,code:oe(e)}}function W(e){if(!e||e.source.kind!=="recording")return!1;const t=e.source,n=e.saved??re(t,t.capturedMarks??[],e.transcript);if(n.video!=="full"||n.voice!=="audio"||n.crop||n.blurRegions.length||n.blurStrokes?.length)return!1;const a=_e(n,t,e.transcript);return t.visuals==="clean"?!a.errors.length&&!a.muted&&n.cuts.length===0&&!n.marks.some(r=>r.included)&&a.marks.length===0&&a.transcript===null&&a.kept.length===1&&a.kept[0].startMs===0&&a.kept[0].endMs===t.durationMs&&a.clips.length===1&&a.clips[0].startMs===0&&a.clips[0].endMs===t.durationMs:!a.errors.length&&!a.muted&&a.clips.length===1&&a.clips[0].startMs===0&&a.clips[0].endMs>=t.durationMs}async function ha(e,t,n,a,r,s){const o={images:{},files:[],frames:[],framePromptBytes:[],metadata:[]};let i="validate";try{const l=()=>{if(!r()||!Y(n))throw new Error("media-send-retired")};for(const c of[...t.images,...t.clips]){if(i="validate",s?.stage(i),c.mediaError)throw new Error("invalid-saved-edit");if(!c.media||W(c.media))continue;l();const d=structuredClone(c.media),u=d.source;let g=d.saved??re(u,u.capturedMarks??[],d.transcript),p=crypto.randomUUID();try{if(u.kind==="recording"&&g.voice==="transcript"&&d.transcript?.status!=="ready"){if(i="transcribe",s?.stage(i),!a?.transcribeMedia)throw new Error("transcript-unavailable");const f=await a.transcribeMedia({jobId:p,media:d});if(l(),!f.ok)throw new Error("transcript-unavailable");d.transcript=f.value,d.saved||(g=re(u,u.capturedMarks??[],d.transcript))}i="plan",s?.stage(i);const m=_e(g,u,d.transcript);if(m.errors.length)throw new Error(m.errors[0]);const w={id:c.id,kind:u.kind,video:g.video,voice:g.voice,transcript:m.transcript,batches:u.batches,marks:m.marks.map(({n:f,mark:k,frameAtMs:_})=>({n:f,id:k.id,at_ms:_,kind:k.kind,label:k.label,note:k.note,context:k.context,geometry:k.geometry}))};if(u.kind==="screenshot"){i="screenshot-source",s?.stage(i);const f=u.path.split("/").map(encodeURIComponent).join("/"),k=tt(`intent://local/file/${f}`,e);if(!k||k.kind!=="image")throw new Error("media-source-unavailable");const _=await Xn(k.url);l();const I={base64:Ze(_.buffer.slice(_.byteOffset,_.byteOffset+_.byteLength)),mimeType:/\.jpe?g$/i.test(u.path)?"image/jpeg":/\.webp$/i.test(u.path)?"image/webp":"image/png"};i="screenshot-render",s?.stage(i),o.images[c.id]=await an(u,g,I),l()}else{if(!m.clips.length){w.video_attachment_id=null,w.frames=[],w.kept_ms=[],o.metadata.push(w);continue}const f={...d,saved:g};let k=await a?.takePreparedRecording?.(f);if(k&&(p=k.jobId),l(),!k){if(!a)throw new Error("media-export-unavailable");k=await lt(f,p,a,()=>r()&&Y(n),S=>{i=S,s?.stage(S),S==="export"&&s?.exportAttempt(p)})}p=k.jobId,i="placement",s?.stage(i);const _=[k.value.video,...k.value.frames],I=[];for(let S=0;S<_.length;S++){l();const v=_[S],B=`capture-${c.id.slice(0,12)}-${S}.${S===0?"mp4":v.mimeType==="image/jpeg"?"jpg":"png"}`,E=await wn(e,B,{sourcePath:v.sourcePath,mimeType:v.mimeType,idempotencyKey:se()},void 0,void 0,()=>r()&&Y(n));l(),S===0?o.files.push({type:"file",attachmentId:E.attachmentId,fileName:B,mimeType:E.mimeType??v.mimeType,size:E.size}):(o.frames.push({type:"image",attachmentId:E.attachmentId,mimeType:v.mimeType==="image/jpeg"?"image/jpeg":"image/png"}),o.framePromptBytes.push(zn(v))),I.push(E.attachmentId)}w.video_attachment_id=I[0],w.frames=k.value.frames.map((S,v)=>({mark_id:S.markId,attachment_id:I[v+1]})),w.kept_ms=m.clips}o.metadata.push(w)}finally{s?.stage("release"),await a?.releaseMediaJob?.(p).catch(()=>{})}}return o}catch(l){throw l instanceof L?l:new L(i,oe(l))}}const ue=1568,ga=.85;async function ya(e,t){const n=Math.round(e.length*3/4/1024),a=await wa(e,t),{width:r,height:s}=a,o=r>ue||s>ue;let i=r,l=s;if(o){const f=ue/Math.max(r,s);i=Math.round(r*f),l=Math.round(s*f)}const c=new OffscreenCanvas(i,l),d=c.getContext("2d");if(!d)throw new Error("Failed to get 2D canvas context for image resize");d.drawImage(a,0,0,i,l);let u=t;ba(d,i,l)||(u="image/jpeg");const g=await c.convertToBlob({type:u,quality:u==="image/jpeg"?ga:void 0}),p=g.type||u,m=await ka(g),w=Math.round(m.length*3/4/1024);return console.debug(`[image-resize] ${r}×${s} → ${i}×${l} | ${t} → ${p} | ${n} KB → ${w} KB`),{base64:m,mimeType:p}}async function wa(e,t){const n=atob(e),a=new Uint8Array(n.length);for(let s=0;s<n.length;s++)a[s]=n.charCodeAt(s);const r=new Blob([a],{type:t});return createImageBitmap(r)}function ba(e,t,n){const r=e.getImageData(0,0,t,n).data;for(let s=3;s<r.length;s+=4)if(r[s]<255)return!0;return!1}async function ka(e){const t=await e.arrayBuffer(),n=new Uint8Array(t);let a="";for(let r=0;r<n.length;r++)a+=String.fromCharCode(n[r]);return btoa(a)}const T={...Le,badge:Le.badgeRadius*2};function _a(e,t,n=1,a=0){const r=Math.max(1,e.displayScale)*n,s=[],o=i=>i*n;for(const{n:i,mark:l}of t){const c=l.geometry;if(c.kind==="rect")s.push({kind:"rect",x:o(c.x),y:o(c.y),w:o(c.w),h:o(c.h),width:T.stroke*r});else if(c.kind==="path")s.push({kind:"path",points:c.points.map(m=>({x:o(m.x),y:o(m.y)})),width:T.pen*r});else{const m={x:o(c.from.x),y:o(c.from.y)},w={x:o(c.to.x),y:o(c.to.y)};s.push({kind:"arrow",from:m,to:w,head:Ia(m,w,T.arrowHead*r),width:T.stroke*r})}if(!T.showNumbers)continue;const d=Math.max(a,T.badge/2*r),u=o(l.bounds.x+l.bounds.w),g=o(l.bounds.y),p=tn({x:o(l.bounds.x),y:g,w:u-o(l.bounds.x),h:o(l.bounds.h)},{x:0,y:0,w:o(e.width),h:o(e.height)},r,d);s.push({kind:"badge",...p,radius:d,label:String(i),font:d*T.badgeTextScale})}return s}function va(e,t){"letterSpacing"in e&&(e.letterSpacing="0px"),"wordSpacing"in e&&(e.wordSpacing="0px");const n=(a,r,s)=>{e.strokeStyle=T.halo,e.lineWidth=a+T.haloWidth*r,s(),e.strokeStyle=T.accent,e.lineWidth=a,s()};e.strokeStyle=T.accent,e.lineCap="round",e.lineJoin="round";for(const a of t)if(a.kind==="rect")n(a.width,a.width/T.stroke,()=>e.strokeRect(a.x,a.y,a.w,a.h));else if(a.kind==="path"||a.kind==="arrow"){e.lineWidth=a.width,e.beginPath();const r=a.kind==="path"?a.points:[a.from,a.to];a.kind==="arrow"&&r.forEach((o,i)=>i?e.lineTo(o.x,o.y):e.moveTo(o.x,o.y)),a.kind==="arrow"&&(e.moveTo(a.head.left.x,a.head.left.y),e.lineTo(a.to.x,a.to.y),e.lineTo(a.head.right.x,a.head.right.y));const s=a.kind==="path"?new Path2D(en(a.points)):null;n(a.width,a.width/(a.kind==="path"?T.pen:T.stroke),()=>s?e.stroke(s):e.stroke())}else e.fillStyle=T.paper,e.beginPath(),e.arc(a.x,a.y,a.radius,0,Math.PI*2),e.closePath(),e.fill(),e.strokeStyle=T.accent,e.lineWidth=T.badgeOutline*a.radius/T.badgeRadius,e.stroke(),e.fillStyle=T.ink,e.font=`600 ${a.font}px ${T.badgeFontFamily}`,e.textAlign="center",e.textBaseline="middle",e.fillText(a.label,a.x,a.y)}async function Sa(e,t){const n=Uint8Array.from(atob(e),a=>a.charCodeAt(0));return createImageBitmap(new Blob([n],{type:t}))}async function Aa(e){const t=await e.convertToBlob({type:"image/png"});return Ze(await t.arrayBuffer())}async function yt(e,t,n,a,r=0){await rn();const s=await Sa(e.base64,e.mimeType);try{const o=Math.min(1,a/Math.max(t.width,t.height)),i=new OffscreenCanvas(Math.max(1,Math.round(t.width*o)),Math.max(1,Math.round(t.height*o))),l=i.getContext("2d");if(!l)throw new Error("dock-evidence-canvas-unavailable");return l.drawImage(s,0,0,i.width,i.height),va(l,_a(t,n,o,r)),i}finally{s.close()}}async function Ma(e,t,n){const a=await yt(e,t,n,Math.max(t.width,t.height));return ya(await Aa(a),"image/png")}async function ls(e,t,n,a=384){const r=await yt(e,t,n,a,a/32);return URL.createObjectURL(await r.convertToBlob({type:"image/png"}))}function Ia(e,t,n=T.arrowHead){const a=Math.atan2(t.y-e.y,t.x-e.x),r=T.arrowSpread;return{left:{x:t.x-n*Math.cos(a-r),y:t.y-n*Math.sin(a-r)},right:{x:t.x-n*Math.cos(a+r),y:t.y-n*Math.sin(a+r)}}}function ds(e,t){const n=Yt(t??void 0),a=new Set(t?.clips.filter(r=>!!r.media&&!W(r.media)).map(r=>r.contextItemId));return e.filter(r=>!n.has(r.id)&&!a.has(r.id))}async function us({workspaceId:e,agentId:t,evidence:n,clickedItems:a,sendItems:r,clickedPayload:s,binding:o,service:i,current:l,onRecord:c,timing:d}){const u=()=>{if(!l()||!Y(o))throw new L("validate","media-send-retired")};if(u(),n?.images.some(b=>b.mediaError)||n?.clips.some(b=>b.mediaError))throw new L("validate","invalid-saved-edit");const g=b=>!!b.media&&!W(b.media),p=n?{workspaceId:e,agentId:t,appUrl:`intent://local/workspace/${encodeURIComponent(e)}`,clipAttachmentIds:Object.fromEntries(n.clips.map(b=>[b.id,a.find(A=>A.id===b.contextItemId)?.attachmentId??null]))}:null;for(const b of n?.clips??[]){if(!b.media||!W(b.media))continue;const A=a.find(Q=>Q.id===b.contextItemId);if(!A||A.attachmentId!==b.media.source.attachmentId||A.path!==b.media.source.path||A.placementStatus!==void 0&&A.placementStatus!=="placed")throw new L("validate","legacy-original-unavailable")}const m=n?await ha(e,n,o,i,l,d):{images:{},files:[],frames:[],framePromptBytes:[],metadata:[]},w=new Set(n?.clips.filter(b=>g(b)||!!b.media&&W(b.media)).map(b=>b.id)),f=new Set(n?.clips.filter(b=>w.has(b.id)).flatMap(b=>(b.captureHistory??[]).map(A=>A.image.id))),k=(n?.images??[]).filter(b=>b.source!=="annotate"||!!b.media||!f.has(b.id)||n.marks.some(A=>A.imageId===b.id&&!(A.clipId&&w.has(A.clipId))));d?.stage("burn");let _=[];try{_=n?await Ta({...n,images:k},a,m.images):[]}catch(b){throw new L("burn",oe(b))}if(m.framePromptBytes.reduce((b,A)=>b+(A??0),0)>qn)throw new L("validate","image-budget-exceeded");const S=new Set(n?.images.filter(b=>b.media).map(b=>b.id)),v=n?{...n,images:k.map(b=>m.images[b.id]?{...b,width:m.images[b.id].width,height:m.images[b.id].height}:b),clips:n.clips.filter(b=>!g(b)),marks:n.marks.filter(b=>!S.has(b.imageId)&&!n.clips.some(A=>g(A)&&A.id===b.clipId))}:null;u();const B=m.metadata.some(b=>typeof b.transcript=="string"&&b.transcript.trim());if(!s.text.trim()&&!r.length&&!s.workspaceContextStr?.trim()&&!_.length&&!m.files.length&&!m.frames.length&&!s.imageBlocks?.length&&!s.fileBlocks?.length&&!B)return null;let E=_,P=null;d?.stage("placement");const xe=n?await ht(o):null;if(u(),n&&(e!==be||xe?.chiefAttachments)){const b=await ma({workspaceId:e,binding:o,images:k.map((A,Q)=>{const Z=a.find(Dt=>Dt.id===A.contextItemId);return{image:A,signature:Jt(n,A.id),composite:{base64:_[Q].data,mimeType:_[Q].mimeType},raw:!A.media&&Z?.imageData&&Z.imageMimeType?{base64:Z.imageData,mimeType:Z.imageMimeType}:null}}),records:n?.placements??{},onRecord:c});u(),E=b.map(A=>({type:"image",attachmentId:A.composite.attachmentId,mimeType:A.composite.mimeType})),P=Object.fromEntries(b.map(A=>[A.imageId,{attachmentId:A.composite.attachmentId,raw:A.raw}]))}const y=new Map(n?Qe(n).map(({n:b,mark:A})=>[A.id,b]):[]),D=p&&P?{...p,imageAttachments:P,markNumbers:y}:p&&{...p,markNumbers:y},$=n&&D?{...s,imageBlocks:[...E,...m.frames,...s.imageBlocks??[]],fileBlocks:[...s.fileBlocks??[],...m.files],workspaceContextStr:[Qt(v,D),m.metadata.length?`[Edited capture outputs]
3
3
  ${JSON.stringify(m.metadata)}`:"",s.workspaceContextStr].filter(Boolean).join(`
4
4
 
5
5
  `),messageMetadata:{...s.messageMetadata,...Xt(v,D),edited_captures:m.metadata}}:s;return u(),$}async function Ta(e,t,n={}){const a=Qe(e);return Promise.all(e.images.map(async r=>{if(n[r.id])return{type:"image",...n[r.id]};const s=t.find(i=>i.id===r.contextItemId);if(!s?.imageData||!s.imageMimeType)throw new Error("dock-evidence-missing-pixels");const o=await Ma({base64:s.imageData,mimeType:s.imageMimeType},r,a.filter(({mark:i})=>i.imageId===r.id));return{type:"image",data:o.base64,mimeType:o.mimeType}}))}function Ca(){return et()}function ms(e){const{clip:t}=e;if(t.status!=="ready"||!t.path)return null;const n=e.marks.filter(s=>s.clipId===t.id&&typeof s.clipMs=="number").sort((s,o)=>s.clipMs-o.clipMs).map(s=>({id:s.id,tool:s.tool,atMs:s.clipMs,...s.element?.name?{label:s.element.name.slice(0,200)}:{}})),a=Zt(e.evidence??void 0,t.id),r=a?t.media:void 0;return{kind:"recording",workspaceId:e.workspaceId,agentId:e.agentId,attachmentId:a?.attachmentId??t.id,sourceRevision:a?`${a.id}:${a.revision}`:t.path,attachmentPath:t.path,title:"",durationMs:t.durationMs,marks:n,provenance:a?{...a.audio==="unknown"?{}:{hasMicAudio:a.audio==="available"},visuals:a.visuals}:{hasMicAudio:t.hasMicAudio,visuals:n.length>0?"baked-marks":"clean"},...a&&r?{source:a,saved:r.saved??null,transcript:r.transcript??null}:{}}}async function ps(e){if(!Ca())return{ok:!1,error:"unavailable"};try{return await on().invoke(sn.OPEN,e)??{ok:!1,error:"unavailable"}}catch{return{ok:!1,error:"transport"}}}function fs(e){let t=null,n=null;const a=i=>e.releaseMediaJob?.(i).catch(()=>{});function r(){const i=t;t=null,!(!i||i.taken||i.stopped)&&(i.stopped=!0,clearTimeout(i.timer),a(i.id))}function s(i,l,c){if(t?.key===i||n===i||(r(),n=null,!e.adoptMediaJob||!e.exportMedia||!c()||W(l)))return;const d=structuredClone(l),u=d.saved??re(d.source,d.source.capturedMarks??[],d.transcript),g=_e(u,d.source,d.transcript);if(d.source.kind!=="recording"||d.source.visuals!=="clean"||g.errors.length||!g.clips.length||u.voice==="transcript"&&d.transcript?.status!=="ready")return;const p={...d,saved:u},m=crypto.randomUUID(),w={key:i,mediaKey:JSON.stringify(p),id:m,current:c,taken:!1,stopped:!1,settled:!1,failed:!1,timer:setTimeout(()=>{t===w&&(n=i,r())},3e4),result:Promise.resolve({error:new Error("not-started")})};t=w,w.result=lt(p,m,e,()=>!w.stopped&&w.current()).then(async f=>w.stopped||!w.current()?(await a(m),{error:new Error("media-send-retired")}):{value:f},async f=>(w.failed=!0,t===w&&(n=i),await a(m),{error:f})).finally(()=>{w.settled=!0})}async function o(i,l,c){const d=t;if(!d||d.key!==i||d.mediaKey!==JSON.stringify(l)||d.stopped||d.taken||!c())return null;if(d.failed&&d.settled)return r(),null;d.taken=!0,d.current=c,clearTimeout(d.timer),t=null;const u=await d.result;if("error"in u)throw u.error;try{if(!c())throw new Error("media-send-retired");const g=await e.adoptMediaJob?.(d.id);if(!c())throw new Error("media-send-retired");return!g?.ok||!g.value?(await a(d.id),null):u.value}catch(g){throw await a(d.id),g}}return{warm:s,take:o,cancel:r}}function hs(e={}){const t=a=>cn(a,typeof e=="function"?e():e),n=a=>vn(t(a));return{actionHints:{get capture(){return{label:h.dock_composer_screenshotAction_label(),shortcut:t("dock.capture")}},get record(){return{label:h.ui_shortcuts_dockRecord_label(),shortcut:t("dock.record")}},get dictate(){return{label:h.dock_shortcut_dictate_label()}}},get capture(){return h.dock_composer_capture_tooltip({shortcut:n("dock.capture")})},captureMode:{get window(){return h.dock_composer_captureWindow_tooltip({shortcut:n("dock.capture")})},get region(){return h.dock_composer_captureRegion_tooltip({shortcut:n("dock.capture")})}},captureModes:{fullscreen:h.dock_composer_captureFullscreen_label(),window:h.dock_composer_captureWindow_label(),region:h.dock_composer_captureRegion_label()},captureOptions:h.dock_composer_captureModes_ariaLabel(),captureLimit:h.dock_composer_captureLimit_tooltip(),clipLimit:h.dock_composer_clipLimit_tooltip({limit:H(ae.clips)}),get record(){return h.dock_composer_record_tooltip({shortcut:n("dock.record")})},stopRecording:h.dock_composer_stopRecording_tooltip(),annotationTools:h.annotation_toolbar_ariaLabel(),annotateCurrent:a=>h.dock_composer_annotate_ariaLabel({tool:a}),tools:{pick:h.dock_composer_pick_label(),box:h.dock_composer_box_label(),pen:h.dock_composer_pen_label(),arrow:h.annotation_arrow_label()},get dictate(){return h.dock_shortcut_dictate_label()},stopDictating:h.dock_composer_stopDictating_tooltip(),annotating:h.dock_composer_annotating_status(),recording:h.dock_composer_recording_status(),markUp:h.dock_composer_markUp_label(),remove:h.chat_contextChip_remove_label(),play:h.dock_composer_play_label(),edit:h.dock_composer_edit_label(),done:h.dock_composer_done_label(),attachments:h.context_attachments_title_label(),retry:h.chat_shared_retry_label(),attachmentPending:h.dock_composer_attachmentPending_status(),attachmentFailed:h.dock_composer_attachmentFailed_error(),image:a=>h.dock_composer_image_ariaLabel({n:H(a)}),clip:a=>h.dock_composer_clip_ariaLabel({duration:a}),recordingReference:(a,r)=>r?h.dock_composer_recordingEnd_chip({n:H(a)}):h.dock_composer_recordingStart_chip({n:H(a)}),speechError:a=>a.includes("permission")?h.dock_composer_speechPermission_error():["unsupported-platform","helper-missing","recognizer-unavailable","locale-unsupported","assets-unavailable","unavailable"].includes(a)?h.dock_composer_speechUnavailable_error():h.dock_composer_speechFailed_error()}}function gs(e,t){return{enabled:e,limit:ae.files,excludedIds:t,unavailableMessage:h.dock_composer_filesUnavailable_error(),limitMessage:h.dock_composer_fileLimit_error({limit:H(ae.files)})}}function Ea(e){try{return new URL(e.pageUrl).hostname||e.pageUrl}catch{return e.pageUrl}}function ys(e,t){return e.targetAgentId===t}function ws(e){const t=e.element,n=e.viewport,a=Ea(e),r=t?`<${t.tagName.toLowerCase()}> · ${a}`:e.title||a,s=["<browser-element-capture>",`Page URL: ${e.pageUrl}`,`Page title: ${e.title}`,...t?[`DOM path: ${t.domPath}`,`CSS selector: ${t.selector}`,`Text snippet: ${t.textSnippet}`,...t.sourceRef?[`Source ref: ${t.sourceRef}`]:[],...n?[`Viewport: ${n.width}×${n.height}`]:[],`Element bounds: ${t.rect.width}×${t.rect.height} at (${t.rect.x}, ${t.rect.y})`]:[],"</browser-element-capture>"].join(`
@@ -8,5 +8,5 @@ ${JSON.stringify(m.metadata)}`:"",s.workspaceContextStr].filter(Boolean).join(`
8
8
  \`\`\`
9
9
  ${o}
10
10
  \`\`\`]`)}return Da(a.join(`
11
- `),e)}function bs(e,t,n){if(e==="suggested-prompt")return{fields:{},hasAttachments:!1,cleanup:{clearInput:!1,followBottom:!0,historyText:null}};const a=n(),{imageBlocks:r,fileBlocks:s}=Ra(a.contextItems);return{fields:{contextItems:a.contextItems,workspaceContextStr:xa(a.contextItems,a.checkedPanels,a.checkedSelections),noteIds:a.noteIds,...r.length>0?{imageBlocks:r}:{},...s.length>0?{fileBlocks:s}:{},...a.pickedMentions?{messageMetadata:a.pickedMentions}:{}},hasAttachments:r.length>0||s.length>0,cleanup:{clearInput:!0,followBottom:!0,historyText:t}}}function ks(e){switch(e.kind){case"tooLong":return h.chat_goal_tooLong_error({max:H(Tn)});case"attachments":return h.chat_goal_attachments_error();case"retired":return h.chat_goal_retired_error();case"workspaceRetired":return h.chat_goal_workspaceRetired_error();case"invalid":case"failed":return h.chat_goal_failed_error()}}const Pa="chat-read:",q=new Map,ye=new Set;function _s(e,t){let n=q.get(e);n||(n=new Set,q.set(e,n)),n.add(t)}function vs(e,t){const n=q.get(e);if(!(!n||!n.delete(t))&&n.size===0){q.delete(e);for(const a of[...ye])a(e)}}function Ss(e){return ye.add(e),()=>ye.delete(e)}function As(e){return q.has(e)}function Ms(e){const t=q.get(e);if(!t)return!1;for(const n of t)if(!n.startsWith(Pa))return!0;return!1}function Ba(e,t,n){const a=e.state.pendingSubmissions.byAgentId[t.agentId];if(!a||!Ge(a.scope,t))return null;const r={...structuredClone(n),id:crypto.randomUUID(),createdAt:Date.now()};e.dispatch(Bt(t,r));const s=e.state.pendingSubmissions.byAgentId[t.agentId];return s&&R(s.submissions,r.id)?r:null}function La(e,t,n,a,r){const s=Be.select(e.state,n),o=pe.select(e.state)?.principal.id,i=Ue(e.state);if(!s||!o||!i)return null;const l=Cn(t,n),c={agentId:t,workspaceId:n,principalId:o,participation:s,authority:i,owner:l.key,lifetime:e.state.pendingSubmissions.byAgentId[t]?.scope.lifetime??crypto.randomUUID()},d=()=>l.isCurrent(e.state.agentSessions?.byAgentId[t]?.workspaceId)&&Be.select(e.state,n)===s&&pe.select(e.state)?.principal.id===o&&Ue(e.state)===i;if(!d())return null;e.dispatch(Pt(c,a,Wt.select(e.state,n)));const u=Ba(e,c,r);return u?{scope:c,submission:u,isCurrent:()=>{const g=e.state.pendingSubmissions.byAgentId[t];return d()&&!!g&&Ge(g.scope,c)&&(!!R(g.operations,u.id)||!!R(g.submissions,u.id))}}:null}function we(e,t,n){if(!n.text.trim()&&!n.imageBlocks?.length&&!n.fileBlocks?.length)return null;const a=n.userAppMessageId??En();return La(e,t,n.wsId,pe.select(e.state)?.capabilities.submissionCorrelation,{content:n.text.trim(),appMessageId:a,destination:!n.forceSubmit&&qt.select(e.state,t)?"queue":"conversation",contextItems:n.contextItems,imageBlocks:n.imageBlocks,fileBlocks:n.fileBlocks,messageMetadata:n.messageMetadata})}function Oa(e,t,n){const a=we(e,t,n);return a?(e.dispatch(Ye(t,{...n,userAppMessageId:a.submission.appMessageId,submission:{scope:a.scope,id:a.submission.id}})),!0):!1}async function Ua(e,t,n,a){const r=n.submission;if(!r)return"legacy";const s=r.reference,o=()=>s.scope.agentId===e&&s.scope.workspaceId===t&&Xe.select(M.state,e)===n?bn.select(M.state,s.scope):void 0,i=o();if(!i)return null;if(!i.supported)return"legacy";const l={wsId:t,text:n.text,imageBlocks:n.options?.imageBlocks,fileBlocks:n.options?.fileBlocks,noteIds:n.options?.noteIds,messageMetadata:n.options?.messageMetadata,model:a??n.options?.model};if(r.outcome==="rejected"){const p=R(i.tombstones,s.id);return R(i.submissions,s.id)||p&&p.reason!=="rejected"?null:we(M,e,l)}if(r.outcome==="accepted")return we(M,e,l);await Promise.all([Dn(e,t).catch(()=>{}),Rn(e,t).catch(()=>{})]);const c=o();if(!c||R(c.submissions,s.id)?.status!=="uncertain")return null;const{notify:d}=await fe(async()=>{const{notify:p}=await import("./CI0C7_h-.js").then(m=>m.i);return{notify:p}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37]),import.meta.url);if(o()!==c)return null;let u=!1;const g=()=>{u=!0};return d.warning(h.agent_chatSend_uncertainRetry_description(),{key:`submission-retry:${t}:${e}:${s.id}`,duration:Number.POSITIVE_INFINITY,action:{label:h.agent_chatSend_resend_label(),onClick:()=>{if(u)return;u=!0;const p=o();!p||p.generation!==c.generation||p.submissions!==c.submissions||p.observationVersion!==c.observationVersion||R(p.submissions,s.id)?.status!=="uncertain"||Oa(M,e,l)}},cancel:{label:h.chat_richInput_cancel_label(),onClick:g},onDismiss:g}),null}async function Is(e,t,n){const a=Xe.select(M.state,e),r=a?.submission?await Ua(e,t,a,n):"legacy";if(r){if(r==="legacy"){await M.dispatch(n===void 0?Lt(e,t):Ot(e,t,n));return}!r.isCurrent()||!a||M.dispatch(Ye(e,{wsId:t,text:a.text,imageBlocks:a.options?.imageBlocks,fileBlocks:a.options?.fileBlocks,noteIds:a.options?.noteIds,messageMetadata:a.options?.messageMetadata,model:n??a.options?.model,userAppMessageId:r.submission.appMessageId,submission:{scope:r.scope,id:r.submission.id}}))}}const Ts=M.createSelector((e,t)=>{const n=R(e.chatDrafts.owners,t);return n?{restore:n.restore,saves:Je(n.saves),shared:n.restore?e.chatDrafts.shared[JSON.stringify([n.restore.workspaceId,n.restore.agentId])]:void 0}:void 0});function $a(e,t){return t.workspaceId===e&&!t.retiredAt&&!t.pendingDeleteAt&&t.status!==ke.Deleted&&!t.notificationsMuted&&$t(t)==="topLevel"}function Na(e){const t=e.metadata?.pendingQuestionsMessageId;return typeof t=="string"&&t.length>0&&!Bn(e.metadata,t)?t:null}function Ha(e){return e.status===ke.Error&&!jt(Vt(e))}function Cs(e,t){return t.filter(n=>$a(e,n)).flatMap(n=>{const a=Ut(n),r=Na(n),s=n.status===ke.Error;if(!a&&!r&&!s)return[];const o=a?.timestamp??(s?n.stopReasonTimestamp:void 0);return[{agentId:n.id,agentName:n.name,kind:a?.kind??(s?"failed":"question"),reason:a?.reason,timestamp:o&&Number.isFinite(Date.parse(o))?o:void 0,questionMessageId:r,canRetry:Ha(n)}]})}function Es(e){return e.displayStatus==="failed"?"failed":e.displayStatus==="blocked"?"blocked":e.attention==="review_required"?"review":e.displayStatus==="needs_attention"?"question":e.activity==="agent_running"||e.displayStatus==="in_progress"?"running":e.scriptsRunning===!0?"scripts_running":e.backgroundTasksRunning===!0?"background_tasks_running":e.displayStatus==="pr_ready"?"pr_ready":e.displayStatus==="pr_merged"?"merged":e.displayStatus==="complete"?"complete":e.attention==="unread"?"unread":e.displayStatus==="pr_open"||e.displayStatus==="pr_queued"?e.displayStatus:"idle"}function Ds(e){const t=e.kind==="prs"?e.organization?.trim().toLowerCase():void 0;return{key:JSON.stringify([e.kind,e.workspaceId,t||null,[...new Set((t?[]:e.repositories).map(n=>JSON.stringify([n.key,n.owner,n.name])))].sort()]),hasGitHubRepositories:!!t||e.repositories.some(n=>!!n.owner),hasLocalRepositories:!t&&e.repositories.some(n=>!n.owner)}}function Te(e){const t=Sn(e);if(t?.kind!=="pr"||!Number.isSafeInteger(t.number)||t.number<=0)return null;const n=t.owner.toLowerCase(),a=t.repo.toLowerCase();return{owner:n,repo:a,number:t.number,id:`${n}/${a}#${t.number}`,url:`https://github.com/${n}/${a}/pull/${t.number}`}}function Rs(e,t,n,a){const r=e.filter(s=>a?a.includes(s.id):n?s.repositoryOwner?.toLowerCase()===n.toLowerCase():t.some(o=>o.owner?.toLowerCase()===s.repositoryOwner?.toLowerCase()&&o.name.toLowerCase()===s.repositoryName?.toLowerCase()));return[...new Map(r.flatMap(s=>[...(s.pullRequests??[]).map(o=>o.url),s.activePullRequest?.url,s.prUrl]).flatMap(s=>{const o=s?Te(s):null;return o?[[o.id,{owner:o.owner,repo:o.repo,number:o.number}]]:[]})).values()].sort((s,o)=>`${s.owner}/${s.repo}#${s.number}`.localeCompare(`${o.owner}/${o.repo}#${o.number}`))}function xs(e,t){const[n]=t;return t.length!==1||e.owner?.toLowerCase()!==n?.owner?.toLowerCase()||e.repo?.toLowerCase()!==n?.name.toLowerCase()}const Ps=M.createSelector(e=>e.homeIntegrations),Bs=M.createSelector(e=>{const t=e.homeIntegrations;return!t.linkedItems||!Object.keys(t.linkedItems).length?t:{...t,items:[...new Map([...Object.values(t.linkedItems),...t.items].map(n=>[n.id,n])).values()].sort((n,a)=>(a.updatedAt??"").localeCompare(n.updatedAt??""))}}),wt=M.createSelector(e=>Je(e.workspace.workspaces).flatMap(t=>[...(t.pullRequests??[]).map(n=>n.url),t.activePullRequest?.url,t.prUrl].filter(n=>!!n).map(n=>({url:Te(n)?.url??n.replace(/\/$/,"").toLowerCase(),workspaceId:t.id,name:t.title||t.id})))),Ls=M.createSelector(e=>{const t=e.homeIntegrations.detail?.url,n=t?Te(t)?.url??t.replace(/\/$/,"").toLowerCase():void 0;return wt.select(e).find(a=>a.url===n)??null}),Os=M.createSelector(e=>wt.select(e).map(t=>t.url)),Fa=["setup-retry-not-remote","setup-retry-not-failed","setup-retry-shared-checkout","setup-retry-no-script","agent-busy","agent-not-running","machine-update-required","machine-unreachable"];function Us(e,t){return e&&t?.state==="failed"}function Ka(e){const t=e??{},n=typeof t.message=="string"?t.message:"";if(t.rpcCode===-32601||t.code==="METHOD_NOT_FOUND")return{ok:!1,code:"unsupported",message:n};const a=typeof t.data?.code=="string"?t.data.code:t.code;return{ok:!1,code:Fa.find(s=>s===a)??"unknown",message:n}}async function $s(e,t=it){try{const n=await t("agent.retrySetup",{workspaceId:e.workspaceId,agentId:e.agentId}),a=ln.safeParse(n?.setup);return{ok:!0,setup:a.success?a.data:null}}catch(n){return Ka(n)}}function Wa(e){return e.code==="unsupported"?h.remoteAgent_setupRetry_unsupported_error():e.message.trim()||h.remoteAgent_setupRetry_generic_error()}function Ns(e,t){Ln.error(h.remoteAgent_setupRetry_failed_title({machine:e}),{description:Wa(t)})}let te=null;function Hs(e){return te=e,()=>{te===e&&(te=null)}}function Fs(){return te}function Ks(e){return[...e.groups.length>0?e.groups.filter(n=>n.expanded).flatMap(n=>n.items):e.workspaces,...e.asideExpanded?e.aside:[]].map(n=>n.id)}function Ws(e,t,n){if(e.length===0)return null;const a=t===null?-1:e.indexOf(t);return a===-1?e[0]:e[a+(n==="clockwise"?1:-1)]??null}let F=[];function qs(e,t={}){const n={source:e,fallback:t.fallback===!0};return F=[...F,n],()=>{F=F.filter(a=>a!==n)}}function js(){const e=F.findLast(n=>!n.fallback);return e?e.source:F.findLast(n=>n.fallback&&(n.source.available?.()??!0))?.source??null}function Vs(e){if(!e?.isConnected||e.closest("[inert]"))return!1;const t=e.ownerDocument.querySelectorAll('[aria-modal="true"]');return Array.from(t).every(n=>n.contains(e))}const zs=ct("conversationGoal/commandSend","conversationGoal/commandSendRequested"),Gs=ct("conversationGoal/set","conversationGoal/setRequested");function Ys(e){return In(e)}function qa(e){return Mn(e)}function ja(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function me(e){if(e.length===0)return[];const t=[];let n=null;for(const a of e){const r=a.timestamp?typeof a.timestamp=="string"?new Date(a.timestamp):a.timestamp:new Date;(!n||!ja(n.date,r))&&(n={date:r,label:qa(r),messages:[]},t.push(n)),n.messages.push(a)}return t}function Js(e){const t=new Map;return e.map(({date:n})=>{const a=`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`,r=t.get(a)??0;return t.set(a,r+1),r===0?a:`${a}#${r}`})}function Xs(e,t){const n=new Map;let a=t?null:void 0;for(const r of e.groups)for(const s of r.messages)a!==void 0&&n.set(s.id,a),s.role==="user"&&!Un(s)&&(a=s);return n}function Va(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}function qe(e,t){const n=new Map;return e.map(a=>{const r=`${t}-${Va(a.date)}`,s=(n.get(r)??0)+1;return n.set(r,s),{...a,groupKey:s===1?r:`${r}-${s}`}})}function za(e,t){if(e.length===0||t.length===0)return e;const n=new Set(t.map(s=>s.id)),a=new Set(t.map(s=>s.appMessageId).filter(s=>typeof s=="string"&&s.length>0)),r=e.filter(s=>!n.has(s.id)&&!(typeof s.appMessageId=="string"&&s.appMessageId.length>0&&a.has(s.appMessageId)));return r.length===e.length?e:r}function Qs(e,t,n){return e=za(e,t),e.length===0?{groups:me(t),detached:!1,hiddenTail:[]}:n?{groups:qe(me(e),"h"),detached:!0,hiddenTail:t}:{groups:qe(me([...e,...t]),"d"),detached:!1,hiddenTail:[]}}function Zs(e){const{scrollTop:t,threshold:n,fetching:a,exhausted:r,historyCount:s,tailCount:o,tailTruncated:i,totalMessages:l,spacerAbove:c=0}=e;return t>n+c||a||r?!1:s>0||i||l>o+s}const eo=300;function to(e){const{fetching:t,chainEvaluationPending:n,visible:a,hideArmed:r}=e;return t||n?a&&!r?"none":"show":a&&!r?"arm-hide":"none"}const je=24,Ga=320;function Ce(e){return Number.isFinite(e)?Math.min(Ga,Math.max(je,e)):je}const Ya=.2,Ja=.12;function Xa(e,t,n=Ya){const a=Ce(t);return e===null||!Number.isFinite(e)?a:e+n*(a-e)}function no(e,t){const n=Ce(t??Number.NaN);return{above:Math.round(Math.max(0,e.above)*n),below:Math.round(Math.max(0,e.below)*n)}}function ao(e){const{totalMessages:t,residentCount:n,exhausted:a,residentContentHeight:r,currentSpacerHeight:s,viewportHeight:o}=e;let i=e.rowHeightEma;n>0&&r>0&&(i=Xa(i,r/n));const l=e.unloadedRows??t-n,d=a||t<=0||n<=0||l<=0||i===null?0:Math.round(l*i),u=Math.abs(d-s);return u===0?{spacerHeight:s,rowHeightEma:i,applied:!1,scrollTopDelta:0}:d===0||s===0||u>s*Ja||o>0&&u>o?{spacerHeight:d,rowHeightEma:i,applied:!0,scrollTopDelta:d-s}:{spacerHeight:s,rowHeightEma:i,applied:!1,scrollTopDelta:0}}const Qa=On,Za=2;function ro(e){const{scrollTop:t,spacerAboveHeight:n,rowHeightEstimate:a,pageSize:r=Qa,nearPages:s=Za}=e;if(n<=0||t>=n)return"serial";const o=Ce(a??Number.NaN);return(n-Math.max(0,t))/o>s*r?"seek":"serial"}const bt=200,er=1;function so(e,t,n=bt){const a=t.timestamp-n;return[...e.filter(r=>r.timestamp>=a),t]}function oo(e){const{samples:t,viewportHeight:n,windowMs:a=bt,viewportFactor:r=er}=e;if(n<=0||t.length<2)return"gentle";const s=t[t.length-1].timestamp-a,o=t.filter(l=>l.timestamp>=s);if(o.length<2)return"gentle";let i=0;for(let l=1;l<o.length;l+=1)i+=Math.abs(o[l].scrollTop-o[l-1].scrollTop);return i>n*r?"rapid":"gentle"}function io(e){const{scrollTop:t,spacerAboveHeight:n,unloadedRowsAbove:a}=e;if(a<=0||n<=0)return 0;const r=Math.min(1,Math.max(0,t/n));return Math.min(a-1,Math.max(0,Math.floor(r*a)))}function co(e){const{totalMessages:t,residentCount:n,exhausted:a,startOrdinalEstimate:r,detachedFromTail:s}=e,o=Math.max(0,t-n);if(!s)return{above:a?0:o,below:0};const i=Math.max(0,e.hiddenTailCount??0);if(a)return{above:0,below:o+i};if(r!==null){const c=Math.min(o,Math.max(0,Math.round(r)));return{above:c,below:o-c+i}}const l=Math.min(o,Math.max(0,Math.round(e.holeRowsEstimate??0)));return{above:o-l,below:l+i}}function lo(e){const{exhausted:t,historyCount:n,tailCount:a,tailTruncated:r,totalMessages:s}=e;return t?!0:n>0?!1:!r&&s<=a}const tr="intent.drafts.sync",nr="intent.drafts.changed",ar=O({id:C(),type:C(),label:C(),description:C().optional(),content:C().optional(),path:C().optional(),imageData:C().optional(),imageMimeType:C().optional(),attachmentId:C().optional(),attachmentMimeType:C().optional(),attachmentSize:ce().optional(),sourcePath:C().optional(),placementStatus:z("failed").optional(),screen:$n().optional()}),kt=O({text:C(),attachments:Nn(ar)}),G={provenance:C().min(1),workspaceId:C().min(1),agentId:C().min(1)},ne={lifetime:C(),revision:ce().int().nonnegative()};Hn("kind",[O({...G,kind:z("read")}),O({...G,...ne,kind:z("edit"),origin:C().min(1),sequence:ce().int().positive(),snapshot:kt}),O({...G,...ne,kind:z("flush")}),O({...G,...ne,kind:z("clear"),origin:C().min(1)})]);const _t=O({...G,...ne,origin:C(),sequence:ce().int().nonnegative(),snapshot:kt}),rr=O({accepted:Fn(),draft:_t});function sr(e,t,n=t){const a=new Map,r=new Set,s=crypto.randomUUID();let o=0,i=!1;const l=()=>{const f=t();if(i||!f)throw new Error("draft-authority-unavailable");return f},c=()=>{const f=n();if(!f||i)throw new Error("draft-authority-unavailable");return()=>{if(i||n()!==f)throw new Error("draft-authority-changed")}},d=(f,k,_)=>{const I=JSON.stringify([f,k,_]);let S=a.get(I);return S||(S={dirty:0},a.set(I,S)),S},u=(f,k)=>{if(i||f.provenance!==t())return;const _=d(f.provenance,f.workspaceId,f.agentId);if(!(_.value?.lifetime===f.lifetime&&_.value.revision>f.revision)&&(_.value=f,k&&_.dirty===0))for(const I of r)I(f)},g=e.subscribe(f=>{const k=_t.safeParse(f);k.success&&u(k.data,!0)}),p=async(f,k)=>{k();const _=rr.parse(await e.request(f));if(k(),f.provenance!==l()||_.draft.provenance!==f.provenance)throw new Error("draft-authority-changed");if(!_.accepted)throw u(_.draft,!1),new Error("draft-changed-in-another-editor");return _.draft},m=async(f,k)=>{const _=l(),I=c(),S=d(_,f,k);S.tail&&await S.tail;const v=await p({kind:"read",provenance:_,workspaceId:f,agentId:k},I);return u(v,!1),v},w=(f,k,_)=>{const I=l(),S=c(),v=d(I,f,k),B=v.tail??(v.value?Promise.resolve(v.value):p({kind:"read",provenance:I,workspaceId:f,agentId:k},S));v.dirty+=1;const E=B.then(P=>p(_(P),S));return v.tail=E,E.then(P=>{v.dirty-=1,v.tail===E&&(v.tail=void 0),u(P,!0)},()=>{v.dirty-=1,v.tail===E&&(v.tail=void 0)}),E};return{authority:()=>i?null:n(),read:m,async edit(f,k,_,I){const S=++o;return w(k,_,v=>({kind:"edit",provenance:v.provenance,workspaceId:k,agentId:_,lifetime:v.lifetime,revision:v.revision,origin:f,sequence:S,snapshot:I}))},async flush(f,k){const _=l(),I=c(),S=d(_,f,k),v=await(S.tail??(S.value?Promise.resolve(S.value):m(f,k)));await p({kind:"flush",provenance:_,workspaceId:f,agentId:k,lifetime:v.lifetime,revision:v.revision},I)},async clear(f,k){await w(f,k,_=>({kind:"clear",provenance:_.provenance,workspaceId:f,agentId:k,lifetime:_.lifetime,revision:_.revision,origin:s}))},subscribe(f){return r.add(f),()=>{r.delete(f)}},dispose(){i=!0,g(),r.clear(),a.clear()}}}let U=null;async function uo(e,t,n,a,r){const s=U;if(!s)throw new Error("draft-shared-transport-unavailable");const o=()=>{if(U!==s||s.authority()!==r)throw new Error("draft-authority-changed")};o(),await s.edit(e,t,n,a),o(),await s.flush(t,n),o()}async function mo(e,t){await Promise.resolve(),U&&await U.flush(e,t)}function po(){if(!et())return null;const e=sr({request:n=>it(tr,n),subscribe:n=>An(a=>{a.method===nr&&n(a.params)})},()=>xn(M.state),()=>Pn(M.state));U=e;const t=e.dispose;return e.dispose=()=>{U===e&&(U=null),t()},e}const vt=new Map;function St(e,t){return`${e}\0${t}`}function fo(e,t){return vt.get(St(e,t))}function ho(e,t,n){vt.set(St(e,t),n)}const go=M.createSelector((e,t,n)=>{const a=e.chatPanelUi.byWorkspaceId[t];return a?R(a.userMessageIndexes,n):void 0}),yo=M.createSelector((e,t,n)=>{const a=e.chatPanelUi.byWorkspaceId[t];return a?R(a.retryAgents,n):void 0});function or(e){e=Math.max(0,e);const t=Math.floor(e/1e3);if(t<10){const s=e/1e3,o=s.toFixed(1);return o.endsWith(".0")?`${Math.round(s)}s`:`${o}s`}if(t<60)return`${t}s`;const n=Math.floor(t/3600),a=Math.floor(t%3600/60),r=t%60;return n>0?`${n}h ${a}m ${r}s`:`${a}m ${r}s`}function wo(e){return or(Math.max(1e3,Math.round(e/1e3)*1e3))}const ir=new Set(["launch","init","session-create","session-load","prompt"]),cr=new Set(["tool-call","tool-waiting"]);function lr(e){let t=null;for(const n of e)(!t||n.timestamp>=t.timestamp)&&(t=n);return t}function bo(e){return e&&ir.has(e)?"pulse":e&&cr.has(e)?"twist":"bloom"}const At="stalled";function ko(e,t){const n=lr(e);return!n||n.phase!==At||typeof t=="number"&&t>n.timestamp?null:n}function _o(e){let t=null;for(const n of e)n.phase!==At&&(!t||n.timestamp>=t.timestamp)&&(t=n);return t}const Ve={get title(){return h.chat_streamingStatus_sessionCorrupted_title()},get message(){return h.chat_streamingStatus_sessionCorrupted_message()}},dr=/^session\/[a-z_]+(?: failed)?:\s*/i;function ur(e){const n=(e.split(`
12
- `).map(a=>a.trim()).find(Boolean)??"").replace(dr,"");return n.charAt(0).toUpperCase()+n.slice(1)}function vo(e,t){return e?t===!0?{corrupted:!0,title:Ve.title,message:Ve.message,detail:e}:{corrupted:!1,title:h.chat_streamingStatus_responseFailed_label(),message:ur(e),detail:null}:null}const So=M.createSelector((e,t)=>R(e.questionUi.consumers,t)),mr=3e4,J=new Map;function Ao(e,t){const n=J.get(e);n&&clearTimeout(n.timer);const a=setTimeout(()=>J.delete(e),mr);J.set(e,{value:t,timer:a})}function Mo(e){const t=J.get(e);if(t)return clearTimeout(t.timer),J.delete(e),t.value}const Mt=M.createSelector((e,t,n)=>e.agentWorkers?.byKey[Ht(t,n)]??Nt),pr=M.createSelector((e,t,n)=>{const a=Mt.select(e,t,n);return a.status==="unsupported"?[]:(a.snapshot?.workers??[]).filter(r=>r.status==="running"||r.status==="unknown")}),Io=M.createSelector((e,t,n)=>{const a=Mt.select(e,t,n);return a.status==="failed"?!0:a.status!=="ready"||!a.snapshot?!1:a.snapshot.truncated?!0:a.snapshot.support.status!=="supported"&&pr.select(e,t,n).length>0}),fr=1e3,It={requireViewedAndFocused:!0,requireAssistantTail:!0},X=new Map,x=new Map;let j=null;function Ee(e){(e===void 0||j===e)&&(j=null)}const hr=200;function gr(e,t){if(x.delete(e),x.set(e,t),x.size>hr){const n=x.keys().next().value;n!==void 0&&x.delete(n)}}function Tt(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(!n.isStreaming&&typeof n.id=="string"&&n.id.length>0)return n}return null}function To(e){return Tt(e)?.id??null}function Co(e){De(e,{requireViewedAndFocused:!0})}function Eo(e){De(e,{requireViewedAndFocused:!1})}function Do(e){Ee(),De(e,It)}function Ro(e){j===e&&(X.has(e)||(j=null,Re(e,It)))}function xo(e){for(const t of e)typeof t!="string"||t.length===0||(Ct(t),Ee(t),Re(t,{requireViewedAndFocused:!1}))}function Ct(e){const t=X.get(e);t&&(clearTimeout(t.timer),X.delete(e))}function De(e,t){Ct(e),Ee(e);const n=setTimeout(()=>{X.delete(e),Re(e,t)},fr);X.set(e,{timer:n,gates:t})}let ze=null;function yr(){return ze??=Promise.all([fe(()=>import("./DlUpt_0u.js"),__vite__mapDeps([38,1,2,3,4,5,6,7,8,9,10,11,39,40]),import.meta.url),fe(()=>import("./DJPIUVkw.js").then(e=>e.s),__vite__mapDeps([41,42,8,3,1,2,4,5,6,7,9,10,11,20,21,16,17,22,43,44,45,19,26]),import.meta.url)]).then(([e,t])=>({appStore:e.store,appClient:t.appClient})),ze}async function Re(e,t){let n=null;try{const{appStore:a,appClient:r}=await yr(),s=a.state;if(t.requireViewedAndFocused&&(s.unreadTracking?.currentlyViewedAgentId!==e||typeof document<"u"&&!document.hasFocus()))return;const o=s.agentSessions?.byAgentId[e];if(!o)return;const i=typeof o.workspaceId=="string"?o.workspaceId:"";if(i.length===0)return;if(t.requireAssistantTail&&s.chatState?.byAgentId[e]?.initialHistoryPending){j=e;return}const l=Tt(o.messages??[]);if(!l){t.requireAssistantTail&&(j=e);return}if(t.requireAssistantTail&&l.role!=="assistant")return;const c=l.id;if(x.get(e)===c)return;gr(e,c),n=c,!(await r.agents.markSeen({workspaceId:i,agentId:e,messageId:c})).success&&x.get(e)===n&&x.delete(e)}catch{n!==null&&x.get(e)===n&&x.delete(e)}}const ie=new Map;function Et(e,t){return`${e}\0${t}`}function Po(e,t){return ie.get(Et(e,t))}function Bo(e,t,n){ie.set(Et(e,t),n)}function Lo(e){if(e.length===0)return;const t=new Set(e);for(const n of[...ie.keys()]){const a=n.slice(n.indexOf("\0")+1);t.has(a)&&ie.delete(n)}}export{ks as $,Gn as A,es as B,ms as C,L as D,cs as E,za as F,ds as G,Pa as H,Ra as I,Xn as J,mo as K,wo as L,fr as M,Ys as N,eo as O,ko as P,Po as Q,bt as R,fo as S,js as T,Cs as U,je as V,Fs as W,Es as X,_o as Y,bo as Z,zs as _,_s as a,Ao as a$,Gs as a0,As as a1,Ms as a2,Ks as a3,rs as a4,sa as a5,Xs as a6,as as a7,lo as a8,Y as a9,vs as aA,Ee as aB,Is as aC,Yr as aD,no as aE,$s as aF,pr as aG,Mt as aH,Io as aI,Ts as aJ,zr as aK,Gr as aL,Vr as aM,Ps as aN,Ls as aO,Bs as aP,Os as aQ,wt as aR,So as aS,yo as aT,go as aU,Bo as aV,ho as aW,Zs as aX,ns as aY,xs as aZ,co as a_,os as aa,ss as ab,Vs as ac,Xr as ad,io as ae,xo as af,Ro as ag,Co as ah,Eo as ai,Do as aj,To as ak,Ns as al,to as am,Ss as an,ps as ao,Wn as ap,uo as aq,is as ar,bs as as,us as at,Ua as au,ht as av,Qr as aw,qs as ax,ao as ay,Hs as az,we as b,Ws as b0,Oa as b1,Mo as b2,oa as b3,ts as b4,so as c,ys as d,ws as e,Js as f,Zr as g,xa as h,Jr as i,Us as j,ca as k,ia as l,oo as m,ro as n,Lo as o,Rs as p,Qs as q,gs as r,hs as s,ls as t,po as u,fs as v,vo as w,Ds as x,Ca as y,ge as z};
11
+ `),e)}function bs(e,t,n){if(e==="suggested-prompt")return{fields:{},hasAttachments:!1,cleanup:{clearInput:!1,followBottom:!0,historyText:null}};const a=n(),{imageBlocks:r,fileBlocks:s}=Ra(a.contextItems);return{fields:{contextItems:a.contextItems,workspaceContextStr:xa(a.contextItems,a.checkedPanels,a.checkedSelections),noteIds:a.noteIds,...r.length>0?{imageBlocks:r}:{},...s.length>0?{fileBlocks:s}:{},...a.pickedMentions?{messageMetadata:a.pickedMentions}:{}},hasAttachments:r.length>0||s.length>0,cleanup:{clearInput:!0,followBottom:!0,historyText:t}}}function ks(e){switch(e.kind){case"tooLong":return h.chat_goal_tooLong_error({max:H(Tn)});case"attachments":return h.chat_goal_attachments_error();case"retired":return h.chat_goal_retired_error();case"workspaceRetired":return h.chat_goal_workspaceRetired_error();case"invalid":case"failed":return h.chat_goal_failed_error()}}const Pa="chat-read:",q=new Map,ye=new Set;function _s(e,t){let n=q.get(e);n||(n=new Set,q.set(e,n)),n.add(t)}function vs(e,t){const n=q.get(e);if(!(!n||!n.delete(t))&&n.size===0){q.delete(e);for(const a of[...ye])a(e)}}function Ss(e){return ye.add(e),()=>ye.delete(e)}function As(e){return q.has(e)}function Ms(e){const t=q.get(e);if(!t)return!1;for(const n of t)if(!n.startsWith(Pa))return!0;return!1}function Ba(e,t,n){const a=e.state.pendingSubmissions.byAgentId[t.agentId];if(!a||!Ge(a.scope,t))return null;const r={...structuredClone(n),id:crypto.randomUUID(),createdAt:Date.now()};e.dispatch(Bt(t,r));const s=e.state.pendingSubmissions.byAgentId[t.agentId];return s&&R(s.submissions,r.id)?r:null}function La(e,t,n,a,r){const s=Be.select(e.state,n),o=pe.select(e.state)?.principal.id,i=Ue(e.state);if(!s||!o||!i)return null;const l=Cn(t,n),c={agentId:t,workspaceId:n,principalId:o,participation:s,authority:i,owner:l.key,lifetime:e.state.pendingSubmissions.byAgentId[t]?.scope.lifetime??crypto.randomUUID()},d=()=>l.isCurrent(e.state.agentSessions?.byAgentId[t]?.workspaceId)&&Be.select(e.state,n)===s&&pe.select(e.state)?.principal.id===o&&Ue(e.state)===i;if(!d())return null;e.dispatch(Pt(c,a,Wt.select(e.state,n)));const u=Ba(e,c,r);return u?{scope:c,submission:u,isCurrent:()=>{const g=e.state.pendingSubmissions.byAgentId[t];return d()&&!!g&&Ge(g.scope,c)&&(!!R(g.operations,u.id)||!!R(g.submissions,u.id))}}:null}function we(e,t,n){if(!n.text.trim()&&!n.imageBlocks?.length&&!n.fileBlocks?.length)return null;const a=n.userAppMessageId??En();return La(e,t,n.wsId,pe.select(e.state)?.capabilities.submissionCorrelation,{content:n.text.trim(),appMessageId:a,destination:!n.forceSubmit&&qt.select(e.state,t)?"queue":"conversation",contextItems:n.contextItems,imageBlocks:n.imageBlocks,fileBlocks:n.fileBlocks,messageMetadata:n.messageMetadata})}function Oa(e,t,n){const a=we(e,t,n);return a?(e.dispatch(Ye(t,{...n,userAppMessageId:a.submission.appMessageId,submission:{scope:a.scope,id:a.submission.id}})),!0):!1}async function Ua(e,t,n,a){const r=n.submission;if(!r)return"legacy";const s=r.reference,o=()=>s.scope.agentId===e&&s.scope.workspaceId===t&&Xe.select(M.state,e)===n?bn.select(M.state,s.scope):void 0,i=o();if(!i)return null;if(!i.supported)return"legacy";const l={wsId:t,text:n.text,imageBlocks:n.options?.imageBlocks,fileBlocks:n.options?.fileBlocks,noteIds:n.options?.noteIds,messageMetadata:n.options?.messageMetadata,model:a??n.options?.model};if(r.outcome==="rejected"){const p=R(i.tombstones,s.id);return R(i.submissions,s.id)||p&&p.reason!=="rejected"?null:we(M,e,l)}if(r.outcome==="accepted")return we(M,e,l);await Promise.all([Dn(e,t).catch(()=>{}),Rn(e,t).catch(()=>{})]);const c=o();if(!c||R(c.submissions,s.id)?.status!=="uncertain")return null;const{notify:d}=await fe(async()=>{const{notify:p}=await import("./Bsdq-idi.js").then(m=>m.i);return{notify:p}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37]),import.meta.url);if(o()!==c)return null;let u=!1;const g=()=>{u=!0};return d.warning(h.agent_chatSend_uncertainRetry_description(),{key:`submission-retry:${t}:${e}:${s.id}`,duration:Number.POSITIVE_INFINITY,action:{label:h.agent_chatSend_resend_label(),onClick:()=>{if(u)return;u=!0;const p=o();!p||p.generation!==c.generation||p.submissions!==c.submissions||p.observationVersion!==c.observationVersion||R(p.submissions,s.id)?.status!=="uncertain"||Oa(M,e,l)}},cancel:{label:h.chat_richInput_cancel_label(),onClick:g},onDismiss:g}),null}async function Is(e,t,n){const a=Xe.select(M.state,e),r=a?.submission?await Ua(e,t,a,n):"legacy";if(r){if(r==="legacy"){await M.dispatch(n===void 0?Lt(e,t):Ot(e,t,n));return}!r.isCurrent()||!a||M.dispatch(Ye(e,{wsId:t,text:a.text,imageBlocks:a.options?.imageBlocks,fileBlocks:a.options?.fileBlocks,noteIds:a.options?.noteIds,messageMetadata:a.options?.messageMetadata,model:n??a.options?.model,userAppMessageId:r.submission.appMessageId,submission:{scope:r.scope,id:r.submission.id}}))}}const Ts=M.createSelector((e,t)=>{const n=R(e.chatDrafts.owners,t);return n?{restore:n.restore,saves:Je(n.saves),shared:n.restore?e.chatDrafts.shared[JSON.stringify([n.restore.workspaceId,n.restore.agentId])]:void 0}:void 0});function $a(e,t){return t.workspaceId===e&&!t.retiredAt&&!t.pendingDeleteAt&&t.status!==ke.Deleted&&!t.notificationsMuted&&$t(t)==="topLevel"}function Na(e){const t=e.metadata?.pendingQuestionsMessageId;return typeof t=="string"&&t.length>0&&!Bn(e.metadata,t)?t:null}function Ha(e){return e.status===ke.Error&&!jt(Vt(e))}function Cs(e,t){return t.filter(n=>$a(e,n)).flatMap(n=>{const a=Ut(n),r=Na(n),s=n.status===ke.Error;if(!a&&!r&&!s)return[];const o=a?.timestamp??(s?n.stopReasonTimestamp:void 0);return[{agentId:n.id,agentName:n.name,kind:a?.kind??(s?"failed":"question"),reason:a?.reason,timestamp:o&&Number.isFinite(Date.parse(o))?o:void 0,questionMessageId:r,canRetry:Ha(n)}]})}function Es(e){return e.displayStatus==="failed"?"failed":e.displayStatus==="blocked"?"blocked":e.attention==="review_required"?"review":e.displayStatus==="needs_attention"?"question":e.activity==="agent_running"||e.displayStatus==="in_progress"?"running":e.scriptsRunning===!0?"scripts_running":e.backgroundTasksRunning===!0?"background_tasks_running":e.displayStatus==="pr_ready"?"pr_ready":e.displayStatus==="pr_merged"?"merged":e.displayStatus==="complete"?"complete":e.attention==="unread"?"unread":e.displayStatus==="pr_open"||e.displayStatus==="pr_queued"?e.displayStatus:"idle"}function Ds(e){const t=e.kind==="prs"?e.organization?.trim().toLowerCase():void 0;return{key:JSON.stringify([e.kind,e.workspaceId,t||null,[...new Set((t?[]:e.repositories).map(n=>JSON.stringify([n.key,n.owner,n.name])))].sort()]),hasGitHubRepositories:!!t||e.repositories.some(n=>!!n.owner),hasLocalRepositories:!t&&e.repositories.some(n=>!n.owner)}}function Te(e){const t=Sn(e);if(t?.kind!=="pr"||!Number.isSafeInteger(t.number)||t.number<=0)return null;const n=t.owner.toLowerCase(),a=t.repo.toLowerCase();return{owner:n,repo:a,number:t.number,id:`${n}/${a}#${t.number}`,url:`https://github.com/${n}/${a}/pull/${t.number}`}}function Rs(e,t,n,a){const r=e.filter(s=>a?a.includes(s.id):n?s.repositoryOwner?.toLowerCase()===n.toLowerCase():t.some(o=>o.owner?.toLowerCase()===s.repositoryOwner?.toLowerCase()&&o.name.toLowerCase()===s.repositoryName?.toLowerCase()));return[...new Map(r.flatMap(s=>[...(s.pullRequests??[]).map(o=>o.url),s.activePullRequest?.url,s.prUrl]).flatMap(s=>{const o=s?Te(s):null;return o?[[o.id,{owner:o.owner,repo:o.repo,number:o.number}]]:[]})).values()].sort((s,o)=>`${s.owner}/${s.repo}#${s.number}`.localeCompare(`${o.owner}/${o.repo}#${o.number}`))}function xs(e,t){const[n]=t;return t.length!==1||e.owner?.toLowerCase()!==n?.owner?.toLowerCase()||e.repo?.toLowerCase()!==n?.name.toLowerCase()}const Ps=M.createSelector(e=>e.homeIntegrations),Bs=M.createSelector(e=>{const t=e.homeIntegrations;return!t.linkedItems||!Object.keys(t.linkedItems).length?t:{...t,items:[...new Map([...Object.values(t.linkedItems),...t.items].map(n=>[n.id,n])).values()].sort((n,a)=>(a.updatedAt??"").localeCompare(n.updatedAt??""))}}),wt=M.createSelector(e=>Je(e.workspace.workspaces).flatMap(t=>[...(t.pullRequests??[]).map(n=>n.url),t.activePullRequest?.url,t.prUrl].filter(n=>!!n).map(n=>({url:Te(n)?.url??n.replace(/\/$/,"").toLowerCase(),workspaceId:t.id,name:t.title||t.id})))),Ls=M.createSelector(e=>{const t=e.homeIntegrations.detail?.url,n=t?Te(t)?.url??t.replace(/\/$/,"").toLowerCase():void 0;return wt.select(e).find(a=>a.url===n)??null}),Os=M.createSelector(e=>wt.select(e).map(t=>t.url)),Fa=["setup-retry-not-remote","setup-retry-not-failed","setup-retry-shared-checkout","setup-retry-no-script","agent-busy","agent-not-running","machine-update-required","machine-unreachable"];function Us(e,t){return e&&t?.state==="failed"}function Ka(e){const t=e??{},n=typeof t.message=="string"?t.message:"";if(t.rpcCode===-32601||t.code==="METHOD_NOT_FOUND")return{ok:!1,code:"unsupported",message:n};const a=typeof t.data?.code=="string"?t.data.code:t.code;return{ok:!1,code:Fa.find(s=>s===a)??"unknown",message:n}}async function $s(e,t=it){try{const n=await t("agent.retrySetup",{workspaceId:e.workspaceId,agentId:e.agentId}),a=ln.safeParse(n?.setup);return{ok:!0,setup:a.success?a.data:null}}catch(n){return Ka(n)}}function Wa(e){return e.code==="unsupported"?h.remoteAgent_setupRetry_unsupported_error():e.message.trim()||h.remoteAgent_setupRetry_generic_error()}function Ns(e,t){Ln.error(h.remoteAgent_setupRetry_failed_title({machine:e}),{description:Wa(t)})}let te=null;function Hs(e){return te=e,()=>{te===e&&(te=null)}}function Fs(){return te}function Ks(e){return[...e.groups.length>0?e.groups.filter(n=>n.expanded).flatMap(n=>n.items):e.workspaces,...e.asideExpanded?e.aside:[]].map(n=>n.id)}function Ws(e,t,n){if(e.length===0)return null;const a=t===null?-1:e.indexOf(t);return a===-1?e[0]:e[a+(n==="clockwise"?1:-1)]??null}let F=[];function qs(e,t={}){const n={source:e,fallback:t.fallback===!0};return F=[...F,n],()=>{F=F.filter(a=>a!==n)}}function js(){const e=F.findLast(n=>!n.fallback);return e?e.source:F.findLast(n=>n.fallback&&(n.source.available?.()??!0))?.source??null}function Vs(e){if(!e?.isConnected||e.closest("[inert]"))return!1;const t=e.ownerDocument.querySelectorAll('[aria-modal="true"]');return Array.from(t).every(n=>n.contains(e))}const zs=ct("conversationGoal/commandSend","conversationGoal/commandSendRequested"),Gs=ct("conversationGoal/set","conversationGoal/setRequested");function Ys(e){return In(e)}function qa(e){return Mn(e)}function ja(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function me(e){if(e.length===0)return[];const t=[];let n=null;for(const a of e){const r=a.timestamp?typeof a.timestamp=="string"?new Date(a.timestamp):a.timestamp:new Date;(!n||!ja(n.date,r))&&(n={date:r,label:qa(r),messages:[]},t.push(n)),n.messages.push(a)}return t}function Js(e){const t=new Map;return e.map(({date:n})=>{const a=`${n.getFullYear()}-${n.getMonth()+1}-${n.getDate()}`,r=t.get(a)??0;return t.set(a,r+1),r===0?a:`${a}#${r}`})}function Xs(e,t){const n=new Map;let a=t?null:void 0;for(const r of e.groups)for(const s of r.messages)a!==void 0&&n.set(s.id,a),s.role==="user"&&!Un(s)&&(a=s);return n}function Va(e){return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`}function qe(e,t){const n=new Map;return e.map(a=>{const r=`${t}-${Va(a.date)}`,s=(n.get(r)??0)+1;return n.set(r,s),{...a,groupKey:s===1?r:`${r}-${s}`}})}function za(e,t){if(e.length===0||t.length===0)return e;const n=new Set(t.map(s=>s.id)),a=new Set(t.map(s=>s.appMessageId).filter(s=>typeof s=="string"&&s.length>0)),r=e.filter(s=>!n.has(s.id)&&!(typeof s.appMessageId=="string"&&s.appMessageId.length>0&&a.has(s.appMessageId)));return r.length===e.length?e:r}function Qs(e,t,n){return e=za(e,t),e.length===0?{groups:me(t),detached:!1,hiddenTail:[]}:n?{groups:qe(me(e),"h"),detached:!0,hiddenTail:t}:{groups:qe(me([...e,...t]),"d"),detached:!1,hiddenTail:[]}}function Zs(e){const{scrollTop:t,threshold:n,fetching:a,exhausted:r,historyCount:s,tailCount:o,tailTruncated:i,totalMessages:l,spacerAbove:c=0}=e;return t>n+c||a||r?!1:s>0||i||l>o+s}const eo=300;function to(e){const{fetching:t,chainEvaluationPending:n,visible:a,hideArmed:r}=e;return t||n?a&&!r?"none":"show":a&&!r?"arm-hide":"none"}const je=24,Ga=320;function Ce(e){return Number.isFinite(e)?Math.min(Ga,Math.max(je,e)):je}const Ya=.2,Ja=.12;function Xa(e,t,n=Ya){const a=Ce(t);return e===null||!Number.isFinite(e)?a:e+n*(a-e)}function no(e,t){const n=Ce(t??Number.NaN);return{above:Math.round(Math.max(0,e.above)*n),below:Math.round(Math.max(0,e.below)*n)}}function ao(e){const{totalMessages:t,residentCount:n,exhausted:a,residentContentHeight:r,currentSpacerHeight:s,viewportHeight:o}=e;let i=e.rowHeightEma;n>0&&r>0&&(i=Xa(i,r/n));const l=e.unloadedRows??t-n,d=a||t<=0||n<=0||l<=0||i===null?0:Math.round(l*i),u=Math.abs(d-s);return u===0?{spacerHeight:s,rowHeightEma:i,applied:!1,scrollTopDelta:0}:d===0||s===0||u>s*Ja||o>0&&u>o?{spacerHeight:d,rowHeightEma:i,applied:!0,scrollTopDelta:d-s}:{spacerHeight:s,rowHeightEma:i,applied:!1,scrollTopDelta:0}}const Qa=On,Za=2;function ro(e){const{scrollTop:t,spacerAboveHeight:n,rowHeightEstimate:a,pageSize:r=Qa,nearPages:s=Za}=e;if(n<=0||t>=n)return"serial";const o=Ce(a??Number.NaN);return(n-Math.max(0,t))/o>s*r?"seek":"serial"}const bt=200,er=1;function so(e,t,n=bt){const a=t.timestamp-n;return[...e.filter(r=>r.timestamp>=a),t]}function oo(e){const{samples:t,viewportHeight:n,windowMs:a=bt,viewportFactor:r=er}=e;if(n<=0||t.length<2)return"gentle";const s=t[t.length-1].timestamp-a,o=t.filter(l=>l.timestamp>=s);if(o.length<2)return"gentle";let i=0;for(let l=1;l<o.length;l+=1)i+=Math.abs(o[l].scrollTop-o[l-1].scrollTop);return i>n*r?"rapid":"gentle"}function io(e){const{scrollTop:t,spacerAboveHeight:n,unloadedRowsAbove:a}=e;if(a<=0||n<=0)return 0;const r=Math.min(1,Math.max(0,t/n));return Math.min(a-1,Math.max(0,Math.floor(r*a)))}function co(e){const{totalMessages:t,residentCount:n,exhausted:a,startOrdinalEstimate:r,detachedFromTail:s}=e,o=Math.max(0,t-n);if(!s)return{above:a?0:o,below:0};const i=Math.max(0,e.hiddenTailCount??0);if(a)return{above:0,below:o+i};if(r!==null){const c=Math.min(o,Math.max(0,Math.round(r)));return{above:c,below:o-c+i}}const l=Math.min(o,Math.max(0,Math.round(e.holeRowsEstimate??0)));return{above:o-l,below:l+i}}function lo(e){const{exhausted:t,historyCount:n,tailCount:a,tailTruncated:r,totalMessages:s}=e;return t?!0:n>0?!1:!r&&s<=a}const tr="intent.drafts.sync",nr="intent.drafts.changed",ar=O({id:C(),type:C(),label:C(),description:C().optional(),content:C().optional(),path:C().optional(),imageData:C().optional(),imageMimeType:C().optional(),attachmentId:C().optional(),attachmentMimeType:C().optional(),attachmentSize:ce().optional(),sourcePath:C().optional(),placementStatus:z("failed").optional(),screen:$n().optional()}),kt=O({text:C(),attachments:Nn(ar)}),G={provenance:C().min(1),workspaceId:C().min(1),agentId:C().min(1)},ne={lifetime:C(),revision:ce().int().nonnegative()};Hn("kind",[O({...G,kind:z("read")}),O({...G,...ne,kind:z("edit"),origin:C().min(1),sequence:ce().int().positive(),snapshot:kt}),O({...G,...ne,kind:z("flush")}),O({...G,...ne,kind:z("clear"),origin:C().min(1)})]);const _t=O({...G,...ne,origin:C(),sequence:ce().int().nonnegative(),snapshot:kt}),rr=O({accepted:Fn(),draft:_t});function sr(e,t,n=t){const a=new Map,r=new Set,s=crypto.randomUUID();let o=0,i=!1;const l=()=>{const f=t();if(i||!f)throw new Error("draft-authority-unavailable");return f},c=()=>{const f=n();if(!f||i)throw new Error("draft-authority-unavailable");return()=>{if(i||n()!==f)throw new Error("draft-authority-changed")}},d=(f,k,_)=>{const I=JSON.stringify([f,k,_]);let S=a.get(I);return S||(S={dirty:0},a.set(I,S)),S},u=(f,k)=>{if(i||f.provenance!==t())return;const _=d(f.provenance,f.workspaceId,f.agentId);if(!(_.value?.lifetime===f.lifetime&&_.value.revision>f.revision)&&(_.value=f,k&&_.dirty===0))for(const I of r)I(f)},g=e.subscribe(f=>{const k=_t.safeParse(f);k.success&&u(k.data,!0)}),p=async(f,k)=>{k();const _=rr.parse(await e.request(f));if(k(),f.provenance!==l()||_.draft.provenance!==f.provenance)throw new Error("draft-authority-changed");if(!_.accepted)throw u(_.draft,!1),new Error("draft-changed-in-another-editor");return _.draft},m=async(f,k)=>{const _=l(),I=c(),S=d(_,f,k);S.tail&&await S.tail;const v=await p({kind:"read",provenance:_,workspaceId:f,agentId:k},I);return u(v,!1),v},w=(f,k,_)=>{const I=l(),S=c(),v=d(I,f,k),B=v.tail??(v.value?Promise.resolve(v.value):p({kind:"read",provenance:I,workspaceId:f,agentId:k},S));v.dirty+=1;const E=B.then(P=>p(_(P),S));return v.tail=E,E.then(P=>{v.dirty-=1,v.tail===E&&(v.tail=void 0),u(P,!0)},()=>{v.dirty-=1,v.tail===E&&(v.tail=void 0)}),E};return{authority:()=>i?null:n(),read:m,async edit(f,k,_,I){const S=++o;return w(k,_,v=>({kind:"edit",provenance:v.provenance,workspaceId:k,agentId:_,lifetime:v.lifetime,revision:v.revision,origin:f,sequence:S,snapshot:I}))},async flush(f,k){const _=l(),I=c(),S=d(_,f,k),v=await(S.tail??(S.value?Promise.resolve(S.value):m(f,k)));await p({kind:"flush",provenance:_,workspaceId:f,agentId:k,lifetime:v.lifetime,revision:v.revision},I)},async clear(f,k){await w(f,k,_=>({kind:"clear",provenance:_.provenance,workspaceId:f,agentId:k,lifetime:_.lifetime,revision:_.revision,origin:s}))},subscribe(f){return r.add(f),()=>{r.delete(f)}},dispose(){i=!0,g(),r.clear(),a.clear()}}}let U=null;async function uo(e,t,n,a,r){const s=U;if(!s)throw new Error("draft-shared-transport-unavailable");const o=()=>{if(U!==s||s.authority()!==r)throw new Error("draft-authority-changed")};o(),await s.edit(e,t,n,a),o(),await s.flush(t,n),o()}async function mo(e,t){await Promise.resolve(),U&&await U.flush(e,t)}function po(){if(!et())return null;const e=sr({request:n=>it(tr,n),subscribe:n=>An(a=>{a.method===nr&&n(a.params)})},()=>xn(M.state),()=>Pn(M.state));U=e;const t=e.dispose;return e.dispose=()=>{U===e&&(U=null),t()},e}const vt=new Map;function St(e,t){return`${e}\0${t}`}function fo(e,t){return vt.get(St(e,t))}function ho(e,t,n){vt.set(St(e,t),n)}const go=M.createSelector((e,t,n)=>{const a=e.chatPanelUi.byWorkspaceId[t];return a?R(a.userMessageIndexes,n):void 0}),yo=M.createSelector((e,t,n)=>{const a=e.chatPanelUi.byWorkspaceId[t];return a?R(a.retryAgents,n):void 0});function or(e){e=Math.max(0,e);const t=Math.floor(e/1e3);if(t<10){const s=e/1e3,o=s.toFixed(1);return o.endsWith(".0")?`${Math.round(s)}s`:`${o}s`}if(t<60)return`${t}s`;const n=Math.floor(t/3600),a=Math.floor(t%3600/60),r=t%60;return n>0?`${n}h ${a}m ${r}s`:`${a}m ${r}s`}function wo(e){return or(Math.max(1e3,Math.round(e/1e3)*1e3))}const ir=new Set(["launch","init","session-create","session-load","prompt"]),cr=new Set(["tool-call","tool-waiting"]);function lr(e){let t=null;for(const n of e)(!t||n.timestamp>=t.timestamp)&&(t=n);return t}function bo(e){return e&&ir.has(e)?"pulse":e&&cr.has(e)?"twist":"bloom"}const At="stalled";function ko(e,t){const n=lr(e);return!n||n.phase!==At||typeof t=="number"&&t>n.timestamp?null:n}function _o(e){let t=null;for(const n of e)n.phase!==At&&(!t||n.timestamp>=t.timestamp)&&(t=n);return t}const Ve={get title(){return h.chat_streamingStatus_sessionCorrupted_title()},get message(){return h.chat_streamingStatus_sessionCorrupted_message()}},dr=/^session\/[a-z_]+(?: failed)?:\s*/i;function ur(e){const n=(e.split(`
12
+ `).map(a=>a.trim()).find(Boolean)??"").replace(dr,"");return n.charAt(0).toUpperCase()+n.slice(1)}function vo(e,t){return e?t===!0?{corrupted:!0,title:Ve.title,message:Ve.message,detail:e}:{corrupted:!1,title:h.chat_streamingStatus_responseFailed_label(),message:ur(e),detail:null}:null}const So=M.createSelector((e,t)=>R(e.questionUi.consumers,t)),mr=3e4,J=new Map;function Ao(e,t){const n=J.get(e);n&&clearTimeout(n.timer);const a=setTimeout(()=>J.delete(e),mr);J.set(e,{value:t,timer:a})}function Mo(e){const t=J.get(e);if(t)return clearTimeout(t.timer),J.delete(e),t.value}const Mt=M.createSelector((e,t,n)=>e.agentWorkers?.byKey[Ht(t,n)]??Nt),pr=M.createSelector((e,t,n)=>{const a=Mt.select(e,t,n);return a.status==="unsupported"?[]:(a.snapshot?.workers??[]).filter(r=>r.status==="running"||r.status==="unknown")}),Io=M.createSelector((e,t,n)=>{const a=Mt.select(e,t,n);return a.status==="failed"?!0:a.status!=="ready"||!a.snapshot?!1:a.snapshot.truncated?!0:a.snapshot.support.status!=="supported"&&pr.select(e,t,n).length>0}),fr=1e3,It={requireViewedAndFocused:!0,requireAssistantTail:!0},X=new Map,x=new Map;let j=null;function Ee(e){(e===void 0||j===e)&&(j=null)}const hr=200;function gr(e,t){if(x.delete(e),x.set(e,t),x.size>hr){const n=x.keys().next().value;n!==void 0&&x.delete(n)}}function Tt(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(!n.isStreaming&&typeof n.id=="string"&&n.id.length>0)return n}return null}function To(e){return Tt(e)?.id??null}function Co(e){De(e,{requireViewedAndFocused:!0})}function Eo(e){De(e,{requireViewedAndFocused:!1})}function Do(e){Ee(),De(e,It)}function Ro(e){j===e&&(X.has(e)||(j=null,Re(e,It)))}function xo(e){for(const t of e)typeof t!="string"||t.length===0||(Ct(t),Ee(t),Re(t,{requireViewedAndFocused:!1}))}function Ct(e){const t=X.get(e);t&&(clearTimeout(t.timer),X.delete(e))}function De(e,t){Ct(e),Ee(e);const n=setTimeout(()=>{X.delete(e),Re(e,t)},fr);X.set(e,{timer:n,gates:t})}let ze=null;function yr(){return ze??=Promise.all([fe(()=>import("./DwbEs_9r.js"),__vite__mapDeps([38,1,2,3,4,5,6,7,8,9,10,11,39,40]),import.meta.url),fe(()=>import("./0Kw0mmSW.js").then(e=>e.s),__vite__mapDeps([41,42,8,3,1,2,4,5,6,7,9,10,11,20,21,16,17,22,43,44,45,19,26]),import.meta.url)]).then(([e,t])=>({appStore:e.store,appClient:t.appClient})),ze}async function Re(e,t){let n=null;try{const{appStore:a,appClient:r}=await yr(),s=a.state;if(t.requireViewedAndFocused&&(s.unreadTracking?.currentlyViewedAgentId!==e||typeof document<"u"&&!document.hasFocus()))return;const o=s.agentSessions?.byAgentId[e];if(!o)return;const i=typeof o.workspaceId=="string"?o.workspaceId:"";if(i.length===0)return;if(t.requireAssistantTail&&s.chatState?.byAgentId[e]?.initialHistoryPending){j=e;return}const l=Tt(o.messages??[]);if(!l){t.requireAssistantTail&&(j=e);return}if(t.requireAssistantTail&&l.role!=="assistant")return;const c=l.id;if(x.get(e)===c)return;gr(e,c),n=c,!(await r.agents.markSeen({workspaceId:i,agentId:e,messageId:c})).success&&x.get(e)===n&&x.delete(e)}catch{n!==null&&x.get(e)===n&&x.delete(e)}}const ie=new Map;function Et(e,t){return`${e}\0${t}`}function Po(e,t){return ie.get(Et(e,t))}function Bo(e,t,n){ie.set(Et(e,t),n)}function Lo(e){if(e.length===0)return;const t=new Set(e);for(const n of[...ie.keys()]){const a=n.slice(n.indexOf("\0")+1);t.has(a)&&ie.delete(n)}}export{ks as $,Gn as A,es as B,ms as C,L as D,cs as E,za as F,ds as G,Pa as H,Ra as I,Xn as J,mo as K,wo as L,fr as M,Ys as N,eo as O,ko as P,Po as Q,bt as R,fo as S,js as T,Cs as U,je as V,Fs as W,Es as X,_o as Y,bo as Z,zs as _,_s as a,Ao as a$,Gs as a0,As as a1,Ms as a2,Ks as a3,rs as a4,sa as a5,Xs as a6,as as a7,lo as a8,Y as a9,vs as aA,Ee as aB,Is as aC,Yr as aD,no as aE,$s as aF,pr as aG,Mt as aH,Io as aI,Ts as aJ,zr as aK,Gr as aL,Vr as aM,Ps as aN,Ls as aO,Bs as aP,Os as aQ,wt as aR,So as aS,yo as aT,go as aU,Bo as aV,ho as aW,Zs as aX,ns as aY,xs as aZ,co as a_,os as aa,ss as ab,Vs as ac,Xr as ad,io as ae,xo as af,Ro as ag,Co as ah,Eo as ai,Do as aj,To as ak,Ns as al,to as am,Ss as an,ps as ao,Wn as ap,uo as aq,is as ar,bs as as,us as at,Ua as au,ht as av,Qr as aw,qs as ax,ao as ay,Hs as az,we as b,Ws as b0,Oa as b1,Mo as b2,oa as b3,ts as b4,so as c,ys as d,ws as e,Js as f,Zr as g,xa as h,Jr as i,Us as j,ca as k,ia as l,oo as m,ro as n,Lo as o,Rs as p,Qs as q,gs as r,hs as s,ls as t,po as u,fs as v,vo as w,Ds as x,Ca as y,ge as z};
@@ -1,4 +1,4 @@
1
- import{g as Ni}from"./BKMQo7oP.js";import{s as Ci}from"./-8sNsc56.js";import{U as Zs,aZ as jt,V as Qs,a_ as Gt,Y as bi,b0 as vi,b as h,aU as je,ay as _i,X as en,a1 as xi,aP as Mi,bh as wi,aV as Ui,r as Pi,O as Di,am as Fi,W as Bi,ab as $i,aG as ji,aA as Gi,aW as Wi}from"./DE32K02M.js";function Wt(s){console&&console.error&&console.error(`Error: ${s}`)}function tn(s){console&&console.warn&&console.warn(`Warning: ${s}`)}function sn(s){const e=new Date().getTime(),t=s();return{time:new Date().getTime()-e,value:t}}function nn(s){function e(){}e.prototype=s;const t=new e;function n(){return typeof t.bar}return n(),n(),s}function Ki(s){return Vi(s)?s.LABEL:s.name}function Vi(s){return typeof s.LABEL=="string"&&s.LABEL!==""}class te{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),this.definition.forEach(t=>{t.accept(e)})}}class K extends te{constructor(e){super([]),this.idx=1,Object.assign(this,ie(e))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class _e extends te{constructor(e){super(e.definition),this.orgText="",Object.assign(this,ie(e))}}class W extends te{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Object.assign(this,ie(e))}}class G extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class se extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class ne extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class M extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class q extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class Z extends te{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Object.assign(this,ie(e))}}class k{constructor(e){this.idx=1,Object.assign(this,ie(e))}accept(e){e.visit(this)}}function zi(s){return s.map(at)}function at(s){function e(t){return t.map(at)}if(s instanceof K){const t={type:"NonTerminal",name:s.nonTerminalName,idx:s.idx};return typeof s.label=="string"&&(t.label=s.label),t}else{if(s instanceof W)return{type:"Alternative",definition:e(s.definition)};if(s instanceof G)return{type:"Option",idx:s.idx,definition:e(s.definition)};if(s instanceof se)return{type:"RepetitionMandatory",idx:s.idx,definition:e(s.definition)};if(s instanceof ne)return{type:"RepetitionMandatoryWithSeparator",idx:s.idx,separator:at(new k({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof q)return{type:"RepetitionWithSeparator",idx:s.idx,separator:at(new k({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof M)return{type:"Repetition",idx:s.idx,definition:e(s.definition)};if(s instanceof Z)return{type:"Alternation",idx:s.idx,definition:e(s.definition)};if(s instanceof k){const t={type:"Terminal",name:s.terminalType.name,label:Ki(s.terminalType),idx:s.idx};typeof s.label=="string"&&(t.terminalLabel=s.label);const n=s.terminalType.PATTERN;return s.terminalType.PATTERN&&(t.pattern=n instanceof RegExp?n.source:n),t}else{if(s instanceof _e)return{type:"Rule",name:s.name,orgText:s.orgText,definition:e(s.definition)};throw Error("non exhaustive match")}}}function ie(s){return Object.fromEntries(Object.entries(s).filter(([,e])=>e!==void 0))}class xe{visit(e){const t=e;switch(t.constructor){case K:return this.visitNonTerminal(t);case W:return this.visitAlternative(t);case G:return this.visitOption(t);case se:return this.visitRepetitionMandatory(t);case ne:return this.visitRepetitionMandatoryWithSeparator(t);case q:return this.visitRepetitionWithSeparator(t);case M:return this.visitRepetition(t);case Z:return this.visitAlternation(t);case k:return this.visitTerminal(t);case _e:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function Hi(s){return s instanceof W||s instanceof G||s instanceof M||s instanceof se||s instanceof ne||s instanceof q||s instanceof k||s instanceof _e}function Tt(s,e=[]){return s instanceof G||s instanceof M||s instanceof q?!0:s instanceof Z?s.definition.some(n=>Tt(n,e)):s instanceof K&&e.includes(s)?!1:s instanceof te?(s instanceof K&&e.push(s),s.definition.every(n=>Tt(n,e))):!1}function Xi(s){return s instanceof Z}function ee(s){if(s instanceof K)return"SUBRULE";if(s instanceof G)return"OPTION";if(s instanceof Z)return"OR";if(s instanceof se)return"AT_LEAST_ONE";if(s instanceof ne)return"AT_LEAST_ONE_SEP";if(s instanceof q)return"MANY_SEP";if(s instanceof M)return"MANY";if(s instanceof k)return"CONSUME";throw Error("non exhaustive match")}class kt{walk(e,t=[]){e.definition.forEach((n,i)=>{const a=e.definition.slice(i+1);if(n instanceof K)this.walkProdRef(n,a,t);else if(n instanceof k)this.walkTerminal(n,a,t);else if(n instanceof W)this.walkFlat(n,a,t);else if(n instanceof G)this.walkOption(n,a,t);else if(n instanceof se)this.walkAtLeastOne(n,a,t);else if(n instanceof ne)this.walkAtLeastOneSep(n,a,t);else if(n instanceof q)this.walkManySep(n,a,t);else if(n instanceof M)this.walkMany(n,a,t);else if(n instanceof Z)this.walkOr(n,a,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const i=t.concat(n);this.walk(e,i)}walkOption(e,t,n){const i=t.concat(n);this.walk(e,i)}walkAtLeastOne(e,t,n){const i=[new G({definition:e.definition})].concat(t,n);this.walk(e,i)}walkAtLeastOneSep(e,t,n){const i=ys(e,t,n);this.walk(e,i)}walkMany(e,t,n){const i=[new G({definition:e.definition})].concat(t,n);this.walk(e,i)}walkManySep(e,t,n){const i=ys(e,t,n);this.walk(e,i)}walkOr(e,t,n){const i=t.concat(n);e.definition.forEach(a=>{const r=new W({definition:[a]});this.walk(r,i)})}}function ys(s,e,t){return[new G({definition:[new k({terminalType:s.separator})].concat(s.definition)})].concat(e,t)}function Je(s){if(s instanceof K)return Je(s.referencedRule);if(s instanceof k)return qi(s);if(Hi(s))return Yi(s);if(Xi(s))return Ji(s);throw Error("non exhaustive match")}function Yi(s){let e=[];const t=s.definition;let n=0,i=t.length>n,a,r=!0;for(;i&&r;)a=t[n],r=Tt(a),e=e.concat(Je(a)),n=n+1,i=t.length>n;return[...new Set(e)]}function Ji(s){const e=s.definition.map(t=>Je(t));return[...new Set(e.flat())]}function qi(s){return[s.terminalType]}const an="_~IN~_";class Zi extends kt{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const i=ea(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(n),r=new W({definition:a}),l=Je(r);this.follows[i]=l}}function Qi(s){const e={};return s.forEach(t=>{const n=new Zi(t).startWalking();Object.assign(e,n)}),e}function ea(s,e){return s.name+e+an}function S(s){return s.charCodeAt(0)}function Pt(s,e){Array.isArray(s)?s.forEach(function(t){e.push(t)}):e.push(s)}function Fe(s,e){if(s[e]===!0)throw"duplicate flag "+e;s[e],s[e]=!0}function Se(s){if(s===void 0)throw Error("Internal Error - Should never get here!");return!0}function ta(){throw Error("Internal Error - Should never get here!")}function Rs(s){return s.type==="Character"}const gt=[];for(let s=S("0");s<=S("9");s++)gt.push(s);const At=[S("_")].concat(gt);for(let s=S("a");s<=S("z");s++)At.push(s);for(let s=S("A");s<=S("Z");s++)At.push(s);const Os=[S(" "),S("\f"),S(`
1
+ import{g as Ni}from"./DzTn7KcX.js";import{s as Ci}from"./-hTxjwFO.js";import{U as Zs,aZ as jt,V as Qs,a_ as Gt,Y as bi,b0 as vi,b as h,aU as je,ay as _i,X as en,a1 as xi,aP as Mi,bh as wi,aV as Ui,r as Pi,O as Di,am as Fi,W as Bi,ab as $i,aG as ji,aA as Gi,aW as Wi}from"./B6-aVrNf.js";function Wt(s){console&&console.error&&console.error(`Error: ${s}`)}function tn(s){console&&console.warn&&console.warn(`Warning: ${s}`)}function sn(s){const e=new Date().getTime(),t=s();return{time:new Date().getTime()-e,value:t}}function nn(s){function e(){}e.prototype=s;const t=new e;function n(){return typeof t.bar}return n(),n(),s}function Ki(s){return Vi(s)?s.LABEL:s.name}function Vi(s){return typeof s.LABEL=="string"&&s.LABEL!==""}class te{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),this.definition.forEach(t=>{t.accept(e)})}}class K extends te{constructor(e){super([]),this.idx=1,Object.assign(this,ie(e))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class _e extends te{constructor(e){super(e.definition),this.orgText="",Object.assign(this,ie(e))}}class W extends te{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Object.assign(this,ie(e))}}class G extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class se extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class ne extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class M extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class q extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class Z extends te{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Object.assign(this,ie(e))}}class k{constructor(e){this.idx=1,Object.assign(this,ie(e))}accept(e){e.visit(this)}}function zi(s){return s.map(at)}function at(s){function e(t){return t.map(at)}if(s instanceof K){const t={type:"NonTerminal",name:s.nonTerminalName,idx:s.idx};return typeof s.label=="string"&&(t.label=s.label),t}else{if(s instanceof W)return{type:"Alternative",definition:e(s.definition)};if(s instanceof G)return{type:"Option",idx:s.idx,definition:e(s.definition)};if(s instanceof se)return{type:"RepetitionMandatory",idx:s.idx,definition:e(s.definition)};if(s instanceof ne)return{type:"RepetitionMandatoryWithSeparator",idx:s.idx,separator:at(new k({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof q)return{type:"RepetitionWithSeparator",idx:s.idx,separator:at(new k({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof M)return{type:"Repetition",idx:s.idx,definition:e(s.definition)};if(s instanceof Z)return{type:"Alternation",idx:s.idx,definition:e(s.definition)};if(s instanceof k){const t={type:"Terminal",name:s.terminalType.name,label:Ki(s.terminalType),idx:s.idx};typeof s.label=="string"&&(t.terminalLabel=s.label);const n=s.terminalType.PATTERN;return s.terminalType.PATTERN&&(t.pattern=n instanceof RegExp?n.source:n),t}else{if(s instanceof _e)return{type:"Rule",name:s.name,orgText:s.orgText,definition:e(s.definition)};throw Error("non exhaustive match")}}}function ie(s){return Object.fromEntries(Object.entries(s).filter(([,e])=>e!==void 0))}class xe{visit(e){const t=e;switch(t.constructor){case K:return this.visitNonTerminal(t);case W:return this.visitAlternative(t);case G:return this.visitOption(t);case se:return this.visitRepetitionMandatory(t);case ne:return this.visitRepetitionMandatoryWithSeparator(t);case q:return this.visitRepetitionWithSeparator(t);case M:return this.visitRepetition(t);case Z:return this.visitAlternation(t);case k:return this.visitTerminal(t);case _e:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function Hi(s){return s instanceof W||s instanceof G||s instanceof M||s instanceof se||s instanceof ne||s instanceof q||s instanceof k||s instanceof _e}function Tt(s,e=[]){return s instanceof G||s instanceof M||s instanceof q?!0:s instanceof Z?s.definition.some(n=>Tt(n,e)):s instanceof K&&e.includes(s)?!1:s instanceof te?(s instanceof K&&e.push(s),s.definition.every(n=>Tt(n,e))):!1}function Xi(s){return s instanceof Z}function ee(s){if(s instanceof K)return"SUBRULE";if(s instanceof G)return"OPTION";if(s instanceof Z)return"OR";if(s instanceof se)return"AT_LEAST_ONE";if(s instanceof ne)return"AT_LEAST_ONE_SEP";if(s instanceof q)return"MANY_SEP";if(s instanceof M)return"MANY";if(s instanceof k)return"CONSUME";throw Error("non exhaustive match")}class kt{walk(e,t=[]){e.definition.forEach((n,i)=>{const a=e.definition.slice(i+1);if(n instanceof K)this.walkProdRef(n,a,t);else if(n instanceof k)this.walkTerminal(n,a,t);else if(n instanceof W)this.walkFlat(n,a,t);else if(n instanceof G)this.walkOption(n,a,t);else if(n instanceof se)this.walkAtLeastOne(n,a,t);else if(n instanceof ne)this.walkAtLeastOneSep(n,a,t);else if(n instanceof q)this.walkManySep(n,a,t);else if(n instanceof M)this.walkMany(n,a,t);else if(n instanceof Z)this.walkOr(n,a,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const i=t.concat(n);this.walk(e,i)}walkOption(e,t,n){const i=t.concat(n);this.walk(e,i)}walkAtLeastOne(e,t,n){const i=[new G({definition:e.definition})].concat(t,n);this.walk(e,i)}walkAtLeastOneSep(e,t,n){const i=ys(e,t,n);this.walk(e,i)}walkMany(e,t,n){const i=[new G({definition:e.definition})].concat(t,n);this.walk(e,i)}walkManySep(e,t,n){const i=ys(e,t,n);this.walk(e,i)}walkOr(e,t,n){const i=t.concat(n);e.definition.forEach(a=>{const r=new W({definition:[a]});this.walk(r,i)})}}function ys(s,e,t){return[new G({definition:[new k({terminalType:s.separator})].concat(s.definition)})].concat(e,t)}function Je(s){if(s instanceof K)return Je(s.referencedRule);if(s instanceof k)return qi(s);if(Hi(s))return Yi(s);if(Xi(s))return Ji(s);throw Error("non exhaustive match")}function Yi(s){let e=[];const t=s.definition;let n=0,i=t.length>n,a,r=!0;for(;i&&r;)a=t[n],r=Tt(a),e=e.concat(Je(a)),n=n+1,i=t.length>n;return[...new Set(e)]}function Ji(s){const e=s.definition.map(t=>Je(t));return[...new Set(e.flat())]}function qi(s){return[s.terminalType]}const an="_~IN~_";class Zi extends kt{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const i=ea(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(n),r=new W({definition:a}),l=Je(r);this.follows[i]=l}}function Qi(s){const e={};return s.forEach(t=>{const n=new Zi(t).startWalking();Object.assign(e,n)}),e}function ea(s,e){return s.name+e+an}function S(s){return s.charCodeAt(0)}function Pt(s,e){Array.isArray(s)?s.forEach(function(t){e.push(t)}):e.push(s)}function Fe(s,e){if(s[e]===!0)throw"duplicate flag "+e;s[e],s[e]=!0}function Se(s){if(s===void 0)throw Error("Internal Error - Should never get here!");return!0}function ta(){throw Error("Internal Error - Should never get here!")}function Rs(s){return s.type==="Character"}const gt=[];for(let s=S("0");s<=S("9");s++)gt.push(s);const At=[S("_")].concat(gt);for(let s=S("a");s<=S("z");s++)At.push(s);for(let s=S("A");s<=S("Z");s++)At.push(s);const Os=[S(" "),S("\f"),S(`
2
2
  `),S("\r"),S(" "),S("\v"),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S("\u2028"),S("\u2029"),S(" "),S(" "),S(" "),S("\uFEFF")],sa=/[0-9a-fA-F]/,tt=/[0-9]/,na=/[1-9]/;class ia{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const t=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Fe(n,"global");break;case"i":Fe(n,"ignoreCase");break;case"m":Fe(n,"multiLine");break;case"u":Fe(n,"unicode");break;case"y":Fe(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t,loc:this.loc(0)}}disjunction(){const e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}break}}Se(t);const n=this.disjunction();return this.consumeChar(")"),{type:t,value:n,loc:this.loc(e)}}return ta()}quantifier(e=!1){let t;const n=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),t={atLeast:i,atMost:a}):t={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&t===void 0)return;Se(t);break}if(!(e===!0&&t===void 0)&&Se(t))return this.peekChar(0)==="?"?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(n),t}atom(){let e;const t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Se(e))return e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[S(`
3
3
  `),S("\r"),S("\u2028"),S("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=gt;break;case"D":e=gt,t=!0;break;case"s":e=Os;break;case"S":e=Os,t=!0;break;case"w":e=At;break;case"W":e=At,t=!0;break}if(Se(e))return{type:"Set",value:e,complement:t}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=S("\f");break;case"n":e=S(`
4
4
  `);break;case"r":e=S("\r");break;case"t":e=S(" ");break;case"v":e=S("\v");break}if(Se(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:S("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:S(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
@@ -1 +1 @@
1
- import{conf as t,language as e}from"./DsfORPYa.js";const i=t,o={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:e.operators,symbols:e.symbols,escapes:e.escapes,digits:e.digits,octaldigits:e.octaldigits,binarydigits:e.binarydigits,hexdigits:e.hexdigits,regexpctl:e.regexpctl,regexpesc:e.regexpesc,tokenizer:e.tokenizer};export{i as conf,o as language};
1
+ import{conf as t,language as e}from"./BudPFdIj.js";const i=t,o={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:e.operators,symbols:e.symbols,escapes:e.escapes,digits:e.digits,octaldigits:e.octaldigits,binarydigits:e.binarydigits,hexdigits:e.hexdigits,regexpctl:e.regexpctl,regexpesc:e.regexpesc,tokenizer:e.tokenizer};export{i as conf,o as language};
@@ -1 +1 @@
1
- import{t as ze,bo as r,bw as De,b as He,bm as v2,bs as C2,bq as m2}from"./Dws-34a7.js";import{bs as Ae,a7 as L,ay as C,W as n,bn as Me,aA as a,aD as i,bS as z,c9 as _,bf as te,a5 as X,bA as J,b_ as P,aB as p,bl as Ne,bO as Ee,aC as b2}from"./3SdAC2_C.js";import{i as m}from"./DLCFUd4s.js";import{t as re}from"./D-rRuAXZ.js";import{c as M}from"./B5tvpTFB.js";import{e as Z,g as h2,f as K,c as ae,b as _2,s as B}from"./BD9db4FR.js";import{aC as p2,cT as x2,aB as w2,bG as k2,F as Re,d3 as y2}from"./CGYPBD6G.js";import{af as L2,ak as O2,al as T2,a1 as z2,ai as D2,aj as H2,f as A2}from"./BIGqOuh0.js";import"./BPuz5cN_.js";import{f as M2}from"./rXKOJqUt.js";import{c as Z2}from"./DcOkWaeN.js";var P2=p('<h4 class="type-body font-medium"> </h4>'),B2=p('<div class="flex items-start gap-2"><!> <!></div>'),W2=p("<p> </p>"),I2=p('<div class="type-caption"><!></div>'),S2=p("<div><!></div>"),F2=p("<div></div>"),N2=p('<div class="relative"><!> <div><!> <!> <!></div> <!></div> <!>',1),E2=p("<!><!>",1);function R2(x,t){if(new.target)return ze({component:R2,...x});Ae(t,!0);let l=r(t,"title",7,""),f=r(t,"description",7,""),b=r(t,"content",7),c=r(t,"side",7,"top"),d=r(t,"align",7,"center"),O=r(t,"sideOffset",7,8),W=r(t,"alignOffset",7,0),D=r(t,"delayDuration",7,200),u=r(t,"disableHoverableContent",7,!1),I=r(t,"disableCloseOnTriggerClick",7,!1),v=r(t,"disabled",7,!1),w=r(t,"open",15,!1),se=r(t,"onOpenChange",7),oe=r(t,"class",7,""),ne=r(t,"contentClass",7,""),ie=r(t,"contentContainerClass",7,""),le=r(t,"showArrow",7,!0),ce=r(t,"showClose",7,!1),de=r(t,"onClose",7),ge=r(t,"variant",7,"default"),fe=r(t,"maxWidth",7,"20rem"),S=r(t,"interactive",7,!1),ue=r(t,"disableAnimation",7,!1),Q=r(t,"children",7),U=r(t,"trigger",7),ve=r(t,"icon",7),V=r(t,"footer",7),Ce=r(t,"iconClass",7,""),me=r(t,"footerClass",7,""),be=r(t,"descriptionClass",7,""),he=r(t,"onclick",7);const je={default:{bg:"bg-popover",text:"text-popover-foreground",border:"",icon:null,iconColor:""},info:{bg:"bg-popover",text:"text-info",border:"border border-info/40",icon:k2,iconColor:"text-info"},success:{bg:"bg-popover",text:"text-success",border:"border border-success/40",icon:w2,iconColor:"text-success"},warning:{bg:"bg-popover",text:"text-warning-ink",border:"border border-warning/40",icon:x2,iconColor:"text-warning-ink"},error:{bg:"bg-danger",text:"text-danger-background",border:"border border-danger/40",icon:p2,iconColor:"text-danger-background"},custom:{bg:"",text:"",border:"",icon:null,iconColor:""}},F=_(()=>je[ge()]),_e=_(()=>ve()||i(F).icon),qe=_(()=>Z("overlay-surface z-(--layer-tooltip)",!ue()&&"tooltip-motion",i(F).bg,i(F).text,i(F).border,ne()));function Ge(e){w(e),se()?.(e)}function Xe(){w(!1),de()?.()}var Je={get title(){return l()},set title(e=""){l(e),a()},get description(){return f()},set description(e=""){f(e),a()},get content(){return b()},set content(e){b(e),a()},get side(){return c()},set side(e="top"){c(e),a()},get align(){return d()},set align(e="center"){d(e),a()},get sideOffset(){return O()},set sideOffset(e=8){O(e),a()},get alignOffset(){return W()},set alignOffset(e=0){W(e),a()},get delayDuration(){return D()},set delayDuration(e=200){D(e),a()},get disableHoverableContent(){return u()},set disableHoverableContent(e=!1){u(e),a()},get disableCloseOnTriggerClick(){return I()},set disableCloseOnTriggerClick(e=!1){I(e),a()},get disabled(){return v()},set disabled(e=!1){v(e),a()},get open(){return w()},set open(e=!1){w(e),a()},get onOpenChange(){return se()},set onOpenChange(e){se(e),a()},get class(){return oe()},set class(e=""){oe(e),a()},get contentClass(){return ne()},set contentClass(e=""){ne(e),a()},get contentContainerClass(){return ie()},set contentContainerClass(e=""){ie(e),a()},get showArrow(){return le()},set showArrow(e=!0){le(e),a()},get showClose(){return ce()},set showClose(e=!1){ce(e),a()},get onClose(){return de()},set onClose(e){de(e),a()},get variant(){return ge()},set variant(e="default"){ge(e),a()},get maxWidth(){return fe()},set maxWidth(e="20rem"){fe(e),a()},get interactive(){return S()},set interactive(e=!1){S(e),a()},get disableAnimation(){return ue()},set disableAnimation(e=!1){ue(e),a()},get children(){return Q()},set children(e){Q(e),a()},get trigger(){return U()},set trigger(e){U(e),a()},get icon(){return ve()},set icon(e){ve(e),a()},get footer(){return V()},set footer(e){V(e),a()},get iconClass(){return Ce()},set iconClass(e=""){Ce(e),a()},get footerClass(){return me()},set footerClass(e=""){me(e),a()},get descriptionClass(){return be()},set descriptionClass(e=""){be(e),a()},get onclick(){return he()},set onclick(e){he(e),a()},$set:De,$on:(e,pe)=>He(t,e,pe)},Ze=L(),Ke=C(Ze);{let e=_(()=>S()?0:D());M(Ke,()=>H2,(pe,Qe)=>{Qe(pe,{get delayDuration(){return i(e)},children:(Ue,Q2)=>{var Pe=L(),Ve=C(Pe);{let Ye=_(()=>S()?0:D()),$e=_(()=>!S()&&u());M(Ve,()=>L2,(e2,t2)=>{t2(e2,{onOpenChange:Ge,get delayDuration(){return i(Ye)},get disableHoverableContent(){return i($e)},get disableCloseOnTriggerClick(){return I()},get open(){return w()},set open(xe){w(xe)},children:(xe,U2)=>{var Be=E2(),We=C(Be);{const N=(E,R)=>{let we=()=>(R?.()).props;T2(E,{get triggerProps(){return we()},children:(ke,s2)=>{var j=L(),ye=C(j);{var Le=k=>{var H=L(),A=C(H);re(A,()=>U()??te),n(k,H)},Oe=k=>{var H=L(),A=C(H);re(A,()=>Q()??te),n(k,H)};m(ye,k=>{U()?k(Le):Q()&&k(Oe,1)})}n(ke,j)},$$slots:{default:!0}})};let Y=_(()=>Z("inline-flex",oe()));M(We,()=>O2,(E,R)=>{R(E,{get class(){return i(Y)},get disabled(){return v()},get onclick(){return he()},"data-tooltip-trigger":!0,child:N,$$slots:{child:!0}})})}var r2=z(We);{var a2=N=>{var Y=L(),E=C(Y);M(E,()=>z2,(R,we)=>{we(R,{children:(ke,s2)=>{var j=L(),ye=C(j);M(ye,()=>D2,(Le,Oe)=>{Oe(Le,{role:"tooltip",get side(){return c()},get align(){return d()},get sideOffset(){return O()},get alignOffset(){return W()},get class(){return i(qe)},"data-tooltip-content":!0,"data-overlay-surface":!0,onFocusOutside:()=>{},children:(k,H)=>{var A=N2(),$=C(A),Ie=X($);{var o2=s=>{{let o=_(()=>v2.ui_tooltipRich_close_ariaLabel());A2(s,{variant:"ghost",size:"icon-compact",onclick:Xe,class:"absolute -right-1 -top-1 size-5 rounded-md p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground motion-reduce:transition-none",get"aria-label"(){return i(o)},children:(g,y)=>{Re(g,{get icon(){return y2},size:"xs",class:"w-3 h-3"})},$$slots:{default:!0}})}};m(Ie,s=>{ce()&&s(o2)})}var ee=z(Ie,2),Se=X(ee);{var n2=s=>{var o=B2(),g=X(o);{var y=h=>{{let T=_(()=>Z("w-4 h-4 mt-0.5 flex-shrink-0",i(F).iconColor,Ce()));Re(h,{get icon(){return i(_e)},size:"1x",get class(){return i(T)}})}};m(g,h=>{i(_e)&&h(y)})}var q=z(g,2);{var G=h=>{var T=P2(),Te=Ne(T,!0);P(()=>Ee(Te,l())),n(h,T)};m(q,h=>{l()&&h(G)})}J(o),n(s,o)};m(Se,s=>{(l()||i(_e))&&s(n2)})}var Fe=z(Se,2);{var i2=s=>{var o=W2(),g=Ne(o,!0);P(y=>{K(o,1,y),Ee(g,f())},[()=>ae(Z("type-body opacity-90",be()))]),n(s,o)};m(Fe,s=>{f()&&s(i2)})}var l2=z(Fe,2);{var c2=s=>{var o=I2(),g=X(o);re(g,()=>b()??te),J(o),n(s,o)};m(l2,s=>{b()&&s(c2)})}J(ee);var d2=z(ee,2);{var g2=s=>{var o=S2(),g=X(o);re(g,()=>V()??te),J(o),P(y=>K(o,1,y),[()=>ae(Z("px-3 py-2",me()))]),n(s,o)};m(d2,s=>{V()&&s(g2)})}J($);var f2=z($,2);{var u2=s=>{var o=L(),g=C(o);{const y=(q,G)=>{let h=()=>(G?.()).props;var T=F2();_2(T,Te=>({class:Te,...h()}),[()=>Z("z-50 bg-border","data-[side=top]:w-px data-[side=top]:h-2","data-[side=bottom]:w-px data-[side=bottom]:h-2","data-[side=left]:h-px data-[side=left]:w-2","data-[side=right]:h-px data-[side=right]:w-2")]),n(q,T)};M(g,()=>M2,(q,G)=>{G(q,{child:y,$$slots:{child:!0}})})}n(s,o)};m(f2,s=>{le()&&s(u2)})}P(()=>{h2($,`max-width: ${fe()??""};`),K(ee,1,`px-3 py-2 space-y-1 ${ie()??""}`)}),n(k,A)},$$slots:{default:!0}})}),n(ke,j)},$$slots:{default:!0}})}),n(N,Y)};m(r2,N=>{!v()&&(l()||f()||b())&&N(a2)})}n(xe,Be)},$$slots:{default:!0}})})}n(Ue,Pe)},$$slots:{default:!0}})})}return n(x,Ze),Me(Je)}const j2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='%23222326'%20width='200'%20height='200'%20viewBox='0%200%20100%20100'%3e%3cpath%20d='M1.22541%2061.5228c-.2225-.9485.90748-1.5459%201.59638-.857L39.3342%2097.1782c.6889.6889.0915%201.8189-.857%201.5964C20.0515%2094.4522%205.54779%2079.9485%201.22541%2061.5228ZM.00189135%2046.8891c-.01764375.2833.08887215.5599.28957165.7606L52.3503%2099.7085c.2007.2007.4773.3075.7606.2896%202.3692-.1476%204.6938-.46%206.9624-.9259.7645-.157%201.0301-1.0963.4782-1.6481L2.57595%2039.4485c-.55186-.5519-1.49117-.2863-1.648174.4782-.465915%202.2686-.77832%204.5932-.92588465%206.9624ZM4.21093%2029.7054c-.16649.3738-.08169.8106.20765%201.1l64.77602%2064.776c.2894.2894.7262.3742%201.1.2077%201.7861-.7956%203.5171-1.6927%205.1855-2.684.5521-.328.6373-1.0867.1832-1.5407L8.43566%2024.3367c-.45409-.4541-1.21271-.3689-1.54074.1832-.99132%201.6684-1.88843%203.3994-2.68399%205.1855ZM12.6587%2018.074c-.3701-.3701-.393-.9637-.0443-1.3541C21.7795%206.45931%2035.1114%200%2049.9519%200%2077.5927%200%20100%2022.4073%20100%2050.0481c0%2014.8405-6.4593%2028.1724-16.7199%2037.3375-.3903.3487-.984.3258-1.3542-.0443L12.6587%2018.074Z'%20/%3e%3c/svg%3e",q2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='%23fff'%20width='200'%20height='200'%20viewBox='0%200%20100%20100'%3e%3cpath%20d='M1.22541%2061.5228c-.2225-.9485.90748-1.5459%201.59638-.857L39.3342%2097.1782c.6889.6889.0915%201.8189-.857%201.5964C20.0515%2094.4522%205.54779%2079.9485%201.22541%2061.5228ZM.00189135%2046.8891c-.01764375.2833.08887215.5599.28957165.7606L52.3503%2099.7085c.2007.2007.4773.3075.7606.2896%202.3692-.1476%204.6938-.46%206.9624-.9259.7645-.157%201.0301-1.0963.4782-1.6481L2.57595%2039.4485c-.55186-.5519-1.49117-.2863-1.648174.4782-.465915%202.2686-.77832%204.5932-.92588465%206.9624ZM4.21093%2029.7054c-.16649.3738-.08169.8106.20765%201.1l64.77602%2064.776c.2894.2894.7262.3742%201.1.2077%201.7861-.7956%203.5171-1.6927%205.1855-2.684.5521-.328.6373-1.0867.1832-1.5407L8.43566%2024.3367c-.45409-.4541-1.21271-.3689-1.54074.1832-.99132%201.6684-1.88843%203.3994-2.68399%205.1855ZM12.6587%2018.074c-.3701-.3701-.393-.9637-.0443-1.3541C21.7795%206.45931%2035.1114%200%2049.9519%200%2077.5927%200%20100%2022.4073%20100%2050.0481c0%2014.8405-6.4593%2028.1724-16.7199%2037.3375-.3903.3487-.984.3258-1.3542-.0443L12.6587%2018.074Z'%20/%3e%3c/svg%3e";var G2=p("<img/>");function X2(x,t){if(new.target)return ze({component:X2,...x});Ae(t,!0);const l=()=>C2(O,"$isDarkTheme",f),[f,b]=m2();let c=r(t,"size",7,16),d=r(t,"class",7,"");const O=Z2(),W="Linear";var D={get size(){return c()},set size(v=16){c(v),a()},get class(){return d()},set class(v=""){d(v),a()},$set:De,$on:(v,w)=>He(t,v,w)},u=G2();B(u,"alt",W),P(()=>{B(u,"src",l()?q2:j2),B(u,"width",c()),B(u,"height",c()),K(u,1,ae(d()))}),n(x,u);var I=Me(D);return b(),I}var J2=b2('<svg viewBox="0 0 278 245" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M160.822 12.5546C158.514 8.72421 155.255 5.5554 151.361 3.35567C147.467 1.15594 143.071 0 138.599 0C134.127 0 129.731 1.15594 125.838 3.35567C121.944 5.5554 118.685 8.72421 116.377 12.5546L79.8216 75.1657C107.749 89.1085 131.543 110.114 148.841 136.096C166.14 162.078 176.341 192.133 178.433 223.277H152.766C150.679 196.581 141.656 170.892 126.592 148.754C111.528 126.616 90.9439 108.795 66.8771 97.0546L33.0438 155.555C46.5734 161.622 58.3603 170.994 67.3207 182.809C76.281 194.623 82.1272 208.501 84.3216 223.166H25.3771C24.6781 223.116 24.0023 222.894 23.4108 222.518C22.8193 222.142 22.3306 221.625 21.9889 221.013C21.6471 220.401 21.463 219.714 21.4532 219.013C21.4434 218.312 21.6082 217.62 21.9327 216.999L38.266 189.221C32.7323 184.604 26.408 181.028 19.5994 178.666L3.43269 206.444C1.74966 209.33 0.657047 212.523 0.218326 215.835C-0.220395 219.148 0.00352239 222.515 0.877069 225.74C1.75062 228.966 3.25638 231.985 5.30688 234.624C7.35738 237.262 9.91174 239.467 12.8216 241.11C16.6554 243.27 20.9767 244.418 25.3771 244.444H106.099C107.599 225.944 104.295 207.371 96.5084 190.522C88.7219 173.674 76.7165 159.123 61.6549 148.277L74.4882 126.055C93.4962 139.11 108.771 156.896 118.806 177.657C128.841 198.419 133.289 221.438 131.71 244.444H200.099C201.692 209.593 194.11 174.936 178.112 143.934C162.114 112.932 138.26 86.6713 108.933 67.7769L134.877 23.3324C135.455 22.3638 136.393 21.6627 137.485 21.3818C138.578 21.1008 139.737 21.2628 140.71 21.8324C143.655 23.4435 253.433 214.999 255.488 217.221C255.85 217.871 256.035 218.604 256.022 219.347C256.01 220.091 255.802 220.818 255.418 221.455C255.035 222.092 254.49 222.616 253.839 222.975C253.188 223.334 252.454 223.515 251.71 223.499H225.266C225.599 230.573 225.599 237.629 225.266 244.666H251.822C255.194 244.688 258.537 244.041 261.657 242.762C264.777 241.484 267.613 239.599 270 237.217C272.387 234.835 274.278 232.003 275.563 228.886C276.849 225.768 277.503 222.427 277.488 219.055C277.492 214.601 276.302 210.227 274.044 206.388L160.822 12.5546Z"></path></svg>');function K2(x,t){if(new.target)return ze({component:K2,...x});Ae(t,!0);let l=r(t,"size",7,16),f=r(t,"class",7,"");var b={get size(){return l()},set size(d=16){l(d),a()},get class(){return f()},set class(d=""){f(d),a()},$set:De,$on:(d,O)=>He(t,d,O)},c=J2();return P(()=>{B(c,"width",l()),B(c,"height",l()),K(c,0,ae(f()))}),n(x,c),Me(b)}export{X2 as L,K2 as S,R2 as T};
1
+ import{t as ze,bo as r,bw as De,b as He,bm as v2,bs as C2,bq as m2}from"./YLhFQnIu.js";import{bs as Ae,a7 as L,ay as C,W as n,bn as Me,aA as a,aD as i,bS as z,c9 as _,bf as te,a5 as X,bA as J,b_ as P,aB as p,bl as Ne,bO as Ee,aC as b2}from"./3SdAC2_C.js";import{i as m}from"./YeOAvjnW.js";import{t as re}from"./CrpUtGFn.js";import{c as M}from"./DwGyIIXK.js";import{e as Z,g as h2,f as K,c as ae,b as _2,s as B}from"./BQhBnAuP.js";import{aC as p2,cT as x2,aB as w2,bG as k2,F as Re,d3 as y2}from"./gwv5JQYH.js";import{af as L2,ak as O2,al as T2,a1 as z2,ai as D2,aj as H2,f as A2}from"./Cw2fqKk9.js";import"./DJivXy66.js";import{f as M2}from"./CZB2ndi9.js";import{c as Z2}from"./D48_y-cl.js";var P2=p('<h4 class="type-body font-medium"> </h4>'),B2=p('<div class="flex items-start gap-2"><!> <!></div>'),W2=p("<p> </p>"),I2=p('<div class="type-caption"><!></div>'),S2=p("<div><!></div>"),F2=p("<div></div>"),N2=p('<div class="relative"><!> <div><!> <!> <!></div> <!></div> <!>',1),E2=p("<!><!>",1);function R2(x,t){if(new.target)return ze({component:R2,...x});Ae(t,!0);let l=r(t,"title",7,""),f=r(t,"description",7,""),b=r(t,"content",7),c=r(t,"side",7,"top"),d=r(t,"align",7,"center"),O=r(t,"sideOffset",7,8),W=r(t,"alignOffset",7,0),D=r(t,"delayDuration",7,200),u=r(t,"disableHoverableContent",7,!1),I=r(t,"disableCloseOnTriggerClick",7,!1),v=r(t,"disabled",7,!1),w=r(t,"open",15,!1),se=r(t,"onOpenChange",7),oe=r(t,"class",7,""),ne=r(t,"contentClass",7,""),ie=r(t,"contentContainerClass",7,""),le=r(t,"showArrow",7,!0),ce=r(t,"showClose",7,!1),de=r(t,"onClose",7),ge=r(t,"variant",7,"default"),fe=r(t,"maxWidth",7,"20rem"),S=r(t,"interactive",7,!1),ue=r(t,"disableAnimation",7,!1),Q=r(t,"children",7),U=r(t,"trigger",7),ve=r(t,"icon",7),V=r(t,"footer",7),Ce=r(t,"iconClass",7,""),me=r(t,"footerClass",7,""),be=r(t,"descriptionClass",7,""),he=r(t,"onclick",7);const je={default:{bg:"bg-popover",text:"text-popover-foreground",border:"",icon:null,iconColor:""},info:{bg:"bg-popover",text:"text-info",border:"border border-info/40",icon:k2,iconColor:"text-info"},success:{bg:"bg-popover",text:"text-success",border:"border border-success/40",icon:w2,iconColor:"text-success"},warning:{bg:"bg-popover",text:"text-warning-ink",border:"border border-warning/40",icon:x2,iconColor:"text-warning-ink"},error:{bg:"bg-danger",text:"text-danger-background",border:"border border-danger/40",icon:p2,iconColor:"text-danger-background"},custom:{bg:"",text:"",border:"",icon:null,iconColor:""}},F=_(()=>je[ge()]),_e=_(()=>ve()||i(F).icon),qe=_(()=>Z("overlay-surface z-(--layer-tooltip)",!ue()&&"tooltip-motion",i(F).bg,i(F).text,i(F).border,ne()));function Ge(e){w(e),se()?.(e)}function Xe(){w(!1),de()?.()}var Je={get title(){return l()},set title(e=""){l(e),a()},get description(){return f()},set description(e=""){f(e),a()},get content(){return b()},set content(e){b(e),a()},get side(){return c()},set side(e="top"){c(e),a()},get align(){return d()},set align(e="center"){d(e),a()},get sideOffset(){return O()},set sideOffset(e=8){O(e),a()},get alignOffset(){return W()},set alignOffset(e=0){W(e),a()},get delayDuration(){return D()},set delayDuration(e=200){D(e),a()},get disableHoverableContent(){return u()},set disableHoverableContent(e=!1){u(e),a()},get disableCloseOnTriggerClick(){return I()},set disableCloseOnTriggerClick(e=!1){I(e),a()},get disabled(){return v()},set disabled(e=!1){v(e),a()},get open(){return w()},set open(e=!1){w(e),a()},get onOpenChange(){return se()},set onOpenChange(e){se(e),a()},get class(){return oe()},set class(e=""){oe(e),a()},get contentClass(){return ne()},set contentClass(e=""){ne(e),a()},get contentContainerClass(){return ie()},set contentContainerClass(e=""){ie(e),a()},get showArrow(){return le()},set showArrow(e=!0){le(e),a()},get showClose(){return ce()},set showClose(e=!1){ce(e),a()},get onClose(){return de()},set onClose(e){de(e),a()},get variant(){return ge()},set variant(e="default"){ge(e),a()},get maxWidth(){return fe()},set maxWidth(e="20rem"){fe(e),a()},get interactive(){return S()},set interactive(e=!1){S(e),a()},get disableAnimation(){return ue()},set disableAnimation(e=!1){ue(e),a()},get children(){return Q()},set children(e){Q(e),a()},get trigger(){return U()},set trigger(e){U(e),a()},get icon(){return ve()},set icon(e){ve(e),a()},get footer(){return V()},set footer(e){V(e),a()},get iconClass(){return Ce()},set iconClass(e=""){Ce(e),a()},get footerClass(){return me()},set footerClass(e=""){me(e),a()},get descriptionClass(){return be()},set descriptionClass(e=""){be(e),a()},get onclick(){return he()},set onclick(e){he(e),a()},$set:De,$on:(e,pe)=>He(t,e,pe)},Ze=L(),Ke=C(Ze);{let e=_(()=>S()?0:D());M(Ke,()=>H2,(pe,Qe)=>{Qe(pe,{get delayDuration(){return i(e)},children:(Ue,Q2)=>{var Pe=L(),Ve=C(Pe);{let Ye=_(()=>S()?0:D()),$e=_(()=>!S()&&u());M(Ve,()=>L2,(e2,t2)=>{t2(e2,{onOpenChange:Ge,get delayDuration(){return i(Ye)},get disableHoverableContent(){return i($e)},get disableCloseOnTriggerClick(){return I()},get open(){return w()},set open(xe){w(xe)},children:(xe,U2)=>{var Be=E2(),We=C(Be);{const N=(E,R)=>{let we=()=>(R?.()).props;T2(E,{get triggerProps(){return we()},children:(ke,s2)=>{var j=L(),ye=C(j);{var Le=k=>{var H=L(),A=C(H);re(A,()=>U()??te),n(k,H)},Oe=k=>{var H=L(),A=C(H);re(A,()=>Q()??te),n(k,H)};m(ye,k=>{U()?k(Le):Q()&&k(Oe,1)})}n(ke,j)},$$slots:{default:!0}})};let Y=_(()=>Z("inline-flex",oe()));M(We,()=>O2,(E,R)=>{R(E,{get class(){return i(Y)},get disabled(){return v()},get onclick(){return he()},"data-tooltip-trigger":!0,child:N,$$slots:{child:!0}})})}var r2=z(We);{var a2=N=>{var Y=L(),E=C(Y);M(E,()=>z2,(R,we)=>{we(R,{children:(ke,s2)=>{var j=L(),ye=C(j);M(ye,()=>D2,(Le,Oe)=>{Oe(Le,{role:"tooltip",get side(){return c()},get align(){return d()},get sideOffset(){return O()},get alignOffset(){return W()},get class(){return i(qe)},"data-tooltip-content":!0,"data-overlay-surface":!0,onFocusOutside:()=>{},children:(k,H)=>{var A=N2(),$=C(A),Ie=X($);{var o2=s=>{{let o=_(()=>v2.ui_tooltipRich_close_ariaLabel());A2(s,{variant:"ghost",size:"icon-compact",onclick:Xe,class:"absolute -right-1 -top-1 size-5 rounded-md p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground motion-reduce:transition-none",get"aria-label"(){return i(o)},children:(g,y)=>{Re(g,{get icon(){return y2},size:"xs",class:"w-3 h-3"})},$$slots:{default:!0}})}};m(Ie,s=>{ce()&&s(o2)})}var ee=z(Ie,2),Se=X(ee);{var n2=s=>{var o=B2(),g=X(o);{var y=h=>{{let T=_(()=>Z("w-4 h-4 mt-0.5 flex-shrink-0",i(F).iconColor,Ce()));Re(h,{get icon(){return i(_e)},size:"1x",get class(){return i(T)}})}};m(g,h=>{i(_e)&&h(y)})}var q=z(g,2);{var G=h=>{var T=P2(),Te=Ne(T,!0);P(()=>Ee(Te,l())),n(h,T)};m(q,h=>{l()&&h(G)})}J(o),n(s,o)};m(Se,s=>{(l()||i(_e))&&s(n2)})}var Fe=z(Se,2);{var i2=s=>{var o=W2(),g=Ne(o,!0);P(y=>{K(o,1,y),Ee(g,f())},[()=>ae(Z("type-body opacity-90",be()))]),n(s,o)};m(Fe,s=>{f()&&s(i2)})}var l2=z(Fe,2);{var c2=s=>{var o=I2(),g=X(o);re(g,()=>b()??te),J(o),n(s,o)};m(l2,s=>{b()&&s(c2)})}J(ee);var d2=z(ee,2);{var g2=s=>{var o=S2(),g=X(o);re(g,()=>V()??te),J(o),P(y=>K(o,1,y),[()=>ae(Z("px-3 py-2",me()))]),n(s,o)};m(d2,s=>{V()&&s(g2)})}J($);var f2=z($,2);{var u2=s=>{var o=L(),g=C(o);{const y=(q,G)=>{let h=()=>(G?.()).props;var T=F2();_2(T,Te=>({class:Te,...h()}),[()=>Z("z-50 bg-border","data-[side=top]:w-px data-[side=top]:h-2","data-[side=bottom]:w-px data-[side=bottom]:h-2","data-[side=left]:h-px data-[side=left]:w-2","data-[side=right]:h-px data-[side=right]:w-2")]),n(q,T)};M(g,()=>M2,(q,G)=>{G(q,{child:y,$$slots:{child:!0}})})}n(s,o)};m(f2,s=>{le()&&s(u2)})}P(()=>{h2($,`max-width: ${fe()??""};`),K(ee,1,`px-3 py-2 space-y-1 ${ie()??""}`)}),n(k,A)},$$slots:{default:!0}})}),n(ke,j)},$$slots:{default:!0}})}),n(N,Y)};m(r2,N=>{!v()&&(l()||f()||b())&&N(a2)})}n(xe,Be)},$$slots:{default:!0}})})}n(Ue,Pe)},$$slots:{default:!0}})})}return n(x,Ze),Me(Je)}const j2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='%23222326'%20width='200'%20height='200'%20viewBox='0%200%20100%20100'%3e%3cpath%20d='M1.22541%2061.5228c-.2225-.9485.90748-1.5459%201.59638-.857L39.3342%2097.1782c.6889.6889.0915%201.8189-.857%201.5964C20.0515%2094.4522%205.54779%2079.9485%201.22541%2061.5228ZM.00189135%2046.8891c-.01764375.2833.08887215.5599.28957165.7606L52.3503%2099.7085c.2007.2007.4773.3075.7606.2896%202.3692-.1476%204.6938-.46%206.9624-.9259.7645-.157%201.0301-1.0963.4782-1.6481L2.57595%2039.4485c-.55186-.5519-1.49117-.2863-1.648174.4782-.465915%202.2686-.77832%204.5932-.92588465%206.9624ZM4.21093%2029.7054c-.16649.3738-.08169.8106.20765%201.1l64.77602%2064.776c.2894.2894.7262.3742%201.1.2077%201.7861-.7956%203.5171-1.6927%205.1855-2.684.5521-.328.6373-1.0867.1832-1.5407L8.43566%2024.3367c-.45409-.4541-1.21271-.3689-1.54074.1832-.99132%201.6684-1.88843%203.3994-2.68399%205.1855ZM12.6587%2018.074c-.3701-.3701-.393-.9637-.0443-1.3541C21.7795%206.45931%2035.1114%200%2049.9519%200%2077.5927%200%20100%2022.4073%20100%2050.0481c0%2014.8405-6.4593%2028.1724-16.7199%2037.3375-.3903.3487-.984.3258-1.3542-.0443L12.6587%2018.074Z'%20/%3e%3c/svg%3e",q2="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='%23fff'%20width='200'%20height='200'%20viewBox='0%200%20100%20100'%3e%3cpath%20d='M1.22541%2061.5228c-.2225-.9485.90748-1.5459%201.59638-.857L39.3342%2097.1782c.6889.6889.0915%201.8189-.857%201.5964C20.0515%2094.4522%205.54779%2079.9485%201.22541%2061.5228ZM.00189135%2046.8891c-.01764375.2833.08887215.5599.28957165.7606L52.3503%2099.7085c.2007.2007.4773.3075.7606.2896%202.3692-.1476%204.6938-.46%206.9624-.9259.7645-.157%201.0301-1.0963.4782-1.6481L2.57595%2039.4485c-.55186-.5519-1.49117-.2863-1.648174.4782-.465915%202.2686-.77832%204.5932-.92588465%206.9624ZM4.21093%2029.7054c-.16649.3738-.08169.8106.20765%201.1l64.77602%2064.776c.2894.2894.7262.3742%201.1.2077%201.7861-.7956%203.5171-1.6927%205.1855-2.684.5521-.328.6373-1.0867.1832-1.5407L8.43566%2024.3367c-.45409-.4541-1.21271-.3689-1.54074.1832-.99132%201.6684-1.88843%203.3994-2.68399%205.1855ZM12.6587%2018.074c-.3701-.3701-.393-.9637-.0443-1.3541C21.7795%206.45931%2035.1114%200%2049.9519%200%2077.5927%200%20100%2022.4073%20100%2050.0481c0%2014.8405-6.4593%2028.1724-16.7199%2037.3375-.3903.3487-.984.3258-1.3542-.0443L12.6587%2018.074Z'%20/%3e%3c/svg%3e";var G2=p("<img/>");function X2(x,t){if(new.target)return ze({component:X2,...x});Ae(t,!0);const l=()=>C2(O,"$isDarkTheme",f),[f,b]=m2();let c=r(t,"size",7,16),d=r(t,"class",7,"");const O=Z2(),W="Linear";var D={get size(){return c()},set size(v=16){c(v),a()},get class(){return d()},set class(v=""){d(v),a()},$set:De,$on:(v,w)=>He(t,v,w)},u=G2();B(u,"alt",W),P(()=>{B(u,"src",l()?q2:j2),B(u,"width",c()),B(u,"height",c()),K(u,1,ae(d()))}),n(x,u);var I=Me(D);return b(),I}var J2=b2('<svg viewBox="0 0 278 245" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M160.822 12.5546C158.514 8.72421 155.255 5.5554 151.361 3.35567C147.467 1.15594 143.071 0 138.599 0C134.127 0 129.731 1.15594 125.838 3.35567C121.944 5.5554 118.685 8.72421 116.377 12.5546L79.8216 75.1657C107.749 89.1085 131.543 110.114 148.841 136.096C166.14 162.078 176.341 192.133 178.433 223.277H152.766C150.679 196.581 141.656 170.892 126.592 148.754C111.528 126.616 90.9439 108.795 66.8771 97.0546L33.0438 155.555C46.5734 161.622 58.3603 170.994 67.3207 182.809C76.281 194.623 82.1272 208.501 84.3216 223.166H25.3771C24.6781 223.116 24.0023 222.894 23.4108 222.518C22.8193 222.142 22.3306 221.625 21.9889 221.013C21.6471 220.401 21.463 219.714 21.4532 219.013C21.4434 218.312 21.6082 217.62 21.9327 216.999L38.266 189.221C32.7323 184.604 26.408 181.028 19.5994 178.666L3.43269 206.444C1.74966 209.33 0.657047 212.523 0.218326 215.835C-0.220395 219.148 0.00352239 222.515 0.877069 225.74C1.75062 228.966 3.25638 231.985 5.30688 234.624C7.35738 237.262 9.91174 239.467 12.8216 241.11C16.6554 243.27 20.9767 244.418 25.3771 244.444H106.099C107.599 225.944 104.295 207.371 96.5084 190.522C88.7219 173.674 76.7165 159.123 61.6549 148.277L74.4882 126.055C93.4962 139.11 108.771 156.896 118.806 177.657C128.841 198.419 133.289 221.438 131.71 244.444H200.099C201.692 209.593 194.11 174.936 178.112 143.934C162.114 112.932 138.26 86.6713 108.933 67.7769L134.877 23.3324C135.455 22.3638 136.393 21.6627 137.485 21.3818C138.578 21.1008 139.737 21.2628 140.71 21.8324C143.655 23.4435 253.433 214.999 255.488 217.221C255.85 217.871 256.035 218.604 256.022 219.347C256.01 220.091 255.802 220.818 255.418 221.455C255.035 222.092 254.49 222.616 253.839 222.975C253.188 223.334 252.454 223.515 251.71 223.499H225.266C225.599 230.573 225.599 237.629 225.266 244.666H251.822C255.194 244.688 258.537 244.041 261.657 242.762C264.777 241.484 267.613 239.599 270 237.217C272.387 234.835 274.278 232.003 275.563 228.886C276.849 225.768 277.503 222.427 277.488 219.055C277.492 214.601 276.302 210.227 274.044 206.388L160.822 12.5546Z"></path></svg>');function K2(x,t){if(new.target)return ze({component:K2,...x});Ae(t,!0);let l=r(t,"size",7,16),f=r(t,"class",7,"");var b={get size(){return l()},set size(d=16){l(d),a()},get class(){return f()},set class(d=""){f(d),a()},$set:De,$on:(d,O)=>He(t,d,O)},c=J2();return P(()=>{B(c,"width",l()),B(c,"height",l()),K(c,0,ae(f()))}),n(x,c),Me(b)}export{X2 as L,K2 as S,R2 as T};
@@ -1,4 +1,4 @@
1
- import{p as e}from"./BD9db4FR.js";const t=[{id:"editorial-card",title:"Editorial card states",states:["default","group","inline","outlined","separated","selected","fluid-hover","header","flush-content","interactive","pressed","empty","long-content","compact","zoom-200","inert","light","dark","reduced-motion"],themes:["light","dark"],viewport:"both",reducedMotion:!0}];e({id:"card",source:"src/lib/components/ui/card/card.svelte",publicImport:"$lib/components/ui/card",legacyImports:[],exports:["Action","CARD_CONTENT_INSET_CLASS","CARD_ROW_GUTTER_CLASS","Card","CardAction","CardContent","CardDescription","CardFooter","CardGroup","CardHeader","CardTitle","Content","Description","Footer","Group","Header","Root","Title","cardMetadata"],usage:`<script lang="ts">
1
+ import{p as e}from"./BQhBnAuP.js";const t=[{id:"editorial-card",title:"Editorial card states",states:["default","group","inline","outlined","separated","selected","fluid-hover","header","flush-content","interactive","pressed","empty","long-content","compact","zoom-200","inert","light","dark","reduced-motion"],themes:["light","dark"],viewport:"both",reducedMotion:!0}];e({id:"card",source:"src/lib/components/ui/card/card.svelte",publicImport:"$lib/components/ui/card",legacyImports:[],exports:["Action","CARD_CONTENT_INSET_CLASS","CARD_ROW_GUTTER_CLASS","Card","CardAction","CardContent","CardDescription","CardFooter","CardGroup","CardHeader","CardTitle","Content","Description","Footer","Group","Header","Root","Title","cardMetadata"],usage:`<script lang="ts">
2
2
  import * as Card from '$lib/components/ui/card';
3
3
  <\/script>
4
4