decocms 4.111.1 → 4.112.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 (255) hide show
  1. package/dist/client/assets/{AlertCircle-C1710OBb.js → AlertCircle-CWc3BvFb.js} +1 -1
  2. package/dist/client/assets/{AreaChart-C2g_hZSn.js → AreaChart-8TuFtZwM.js} +1 -1
  3. package/dist/client/assets/{ArrowRight-Cpx1Lebk.js → ArrowRight-DnZw9chb.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-84PrwJl7.js → ArrowUp-Dqm6yb7b.js} +1 -1
  5. package/dist/client/assets/{ArrowUpRight-B3GPW-_w.js → ArrowUpRight-a-xAV1yD.js} +1 -1
  6. package/dist/client/assets/{Check-D39cW1EC.js → Check-BXZBH--f.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-Yz1eDu6Z.js → CheckCircle-Dx2byA8l.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-Dxdrzb03.js → ChevronDown-C82kSPQJ.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-DD-OjvGf.js → ChevronRight-pKqWhPFO.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-CorFhFXr.js → ChevronUp-Ur5tOU4r.js} +1 -1
  11. package/dist/client/assets/{Copy01-DggHPLxu.js → Copy01-CjvNe041.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-DSmQb07B.js → DotsVertical-CsPrfBHu.js} +1 -1
  13. package/dist/client/assets/{Eye-BYEbwinV.js → Eye-D6UmvuQl.js} +1 -1
  14. package/dist/client/assets/{FilterLines-BC5HBNi1.js → FilterLines-I4EBUx4y.js} +1 -1
  15. package/dist/client/assets/{Globe01-CmsCC8zN.js → Globe01-bBcCao8m.js} +1 -1
  16. package/dist/client/assets/{Globe04-Cidz_2od.js → Globe04-BvAgykOe.js} +1 -1
  17. package/dist/client/assets/{HardDrive-DSsiIG4q.js → HardDrive-B1MltyIG.js} +1 -1
  18. package/dist/client/assets/{Image01-CTEGxjN6.js → Image01-CwV9iuxz.js} +1 -1
  19. package/dist/client/assets/{Key01-C-zj_nZY.js → Key01-C-044wq-.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-CdBrffSJ.js → LayoutLeft-B7XnXJCX.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-WuLv33QG.js → LinkExternal01-Beo7SFkQ.js} +1 -1
  22. package/dist/client/assets/LogOut01-BbBoHzGS.js +1 -0
  23. package/dist/client/assets/{Monitor01-CIfeipNC.js → Monitor01-CNCx-B51.js} +1 -1
  24. package/dist/client/assets/{Package-BJ248Tbr.js → Package-CidzBhtk.js} +1 -1
  25. package/dist/client/assets/{Palette-D-jexNuW.js → Palette-DyqhX3Li.js} +1 -1
  26. package/dist/client/assets/{Play-DeSndEh-.js → Play-Bs1D_H9C.js} +1 -1
  27. package/dist/client/assets/{Plus-Cht7lL4D.js → Plus-CxvuE4Es.js} +1 -1
  28. package/dist/client/assets/{SearchLg-CkwIt1df.js → SearchLg-D6bYV_e6.js} +1 -1
  29. package/dist/client/assets/{SearchMd-Bxv7C6ib.js → SearchMd-CVAS4bHb.js} +1 -1
  30. package/dist/client/assets/{Settings02-CqbXJDf7.js → Settings02-C48BmakR.js} +1 -1
  31. package/dist/client/assets/{Shield01-Bvbq_wVy.js → Shield01-CpLEfQVx.js} +1 -1
  32. package/dist/client/assets/{Star01-DJspHAU-.js → Star01-DbfqTNT0.js} +1 -1
  33. package/dist/client/assets/{Stars01-Cc9iJO8V.js → Stars01-DdKwQ9te.js} +1 -1
  34. package/dist/client/assets/{Stars02-8nmeIDYy.js → Stars02-B1CYtkwJ.js} +1 -1
  35. package/dist/client/assets/{Sun-CYtT9w41.js → Sun-CiZGxTK4.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-DKZ8Ars7.js → SwitchHorizontal01-DjC0A58U.js} +1 -1
  37. package/dist/client/assets/{Tool01-BzMShFGo.js → Tool01-ttrYDD-F.js} +1 -1
  38. package/dist/client/assets/{Tool02-Dgp6-KLz.js → Tool02-1ZIphfq5.js} +1 -1
  39. package/dist/client/assets/{Trash01-DQk8SKeW.js → Trash01-CbEfRhj4.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-Dz5gzrTN.js → TrendUp01-DAMS2ptH.js} +1 -1
  41. package/dist/client/assets/{Upload01-CSTbHDB3.js → Upload01-CtTjeXyd.js} +1 -1
  42. package/dist/client/assets/{User01-JZByJh_c.js → User01-DvoPZa3L.js} +1 -1
  43. package/dist/client/assets/{Users01-EWDKaBW5.js → Users01-HKR3d_K9.js} +1 -1
  44. package/dist/client/assets/{Users03-DiELMSun.js → Users03-Dxbbv3M0.js} +1 -1
  45. package/dist/client/assets/{X-CeuyThrh.js → X-Dc8jzuGp.js} +1 -1
  46. package/dist/client/assets/{XCircle-DcmvhxNa.js → XCircle-Bb4jhNm5.js} +1 -1
  47. package/dist/client/assets/{XClose-D26wD9_Q.js → XClose-BLwV1Ngp.js} +1 -1
  48. package/dist/client/assets/{Zap-DC8YgF5a.js → Zap-KiDFkWg-.js} +1 -1
  49. package/dist/client/assets/ZapSquare-Bqk2MRuL.js +1 -0
  50. package/dist/client/assets/{ZoomOut-Dzo8MaxJ.js → ZoomOut-Ce4wv8I3.js} +1 -1
  51. package/dist/client/assets/{access-gate-BjRWysew.js → access-gate-BQpTDI1E.js} +1 -1
  52. package/dist/client/assets/{add-section-modal-COG4EZv1.js → add-section-modal-BL2N_SLv.js} +1 -1
  53. package/dist/client/assets/agent-icon-CCxdHfHq.js +1 -0
  54. package/dist/client/assets/agents-list-D_QSFEpR.js +1 -0
  55. package/dist/client/assets/{ai-providers-xni6KFW1.js → ai-providers-CeCbz9WJ.js} +1 -1
  56. package/dist/client/assets/{alert-DO3pqp5Y.js → alert-B6DPJVFC.js} +1 -1
  57. package/dist/client/assets/{alert-dialog-CyxTQtK2.js → alert-dialog-3eCoJM_J.js} +1 -1
  58. package/dist/client/assets/app-editor-CWFz698e.js +1 -0
  59. package/dist/client/assets/{auth-CshA0DLa.js → auth-C488ati9.js} +1 -1
  60. package/dist/client/assets/{auth-catchall-D2K6sR0i.js → auth-catchall-7cPesftU.js} +1 -1
  61. package/dist/client/assets/{auth-entry-qdcFV22b.js → auth-entry-BeFx04UO.js} +1 -1
  62. package/dist/client/assets/{auth-split-layout-2p5tfz8M.js → auth-split-layout-Kv3PLrjS.js} +1 -1
  63. package/dist/client/assets/{authenticate-and-persist-oauth-CCSTyrRC.js → authenticate-and-persist-oauth-CsBw_Hbi.js} +1 -1
  64. package/dist/client/assets/{automation-list-row-DNgedRhX.js → automation-list-row-D7W2Rtfd.js} +1 -1
  65. package/dist/client/assets/{automation-runs-02j6ZCbn.js → automation-runs-CjOXuQZP.js} +1 -1
  66. package/dist/client/assets/automations-BkUN9YOh.js +1 -0
  67. package/dist/client/assets/{autosend-72ilm6k6.js → autosend-iAh1cE6e.js} +1 -1
  68. package/dist/client/assets/{avatar-_bj3nvif.js → avatar-Cc14VL9E.js} +1 -1
  69. package/dist/client/assets/{badge-BnUjJn2C.js → badge-D9Myt67H.js} +1 -1
  70. package/dist/client/assets/{block-document-CeZxcQRc.js → block-document-BhHqcQ9v.js} +1 -1
  71. package/dist/client/assets/{brand-context-BHAMKTB9.js → brand-context-CiVdo2I7.js} +1 -1
  72. package/dist/client/assets/{buckets-B3qTExtg.js → buckets-CwzgTqTA.js} +1 -1
  73. package/dist/client/assets/bulk-category-panel-yqxFIFkD.js +1 -0
  74. package/dist/client/assets/{calendar-DzxL6tfI.js → calendar-C5NP6DS-.js} +1 -1
  75. package/dist/client/assets/{capability-load-error-DOdp2rNY.js → capability-load-error-CDt4ZVsU.js} +1 -1
  76. package/dist/client/assets/{card-DidS0F8g.js → card-Bqgf0tZo.js} +1 -1
  77. package/dist/client/assets/category-editor-Cb81bY1E.js +1 -0
  78. package/dist/client/assets/{chat-context--BCe0uBG.js → chat-context-Dtvr7cnX.js} +1 -1
  79. package/dist/client/assets/{checkbox-DaD8kLui.js → checkbox-CLeT6Gju.js} +1 -1
  80. package/dist/client/assets/{cli-auth-success-BAq6z2bu.js → cli-auth-success-DCWFaEeO.js} +1 -1
  81. package/dist/client/assets/collection-detail-Cv7U6u2s.js +1 -0
  82. package/dist/client/assets/{collection-display-button-C-NfOkHF.js → collection-display-button-BuoLe9v_.js} +1 -1
  83. package/dist/client/assets/{collection-search-Bu14gD2R.js → collection-search-BM5saw5W.js} +1 -1
  84. package/dist/client/assets/{collection-table-wrapper-Bk6LnhMm.js → collection-table-wrapper-DK6IXxRn.js} +1 -1
  85. package/dist/client/assets/{collection-tabs-D6ZdND0h.js → collection-tabs-Daxt5rsE.js} +1 -1
  86. package/dist/client/assets/{command-B7Ss5ZQF.js → command-DY8SVt2y.js} +1 -1
  87. package/dist/client/assets/commerce-onboarding-GPK4Zth8.js +1 -0
  88. package/dist/client/assets/{companions-core-DyyxV0Vm.js → companions-core-CE6Q99bc.js} +1 -1
  89. package/dist/client/assets/{connect-Q_wOtUHo.js → connect-BxOdx2Dd.js} +1 -1
  90. package/dist/client/assets/{connect-desktop-dialog-RMuHHgUH.js → connect-desktop-dialog-CNKcnYr9.js} +1 -1
  91. package/dist/client/assets/{connection-card-CNK047a0.js → connection-card-CVkAOr7Y.js} +1 -1
  92. package/dist/client/assets/connection-detail-DeYwGyZI.js +1 -0
  93. package/dist/client/assets/{connection-form-helpers-Bu-giKug.js → connection-form-helpers-B3OfCtqO.js} +1 -1
  94. package/dist/client/assets/connections-JhayEu-8.js +1 -0
  95. package/dist/client/assets/{decopilot-sse-pool-C_h6McgN.js → decopilot-sse-pool-XB4qOGfZ.js} +1 -1
  96. package/dist/client/assets/{dialog-EQ_Nu1nb.js → dialog-DXHGb8ov.js} +1 -1
  97. package/dist/client/assets/{domain-settings-BA4FPQ9J.js → domain-settings-CFdyAL0q.js} +1 -1
  98. package/dist/client/assets/{drawer-BtIHYjMs.js → drawer-B33BKDxG.js} +1 -1
  99. package/dist/client/assets/{dropdown-menu-Du_BmHui.js → dropdown-menu-C7j_C2Iz.js} +1 -1
  100. package/dist/client/assets/{empty-state-CId3svrh.js → empty-state-C86_b7IP.js} +1 -1
  101. package/dist/client/assets/{extract-connection-data-DlEzKLiw.js → extract-connection-data-DpPAxW37.js} +1 -1
  102. package/dist/client/assets/file-explorer-CX8OyLAP.js +2 -0
  103. package/dist/client/assets/{file-type-icon-DW7dVPZj.js → file-type-icon-D3SBaNGX.js} +1 -1
  104. package/dist/client/assets/{files-BKWJwV-t.js → files-KeQYXxyT.js} +1 -1
  105. package/dist/client/assets/{form-BaVTHbUM.js → form-XFZrliJE.js} +1 -1
  106. package/dist/client/assets/{general-kPZeN7Cu.js → general-DBEEnNet.js} +1 -1
  107. package/dist/client/assets/{github-repo-picker-C3sQ7jRy.js → github-repo-picker-RzuGCDsI.js} +1 -1
  108. package/dist/client/assets/{hooks-DkEEOEGE.js → hooks-2lJrOuZm.js} +1 -1
  109. package/dist/client/assets/{index-DvuEUZpB.js → index-6kZv92JJ.js} +1 -1
  110. package/dist/client/assets/{index-BBl4qqLw.js → index-BKasOmzh.js} +1 -1
  111. package/dist/client/assets/{index-B2MTCe2b.js → index-C0xyoib4.js} +1 -1
  112. package/dist/client/assets/{index-cJuhIA5E.js → index-C85KaHKW.js} +2 -2
  113. package/dist/client/assets/{index-B3G-1Db4.js → index-CTGvOy90.js} +1 -1
  114. package/dist/client/assets/{index-BDS4mH87.js → index-CTu_OuGZ.js} +1 -1
  115. package/dist/client/assets/index-CY_ng_RT.css +1 -0
  116. package/dist/client/assets/index-Cat2Ur2a.js +1 -0
  117. package/dist/client/assets/{index-CuPAXGvf.js → index-CfHpa9w5.js} +1 -1
  118. package/dist/client/assets/{index-BgT_1f1m.js → index-CfhyBu5A.js} +1 -1
  119. package/dist/client/assets/{index-osUKgSS7.js → index-DMSyZ1PC.js} +5 -5
  120. package/dist/client/assets/{index-DHtzYrzs.js → index-DMmps4z3.js} +5 -5
  121. package/dist/client/assets/{index-Cv99iQ9s.js → index-DSZnahxG.js} +3 -3
  122. package/dist/client/assets/{index-RA2fruq-.js → index-dG1PkEhl.js} +1 -1
  123. package/dist/client/assets/{index-redirect-BO-wau82.js → index-redirect-DmjZ1B8p.js} +1 -1
  124. package/dist/client/assets/{input-D1Gv8_NL.js → input-1RtsmTkF.js} +1 -1
  125. package/dist/client/assets/{integration-icon-CZMpVL1E.js → integration-icon-DxLbb9qy.js} +1 -1
  126. package/dist/client/assets/{invite-member-dialog-DFsMgWfM.js → invite-member-dialog-j2avaEuH.js} +1 -1
  127. package/dist/client/assets/{label-C6LQRjqo.js → label-CuycpzyK.js} +1 -1
  128. package/dist/client/assets/{layout-e_SjAR9T.js → layout-cuby18T_.js} +1 -1
  129. package/dist/client/assets/{login-BSE4ROrF.js → login-dgVubRRa.js} +1 -1
  130. package/dist/client/assets/{mcp-oauth-CExdgV58.js → mcp-oauth-zippK-pA.js} +1 -1
  131. package/dist/client/assets/{members-CHmCLjfq.js → members-DDqeH639.js} +1 -1
  132. package/dist/client/assets/{monaco-editor-Kvx66aN7.js → monaco-editor-BTlS3Jcm.js} +1 -1
  133. package/dist/client/assets/{monitoring-stats-row-TBIrVoKL.js → monitoring-stats-row-BtnXyvA-.js} +1 -1
  134. package/dist/client/assets/{multi-select-Lx9hoOhE.js → multi-select-DDWHXTOC.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-BpCtjLRG.js → oauth-callback-C3gXSJ-f.js} +1 -1
  136. package/dist/client/assets/{oauth-callback-ai-provider-CeNAuOqe.js → oauth-callback-ai-provider-DuWDDtiB.js} +1 -1
  137. package/dist/client/assets/{onboarding-hb5F4qib.js → onboarding-B7taP69e.js} +1 -1
  138. package/dist/client/assets/{org-install-Bs0HJQO0.js → org-install-BMshT6Kz.js} +1 -1
  139. package/dist/client/assets/{org-layout-B_o3hfnw.js → org-layout-B4Kd_h2Z.js} +1 -1
  140. package/dist/client/assets/{organization-choice-CEKaLhVE.js → organization-choice-2omIAvR5.js} +1 -1
  141. package/dist/client/assets/{orgs-ipONzmrt.js → orgs-D1RgFQJ7.js} +1 -1
  142. package/dist/client/assets/{page-seo-form-CmLzT3gw.js → page-seo-form-BN228Xkk.js} +1 -1
  143. package/dist/client/assets/page-seo-sheet-BqvEObfo.js +1 -0
  144. package/dist/client/assets/{popover-nLbxx2tm.js → popover-pMjGUykd.js} +1 -1
  145. package/dist/client/assets/post-editor-B-yA3z0f.js +1 -0
  146. package/dist/client/assets/{primitives-B_fLkgE2.js → primitives-hTNWqwra.js} +1 -1
  147. package/dist/client/assets/{profile-C0Hwg89f.js → profile-BskU3ogX.js} +1 -1
  148. package/dist/client/assets/project-app-view-Ck_oFYlZ.js +1 -0
  149. package/dist/client/assets/record-editor-BKFwUXbn.js +1 -0
  150. package/dist/client/assets/redirect-editor-Buh94JvK.js +1 -0
  151. package/dist/client/assets/registry-Duu54PRM.js +2 -0
  152. package/dist/client/assets/{registry-layout-D3bAs9Qa.js → registry-layout-5RGlZ5Z_.js} +1 -1
  153. package/dist/client/assets/reports-BEeeQEGX.js +43 -0
  154. package/dist/client/assets/{require-capability-UM5-7UW4.js → require-capability-u_hyb0xb.js} +1 -1
  155. package/dist/client/assets/{required-auth-layout-BVAQEE4a.js → required-auth-layout-B0hyPLrN.js} +1 -1
  156. package/dist/client/assets/{reset-password-BUVj36_b.js → reset-password-B-1ZDoiX.js} +1 -1
  157. package/dist/client/assets/roles-CiE8K-D4.js +1 -0
  158. package/dist/client/assets/{search-input-BkUwKS2D.js → search-input-0trCFAtj.js} +1 -1
  159. package/dist/client/assets/{secrets-CyLT5I-g.js → secrets-BkJhY_zI.js} +1 -1
  160. package/dist/client/assets/{sections-editor-BzQFIS__.js → sections-editor-CRr_vuW5.js} +2 -2
  161. package/dist/client/assets/{select-CW6UAgqk.js → select-BZ2uyFha.js} +1 -1
  162. package/dist/client/assets/{select-model-BB8UZEr7.js → select-model-CQuepAKj.js} +1 -1
  163. package/dist/client/assets/{self-tool-result-CNatc7aY.js → self-tool-result-6sETFR7k.js} +1 -1
  164. package/dist/client/assets/seo-editor-Ct73nPgG.js +1 -0
  165. package/dist/client/assets/settings-layout-D4zIQbSh.js +1 -0
  166. package/dist/client/assets/{settings-section-BUc4dc2Z.js → settings-section-hwdjPfIH.js} +1 -1
  167. package/dist/client/assets/{shell-controls-uvYdBQ9J.js → shell-controls-CjKmQDHH.js} +1 -1
  168. package/dist/client/assets/{shell-layout-C26BWW3A.js → shell-layout-CQmTObw4.js} +1 -1
  169. package/dist/client/assets/{sidebar-Df7FAyMJ.js → sidebar-VwrbgopG.js} +1 -1
  170. package/dist/client/assets/{skeleton-Bh51H_qt.js → skeleton-5or6c6a4.js} +1 -1
  171. package/dist/client/assets/{sso-cSIAqPoN.js → sso-DThbYWSx.js} +1 -1
  172. package/dist/client/assets/{store-B93Rq4di.js → store-HyMkBZBo.js} +1 -1
  173. package/dist/client/assets/store-registry-DwWE7t_E.js +2 -0
  174. package/dist/client/assets/{studio-tools-C5M-8IB_.js → studio-tools-D3Jh1aS_.js} +1 -1
  175. package/dist/client/assets/{switch-bwxIfzvo.js → switch-BvId1h7x.js} +1 -1
  176. package/dist/client/assets/{table-DVd55Q6d.js → table-CbyMEuIw.js} +1 -1
  177. package/dist/client/assets/{tabs-hgF7ZCkc.js → tabs-bdhX5rhL.js} +1 -1
  178. package/dist/client/assets/{textarea-DJa_iznS.js → textarea-jptDrRLe.js} +1 -1
  179. package/dist/client/assets/{toggle-group-CAH1Hx8k.js → toggle-group-DH-q2f-c.js} +1 -1
  180. package/dist/client/assets/{toolbar-Fx7Y1MeE.js → toolbar-CgmtGgtt.js} +1 -1
  181. package/dist/client/assets/{toolbar-icon-button-BzCc0lHV.js → toolbar-icon-button-CPygwZKi.js} +1 -1
  182. package/dist/client/assets/{tooltip-CeBtAc-Q.js → tooltip-CJ5Y5366.js} +1 -1
  183. package/dist/client/assets/{use-ai-providers-RUE5iJZ6.js → use-ai-providers-Lg-k4_mA.js} +1 -1
  184. package/dist/client/assets/{use-api-keys-CavYK5Tg.js → use-api-keys-Bd5cc4tv.js} +1 -1
  185. package/dist/client/assets/{use-automations-AVicqQJX.js → use-automations-CwOEXsLX.js} +1 -1
  186. package/dist/client/assets/{use-autosave-CstyN0-Q.js → use-autosave-BLO-Hrcs.js} +1 -1
  187. package/dist/client/assets/{use-capability-BqKrdQX0.js → use-capability-DEHiMOjo.js} +1 -1
  188. package/dist/client/assets/{use-clock-tick-CbWbBVoS.js → use-clock-tick-DXtOQtpb.js} +1 -1
  189. package/dist/client/assets/{use-connection-BFgjYMCx.js → use-connection-Ck7fU3Z4.js} +1 -1
  190. package/dist/client/assets/{use-copy-D50eCFOO.js → use-copy-DLOqStvb.js} +1 -1
  191. package/dist/client/assets/{use-create-virtual-mcp-Bxd3JLCU.js → use-create-virtual-mcp-K5ESAvbN.js} +1 -1
  192. package/dist/client/assets/{use-debounced-autosave-BxoahVDF.js → use-debounced-autosave-BJsvh0K3.js} +1 -1
  193. package/dist/client/assets/{use-debounced-value-DtB2MUZF.js → use-debounced-value-DeWb2Xe3.js} +1 -1
  194. package/dist/client/assets/{use-deco-credits-AstFkv7d.js → use-deco-credits-_ZnPIq3e.js} +1 -1
  195. package/dist/client/assets/{use-decopilot-events-CLJTbinJ.js → use-decopilot-events-Bt-vNCWP.js} +1 -1
  196. package/dist/client/assets/{use-delete-connection-6zXECMpi.js → use-delete-connection-B9tkmQ5M.js} +1 -1
  197. package/dist/client/assets/{use-deployment-admin-CbOZffh5.js → use-deployment-admin-xe5VFZgM.js} +1 -1
  198. package/dist/client/assets/{use-file-configs-BQu09fEP.js → use-file-configs-nbkcXtzD.js} +1 -1
  199. package/dist/client/assets/{use-infinite-scroll-C_PDhy7Y.js → use-infinite-scroll-DSfn4Dq8.js} +1 -1
  200. package/dist/client/assets/{use-join-requests-BXOV6Q-X.js → use-join-requests-BdTpATGr.js} +1 -1
  201. package/dist/client/assets/{use-mcp-auth-status-CMsRck_h.js → use-mcp-auth-status-CxzQOxft.js} +1 -1
  202. package/dist/client/assets/{use-mcp-client-DCcQbeST.js → use-mcp-client-Bi1l5K5b.js} +1 -1
  203. package/dist/client/assets/{use-mcp-tools-pt0EYOUp.js → use-mcp-tools-A2pVmeDY.js} +1 -1
  204. package/dist/client/assets/{use-members-BmDf1Ez2.js → use-members-B-802VrQ.js} +1 -1
  205. package/dist/client/assets/{use-mobile-BpGP7t1t.js → use-mobile-fV0eYRhU.js} +1 -1
  206. package/dist/client/assets/{use-navigate-to-agent-DBvbBbE5.js → use-navigate-to-agent-D3lktxgi.js} +1 -1
  207. package/dist/client/assets/{use-org-auth-client-wqvjMz_I.js → use-org-auth-client-Byy_ag-z.js} +1 -1
  208. package/dist/client/assets/{use-org-sso-BorzfaCb.js → use-org-sso-CqNJvI6A.js} +1 -1
  209. package/dist/client/assets/{use-organization-roles-nGTnAnyJ.js → use-organization-roles-B_rb7vF1.js} +1 -1
  210. package/dist/client/assets/{use-organization-settings-BalIiDFK.js → use-organization-settings-BtpD3U3D.js} +1 -1
  211. package/dist/client/assets/{use-registry-app-CKb6cB0l.js → use-registry-app-DftwoaLr.js} +1 -1
  212. package/dist/client/assets/{use-registry-connections-CiQeT9S9.js → use-registry-connections-CFzxn-fx.js} +1 -1
  213. package/dist/client/assets/{use-secrets-BUiyxffy.js → use-secrets-DtHqq7gg.js} +1 -1
  214. package/dist/client/assets/{use-status-sounds-Bg74NSvH.js → use-status-sounds-BiF66TnR.js} +1 -1
  215. package/dist/client/assets/{use-view-mode-B_tIKVK9.js → use-view-mode-CYxmOFxU.js} +1 -1
  216. package/dist/client/assets/{use-virtual-mcp-BNYMyb4m.js → use-virtual-mcp-B1_JZqx4.js} +1 -1
  217. package/dist/client/assets/useInfiniteQuery-DWm0T-LL.js +1 -0
  218. package/dist/client/assets/{useQueries-CcJabo7z.js → useQueries-DK7Tbwua.js} +1 -1
  219. package/dist/client/assets/{useRouterState-dFus1Ln-.js → useRouterState-DNEZopRB.js} +1 -1
  220. package/dist/client/assets/useSuspenseInfiniteQuery-DwMra6Dq.js +1 -0
  221. package/dist/client/assets/{users-DwkMIlNd.js → users-C0lqtWR2.js} +1 -1
  222. package/dist/client/assets/variant-calendar-BnWkzjAV.js +1 -0
  223. package/dist/client/assets/{view-mode-toggle-8iS5ijBu.js → view-mode-toggle-DD3UaPAO.js} +1 -1
  224. package/dist/client/index.html +2 -2
  225. package/dist/server/cli.js +1 -1
  226. package/dist/server/server.js +1 -1
  227. package/package.json +1 -1
  228. package/dist/client/assets/ZapSquare-BHPZ3Jvr.js +0 -1
  229. package/dist/client/assets/agent-icon-d2jw6ps1.js +0 -1
  230. package/dist/client/assets/agents-list-Cm1KQ9D2.js +0 -1
  231. package/dist/client/assets/app-editor-C0yvbakK.js +0 -1
  232. package/dist/client/assets/automations-DzcQxxuw.js +0 -1
  233. package/dist/client/assets/bulk-category-panel-DSczrC1Z.js +0 -1
  234. package/dist/client/assets/category-editor-BR9UGbHt.js +0 -1
  235. package/dist/client/assets/collection-detail-Df9j0JqN.js +0 -1
  236. package/dist/client/assets/commerce-onboarding-CwSYKBRm.js +0 -1
  237. package/dist/client/assets/connection-detail-f_zfJBbX.js +0 -1
  238. package/dist/client/assets/connections-C4mwNVj_.js +0 -1
  239. package/dist/client/assets/file-explorer-DamDG5YJ.js +0 -2
  240. package/dist/client/assets/index-3kWge206.css +0 -1
  241. package/dist/client/assets/index-DksnNwcW.js +0 -1
  242. package/dist/client/assets/page-seo-sheet-DsDFhgZG.js +0 -1
  243. package/dist/client/assets/post-editor-rYvYjvCB.js +0 -1
  244. package/dist/client/assets/project-app-view-C_-8Oph6.js +0 -1
  245. package/dist/client/assets/record-editor-BAjYX7Y4.js +0 -1
  246. package/dist/client/assets/redirect-editor-CnHUNMDR.js +0 -1
  247. package/dist/client/assets/registry-DkBLL9mY.js +0 -2
  248. package/dist/client/assets/reports-CsadAOm9.js +0 -43
  249. package/dist/client/assets/roles-BjSGPwj8.js +0 -1
  250. package/dist/client/assets/seo-editor-BaHx_U8X.js +0 -1
  251. package/dist/client/assets/settings-layout-D9tllYwD.js +0 -1
  252. package/dist/client/assets/store-registry-BvxUmcwj.js +0 -2
  253. package/dist/client/assets/useInfiniteQuery-BLsai4DH.js +0 -1
  254. package/dist/client/assets/useSuspenseInfiniteQuery-DZIquNP6.js +0 -1
  255. package/dist/client/assets/variant-calendar-CjFd9em1.js +0 -1
@@ -1,4 +1,4 @@
1
- import{c as oe,m as Ye,bB as Je,j as V,F as Y,K as fe,n as et,cw as tt,J as je,u as Ae,o as Ue,t as ae,I as ue,G as pe,d as Qe,f as nt,r as x,b as Me,q as st,a as at,v as ot,a8 as rt}from"./index-osUKgSS7.js";import{A as Ke,c as it,a as ct,w as lt}from"./autosend-72ilm6k6.js";import{S as dt,u as ut,e as pt,b as ft}from"./hooks-DkEEOEGE.js";import{u as ht}from"./studio-tools-C5M-8IB_.js";import{a as mt,u as gt,S as yt}from"./use-mcp-client-DCcQbeST.js";import{u as xt}from"./use-virtual-mcp-BNYMyb4m.js";import{u as St,a as me}from"./use-ai-providers-RUE5iJZ6.js";import{o as bt,b as vt}from"./location-BpLtHjTZ.js";import{d as It,q as Ct,n as kt}from"./tab-id-BijBBRwE.js";import{u as Mt}from"./use-decopilot-events-CLJTbinJ.js";import{e as Tt}from"./use-organization-settings-BalIiDFK.js";const wt={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"],codex:["codex:gpt-5.6-luna"]},Et={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"],codex:["codex:gpt-5.6-terra"]},At={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"],"claude-code":["claude-code:opus-1m","claude-code:opus","claude-code:sonnet"],codex:["codex:gpt-5.6-sol"]},_t={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},Rt={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},$t={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function We(t){return t.toLowerCase().replace(/[^a-z0-9]/g,"")}function Pt(t){return We(t).includes("deepresearch")}const Dt=["sonar","searchpreview","online"];function Be(t){const e=We(t);return e.includes("deepresearch")?!1:Dt.some(n=>e.includes(n))}function Ve(t){return t.asyncResearch!==!0&&Be(t.modelId)}function He(t){return t.asyncResearch===!0||Pt(t.modelId)||Be(t.modelId)}function le(t,e,n,s){for(const a of n){const o=t.find(r=>r.modelId===a);if(o)return{keyId:e,modelId:o.modelId,title:o.title}}for(const a of n){const o=t.find(r=>r.modelId.includes(a));if(o)return{keyId:e,modelId:o.modelId,title:o.title}}if(s){const a=t.find(s);if(a)return{keyId:e,modelId:a.modelId,title:a.title}}return null}function Ot(t,e){const n={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const s of t){const a=e[s.id]??[],o=s.providerId;n.chat.fast||(n.chat.fast=le(a,s.id,wt[o]??[])),n.chat.smart||(n.chat.smart=le(a,s.id,Et[o]??[])),n.chat.thinking||(n.chat.thinking=le(a,s.id,At[o]??[])),n.image||(n.image=le(a,s.id,_t[o]??[],r=>r.capabilities?.includes("image")===!0)),n.webSearch||(n.webSearch=le(a,s.id,Rt[o]??[],Ve)),n.deepResearch||(n.deepResearch=le(a,s.id,$t[o]??[],He))}return n}const Lt=Je("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function Tn(t){const e=oe.c(10),{variant:n,size:s}=t;let a;e[0]!==s||e[1]!==n?(a=Ye(Lt({variant:n,size:s})),e[0]=s,e[1]=n,e[2]=a):a=e[2];let o,r;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=V.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),r=V.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=o,e[4]=r):(o=e[3],r=e[4]);let i;e[5]!==a?(i=V.jsxs("svg",{"aria-hidden":"true",className:a,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o,r]}),e[5]=a,e[6]=i):i=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=V.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=u):u=e[7];let d;return e[8]!==i?(d=V.jsxs("div",{role:"status",children:[i,u]}),e[8]=i,e[9]=d):d=e[9],d}const Oe={online:!1,capabilities:[],ready:!1};function Nt(t){const e=oe.c(9),{org:n}=Y(),s=ht(),a=t?.fast??!1;let o;e[0]!==n.id?(o=fe.currentLink(n.id),e[0]=n.id,e[1]=o):o=e[1];let r;e[2]!==s?(r=async()=>{const v=await s.call("LINK_CURRENT_GET",{});return v?{...v,ready:!0}:{...Oe,ready:!0}},e[2]=s,e[3]=r):r=e[3];const i=a?1e3:1e4,u=a?2e3:15e3;let d;e[4]!==o||e[5]!==r||e[6]!==i||e[7]!==u?(d={queryKey:o,queryFn:r,staleTime:i,refetchInterval:u,refetchOnWindowFocus:!0},e[4]=o,e[5]=r,e[6]=i,e[7]=u,e[8]=d):d=e[8];const{data:y}=et(d);return y??Oe}function qt(t,e=[]){return t==="stop"?e.filter(a=>a.type==="text"&&a.text).map(a=>a.text).join(`
1
+ import{c as oe,m as Ye,bB as Je,j as V,F as Y,K as fe,n as et,cw as tt,J as je,u as Ae,o as Ue,t as ae,I as ue,G as pe,d as Qe,f as nt,r as x,b as Me,q as st,a as at,v as ot,a8 as rt}from"./index-DMSyZ1PC.js";import{A as Ke,c as it,a as ct,w as lt}from"./autosend-iAh1cE6e.js";import{S as dt,u as ut,e as pt,b as ft}from"./hooks-2lJrOuZm.js";import{u as ht}from"./studio-tools-D3Jh1aS_.js";import{a as mt,u as gt,S as yt}from"./use-mcp-client-Bi1l5K5b.js";import{u as xt}from"./use-virtual-mcp-B1_JZqx4.js";import{u as St,a as me}from"./use-ai-providers-Lg-k4_mA.js";import{o as bt,b as vt}from"./location-BpLtHjTZ.js";import{d as It,q as Ct,n as kt}from"./tab-id-BijBBRwE.js";import{u as Mt}from"./use-decopilot-events-Bt-vNCWP.js";import{e as Tt}from"./use-organization-settings-BtpD3U3D.js";const wt={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"],codex:["codex:gpt-5.6-luna"]},Et={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"],codex:["codex:gpt-5.6-terra"]},At={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"],"claude-code":["claude-code:opus-1m","claude-code:opus","claude-code:sonnet"],codex:["codex:gpt-5.6-sol"]},_t={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},Rt={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},$t={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function We(t){return t.toLowerCase().replace(/[^a-z0-9]/g,"")}function Pt(t){return We(t).includes("deepresearch")}const Dt=["sonar","searchpreview","online"];function Be(t){const e=We(t);return e.includes("deepresearch")?!1:Dt.some(n=>e.includes(n))}function Ve(t){return t.asyncResearch!==!0&&Be(t.modelId)}function He(t){return t.asyncResearch===!0||Pt(t.modelId)||Be(t.modelId)}function le(t,e,n,s){for(const a of n){const o=t.find(r=>r.modelId===a);if(o)return{keyId:e,modelId:o.modelId,title:o.title}}for(const a of n){const o=t.find(r=>r.modelId.includes(a));if(o)return{keyId:e,modelId:o.modelId,title:o.title}}if(s){const a=t.find(s);if(a)return{keyId:e,modelId:a.modelId,title:a.title}}return null}function Ot(t,e){const n={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const s of t){const a=e[s.id]??[],o=s.providerId;n.chat.fast||(n.chat.fast=le(a,s.id,wt[o]??[])),n.chat.smart||(n.chat.smart=le(a,s.id,Et[o]??[])),n.chat.thinking||(n.chat.thinking=le(a,s.id,At[o]??[])),n.image||(n.image=le(a,s.id,_t[o]??[],r=>r.capabilities?.includes("image")===!0)),n.webSearch||(n.webSearch=le(a,s.id,Rt[o]??[],Ve)),n.deepResearch||(n.deepResearch=le(a,s.id,$t[o]??[],He))}return n}const Lt=Je("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function Tn(t){const e=oe.c(10),{variant:n,size:s}=t;let a;e[0]!==s||e[1]!==n?(a=Ye(Lt({variant:n,size:s})),e[0]=s,e[1]=n,e[2]=a):a=e[2];let o,r;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=V.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),r=V.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=o,e[4]=r):(o=e[3],r=e[4]);let i;e[5]!==a?(i=V.jsxs("svg",{"aria-hidden":"true",className:a,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[o,r]}),e[5]=a,e[6]=i):i=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=V.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=u):u=e[7];let d;return e[8]!==i?(d=V.jsxs("div",{role:"status",children:[i,u]}),e[8]=i,e[9]=d):d=e[9],d}const Oe={online:!1,capabilities:[],ready:!1};function Nt(t){const e=oe.c(9),{org:n}=Y(),s=ht(),a=t?.fast??!1;let o;e[0]!==n.id?(o=fe.currentLink(n.id),e[0]=n.id,e[1]=o):o=e[1];let r;e[2]!==s?(r=async()=>{const v=await s.call("LINK_CURRENT_GET",{});return v?{...v,ready:!0}:{...Oe,ready:!0}},e[2]=s,e[3]=r):r=e[3];const i=a?1e3:1e4,u=a?2e3:15e3;let d;e[4]!==o||e[5]!==r||e[6]!==i||e[7]!==u?(d={queryKey:o,queryFn:r,staleTime:i,refetchInterval:u,refetchOnWindowFocus:!0},e[4]=o,e[5]=r,e[6]=i,e[7]=u,e[8]=d):d=e[8];const{data:y}=et(d);return y??Oe}function qt(t,e=[]){return t==="stop"?e.filter(a=>a.type==="text"&&a.text).map(a=>a.text).join(`
2
2
  `).replace(/https?:\/\/[^\s)>\]]+/g,"").includes("?")?"requires_action":"completed":t==="tool-calls"?e.some(s=>s.type==="tool-user_ask"&&s.state==="input-available"||s.state==="approval-requested")?"requires_action":"completed":"failed"}const Ce={decopilot:{harness:"decopilot",sandbox:"agent-sandbox"},"claude-code-desktop":{harness:"claude-code",sandbox:"user-desktop"},"codex-desktop":{harness:"codex",sandbox:"user-desktop"}};function Ft(t,e){if(!t)return null;const n=e?tt(e):null;if(t==="decopilot"&&n===null)return"decopilot";for(const[s,a]of Object.entries(Ce))if(a.harness===t&&a.sandbox===n)return s;return null}function wn(t){return t.claudeCode?"claude-code-desktop":t.codex?"codex-desktop":null}function jt(t,e){return e&&t&&Ce[t].sandbox==="user-desktop"?"decopilot":t}function Ut(t){return t.thread?.harness_id!=null?{}:{harnessId:t.globals.harnessId,sandboxProviderKind:t.globals.sandboxProviderKind,branch:t.globals.branch??null}}function Qt(t){const e=oe.c(21);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId",shouldThrow:!1},e[0]=n):n=e[0];const s=je(n);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const o=Ae(a);let r;e[2]!==o.brand||e[3]!==o.main||e[4]!==o.preview||e[5]!==o.skill?(r=(typeof o.main=="string"?It(o.main)?.path:void 0)??o.preview??o.skill??o.brand??null,e[2]=o.brand,e[3]=o.main,e[4]=o.preview,e[5]=o.skill,e[6]=r):r=e[6];const i=r;let u;if(e[7]!==s?.params.appSlug||e[8]!==s?.params.collectionName||e[9]!==s?.params.itemId||e[10]!==i||e[11]!==t){if(u=[],t&&u.push(`### Selected Agent
3
3
  - ID: ${t}`),i){let y;e[13]!==i?(y=bt(i),e[13]=i,e[14]=y):y=e[14];const v=y;let w;e[15]!==i?(w=vt(i),e[15]=i,e[16]=w):w=e[16],u.push(`### Currently Open File
4
4
  The user has this file open in the Library and is most likely referring to it:
@@ -1 +1 @@
1
- import{c as n,m as d,j as c,bD as l,bE as m}from"./index-osUKgSS7.js";import{i as b}from"./Check-D39cW1EC.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(m,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(b,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
1
+ import{c as n,m as d,j as c,bD as l,bE as m}from"./index-DMSyZ1PC.js";import{i as b}from"./Check-BXZBH--f.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(m,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(b,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
@@ -1 +1 @@
1
- import{c as a,a as c,r as m,j as o}from"./index-osUKgSS7.js";import{A as u}from"./auth-split-layout-2p5tfz8M.js";function p(){const e=a.c(8),i=c.useSession().data?.user?.email;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0],m.useEffect(f,l);let t;e[1]!==i?(t=i?o.jsxs(o.Fragment,{children:[" as ",i]}):"",e[1]=i,e[2]=t):t=e[2];let s;e[3]!==t?(s=o.jsxs("h1",{className:"text-3xl font-semibold tracking-tight",children:["You're logged in",t,"."]}),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("p",{className:"text-muted-foreground",children:"You can return to your terminal."}),e[5]=n):n=e[5];let r;return e[6]!==s?(r=o.jsx(u,{children:o.jsxs("div",{className:"space-y-3",children:[s,n]})}),e[6]=s,e[7]=r):r=e[7],r}function f(){window.close()}export{p as default};
1
+ import{c as a,a as c,r as m,j as o}from"./index-DMSyZ1PC.js";import{A as u}from"./auth-split-layout-Kv3PLrjS.js";function p(){const e=a.c(8),i=c.useSession().data?.user?.email;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0],m.useEffect(f,l);let t;e[1]!==i?(t=i?o.jsxs(o.Fragment,{children:[" as ",i]}):"",e[1]=i,e[2]=t):t=e[2];let s;e[3]!==t?(s=o.jsxs("h1",{className:"text-3xl font-semibold tracking-tight",children:["You're logged in",t,"."]}),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("p",{className:"text-muted-foreground",children:"You can return to your terminal."}),e[5]=n):n=e[5];let r;return e[6]!==s?(r=o.jsx(u,{children:o.jsxs("div",{className:"space-y-3",children:[s,n]})}),e[6]=s,e[7]=r):r=e[7],r}function f(){window.close()}export{p as default};
@@ -0,0 +1 @@
1
+ import{c as k,j as t,B as K,k as oe,W as Ye,X as re,b as Q,E as Ee,r as E,F as fe,bb as Ze,bc as Oe,Z as Ge,m as W,bd as et,u as tt,L as te,t as st,f as he,a$ as Re}from"./index-DMSyZ1PC.js";import{E as Fe}from"./empty-state-C86_b7IP.js";import{u as ge}from"./use-mcp-client-Bi1l5K5b.js";import{F as ae,a as lt,b as ce,d as de}from"./form-XFZrliJE.js";import{I as pe}from"./input-1RtsmTkF.js";import{T as xe}from"./textarea-jptDrRLe.js";import{a as ot,b as nt,V as je,O as it,M as rt}from"./index-dG1PkEhl.js";import{aA as at,S as ct,aB as dt,_ as mt,a8 as ut,aC as pt,a1 as ye}from"./agent-icon-CCxdHfHq.js";import{g as xt,M as ft,a as we}from"./index-CfhyBu5A.js";import{A as ht,a as gt,b as jt}from"./alert-B6DPJVFC.js";import{S as Ce,a as Ie,b as $e,c as Te,d as me}from"./select-BZ2uyFha.js";import{b as bt,c as Pe,T as ke,a as Ae}from"./tooltip-CJ5Y5366.js";import{i as Nt}from"./AlertCircle-CWc3BvFb.js";import{s as vt}from"./Stars02-B1CYtkwJ.js";import{a as St}from"./Copy01-CjvNe041.js";import{i as yt}from"./Play-Bs1D_H9C.js";import{i as wt}from"./ChevronRight-pKqWhPFO.js";import{g as Ct}from"./connection-slug-eyAPH6o3.js";import{u as It,T as $t}from"./use-mcp-auth-status-CxzQOxft.js";import{a as ze,u as Me}from"./use-connection-Ck7fU3Z4.js";import{a as Tt}from"./use-mcp-tools-A2pVmeDY.js";import{M as Pt,c as kt}from"./monaco-editor-BTlS3Jcm.js";import{I as De}from"./integration-icon-DxLbb9qy.js";import{h as At,m as Dt}from"./chat-context-Dtvr7cnX.js";import{u as Et}from"./shell-layout-CQmTObw4.js";import{n as Ot}from"./Tool02-1ZIphfq5.js";import"./auth-C488ati9.js";import"./label-CuycpzyK.js";import"./index-CTu_OuGZ.js";import"./sidebar-VwrbgopG.js";import"./LayoutLeft-B7XnXJCX.js";import"./use-mobile-fV0eYRhU.js";import"./X-Dc8jzuGp.js";import"./ZoomOut-Ce4wv8I3.js";import"./Key01-C-044wq-.js";import"./extract-connection-data-DpPAxW37.js";import"./use-registry-connections-CFzxn-fx.js";import"./use-organization-settings-BtpD3U3D.js";import"./studio-tools-D3Jh1aS_.js";import"./Plus-CxvuE4Es.js";import"./index-CTGvOy90.js";import"./popover-pMjGUykd.js";import"./use-virtual-mcp-B1_JZqx4.js";import"./Check-BXZBH--f.js";import"./SearchMd-CVAS4bHb.js";import"./Users03-Dxbbv3M0.js";import"./use-create-virtual-mcp-K5ESAvbN.js";import"./use-navigate-to-agent-D3lktxgi.js";import"./hooks-2lJrOuZm.js";import"./decopilot-sse-pool-XB4qOGfZ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Tool01-ttrYDD-F.js";import"./ArrowUp-Dqm6yb7b.js";import"./Settings02-C48BmakR.js";import"./ArrowRight-DnZw9chb.js";import"./ArrowUpRight-a-xAV1yD.js";import"./TrendUp01-DAMS2ptH.js";import"./ZapSquare-Bqk2MRuL.js";import"./CheckCircle-Dx2byA8l.js";import"./ChevronDown-C82kSPQJ.js";import"./ChevronUp-Ur5tOU4r.js";import"./DotsVertical-CsPrfBHu.js";import"./Globe01-bBcCao8m.js";import"./Eye-D6UmvuQl.js";import"./FilterLines-I4EBUx4y.js";import"./Star01-DbfqTNT0.js";import"./Globe04-BvAgykOe.js";import"./SwitchHorizontal01-DjC0A58U.js";import"./HardDrive-B1MltyIG.js";import"./Image01-CwV9iuxz.js";import"./XCircle-Bb4jhNm5.js";import"./LinkExternal01-Beo7SFkQ.js";import"./LogOut01-BbBoHzGS.js";import"./Monitor01-CNCx-B51.js";import"./Sun-CiZGxTK4.js";import"./Package-CidzBhtk.js";import"./Palette-DyqhX3Li.js";import"./SearchLg-D6bYV_e6.js";import"./Shield01-CpLEfQVx.js";import"./Stars01-DdKwQ9te.js";import"./Trash01-CbEfRhj4.js";import"./Upload01-CtTjeXyd.js";import"./User01-DvoPZa3L.js";import"./Users01-HKR3d_K9.js";import"./XClose-BLwV1Ngp.js";import"./Zap-KiDFkWg-.js";import"./badge-D9Myt67H.js";import"./mcp-oauth-zippK-pA.js";import"./index-C0xyoib4.js";import"./autosend-iAh1cE6e.js";import"./use-ai-providers-Lg-k4_mA.js";import"./location-BpLtHjTZ.js";import"./tab-id-BijBBRwE.js";import"./use-decopilot-events-Bt-vNCWP.js";import"./avatar-Cc14VL9E.js";import"./dialog-DXHGb8ov.js";import"./required-auth-layout-B0hyPLrN.js";import"./use-org-sso-CqNJvI6A.js";function Rt(s){const e=k.c(15),{onSave:n,onUndo:l,isDirty:o,isSaving:i,saveLabel:r,undoLabel:c}=s,d=r===void 0?"Save":r,a=c===void 0?"Undo":c;if(!o)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(at,{size:14}),e[0]=x):x=e[0];let h;e[1]!==i||e[2]!==l||e[3]!==a?(h=t.jsxs(K,{variant:"outline",size:"sm",onClick:l,disabled:i,"aria-label":a,children:[x,a]}),e[1]=i,e[2]=l,e[3]=a,e[4]=h):h=e[4];let m;e[5]!==i?(m=i?t.jsx(oe,{size:14,className:"animate-spin"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==m?(f=t.jsxs(K,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[m,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=m,e[11]=f):f=e[11];let p;return e[12]!==h||e[13]!==f?(p=t.jsxs(t.Fragment,{children:[h,f]}),e[12]=h,e[13]=f,e[14]=p):p=e[14],p}Ye({title:re().min(1),description:re().nullable(),body:re()});function ue(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ft(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(l=>l==="mcps"),n=e>=0?s[e+1]:void 0;return n?decodeURIComponent(n):void 0}function zt(s){const e=k.c(43),{form:n}=s,l=Q();let o;e[0]!==l?(o=l("details.prompt.details"),e[0]=l,e[1]=o):o=e[1];let i;e[2]!==o?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:o}),e[2]=o,e[3]=i):i=e[3];let r;e[4]!==l?(r=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.title")}),t.jsx(de,{children:t.jsx(pe,{...N,placeholder:l("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=l,e[5]=r):r=e[5];let c;e[6]!==n.control||e[7]!==r?(c=t.jsx(ae,{control:n.control,name:"title",render:r}),e[6]=n.control,e[7]=r,e[8]=c):c=e[8];let d;e[9]!==l?(d=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.description")}),t.jsx(de,{children:t.jsx(pe,{...N,value:N.value??"",placeholder:l("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=l,e[10]=d):d=e[10];let a;e[11]!==n.control||e[12]!==d?(a=t.jsx(ae,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=a):a=e[13];let x;e[14]!==c||e[15]!==a?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,a]}),e[14]=c,e[15]=a,e[16]=x):x=e[16];let h;e[17]!==i||e[18]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=h):h=e[19];let m;e[20]!==l?(m=l("details.prompt.message"),e[20]=l,e[21]=m):m=e[21];let f;e[22]!==m?(f=t.jsx("div",{className:"text-sm font-medium text-foreground",children:m}),e[22]=m,e[23]=f):f=e[23];let p;e[24]!==l?(p=l("details.prompt.messageDescription"),e[24]=l,e[25]=p):p=e[25];let g;e[26]!==p?(g=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=g):g=e[27];let b;e[28]!==l?(b=w=>{const{field:N}=w;return t.jsx(ce,{children:t.jsx(de,{children:t.jsx(xe,{...N,value:N.value??"",placeholder:l("details.prompt.bodyPlaceholder"),className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})},e[28]=l,e[29]=b):b=e[29];let S;e[30]!==n.control||e[31]!==b?(S=t.jsx(ae,{control:n.control,name:"body",render:b}),e[30]=n.control,e[31]=b,e[32]=S):S=e[32];let T;e[33]!==f||e[34]!==g||e[35]!==S?(T=t.jsxs("div",{className:"flex flex-col gap-2",children:[f,g,S]}),e[33]=f,e[34]=g,e[35]=S,e[36]=T):T=e[36];let y;e[37]!==T||e[38]!==h?(y=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[h,T]}),e[37]=T,e[38]=h,e[39]=y):y=e[39];let P;return e[40]!==n||e[41]!==y?(P=t.jsx(lt,{...n,children:y}),e[40]=n,e[41]=y,e[42]=P):P=e[42],P}function Mt(s){const e=k.c(42),{providerId:n,promptId:l}=s,o=Q(),{org:i}=fe(),r=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==r?(c={connectionId:r,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=r,e[3]=c):c=e[3];const d=ge(c),a=Ze(n,"PROMPT",l,d),x=Oe(n,"PROMPT",d),h=x.update.isPending;let m;e[4]!==a?(m=a?{title:a.title,description:a.description??null,body:ue(a)}:void 0,e[4]=a,e[5]=m):m=e[5];let f;e[6]!==m?(f={values:m},e[6]=m,e[7]=f):f=e[7];const p=Ge(f);let g;e[8]!==p||e[9]!==a?(g=()=>{a&&p.reset({title:a.title,description:a.description??null,body:ue(a)})},e[8]=p,e[9]=a,e[10]=g):g=e[10];const b=g;let S;e[11]!==x.update||e[12]!==p||e[13]!==l?(S=p.handleSubmit(async C=>{const I=await x.update.mutateAsync({id:l,data:{title:C.title,description:C.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:C.body}}]}});p.reset({title:I.title,description:I.description??null,body:ue(I)})}),e[11]=x.update,e[12]=p,e[13]=l,e[14]=S):S=e[14];const T=S;if(!a){let C;e[15]!==o?(C=o("details.prompt.notFoundTitle"),e[15]=o,e[16]=C):C=e[16];let I;e[17]!==o?(I=o("details.prompt.notFoundDescription"),e[17]=o,e[18]=I):I=e[18];let R;return e[19]!==C||e[20]!==I?(R=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:C,description:I})}),e[19]=C,e[20]=I,e[21]=R):R=e[21],R}let y;e[22]!==a.title?(y=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:a.title}),e[22]=a.title,e[23]=y):y=e[23];let P;e[24]!==a.description?(P=a.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:a.description})]}):null,e[24]=a.description,e[25]=P):P=e[25];let w;e[26]!==y||e[27]!==P?(w=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,P]})}),e[26]=y,e[27]=P,e[28]=w):w=e[28];let N;e[29]!==T?(N=()=>{T()},e[29]=T,e[30]=N):N=e[30];let A;e[31]!==p.formState.isDirty||e[32]!==h||e[33]!==b||e[34]!==N?(A=t.jsx(ot,{children:t.jsx(Rt,{onSave:N,onUndo:b,isDirty:p.formState.isDirty,isSaving:h})}),e[31]=p.formState.isDirty,e[32]=h,e[33]=b,e[34]=N,e[35]=A):A=e[35];let D;e[36]!==p?(D=t.jsx("div",{className:"h-full",children:t.jsx(zt,{form:p})}),e[36]=p,e[37]=D):D=e[37];let O;return e[38]!==A||e[39]!==D||e[40]!==w?(O=t.jsxs(je,{children:[w,A,D]}),e[38]=A,e[39]=D,e[40]=w,e[41]=O):O=e[41],O}function Lt(s){const e=k.c(10),{itemId:n}=s,l=Q();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Ft(),e[0]=o):o=e[0];const i=o;if(!i){let c;e[1]!==l?(c=l("details.prompt.notFoundTitle"),e[1]=l,e[2]=c):c=e[2];let d;e[3]!==l?(d=l("details.prompt.missingConnectionDescription"),e[3]=l,e[4]=d):d=e[4];let a;return e[5]!==c||e[6]!==d?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=a):a=e[7],a}let r;return e[8]!==n?(r=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:null,children:t.jsx(Mt,{providerId:i,promptId:n})})}),e[8]=n,e[9]=r):r=e[9],r}function Le(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("min-w-0 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Be(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Y(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function se(s){const e=k.c(10);let n,l,o;e[0]!==s?({asChild:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);const i=n?et:"a";let r;e[4]!==l?(r=W("hover:text-foreground transition-colors truncate",l),e[4]=l,e[5]=r):r=e[5];let c;return e[6]!==i||e[7]!==o||e[8]!==r?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:r,...o}),e[6]=i,e[7]=o,e[8]=r,e[9]=c):c=e[9],c}function Ue(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=W("text-foreground font-medium truncate",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function le(s){const e=k.c(12);let n,l,o;e[0]!==s?({children:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);let i;e[4]!==l?(i=W("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",l),e[4]=l,e[5]=i):i=e[5];let r;e[6]!==n?(r=n??t.jsx(wt,{}),e[6]=n,e[7]=r):r=e[7];let c;return e[8]!==o||e[9]!==i||e[10]!==r?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...o,children:r}),e[8]=o,e[9]=i,e[10]=r,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(s){const e=k.c(12),{toolName:n,connectionId:l,siblings:o,onSelectInstance:i,onBack:r}=s,c=Q();let d;e[0]!==l?(d={connectionId:l},e[0]=l,e[1]=d):d=e[1];const a=It(d);if(!a.isAuthenticated){let m;return e[2]!==a.supportsOAuth||e[3]!==r||e[4]!==c?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:a.supportsOAuth?t.jsx(it,{onAuthenticate:()=>r(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=a.supportsOAuth,e[3]=r,e[4]=c,e[5]=m):m=e[5],m}const x=`${l}:${n}`;let h;return e[6]!==l||e[7]!==i||e[8]!==o||e[9]!==x||e[10]!==n?(h=t.jsx(Vt,{toolName:n,connectionId:l,siblings:o,onSelectInstance:i},x),e[6]=l,e[7]=i,e[8]=o,e[9]=x,e[10]=n,e[11]=h):h=e[11],h}function Vt({toolName:s,connectionId:e,siblings:n,onSelectInstance:l}){const o=Q(),{replayId:i}=tt({strict:!1}),r=(()=>{if(!i)return null;const u=`replay-${i}`,j=sessionStorage.getItem(u);if(!j)return null;sessionStorage.removeItem(u);try{return JSON.parse(j)}catch{return null}})(),c=(()=>{if(!r)return null;const u={};for(const[j,$]of Object.entries(r))$!==null&&typeof $=="object"?u[j]=JSON.stringify($,null,2):u[j]=$;return u})(),[d,a]=E.useState(c??{}),[x,h]=E.useState(r?JSON.stringify(r,null,2):"{}"),[m,f]=E.useState(null),[p,g]=E.useState(null),[b,S]=E.useState(null),[T,y]=E.useState(null),[P,w]=E.useState(!1),[N,A]=E.useState(null),{org:D}=fe(),O=ze(e),C=At(),I=Dt(),{openSidePanel:R}=Et(),U=`${e}:${s}`,z=ge({connectionId:e,orgId:D.id,orgSlug:D.slug}),V=Tt({client:z}),v=V.data?.tools?.find(u=>u.name===s),F=xt(v?._meta),J=u=>{if(!C)return;const j=kt(u.content);j.content.length>0&&(R("chat"),C.sendMessage({tiptapDoc:j}))},[M,L]=E.useState("json"),[q,X]=E.useState(!1);F&&!q&&(L("ui"),X(!0));const _=v?.inputSchema?.properties,be=_?Object.keys(_):[],Z=be.length>0,G={};if(Z&&v?.inputSchema?.properties)for(const u of be)G[u]=v.inputSchema.required?.includes(u)?"":void 0;const ne=u=>Object.prototype.hasOwnProperty.call(d,u),Ve=async()=>{w(!0),y(null),f(null),g(null),S(null),A(null);const u=performance.now();try{if(!z)throw new Error("MCP client is not available");const j=Z?{...G,...d}:(()=>{const B=x.trim();if(!B)return{};const H=JSON.parse(B);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();Z&&v?.inputSchema?.properties&&Object.entries(v.inputSchema.properties).forEach(([B,H])=>{if((H.type==="object"||H.type==="array")&&typeof j[B]=="string")try{j[B]=JSON.parse(j[B])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof j[B]=="string"&&j[B]!==""){const Se=Number(j[B]);Number.isNaN(Se)||(j[B]=Se)}});const $=await z.callTool({name:s,arguments:j}),ee=$.structuredContent??$,We=performance.now(),Qe=Math.round(We-u);f(ee),g($),S(j);const Xe=JSON.stringify(ee),ve=new TextEncoder().encode(Xe).length;A({duration:`${Qe}ms`,bytes:`${ve} bytes`,tokens:`~${Math.ceil(ve/4)} tokens`,cost:"$0.0000"})}catch(j){const $=j instanceof Error?j.message:String(j);y($||"Unknown error occurred");const ee=performance.now();A({duration:`${Math.round(ee-u)}ms`})}finally{w(!1)}},ie=(u,j)=>{a($=>({...$,[u]:j}))},_e=()=>{f(null),g(null),S(null),y(null),A(null)},Je=v?.name??Bt(s),qe=t.jsx(Le,{children:t.jsxs(Be,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:D.slug},children:o("details.tool.connections")})})}),t.jsx(le,{}),O&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:D.slug,appSlug:Ct(O)},search:{tab:"tools"},children:O.title})})}),t.jsx(le,{})]}),t.jsx(Y,{children:t.jsx(Ue,{children:Je})})]})}),Ne=n.length>1&&t.jsxs(Ce,{value:e,onValueChange:l,children:[t.jsx(Ie,{className:"h-8 w-auto min-w-[200px]",children:t.jsx($e,{})}),t.jsx(Te,{children:n.map(u=>t.jsx(me,{value:u.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(De,{icon:u.icon,name:u.title,size:"xs",className:"shrink-0"}),u.title]})},u.id))})]}),He=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:o("details.tool.parameters")}),v?.inputSchema?.required&&v.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",o("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:Z&&v?.inputSchema?.properties?Object.entries(v.inputSchema.properties).map(([u,j])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[u,v.inputSchema?.required?.includes(u)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:j.type})]}),j.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:j.description}),j.type==="object"||j.type==="array"?t.jsx(xe,{className:"font-mono text-xs",value:ne(u)?d[u]??"":G[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enterAsJson",{key:u}),rows:3}):j.type==="boolean"?t.jsxs(Ce,{value:ne(u)?String(d[u]??""):"",onValueChange:$=>ie(u,$==="true"),children:[t.jsx(Ie,{children:t.jsx($e,{placeholder:o("details.tool.selectTrueOrFalse")})}),t.jsxs(Te,{children:[t.jsx(me,{value:"true",children:"true"}),t.jsx(me,{value:"false",children:"false"})]})]}):t.jsx(pe,{value:ne(u)?d[u]??"":G[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enter",{key:u})})]},u)):v?.inputSchema&&!Z?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:o("details.tool.rawJsonInput")}),t.jsx(xe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:u=>h(u.target.value),placeholder:o("details.tool.rawJsonExample")})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(K,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:_e,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),o("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(yt,{className:"h-3.5 w-3.5 fill-current"}),o("details.tool.executeTool")]})})]}),Ke=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:o("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[N&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(vt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.duration})]}),N.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.tokens})]}),N.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.bytes})]}),N.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:N.cost})})]}),F&&t.jsx(bt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("ui"),children:t.jsx(pt,{size:14})})}),t.jsx(Ae,{children:o("details.tool.interactiveView")})]}),t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("json"),children:t.jsx(ye,{size:14})})}),t.jsx(Ae,{children:o("details.tool.jsonView")})]})]})})]})]}),T&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(ht,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Nt,{className:"h-4 w-4"}),t.jsx(gt,{className:"mb-0",children:o("details.tool.executionFailed")})]}),t.jsx(jt,{className:"text-xs text-destructive",children:T})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:F&&M==="ui"&&z?t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:o("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:F,toolInfo:v?{tool:v}:void 0,toolInput:b??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:we.view.minHeight,maxHeight:we.view.maxHeight,client:z,onMessage:J,onUpdateModelContext:u=>I?.setAppContext(U,u),onTeardown:()=>I?.clearAppContext(U),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(Pt,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),st.success(o("details.tool.copiedToClipboard"))},children:t.jsx(St,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(ye,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:o("details.tool.runToolToSeeResults")})]})})]});return t.jsx(je,{breadcrumb:qe,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(De,{icon:O?.icon||null,name:O?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[V.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):V.isLoading?t.jsx(oe,{size:10,className:"animate-spin text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:V.isSuccess?"ready":V.isLoading?"connecting":"error"})]}),t.jsx($t,{annotations:v?.annotations,_meta:v?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:Ne})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v?.description||"No description available"})]}),n.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:o("details.tool.instance")}),Ne]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:He}),Ke]})})]})})}function _t(s){const e=k.c(20),{itemId:n,siblings:l,onBack:o}=s,i=Q(),[r,c]=E.useState(l[0]?.id??"");let d;e[0]!==r||e[1]!==l?(d=l.find(f=>f.id===r)?.id??l[0]?.id??"",e[0]=r,e[1]=l,e[2]=d):d=e[2];const a=d;if(!ze(a||void 0)||!a){let f;e[3]!==i?(f=i("details.tool.connectionNotFound"),e[3]=i,e[4]=f):f=e[4];let p;e[5]!==f?(p=t.jsx("h3",{className:"text-lg font-semibold",children:f}),e[5]=f,e[6]=p):p=e[6];let g;e[7]!==i?(g=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=g):g=e[8];let b;e[9]!==g?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[9]=g,e[10]=b):b=e[10];let S;return e[11]!==p||e[12]!==b?(S=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[p,b]})}),e[11]=p,e[12]=b,e[13]=S):S=e[13],S}let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground"})}),e[14]=h):h=e[14];let m;return e[15]!==a||e[16]!==o||e[17]!==l||e[18]!==n?(m=t.jsx(E.Suspense,{fallback:h,children:t.jsx(Ut,{toolName:n,connectionId:a,siblings:l,onSelectInstance:c,onBack:o})}),e[15]=a,e[16]=o,e[17]=l,e[18]=n,e[19]=m):m=e[19],m}function Jt(s){const e=k.c(21),{icon:n,illustration:l,title:o,description:i,buttonProps:r,buttonComponent:c,className:d,children:a}=s;let x;e[0]!==d?(x=W("flex flex-col items-center justify-center py-16 text-center",d),e[0]=d,e[1]=x):x=e[1];let h;e[2]!==n||e[3]!==l?(h=l?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:l}):n?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:n}):null,e[2]=n,e[3]=l,e[4]=h):h=e[4];let m;e[5]!==o?(m=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o}),e[5]=o,e[6]=m):m=e[6];let f;e[7]!==i?(f=i&&t.jsx("div",{className:"text-sm text-muted-foreground",children:i}),e[7]=i,e[8]=f):f=e[8];let p;e[9]!==m||e[10]!==f?(p=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[m,f]}),e[9]=m,e[10]=f,e[11]=p):p=e[11];let g;e[12]!==c||e[13]!==r?(g=(c??r)&&t.jsx("div",{className:"mt-4",children:c??(r&&t.jsx(K,{size:"sm",className:W(r?.className),...r}))}),e[12]=c,e[13]=r,e[14]=g):g=e[14];let b;return e[15]!==a||e[16]!==x||e[17]!==h||e[18]!==p||e[19]!==g?(b=t.jsxs("div",{className:x,children:[h,p,g,a]}),e[15]=a,e[16]=x,e[17]=h,e[18]=p,e[19]=g,e[20]=b):b=e[20],b}const qt={prompt:Lt};function Ht(){const s=k.c(9),e=Re();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=decodeURIComponent(l.itemId);let i;s[1]!==l.appSlug?(i={slug:l.appSlug},s[1]=l.appSlug,s[2]=i):i=s[2];const r=Me(i);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const d=c,a=Kt;let x;return s[5]!==d||s[6]!==o||s[7]!==r?(x=t.jsx(_t,{itemId:o,siblings:r,onBack:d,onUpdate:a}),s[5]=d,s[6]=o,s[7]=r,s[8]=x):x=s[8],x}async function Kt(s){return Promise.resolve()}function Wt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=k.c(52),e=Re();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=Q(),i=decodeURIComponent(l.collectionName),r=decodeURIComponent(l.itemId);let c;s[1]!==e.history?(c=()=>{e.history.back()},s[1]=e.history,s[2]=c):c=s[2];const d=c,{org:a}=fe();let x;s[3]!==l.appSlug?(x={slug:l.appSlug},s[3]=l.appSlug,s[4]=x):x=s[4];const m=Me(x)[0]??null,f=m?.id??"",p=f||"no-connection",g=f??null;let b;s[5]!==a.id||s[6]!==a.slug||s[7]!==g?(b={connectionId:g,orgId:a.id,orgSlug:a.slug},s[5]=a.id,s[6]=a.slug,s[7]=g,s[8]=b):b=s[8];const S=ge(b),T=Oe(p,i,S);let y;s[9]!==T||s[10]!==r?(y=async _=>{r&&await T.update.mutateAsync({id:r,data:_})},s[9]=T,s[10]=r,s[11]=y):y=s[11];const P=y;let w;s[12]!==i?(w=i?.toLowerCase(),s[12]=i,s[13]=w):w=s[13];const N=w,A=N&&qt[N];let D;s[14]!==i?(D=Wt(i),s[14]=i,s[15]=D):D=s[15];const O=D;let C;s[16]!==a.slug?(C=t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:a.slug},children:"Connections"})})}),s[16]=a.slug,s[17]=C):C=s[17];let I;s[18]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(le,{}),s[18]=I):I=s[18];let R;s[19]!==i||s[20]!==m||s[21]!==a.slug||s[22]!==l.appSlug?(R=m&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:l.appSlug},search:{tab:i},children:m.title})})}),t.jsx(le,{})]}),s[19]=i,s[20]=m,s[21]=a.slug,s[22]=l.appSlug,s[23]=R):R=s[23];let U;s[24]!==O?(U=t.jsx(Y,{children:t.jsx(Ue,{children:O})}),s[24]=O,s[25]=U):U=s[25];let z;s[26]!==R||s[27]!==U||s[28]!==C?(z=t.jsx(Le,{children:t.jsxs(Be,{children:[C,I,R,U]})}),s[26]=R,s[27]=U,s[28]=C,s[29]=z):z=s[29];const V=z;if(A){let _;return s[30]!==A||s[31]!==d||s[32]!==P||s[33]!==r?(_=t.jsx(A,{itemId:r,onBack:d,onUpdate:P}),s[30]=A,s[31]=d,s[32]=P,s[33]=r,s[34]=_):_=s[34],_}let v;s[35]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Ot,{size:36,className:"text-muted-foreground"}),s[35]=v):v=s[35];let F;s[36]!==o?(F=o("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=o,s[37]=F):F=s[37];let J;s[38]!==o?(J=o("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=o,s[39]=J):J=s[39];let M;s[40]!==o?(M=o("orgs.collectionDetail.goBackButton"),s[40]=o,s[41]=M):M=s[41];let L;s[42]!==d||s[43]!==M?(L={onClick:d,children:M},s[42]=d,s[43]=M,s[44]=L):L=s[44];let q;s[45]!==F||s[46]!==J||s[47]!==L?(q=t.jsx(Jt,{icon:v,title:F,description:J,buttonProps:L}),s[45]=F,s[46]=J,s[47]=L,s[48]=q):q=s[48];let X;return s[49]!==V||s[50]!==q?(X=t.jsx(je,{breadcrumb:V,children:q}),s[49]=V,s[50]=q,s[51]=X):X=s[51],X}function Xt(){const s=k.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const n=he(e);if(decodeURIComponent(n.collectionName)==="tools"){let r;return s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Ht,{}),s[1]=r):r=s[1],r}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Qt,{}),s[2]=i):i=s[2],i}function _l(){const s=k.c(7),e=Q();let n;s[0]!==e?(n=e("orgs.collectionDetail.loadingAriaLabel"),s[0]=e,s[1]=n):n=s[1];let l;s[2]!==n?(l=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground","aria-label":n})}),s[2]=n,s[3]=l):l=s[3];let o;s[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Xt,{}),s[4]=o):o=s[4];let i;return s[5]!==l?(i=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:l,children:o})}),s[5]=l,s[6]=i):i=s[6],i}export{_l as default};
@@ -1 +1 @@
1
- import{c as $,b as A,j as s,m as z,B as E}from"./index-osUKgSS7.js";import{a as S,D as F,b as L,c as O}from"./dropdown-menu-Du_BmHui.js";import{i as R,n as _}from"./ArrowUp-84PrwJl7.js";import{i as V}from"./Check-D39cW1EC.js";import{a as I,i as K,c as P}from"./SwitchHorizontal01-DKZ8Ars7.js";import{T as W,a as q,b as G,c as H}from"./tooltip-CeBtAc-Q.js";import{V as J}from"./view-mode-toggle-8iS5ijBu.js";import{B as Q}from"./badge-BnUjJn2C.js";function oe(t){const e=$.c(36),{viewMode:l,onViewModeChange:u,sortKey:M,sortDirection:h,onSort:g,sortOptions:j,filters:b}=t;let v;e[0]!==j?(v=j===void 0?[]:j,e[0]=j,e[1]=v):v=e[1];const N=v;let w;e[2]!==b?(w=b===void 0?[]:b,e[2]=b,e[3]=w):w=e[3];const r=w,i=A();let C;e[4]!==r?(C=r.filter(X),e[4]=r,e[5]=C):C=e[5];const y=C.length;let k;e[6]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(I,{size:16}),e[6]=k):k=e[6];let o;e[7]!==y?(o=y>0&&s.jsx(Q,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:y}),e[7]=y,e[8]=o):o=e[8];let n;e[9]!==o?(n=s.jsx(W,{asChild:!0,children:s.jsx(F,{asChild:!0,children:s.jsxs(E,{variant:"outline",size:"icon",className:"relative",children:[k,o]})})}),e[9]=o,e[10]=n):n=e[10];let a;e[11]!==i?(a=i("collections.collectionDisplayButton.displayAndFilters"),e[11]=i,e[12]=a):a=e[12];let c;e[13]!==a?(c=s.jsx(q,{children:a}),e[13]=a,e[14]=c):c=e[14];let d;e[15]!==c||e[16]!==n?(d=s.jsx(G,{children:s.jsxs(H,{children:[n,c]})}),e[15]=c,e[16]=n,e[17]=d):d=e[17];let x;e[18]!==u||e[19]!==l?(x=u&&l&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(J,{value:l,onValueChange:u,fullWidth:!0,options:[{value:"table",icon:s.jsx(K,{})},{value:"cards",icon:s.jsx(P,{})}]})}),e[18]=u,e[19]=l,e[20]=x):x=e[20];let m;e[21]!==g||e[22]!==h||e[23]!==M||e[24]!==N||e[25]!==i?(m=N.length>0&&g&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:i("collections.collectionDisplayButton.sortBy")}),N.map(T=>{const B=M===T.id;return s.jsx(S,{onClick:()=>g(T.id),className:z("h-8 px-2 py-0 cursor-pointer",B&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[B&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!B&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:T.label}),B&&h&&(h==="asc"?s.jsx(R,{size:16,className:"text-foreground shrink-0"}):s.jsx(_,{size:16,className:"text-foreground shrink-0"}))]})},T.id)})]}),e[21]=g,e[22]=h,e[23]=M,e[24]=N,e[25]=i,e[26]=m):m=e[26];let p;e[27]!==r?(p=r.map(U),e[27]=r,e[28]=p):p=e[28];let f;e[29]!==x||e[30]!==m||e[31]!==p?(f=s.jsxs(L,{align:"end",className:"w-[200px] p-0 gap-0",children:[x,m,p]}),e[29]=x,e[30]=m,e[31]=p,e[32]=f):f=e[32];let D;return e[33]!==d||e[34]!==f?(D=s.jsxs(O,{children:[d,f]}),e[33]=d,e[34]=f,e[35]=D):D=e[35],D}function U(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const l=t.value===e.id;return s.jsx(S,{onClick:()=>t.onChange(e.id),className:z("h-8 px-2 py-0 cursor-pointer",l&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[l&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!l&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function X(t){return t.value!=="ALL"}export{oe as C};
1
+ import{c as $,b as A,j as s,m as z,B as E}from"./index-DMSyZ1PC.js";import{a as S,D as F,b as L,c as O}from"./dropdown-menu-C7j_C2Iz.js";import{i as R,n as _}from"./ArrowUp-Dqm6yb7b.js";import{i as V}from"./Check-BXZBH--f.js";import{a as I,i as K,c as P}from"./SwitchHorizontal01-DjC0A58U.js";import{T as W,a as q,b as G,c as H}from"./tooltip-CJ5Y5366.js";import{V as J}from"./view-mode-toggle-DD3UaPAO.js";import{B as Q}from"./badge-D9Myt67H.js";function oe(t){const e=$.c(36),{viewMode:l,onViewModeChange:u,sortKey:M,sortDirection:h,onSort:g,sortOptions:j,filters:b}=t;let v;e[0]!==j?(v=j===void 0?[]:j,e[0]=j,e[1]=v):v=e[1];const N=v;let w;e[2]!==b?(w=b===void 0?[]:b,e[2]=b,e[3]=w):w=e[3];const r=w,i=A();let C;e[4]!==r?(C=r.filter(X),e[4]=r,e[5]=C):C=e[5];const y=C.length;let k;e[6]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(I,{size:16}),e[6]=k):k=e[6];let o;e[7]!==y?(o=y>0&&s.jsx(Q,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:y}),e[7]=y,e[8]=o):o=e[8];let n;e[9]!==o?(n=s.jsx(W,{asChild:!0,children:s.jsx(F,{asChild:!0,children:s.jsxs(E,{variant:"outline",size:"icon",className:"relative",children:[k,o]})})}),e[9]=o,e[10]=n):n=e[10];let a;e[11]!==i?(a=i("collections.collectionDisplayButton.displayAndFilters"),e[11]=i,e[12]=a):a=e[12];let c;e[13]!==a?(c=s.jsx(q,{children:a}),e[13]=a,e[14]=c):c=e[14];let d;e[15]!==c||e[16]!==n?(d=s.jsx(G,{children:s.jsxs(H,{children:[n,c]})}),e[15]=c,e[16]=n,e[17]=d):d=e[17];let x;e[18]!==u||e[19]!==l?(x=u&&l&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(J,{value:l,onValueChange:u,fullWidth:!0,options:[{value:"table",icon:s.jsx(K,{})},{value:"cards",icon:s.jsx(P,{})}]})}),e[18]=u,e[19]=l,e[20]=x):x=e[20];let m;e[21]!==g||e[22]!==h||e[23]!==M||e[24]!==N||e[25]!==i?(m=N.length>0&&g&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:i("collections.collectionDisplayButton.sortBy")}),N.map(T=>{const B=M===T.id;return s.jsx(S,{onClick:()=>g(T.id),className:z("h-8 px-2 py-0 cursor-pointer",B&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[B&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!B&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:T.label}),B&&h&&(h==="asc"?s.jsx(R,{size:16,className:"text-foreground shrink-0"}):s.jsx(_,{size:16,className:"text-foreground shrink-0"}))]})},T.id)})]}),e[21]=g,e[22]=h,e[23]=M,e[24]=N,e[25]=i,e[26]=m):m=e[26];let p;e[27]!==r?(p=r.map(U),e[27]=r,e[28]=p):p=e[28];let f;e[29]!==x||e[30]!==m||e[31]!==p?(f=s.jsxs(L,{align:"end",className:"w-[200px] p-0 gap-0",children:[x,m,p]}),e[29]=x,e[30]=m,e[31]=p,e[32]=f):f=e[32];let D;return e[33]!==d||e[34]!==f?(D=s.jsxs(O,{children:[d,f]}),e[33]=d,e[34]=f,e[35]=D):D=e[35],D}function U(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const l=t.value===e.id;return s.jsx(S,{onClick:()=>t.onChange(e.id),className:z("h-8 px-2 py-0 cursor-pointer",l&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[l&&s.jsx(V,{size:16,className:"text-foreground shrink-0"}),!l&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function X(t){return t.value!=="ALL"}export{oe as C};
@@ -1 +1 @@
1
- import{c as k,m as b,j as n,k as v}from"./index-osUKgSS7.js";import{i as w}from"./SearchMd-Bxv7C6ib.js";function S(j){const e=k.c(21),{value:m,onChange:d,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?n.jsx(v,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):n.jsx(w,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==d?(r=N=>d(N.target.value),e[6]=d,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==m?(o=n.jsx("input",{type:"text",value:m,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=m,e[13]=o):o=e[13];let a;e[14]!==s||e[15]!==l||e[16]!==o?(a=n.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=n.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{S as C};
1
+ import{c as k,m as b,j as n,k as v}from"./index-DMSyZ1PC.js";import{i as w}from"./SearchMd-CVAS4bHb.js";function S(j){const e=k.c(21),{value:m,onChange:d,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?n.jsx(v,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):n.jsx(w,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==d?(r=N=>d(N.target.value),e[6]=d,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==m?(o=n.jsx("input",{type:"text",value:m,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=m,e[13]=o):o=e[13];let a;e[14]!==s||e[15]!==l||e[16]!==o?(a=n.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=n.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{S as C};
@@ -1 +1 @@
1
- import{c as k,j as r,m as C,b as S}from"./index-osUKgSS7.js";import{d as R,e as H,a as T,T as I,b as W,c as z}from"./table-DVd55Q6d.js";import{i as D,n as E}from"./ArrowUp-84PrwJl7.js";function K(y){const e=k.c(29),{columns:n,data:f,sortKey:u,sortDirection:x,onSort:c,onRowClick:a,rowClassName:d}=y;let p;e[0]!==x?(p=function(s,h){return r.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&x&&(x==="asc"?r.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):r.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=x,e[1]=p):p=e[1];const b=p;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=function(s,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return s===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=o):o=e[2];const g=o;let t;if(e[3]!==n||e[4]!==c||e[5]!==b||e[6]!==u){let i;e[8]!==n.length||e[9]!==c||e[10]!==b||e[11]!==u?(i=(s,h)=>{const N=u===s.id;return r.jsx(R,{className:C(g(h,n.length),"group transition-colors select-none",s.sortable&&"hover:bg-accent cursor-pointer",s.rowClassName,s.cellClassName),onClick:s.sortable&&c?()=>c(s.id):void 0,children:r.jsxs("span",{className:"flex items-center gap-1",children:[s.header,s.sortable&&b(s.id,N)]})},s.id)},e[8]=n.length,e[9]=c,e[10]=b,e[11]=u,e[12]=i):i=e[12],t=n.map(i),e[3]=n,e[4]=c,e[5]=b,e[6]=u,e[7]=t}else t=e[7];let l;e[13]!==t?(l=r.jsx(H,{className:"border-b-0",children:r.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:t})}),e[13]=t,e[14]=l):l=e[14];let j;if(e[15]!==n||e[16]!==f||e[17]!==a||e[18]!==d){let i;e[20]!==n||e[21]!==a||e[22]!==d?(i=(s,h)=>{const N=d?.(s);return r.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",a?"cursor-pointer":"",N),onClick:a?()=>a(s):void 0,children:n.map(m=>r.jsx(I,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:r.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(s):m.accessor?m.accessor(s):null})},m.id))},h)},e[20]=n,e[21]=a,e[22]=d,e[23]=i):i=e[23],j=f.map(i),e[15]=n,e[16]=f,e[17]=a,e[18]=d,e[19]=j}else j=e[19];let w;e[24]!==j?(w=r.jsx(W,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==l||e[27]!==w?(v=r.jsxs(z,{className:"w-full border-collapse",children:[l,w]}),e[26]=l,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(16),{columns:n,data:f,isLoading:u,sortKey:x,sortDirection:c,onSort:a,onRowClick:d,emptyState:p}=y,b=u===void 0?!1:u,o=S();if(b){let t;e[0]!==o?(t=o("collections.collectionTableWrapper.loading"),e[0]=o,e[1]=t):t=e[1];let l;return e[2]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("div",{className:"text-muted-foreground",children:t})}),e[2]=t,e[3]=l):l=e[3],l}if(f.length===0){let t;e[4]!==p||e[5]!==o?(t=p||r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:o("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=o,e[6]=t):t=e[6];let l;return e[7]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:t}),e[7]=t,e[8]=l):l=e[8],l}let g;return e[9]!==n||e[10]!==f||e[11]!==d||e[12]!==a||e[13]!==c||e[14]!==x?(g=r.jsx("div",{className:"flex-1",children:r.jsx(K,{columns:n,data:f,sortKey:x,sortDirection:c,onSort:a,onRowClick:d})}),e[9]=n,e[10]=f,e[11]=d,e[12]=a,e[13]=c,e[14]=x,e[15]=g):g=e[15],g}export{B as C};
1
+ import{c as k,j as r,m as C,b as S}from"./index-DMSyZ1PC.js";import{d as R,e as H,a as T,T as I,b as W,c as z}from"./table-CbyMEuIw.js";import{i as D,n as E}from"./ArrowUp-Dqm6yb7b.js";function K(y){const e=k.c(29),{columns:n,data:f,sortKey:u,sortDirection:x,onSort:c,onRowClick:a,rowClassName:d}=y;let p;e[0]!==x?(p=function(s,h){return r.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&x&&(x==="asc"?r.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):r.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=x,e[1]=p):p=e[1];const b=p;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=function(s,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return s===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=o):o=e[2];const g=o;let t;if(e[3]!==n||e[4]!==c||e[5]!==b||e[6]!==u){let i;e[8]!==n.length||e[9]!==c||e[10]!==b||e[11]!==u?(i=(s,h)=>{const N=u===s.id;return r.jsx(R,{className:C(g(h,n.length),"group transition-colors select-none",s.sortable&&"hover:bg-accent cursor-pointer",s.rowClassName,s.cellClassName),onClick:s.sortable&&c?()=>c(s.id):void 0,children:r.jsxs("span",{className:"flex items-center gap-1",children:[s.header,s.sortable&&b(s.id,N)]})},s.id)},e[8]=n.length,e[9]=c,e[10]=b,e[11]=u,e[12]=i):i=e[12],t=n.map(i),e[3]=n,e[4]=c,e[5]=b,e[6]=u,e[7]=t}else t=e[7];let l;e[13]!==t?(l=r.jsx(H,{className:"border-b-0",children:r.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:t})}),e[13]=t,e[14]=l):l=e[14];let j;if(e[15]!==n||e[16]!==f||e[17]!==a||e[18]!==d){let i;e[20]!==n||e[21]!==a||e[22]!==d?(i=(s,h)=>{const N=d?.(s);return r.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",a?"cursor-pointer":"",N),onClick:a?()=>a(s):void 0,children:n.map(m=>r.jsx(I,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:r.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(s):m.accessor?m.accessor(s):null})},m.id))},h)},e[20]=n,e[21]=a,e[22]=d,e[23]=i):i=e[23],j=f.map(i),e[15]=n,e[16]=f,e[17]=a,e[18]=d,e[19]=j}else j=e[19];let w;e[24]!==j?(w=r.jsx(W,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==l||e[27]!==w?(v=r.jsxs(z,{className:"w-full border-collapse",children:[l,w]}),e[26]=l,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(16),{columns:n,data:f,isLoading:u,sortKey:x,sortDirection:c,onSort:a,onRowClick:d,emptyState:p}=y,b=u===void 0?!1:u,o=S();if(b){let t;e[0]!==o?(t=o("collections.collectionTableWrapper.loading"),e[0]=o,e[1]=t):t=e[1];let l;return e[2]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("div",{className:"text-muted-foreground",children:t})}),e[2]=t,e[3]=l):l=e[3],l}if(f.length===0){let t;e[4]!==p||e[5]!==o?(t=p||r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:o("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=o,e[6]=t):t=e[6];let l;return e[7]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:t}),e[7]=t,e[8]=l):l=e[8],l}let g;return e[9]!==n||e[10]!==f||e[11]!==d||e[12]!==a||e[13]!==c||e[14]!==x?(g=r.jsx("div",{className:"flex-1",children:r.jsx(K,{columns:n,data:f,sortKey:x,sortDirection:c,onSort:a,onRowClick:d})}),e[9]=n,e[10]=f,e[11]=d,e[12]=a,e[13]=c,e[14]=x,e[15]=g):g=e[15],g}export{B as C};
@@ -1 +1 @@
1
- import{c as f,m as u,j as m}from"./index-osUKgSS7.js";import{B as g}from"./badge-BnUjJn2C.js";function h(x){const e=f.c(12),{tabs:l,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==l){let c;e[6]!==n||e[7]!==s?(c=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=c):c=e[8],r=l.map(c),e[2]=n,e[3]=s,e[4]=l,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
1
+ import{c as f,m as u,j as m}from"./index-DMSyZ1PC.js";import{B as g}from"./badge-D9Myt67H.js";function h(x){const e=f.c(12),{tabs:l,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==l){let c;e[6]!==n||e[7]!==s?(c=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=c):c=e[8],r=l.map(c),e[2]=n,e[3]=s,e[4]=l,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
@@ -1 +1 @@
1
- import{c as d,m as i,j as n}from"./index-osUKgSS7.js";import{_ as m}from"./index-B3G-1Db4.js";import{e as k,b as N,h as j,a as b,d as w}from"./dialog-EQ_Nu1nb.js";import{i as y}from"./SearchMd-Bxv7C6ib.js";function C(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(b,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(w,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(y,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,S as f,B as g};
1
+ import{c as d,m as i,j as n}from"./index-DMSyZ1PC.js";import{_ as m}from"./index-CTGvOy90.js";import{e as k,b as N,h as j,a as b,d as w}from"./dialog-DXHGb8ov.js";import{i as y}from"./SearchMd-CVAS4bHb.js";function C(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(b,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(w,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(y,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,S as f,B as g};
@@ -0,0 +1 @@
1
+ import{c as I,b as q,j as o,u as Ke,p as tt,q as Ce,r as H,a as Te,d as rt,s as it,e as Qe,v as Se,w as Ye,Q as ot,E as nt,K as De,x as Ae,B as ze,N as st,m as $e}from"./index-DMSyZ1PC.js";import{L as at,s as Le,S as Ge,a as He,b as ke,c as Me,i as lt,n as Pe,C as Je,p as Ie}from"./self-tool-result-6sETFR7k.js";import{A as ct}from"./auth-entry-BeFx04UO.js";import{A as mt}from"./auth-split-layout-Kv3PLrjS.js";import{O as We}from"./organization-choice-2omIAvR5.js";import{I as ut}from"./input-1RtsmTkF.js";import{D as dt,a as qe,b as gt,c as ft}from"./dropdown-menu-C7j_C2Iz.js";import{S as pt,u as ht,W as bt,g as xt,a as yt}from"./use-mcp-client-Bi1l5K5b.js";import{i as Ct}from"./ArrowRight-DnZw9chb.js";import"./integration-icon-DxLbb9qy.js";import"./Tool02-1ZIphfq5.js";import"./agent-icon-CCxdHfHq.js";import"./AlertCircle-CWc3BvFb.js";import"./Tool01-ttrYDD-F.js";import"./ArrowUp-Dqm6yb7b.js";import"./Settings02-C48BmakR.js";import"./ArrowUpRight-a-xAV1yD.js";import"./TrendUp01-DAMS2ptH.js";import"./ZapSquare-Bqk2MRuL.js";import"./ZoomOut-Ce4wv8I3.js";import"./Users03-Dxbbv3M0.js";import"./CheckCircle-Dx2byA8l.js";import"./Check-BXZBH--f.js";import"./ChevronDown-C82kSPQJ.js";import"./ChevronRight-pKqWhPFO.js";import"./ChevronUp-Ur5tOU4r.js";import"./DotsVertical-CsPrfBHu.js";import"./Stars02-B1CYtkwJ.js";import"./Copy01-CjvNe041.js";import"./Globe01-bBcCao8m.js";import"./Eye-D6UmvuQl.js";import"./FilterLines-I4EBUx4y.js";import"./Star01-DbfqTNT0.js";import"./Globe04-BvAgykOe.js";import"./SwitchHorizontal01-DjC0A58U.js";import"./HardDrive-B1MltyIG.js";import"./Image01-CwV9iuxz.js";import"./Key01-C-044wq-.js";import"./LayoutLeft-B7XnXJCX.js";import"./XCircle-Bb4jhNm5.js";import"./LinkExternal01-Beo7SFkQ.js";import"./LogOut01-BbBoHzGS.js";import"./Monitor01-CNCx-B51.js";import"./Sun-CiZGxTK4.js";import"./Package-CidzBhtk.js";import"./Palette-DyqhX3Li.js";import"./Play-Bs1D_H9C.js";import"./Plus-CxvuE4Es.js";import"./SearchLg-D6bYV_e6.js";import"./SearchMd-CVAS4bHb.js";import"./Shield01-CpLEfQVx.js";import"./Stars01-DdKwQ9te.js";import"./Trash01-CbEfRhj4.js";import"./Upload01-CtTjeXyd.js";import"./User01-DvoPZa3L.js";import"./Users01-HKR3d_K9.js";import"./XClose-BLwV1Ngp.js";import"./X-Dc8jzuGp.js";import"./Zap-KiDFkWg-.js";import"./dialog-DXHGb8ov.js";import"./tooltip-CJ5Y5366.js";import"./companions-core-CE6Q99bc.js";import"./extract-connection-data-DpPAxW37.js";import"./github-repo-scope-DjMZbiKa.js";import"./form-XFZrliJE.js";import"./label-CuycpzyK.js";import"./use-debounced-value-DeWb2Xe3.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./useQueries-DK7Tbwua.js";import"./authenticate-and-persist-oauth-CsBw_Hbi.js";import"./mcp-oauth-zippK-pA.js";import"./auth-C488ati9.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-Cc14VL9E.js";function Fe(t){const e=I.c(5),{variant:i}=t,n=q();let r;e[0]!==n||e[1]!==i?(r=n(i==="workspace"?"routes.commerceOnboarding.loading.preparingWorkspace":"routes.commerceOnboarding.loading.preparing"),e[0]=n,e[1]=i,e[2]=r):r=e[2];const c=r;let a;return e[3]!==c?(a=o.jsx("div",{className:"flex justify-center py-4",role:"status","aria-live":"polite",children:o.jsx(at,{label:c,className:"text-muted-foreground"})}),e[3]=c,e[4]=a):a=e[4],a}function ri(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(_t,{}),t[0]=e):e=t[0],e}const Xe=H.createContext(null),Ze=()=>H.useContext(Xe);function Ot(){const t=I.c(22),[e,i]=Se(),n=e.language==="pt-BR"?"PT-BR":"EN";let r;t[0]!==n?(r=o.jsx(dt,{asChild:!0,children:o.jsx("button",{className:"text-sm font-medium text-foreground/70 hover:text-foreground transition-colors",type:"button",children:n})}),t[0]=n,t[1]=r):r=t[1];let c;t[2]!==i?(c=()=>{i(St)},t[2]=i,t[3]=c):c=t[3];const a=e.language==="en"&&"bg-accent";let s;t[4]!==a?(s=$e(a),t[4]=a,t[5]=s):s=t[5];let g;t[6]!==c||t[7]!==s?(g=o.jsx(qe,{onClick:c,className:s,children:"English"}),t[6]=c,t[7]=s,t[8]=g):g=t[8];let f;t[9]!==i?(f=()=>{i(jt)},t[9]=i,t[10]=f):f=t[10];const u=e.language==="pt-BR"&&"bg-accent";let m;t[11]!==u?(m=$e(u),t[11]=u,t[12]=m):m=t[12];let d;t[13]!==f||t[14]!==m?(d=o.jsx(qe,{onClick:f,className:m,children:"Português (Brasil)"}),t[13]=f,t[14]=m,t[15]=d):d=t[15];let p;t[16]!==g||t[17]!==d?(p=o.jsxs(gt,{align:"end",children:[g,d]}),t[16]=g,t[17]=d,t[18]=p):p=t[18];let S;return t[19]!==r||t[20]!==p?(S=o.jsxs(ft,{children:[r,p]}),t[19]=r,t[20]=p,t[21]=S):S=t[21],S}function jt(t){return{...t,language:"pt-BR"}}function St(t){return{...t,language:"en"}}function k(t){const e=I.c(17);let i,n,r;e[0]!==t?({visual:r,children:i,...n}=t,e[0]=t,e[1]=i,e[2]=n,e[3]=r):(i=e[1],n=e[2],r=e[3]);let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={from:"/commerce-onboarding"},e[4]=c):c=e[4];const a=Ke(c),{data:s}=Te.useSession(),[g]=Se(),f=s?.user?.email;let u;e[5]!==g.language||e[6]!==a.siteUrl||e[7]!==f?(u=ke({siteUrl:a.siteUrl,email:f,locale:g.language}),e[5]=g.language,e[6]=a.siteUrl,e[7]=f,e[8]=u):u=e[8];const m=u;let d;e[9]!==m||e[10]!==r?(d=r??o.jsx(Me,{href:m}),e[9]=m,e[10]=r,e[11]=d):d=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs("div",{className:"flex justify-between items-start mb-8",children:[o.jsx("div",{}),o.jsx(Ot,{})]}),e[12]=p):p=e[12];let S;return e[13]!==i||e[14]!==n||e[15]!==d?(S=o.jsxs(mt,{...n,visual:d,children:[p,i]}),e[13]=i,e[14]=n,e[15]=d,e[16]=S):S=e[16],S}function vt(t){return{signUpFailed:t("routes.commerceOnboarding.authCopy.signUpFailed"),signInFailed:t("routes.commerceOnboarding.authCopy.signInFailed"),authenticationFailed:t("routes.commerceOnboarding.authCopy.authenticationFailed"),resetEmailFailed:t("routes.commerceOnboarding.authCopy.resetEmailFailed"),otpSendFailed:t("routes.commerceOnboarding.authCopy.otpSendFailed"),invalidCode:t("routes.commerceOnboarding.authCopy.invalidCode"),invalidEmail:t("routes.commerceOnboarding.authCopy.invalidEmail"),invalidEmailOrPassword:t("routes.commerceOnboarding.authCopy.invalidEmailOrPassword"),accountExists:t("routes.commerceOnboarding.authCopy.accountExists"),networkError:t("routes.commerceOnboarding.authCopy.networkError"),tooManyAttempts:t("routes.commerceOnboarding.authCopy.tooManyAttempts"),invalidOrExpiredCode:t("routes.commerceOnboarding.authCopy.invalidOrExpiredCode"),genericError:t("routes.commerceOnboarding.authCopy.genericError"),resetPasswordTitle:t("routes.commerceOnboarding.authCopy.resetPasswordTitle"),verificationCodeTitle:t("routes.commerceOnboarding.authCopy.verificationCodeTitle"),welcomeTitle:t("routes.commerceOnboarding.authCopy.welcomeTitle"),resetPasswordSubtitle:t("routes.commerceOnboarding.authCopy.resetPasswordSubtitle"),codeSentTo:e=>t("routes.commerceOnboarding.authCopy.codeSentTo",{email:e}),defaultSubtitle:t("routes.commerceOnboarding.authCopy.defaultSubtitle"),resetEmailSent:t("routes.commerceOnboarding.authCopy.resetEmailSent"),continueWith:e=>t("routes.commerceOnboarding.authCopy.continueWith",{provider:e}),divider:t("routes.commerceOnboarding.authCopy.divider"),emailLabel:t("routes.commerceOnboarding.authCopy.emailLabel"),emailPlaceholder:t("routes.commerceOnboarding.authCopy.emailPlaceholder"),sending:t("routes.commerceOnboarding.authCopy.sending"),sendCode:t("routes.commerceOnboarding.authCopy.sendCode"),verificationCodeLabel:t("routes.commerceOnboarding.authCopy.verificationCodeLabel"),enterCodePlaceholder:t("routes.commerceOnboarding.authCopy.enterCodePlaceholder"),verifying:t("routes.commerceOnboarding.authCopy.verifying"),verify:t("routes.commerceOnboarding.authCopy.verify"),useDifferentEmail:t("routes.commerceOnboarding.authCopy.useDifferentEmail"),sendResetLink:t("routes.commerceOnboarding.authCopy.sendResetLink"),nameLabel:t("routes.commerceOnboarding.authCopy.nameLabel"),namePlaceholder:t("routes.commerceOnboarding.authCopy.namePlaceholder"),passwordLabel:t("routes.commerceOnboarding.authCopy.passwordLabel"),forgotPassword:t("routes.commerceOnboarding.authCopy.forgotPassword"),creatingAccount:t("routes.commerceOnboarding.authCopy.creatingAccount"),signingIn:t("routes.commerceOnboarding.authCopy.signingIn"),continue:t("routes.commerceOnboarding.authCopy.continue"),backToSignIn:t("routes.commerceOnboarding.authCopy.backToSignIn"),signInWithPassword:t("routes.commerceOnboarding.authCopy.signInWithPassword"),alreadyHaveAccount:t("routes.commerceOnboarding.authCopy.alreadyHaveAccount"),dontHaveAccount:t("routes.commerceOnboarding.authCopy.dontHaveAccount"),signIn:t("routes.commerceOnboarding.authCopy.signIn"),signUp:t("routes.commerceOnboarding.authCopy.signUp"),signInWithEmailCode:t("routes.commerceOnboarding.authCopy.signInWithEmailCode")}}function Be(t,e){switch(e){case"Enter a website URL.":return t("routes.commerceOnboarding.siteUrl.enterUrl");case"Use an HTTP or HTTPS website URL.":return t("routes.commerceOnboarding.siteUrl.useHttpOrHttps");case"Enter a valid website URL.":return t("routes.commerceOnboarding.siteUrl.enterValidUrl");case"__configurationFailed":return t("routes.commerceOnboarding.configurationFailed");default:return e}}let Ve=!1;function _t(){const t=Ke({from:"/commerce-onboarding"}),{org:e,siteUrl:i}=t,n=Le(i);return!Ve&&tt()&&(Ve=!0,Ce("commerce_onboarding_viewed",{site_url:i,domain:n??void 0,...n?{$set:{last_scanned_domain:n}}:{}})),o.jsx(Xe.Provider,{value:n,children:o.jsx(Et,{requestedOrgSlug:e,siteUrl:i})})}function Et(t){const e=I.c(14),{requestedOrgSlug:i,siteUrl:n}=t,r=q(),{data:c,isPending:a}=Te.useSession(),s=Ze();if(a){let f;return e[0]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(k,{children:o.jsx(Fe,{variant:"generic"})}),e[0]=f):f=e[0],f}if(!c){const f=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let u;e[1]!==r?(u=r("routes.commerceOnboarding.unlockDiagnostic"),e[1]=r,e[2]=u):u=e[2];let m;e[3]!==s?(m=s?o.jsx(Ge,{host:s}):void 0,e[3]=s,e[4]=m):m=e[4];let d;e[5]!==r?(d=vt(r),e[5]=r,e[6]=d):d=e[6];let p;return e[7]!==u||e[8]!==m||e[9]!==d?(p=o.jsx(k,{children:o.jsx(ct,{callbackUrl:f,allowAutoLogin:!1,title:u,subtitle:null,brand:m,copy:d})}),e[7]=u,e[8]=m,e[9]=d,e[10]=p):p=e[10],p}let g;return e[11]!==i||e[12]!==n?(g=o.jsx(Ut,{requestedOrgSlug:i,siteUrl:n}),e[11]=i,e[12]=n,e[13]=g):g=e[13],g}function Ut(t){const e=I.c(95),{requestedOrgSlug:i,siteUrl:n}=t,r=q(),c=rt(),a=it(),[s,g]=H.useState(null),[f,u]=H.useState(null),m=a.data?.map(Nt)??[];let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={mutationFn:wt,retry:!1,onSuccess:l=>{u(l)}},e[0]=d):d=e[0];const p=Qe(d);if(a.isPending){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(k,{children:o.jsx(Fe,{variant:"workspace"})}),e[1]=l):l=e[1],l}if(a.error){let l;e[2]!==r?(l=r("routes.commerceOnboarding.couldNotLoadOrgs"),e[2]=r,e[3]=l):l=e[3];let h;e[4]!==r?(h=r("routes.commerceOnboarding.retryToConfigureCommerce"),e[4]=r,e[5]=h):h=e[5];let x;e[6]!==r?(x=r("routes.commerceOnboarding.retryAgain"),e[6]=r,e[7]=x):x=e[7];let C;e[8]!==a?(C=()=>a.refetch(),e[8]=a,e[9]=C):C=e[9];let j;return e[10]!==l||e[11]!==h||e[12]!==x||e[13]!==C?(j=o.jsx(Oe,{title:l,description:h,actionLabel:x,onRetry:C}),e[10]=l,e[11]=h,e[12]=x,e[13]=C,e[14]=j):j=e[14],j}const S=i?m.find(l=>l.slug===i):null;if(S){let l;return e[15]!==S||e[16]!==n?(l=o.jsx(ye,{org:S,initialSiteUrl:n}),e[15]=S,e[16]=n,e[17]=l):l=e[17],l}if(i){let l;e[18]!==r?(l=r("routes.commerceOnboarding.orgNotFound"),e[18]=r,e[19]=l):l=e[19];let h;e[20]!==r?(h=r("routes.commerceOnboarding.couldNotFindOrg"),e[20]=r,e[21]=h):h=e[21];let x;e[22]!==r?(x=r("routes.commerceOnboarding.retryAgain"),e[22]=r,e[23]=x):x=e[23];let C;e[24]!==a?(C=()=>a.refetch(),e[24]=a,e[25]=C):C=e[25];let j;return e[26]!==l||e[27]!==h||e[28]!==x||e[29]!==C?(j=o.jsx(Oe,{title:l,description:h,actionLabel:x,onRetry:C}),e[26]=l,e[27]=h,e[28]=x,e[29]=C,e[30]=j):j=e[30],j}if(s){let l;return e[31]!==s||e[32]!==n?(l=o.jsx(ye,{org:s,initialSiteUrl:n}),e[31]=s,e[32]=n,e[33]=l):l=e[33],l}if(m.length===1&&m[0]){let l;return e[34]!==m[0]||e[35]!==n?(l=o.jsx(ye,{org:m[0],initialSiteUrl:n}),e[34]=m[0],e[35]=n,e[36]=l):l=e[36],l}if(m.length>1){let l;e[37]!==r?(l=r("routes.commerceOnboarding.chooseOrg"),e[37]=r,e[38]=l):l=e[38];let h;e[39]!==r?(h=r("routes.commerceOnboarding.selectWhereCommerceContinues"),e[39]=r,e[40]=h):h=e[40];let x;e[41]!==l||e[42]!==h?(x=o.jsx(W,{title:l,description:h}),e[41]=l,e[42]=h,e[43]=x):x=e[43];let C;e[44]!==r?(C=r("routes.commerceOnboarding.authCopy.continue"),e[44]=r,e[45]=C):C=e[45];let j;e[46]!==c||e[47]!==n?(j=V=>c({to:"/commerce-onboarding",search:{org:V.slug,siteUrl:n}}),e[46]=c,e[47]=n,e[48]=j):j=e[48];let O;e[49]!==m||e[50]!==C||e[51]!==j?(O=o.jsx(He,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:o.jsx(We,{organizations:m,selectLabel:C,onSelected:j})}),e[49]=m,e[50]=C,e[51]=j,e[52]=O):O=e[52];let F;return e[53]!==x||e[54]!==O?(F=o.jsx(k,{children:o.jsxs("div",{className:"grid gap-10",children:[x,O]})}),e[53]=x,e[54]=O,e[55]=F):F=e[55],F}if(!f){let l;e[56]!==p?(l=()=>{p.reset(),p.mutate()},e[56]=p,e[57]=l):l=e[57];let h;return e[58]!==p||e[59]!==l?(h=o.jsx(Pt,{mutation:p,onRetry:l}),e[58]=p,e[59]=l,e[60]=h):h=e[60],h}const b=f;if(b?.success&&(b.status==="created"||b.status==="joined"||b.status==="already_has_organization")&&b.organization){let l;return e[61]!==b.organization||e[62]!==n?(l=o.jsx(ye,{org:b.organization,initialSiteUrl:n}),e[61]=b.organization,e[62]=n,e[63]=l):l=e[63],l}if(b?.status==="ambiguous"&&b.organizations&&b.organizations.length>0){let l;e[64]!==r?(l=r("routes.commerceOnboarding.chooseOrg"),e[64]=r,e[65]=l):l=e[65];let h;e[66]!==r?(h=r("routes.commerceOnboarding.emailAccessMultipleOrgs"),e[66]=r,e[67]=h):h=e[67];let x;e[68]!==l||e[69]!==h?(x=o.jsx(W,{title:l,description:h}),e[68]=l,e[69]=h,e[70]=x):x=e[70];const C=b.domain??void 0;let j;e[71]!==c||e[72]!==n?(j=(V,B)=>{Ye(),g({...V,slug:B}),c({to:"/commerce-onboarding",search:{org:B,siteUrl:n}})},e[71]=c,e[72]=n,e[73]=j):j=e[73];let O;e[74]!==b.organizations||e[75]!==C||e[76]!==j?(O=o.jsx(He,{className:"-mx-1 max-h-[60vh] overflow-y-auto px-1",children:o.jsx(We,{organizations:b.organizations,domain:C,onJoined:j})}),e[74]=b.organizations,e[75]=C,e[76]=j,e[77]=O):O=e[77];let F;return e[78]!==x||e[79]!==O?(F=o.jsx(k,{children:o.jsxs("div",{className:"grid gap-10",children:[x,O]})}),e[78]=x,e[79]=O,e[80]=F):F=e[80],F}let E;e[81]!==r?(E=r("routes.commerceOnboarding.onboardingNeedsSupport"),e[81]=r,e[82]=E):E=e[82];let U;e[83]!==b?.error||e[84]!==r?(U=b?.error??r("routes.commerceOnboarding.couldNotDetermineOrg"),e[83]=b?.error,e[84]=r,e[85]=U):U=e[85];let N;e[86]!==r?(N=r("routes.commerceOnboarding.retryAgain"),e[86]=r,e[87]=N):N=e[87];let w;e[88]!==p?(w=()=>{u(null),p.reset()},e[88]=p,e[89]=w):w=e[89];let M;return e[90]!==E||e[91]!==U||e[92]!==N||e[93]!==w?(M=o.jsx(Oe,{title:E,description:U,actionLabel:N,onRetry:w}),e[90]=E,e[91]=U,e[92]=N,e[93]=w,e[94]=M):M=e[94],M}async function wt(){const e=await(await fetch("/api/auth/custom/ensure-organization",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})).json();return e.success&&(e.status==="created"||e.status==="joined"||e.status==="already_has_organization")&&e.organization&&Ye(),e}function Nt(t){return{id:t.id,name:t.name,slug:t.slug,logo:t.logo??null}}function Pt(t){const e=I.c(16),{mutation:i,onRetry:n}=t,r=q(),c=H.useRef(!1);let a;e[0]!==i?(a=u=>{!u||c.current||(c.current=!0,i.mutate())},e[0]=i,e[1]=a):a=e[1];const s=a;if(i.error){let u;e[2]!==r?(u=r("routes.commerceOnboarding.onboardingUnavailable"),e[2]=r,e[3]=u):u=e[3];let m;e[4]!==r?(m=r("routes.commerceOnboarding.couldNotPrepareOrg"),e[4]=r,e[5]=m):m=e[5];let d;e[6]!==r?(d=r("routes.commerceOnboarding.retryAgain"),e[6]=r,e[7]=d):d=e[7];let p;return e[8]!==n||e[9]!==u||e[10]!==m||e[11]!==d?(p=o.jsx(Oe,{title:u,description:m,actionLabel:d,onRetry:n}),e[8]=n,e[9]=u,e[10]=m,e[11]=d,e[12]=p):p=e[12],p}let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(Fe,{variant:"generic"}),e[13]=g):g=e[13];let f;return e[14]!==s?(f=o.jsx(k,{children:o.jsx("div",{ref:s,children:g})}),e[14]=s,e[15]=f):f=e[15],f}function W(t){const e=I.c(8),{title:i,description:n}=t,r=Ze();let c;e[0]!==r?(c=r?o.jsx(Ge,{host:r}):o.jsxs("div",{children:[o.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),o.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=r,e[1]=c):c=e[1];let a;e[2]!==n||e[3]!==i?(a=(i||n)&&o.jsxs("div",{className:"space-y-2",children:[i&&o.jsx("h1",{className:"text-2xl font-medium leading-8",children:i}),n&&o.jsx("p",{className:"text-base text-muted-foreground leading-6",children:n})]}),e[2]=n,e[3]=i,e[4]=a):a=e[4];let s;return e[5]!==c||e[6]!==a?(s=o.jsxs("div",{className:"grid gap-10",children:[c,a]}),e[5]=c,e[6]=a,e[7]=s):s=e[7],s}function Oe(t){const e=I.c(9),{title:i,description:n,actionLabel:r,onRetry:c}=t;let a;e[0]!==n||e[1]!==i?(a=o.jsx(W,{title:i,description:n}),e[0]=n,e[1]=i,e[2]=a):a=e[2];let s;e[3]!==r||e[4]!==c?(s=o.jsx(ze,{type:"button",size:"xl",className:"w-full",onClick:c,children:r}),e[3]=r,e[4]=c,e[5]=s):s=e[5];let g;return e[6]!==a||e[7]!==s?(g=o.jsx(k,{children:o.jsxs("div",{className:"grid gap-10",children:[a,s]})}),e[6]=a,e[7]=s,e[8]=g):g=e[8],g}function ye(t){const e=I.c(13),{org:i,initialSiteUrl:n}=t,r=q(),{data:c}=Te.useSession(),[a]=Se(),s=c?.user?.email;let g;e[0]!==n||e[1]!==a.language||e[2]!==s?(g=ke({siteUrl:n,email:s,locale:a.language}),e[0]=n,e[1]=a.language,e[2]=s,e[3]=g):g=e[3];const f=g;let u;e[4]!==f||e[5]!==i.id?(u=o.jsx(Me,{href:f,orgId:i.id}),e[4]=f,e[5]=i.id,e[6]=u):u=e[6];const m=u;let d;return e[7]!==n||e[8]!==m||e[9]!==i||e[10]!==c?.user?.email||e[11]!==r?(d=o.jsx(ot,{children:p=>{const{reset:S}=p;return o.jsx(nt,{fallback:b=>{const{error:E,resetError:U}=b;return o.jsx(k,{visual:m,children:o.jsx(It,{orgName:i.name,message:E instanceof Error?E.message:r("routes.commerceOnboarding.couldNotVerifyCommerceSetting"),onRetry:()=>{S(),U()}})})},children:o.jsx(H.Suspense,{fallback:o.jsx(et,{visual:m}),children:o.jsx(Rt,{org:i,initialSiteUrl:n,sessionEmail:c?.user?.email},`${i.id}:${n??""}`)})})}}),e[7]=n,e[8]=m,e[9]=i,e[10]=c?.user?.email,e[11]=r,e[12]=d):d=e[12],d}function et(t){const e=I.c(3),{visual:i}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[o.jsx(W,{}),o.jsx(Je,{})]}),e[0]=n):n=e[0];let r;return e[1]!==i?(r=o.jsx(k,{align:"fill",visual:i,children:n}),e[1]=i,e[2]=r):r=e[2],r}function It(t){const e=I.c(19),{orgName:i,message:n,onRetry:r}=t,c=q();let a;e[0]!==c?(a=c("routes.commerceOnboarding.commerceDiagnostic"),e[0]=c,e[1]=a):a=e[1];let s;e[2]!==i||e[3]!==c?(s=c("routes.commerceOnboarding.configurationWillContinueIn",{orgName:i}),e[2]=i,e[3]=c,e[4]=s):s=e[4];let g;e[5]!==a||e[6]!==s?(g=o.jsx(W,{title:a,description:s}),e[5]=a,e[6]=s,e[7]=g):g=e[7];let f;e[8]!==n?(f=o.jsx(je,{message:n}),e[8]=n,e[9]=f):f=e[9];let u;e[10]!==c?(u=c("routes.commerceOnboarding.retryAgain"),e[10]=c,e[11]=u):u=e[11];let m;e[12]!==r||e[13]!==u?(m=o.jsx(ze,{type:"button",size:"xl",className:"w-full",onClick:r,children:u}),e[12]=r,e[13]=u,e[14]=m):m=e[14];let d;return e[15]!==g||e[16]!==f||e[17]!==m?(d=o.jsxs("div",{className:"grid gap-10",children:[g,f,m]}),e[15]=g,e[16]=f,e[17]=m,e[18]=d):d=e[18],d}function Rt(t){const e=I.c(135),{org:i,initialSiteUrl:n,sessionEmail:r}=t;let c;e[0]!==i.id||e[1]!==i.slug?(c={connectionId:pt,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=c):c=e[2];const a=ht(c),[s,g]=H.useState(n??""),[f,u]=H.useState(null),m=H.useRef(!1),d=bt.COMMERCE_DISCOVERY(i.id),p=xt(i.id),S=De.commerceDiscoveryConnection(i.id,d);let b;e[3]!==d||e[4]!==a?(b=async()=>{const y=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:d}});return Ie(y)},e[3]=d,e[4]=a,e[5]=b):b=e[5];let E;e[6]!==S||e[7]!==b?(E={queryKey:S,queryFn:b,retry:!1},e[6]=S,e[7]=b,e[8]=E):E=e[8];const U=Ae(E),N=De.commerceDiscoveryVirtualMcp(i.id,p);let w;e[9]!==a||e[10]!==p?(w=async()=>{const y=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:p}});return Ie(y)},e[9]=a,e[10]=p,e[11]=w):w=e[11];let M;e[12]!==N||e[13]!==w?(M={queryKey:N,queryFn:w,retry:!1},e[12]=N,e[13]=w,e[14]=M):M=e[14];const l=Ae(M);let h;e[15]!==a?(h=async y=>{const v=await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:y}});return Ie(v)},e[15]=a,e[16]=h):h=e[16];let x;e[17]!==U||e[18]!==i.id||e[19]!==l?(x=(y,v)=>{Ce("commerce_onboarding_setup_succeeded",{domain:Le(v)??void 0,organization_id:i.id}),u(null),U.refetch(),l.refetch()},e[17]=U,e[18]=i.id,e[19]=l,e[20]=x):x=e[20];let C;e[21]!==i.id?(C=(y,v)=>{Ce("commerce_onboarding_setup_failed",{domain:Le(v)??void 0,organization_id:i.id,error:y instanceof Error?y.message:String(y)}),u(y instanceof Error?y.message:"__configurationFailed")},e[21]=i.id,e[22]=C):C=e[22];let j;e[23]!==C||e[24]!==h||e[25]!==x?(j={mutationFn:h,retry:!1,onSuccess:x,onError:C},e[23]=C,e[24]=h,e[25]=x,e[26]=j):j=e[26];const O=Qe(j),F=!!U.data.item&&!!l.data.item,V=U.data.item,B=typeof V?.metadata?.siteUrl=="string"?V.metadata.siteUrl:void 0,ve=n||s||"";let ne;e[27]!==B||e[28]!==ve?(ne=lt(ve,B),e[27]=B,e[28]=ve,e[29]=ne):ne=e[29];const se=F&&ne,ae=n||s||B||"",_=q(),[_e]=Se();let le;e[30]!==ae||e[31]!==_e.language||e[32]!==r?(le=ke({siteUrl:ae,email:r,locale:_e.language}),e[30]=ae,e[31]=_e.language,e[32]=r,e[33]=le):le=e[33];const Ee=le;let ce;e[34]!==Ee||e[35]!==i.id?(ce=o.jsx(Me,{href:Ee,orgId:i.id}),e[34]=Ee,e[35]=i.id,e[36]=ce):ce=e[36];const T=ce;let me;e[37]!==f||e[38]!==_?(me=f?Be(_,f):null,e[37]=f,e[38]=_,e[39]=me):me=e[39];const z=me;let ue;e[40]!==O?(ue=y=>{const v=Pe(y);if(!v.ok){u(v.error);return}u(null),O.mutate(v.value)},e[40]=O,e[41]=ue):ue=e[41];const K=ue;let de;e[42]!==n||e[43]!==K||e[44]!==se?(de=y=>{!y||m.current||se||!n||(m.current=!0,K(n))},e[42]=n,e[43]=K,e[44]=se,e[45]=de):de=e[45];const Ue=de;let ge;e[46]!==i.id||e[47]!==K||e[48]!==s?(ge=y=>{y.preventDefault();const v=Pe(s);v.ok&&Ce("commerce_onboarding_site_url_submitted",{domain:new URL(v.value).hostname,organization_id:i.id}),K(s)},e[46]=i.id,e[47]=K,e[48]=s,e[49]=ge):ge=e[49];const D=ge;if(se){const y=i.slug;let v;e[50]===Symbol.for("react.memo_cache_sentinel")?(v=crypto.randomUUID(),e[50]=v):v=e[50];let P;e[51]!==i.slug?(P={org:y,taskId:v},e[51]=i.slug,e[52]=P):P=e[52];let R;e[53]!==i.id?(R=yt(i.id),e[53]=i.id,e[54]=R):R=e[54];const $=ae||void 0;let L;e[55]!==R.id||e[56]!==$?(L={virtualmcpid:R.id,connect:"1",siteUrl:$},e[55]=R.id,e[56]=$,e[57]=L):L=e[57];let A;return e[58]!==P||e[59]!==L?(A=o.jsx(st,{to:"/$org/$taskId",params:P,search:L,replace:!0}),e[58]=P,e[59]=L,e[60]=A):A=e[60],A}if(O.isPending){let y;return e[61]!==T?(y=o.jsx(et,{visual:T}),e[61]=T,e[62]=y):y=e[62],y}if(n){let y,v,P,R,$,L,A,Z;if(e[63]!==T||e[64]!==D||e[65]!==n||e[66]!==i.name||e[67]!==O.isPending||e[68]!==s||e[69]!==_||e[70]!==z||e[71]!==Ue){Z=Symbol.for("react.early_return_sentinel");e:{const we=Pe(n);if(!we.ok){let ie;e[80]!==_?(ie=_("routes.commerceOnboarding.commerceDiagnostic"),e[80]=_,e[81]=ie):ie=e[81];let oe;e[82]!==i.name||e[83]!==_?(oe=_("routes.commerceOnboarding.configurationWillContinueIn",{orgName:i.name}),e[82]=i.name,e[83]=_,e[84]=oe):oe=e[84];let he;e[85]!==ie||e[86]!==oe?(he=o.jsx(W,{title:ie,description:oe}),e[85]=ie,e[86]=oe,e[87]=he):he=e[87];let be;e[88]!==D||e[89]!==O.isPending||e[90]!==s||e[91]!==z?(be=o.jsx(Re,{siteUrl:s,error:z,isSubmitting:O.isPending,onSiteUrlChange:g,onSubmit:D}),e[88]=D,e[89]=O.isPending,e[90]=s,e[91]=z,e[92]=be):be=e[92];const Ne=o.jsxs("div",{className:"grid gap-10",children:[he,o.jsx(je,{message:Be(_,we.error)}),be]});let xe;e[93]!==T||e[94]!==Ne?(xe=o.jsx(k,{visual:T,children:Ne}),e[93]=T,e[94]=Ne,e[95]=xe):xe=e[95],Z=xe;break e}v=k,A=T,$=Ue,L="grid gap-10",y=W,e[96]!==_?(P=_("routes.commerceOnboarding.commerceDiagnostic"),e[96]=_,e[97]=P):P=e[97],R=_("routes.commerceOnboarding.commerceDiscoveryBeingPrepared",{url:we.value})}e[63]=T,e[64]=D,e[65]=n,e[66]=i.name,e[67]=O.isPending,e[68]=s,e[69]=_,e[70]=z,e[71]=Ue,e[72]=y,e[73]=v,e[74]=P,e[75]=R,e[76]=$,e[77]=L,e[78]=A,e[79]=Z}else y=e[72],v=e[73],P=e[74],R=e[75],$=e[76],L=e[77],A=e[78],Z=e[79];if(Z!==Symbol.for("react.early_return_sentinel"))return Z;let ee;e[98]!==y||e[99]!==P||e[100]!==R?(ee=o.jsx(y,{title:P,description:R}),e[98]=y,e[99]=P,e[100]=R,e[101]=ee):ee=e[101];let te;e[102]!==D||e[103]!==O.isPending||e[104]!==s||e[105]!==z?(te=z?o.jsxs(o.Fragment,{children:[o.jsx(je,{message:z}),o.jsx(Re,{siteUrl:s,error:null,isSubmitting:O.isPending,onSiteUrlChange:g,onSubmit:D})]}):o.jsx(Je,{}),e[102]=D,e[103]=O.isPending,e[104]=s,e[105]=z,e[106]=te):te=e[106];let re;e[107]!==$||e[108]!==L||e[109]!==ee||e[110]!==te?(re=o.jsxs("div",{ref:$,className:L,children:[ee,te]}),e[107]=$,e[108]=L,e[109]=ee,e[110]=te,e[111]=re):re=e[111];let pe;return e[112]!==v||e[113]!==A||e[114]!==re?(pe=o.jsx(v,{visual:A,children:re}),e[112]=v,e[113]=A,e[114]=re,e[115]=pe):pe=e[115],pe}let Q;e[116]!==_?(Q=_("routes.commerceOnboarding.commerceDiagnostic"),e[116]=_,e[117]=Q):Q=e[117];let Y;e[118]!==i.name||e[119]!==_?(Y=_("routes.commerceOnboarding.configurationWillContinueIn",{orgName:i.name}),e[118]=i.name,e[119]=_,e[120]=Y):Y=e[120];let G;e[121]!==Q||e[122]!==Y?(G=o.jsx(W,{title:Q,description:Y}),e[121]=Q,e[122]=Y,e[123]=G):G=e[123];let J;e[124]!==D||e[125]!==O.isPending||e[126]!==s||e[127]!==z?(J=o.jsx(Re,{siteUrl:s,error:z,isSubmitting:O.isPending,onSiteUrlChange:g,onSubmit:D}),e[124]=D,e[125]=O.isPending,e[126]=s,e[127]=z,e[128]=J):J=e[128];let X;e[129]!==G||e[130]!==J?(X=o.jsxs("div",{className:"grid gap-10",children:[G,J]}),e[129]=G,e[130]=J,e[131]=X):X=e[131];let fe;return e[132]!==T||e[133]!==X?(fe=o.jsx(k,{visual:T,children:X}),e[132]=T,e[133]=X,e[134]=fe):fe=e[134],fe}function Re(t){const e=I.c(30),{siteUrl:i,error:n,isSubmitting:r,onSiteUrlChange:c,onSubmit:a}=t,s=q();let g;e[0]!==s?(g=s("routes.commerceOnboarding.siteUrlLabel"),e[0]=s,e[1]=g):g=e[1];let f;e[2]!==g?(f=o.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:g}),e[2]=g,e[3]=f):f=e[3];let u;e[4]!==c?(u=M=>c(M.target.value),e[4]=c,e[5]=u):u=e[5];let m;e[6]!==s?(m=s("routes.commerceOnboarding.siteUrlPlaceholder"),e[6]=s,e[7]=m):m=e[7];const d=!!n;let p;e[8]!==r||e[9]!==i||e[10]!==u||e[11]!==m||e[12]!==d?(p=o.jsx(ut,{id:"commerce-site-url",type:"text",inputMode:"url",value:i,onChange:u,placeholder:m,"aria-invalid":d,disabled:r}),e[8]=r,e[9]=i,e[10]=u,e[11]=m,e[12]=d,e[13]=p):p=e[13];let S;e[14]!==n?(S=n?o.jsx(je,{message:n}):null,e[14]=n,e[15]=S):S=e[15];let b;e[16]!==f||e[17]!==p||e[18]!==S?(b=o.jsxs("div",{className:"grid gap-2",children:[f,p,S]}),e[16]=f,e[17]=p,e[18]=S,e[19]=b):b=e[19];let E;e[20]!==s?(E=s("routes.commerceOnboarding.authCopy.continue"),e[20]=s,e[21]=E):E=e[21];let U;e[22]===Symbol.for("react.memo_cache_sentinel")?(U=o.jsx(Ct,{size:16}),e[22]=U):U=e[22];let N;e[23]!==r||e[24]!==E?(N=o.jsxs(ze,{type:"submit",size:"xl",className:"w-full",disabled:r,children:[E,U]}),e[23]=r,e[24]=E,e[25]=N):N=e[25];let w;return e[26]!==a||e[27]!==N||e[28]!==b?(w=o.jsxs("form",{className:"grid gap-4",onSubmit:a,children:[b,N]}),e[26]=a,e[27]=N,e[28]=b,e[29]=w):w=e[29],w}function je(t){const e=I.c(2),{message:i}=t;let n;return e[0]!==i?(n=o.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:i}),e[0]=i,e[1]=n):n=e[1],n}export{ri as default};
@@ -1 +1 @@
1
- import{b as m}from"./extract-connection-data-DlEzKLiw.js";import{a as g}from"./github-repo-scope-DjMZbiKa.js";function I(n){const e=n.properties;if(!e)return[];const t=[];for(const[r,i]of Object.entries(e)){const a=i?.properties?.__type?.const;typeof a=="string"&&a.length>0&&t.push({fieldKey:r,bindingType:a})}return t}const N=[{fieldKey:"vtex",bindingType:"vtex"},{fieldKey:"ga4",bindingType:"google-analytics"},{fieldKey:"gsc",bindingType:"google-search-console"},{fieldKey:"github",bindingType:"github"}];function S(n,e){const t=[];if(n.length&&t.push({field:["id"],operator:"in",value:n}),e.length&&t.push({field:["name"],operator:"in",value:e}),t.length!==0)return t.length===1?t[0]:{operator:"or",conditions:t}}function w(n){const e=n;if(e.isError)throw new Error(e.content?.find(t=>t.text)?.text??"Tool call failed");return e.structuredContent??n}function R(n,e,t,r){return{...n??{},[e]:{__type:t,value:r}}}function p(n){return n==null?!1:typeof n=="string"?n.trim().length>0:typeof n=="number"||typeof n=="boolean"?!0:Array.isArray(n)?n.some(p):typeof n=="object"?Object.entries(n).some(([e,t])=>!e.startsWith("__")&&p(t)):!1}function h(n){const e={accountName:"Nome da conta",appKey:"App Key",appToken:"App Token",propertyId:"Propriedade",siteUrl:"Site"};return e[n]?e[n]:n.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase())}function b(n){return p(n)?typeof n=="string"?n.trim():typeof n=="number"||typeof n=="boolean"?String(n):JSON.stringify(n):null}function B(n){return n?Object.entries(n).flatMap(([e,t])=>{if(e.startsWith("__"))return[];const r=b(t);return r?[{key:e,label:h(e),value:r}]:[]}):[]}function O({autoOpenFieldKey:n,card:e}){return n===e.fieldKey&&e.satisfied&&!!e.linkedConnectionId}function _(n,e,t){const r=n.filter(i=>(i.app_name===e||!!t&&i.app_id===t)&&g(i)===null);return r.length===0?null:(r.sort((i,o)=>{const s=a=>a.status==="active"?0:1;return s(i)!==s(o)?s(i)-s(o):(o.updated_at??"").localeCompare(i.updated_at??"")}),r[0].id)}function C(n){return n.server?.icons?.[0]?.src??m(n.server?.repository)??null}function T(n,e){const t=n._meta?.["mcp.mesh"];return t?.friendlyName||t?.friendly_name||n.title||n.server?.title||n.server?.name||e}function E(n){const e=[],t=new Map(n.connections.map(r=>[r.id,r]));for(const r of n.requirements){const i=n.curated[r.bindingType],o=i?n.itemsById[i.registryAppId]:n.itemsByName[r.bindingType];if(!o)continue;const s=n.configurationState?.[r.fieldKey]?.value,a=s?t.get(s):void 0,u=s&&a?s:null,d=u?n.connectionReadiness?.[u]!==!1:!1,c=!!u&&d,l=c?void 0:n.saBindings?.[r.bindingType],f=c||!!l,y=c?"oauth":l?"sa":null;e.push({fieldKey:r.fieldKey,bindingType:r.bindingType,registryItem:o,title:T(o,r.bindingType),icon:C(o),headline:i?.headline??o._meta?.["mcp.mesh"]?.short_description??null,area:i?.area??null,bullets:i?.bullets??[],satisfied:f,candidateConnectionId:f?null:u||_(n.connections,r.bindingType,i?.registryAppId),linkedConnectionId:u,configurationState:a?.configuration_state??null,boundVia:y,boundResource:l?.resource??null})}return e}function U(n,e){if(!n)return null;const t=i=>{const o=i.startsWith("sc-domain:")?i.substring(10):(()=>{try{return new URL(i.startsWith("http")?i:`https://${i}`).hostname}catch{return null}})();return o===null?i:o.startsWith("www.")?o.substring(4):o},r=t(n);for(const i of e)if(t(i.siteUrl)===r)return i.siteUrl;return null}function W(n){return(n?.response?.accountSummaries??[]).map(r=>({account:r.account,options:(r.propertySummaries??[]).map(i=>({value:i.property,label:`${i.displayName} (${r.displayName})`}))}))}export{N as F,E as a,S as b,R as c,B as g,U as m,I as p,O as s,W as t,w as u};
1
+ import{b as m}from"./extract-connection-data-DpPAxW37.js";import{a as g}from"./github-repo-scope-DjMZbiKa.js";function I(n){const e=n.properties;if(!e)return[];const t=[];for(const[r,i]of Object.entries(e)){const a=i?.properties?.__type?.const;typeof a=="string"&&a.length>0&&t.push({fieldKey:r,bindingType:a})}return t}const N=[{fieldKey:"vtex",bindingType:"vtex"},{fieldKey:"ga4",bindingType:"google-analytics"},{fieldKey:"gsc",bindingType:"google-search-console"},{fieldKey:"github",bindingType:"github"}];function S(n,e){const t=[];if(n.length&&t.push({field:["id"],operator:"in",value:n}),e.length&&t.push({field:["name"],operator:"in",value:e}),t.length!==0)return t.length===1?t[0]:{operator:"or",conditions:t}}function w(n){const e=n;if(e.isError)throw new Error(e.content?.find(t=>t.text)?.text??"Tool call failed");return e.structuredContent??n}function R(n,e,t,r){return{...n??{},[e]:{__type:t,value:r}}}function p(n){return n==null?!1:typeof n=="string"?n.trim().length>0:typeof n=="number"||typeof n=="boolean"?!0:Array.isArray(n)?n.some(p):typeof n=="object"?Object.entries(n).some(([e,t])=>!e.startsWith("__")&&p(t)):!1}function h(n){const e={accountName:"Nome da conta",appKey:"App Key",appToken:"App Token",propertyId:"Propriedade",siteUrl:"Site"};return e[n]?e[n]:n.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase())}function b(n){return p(n)?typeof n=="string"?n.trim():typeof n=="number"||typeof n=="boolean"?String(n):JSON.stringify(n):null}function B(n){return n?Object.entries(n).flatMap(([e,t])=>{if(e.startsWith("__"))return[];const r=b(t);return r?[{key:e,label:h(e),value:r}]:[]}):[]}function O({autoOpenFieldKey:n,card:e}){return n===e.fieldKey&&e.satisfied&&!!e.linkedConnectionId}function _(n,e,t){const r=n.filter(i=>(i.app_name===e||!!t&&i.app_id===t)&&g(i)===null);return r.length===0?null:(r.sort((i,o)=>{const s=a=>a.status==="active"?0:1;return s(i)!==s(o)?s(i)-s(o):(o.updated_at??"").localeCompare(i.updated_at??"")}),r[0].id)}function C(n){return n.server?.icons?.[0]?.src??m(n.server?.repository)??null}function T(n,e){const t=n._meta?.["mcp.mesh"];return t?.friendlyName||t?.friendly_name||n.title||n.server?.title||n.server?.name||e}function E(n){const e=[],t=new Map(n.connections.map(r=>[r.id,r]));for(const r of n.requirements){const i=n.curated[r.bindingType],o=i?n.itemsById[i.registryAppId]:n.itemsByName[r.bindingType];if(!o)continue;const s=n.configurationState?.[r.fieldKey]?.value,a=s?t.get(s):void 0,u=s&&a?s:null,d=u?n.connectionReadiness?.[u]!==!1:!1,c=!!u&&d,l=c?void 0:n.saBindings?.[r.bindingType],f=c||!!l,y=c?"oauth":l?"sa":null;e.push({fieldKey:r.fieldKey,bindingType:r.bindingType,registryItem:o,title:T(o,r.bindingType),icon:C(o),headline:i?.headline??o._meta?.["mcp.mesh"]?.short_description??null,area:i?.area??null,bullets:i?.bullets??[],satisfied:f,candidateConnectionId:f?null:u||_(n.connections,r.bindingType,i?.registryAppId),linkedConnectionId:u,configurationState:a?.configuration_state??null,boundVia:y,boundResource:l?.resource??null})}return e}function U(n,e){if(!n)return null;const t=i=>{const o=i.startsWith("sc-domain:")?i.substring(10):(()=>{try{return new URL(i.startsWith("http")?i:`https://${i}`).hostname}catch{return null}})();return o===null?i:o.startsWith("www.")?o.substring(4):o},r=t(n);for(const i of e)if(t(i.siteUrl)===r)return i.siteUrl;return null}function W(n){return(n?.response?.accountSummaries??[]).map(r=>({account:r.account,options:(r.propertySummaries??[]).map(i=>({value:i.property,label:`${i.displayName} (${r.displayName})`}))}))}export{N as F,E as a,S as b,R as c,B as g,U as m,I as p,O as s,W as t,w as u};
@@ -1,4 +1,4 @@
1
- import{c as k,j as s,B as C,F as H,r as U,z as Y,t as K}from"./index-osUKgSS7.js";import{A as J,b as V}from"./alert-DO3pqp5Y.js";import{C as X}from"./card-DidS0F8g.js";import{c as T,T as L,b as B,a as D}from"./tabs-hgF7ZCkc.js";import{u as O}from"./use-copy-D50eCFOO.js";import{i as F}from"./Check-D39cW1EC.js";import{a as I}from"./Copy01-DggHPLxu.js";import{i as q}from"./Key01-C-zj_nZY.js";import{n as Q}from"./LinkExternal01-WuLv33QG.js";import{s as Z}from"./Trash01-DQk8SKeW.js";import{P as z}from"./index-BDS4mH87.js";import{c as ee}from"./settings-section-BUc4dc2Z.js";import{a as te,m as se,u as re,b as ne,d as ie}from"./use-api-keys-CavYK5Tg.js";import"./sidebar-Df7FAyMJ.js";import"./LayoutLeft-CdBrffSJ.js";import"./use-mobile-BpGP7t1t.js";import"./X-CeuyThrh.js";import"./tooltip-CeBtAc-Q.js";import"./ArrowUpRight-B3GPW-_w.js";import"./use-mcp-client-DCcQbeST.js";import"./auth-CshA0DLa.js";function ae({client:e,mode:t,url:i,apiKey:a}){const o=a??"<paste-your-api-key>",l=te();if(e==="claude-code")return t==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${l} ${i}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${l} ${i} \\
1
+ import{c as k,j as s,B as C,F as H,r as U,z as Y,t as K}from"./index-DMSyZ1PC.js";import{A as J,b as V}from"./alert-B6DPJVFC.js";import{C as X}from"./card-Bqgf0tZo.js";import{c as T,T as L,b as B,a as D}from"./tabs-bdhX5rhL.js";import{u as O}from"./use-copy-DLOqStvb.js";import{i as F}from"./Check-BXZBH--f.js";import{a as I}from"./Copy01-CjvNe041.js";import{i as q}from"./Key01-C-044wq-.js";import{n as Q}from"./LinkExternal01-Beo7SFkQ.js";import{s as Z}from"./Trash01-CbEfRhj4.js";import{P as z}from"./index-CTu_OuGZ.js";import{c as ee}from"./settings-section-hwdjPfIH.js";import{a as te,m as se,u as re,b as ne,d as ie}from"./use-api-keys-Bd5cc4tv.js";import"./sidebar-VwrbgopG.js";import"./LayoutLeft-B7XnXJCX.js";import"./use-mobile-fV0eYRhU.js";import"./X-Dc8jzuGp.js";import"./tooltip-CJ5Y5366.js";import"./ArrowUpRight-a-xAV1yD.js";import"./use-mcp-client-Bi1l5K5b.js";import"./auth-C488ati9.js";function ae({client:e,mode:t,url:i,apiKey:a}){const o=a??"<paste-your-api-key>",l=te();if(e==="claude-code")return t==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${l} ${i}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${l} ${i} \\
2
2
  --header "Authorization: Bearer ${o}"`};if(e==="cursor"){const n={url:i};return t==="api-key"&&(n.headers={Authorization:`Bearer ${o}`}),{language:"json",pathHint:"~/.cursor/mcp.json",code:JSON.stringify({mcpServers:{[l]:n}},null,2)}}if(e==="codex"){const n=[`[mcp_servers.${l}]`,`url = "${i}"`];return t==="api-key"&&n.push(`http_headers = { "Authorization" = "Bearer ${o}" }`),{language:"toml",pathHint:"~/.codex/config.toml",code:n.join(`
3
3
  `)}}if(e==="claude-desktop"){const n={type:"http",url:i};return t==="api-key"&&(n.headers={Authorization:`Bearer ${o}`}),{language:"json",pathHint:"claude_desktop_config.json",code:JSON.stringify({mcpServers:{[l]:n}},null,2)}}return t==="oauth"?{language:"text",code:`${i}
4
4
 
@@ -1 +1 @@
1
- import{c as z,j as t,b as A,r as _,B,m as w}from"./index-osUKgSS7.js";import{e as E,d as R,a as O,b as H,h as $}from"./dialog-EQ_Nu1nb.js";import{u as P,S as F}from"./chat-context--BCe0uBG.js";import{i as G}from"./Check-D39cW1EC.js";import{a as W}from"./Copy01-DggHPLxu.js";function I(a){const e=z.c(3),{size:s}=a,l=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=o):o=e[0];let i;return e[1]!==l?(i=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:l,height:l,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:o}),e[1]=l,e[2]=i):i=e[2],i}function S(a){const e=z.c(3),{size:s}=a,l=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=o):o=e[0];let i;return e[1]!==l?(i=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:l,height:l,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:o}),e[1]=l,e[2]=i):i=e[2],i}const Y={"claude-code":{labelKey:"chat.agentIcons.claudeCode",Icon:I},codex:{labelKey:"chat.agentIcons.codex",Icon:S}};function X(a){return(a&&Y[a])??null}const T="bunx decocms@latest link",K=[{capability:"claude-code",labelKey:"chat.connectDesktopDialog.agentClaudeCodeLabel",descriptionKey:"chat.connectDesktopDialog.agentClaudeCodeDescription",icon:t.jsx(I,{size:18})},{capability:"codex",labelKey:"chat.connectDesktopDialog.agentCodexLabel",descriptionKey:"chat.connectDesktopDialog.agentCodexDescription",icon:t.jsx(S,{size:18})}];function Z(a,e){return K.filter(s=>a.includes(s.capability)).map(s=>e(s.labelKey))}function ee(a){const e=z.c(46),{open:s,onOpenChange:l}=a,o=A();let i;e[0]!==s?(i={fast:s},e[0]=s,e[1]=i):i=e[1];const n=P(i),[N,M]=_.useState(!1);let r,d,m,p,x,u,h,f;if(e[2]!==n.hostname||e[3]!==n.machineId||e[4]!==n.online||e[5]!==l||e[6]!==s||e[7]!==o){const c=n.hostname??n.machineId??o("chat.connectDesktopDialog.yourDesktop");p=E,h=s,f=l,m=R,u="sm:max-w-md",d=O,r=H,x=n.online?o("chat.connectDesktopDialog.connectedTo",{desktopName:c}):o("chat.connectDesktopDialog.connectYourDesktop"),e[2]=n.hostname,e[3]=n.machineId,e[4]=n.online,e[5]=l,e[6]=s,e[7]=o,e[8]=r,e[9]=d,e[10]=m,e[11]=p,e[12]=x,e[13]=u,e[14]=h,e[15]=f}else r=e[8],d=e[9],m=e[10],p=e[11],x=e[12],u=e[13],h=e[14],f=e[15];let g;e[16]!==r||e[17]!==x?(g=t.jsx(r,{children:x}),e[16]=r,e[17]=x,e[18]=g):g=e[18];let D;e[19]!==n.online||e[20]!==o?(D=n.online?o("chat.connectDesktopDialog.machineAgentsDescription"):o("chat.connectDesktopDialog.runCommandDescription"),e[19]=n.online,e[20]=o,e[21]=D):D=e[21];let b;e[22]!==D?(b=t.jsx($,{children:D}),e[22]=D,e[23]=b):b=e[23];let j;e[24]!==d||e[25]!==g||e[26]!==b?(j=t.jsxs(d,{children:[g,b]}),e[24]=d,e[25]=g,e[26]=b,e[27]=j):j=e[27];let k;e[28]!==N||e[29]!==n.online?(k=!n.online&&t.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[t.jsx("span",{className:"flex-1",children:T}),t.jsx(B,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(T),M(!0),setTimeout(()=>M(!1),1500)},children:N?t.jsx(G,{size:14}):t.jsx(W,{size:14})})]}),e[28]=N,e[29]=n.online,e[30]=k):k=e[30];let C;e[31]!==n.capabilities||e[32]!==n.online||e[33]!==o?(C=n.online?t.jsx("div",{className:"flex flex-col gap-3 text-sm",children:t.jsx("div",{className:"flex flex-col gap-2",children:K.map(c=>{const y=n.capabilities.includes(c.capability);return t.jsxs("div",{className:w("flex items-center gap-3 rounded-md border px-3 py-2",y?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[t.jsx("div",{className:w("flex size-6 items-center justify-center",y?"text-foreground":"text-muted-foreground"),children:c.icon}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium",children:o(c.labelKey)}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o(y?c.descriptionKey:"chat.connectDesktopDialog.notDetected")})]}),t.jsx("span",{className:w("size-2 rounded-full",y?"bg-success":"bg-muted-foreground/30")})]},c.capability)})})}):t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t.jsx(F,{size:"sm"}),o("chat.connectDesktopDialog.waitingForDesktop")]}),e[31]=n.capabilities,e[32]=n.online,e[33]=o,e[34]=C):C=e[34];let L;e[35]!==m||e[36]!==k||e[37]!==C||e[38]!==u||e[39]!==j?(L=t.jsxs(m,{className:u,children:[j,k,C]}),e[35]=m,e[36]=k,e[37]=C,e[38]=u,e[39]=j,e[40]=L):L=e[40];let v;return e[41]!==p||e[42]!==L||e[43]!==h||e[44]!==f?(v=t.jsx(p,{open:h,onOpenChange:f,children:L}),e[41]=p,e[42]=L,e[43]=h,e[44]=f,e[45]=v):v=e[45],v}export{ee as C,I as a,S as b,X as l,Z as v};
1
+ import{c as z,j as t,b as A,r as _,B,m as w}from"./index-DMSyZ1PC.js";import{e as E,d as R,a as O,b as H,h as $}from"./dialog-DXHGb8ov.js";import{u as P,S as F}from"./chat-context-Dtvr7cnX.js";import{i as G}from"./Check-BXZBH--f.js";import{a as W}from"./Copy01-CjvNe041.js";function I(a){const e=z.c(3),{size:s}=a,l=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=o):o=e[0];let i;return e[1]!==l?(i=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:l,height:l,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:o}),e[1]=l,e[2]=i):i=e[2],i}function S(a){const e=z.c(3),{size:s}=a,l=s===void 0?16:s;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=o):o=e[0];let i;return e[1]!==l?(i=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:l,height:l,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:o}),e[1]=l,e[2]=i):i=e[2],i}const Y={"claude-code":{labelKey:"chat.agentIcons.claudeCode",Icon:I},codex:{labelKey:"chat.agentIcons.codex",Icon:S}};function X(a){return(a&&Y[a])??null}const T="bunx decocms@latest link",K=[{capability:"claude-code",labelKey:"chat.connectDesktopDialog.agentClaudeCodeLabel",descriptionKey:"chat.connectDesktopDialog.agentClaudeCodeDescription",icon:t.jsx(I,{size:18})},{capability:"codex",labelKey:"chat.connectDesktopDialog.agentCodexLabel",descriptionKey:"chat.connectDesktopDialog.agentCodexDescription",icon:t.jsx(S,{size:18})}];function Z(a,e){return K.filter(s=>a.includes(s.capability)).map(s=>e(s.labelKey))}function ee(a){const e=z.c(46),{open:s,onOpenChange:l}=a,o=A();let i;e[0]!==s?(i={fast:s},e[0]=s,e[1]=i):i=e[1];const n=P(i),[N,M]=_.useState(!1);let r,d,m,p,x,u,h,f;if(e[2]!==n.hostname||e[3]!==n.machineId||e[4]!==n.online||e[5]!==l||e[6]!==s||e[7]!==o){const c=n.hostname??n.machineId??o("chat.connectDesktopDialog.yourDesktop");p=E,h=s,f=l,m=R,u="sm:max-w-md",d=O,r=H,x=n.online?o("chat.connectDesktopDialog.connectedTo",{desktopName:c}):o("chat.connectDesktopDialog.connectYourDesktop"),e[2]=n.hostname,e[3]=n.machineId,e[4]=n.online,e[5]=l,e[6]=s,e[7]=o,e[8]=r,e[9]=d,e[10]=m,e[11]=p,e[12]=x,e[13]=u,e[14]=h,e[15]=f}else r=e[8],d=e[9],m=e[10],p=e[11],x=e[12],u=e[13],h=e[14],f=e[15];let g;e[16]!==r||e[17]!==x?(g=t.jsx(r,{children:x}),e[16]=r,e[17]=x,e[18]=g):g=e[18];let D;e[19]!==n.online||e[20]!==o?(D=n.online?o("chat.connectDesktopDialog.machineAgentsDescription"):o("chat.connectDesktopDialog.runCommandDescription"),e[19]=n.online,e[20]=o,e[21]=D):D=e[21];let b;e[22]!==D?(b=t.jsx($,{children:D}),e[22]=D,e[23]=b):b=e[23];let j;e[24]!==d||e[25]!==g||e[26]!==b?(j=t.jsxs(d,{children:[g,b]}),e[24]=d,e[25]=g,e[26]=b,e[27]=j):j=e[27];let k;e[28]!==N||e[29]!==n.online?(k=!n.online&&t.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[t.jsx("span",{className:"flex-1",children:T}),t.jsx(B,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(T),M(!0),setTimeout(()=>M(!1),1500)},children:N?t.jsx(G,{size:14}):t.jsx(W,{size:14})})]}),e[28]=N,e[29]=n.online,e[30]=k):k=e[30];let C;e[31]!==n.capabilities||e[32]!==n.online||e[33]!==o?(C=n.online?t.jsx("div",{className:"flex flex-col gap-3 text-sm",children:t.jsx("div",{className:"flex flex-col gap-2",children:K.map(c=>{const y=n.capabilities.includes(c.capability);return t.jsxs("div",{className:w("flex items-center gap-3 rounded-md border px-3 py-2",y?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[t.jsx("div",{className:w("flex size-6 items-center justify-center",y?"text-foreground":"text-muted-foreground"),children:c.icon}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"font-medium",children:o(c.labelKey)}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o(y?c.descriptionKey:"chat.connectDesktopDialog.notDetected")})]}),t.jsx("span",{className:w("size-2 rounded-full",y?"bg-success":"bg-muted-foreground/30")})]},c.capability)})})}):t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t.jsx(F,{size:"sm"}),o("chat.connectDesktopDialog.waitingForDesktop")]}),e[31]=n.capabilities,e[32]=n.online,e[33]=o,e[34]=C):C=e[34];let L;e[35]!==m||e[36]!==k||e[37]!==C||e[38]!==u||e[39]!==j?(L=t.jsxs(m,{className:u,children:[j,k,C]}),e[35]=m,e[36]=k,e[37]=C,e[38]=u,e[39]=j,e[40]=L):L=e[40];let v;return e[41]!==p||e[42]!==L||e[43]!==h||e[44]!==f?(v=t.jsx(p,{open:h,onOpenChange:f,children:L}),e[41]=p,e[42]=L,e[43]=h,e[44]=f,e[45]=v):v=e[45],v}export{ee as C,I as a,S as b,X as l,Z as v};
@@ -1 +1 @@
1
- import{c as M,F as $,a_ as L,K as k,m as _,j as I}from"./index-osUKgSS7.js";import{u as D}from"./use-registry-connections-CiQeT9S9.js";import{c as K}from"./use-organization-settings-BalIiDFK.js";import{S as w,j as F}from"./use-mcp-client-DCcQbeST.js";import{u as Q}from"./useInfiniteQuery-BLsai4DH.js";import{i as H,f as q}from"./extract-connection-data-DlEzKLiw.js";import{r as G,R as U}from"./retry-CErkP7V6.js";import{g as E}from"./connection-slug-eyAPH6o3.js";import{C as V}from"./card-DidS0F8g.js";import{I as X}from"./integration-icon-CZMpVL1E.js";function ue(){const s=M.c(6),e=D(),t=K(),a=$().project.enabledPlugins??[];let o;if(s[0]!==a||s[1]!==t||s[2]!==e){let l;s[4]!==t?(l=r=>t(r.id),s[4]=t,s[5]=l):l=s[5],o=e.filter(l).map(Y),a.includes("private-registry")&&t(w)&&o.push({id:w,title:"Private Registry",icon:null}),s[0]=a,s[1]=t,s[2]=e,s[3]=o}else o=s[3];return o}function Y(s){return{id:s.id,title:s.title,icon:s.icon}}const z=24,T=3;function A(s){return s.id.includes("community-registry")}function B(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(a=>t.map(o=>({field:o,operator:"contains",value:a})))}}function S(s,e,t,a,o){const l=s.map(u=>u.id).sort().join(","),r=B(o),{data:p,fetchNextPage:d,hasNextPage:m,isFetchingNextPage:g,isLoading:N}=Q({queryKey:k.storeDiscovery(e,`${l}:${o??""}`),queryFn:async({pageParam:u})=>{const n=u??{};return await Promise.all(s.map(async i=>{const h=n[i.id];if(h==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const j=H(i.id,e);try{return await G(async()=>{let f=null;try{f=await F({connectionId:i.id,orgId:e,orgSlug:t});const x={limit:z};h&&(x.cursor=h),r&&(x.where=r);const C=await f.callTool({name:j,arguments:x}),v=C.structuredContent??C,P=v.nextCursor||v.cursor||void 0,b=q(v?[v]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:b,nextCursor:P}}finally{await f?.close().catch(()=>{})}},{maxAttempts:T,minTimeout:0,maxTimeout:1e3,jitter:0})}catch(f){return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${T} attempts:`,f instanceof U?f.cause:f),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}}))},initialPageParam:{},getNextPageParam:u=>{const n={};let c=!1;for(const i of u)i.registryId&&(i.nextCursor?(n[i.registryId]=i.nextCursor,c=!0):n[i.registryId]="EXHAUSTED");return c?n:void 0},staleTime:3600*1e3,placeholderData:L,retry:!1,enabled:s.length>0}),y=[];if(p?.pages)for(const u of p.pages)for(const n of u)for(const c of n.items)y.push({...c,_sourceName:c._sourceName??n.registryTitle,_sourceIcon:c._sourceIcon??n.registryIcon,_registryId:c._registryId??n.registryId});return{items:y,hasMore:m??!1,isLoadingMore:g,isInitialLoading:N,fetchNextPage:()=>{m&&!g&&d()}}}function fe(s,e){const t=M.c(16),{org:a}=$();let o;t[0]!==s?(o=s.filter(Z),t[0]=s,t[1]=o):o=t[1];const l=o;let r;t[2]!==s?(r=s.filter(W),t[2]=s,t[3]=r):r=t[3];const p=r,d=S(l,a.id,a.slug,!0,e),m=S(p,a.id,a.slug,!0,e);let g;if(t[4]!==m.items||t[5]!==d.items){const h=new Set;g=[];const j=[...d.items,...m.items];for(const f of j){const x=`${f._registryId}:${f.id}`;h.has(x)||(h.add(x),g.push(f))}t[4]=m.items,t[5]=d.items,t[6]=g}else g=t[6];const N=d.isInitialLoading||m.isInitialLoading,y=d.isLoadingMore||m.isLoadingMore,u=d.hasMore||m.hasMore;let n;t[7]!==m||t[8]!==d?(n=()=>{d.hasMore&&d.fetchNextPage(),m.hasMore&&m.fetchNextPage()},t[7]=m,t[8]=d,t[9]=n):n=t[9];const c=n;let i;return t[10]!==u||t[11]!==N||t[12]!==y||t[13]!==g||t[14]!==c?(i={items:g,hasMore:u,isLoadingMore:y,isInitialLoading:N,loadMore:c},t[10]=u,t[11]=N,t[12]=y,t[13]=g,t[14]=c,t[15]=i):i=t[15],i}function W(s){return A(s)}function Z(s){return!A(s)}function me(s){const e=new Map;for(const o of s){const l=E(o),r=e.get(l);r?r.push(o):e.set(l,[o])}const t=[],a=new Set;for(const o of s){const l=E(o);if(a.has(l))continue;a.add(l);const r=e.get(l),p=r[0];r.length===1?t.push({type:"single",connection:p}):t.push({type:"group",key:l,icon:p.icon,title:p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title,connections:r})}return t}function de(s){const e=M.c(37),{connection:t,onClick:a,headerActions:o,headerActionsAlwaysVisible:l,body:r,footer:p,className:d,fallbackIcon:m}=s,g=l===void 0?!1:l,N=a&&"hover:bg-muted/50";let y;e[0]!==d||e[1]!==N?(y=_("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",N,d),e[0]=d,e[1]=N,e[2]=y):y=e[2];let u;e[3]!==t.icon||e[4]!==t.title||e[5]!==m?(u=I.jsx(X,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:m}),e[3]=t.icon,e[4]=t.title,e[5]=m,e[6]=u):u=e[6];let n;e[7]!==o||e[8]!==g?(n=o&&I.jsx("div",{className:_("transition-opacity",!g&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:O,children:o}),e[7]=o,e[8]=g,e[9]=n):n=e[9];let c;e[10]!==n?(c=I.jsx("div",{className:"relative",children:n}),e[10]=n,e[11]=c):c=e[11];let i;e[12]!==u||e[13]!==c?(i=I.jsxs("div",{className:"flex items-start justify-between",children:[u,c]}),e[12]=u,e[13]=c,e[14]=i):i=e[14];let h;e[15]!==t.title?(h=I.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=h):h=e[16];const j=t.description||"No description";let f;e[17]!==j?(f=I.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j}),e[17]=j,e[18]=f):f=e[18];let x;e[19]!==f||e[20]!==h?(x=I.jsxs("div",{className:"flex flex-col gap-1",children:[h,f]}),e[19]=f,e[20]=h,e[21]=x):x=e[21];let C;e[22]!==r?(C=r&&I.jsx("div",{children:r}),e[22]=r,e[23]=C):C=e[23];let v;e[24]!==x||e[25]!==C||e[26]!==i?(v=I.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,x,C]}),e[24]=x,e[25]=C,e[26]=i,e[27]=v):v=e[27];let P;e[28]!==p?(P=p&&I.jsx("div",{className:"border-t border-border mt-auto",children:I.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:J,children:p})}),e[28]=p,e[29]=P):P=e[29];let b;e[30]!==v||e[31]!==P?(b=I.jsxs("div",{className:"flex flex-col flex-1",children:[v,P]}),e[30]=v,e[31]=P,e[32]=b):b=e[32];let R;return e[33]!==a||e[34]!==b||e[35]!==y?(R=I.jsx(V,{className:y,onClick:a,children:b}),e[33]=a,e[34]=b,e[35]=y,e[36]=R):R=e[36],R}function J(s){return s.stopPropagation()}function O(s){return s.stopPropagation()}export{de as C,fe as a,me as g,ue as u};
1
+ import{c as M,F as $,a_ as L,K as k,m as _,j as I}from"./index-DMSyZ1PC.js";import{u as D}from"./use-registry-connections-CFzxn-fx.js";import{c as K}from"./use-organization-settings-BtpD3U3D.js";import{S as w,j as F}from"./use-mcp-client-Bi1l5K5b.js";import{u as Q}from"./useInfiniteQuery-DWm0T-LL.js";import{i as H,f as q}from"./extract-connection-data-DpPAxW37.js";import{r as G,R as U}from"./retry-CErkP7V6.js";import{g as E}from"./connection-slug-eyAPH6o3.js";import{C as V}from"./card-Bqgf0tZo.js";import{I as X}from"./integration-icon-DxLbb9qy.js";function ue(){const s=M.c(6),e=D(),t=K(),a=$().project.enabledPlugins??[];let o;if(s[0]!==a||s[1]!==t||s[2]!==e){let l;s[4]!==t?(l=r=>t(r.id),s[4]=t,s[5]=l):l=s[5],o=e.filter(l).map(Y),a.includes("private-registry")&&t(w)&&o.push({id:w,title:"Private Registry",icon:null}),s[0]=a,s[1]=t,s[2]=e,s[3]=o}else o=s[3];return o}function Y(s){return{id:s.id,title:s.title,icon:s.icon}}const z=24,T=3;function A(s){return s.id.includes("community-registry")}function B(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(a=>t.map(o=>({field:o,operator:"contains",value:a})))}}function S(s,e,t,a,o){const l=s.map(u=>u.id).sort().join(","),r=B(o),{data:p,fetchNextPage:d,hasNextPage:m,isFetchingNextPage:g,isLoading:N}=Q({queryKey:k.storeDiscovery(e,`${l}:${o??""}`),queryFn:async({pageParam:u})=>{const n=u??{};return await Promise.all(s.map(async i=>{const h=n[i.id];if(h==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const j=H(i.id,e);try{return await G(async()=>{let f=null;try{f=await F({connectionId:i.id,orgId:e,orgSlug:t});const x={limit:z};h&&(x.cursor=h),r&&(x.where=r);const C=await f.callTool({name:j,arguments:x}),v=C.structuredContent??C,P=v.nextCursor||v.cursor||void 0,b=q(v?[v]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:b,nextCursor:P}}finally{await f?.close().catch(()=>{})}},{maxAttempts:T,minTimeout:0,maxTimeout:1e3,jitter:0})}catch(f){return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${T} attempts:`,f instanceof U?f.cause:f),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}}))},initialPageParam:{},getNextPageParam:u=>{const n={};let c=!1;for(const i of u)i.registryId&&(i.nextCursor?(n[i.registryId]=i.nextCursor,c=!0):n[i.registryId]="EXHAUSTED");return c?n:void 0},staleTime:3600*1e3,placeholderData:L,retry:!1,enabled:s.length>0}),y=[];if(p?.pages)for(const u of p.pages)for(const n of u)for(const c of n.items)y.push({...c,_sourceName:c._sourceName??n.registryTitle,_sourceIcon:c._sourceIcon??n.registryIcon,_registryId:c._registryId??n.registryId});return{items:y,hasMore:m??!1,isLoadingMore:g,isInitialLoading:N,fetchNextPage:()=>{m&&!g&&d()}}}function fe(s,e){const t=M.c(16),{org:a}=$();let o;t[0]!==s?(o=s.filter(Z),t[0]=s,t[1]=o):o=t[1];const l=o;let r;t[2]!==s?(r=s.filter(W),t[2]=s,t[3]=r):r=t[3];const p=r,d=S(l,a.id,a.slug,!0,e),m=S(p,a.id,a.slug,!0,e);let g;if(t[4]!==m.items||t[5]!==d.items){const h=new Set;g=[];const j=[...d.items,...m.items];for(const f of j){const x=`${f._registryId}:${f.id}`;h.has(x)||(h.add(x),g.push(f))}t[4]=m.items,t[5]=d.items,t[6]=g}else g=t[6];const N=d.isInitialLoading||m.isInitialLoading,y=d.isLoadingMore||m.isLoadingMore,u=d.hasMore||m.hasMore;let n;t[7]!==m||t[8]!==d?(n=()=>{d.hasMore&&d.fetchNextPage(),m.hasMore&&m.fetchNextPage()},t[7]=m,t[8]=d,t[9]=n):n=t[9];const c=n;let i;return t[10]!==u||t[11]!==N||t[12]!==y||t[13]!==g||t[14]!==c?(i={items:g,hasMore:u,isLoadingMore:y,isInitialLoading:N,loadMore:c},t[10]=u,t[11]=N,t[12]=y,t[13]=g,t[14]=c,t[15]=i):i=t[15],i}function W(s){return A(s)}function Z(s){return!A(s)}function me(s){const e=new Map;for(const o of s){const l=E(o),r=e.get(l);r?r.push(o):e.set(l,[o])}const t=[],a=new Set;for(const o of s){const l=E(o);if(a.has(l))continue;a.add(l);const r=e.get(l),p=r[0];r.length===1?t.push({type:"single",connection:p}):t.push({type:"group",key:l,icon:p.icon,title:p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title,connections:r})}return t}function de(s){const e=M.c(37),{connection:t,onClick:a,headerActions:o,headerActionsAlwaysVisible:l,body:r,footer:p,className:d,fallbackIcon:m}=s,g=l===void 0?!1:l,N=a&&"hover:bg-muted/50";let y;e[0]!==d||e[1]!==N?(y=_("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",N,d),e[0]=d,e[1]=N,e[2]=y):y=e[2];let u;e[3]!==t.icon||e[4]!==t.title||e[5]!==m?(u=I.jsx(X,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:m}),e[3]=t.icon,e[4]=t.title,e[5]=m,e[6]=u):u=e[6];let n;e[7]!==o||e[8]!==g?(n=o&&I.jsx("div",{className:_("transition-opacity",!g&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:O,children:o}),e[7]=o,e[8]=g,e[9]=n):n=e[9];let c;e[10]!==n?(c=I.jsx("div",{className:"relative",children:n}),e[10]=n,e[11]=c):c=e[11];let i;e[12]!==u||e[13]!==c?(i=I.jsxs("div",{className:"flex items-start justify-between",children:[u,c]}),e[12]=u,e[13]=c,e[14]=i):i=e[14];let h;e[15]!==t.title?(h=I.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=h):h=e[16];const j=t.description||"No description";let f;e[17]!==j?(f=I.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j}),e[17]=j,e[18]=f):f=e[18];let x;e[19]!==f||e[20]!==h?(x=I.jsxs("div",{className:"flex flex-col gap-1",children:[h,f]}),e[19]=f,e[20]=h,e[21]=x):x=e[21];let C;e[22]!==r?(C=r&&I.jsx("div",{children:r}),e[22]=r,e[23]=C):C=e[23];let v;e[24]!==x||e[25]!==C||e[26]!==i?(v=I.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,x,C]}),e[24]=x,e[25]=C,e[26]=i,e[27]=v):v=e[27];let P;e[28]!==p?(P=p&&I.jsx("div",{className:"border-t border-border mt-auto",children:I.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:J,children:p})}),e[28]=p,e[29]=P):P=e[29];let b;e[30]!==v||e[31]!==P?(b=I.jsxs("div",{className:"flex flex-col flex-1",children:[v,P]}),e[30]=v,e[31]=P,e[32]=b):b=e[32];let R;return e[33]!==a||e[34]!==b||e[35]!==y?(R=I.jsx(V,{className:y,onClick:a,children:b}),e[33]=a,e[34]=b,e[35]=y,e[36]=R):R=e[36],R}function J(s){return s.stopPropagation()}function O(s){return s.stopPropagation()}export{de as C,fe as a,me as g,ue as u};
@@ -0,0 +1 @@
1
+ import{W as be,a3 as $e,b5 as De,X as me,a1 as Oe,c as R,b as H,j as t,k as ve,B,r as Z,m as Ne,F as te,x as ze,K as ae,d as se,av as ue,D as Me,b6 as Ee,E as Ue,f as Re,b7 as Ve,o as Fe,Z as Le,Y as Be,t as J,b8 as He}from"./index-DMSyZ1PC.js";import{g as qe}from"./extract-connection-data-DpPAxW37.js";import{E as Se}from"./empty-state-C86_b7IP.js";import{E as Qe,c as Xe,r as Ge,b as Ke,d as We}from"./connection-form-helpers-B3OfCtqO.js";import{c as Ye,S as Je,V as Ze}from"./index-dG1PkEhl.js";import{u as ye,T as et}from"./use-mcp-auth-status-CxzQOxft.js";import{u as tt}from"./use-members-B-802VrQ.js";import{A as st}from"./avatar-Cc14VL9E.js";import{a as Ce,b as _e,u as nt}from"./use-connection-Ck7fU3Z4.js";import{u as we}from"./use-mcp-client-Bi1l5K5b.js";import{a as it}from"./use-mcp-tools-A2pVmeDY.js";import{c as ot,C as at,a as lt,d as rt}from"./AreaChart-8TuFtZwM.js";import{i as ct,a as dt}from"./mcp-oauth-zippK-pA.js";import{I as le}from"./integration-icon-DxLbb9qy.js";import{s as mt}from"./Plus-CxvuE4Es.js";import{Q as ut,R as xt,az as pt,b as ft}from"./agent-icon-CCxdHfHq.js";import{a as ke,s as ht}from"./Settings02-C48BmakR.js";import{s as ce}from"./Trash01-CbEfRhj4.js";import{q as gt,p as jt,o as bt,m as vt,n as Nt}from"./sidebar-VwrbgopG.js";import{F as X,b as G,c as K,d as L,e as W,f as St,a as yt}from"./form-XFZrliJE.js";import{I as Y}from"./input-1RtsmTkF.js";import{u as Ct,D as _t}from"./use-delete-connection-B9tkmQ5M.js";import{c as wt,B as kt,a as It,C as Tt}from"./monitoring-stats-row-BtnXyvA-.js";import{u as At}from"./studio-tools-D3Jh1aS_.js";import{a as Pt}from"./use-virtual-mcp-B1_JZqx4.js";import{i as Ie}from"./ChevronRight-pKqWhPFO.js";import{a as Te}from"./Users03-Dxbbv3M0.js";import{b as ne,c as $t,T as ie,a as Dt}from"./tabs-bdhX5rhL.js";import{g as Ae}from"./connection-slug-eyAPH6o3.js";import{n as Ot}from"./ZapSquare-Bqk2MRuL.js";import{c as zt}from"./Tool01-ttrYDD-F.js";import{g as de,M as Mt}from"./index-CfhyBu5A.js";import{C as Et}from"./collection-search-BM5saw5W.js";import{C as Ut}from"./card-Bqgf0tZo.js";import{B as Rt}from"./badge-D9Myt67H.js";import{c as Vt,D as Ft,b as Lt,a as xe}from"./dropdown-menu-C7j_C2Iz.js";import{S as pe,a as fe,b as he,c as ge,d as Q}from"./select-BZ2uyFha.js";import{i as Bt}from"./CheckCircle-Dx2byA8l.js";import{t as Ht}from"./ChevronDown-C82kSPQJ.js";import{n as qt}from"./Tool02-1ZIphfq5.js";import{s as oe}from"./Star01-DbfqTNT0.js";import{s as Qt}from"./XClose-BLwV1Ngp.js";import"./index-CTu_OuGZ.js";import"./ZoomOut-Ce4wv8I3.js";import"./Key01-C-044wq-.js";import"./auth-C488ati9.js";import"./use-registry-connections-CFzxn-fx.js";import"./use-organization-settings-BtpD3U3D.js";import"./index-CTGvOy90.js";import"./popover-pMjGUykd.js";import"./tooltip-CJ5Y5366.js";import"./Check-BXZBH--f.js";import"./SearchMd-CVAS4bHb.js";import"./use-mobile-fV0eYRhU.js";import"./use-create-virtual-mcp-K5ESAvbN.js";import"./use-navigate-to-agent-D3lktxgi.js";import"./hooks-2lJrOuZm.js";import"./decopilot-sse-pool-XB4qOGfZ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Eye-D6UmvuQl.js";import"./use-org-auth-client-Byy_ag-z.js";import"./User01-DvoPZa3L.js";import"./AlertCircle-CWc3BvFb.js";import"./ArrowUp-Dqm6yb7b.js";import"./ArrowRight-DnZw9chb.js";import"./ArrowUpRight-a-xAV1yD.js";import"./TrendUp01-DAMS2ptH.js";import"./ChevronUp-Ur5tOU4r.js";import"./DotsVertical-CsPrfBHu.js";import"./Stars02-B1CYtkwJ.js";import"./Copy01-CjvNe041.js";import"./Globe01-bBcCao8m.js";import"./FilterLines-I4EBUx4y.js";import"./Globe04-BvAgykOe.js";import"./SwitchHorizontal01-DjC0A58U.js";import"./HardDrive-B1MltyIG.js";import"./Image01-CwV9iuxz.js";import"./LayoutLeft-B7XnXJCX.js";import"./XCircle-Bb4jhNm5.js";import"./LinkExternal01-Beo7SFkQ.js";import"./LogOut01-BbBoHzGS.js";import"./Monitor01-CNCx-B51.js";import"./Sun-CiZGxTK4.js";import"./Package-CidzBhtk.js";import"./Palette-DyqhX3Li.js";import"./Play-Bs1D_H9C.js";import"./SearchLg-D6bYV_e6.js";import"./Shield01-CpLEfQVx.js";import"./Stars01-DdKwQ9te.js";import"./Upload01-CtTjeXyd.js";import"./Users01-HKR3d_K9.js";import"./X-Dc8jzuGp.js";import"./Zap-KiDFkWg-.js";import"./label-CuycpzyK.js";import"./alert-dialog-3eCoJM_J.js";const Xt=be({scopes:Oe(me()).describe("List of scopes available"),stateSchema:$e(me(),De()).describe("JSON Schema (draft-07) defining the state structure")}),Gt=[{name:"MCP_CONFIGURATION",inputSchema:be({}),outputSchema:Xt}];function Kt(s){const e=R.c(61),{instance:n,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l}=s,o=H();let r;e[0]!==n.id?(r={connectionId:n.id},e[0]=n.id,e[1]=r):r=e[1];const m=ye(r),d=!(n.connection_type==="VIRTUAL")&&m.supportsOAuth&&!m.isAuthenticated,f=n.status!=="active",u=d||f?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==u?(h=Ne("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",u),e[2]=u,e[3]=h):h=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(le,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let N;e[7]!==n.title?(N=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=N):N=e[8];let S;e[9]!==n.status||e[10]!==f||e[11]!==d||e[12]!==o?(S=d?t.jsx("span",{className:"text-xs text-destructive font-medium",children:o("details.connectionInstancesPanel.needsAuthorization")}):f?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?o("details.connectionInstancesPanel.disabledError"):o("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=f,e[11]=d,e[12]=o,e[13]=S):S=e[13];let b;e[14]!==N||e[15]!==S?(b=t.jsxs("div",{className:"flex-1 min-w-0",children:[N,S]}),e[14]=N,e[15]=S,e[16]=b):b=e[16];let y;e[17]!==n||e[18]!==d||e[19]!==a||e[20]!==o?(y=d&&t.jsx(B,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>a(n),children:o("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=d,e[19]=a,e[20]=o,e[21]=y):y=e[21];let P;e[22]!==n||e[23]!==f||e[24]!==l||e[25]!==o?(P=f?t.jsxs(B,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>l(n,"active"),children:[t.jsx(ut,{size:13}),o("details.connectionInstancesPanel.enable")]}):t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>l(n,"inactive"),title:o("details.connectionInstancesPanel.disable"),"aria-label":o("details.connectionInstancesPanel.disable"),children:t.jsx(xt,{size:13})}),e[22]=n,e[23]=f,e[24]=l,e[25]=o,e[26]=P):P=e[26];let $;e[27]!==n||e[28]!==c?($=()=>c(n),e[27]=n,e[28]=c,e[29]=$):$=e[29];let _;e[30]!==o?(_=o("details.connectionInstancesPanel.configure"),e[30]=o,e[31]=_):_=e[31];let z;e[32]!==o?(z=o("details.connectionInstancesPanel.configure"),e[32]=o,e[33]=z):z=e[33];let T;e[34]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(ke,{size:13}),e[34]=T):T=e[34];let D;e[35]!==$||e[36]!==_||e[37]!==z?(D=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:$,title:_,"aria-label":z,children:T}),e[35]=$,e[36]=_,e[37]=z,e[38]=D):D=e[38];let I;e[39]!==n||e[40]!==i?(I=()=>i(n),e[39]=n,e[40]=i,e[41]=I):I=e[41];let v;e[42]!==o?(v=o("details.connectionInstancesPanel.delete"),e[42]=o,e[43]=v):v=e[43];let j;e[44]!==o?(j=o("details.connectionInstancesPanel.delete"),e[44]=o,e[45]=j):j=e[45];let E;e[46]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(ce,{size:13}),e[46]=E):E=e[46];let M;e[47]!==I||e[48]!==v||e[49]!==j?(M=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:I,title:v,"aria-label":j,children:E}),e[47]=I,e[48]=v,e[49]=j,e[50]=M):M=e[50];let k;e[51]!==D||e[52]!==M||e[53]!==y||e[54]!==P?(k=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[y,P,D,M]}),e[51]=D,e[52]=M,e[53]=y,e[54]=P,e[55]=k):k=e[55];let A;return e[56]!==k||e[57]!==h||e[58]!==g||e[59]!==b?(A=t.jsxs("div",{className:h,children:[g,b,k]}),e[56]=k,e[57]=h,e[58]=g,e[59]=b,e[60]=A):A=e[60],A}function Wt(s){const e=R.c(21),{instance:n,onConfigure:c}=s,a=H();let i;e[0]!==n.icon||e[1]!==n.title?(i=t.jsx(le,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=i):i=e[2];let l;e[3]!==n.title?(l=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=l):l=e[4];let o;e[5]!==n||e[6]!==c?(o=()=>c(n),e[5]=n,e[6]=c,e[7]=o):o=e[7];let r;e[8]!==a?(r=a("details.connectionInstancesPanel.configure"),e[8]=a,e[9]=r):r=e[9];let m;e[10]!==a?(m=a("details.connectionInstancesPanel.configure"),e[10]=a,e[11]=m):m=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(ke,{size:13}),e[12]=p):p=e[12];let d;e[13]!==o||e[14]!==r||e[15]!==m?(d=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:o,title:r,"aria-label":m,children:p})}),e[13]=o,e[14]=r,e[15]=m,e[16]=d):d=e[16];let f;return e[17]!==i||e[18]!==l||e[19]!==d?(f=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,l,d]}),e[17]=i,e[18]=l,e[19]=d,e[20]=f):f=e[20],f}function Yt(s){const e=R.c(33),{instances:n,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l,onAdd:o,isAdding:r}=s,m=H();if(n.length===0)return null;let p;e[0]!==n.length||e[1]!==m?(p=n.length===1?m("details.connectionInstancesPanel.instance"):m("details.connectionInstancesPanel.instances"),e[0]=n.length,e[1]=m,e[2]=p):p=e[2];let d;e[3]!==p?(d=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:p}),e[3]=p,e[4]=d):d=e[4];let f;e[5]!==r?(f=r?t.jsx(ve,{size:13,className:"animate-spin"}):t.jsx(mt,{size:13}),e[5]=r,e[6]=f):f=e[6];let u;e[7]!==m?(u=m("details.connectionInstancesPanel.addInstance"),e[7]=m,e[8]=u):u=e[8];let h;e[9]!==r||e[10]!==o||e[11]!==f||e[12]!==u?(h=t.jsxs(B,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:o,disabled:r,children:[f,u]}),e[9]=r,e[10]=o,e[11]=f,e[12]=u,e[13]=h):h=e[13];let g;e[14]!==d||e[15]!==h?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[d,h]}),e[14]=d,e[15]=h,e[16]=g):g=e[16];let N;if(e[17]!==n||e[18]!==a||e[19]!==c||e[20]!==i||e[21]!==l){let y;e[23]!==a||e[24]!==c||e[25]!==i||e[26]!==l?(y=P=>t.jsx(Z.Suspense,{fallback:t.jsx(Wt,{instance:P,onConfigure:c}),children:t.jsx(Kt,{instance:P,onConfigure:c,onAuthenticate:a,onDelete:i,onToggleStatus:l})},P.id),e[23]=a,e[24]=c,e[25]=i,e[26]=l,e[27]=y):y=e[27],N=n.map(y),e[17]=n,e[18]=a,e[19]=c,e[20]=i,e[21]=l,e[22]=N}else N=e[22];let S;e[28]!==N?(S=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:N}),e[28]=N,e[29]=S):S=e[29];let b;return e[30]!==g||e[31]!==S?(b=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[g,S]}),e[30]=g,e[31]=S,e[32]=b):b=e[32],b}function Jt(s,e=3){const n=new Map;for(const c of s){if(!c.isError)continue;const a=(c.errorMessage??"").trim()||"Unknown error";n.set(a,(n.get(a)??0)+1)}return[...n.entries()].map(([c,a])=>({message:c,count:a})).sort((c,a)=>a.count-c.count).slice(0,e)}const Zt=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function es(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const ts={calls:{label:"Tool calls"},errors:{label:"Errors"}};function ss(s){const e=R.c(4),{connectionId:n,orgId:c,timeframe:a}=s,i=H(),l=At(),o=es(a),{data:r}=ze({queryKey:ae.connectionActivity(n,a,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),m=wt(r?.logs??[],o),p=m.data,d=m.totalCalls>0,f=Jt(r?.logs??[]),u=m.totalCalls>0?Math.round(m.totalErrors/m.totalCalls*100):0;let h;e[0]!==i?(h=i("details.connectionActivity.toolCalls"),e[0]=i,e[1]=h):h=e[1];let g;return e[2]!==h?(g=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:h}),e[2]=h,e[3]=g):g=e[3],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:m.totalCalls.toLocaleString()}),g]}),m.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:m.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.errors")})]}),m.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(m.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.avgLatency")})]})]}),d?t.jsxs("div",{children:[t.jsx(ot,{config:ts,className:"h-16 w-full",children:t.jsxs(kt,{data:p,barCategoryGap:"4%",children:[t.jsx(at,{content:t.jsx(lt,{labelFormatter:os}),cursor:{fill:"var(--muted)"}}),t.jsx(It,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:p.map(is)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:p[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:p[p.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:i("details.connectionActivity.noActivityInThisPeriod")})}),f.length>0&&t.jsxs("div",{className:"px-5 py-4 border-t border-border",children:[t.jsxs("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:[i("details.connectionActivity.topErrors"),u>0?` · ${i("details.connectionActivity.errorRatePercentage",{errorRate:u.toString()})}`:""]}),t.jsx("ul",{className:"space-y-1.5",children:f.map(ns)})]})]})}function ns(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function is(s,e){return t.jsx(Tt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function os(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function as(){const s=R.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function ls(s){const e=R.c(19),{connectionId:n}=s,c=H(),[a,i]=Z.useState("14d"),{org:l}=te();let o;e[0]!==c?(o=c("details.connectionActivity.activity"),e[0]=c,e[1]=o):o=e[1];let r;e[2]!==o?(r=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o})}),e[2]=o,e[3]=r):r=e[3];let m;e[4]!==a?(m=Zt.map(g=>t.jsx("button",{type:"button",onClick:()=>i(g.value),className:Ne("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",a===g.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:g.label},g.value)),e[4]=a,e[5]=m):m=e[5];let p;e[6]!==m?(p=t.jsx("div",{className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:m}),e[6]=m,e[7]=p):p=e[7];let d;e[8]!==r||e[9]!==p?(d=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[r,p]}),e[8]=r,e[9]=p,e[10]=d):d=e[10];let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(as,{}),e[11]=f):f=e[11];let u;e[12]!==n||e[13]!==l.id||e[14]!==a?(u=t.jsx(Z.Suspense,{fallback:f,children:t.jsx(ss,{connectionId:n,orgId:l.id,timeframe:a})}),e[12]=n,e[13]=l.id,e[14]=a,e[15]=u):u=e[15];let h;return e[16]!==d||e[17]!==u?(h=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[d,u]}),e[16]=d,e[17]=u,e[18]=h):h=e[18],h}function rs(s){const e=R.c(15),{virtualMcp:n,org:c}=s,a=se();let i;e[0]!==a||e[1]!==c||e[2]!==n.id?(i=()=>{const d=crypto.randomUUID();a({to:"/$org/$taskId",params:{org:c,taskId:d},search:{virtualmcpid:n.id}})},e[0]=a,e[1]=c,e[2]=n.id,e[3]=i):i=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Te,{size:16}),e[4]=l):l=e[4];let o;e[5]!==n.icon||e[6]!==n.title?(o=t.jsx(le,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:l}),e[5]=n.icon,e[6]=n.title,e[7]=o):o=e[7];let r;e[8]!==n.title?(r=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=r):r=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(Ie,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=m):m=e[10];let p;return e[11]!==i||e[12]!==o||e[13]!==r?(p=t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[o,r,m]}),e[11]=i,e[12]=o,e[13]=r,e[14]=p):p=e[14],p}function cs(s){const e=R.c(7),{virtualMcps:n,org:c}=s;let a;if(e[0]!==c||e[1]!==n){let l;e[3]!==c?(l=o=>t.jsx(rs,{virtualMcp:o,org:c},o.id),e[3]=c,e[4]=l):l=e[4],a=n.map(l),e[0]=c,e[1]=n,e[2]=a}else a=e[2];let i;return e[5]!==a?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:a})}),e[5]=a,e[6]=i):i=e[6],i}function ds(s){const e=R.c(7),{connection:n}=s,{org:c}=te();let a;e[0]!==n.id?(a={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=a):a=e[1];const i=Pt(a);if(!(i.length>0)){let m;return e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(t.Fragment,{}),e[2]=m):m=e[2],m}let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:"Used by agents"})}),e[3]=o):o=e[3];let r;return e[4]!==c.slug||e[5]!==i?(r=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[o,t.jsx("div",{className:"px-5 py-4",children:t.jsx(cs,{virtualMcps:i,org:c.slug})})]}),e[4]=c.slug,e[5]=i,e[6]=r):r=e[6],r}function ms(s){const e=R.c(35),{tools:n,connectionId:c,org:a}=s,i=H(),l=se(),{org:o}=te();let r;e[0]!==c||e[1]!==o.id||e[2]!==o.slug?(r={connectionId:c,orgId:o.id,orgSlug:o.slug},e[0]=c,e[1]=o.id,e[2]=o.slug,e[3]=r):r=e[3];const m=we(r),p=Ce(c);let d;e[4]!==p||e[5]!==c?(d=p?Ae(p):c,e[4]=p,e[5]=c,e[6]=d):d=e[6];const f=d,[u,h]=Z.useState("");let g,N,S,b;if(e[7]!==f||e[8]!==m||e[9]!==l||e[10]!==a||e[11]!==u||e[12]!==i||e[13]!==n){const $=(n??[]).filter(us),_=u.toLowerCase().trim(),z=_?$.filter(j=>j.name.toLowerCase().includes(_)||j.description&&j.description.toLowerCase().includes(_)):$;let T;e[18]!==f||e[19]!==l||e[20]!==a?(T=j=>{l({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:a,appSlug:f,collectionName:"tools",itemId:encodeURIComponent(j.name)}})},e[18]=f,e[19]=l,e[20]=a,e[21]=T):T=e[21];const D=T;S="flex flex-col h-full overflow-hidden";let I;e[22]!==i?(I=i("details.connectionUiTab.searchAppsPlaceholder"),e[22]=i,e[23]=I):I=e[23];let v;e[24]===Symbol.for("react.memo_cache_sentinel")?(v=j=>{j.key==="Escape"&&(h(""),j.target.blur())},e[24]=v):v=e[24],e[25]!==u||e[26]!==I?(b=t.jsx(Et,{value:u,onChange:h,placeholder:I,onKeyDown:v}),e[25]=u,e[26]=I,e[27]=b):b=e[27],g="flex-1 overflow-auto p-5",N=z.length===0?t.jsx(Se,{image:null,title:i(u?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(u?"details.connectionUiTab.adjustSearchTerms":"details.connectionUiTab.noInteractiveUis")}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:z.map(j=>{const E=de(j._meta);return t.jsxs(Ut,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>D(j),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Mt,{resourceURI:E,toolInfo:{tool:j},displayMode:"inline",minHeight:200,maxHeight:200,client:m})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:j.name}),t.jsx(et,{annotations:j.annotations,_meta:j._meta})]}),j.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j.description})]})]},j.name)})}),e[7]=f,e[8]=m,e[9]=l,e[10]=a,e[11]=u,e[12]=i,e[13]=n,e[14]=g,e[15]=N,e[16]=S,e[17]=b}else g=e[14],N=e[15],S=e[16],b=e[17];let y;e[28]!==g||e[29]!==N?(y=t.jsx("div",{className:g,children:N}),e[28]=g,e[29]=N,e[30]=y):y=e[30];let P;return e[31]!==S||e[32]!==b||e[33]!==y?(P=t.jsxs("div",{className:S,children:[b,y]}),e[31]=S,e[32]=b,e[33]=y,e[34]=P):P=e[34],P}function us(s){return!!de(s._meta)}function Pe(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=l=>l.charAt(0).toUpperCase()+l.slice(1),c=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),a=e.map(n),i=e[e.length-1];return a.length>=2&&i&&c.has(i)?[a.pop(),...a].join(" "):a.join(" ")}function re(s){const e=R.c(5),{label:n}=s,c=H();let a;e[0]!==n||e[1]!==c?(a=c("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=c,e[2]=a):a=e[2];let i;return e[3]!==a?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:a})}),e[3]=a,e[4]=i):i=e[4],i}function xs(s){const e=R.c(72),{tools:n,prompts:c,resources:a,connectionId:i,org:l}=s;let o;e[0]!==c?(o=c===void 0?[]:c,e[0]=c,e[1]=o):o=e[1];const r=o;let m;e[2]!==a?(m=a===void 0?[]:a,e[2]=a,e[3]=m):m=e[3];const p=m,d=H(),f=se(),u=Ce(i??"");let h;e[4]!==u||e[5]!==i?(h=u?Ae(u):i,e[4]=u,e[5]=i,e[6]=h):h=e[6];const g=h;let N;e[7]!==g||e[8]!==i||e[9]!==f||e[10]!==l?(N=function(V){!i||!l||f({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:g,collectionName:"tools",itemId:encodeURIComponent(V)}})},e[7]=g,e[8]=i,e[9]=f,e[10]=l,e[11]=N):N=e[11];const S=N;let b;e[12]!==i||e[13]!==l||e[14]!==n?(b=i&&l&&n.some(hs),e[12]=i,e[13]=l,e[14]=n,e[15]=b):b=e[15];const y=b;if(n.length+r.length+p.length===0){let C;e[16]!==d?(C=d("details.connectionCapabilities.capabilities"),e[16]=d,e[17]=C):C=e[17];let V;e[18]!==C?(V=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:C}),e[18]=C,e[19]=V):V=e[19];let q;e[20]!==d?(q=d("details.connectionCapabilities.noCapabilitiesDiscovered"),e[20]=d,e[21]=q):q=e[21];let F;e[22]!==q?(F=t.jsx("p",{className:"text-sm text-muted-foreground",children:q}),e[22]=q,e[23]=F):F=e[23];let ee;return e[24]!==F||e[25]!==V?(ee=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[V,F]}),e[24]=F,e[25]=V,e[26]=ee):ee=e[26],ee}let $;e[27]!==d||e[28]!==n.length?($=d("details.connectionCapabilities.toolsTab",{count:n.length}),e[27]=d,e[28]=n.length,e[29]=$):$=e[29];let _;e[30]!==$?(_=t.jsx(ne,{value:"tools",variant:"underline",children:$}),e[30]=$,e[31]=_):_=e[31];let z;e[32]!==y||e[33]!==d?(z=y&&t.jsx(ne,{value:"apps",variant:"underline",children:d("details.connectionCapabilities.uiTab")}),e[32]=y,e[33]=d,e[34]=z):z=e[34];let T;e[35]!==d?(T=d("details.connectionCapabilities.promptsTab"),e[35]=d,e[36]=T):T=e[36];let D;e[37]!==T?(D=t.jsx(ne,{value:"prompts",variant:"underline",children:T}),e[37]=T,e[38]=D):D=e[38];let I;e[39]!==d?(I=d("details.connectionCapabilities.resourcesTab"),e[39]=d,e[40]=I):I=e[40];let v;e[41]!==I?(v=t.jsx(ne,{value:"resources",variant:"underline",children:I}),e[41]=I,e[42]=v):v=e[42];let j;e[43]!==z||e[44]!==D||e[45]!==v||e[46]!==_?(j=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs($t,{variant:"underline",className:"gap-1",children:[_,z,D,v]})}),e[43]=z,e[44]=D,e[45]=v,e[46]=_,e[47]=j):j=e[47];let E;e[48]!==S||e[49]!==n?(E=n.length>0?n.map(C=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>S(C.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(zt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Pe(C.name)}),C.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:C.description})]}),t.jsx(Ie,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},C.name)):t.jsx(re,{label:"tools"}),e[48]=S,e[49]=n,e[50]=E):E=e[50];let M;e[51]!==E?(M=t.jsx(ie,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:E})}),e[51]=E,e[52]=M):M=e[52];let k;e[53]!==i||e[54]!==y||e[55]!==l||e[56]!==n?(k=y&&t.jsx(ie,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ms,{tools:n,connectionId:i,org:l})}),e[53]=i,e[54]=y,e[55]=l,e[56]=n,e[57]=k):k=e[57];let A;e[58]!==r?(A=r.length>0?r.map(fs):t.jsx(re,{label:"prompts"}),e[58]=r,e[59]=A):A=e[59];let U;e[60]!==A?(U=t.jsx(ie,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:A})}),e[60]=A,e[61]=U):U=e[61];let x;e[62]!==p?(x=p.length>0?p.map(ps):t.jsx(re,{label:"resources"}),e[62]=p,e[63]=x):x=e[63];let w;e[64]!==x?(w=t.jsx(ie,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:x})}),e[64]=x,e[65]=w):w=e[65];let O;return e[66]!==j||e[67]!==M||e[68]!==k||e[69]!==U||e[70]!==w?(O=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(Dt,{defaultValue:"tools",variant:"underline",children:[j,M,k,U,w]})}),e[66]=j,e[67]=M,e[68]=k,e[69]=U,e[70]=w,e[71]=O):O=e[71],O}function ps(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(pt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function fs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Ot,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Pe(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function hs(s){return de(s._meta)}function gs(s){const e=R.c(13),{connection:n,displayTitle:c}=s,a=c??n.title;let i;e[0]!==n.icon||e[1]!==a?(i=t.jsx(le,{icon:n.icon,name:a,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=a,e[2]=i):i=e[2];let l;e[3]!==a?(l=t.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold tracking-tight text-foreground leading-none",children:a})}),e[3]=a,e[4]=l):l=e[4];let o;e[5]!==n.description?(o=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=o):o=e[6];let r;e[7]!==l||e[8]!==o?(r=t.jsxs("div",{className:"flex-1 min-w-0",children:[l,o]}),e[7]=l,e[8]=o,e[9]=r):r=e[9];let m;return e[10]!==i||e[11]!==r?(m=t.jsxs("div",{className:"flex items-center gap-4 md:gap-6 py-5 md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0",children:[i,r]}),e[10]=i,e[11]=r,e[12]=m):m=e[12],m}function js({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:a}){const i=H(),l=ue({control:s.control,name:"ui_type"}),o=ue({control:s.control,name:"connection_url"}),{stdioEnabled:r}=Me(),m=(()=>{if(typeof o!="string"||!o)return!1;try{const u=new URL(o);return u.hostname==="api.githubcopilot.com"&&u.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),p=r||e.connection_type==="STDIO",d=e.connection_type==="VIRTUAL",f=d?Ee(e.connection_url):null;return d?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.type")}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(Te,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:i("details.connectionSidebar.virtualMcp")})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.virtualMcpDescription")})]}),f&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.virtualMcpId")}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:f})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(X,{control:s.control,name:"ui_type",render:({field:u})=>t.jsxs(G,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.connection")}),l!=="NPX"&&l!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(pe,{value:u.value,onValueChange:u.onChange,children:[t.jsx(L,{children:t.jsxs(fe,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(oe,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(he,{})]})}),t.jsxs(ge,{children:[t.jsx(Q,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(Q,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(Q,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),p&&t.jsxs(t.Fragment,{children:[t.jsx(Q,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(Q,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(X,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(G,{className:"flex-1 min-w-0",children:t.jsx(L,{children:t.jsx(Y,{placeholder:i("details.connectionSidebar.urlPlaceholder"),...h,value:h.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(pe,{value:u.value,onValueChange:u.onChange,children:[t.jsx(L,{children:t.jsx(fe,{className:"h-10",children:t.jsx(he,{})})}),t.jsxs(ge,{children:[t.jsx(Q,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(oe,{className:"w-4 h-4"}),i("details.connectionSidebar.http")]})}),t.jsx(Q,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(oe,{className:"w-4 h-4"}),i("details.connectionSidebar.sse")]})}),t.jsx(Q,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(oe,{className:"w-4 h-4"}),i("details.connectionSidebar.websocket")]})}),p&&t.jsxs(t.Fragment,{children:[t.jsx(Q,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(qt,{className:"w-4 h-4"}),i("details.connectionSidebar.npxPackage")]})}),t.jsx(Q,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ft,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(W,{})]})}),l==="NPX"&&t.jsx(X,{control:s.control,name:"npx_package",render:({field:u})=>t.jsxs(G,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.npmPackage")}),t.jsx(L,{children:t.jsx(Y,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})}),l==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(X,{control:s.control,name:"stdio_command",render:({field:u})=>t.jsxs(G,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.command")}),t.jsx(L,{children:t.jsx(Y,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})}),t.jsx(X,{control:s.control,name:"stdio_args",render:({field:u})=>t.jsxs(G,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.arguments")}),t.jsx(L,{children:t.jsx(Y,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.spaceSeparatedArguments")}),t.jsx(W,{})]})})]}),t.jsx(X,{control:s.control,name:"stdio_cwd",render:({field:u})=>t.jsxs(G,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.workingDirectory")}),t.jsx(L,{children:t.jsx(Y,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(W,{})]})})]}),(l==="NPX"||l==="STDIO")&&t.jsx(X,{control:s.control,name:"env_vars",render:({field:u})=>t.jsxs(G,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.environmentVariables")}),t.jsx(L,{children:t.jsx(Qe,{value:u.value??[],onChange:u.onChange})}),t.jsx(W,{})]})}),l!=="NPX"&&l!=="STDIO"&&t.jsx(X,{control:s.control,name:"connection_token",render:({field:u})=>t.jsxs(G,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i(m?"details.connectionSidebar.githubPersonalAccessToken":"details.connectionSidebar.token")}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Vt,{children:[t.jsx(Ft,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Rt,{variant:"success",className:"gap-1.5",children:[t.jsx(Bt,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Ht,{size:12})]})})}),t.jsxs(Lt,{align:"start",children:[t.jsxs(xe,{onClick:c,children:[t.jsx(ht,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(xe,{variant:"destructive",onClick:a,children:[t.jsx(ce,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.connection_token&&u.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>u.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:i("details.connectionSidebar.clearAndReplaceToken"),"aria-label":i("details.connectionSidebar.clearAndReplaceToken"),children:t.jsx(Qt,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(L,{children:t.jsx(Y,{type:"password",placeholder:i(m?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),m&&t.jsxs(St,{children:[i("details.connectionSidebar.createAPatAt")," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(W,{})]})})]})}function bs(s){return s.command==="npx"}function vs(s){return s.args?.find(e=>!e.startsWith("-"))??""}function Ns(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function je(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&He(s.connection_headers)){const c=s.connection_headers,a=Ge(c.envVars);if(bs(c)){const l=vs(c);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:l,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:a}}const i=Ns(c);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:i.command,stdio_args:i.args,stdio_cwd:i.cwd,env_vars:a}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function Ss(s){let e,n=null,c=null,a=null;return s.ui_type==="NPX"?(e="STDIO",n="",a=Ke(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",a=We(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",c=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...c&&{connection_token:c},...a&&{connection_headers:a},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function ys({connection:s,connectionId:e,org:n,isUpdating:c,tools:a,prompts:i,resources:l,siblings:o}){const r=H(),m=se({from:"/$org/settings/connections/$appSlug"}),p=Fe(),d=_e(),{org:f}=te(),u=Ct({onSuccess:()=>{o.length<=1&&m({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=Z.useState(null),[N,S]=Z.useState(!1),b=ye({connectionId:e}),{data:y}=tt(),P=y?.data?.members??[],$=h??s,_=P.find(x=>x.userId===$.created_by),T=s?.connection_type==="VIRTUAL"||b.isAuthenticated,D={...s,tools:a},I=Ye(D,Gt),v=Le({resolver:Be(Xe),values:je(h??s)}),j=v.formState.isDirty,E=async()=>{if(!await v.trigger())return;const w=v.getValues(),O=Ss(w),C=h?.id??e;await d.update.mutateAsync({id:C,data:O}),v.reset(w)},M=()=>{v.reset(je(h??s))},k=async x=>{const w=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:O,tokenInfo:C,error:V}=await dt({connectionId:x,orgSlug:f.slug,...w?{scope:w}:{}});if(V||!O){J.error(r("details.connection.authFailed",{error:V??""}));return}if(C)try{const F=await fetch(`/api/${f.slug}/connections/${x}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:C.accessToken,refreshToken:C.refreshToken,expiresIn:C.expiresIn,scope:C.scope,clientId:C.clientId,clientSecret:C.clientSecret,tokenEndpoint:C.tokenEndpoint})});if(!F.ok)console.error("Failed to save OAuth token:",await F.text()),await d.update.mutateAsync({id:x,data:{connection_token:O}});else try{await d.update.mutateAsync({id:x,data:{}})}catch(ee){console.warn("Failed to refresh connection tools after OAuth:",ee)}}catch(F){console.error("Error saving OAuth token:",F),await d.update.mutateAsync({id:x,data:{connection_token:O}})}else await d.update.mutateAsync({id:x,data:{connection_token:O}});const q=new URL(`/api/${f.slug}/mcp/${x}`,window.location.origin);await p.invalidateQueries({queryKey:ae.isMCPAuthenticated(q.href,null)}),await p.invalidateQueries({queryKey:ae.mcpClientPrefix()}),J.success(r("details.connection.authSuccess"))},A=()=>k(s.id),U=async()=>{try{const x=await fetch(`/api/${f.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!x.ok){const O=await x.text();J.error(r("details.connection.failedRemoveOAuth",{error:O}));return}const w=new URL(`/api/${f.slug}/mcp/${s.id}`,window.location.origin);await p.invalidateQueries({queryKey:ae.isMCPAuthenticated(w.href,null)}),J.success(r("details.connection.oauthRemoved"))}catch(x){console.error("Error removing OAuth token:",x),J.error(r("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(_t,{...u}),t.jsx(gt,{open:h!==null,onOpenChange:x=>{x||g(null)},children:t.jsxs(jt,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(bt,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(vt,{className:"text-base",children:h?.title??s.title}),t.jsx(Nt,{className:"text-xs",children:r("details.connection.settingsDescription")}),_&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:r("details.connection.connectedBy")}),t.jsx(st,{url:_.user?.image??void 0,fallback:_.user?.name??_.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:_.user?.name||_.user?.email})]})]}),t.jsxs(yt,{...v,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(X,{control:v.control,name:"title",render:({field:x})=>t.jsxs(G,{children:[t.jsx(K,{children:r("details.connection.nameLabel")}),t.jsx(L,{children:t.jsx(Y,{...x})}),t.jsx(W,{})]})}),t.jsx(X,{control:v.control,name:"description",render:({field:x})=>t.jsxs(G,{children:[t.jsx(K,{children:r("details.connection.descriptionLabel")}),t.jsx(L,{children:t.jsx(Y,{...x,value:x.value||""})}),t.jsx(W,{})]})})]}),t.jsx(js,{form:v,connection:h??s,hasOAuthToken:b.hasOAuthToken,onReauthenticate:A,onRemoveOAuth:U}),t.jsx(Je,{connection:h??s,form:v,hasMcpBinding:I,isMCPAuthenticated:T,supportsOAuth:b.supportsOAuth,isServerError:b.isServerError,onAuthenticate:A,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(B,{onClick:E,disabled:!j||c,className:"flex-1",children:r(c?"details.connection.savingButton":"details.connection.saveButton")}),j&&t.jsx(B,{variant:"outline",onClick:M,children:r("details.connection.undoButton")}),t.jsxs(B,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const x=h??s;g(null),u.requestDelete(x)},children:[t.jsx(ce,{size:15}),r("details.connection.deleteButton")]})]})]},h?.id??s.id)]})}),t.jsx(Ze,{hideHeader:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(gs,{connection:s,displayTitle:(()=>{const x=o[0]??s;return x.app_name?x.title.replace(/\s*\(\d+\)\s*$/,""):x.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(ls,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Yt,{instances:o,onConfigure:x=>g(x),onAuthenticate:x=>k(x.id),onDelete:x=>u.requestDelete(x),onToggleStatus:async(x,w)=>{try{await d.update.mutateAsync({id:x.id,data:{status:w}}),J.success(r(w==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{J.error(r("details.connection.failedUpdateConnection"))}},isAdding:N,onAdd:async()=>{S(!0);try{const x=o[0]??s,w=x.title.replace(/\s*\(\d+\)\s*$/,""),O=o.length+1,C=`${w} (${O})`,V=qe("conn");await d.create.mutateAsync({id:V,title:C,description:x.description??null,connection_type:x.connection_type,connection_url:x.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:x.created_by,organization_id:x.organization_id,icon:x.icon??null,app_name:x.app_name??null,app_id:x.app_id??null,connection_headers:x.connection_headers??null,oauth_config:null,configuration_state:x.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const q=new URL(`/api/${f.slug}/mcp/${V}`,window.location.origin),F=await ct({url:q.href,token:null,orgId:f.id});F.supportsOAuth&&!F.isAuthenticated&&await k(V)}finally{S(!1)}}}),t.jsx(ds,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(xs,{tools:a,prompts:i,resources:l,connectionId:e,org:n})})]})})]})})]})}function Cs(){const s=R.c(52),e=H();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/$org/settings/connections/$appSlug"},s[0]=n):n=s[0];const c=se(n);let a;s[1]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/shell/$org/settings/connections/$appSlug"},s[1]=a):a=s[1];const{appSlug:i,org:l}=Re(a),{org:o}=te(),r=_e();let m;s[2]!==i?(m={slug:i},s[2]=i,s[3]=m):m=s[3];const p=nt(m),d=p[0]??null,f=d?.id??"",u=f||null;let h;s[4]!==o.id||s[5]!==o.slug||s[6]!==u?(h={connectionId:u,orgId:o.id,orgSlug:o.slug},s[4]=o.id,s[5]=o.slug,s[6]=u,s[7]=h):h=s[7];const g=we(h);let N;s[8]!==g?(N={client:g},s[8]=g,s[9]=N):N=s[9];const{data:S}=it(N);let b;if(s[10]!==d?.tools||s[11]!==f||s[12]!==p||s[13]!==S){const k=S?S.tools.map(As):(d?.tools??[]).map(Ts);e:{if(p.length<=1){b=k;break e}const A=new Set,U=[],x=ks;for(const w of p){const O=w.id===f?k:x(w.tools);for(const C of O)A.has(C.name)||(A.add(C.name),U.push(C))}b=U.length>0?U:k}s[10]=d?.tools,s[11]=f,s[12]=p,s[13]=S,s[14]=b}else b=s[14];const y=b;let P;s[15]!==g?(P={client:g},s[15]=g,s[16]=P):P=s[16];const{data:$}=rt(P);let _;s[17]!==g?(_={client:g},s[17]=g,s[18]=_):_=s[18];const{data:z}=Ve(_);let T;s[19]!==$?.prompts?(T=$?.prompts??[],s[19]=$?.prompts,s[20]=T):T=s[20];let D;s[21]!==T?(D=T.map(ws),s[21]=T,s[22]=D):D=s[22];const I=D;let v;s[23]!==z?.resources?(v=z?.resources??[],s[23]=z?.resources,s[24]=v):v=s[24];let j;s[25]!==v?(j=v.map(_s),s[25]=v,s[26]=j):j=s[26];const E=j;if(!d){let k;s[27]!==e?(k=e("details.connection.notFoundTitle"),s[27]=e,s[28]=k):k=s[28];let A;s[29]!==e?(A=e("details.connection.notFoundDescription"),s[29]=e,s[30]=A):A=s[30];let U;s[31]!==c||s[32]!==l?(U=()=>c({to:"/$org/settings/connections",params:{org:l}}),s[31]=c,s[32]=l,s[33]=U):U=s[33];let x;s[34]!==e?(x=e("details.connection.backButton"),s[34]=e,s[35]=x):x=s[35];let w;s[36]!==U||s[37]!==x?(w=t.jsx(B,{variant:"outline",onClick:U,children:x}),s[36]=U,s[37]=x,s[38]=w):w=s[38];let O;return s[39]!==k||s[40]!==A||s[41]!==w?(O=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Se,{title:k,description:A,actions:w})}),s[39]=k,s[40]=A,s[41]=w,s[42]=O):O=s[42],O}let M;return s[43]!==r.update.isPending||s[44]!==y||s[45]!==d||s[46]!==f||s[47]!==l||s[48]!==I||s[49]!==E||s[50]!==p?(M=t.jsx(ys,{org:l,connection:d,connectionId:f,isUpdating:r.update.isPending,tools:y,prompts:I,resources:E,siblings:p}),s[43]=r.update.isPending,s[44]=y,s[45]=d,s[46]=f,s[47]=l,s[48]=I,s[49]=E,s[50]=p,s[51]=M):M=s[51],M}function _s(s){return{name:s.name,description:s.description,uri:s.uri}}function ws(s){return{name:s.name,description:s.description}}function ks(s){return(s??[]).map(Is)}function Is(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ts(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function As(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ps(){const s=R.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ue,{children:t.jsx(Z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(ve,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Cs,{})})}),s[0]=e):e=s[0],e}function Si(){const s=R.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ps,{}),s[0]=e):e=s[0],e}export{Si as default};