decocms 4.108.4 → 4.109.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 (235) hide show
  1. package/dist/client/assets/{AlertCircle-DAcU3OK1.js → AlertCircle--e-APunV.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BGWvp0YE.js → AreaChart-D0NRXvs-.js} +1 -1
  3. package/dist/client/assets/{ArrowRight-D5vSFmMY.js → ArrowRight-DJXBU-T5.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-PqtFrRI7.js → ArrowUp-irl2Q9OR.js} +1 -1
  5. package/dist/client/assets/{ArrowUpRight-CcZUUUuX.js → ArrowUpRight-BqMMw1JV.js} +1 -1
  6. package/dist/client/assets/{Check-v7RELOdt.js → Check-D6GdbR4I.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-X8hM7zne.js → CheckCircle-CtjbHwoA.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-Cfo2Sxhb.js → ChevronDown-4cuZsfzy.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-DbXDEcIM.js → ChevronRight-uNgVNjin.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-CEnACX1z.js → ChevronUp-BvsNvVZH.js} +1 -1
  11. package/dist/client/assets/{Copy01-CKVyVJ5W.js → Copy01-DvFCAKsU.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-CzPA758X.js → DotsVertical-OkDBD_s_.js} +1 -1
  13. package/dist/client/assets/{Eye-DBWZlelg.js → Eye-MAMMhwRT.js} +1 -1
  14. package/dist/client/assets/{FilterLines-BW-q5vaL.js → FilterLines-BVm626t8.js} +1 -1
  15. package/dist/client/assets/{Globe01-BKHWpRf6.js → Globe01-DScq2VNA.js} +1 -1
  16. package/dist/client/assets/{Globe04-CEUtK7lc.js → Globe04-ByEsTZ8T.js} +1 -1
  17. package/dist/client/assets/{HardDrive-CUuH2voT.js → HardDrive-zm2yap3B.js} +1 -1
  18. package/dist/client/assets/{Image01-ufXfd_OK.js → Image01-C0GNpvK1.js} +1 -1
  19. package/dist/client/assets/{Key01-DDGO99Se.js → Key01-DJ4gQ1TV.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-Cza5nRe_.js → LayoutLeft-J8z6WfAh.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-D-yo8Gz6.js → LinkExternal01-Dl8BS__Q.js} +1 -1
  22. package/dist/client/assets/{Monitor01-MBPQiTMe.js → Monitor01-vVkHhoRh.js} +1 -1
  23. package/dist/client/assets/{Package-D1cFq6Qk.js → Package-Bg8rwG2C.js} +1 -1
  24. package/dist/client/assets/{Palette-Ocl7RHoW.js → Palette-N68aUpPy.js} +1 -1
  25. package/dist/client/assets/{Play-Hc7xQUua.js → Play-DZJf-8dU.js} +1 -1
  26. package/dist/client/assets/{Plus-BT2j59ix.js → Plus-Bdk1y4cj.js} +1 -1
  27. package/dist/client/assets/{SearchLg-BK_XfnjF.js → SearchLg-CFIaS6TF.js} +1 -1
  28. package/dist/client/assets/{SearchMd-BuGosvZA.js → SearchMd-BWUcwFIi.js} +1 -1
  29. package/dist/client/assets/{Settings02-BdJaclVu.js → Settings02-D3msR2RR.js} +1 -1
  30. package/dist/client/assets/{Shield01-DQNXb1GH.js → Shield01-BtmolNEX.js} +1 -1
  31. package/dist/client/assets/{Star01-B0eeDTlY.js → Star01-H_yHEnrH.js} +1 -1
  32. package/dist/client/assets/{Stars01-CB5U7Hmp.js → Stars01-BokrMtLs.js} +1 -1
  33. package/dist/client/assets/{Stars02-geCcPLJr.js → Stars02-B8Uwf0MU.js} +1 -1
  34. package/dist/client/assets/{Sun-DkgNpRjT.js → Sun-DOJPhnNP.js} +1 -1
  35. package/dist/client/assets/{SwitchHorizontal01-DZpDKEgf.js → SwitchHorizontal01-DOTwKFaA.js} +1 -1
  36. package/dist/client/assets/{Tool01-1hGZe0BX.js → Tool01-u6wU5YhX.js} +1 -1
  37. package/dist/client/assets/{Tool02-rdnw1xs0.js → Tool02-CrBVuo4X.js} +1 -1
  38. package/dist/client/assets/{Trash01-B0xaoCzJ.js → Trash01-D2sghzIU.js} +1 -1
  39. package/dist/client/assets/{TrendUp01-DMa-fsgJ.js → TrendUp01-Cy4g6Lry.js} +1 -1
  40. package/dist/client/assets/{Upload01-DPAk2exy.js → Upload01-DpaPIldA.js} +1 -1
  41. package/dist/client/assets/{User01-afRuvBBl.js → User01-D4hBg_Hu.js} +1 -1
  42. package/dist/client/assets/{Users01-DIgjAZqF.js → Users01-BvUobvD9.js} +1 -1
  43. package/dist/client/assets/{Users03-DFvcwh2p.js → Users03-VX1_a9JA.js} +1 -1
  44. package/dist/client/assets/{X-Bh26p_c_.js → X-VGSzytZl.js} +1 -1
  45. package/dist/client/assets/{XCircle-n-aDyiZ9.js → XCircle-2y3xLmXS.js} +1 -1
  46. package/dist/client/assets/{XClose-Bl1FhglZ.js → XClose-BNJzonJr.js} +1 -1
  47. package/dist/client/assets/{Zap-CBmCqDE5.js → Zap-CqhsoaKj.js} +1 -1
  48. package/dist/client/assets/{ZapSquare-1vi1e68i.js → ZapSquare-CNxfW2JL.js} +1 -1
  49. package/dist/client/assets/{ZoomOut-ChpYmXxb.js → ZoomOut-BagALrDp.js} +1 -1
  50. package/dist/client/assets/{access-gate-Cvx9r6NI.js → access-gate-Bgcc3o-O.js} +1 -1
  51. package/dist/client/assets/{add-section-modal-D6founIw.js → add-section-modal-B0JzEnvA.js} +1 -1
  52. package/dist/client/assets/{agent-icon-Cb7D4NKT.js → agent-icon-DMZAt2Uh.js} +1 -1
  53. package/dist/client/assets/{agents-list-C3MCYD-i.js → agents-list-DXyRusWv.js} +1 -1
  54. package/dist/client/assets/{ai-providers-BiywGxwg.js → ai-providers-B2DGcvnG.js} +1 -1
  55. package/dist/client/assets/{alert-DeSJNyba.js → alert-DunusO_F.js} +1 -1
  56. package/dist/client/assets/{alert-dialog-o20691Yi.js → alert-dialog-PlJhWC48.js} +1 -1
  57. package/dist/client/assets/{app-editor-C5JeJBuM.js → app-editor-CoDTqQhe.js} +1 -1
  58. package/dist/client/assets/{auth-BOFnuksk.js → auth-DbyuXT2e.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-ELHgb4Rg.js → auth-catchall-CxnadVzA.js} +1 -1
  60. package/dist/client/assets/{auth-entry-CTYyKj2S.js → auth-entry-DpwA9aKx.js} +1 -1
  61. package/dist/client/assets/{auth-split-layout-lZKhY7Qr.js → auth-split-layout-BbxFy8MS.js} +1 -1
  62. package/dist/client/assets/{authenticate-and-persist-oauth-CANRICIL.js → authenticate-and-persist-oauth-Du-9MXQ4.js} +1 -1
  63. package/dist/client/assets/{automation-list-row-U2FH4zsF.js → automation-list-row-D_xAW0fs.js} +1 -1
  64. package/dist/client/assets/{automation-runs-zmcxoTLd.js → automation-runs-BVUBG_RU.js} +1 -1
  65. package/dist/client/assets/{automations-keeY9Ic0.js → automations-CvL1kZ_E.js} +1 -1
  66. package/dist/client/assets/{autosend-CwcK8aFV.js → autosend-DDUBRcnI.js} +1 -1
  67. package/dist/client/assets/{avatar-f-T8_7Z4.js → avatar-DEpQs9of.js} +1 -1
  68. package/dist/client/assets/{badge-apOb3dhn.js → badge-DULAZFFF.js} +1 -1
  69. package/dist/client/assets/{block-document-ByXeQxqK.js → block-document-CS6rPSfn.js} +1 -1
  70. package/dist/client/assets/{brand-context-aMF74Pcu.js → brand-context-D8PViXxs.js} +1 -1
  71. package/dist/client/assets/{buckets-DHlp3y5P.js → buckets-FdvG0SgL.js} +1 -1
  72. package/dist/client/assets/{bulk-category-panel-BrhOEjfg.js → bulk-category-panel-A5iWiUW7.js} +1 -1
  73. package/dist/client/assets/{calendar-CnwopNgt.js → calendar-C-EOkOWX.js} +1 -1
  74. package/dist/client/assets/{capability-load-error-CoVh-2wM.js → capability-load-error-C9KaWI1l.js} +1 -1
  75. package/dist/client/assets/{card-CmaRB23s.js → card-DqQH784H.js} +1 -1
  76. package/dist/client/assets/{category-editor-_vQtdgQM.js → category-editor-DbSDg9WO.js} +1 -1
  77. package/dist/client/assets/{chat-context-BE44V-lx.js → chat-context-Da_84I2B.js} +1 -1
  78. package/dist/client/assets/{checkbox-DV8fOX7z.js → checkbox-CKd5zJDg.js} +1 -1
  79. package/dist/client/assets/{cli-auth-success-Udsy7tRh.js → cli-auth-success-DRncdXFV.js} +1 -1
  80. package/dist/client/assets/{collection-detail-D4ra8wg0.js → collection-detail-B7rtuMJ7.js} +1 -1
  81. package/dist/client/assets/{collection-display-button-m4EhJW9d.js → collection-display-button-DPsyLiTo.js} +1 -1
  82. package/dist/client/assets/{collection-search-CaoHR10c.js → collection-search-B9VsoZ_Z.js} +1 -1
  83. package/dist/client/assets/{collection-table-wrapper-Lu_EwhBe.js → collection-table-wrapper-Ce-glt4_.js} +1 -1
  84. package/dist/client/assets/{collection-tabs-C9gO-wqF.js → collection-tabs-Bt8TULCp.js} +1 -1
  85. package/dist/client/assets/{command-Cp0odrz7.js → command-cmEpDjr1.js} +1 -1
  86. package/dist/client/assets/{commerce-onboarding-Dk0x09b-.js → commerce-onboarding-90zaoqAl.js} +1 -1
  87. package/dist/client/assets/{companions-core-Cy55brZL.js → companions-core-qe3kgGWa.js} +1 -1
  88. package/dist/client/assets/{connect-DVlGKjf-.js → connect-CyXZeX0n.js} +1 -1
  89. package/dist/client/assets/{connect-desktop-dialog-BURLbq7r.js → connect-desktop-dialog-B2_LgaCY.js} +1 -1
  90. package/dist/client/assets/{connection-card-BaBz6X1E.js → connection-card-CCvG4Vj3.js} +1 -1
  91. package/dist/client/assets/{connection-detail-C5i48Nin.js → connection-detail-DMBiAiuo.js} +1 -1
  92. package/dist/client/assets/{connection-form-helpers-B1NVFg6T.js → connection-form-helpers-B0uJubqv.js} +1 -1
  93. package/dist/client/assets/{connections-jD5Gf12r.js → connections-CDIDl_DQ.js} +1 -1
  94. package/dist/client/assets/{decopilot-sse-pool-C5FVFKFE.js → decopilot-sse-pool-xmC_rSsF.js} +1 -1
  95. package/dist/client/assets/{dialog-1mzZlnfM.js → dialog-C0AL3-8S.js} +1 -1
  96. package/dist/client/assets/{domain-settings-6GZ75VWA.js → domain-settings-BsEIRZMh.js} +1 -1
  97. package/dist/client/assets/{drawer-Cr0ET9jO.js → drawer-CAYQiIMG.js} +1 -1
  98. package/dist/client/assets/{dropdown-menu-yieSm-ve.js → dropdown-menu-BApub22c.js} +1 -1
  99. package/dist/client/assets/{empty-state-r8MDOs5F.js → empty-state-BwM1mU6-.js} +1 -1
  100. package/dist/client/assets/{extract-connection-data-Bb3IXAwY.js → extract-connection-data-CzK_UwNp.js} +1 -1
  101. package/dist/client/assets/file-explorer-4KOOaNRi.js +2 -0
  102. package/dist/client/assets/{file-type-icon-DXktnj2B.js → file-type-icon-B7itLm8r.js} +1 -1
  103. package/dist/client/assets/{files-CMk-HFvu.js → files-99liGj8F.js} +1 -1
  104. package/dist/client/assets/{form-BJdLrrQB.js → form-BdudoBnK.js} +1 -1
  105. package/dist/client/assets/{general-KxeP0TTG.js → general-CVsoAAA0.js} +1 -1
  106. package/dist/client/assets/{github-repo-picker-C1tCwJbb.js → github-repo-picker-0ouXzVNP.js} +1 -1
  107. package/dist/client/assets/{hooks-HWvHomwf.js → hooks-DgGDTTP5.js} +1 -1
  108. package/dist/client/assets/{index-oTF4qwkB.js → index-B9DlL8k-.js} +1 -1
  109. package/dist/client/assets/{index-BlFtMLWl.js → index-BWaUGPb1.js} +1 -1
  110. package/dist/client/assets/{index-Ce3PVvo-.js → index-BspKnphB.js} +1 -1
  111. package/dist/client/assets/{index-BZSw9hhu.js → index-Cso-ifyF.js} +3 -3
  112. package/dist/client/assets/{index-BEAAnB6-.js → index-DYQm3FTg.js} +28 -28
  113. package/dist/client/assets/{index-DYeIB67n.js → index-DpilQfun.js} +32 -32
  114. package/dist/client/assets/{index-Bt3HwCha.js → index-Dq9WnKuw.js} +1 -1
  115. package/dist/client/assets/{index-CeWm1zc4.js → index-Gd0bzlcO.js} +1 -1
  116. package/dist/client/assets/{index-D_YNYRuA.js → index-I2cCwbhI.js} +1 -1
  117. package/dist/client/assets/{index-Pv7pnCPO.js → index-J2FKXyQM.js} +1 -1
  118. package/dist/client/assets/{index-GU2-y6N4.js → index-cXFL5KC5.js} +1 -1
  119. package/dist/client/assets/{index-DRO3F72B.js → index-dP4PKeVv.js} +2 -2
  120. package/dist/client/assets/{index-redirect-C0CW5LDb.js → index-redirect-DgXmxYG1.js} +1 -1
  121. package/dist/client/assets/{index-DJuyJiJP.js → index-tENsYYjI.js} +1 -1
  122. package/dist/client/assets/{input-BMfSqTTQ.js → input-CSsMFfg9.js} +1 -1
  123. package/dist/client/assets/{integration-icon-LTjwI8dE.js → integration-icon-PQTBWyVV.js} +1 -1
  124. package/dist/client/assets/{invite-member-dialog-B71U1K9U.js → invite-member-dialog-Bfc773SA.js} +1 -1
  125. package/dist/client/assets/{label-kvS-Cc6h.js → label-BQRcmRqk.js} +1 -1
  126. package/dist/client/assets/{layout-DL2FhVey.js → layout-r0v5NJyy.js} +1 -1
  127. package/dist/client/assets/{login-DiMN-Kg9.js → login-owfonOTy.js} +1 -1
  128. package/dist/client/assets/{mcp-oauth-BsQP_YQb.js → mcp-oauth-C8vYcOzg.js} +1 -1
  129. package/dist/client/assets/{members-_KmUP3OA.js → members-Bb9vqX3c.js} +1 -1
  130. package/dist/client/assets/{monaco-editor-D2-qRh0o.js → monaco-editor-ABQcmWHX.js} +1 -1
  131. package/dist/client/assets/{monitoring-stats-row-Caj4BwTT.js → monitoring-stats-row-C-FrPrM-.js} +1 -1
  132. package/dist/client/assets/{multi-select-DoE0fh_0.js → multi-select-CcDpzbAL.js} +1 -1
  133. package/dist/client/assets/{oauth-callback-C66YRPaP.js → oauth-callback-B1PGmeLa.js} +1 -1
  134. package/dist/client/assets/{oauth-callback-ai-provider-DIo-bZu1.js → oauth-callback-ai-provider-BJlc_OgF.js} +1 -1
  135. package/dist/client/assets/{onboarding-DkhpejWw.js → onboarding-B1qI7QSe.js} +1 -1
  136. package/dist/client/assets/{org-install-BE6fLgWw.js → org-install-DszZBgfb.js} +1 -1
  137. package/dist/client/assets/{org-layout-Cdyq5nW5.js → org-layout-CaBpy1ti.js} +1 -1
  138. package/dist/client/assets/{organization-choice-o5aIvfMl.js → organization-choice-CrgBiM52.js} +1 -1
  139. package/dist/client/assets/{orgs-C_Vwft7i.js → orgs-CMXZ_o8O.js} +1 -1
  140. package/dist/client/assets/{page-seo-form-DYDzo5Fi.js → page-seo-form-Ct6s96-d.js} +1 -1
  141. package/dist/client/assets/page-seo-sheet-DrZ6Hat0.js +1 -0
  142. package/dist/client/assets/{popover-CjRi_EOU.js → popover-mISV94ut.js} +1 -1
  143. package/dist/client/assets/{post-editor-Cm2XQfWO.js → post-editor-D6zIoSMP.js} +1 -1
  144. package/dist/client/assets/{primitives-B-ij747M.js → primitives-BCiCP4aX.js} +1 -1
  145. package/dist/client/assets/{profile-n6MFNoHT.js → profile-CV8yews4.js} +1 -1
  146. package/dist/client/assets/project-app-view-CGhf4QvG.js +1 -0
  147. package/dist/client/assets/record-editor-Ck7eRCOc.js +1 -0
  148. package/dist/client/assets/redirect-editor-CS0uIJaI.js +1 -0
  149. package/dist/client/assets/registry-BoG9THRu.js +2 -0
  150. package/dist/client/assets/{registry-layout-MerRNfGp.js → registry-layout-PL6rPZoE.js} +1 -1
  151. package/dist/client/assets/{reports-LpQ3zYOk.js → reports-Bjk92YEJ.js} +1 -1
  152. package/dist/client/assets/{require-capability-0k5CbhpI.js → require-capability-BPRJuoM1.js} +1 -1
  153. package/dist/client/assets/{required-auth-layout-C7kBenrl.js → required-auth-layout-KsDsuaNM.js} +1 -1
  154. package/dist/client/assets/{reset-password-DwvekgJL.js → reset-password-C-icr5Ls.js} +1 -1
  155. package/dist/client/assets/{roles-5-ivZ1cU.js → roles-XchFe0pJ.js} +1 -1
  156. package/dist/client/assets/{search-input-DEXnjiYe.js → search-input-BIjq6ayG.js} +1 -1
  157. package/dist/client/assets/{secrets-CQ4QAdUS.js → secrets-Dk3lj-O2.js} +1 -1
  158. package/dist/client/assets/{sections-editor-CYj0yuXA.js → sections-editor-BoZmCWeI.js} +1 -1
  159. package/dist/client/assets/{select-DseJeXdX.js → select-DlRxxf5w.js} +1 -1
  160. package/dist/client/assets/{select-model-BEnRO7sA.js → select-model-8R0n-i_V.js} +1 -1
  161. package/dist/client/assets/{self-tool-result-B8SJfuYy.js → self-tool-result-DFYMj-pm.js} +1 -1
  162. package/dist/client/assets/{seo-editor-5A2qdy2E.js → seo-editor-G5LKQfO8.js} +1 -1
  163. package/dist/client/assets/{settings-layout-aJMnP_UC.js → settings-layout-Dv3jQ8NE.js} +1 -1
  164. package/dist/client/assets/{settings-section-Vf4EaYEd.js → settings-section-CMmY57K7.js} +1 -1
  165. package/dist/client/assets/{shell-controls-B3_Yodmv.js → shell-controls-DMIBgXYK.js} +1 -1
  166. package/dist/client/assets/{shell-layout-BVtslnT7.js → shell-layout-CenMkbdE.js} +1 -1
  167. package/dist/client/assets/{sidebar-DzSPhMrc.js → sidebar-DpNkbM2u.js} +1 -1
  168. package/dist/client/assets/{skeleton-xp_OsdvC.js → skeleton-ChIqbBsA.js} +1 -1
  169. package/dist/client/assets/{sso-xPWZm-Nc.js → sso-C-ahJ_NR.js} +1 -1
  170. package/dist/client/assets/{store-Cdhw-U07.js → store-QD7G1md6.js} +1 -1
  171. package/dist/client/assets/store-registry-AZwLR9aI.js +2 -0
  172. package/dist/client/assets/{studio-tools-D5_ctnx0.js → studio-tools-U4RADiUo.js} +1 -1
  173. package/dist/client/assets/{switch-BLu2bhb4.js → switch-52G9QiOE.js} +1 -1
  174. package/dist/client/assets/{table-SQN4WQbu.js → table-Bd0-ZE0n.js} +1 -1
  175. package/dist/client/assets/{tabs-C4j1fqKI.js → tabs-AMoU7Lmz.js} +1 -1
  176. package/dist/client/assets/{textarea-2IFiIb6V.js → textarea-ClvpLD-s.js} +1 -1
  177. package/dist/client/assets/{toggle-group-mnXln8kf.js → toggle-group-CFZ2-feA.js} +1 -1
  178. package/dist/client/assets/{toolbar-yDlyvO5a.js → toolbar-DvMgIrqt.js} +1 -1
  179. package/dist/client/assets/{toolbar-icon-button-DCSGgiSJ.js → toolbar-icon-button-CKM3SF5Q.js} +1 -1
  180. package/dist/client/assets/{tooltip-XWbcBIdA.js → tooltip-aaAmqyHo.js} +1 -1
  181. package/dist/client/assets/{use-ai-providers-DmcZJi9I.js → use-ai-providers-C2aRb-bK.js} +1 -1
  182. package/dist/client/assets/{use-api-keys-CUcCaMlm.js → use-api-keys-BNq2wcZm.js} +1 -1
  183. package/dist/client/assets/{use-automations-DIC24pZG.js → use-automations-BT6VdJQ8.js} +1 -1
  184. package/dist/client/assets/{use-autosave-C4O9vVzP.js → use-autosave-r0uHmh3B.js} +1 -1
  185. package/dist/client/assets/{use-capability-CPp69M5R.js → use-capability-CiWAQCb4.js} +1 -1
  186. package/dist/client/assets/{use-clock-tick-BOEZMtwS.js → use-clock-tick-BUqe3O4p.js} +1 -1
  187. package/dist/client/assets/{use-connection-CFXB_-UO.js → use-connection-BGFxuyJJ.js} +1 -1
  188. package/dist/client/assets/{use-copy-CsdDlrrl.js → use-copy-tGx7B0vh.js} +1 -1
  189. package/dist/client/assets/{use-create-virtual-mcp-BcgneW6C.js → use-create-virtual-mcp-NSuGzTWC.js} +1 -1
  190. package/dist/client/assets/{use-debounced-autosave-Bor3zM_s.js → use-debounced-autosave-g3wrnhxW.js} +1 -1
  191. package/dist/client/assets/{use-debounced-value-BuHfSfvc.js → use-debounced-value-BtKeCAA7.js} +1 -1
  192. package/dist/client/assets/{use-deco-credits-Bl-bBqoa.js → use-deco-credits-DWuN-GxC.js} +1 -1
  193. package/dist/client/assets/{use-decopilot-events-Bo3nSIYh.js → use-decopilot-events-fQTpcP9Y.js} +1 -1
  194. package/dist/client/assets/{use-delete-connection-BfenxF8n.js → use-delete-connection-lWhCMF2b.js} +1 -1
  195. package/dist/client/assets/{use-deployment-admin-YtQxz8_z.js → use-deployment-admin-CowPAw1z.js} +1 -1
  196. package/dist/client/assets/{use-file-configs-C7lTR4xb.js → use-file-configs-BATxq5w6.js} +1 -1
  197. package/dist/client/assets/{use-infinite-scroll-B7o99AV6.js → use-infinite-scroll-D0ZL_mCX.js} +1 -1
  198. package/dist/client/assets/{use-join-requests-CGK5i-s1.js → use-join-requests-r7j-IVTB.js} +1 -1
  199. package/dist/client/assets/{use-mcp-auth-status-CtlH4etb.js → use-mcp-auth-status-CopojzAG.js} +1 -1
  200. package/dist/client/assets/{use-mcp-client-931-8a80.js → use-mcp-client-Bk4HndfL.js} +1 -1
  201. package/dist/client/assets/{use-mcp-tools-CN8ThQ-b.js → use-mcp-tools-BzMFwcra.js} +1 -1
  202. package/dist/client/assets/{use-members-yQmfHEvs.js → use-members-upDn0JWj.js} +1 -1
  203. package/dist/client/assets/{use-mobile-Dcms89CW.js → use-mobile-GsjJypvY.js} +1 -1
  204. package/dist/client/assets/{use-navigate-to-agent-BfheHzas.js → use-navigate-to-agent-O68cJ7eJ.js} +1 -1
  205. package/dist/client/assets/{use-org-auth-client-CkK6f12H.js → use-org-auth-client-DfKaNnwb.js} +1 -1
  206. package/dist/client/assets/{use-org-sso-CCJVB1MX.js → use-org-sso-CsOYvikS.js} +1 -1
  207. package/dist/client/assets/{use-organization-roles-CPH3pxou.js → use-organization-roles-DUyJHa4-.js} +1 -1
  208. package/dist/client/assets/{use-organization-settings-BmybB4vs.js → use-organization-settings-D9pViY9F.js} +1 -1
  209. package/dist/client/assets/{use-registry-app-Dl1qVQLg.js → use-registry-app-Cod7L2oA.js} +1 -1
  210. package/dist/client/assets/{use-registry-connections-CxwmJwho.js → use-registry-connections-BM1uCarE.js} +1 -1
  211. package/dist/client/assets/{use-secrets-B9S_Yuj_.js → use-secrets-CPQkfHLX.js} +1 -1
  212. package/dist/client/assets/{use-status-sounds-CxeAeS6L.js → use-status-sounds-QbNKDQOU.js} +1 -1
  213. package/dist/client/assets/{use-view-mode-DWnbb83T.js → use-view-mode-DTmHZUlm.js} +1 -1
  214. package/dist/client/assets/{use-virtual-mcp-DZESnwRC.js → use-virtual-mcp-OMZ-RvdW.js} +1 -1
  215. package/dist/client/assets/useInfiniteQuery-DAw7B-rc.js +1 -0
  216. package/dist/client/assets/{useQueries-tMTo3vRa.js → useQueries-CxTUWa0R.js} +1 -1
  217. package/dist/client/assets/{useRouterState-BuCggjV7.js → useRouterState-pVkygUf_.js} +1 -1
  218. package/dist/client/assets/useSuspenseInfiniteQuery-368_wIWg.js +1 -0
  219. package/dist/client/assets/{users-BRbkR7oI.js → users-C5MIHXHc.js} +1 -1
  220. package/dist/client/assets/{variant-calendar-DzKInfAb.js → variant-calendar-8wxoioWc.js} +1 -1
  221. package/dist/client/assets/{view-mode-toggle-CS9RkRhT.js → view-mode-toggle-BVPl1kyS.js} +1 -1
  222. package/dist/client/index.html +1 -1
  223. package/dist/server/cli.js +577 -536
  224. package/dist/server/migrate.js +136 -136
  225. package/dist/server/server.js +442 -401
  226. package/package.json +1 -1
  227. package/dist/client/assets/file-explorer-BRhd3Bxa.js +0 -2
  228. package/dist/client/assets/page-seo-sheet-CYGFkyZv.js +0 -1
  229. package/dist/client/assets/project-app-view-BnwXR0Fa.js +0 -1
  230. package/dist/client/assets/record-editor-BTmnUznU.js +0 -1
  231. package/dist/client/assets/redirect-editor-BxIduvcH.js +0 -1
  232. package/dist/client/assets/registry-DrFwx1Za.js +0 -2
  233. package/dist/client/assets/store-registry-BabzX6qY.js +0 -2
  234. package/dist/client/assets/useInfiniteQuery-DwZKbKf3.js +0 -1
  235. package/dist/client/assets/useSuspenseInfiniteQuery-C9Kp0sAQ.js +0 -1
@@ -1 +1 @@
1
- import{J as R,a4 as A,b5 as I,M as a,a2 as j,a3 as z,c as L,j as u,B as C}from"./index-DYeIB67n.js";import{I as H}from"./input-BMfSqTTQ.js";import{s as W}from"./Plus-BT2j59ix.js";import{s as q}from"./Trash01-B0xaoCzJ.js";const K=R({key:a().min(1,"Key is required"),value:a()}),G=R({title:a().min(1,"Name is required"),description:a().nullable().optional(),icon:a().nullable().optional(),ui_type:z(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:a().optional(),connection_token:a().nullable().optional(),npx_package:a().optional(),stdio_command:a().optional(),stdio_args:a().optional(),stdio_cwd:a().optional(),env_vars:j(K).optional(),configuration_scopes:j(a()).nullable().optional(),configuration_state:A(a(),I()).nullable().optional()}).refine(n=>n.ui_type==="NPX"?!!n.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(n=>n.ui_type==="STDIO"?!!n.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(n=>n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket"?!!n.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]});function $(n){const e=n.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(s=>e.includes(s))||["sk_","rk_","whsec_","pk_live","sk_live"].some(s=>e.startsWith(s))||["_key","_secret","_token","_password","_auth","_pat"].some(s=>e.endsWith(s)))}function X(n){const e=L.c(34),{value:t,onChange:r,keyPlaceholder:o,valuePlaceholder:s,className:v}=n,m=o===void 0?"VARIABLE_NAME":o,_=s===void 0?"value...":s;let b;e[0]!==r||e[1]!==t?(b=()=>{r([...t,{key:"",value:""}])},e[0]=r,e[1]=t,e[2]=b):b=e[2];const S=b;let x;e[3]!==r||e[4]!==t?(x=l=>{r(t.filter((p,i)=>i!==l))},e[3]=r,e[4]=t,e[5]=x):x=e[5];const g=x;let P;e[6]!==r||e[7]!==t?(P=(l,p)=>{const i=[...t],c=i[l];c&&(i[l]={key:p,value:c.value},r(i))},e[6]=r,e[7]=t,e[8]=P):P=e[8];const y=P;let w;e[9]!==r||e[10]!==t?(w=(l,p)=>{const i=[...t],c=i[l];c&&(i[l]={key:c.key,value:p},r(i))},e[9]=r,e[10]=t,e[11]=w):w=e[11];const k=w;let d;if(e[12]!==y||e[13]!==g||e[14]!==k||e[15]!==m||e[16]!==t||e[17]!==_){let l;e[19]!==y||e[20]!==g||e[21]!==k||e[22]!==m||e[23]!==_?(l=(p,i)=>u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(H,{placeholder:m,value:p.key,onChange:c=>y(i,c.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),u.jsx(H,{type:$(p.key)?"password":"text",placeholder:_,value:p.value,onChange:c=>k(i,c.target.value),className:"h-10 rounded-lg flex-1"}),u.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>g(i),children:u.jsx(q,{size:16})})]},i),e[19]=y,e[20]=g,e[21]=k,e[22]=m,e[23]=_,e[24]=l):l=e[24],d=t.map(l),e[12]=y,e[13]=g,e[14]=k,e[15]=m,e[16]=t,e[17]=_,e[18]=d}else d=e[18];let T;e[25]===Symbol.for("react.memo_cache_sentinel")?(T=u.jsx(W,{size:16,className:"mr-1"}),e[25]=T):T=e[25];let f;e[26]!==S?(f=u.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:S,children:[T,"Add Environment Variable"]}),e[26]=S,e[27]=f):f=e[27];let h;e[28]!==d||e[29]!==f?(h=u.jsxs("div",{className:"flex flex-col gap-2",children:[d,f]}),e[28]=d,e[29]=f,e[30]=h):h=e[30];let E;return e[31]!==v||e[32]!==h?(E=u.jsx("div",{className:v,children:h}),e[31]=v,e[32]=h,e[33]=E):E=e[33],E}function V(n){const e={};for(const{key:t,value:r}of n)t.trim()&&(e[t.trim()]=r);return e}function D(n){return n?Object.entries(n).map(([e,t])=>({key:e,value:t})):[]}function N(n){const e=n.trim();if(!e)return"";try{const t=new URL(e),r=t.pathname.length>1?t.pathname.replace(/\/+$/,""):t.pathname;return`${t.origin}${r}`}catch{return e.replace(/\/+$/,"")}}function F(n){const e=n.trim().split(/\s+/).filter(Boolean);if(e.length<2)return null;const t=e[0]?.toLowerCase();if(t!=="npx"&&t!=="bunx")return null;const o=e.slice(1).find(s=>!s.startsWith("-"));return o?{packageName:o}:null}function Y(n){const{uiType:e}=n,t=N(n.connectionUrl??"");if((e==="HTTP"||e==="SSE"||e==="Websocket")&&t===N("https://api.githubcopilot.com/mcp/"))return{id:"github",title:"GitHub",description:"GitHub Copilot MCP",token:{label:"GitHub PAT",placeholder:"github_pat_…",helperText:"Paste a GitHub Personal Access Token (PAT)"}};const r=(n.npxPackage??"").trim();return e==="NPX"&&r==="@perplexity-ai/mcp-server"?{id:"perplexity",title:"Perplexity",description:"Perplexity MCP Server",envVarKeys:["PERPLEXITY_API_KEY"]}:null}function J(n){if(n.registryItems.length===0||n.uiType!=="HTTP"&&n.uiType!=="SSE"&&n.uiType!=="Websocket")return null;const e=N(n.connectionUrl??"");if(!e)return null;const t=n.registryItems.find(s=>(s.server?.remotes??[]).some(m=>N(m.url??"")===e));if(!t)return null;const r=t.title||t.name||t.server?.title||t.server?.name||"",o=t.server?.description||t.description||t.summary||null;return r?{id:"registry",title:r,description:o}:null}function Q(n,e){const t={command:"npx",args:["-y",n]},r=V(e);return Object.keys(r).length>0&&(t.envVars=r),t}function Z(n,e,t,r){const o={command:n};e.trim()&&(o.args=e.trim().split(/\s+/)),t?.trim()&&(o.cwd=t.trim());const s=V(r);return Object.keys(s).length>0&&(o.envVars=s),o}export{X as E,J as a,Q as b,G as c,Z as d,Y as i,F as p,D as r};
1
+ import{J as R,a4 as A,b5 as I,M as a,a2 as j,a3 as z,c as L,j as u,B as C}from"./index-DpilQfun.js";import{I as H}from"./input-CSsMFfg9.js";import{s as W}from"./Plus-Bdk1y4cj.js";import{s as q}from"./Trash01-D2sghzIU.js";const K=R({key:a().min(1,"Key is required"),value:a()}),G=R({title:a().min(1,"Name is required"),description:a().nullable().optional(),icon:a().nullable().optional(),ui_type:z(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:a().optional(),connection_token:a().nullable().optional(),npx_package:a().optional(),stdio_command:a().optional(),stdio_args:a().optional(),stdio_cwd:a().optional(),env_vars:j(K).optional(),configuration_scopes:j(a()).nullable().optional(),configuration_state:A(a(),I()).nullable().optional()}).refine(n=>n.ui_type==="NPX"?!!n.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(n=>n.ui_type==="STDIO"?!!n.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(n=>n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket"?!!n.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]});function $(n){const e=n.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(s=>e.includes(s))||["sk_","rk_","whsec_","pk_live","sk_live"].some(s=>e.startsWith(s))||["_key","_secret","_token","_password","_auth","_pat"].some(s=>e.endsWith(s)))}function X(n){const e=L.c(34),{value:t,onChange:r,keyPlaceholder:o,valuePlaceholder:s,className:v}=n,m=o===void 0?"VARIABLE_NAME":o,_=s===void 0?"value...":s;let b;e[0]!==r||e[1]!==t?(b=()=>{r([...t,{key:"",value:""}])},e[0]=r,e[1]=t,e[2]=b):b=e[2];const S=b;let x;e[3]!==r||e[4]!==t?(x=l=>{r(t.filter((p,i)=>i!==l))},e[3]=r,e[4]=t,e[5]=x):x=e[5];const g=x;let P;e[6]!==r||e[7]!==t?(P=(l,p)=>{const i=[...t],c=i[l];c&&(i[l]={key:p,value:c.value},r(i))},e[6]=r,e[7]=t,e[8]=P):P=e[8];const y=P;let w;e[9]!==r||e[10]!==t?(w=(l,p)=>{const i=[...t],c=i[l];c&&(i[l]={key:c.key,value:p},r(i))},e[9]=r,e[10]=t,e[11]=w):w=e[11];const k=w;let d;if(e[12]!==y||e[13]!==g||e[14]!==k||e[15]!==m||e[16]!==t||e[17]!==_){let l;e[19]!==y||e[20]!==g||e[21]!==k||e[22]!==m||e[23]!==_?(l=(p,i)=>u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(H,{placeholder:m,value:p.key,onChange:c=>y(i,c.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),u.jsx(H,{type:$(p.key)?"password":"text",placeholder:_,value:p.value,onChange:c=>k(i,c.target.value),className:"h-10 rounded-lg flex-1"}),u.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>g(i),children:u.jsx(q,{size:16})})]},i),e[19]=y,e[20]=g,e[21]=k,e[22]=m,e[23]=_,e[24]=l):l=e[24],d=t.map(l),e[12]=y,e[13]=g,e[14]=k,e[15]=m,e[16]=t,e[17]=_,e[18]=d}else d=e[18];let T;e[25]===Symbol.for("react.memo_cache_sentinel")?(T=u.jsx(W,{size:16,className:"mr-1"}),e[25]=T):T=e[25];let f;e[26]!==S?(f=u.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:S,children:[T,"Add Environment Variable"]}),e[26]=S,e[27]=f):f=e[27];let h;e[28]!==d||e[29]!==f?(h=u.jsxs("div",{className:"flex flex-col gap-2",children:[d,f]}),e[28]=d,e[29]=f,e[30]=h):h=e[30];let E;return e[31]!==v||e[32]!==h?(E=u.jsx("div",{className:v,children:h}),e[31]=v,e[32]=h,e[33]=E):E=e[33],E}function V(n){const e={};for(const{key:t,value:r}of n)t.trim()&&(e[t.trim()]=r);return e}function D(n){return n?Object.entries(n).map(([e,t])=>({key:e,value:t})):[]}function N(n){const e=n.trim();if(!e)return"";try{const t=new URL(e),r=t.pathname.length>1?t.pathname.replace(/\/+$/,""):t.pathname;return`${t.origin}${r}`}catch{return e.replace(/\/+$/,"")}}function F(n){const e=n.trim().split(/\s+/).filter(Boolean);if(e.length<2)return null;const t=e[0]?.toLowerCase();if(t!=="npx"&&t!=="bunx")return null;const o=e.slice(1).find(s=>!s.startsWith("-"));return o?{packageName:o}:null}function Y(n){const{uiType:e}=n,t=N(n.connectionUrl??"");if((e==="HTTP"||e==="SSE"||e==="Websocket")&&t===N("https://api.githubcopilot.com/mcp/"))return{id:"github",title:"GitHub",description:"GitHub Copilot MCP",token:{label:"GitHub PAT",placeholder:"github_pat_…",helperText:"Paste a GitHub Personal Access Token (PAT)"}};const r=(n.npxPackage??"").trim();return e==="NPX"&&r==="@perplexity-ai/mcp-server"?{id:"perplexity",title:"Perplexity",description:"Perplexity MCP Server",envVarKeys:["PERPLEXITY_API_KEY"]}:null}function J(n){if(n.registryItems.length===0||n.uiType!=="HTTP"&&n.uiType!=="SSE"&&n.uiType!=="Websocket")return null;const e=N(n.connectionUrl??"");if(!e)return null;const t=n.registryItems.find(s=>(s.server?.remotes??[]).some(m=>N(m.url??"")===e));if(!t)return null;const r=t.title||t.name||t.server?.title||t.server?.name||"",o=t.server?.description||t.description||t.summary||null;return r?{id:"registry",title:r,description:o}:null}function Q(n,e){const t={command:"npx",args:["-y",n]},r=V(e);return Object.keys(r).length>0&&(t.envVars=r),t}function Z(n,e,t,r){const o={command:n};e.trim()&&(o.args=e.trim().split(/\s+/)),t?.trim()&&(o.cwd=t.trim());const s=V(r);return Object.keys(s).length>0&&(o.envVars=s),o}export{X as E,J as a,Q as b,G as c,Z as d,Y as i,F as p,D as r};
@@ -1 +1 @@
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 Je,F as De,d as Ne,u as Ye,a as ke,D as Ze,I as et,G as tt,R as nt,P as st,o as ot,t as Q,K as it}from"./index-DYeIB67n.js";import{a as Te,b as ct,g as rt,e as lt}from"./extract-connection-data-Bb3IXAwY.js";import{C as at}from"./collection-display-button-m4EhJW9d.js";import{S as dt}from"./search-input-DEXnjiYe.js";import{C as ut}from"./collection-tabs-C9gO-wqF.js";import{C as ve,u as mt,a as Ae,g as gt}from"./connection-card-BaBz6X1E.js";import{E as pt}from"./empty-state-r8MDOs5F.js";import{P as pe}from"./index-Ce3PVvo-.js";import{u as ft,D as ht}from"./use-delete-connection-BfenxF8n.js";import{u as Ce}from"./use-capability-CPp69M5R.js";import{u as xt}from"./use-infinite-scroll-B7o99AV6.js";import{u as jt}from"./use-view-mode-DWnbb83T.js";import{g as he}from"./connection-slug-eyAPH6o3.js";import{A as we,a as Ie,b as Pe,c as Le,g as Oe,d as Fe,e as Me,f as $e}from"./alert-dialog-o20691Yi.js";import{n as je}from"./Tool02-rdnw1xs0.js";import{b as Ue,h as Ve,a as ze,c as Ee,d as Be,e as Ke}from"./dialog-1mzZlnfM.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-Cr0ET9jO.js";import{u as Nt}from"./use-mobile-Dcms89CW.js";import{F as te,b as ne,c as se,d as oe,f as ie,a as be}from"./form-BJdLrrQB.js";import{I as ae}from"./input-BMfSqTTQ.js";import{S as kt,a as Tt,b as At,c as wt,d as me}from"./select-DseJeXdX.js";import{T as It}from"./textarea-2IFiIb6V.js";import{b as He,u as Pt}from"./use-connection-CFXB_-UO.js";import{u as Lt}from"./use-virtual-mcp-DZESnwRC.js";import{u as Ot}from"./studio-tools-D5_ctnx0.js";import{s as Se}from"./Star01-B0eeDTlY.js";import{s as Re}from"./Plus-BT2j59ix.js";import{ay as Ft,S as Mt,R as $t,b as Ut}from"./agent-icon-Cb7D4NKT.js";import{s as We}from"./XClose-Bl1FhglZ.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-B1NVFg6T.js";import{a as Ht}from"./authenticate-and-persist-oauth-CANRICIL.js";import{I as Rt}from"./integration-icon-LTjwI8dE.js";import{C as Xe}from"./checkbox-DV8fOX7z.js";import{a as de,D as Wt,c as Xt,b as Gt}from"./dropdown-menu-yieSm-ve.js";import{a as qt}from"./DotsVertical-CzPA758X.js";import{s as Ge}from"./Eye-DBWZlelg.js";import{s as qe}from"./Trash01-B0xaoCzJ.js";import"./use-mcp-client-931-8a80.js";import"./auth-BOFnuksk.js";import"./ArrowUp-PqtFrRI7.js";import"./Check-v7RELOdt.js";import"./SwitchHorizontal01-DZpDKEgf.js";import"./tooltip-XWbcBIdA.js";import"./view-mode-toggle-CS9RkRhT.js";import"./badge-apOb3dhn.js";import"./SearchMd-BuGosvZA.js";import"./use-registry-connections-CxwmJwho.js";import"./use-organization-settings-BmybB4vs.js";import"./useInfiniteQuery-DwZKbKf3.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./card-CmaRB23s.js";import"./sidebar-DzSPhMrc.js";import"./LayoutLeft-Cza5nRe_.js";import"./X-Bh26p_c_.js";import"./label-kvS-Cc6h.js";import"./ChevronDown-Cfo2Sxhb.js";import"./ChevronUp-CEnACX1z.js";import"./AlertCircle-DAcU3OK1.js";import"./Tool01-1hGZe0BX.js";import"./Settings02-BdJaclVu.js";import"./ArrowRight-D5vSFmMY.js";import"./ArrowUpRight-CcZUUUuX.js";import"./TrendUp01-DMa-fsgJ.js";import"./ZapSquare-1vi1e68i.js";import"./ZoomOut-ChpYmXxb.js";import"./Users03-DFvcwh2p.js";import"./CheckCircle-X8hM7zne.js";import"./ChevronRight-DbXDEcIM.js";import"./Stars02-geCcPLJr.js";import"./Copy01-CKVyVJ5W.js";import"./Globe01-BKHWpRf6.js";import"./FilterLines-BW-q5vaL.js";import"./Globe04-CEUtK7lc.js";import"./HardDrive-CUuH2voT.js";import"./Image01-ufXfd_OK.js";import"./Key01-DDGO99Se.js";import"./XCircle-n-aDyiZ9.js";import"./LinkExternal01-D-yo8Gz6.js";import"./Monitor01-MBPQiTMe.js";import"./Sun-DkgNpRjT.js";import"./Package-D1cFq6Qk.js";import"./Palette-Ocl7RHoW.js";import"./Play-Hc7xQUua.js";import"./SearchLg-BK_XfnjF.js";import"./Shield01-DQNXb1GH.js";import"./Stars01-CB5U7Hmp.js";import"./Upload01-DPAk2exy.js";import"./User01-afRuvBBl.js";import"./Users01-DIgjAZqF.js";import"./Zap-CBmCqDE5.js";import"./mcp-oauth-BsQP_YQb.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 Jt(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 Yt(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}=Jt(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 J;e[35]!==g||e[36]!==o||e[37]!==$||e[38]!==m||e[39]!==n.id||e[40]!==a?(J=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]=J):J=e[41];let y;e[42]!==H||e[43]!==J?(y=t.jsxs("div",{className:"flex items-center gap-2",children:[H,J]}),e[42]=H,e[43]=J,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 Y;e[62]!==I?(Y=t.jsx(Le,{children:I}),e[62]=I,e[63]=Y):Y=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]!==Y||e[70]!==Z?(u=t.jsxs(Fe,{children:[Y,Z]}),e[69]=Y,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),J=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&&J.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()},Y=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=>Y(f.id,G),onDelete:()=>C.requestDelete(f)})},f.id)}),E.map(u=>t.jsx(tn,{item:u,canManage:x,allConnections:p,connectedAppNames:J,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=Ye({strict:!1}),{data:l}=ke.useSession(),{stdioEnabled:c}=Ze(),o=Nt(),{granted:r}=Ce("connections:manage"),d=Yt({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 Y=i.getValues("env_vars")??[],ee=new Set(Y.map(u=>u.key)),Z=I.envVarKeys.filter(u=>!ee.has(u));Z.length>0&&i.setValue("env_vars",[...Y,...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}))},J=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}))]}]:[]]})]}),J]}),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 Js(){const s=re.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Je,{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{Js as default};
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 Je,F as De,d as Ne,u as Ye,a as ke,D as Ze,I as et,G as tt,R as nt,P as st,o as ot,t as Q,K as it}from"./index-DpilQfun.js";import{a as Te,b as ct,g as rt,e as lt}from"./extract-connection-data-CzK_UwNp.js";import{C as at}from"./collection-display-button-DPsyLiTo.js";import{S as dt}from"./search-input-BIjq6ayG.js";import{C as ut}from"./collection-tabs-Bt8TULCp.js";import{C as ve,u as mt,a as Ae,g as gt}from"./connection-card-CCvG4Vj3.js";import{E as pt}from"./empty-state-BwM1mU6-.js";import{P as pe}from"./index-BspKnphB.js";import{u as ft,D as ht}from"./use-delete-connection-lWhCMF2b.js";import{u as Ce}from"./use-capability-CiWAQCb4.js";import{u as xt}from"./use-infinite-scroll-D0ZL_mCX.js";import{u as jt}from"./use-view-mode-DTmHZUlm.js";import{g as he}from"./connection-slug-eyAPH6o3.js";import{A as we,a as Ie,b as Pe,c as Le,g as Oe,d as Fe,e as Me,f as $e}from"./alert-dialog-PlJhWC48.js";import{n as je}from"./Tool02-CrBVuo4X.js";import{b as Ue,h as Ve,a as ze,c as Ee,d as Be,e as Ke}from"./dialog-C0AL3-8S.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-CAYQiIMG.js";import{u as Nt}from"./use-mobile-GsjJypvY.js";import{F as te,b as ne,c as se,d as oe,f as ie,a as be}from"./form-BdudoBnK.js";import{I as ae}from"./input-CSsMFfg9.js";import{S as kt,a as Tt,b as At,c as wt,d as me}from"./select-DlRxxf5w.js";import{T as It}from"./textarea-ClvpLD-s.js";import{b as He,u as Pt}from"./use-connection-BGFxuyJJ.js";import{u as Lt}from"./use-virtual-mcp-OMZ-RvdW.js";import{u as Ot}from"./studio-tools-U4RADiUo.js";import{s as Se}from"./Star01-H_yHEnrH.js";import{s as Re}from"./Plus-Bdk1y4cj.js";import{ay as Ft,S as Mt,R as $t,b as Ut}from"./agent-icon-DMZAt2Uh.js";import{s as We}from"./XClose-BNJzonJr.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-B0uJubqv.js";import{a as Ht}from"./authenticate-and-persist-oauth-Du-9MXQ4.js";import{I as Rt}from"./integration-icon-PQTBWyVV.js";import{C as Xe}from"./checkbox-CKd5zJDg.js";import{a as de,D as Wt,c as Xt,b as Gt}from"./dropdown-menu-BApub22c.js";import{a as qt}from"./DotsVertical-OkDBD_s_.js";import{s as Ge}from"./Eye-MAMMhwRT.js";import{s as qe}from"./Trash01-D2sghzIU.js";import"./use-mcp-client-Bk4HndfL.js";import"./auth-DbyuXT2e.js";import"./ArrowUp-irl2Q9OR.js";import"./Check-D6GdbR4I.js";import"./SwitchHorizontal01-DOTwKFaA.js";import"./tooltip-aaAmqyHo.js";import"./view-mode-toggle-BVPl1kyS.js";import"./badge-DULAZFFF.js";import"./SearchMd-BWUcwFIi.js";import"./use-registry-connections-BM1uCarE.js";import"./use-organization-settings-D9pViY9F.js";import"./useInfiniteQuery-DAw7B-rc.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./card-DqQH784H.js";import"./sidebar-DpNkbM2u.js";import"./LayoutLeft-J8z6WfAh.js";import"./X-VGSzytZl.js";import"./label-BQRcmRqk.js";import"./ChevronDown-4cuZsfzy.js";import"./ChevronUp-BvsNvVZH.js";import"./AlertCircle--e-APunV.js";import"./Tool01-u6wU5YhX.js";import"./Settings02-D3msR2RR.js";import"./ArrowRight-DJXBU-T5.js";import"./ArrowUpRight-BqMMw1JV.js";import"./TrendUp01-Cy4g6Lry.js";import"./ZapSquare-CNxfW2JL.js";import"./ZoomOut-BagALrDp.js";import"./Users03-VX1_a9JA.js";import"./CheckCircle-CtjbHwoA.js";import"./ChevronRight-uNgVNjin.js";import"./Stars02-B8Uwf0MU.js";import"./Copy01-DvFCAKsU.js";import"./Globe01-DScq2VNA.js";import"./FilterLines-BVm626t8.js";import"./Globe04-ByEsTZ8T.js";import"./HardDrive-zm2yap3B.js";import"./Image01-C0GNpvK1.js";import"./Key01-DJ4gQ1TV.js";import"./XCircle-2y3xLmXS.js";import"./LinkExternal01-Dl8BS__Q.js";import"./Monitor01-vVkHhoRh.js";import"./Sun-DOJPhnNP.js";import"./Package-Bg8rwG2C.js";import"./Palette-N68aUpPy.js";import"./Play-DZJf-8dU.js";import"./SearchLg-CFIaS6TF.js";import"./Shield01-BtmolNEX.js";import"./Stars01-BokrMtLs.js";import"./Upload01-DpaPIldA.js";import"./User01-D4hBg_Hu.js";import"./Users01-BvUobvD9.js";import"./Zap-CqhsoaKj.js";import"./mcp-oauth-C8vYcOzg.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 Jt(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 Yt(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}=Jt(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 J;e[35]!==g||e[36]!==o||e[37]!==$||e[38]!==m||e[39]!==n.id||e[40]!==a?(J=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]=J):J=e[41];let y;e[42]!==H||e[43]!==J?(y=t.jsxs("div",{className:"flex items-center gap-2",children:[H,J]}),e[42]=H,e[43]=J,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 Y;e[62]!==I?(Y=t.jsx(Le,{children:I}),e[62]=I,e[63]=Y):Y=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]!==Y||e[70]!==Z?(u=t.jsxs(Fe,{children:[Y,Z]}),e[69]=Y,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),J=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&&J.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()},Y=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=>Y(f.id,G),onDelete:()=>C.requestDelete(f)})},f.id)}),E.map(u=>t.jsx(tn,{item:u,canManage:x,allConnections:p,connectedAppNames:J,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=Ye({strict:!1}),{data:l}=ke.useSession(),{stdioEnabled:c}=Ze(),o=Nt(),{granted:r}=Ce("connections:manage"),d=Yt({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 Y=i.getValues("env_vars")??[],ee=new Set(Y.map(u=>u.key)),Z=I.envVarKeys.filter(u=>!ee.has(u));Z.length>0&&i.setValue("env_vars",[...Y,...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}))},J=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}))]}]:[]]})]}),J]}),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 Js(){const s=re.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Je,{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{Js as default};
@@ -1 +1 @@
1
- import"./index-DYeIB67n.js";import{e as k}from"./backoff-CrEUbyZT.js";const v={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},h=Object.values(v),R="super-agent",S="task-board.item.updated",b="task-board.item.deleted",N=3e4,g=1e3;function O(n){const{buildUrl:d,eventTypes:u,name:a,crossTab:f=!1}=n,o=new Map,i=f&&typeof BroadcastChannel<"u"&&typeof navigator<"u"&&typeof navigator.locks<"u";if(i&&!a)throw new Error("createSSESubscription: `name` is required when crossTab");function l(e,t){e.bootDone=!0;for(const s of e.handlers)try{s(t)}catch{}}function p(e){for(const t of e.reconnectHandlers)try{t()}catch{}}function E(e){const t=new EventSource(d(e.key));e.es=t,t.onopen=()=>{e.reconnectAttempt=0,e.bootDone&&(p(e),e.channel?.postMessage({kind:"reconnect"})),e.bootDone=!0},t.onerror=()=>{e.es===t&&t.readyState===EventSource.CLOSED&&m(e)};const s=r=>{e.channel?.postMessage({kind:"event",type:r.type,data:r.data}),l(e,r)};for(const r of u)t.addEventListener(r,s)}function m(e){if(e.refCount<=0||e.reconnectTimer)return;const t=k(N,g,e.reconnectAttempt,2,0);e.reconnectAttempt++,e.reconnectTimer=setTimeout(()=>{e.reconnectTimer=null,!(e.refCount<=0||!e.isLeader)&&(e.es?.close(),E(e))},t)}function T(e){if(e.refCount<=0){e.releaseLeadership?.(),e.releaseLeadership=null;return}e.isLeader=!0,E(e)}function L(e){if(!i){T(e);return}e.lockAbort=new AbortController,navigator.locks.request(`sse-leader:${a}:${e.key}`,{signal:e.lockAbort.signal},()=>new Promise(t=>{e.releaseLeadership=t,T(e)})).catch(()=>{})}function w(e,t){t.kind==="event"?l(e,new MessageEvent(t.type,{data:t.data})):t.kind==="reconnect"&&p(e)}function D(e){const t=o.get(e);if(t)return t;const s={key:e,refCount:0,handlers:new Set,reconnectHandlers:new Set,bootDone:!1,es:null,isLeader:!1,reconnectAttempt:0,reconnectTimer:null,channel:null,lockAbort:null,releaseLeadership:null};if(o.set(e,s),i){const r=new BroadcastChannel(`sse:${a}:${e}`);r.onmessage=c=>w(s,c.data),s.channel=r}return L(s),s}function y(e){e.reconnectTimer&&(clearTimeout(e.reconnectTimer),e.reconnectTimer=null),e.es?.close(),e.es=null,e.releaseLeadership?.(),e.releaseLeadership=null,e.lockAbort?.abort(),e.lockAbort=null,e.channel?.close(),e.channel=null,o.delete(e.key)}return{subscribe(e,t,s){const r=D(e);r.refCount++,r.handlers.add(t),s&&r.reconnectHandlers.add(s);let c=!1;return()=>{c||(c=!0,r.handlers.delete(t),s&&r.reconnectHandlers.delete(s),r.refCount--,r.refCount<=0&&y(r))}}}}function A(n,d){const u=new Set(d);return{subscribe(a,f,o){const i=l=>{u.has(l.type)&&f(l)};return n.subscribe(a,i,o)}}}const _=[...h,S,b],M=_,P=_,C=O({name:"watch",buildUrl:n=>`/api/${encodeURIComponent(n)}/watch?types=${M.join(",")}`,eventTypes:P,crossTab:!0}),H=A(C,[...h]),U=A(C,[S,b]),V=H;export{v as D,R as S,b as T,V as d,U as t};
1
+ import"./index-DpilQfun.js";import{e as k}from"./backoff-CrEUbyZT.js";const v={STEP:"decopilot.step",FINISH:"decopilot.finish",THREAD_STATUS:"decopilot.thread.status"},h=Object.values(v),R="super-agent",S="task-board.item.updated",b="task-board.item.deleted",N=3e4,g=1e3;function O(n){const{buildUrl:d,eventTypes:u,name:a,crossTab:f=!1}=n,o=new Map,i=f&&typeof BroadcastChannel<"u"&&typeof navigator<"u"&&typeof navigator.locks<"u";if(i&&!a)throw new Error("createSSESubscription: `name` is required when crossTab");function l(e,t){e.bootDone=!0;for(const s of e.handlers)try{s(t)}catch{}}function p(e){for(const t of e.reconnectHandlers)try{t()}catch{}}function E(e){const t=new EventSource(d(e.key));e.es=t,t.onopen=()=>{e.reconnectAttempt=0,e.bootDone&&(p(e),e.channel?.postMessage({kind:"reconnect"})),e.bootDone=!0},t.onerror=()=>{e.es===t&&t.readyState===EventSource.CLOSED&&m(e)};const s=r=>{e.channel?.postMessage({kind:"event",type:r.type,data:r.data}),l(e,r)};for(const r of u)t.addEventListener(r,s)}function m(e){if(e.refCount<=0||e.reconnectTimer)return;const t=k(N,g,e.reconnectAttempt,2,0);e.reconnectAttempt++,e.reconnectTimer=setTimeout(()=>{e.reconnectTimer=null,!(e.refCount<=0||!e.isLeader)&&(e.es?.close(),E(e))},t)}function T(e){if(e.refCount<=0){e.releaseLeadership?.(),e.releaseLeadership=null;return}e.isLeader=!0,E(e)}function L(e){if(!i){T(e);return}e.lockAbort=new AbortController,navigator.locks.request(`sse-leader:${a}:${e.key}`,{signal:e.lockAbort.signal},()=>new Promise(t=>{e.releaseLeadership=t,T(e)})).catch(()=>{})}function w(e,t){t.kind==="event"?l(e,new MessageEvent(t.type,{data:t.data})):t.kind==="reconnect"&&p(e)}function D(e){const t=o.get(e);if(t)return t;const s={key:e,refCount:0,handlers:new Set,reconnectHandlers:new Set,bootDone:!1,es:null,isLeader:!1,reconnectAttempt:0,reconnectTimer:null,channel:null,lockAbort:null,releaseLeadership:null};if(o.set(e,s),i){const r=new BroadcastChannel(`sse:${a}:${e}`);r.onmessage=c=>w(s,c.data),s.channel=r}return L(s),s}function y(e){e.reconnectTimer&&(clearTimeout(e.reconnectTimer),e.reconnectTimer=null),e.es?.close(),e.es=null,e.releaseLeadership?.(),e.releaseLeadership=null,e.lockAbort?.abort(),e.lockAbort=null,e.channel?.close(),e.channel=null,o.delete(e.key)}return{subscribe(e,t,s){const r=D(e);r.refCount++,r.handlers.add(t),s&&r.reconnectHandlers.add(s);let c=!1;return()=>{c||(c=!0,r.handlers.delete(t),s&&r.reconnectHandlers.delete(s),r.refCount--,r.refCount<=0&&y(r))}}}}function A(n,d){const u=new Set(d);return{subscribe(a,f,o){const i=l=>{u.has(l.type)&&f(l)};return n.subscribe(a,i,o)}}}const _=[...h,S,b],M=_,P=_,C=O({name:"watch",buildUrl:n=>`/api/${encodeURIComponent(n)}/watch?types=${M.join(",")}`,eventTypes:P,crossTab:!0}),H=A(C,[...h]),U=A(C,[S,b]),V=H;export{v as D,R as S,b as T,V as d,U as t};
@@ -1 +1 @@
1
- import{c as n,j as i,cQ as u,m as c,H as m,cP as x,cR as j,cS as N,cU as b,d1 as D,cT as g}from"./index-DYeIB67n.js";import{i as h}from"./X-Bh26p_c_.js";function z(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(u,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(D,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(N,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function w(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(g,{"data-slot":"dialog-close",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(b,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(h,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(g,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function T(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let p;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(p=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(m,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function P(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function S(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(j,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{k as D,R as a,S as b,P as c,T as d,z as e,y as f,v as g,B as h,w as i};
1
+ import{c as n,j as i,cQ as u,m as c,H as m,cP as x,cR as j,cS as N,cU as b,d1 as D,cT as g}from"./index-DpilQfun.js";import{i as h}from"./X-VGSzytZl.js";function z(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(u,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(D,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(N,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function w(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(g,{"data-slot":"dialog-close",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(b,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(h,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(g,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function T(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let p;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(p=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(m,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=p):p=e[14],p}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function P(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function S(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(j,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{k as D,R as a,S as b,P as c,T as d,z as e,y as f,v as g,B as h,w as i};
@@ -1 +1 @@
1
- import{c as oe,b as ae,F as re,o as de,r as ce,K as ie,n as me,e as X,q as ge,t as N,j as s,B as te}from"./index-DYeIB67n.js";import{u as ue}from"./studio-tools-D5_ctnx0.js";import{b as fe,a as xe,S as Se}from"./settings-section-Vf4EaYEd.js";import{B as ne}from"./badge-apOb3dhn.js";import{I as je}from"./input-BMfSqTTQ.js";import{S as pe,a as he,b as Ne,c as ve,d as se}from"./select-DseJeXdX.js";function Me(e,t,o){switch(e){case"auto":return o("settings.domainSettings.joinModeHelpAuto",{domain:t});case"request":return o("settings.domainSettings.joinModeHelpRequest",{domain:t});default:return o("settings.domainSettings.joinModeHelpOff")}}function Re(){const e=oe.c(101),t=ae(),{org:o}=re(),p=de(),i=ue(),[r,v]=ce.useState("");let c;e[0]!==o.id?(c=ie.organizationDomains(o.id),e[0]=o.id,e[1]=c):c=e[1];let m;e[2]!==i?(m=()=>i.call("ORGANIZATION_DOMAIN_LIST",{}),e[2]=i,e[3]=m):m=e[3];let x;e[4]!==c||e[5]!==m?(x={queryKey:c,queryFn:m},e[4]=c,e[5]=m,e[6]=x):x=e[6];const{data:h,isPending:M}=me(x);let S;e[7]!==o.id||e[8]!==p?(S=()=>p.invalidateQueries({queryKey:ie.organizationDomains(o.id)}),e[7]=o.id,e[8]=p,e[9]=S):S=e[9];const a=S;let g;e[10]!==i?(g=n=>i.call("ORGANIZATION_DOMAIN_ADD",{domain:n}),e[10]=i,e[11]=g):g=e[11];let u;e[12]!==a||e[13]!==o.id||e[14]!==t?(u=()=>{ge("organization_domain_added",{organization_id:o.id}),v(""),a(),N.success(t("settings.domainSettings.domainAdded"))},e[12]=a,e[13]=o.id,e[14]=t,e[15]=u):u=e[15];let f;e[16]!==t?(f=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedAddDomain")),e[16]=t,e[17]=f):f=e[17];let j;e[18]!==g||e[19]!==u||e[20]!==f?(j={mutationFn:g,onSuccess:u,onError:f},e[18]=g,e[19]=u,e[20]=f,e[21]=j):j=e[21];const d=X(j);let I;e[22]!==i?(I=n=>{const{id:l,joinMode:D}=n;return i.call("ORGANIZATION_DOMAIN_UPDATE",{id:l,joinMode:D})},e[22]=i,e[23]=I):I=e[23];let A;e[24]!==a||e[25]!==t?(A=()=>{a(),N.success(t("settings.domainSettings.joinModeUpdated"))},e[24]=a,e[25]=t,e[26]=A):A=e[26];let b;e[27]!==t?(b=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedUpdate")),e[27]=t,e[28]=b):b=e[28];let U;e[29]!==b||e[30]!==I||e[31]!==A?(U={mutationFn:I,onSuccess:A,onError:b},e[29]=b,e[30]=I,e[31]=A,e[32]=U):U=e[32];const Q=X(U);let O;e[33]!==i?(O=n=>i.call("ORGANIZATION_DOMAIN_VERIFY",{id:n}),e[33]=i,e[34]=O):O=e[34];let y;e[35]!==a||e[36]!==t?(y=n=>{a(),n.verified?N.success(t("settings.domainSettings.domainVerified")):N.error(t("settings.domainSettings.txtRecordNotFound"))},e[35]=a,e[36]=t,e[37]=y):y=e[37];let E;e[38]!==t?(E=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedVerify")),e[38]=t,e[39]=E):E=e[39];let Y;e[40]!==O||e[41]!==y||e[42]!==E?(Y={mutationFn:O,onSuccess:y,onError:E},e[40]=O,e[41]=y,e[42]=E,e[43]=Y):Y=e[43];const R=X(Y);let C;e[44]!==i?(C=n=>i.call("ORGANIZATION_DOMAIN_REMOVE",{id:n}),e[44]=i,e[45]=C):C=e[45];let P;e[46]!==a||e[47]!==t?(P=()=>{a(),N.success(t("settings.domainSettings.domainRemoved"))},e[46]=a,e[47]=t,e[48]=P):P=e[48];let _;e[49]!==t?(_=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedRemove")),e[49]=t,e[50]=_):_=e[50];let $;e[51]!==C||e[52]!==P||e[53]!==_?($={mutationFn:C,onSuccess:P,onError:_},e[51]=C,e[52]=P,e[53]=_,e[54]=$):$=e[54];const T=X($);if(M)return null;let L;e[55]!==h?.domains?(L=h?.domains??[],e[55]=h?.domains,e[56]=L):L=e[56];const ee=L;let V;e[57]!==t?(V=t("settings.domainSettings.emailDomains"),e[57]=t,e[58]=V):V=e[58];let q;e[59]!==t?(q=t("settings.domainSettings.emailDomainsDescription"),e[59]=t,e[60]=q):q=e[60];let F;if(e[61]!==ee||e[62]!==T||e[63]!==t||e[64]!==Q||e[65]!==R){let n;e[67]!==T||e[68]!==t||e[69]!==Q||e[70]!==R?(n=l=>{const D=l.verificationStatus==="verified";return s.jsx(fe,{title:s.jsxs("span",{className:"flex items-center gap-2",children:[l.domain,D?s.jsx(ne,{variant:"secondary",children:t("settings.domainSettings.verified")}):s.jsx(ne,{variant:"outline",children:t("settings.domainSettings.pending")})]}),description:D?Me(l.joinMode,l.domain,t):t("settings.domainSettings.addDnsRecordInstruction"),action:s.jsxs("div",{className:"flex items-center gap-2",children:[D&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:t("settings.domainSettings.joinMode")}),s.jsxs(pe,{value:l.joinMode,onValueChange:le=>Q.mutate({id:l.id,joinMode:le}),children:[s.jsx(he,{className:"w-44",size:"sm",children:s.jsx(Ne,{})}),s.jsxs(ve,{children:[s.jsx(se,{value:"off",children:t("settings.domainSettings.joinModeOff")}),s.jsx(se,{value:"auto",children:t("settings.domainSettings.joinModeAuto")}),s.jsx(se,{value:"request",children:t("settings.domainSettings.joinModeRequest")})]})]})]}),!D&&s.jsx(te,{size:"sm",variant:"outline",onClick:()=>R.mutate(l.id),disabled:R.isPending,children:t("settings.domainSettings.verify")}),s.jsx(te,{size:"sm",variant:"ghost",onClick:()=>T.mutate(l.id),disabled:T.isPending,children:t("settings.domainSettings.remove")})]}),children:!D&&l.recordName&&l.recordValue&&s.jsx(Ie,{recordName:l.recordName,recordValue:l.recordValue})},l.id)},e[67]=T,e[68]=t,e[69]=Q,e[70]=R,e[71]=n):n=e[71],F=ee.map(n),e[61]=ee,e[62]=T,e[63]=t,e[64]=Q,e[65]=R,e[66]=F}else F=e[66];let J;e[72]===Symbol.for("react.memo_cache_sentinel")?(J=n=>v(n.target.value),e[72]=J):J=e[72];let k;e[73]!==t?(k=t("settings.domainSettings.domainPlaceholder"),e[73]=t,e[74]=k):k=e[74];let z;e[75]!==r||e[76]!==k?(z=s.jsx(je,{value:r,onChange:J,placeholder:k,className:"max-w-xs"}),e[75]=r,e[76]=k,e[77]=z):z=e[77];let w;e[78]!==d||e[79]!==r?(w=()=>d.mutate(r.trim()),e[78]=d,e[79]=r,e[80]=w):w=e[80];let G;e[81]!==d.isPending||e[82]!==r?(G=!r.trim()||d.isPending,e[81]=d.isPending,e[82]=r,e[83]=G):G=e[83];let Z;e[84]!==d.isPending||e[85]!==t?(Z=d.isPending?t("settings.domainSettings.adding"):t("settings.domainSettings.addDomain"),e[84]=d.isPending,e[85]=t,e[86]=Z):Z=e[86];let B;e[87]!==w||e[88]!==G||e[89]!==Z?(B=s.jsx(te,{size:"sm",onClick:w,disabled:G,children:Z}),e[87]=w,e[88]=G,e[89]=Z,e[90]=B):B=e[90];let H;e[91]!==z||e[92]!==B?(H=s.jsxs("div",{className:"flex items-center gap-2 p-4",children:[z,B]}),e[91]=z,e[92]=B,e[93]=H):H=e[93];let K;e[94]!==F||e[95]!==H?(K=s.jsxs(xe,{children:[F,H]}),e[94]=F,e[95]=H,e[96]=K):K=e[96];let W;return e[97]!==V||e[98]!==q||e[99]!==K?(W=s.jsx(Se,{title:V,description:q,children:K}),e[97]=V,e[98]=q,e[99]=K,e[100]=W):W=e[100],W}function Ie(e){const t=oe.c(34),{recordName:o,recordValue:p}=e,i=ae();let r;t[0]!==i?(r=I=>{navigator.clipboard?.writeText(I),N.success(i("settings.domainSettings.copied"))},t[0]=i,t[1]=r):r=t[1];const v=r;let c;t[2]!==i?(c=i("settings.domainSettings.dnsInstructions"),t[2]=i,t[3]=c):c=t[3];let m;t[4]!==c?(m=s.jsx("p",{className:"text-muted-foreground",children:c}),t[4]=c,t[5]=m):m=t[5];let x;t[6]!==v||t[7]!==o?(x=()=>v(o),t[6]=v,t[7]=o,t[8]=x):x=t[8];let h;t[9]!==i?(h=i("settings.domainSettings.txt"),t[9]=i,t[10]=h):h=t[10];let M;t[11]!==h?(M=s.jsxs("span",{className:"text-muted-foreground",children:[h," "]}),t[11]=h,t[12]=M):M=t[12];let S;t[13]!==o||t[14]!==x||t[15]!==M?(S=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:x,children:[M,o]}),t[13]=o,t[14]=x,t[15]=M,t[16]=S):S=t[16];let a;t[17]!==v||t[18]!==p?(a=()=>v(p),t[17]=v,t[18]=p,t[19]=a):a=t[19];let g;t[20]!==i?(g=i("settings.domainSettings.value"),t[20]=i,t[21]=g):g=t[21];let u;t[22]!==g?(u=s.jsxs("span",{className:"text-muted-foreground",children:[g," "]}),t[22]=g,t[23]=u):u=t[23];let f;t[24]!==p||t[25]!==u||t[26]!==a?(f=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:a,children:[u,p]}),t[24]=p,t[25]=u,t[26]=a,t[27]=f):f=t[27];let j;t[28]!==f||t[29]!==S?(j=s.jsxs("div",{className:"grid gap-1",children:[S,f]}),t[28]=f,t[29]=S,t[30]=j):j=t[30];let d;return t[31]!==j||t[32]!==m?(d=s.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-muted/40 p-3 text-xs space-y-2",children:[m,j]}),t[31]=j,t[32]=m,t[33]=d):d=t[33],d}export{Re as D};
1
+ import{c as oe,b as ae,F as re,o as de,r as ce,K as ie,n as me,e as X,q as ge,t as N,j as s,B as te}from"./index-DpilQfun.js";import{u as ue}from"./studio-tools-U4RADiUo.js";import{b as fe,a as xe,S as Se}from"./settings-section-CMmY57K7.js";import{B as ne}from"./badge-DULAZFFF.js";import{I as je}from"./input-CSsMFfg9.js";import{S as pe,a as he,b as Ne,c as ve,d as se}from"./select-DlRxxf5w.js";function Me(e,t,o){switch(e){case"auto":return o("settings.domainSettings.joinModeHelpAuto",{domain:t});case"request":return o("settings.domainSettings.joinModeHelpRequest",{domain:t});default:return o("settings.domainSettings.joinModeHelpOff")}}function Re(){const e=oe.c(101),t=ae(),{org:o}=re(),p=de(),i=ue(),[r,v]=ce.useState("");let c;e[0]!==o.id?(c=ie.organizationDomains(o.id),e[0]=o.id,e[1]=c):c=e[1];let m;e[2]!==i?(m=()=>i.call("ORGANIZATION_DOMAIN_LIST",{}),e[2]=i,e[3]=m):m=e[3];let x;e[4]!==c||e[5]!==m?(x={queryKey:c,queryFn:m},e[4]=c,e[5]=m,e[6]=x):x=e[6];const{data:h,isPending:M}=me(x);let S;e[7]!==o.id||e[8]!==p?(S=()=>p.invalidateQueries({queryKey:ie.organizationDomains(o.id)}),e[7]=o.id,e[8]=p,e[9]=S):S=e[9];const a=S;let g;e[10]!==i?(g=n=>i.call("ORGANIZATION_DOMAIN_ADD",{domain:n}),e[10]=i,e[11]=g):g=e[11];let u;e[12]!==a||e[13]!==o.id||e[14]!==t?(u=()=>{ge("organization_domain_added",{organization_id:o.id}),v(""),a(),N.success(t("settings.domainSettings.domainAdded"))},e[12]=a,e[13]=o.id,e[14]=t,e[15]=u):u=e[15];let f;e[16]!==t?(f=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedAddDomain")),e[16]=t,e[17]=f):f=e[17];let j;e[18]!==g||e[19]!==u||e[20]!==f?(j={mutationFn:g,onSuccess:u,onError:f},e[18]=g,e[19]=u,e[20]=f,e[21]=j):j=e[21];const d=X(j);let I;e[22]!==i?(I=n=>{const{id:l,joinMode:D}=n;return i.call("ORGANIZATION_DOMAIN_UPDATE",{id:l,joinMode:D})},e[22]=i,e[23]=I):I=e[23];let A;e[24]!==a||e[25]!==t?(A=()=>{a(),N.success(t("settings.domainSettings.joinModeUpdated"))},e[24]=a,e[25]=t,e[26]=A):A=e[26];let b;e[27]!==t?(b=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedUpdate")),e[27]=t,e[28]=b):b=e[28];let U;e[29]!==b||e[30]!==I||e[31]!==A?(U={mutationFn:I,onSuccess:A,onError:b},e[29]=b,e[30]=I,e[31]=A,e[32]=U):U=e[32];const Q=X(U);let O;e[33]!==i?(O=n=>i.call("ORGANIZATION_DOMAIN_VERIFY",{id:n}),e[33]=i,e[34]=O):O=e[34];let y;e[35]!==a||e[36]!==t?(y=n=>{a(),n.verified?N.success(t("settings.domainSettings.domainVerified")):N.error(t("settings.domainSettings.txtRecordNotFound"))},e[35]=a,e[36]=t,e[37]=y):y=e[37];let E;e[38]!==t?(E=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedVerify")),e[38]=t,e[39]=E):E=e[39];let Y;e[40]!==O||e[41]!==y||e[42]!==E?(Y={mutationFn:O,onSuccess:y,onError:E},e[40]=O,e[41]=y,e[42]=E,e[43]=Y):Y=e[43];const R=X(Y);let C;e[44]!==i?(C=n=>i.call("ORGANIZATION_DOMAIN_REMOVE",{id:n}),e[44]=i,e[45]=C):C=e[45];let P;e[46]!==a||e[47]!==t?(P=()=>{a(),N.success(t("settings.domainSettings.domainRemoved"))},e[46]=a,e[47]=t,e[48]=P):P=e[48];let _;e[49]!==t?(_=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedRemove")),e[49]=t,e[50]=_):_=e[50];let $;e[51]!==C||e[52]!==P||e[53]!==_?($={mutationFn:C,onSuccess:P,onError:_},e[51]=C,e[52]=P,e[53]=_,e[54]=$):$=e[54];const T=X($);if(M)return null;let L;e[55]!==h?.domains?(L=h?.domains??[],e[55]=h?.domains,e[56]=L):L=e[56];const ee=L;let V;e[57]!==t?(V=t("settings.domainSettings.emailDomains"),e[57]=t,e[58]=V):V=e[58];let q;e[59]!==t?(q=t("settings.domainSettings.emailDomainsDescription"),e[59]=t,e[60]=q):q=e[60];let F;if(e[61]!==ee||e[62]!==T||e[63]!==t||e[64]!==Q||e[65]!==R){let n;e[67]!==T||e[68]!==t||e[69]!==Q||e[70]!==R?(n=l=>{const D=l.verificationStatus==="verified";return s.jsx(fe,{title:s.jsxs("span",{className:"flex items-center gap-2",children:[l.domain,D?s.jsx(ne,{variant:"secondary",children:t("settings.domainSettings.verified")}):s.jsx(ne,{variant:"outline",children:t("settings.domainSettings.pending")})]}),description:D?Me(l.joinMode,l.domain,t):t("settings.domainSettings.addDnsRecordInstruction"),action:s.jsxs("div",{className:"flex items-center gap-2",children:[D&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:t("settings.domainSettings.joinMode")}),s.jsxs(pe,{value:l.joinMode,onValueChange:le=>Q.mutate({id:l.id,joinMode:le}),children:[s.jsx(he,{className:"w-44",size:"sm",children:s.jsx(Ne,{})}),s.jsxs(ve,{children:[s.jsx(se,{value:"off",children:t("settings.domainSettings.joinModeOff")}),s.jsx(se,{value:"auto",children:t("settings.domainSettings.joinModeAuto")}),s.jsx(se,{value:"request",children:t("settings.domainSettings.joinModeRequest")})]})]})]}),!D&&s.jsx(te,{size:"sm",variant:"outline",onClick:()=>R.mutate(l.id),disabled:R.isPending,children:t("settings.domainSettings.verify")}),s.jsx(te,{size:"sm",variant:"ghost",onClick:()=>T.mutate(l.id),disabled:T.isPending,children:t("settings.domainSettings.remove")})]}),children:!D&&l.recordName&&l.recordValue&&s.jsx(Ie,{recordName:l.recordName,recordValue:l.recordValue})},l.id)},e[67]=T,e[68]=t,e[69]=Q,e[70]=R,e[71]=n):n=e[71],F=ee.map(n),e[61]=ee,e[62]=T,e[63]=t,e[64]=Q,e[65]=R,e[66]=F}else F=e[66];let J;e[72]===Symbol.for("react.memo_cache_sentinel")?(J=n=>v(n.target.value),e[72]=J):J=e[72];let k;e[73]!==t?(k=t("settings.domainSettings.domainPlaceholder"),e[73]=t,e[74]=k):k=e[74];let z;e[75]!==r||e[76]!==k?(z=s.jsx(je,{value:r,onChange:J,placeholder:k,className:"max-w-xs"}),e[75]=r,e[76]=k,e[77]=z):z=e[77];let w;e[78]!==d||e[79]!==r?(w=()=>d.mutate(r.trim()),e[78]=d,e[79]=r,e[80]=w):w=e[80];let G;e[81]!==d.isPending||e[82]!==r?(G=!r.trim()||d.isPending,e[81]=d.isPending,e[82]=r,e[83]=G):G=e[83];let Z;e[84]!==d.isPending||e[85]!==t?(Z=d.isPending?t("settings.domainSettings.adding"):t("settings.domainSettings.addDomain"),e[84]=d.isPending,e[85]=t,e[86]=Z):Z=e[86];let B;e[87]!==w||e[88]!==G||e[89]!==Z?(B=s.jsx(te,{size:"sm",onClick:w,disabled:G,children:Z}),e[87]=w,e[88]=G,e[89]=Z,e[90]=B):B=e[90];let H;e[91]!==z||e[92]!==B?(H=s.jsxs("div",{className:"flex items-center gap-2 p-4",children:[z,B]}),e[91]=z,e[92]=B,e[93]=H):H=e[93];let K;e[94]!==F||e[95]!==H?(K=s.jsxs(xe,{children:[F,H]}),e[94]=F,e[95]=H,e[96]=K):K=e[96];let W;return e[97]!==V||e[98]!==q||e[99]!==K?(W=s.jsx(Se,{title:V,description:q,children:K}),e[97]=V,e[98]=q,e[99]=K,e[100]=W):W=e[100],W}function Ie(e){const t=oe.c(34),{recordName:o,recordValue:p}=e,i=ae();let r;t[0]!==i?(r=I=>{navigator.clipboard?.writeText(I),N.success(i("settings.domainSettings.copied"))},t[0]=i,t[1]=r):r=t[1];const v=r;let c;t[2]!==i?(c=i("settings.domainSettings.dnsInstructions"),t[2]=i,t[3]=c):c=t[3];let m;t[4]!==c?(m=s.jsx("p",{className:"text-muted-foreground",children:c}),t[4]=c,t[5]=m):m=t[5];let x;t[6]!==v||t[7]!==o?(x=()=>v(o),t[6]=v,t[7]=o,t[8]=x):x=t[8];let h;t[9]!==i?(h=i("settings.domainSettings.txt"),t[9]=i,t[10]=h):h=t[10];let M;t[11]!==h?(M=s.jsxs("span",{className:"text-muted-foreground",children:[h," "]}),t[11]=h,t[12]=M):M=t[12];let S;t[13]!==o||t[14]!==x||t[15]!==M?(S=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:x,children:[M,o]}),t[13]=o,t[14]=x,t[15]=M,t[16]=S):S=t[16];let a;t[17]!==v||t[18]!==p?(a=()=>v(p),t[17]=v,t[18]=p,t[19]=a):a=t[19];let g;t[20]!==i?(g=i("settings.domainSettings.value"),t[20]=i,t[21]=g):g=t[21];let u;t[22]!==g?(u=s.jsxs("span",{className:"text-muted-foreground",children:[g," "]}),t[22]=g,t[23]=u):u=t[23];let f;t[24]!==p||t[25]!==u||t[26]!==a?(f=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:a,children:[u,p]}),t[24]=p,t[25]=u,t[26]=a,t[27]=f):f=t[27];let j;t[28]!==f||t[29]!==S?(j=s.jsxs("div",{className:"grid gap-1",children:[S,f]}),t[28]=f,t[29]=S,t[30]=j):j=t[30];let d;return t[31]!==j||t[32]!==m?(d=s.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-muted/40 p-3 text-xs space-y-2",children:[m,j]}),t[31]=j,t[32]=m,t[33]=d):d=t[33],d}export{Re as D};
@@ -1 +1 @@
1
- import{c as d,j as s,cv as i,m as c}from"./index-DYeIB67n.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(w,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(m,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,g as a,D as b,h as c,N as d,b as e,j as f,v as g};
1
+ import{c as d,j as s,cv as i,m as c}from"./index-DpilQfun.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(w,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(m,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,g as a,D as b,h as c,N as d,b as e,j as f,v as g};
@@ -1 +1 @@
1
- import{c,j as i,dH as f,dI as m,m as u,dJ as g,dK as x,dL as v,dM as b,dN as h,dO as w,dP as j,dQ as N,dR as z,dS as _,dT as y,dU as p}from"./index-DYeIB67n.js";import{i as $}from"./Check-v7RELOdt.js";import{i as D}from"./ChevronRight-DbXDEcIM.js";import{i as M}from"./DotsVertical-CzPA758X.js";function C(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function L(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,sideOffset:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===void 0?4:o;let r;e[4]!==t?(r=u("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-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==r?(d=i.jsx(x,{children:i.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=d):d=e[9],d}function O(a){const e=c.c(12);let t,s,o,n;e[0]!==a?({className:t,inset:s,variant:n,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);const r=n===void 0?"default":n;let d;e[5]!==t?(d=u("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-pointer items-center gap-2 rounded-lg 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",t),e[5]=t,e[6]=d):d=e[6];let l;return e[7]!==s||e[8]!==o||e[9]!==d||e[10]!==r?(l=i.jsx(g,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:d,...o}),e[7]=s,e[8]=o,e[9]=d,e[10]=r,e[11]=l):l=e[11],l}function E(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:o,children:s,checked:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx($,{className:"size-4"})})}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(l=i.jsxs(h,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[d,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function G(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(_,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(a){const e=c.c(11);let t,s,o;e[0]!==a?({className:s,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let d;return e[7]!==t||e[8]!==o||e[9]!==n?(d=i.jsxs(y,{"data-slot":"dropdown-menu-radio-item",className:n,...o,children:[r,t]}),e[7]=t,e[8]=o,e[9]=n,e[10]=d):d=e[10],d}function H(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,inset:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=i.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...o}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function J(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(w,{"data-slot":"dropdown-menu-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function K(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function Q(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:s,inset:o,children:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(D,{className:"ml-auto size-4"}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==o||e[10]!==n||e[11]!==r?(l=i.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r,...n,children:[t,d]}),e[8]=t,e[9]=o,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function U(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("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 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(z,{"data-slot":"dropdown-menu-sub-content",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}export{T as D,O as a,L as b,C as c,H as d,K as e,Q as f,U as g,G as h,P as i,J as j,E as k};
1
+ import{c,j as i,dH as f,dI as m,m as u,dJ as g,dK as x,dL as v,dM as b,dN as h,dO as w,dP as j,dQ as N,dR as z,dS as _,dT as y,dU as p}from"./index-DpilQfun.js";import{i as $}from"./Check-D6GdbR4I.js";import{i as D}from"./ChevronRight-uNgVNjin.js";import{i as M}from"./DotsVertical-OkDBD_s_.js";function C(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function L(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,sideOffset:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===void 0?4:o;let r;e[4]!==t?(r=u("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-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==r?(d=i.jsx(x,{children:i.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=d):d=e[9],d}function O(a){const e=c.c(12);let t,s,o,n;e[0]!==a?({className:t,inset:s,variant:n,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);const r=n===void 0?"default":n;let d;e[5]!==t?(d=u("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-pointer items-center gap-2 rounded-lg 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",t),e[5]=t,e[6]=d):d=e[6];let l;return e[7]!==s||e[8]!==o||e[9]!==d||e[10]!==r?(l=i.jsx(g,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:d,...o}),e[7]=s,e[8]=o,e[9]=d,e[10]=r,e[11]=l):l=e[11],l}function E(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:o,children:s,checked:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx($,{className:"size-4"})})}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(l=i.jsxs(h,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[d,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function G(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(_,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(a){const e=c.c(11);let t,s,o;e[0]!==a?({className:s,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let d;return e[7]!==t||e[8]!==o||e[9]!==n?(d=i.jsxs(y,{"data-slot":"dropdown-menu-radio-item",className:n,...o,children:[r,t]}),e[7]=t,e[8]=o,e[9]=n,e[10]=d):d=e[10],d}function H(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,inset:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=i.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...o}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function J(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(w,{"data-slot":"dropdown-menu-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function K(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function Q(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:s,inset:o,children:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(D,{className:"ml-auto size-4"}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==o||e[10]!==n||e[11]!==r?(l=i.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r,...n,children:[t,d]}),e[8]=t,e[9]=o,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function U(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("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 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(z,{"data-slot":"dropdown-menu-sub-content",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}export{T as D,O as a,L as b,C as c,H as d,K as e,Q as f,U as g,G as h,P as i,J as j,E as k};
@@ -1 +1 @@
1
- import{c as v,m as N,j as t}from"./index-DYeIB67n.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-center text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
1
+ import{c as v,m as N,j as t}from"./index-DpilQfun.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-center text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
@@ -1 +1 @@
1
- import"./index-DYeIB67n.js";import{W as T,j as O}from"./use-mcp-client-931-8a80.js";function x(t){if(!t)return null;const e=typeof t=="string"?t:t.url;if(!e)return null;const n=e.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function U(t){const e=x(t);if(!e)return null;const n=`https://github.com/${e.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function H(t,e){return t===T.REGISTRY(e)||t===T.COMMUNITY_REGISTRY(e)}function q(t,e){return H(t,e)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function B(t){if(!t)return[];const e=[];for(const n of t){let a=[];if(Array.isArray(n))a=n;else if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(o=>Array.isArray(n[o]));r&&(a=n[r])}e.push(...a)}return e}const D={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function L(t){return t?D[t]??t.toUpperCase():null}function J(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const e=Object.keys(t).find(n=>Array.isArray(t[n]));if(e)return t[e]}return[]}async function Q(t,e,n,a,r){const o=await O({connectionId:t,orgId:e,orgSlug:n});try{const s=await o.callTool({name:a,arguments:r});return s.structuredContent??s}finally{await o.close().catch(console.error)}}const Y="mcp.mesh";let j="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",G=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=j[n[t]&63];return e};function $(t){return`${t}_${G()}`}function K(t){return t._meta?.["mcp.mesh"]?.appName||t.server?.name||null}function V(t){if(!t?.url)return"Unknown";try{return new URL(t.url).hostname}catch{return t.url}}function W(t){const e=t?.identifier||t?.name;return e?e.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase()):"Unknown"}function X(t,e,n,a){const r=t.server,o=t._meta?.[Y],s=new Date().toISOString(),I=o?.friendlyName||o?.friendly_name||t.title||r?.title||r?.name||"Unnamed MCP Server",C=r?.description||null,R=r?.icons?.[0]?.src||U(r?.repository)||null,i=o?.oauth_config,k=i&&typeof i.authorizationEndpoint=="string"&&typeof i.tokenEndpoint=="string"&&typeof i.clientId=="string"&&Array.isArray(i.scopes)&&(i.grantType==="authorization_code"||i.grantType==="client_credentials")?i:null,w=o?.configuration_state,A=o?.configuration_scopes,P=r?.repository?{url:r.repository.url,source:r.repository.source,subfolder:r.repository.subfolder}:null,p=r?.packages??[],g=r?.remotes??[],S=a?.packageIndex??0,v=a?.remoteIndex??0,y=p.length>0&&(a?.packageIndex!==void 0||g.length===0),c=y?p[S]:null,l=y?null:g[v];let u,f,_=null;if(c){const h=c.identifier||c.name;u="STDIO",f="";const m={};if(c.environmentVariables)for(const b of c.environmentVariables)b.name&&(m[b.name]="");_={command:"npx",args:h?["-y",h]:[],...Object.keys(m).length>0&&{envVars:m}}}else l?(u=L(l.type)||"HTTP",f=l.url||""):(u="HTTP",f="");const M=g.length>1,N=p.length>1;let d="";c&&N?d=` (${W(c)})`:l&&M&&(d=` (${V(l)})`);const E=I+d;return{id:$("conn"),title:E,description:C,icon:R,app_name:K(t),app_id:o?.id||t.id||null,connection_type:u,connection_url:f,connection_token:null,connection_headers:_,oauth_config:k,configuration_state:w??null,configuration_scopes:A??null,metadata:{source:"store",registry_item_id:t.id,verified:o?.verified??!1,scopeName:o?.scopeName??null,toolsCount:o?.tools?.length??0,publishedAt:o?.publishedAt??null,repository:P},created_at:s,updated_at:s,created_by:n,organization_id:e,tools:null,bindings:null,status:"inactive"}}export{K as a,U as b,Q as c,J as d,X as e,B as f,$ as g,q as i};
1
+ import"./index-DpilQfun.js";import{W as T,j as O}from"./use-mcp-client-Bk4HndfL.js";function x(t){if(!t)return null;const e=typeof t=="string"?t:t.url;if(!e)return null;const n=e.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function U(t){const e=x(t);if(!e)return null;const n=`https://github.com/${e.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function H(t,e){return t===T.REGISTRY(e)||t===T.COMMUNITY_REGISTRY(e)}function q(t,e){return H(t,e)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function B(t){if(!t)return[];const e=[];for(const n of t){let a=[];if(Array.isArray(n))a=n;else if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(o=>Array.isArray(n[o]));r&&(a=n[r])}e.push(...a)}return e}const D={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function L(t){return t?D[t]??t.toUpperCase():null}function J(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const e=Object.keys(t).find(n=>Array.isArray(t[n]));if(e)return t[e]}return[]}async function Q(t,e,n,a,r){const o=await O({connectionId:t,orgId:e,orgSlug:n});try{const s=await o.callTool({name:a,arguments:r});return s.structuredContent??s}finally{await o.close().catch(console.error)}}const Y="mcp.mesh";let j="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",G=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=j[n[t]&63];return e};function $(t){return`${t}_${G()}`}function K(t){return t._meta?.["mcp.mesh"]?.appName||t.server?.name||null}function V(t){if(!t?.url)return"Unknown";try{return new URL(t.url).hostname}catch{return t.url}}function W(t){const e=t?.identifier||t?.name;return e?e.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase()):"Unknown"}function X(t,e,n,a){const r=t.server,o=t._meta?.[Y],s=new Date().toISOString(),I=o?.friendlyName||o?.friendly_name||t.title||r?.title||r?.name||"Unnamed MCP Server",C=r?.description||null,R=r?.icons?.[0]?.src||U(r?.repository)||null,i=o?.oauth_config,k=i&&typeof i.authorizationEndpoint=="string"&&typeof i.tokenEndpoint=="string"&&typeof i.clientId=="string"&&Array.isArray(i.scopes)&&(i.grantType==="authorization_code"||i.grantType==="client_credentials")?i:null,w=o?.configuration_state,A=o?.configuration_scopes,P=r?.repository?{url:r.repository.url,source:r.repository.source,subfolder:r.repository.subfolder}:null,p=r?.packages??[],g=r?.remotes??[],S=a?.packageIndex??0,v=a?.remoteIndex??0,y=p.length>0&&(a?.packageIndex!==void 0||g.length===0),c=y?p[S]:null,l=y?null:g[v];let u,f,_=null;if(c){const h=c.identifier||c.name;u="STDIO",f="";const m={};if(c.environmentVariables)for(const b of c.environmentVariables)b.name&&(m[b.name]="");_={command:"npx",args:h?["-y",h]:[],...Object.keys(m).length>0&&{envVars:m}}}else l?(u=L(l.type)||"HTTP",f=l.url||""):(u="HTTP",f="");const M=g.length>1,N=p.length>1;let d="";c&&N?d=` (${W(c)})`:l&&M&&(d=` (${V(l)})`);const E=I+d;return{id:$("conn"),title:E,description:C,icon:R,app_name:K(t),app_id:o?.id||t.id||null,connection_type:u,connection_url:f,connection_token:null,connection_headers:_,oauth_config:k,configuration_state:w??null,configuration_scopes:A??null,metadata:{source:"store",registry_item_id:t.id,verified:o?.verified??!1,scopeName:o?.scopeName??null,toolsCount:o?.tools?.length??0,publishedAt:o?.publishedAt??null,repository:P},created_at:s,updated_at:s,created_by:n,organization_id:e,tools:null,bindings:null,status:"inactive"}}export{K as a,U as b,Q as c,J as d,X as e,B as f,$ as g,q as i};
@@ -0,0 +1,2 @@
1
+ import{c as se,b as Me,r as u,j as r,k as fe,B as De,e5 as Jt,aE as Zt,aK as xe,e6 as en,e7 as tn,e8 as nn,e9 as rn,bO as on,ea as sn,eb as lt,aG 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-DpilQfun.js";import{F as bn,l as yn}from"./index-B9DlL8k-.js";import{h as vn,aM as Cn,aN as wn}from"./agent-icon-DMZAt2Uh.js";import{s as Nn}from"./XClose-BNJzonJr.js";import{m as jn}from"./automation-runs-BVUBG_RU.js";import{b as et,T as tt,a as nt}from"./tooltip-aaAmqyHo.js";import{b as En}from"./chat-context-Da_84I2B.js";import{u as Sn}from"./shell-layout-CenMkbdE.js";import{s as we,a as rt,f as Dn}from"./index-DYQm3FTg.js";import{b as Mn,h as Rn,a as Tn,c as Pn,d as kn,e as Fn}from"./dialog-C0AL3-8S.js";import{I as ot}from"./input-CSsMFfg9.js";import{A as An,a as On,b as Ln,c as In,g as Kn,d as $n,e as zn,f as _n}from"./alert-dialog-PlJhWC48.js";import{t as Gn}from"./ChevronDown-4cuZsfzy.js";import{i as Bn}from"./ChevronRight-uNgVNjin.js";import{a as Vn}from"./ZoomOut-BagALrDp.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-dP4PKeVv.js";import"./AlertCircle--e-APunV.js";import"./Tool01-u6wU5YhX.js";import"./ArrowUp-irl2Q9OR.js";import"./Settings02-D3msR2RR.js";import"./Tool02-CrBVuo4X.js";import"./ArrowRight-DJXBU-T5.js";import"./ArrowUpRight-BqMMw1JV.js";import"./TrendUp01-Cy4g6Lry.js";import"./ZapSquare-CNxfW2JL.js";import"./Users03-VX1_a9JA.js";import"./CheckCircle-CtjbHwoA.js";import"./Check-D6GdbR4I.js";import"./ChevronUp-BvsNvVZH.js";import"./DotsVertical-OkDBD_s_.js";import"./Stars02-B8Uwf0MU.js";import"./Copy01-DvFCAKsU.js";import"./Globe01-DScq2VNA.js";import"./Eye-MAMMhwRT.js";import"./FilterLines-BVm626t8.js";import"./Star01-H_yHEnrH.js";import"./Globe04-ByEsTZ8T.js";import"./SwitchHorizontal01-DOTwKFaA.js";import"./HardDrive-zm2yap3B.js";import"./Image01-C0GNpvK1.js";import"./Key01-DJ4gQ1TV.js";import"./LayoutLeft-J8z6WfAh.js";import"./XCircle-2y3xLmXS.js";import"./LinkExternal01-Dl8BS__Q.js";import"./Monitor01-vVkHhoRh.js";import"./Sun-DOJPhnNP.js";import"./Package-Bg8rwG2C.js";import"./Palette-N68aUpPy.js";import"./Play-DZJf-8dU.js";import"./Plus-Bdk1y4cj.js";import"./SearchLg-CFIaS6TF.js";import"./SearchMd-BWUcwFIi.js";import"./Shield01-BtmolNEX.js";import"./Stars01-BokrMtLs.js";import"./Trash01-D2sghzIU.js";import"./Upload01-DpaPIldA.js";import"./User01-D4hBg_Hu.js";import"./Users01-BvUobvD9.js";import"./X-VGSzytZl.js";import"./Zap-CqhsoaKj.js";import"./select-DlRxxf5w.js";import"./useInfiniteQuery-DAw7B-rc.js";import"./use-infinite-scroll-D0ZL_mCX.js";import"./use-connection-BGFxuyJJ.js";import"./use-mcp-client-Bk4HndfL.js";import"./auth-DbyuXT2e.js";import"./use-virtual-mcp-OMZ-RvdW.js";import"./card-DqQH784H.js";import"./sidebar-DpNkbM2u.js";import"./use-mobile-GsjJypvY.js";import"./table-Bd0-ZE0n.js";import"./empty-state-BwM1mU6-.js";import"./use-members-upDn0JWj.js";import"./use-org-auth-client-DfKaNnwb.js";import"./use-clock-tick-BUqe3O4p.js";import"./use-automations-BT6VdJQ8.js";import"./studio-tools-U4RADiUo.js";import"./useSuspenseInfiniteQuery-368_wIWg.js";import"./avatar-DEpQs9of.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-tGx7B0vh.js";import"./file-type-icon-B7itLm8r.js";import"./tab-id-BijBBRwE.js";import"./hooks-DgGDTTP5.js";import"./decopilot-sse-pool-xmC_rSsF.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./monaco-editor-ABQcmWHX.js";import"./index-J2FKXyQM.js";import"./calendar-C-EOkOWX.js";import"./integration-icon-PQTBWyVV.js";import"./use-navigate-to-agent-O68cJ7eJ.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-D0NRXvs-.js";import"./form-BdudoBnK.js";import"./label-BQRcmRqk.js";import"./autosend-DDUBRcnI.js";import"./use-ai-providers-C2aRb-bK.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-fQTpcP9Y.js";import"./use-organization-settings-D9pViY9F.js";import"./required-auth-layout-KsDsuaNM.js";import"./use-org-sso-CsOYvikS.js";import"./drawer-CAYQiIMG.js";import"./collection-search-B9VsoZ_Z.js";import"./index-Cso-ifyF.js";import"./get-initials-D-f_fDFw.js";import"./popover-mISV94ut.js";import"./use-registry-app-Cod7L2oA.js";import"./use-mcp-tools-BzMFwcra.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-Du-9MXQ4.js";import"./mcp-oauth-C8vYcOzg.js";import"./extract-connection-data-CzK_UwNp.js";import"./dropdown-menu-BApub22c.js";import"./command-cmEpDjr1.js";import"./index-cXFL5KC5.js";import"./companions-core-qe3kgGWa.js";import"./tabs-AMoU7Lmz.js";import"./toggle-group-CFZ2-feA.js";import"./use-deco-credits-DWuN-GxC.js";import"./connection-card-CCvG4Vj3.js";import"./use-registry-connections-BM1uCarE.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-ClvpLD-s.js";import"./connection-form-helpers-B0uJubqv.js";import"./collection-tabs-Bt8TULCp.js";import"./badge-DULAZFFF.js";import"./connect-desktop-dialog-B2_LgaCY.js";import"./select-model-8R0n-i_V.js";import"./checkbox-CKd5zJDg.js";import"./skeleton-ChIqbBsA.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CMmY57K7.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-QbNKDQOU.js";import"./toolbar-DvMgIrqt.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-CiWAQCb4.js";import"./toolbar-icon-button-CKM3SF5Q.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-CopojzAG.js";import"./use-debounced-autosave-g3wrnhxW.js";import"./index-BspKnphB.js";import"./search-input-BIjq6ayG.js";import"./switch-52G9QiOE.js";import"./github-repo-picker-0ouXzVNP.js";import"./use-debounced-value-BtKeCAA7.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-CPQkfHLX.js";import"./useQueries-CxTUWa0R.js";import"./use-file-configs-BATxq5w6.js";import"./automation-list-row-D_xAW0fs.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:v}=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]!==v?(b=_=>{!_&&!d&&v(!1)},e[0]=d,e[1]=v,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]!==v?(q=()=>v(!1),e[41]=v,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(),v=s?.kind==="directory",j=s!==null,d=v?"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]!==v||e[10]!==f?(y=v?f("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=v,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),v=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,{...v,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}),v=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:v}),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",vr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(fn,{...l,...a,ref:e})});vr.displayName=yr;var Cr="ContextMenuItemIndicator",wr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(pn,{...l,...a,ref:e})});wr.displayName=Cr;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 v;return e[7]!==a||e[8]!==l||e[9]!==f||e[10]!==h?(v=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]=v):v=e[11],v}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:v,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]!==v||e[5]!==j?(N=()=>{j(),v()},e[4]=v,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:v,segments:j}=Yn(s,a);l="truncate font-mono text-muted-foreground",m=v&&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,[v,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 ve(){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 vt(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,...C}=c;return C}),ge.invalidateQueries({queryKey:Ze.liveMeta(i,e,s)})}function Ct(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)vt(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 C=t(c);C&&o.set(C,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 ve(),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 ve(),oe(null),j(p=>{const C=new Set(p);for(const ce of Ie(o))C.add(ce);return C.add(o),C}),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(C=>C===o?p:C.startsWith(`${o}/`)?Ee(p,C.slice(o.length+1)):C),await pe(),await ve(),oe(null)}async function Dt(t,n){ye(!0);try{await ie("unlink",{path:re(n.path),recursive:n.kind==="directory"}),Ct(n),Nt(n.path),await pe(),await ve(),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 C=n?rr(p.files,p.directories,t,p.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return c=!!C.truncated,{files:C.files,directories:C.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}),C=Ve(p,!0,o);return!C&&o===K.current&&ee(ce=>{const Ce=new Set(ce);return Ce.add(t),Ce}),C})();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 C=new Map(p);return C.set(t,{savedContent:c,editorValue:c,loaded:!0}),C})}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,v),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(vn,{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(Cn,{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=v.has(n.path),C=g?.path===n.path,ce=Xn(n.path,n.kind),Ce=c&&Y.has(n.path);return r.jsx(zr,{node:n,depth:o,isExpanded:p,isSelected:C,isLoading:Ce,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),C=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",C&&"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:C=>{C.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};