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 +0,0 @@
1
- import{r as K,c as re,b as le,j as t,B as X,k as ge,q as ce,m as xe,E as Ye,F as De,d as Ne,u as Je,a as ke,D as Ze,I as et,G as tt,Z as nt,Y as st,o as ot,t as Q,K as it}from"./index-osUKgSS7.js";import{a as Te,b as ct,g as rt,e as lt}from"./extract-connection-data-DlEzKLiw.js";import{C as at}from"./collection-display-button-C-NfOkHF.js";import{S as dt}from"./search-input-BkUwKS2D.js";import{C as ut}from"./collection-tabs-D6ZdND0h.js";import{C as ve,u as mt,a as Ae,g as gt}from"./connection-card-CNK047a0.js";import{E as pt}from"./empty-state-CId3svrh.js";import{P as pe}from"./index-BDS4mH87.js";import{u as ft,D as ht}from"./use-delete-connection-6zXECMpi.js";import{u as Ce}from"./use-capability-BqKrdQX0.js";import{u as xt}from"./use-infinite-scroll-C_PDhy7Y.js";import{u as jt}from"./use-view-mode-B_tIKVK9.js";import{g as he}from"./connection-slug-eyAPH6o3.js";import{c as we,d as Ie,b as Pe,f as Le,g as Oe,e as Fe,a as Me,A as $e}from"./alert-dialog-CyxTQtK2.js";import{n as je}from"./Tool02-Dgp6-KLz.js";import{b as Ue,h as Ve,a as ze,c as Ee,d as Be,e as Ke}from"./dialog-EQ_Nu1nb.js";import{D as yt,a as St,c as Ct,b as vt,d as bt,e as _t,f as Dt}from"./drawer-BtIHYjMs.js";import{u as Nt}from"./use-mobile-BpGP7t1t.js";import{F as te,b as ne,c as se,d as oe,e as ie,a as be}from"./form-BaVTHbUM.js";import{I as ae}from"./input-D1Gv8_NL.js";import{S as kt,a as Tt,b as At,c as wt,d as me}from"./select-CW6UAgqk.js";import{T as It}from"./textarea-DJa_iznS.js";import{b as He,u as Pt}from"./use-connection-BFgjYMCx.js";import{a as Lt}from"./use-virtual-mcp-BNYMyb4m.js";import{u as Ot}from"./studio-tools-C5M-8IB_.js";import{s as Se}from"./Star01-DJspHAU-.js";import{s as Re}from"./Plus-Cht7lL4D.js";import{ay as Ft,R as Mt,Q as $t,b as Ut}from"./agent-icon-d2jw6ps1.js";import{s as We}from"./XClose-D26wD9_Q.js";import{i as fe,a as _e,E as Vt,c as zt,p as Et,b as Bt,d as Kt}from"./connection-form-helpers-Bu-giKug.js";import{a as Ht}from"./authenticate-and-persist-oauth-CCSTyrRC.js";import{I as Rt}from"./integration-icon-CZMpVL1E.js";import{C as Xe}from"./checkbox-DaD8kLui.js";import{a as de,D as Wt,c as Xt,b as Gt}from"./dropdown-menu-Du_BmHui.js";import{a as qt}from"./DotsVertical-DSmQb07B.js";import{s as Ge}from"./Eye-BYEbwinV.js";import{s as qe}from"./Trash01-DQk8SKeW.js";import"./use-mcp-client-DCcQbeST.js";import"./auth-CshA0DLa.js";import"./ArrowUp-84PrwJl7.js";import"./Check-D39cW1EC.js";import"./SwitchHorizontal01-DKZ8Ars7.js";import"./tooltip-CeBtAc-Q.js";import"./view-mode-toggle-8iS5ijBu.js";import"./badge-BnUjJn2C.js";import"./SearchMd-Bxv7C6ib.js";import"./use-registry-connections-CiQeT9S9.js";import"./use-organization-settings-BalIiDFK.js";import"./useInfiniteQuery-BLsai4DH.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./card-DidS0F8g.js";import"./sidebar-Df7FAyMJ.js";import"./LayoutLeft-CdBrffSJ.js";import"./X-CeuyThrh.js";import"./label-C6LQRjqo.js";import"./ChevronDown-Dxdrzb03.js";import"./ChevronUp-CorFhFXr.js";import"./AlertCircle-C1710OBb.js";import"./Tool01-BzMShFGo.js";import"./Settings02-CqbXJDf7.js";import"./ArrowRight-Cpx1Lebk.js";import"./ArrowUpRight-B3GPW-_w.js";import"./TrendUp01-Dz5gzrTN.js";import"./ZapSquare-BHPZ3Jvr.js";import"./ZoomOut-Dzo8MaxJ.js";import"./Users03-DiELMSun.js";import"./CheckCircle-Yz1eDu6Z.js";import"./ChevronRight-DD-OjvGf.js";import"./Stars02-8nmeIDYy.js";import"./Copy01-DggHPLxu.js";import"./Globe01-CmsCC8zN.js";import"./FilterLines-BC5HBNi1.js";import"./Globe04-Cidz_2od.js";import"./HardDrive-DSsiIG4q.js";import"./Image01-CTEGxjN6.js";import"./Key01-C-zj_nZY.js";import"./XCircle-DcmvhxNa.js";import"./LinkExternal01-WuLv33QG.js";import"./Monitor01-CIfeipNC.js";import"./Sun-CYtT9w41.js";import"./Package-BJ248Tbr.js";import"./Palette-D-jexNuW.js";import"./Play-DeSndEh-.js";import"./SearchLg-CkwIt1df.js";import"./Shield01-Bvbq_wVy.js";import"./Stars01-Cc9iJO8V.js";import"./Upload01-CSTbHDB3.js";import"./User01-JZByJh_c.js";import"./Users01-EWDKaBW5.js";import"./Zap-DC8YgF5a.js";import"./mcp-oauth-CExdgV58.js";function Qt(s){const e=`deco-filters-${s}`,[n,g]=K.useState(()=>{try{const c=globalThis.localStorage?.getItem(e);if(c)return JSON.parse(c)}catch(c){console.error("Failed to parse stored filters:",c)}return[]});return[n,c=>{g(c);try{globalThis.localStorage?.setItem(e,JSON.stringify(c))}catch(o){console.error("Failed to save filters:",o)}}]}function Yt(s){const e=re.c(7),[n,g]=K.useState(s),[l,c]=K.useState(s?"desc":null);let o;e[0]!==l||e[1]!==n?(o=a=>{n!==a?(g(a),c("asc")):l==="asc"?c("desc"):l==="desc"&&(g(void 0),c(null))},e[0]=l,e[1]=n,e[2]=o):o=e[2];const r=o;let d;return e[3]!==r||e[4]!==l||e[5]!==n?(d={sortKey:n,sortDirection:l,handleSort:r},e[3]=r,e[4]=l,e[5]=n,e[6]=d):d=e[6],d}function Jt(s){const e=re.c(20),{namespace:n,resource:g,defaultSortKey:l,defaultViewMode:c}=s,o=l===void 0?"title":l,r=c===void 0?"table":c,[d,a]=K.useState(""),N=K.useDeferredValue(d),h=`${n}-${g}`,[p,C]=Qt(h),x=`mesh-${g}-filter-visible-${n}`;let _;e[0]!==x?(_=()=>globalThis.localStorage?.getItem(x)==="true",e[0]=x,e[1]=_):_=e[1];const[m,v]=K.useState(_);let j;e[2]!==x?(j=V=>{v(V),globalThis.localStorage?.setItem(x,String(V))},e[2]=x,e[3]=j):j=e[3];const D=j;let b;e[4]!==m||e[5]!==D?(b=()=>{D(!m)},e[4]=m,e[5]=D,e[6]=b):b=e[6];const T=b,[i,A]=jt(`mesh-${g}-${n}`,r),{sortKey:P,sortDirection:O,handleSort:k}=Yt(o),$=P;let U;return e[7]!==m||e[8]!==p||e[9]!==k||e[10]!==d||e[11]!==N||e[12]!==D||e[13]!==C||e[14]!==A||e[15]!==O||e[16]!==$||e[17]!==T||e[18]!==i?(U={search:d,searchTerm:N,setSearch:a,filters:p,setFilters:C,filterBarVisible:m,setFilterBarVisible:D,toggleFilterBar:T,viewMode:i,setViewMode:A,sortKey:$,sortDirection:O,handleSort:k},e[7]=m,e[8]=p,e[9]=k,e[10]=d,e[11]=N,e[12]=D,e[13]=C,e[14]=A,e[15]=O,e[16]=$,e[17]=T,e[18]=i,e[19]=U):U=e[19],U}function Zt(s){const e=re.c(35),{open:n,onOpenChange:g,count:l,onConfirm:c}=s,o=le(),r=l!==1?"s":"";let d;e[0]!==l||e[1]!==o||e[2]!==r?(d=o("orgs.bulkDeleteDialog.deleteTitle",{count:l,plural:r}),e[0]=l,e[1]=o,e[2]=r,e[3]=d):d=e[3];let a;e[4]!==d?(a=t.jsx(we,{children:d}),e[4]=d,e[5]=a):a=e[5];const N=l!==1?"s":"";let h;e[6]!==o||e[7]!==N?(h=o("orgs.bulkDeleteDialog.deleteDescription",{plural:N}),e[6]=o,e[7]=N,e[8]=h):h=e[8];let p;e[9]!==h?(p=t.jsx(Ie,{children:h}),e[9]=h,e[10]=p):p=e[10];let C;e[11]!==a||e[12]!==p?(C=t.jsxs(Pe,{children:[a,p]}),e[11]=a,e[12]=p,e[13]=C):C=e[13];let x;e[14]!==o?(x=o("orgs.bulkDeleteDialog.cancelButton"),e[14]=o,e[15]=x):x=e[15];let _;e[16]!==x?(_=t.jsx(Le,{children:x}),e[16]=x,e[17]=_):_=e[17];const m=l!==1?"s":"";let v;e[18]!==l||e[19]!==o||e[20]!==m?(v=o("orgs.bulkDeleteDialog.deleteButton",{count:l,plural:m}),e[18]=l,e[19]=o,e[20]=m,e[21]=v):v=e[21];let j;e[22]!==c||e[23]!==v?(j=t.jsx(Oe,{onClick:c,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:v}),e[22]=c,e[23]=v,e[24]=j):j=e[24];let D;e[25]!==j||e[26]!==_?(D=t.jsxs(Fe,{children:[_,j]}),e[25]=j,e[26]=_,e[27]=D):D=e[27];let b;e[28]!==D||e[29]!==C?(b=t.jsxs(Me,{children:[C,D]}),e[28]=D,e[29]=C,e[30]=b):b=e[30];let T;return e[31]!==g||e[32]!==n||e[33]!==b?(T=t.jsx($e,{open:n,onOpenChange:g,children:b}),e[31]=g,e[32]=n,e[33]=b,e[34]=T):T=e[34],T}function en(s){return s._registryId?.includes("community-registry")===!0}function tn(s){const e=re.c(81),{item:n,canManage:g,allConnections:l,connectedAppNames:c,connectingItemId:o,onNavigateConnected:r,onConnect:d}=s,a=le(),[N,h]=K.useState(!1),[p,C]=K.useState(null);let x,_;e[0]!==c||e[1]!==n?(x=Te(n)??"",_=c.has(x),e[0]=c,e[1]=n,e[2]=x,e[3]=_):(x=e[2],_=e[3]);const m=_,v=n._meta?.["mcp.mesh"],j=v?.friendlyName||v?.friendly_name||n.server?.title||n.title||n.server?.name||n.name||n.id||"",D=n.server?.description||n.description||null;let b;e[4]!==n.server?.icons?.[0]?.src||e[5]!==n.server?.repository?(b=n.server?.icons?.[0]?.src||ct(n.server?.repository)||null,e[4]=n.server?.icons?.[0]?.src,e[5]=n.server?.repository,e[6]=b):b=e[6];const T=b;let i;if(e[7]!==l||e[8]!==x){let B;e[10]!==x?(B=q=>q.connection_type!=="VIRTUAL"&&q.app_name===x,e[10]=x,e[11]=B):B=e[11],i=l.filter(B),e[7]=l,e[8]=x,e[9]=i}else i=e[9];const A=i;let P;e[12]!==n?(P=en(n),e[12]=n,e[13]=P):P=e[13];const O=P;let k,$;e[14]!==A||e[15]!==g||e[16]!==O||e[17]!==m||e[18]!==n||e[19]!==d||e[20]!==r?(k=()=>{if(m){const B=A[0];B&&r(B);return}g&&$()},$=()=>{O?(C("connect"),h(!0)):d(n)},e[14]=A,e[15]=g,e[16]=O,e[17]=m,e[18]=n,e[19]=d,e[20]=r,e[21]=k,e[22]=$):(k=e[21],$=e[22]);let U;e[23]!==n||e[24]!==d||e[25]!==p?(U=()=>{ce("connections_community_warning_confirmed",{registry_item_id:n.id}),h(!1),p==="connect"&&d(n),C(null)},e[23]=n,e[24]=d,e[25]=p,e[26]=U):U=e[26];const V=U;let z;e[27]!==D||e[28]!==T||e[29]!==j?(z={title:j,description:D,icon:T},e[27]=D,e[28]=T,e[29]=j,e[30]=z):z=e[30];let L;e[31]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx(je,{}),e[31]=L):L=e[31];let H;e[32]!==O||e[33]!==n._sourceIcon?(H=O&&n._sourceIcon&&t.jsx("img",{src:n._sourceIcon,alt:"Community",className:"size-4 rounded-sm object-contain"}),e[32]=O,e[33]=n._sourceIcon,e[34]=H):H=e[34];let Y;e[35]!==g||e[36]!==o||e[37]!==$||e[38]!==m||e[39]!==n.id||e[40]!==a?(Y=m?t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:a("orgs.catalogItemCard.connected")}):g&&t.jsx(X,{variant:"outline",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:o!==null,onClick:B=>{B.stopPropagation(),$()},children:o===n.id?t.jsx(ge,{size:14,className:"animate-spin"}):a("orgs.catalogItemCard.connect")}),e[35]=g,e[36]=o,e[37]=$,e[38]=m,e[39]=n.id,e[40]=a,e[41]=Y):Y=e[41];let y;e[42]!==H||e[43]!==Y?(y=t.jsxs("div",{className:"flex items-center gap-2",children:[H,Y]}),e[42]=H,e[43]=Y,e[44]=y):y=e[44];let w;e[45]!==k||e[46]!==y||e[47]!==z?(w=t.jsx(ve,{connection:z,fallbackIcon:L,onClick:k,headerActionsAlwaysVisible:!0,headerActions:y}),e[45]=k,e[46]=y,e[47]=z,e[48]=w):w=e[48];let E;e[49]!==a?(E=a("orgs.catalogItemCard.communityMcpServerTitle"),e[49]=a,e[50]=E):E=e[50];let W;e[51]!==E?(W=t.jsx(we,{children:E}),e[51]=E,e[52]=W):W=e[52];let R;e[53]!==a?(R=a("orgs.catalogItemCard.communityMcpServerDescription"),e[53]=a,e[54]=R):R=e[54];let S;e[55]!==R?(S=t.jsx(Ie,{children:R}),e[55]=R,e[56]=S):S=e[56];let F;e[57]!==W||e[58]!==S?(F=t.jsxs(Pe,{children:[W,S]}),e[57]=W,e[58]=S,e[59]=F):F=e[59];let I;e[60]!==a?(I=a("orgs.catalogItemCard.cancel"),e[60]=a,e[61]=I):I=e[61];let J;e[62]!==I?(J=t.jsx(Le,{children:I}),e[62]=I,e[63]=J):J=e[63];let ee;e[64]!==a?(ee=a("orgs.catalogItemCard.continue"),e[64]=a,e[65]=ee):ee=e[65];let Z;e[66]!==V||e[67]!==ee?(Z=t.jsx(Oe,{onClick:V,children:ee}),e[66]=V,e[67]=ee,e[68]=Z):Z=e[68];let u;e[69]!==J||e[70]!==Z?(u=t.jsxs(Fe,{children:[J,Z]}),e[69]=J,e[70]=Z,e[71]=u):u=e[71];let f;e[72]!==F||e[73]!==u?(f=t.jsxs(Me,{children:[F,u]}),e[72]=F,e[73]=u,e[74]=f):f=e[74];let M;e[75]!==N||e[76]!==f?(M=t.jsx($e,{open:N,onOpenChange:h,children:f}),e[75]=N,e[76]=f,e[77]=M):M=e[77];let G;return e[78]!==w||e[79]!==M?(G=t.jsxs(t.Fragment,{children:[w,M]}),e[78]=w,e[79]=M,e[80]=G):G=e[80],G}function Qe(s){const e=re.c(8),{selectionMode:n,children:g}=s,l=n?"w-8 opacity-100":"w-0 opacity-0 group-hover:w-8 group-hover:opacity-100";let c;e[0]!==l?(c=xe("overflow-hidden transition-all duration-150 ease-out",l),e[0]=l,e[1]=c):c=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Wt,{asChild:!0,children:t.jsx(X,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:sn,children:t.jsx(qt,{size:20})})}),e[2]=o):o=e[2];let r;e[3]!==g?(r=t.jsxs(Xt,{children:[o,t.jsx(Gt,{align:"end",onClick:nn,children:g})]}),e[3]=g,e[4]=r):r=e[4];let d;return e[5]!==c||e[6]!==r?(d=t.jsx("div",{className:c,children:r}),e[5]=c,e[6]=r,e[7]=d):d=e[7],d}function nn(s){return s.stopPropagation()}function sn(s){return s.stopPropagation()}function on(s){const e=re.c(56),{group:n,onOpen:g,selectionMode:l,selectedIds:c,onToggleSelect:o}=s,r=le();let d;if(e[0]!==n.connections||e[1]!==c){let L;e[3]!==c?(L=H=>c.has(H.id),e[3]=c,e[4]=L):L=e[4],d=n.connections.every(L),e[0]=n.connections,e[1]=c,e[2]=d}else d=e[2];const a=d;let N;if(e[5]!==n.connections||e[6]!==c){let L;e[8]!==c?(L=H=>c.has(H.id),e[8]=c,e[9]=L):L=e[9],N=n.connections.some(L),e[5]=n.connections,e[6]=c,e[7]=N}else N=e[7];const h=N;let p;e[10]!==a||e[11]!==n.connections||e[12]!==o||e[13]!==c?(p=()=>{for(const L of n.connections)a?c.has(L.id)&&o(L.id):c.has(L.id)||o(L.id)},e[10]=a,e[11]=n.connections,e[12]=o,e[13]=c,e[14]=p):p=e[14];const C=p,x=n.title,_=n.icon;let m;e[15]!==n.connections.length||e[16]!==r?(m=r("orgs.connectionSelectionUi.instancesCount",{count:n.connections.length}),e[15]=n.connections.length,e[16]=r,e[17]=m):m=e[17];let v;e[18]!==n.icon||e[19]!==n.title||e[20]!==m?(v={title:x,icon:_,description:m},e[18]=n.icon,e[19]=n.title,e[20]=m,e[21]=v):v=e[21];let j;e[22]!==g||e[23]!==l||e[24]!==C?(j=()=>l?C():g(),e[22]=g,e[23]=l,e[24]=C,e[25]=j):j=e[25];const D=l&&a&&"ring-2 ring-primary",b=l&&h&&!a&&"ring-1 ring-primary/50";let T;e[26]!==b||e[27]!==D?(T=xe(D,b),e[26]=b,e[27]=D,e[28]=T):T=e[28];let i;e[29]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(je,{}),e[29]=i):i=e[29];let A;e[30]!==a||e[31]!==n.connections.length||e[32]!==l||e[33]!==h||e[34]!==r||e[35]!==C?(A=l?t.jsx(Xe,{checked:a?!0:h?"indeterminate":!1,onCheckedChange:C}):t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:r("orgs.connectionSelectionUi.connected")}),t.jsxs("span",{className:"text-xs text-muted-foreground font-normal tabular-nums",children:["x",n.connections.length]})]}),e[30]=a,e[31]=n.connections.length,e[32]=l,e[33]=h,e[34]=r,e[35]=C,e[36]=A):A=e[36];let P;e[37]!==g?(P=L=>{L.stopPropagation(),g()},e[37]=g,e[38]=P):P=e[38];let O;e[39]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(Ge,{size:16}),e[39]=O):O=e[39];let k;e[40]!==r?(k=r("orgs.connectionSelectionUi.open"),e[40]=r,e[41]=k):k=e[41];let $;e[42]!==P||e[43]!==k?($=t.jsxs(de,{onClick:P,children:[O,k]}),e[42]=P,e[43]=k,e[44]=$):$=e[44];let U;e[45]!==l||e[46]!==$?(U=t.jsx(Qe,{selectionMode:l,children:$}),e[45]=l,e[46]=$,e[47]=U):U=e[47];let V;e[48]!==A||e[49]!==U?(V=t.jsxs("div",{className:"flex items-center gap-1",children:[A,U]}),e[48]=A,e[49]=U,e[50]=V):V=e[50];let z;return e[51]!==T||e[52]!==V||e[53]!==v||e[54]!==j?(z=t.jsx(t.Fragment,{children:t.jsx(ve,{connection:v,onClick:j,className:T,fallbackIcon:i,headerActionsAlwaysVisible:!0,headerActions:V})}),e[51]=T,e[52]=V,e[53]=v,e[54]=j,e[55]=z):z=e[55],z}function cn(s){const e=re.c(36),{connection:n,isSelected:g,selectionMode:l,canManage:c,canManageAgents:o,onToggleSelect:r,onOpen:d,onToggleStatus:a,onDelete:N}=s,h=le();let p;e[0]!==g||e[1]!==r||e[2]!==l||e[3]!==h?(p=l?t.jsx(Xe,{checked:g,onCheckedChange:r,onClick:rn}):t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:h("orgs.connectionSelectionUi.connected")}),e[0]=g,e[1]=r,e[2]=l,e[3]=h,e[4]=p):p=e[4];let C;e[5]!==d?(C=i=>{i.stopPropagation(),d()},e[5]=d,e[6]=C):C=e[6];let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(Ge,{size:16}),e[7]=x):x=e[7];let _;e[8]!==h?(_=h("orgs.connectionSelectionUi.open"),e[8]=h,e[9]=_):_=e[9];let m;e[10]!==C||e[11]!==_?(m=t.jsxs(de,{onClick:C,children:[x,_]}),e[10]=C,e[11]=_,e[12]=m):m=e[12];let v;e[13]!==c||e[14]!==o||e[15]!==r||e[16]!==h?(v=(c||o)&&t.jsxs(de,{onClick:i=>{i.stopPropagation(),r()},children:[t.jsx(Ft,{size:16}),h("orgs.connectionSelectionUi.select")]}),e[13]=c,e[14]=o,e[15]=r,e[16]=h,e[17]=v):v=e[17];let j;e[18]!==c||e[19]!==n||e[20]!==a||e[21]!==h?(j=c&&(n.status==="active"?t.jsxs(de,{onClick:i=>{i.stopPropagation(),a("inactive")},children:[t.jsx(Mt,{size:16}),h("orgs.connectionSelectionUi.disable")]}):t.jsxs(de,{onClick:i=>{i.stopPropagation(),a("active")},children:[t.jsx($t,{size:16}),h("orgs.connectionSelectionUi.enable")]})),e[18]=c,e[19]=n,e[20]=a,e[21]=h,e[22]=j):j=e[22];let D;e[23]!==c||e[24]!==N||e[25]!==h?(D=c&&t.jsxs(de,{variant:"destructive",onClick:i=>{i.stopPropagation(),N()},children:[t.jsx(qe,{size:16}),h("orgs.connectionSelectionUi.delete")]}),e[23]=c,e[24]=N,e[25]=h,e[26]=D):D=e[26];let b;e[27]!==l||e[28]!==m||e[29]!==v||e[30]!==j||e[31]!==D?(b=t.jsxs(Qe,{selectionMode:l,children:[m,v,j,D]}),e[27]=l,e[28]=m,e[29]=v,e[30]=j,e[31]=D,e[32]=b):b=e[32];let T;return e[33]!==p||e[34]!==b?(T=t.jsxs("div",{className:"flex items-center gap-1",children:[p,b]}),e[33]=p,e[34]=b,e[35]=T):T=e[35],T}function rn(s){return s.stopPropagation()}function ln(s){const e=re.c(29),{count:n,total:g,canManage:l,canManageAgents:c,onSelectAll:o,onDeselectAll:r,onDelete:d,onAddToAgent:a,onToggleStatus:N,onCancel:h}=s,p=le();if(n===0)return null;let C;e[0]!==n||e[1]!==p?(C=p("orgs.connectionSelectionUi.selectedCount",{count:n}),e[0]=n,e[1]=p,e[2]=C):C=e[2];let x;e[3]!==C?(x=t.jsx("div",{className:"text-xs text-muted-foreground pr-1 tabular-nums",children:C}),e[3]=C,e[4]=x):x=e[4];let _;e[5]!==n||e[6]!==r||e[7]!==o||e[8]!==p||e[9]!==g?(_=n<g?t.jsx(X,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:o,children:p("orgs.connectionSelectionUi.selectAll",{total:g})}):t.jsx(X,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:r,children:p("orgs.connectionSelectionUi.clearSelection")}),e[5]=n,e[6]=r,e[7]=o,e[8]=p,e[9]=g,e[10]=_):_=e[10];let m;e[11]!==c||e[12]!==a||e[13]!==p?(m=c&&t.jsxs(X,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:a,children:[t.jsx(Re,{size:13}),p("orgs.connectionSelectionUi.addToAgent")]}),e[11]=c,e[12]=a,e[13]=p,e[14]=m):m=e[14];let v;e[15]!==l||e[16]!==d||e[17]!==N||e[18]!==p?(v=l&&t.jsxs(t.Fragment,{children:[t.jsx(X,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>N("active"),children:p("orgs.connectionSelectionUi.enable")}),t.jsx(X,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>N("inactive"),children:p("orgs.connectionSelectionUi.disable")}),t.jsxs(X,{variant:"destructive",size:"sm",className:"h-7 text-xs px-2",onClick:d,children:[t.jsx(qe,{size:13}),p("orgs.connectionSelectionUi.delete")]})]}),e[15]=l,e[16]=d,e[17]=N,e[18]=p,e[19]=v):v=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(We,{size:13}),e[20]=j):j=e[20];let D;e[21]!==h?(D=t.jsx(X,{variant:"ghost",size:"sm",className:"h-7 text-xs px-2",onClick:h,children:j}),e[21]=h,e[22]=D):D=e[22];let b;return e[23]!==x||e[24]!==_||e[25]!==m||e[26]!==v||e[27]!==D?(b=t.jsx("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2",children:t.jsxs("div",{className:"rounded-xl border border-border bg-background/95 shadow-lg backdrop-blur px-3 py-2 flex items-center gap-2",children:[x,_,m,v,D]})}),e[23]=x,e[24]=_,e[25]=m,e[26]=v,e[27]=D,e[28]=b):b=e[28],b}function an(s){const e=re.c(45),{open:n,onOpenChange:g,agents:l,onConfirm:c}=s,o=le(),[r,d]=K.useState(null);let a;e[0]!==o?(a=o("orgs.connectionSelectionUi.addToAgentTitle"),e[0]=o,e[1]=a):a=e[1];let N;e[2]!==a?(N=t.jsx(Ue,{children:a}),e[2]=a,e[3]=N):N=e[3];let h;e[4]!==o?(h=o("orgs.connectionSelectionUi.addToAgentDescription"),e[4]=o,e[5]=h):h=e[5];let p;e[6]!==h?(p=t.jsx(Ve,{children:h}),e[6]=h,e[7]=p):p=e[7];let C;e[8]!==N||e[9]!==p?(C=t.jsxs(ze,{children:[N,p]}),e[8]=N,e[9]=p,e[10]=C):C=e[10];let x;e[11]!==l||e[12]!==r||e[13]!==o?(x=l.length===0?t.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:o("orgs.connectionSelectionUi.noAgentsFound")}):l.map(k=>t.jsxs("button",{type:"button",onClick:()=>d(k.id),className:xe("flex items-center gap-3 w-full rounded-md px-3 py-2 text-left transition-colors",r===k.id?"bg-primary/10 ring-1 ring-primary":"hover:bg-muted/50"),children:[t.jsx(Rt,{icon:k.icon,name:k.title,size:"sm",className:"shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:k.title}),k.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:k.description})]})]},k.id)),e[11]=l,e[12]=r,e[13]=o,e[14]=x):x=e[14];let _;e[15]!==x?(_=t.jsx("div",{className:"max-h-60 overflow-auto py-2 space-y-1",children:x}),e[15]=x,e[16]=_):_=e[16];let m;e[17]!==g?(m=()=>g(!1),e[17]=g,e[18]=m):m=e[18];let v;e[19]!==o?(v=o("orgs.connectionSelectionUi.cancel"),e[19]=o,e[20]=v):v=e[20];let j;e[21]!==m||e[22]!==v?(j=t.jsx(X,{variant:"outline",onClick:m,children:v}),e[21]=m,e[22]=v,e[23]=j):j=e[23];const D=!r;let b;e[24]!==c||e[25]!==g||e[26]!==r?(b=()=>{r&&(c(r),g(!1),d(null))},e[24]=c,e[25]=g,e[26]=r,e[27]=b):b=e[27];let T;e[28]!==o?(T=o("orgs.connectionSelectionUi.add"),e[28]=o,e[29]=T):T=e[29];let i;e[30]!==D||e[31]!==b||e[32]!==T?(i=t.jsx(X,{disabled:D,onClick:b,children:T}),e[30]=D,e[31]=b,e[32]=T,e[33]=i):i=e[33];let A;e[34]!==j||e[35]!==i?(A=t.jsxs(Ee,{children:[j,i]}),e[34]=j,e[35]=i,e[36]=A):A=e[36];let P;e[37]!==A||e[38]!==C||e[39]!==_?(P=t.jsxs(Be,{className:"sm:max-w-[400px]",children:[C,_,A]}),e[37]=A,e[38]=C,e[39]=_,e[40]=P):P=e[40];let O;return e[41]!==g||e[42]!==n||e[43]!==P?(O=t.jsx(Ke,{open:n,onOpenChange:g,children:P}),e[41]=g,e[42]=n,e[43]=P,e[44]=O):O=e[44],O}function dn({listState:s,activeTab:e,typeFilter:n,statusFilter:g,registryFilter:l,enabledRegistries:c}){const o=le(),{org:r}=De(),d=ot(),a=Ne(),{data:N}=ke.useSession(),h=He(),p=Pt(s),C=ft(),{granted:x}=Ce("connections:manage"),{granted:_}=Ce("agents:manage"),[m,v]=K.useState(new Set),j=m.size>0,[D,b]=K.useState(!1),[T,i]=K.useState(!1),[A,P]=K.useState(null),O=Lt(),k=p.filter(u=>!(n!=="ALL"&&u.connection_type!==n||g!=="ALL"&&u.status!==g)),$=gt(k),U=u=>{v(f=>{const M=new Set(f);return M.has(u)?M.delete(u):M.add(u),M})},V=()=>{v(new Set)},z=Ae(c,s.searchTerm),L=z.items,H=xt(z.loadMore,z.hasMore,z.isLoadingMore),Y=new Set(p.filter(u=>u.app_name).map(u=>u.app_name)),y=l==="ALL"||c.some(u=>u.id===l)?l:"ALL",w=s.search.length>0,E=e==="all"||w?L.filter(u=>{if(y!=="ALL"&&u._registryId!==y)return!1;if(w){const f=Te(u);if(f&&Y.has(f))return!1}return!0}):[],W=e==="connected"||w?$:[],R=async u=>{if(!(!r||!N?.user?.id)){ce("connection_add_clicked",{action:"connect_new",registry_item_id:u.id,source:"connections_page"}),P(u.id);try{const f=lt(u,r.id,N.user.id,{remoteIndex:0}),M=f.connection_type==="STDIO",G=!!f.connection_url,B=M&&f.connection_headers&&typeof f.connection_headers=="object"&&"command"in f.connection_headers;if(!G&&!B){Q.error(o("orgs.connections.cannotConnectNoMethod")),P(null);return}const{id:q}=await h.create.mutateAsync(f),ue=await Ht({connectionId:q,orgId:r.id,orgSlug:r.slug,persistFallback:ye=>h.update.mutateAsync({id:q,data:{connection_token:ye}}).then(()=>{})});if(ue.ran&&!ue.ok){ce("connection_oauth_failed",{connection_id:q,flow:"connections_page_connect",error:ue.error??"no_token"}),Q.error(o("orgs.connections.authenticationFailed",{error:ue.error??"no token received"}));return}if(ue.ran){ce("connection_oauth_succeeded",{connection_id:q,flow:"connections_page_connect"});const ye=new URL(`/api/${r.slug}/mcp/${q}`,window.location.origin);await d.invalidateQueries({queryKey:it.isMCPAuthenticated(ye.href,null)}),F(),Q.success(o("orgs.connections.authenticationSuccessful"))}Q.success(o("orgs.connections.connectedSuccessfully"))}catch(f){Q.error(o("orgs.connections.failedToConnect",{error:f instanceof Error?f.message:String(f)}))}finally{P(null)}}},S=Ot(),F=()=>{d.invalidateQueries({predicate:u=>{const f=u.queryKey;return f[1]===r.id&&f[3]==="collection"&&f[4]==="CONNECTIONS"}})},I=async()=>{b(!1);const u=[...m];ce("connections_bulk_delete",{count:u.length});let f=0;for(const M of u)try{await S.call("COLLECTION_CONNECTIONS_DELETE",{id:M,force:!0}),f++}catch{}F(),Q.success(o("orgs.connections.deletedConnections",{count:f})),V()},J=async(u,f)=>{try{await h.update.mutateAsync({id:u,data:{status:f}}),F(),Q.success(o(f==="active"?"orgs.connections.connectionEnabled":"orgs.connections.connectionDisabled"))}catch{Q.error(o("orgs.connections.failedToUpdateConnection"))}},ee=async u=>{const f=[...m];ce("connections_bulk_status_toggled",{count:f.length,to_status:u});let M=0;for(const G of f)try{await h.update.mutateAsync({id:G,data:{status:u}}),M++}catch{}F(),Q.success(u==="active"?o("orgs.connections.enabledConnections",{count:M}):o("orgs.connections.disabledConnections",{count:M})),V()},Z=async u=>{const f=O.find(B=>B.id===u);if(!f)return;ce("connections_bulk_add_to_agent",{agent_id:u,count:m.size});const M=new Set(f.connections.map(B=>B.connection_id)),G=[...m].filter(B=>!M.has(B)).map(B=>({connection_id:B,selected_tools:null,selected_resources:null,selected_prompts:null}));if(G.length===0){Q.info(o("orgs.connections.allConnectionsAlreadyInAgent"));return}try{await S.call("COLLECTION_VIRTUAL_MCP_UPDATE",{id:u,data:{connections:[...f.connections,...G]}}),d.invalidateQueries({predicate:B=>{const q=B.queryKey;return q[1]===r.id&&q[3]==="collection"&&q[4]==="VIRTUAL_MCP"}}),Q.success(o("orgs.connections.addedConnectionsToAgent",{count:G.length,agentTitle:f.title})),V()}catch{Q.error(o("orgs.connections.failedToAddConnectionsToAgent"))}};return t.jsxs(t.Fragment,{children:[t.jsx(ht,{...C}),t.jsx(Zt,{open:D,onOpenChange:b,count:m.size,onConfirm:I}),t.jsx(an,{open:T,onOpenChange:i,agents:O,onConfirm:Z}),z.isInitialLoading&&e==="all"?t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ge,{size:32,className:"animate-spin text-muted-foreground"})}):t.jsx("div",{children:(w?E.length===0&&k.length===0:e==="all"?E.length===0:k.length===0)?t.jsx(pt,{image:t.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),title:o("orgs.connections.noConnectionsFound"),description:s.search?o("orgs.connections.noConnectionsMatchSearch",{search:s.search}):o(x?"orgs.connections.createConnectionToGetStarted":"orgs.connections.askAdminToAddConnection")}):t.jsxs("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:[W.map(u=>{if(u.type==="group")return t.jsx(on,{group:u,onOpen:()=>{a({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:u.key}})},selectionMode:j,selectedIds:m,onToggleSelect:U},u.key);const f=u.connection,M=m.has(f.id);return t.jsx(ve,{connection:f,fallbackIcon:t.jsx(je,{}),onClick:()=>j?U(f.id):a({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:he(f)}}),className:xe(M&&"ring-2 ring-primary bg-primary/5"),headerActionsAlwaysVisible:!0,headerActions:t.jsx(cn,{connection:f,isSelected:M,selectionMode:j,canManage:x,canManageAgents:_,onToggleSelect:()=>U(f.id),onOpen:()=>a({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:he(f)}}),onToggleStatus:G=>J(f.id,G),onDelete:()=>C.requestDelete(f)})},f.id)}),E.map(u=>t.jsx(tn,{item:u,canManage:x,allConnections:p,connectedAppNames:Y,connectingItemId:A,onNavigateConnected:f=>a({to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:he(f)}}),onConnect:R},`catalog-${u._registryId}:${u.id}`)),(e==="all"||w)&&c.length>0&&t.jsx("div",{ref:H,className:"col-span-full h-4"}),(e==="all"||w)&&z.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(ge,{size:24,className:"animate-spin text-muted-foreground"})})]})}),j&&t.jsx(ln,{count:m.size,total:k.length,canManage:x,canManageAgents:_,onSelectAll:()=>{v(new Set(k.map(u=>u.id)))},onDeselectAll:()=>v(new Set),onDelete:()=>b(!0),onAddToAgent:()=>i(!0),onToggleStatus:ee,onCancel:V})]})}function un(){const s=le(),{org:e}=De(),n=Ne(),g=Je({strict:!1}),{data:l}=ke.useSession(),{stdioEnabled:c}=Ze(),o=Nt(),{granted:r}=Ce("connections:manage"),d=Jt({namespace:e.slug,resource:"connections"}),a=He(),[N,h]=et(tt.connectionsTab(e.slug),y=>g.tab==="all"||g.tab==="connected"?g.tab:y??"all"),[p,C]=K.useState("ALL"),[x,_]=K.useState("ALL"),[m,v]=K.useState("ALL"),j=mt(),b=Ae(j,d.searchTerm).items,T=d.search!==d.searchTerm,i=nt({resolver:st(zt),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),A=i.watch("ui_type"),P=i.watch("connection_url"),O=i.watch("npx_package"),k=fe({uiType:A,connectionUrl:P??"",npxPackage:O??""})??_e({uiType:A,connectionUrl:P??"",registryItems:b}),$=r&&g.action==="create",U=()=>{ce("connections_custom_dialog_opened",{source:"connections_page"}),n({to:"/$org/settings/connections",params:{org:e.slug},search:{action:"create"}})},V=()=>{n({to:"/$org/settings/connections",params:{org:e.slug},search:{}})},z=async y=>{let w,E=null,W=null,R=null;y.ui_type==="NPX"?(w="STDIO",E="",R=Bt(y.npx_package||"",y.env_vars||[])):y.ui_type==="STDIO"?(w="STDIO",E="",R=Kt(y.stdio_command||"",y.stdio_args||"",y.stdio_cwd,y.env_vars||[])):(w=y.ui_type,E=y.connection_url||"",W=y.connection_token||null);const S=rt("conn");ce("connection_custom_created",{connection_type:w,ui_type:y.ui_type}),await a.create.mutateAsync({id:S,title:y.title,description:y.description||null,connection_type:w,connection_url:E,connection_token:W,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:l?.user?.id||"system",organization_id:e.id,icon:y.icon??null,app_name:null,app_id:null,connection_headers:R,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),V(),i.reset(),n({to:"/$org/settings/connections/$appSlug",params:{org:e.slug,appSlug:he({app_name:null,connection_url:E,title:y.title,id:S})}})},L=y=>{y||($&&V(),i.reset())},H=y=>{const w=y.trim();if(!w)return;const E=!!i.formState.dirtyFields.title,W=!!i.formState.dirtyFields.description,R=!!i.formState.dirtyFields.env_vars,S=I=>{if(I&&(!E&&!i.getValues("title").trim()&&I.title&&i.setValue("title",I.title,{shouldDirty:!1}),!W&&!(i.getValues("description")??"").trim()&&I.description&&i.setValue("description",I.description,{shouldDirty:!1}),!R&&I.envVarKeys?.length)){const J=i.getValues("env_vars")??[],ee=new Set(J.map(u=>u.key)),Z=I.envVarKeys.filter(u=>!ee.has(u));Z.length>0&&i.setValue("env_vars",[...J,...Z.map(u=>({key:u,value:""}))],{shouldDirty:!0})}},F=Et(w);if(F&&c){i.setValue("ui_type","NPX",{shouldDirty:!0}),i.setValue("npx_package",F.packageName,{shouldDirty:!0}),i.setValue("connection_url","",{shouldDirty:!0}),i.setValue("connection_token",null,{shouldDirty:!0}),S(fe({uiType:"NPX",npxPackage:F.packageName}));return}if(w.startsWith("http://")||w.startsWith("https://")){const I=A==="HTTP"||A==="SSE"||A==="Websocket"?A:"HTTP";i.setValue("ui_type",I,{shouldDirty:!0}),i.setValue("connection_url",w,{shouldDirty:!0}),S(fe({uiType:I,connectionUrl:w})??_e({uiType:I,connectionUrl:w,registryItems:b}));return}A==="NPX"&&S(fe({uiType:"NPX",npxPackage:w}))},Y=r?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(X,{variant:"outline",onClick:U,children:[t.jsx(Re,{size:14,className:"sm:hidden"}),t.jsx("span",{className:"hidden sm:inline",children:s("orgs.connections.customConnection")})]})}):null;return t.jsx(t.Fragment,{children:t.jsxs(pe,{children:[(()=>{const y=s("orgs.connections.createConnection"),w=s("orgs.connections.createConnectionDescription"),E=i.formState.isSubmitting?s("orgs.connections.saving"):s("orgs.connections.createConnection"),W=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(te,{control:i.control,name:"ui_type",render:({field:S})=>t.jsxs(ne,{children:[t.jsx(se,{children:s("orgs.connections.type")}),t.jsxs(kt,{value:S.value,onValueChange:S.onChange,children:[t.jsx(oe,{children:t.jsx(Tt,{children:t.jsx(At,{})})}),t.jsxs(wt,{children:[t.jsx(me,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(me,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(me,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"Websocket"]})}),c&&t.jsxs(t.Fragment,{children:[t.jsx(me,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(je,{className:"w-4 h-4"}),s("orgs.connections.npxPackage")]})}),t.jsx(me,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ut,{className:"w-4 h-4"}),s("orgs.connections.customCommand")]})})]})]})]}),t.jsx(ie,{})]})}),A==="NPX"&&t.jsx(te,{control:i.control,name:"npx_package",render:({field:S})=>t.jsxs(ne,{children:[t.jsx(se,{children:s("orgs.connections.npmPackage")}),t.jsx(oe,{children:t.jsx(ae,{placeholder:s("orgs.connections.npmPackagePlaceholder"),...S,value:S.value??"",onPaste:F=>{const I=F.clipboardData.getData("text");I&&(F.preventDefault(),i.setValue("npx_package",I.trim(),{shouldDirty:!0}),H(I))},onBlur:F=>{H(F.target.value),S.onBlur()}})}),t.jsx(ie,{})]})}),A==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(te,{control:i.control,name:"stdio_command",render:({field:S})=>t.jsxs(ne,{children:[t.jsx(se,{children:s("orgs.connections.command")}),t.jsx(oe,{children:t.jsx(ae,{placeholder:s("orgs.connections.commandPlaceholder"),...S,value:S.value??""})}),t.jsx(ie,{})]})}),t.jsx(te,{control:i.control,name:"stdio_args",render:({field:S})=>t.jsxs(ne,{children:[t.jsx(se,{children:s("orgs.connections.arguments")}),t.jsx(oe,{children:t.jsx(ae,{placeholder:s("orgs.connections.argumentsPlaceholder"),...S,value:S.value??""})}),t.jsx(ie,{})]})})]}),t.jsx(te,{control:i.control,name:"stdio_cwd",render:({field:S})=>t.jsxs(ne,{children:[t.jsx(se,{children:s("orgs.connections.workingDirectory")}),t.jsx(oe,{children:t.jsx(ae,{placeholder:s("orgs.connections.workingDirectoryPlaceholder"),...S,value:S.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("orgs.connections.directoryExecutionNote")}),t.jsx(ie,{})]})})]}),(A==="NPX"||A==="STDIO")&&t.jsx(te,{control:i.control,name:"env_vars",render:({field:S})=>t.jsxs(ne,{children:[t.jsx(se,{children:s("orgs.connections.environmentVariables")}),t.jsx(oe,{children:t.jsx(Vt,{value:S.value??[],onChange:S.onChange})}),t.jsx(ie,{})]})}),A!=="NPX"&&A!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(te,{control:i.control,name:"connection_url",render:({field:S})=>t.jsxs(ne,{children:[t.jsx(se,{children:s("orgs.connections.url")}),t.jsx(oe,{children:t.jsx(ae,{placeholder:s("orgs.connections.urlPlaceholder"),...S,value:S.value??"",onPaste:F=>{const I=F.clipboardData.getData("text");I&&(F.preventDefault(),i.setValue("connection_url",I.trim(),{shouldDirty:!0}),H(I))},onBlur:F=>{H(F.target.value),S.onBlur()}})}),t.jsx(ie,{})]})}),t.jsx(te,{control:i.control,name:"connection_token",render:({field:S})=>t.jsxs(ne,{children:[t.jsx(se,{children:k?.token?.label??s("orgs.connections.tokenOptional")}),t.jsx(oe,{children:t.jsx(ae,{type:"password",placeholder:k?.token?.placeholder??s("orgs.connections.tokenPlaceholder"),...S,value:S.value??""})}),k?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[k.token.helperText,k.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:s("orgs.connections.openGitHubPatSettings")})]})]}),t.jsx(ie,{})]})})]}),t.jsx(te,{control:i.control,name:"title",render:({field:S})=>t.jsxs(ne,{children:[t.jsx(se,{children:s("orgs.connections.name")}),t.jsx(oe,{children:t.jsx(ae,{placeholder:s("orgs.connections.namePlaceholder"),...S})}),t.jsx(ie,{})]})}),t.jsx(te,{control:i.control,name:"description",render:({field:S})=>t.jsxs(ne,{children:[t.jsx(se,{children:s("orgs.connections.description")}),t.jsx(oe,{children:t.jsx(It,{placeholder:s("orgs.connections.descriptionPlaceholder"),rows:3,...S,value:S.value??""})}),t.jsx(ie,{})]})})]}),R=$;return o?t.jsx(yt,{open:R,onOpenChange:L,children:t.jsxs(St,{className:"max-h-[90vh]",children:[t.jsx(Ct,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(vt,{children:y}),t.jsx(bt,{className:"mt-1",children:w})]}),t.jsx(_t,{asChild:!0,children:t.jsx(X,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1","aria-label":s("orgs.connections.close"),children:t.jsx(We,{size:16})})})]})}),t.jsx(be,{...i,children:t.jsxs("form",{onSubmit:i.handleSubmit(z),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:W}),t.jsx(Dt,{children:t.jsx(X,{type:"submit",disabled:i.formState.isSubmitting,className:"w-full",children:E})})]})})]})}):t.jsx(Ke,{open:R,onOpenChange:L,children:t.jsxs(Be,{className:"sm:max-w-[525px]",children:[t.jsxs(ze,{children:[t.jsx(Ue,{children:y}),t.jsx(Ve,{children:w})]}),t.jsx(be,{...i,children:t.jsxs("form",{onSubmit:i.handleSubmit(z),children:[t.jsx("div",{className:"py-4",children:W}),t.jsxs(Ee,{children:[t.jsx(X,{type:"button",variant:"outline",onClick:()=>L(!1),children:s("orgs.connections.cancel")}),t.jsx(X,{type:"submit",disabled:i.formState.isSubmitting,className:"min-w-40",children:E})]})]})})]})})})(),t.jsx(pe.Content,{children:t.jsx(pe.Body,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(pe.Title,{children:s("orgs.connections.pageTitle")}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(dt,{value:d.search,onChange:d.setSearch,placeholder:s("orgs.connections.searchPlaceholder"),className:"w-full md:w-[375px]",onKeyDown:y=>{y.key==="Escape"&&(d.setSearch(""),y.target.blur())}}),t.jsx(at,{sortKey:d.sortKey,sortDirection:d.sortDirection,onSort:d.handleSort,sortOptions:[{id:"title",label:s("orgs.connections.sortName")},{id:"description",label:s("orgs.connections.sortDescription")},{id:"connection_type",label:s("orgs.connections.sortType")},{id:"updated_by",label:s("orgs.connections.sortUpdatedBy")},{id:"updated_at",label:s("orgs.connections.sortUpdated")}],filters:[{label:s("orgs.connections.filterType"),value:p,onChange:y=>C(y||"ALL"),options:[{id:"ALL",label:s("orgs.connections.filterAll")},{id:"HTTP",label:"HTTP"},{id:"SSE",label:"SSE"},{id:"Websocket",label:"WebSocket"},{id:"STDIO",label:"STDIO"}]},{label:s("orgs.connections.filterStatus"),value:x,onChange:y=>_(y||"ALL"),options:[{id:"ALL",label:s("orgs.connections.filterAll")},{id:"active",label:s("orgs.connections.filterActive")},{id:"inactive",label:s("orgs.connections.filterInactive")},{id:"error",label:s("orgs.connections.filterError")}]},...j.length>1?[{label:s("orgs.connections.filterRegistry"),value:m,onChange:y=>v(y||"ALL"),options:[{id:"ALL",label:s("orgs.connections.filterAllRegistries")},...j.map(y=>({id:y.id,label:y.id.includes("community-registry")?s("orgs.connections.communityMcpRegistry"):y.title}))]}]:[]]})]}),Y]}),t.jsx(ut,{tabs:[{id:"all",label:s("orgs.connections.tabAll")},{id:"connected",label:s("orgs.connections.tabConnected")}],activeTab:N,onTabChange:y=>{const w=y;w!==N&&ce("connections_page_tab_changed",{to_tab:w}),h(w)}}),t.jsx(K.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ge,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx("div",{style:{opacity:T?.5:1,transition:T?"opacity 0.2s 0.2s linear":"opacity 0s 0s linear",pointerEvents:T?"none":"auto"},children:t.jsx(dn,{listState:d,activeTab:N,typeFilter:p,statusFilter:x,registryFilter:m,enabledRegistries:j})})})]})})})]})})}function Ys(){const s=re.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ye,{children:t.jsx(K.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ge,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(un,{})})}),s[0]=e):e=s[0],e}export{Ys as default};
@@ -1,2 +0,0 @@
1
- import{c as se,b as Me,r as u,j as r,k as fe,B as De,e5 as Jt,aC as Zt,aI as xe,e6 as en,e7 as tn,e8 as nn,e9 as rn,bO as on,ea as sn,eb as lt,aE as an,ec as ln,ed as cn,ee as dn,ef as un,eg as fn,eh as pn,ei as mn,ej as xn,ek as hn,m as le,o as gn,t as ne,K as Ze}from"./index-osUKgSS7.js";import{F as bn,l as yn}from"./index-B2MTCe2b.js";import{g as Cn,aN as vn,aO as wn}from"./agent-icon-d2jw6ps1.js";import{s as Nn}from"./XClose-D26wD9_Q.js";import{m as jn}from"./automation-runs-02j6ZCbn.js";import{c as et,T as tt,a as nt}from"./tooltip-CeBtAc-Q.js";import{b as En}from"./chat-context--BCe0uBG.js";import{u as Sn}from"./shell-layout-C26BWW3A.js";import{s as we,a as rt,f as Dn}from"./index-DHtzYrzs.js";import{b as Mn,h as Rn,a as Tn,c as Pn,d as kn,e as Fn}from"./dialog-EQ_Nu1nb.js";import{I as ot}from"./input-D1Gv8_NL.js";import{c as An,d as On,b as Ln,f as In,g as Kn,e as $n,a as zn,A as _n}from"./alert-dialog-CyxTQtK2.js";import{t as Gn}from"./ChevronDown-Dxdrzb03.js";import{i as Bn}from"./ChevronRight-DD-OjvGf.js";import{a as Vn}from"./ZoomOut-Dzo8MaxJ.js";import{w as Un,E as Hn,x as Ae,y as Wn,z as qn,A as Qn,C as Xn,D as re,G as Ne,I as Oe,J as je,g as Le,K as Ie,M as Yn,s as Jn,N as Zn,O as Ke,P as Ee,Q as $e,U as er,V as tr,W as nr,X as rr}from"./index-BBl4qqLw.js";import"./AlertCircle-C1710OBb.js";import"./Tool01-BzMShFGo.js";import"./ArrowUp-84PrwJl7.js";import"./Settings02-CqbXJDf7.js";import"./Tool02-Dgp6-KLz.js";import"./ArrowRight-Cpx1Lebk.js";import"./ArrowUpRight-B3GPW-_w.js";import"./TrendUp01-Dz5gzrTN.js";import"./ZapSquare-BHPZ3Jvr.js";import"./Users03-DiELMSun.js";import"./CheckCircle-Yz1eDu6Z.js";import"./Check-D39cW1EC.js";import"./ChevronUp-CorFhFXr.js";import"./DotsVertical-DSmQb07B.js";import"./Stars02-8nmeIDYy.js";import"./Copy01-DggHPLxu.js";import"./Globe01-CmsCC8zN.js";import"./Eye-BYEbwinV.js";import"./FilterLines-BC5HBNi1.js";import"./Star01-DJspHAU-.js";import"./Globe04-Cidz_2od.js";import"./SwitchHorizontal01-DKZ8Ars7.js";import"./HardDrive-DSsiIG4q.js";import"./Image01-CTEGxjN6.js";import"./Key01-C-zj_nZY.js";import"./LayoutLeft-CdBrffSJ.js";import"./XCircle-DcmvhxNa.js";import"./LinkExternal01-WuLv33QG.js";import"./Monitor01-CIfeipNC.js";import"./Sun-CYtT9w41.js";import"./Package-BJ248Tbr.js";import"./Palette-D-jexNuW.js";import"./Play-DeSndEh-.js";import"./Plus-Cht7lL4D.js";import"./SearchLg-CkwIt1df.js";import"./SearchMd-Bxv7C6ib.js";import"./Shield01-Bvbq_wVy.js";import"./Stars01-Cc9iJO8V.js";import"./Trash01-DQk8SKeW.js";import"./Upload01-CSTbHDB3.js";import"./User01-JZByJh_c.js";import"./Users01-EWDKaBW5.js";import"./X-CeuyThrh.js";import"./Zap-DC8YgF5a.js";import"./select-CW6UAgqk.js";import"./useInfiniteQuery-BLsai4DH.js";import"./use-infinite-scroll-C_PDhy7Y.js";import"./use-connection-BFgjYMCx.js";import"./use-mcp-client-DCcQbeST.js";import"./auth-CshA0DLa.js";import"./use-virtual-mcp-BNYMyb4m.js";import"./card-DidS0F8g.js";import"./sidebar-Df7FAyMJ.js";import"./use-mobile-BpGP7t1t.js";import"./table-DVd55Q6d.js";import"./empty-state-CId3svrh.js";import"./use-members-BmDf1Ez2.js";import"./use-org-auth-client-wqvjMz_I.js";import"./use-clock-tick-CbWbBVoS.js";import"./use-automations-AVicqQJX.js";import"./studio-tools-C5M-8IB_.js";import"./useSuspenseInfiniteQuery-DZIquNP6.js";import"./avatar-_bj3nvif.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-D50eCFOO.js";import"./file-type-icon-DW7dVPZj.js";import"./tab-id-BijBBRwE.js";import"./hooks-DkEEOEGE.js";import"./decopilot-sse-pool-C_h6McgN.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./monaco-editor-Kvx66aN7.js";import"./index-BgT_1f1m.js";import"./calendar-DzxL6tfI.js";import"./integration-icon-CZMpVL1E.js";import"./use-navigate-to-agent-DBvbBbE5.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-C2g_hZSn.js";import"./form-BaVTHbUM.js";import"./label-C6LQRjqo.js";import"./autosend-72ilm6k6.js";import"./use-ai-providers-RUE5iJZ6.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-CLJTbinJ.js";import"./use-organization-settings-BalIiDFK.js";import"./required-auth-layout-BVAQEE4a.js";import"./use-org-sso-BorzfaCb.js";import"./drawer-BtIHYjMs.js";import"./collection-search-Bu14gD2R.js";import"./index-Cv99iQ9s.js";import"./get-initials-D-f_fDFw.js";import"./popover-nLbxx2tm.js";import"./use-registry-app-CKb6cB0l.js";import"./use-mcp-tools-pt0EYOUp.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-CCSTyrRC.js";import"./mcp-oauth-CExdgV58.js";import"./extract-connection-data-DlEzKLiw.js";import"./dropdown-menu-Du_BmHui.js";import"./command-B7Ss5ZQF.js";import"./index-B3G-1Db4.js";import"./companions-core-DyyxV0Vm.js";import"./tabs-hgF7ZCkc.js";import"./toggle-group-CAH1Hx8k.js";import"./use-deco-credits-AstFkv7d.js";import"./toolbar-icon-button-BzCc0lHV.js";import"./skeleton-Bh51H_qt.js";import"./github-repo-picker-C3sQ7jRy.js";import"./use-debounced-value-DtB2MUZF.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./connection-card-CNK047a0.js";import"./use-registry-connections-CiQeT9S9.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-DJa_iznS.js";import"./connection-form-helpers-Bu-giKug.js";import"./collection-tabs-D6ZdND0h.js";import"./badge-BnUjJn2C.js";import"./connect-desktop-dialog-RMuHHgUH.js";import"./select-model-BB8UZEr7.js";import"./checkbox-DaD8kLui.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BUc4dc2Z.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-Bg74NSvH.js";import"./toolbar-Fx7Y1MeE.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-BqKrdQX0.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-CMsRck_h.js";import"./use-debounced-autosave-BxoahVDF.js";import"./index-BDS4mH87.js";import"./search-input-BkUwKS2D.js";import"./switch-bwxIfzvo.js";import"./use-secrets-BUiyxffy.js";import"./useQueries-CcJabo7z.js";import"./use-file-configs-BQu09fEP.js";import"./automation-list-row-DNgedRhX.js";const or={"new-file":{titleKey:"sandbox.fileExplorerNameDialog.newFileTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFileDescription",submitKey:"sandbox.fileExplorerNameDialog.newFileSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFilePlaceholder"},"new-folder":{titleKey:"sandbox.fileExplorerNameDialog.newFolderTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFolderDescription",submitKey:"sandbox.fileExplorerNameDialog.newFolderSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFolderPlaceholder"},rename:{titleKey:"sandbox.fileExplorerNameDialog.renameTitle",descriptionKey:"sandbox.fileExplorerNameDialog.renameDescription",submitKey:"sandbox.fileExplorerNameDialog.renameSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.renamePlaceholder"}};function sr(i){const e=se.c(71),{open:s,mode:a,initialName:l,parentLabel:m,isPending:h,onSubmit:f,onOpenChange:C}=i,j=l===void 0?"":l,d=h===void 0?!1:h,x=Me(),[g,k]=u.useState(j),[Z,W]=u.useState(s),y=or[a];s!==Z&&(W(s),s&&k(j));let b;e[0]!==d||e[1]!==C?(b=_=>{!_&&!d&&C(!1)},e[0]=d,e[1]=C,e[2]=b):b=e[2];const F=b;let A;e[3]!==d||e[4]!==g||e[5]!==f?(A=async _=>{_.preventDefault();const te=g.trim();!te||d||await f(te)},e[3]=d,e[4]=g,e[5]=f,e[6]=A):A=e[6];const I=A;let S;e[7]!==y.titleKey||e[8]!==x?(S=x(y.titleKey),e[7]=y.titleKey,e[8]=x,e[9]=S):S=e[9];let P;e[10]!==S?(P=r.jsx(Mn,{children:S}),e[10]=S,e[11]=P):P=e[11];let D;e[12]!==y.descriptionKey||e[13]!==x?(D=x(y.descriptionKey),e[12]=y.descriptionKey,e[13]=x,e[14]=D):D=e[14];let M;e[15]!==D?(M=r.jsx(Rn,{children:D}),e[15]=D,e[16]=M):M=e[16];let N;e[17]!==P||e[18]!==M?(N=r.jsxs(Tn,{children:[P,M]}),e[17]=P,e[18]=M,e[19]=N):N=e[19];let R;e[20]!==m||e[21]!==x?(R=m&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:x("sandbox.fileExplorerNameDialog.location")}),r.jsx(ot,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=m,e[21]=x,e[22]=R):R=e[22];let E;e[23]!==x?(E=x("sandbox.fileExplorerNameDialog.name"),e[23]=x,e[24]=E):E=e[24];let T;e[25]!==E?(T=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:E}),e[25]=E,e[26]=T):T=e[26];let Q;e[27]===Symbol.for("react.memo_cache_sentinel")?(Q=_=>k(_.target.value),e[27]=Q):Q=e[27];let X;e[28]!==y.placeholderKey||e[29]!==x?(X=x(y.placeholderKey),e[28]=y.placeholderKey,e[29]=x,e[30]=X):X=e[30];let Y;e[31]!==d||e[32]!==g||e[33]!==X?(Y=r.jsx(ot,{id:"file-explorer-name",value:g,onChange:Q,placeholder:X,autoFocus:!0,disabled:d}),e[31]=d,e[32]=g,e[33]=X,e[34]=Y):Y=e[34];let G;e[35]!==T||e[36]!==Y?(G=r.jsxs("div",{className:"space-y-1.5",children:[T,Y]}),e[35]=T,e[36]=Y,e[37]=G):G=e[37];let K;e[38]!==R||e[39]!==G?(K=r.jsxs("div",{className:"space-y-4 py-4",children:[R,G]}),e[38]=R,e[39]=G,e[40]=K):K=e[40];let q;e[41]!==C?(q=()=>C(!1),e[41]=C,e[42]=q):q=e[42];let $;e[43]!==x?($=x("sandbox.fileExplorerNameDialog.cancel"),e[43]=x,e[44]=$):$=e[44];let z;e[45]!==d||e[46]!==q||e[47]!==$?(z=r.jsx(De,{type:"button",variant:"outline",onClick:q,disabled:d,children:$}),e[45]=d,e[46]=q,e[47]=$,e[48]=z):z=e[48];let B;e[49]!==d||e[50]!==g?(B=!g.trim()||d,e[49]=d,e[50]=g,e[51]=B):B=e[51];let O;e[52]!==y.submitKey||e[53]!==d||e[54]!==x?(O=d?r.jsxs(r.Fragment,{children:[r.jsx(fe,{size:14,className:"animate-spin"}),x("sandbox.fileExplorerNameDialog.saving")]}):x(y.submitKey),e[52]=y.submitKey,e[53]=d,e[54]=x,e[55]=O):O=e[55];let V;e[56]!==B||e[57]!==O?(V=r.jsx(De,{type:"submit",disabled:B,children:O}),e[56]=B,e[57]=O,e[58]=V):V=e[58];let L;e[59]!==z||e[60]!==V?(L=r.jsxs(Pn,{children:[z,V]}),e[59]=z,e[60]=V,e[61]=L):L=e[61];let U;e[62]!==I||e[63]!==K||e[64]!==L||e[65]!==N?(U=r.jsx(kn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:I,children:[N,K,L]})}),e[62]=I,e[63]=K,e[64]=L,e[65]=N,e[66]=U):U=e[66];let ee;return e[67]!==F||e[68]!==s||e[69]!==U?(ee=r.jsx(Fn,{open:s,onOpenChange:F,children:U}),e[67]=F,e[68]=s,e[69]=U,e[70]=ee):ee=e[70],ee}function ar(i){const e=se.c(47),{deleteTarget:s,deleteDirtyPaths:a,fsActionPending:l,onOpenChange:m,onConfirm:h}=i,f=Me(),C=s?.kind==="directory",j=s!==null,d=C?"sandbox.fileExplorerDeleteDialog.titleFolder":"sandbox.fileExplorerDeleteDialog.titleFile";let x;e[0]!==f||e[1]!==d?(x=f(d),e[0]=f,e[1]=d,e[2]=x):x=e[2];let g;e[3]!==x?(g=r.jsx(An,{children:x}),e[3]=x,e[4]=g):g=e[4];let k;e[5]!==f?(k=f("sandbox.fileExplorerDeleteDialog.description"),e[5]=f,e[6]=k):k=e[6];const Z=s?.name;let W;e[7]!==Z?(W=r.jsx("span",{className:"font-mono",children:Z}),e[7]=Z,e[8]=W):W=e[8];let y;e[9]!==C||e[10]!==f?(y=C?f("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=C,e[10]=f,e[11]=y):y=e[11];let b;e[12]!==a.length||e[13]!==f?(b=a.length>0&&r.jsxs(r.Fragment,{children:[" ",a.length===1?f("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):f("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:a.length})]}),e[12]=a.length,e[13]=f,e[14]=b):b=e[14];let F;e[15]!==k||e[16]!==W||e[17]!==y||e[18]!==b?(F=r.jsxs(On,{children:[k," ",W,y,b]}),e[15]=k,e[16]=W,e[17]=y,e[18]=b,e[19]=F):F=e[19];let A;e[20]!==F||e[21]!==g?(A=r.jsxs(Ln,{children:[g,F]}),e[20]=F,e[21]=g,e[22]=A):A=e[22];let I;e[23]!==f?(I=f("sandbox.fileExplorerDeleteDialog.cancel"),e[23]=f,e[24]=I):I=e[24];let S;e[25]!==l||e[26]!==I?(S=r.jsx(In,{disabled:l,children:I}),e[25]=l,e[26]=I,e[27]=S):S=e[27];const P=l||!s;let D;e[28]!==s||e[29]!==h?(D=Q=>{Q.preventDefault(),s&&h(s)},e[28]=s,e[29]=h,e[30]=D):D=e[30];let M;e[31]!==f?(M=f("sandbox.fileExplorerDeleteDialog.delete"),e[31]=f,e[32]=M):M=e[32];let N;e[33]!==P||e[34]!==D||e[35]!==M?(N=r.jsx(Kn,{disabled:P,onClick:D,children:M}),e[33]=P,e[34]=D,e[35]=M,e[36]=N):N=e[36];let R;e[37]!==S||e[38]!==N?(R=r.jsxs($n,{children:[S,N]}),e[37]=S,e[38]=N,e[39]=R):R=e[39];let E;e[40]!==A||e[41]!==R?(E=r.jsxs(zn,{children:[A,R]}),e[40]=A,e[41]=R,e[42]=E):E=e[42];let T;return e[43]!==m||e[44]!==j||e[45]!==E?(T=r.jsx(_n,{open:j,onOpenChange:m,children:E}),e[43]=m,e[44]=j,e[45]=E,e[46]=T):T=e[46],T}var ze="ContextMenu",[ir]=an(ze,[lt]),J=lt(),[lr,ct]=ir(ze),dt=i=>{const{__scopeContextMenu:e,children:s,onOpenChange:a,dir:l,modal:m=!0}=i,[h,f]=u.useState(!1),C=J(e),j=on(a),d=u.useCallback(x=>{f(x),j(x)},[j]);return r.jsx(lr,{scope:e,open:h,onOpenChange:d,modal:m,children:r.jsx(sn,{...C,dir:l,open:h,onOpenChange:d,modal:m,children:s})})};dt.displayName=ze;var ut="ContextMenuTrigger",ft=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,disabled:a=!1,...l}=i,m=ct(ut,s),h=J(s),f=u.useRef({x:0,y:0}),C=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...f.current})}),j=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(j.current),[]),x=g=>{f.current={x:g.clientX,y:g.clientY},m.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(Jt,{...h,virtualRef:C}),r.jsx(Zt.span,{"data-state":m.open?"open":"closed","data-disabled":a?"":void 0,...l,ref:e,style:{WebkitTouchCallout:"none",...i.style},onContextMenu:a?i.onContextMenu:xe(i.onContextMenu,g=>{d(),x(g),g.preventDefault()}),onPointerDown:a?i.onPointerDown:xe(i.onPointerDown,Se(g=>{d(),j.current=window.setTimeout(()=>x(g),700)})),onPointerMove:a?i.onPointerMove:xe(i.onPointerMove,Se(d)),onPointerCancel:a?i.onPointerCancel:xe(i.onPointerCancel,Se(d)),onPointerUp:a?i.onPointerUp:xe(i.onPointerUp,Se(d))})]})});ft.displayName=ut;var cr="ContextMenuPortal",pt=i=>{const{__scopeContextMenu:e,...s}=i,a=J(e);return r.jsx(nn,{...a,...s})};pt.displayName=cr;var mt="ContextMenuContent",xt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=ct(mt,s),m=J(s),h=u.useRef(!1);return r.jsx(rn,{...m,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:f=>{i.onCloseAutoFocus?.(f),!f.defaultPrevented&&h.current&&f.preventDefault(),h.current=!1},onInteractOutside:f=>{i.onInteractOutside?.(f),!f.defaultPrevented&&!l.modal&&(h.current=!0)},style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});xt.displayName=mt;var dr="ContextMenuGroup",ur=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(ln,{...l,...a,ref:e})});ur.displayName=dr;var fr="ContextMenuLabel",pr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(cn,{...l,...a,ref:e})});pr.displayName=fr;var mr="ContextMenuItem",ht=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(en,{...l,...a,ref:e})});ht.displayName=mr;var xr="ContextMenuCheckboxItem",hr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(dn,{...l,...a,ref:e})});hr.displayName=xr;var gr="ContextMenuRadioGroup",br=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(un,{...l,...a,ref:e})});br.displayName=gr;var yr="ContextMenuRadioItem",Cr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(fn,{...l,...a,ref:e})});Cr.displayName=yr;var vr="ContextMenuItemIndicator",wr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(pn,{...l,...a,ref:e})});wr.displayName=vr;var Nr="ContextMenuSeparator",gt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(tn,{...l,...a,ref:e})});gt.displayName=Nr;var jr="ContextMenuArrow",Er=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(mn,{...l,...a,ref:e})});Er.displayName=jr;var Sr="ContextMenuSubTrigger",Dr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(xn,{...l,...a,ref:e})});Dr.displayName=Sr;var Mr="ContextMenuSubContent",Rr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(hn,{...l,...a,ref:e,style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Rr.displayName=Mr;function Se(i){return e=>e.pointerType!=="mouse"?i(e):void 0}var Tr=dt,Pr=ft,kr=pt,Fr=xt,Ar=ht,Or=gt;function Lr(i){const e=se.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Tr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=a):a=e[3],a}function Ir(i){const e=se.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Pr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Kr(i){const e=se.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=le("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==a||e[6]!==l?(m=r.jsx(kr,{children:r.jsx(Fr,{"data-slot":"context-menu-content",className:l,...a})}),e[5]=a,e[6]=l,e[7]=m):m=e[7],m}function ue(i){const e=se.c(12);let s,a,l,m;e[0]!==i?({className:s,inset:a,variant:m,...l}=i,e[0]=i,e[1]=s,e[2]=a,e[3]=l,e[4]=m):(s=e[1],a=e[2],l=e[3],m=e[4]);const h=m===void 0?"default":m;let f;e[5]!==s?(f=le("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_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]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[5]=s,e[6]=f):f=e[6];let C;return e[7]!==a||e[8]!==l||e[9]!==f||e[10]!==h?(C=r.jsx(Ar,{"data-slot":"context-menu-item","data-inset":a,"data-variant":h,className:f,...l}),e[7]=a,e[8]=l,e[9]=f,e[10]=h,e[11]=C):C=e[11],C}function st(i){const e=se.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=le("bg-border -mx-1 my-1 h-px",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==a||e[6]!==l?(m=r.jsx(Or,{"data-slot":"context-menu-separator",className:l,...a}),e[5]=a,e[6]=l,e[7]=m):m=e[7],m}const $r="#d9a441";function zr(i){const e=se.c(63),{node:s,depth:a,isExpanded:l,isSelected:m,isLoading:h,fileVisual:f,onOpen:C,onSelect:j,onNewFile:d,onNewFolder:x,onCopyPath:g,onCopyRelativePath:k,onRename:Z,onDelete:W}=i,y=h===void 0?!1:h,b=Me(),F=s.kind==="directory",{Icon:A,color:I}=f,S=m&&"bg-accent";let P;e[0]!==S?(P=le("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",S),e[0]=S,e[1]=P):P=e[1];const D=`${a*14+8}px`;let M;e[2]!==D?(M={paddingLeft:D},e[2]=D,e[3]=M):M=e[3];let N;e[4]!==C||e[5]!==j?(N=()=>{j(),C()},e[4]=C,e[5]=j,e[6]=N):N=e[6];let R;e[7]!==A||e[8]!==I||e[9]!==F||e[10]!==l||e[11]!==y?(R=F?r.jsxs(r.Fragment,{children:[y?r.jsx(fe,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):l?r.jsx(Gn,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(Bn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(Vn,{size:16,className:"shrink-0",style:{color:$r}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(A,{size:16,className:"shrink-0",style:{color:I}})]}),e[7]=A,e[8]=I,e[9]=F,e[10]=l,e[11]=y,e[12]=R):R=e[12];let E;e[13]!==s.name?(E=r.jsx("span",{className:"truncate",children:s.name}),e[13]=s.name,e[14]=E):E=e[14];let T;e[15]!==P||e[16]!==M||e[17]!==N||e[18]!==R||e[19]!==E?(T=r.jsx(Ir,{asChild:!0,children:r.jsxs("button",{type:"button",className:P,style:M,onClick:N,children:[R,E]})}),e[15]=P,e[16]=M,e[17]=N,e[18]=R,e[19]=E,e[20]=T):T=e[20];let Q;e[21]!==b?(Q=b("sandbox.fileTreeRow.newFile"),e[21]=b,e[22]=Q):Q=e[22];let X;e[23]!==d||e[24]!==Q?(X=r.jsx(ue,{onSelect:d,children:Q}),e[23]=d,e[24]=Q,e[25]=X):X=e[25];let Y;e[26]!==b?(Y=b("sandbox.fileTreeRow.newFolder"),e[26]=b,e[27]=Y):Y=e[27];let G;e[28]!==x||e[29]!==Y?(G=r.jsx(ue,{onSelect:x,children:Y}),e[28]=x,e[29]=Y,e[30]=G):G=e[30];let K;e[31]===Symbol.for("react.memo_cache_sentinel")?(K=r.jsx(st,{}),e[31]=K):K=e[31];let q;e[32]!==b?(q=b("sandbox.fileTreeRow.copyPath"),e[32]=b,e[33]=q):q=e[33];let $;e[34]!==g||e[35]!==q?($=r.jsx(ue,{onSelect:g,children:q}),e[34]=g,e[35]=q,e[36]=$):$=e[36];let z;e[37]!==b?(z=b("sandbox.fileTreeRow.copyRelativePath"),e[37]=b,e[38]=z):z=e[38];let B;e[39]!==k||e[40]!==z?(B=r.jsx(ue,{onSelect:k,children:z}),e[39]=k,e[40]=z,e[41]=B):B=e[41];let O;e[42]===Symbol.for("react.memo_cache_sentinel")?(O=r.jsx(st,{}),e[42]=O):O=e[42];let V;e[43]!==b?(V=b("sandbox.fileTreeRow.rename"),e[43]=b,e[44]=V):V=e[44];let L;e[45]!==Z||e[46]!==V?(L=r.jsx(ue,{onSelect:Z,children:V}),e[45]=Z,e[46]=V,e[47]=L):L=e[47];let U;e[48]!==b?(U=b("sandbox.fileTreeRow.delete"),e[48]=b,e[49]=U):U=e[49];let ee;e[50]!==W||e[51]!==U?(ee=r.jsx(ue,{variant:"destructive",onSelect:W,children:U}),e[50]=W,e[51]=U,e[52]=ee):ee=e[52];let _;e[53]!==X||e[54]!==G||e[55]!==$||e[56]!==B||e[57]!==L||e[58]!==ee?(_=r.jsxs(Kr,{className:"w-52",children:[X,G,K,$,B,O,L,ee]}),e[53]=X,e[54]=G,e[55]=$,e[56]=B,e[57]=L,e[58]=ee,e[59]=_):_=e[59];let te;return e[60]!==_||e[61]!==T?(te=r.jsxs(Lr,{children:[T,_]}),e[60]=_,e[61]=T,e[62]=te):te=e[62],te}yn.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});const at=200,_r=2,Gr=250,it=200;function Br(i,e,s,a){return`/api/${i}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(s)}/${a}`}function Vr(i){const e=se.c(9),{text:s,query:a}=i;let l,m,h;if(e[0]!==a||e[1]!==s){const{leadingEllipsis:C,segments:j}=Yn(s,a);l="truncate font-mono text-muted-foreground",m=C&&r.jsx("span",{className:"text-muted-foreground/50",children:"…"}),h=j.map(Ur),e[0]=a,e[1]=s,e[2]=l,e[3]=m,e[4]=h}else l=e[2],m=e[3],h=e[4];let f;return e[5]!==l||e[6]!==m||e[7]!==h?(f=r.jsxs("span",{className:l,children:[m,h]}),e[5]=l,e[6]=m,e[7]=h,e[8]=f):f=e[8],f}function Ur(i,e){return i.match?r.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:i.text},e):r.jsx("span",{children:i.text},e)}function za({orgSlug:i,virtualMcpId:e,branch:s,openPath:a}){const[l,m]=u.useState({files:[],directories:[],truncated:!1}),{files:h,directories:f}=l,[C,j]=u.useState(new Set),[d,x]=u.useState(null),[g,k]=u.useState(null),[Z,W]=u.useState([]),[y,b]=u.useState(""),[F,A]=u.useState(null),[I,S]=u.useState(null),[P,D]=u.useState(!1),[M,N]=u.useState(!1),[R,E]=u.useState(!1),[T,Q]=u.useState(!1),[,X]=u.useState(new Set),[Y,G]=u.useState(new Set),K=u.useRef(0),q=u.useRef(null),$=u.useRef(new Set),z=u.useRef(new Map),B=u.useRef(null),O=u.useRef(0),V=u.useRef(null),L=u.useRef(null),U=u.useRef(null);function ee(t){X(n=>{const o=typeof t=="function"?t(n):t;return $.current=o,o})}const[_,te]=u.useState(new Map),Re=u.useRef(null),[ae,he]=u.useState(null),{sendMessage:bt}=En(),{openSidePanel:yt}=Sn(),ge=gn(),[H,oe]=u.useState(null),[Te,Pe]=u.useState(null),[be,ye]=u.useState(!1);async function ie(t,n){const o=await fetch(Br(i,e,s,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const c=await o.json().catch(()=>({}));throw new Error(c.error??`Request failed (${o.status})`)}return o.json()}async function Ce(){ge.invalidateQueries({queryKey:rt(i,e,s)})}function _e(t,n,o){navigator.clipboard.writeText(o).then(()=>ne.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>ne.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function Ct(t){const n=nr(t);if(!n)return;const o=`${i}/${e}/${s}`;ge.setQueryData(Ze.decofile(o),c=>{if(!c)return c;const{[n]:p,...v}=c;return v}),ge.invalidateQueries({queryKey:Ze.liveMeta(i,e,s)})}function vt(t){const n=t.kind==="file"?[t.path]:h.filter(o=>o.startsWith(".deco/blocks/")).map(o=>Ne(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)Ct(o)}function wt(t){const n=Ne(t);return Z.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const c=_.get(o);return!!(c?.loaded&&c.editorValue!==c.savedContent)})}function Ge(t){W(n=>n.map(o=>t(o)).filter(o=>o!==null)),x(n=>n&&t(n)),te(n=>{const o=new Map;for(const[c,p]of n){const v=t(c);v&&o.set(v,p)}return o}),k(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function Nt(t){const n=Ne(t);k(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Ge(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function jt(t,n){if(!H)return;const o=Ee(H.parentDir,n);if($e(o,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("write",{path:re(o),content:""}),await pe(),await Ce(),oe(null),me(o)}async function Et(t,n){if(!H)return;const o=Ee(H.parentDir,n);if($e(o,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const c=re(o);await ie("mkdir",{path:c}),m(p=>({...p,directories:p.directories.includes(c)?p.directories:[...p.directories,c]})),await pe(),await Ce(),oe(null),j(p=>{const v=new Set(p);for(const ce of Ie(o))v.add(ce);return v.add(o),v}),k({name:n,path:o,kind:"directory",children:[]})}async function St(t,n){if(!H)return;const o=H.node.path,c=je(o),p=Ee(c,n);if(p===o){oe(null);return}if($e(p,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("rename",{from:re(o),to:re(p)}),Ge(v=>v===o?p:v.startsWith(`${o}/`)?Ee(p,v.slice(o.length+1)):v),await pe(),await Ce(),oe(null)}async function Dt(t,n){ye(!0);try{await ie("unlink",{path:re(n.path),recursive:n.kind==="directory"}),vt(n),Nt(n.path),await pe(),await Ce(),Pe(null),ne.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(o){ne.error(o instanceof Error?o.message:t("sandbox.fileExplorer.deleteFailed"))}finally{ye(!1)}}async function Mt(t,n){const o=Zn(n);if(o){ne.error(o);return}ye(!0);try{H?.mode==="new-file"?(await jt(t,n),ne.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):H?.mode==="new-folder"?(await Et(t,n),ne.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):H?.mode==="rename"&&(await St(t,n),ne.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(c){ne.error(c instanceof Error?c.message:t("sandbox.fileExplorer.operationFailed"))}finally{ye(!1)}}const Be=u.useRef(!1);Be.current||(Be.current=!0,q.current=pe());const[Rt,Tt]=u.useState(null),w=Me();if(a&&a!==Rt){Tt(a);const t=a;queueMicrotask(()=>{Un(t)&&me(t)})}async function ke(t){const n=await ie("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ve(t,n,o){if(o!==K.current)return!1;let c=!1;return m(p=>{const v=n?rr(p.files,p.directories,t,p.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return c=!!v.truncated,{files:v.files,directories:v.directories,truncated:c}}),c&&ne.warning(w("sandbox.fileExplorer.fileListTruncated")),c}async function Pt(t){const n=z.current.get(t);if(n)return n;const o=K.current,c=(async()=>{const p=await ke({pattern:"**/*",path:re(t),limit:Ae}),v=Ve(p,!0,o);return!v&&o===K.current&&ee(ce=>{const ve=new Set(ce);return ve.add(t),ve}),v})();z.current.set(t,c);try{return await c}finally{z.current.delete(t)}}async function Ue(t){if(!Ke(t,$.current))return!1;G(n=>new Set(n).add(t));try{return await Pt(t)}finally{G(n=>{const o=new Set(n);return o.delete(t),o})}}async function kt(t,n){const o=new Set($.current);for(const c of Ie(n)){if(!Ke(c,o))continue;if(await Ue(c))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));o.add(c)}}async function pe(){const t=++K.current;V.current=null,L.current=null,z.current.clear(),E(!0),ee(new Set),j(new Set),G(new Set);try{const n=await ke({pattern:"**/*",limit:Ae,maxDepth:Hn});Ve(n,!1,t),Q(!0)}catch{T&&ne.error(w("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{E(!1)}}async function He(t){if(!_.get(t)?.loaded){te(o=>{const c=new Map(o);return c.set(t,{savedContent:"",editorValue:"",loaded:!1}),c});try{const o=await ie("read",{path:re(t),full:!0}),c=Jn(o.content??"");te(p=>{const v=new Map(p);return v.set(t,{savedContent:c,editorValue:c,loaded:!0}),v})}catch{}}}function Ft(){O.current++,A(null),S(null),D(!1),N(!1)}async function At(){const t=K.current,n=V.current;if(n&&n.generation===t)return n.files;const o=L.current;if(o&&o.generation===t)return o.promise;const c=(async()=>{const p=await ke({pattern:"**/*",limit:Ae});return K.current===t&&(V.current={generation:t,files:p.files}),p.files})();L.current={generation:t,promise:c};try{return await c}finally{L.current?.generation===t&&(L.current=null)}}async function Ot(t,n){try{const o=await At();if(n!==O.current)return;A(er(o,t,it))}catch{if(n!==O.current)return;A([])}}async function Lt(t,n){D(!0);try{const o=await ie("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:at});if(n!==O.current)return;S(tr(o.results??"")),N((o.matchCount??0)>=at)}catch{if(n!==O.current)return;S([]),N(!1)}finally{n===O.current&&D(!1)}}function It(t){const n=t.trim(),o=++O.current;Ot(n,o),n.length<_r?(S(null),D(!1),N(!1)):Lt(n,o)}function Kt(t){if(b(t),B.current&&clearTimeout(B.current),!t.trim()){Ft();return}B.current=setTimeout(()=>{It(t)},Gr)}function We(t){const n=U.current;if(!n||n.path!==d)return;U.current=null;const o=Math.max(1,n.line);t.revealLineInCenter(o),t.setPosition({lineNumber:o,column:1}),t.focus()}function $t(t){U.current={path:t.path,line:t.line};const n=d===t.path&&_.get(t.path)?.loaded;me(t.path),n&&Re.current&&We(Re.current)}async function zt(t,n){try{await ie("write",{path:re(t),content:n}),we("file saved via sandbox /write",{path:t}),ge.invalidateQueries({queryKey:rt(i,e,s)});try{const o=await Dn(i,e,s);we("git status after save",o)}catch(o){we("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}te(o=>{const c=new Map(o),p=c.get(t);return p&&c.set(t,{...p,savedContent:n}),c})}catch(o){we("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function _t(t){x(t),k({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),he(null),Z.includes(t)||W(n=>[...n,t]),He(t)}function Gt(t){W(n=>{const o=n.filter(c=>c!==t);return d===t&&x(o[o.length-1]??null),o}),te(n=>{const o=new Map(n);return o.delete(t),o})}function qe(t){j(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function Bt(t){if(Ke(t,$.current))try{if(await Ue(t))return}catch(n){ne.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToLoadFolder"));return}qe(t)}async function Vt(t,n){if(n){qe(t);return}await Bt(t)}async function Ut(t){await q.current,await kt(w,t);const n=Ie(t);j(o=>{const c=new Set(o);for(const p of n)c.add(p);return c}),_t(t)}function me(t){Ut(t).catch(n=>{ne.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToOpenFile"))})}function Ht(){return g?.kind==="directory"?g.path:g?.kind==="file"?je(g.path):d?je(d):"/"}function Qe(t){const n=Ht();oe({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const Wt=Wn(h,f),Xe=qn(Wt,C),Fe=F?.length??0,Ye=Qn(I??[]),Je=I?.length??0,de=d?_.get(d):null,qt=de?.loaded&&de.editorValue!==de.savedContent,Qt=Te?wt(Te.path):[],Xt=(t,n)=>{Re.current=t,We(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await zt(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),c=t.getModel();if(!o||!c||!d)return;const p=c.getValueInRange(o);he({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:p})})};function Yt(t){if(!ae)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${ae.filePath}\``,`**Lines:** ${ae.lineStart}–${ae.lineEnd}`];if(ae.selectedCode){const o=Le(ae.filePath),c=ae.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,c,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),yt("chat"),bt({parts:[{type:"text",text:n.join(`
2
- `)}]}),he(null)}return R&&!T?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(Cn,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:y,onChange:t=>Kt(t.target.value),placeholder:w("sandbox.fileExplorer.searchFilesPlaceholder"),"aria-label":w("sandbox.fileExplorer.searchFilesLabel"),className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),r.jsxs(et,{children:[r.jsx(tt,{asChild:!0,children:r.jsx(De,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFileLabel"),onClick:()=>Qe("new-file"),children:r.jsx(vn,{size:14})})}),r.jsx(nt,{side:"bottom",children:w("sandbox.fileExplorer.newFile")})]}),r.jsxs(et,{children:[r.jsx(tt,{asChild:!0,children:r.jsx(De,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFolderLabel"),onClick:()=>Qe("new-folder"),children:r.jsx(wn,{size:14})})}),r.jsx(nt,{side:"bottom",children:w("sandbox.fileExplorer.newFolder")})]})]}),r.jsx(jn,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[!y&&Xe.map(t=>{const{node:n,depth:o}=t,c=n.kind==="directory",p=C.has(n.path),v=g?.path===n.path,ce=Xn(n.path,n.kind),ve=c&&Y.has(n.path);return r.jsx(zr,{node:n,depth:o,isExpanded:p,isSelected:v,isLoading:ve,fileVisual:Oe(n.name),onSelect:()=>k(n),onOpen:()=>{c?Vt(n.path,p):me(n.path)},onNewFile:()=>oe({mode:"new-file",node:n,parentDir:ce}),onNewFolder:()=>oe({mode:"new-folder",node:n,parentDir:ce}),onCopyPath:()=>_e(w,"Path",Ne(n.path)),onCopyRelativePath:()=>_e(w,"Relative path",re(n.path)),onRename:()=>oe({mode:"rename",node:n,parentDir:ce}),onDelete:()=>Pe(n)},n.path)}),!y&&T&&Xe.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFilesFound")}),y&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:w("sandbox.fileExplorer.files")}),Fe>0&&r.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[Fe,Fe>=it?"+":""]})]}),F!==null&&F.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFileNamesMatch")}),F?.map(t=>{const n=t.split("/").pop()??t,o=je(t),{Icon:c,color:p}=Oe(n),v=d===t;return r.jsxs("button",{type:"button",onClick:()=>me(t),title:t,className:le("flex w-full items-center gap-1.5 px-3 py-1 text-left text-xs hover:bg-accent",v&&"bg-accent"),children:[r.jsx(c,{size:14,className:le("shrink-0",p)}),r.jsx("span",{className:"max-w-40 shrink-0 truncate",children:n}),o!=="/"&&r.jsx("span",{className:"truncate text-muted-foreground/60",children:o})]},t)})]}),y&&r.jsxs("div",{className:"mt-1 border-t pt-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:w("sandbox.fileExplorer.inFiles")}),Je>0&&r.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[Je,M?"+":""]}),P&&r.jsx(fe,{size:10,className:"animate-spin"})]}),!P&&I!==null&&Ye.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noMatchesInFileContents")}),Ye.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:o,color:c}=Oe(n);return r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs text-muted-foreground",children:[r.jsx(o,{size:14,className:le("shrink-0",c)}),r.jsx("span",{className:"truncate",children:n}),r.jsx("span",{className:"text-muted-foreground/60",children:t.matches.length})]}),t.matches.map(p=>r.jsxs("button",{type:"button",onClick:()=>$t(p),title:`${t.path}:${p.line}`,className:"flex w-full items-baseline gap-2 pl-8 pr-3 py-0.5 text-left text-xs hover:bg-accent",children:[r.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:p.line}),r.jsx(Vr,{text:p.text,query:y})]},`${t.path}:${p.line}`))]},t.path)})]})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[Z.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:Z.map(t=>{const n=_.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,c=d===t,p=t.split("/").pop()??t;return r.jsxs("div",{className:le("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",c?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{x(t),He(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":c,children:[r.jsx("span",{className:"truncate max-w-32",children:p}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:v=>{v.stopPropagation(),Gt(t)},children:r.jsx(Nn,{size:12})})]},t)})}),ae&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&Yt(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:w("sandbox.fileExplorer.askTheAiPlaceholder"),className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&he(null)}}),r.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:w("sandbox.fileExplorer.send"),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:w("sandbox.fileExplorer.send")}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:d&&de?.loaded?r.jsx(bn,{language:Le(d),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:de.editorValue,path:d,onChange:t=>{const n=d;n&&te(o=>{const c=new Map(o),p=c.get(n);return p&&c.set(n,{...p,editorValue:t??""}),c})},onMount:Xt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},d):d&&!de?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:w("sandbox.fileExplorer.selectFileToEdit")})}),d&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:d}),r.jsxs("span",{children:[w(qt?"sandbox.fileExplorer.modified":"sandbox.fileExplorer.saved")," ","· ",Le(d)]})]})]}),r.jsx(sr,{open:H!==null,mode:H?.mode??"new-file",initialName:H?.mode==="rename"?H.node.name:"",parentLabel:H&&H.mode!=="rename"?H.parentDir==="/"?"/":re(H.parentDir):void 0,isPending:be,onSubmit:t=>Mt(w,t),onOpenChange:t=>{!t&&!be&&oe(null)}}),r.jsx(ar,{deleteTarget:Te,deleteDirtyPaths:Qt,fsActionPending:be,onOpenChange:t=>{!t&&!be&&Pe(null)},onConfirm:t=>{Dt(w,t)}})]})}export{za as FileExplorer};