decocms 3.1.0 → 3.2.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 (254) hide show
  1. package/dist/client/assets/{AlertCircle-I5aAKx5s.js → AlertCircle-eeQ8IQAG.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-DUqwCMWv.js → ArrowUpRight-Byg2JlTz.js} +1 -1
  3. package/dist/client/assets/{Check-5-utiman.js → Check-DA5UKh5X.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-CA1UzIEX.js → CheckCircle-mjn-ZBg3.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-BRUPOd-D.js → ChevronDown-CYgGBXvc.js} +1 -1
  6. package/dist/client/assets/ChevronLeft-BE2hdOnx.js +1 -0
  7. package/dist/client/assets/{ChevronRight-AaMPC6ii.js → ChevronRight-Bp_pdC8P.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-B3N7TOrA.js → ChevronUp-BwxnNvDR.js} +1 -1
  9. package/dist/client/assets/{Container-Bjo8FVL5.js → Container-DZK-zSnO.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-kyMVsMi3.js → DotsVertical-L-zHFr4w.js} +1 -1
  11. package/dist/client/assets/{Eye-FA0T_9KR.js → Eye-6gmxXOun.js} +1 -1
  12. package/dist/client/assets/{FilterLines-Dx0-KOH1.js → FilterLines-DaVWBoHw.js} +1 -1
  13. package/dist/client/assets/{Globe01-BdrXaQ4t.js → Globe01-DLq7QB09.js} +1 -1
  14. package/dist/client/assets/{HardDrive-uqc3Mfxn.js → HardDrive-UOXMLLuN.js} +1 -1
  15. package/dist/client/assets/{Key01-4CEC30CH.js → Key01-DQUmqdKK.js} +1 -1
  16. package/dist/client/assets/{LinkExternal01-sg0X3i7p.js → LinkExternal01-BbkedL4y.js} +1 -1
  17. package/dist/client/assets/{Monitor01-CTE-M7aU.js → Monitor01-me2M7qcF.js} +1 -1
  18. package/dist/client/assets/{Palette-DW_AOTeX.js → Palette-cwbQQzjc.js} +1 -1
  19. package/dist/client/assets/{Play-P4fR-0E_.js → Play-D39faotb.js} +1 -1
  20. package/dist/client/assets/{Plus-WVvC1Th4.js → Plus-CxUOnaMo.js} +1 -1
  21. package/dist/client/assets/{RefreshCcw01-Dg7_NhVx.js → RefreshCcw01-drWDN7HN.js} +1 -1
  22. package/dist/client/assets/{SearchMd-cBVn0Mcd.js → SearchMd-Cd3-NscL.js} +1 -1
  23. package/dist/client/assets/{Settings02-J55NFzUl.js → Settings02-DWxCysLt.js} +1 -1
  24. package/dist/client/assets/{Shield01-CITJSPye.js → Shield01-CgUSh4ss.js} +1 -1
  25. package/dist/client/assets/{Star01-DQCFITlh.js → Star01-BCTguvLh.js} +1 -1
  26. package/dist/client/assets/{Stars01-BQqwEiIH.js → Stars01-CScMgUNS.js} +1 -1
  27. package/dist/client/assets/{Stars02-CnxGzx_a.js → Stars02-DhCmA77R.js} +1 -1
  28. package/dist/client/assets/{Sun-CvvLh7O4.js → Sun-Cl4W5MYc.js} +1 -1
  29. package/dist/client/assets/{SwitchHorizontal01-D6GIRPJ1.js → SwitchHorizontal01-M-IO9U7X.js} +1 -1
  30. package/dist/client/assets/{Tool01-DBZmckgJ.js → Tool01-BGfKCaOe.js} +1 -1
  31. package/dist/client/assets/{Trash01-BMiuF02D.js → Trash01-BOqsHAki.js} +1 -1
  32. package/dist/client/assets/{Upload01-DhlN2oeP.js → Upload01-cIFihtD7.js} +1 -1
  33. package/dist/client/assets/{User01-D0BthoTv.js → User01-CRsYdqKf.js} +1 -1
  34. package/dist/client/assets/{Users01-B6kJjdmQ.js → Users01-CwvwFmnT.js} +1 -1
  35. package/dist/client/assets/{Users03-a4EwkzcR.js → Users03-Cy6p41F6.js} +1 -1
  36. package/dist/client/assets/{X-BwvdKywg.js → X-D4woLNFq.js} +1 -1
  37. package/dist/client/assets/{XCircle-BVR438yI.js → XCircle-CdiDJXb-.js} +1 -1
  38. package/dist/client/assets/{XClose-CeXjq2Ks.js → XClose-REUNo7hV.js} +1 -1
  39. package/dist/client/assets/{Zap-Cbw9kHWr.js → Zap-mREy1Qov.js} +1 -1
  40. package/dist/client/assets/ZapSquare-DZf6Sug7.js +1 -0
  41. package/dist/client/assets/ZoomOut-aDyKTD6y.js +1 -0
  42. package/dist/client/assets/{access-gate-CFCd65pW.js → access-gate-CzQMusXf.js} +1 -1
  43. package/dist/client/assets/accordion-CxUU-7zP.js +1 -0
  44. package/dist/client/assets/add-section-modal-Le33kmS8.js +1 -0
  45. package/dist/client/assets/{agent-capabilities-P2Ed3uET.js → agent-capabilities-C24cyovb.js} +1 -1
  46. package/dist/client/assets/agent-icon-DQY5C0N2.js +1 -0
  47. package/dist/client/assets/{agent-icons-VZFS25ox.js → agent-icons-CiX6fHGt.js} +1 -1
  48. package/dist/client/assets/agents-list-DmjHmKun.js +1 -0
  49. package/dist/client/assets/{ai-providers-C1nH-38Z.js → ai-providers-mUhUziNN.js} +1 -1
  50. package/dist/client/assets/{alert-CQF_YV7o.js → alert-BbsUklRQ.js} +1 -1
  51. package/dist/client/assets/{alert-dialog-Bvyir_5o.js → alert-dialog-BPHTzN62.js} +1 -1
  52. package/dist/client/assets/app-editor-Cv2zA-6I.js +1 -0
  53. package/dist/client/assets/{auth-catchall-BnV7GUx1.js → auth-catchall-lSq11uBl.js} +1 -1
  54. package/dist/client/assets/{auth-split-layout-DzSTdIYV.js → auth-split-layout-BCUlxOAp.js} +1 -1
  55. package/dist/client/assets/{automation-list-row-Bo6miFHP.js → automation-list-row-zUvBCUZa.js} +1 -1
  56. package/dist/client/assets/{automation-runs-CDd6q4GC.js → automation-runs-v18Lkih8.js} +1 -1
  57. package/dist/client/assets/automations-Qm0D-6AG.js +1 -0
  58. package/dist/client/assets/{avatar-DRLQAp0U.js → avatar-C8mqvhp_.js} +1 -1
  59. package/dist/client/assets/{badge-DKUnZ67J.js → badge-aL_u7ZDP.js} +1 -1
  60. package/dist/client/assets/{brand-context-Co32YwBP.js → brand-context-CGxwlq0O.js} +1 -1
  61. package/dist/client/assets/{buckets-DhUJ8i8x.js → buckets-DYPtvGJ1.js} +1 -1
  62. package/dist/client/assets/calendar-DddAMJZc.js +1 -0
  63. package/dist/client/assets/{capability-load-error-mrR6n6ef.js → capability-load-error-So5ymzsn.js} +1 -1
  64. package/dist/client/assets/{card-mrz_YqFP.js → card-BIxqjUba.js} +1 -1
  65. package/dist/client/assets/{chat-context-xK_w16Am.js → chat-context-B5R7Bsxn.js} +1 -1
  66. package/dist/client/assets/{checkbox-D4JiAIiY.js → checkbox-DXKahMoV.js} +1 -1
  67. package/dist/client/assets/{cli-auth-success-D9eaRLqQ.js → cli-auth-success-C2saOMke.js} +1 -1
  68. package/dist/client/assets/collection-detail-D8ggdXLI.js +1 -0
  69. package/dist/client/assets/{collection-display-button-9zcw0Pse.js → collection-display-button-DvEoSW0w.js} +1 -1
  70. package/dist/client/assets/{collection-search-CBN_q_XM.js → collection-search-ChQblPf0.js} +1 -1
  71. package/dist/client/assets/{collection-table-wrapper-CN3rSGu3.js → collection-table-wrapper-CHFC6KhT.js} +1 -1
  72. package/dist/client/assets/{collection-tabs-BoWMCCpv.js → collection-tabs-GHQguzy_.js} +1 -1
  73. package/dist/client/assets/{collections-D3-t_Oif.js → collections-B2PRHYqJ.js} +1 -1
  74. package/dist/client/assets/{command-DT1FhdNv.js → command-A1tt2dvQ.js} +1 -1
  75. package/dist/client/assets/{connect-desktop-dialog-BDYQrQzN.js → connect-desktop-dialog-CUc_k3J7.js} +1 -1
  76. package/dist/client/assets/{connection-card-CWg85UPa.js → connection-card-ChcbOLys.js} +1 -1
  77. package/dist/client/assets/connection-detail-U_5KXkyF.js +1 -0
  78. package/dist/client/assets/{connection-form-helpers-I069qG8R.js → connection-form-helpers--wI2Mdjh.js} +1 -1
  79. package/dist/client/assets/connections-07oXzLs7.js +1 -0
  80. package/dist/client/assets/{constants-bvvELg6A.js → constants-BrUmWQ5v.js} +1 -1
  81. package/dist/client/assets/{decopilot-sse-pool-DZUcRlvx.js → decopilot-sse-pool-bx3Tzt-N.js} +1 -1
  82. package/dist/client/assets/dialog-DJ-H5eyi.js +1 -0
  83. package/dist/client/assets/{domain-settings-D_JQJ-_q.js → domain-settings-Bj8qY-gX.js} +1 -1
  84. package/dist/client/assets/{drawer-D-eRrcRE.js → drawer-BDlt-eEN.js} +1 -1
  85. package/dist/client/assets/{dropdown-menu-39FgxtLo.js → dropdown-menu-D2H5uhoI.js} +1 -1
  86. package/dist/client/assets/{dynamic-plugin-layout-d4yFw-ZE.js → dynamic-plugin-layout-Cf_TaIUq.js} +1 -1
  87. package/dist/client/assets/{empty-state-Cs0Tx7DE.js → empty-state-DxUsOjfR.js} +1 -1
  88. package/dist/client/assets/{empty-state-Cv3pDKB-.js → empty-state-PvmElhTC.js} +1 -1
  89. package/dist/client/assets/{extract-connection-data-DRKXxZ8i.js → extract-connection-data-BVH-NR56.js} +1 -1
  90. package/dist/client/assets/{features-BrIK7ax2.js → features-CNIUazHE.js} +1 -1
  91. package/dist/client/assets/file-explorer-B_0gIGYU.js +2 -0
  92. package/dist/client/assets/{file-type-icon-J1MyTx05.js → file-type-icon-5-Jlm8ee.js} +1 -1
  93. package/dist/client/assets/{files-Gd1f-YUl.js → files-Dmr-ntT-.js} +1 -1
  94. package/dist/client/assets/{form-BFCHHJw7.js → form-CO8TZWfS.js} +1 -1
  95. package/dist/client/assets/{general-Hc1ImFmK.js → general-DH2-DqRy.js} +1 -1
  96. package/dist/client/assets/{generate-id-BoTFc93G.js → generate-id-5eMpRIJR.js} +1 -1
  97. package/dist/client/assets/{github-repo-picker-CJ1plqRU.js → github-repo-picker-D1NpZ6ct.js} +1 -1
  98. package/dist/client/assets/header-tab-button-B5RTsjq3.js +3 -0
  99. package/dist/client/assets/{hover-card-CW2-sshf.js → hover-card-B0ZnutE8.js} +1 -1
  100. package/dist/client/assets/{image-field-GBQBz7jx.js → image-field-DH6NL7As.js} +1 -1
  101. package/dist/client/assets/{index-Dlj9BqPT.js → index--2_kkJgD.js} +1 -1
  102. package/dist/client/assets/{index-CbPPWvrX.js → index--ipoW5Od.js} +2 -2
  103. package/dist/client/assets/index-BK9ucwVY.js +11 -0
  104. package/dist/client/assets/index-BQA4WrEz.js +1 -0
  105. package/dist/client/assets/{index-XCMOYuFO.js → index-BZB5wdSX.js} +1 -1
  106. package/dist/client/assets/{index-BpHDMydO.js → index-C8xgZP7Q.js} +1 -1
  107. package/dist/client/assets/{index-NkmnXqLU.js → index-CTonnX5C.js} +3 -3
  108. package/dist/client/assets/{index-D-h2wBuz.js → index-CX5zsV6g.js} +1 -1
  109. package/dist/client/assets/{index-Dh31lfjw.js → index-CohPXzOU.js} +1 -1
  110. package/dist/client/assets/{index-DG1wYdtC.js → index-DY-bhBl7.js} +24 -26
  111. package/dist/client/assets/index-Dd3eFW2j.js +1 -0
  112. package/dist/client/assets/{index-C8tR8eRp.js → index-Dh_ZP8gM.js} +1 -1
  113. package/dist/client/assets/{index-0jxZXjT_.js → index-Dj0KvohQ.js} +4 -4
  114. package/dist/client/assets/index-DzP6PZZ7.css +1 -0
  115. package/dist/client/assets/index-d4-4-LoF.js +3 -0
  116. package/dist/client/assets/{index-redirect-CtRf-K0w.js → index-redirect-DcDs3uRh.js} +1 -1
  117. package/dist/client/assets/{index-B0yf3v8e.js → index-zuFZRdMw.js} +1 -1
  118. package/dist/client/assets/{infiniteQueryObserver-BHyRmyuw.js → infiniteQueryObserver-By84F0-S.js} +1 -1
  119. package/dist/client/assets/{input-BJ1rHrAh.js → input-D7b0qTbD.js} +1 -1
  120. package/dist/client/assets/{integration-icon-B34NO5DZ.js → integration-icon-CfgTtI5o.js} +1 -1
  121. package/dist/client/assets/{label-Ces90Ob6.js → label-CYTFcC5V.js} +1 -1
  122. package/dist/client/assets/{layout-BObWYQOR.js → layout-CPR4jtia.js} +1 -1
  123. package/dist/client/assets/{login-CmFqIafL.js → login-C3iJJq1l.js} +1 -1
  124. package/dist/client/assets/{members-Ldm47cLr.js → members-C4ocetfC.js} +1 -1
  125. package/dist/client/assets/monaco-editor-KhKv-sJZ.js +9 -0
  126. package/dist/client/assets/{monitoring-stats-row-Bi90V9hM.js → monitoring-stats-row-CKv35kXI.js} +1 -1
  127. package/dist/client/assets/{oauth-callback-BajSrp4p.js → oauth-callback-DYj7ZiBe.js} +1 -1
  128. package/dist/client/assets/{oauth-callback-ai-provider-M6LqzdG-.js → oauth-callback-ai-provider-BGdEvz_Y.js} +1 -1
  129. package/dist/client/assets/{onboarding-BOdaHuUD.js → onboarding-D6Xk0wL6.js} +1 -1
  130. package/dist/client/assets/{org-install-BXFui3MR.js → org-install-CEC4BLF-.js} +1 -1
  131. package/dist/client/assets/{org-layout-DLehdBZw.js → org-layout-BE5MLVkw.js} +1 -1
  132. package/dist/client/assets/{org-plugin-layout-Dc3cW9pW.js → org-plugin-layout-L5iGkhHt.js} +1 -1
  133. package/dist/client/assets/{page-seo-form-Ba6J76YC.js → page-seo-form-jxY-H_g3.js} +1 -1
  134. package/dist/client/assets/page-seo-sheet-DsZP33VR.js +1 -0
  135. package/dist/client/assets/{pair-8URjhbdi.js → pair-BBpXnc-h.js} +1 -1
  136. package/dist/client/assets/{plugin-empty-state-nbJy5gbu.js → plugin-empty-state-DWClfnpF.js} +1 -1
  137. package/dist/client/assets/{plugin-header-BOwZcASL.js → plugin-header-Z6RQivcP.js} +1 -1
  138. package/dist/client/assets/{plugin-layout-DnOSNazi.js → plugin-layout-vnnJlQxa.js} +1 -1
  139. package/dist/client/assets/{popover-CvKJiX83.js → popover-lyccXPhR.js} +1 -1
  140. package/dist/client/assets/{post-editor-DYIIhxtg.js → post-editor-DxyYIPy4.js} +2 -2
  141. package/dist/client/assets/{primitives-CCwkgknT.js → primitives-BJLFwP4M.js} +1 -1
  142. package/dist/client/assets/{profile-nmeOosOi.js → profile-D0mq2N64.js} +1 -1
  143. package/dist/client/assets/project-app-view-Cf5PFYO6.js +1 -0
  144. package/dist/client/assets/record-editor-CNQSVEjq.js +1 -0
  145. package/dist/client/assets/registry-Ee2akcS9.js +2 -0
  146. package/dist/client/assets/{registry-layout-uxAOVQng.js → registry-layout-DJdGkFsS.js} +1 -1
  147. package/dist/client/assets/{require-capability-CA7mIlLg.js → require-capability-l0UYKnJd.js} +1 -1
  148. package/dist/client/assets/{required-auth-layout-Bsfg7CLj.js → required-auth-layout-BGUftSDY.js} +1 -1
  149. package/dist/client/assets/{reset-password-Ul1CROcF.js → reset-password-FUpnkHMr.js} +1 -1
  150. package/dist/client/assets/resizable-DwJvPNj4.js +1 -0
  151. package/dist/client/assets/roles-BuPsd2Xq.js +1 -0
  152. package/dist/client/assets/{save-status-Cfu7sTcH.js → save-status-QxvffYyD.js} +1 -1
  153. package/dist/client/assets/schema-form-BdWc4cV5.js +1 -0
  154. package/dist/client/assets/{scroll-area-43OyCToQ.js → scroll-area-B_h8lIJ9.js} +2 -2
  155. package/dist/client/assets/{search-input-CIl-bXGa.js → search-input-BKOtoJjA.js} +1 -1
  156. package/dist/client/assets/{secrets-Debl4Ngu.js → secrets-Dtlt9ZmS.js} +1 -1
  157. package/dist/client/assets/{sections-editor-CcwffiQl.js → sections-editor-Dqu3z5Ot.js} +2 -2
  158. package/dist/client/assets/{select-CvDnclqc.js → select-Beg_2fXg.js} +1 -1
  159. package/dist/client/assets/{select-model-cqeqhVQK.js → select-model-BMbD_9Ia.js} +1 -1
  160. package/dist/client/assets/seo-editor-DPjxt-kB.js +1 -0
  161. package/dist/client/assets/settings-layout-BmGeDfut.js +1 -0
  162. package/dist/client/assets/{settings-section-z_q4ruf_.js → settings-section-BTmXhjqn.js} +1 -1
  163. package/dist/client/assets/{sheet-ChXXkoux.js → sheet-D-WSQKVa.js} +1 -1
  164. package/dist/client/assets/{shell-controls-BHiQ5Vjs.js → shell-controls-Cjwnc3rm.js} +1 -1
  165. package/dist/client/assets/{shell-layout-0JObD2s1.js → shell-layout-B5BcGCUv.js} +1 -1
  166. package/dist/client/assets/{shell-route-loading-DBlx6e0Z.js → shell-route-loading-CwaZaGaY.js} +1 -1
  167. package/dist/client/assets/{sidebar-DxS-nB9C.js → sidebar-B3SUDWcE.js} +1 -1
  168. package/dist/client/assets/{skeleton-BnhJTtVi.js → skeleton-CFHIS59D.js} +1 -1
  169. package/dist/client/assets/{sortable.esm-DjicLksl.js → sortable.esm-qUS1Ad1E.js} +1 -1
  170. package/dist/client/assets/{spinner-Cecl_L8X.js → spinner-w0j4pkm6.js} +1 -1
  171. package/dist/client/assets/{sso-CCvO1qtH.js → sso-BzO1v4AH.js} +1 -1
  172. package/dist/client/assets/{store-Bms8WhNQ.js → store-DDnRAbDj.js} +1 -1
  173. package/dist/client/assets/store-registry-DdmX5Xjk.js +2 -0
  174. package/dist/client/assets/{switch-BOQ2PJeb.js → switch-DigajlLH.js} +1 -1
  175. package/dist/client/assets/{tab-id-B2HRXc_q.js → tab-id-Dqk0Iqqp.js} +1 -1
  176. package/dist/client/assets/{table-Cz11eDpz.js → table-CG9TNjwG.js} +1 -1
  177. package/dist/client/assets/{tabs-CeDin4k7.js → tabs-hJQcRyAi.js} +1 -1
  178. package/dist/client/assets/{task-status-BLPz-4sC.js → task-status-BPOI6tWP.js} +1 -1
  179. package/dist/client/assets/{textarea-SDIeylNJ.js → textarea-F1h3gKD-.js} +1 -1
  180. package/dist/client/assets/{toggle-group-CefnzENU.js → toggle-group-DBo9mYwI.js} +1 -1
  181. package/dist/client/assets/toolbar-Chbc6IV1.js +1 -0
  182. package/dist/client/assets/{tools-list-CqDkzdE6.js → tools-list-CabDoS9o.js} +1 -1
  183. package/dist/client/assets/{tooltip-CeP603hH.js → tooltip-DR0ou5_h.js} +1 -1
  184. package/dist/client/assets/{types-B_duTJl-.js → types-B8jc6i3t.js} +1 -1
  185. package/dist/client/assets/{use-ai-providers-BVFxEa9L.js → use-ai-providers-Crp3aL-d.js} +1 -1
  186. package/dist/client/assets/{use-automations-BefuyBQd.js → use-automations-CvPaoJpy.js} +1 -1
  187. package/dist/client/assets/{use-capability-BrFRIPu5.js → use-capability-C_bdrk_p.js} +1 -1
  188. package/dist/client/assets/{use-collections-DPnWGTP7.js → use-collections-CIhR2Sfk.js} +1 -1
  189. package/dist/client/assets/{use-connection-CzM_WXMN.js → use-connection-B9u8CAro.js} +1 -1
  190. package/dist/client/assets/{use-copy-wKwDCbum.js → use-copy-BQU7kOTS.js} +1 -1
  191. package/dist/client/assets/{use-create-virtual-mcp-CwM2ND5a.js → use-create-virtual-mcp-B-ZztG0t.js} +1 -1
  192. package/dist/client/assets/{use-debounced-autosave-D4-Vb6JZ.js → use-debounced-autosave-DSkO6_zp.js} +1 -1
  193. package/dist/client/assets/{use-delete-connection-0bGCksoc.js → use-delete-connection--aJNKbDc.js} +1 -1
  194. package/dist/client/assets/{use-file-configs-DXzZdUlN.js → use-file-configs-DpObIFgQ.js} +1 -1
  195. package/dist/client/assets/{use-infinite-scroll-COXLEab2.js → use-infinite-scroll-cj_fIBkS.js} +1 -1
  196. package/dist/client/assets/{use-list-state-1DLqfcvM.js → use-list-state-CJLRzORi.js} +1 -1
  197. package/dist/client/assets/{use-mcp-prompts-EWCIJOcj.js → use-mcp-prompts-CbFGc10Q.js} +1 -1
  198. package/dist/client/assets/{use-mcp-tools-YMWJX9tN.js → use-mcp-tools-5agNAepF.js} +1 -1
  199. package/dist/client/assets/{use-members-CMjFtY8-.js → use-members-BxYNXFJP.js} +1 -1
  200. package/dist/client/assets/{use-navigate-to-agent-DbTKvOZS.js → use-navigate-to-agent-BF3wV5AT.js} +1 -1
  201. package/dist/client/assets/{use-org-auth-client-PFGUMv0N.js → use-org-auth-client-CXXJeS8t.js} +1 -1
  202. package/dist/client/assets/{use-org-sso-KYe6rDaT.js → use-org-sso-78wZG6-f.js} +1 -1
  203. package/dist/client/assets/{use-organization-roles-CzafvuiG.js → use-organization-roles-8xWgqzTV.js} +1 -1
  204. package/dist/client/assets/{use-organization-settings-CQEWT13Z.js → use-organization-settings-CTFAMDf3.js} +1 -1
  205. package/dist/client/assets/{use-registry-connections-Bxq_77g6.js → use-registry-connections-DLQyW9bq.js} +1 -1
  206. package/dist/client/assets/{use-secrets-CgnCxvTW.js → use-secrets-Cmx_245Q.js} +1 -1
  207. package/dist/client/assets/{use-status-sounds-CWk7re-G.js → use-status-sounds-B-QYeuIF.js} +1 -1
  208. package/dist/client/assets/{use-view-mode-C8ehq-d0.js → use-view-mode-DmcUzuJT.js} +1 -1
  209. package/dist/client/assets/{use-virtual-mcp-DflWVTuF.js → use-virtual-mcp-CLwhjRff.js} +1 -1
  210. package/dist/client/assets/useInfiniteQuery-DiBUJYe_.js +1 -0
  211. package/dist/client/assets/{useRouterState-Br8Ksrwr.js → useRouterState-Dsvmx6NW.js} +1 -1
  212. package/dist/client/assets/useSuspenseInfiniteQuery-Bu_otJLP.js +1 -0
  213. package/dist/client/assets/{user-Dz7iwzYF.js → user-C_mdefEx.js} +1 -1
  214. package/dist/client/assets/{view-mode-toggle-DI_qGqci.js → view-mode-toggle-CBJdrX89.js} +1 -1
  215. package/dist/client/assets/workflow-Bs2NMxKI.js +1 -0
  216. package/dist/client/assets/workflow-detail-BovMNGKv.js +1 -0
  217. package/dist/client/index.html +2 -2
  218. package/dist/server/cli.js +433 -433
  219. package/dist/server/server.js +290 -290
  220. package/package.json +1 -1
  221. package/dist/client/assets/ZapSquare-B2q8WEX1.js +0 -1
  222. package/dist/client/assets/ZoomOut-DnoKIS59.js +0 -1
  223. package/dist/client/assets/accordion-BVwnr-Ph.js +0 -1
  224. package/dist/client/assets/add-section-modal-DhovoW-j.js +0 -1
  225. package/dist/client/assets/agent-icon-BJOP--6N.js +0 -1
  226. package/dist/client/assets/agents-list-BXn-hA0n.js +0 -1
  227. package/dist/client/assets/app-editor-BNURPsQU.js +0 -1
  228. package/dist/client/assets/automations-GZ_mGUjn.js +0 -1
  229. package/dist/client/assets/calendar-C2n-TFID.js +0 -1
  230. package/dist/client/assets/collection-detail-CY7EGtz7.js +0 -1
  231. package/dist/client/assets/connection-detail-P3V5HPH7.js +0 -1
  232. package/dist/client/assets/connections-OTmgMsxB.js +0 -1
  233. package/dist/client/assets/dialog-Br598C89.js +0 -1
  234. package/dist/client/assets/file-explorer-D4_0I4su.js +0 -2
  235. package/dist/client/assets/file-preview-B4Zho1Y6.js +0 -1
  236. package/dist/client/assets/index-Dah3mtyQ.js +0 -1
  237. package/dist/client/assets/index-RWntp561.js +0 -1
  238. package/dist/client/assets/index-VJJ8U_LK.js +0 -2
  239. package/dist/client/assets/index-uXid0yMu.css +0 -1
  240. package/dist/client/assets/monaco-editor-D4JSTdws.js +0 -19
  241. package/dist/client/assets/page-seo-sheet-GBqlqXbH.js +0 -1
  242. package/dist/client/assets/project-app-view-0IenPExc.js +0 -1
  243. package/dist/client/assets/record-editor-B_xzO2rA.js +0 -1
  244. package/dist/client/assets/registry-GiOtrI6p.js +0 -2
  245. package/dist/client/assets/roles-FrRjzVah.js +0 -1
  246. package/dist/client/assets/schema-form-yjRGF1Qo.js +0 -1
  247. package/dist/client/assets/seo-editor-BPl-B1OI.js +0 -1
  248. package/dist/client/assets/settings-layout-D1eS1NN7.js +0 -1
  249. package/dist/client/assets/store-registry-Cs3BGFgx.js +0 -2
  250. package/dist/client/assets/toolbar-B8vAkOP3.js +0 -1
  251. package/dist/client/assets/useInfiniteQuery-2A4J-MZz.js +0 -1
  252. package/dist/client/assets/useSuspenseInfiniteQuery-vt45tURh.js +0 -1
  253. package/dist/client/assets/workflow-CF5qm1Zf.js +0 -1
  254. package/dist/client/assets/workflow-detail-CDrDJwxR.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as H,e as $,R as at,H as Dt,G as Ht,j as n,B as Ne,U as Xe,c as q,t as Bt,q as he,F as Ut,a as Wt,K as me,o as ze,n as Oe,f as je,E as qt,z as Vt,bu as De}from"./index-0jxZXjT_.js";import{_ as Gt,E as Kt,y as Jt,ac as Xt,M as Qt,r as Qe,L as Yt,K as Zt,a8 as rt,ad as es,ae as ts,A as it,af as ie,ag as ss,ah as ns,ai as ls,b as os}from"./agent-icon-BJOP--6N.js";import{t as He}from"./Stars01-BQqwEiIH.js";import{a as ct,t as as,b as _e,d as rs}from"./XCircle-BVR438yI.js";import{i as Be}from"./Check-5-utiman.js";import{i as Ye}from"./ChevronRight-AaMPC6ii.js";import{a as ut,s as is}from"./Eye-FA0T_9KR.js";import{a as de,c as Ze,t as cs}from"./format-time-Cy7tTmZp.js";import{N as dt,R as ft,e as mt,C as us,f as ds,g as fs,u as ms,i as ps,d as xs}from"./scroll-area-43OyCToQ.js";import{u as pt}from"./use-copy-wKwDCbum.js";import{T as pe,a as xe,b as ge}from"./tooltip-CeP603hH.js";import{M as xt,I as gt,F as gs}from"./file-type-icon-J1MyTx05.js";import{c as hs}from"./content-blocks-o63cs2vh.js";import{g as ht,M as bs}from"./types-B_duTJl-.js";import{f as $e,i as ys,d as Ue,a as js}from"./chat-context-xK_w16Am.js";import{S as vs,u as We,c as Ns,b as Ss}from"./constants-bvvELg6A.js";import{m as ks,f as _s,n as ws}from"./tab-id-B2HRXc_q.js";import{i as bt}from"./AlertCircle-I5aAKx5s.js";import{s as Ce,t as yt}from"./Star01-DQCFITlh.js";import{s as Ts}from"./XClose-CeXjq2Ks.js";import{a as jt}from"./ZapSquare-B2q8WEX1.js";import{n as vt,i as Cs}from"./Globe01-BdrXaQ4t.js";import{b as $s,i as Is,a as Le}from"./Tool01-DBZmckgJ.js";import{i as Ms}from"./ZoomOut-DnoKIS59.js";import{i as Te}from"./Monitor01-CTE-M7aU.js";import{i as Ls}from"./SearchMd-cBVn0Mcd.js";import{i as Rs}from"./Upload01-DhlN2oeP.js";import{u as As,c as zs}from"./shell-layout-0JObD2s1.js";import{n as Nt}from"./LinkExternal01-sg0X3i7p.js";import{I as Ie}from"./integration-icon-B34NO5DZ.js";import{u as Es}from"./use-virtual-mcp-DflWVTuF.js";import{a as St}from"./Users03-a4EwkzcR.js";import{a as ce}from"./Palette-DW_AOTeX.js";import{k as kt}from"./use-navigate-to-agent-DbTKvOZS.js";import{a as Ps}from"./use-connection-CzM_WXMN.js";import{s as Fs}from"./Stars02-CnxGzx_a.js";import{g as Os}from"./use-mcp-prompts-EWCIJOcj.js";import{c as Ds,b as Hs,d as Bs,a as Us,D as Ws}from"./dialog-Br598C89.js";import{a as qs,F as Vs,b as Gs,c as Ks,d as Js,f as Xs}from"./form-BFCHHJw7.js";import{I as Qs}from"./input-BJ1rHrAh.js";import{S as Ys}from"./spinner-Cecl_L8X.js";import{t as Zs}from"./ChevronDown-BRUPOd-D.js";const en={openrouter:s=>{const e=s?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function _t(s){if(!s?.providerMetadata)return 0;for(const e of Object.values(en)){const t=e(s.providerMetadata);if(t!==null)return t}return 0}function wt(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function Tt(s,e){if(!e)return s;const t=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,l=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:s.inputTokens+(e.inputTokens??0),outputTokens:s.outputTokens+(e.outputTokens??0),reasoningTokens:s.reasoningTokens+(e.reasoningTokens??0),totalTokens:s.totalTokens+(e.totalTokens??0),cost:s.cost+_t(e),cacheReadTokens:s.cacheReadTokens+t,cacheWriteTokens:s.cacheWriteTokens+l}}function ca(s){return s.reduce((e,t)=>Tt(e,t.metadata?.usage),wt())}function tn({containerRef:s,enabled:e,contentDeps:t=[],threshold:l,intervalMs:r=500}){const[a,o]=H.useState(null),[u,f]=H.useState(!1),i=l??(s?.95:.1),m=()=>{if(s?.current){s.current.scrollTop=s.current.scrollHeight;return}if(!a)return;let p=a.parentElement;for(;p;){const c=window.getComputedStyle(p);if(c.overflowY==="auto"||c.overflowY==="scroll"||c.overflow==="auto"||c.overflow==="scroll"){p.scrollTop=p.scrollHeight;return}p=p.parentElement}};return H.useEffect(()=>{if(!a)return;const p=new IntersectionObserver(c=>{const d=c[0]?.isIntersecting??!1;f(d)},{root:s?.current??null,threshold:i,rootMargin:"0px"});return p.observe(a),()=>p.disconnect()},[a,i]),H.useEffect(()=>{if(!e||!u)return;const p=setInterval(m,r);return()=>clearInterval(p)},[e,u,r]),H.useEffect(()=>{!e||!u||m()},[e,u,...t]),{sentinelRef:o,isTracking:u}}function sn(s){return s.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function qe(s){if(s&&typeof s=="object"&&"gatewayClientId"in s&&typeof s.gatewayClientId=="string")return s.gatewayClientId}function Ve(s,e){if(!e)return s;const t=`${sn(e)}_`;return s.startsWith(t)?s.slice(t.length):s}function nn(s,e){return Ve(s,e).replace(/[_-]/g," ").toLowerCase()}function ln(s){const e={};for(const t of s.arguments??[])e[t.name]=t.required?Xe().min(1,"Required"):Xe();return at(e)}function on(s,e){const t={};for(const l of s.arguments??[])t[l.name]=e?.[l.name]??"";return t}function an(s){const e=$.c(66),{prompt:t,setPrompt:l,onSubmit:r,defaultValues:a}=s,o=H.useId();let u;if(e[0]!==t){const A=t?ln(t):at({});u=Dt(A),e[0]=t,e[1]=u}else u=e[1];const i=u;let m;e[2]!==a||e[3]!==t?(m=t?on(t,a):{},e[2]=a,e[3]=t,e[4]=m):m=e[4];let p;e[5]!==i||e[6]!==m?(p={resolver:i,defaultValues:m,mode:"onChange"},e[5]=i,e[6]=m,e[7]=p):p=e[7];const c=Ht(p);let d;e[8]!==t?.arguments?(d=t?.arguments??[],e[8]=t?.arguments,e[9]=d):d=e[9];const x=d;let g;e[10]!==c||e[11]!==r||e[12]!==l?(g=async A=>{await r(A),l(null),c.reset()},e[10]=c,e[11]=r,e[12]=l,e[13]=g):g=e[13];const b=g;let h;e[14]!==c||e[15]!==l?(h=A=>{A||(c.reset(),l(null))},e[14]=c,e[15]=l,e[16]=h):h=e[16];const N=h;if(!t)return null;let j;e[17]!==t._meta||e[18]!==t.name||e[19]!==t.title?(j=t.title||nn(t.name,qe(t._meta)),e[17]=t._meta,e[18]=t.name,e[19]=t.title,e[20]=j):j=e[20];let S;e[21]!==j?(S=n.jsx(Ds,{children:n.jsx("span",{className:"capitalize",children:j})}),e[21]=j,e[22]=S):S=e[22];let y;e[23]!==t.description?(y=t.description&&n.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),e[23]=t.description,e[24]=y):y=e[24];let v;e[25]!==y||e[26]!==S?(v=n.jsxs(Hs,{children:[S,y]}),e[25]=y,e[26]=S,e[27]=v):v=e[27];let k;e[28]!==c||e[29]!==b?(k=A=>{A.stopPropagation(),c.handleSubmit(b)(A)},e[28]=c,e[29]=b,e[30]=k):k=e[30];let _;if(e[31]!==x||e[32]!==c.control||e[33]!==c.formState.isSubmitting){let A;e[35]!==c.control||e[36]!==c.formState.isSubmitting?(A=z=>n.jsx(Vs,{control:c.control,name:z.name,render:O=>{const{field:U}=O;return n.jsxs(Gs,{children:[n.jsxs(Ks,{className:"text-xs",children:[z.name,z.required?null:n.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),n.jsx(Js,{children:n.jsx(Qs,{...U,value:U.value??"",required:z.required,placeholder:z.description??"",className:"h-9",disabled:c.formState.isSubmitting})}),n.jsx(Xs,{})]})}},z.name),e[35]=c.control,e[36]=c.formState.isSubmitting,e[37]=A):A=e[37],_=x.map(A),e[31]=x,e[32]=c.control,e[33]=c.formState.isSubmitting,e[34]=_}else _=e[34];let w;e[38]!==N?(w=()=>N(!1),e[38]=N,e[39]=w):w=e[39];let T;e[40]!==c.formState.isSubmitting||e[41]!==w?(T=n.jsx(Ne,{type:"button",variant:"ghost",onClick:w,disabled:c.formState.isSubmitting,children:"Cancel"}),e[40]=c.formState.isSubmitting,e[41]=w,e[42]=T):T=e[42];let I;e[43]!==c.formState.isSubmitting?(I=c.formState.isSubmitting?n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Ys,{size:"xs"}),"Loading..."]}):"Use prompt",e[43]=c.formState.isSubmitting,e[44]=I):I=e[44];let M;e[45]!==c.formState.isSubmitting||e[46]!==o||e[47]!==I?(M=n.jsx(Ne,{type:"submit",form:o,disabled:c.formState.isSubmitting,children:I}),e[45]=c.formState.isSubmitting,e[46]=o,e[47]=I,e[48]=M):M=e[48];let C;e[49]!==T||e[50]!==M?(C=n.jsxs(Bs,{children:[T,M]}),e[49]=T,e[50]=M,e[51]=C):C=e[51];let L;e[52]!==o||e[53]!==k||e[54]!==_||e[55]!==C?(L=n.jsxs("form",{id:o,className:"space-y-4 py-4",autoComplete:"off",onSubmit:k,children:[_,C]}),e[52]=o,e[53]=k,e[54]=_,e[55]=C,e[56]=L):L=e[56];let R;e[57]!==c||e[58]!==L?(R=n.jsx(qs,{...c,children:L}),e[57]=c,e[58]=L,e[59]=R):R=e[59];let F;e[60]!==v||e[61]!==R?(F=n.jsxs(Us,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[v,R]}),e[60]=v,e[61]=R,e[62]=F):F=e[62];let E;return e[63]!==N||e[64]!==F?(E=n.jsx(Ws,{open:!0,onOpenChange:N,children:F}),e[63]=N,e[64]=F,e[65]=E):E=e[65],E}function Ct(s){return s?s.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function re(s,e){return s==="output-error"||s==="output-denied"?"error":s==="approval-requested"?"approval":s==="input-streaming"||s==="input-available"||s==="output-available"&&e===!0?"loading":"idle"}function ve(s){if(s==null||typeof s!="object")return;const e=s;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const t=e.content[0];if(t?.type==="text"&&typeof t.text=="string")try{return JSON.parse(t.text)}catch{return}return}return s}function rn(s){return s.storage.mention}function ua(s,e,t){s.chain().focus().insertContentAt(e,[$t(t),{type:"text",text:" "}]).run()}function $t(s){return{type:"mention",attrs:s}}function cn(s){const e=$.c(19),{node:t,selected:l,view:r,editor:a,getPos:o}=s,{name:u,char:f,kind:i,id:m,args:p}=t.attrs,c=l&&r.editable,d=f==="@",x=r.editable&&f==="/"&&i!=="resource";let g;e[0]!==p||e[1]!==a||e[2]!==o||e[3]!==m||e[4]!==x||e[5]!==u?(g=_=>{if(!x)return;const T=rn(a)?.onEditChip;if(!T||typeof o!="function")return;const I=o();typeof I=="number"&&(_.preventDefault(),_.stopPropagation(),T({promptId:m,promptName:u,args:p??{},pos:I}))},e[0]=p,e[1]=a,e[2]=o,e[3]=m,e[4]=x,e[5]=u,e[6]=g):g=e[6];const b=g,h=x?"cursor-pointer":"cursor-default",N=d?"bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-400":"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300",j=c&&"outline-2 outline-blue-300 outline-offset-0",S=x&&"hover:brightness-95";let y;e[7]!==h||e[8]!==N||e[9]!==j||e[10]!==S?(y=q("px-1 py-1 rounded","inline-flex items-center gap-1",h,"select-none","text-xs font-light",N,j,S,"capitalize"),e[7]=h,e[8]=N,e[9]=j,e[10]=S,e[11]=y):y=e[11];let v;e[12]!==u?(v=u?Ct(u):"",e[12]=u,e[13]=v):v=e[13];let k;return e[14]!==f||e[15]!==b||e[16]!==y||e[17]!==v?(k=n.jsxs(mt,{onClick:b,className:y,children:[f,v]}),e[14]=f,e[15]=b,e[16]=y,e[17]=v,e[18]=k):k=e[18],k}const un=dt.create({name:"mention",group:"inline",inline:!0,atom:!0,addStorage(){return{onEditChip:null}},addAttributes(){return{id:{default:null,parseHTML:s=>s.getAttribute("data-id")||null,renderHTML:s=>s.id?{"data-id":s.id}:{}},name:{default:null,parseHTML:s=>s.getAttribute("data-name")||null,renderHTML:s=>s.name?{"data-name":s.name}:{}},char:{default:"/",parseHTML:s=>s.getAttribute("data-char")||"/",renderHTML:s=>s.char?{"data-char":s.char}:{}},metadata:{default:null,parseHTML:s=>{try{return JSON.parse(s.getAttribute("data-metadata")||"null")}catch{return null}},renderHTML:s=>s.metadata?{"data-metadata":JSON.stringify(s.metadata)}:{}},kind:{default:null,parseHTML:s=>s.getAttribute("data-kind")||null,renderHTML:s=>s.kind?{"data-kind":s.kind}:{}},args:{default:null,parseHTML:s=>{try{return JSON.parse(s.getAttribute("data-args")||"null")}catch{return null}},renderHTML:s=>s.args?{"data-args":JSON.stringify(s.args)}:{}}}},parseHTML(){return[{tag:'span[data-type="mention"]'}]},renderHTML({node:s,HTMLAttributes:e}){const t={"data-type":"mention"};return s.attrs.id&&(t["data-id"]=s.attrs.id),s.attrs.name&&(t["data-name"]=s.attrs.name),s.attrs.char&&(t["data-char"]=s.attrs.char),s.attrs.metadata&&(t["data-metadata"]=JSON.stringify(s.attrs.metadata)),s.attrs.kind&&(t["data-kind"]=s.attrs.kind),s.attrs.args&&(t["data-args"]=JSON.stringify(s.attrs.args)),["span",{...e,...t}]},renderText({node:s}){const e=s.attrs.char??"@",t=s.attrs.name??"";return`${e}${t}`},addNodeView(){return ft(cn)}}),dn=/^mcp__[a-zA-Z0-9_-]+__/;function It(s){return s.replace(dn,"")}function Ge(s){const e=$.c(17),{id:t,part:l,copyable:r,extraActions:a,alwaysShowActions:o}=s,u=r===void 0?!1:r,f=o===void 0?!1:o,{handleCopy:i}=pt(),[m,p]=H.useState(!1);let c;e[0]!==i||e[1]!==t||e[2]!==l.text?(c=async()=>{Bt("chat_message_copied",{message_id:t,chars:l.text.length}),await i(l.text),p(!0),setTimeout(()=>p(!1),2e3)},e[0]=i,e[1]=t,e[2]=l.text,e[3]=c):c=e[3];const d=c,x=u&&a,g=x||a;let b;e[4]!==t||e[5]!==l.text?(b=n.jsx(xt,{id:t,text:l.text}),e[4]=t,e[5]=l.text,e[6]=b):b=e[6];let h;e[7]!==f||e[8]!==a||e[9]!==d||e[10]!==m||e[11]!==g||e[12]!==x?(h=g&&n.jsxs("div",{className:q("flex w-full items-center gap-2 text-sm text-muted-foreground transition-all duration-200 mt-1 py-1",f?"opacity-100":"opacity-0 pointer-events-none group-hover/part:opacity-100 group-hover/part:pointer-events-auto"),children:[a,x&&a&&n.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),x&&n.jsx("button",{type:"button",onClick:d,className:"text-muted-foreground [@media(hover:hover)]:hover:text-foreground transition-colors active:scale-[0.97]","aria-label":"Copy message",children:m?n.jsx(Be,{className:"size-4"}):n.jsx(ut,{className:"size-4"})})]}),e[7]=f,e[8]=a,e[9]=d,e[10]=m,e[11]=g,e[12]=x,e[13]=h):h=e[13];let N;return e[14]!==b||e[15]!==h?(N=n.jsxs("div",{className:"group/part relative",children:[b,h]}),e[14]=b,e[15]=h,e[16]=N):N=e[16],N}function da(s,e,t){s.chain().focus().insertContentAt(e,[fn(t),{type:"text",text:" "}]).run()}function fn(s){return{type:"file",attrs:s}}function mn(s){const e=$.c(17),{node:t,selected:l,view:r}=s,{name:a,mimeType:o,data:u}=t.attrs,f=l&&r.editable;let i;e[0]!==o?(i=o.startsWith("image/"),e[0]=o,e[1]=i):i=e[1];const m=i,p=f&&"outline-2 outline-blue-300 outline-offset-0";let c;e[2]!==p?(c=q("px-1 py-1 rounded","inline-flex items-center gap-1","cursor-default select-none","text-xs font-light","bg-muted text-muted-foreground",p),e[2]=p,e[3]=c):c=e[3];let d;e[4]!==a?(d=n.jsx(pe,{asChild:!0,children:n.jsx("span",{children:a})}),e[4]=a,e[5]=d):d=e[5];let x;e[6]!==u||e[7]!==m||e[8]!==o||e[9]!==a?(x=n.jsx(xe,{side:"top",className:"max-w-sm p-1.5",children:m?n.jsx("img",{src:`data:${o};base64,${u}`,alt:a,className:"max-w-full max-h-64 object-contain rounded"}):n.jsxs("div",{className:"text-xs",children:[n.jsx("div",{className:"font-medium",children:a}),n.jsx("div",{className:"text-muted-foreground mt-1",children:o})]})}),e[6]=u,e[7]=m,e[8]=o,e[9]=a,e[10]=x):x=e[10];let g;e[11]!==d||e[12]!==x?(g=n.jsxs(ge,{children:[d,x]}),e[11]=d,e[12]=x,e[13]=g):g=e[13];let b;return e[14]!==c||e[15]!==g?(b=n.jsx(mt,{className:c,children:g}),e[14]=c,e[15]=g,e[16]=b):b=e[16],b}const pn=dt.create({name:"file",group:"inline",inline:!0,atom:!0,addAttributes(){return{id:{default:null,parseHTML:s=>s.getAttribute("data-id")||null,renderHTML:s=>s.id?{"data-id":s.id}:{}},name:{default:null,parseHTML:s=>s.getAttribute("data-name")||null,renderHTML:s=>s.name?{"data-name":s.name}:{}},mimeType:{default:null,parseHTML:s=>s.getAttribute("data-mime-type")||null,renderHTML:s=>s.mimeType?{"data-mime-type":s.mimeType}:{}},size:{default:0,parseHTML:s=>{const e=s.getAttribute("data-size");return e?Number.parseInt(e,10):0},renderHTML:s=>s.size?{"data-size":String(s.size)}:{}},data:{default:null,parseHTML:s=>s.getAttribute("data-data")||null,renderHTML:s=>s.data?{"data-data":s.data}:{}}}},parseHTML(){return[{tag:'span[data-type="file"]'}]},renderHTML({node:s,HTMLAttributes:e}){const t={"data-type":"file"};return s.attrs.id&&(t["data-id"]=s.attrs.id),s.attrs.name&&(t["data-name"]=s.attrs.name),s.attrs.mimeType&&(t["data-mime-type"]=s.attrs.mimeType),s.attrs.size&&(t["data-size"]=String(s.attrs.size)),s.attrs.data&&(t["data-data"]=s.attrs.data),["span",{...e,...t}]},renderText({node:s}){return`[${s.attrs.name??""}]`},addNodeView(){return ft(mn)}}),fe=16,Ee=2.5,Pe=(fe-Ee)/2,Re=2*Math.PI*Pe;function xn(s){const e=$.c(31),{usage:t}=s;if(!t)return null;const{totalTokens:l,inputTokens:r,outputTokens:a,cost:o}=t;if(!l&&!r&&!a)return null;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Gt,{size:12}),e[0]=u):u=e[0];let f;e[1]!==o||e[2]!==l?(f=o>0?`$${o.toFixed(4)}`:l.toLocaleString(),e[1]=o,e[2]=l,e[3]=f):f=e[3];let i;e[4]!==f?(i=n.jsx(pe,{asChild:!0,children:n.jsxs("span",{className:"inline-flex items-center text-muted-foreground [@media(hover:hover)]:hover:text-foreground pl-1 h-6 gap-1 whitespace-nowrap shrink-0 cursor-default",children:[u,n.jsx("span",{className:"text-sm font-mono tabular-nums",children:f})]})}),e[4]=f,e[5]=i):i=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("p",{className:"text-muted text-[10px] mb-1",children:"tokens"}),e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx("span",{className:"text-muted",children:"in"}),e[7]=p):p=e[7];let c;e[8]!==r?(c=r.toLocaleString(),e[8]=r,e[9]=c):c=e[9];let d;e[10]!==c?(d=n.jsx("span",{className:"text-right tabular-nums",children:c}),e[10]=c,e[11]=d):d=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("span",{className:"text-muted",children:"out"}),e[12]=x):x=e[12];const g=a-(t.reasoningTokens??0);let b;e[13]!==g?(b=g.toLocaleString(),e[13]=g,e[14]=b):b=e[14];let h;e[15]!==b?(h=n.jsx("span",{className:"text-right tabular-nums",children:b}),e[15]=b,e[16]=h):h=e[16];let N;e[17]!==r||e[18]!==t.cacheReadTokens||e[19]!==t.cacheWriteTokens?(N=(t.cacheReadTokens>0||t.cacheWriteTokens>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:r>0?`${(t.cacheReadTokens/r*100).toFixed(0)}%`:"0%"})]}),e[17]=r,e[18]=t.cacheReadTokens,e[19]=t.cacheWriteTokens,e[20]=N):N=e[20];let j;e[21]!==o?(j=o>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cost"}),n.jsxs("span",{className:"text-right tabular-nums",children:["$",o.toFixed(4)]})]}),e[21]=o,e[22]=j):j=e[22];let S;e[23]!==h||e[24]!==N||e[25]!==j||e[26]!==d?(S=n.jsxs(xe,{side:"top",className:"font-mono text-[11px]",children:[m,n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[p,d,x,h,N,j]})]}),e[23]=h,e[24]=N,e[25]=j,e[26]=d,e[27]=S):S=e[27];let y;return e[28]!==S||e[29]!==i?(y=n.jsxs(ge,{children:[i,S]}),e[28]=S,e[29]=i,e[30]=y):y=e[30],y}function gn(s){const e=$.c(19),{usage:t,duration:l}=s,r=l!=null&&l>0,a=t!=null&&(t.cost??0)>0,o=t!=null&&(t.totalTokens??0)>0;if(!r&&!a&&!o)return null;let u;e[0]!==l||e[1]!==r?(u=r?de(l/1e3):null,e[0]=l,e[1]=r,e[2]=u):u=e[2];const f=u;let i;e[3]!==l||e[4]!==f||e[5]!==t?(i=f&&n.jsxs(ge,{children:[n.jsx(pe,{asChild:!0,children:n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:f})}),n.jsxs(xe,{side:"top",className:"font-mono text-[11px]",children:[n.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"thinking"}),n.jsx("span",{className:"tabular-nums",children:de(l/1e3)}),(t?.reasoningTokens??0)>0&&n.jsxs("span",{className:"ml-2 opacity-50",children:[t.reasoningTokens.toLocaleString()," tok"]})]})]}),e[3]=l,e[4]=f,e[5]=t,e[6]=i):i=e[6];let m;e[7]!==a||e[8]!==r||e[9]!==o?(m=r&&(a||o)&&n.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),e[7]=a,e[8]=r,e[9]=o,e[10]=m):m=e[10];let p;e[11]!==a||e[12]!==o||e[13]!==t?(p=(a||o)&&n.jsxs(ge,{children:[n.jsx(pe,{asChild:!0,children:n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:a?`$${t.cost.toFixed(4)}`:`${t.totalTokens.toLocaleString()} tok`})}),n.jsxs(xe,{side:"top",className:"font-mono text-[11px]",children:[n.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"tokens"}),n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[n.jsx("span",{className:"opacity-60",children:"in"}),n.jsx("span",{className:"text-right tabular-nums",children:(t.inputTokens??0).toLocaleString()}),n.jsx("span",{className:"opacity-60",children:"out"}),n.jsx("span",{className:"text-right tabular-nums",children:((t.outputTokens??0)-(t?.reasoningTokens??0)).toLocaleString()}),(t?.reasoningTokens??0)>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"opacity-60",children:"think"}),n.jsx("span",{className:"text-right tabular-nums",children:t.reasoningTokens.toLocaleString()})]}),((t?.cacheReadTokens??0)>0||(t?.cacheWriteTokens??0)>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"opacity-60",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:(t?.inputTokens??0)>0?`${((t?.cacheReadTokens??0)/t.inputTokens*100).toFixed(0)}%`:"0%"})]})]})]})]}),e[11]=a,e[12]=o,e[13]=t,e[14]=p):p=e[14];let c;return e[15]!==i||e[16]!==m||e[17]!==p?(c=n.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[i,m,p]}),e[15]=i,e[16]=m,e[17]=p,e[18]=c):c=e[18],c}function fa(s){const e=$.c(51),{usage:t,totalTokens:l,contextWindow:r,onOpenContextPanel:a}=s,o=Math.min(l/r*100,100),u=Re-o/100*Re,f=t?.cost??0,i=t?.inputTokens??0,m=t?.outputTokens??0;let p;e[0]!==o?(p=o.toFixed(0),e[0]=o,e[1]=p):p=e[1];let c;e[2]!==f?(c=f>0?`, $${f.toFixed(2)}`:"",e[2]=f,e[3]=c):c=e[3];const d=`Context usage: ${p}%${c}`,x=a?"cursor-pointer":"cursor-default";let g;e[4]!==x?(g=q("flex items-center gap-1.5 text-muted-foreground hover:text-foreground h-6 px-1 shrink-0",x),e[4]=x,e[5]=g):g=e[5];let b;e[6]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx("circle",{cx:fe/2,cy:fe/2,r:Pe,fill:"none",stroke:"currentColor",strokeWidth:Ee,className:"opacity-15"}),e[6]=b):b=e[6];const h=o>90?"text-destructive":o>70?"text-warning":"text-muted-foreground";let N;e[7]!==h?(N=q(h),e[7]=h,e[8]=N):N=e[8];let j;e[9]!==u||e[10]!==N?(j=n.jsxs("svg",{width:fe,height:fe,className:"-rotate-90",children:[b,n.jsx("circle",{cx:fe/2,cy:fe/2,r:Pe,fill:"none",stroke:"currentColor",strokeWidth:Ee,strokeDasharray:Re,strokeDashoffset:u,strokeLinecap:"round",className:N})]}),e[9]=u,e[10]=N,e[11]=j):j=e[11];let S;e[12]!==o?(S=o.toFixed(0),e[12]=o,e[13]=S):S=e[13];let y;e[14]!==f?(y=f>0?` · $${f.toFixed(2)}`:"",e[14]=f,e[15]=y):y=e[15];let v;e[16]!==S||e[17]!==y?(v=n.jsxs("span",{className:"inline-block overflow-hidden whitespace-nowrap max-w-0 opacity-0 transition-[max-width,opacity] duration-200 ease-out @[320px]/chat-bottom:max-w-32 @[320px]/chat-bottom:opacity-100 text-[11px] font-mono tabular-nums",children:[S,"%",y]}),e[16]=S,e[17]=y,e[18]=v):v=e[18];let k;e[19]!==a||e[20]!==v||e[21]!==d||e[22]!==g||e[23]!==j?(k=n.jsx(pe,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:a,"aria-label":d,className:g,children:[j,v]})}),e[19]=a,e[20]=v,e[21]=d,e[22]=g,e[23]=j,e[24]=k):k=e[24];let _;e[25]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx("span",{className:"text-muted",children:"context"}),e[25]=_):_=e[25];let w;e[26]!==l?(w=l.toLocaleString(),e[26]=l,e[27]=w):w=e[27];let T;e[28]!==r?(T=r.toLocaleString(),e[28]=r,e[29]=T):T=e[29];let I;e[30]!==o?(I=o.toFixed(1),e[30]=o,e[31]=I):I=e[31];let M;e[32]!==w||e[33]!==T||e[34]!==I?(M=n.jsxs("span",{className:"text-right tabular-nums",children:[w," / ",T," (",I,"%)"]}),e[32]=w,e[33]=T,e[34]=I,e[35]=M):M=e[35];let C;e[36]!==f||e[37]!==i||e[38]!==m?(C=f>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cost"}),n.jsxs("span",{className:"text-right tabular-nums",children:["$",f.toFixed(4)]}),n.jsx("span",{className:"text-muted",children:"in"}),n.jsx("span",{className:"text-right tabular-nums",children:i.toLocaleString()}),n.jsx("span",{className:"text-muted",children:"out"}),n.jsx("span",{className:"text-right tabular-nums",children:m.toLocaleString()})]}),e[36]=f,e[37]=i,e[38]=m,e[39]=C):C=e[39];let L;e[40]!==i||e[41]!==t?.cacheReadTokens||e[42]!==t?.cacheWriteTokens?(L=((t?.cacheReadTokens??0)>0||(t?.cacheWriteTokens??0)>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:i>0?`${((t?.cacheReadTokens??0)/i*100).toFixed(0)}%`:"0%"})]}),e[40]=i,e[41]=t?.cacheReadTokens,e[42]=t?.cacheWriteTokens,e[43]=L):L=e[43];let R;e[44]!==M||e[45]!==C||e[46]!==L?(R=n.jsx(xe,{side:"top",className:"font-mono text-[11px]",children:n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[_,M,C,L]})}),e[44]=M,e[45]=C,e[46]=L,e[47]=R):R=e[47];let F;return e[48]!==k||e[49]!==R?(F=n.jsxs(ge,{children:[k,R]}),e[48]=k,e[49]=R,e[50]=F):F=e[50],F}function hn(s){const e=$.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(fs,{"data-slot":"collapsible",...t}),e[2]=t,e[3]=l):l=e[3],l}function bn(s){const e=$.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(us,{"data-slot":"collapsible-trigger",...t}),e[2]=t,e[3]=l):l=e[3],l}function yn(s){const e=$.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(ds,{"data-slot":"collapsible-content",...t}),e[2]=t,e[3]=l):l=e[3],l}function D(s){const e=$.c(53),{icon:t,title:l,usage:r,summary:a,state:o,detail:u,detailVariant:f,forceOpen:i,variant:m,trailing:p,iconDestructive:c,alwaysChevron:d,defaultOpen:x,children:g}=s,b=f===void 0?"code":f,h=m===void 0?"default":m,[N,j]=H.useState(x??!1),{handleCopy:S,copied:y}=pt(),v=o==="loading",k=o==="error";let _;e[0]!==u?(_=u&&u.trim(),e[0]=u,e[1]=_):_=e[1];const T=!!_||!!g,I=h==="subtask",M=(i??!1)||N,C=H.useRef(null),L=v&&M;let R;e[2]!==u?(R=[u],e[2]=u,e[3]=R):R=e[3];let F;e[4]!==L||e[5]!==R?(F={containerRef:C,enabled:L,contentDeps:R},e[4]=L,e[5]=R,e[6]=F):F=e[6];const{sentinelRef:E}=tn(F),A=i?void 0:j,z=!T,O=T&&"[@media(hover:hover)]:hover:bg-accent/30",U=!T&&"cursor-default",W=v&&"shimmer";let V;e[7]!==U||e[8]!==W||e[9]!==O?(V=q("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",O,U,W),e[7]=U,e[8]=W,e[9]=O,e[10]=V):V=e[10];const ne=!T;let X;e[11]!==d||e[12]!==M||e[13]!==t||e[14]!==c||e[15]!==k||e[16]!==T?(X=n.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?n.jsx(Ye,{className:q("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",M&&"rotate-90")}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:q("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",c?"[&>svg]:text-destructive/70":k?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",T&&(M?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:t}),T&&n.jsx("div",{className:q("absolute inset-0 flex items-center justify-center transition-opacity duration-150",M?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:n.jsx(Ye,{className:q("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",M&&"rotate-90")})})]})}),e[11]=d,e[12]=M,e[13]=t,e[14]=c,e[15]=k,e[16]=T,e[17]=X):X=e[17];const Q=k?"text-warning/80":"text-foreground";let J;e[18]!==Q?(J=q("shrink-0 text-[14px] font-normal",Q),e[18]=Q,e[19]=J):J=e[19];let ee;e[20]!==J||e[21]!==l?(ee=n.jsx("span",{className:J,children:l}),e[20]=J,e[21]=l,e[22]=ee):ee=e[22];let P;e[23]!==a?(P=a?n.jsx("span",{className:"min-w-0 flex-1 truncate",children:n.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:a})}):n.jsx("div",{className:"flex-1"}),e[23]=a,e[24]=P):P=e[24];let B;e[25]!==p?(B=p&&n.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:p}),e[25]=p,e[26]=B):B=e[26];let G;e[27]!==r?(G=n.jsx(xn,{usage:r}),e[27]=r,e[28]=G):G=e[28];let K;e[29]!==V||e[30]!==ne||e[31]!==X||e[32]!==ee||e[33]!==P||e[34]!==B||e[35]!==G||e[36]!==z?(K=n.jsxs(bn,{disabled:z,className:V,"aria-disabled":ne,children:[X,ee,P,B,G]}),e[29]=V,e[30]=ne,e[31]=X,e[32]=ee,e[33]=P,e[34]=B,e[35]=G,e[36]=z,e[37]=K):K=e[37];let Y;e[38]!==g||e[39]!==y||e[40]!==u||e[41]!==b||e[42]!==S||e[43]!==T||e[44]!==E?(Y=T&&n.jsx(yn,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:g||(b==="prose"?n.jsx("div",{className:"mt-1 mb-1",children:n.jsxs("div",{ref:C,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:[n.jsx("p",{className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:u}),n.jsx("div",{ref:E,className:"h-0 shrink-0"})]})}):n.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:n.jsxs("div",{ref:C,className:"flex flex-col max-h-48 overflow-y-auto",children:[n.jsxs("div",{className:"flex items-start justify-between gap-2",children:[n.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:n.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:u})}),n.jsx("button",{type:"button",onClick:()=>S(u),className:"shrink-0 p-1.5 rounded-md text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":"Copy",children:y?n.jsx(Be,{className:"size-3.5"}):n.jsx(ut,{className:"size-3.5"})})]}),n.jsx("div",{ref:E,className:"h-0 shrink-0"})]})}))}),e[38]=g,e[39]=y,e[40]=u,e[41]=b,e[42]=S,e[43]=T,e[44]=E,e[45]=Y):Y=e[45];let ue;e[46]!==M||e[47]!==K||e[48]!==Y||e[49]!==A?(ue=n.jsxs(hn,{open:M,onOpenChange:A,className:"min-w-0",children:[K,Y]}),e[46]=M,e[47]=K,e[48]=Y,e[49]=A,e[50]=ue):ue=e[50];const le=ue;if(I){let oe;return e[51]!==le?(oe=n.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:le}),e[51]=le,e[52]=oe):oe=e[52],oe}return le}function Z(s){const e=$.c(4),{latency:t}=s;if(t==null||t<=0)return null;let l;e[0]!==t?(l=de(t),e[0]=t,e[1]=l):l=e[1];let r;return e[2]!==l?(r=n.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:l}),e[2]=l,e[3]=r):r=e[3],r}const Mt=4;function Lt(s){const e=$.c(5),{count:t,noun:l,onClick:r}=s;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(ct,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[0]=a):a=e[0];let o;return e[1]!==t||e[2]!==l||e[3]!==r?(o=n.jsxs("button",{type:"button",onClick:r,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:["See all ",t," ",l,a]}),e[1]=t,e[2]=l,e[3]=r,e[4]=o):o=e[4],o}function jn(s){const e=$.c(27),{org:t}=he(),l=Ut(),r=ks();let a;e[0]!==t.id||e[1]!==t.slug?(a={connectionId:vs,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=a):a=e[2];const o=We(a);let u;e[3]!==o||e[4]!==s?(u=async b=>{if(!s)throw new Error("useTaskExpandedTools: no task in context");const h=await o.callTool({name:"COLLECTION_THREADS_GET",arguments:{id:s}}),j=(h.structuredContent??h).item?.metadata??{},y=(j.expanded_tools??[]).filter(k=>k.toolName!==b.toolName);y.push({...b,expandedAt:new Date().toISOString()});const v={...j,expanded_tools:y};return await o.callTool({name:"COLLECTION_THREADS_UPDATE",arguments:{id:s,data:{metadata:v}}}),y},e[3]=o,e[4]=s,e[5]=u):u=e[5];let f,i,m;e[6]!==t.id||e[7]!==l||e[8]!==s?(f=async b=>{const h=me.ensureTask(t.id,s??"");await l.cancelQueries({queryKey:h});const N=l.getQueryData(h),S=(N?.metadata?.expanded_tools??[]).filter(y=>y.toolName!==b.toolName);return S.push({...b,expandedAt:new Date().toISOString()}),l.setQueryData(h,y=>y&&{...y,metadata:{...y.metadata??{},expanded_tools:S}}),{previous:N}},i=()=>{l.invalidateQueries({queryKey:me.ensureTask(t.id,s??"")})},m=(b,h,N)=>{const j=me.ensureTask(t.id,s??"");N?.previous===void 0?l.removeQueries({queryKey:j,exact:!0}):l.setQueryData(j,N.previous),ze.error(b instanceof Error?b.message:"Failed to expand tool")},e[6]=t.id,e[7]=l,e[8]=s,e[9]=f,e[10]=i,e[11]=m):(f=e[9],i=e[10],m=e[11]);let p;e[12]!==u||e[13]!==f||e[14]!==i||e[15]!==m?(p={mutationFn:u,onMutate:f,onSuccess:i,onError:m},e[12]=u,e[13]=f,e[14]=i,e[15]=m,e[16]=p):p=e[16];const c=Wt(p);let d;e[17]!==r||e[18]!==c||e[19]!==t.id||e[20]!==l||e[21]!==s?(d=b=>{if(!s||!r)return;const h=me.ensureTask(t.id,s),N=l.getQueryData(h),S=(N?.metadata?.expanded_tools??[]).filter(v=>v.toolName!==b.toolName);S.push({...b,expandedAt:new Date().toISOString()});const y={...N?.metadata??{},expanded_tools:S};l.setQueryData(h,v=>v&&{...v,metadata:y}),r.patchThread({id:s,metadata:y}),c.mutate(b)},e[17]=r,e[18]=c,e[19]=t.id,e[20]=l,e[21]=s,e[22]=d):d=e[22];const x=d;let g;return e[23]!==x||e[24]!==c.isPending||e[25]!==c.mutate?(g={addOrReplace:c.mutate,addOrReplaceEager:x,isPending:c.isPending},e[23]=x,e[24]=c.isPending,e[25]=c.mutate,e[26]=g):g=e[26],g}function vn(s,e,t,l){const{data:r,isLoading:a}=Oe({queryKey:me.toolDefinitionLookup(e,t,s),queryFn:async()=>{if(!s||!e)return null;const o=await Ns({connectionId:e,orgId:t,orgSlug:l});try{const{tools:u}=await o.listTools(),f=It(s);return u.find(i=>i.name===f)??null}finally{await o.close().catch(()=>{})}},enabled:!!s&&!!e,staleTime:6e4,gcTime:3e5,retry:!1});return{toolDef:r??void 0,isLoading:a}}const Nn={read:{icon:Qe,label:"Read File"},write:{icon:Is,label:"Write File"},edit:{icon:Zt,label:"Edit File"},grep:{icon:Ls,label:"Search Content"},glob:{icon:Ms,label:"Find Files"},bash:{icon:Yt,label:"Run Command"},read_tool_output:{icon:Qe,label:"Read Tool Output"},read_resource:{icon:Qt,label:"Read Resource"},read_prompt:{icon:jt,label:"Read Prompt"},enable_tool:{icon:$s,label:"Enable Tool"},open_in_agent:{icon:Xt,label:"Open in Agent"},sandbox:{icon:Jt,label:"Run Code"},copy_to_sandbox:{icon:vt,label:"Load File"},share_with_user:{icon:Rs,label:"Share with User"},take_screenshot:{icon:Te,label:"Take Screenshot"},scrape_url:{icon:Ce,label:"Scrape URL"},inspect_page:{icon:Kt,label:"Inspect Page"}};function Ke(s,e="An unknown error occurred"){return"errorText"in s&&typeof s.errorText=="string"?s.errorText:e}function ye(s){if(s==null)return"";try{return JSON.stringify(s)}catch{return"[Non-serializable value]"}}const Sn=s=>s.type==="dynamic-tool"||s.type.startsWith("tool-");function kn(s){if(!s||typeof s!="object")return null;const e=s;if(!Array.isArray(e.parts))return null;const t=[];for(const l of e.parts)if(l.type==="text"&&typeof l.text=="string")t.push(l.text);else if(l.type==="reasoning")t.push(`## Reasoning
1
+ import{r as H,e as $,R as at,H as Dt,G as Ht,j as n,B as Ne,U as Xe,c as q,t as Bt,q as he,F as Ut,a as Wt,K as me,o as ze,n as Oe,f as je,E as qt,z as Vt,bu as De}from"./index-Dj0KvohQ.js";import{Z as Gt,E as Kt,y as Jt,aa as Xt,M as Qt,r as Qe,L as Yt,K as Zt,a6 as rt,ab as es,ac as ts,A as it,ad as ie,ae as ss,af as ns,ag as ls,b as os}from"./agent-icon-DQY5C0N2.js";import{t as He}from"./Stars01-CScMgUNS.js";import{a as ct,t as as,b as _e,d as rs}from"./XCircle-CdiDJXb-.js";import{i as Be}from"./Check-DA5UKh5X.js";import{i as Ye}from"./ChevronRight-Bp_pdC8P.js";import{a as ut,s as is}from"./Eye-6gmxXOun.js";import{a as de,c as Ze,t as cs}from"./format-time-Cy7tTmZp.js";import{N as dt,R as ft,e as mt,C as us,f as ds,g as fs,u as ms,i as ps,d as xs}from"./scroll-area-B_h8lIJ9.js";import{u as pt}from"./use-copy-BQU7kOTS.js";import{T as pe,a as xe,b as ge}from"./tooltip-DR0ou5_h.js";import{M as xt,I as gt,F as gs}from"./file-type-icon-5-Jlm8ee.js";import{c as hs}from"./content-blocks-o63cs2vh.js";import{g as ht,M as bs}from"./types-B8jc6i3t.js";import{f as $e,i as ys,d as Ue,a as js}from"./chat-context-B5R7Bsxn.js";import{S as vs,u as We,c as Ns,b as Ss}from"./constants-BrUmWQ5v.js";import{m as ks,f as _s,n as ws}from"./tab-id-Dqk0Iqqp.js";import{i as bt}from"./AlertCircle-eeQ8IQAG.js";import{s as Ce,t as yt}from"./Star01-BCTguvLh.js";import{s as Ts}from"./XClose-REUNo7hV.js";import{n as jt}from"./ZapSquare-DZf6Sug7.js";import{n as vt,i as Cs}from"./Globe01-DLq7QB09.js";import{b as $s,i as Is,a as Le}from"./Tool01-BGfKCaOe.js";import{i as Ms}from"./ZoomOut-aDyKTD6y.js";import{i as Te}from"./Monitor01-me2M7qcF.js";import{i as Ls}from"./SearchMd-Cd3-NscL.js";import{i as Rs}from"./Upload01-cIFihtD7.js";import{u as As,c as zs}from"./shell-layout-B5BcGCUv.js";import{n as Nt}from"./LinkExternal01-BbkedL4y.js";import{I as Ie}from"./integration-icon-CfgTtI5o.js";import{u as Es}from"./use-virtual-mcp-CLwhjRff.js";import{a as St}from"./Users03-Cy6p41F6.js";import{a as ce}from"./Palette-cwbQQzjc.js";import{k as kt}from"./use-navigate-to-agent-BF3wV5AT.js";import{a as Ps}from"./use-connection-B9u8CAro.js";import{s as Fs}from"./Stars02-DhCmA77R.js";import{g as Os}from"./use-mcp-prompts-CbFGc10Q.js";import{c as Ds,b as Hs,d as Bs,a as Us,D as Ws}from"./dialog-DJ-H5eyi.js";import{a as qs,F as Vs,b as Gs,c as Ks,d as Js,f as Xs}from"./form-CO8TZWfS.js";import{I as Qs}from"./input-D7b0qTbD.js";import{S as Ys}from"./spinner-w0j4pkm6.js";import{t as Zs}from"./ChevronDown-CYgGBXvc.js";const en={openrouter:s=>{const e=s?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function _t(s){if(!s?.providerMetadata)return 0;for(const e of Object.values(en)){const t=e(s.providerMetadata);if(t!==null)return t}return 0}function wt(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function Tt(s,e){if(!e)return s;const t=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,l=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:s.inputTokens+(e.inputTokens??0),outputTokens:s.outputTokens+(e.outputTokens??0),reasoningTokens:s.reasoningTokens+(e.reasoningTokens??0),totalTokens:s.totalTokens+(e.totalTokens??0),cost:s.cost+_t(e),cacheReadTokens:s.cacheReadTokens+t,cacheWriteTokens:s.cacheWriteTokens+l}}function ca(s){return s.reduce((e,t)=>Tt(e,t.metadata?.usage),wt())}function tn({containerRef:s,enabled:e,contentDeps:t=[],threshold:l,intervalMs:r=500}){const[a,o]=H.useState(null),[u,f]=H.useState(!1),i=l??(s?.95:.1),m=()=>{if(s?.current){s.current.scrollTop=s.current.scrollHeight;return}if(!a)return;let p=a.parentElement;for(;p;){const c=window.getComputedStyle(p);if(c.overflowY==="auto"||c.overflowY==="scroll"||c.overflow==="auto"||c.overflow==="scroll"){p.scrollTop=p.scrollHeight;return}p=p.parentElement}};return H.useEffect(()=>{if(!a)return;const p=new IntersectionObserver(c=>{const d=c[0]?.isIntersecting??!1;f(d)},{root:s?.current??null,threshold:i,rootMargin:"0px"});return p.observe(a),()=>p.disconnect()},[a,i]),H.useEffect(()=>{if(!e||!u)return;const p=setInterval(m,r);return()=>clearInterval(p)},[e,u,r]),H.useEffect(()=>{!e||!u||m()},[e,u,...t]),{sentinelRef:o,isTracking:u}}function sn(s){return s.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function qe(s){if(s&&typeof s=="object"&&"gatewayClientId"in s&&typeof s.gatewayClientId=="string")return s.gatewayClientId}function Ve(s,e){if(!e)return s;const t=`${sn(e)}_`;return s.startsWith(t)?s.slice(t.length):s}function nn(s,e){return Ve(s,e).replace(/[_-]/g," ").toLowerCase()}function ln(s){const e={};for(const t of s.arguments??[])e[t.name]=t.required?Xe().min(1,"Required"):Xe();return at(e)}function on(s,e){const t={};for(const l of s.arguments??[])t[l.name]=e?.[l.name]??"";return t}function an(s){const e=$.c(66),{prompt:t,setPrompt:l,onSubmit:r,defaultValues:a}=s,o=H.useId();let u;if(e[0]!==t){const A=t?ln(t):at({});u=Dt(A),e[0]=t,e[1]=u}else u=e[1];const i=u;let m;e[2]!==a||e[3]!==t?(m=t?on(t,a):{},e[2]=a,e[3]=t,e[4]=m):m=e[4];let p;e[5]!==i||e[6]!==m?(p={resolver:i,defaultValues:m,mode:"onChange"},e[5]=i,e[6]=m,e[7]=p):p=e[7];const c=Ht(p);let d;e[8]!==t?.arguments?(d=t?.arguments??[],e[8]=t?.arguments,e[9]=d):d=e[9];const x=d;let g;e[10]!==c||e[11]!==r||e[12]!==l?(g=async A=>{await r(A),l(null),c.reset()},e[10]=c,e[11]=r,e[12]=l,e[13]=g):g=e[13];const b=g;let h;e[14]!==c||e[15]!==l?(h=A=>{A||(c.reset(),l(null))},e[14]=c,e[15]=l,e[16]=h):h=e[16];const N=h;if(!t)return null;let j;e[17]!==t._meta||e[18]!==t.name||e[19]!==t.title?(j=t.title||nn(t.name,qe(t._meta)),e[17]=t._meta,e[18]=t.name,e[19]=t.title,e[20]=j):j=e[20];let S;e[21]!==j?(S=n.jsx(Ds,{children:n.jsx("span",{className:"capitalize",children:j})}),e[21]=j,e[22]=S):S=e[22];let y;e[23]!==t.description?(y=t.description&&n.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),e[23]=t.description,e[24]=y):y=e[24];let v;e[25]!==y||e[26]!==S?(v=n.jsxs(Hs,{children:[S,y]}),e[25]=y,e[26]=S,e[27]=v):v=e[27];let k;e[28]!==c||e[29]!==b?(k=A=>{A.stopPropagation(),c.handleSubmit(b)(A)},e[28]=c,e[29]=b,e[30]=k):k=e[30];let _;if(e[31]!==x||e[32]!==c.control||e[33]!==c.formState.isSubmitting){let A;e[35]!==c.control||e[36]!==c.formState.isSubmitting?(A=z=>n.jsx(Vs,{control:c.control,name:z.name,render:O=>{const{field:U}=O;return n.jsxs(Gs,{children:[n.jsxs(Ks,{className:"text-xs",children:[z.name,z.required?null:n.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),n.jsx(Js,{children:n.jsx(Qs,{...U,value:U.value??"",required:z.required,placeholder:z.description??"",className:"h-9",disabled:c.formState.isSubmitting})}),n.jsx(Xs,{})]})}},z.name),e[35]=c.control,e[36]=c.formState.isSubmitting,e[37]=A):A=e[37],_=x.map(A),e[31]=x,e[32]=c.control,e[33]=c.formState.isSubmitting,e[34]=_}else _=e[34];let w;e[38]!==N?(w=()=>N(!1),e[38]=N,e[39]=w):w=e[39];let T;e[40]!==c.formState.isSubmitting||e[41]!==w?(T=n.jsx(Ne,{type:"button",variant:"ghost",onClick:w,disabled:c.formState.isSubmitting,children:"Cancel"}),e[40]=c.formState.isSubmitting,e[41]=w,e[42]=T):T=e[42];let I;e[43]!==c.formState.isSubmitting?(I=c.formState.isSubmitting?n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Ys,{size:"xs"}),"Loading..."]}):"Use prompt",e[43]=c.formState.isSubmitting,e[44]=I):I=e[44];let M;e[45]!==c.formState.isSubmitting||e[46]!==o||e[47]!==I?(M=n.jsx(Ne,{type:"submit",form:o,disabled:c.formState.isSubmitting,children:I}),e[45]=c.formState.isSubmitting,e[46]=o,e[47]=I,e[48]=M):M=e[48];let C;e[49]!==T||e[50]!==M?(C=n.jsxs(Bs,{children:[T,M]}),e[49]=T,e[50]=M,e[51]=C):C=e[51];let L;e[52]!==o||e[53]!==k||e[54]!==_||e[55]!==C?(L=n.jsxs("form",{id:o,className:"space-y-4 py-4",autoComplete:"off",onSubmit:k,children:[_,C]}),e[52]=o,e[53]=k,e[54]=_,e[55]=C,e[56]=L):L=e[56];let R;e[57]!==c||e[58]!==L?(R=n.jsx(qs,{...c,children:L}),e[57]=c,e[58]=L,e[59]=R):R=e[59];let F;e[60]!==v||e[61]!==R?(F=n.jsxs(Us,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[v,R]}),e[60]=v,e[61]=R,e[62]=F):F=e[62];let E;return e[63]!==N||e[64]!==F?(E=n.jsx(Ws,{open:!0,onOpenChange:N,children:F}),e[63]=N,e[64]=F,e[65]=E):E=e[65],E}function Ct(s){return s?s.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function re(s,e){return s==="output-error"||s==="output-denied"?"error":s==="approval-requested"?"approval":s==="input-streaming"||s==="input-available"||s==="output-available"&&e===!0?"loading":"idle"}function ve(s){if(s==null||typeof s!="object")return;const e=s;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const t=e.content[0];if(t?.type==="text"&&typeof t.text=="string")try{return JSON.parse(t.text)}catch{return}return}return s}function rn(s){return s.storage.mention}function ua(s,e,t){s.chain().focus().insertContentAt(e,[$t(t),{type:"text",text:" "}]).run()}function $t(s){return{type:"mention",attrs:s}}function cn(s){const e=$.c(19),{node:t,selected:l,view:r,editor:a,getPos:o}=s,{name:u,char:f,kind:i,id:m,args:p}=t.attrs,c=l&&r.editable,d=f==="@",x=r.editable&&f==="/"&&i!=="resource";let g;e[0]!==p||e[1]!==a||e[2]!==o||e[3]!==m||e[4]!==x||e[5]!==u?(g=_=>{if(!x)return;const T=rn(a)?.onEditChip;if(!T||typeof o!="function")return;const I=o();typeof I=="number"&&(_.preventDefault(),_.stopPropagation(),T({promptId:m,promptName:u,args:p??{},pos:I}))},e[0]=p,e[1]=a,e[2]=o,e[3]=m,e[4]=x,e[5]=u,e[6]=g):g=e[6];const b=g,h=x?"cursor-pointer":"cursor-default",N=d?"bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-400":"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300",j=c&&"outline-2 outline-blue-300 outline-offset-0",S=x&&"hover:brightness-95";let y;e[7]!==h||e[8]!==N||e[9]!==j||e[10]!==S?(y=q("px-1 py-1 rounded","inline-flex items-center gap-1",h,"select-none","text-xs font-light",N,j,S,"capitalize"),e[7]=h,e[8]=N,e[9]=j,e[10]=S,e[11]=y):y=e[11];let v;e[12]!==u?(v=u?Ct(u):"",e[12]=u,e[13]=v):v=e[13];let k;return e[14]!==f||e[15]!==b||e[16]!==y||e[17]!==v?(k=n.jsxs(mt,{onClick:b,className:y,children:[f,v]}),e[14]=f,e[15]=b,e[16]=y,e[17]=v,e[18]=k):k=e[18],k}const un=dt.create({name:"mention",group:"inline",inline:!0,atom:!0,addStorage(){return{onEditChip:null}},addAttributes(){return{id:{default:null,parseHTML:s=>s.getAttribute("data-id")||null,renderHTML:s=>s.id?{"data-id":s.id}:{}},name:{default:null,parseHTML:s=>s.getAttribute("data-name")||null,renderHTML:s=>s.name?{"data-name":s.name}:{}},char:{default:"/",parseHTML:s=>s.getAttribute("data-char")||"/",renderHTML:s=>s.char?{"data-char":s.char}:{}},metadata:{default:null,parseHTML:s=>{try{return JSON.parse(s.getAttribute("data-metadata")||"null")}catch{return null}},renderHTML:s=>s.metadata?{"data-metadata":JSON.stringify(s.metadata)}:{}},kind:{default:null,parseHTML:s=>s.getAttribute("data-kind")||null,renderHTML:s=>s.kind?{"data-kind":s.kind}:{}},args:{default:null,parseHTML:s=>{try{return JSON.parse(s.getAttribute("data-args")||"null")}catch{return null}},renderHTML:s=>s.args?{"data-args":JSON.stringify(s.args)}:{}}}},parseHTML(){return[{tag:'span[data-type="mention"]'}]},renderHTML({node:s,HTMLAttributes:e}){const t={"data-type":"mention"};return s.attrs.id&&(t["data-id"]=s.attrs.id),s.attrs.name&&(t["data-name"]=s.attrs.name),s.attrs.char&&(t["data-char"]=s.attrs.char),s.attrs.metadata&&(t["data-metadata"]=JSON.stringify(s.attrs.metadata)),s.attrs.kind&&(t["data-kind"]=s.attrs.kind),s.attrs.args&&(t["data-args"]=JSON.stringify(s.attrs.args)),["span",{...e,...t}]},renderText({node:s}){const e=s.attrs.char??"@",t=s.attrs.name??"";return`${e}${t}`},addNodeView(){return ft(cn)}}),dn=/^mcp__[a-zA-Z0-9_-]+__/;function It(s){return s.replace(dn,"")}function Ge(s){const e=$.c(17),{id:t,part:l,copyable:r,extraActions:a,alwaysShowActions:o}=s,u=r===void 0?!1:r,f=o===void 0?!1:o,{handleCopy:i}=pt(),[m,p]=H.useState(!1);let c;e[0]!==i||e[1]!==t||e[2]!==l.text?(c=async()=>{Bt("chat_message_copied",{message_id:t,chars:l.text.length}),await i(l.text),p(!0),setTimeout(()=>p(!1),2e3)},e[0]=i,e[1]=t,e[2]=l.text,e[3]=c):c=e[3];const d=c,x=u&&a,g=x||a;let b;e[4]!==t||e[5]!==l.text?(b=n.jsx(xt,{id:t,text:l.text}),e[4]=t,e[5]=l.text,e[6]=b):b=e[6];let h;e[7]!==f||e[8]!==a||e[9]!==d||e[10]!==m||e[11]!==g||e[12]!==x?(h=g&&n.jsxs("div",{className:q("flex w-full items-center gap-2 text-sm text-muted-foreground transition-all duration-200 mt-1 py-1",f?"opacity-100":"opacity-0 pointer-events-none group-hover/part:opacity-100 group-hover/part:pointer-events-auto"),children:[a,x&&a&&n.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),x&&n.jsx("button",{type:"button",onClick:d,className:"text-muted-foreground [@media(hover:hover)]:hover:text-foreground transition-colors active:scale-[0.97]","aria-label":"Copy message",children:m?n.jsx(Be,{className:"size-4"}):n.jsx(ut,{className:"size-4"})})]}),e[7]=f,e[8]=a,e[9]=d,e[10]=m,e[11]=g,e[12]=x,e[13]=h):h=e[13];let N;return e[14]!==b||e[15]!==h?(N=n.jsxs("div",{className:"group/part relative",children:[b,h]}),e[14]=b,e[15]=h,e[16]=N):N=e[16],N}function da(s,e,t){s.chain().focus().insertContentAt(e,[fn(t),{type:"text",text:" "}]).run()}function fn(s){return{type:"file",attrs:s}}function mn(s){const e=$.c(17),{node:t,selected:l,view:r}=s,{name:a,mimeType:o,data:u}=t.attrs,f=l&&r.editable;let i;e[0]!==o?(i=o.startsWith("image/"),e[0]=o,e[1]=i):i=e[1];const m=i,p=f&&"outline-2 outline-blue-300 outline-offset-0";let c;e[2]!==p?(c=q("px-1 py-1 rounded","inline-flex items-center gap-1","cursor-default select-none","text-xs font-light","bg-muted text-muted-foreground",p),e[2]=p,e[3]=c):c=e[3];let d;e[4]!==a?(d=n.jsx(pe,{asChild:!0,children:n.jsx("span",{children:a})}),e[4]=a,e[5]=d):d=e[5];let x;e[6]!==u||e[7]!==m||e[8]!==o||e[9]!==a?(x=n.jsx(xe,{side:"top",className:"max-w-sm p-1.5",children:m?n.jsx("img",{src:`data:${o};base64,${u}`,alt:a,className:"max-w-full max-h-64 object-contain rounded"}):n.jsxs("div",{className:"text-xs",children:[n.jsx("div",{className:"font-medium",children:a}),n.jsx("div",{className:"text-muted-foreground mt-1",children:o})]})}),e[6]=u,e[7]=m,e[8]=o,e[9]=a,e[10]=x):x=e[10];let g;e[11]!==d||e[12]!==x?(g=n.jsxs(ge,{children:[d,x]}),e[11]=d,e[12]=x,e[13]=g):g=e[13];let b;return e[14]!==c||e[15]!==g?(b=n.jsx(mt,{className:c,children:g}),e[14]=c,e[15]=g,e[16]=b):b=e[16],b}const pn=dt.create({name:"file",group:"inline",inline:!0,atom:!0,addAttributes(){return{id:{default:null,parseHTML:s=>s.getAttribute("data-id")||null,renderHTML:s=>s.id?{"data-id":s.id}:{}},name:{default:null,parseHTML:s=>s.getAttribute("data-name")||null,renderHTML:s=>s.name?{"data-name":s.name}:{}},mimeType:{default:null,parseHTML:s=>s.getAttribute("data-mime-type")||null,renderHTML:s=>s.mimeType?{"data-mime-type":s.mimeType}:{}},size:{default:0,parseHTML:s=>{const e=s.getAttribute("data-size");return e?Number.parseInt(e,10):0},renderHTML:s=>s.size?{"data-size":String(s.size)}:{}},data:{default:null,parseHTML:s=>s.getAttribute("data-data")||null,renderHTML:s=>s.data?{"data-data":s.data}:{}}}},parseHTML(){return[{tag:'span[data-type="file"]'}]},renderHTML({node:s,HTMLAttributes:e}){const t={"data-type":"file"};return s.attrs.id&&(t["data-id"]=s.attrs.id),s.attrs.name&&(t["data-name"]=s.attrs.name),s.attrs.mimeType&&(t["data-mime-type"]=s.attrs.mimeType),s.attrs.size&&(t["data-size"]=String(s.attrs.size)),s.attrs.data&&(t["data-data"]=s.attrs.data),["span",{...e,...t}]},renderText({node:s}){return`[${s.attrs.name??""}]`},addNodeView(){return ft(mn)}}),fe=16,Ee=2.5,Pe=(fe-Ee)/2,Re=2*Math.PI*Pe;function xn(s){const e=$.c(31),{usage:t}=s;if(!t)return null;const{totalTokens:l,inputTokens:r,outputTokens:a,cost:o}=t;if(!l&&!r&&!a)return null;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(Gt,{size:12}),e[0]=u):u=e[0];let f;e[1]!==o||e[2]!==l?(f=o>0?`$${o.toFixed(4)}`:l.toLocaleString(),e[1]=o,e[2]=l,e[3]=f):f=e[3];let i;e[4]!==f?(i=n.jsx(pe,{asChild:!0,children:n.jsxs("span",{className:"inline-flex items-center text-muted-foreground [@media(hover:hover)]:hover:text-foreground pl-1 h-6 gap-1 whitespace-nowrap shrink-0 cursor-default",children:[u,n.jsx("span",{className:"text-sm font-mono tabular-nums",children:f})]})}),e[4]=f,e[5]=i):i=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("p",{className:"text-muted text-[10px] mb-1",children:"tokens"}),e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx("span",{className:"text-muted",children:"in"}),e[7]=p):p=e[7];let c;e[8]!==r?(c=r.toLocaleString(),e[8]=r,e[9]=c):c=e[9];let d;e[10]!==c?(d=n.jsx("span",{className:"text-right tabular-nums",children:c}),e[10]=c,e[11]=d):d=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("span",{className:"text-muted",children:"out"}),e[12]=x):x=e[12];const g=a-(t.reasoningTokens??0);let b;e[13]!==g?(b=g.toLocaleString(),e[13]=g,e[14]=b):b=e[14];let h;e[15]!==b?(h=n.jsx("span",{className:"text-right tabular-nums",children:b}),e[15]=b,e[16]=h):h=e[16];let N;e[17]!==r||e[18]!==t.cacheReadTokens||e[19]!==t.cacheWriteTokens?(N=(t.cacheReadTokens>0||t.cacheWriteTokens>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:r>0?`${(t.cacheReadTokens/r*100).toFixed(0)}%`:"0%"})]}),e[17]=r,e[18]=t.cacheReadTokens,e[19]=t.cacheWriteTokens,e[20]=N):N=e[20];let j;e[21]!==o?(j=o>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cost"}),n.jsxs("span",{className:"text-right tabular-nums",children:["$",o.toFixed(4)]})]}),e[21]=o,e[22]=j):j=e[22];let S;e[23]!==h||e[24]!==N||e[25]!==j||e[26]!==d?(S=n.jsxs(xe,{side:"top",className:"font-mono text-[11px]",children:[m,n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[p,d,x,h,N,j]})]}),e[23]=h,e[24]=N,e[25]=j,e[26]=d,e[27]=S):S=e[27];let y;return e[28]!==S||e[29]!==i?(y=n.jsxs(ge,{children:[i,S]}),e[28]=S,e[29]=i,e[30]=y):y=e[30],y}function gn(s){const e=$.c(19),{usage:t,duration:l}=s,r=l!=null&&l>0,a=t!=null&&(t.cost??0)>0,o=t!=null&&(t.totalTokens??0)>0;if(!r&&!a&&!o)return null;let u;e[0]!==l||e[1]!==r?(u=r?de(l/1e3):null,e[0]=l,e[1]=r,e[2]=u):u=e[2];const f=u;let i;e[3]!==l||e[4]!==f||e[5]!==t?(i=f&&n.jsxs(ge,{children:[n.jsx(pe,{asChild:!0,children:n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:f})}),n.jsxs(xe,{side:"top",className:"font-mono text-[11px]",children:[n.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"thinking"}),n.jsx("span",{className:"tabular-nums",children:de(l/1e3)}),(t?.reasoningTokens??0)>0&&n.jsxs("span",{className:"ml-2 opacity-50",children:[t.reasoningTokens.toLocaleString()," tok"]})]})]}),e[3]=l,e[4]=f,e[5]=t,e[6]=i):i=e[6];let m;e[7]!==a||e[8]!==r||e[9]!==o?(m=r&&(a||o)&&n.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),e[7]=a,e[8]=r,e[9]=o,e[10]=m):m=e[10];let p;e[11]!==a||e[12]!==o||e[13]!==t?(p=(a||o)&&n.jsxs(ge,{children:[n.jsx(pe,{asChild:!0,children:n.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:a?`$${t.cost.toFixed(4)}`:`${t.totalTokens.toLocaleString()} tok`})}),n.jsxs(xe,{side:"top",className:"font-mono text-[11px]",children:[n.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"tokens"}),n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[n.jsx("span",{className:"opacity-60",children:"in"}),n.jsx("span",{className:"text-right tabular-nums",children:(t.inputTokens??0).toLocaleString()}),n.jsx("span",{className:"opacity-60",children:"out"}),n.jsx("span",{className:"text-right tabular-nums",children:((t.outputTokens??0)-(t?.reasoningTokens??0)).toLocaleString()}),(t?.reasoningTokens??0)>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"opacity-60",children:"think"}),n.jsx("span",{className:"text-right tabular-nums",children:t.reasoningTokens.toLocaleString()})]}),((t?.cacheReadTokens??0)>0||(t?.cacheWriteTokens??0)>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"opacity-60",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:(t?.inputTokens??0)>0?`${((t?.cacheReadTokens??0)/t.inputTokens*100).toFixed(0)}%`:"0%"})]})]})]})]}),e[11]=a,e[12]=o,e[13]=t,e[14]=p):p=e[14];let c;return e[15]!==i||e[16]!==m||e[17]!==p?(c=n.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[i,m,p]}),e[15]=i,e[16]=m,e[17]=p,e[18]=c):c=e[18],c}function fa(s){const e=$.c(51),{usage:t,totalTokens:l,contextWindow:r,onOpenContextPanel:a}=s,o=Math.min(l/r*100,100),u=Re-o/100*Re,f=t?.cost??0,i=t?.inputTokens??0,m=t?.outputTokens??0;let p;e[0]!==o?(p=o.toFixed(0),e[0]=o,e[1]=p):p=e[1];let c;e[2]!==f?(c=f>0?`, $${f.toFixed(2)}`:"",e[2]=f,e[3]=c):c=e[3];const d=`Context usage: ${p}%${c}`,x=a?"cursor-pointer":"cursor-default";let g;e[4]!==x?(g=q("flex items-center gap-1.5 text-muted-foreground hover:text-foreground h-6 px-1 shrink-0",x),e[4]=x,e[5]=g):g=e[5];let b;e[6]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx("circle",{cx:fe/2,cy:fe/2,r:Pe,fill:"none",stroke:"currentColor",strokeWidth:Ee,className:"opacity-15"}),e[6]=b):b=e[6];const h=o>90?"text-destructive":o>70?"text-warning":"text-muted-foreground";let N;e[7]!==h?(N=q(h),e[7]=h,e[8]=N):N=e[8];let j;e[9]!==u||e[10]!==N?(j=n.jsxs("svg",{width:fe,height:fe,className:"-rotate-90",children:[b,n.jsx("circle",{cx:fe/2,cy:fe/2,r:Pe,fill:"none",stroke:"currentColor",strokeWidth:Ee,strokeDasharray:Re,strokeDashoffset:u,strokeLinecap:"round",className:N})]}),e[9]=u,e[10]=N,e[11]=j):j=e[11];let S;e[12]!==o?(S=o.toFixed(0),e[12]=o,e[13]=S):S=e[13];let y;e[14]!==f?(y=f>0?` · $${f.toFixed(2)}`:"",e[14]=f,e[15]=y):y=e[15];let v;e[16]!==S||e[17]!==y?(v=n.jsxs("span",{className:"inline-block overflow-hidden whitespace-nowrap max-w-0 opacity-0 transition-[max-width,opacity] duration-200 ease-out @[320px]/chat-bottom:max-w-32 @[320px]/chat-bottom:opacity-100 text-[11px] font-mono tabular-nums",children:[S,"%",y]}),e[16]=S,e[17]=y,e[18]=v):v=e[18];let k;e[19]!==a||e[20]!==v||e[21]!==d||e[22]!==g||e[23]!==j?(k=n.jsx(pe,{asChild:!0,children:n.jsxs("button",{type:"button",onClick:a,"aria-label":d,className:g,children:[j,v]})}),e[19]=a,e[20]=v,e[21]=d,e[22]=g,e[23]=j,e[24]=k):k=e[24];let _;e[25]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx("span",{className:"text-muted",children:"context"}),e[25]=_):_=e[25];let w;e[26]!==l?(w=l.toLocaleString(),e[26]=l,e[27]=w):w=e[27];let T;e[28]!==r?(T=r.toLocaleString(),e[28]=r,e[29]=T):T=e[29];let I;e[30]!==o?(I=o.toFixed(1),e[30]=o,e[31]=I):I=e[31];let M;e[32]!==w||e[33]!==T||e[34]!==I?(M=n.jsxs("span",{className:"text-right tabular-nums",children:[w," / ",T," (",I,"%)"]}),e[32]=w,e[33]=T,e[34]=I,e[35]=M):M=e[35];let C;e[36]!==f||e[37]!==i||e[38]!==m?(C=f>0&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cost"}),n.jsxs("span",{className:"text-right tabular-nums",children:["$",f.toFixed(4)]}),n.jsx("span",{className:"text-muted",children:"in"}),n.jsx("span",{className:"text-right tabular-nums",children:i.toLocaleString()}),n.jsx("span",{className:"text-muted",children:"out"}),n.jsx("span",{className:"text-right tabular-nums",children:m.toLocaleString()})]}),e[36]=f,e[37]=i,e[38]=m,e[39]=C):C=e[39];let L;e[40]!==i||e[41]!==t?.cacheReadTokens||e[42]!==t?.cacheWriteTokens?(L=((t?.cacheReadTokens??0)>0||(t?.cacheWriteTokens??0)>0)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted",children:"cache hit"}),n.jsx("span",{className:"text-right tabular-nums",children:i>0?`${((t?.cacheReadTokens??0)/i*100).toFixed(0)}%`:"0%"})]}),e[40]=i,e[41]=t?.cacheReadTokens,e[42]=t?.cacheWriteTokens,e[43]=L):L=e[43];let R;e[44]!==M||e[45]!==C||e[46]!==L?(R=n.jsx(xe,{side:"top",className:"font-mono text-[11px]",children:n.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[_,M,C,L]})}),e[44]=M,e[45]=C,e[46]=L,e[47]=R):R=e[47];let F;return e[48]!==k||e[49]!==R?(F=n.jsxs(ge,{children:[k,R]}),e[48]=k,e[49]=R,e[50]=F):F=e[50],F}function hn(s){const e=$.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(fs,{"data-slot":"collapsible",...t}),e[2]=t,e[3]=l):l=e[3],l}function bn(s){const e=$.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(us,{"data-slot":"collapsible-trigger",...t}),e[2]=t,e[3]=l):l=e[3],l}function yn(s){const e=$.c(4);let t;e[0]!==s?({...t}=s,e[0]=s,e[1]=t):t=e[1];let l;return e[2]!==t?(l=n.jsx(ds,{"data-slot":"collapsible-content",...t}),e[2]=t,e[3]=l):l=e[3],l}function D(s){const e=$.c(53),{icon:t,title:l,usage:r,summary:a,state:o,detail:u,detailVariant:f,forceOpen:i,variant:m,trailing:p,iconDestructive:c,alwaysChevron:d,defaultOpen:x,children:g}=s,b=f===void 0?"code":f,h=m===void 0?"default":m,[N,j]=H.useState(x??!1),{handleCopy:S,copied:y}=pt(),v=o==="loading",k=o==="error";let _;e[0]!==u?(_=u&&u.trim(),e[0]=u,e[1]=_):_=e[1];const T=!!_||!!g,I=h==="subtask",M=(i??!1)||N,C=H.useRef(null),L=v&&M;let R;e[2]!==u?(R=[u],e[2]=u,e[3]=R):R=e[3];let F;e[4]!==L||e[5]!==R?(F={containerRef:C,enabled:L,contentDeps:R},e[4]=L,e[5]=R,e[6]=F):F=e[6];const{sentinelRef:E}=tn(F),A=i?void 0:j,z=!T,O=T&&"[@media(hover:hover)]:hover:bg-accent/30",U=!T&&"cursor-default",W=v&&"shimmer";let V;e[7]!==U||e[8]!==W||e[9]!==O?(V=q("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",O,U,W),e[7]=U,e[8]=W,e[9]=O,e[10]=V):V=e[10];const ne=!T;let X;e[11]!==d||e[12]!==M||e[13]!==t||e[14]!==c||e[15]!==k||e[16]!==T?(X=n.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?n.jsx(Ye,{className:q("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",M&&"rotate-90")}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:q("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",c?"[&>svg]:text-destructive/70":k?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",T&&(M?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:t}),T&&n.jsx("div",{className:q("absolute inset-0 flex items-center justify-center transition-opacity duration-150",M?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:n.jsx(Ye,{className:q("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",M&&"rotate-90")})})]})}),e[11]=d,e[12]=M,e[13]=t,e[14]=c,e[15]=k,e[16]=T,e[17]=X):X=e[17];const Q=k?"text-warning/80":"text-foreground";let J;e[18]!==Q?(J=q("shrink-0 text-[14px] font-normal",Q),e[18]=Q,e[19]=J):J=e[19];let ee;e[20]!==J||e[21]!==l?(ee=n.jsx("span",{className:J,children:l}),e[20]=J,e[21]=l,e[22]=ee):ee=e[22];let P;e[23]!==a?(P=a?n.jsx("span",{className:"min-w-0 flex-1 truncate",children:n.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:a})}):n.jsx("div",{className:"flex-1"}),e[23]=a,e[24]=P):P=e[24];let B;e[25]!==p?(B=p&&n.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:p}),e[25]=p,e[26]=B):B=e[26];let G;e[27]!==r?(G=n.jsx(xn,{usage:r}),e[27]=r,e[28]=G):G=e[28];let K;e[29]!==V||e[30]!==ne||e[31]!==X||e[32]!==ee||e[33]!==P||e[34]!==B||e[35]!==G||e[36]!==z?(K=n.jsxs(bn,{disabled:z,className:V,"aria-disabled":ne,children:[X,ee,P,B,G]}),e[29]=V,e[30]=ne,e[31]=X,e[32]=ee,e[33]=P,e[34]=B,e[35]=G,e[36]=z,e[37]=K):K=e[37];let Y;e[38]!==g||e[39]!==y||e[40]!==u||e[41]!==b||e[42]!==S||e[43]!==T||e[44]!==E?(Y=T&&n.jsx(yn,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:g||(b==="prose"?n.jsx("div",{className:"mt-1 mb-1",children:n.jsxs("div",{ref:C,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:[n.jsx("p",{className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:u}),n.jsx("div",{ref:E,className:"h-0 shrink-0"})]})}):n.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:n.jsxs("div",{ref:C,className:"flex flex-col max-h-48 overflow-y-auto",children:[n.jsxs("div",{className:"flex items-start justify-between gap-2",children:[n.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:n.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:u})}),n.jsx("button",{type:"button",onClick:()=>S(u),className:"shrink-0 p-1.5 rounded-md text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":"Copy",children:y?n.jsx(Be,{className:"size-3.5"}):n.jsx(ut,{className:"size-3.5"})})]}),n.jsx("div",{ref:E,className:"h-0 shrink-0"})]})}))}),e[38]=g,e[39]=y,e[40]=u,e[41]=b,e[42]=S,e[43]=T,e[44]=E,e[45]=Y):Y=e[45];let ue;e[46]!==M||e[47]!==K||e[48]!==Y||e[49]!==A?(ue=n.jsxs(hn,{open:M,onOpenChange:A,className:"min-w-0",children:[K,Y]}),e[46]=M,e[47]=K,e[48]=Y,e[49]=A,e[50]=ue):ue=e[50];const le=ue;if(I){let oe;return e[51]!==le?(oe=n.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:le}),e[51]=le,e[52]=oe):oe=e[52],oe}return le}function Z(s){const e=$.c(4),{latency:t}=s;if(t==null||t<=0)return null;let l;e[0]!==t?(l=de(t),e[0]=t,e[1]=l):l=e[1];let r;return e[2]!==l?(r=n.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:l}),e[2]=l,e[3]=r):r=e[3],r}const Mt=4;function Lt(s){const e=$.c(5),{count:t,noun:l,onClick:r}=s;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(ct,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[0]=a):a=e[0];let o;return e[1]!==t||e[2]!==l||e[3]!==r?(o=n.jsxs("button",{type:"button",onClick:r,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:["See all ",t," ",l,a]}),e[1]=t,e[2]=l,e[3]=r,e[4]=o):o=e[4],o}function jn(s){const e=$.c(27),{org:t}=he(),l=Ut(),r=ks();let a;e[0]!==t.id||e[1]!==t.slug?(a={connectionId:vs,orgId:t.id,orgSlug:t.slug},e[0]=t.id,e[1]=t.slug,e[2]=a):a=e[2];const o=We(a);let u;e[3]!==o||e[4]!==s?(u=async b=>{if(!s)throw new Error("useTaskExpandedTools: no task in context");const h=await o.callTool({name:"COLLECTION_THREADS_GET",arguments:{id:s}}),j=(h.structuredContent??h).item?.metadata??{},y=(j.expanded_tools??[]).filter(k=>k.toolName!==b.toolName);y.push({...b,expandedAt:new Date().toISOString()});const v={...j,expanded_tools:y};return await o.callTool({name:"COLLECTION_THREADS_UPDATE",arguments:{id:s,data:{metadata:v}}}),y},e[3]=o,e[4]=s,e[5]=u):u=e[5];let f,i,m;e[6]!==t.id||e[7]!==l||e[8]!==s?(f=async b=>{const h=me.ensureTask(t.id,s??"");await l.cancelQueries({queryKey:h});const N=l.getQueryData(h),S=(N?.metadata?.expanded_tools??[]).filter(y=>y.toolName!==b.toolName);return S.push({...b,expandedAt:new Date().toISOString()}),l.setQueryData(h,y=>y&&{...y,metadata:{...y.metadata??{},expanded_tools:S}}),{previous:N}},i=()=>{l.invalidateQueries({queryKey:me.ensureTask(t.id,s??"")})},m=(b,h,N)=>{const j=me.ensureTask(t.id,s??"");N?.previous===void 0?l.removeQueries({queryKey:j,exact:!0}):l.setQueryData(j,N.previous),ze.error(b instanceof Error?b.message:"Failed to expand tool")},e[6]=t.id,e[7]=l,e[8]=s,e[9]=f,e[10]=i,e[11]=m):(f=e[9],i=e[10],m=e[11]);let p;e[12]!==u||e[13]!==f||e[14]!==i||e[15]!==m?(p={mutationFn:u,onMutate:f,onSuccess:i,onError:m},e[12]=u,e[13]=f,e[14]=i,e[15]=m,e[16]=p):p=e[16];const c=Wt(p);let d;e[17]!==r||e[18]!==c||e[19]!==t.id||e[20]!==l||e[21]!==s?(d=b=>{if(!s||!r)return;const h=me.ensureTask(t.id,s),N=l.getQueryData(h),S=(N?.metadata?.expanded_tools??[]).filter(v=>v.toolName!==b.toolName);S.push({...b,expandedAt:new Date().toISOString()});const y={...N?.metadata??{},expanded_tools:S};l.setQueryData(h,v=>v&&{...v,metadata:y}),r.patchThread({id:s,metadata:y}),c.mutate(b)},e[17]=r,e[18]=c,e[19]=t.id,e[20]=l,e[21]=s,e[22]=d):d=e[22];const x=d;let g;return e[23]!==x||e[24]!==c.isPending||e[25]!==c.mutate?(g={addOrReplace:c.mutate,addOrReplaceEager:x,isPending:c.isPending},e[23]=x,e[24]=c.isPending,e[25]=c.mutate,e[26]=g):g=e[26],g}function vn(s,e,t,l){const{data:r,isLoading:a}=Oe({queryKey:me.toolDefinitionLookup(e,t,s),queryFn:async()=>{if(!s||!e)return null;const o=await Ns({connectionId:e,orgId:t,orgSlug:l});try{const{tools:u}=await o.listTools(),f=It(s);return u.find(i=>i.name===f)??null}finally{await o.close().catch(()=>{})}},enabled:!!s&&!!e,staleTime:6e4,gcTime:3e5,retry:!1});return{toolDef:r??void 0,isLoading:a}}const Nn={read:{icon:Qe,label:"Read File"},write:{icon:Is,label:"Write File"},edit:{icon:Zt,label:"Edit File"},grep:{icon:Ls,label:"Search Content"},glob:{icon:Ms,label:"Find Files"},bash:{icon:Yt,label:"Run Command"},read_tool_output:{icon:Qe,label:"Read Tool Output"},read_resource:{icon:Qt,label:"Read Resource"},read_prompt:{icon:jt,label:"Read Prompt"},enable_tool:{icon:$s,label:"Enable Tool"},open_in_agent:{icon:Xt,label:"Open in Agent"},sandbox:{icon:Jt,label:"Run Code"},copy_to_sandbox:{icon:vt,label:"Load File"},share_with_user:{icon:Rs,label:"Share with User"},take_screenshot:{icon:Te,label:"Take Screenshot"},scrape_url:{icon:Ce,label:"Scrape URL"},inspect_page:{icon:Kt,label:"Inspect Page"}};function Ke(s,e="An unknown error occurred"){return"errorText"in s&&typeof s.errorText=="string"?s.errorText:e}function ye(s){if(s==null)return"";try{return JSON.stringify(s)}catch{return"[Non-serializable value]"}}const Sn=s=>s.type==="dynamic-tool"||s.type.startsWith("tool-");function kn(s){if(!s||typeof s!="object")return null;const e=s;if(!Array.isArray(e.parts))return null;const t=[];for(const l of e.parts)if(l.type==="text"&&typeof l.text=="string")t.push(l.text);else if(l.type==="reasoning")t.push(`## Reasoning
2
2
  ${l.text}`);else if(l.type==="source-url")t.push(`## Source URL
3
3
  ${l.url}`);else if(l.type==="source-document")t.push(`## Source Document
4
4
  ${l.title}`);else if(l.type==="file")t.push(`## File
@@ -1 +1 @@
1
- import{e as o,j as t,dn as n}from"./index-0jxZXjT_.js";function a(){const s=o.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(n,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),s[0]=e):e=s[0],e}export{a as default};
1
+ import{e as o,j as t,dn as n}from"./index-Dj0KvohQ.js";function a(){const s=o.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(n,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),s[0]=e):e=s[0],e}export{a as default};
@@ -1 +1 @@
1
- import{e as S,j as s,r as w,dn as y}from"./index-0jxZXjT_.js";import{i as R}from"./Check-5-utiman.js";import{t as _}from"./ChevronDown-BRUPOd-D.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function $(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{$ as default};
1
+ import{e as S,j as s,r as w,dn as y}from"./index-Dj0KvohQ.js";import{i as R}from"./Check-DA5UKh5X.js";import{t as _}from"./ChevronDown-CYgGBXvc.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function $(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{$ as default};
@@ -1 +1 @@
1
- import{r as B,e as D,j as s,q as X,f as Z,g as ee,d as te,b as ne,K as se,n as ie,O as le,l as oe,B as re}from"./index-0jxZXjT_.js";import{u as ae}from"./use-connection-CzM_WXMN.js";import{S as ce,u as ue,j as de}from"./constants-bvvELg6A.js";import{a as me}from"./Settings02-J55NFzUl.js";import{P as z}from"./index-B0yf3v8e.js";const ge=B.createContext(null);function F(i){const e=D.c(3),{value:h,children:m}=i,t=h;let l;return e[0]!==m||e[1]!==t?(l=s.jsx(ge.Provider,{value:t,children:m}),e[0]=m,e[1]=t,e[2]=l):l=e[2],l}B.createContext(null);function fe(i){return{id:i.id,title:i.title,icon:i.icon,description:i.description,app_name:i.app_name,app_id:i.app_id,tools:i.tools,metadata:i.metadata}}function _e(i){const e=D.c(60),{bindingName:h,renderEmptyState:m}=i,{org:t,project:l}=X(),T=Z();let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={strict:!1},e[0]=j):j=e[0];const{org:k,taskId:w,pluginId:g}=ee(j);let I;e[1]===Symbol.for("react.memo_cache_sentinel")?(I={strict:!1},e[1]=I):I=e[1];const G=te(I).virtualmcpid;let P;e[2]!==h?(P={binding:h},e[2]=h,e[3]=P):P=e[3];const K=ae(P),{data:f}=ne.useSession();let _;e[4]!==t.id||e[5]!==t.slug?(_={connectionId:ce,orgId:t.id,orgSlug:t.slug},e[4]=t.id,e[5]=t.slug,e[6]=_):_=e[6];const O=ue(_);let x;e[7]!==g||e[8]!==l.id?(x=se.projectPluginConfig(l.id??"",g),e[7]=g,e[8]=l.id,e[9]=x):x=e[9];let p;e[10]!==g||e[11]!==l.id||e[12]!==O?(p=async()=>{const n=await O.callTool({name:"VIRTUAL_MCP_PLUGIN_CONFIG_GET",arguments:{virtualMcpId:l.id,pluginId:g}});return n.structuredContent??n},e[10]=g,e[11]=l.id,e[12]=O,e[13]=p):p=e[13];const q=!!l.id&&!!g;let v;e[14]!==x||e[15]!==p||e[16]!==q?(v={queryKey:x,queryFn:p,enabled:q},e[14]=x,e[15]=p,e[16]=q,e[17]=v):v=e[17];const{data:V,isLoading:Q}=ie(v),R=V?.config?.connectionId,C=R?K.find(n=>n.id===R):null,y=de({connectionId:C?.id,orgId:t.id,orgSlug:t.slug});let S;e[18]!==f?(S=f?.user?{user:{id:f.user.id,name:f.user.name,email:f.user.email,image:f.user.image}}:null,e[18]=f,e[19]=S):S=e[19];const a=S;let b;e[20]!==t.id||e[21]!==t.name||e[22]!==t.slug?(b={id:t.id,slug:t.slug,name:t.name},e[20]=t.id,e[21]=t.name,e[22]=t.slug,e[23]=b):b=e[23];const c=b;if(Q){let n;return e[24]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(oe,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),e[24]=n):n=e[24],n}if(K.length===0){let n;e[25]!==c||e[26]!==a?(n={connectionId:null,connection:null,toolCaller:null,org:c,session:a},e[25]=c,e[26]=a,e[27]=n):n=e[27];const u=n;let r;e[28]!==m?(r=m(),e[28]=m,e[29]=r):r=e[29];let o;e[30]!==r?(o=s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:r}),e[30]=r,e[31]=o):o=e[31];let d;return e[32]!==u||e[33]!==o?(d=s.jsx(F,{value:u,children:o}),e[32]=u,e[33]=o,e[34]=d):d=e[34],d}if(!C){let n;e[35]!==c||e[36]!==a?(n={connectionId:null,connection:null,toolCaller:null,org:c,session:a},e[35]=c,e[36]=a,e[37]=n):n=e[37];const u=n;let r;e[38]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[s.jsx(me,{size:48,className:"text-muted-foreground mb-2"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]}),e[38]=r):r=e[38];let o;e[39]!==T||e[40]!==t.slug||e[41]!==k||e[42]!==l.id||e[43]!==w||e[44]!==G?(o=s.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:[r,s.jsx(re,{onClick:()=>{const H=k??t.slug,J=G??l.id??"",W=w??crypto.randomUUID();T({to:"/$org/$taskId",params:{org:H,taskId:W},search:{virtualmcpid:J,main:"settings"}})},children:"Go to Project Settings"})]}),e[39]=T,e[40]=t.slug,e[41]=k,e[42]=l.id,e[43]=w,e[44]=G,e[45]=o):o=e[45];let d;return e[46]!==u||e[47]!==o?(d=s.jsx(F,{value:u,children:o}),e[46]=u,e[47]=o,e[48]=d):d=e[48],d}const Y=C.id,U=fe(C);let N;e[49]!==y?(N=(n,u)=>y?y.callTool({name:n,arguments:u}).then(xe):Promise.reject(new Error("MCP client is not available")),e[49]=y,e[50]=N):N=e[50];const $=N;let E;e[51]!==C||e[52]!==c||e[53]!==a||e[54]!==U||e[55]!==$?(E={connectionId:Y,connection:U,toolCaller:$,org:c,session:a},e[51]=C,e[52]=c,e[53]=a,e[54]=U,e[55]=$,e[56]=E):E=e[56];const A=E;let L;e[57]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(z,{children:s.jsx(z.Content,{children:s.jsx(le,{})})}),e[57]=L):L=e[57];let M;return e[58]!==A?(M=s.jsx(F,{value:A,children:L}),e[58]=A,e[59]=M):M=e[59],M}function xe(i){return i.structuredContent??i}export{_e as P};
1
+ import{r as B,e as D,j as s,q as X,f as Z,g as ee,d as te,b as ne,K as se,n as ie,O as le,l as oe,B as re}from"./index-Dj0KvohQ.js";import{u as ae}from"./use-connection-B9u8CAro.js";import{S as ce,u as ue,j as de}from"./constants-BrUmWQ5v.js";import{a as me}from"./Settings02-DWxCysLt.js";import{P as z}from"./index-zuFZRdMw.js";const ge=B.createContext(null);function F(i){const e=D.c(3),{value:h,children:m}=i,t=h;let l;return e[0]!==m||e[1]!==t?(l=s.jsx(ge.Provider,{value:t,children:m}),e[0]=m,e[1]=t,e[2]=l):l=e[2],l}B.createContext(null);function fe(i){return{id:i.id,title:i.title,icon:i.icon,description:i.description,app_name:i.app_name,app_id:i.app_id,tools:i.tools,metadata:i.metadata}}function _e(i){const e=D.c(60),{bindingName:h,renderEmptyState:m}=i,{org:t,project:l}=X(),T=Z();let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={strict:!1},e[0]=j):j=e[0];const{org:k,taskId:w,pluginId:g}=ee(j);let I;e[1]===Symbol.for("react.memo_cache_sentinel")?(I={strict:!1},e[1]=I):I=e[1];const G=te(I).virtualmcpid;let P;e[2]!==h?(P={binding:h},e[2]=h,e[3]=P):P=e[3];const K=ae(P),{data:f}=ne.useSession();let _;e[4]!==t.id||e[5]!==t.slug?(_={connectionId:ce,orgId:t.id,orgSlug:t.slug},e[4]=t.id,e[5]=t.slug,e[6]=_):_=e[6];const O=ue(_);let x;e[7]!==g||e[8]!==l.id?(x=se.projectPluginConfig(l.id??"",g),e[7]=g,e[8]=l.id,e[9]=x):x=e[9];let p;e[10]!==g||e[11]!==l.id||e[12]!==O?(p=async()=>{const n=await O.callTool({name:"VIRTUAL_MCP_PLUGIN_CONFIG_GET",arguments:{virtualMcpId:l.id,pluginId:g}});return n.structuredContent??n},e[10]=g,e[11]=l.id,e[12]=O,e[13]=p):p=e[13];const q=!!l.id&&!!g;let v;e[14]!==x||e[15]!==p||e[16]!==q?(v={queryKey:x,queryFn:p,enabled:q},e[14]=x,e[15]=p,e[16]=q,e[17]=v):v=e[17];const{data:V,isLoading:Q}=ie(v),R=V?.config?.connectionId,C=R?K.find(n=>n.id===R):null,y=de({connectionId:C?.id,orgId:t.id,orgSlug:t.slug});let S;e[18]!==f?(S=f?.user?{user:{id:f.user.id,name:f.user.name,email:f.user.email,image:f.user.image}}:null,e[18]=f,e[19]=S):S=e[19];const a=S;let b;e[20]!==t.id||e[21]!==t.name||e[22]!==t.slug?(b={id:t.id,slug:t.slug,name:t.name},e[20]=t.id,e[21]=t.name,e[22]=t.slug,e[23]=b):b=e[23];const c=b;if(Q){let n;return e[24]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(oe,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),e[24]=n):n=e[24],n}if(K.length===0){let n;e[25]!==c||e[26]!==a?(n={connectionId:null,connection:null,toolCaller:null,org:c,session:a},e[25]=c,e[26]=a,e[27]=n):n=e[27];const u=n;let r;e[28]!==m?(r=m(),e[28]=m,e[29]=r):r=e[29];let o;e[30]!==r?(o=s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:r}),e[30]=r,e[31]=o):o=e[31];let d;return e[32]!==u||e[33]!==o?(d=s.jsx(F,{value:u,children:o}),e[32]=u,e[33]=o,e[34]=d):d=e[34],d}if(!C){let n;e[35]!==c||e[36]!==a?(n={connectionId:null,connection:null,toolCaller:null,org:c,session:a},e[35]=c,e[36]=a,e[37]=n):n=e[37];const u=n;let r;e[38]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[s.jsx(me,{size:48,className:"text-muted-foreground mb-2"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]}),e[38]=r):r=e[38];let o;e[39]!==T||e[40]!==t.slug||e[41]!==k||e[42]!==l.id||e[43]!==w||e[44]!==G?(o=s.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:[r,s.jsx(re,{onClick:()=>{const H=k??t.slug,J=G??l.id??"",W=w??crypto.randomUUID();T({to:"/$org/$taskId",params:{org:H,taskId:W},search:{virtualmcpid:J,main:"settings"}})},children:"Go to Project Settings"})]}),e[39]=T,e[40]=t.slug,e[41]=k,e[42]=l.id,e[43]=w,e[44]=G,e[45]=o):o=e[45];let d;return e[46]!==u||e[47]!==o?(d=s.jsx(F,{value:u,children:o}),e[46]=u,e[47]=o,e[48]=d):d=e[48],d}const Y=C.id,U=fe(C);let N;e[49]!==y?(N=(n,u)=>y?y.callTool({name:n,arguments:u}).then(xe):Promise.reject(new Error("MCP client is not available")),e[49]=y,e[50]=N):N=e[50];const $=N;let E;e[51]!==C||e[52]!==c||e[53]!==a||e[54]!==U||e[55]!==$?(E={connectionId:Y,connection:U,toolCaller:$,org:c,session:a},e[51]=C,e[52]=c,e[53]=a,e[54]=U,e[55]=$,e[56]=E):E=e[56];const A=E;let L;e[57]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(z,{children:s.jsx(z.Content,{children:s.jsx(le,{})})}),e[57]=L):L=e[57];let M;return e[58]!==A?(M=s.jsx(F,{value:A,children:L}),e[58]=A,e[59]=M):M=e[59],M}function xe(i){return i.structuredContent??i}export{_e as P};
@@ -1 +1 @@
1
- import{r as i,bc as $,j as c,da as L,bd as z,bq as A,a6 as _,a7 as g,db as b,bf as j,dc as G,dd as w,di as H,dj as K,af as q,dk as U,dl as V,dm as W,de as Z,df as B,dh as J,e as R,c as Q}from"./index-0jxZXjT_.js";var m="Popover",[E]=q(m,[w]),P=w(),[X,u]=E(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:m});return c.jsx(L,{...p,children:c.jsx(X,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(C=>!C),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=m;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(b,{...s,...r,ref:e})});Y.displayName=F;var S="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,o),s=P(o),a=A(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(b,{asChild:!0,...s,children:p})});y.displayName=S;var O="PopoverPortal",[ee,oe]=E(O,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(j,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=O;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(j,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=U("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(k,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(k,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),k=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),C=P(o);return V(),c.jsx(W,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(B,{"data-state":I(f.open),role:"dialog",id:f.contentId,...C,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(T,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=T;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=Q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{fe as P,ve as a,ge as b};
1
+ import{r as i,bc as $,j as c,da as L,bd as z,bq as A,a6 as _,a7 as g,db as b,bf as j,dc as G,dd as w,di as H,dj as K,af as q,dk as U,dl as V,dm as W,de as Z,df as B,dh as J,e as R,c as Q}from"./index-Dj0KvohQ.js";var m="Popover",[E]=q(m,[w]),P=w(),[X,u]=E(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:m});return c.jsx(L,{...p,children:c.jsx(X,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(C=>!C),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=m;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(b,{...s,...r,ref:e})});Y.displayName=F;var S="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,o),s=P(o),a=A(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(b,{asChild:!0,...s,children:p})});y.displayName=S;var O="PopoverPortal",[ee,oe]=E(O,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(j,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=O;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(j,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=U("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(k,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(k,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),k=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),C=P(o);return V(),c.jsx(W,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(B,{"data-state":I(f.open),role:"dialog",id:f.contentId,...C,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(T,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=T;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=Q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{fe as P,ve as a,ge as b};