decocms 4.17.1 → 4.18.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 (237) hide show
  1. package/dist/client/assets/{AlertCircle-CWgtpDgs.js → AlertCircle-Cq24_c-o.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-O2h0Esun.js → ArrowUpRight-ClwqpF9i.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-CzbMe8sq.js → CheckCircle-PV8cYNfz.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-B0d3gCJ4.js → ChevronDown-BcFakGFK.js} +1 -1
  5. package/dist/client/assets/{ChevronRight-D8G4YOXh.js → ChevronRight-Bc7TkKo_.js} +1 -1
  6. package/dist/client/assets/{ChevronUp-2KGxjR7x.js → ChevronUp-CAyCvjRf.js} +1 -1
  7. package/dist/client/assets/{DotsVertical-B-sq-ide.js → DotsVertical-BZ79m9bZ.js} +1 -1
  8. package/dist/client/assets/{Eye-DmGPRR_e.js → Eye-CVTjrdPN.js} +1 -1
  9. package/dist/client/assets/{FilterLines-DEMLsHE0.js → FilterLines-Dn-zRhq9.js} +1 -1
  10. package/dist/client/assets/{Globe01-DO0D_c2f.js → Globe01-CINX7XLh.js} +1 -1
  11. package/dist/client/assets/{Globe04-XJoX6kmZ.js → Globe04-BacMVcAF.js} +1 -1
  12. package/dist/client/assets/{HardDrive-BICUWfOq.js → HardDrive-CfVRvrF-.js} +1 -1
  13. package/dist/client/assets/{Key01-BtQzPiv-.js → Key01-awLJepSc.js} +1 -1
  14. package/dist/client/assets/{LayoutLeft-Bi6Cd7VR.js → LayoutLeft-Bgn0Zg5G.js} +1 -1
  15. package/dist/client/assets/{LinkExternal01-CB818nxD.js → LinkExternal01-D60A4jNL.js} +1 -1
  16. package/dist/client/assets/{Monitor01-DG_zJQKB.js → Monitor01-oM90habT.js} +1 -1
  17. package/dist/client/assets/{Palette-D5uFHHtD.js → Palette-mFlZKLgw.js} +1 -1
  18. package/dist/client/assets/{Play-8mfsN5e2.js → Play-B2PQHuS4.js} +1 -1
  19. package/dist/client/assets/{Plus-tW6PYhLA.js → Plus-BDlCzerf.js} +1 -1
  20. package/dist/client/assets/{SearchLg-BRB4E-a6.js → SearchLg-fYAuFx6T.js} +1 -1
  21. package/dist/client/assets/{SearchMd-DCtxyy_L.js → SearchMd-CrBda7dI.js} +1 -1
  22. package/dist/client/assets/{Settings02-CYQjLDZe.js → Settings02-C2Ys_yfp.js} +1 -1
  23. package/dist/client/assets/{Shield01-BmIMMGLU.js → Shield01-xKplN1D6.js} +1 -1
  24. package/dist/client/assets/{Star01-BiHTCvVR.js → Star01-D-DX_VQ8.js} +1 -1
  25. package/dist/client/assets/{Stars01-BoOQBwEf.js → Stars01-BT514mww.js} +1 -1
  26. package/dist/client/assets/{Stars02-DBhfsTYG.js → Stars02-CvZNhXpQ.js} +1 -1
  27. package/dist/client/assets/{Sun-YyXJklY4.js → Sun-BHmSueFc.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-DCwK87MF.js → SwitchHorizontal01--w7jw1gn.js} +1 -1
  29. package/dist/client/assets/{Tool01-D68BO4Z1.js → Tool01-CYQXbAs9.js} +1 -1
  30. package/dist/client/assets/{Trash01-BDaXEXf_.js → Trash01-CxMlDi9l.js} +1 -1
  31. package/dist/client/assets/{Upload01-B14hHeGP.js → Upload01-DgQHfPA4.js} +1 -1
  32. package/dist/client/assets/{User01-D26yJD3f.js → User01-DJgqKWol.js} +1 -1
  33. package/dist/client/assets/{Users01-DcpQUESq.js → Users01-D_J5vhl7.js} +1 -1
  34. package/dist/client/assets/{Users03-DdlXwWfA.js → Users03-D7afztXh.js} +1 -1
  35. package/dist/client/assets/{X-C54nvkaE.js → X-RECo41yg.js} +1 -1
  36. package/dist/client/assets/{XCircle-DMTFcHqR.js → XCircle-BhV8maG9.js} +1 -1
  37. package/dist/client/assets/{XClose-DnDy-OvD.js → XClose-DNorGtW0.js} +1 -1
  38. package/dist/client/assets/{Zap-DtiJN-LC.js → Zap-BqYKiBDY.js} +1 -1
  39. package/dist/client/assets/{ZapSquare-BOyZ6Rgl.js → ZapSquare-EaCsR4ke.js} +1 -1
  40. package/dist/client/assets/{ZoomOut-BVzIyFeW.js → ZoomOut-Dox0RGO8.js} +1 -1
  41. package/dist/client/assets/{access-gate-CahH-m4n.js → access-gate-BqzkpTGs.js} +1 -1
  42. package/dist/client/assets/{add-section-modal-BmSyVksR.js → add-section-modal-D8dP-fUX.js} +1 -1
  43. package/dist/client/assets/{agent-capabilities-2TzzHD_U.js → agent-capabilities-BOrZcw_f.js} +1 -1
  44. package/dist/client/assets/agent-icon-BtQxKV8a.js +1 -0
  45. package/dist/client/assets/agents-list-rt-kO67C.js +4 -0
  46. package/dist/client/assets/ai-providers-D7u6tgs7.js +1 -0
  47. package/dist/client/assets/{alert-BY6dLNYK.js → alert-DOHmFwqn.js} +1 -1
  48. package/dist/client/assets/{alert-dialog-depKBGzY.js → alert-dialog-Bxo_MYXk.js} +2 -2
  49. package/dist/client/assets/app-editor-BKBuOXj4.js +1 -0
  50. package/dist/client/assets/{auth-JzTDloGx.js → auth-CoT0O1Wo.js} +1 -1
  51. package/dist/client/assets/{auth-catchall-3AJlIltf.js → auth-catchall-ChVzL55k.js} +1 -1
  52. package/dist/client/assets/{auth-entry-CN6penGo.js → auth-entry-Db3UMJC5.js} +1 -1
  53. package/dist/client/assets/{auth-split-layout-DG4yNxsb.js → auth-split-layout-cO2rT7g9.js} +1 -1
  54. package/dist/client/assets/{authenticate-and-persist-oauth-DBxyWtpZ.js → authenticate-and-persist-oauth-DGhgmpvt.js} +1 -1
  55. package/dist/client/assets/{automation-list-row-BIgl3VhR.js → automation-list-row-jcSA7dBx.js} +1 -1
  56. package/dist/client/assets/{automation-runs-DT5n-ItD.js → automation-runs-BaCQBHoa.js} +1 -1
  57. package/dist/client/assets/{automations-CkBsMFYI.js → automations-CaKdnRJs.js} +1 -1
  58. package/dist/client/assets/{avatar-CQ--7kDr.js → avatar-AaGlLABb.js} +1 -1
  59. package/dist/client/assets/{badge-Cu9Vf21V.js → badge-C8xW1-Ny.js} +1 -1
  60. package/dist/client/assets/{block-document-6rmSaazN.js → block-document-OGoLVzGT.js} +2 -2
  61. package/dist/client/assets/{brand-context-Bx9fuG7L.js → brand-context-DFabWIkO.js} +1 -1
  62. package/dist/client/assets/{breadcrumb-Iv2RnKdx.js → breadcrumb-Brp587yT.js} +1 -1
  63. package/dist/client/assets/{buckets-DhP3Px4o.js → buckets-DpneL_2_.js} +1 -1
  64. package/dist/client/assets/{bulk-category-panel-Ry5Wrf4t.js → bulk-category-panel-CyzC_SX4.js} +1 -1
  65. package/dist/client/assets/{capability-load-error-CZgYniY2.js → capability-load-error-BQZI9LLJ.js} +1 -1
  66. package/dist/client/assets/{card-BtxpfIMO.js → card-B9yAYcf2.js} +1 -1
  67. package/dist/client/assets/category-editor-CZFJWDUa.js +1 -0
  68. package/dist/client/assets/{chat-context-BXYlU18c.js → chat-context-Bd0ASrBV.js} +1 -1
  69. package/dist/client/assets/{checkbox-_ejCMjxu.js → checkbox-ChtxvVCl.js} +1 -1
  70. package/dist/client/assets/{cli-auth-success-JyzfdETB.js → cli-auth-success-v9Qf_Z1z.js} +1 -1
  71. package/dist/client/assets/collection-detail-Ct0q9TWA.js +1 -0
  72. package/dist/client/assets/{collection-display-button-x3VETGSA.js → collection-display-button-ghx1fRrz.js} +1 -1
  73. package/dist/client/assets/{collection-search-CVteq94G.js → collection-search-qo9IZJLR.js} +1 -1
  74. package/dist/client/assets/collection-table-wrapper-D06hXFYs.js +1 -0
  75. package/dist/client/assets/{collection-tabs-DHih69-0.js → collection-tabs-D8PDp1vW.js} +1 -1
  76. package/dist/client/assets/{command-B9iUw_Wf.js → command-DOtqEIF_.js} +1 -1
  77. package/dist/client/assets/{commerce-onboarding-D7yN_rh5.js → commerce-onboarding-CQvkKr_A.js} +1 -1
  78. package/dist/client/assets/{connect-desktop-dialog-BP-u_roi.js → connect-desktop-dialog-BdgVHbLH.js} +1 -1
  79. package/dist/client/assets/{connection-card-syvtXQo3.js → connection-card-CrD4DNgk.js} +1 -1
  80. package/dist/client/assets/{connection-detail-LdZiPrUN.js → connection-detail-DgPAS7XR.js} +1 -1
  81. package/dist/client/assets/{connection-form-helpers-NLjgFKGu.js → connection-form-helpers-OWEpNePK.js} +1 -1
  82. package/dist/client/assets/{connections-CFiPE6LL.js → connections-CEmlAedS.js} +1 -1
  83. package/dist/client/assets/{decopilot-BzscZwEe.js → decopilot-DsMsc6aJ.js} +1 -1
  84. package/dist/client/assets/{decopilot-sse-pool-4ct7M3nK.js → decopilot-sse-pool-BJzLmyeL.js} +1 -1
  85. package/dist/client/assets/{dialog-a5ZkDZhy.js → dialog-B1eqTnf8.js} +1 -1
  86. package/dist/client/assets/{domain-settings-C3cSnSXe.js → domain-settings-nPsYb5Fu.js} +1 -1
  87. package/dist/client/assets/{drawer-CKH1wPOe.js → drawer-HScIqfkZ.js} +1 -1
  88. package/dist/client/assets/{dropdown-menu-BsT801zR.js → dropdown-menu-BQUhOJKy.js} +1 -1
  89. package/dist/client/assets/{empty-state-Cd23QDa9.js → empty-state-Dy6CNQJG.js} +1 -1
  90. package/dist/client/assets/{extract-connection-data--lA2dih1.js → extract-connection-data-MlduhWsI.js} +1 -1
  91. package/dist/client/assets/file-explorer-CZAYIvIV.js +2 -0
  92. package/dist/client/assets/{file-type-icon-BpvAmzSL.js → file-type-icon-Bhag_euH.js} +1 -1
  93. package/dist/client/assets/{files-DmRhHPaD.js → files-uKwT7dMn.js} +1 -1
  94. package/dist/client/assets/{form-B8xO7s3Q.js → form-UVWmiPtA.js} +1 -1
  95. package/dist/client/assets/{general-BerFQJYO.js → general-BT7ritMF.js} +1 -1
  96. package/dist/client/assets/github-repo-picker-Hp8ibQdT.js +1 -0
  97. package/dist/client/assets/{hooks-DFBNXh69.js → hooks-BkWjlB2G.js} +1 -1
  98. package/dist/client/assets/{index-DJkBk8Ax.js → index-B1vu2Nbj.js} +1 -1
  99. package/dist/client/assets/{index-NOL0uTvV.js → index-BCQZbPeH.js} +3 -3
  100. package/dist/client/assets/{index-COdjrItE.js → index-BeAkwX8F.js} +1 -1
  101. package/dist/client/assets/{index-DGvdL2uz.js → index-BspaoAFJ.js} +1 -1
  102. package/dist/client/assets/{index-Dzrzv-LN.js → index-C0RJqF7u.js} +1 -1
  103. package/dist/client/assets/{index-DIWWb6ZU.js → index-CEZz0ndn.js} +1 -1
  104. package/dist/client/assets/{index-PDu5YsgJ.js → index-Cfi3HlHz.js} +1 -1
  105. package/dist/client/assets/index-Cnn6tTYH.css +1 -0
  106. package/dist/client/assets/{index-BEAvVWMY.js → index-Cv2lqoTf.js} +13 -13
  107. package/dist/client/assets/{index-CBxJPtyP.js → index-D92tuiTs.js} +1 -1
  108. package/dist/client/assets/{index-BmhWpNA2.js → index-DihMtjYK.js} +1 -1
  109. package/dist/client/assets/{index-Dn1UY3fg.js → index-Dutd3Lw0.js} +1 -1
  110. package/dist/client/assets/{index-DIyNSN96.js → index-Fhr28YR7.js} +26 -26
  111. package/dist/client/assets/index-Q1C-CIMU.js +1 -0
  112. package/dist/client/assets/{index-redirect-B55CPpl6.js → index-redirect-Cx_VgwfS.js} +1 -1
  113. package/dist/client/assets/{input-CaPkg-tG.js → input-pJMroKkw.js} +1 -1
  114. package/dist/client/assets/{integration-icon-BVqUmyhK.js → integration-icon-GqCugUan.js} +1 -1
  115. package/dist/client/assets/invite-member-dialog-CGySt3ln.js +3 -0
  116. package/dist/client/assets/{label-D0Oq_enN.js → label-e8ipDDuV.js} +1 -1
  117. package/dist/client/assets/{library-tab-pbqcFRtG.js → library-tab-xtxwrwsE.js} +1 -1
  118. package/dist/client/assets/{login-CsVa9y82.js → login-D36YSbZ3.js} +1 -1
  119. package/dist/client/assets/{mcp-oauth-DkfCvuSl.js → mcp-oauth-DJ_D41xa.js} +1 -1
  120. package/dist/client/assets/members-vbnJ5HeT.js +1 -0
  121. package/dist/client/assets/{monaco-editor-CQvQ4wyD.js → monaco-editor-Bb0hmy-d.js} +1 -1
  122. package/dist/client/assets/{monitoring-stats-row-N_7BtDVw.js → monitoring-stats-row-BZRgcvhm.js} +1 -1
  123. package/dist/client/assets/{oauth-callback-C_nBi9hb.js → oauth-callback-DZYBu4eK.js} +1 -1
  124. package/dist/client/assets/{oauth-callback-ai-provider-JgWSWhQO.js → oauth-callback-ai-provider-Chg0Gwp5.js} +1 -1
  125. package/dist/client/assets/{onboarding-CRvfQK7U.js → onboarding-DSFSSRFr.js} +1 -1
  126. package/dist/client/assets/{org-install-DlfY4HcA.js → org-install-DU4NcQb8.js} +1 -1
  127. package/dist/client/assets/{org-layout-BNkJ-PnS.js → org-layout-CL__RtH7.js} +1 -1
  128. package/dist/client/assets/{organization-choice-C3OXP1wc.js → organization-choice-DuHbEnTg.js} +1 -1
  129. package/dist/client/assets/{page-seo-form-DtixMLnX.js → page-seo-form-1MoU83LY.js} +1 -1
  130. package/dist/client/assets/page-seo-sheet-CLjhJXuO.js +1 -0
  131. package/dist/client/assets/{popover-Q1EdqSJG.js → popover-BGYh0Vqy.js} +1 -1
  132. package/dist/client/assets/post-editor-DoDFq7TS.js +1 -0
  133. package/dist/client/assets/{primitives-Dn_2KW04.js → primitives-LBvlK-aq.js} +1 -1
  134. package/dist/client/assets/{profile-C2BABr7w.js → profile-Dlqn0aYZ.js} +1 -1
  135. package/dist/client/assets/project-app-view-8w9_fvMi.js +1 -0
  136. package/dist/client/assets/record-editor-bXa5q0xQ.js +1 -0
  137. package/dist/client/assets/registry-BtF4LOFK.js +2 -0
  138. package/dist/client/assets/{registry-layout-C4d4IZ2d.js → registry-layout-BYhrrdCJ.js} +1 -1
  139. package/dist/client/assets/{require-capability-DwU8Ss9R.js → require-capability-U2maMAuO.js} +1 -1
  140. package/dist/client/assets/{required-auth-layout-C_pN8svZ.js → required-auth-layout-C3UaWiTo.js} +1 -1
  141. package/dist/client/assets/{reset-password-tIJsS-gp.js → reset-password-C5cZQH7Y.js} +1 -1
  142. package/dist/client/assets/roles-Dra-Wfd-.js +1 -0
  143. package/dist/client/assets/{scroll-area-DSkli5k_.js → scroll-area-B0ntssfk.js} +1 -1
  144. package/dist/client/assets/{search-input-BiiOvDrk.js → search-input-gVylns9Q.js} +1 -1
  145. package/dist/client/assets/{secrets-CNbF_xMH.js → secrets-D4L1pS60.js} +1 -1
  146. package/dist/client/assets/{sections-editor-CBzzlQi2.js → sections-editor-DGa1wmN5.js} +2 -2
  147. package/dist/client/assets/{select-z6yZBkEp.js → select-Bz_zhsne.js} +1 -1
  148. package/dist/client/assets/{select-model-CxlVTA2J.js → select-model-Dws7vIv0.js} +1 -1
  149. package/dist/client/assets/seo-editor-B6-szxCN.js +1 -0
  150. package/dist/client/assets/{settings-layout-B89sZDAn.js → settings-layout-BIS898tZ.js} +1 -1
  151. package/dist/client/assets/{settings-section-Cn_5NRzd.js → settings-section-BpxmEjXY.js} +1 -1
  152. package/dist/client/assets/{sheet-B0u11yoj.js → sheet--GPTCkBV.js} +1 -1
  153. package/dist/client/assets/{shell-controls-CYHtSsaG.js → shell-controls-ly_2AJ45.js} +1 -1
  154. package/dist/client/assets/{shell-layout-BCl91e2n.js → shell-layout-C_sGpxte.js} +1 -1
  155. package/dist/client/assets/{sidebar-haKmZZ-W.js → sidebar-B6jtm1Ue.js} +1 -1
  156. package/dist/client/assets/{skeleton-BuPVKDK7.js → skeleton-BuwUIpX4.js} +1 -1
  157. package/dist/client/assets/{sso-CWL1a3Ph.js → sso-ydNnegVz.js} +1 -1
  158. package/dist/client/assets/{store-Cca_yMwP.js → store-BxzPtxNS.js} +1 -1
  159. package/dist/client/assets/store-registry-C85lAMR7.js +2 -0
  160. package/dist/client/assets/{studio-tools-Bs0xo1Z2.js → studio-tools-C5AidOwh.js} +1 -1
  161. package/dist/client/assets/{switch-xjp3ajZN.js → switch--S_O_q8e.js} +1 -1
  162. package/dist/client/assets/{table-CyATWOpP.js → table-Bn2PjNfj.js} +1 -1
  163. package/dist/client/assets/{tabs-ChaZLm39.js → tabs-DLPd0DvT.js} +1 -1
  164. package/dist/client/assets/task-row-CrBNUNWV.js +1 -0
  165. package/dist/client/assets/{task-status-DTdpp4Y7.js → task-status-Dt9iGaeJ.js} +1 -1
  166. package/dist/client/assets/{textarea-CvJkxwG_.js → textarea-CjWp7xSP.js} +1 -1
  167. package/dist/client/assets/{toggle-group-C5lfVqY9.js → toggle-group-ClY9GDOR.js} +1 -1
  168. package/dist/client/assets/{toolbar-DfZcXUSS.js → toolbar-DOmN7mkS.js} +1 -1
  169. package/dist/client/assets/{toolbar-icon-button-BJjnMzvJ.js → toolbar-icon-button-C8FxUmEM.js} +1 -1
  170. package/dist/client/assets/tools-list-MDGz8nvX.js +1 -0
  171. package/dist/client/assets/{tooltip-Dn6TT4fb.js → tooltip-KzEPH1eR.js} +1 -1
  172. package/dist/client/assets/{types-CZ4rLOEl.js → types-B364N4aW.js} +5 -5
  173. package/dist/client/assets/{use-ai-providers-zyN1ygBC.js → use-ai-providers-Dq5k2aGK.js} +1 -1
  174. package/dist/client/assets/{use-automations-DME2P9Yb.js → use-automations-CzG9IQfm.js} +1 -1
  175. package/dist/client/assets/{use-capability-BKrWdNMG.js → use-capability-BJ4aG-VL.js} +1 -1
  176. package/dist/client/assets/{use-clock-tick-nZuMTIzb.js → use-clock-tick-DyaHUns-.js} +1 -1
  177. package/dist/client/assets/{use-collections-BS7_MipP.js → use-collections-D1lQ_xC2.js} +1 -1
  178. package/dist/client/assets/{use-connection-Cs21veSc.js → use-connection-iaNqg2f9.js} +1 -1
  179. package/dist/client/assets/{use-copy-CY1tiWSY.js → use-copy-D2sA2mMs.js} +1 -1
  180. package/dist/client/assets/{use-create-virtual-mcp-BRn7Xglj.js → use-create-virtual-mcp-qQdCtTI0.js} +1 -1
  181. package/dist/client/assets/{use-debounced-autosave-Cl9vOVRq.js → use-debounced-autosave-jPoGEcl_.js} +1 -1
  182. package/dist/client/assets/{use-debounced-value-fFVCMUXm.js → use-debounced-value-CrPySguN.js} +1 -1
  183. package/dist/client/assets/{use-decopilot-events-CtfZfAhc.js → use-decopilot-events-C_YXHznB.js} +1 -1
  184. package/dist/client/assets/{use-delete-connection-B695Tef1.js → use-delete-connection-BFjaOGmE.js} +1 -1
  185. package/dist/client/assets/{use-file-configs-DxHSl6ZD.js → use-file-configs-DT_kH366.js} +1 -1
  186. package/dist/client/assets/{use-infinite-scroll-BUhxpG1i.js → use-infinite-scroll-n6K3XvYN.js} +1 -1
  187. package/dist/client/assets/{use-join-requests-COO3fg4J.js → use-join-requests-ClpMRY-2.js} +1 -1
  188. package/dist/client/assets/{use-mcp-client-tU9_Q31R.js → use-mcp-client-BBa18C66.js} +2 -2
  189. package/dist/client/assets/{use-mcp-prompts-CVL6RAIG.js → use-mcp-prompts-BJlX80Yp.js} +1 -1
  190. package/dist/client/assets/{use-mcp-tools-B2LI7RR7.js → use-mcp-tools-BRnTJmjH.js} +1 -1
  191. package/dist/client/assets/{use-members-Bm9KhrJN.js → use-members-Ng06RoGr.js} +1 -1
  192. package/dist/client/assets/{use-mobile-Dd_g0aui.js → use-mobile-fVP68LM8.js} +1 -1
  193. package/dist/client/assets/use-navigate-to-agent-C6SA_K8C.js +1 -0
  194. package/dist/client/assets/{use-org-auth-client-CqXitYKc.js → use-org-auth-client-rKt5ss-n.js} +1 -1
  195. package/dist/client/assets/{use-org-sso-2HCpkr8C.js → use-org-sso-Cs-tarFI.js} +1 -1
  196. package/dist/client/assets/use-organization-roles-BbGAZb76.js +1 -0
  197. package/dist/client/assets/{use-organization-settings-DrjygbOR.js → use-organization-settings-DRcl_3Dg.js} +1 -1
  198. package/dist/client/assets/{use-registry-connections-D1C6nHHR.js → use-registry-connections-DYKN0CFv.js} +1 -1
  199. package/dist/client/assets/{use-secrets-CLseSmaH.js → use-secrets-3i5_T1Ig.js} +1 -1
  200. package/dist/client/assets/{use-status-sounds-DX4ADJSs.js → use-status-sounds-CmPdHuAg.js} +1 -1
  201. package/dist/client/assets/{use-view-mode-CIr8WEyc.js → use-view-mode-CxyCyyqP.js} +1 -1
  202. package/dist/client/assets/{use-virtual-mcp-WZNqIa1a.js → use-virtual-mcp-CrBCSZ6B.js} +1 -1
  203. package/dist/client/assets/useInfiniteQuery-_DQrdP-B.js +1 -0
  204. package/dist/client/assets/useSuspenseInfiniteQuery-CkKiinpE.js +1 -0
  205. package/dist/client/assets/{useSuspenseQueries-84o7R4r8.js → useSuspenseQueries-DqkS_kYg.js} +1 -1
  206. package/dist/client/assets/{variant-calendar-Dzqm1NJv.js → variant-calendar-D86dGqBT.js} +1 -1
  207. package/dist/client/assets/{view-mode-toggle-C24MUWOu.js → view-mode-toggle-C2i_xBD9.js} +1 -1
  208. package/dist/client/index.html +2 -2
  209. package/dist/server/cli.js +979 -653
  210. package/dist/server/server.js +264 -264
  211. package/package.json +1 -1
  212. package/dist/client/assets/agent-icon-XUhQzRLX.js +0 -1
  213. package/dist/client/assets/agents-list-DK_ZBuLv.js +0 -1
  214. package/dist/client/assets/ai-providers-DlWOFrVq.js +0 -1
  215. package/dist/client/assets/app-editor-DcpXXBks.js +0 -1
  216. package/dist/client/assets/category-editor-B79PzaJo.js +0 -1
  217. package/dist/client/assets/collection-detail-Bs_bKbq1.js +0 -1
  218. package/dist/client/assets/file-explorer-DIYnWmFv.js +0 -2
  219. package/dist/client/assets/github-repo-picker-CNVz0qrC.js +0 -1
  220. package/dist/client/assets/import-from-deco-dialog-DdhvtCEU.js +0 -4
  221. package/dist/client/assets/index-DmMZ0-sF.css +0 -1
  222. package/dist/client/assets/index-xcUq28N4.js +0 -1
  223. package/dist/client/assets/members-DVCX1OGf.js +0 -3
  224. package/dist/client/assets/page-seo-sheet-DQkpfhcZ.js +0 -1
  225. package/dist/client/assets/post-editor-BxN87jA0.js +0 -1
  226. package/dist/client/assets/project-app-view-E9wqVY5b.js +0 -1
  227. package/dist/client/assets/record-editor-ZFaj6Wi4.js +0 -1
  228. package/dist/client/assets/registry-TjO0PApk.js +0 -2
  229. package/dist/client/assets/roles-BK-t6UPP.js +0 -1
  230. package/dist/client/assets/seo-editor-BENQBDhy.js +0 -1
  231. package/dist/client/assets/shell-route-loading-D29sfZCo.js +0 -1
  232. package/dist/client/assets/store-registry-Bn93Vvrq.js +0 -2
  233. package/dist/client/assets/tools-list-BKWr5wCK.js +0 -1
  234. package/dist/client/assets/use-navigate-to-agent-KaAiMohr.js +0 -1
  235. package/dist/client/assets/use-organization-roles-D4lESRwM.js +0 -1
  236. package/dist/client/assets/useInfiniteQuery-CG1m_ZaE.js +0 -1
  237. package/dist/client/assets/useSuspenseInfiniteQuery-9_oq2OeL.js +0 -1
@@ -1 +0,0 @@
1
- import{r as $,G as Ne,K as re,a$ as dt,k as Oe,j as s,l as K,i as fe,B as ne,c as q,o as Pe,av as Ie,s as se,ax as De,ay as ke,m as $e,p as mt,n as ut,d as Fe,t as he,v as Re,a1 as Ke,V as ft,E as ht,b as gt,u as xt}from"./index-DIyNSN96.js";import{u as pt,C as bt}from"./use-organization-roles-D4lESRwM.js";import{u as je}from"./use-org-auth-client-CqXitYKc.js";import{B as ge}from"./badge-Cu9Vf21V.js";import{f as Qe,a as qe,b as He,c as Ze,d as Xe,A as Je,e as We,g as et}from"./alert-dialog-depKBGzY.js";import{D as Et,a as Tt,b as _t,c as It}from"./dropdown-menu-BsT801zR.js";import{i as Nt}from"./DotsVertical-B-sq-ide.js";import{s as Ae}from"./Plus-tW6PYhLA.js";import{s as St}from"./Trash01-BDaXEXf_.js";import{P as te}from"./index-Dn1UY3fg.js";import{E as Ge}from"./empty-state-Cd23QDa9.js";import{S as ve}from"./search-input-BiiOvDrk.js";import{P as tt,D as st}from"./ai-providers-logos-DD3qZ33J.js";import{I as ye}from"./integration-icon-BVqUmyhK.js";import{u as Ct}from"./use-infinite-scroll-BUhxpG1i.js";import{C as Me}from"./checkbox-_ejCMjxu.js";import{b as At}from"./Settings02-CYQjLDZe.js";import{u as Ot}from"./useSuspenseInfiniteQuery-9_oq2OeL.js";import{u as Rt,S as jt}from"./use-mcp-client-tU9_Q31R.js";import{C as vt}from"./collection-search-CVteq94G.js";import{u as nt}from"./use-members-Bm9KhrJN.js";import{u as yt}from"./use-connection-Cs21veSc.js";import{u as Mt,d as wt}from"./use-ai-providers-zyN1ygBC.js";import{A as lt}from"./avatar-CQ--7kDr.js";import{S as xe}from"./switch-xjp3ajZN.js";import{c as pe,T as be,a as Ee,b as Te}from"./tooltip-Dn6TT4fb.js";import{S as Ue,a as Be,b as Ve}from"./settings-section-Cn_5NRzd.js";import{t as Lt}from"./ChevronDown-B0d3gCJ4.js";import{i as Pt}from"./ChevronRight-D8G4YOXh.js";import{i as ze}from"./X-C54nvkaE.js";import{a as Dt}from"./use-capability-BKrWdNMG.js";import{A as kt}from"./access-gate-CahH-m4n.js";import"./table-CyATWOpP.js";import"./SwitchHorizontal01-DCwK87MF.js";import"./ChevronUp-2KGxjR7x.js";import"./sidebar-haKmZZ-W.js";import"./LayoutLeft-Bi6Cd7VR.js";import"./use-mobile-Dd_g0aui.js";import"./sheet-B0u11yoj.js";import"./SearchMd-DCtxyy_L.js";import"./XCircle-DMTFcHqR.js";import"./agent-icon-XUhQzRLX.js";import"./AlertCircle-CWgtpDgs.js";import"./Tool01-D68BO4Z1.js";import"./ArrowUpRight-O2h0Esun.js";import"./ZapSquare-BOyZ6Rgl.js";import"./Users03-DdlXwWfA.js";import"./CheckCircle-CzbMe8sq.js";import"./Stars02-DBhfsTYG.js";import"./Eye-DmGPRR_e.js";import"./ZoomOut-BVzIyFeW.js";import"./Globe01-DO0D_c2f.js";import"./FilterLines-DEMLsHE0.js";import"./Star01-BiHTCvVR.js";import"./Globe04-XJoX6kmZ.js";import"./HardDrive-BICUWfOq.js";import"./Key01-BtQzPiv-.js";import"./LinkExternal01-CB818nxD.js";import"./Monitor01-DG_zJQKB.js";import"./Sun-YyXJklY4.js";import"./Palette-D5uFHHtD.js";import"./Play-8mfsN5e2.js";import"./SearchLg-BRB4E-a6.js";import"./Shield01-BmIMMGLU.js";import"./Stars01-BoOQBwEf.js";import"./Upload01-B14hHeGP.js";import"./User01-D26yJD3f.js";import"./Users01-DcpQUESq.js";import"./XClose-DnDy-OvD.js";import"./Zap-DtiJN-LC.js";import"./auth-JzTDloGx.js";import"./use-collections-BS7_MipP.js";import"./studio-tools-Bs0xo1Z2.js";import"./card-BtxpfIMO.js";import"./capability-load-error-CZgYniY2.js";const we="basic-usage",Le=[{id:we,label:"Basic Usage",description:"Tools all org members can access by default",section:"Basic Usage",tools:["COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET","CONNECTION_TEST","COLLECTION_VIRTUAL_MCP_LIST","COLLECTION_VIRTUAL_MCP_GET","VIRTUAL_MCP_PLUGIN_CONFIG_GET","VIRTUAL_MCP_LAST_USED_LIST","AUTOMATION_GET","AUTOMATION_LIST","AUTOMATION_RUN_STATS","AI_PROVIDERS_LIST","AI_PROVIDERS_LIST_MODELS","AI_PROVIDERS_ACTIVE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_CREDITS","AI_PROVIDER_TOPUP_URL","LIST_OBJECTS","GET_OBJECT_METADATA","GET_PRESIGNED_URL","PUT_PRESIGNED_URL","FILE_OBJECTS_LIST","SANDBOX_START","SANDBOX_DELETE","GLOBAL_SEARCH","ORGANIZATION_SETTINGS_GET","USER_GET","LINK_CURRENT_GET","LINK_DISCONNECT","BRAND_CONTEXT_LIST","COLLECTION_THREADS_CREATE","COLLECTION_THREADS_LIST","COLLECTION_THREADS_GET","COLLECTION_THREADS_UPDATE","COLLECTION_THREADS_DELETE","COLLECTION_THREAD_MESSAGES_LIST","THREAD_BACKGROUND_TOOL_START","THREAD_SUBTASK_DELIVER"]},{id:"org:manage",label:"Manage organization",description:"Edit organization settings, brand context, and domain configuration",section:"Organization",tools:["ORGANIZATION_GET","ORGANIZATION_LIST","ORGANIZATION_UPDATE","ORGANIZATION_SETTINGS_GET","ORGANIZATION_SETTINGS_UPDATE","BRAND_CONTEXT_LIST","BRAND_CONTEXT_GET","BRAND_CONTEXT_CREATE","BRAND_CONTEXT_UPDATE","BRAND_CONTEXT_DELETE","BRAND_CONTEXT_EXTRACT","BRAND_GET","BRAND_LIST","ORGANIZATION_DOMAIN_LIST","ORGANIZATION_DOMAIN_ADD","ORGANIZATION_DOMAIN_UPDATE","ORGANIZATION_DOMAIN_VERIFY","ORGANIZATION_DOMAIN_REMOVE"]},{id:"members:manage",label:"Manage members",description:"Invite members, remove them, and change their roles",section:"Organization",tools:["ORGANIZATION_MEMBER_LIST","ORGANIZATION_MEMBER_ADD","ORGANIZATION_MEMBER_REMOVE","ORGANIZATION_MEMBER_UPDATE_ROLE","ORGANIZATION_JOIN_REQUEST_LIST","ORGANIZATION_JOIN_REQUEST_APPROVE","ORGANIZATION_JOIN_REQUEST_DENY"],dangerous:!0},{id:"connections:manage",label:"Manage connections",description:"Create, update, and delete connections",section:"Connections & Agents",tools:["COLLECTION_CONNECTIONS_CREATE","COLLECTION_CONNECTIONS_UPDATE","COLLECTION_CONNECTIONS_DELETE","COMMERCE_DISCOVERY_SETUP","COMMERCE_DISCOVERY_RUN","COMMERCE_DISCOVERY_BIND","COMMERCE_DISCOVERY_CONNECTION_STATUS"],dangerous:!0},{id:"agents:manage",label:"Manage agents",description:"Create, configure, and delete agents",section:"Connections & Agents",tools:["COLLECTION_VIRTUAL_MCP_CREATE","COLLECTION_VIRTUAL_MCP_UPDATE","COLLECTION_VIRTUAL_MCP_DELETE","VIRTUAL_MCP_PLUGIN_CONFIG_UPDATE","VIRTUAL_MCP_PINNED_VIEWS_UPDATE"],dangerous:!0},{id:"automations:manage",label:"Manage automations",description:"Create, update, run, and delete automations",section:"Automations",tools:["AUTOMATION_CREATE","AUTOMATION_UPDATE","AUTOMATION_DELETE","AUTOMATION_TRIGGER_ADD","AUTOMATION_TRIGGER_REMOVE","AUTOMATION_TRIGGER_ROTATE_TOKEN","AUTOMATION_RUN"],dangerous:!0},{id:"monitoring:view",label:"View monitoring",description:"Access logs and usage statistics",section:"Monitoring",tools:["MONITORING_LOG_GET","MONITORING_LOGS_LIST","MONITORING_STATS","MONITORING_THREAD_USAGE"]},{id:"secrets:manage",label:"Manage secrets",description:"Create and list secrets stored in the credential vault",section:"Organization",tools:["SECRET_CREATE","SECRET_LIST"]},{id:"file-configs:manage",label:"Manage file configs",description:"Create, list, update and delete S3 bucket configurations",section:"Organization",tools:["FILE_CONFIG_CREATE","FILE_CONFIG_LIST","FILE_CONFIG_UPDATE","FILE_CONFIG_DELETE","FILE_OBJECTS_LIST"]},{id:"ai-providers:manage",label:"Manage AI providers",description:"Add or remove API keys and provision provider credentials",section:"AI Providers",tools:["AI_PROVIDER_KEY_CREATE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_KEY_DELETE","AI_PROVIDER_KEY_UPDATE","AI_PROVIDER_KEY_PREVIEW","AI_PROVIDER_OAUTH_URL","AI_PROVIDER_OAUTH_EXCHANGE","AI_PROVIDER_PROVISION_KEY","AI_PROVIDER_TOPUP_URL","AI_PROVIDER_CREDITS"]},{id:"tags:manage",label:"Manage tags",description:"Create, assign, and delete organization tags",section:"Organization",tools:["TAGS_LIST","TAGS_CREATE","TAGS_DELETE","MEMBER_TAGS_GET","MEMBER_TAGS_SET"]},{id:"registry:manage",label:"Manage registry",description:"Browse, publish, and manage items in the registry",section:"Store & Registry",tools:["COLLECTION_REGISTRY_APP_LIST","COLLECTION_REGISTRY_APP_GET","COLLECTION_REGISTRY_APP_VERSIONS","COLLECTION_REGISTRY_APP_FILTERS","REGISTRY_ITEM_LIST","REGISTRY_ITEM_SEARCH","REGISTRY_ITEM_GET","REGISTRY_ITEM_VERSIONS","REGISTRY_ITEM_FILTERS","REGISTRY_DISCOVER_TOOLS","REGISTRY_ITEM_CREATE","REGISTRY_ITEM_BULK_CREATE","REGISTRY_ITEM_UPDATE","REGISTRY_ITEM_DELETE","REGISTRY_AI_GENERATE","REGISTRY_PUBLISH_REQUEST_LIST","REGISTRY_PUBLISH_REQUEST_REVIEW","REGISTRY_PUBLISH_REQUEST_COUNT","REGISTRY_PUBLISH_REQUEST_DELETE","REGISTRY_PUBLISH_API_KEY_GENERATE","REGISTRY_PUBLISH_API_KEY_LIST","REGISTRY_PUBLISH_API_KEY_REVOKE"],dangerous:!0},{id:"registry:monitor",label:"Monitor registry health",description:"Run health checks on registry connections and view results",section:"Store & Registry",tools:["REGISTRY_MONITOR_RUN_START","REGISTRY_MONITOR_RUN_LIST","REGISTRY_MONITOR_RUN_GET","REGISTRY_MONITOR_RUN_CANCEL","REGISTRY_MONITOR_RESULT_LIST","REGISTRY_MONITOR_CONNECTION_LIST","REGISTRY_MONITOR_CONNECTION_SYNC","REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH"]},{id:"api-keys:manage",label:"Manage API keys",description:"Create, update, and revoke API keys",section:"Developer",tools:["API_KEY_CREATE","API_KEY_LIST","API_KEY_UPDATE","API_KEY_DELETE"]},{id:"storage:delete",label:"Delete from storage",description:"Permanently delete files from object storage",section:"Developer",tools:["DELETE_OBJECT","DELETE_OBJECTS"],dangerous:!0},{id:"connections:sql",label:"Run SQL queries",description:"Execute raw SQL against connected databases",section:"Developer",tools:["DATABASES_RUN_SQL"],dangerous:!0}];[...Le.find(t=>t.id===we)?.tools??[]];const Gt=["agents:manage","connections:manage"];new Set(Le.filter(t=>Gt.includes(t.id)).flatMap(t=>t.tools));function Ut(){const t=new Map;for(const e of Le){if(e.id===we)continue;const n=t.get(e.section)??[];n.push(e),t.set(e.section,n)}return Array.from(t.entries()).map(([e,n])=>({section:e,capabilities:n}))}function Bt(t,e,n){return n?!0:t.tools.every(l=>e.includes(l))}function Vt(t,e,n){if(n){const i=new Set(e);for(const r of t.tools)i.add(r);return Array.from(i)}const l=new Set(e);for(const i of t.tools)l.delete(i);return Array.from(l)}function zt(t){const e=q.c(21),{connection:n,isSelected:l,hasToolsEnabled:i,activeToolsCount:r,totalToolsCount:d,onSelect:h,onToggle:c}=t,g=l?"bg-accent/50":"hover:bg-muted/50";let f;e[0]!==g?(f=K("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",g),e[0]=g,e[1]=f):f=e[1];let a;e[2]!==n.icon||e[3]!==n.title?(a=s.jsx(ye,{icon:n.icon,name:n.title,size:"xs"}),e[2]=n.icon,e[3]=n.title,e[4]=a):a=e[4];let x;e[5]!==n.title?(x=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:n.title})}),e[5]=n.title,e[6]=x):x=e[6];let o;e[7]!==h||e[8]!==a||e[9]!==x?(o=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:h,children:[a,x]}),e[7]=h,e[8]=a,e[9]=x,e[10]=o):o=e[10];let m;e[11]!==r||e[12]!==n.tools||e[13]!==i||e[14]!==c||e[15]!==d?(m=n.tools&&n.tools.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[r,"/",d]}),s.jsx(Me,{checked:i,onCheckedChange:c,onClick:Yt})]}),e[11]=r,e[12]=n.tools,e[13]=i,e[14]=c,e[15]=d,e[16]=m):m=e[16];let N;return e[17]!==f||e[18]!==o||e[19]!==m?(N=s.jsxs("div",{className:f,children:[o,m]}),e[17]=f,e[18]=o,e[19]=m,e[20]=N):N=e[20],N}function Yt(t){return t.stopPropagation()}function $t(t){const e=q.c(18),{connectionId:n,tool:l,isSelected:i,onToggle:r}=t,d=`tool-${n}-${l.name}`,h=i?"text-foreground":"text-muted-foreground";let c;e[0]!==h?(c=K("text-sm font-medium",h),e[0]=h,e[1]=c):c=e[1];let g;e[2]!==c||e[3]!==l.name?(g=s.jsx("div",{className:"flex items-center gap-2 mb-1",children:s.jsx("span",{className:c,children:l.name})}),e[2]=c,e[3]=l.name,e[4]=g):g=e[4];let f;e[5]!==l.description?(f=l.description&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:l.description}),e[5]=l.description,e[6]=f):f=e[6];let a;e[7]!==g||e[8]!==f?(a=s.jsxs("div",{className:"flex-1 min-w-0",children:[g,f]}),e[7]=g,e[8]=f,e[9]=a):a=e[9];const x=`tool-${n}-${l.name}`;let o;e[10]!==i||e[11]!==r||e[12]!==x?(o=s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(Me,{id:x,checked:i,onCheckedChange:r,onClick:Ft})}),e[10]=i,e[11]=r,e[12]=x,e[13]=o):o=e[13];let m;return e[14]!==d||e[15]!==a||e[16]!==o?(m=s.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:d,children:[a,o]}),e[14]=d,e[15]=a,e[16]=o,e[17]=m):m=e[17],m}function Ft(t){return t.stopPropagation()}function Kt({toolSet:t,onToolSetChange:e,excludeVirtualMcpId:n,searchQuery:l}){const[i,r]=$.useState(""),d=l!==void 0?l:i,h=$.useDeferredValue(d),[c,g]=$.useState("all"),[f,a]=$.useState(!1),x=$.useRef(new Set(Object.keys(t))),{org:o}=Ne(),m=Rt({connectionId:jt,orgId:o.id,orgSlug:o.slug}),N=100,T=h.trim(),E=T?{operator:"or",conditions:[{field:["title"],operator:"contains",value:T},{field:["description"],operator:"contains",value:T}]}:void 0,S=!!n,C={...E&&{where:E},orderBy:[{field:["updated_at"],direction:"asc"}],limit:N,offset:0,...S&&{include_virtual:!0}},v=JSON.stringify(C),{data:_,fetchNextPage:O,hasNextPage:p,isFetchingNextPage:R}=Ot({queryKey:re.collectionListInfinite(m,o.id,"","CONNECTIONS",v),queryFn:async({pageParam:b=0})=>(await m.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...E&&{where:E},orderBy:[{field:["updated_at"],direction:"asc"}],limit:N,offset:b,...S&&{include_virtual:!0}}})).structuredContent,initialPageParam:0,getNextPageParam:(b,D)=>{if(b?.hasMore)return D.reduce((Q,H)=>Q+(H?.items?.length??0),0)},staleTime:3e4}),I=_?.pages.flatMap(b=>b?.items??[])??[],j=Ct(O,p??!1,R),u=n?I.filter(b=>b.connection_type!=="VIRTUAL"?!0:dt(b.connection_url)!==n):I,M=x.current,A=[...M.values()].map(b=>u.find(D=>D.id===b)).filter(b=>b!==void 0),k=u.filter(b=>!M.has(b.id)),G=[...A,...k],U=b=>{const D=t[b];return D!==void 0&&D.length>0},B=G.filter(b=>{if(c==="all")return!0;const D=U(b.id);return c==="selected"?D:c==="unselected"?!D:!0}),[w,z]=$.useState(G[0]?.id??null),y=w?G.find(b=>b.id===w)??null:null,{data:L,isFetching:Y}=Oe({queryKey:re.collectionItem(m,o.id,"","CONNECTIONS",w??""),queryFn:async()=>w?(await m.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:w}})).structuredContent?.item??null:null,enabled:!!w,staleTime:3e4}),F=L?.tools??[],X=(b,D)=>t[b]?.includes(D)??!1,J=(b,D)=>{const Q=t[b]??[],H=Q.includes(D),W={...t};if(H){const Z=Q.filter(ee=>ee!==D);Z.length===0?delete W[b]:W[b]=Z}else W[b]=[...Q,D];e(W)},le=b=>{const D=b===w?F:[];if(!D.length)return;const Q=t[b]??[],H=D.map(ee=>ee.name),W=Q.length>0&&H.every(ee=>Q.includes(ee)),Z={...t};W?delete Z[b]:(Z[b]=H,z(b)),e(Z)},oe=b=>{z(b),a(!0)},ie=()=>{a(!1)};return s.jsxs("div",{className:"flex h-full",children:[s.jsxs("div",{className:K("w-full md:w-80 border-r border-border flex flex-col",f&&"hidden md:flex"),children:[l===void 0&&s.jsx(vt,{value:i,onChange:r,placeholder:"Search MCP Servers..."}),s.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[s.jsx("button",{onClick:()=>g("all"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),s.jsx("button",{onClick:()=>g("selected"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),s.jsx("button",{onClick:()=>g("unselected"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),s.jsx("div",{className:"flex-1 overflow-auto",children:B.length===0?s.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:d?"No connections found":c==="selected"?"No servers selected":c==="unselected"?"No unselected servers":"No connections available"}):s.jsxs("div",{className:"p-2 space-y-1",children:[B.map(b=>{const D=w===b.id,Q=D?F.length:0,H=t[b.id]?.length??0;return s.jsx(zt,{connection:{...b,tools:D?F:b.tools},isSelected:D,hasToolsEnabled:U(b.id),activeToolsCount:H,totalToolsCount:Q,onSelect:()=>oe(b.id),onToggle:()=>le(b.id)},b.id)}),s.jsx("div",{ref:j,className:"h-4"}),R&&s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(fe,{size:18,className:"animate-spin text-muted-foreground"})})]})})]}),s.jsx("div",{className:K("flex-1 flex-col",f?"flex":"hidden md:flex"),children:y?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[s.jsx(ne,{variant:"ghost",size:"sm",onClick:ie,className:"h-8 w-8 p-0 shrink-0",children:s.jsx(At,{size:20})}),s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx(ye,{icon:y.icon,name:y.title,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:y.title}),y.description&&s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:y.description})]})]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:Y?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(fe,{size:18,className:"animate-spin text-muted-foreground"})}):F.length===0?s.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:"This connection has no tools available"}):s.jsx("div",{className:"space-y-2",children:F.map(b=>s.jsx($t,{connectionId:y.id,tool:b,isSelected:X(y.id,b.name),onToggle:()=>J(y.id,b.name)},b.name))})})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"Select a connection to view its tools"})})})]})}const Se=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"],Qt={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function qt(t){if(!t)return"bg-neutral-400";let e=0;for(let l=0;l<t.length;l++){const i=t.charCodeAt(l);e=(e<<5)-e+i,e=e&e}const n=Math.abs(e)%Se.length;return Se[n]??Se[0]}function Ht(t,e){return Qt[t]??"bg-neutral-400"}const Zt=Pe({role:Pe({id:se().optional(),slug:se().optional(),label:se()}),allowAllStaticPermissions:ke(),staticPermissions:Ie(se()),toolSet:De(se(),Ie(se())),allowAllModels:ke(),modelSet:De(se(),Ie(se())),memberIds:Ie(se())});function ot(t){return t?t.split(" ").map(e=>e[0]).join("").toUpperCase().slice(0,2):"?"}function Ye(t,e,n){const l=s.jsx(xe,{checked:t,disabled:e,onCheckedChange:n});return e?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:l})}),s.jsx(Te,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):l}function Xt(t){const e=q.c(28),{allowAllStaticPermissions:n,staticPermissions:l,onAllowAllChange:i,onPermissionsChange:r,readOnly:d,searchQuery:h}=t,c=d===void 0?!1:d;let g;e[0]!==h?(g=h.trim().toLowerCase(),e[0]=h,e[1]=g):g=e[1];const f=$.useDeferredValue(g);let a;if(e[2]!==n||e[3]!==f||e[4]!==i||e[5]!==r||e[6]!==c||e[7]!==h||e[8]!==l){const x=Ut(),o=(v,_)=>{if(!c){if(n&&_){const O=x.flatMap(es).flatMap(Wt);i(!1),r(O.filter(p=>!v.tools.includes(p)));return}n||r(Vt(v,l,!_))}};let m;e[10]!==f?(m=v=>{const{section:_,capabilities:O}=v;return{section:_,capabilities:O.filter(p=>!f||p.label.toLowerCase().includes(f)||p.description.toLowerCase().includes(f))}},e[10]=f,e[11]=m):m=e[11];const N=x.map(m).filter(Jt);let T;e[12]!==n||e[13]!==i||e[14]!==r?(T=()=>{i(!n),r([])},e[12]=n,e[13]=i,e[14]=r,e[15]=T):T=e[15];let E;e[16]!==n||e[17]!==c||e[18]!==T?(E=Ye(n,c,T),e[16]=n,e[17]=c,e[18]=T,e[19]=E):E=e[19];let S;e[20]!==n||e[21]!==i||e[22]!==r||e[23]!==c?(S=c?void 0:()=>{i(!n),r([])},e[20]=n,e[21]=i,e[22]=r,e[23]=c,e[24]=S):S=e[24];let C;e[25]!==E||e[26]!==S?(C=s.jsx(Ue,{title:"General",children:s.jsx(Be,{children:s.jsx(Ve,{title:"All organization permissions",description:"Grant full access to all features below",action:E,onClick:S})})}),e[25]=E,e[26]=S,e[27]=C):C=e[27],a=s.jsx("div",{children:s.jsxs("div",{className:"flex flex-col gap-10 py-4",children:[C,N.length===0&&f?s.jsxs("p",{className:"text-sm text-muted-foreground py-4",children:["No permissions match “",h,"”"]}):N.map(v=>{const{section:_,capabilities:O}=v;return s.jsx(Ue,{title:_,children:s.jsx(Be,{children:O.map(p=>{const R=Bt(p,l,n);return s.jsx(Ve,{title:s.jsxs("span",{className:"flex items-center gap-1.5",children:[p.label,p.dangerous&&s.jsx(ft,{size:12,className:"text-amber-500 shrink-0"})]}),description:p.description,action:Ye(R,c,()=>o(p,R)),onClick:c?void 0:()=>o(p,R)},p.id)})})},_)})]})}),e[2]=n,e[3]=f,e[4]=i,e[5]=r,e[6]=c,e[7]=h,e[8]=l,e[9]=a}else a=e[9];return a}function Jt(t){return t.capabilities.length>0}function Wt(t){return t.tools}function es(t){return t.capabilities}const it={anthropic:"Anthropic",openrouter:"OpenRouter"},ts={openai:"OpenAI",anthropic:"Anthropic",google:"Google","meta-llama":"Meta",mistralai:"Mistral","x-ai":"xAI",deepseek:"DeepSeek",qwen:"Qwen",moonshotai:"MoonshotAI",nvidia:"NVIDIA",perplexity:"Perplexity",cohere:"Cohere",amazon:"Amazon",microsoft:"Microsoft","z-ai":"Z.ai","ibm-granite":"IBM Granite",alibaba:"Alibaba",baidu:"Baidu",bytedance:"ByteDance",tencent:"Tencent",minimax:"MiniMax",nousresearch:"Nous Research",allenai:"Allen AI",inception:"Inception"};function ss(t,e){const n=t.indexOf("/"),l=n>0?t.slice(0,n):e;return l.startsWith("~")?l.slice(1):l}function ns(t){return ts[t]??it[t]??t}function ls(t){const e=t.indexOf(": ");return e>0&&e<32?t.slice(e+2):t}const rt=30;function os(t){const e=q.c(44),{connectionId:n,subProviderId:l,subProviderName:i,groupLogo:r,models:d,allConnectionModelIds:h,selectedModels:c,allowAllModels:g,allConnectionModelsSelected:f,onToggleModel:a,onExitAllowAll:x,readOnly:o,defaultExpanded:m}=t,[N,T]=$.useState(m),E=m||N,S=T,[C,v]=$.useState(rt);let _;e[0]!==f||e[1]!==g||e[2]!==c?(_=j=>g||f||c.includes("*")||c.includes(j),e[0]=f,e[1]=g,e[2]=c,e[3]=_):_=e[3];const O=_;let p;if(e[4]!==O||e[5]!==d){let j;e[7]!==O?(j=u=>O(u.id),e[7]=O,e[8]=j):j=e[8],p=d.filter(j),e[4]=O,e[5]=d,e[6]=p}else p=e[6];const R=p.length;let I;if(e[9]!==h||e[10]!==g||e[11]!==n||e[12]!==R||e[13]!==E||e[14]!==r||e[15]!==O||e[16]!==d||e[17]!==x||e[18]!==a||e[19]!==o||e[20]!==l||e[21]!==i||e[22]!==C){const j=d.slice(0,C),u=d.length>C;let M;e[24]===Symbol.for("react.memo_cache_sentinel")?(M=()=>S(cs),e[24]=M):M=e[24];const A=r??tt[l]??st;let k;e[25]!==i||e[26]!==A?(k=s.jsx(ye,{icon:A,name:i,size:"sm"}),e[25]=i,e[26]=A,e[27]=k):k=e[27];let G;e[28]!==i?(G=s.jsx("span",{className:"text-sm font-medium truncate",children:i}),e[28]=i,e[29]=G):G=e[29];let U;e[30]!==k||e[31]!==G?(U=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[k,G]}),e[30]=k,e[31]=G,e[32]=U):U=e[32];let B;e[33]!==R||e[34]!==d.length?(B=s.jsxs(ge,{variant:"secondary",className:"text-xs text-muted-foreground",children:[R,"/",d.length," enabled"]}),e[33]=R,e[34]=d.length,e[35]=B):B=e[35];let w;e[36]!==E?(w=E?s.jsx(Lt,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx(Pt,{size:16,className:"text-muted-foreground shrink-0"}),e[36]=E,e[37]=w):w=e[37];let z;e[38]!==w||e[39]!==B?(z=s.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[B,w]}),e[38]=w,e[39]=B,e[40]=z):z=e[40];let y;e[41]!==z||e[42]!==U?(y=s.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3 hover:bg-muted/50 cursor-pointer",onClick:M,children:[U,z]}),e[41]=z,e[42]=U,e[43]=y):y=e[43],I=s.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[y,E&&s.jsxs("div",{className:"border-t border-border bg-muted/20",children:[j.map(L=>{const Y=O(L.id),F=()=>{if(!o){if(g){x(n,h,L.id);return}a(n,L.id)}};return s.jsxs("div",{className:K("flex items-center justify-between gap-3 px-4 py-3 border-b border-border last:border-b-0",!o&&"hover:bg-muted/50 cursor-pointer"),onClick:F,children:[s.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s.jsx("span",{className:"text-sm truncate",children:L.title})}),s.jsx("div",{onClick:as,children:o?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsx(xe,{checked:Y,disabled:!0,onCheckedChange:rs})})}),s.jsx(Te,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):s.jsx(xe,{checked:Y,onCheckedChange:F})})]},L.id)}),u&&s.jsxs("button",{type:"button",className:"w-full px-4 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:()=>v(is),children:["Show more (",d.length-C," remaining)"]})]})]}),e[9]=h,e[10]=g,e[11]=n,e[12]=R,e[13]=E,e[14]=r,e[15]=O,e[16]=d,e[17]=x,e[18]=a,e[19]=o,e[20]=l,e[21]=i,e[22]=C,e[23]=I}else I=e[23];return I}function is(t){return t+rt}function rs(){}function as(t){return t.stopPropagation()}function cs(t){return!t}function ds(t){const e=q.c(33),{connection:n,selectedModels:l,allowAllModels:i,onToggleModel:r,onExitAllowAll:d,allConnectionModelsSelected:h,searchQuery:c,readOnly:g}=t,f=wt(n.id);let a,x,o,m,N;if(e[0]!==h||e[1]!==i||e[2]!==n.id||e[3]!==n.label||e[4]!==n.providerId||e[5]!==d||e[6]!==r||e[7]!==f||e[8]!==g||e[9]!==c||e[10]!==l){N=Symbol.for("react.early_return_sentinel");e:{let S;e[16]!==n.label?(S=A=>({...A,id:A.modelId,provider:n.label}),e[16]=n.label,e[17]=S):S=e[17];const C=f.filter(hs).map(S),v=c.trim().toLowerCase(),_=v?C.filter(A=>A.title.toLowerCase().includes(v)||A.id.toLowerCase().includes(v)||A.provider?.toLowerCase().includes(v)):C;if(_.length===0){N=null;break e}const O=new Map;for(const A of _){const k=ss(A.id,n.providerId),G=O.get(k)??{models:[],logo:null};G.models.push({id:A.id,title:ls(A.title),logo:A.logo}),!G.logo&&A.logo&&(G.logo=A.logo),O.set(k,G)}const p=Array.from(O.entries()).map(fs).sort(us),R=p.length===1||v.length>0;o="flex flex-col gap-3";const I=tt[n.providerId]??st;let j;e[18]!==n.providerId||e[19]!==I?(j=s.jsx("img",{src:I,alt:n.providerId,className:"w-4 h-4 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),e[18]=n.providerId,e[19]=I,e[20]=j):j=e[20];const u=it[n.providerId]??n.providerId;let M;e[21]!==u?(M=s.jsx("h4",{className:"text-sm font-medium",children:u}),e[21]=u,e[22]=M):M=e[22],e[23]!==M||e[24]!==j?(m=s.jsxs("div",{className:"flex items-center gap-2",children:[j,M]}),e[23]=M,e[24]=j,e[25]=m):m=e[25],a="flex flex-col gap-3",x=p.map(A=>s.jsx(os,{connectionId:n.id,subProviderId:A.id,subProviderName:A.name,groupLogo:A.logo,models:A.models,allConnectionModelIds:C.map(ms),selectedModels:l,allowAllModels:i,allConnectionModelsSelected:h,onToggleModel:r,onExitAllowAll:d,readOnly:g,defaultExpanded:R},A.id))}e[0]=h,e[1]=i,e[2]=n.id,e[3]=n.label,e[4]=n.providerId,e[5]=d,e[6]=r,e[7]=f,e[8]=g,e[9]=c,e[10]=l,e[11]=a,e[12]=x,e[13]=o,e[14]=m,e[15]=N}else a=e[11],x=e[12],o=e[13],m=e[14],N=e[15];if(N!==Symbol.for("react.early_return_sentinel"))return N;let T;e[26]!==a||e[27]!==x?(T=s.jsx("div",{className:a,children:x}),e[26]=a,e[27]=x,e[28]=T):T=e[28];let E;return e[29]!==o||e[30]!==m||e[31]!==T?(E=s.jsxs("div",{className:o,children:[m,T]}),e[29]=o,e[30]=m,e[31]=T,e[32]=E):E=e[32],E}function ms(t){return t.id}function us(t,e){return t.name.localeCompare(e.name)}function fs(t){const[e,n]=t;return{id:e,name:ns(e),logo:n.logo,models:n.models}}function hs(t,e,n){return n.findIndex(l=>l.modelId===t.modelId)===e}function gs(t){const e=q.c(35),{allowAllModels:n,modelSet:l,onAllowAllChange:i,onModelSetChange:r,readOnly:d,searchQuery:h}=t,c=d===void 0?!1:d,g=$.useDeferredValue(h),f=Mt();let a;e[0]!==l||e[1]!==r?(a=(p,R)=>{const I=l[p]??[],j={...l};if(I.includes(R)){const u=I.filter(M=>M!==R);u.length===0?delete j[p]:j[p]=u}else j[p]=[...I,R];r(j)},e[0]=l,e[1]=r,e[2]=a):a=e[2];const x=a;let o;e[3]!==l||e[4]!==i||e[5]!==r?(o=(p,R,I)=>{i(!1),r({...l,[p]:R.filter(j=>j!==I)})},e[3]=l,e[4]=i,e[5]=r,e[6]=o):o=e[6];const m=o,N=!c&&"hover:bg-muted/50 cursor-pointer";let T;e[7]!==N?(T=K("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",N),e[7]=N,e[8]=T):T=e[8];let E;e[9]!==n||e[10]!==i||e[11]!==r||e[12]!==c?(E=()=>{if(c)return;const p=!n;i(p),p&&r({})},e[9]=n,e[10]=i,e[11]=r,e[12]=c,e[13]=E):E=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("span",{className:"text-sm font-medium",children:"All models"}),e[14]=S):S=e[14];let C;e[15]!==n||e[16]!==i||e[17]!==r||e[18]!==c?(C=s.jsx("div",{onClick:ps,children:c?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsx(xe,{checked:n,disabled:!0,onCheckedChange:xs})})}),s.jsx(Te,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):s.jsx(xe,{checked:n,onCheckedChange:p=>{i(p),p&&r({})}})}),e[15]=n,e[16]=i,e[17]=r,e[18]=c,e[19]=C):C=e[19];let v;e[20]!==T||e[21]!==E||e[22]!==C?(v=s.jsxs("div",{className:T,onClick:E,children:[S,C]}),e[20]=T,e[21]=E,e[22]=C,e[23]=v):v=e[23];let _;e[24]!==f||e[25]!==n||e[26]!==g||e[27]!==m||e[28]!==l||e[29]!==c||e[30]!==x?(_=f.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No LLM connections configured"}):f.map(p=>s.jsx($.Suspense,{fallback:s.jsxs("div",{className:"px-4 py-3 flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(fe,{className:"size-4 animate-spin"}),"Loading models..."]}),children:s.jsx(ds,{connection:p,selectedModels:l[p.id]??[],allowAllModels:n,onToggleModel:x,onExitAllowAll:m,allConnectionModelsSelected:(l[p.id]??[]).includes("*"),searchQuery:g,readOnly:c})},p.id)),e[24]=f,e[25]=n,e[26]=g,e[27]=m,e[28]=l,e[29]=c,e[30]=x,e[31]=_):_=e[31];let O;return e[32]!==_||e[33]!==v?(O=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 pb-6",children:[v,_]}),e[32]=_,e[33]=v,e[34]=O):O=e[34],O}function xs(){}function ps(t){return t.stopPropagation()}function bs(t){const e=q.c(52),{open:n,onOpenChange:l,selectedMemberIds:i,onAddMembers:r}=t,[d,h]=$.useState(""),c=$.useDeferredValue(d);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=[],e[0]=g):g=e[0];const[f,a]=$.useState(g),{data:x}=nt();let o,m,N,T,E,S,C,v,_,O,p;if(e[1]!==x?.data?.members||e[2]!==c||e[3]!==r||e[4]!==l||e[5]!==n||e[6]!==f||e[7]!==d||e[8]!==i){const U=x?.data?.members??[];let B;e[20]!==c?(B=y=>{const L=c.toLowerCase();return y.user?.name?.toLowerCase().includes(L)||y.user?.email?.toLowerCase().includes(L)},e[20]=c,e[21]=B):B=e[21];const w=U.filter(B);let z;e[22]!==r||e[23]!==l||e[24]!==f?(z=()=>{r(f),a([]),l(!1)},e[22]=r,e[23]=l,e[24]=f,e[25]=z):z=e[25],N=z,m=Qe,O=n,p=l,o=qe,v="sm:max-w-md p-0",e[26]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs(He,{className:"px-6 pt-6",children:[s.jsx(Ze,{children:"Add Members to Role"}),s.jsx(Xe,{children:"Select members to add to this role."})]}),e[26]=_):_=e[26],S="flex flex-col h-80",e[27]!==d?(C=s.jsx("div",{className:"border-b border-border px-4 py-3",children:s.jsx(ve,{value:d,onChange:h,placeholder:"Search members...",className:"w-full"})}),e[27]=d,e[28]=C):C=e[28],T="flex-1 overflow-auto",E=w.length===0?s.jsx("div",{className:"flex items-center justify-center h-full px-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:d?"No members found":"No members available"})}):s.jsx("div",{className:"px-6 py-2 space-y-1",children:w.map(y=>{const L=y.role!=="owner",Y=i.includes(y.id),F=f.includes(y.id);return s.jsxs("label",{className:K("flex items-center gap-3 p-2 rounded-lg",!L||Y?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-muted/50"),children:[s.jsx(Me,{checked:F||Y,onCheckedChange:()=>{!L||Y||a(X=>X.includes(y.id)?X.filter(J=>J!==y.id):[...X,y.id])},disabled:!L||Y}),s.jsx(lt,{url:y.user?.image??void 0,fallback:ot(y.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:y.user?.name||"Unknown"}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y.user?.email})]}),!L&&s.jsx(ge,{variant:"secondary",className:"shrink-0",children:"Owner"}),Y&&L&&s.jsx(ge,{variant:"outline",className:"shrink-0",children:"Added"})]},y.id)})}),e[1]=x?.data?.members,e[2]=c,e[3]=r,e[4]=l,e[5]=n,e[6]=f,e[7]=d,e[8]=i,e[9]=o,e[10]=m,e[11]=N,e[12]=T,e[13]=E,e[14]=S,e[15]=C,e[16]=v,e[17]=_,e[18]=O,e[19]=p}else o=e[9],m=e[10],N=e[11],T=e[12],E=e[13],S=e[14],C=e[15],v=e[16],_=e[17],O=e[18],p=e[19];let R;e[29]!==T||e[30]!==E?(R=s.jsx("div",{className:T,children:E}),e[29]=T,e[30]=E,e[31]=R):R=e[31];let I;e[32]!==R||e[33]!==S||e[34]!==C?(I=s.jsxs("div",{className:S,children:[C,R]}),e[32]=R,e[33]=S,e[34]=C,e[35]=I):I=e[35];let j;e[36]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Je,{children:"Cancel"}),e[36]=j):j=e[36];const u=f.length===0,M=f.length>0&&`(${f.length})`;let A;e[37]!==N||e[38]!==u||e[39]!==M?(A=s.jsxs(We,{className:"px-6 pb-6",children:[j,s.jsxs(et,{onClick:N,disabled:u,children:["Add ",M]})]}),e[37]=N,e[38]=u,e[39]=M,e[40]=A):A=e[40];let k;e[41]!==o||e[42]!==I||e[43]!==A||e[44]!==v||e[45]!==_?(k=s.jsxs(o,{className:v,children:[_,I,A]}),e[41]=o,e[42]=I,e[43]=A,e[44]=v,e[45]=_,e[46]=k):k=e[46];let G;return e[47]!==m||e[48]!==k||e[49]!==O||e[50]!==p?(G=s.jsx(m,{open:O,onOpenChange:p,children:k}),e[47]=m,e[48]=k,e[49]=O,e[50]=p,e[51]=G):G=e[51],G}function Es(t){const e=q.c(29),{memberIds:n,onMemberIdsChange:l,readOnly:i,readOnlyMessage:r,searchQuery:d,addMemberDialogOpen:h,onAddMemberDialogOpenChange:c}=t,g=i===void 0?!1:i,f=r===void 0?"Owner membership cannot be changed":r,a=$.useDeferredValue(d),{data:x}=nt();let o,m,N;if(e[0]!==x?.data?.members||e[1]!==a||e[2]!==n||e[3]!==l||e[4]!==g||e[5]!==f||e[6]!==d){const v=x?.data?.members??[];let _;e[10]!==n?(_=I=>n.includes(I.id),e[10]=n,e[11]=_):_=e[11];const O=v.filter(_);let p;e[12]!==a?(p=I=>{const j=a.toLowerCase();return I.user?.name?.toLowerCase().includes(j)||I.user?.email?.toLowerCase().includes(j)},e[12]=a,e[13]=p):p=e[13];const R=O.filter(p);N="flex flex-col h-full",o="flex-1 overflow-auto",m=O.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-base font-medium mb-1",children:"No members"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Add members to grant them the configured permissions."})]})}):R.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("p",{className:"text-sm text-muted-foreground",children:['No members match "',d,'"']})}):s.jsx("div",{className:"p-4 space-y-2",children:R.map(I=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/30",children:[s.jsx(lt,{url:I.user?.image??void 0,fallback:ot(I.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:I.user?.name||"Unknown"}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:I.user?.email})]}),g?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsx(ne,{variant:"ghost",size:"sm",disabled:!0,children:s.jsx(ze,{size:16})})})}),s.jsx(Te,{children:s.jsx("p",{children:f})})]})}):s.jsx(ne,{variant:"ghost",size:"sm",onClick:()=>l(n.filter(j=>j!==I.id)),children:s.jsx(ze,{size:16})})]},I.id))}),e[0]=x?.data?.members,e[1]=a,e[2]=n,e[3]=l,e[4]=g,e[5]=f,e[6]=d,e[7]=o,e[8]=m,e[9]=N}else o=e[7],m=e[8],N=e[9];let T;e[14]!==o||e[15]!==m?(T=s.jsx("div",{className:o,children:m}),e[14]=o,e[15]=m,e[16]=T):T=e[16];let E;e[17]!==n||e[18]!==l?(E=v=>l([...n,...v]),e[17]=n,e[18]=l,e[19]=E):E=e[19];let S;e[20]!==h||e[21]!==n||e[22]!==c||e[23]!==E?(S=s.jsx(bs,{open:h,onOpenChange:c,selectedMemberIds:n,onAddMembers:E}),e[20]=h,e[21]=n,e[22]=c,e[23]=E,e[24]=S):S=e[24];let C;return e[25]!==N||e[26]!==T||e[27]!==S?(C=s.jsxs("div",{className:N,children:[T,S]}),e[25]=N,e[26]=T,e[27]=S,e[28]=C):C=e[28],C}function Ts(t){const e=q.c(3);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:24,className:"animate-spin text-muted-foreground"})}),e[0]=n):n=e[0];let l;return e[1]!==t?(l=s.jsx($.Suspense,{fallback:n,children:s.jsx(Es,{...t})}),e[1]=t,e[2]=l):l=e[2],l}const _s={owner:[],admin:[],user:[]};function Is(t,e,n,l){const i=t==="owner"||t==="admin";return{role:{id:n?.id,slug:t,label:t.charAt(0).toUpperCase()+t.slice(1)},allowAllStaticPermissions:i,staticPermissions:_s[t],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:e.filter(r=>r.role===t).map(r=>r.id)}}function Ns(t,e,n){const l=t.permission||{},i=l.self||[],r=i.includes("*"),d=r?[]:i.filter(a=>a!=="*"),h={};for(const[a,x]of Object.entries(l))if(!(a==="self"||a==="models"))if(a==="*")for(const o of n)h[o.id]=x.includes("*")?o.tools?.map(m=>m.name)??[]:x;else{const o=n.find(m=>m.id===a);o&&(h[a]=x.includes("*")?o.tools?.map(m=>m.name)??[]:x)}const c=l.models||[],g=c.length===0||c.includes("*:*"),f={};if(!g)for(const a of c){const x=a.indexOf(":");if(x===-1)continue;const o=a.slice(0,x),m=a.slice(x+1);f[o]||(f[o]=[]),f[o].push(m)}return{role:{id:t.id,slug:t.role,label:t.label},allowAllStaticPermissions:r,staticPermissions:d,toolSet:h,allowAllModels:g,modelSet:f,memberIds:e.filter(a=>a.role===t.role).map(a=>a.id)}}function Ss(t,e){const n={};t.allowAllStaticPermissions?n.self=["*"]:t.staticPermissions.length>0&&(n.self=t.staticPermissions);for(const[l,i]of Object.entries(t.toolSet))if(i.length>0){const d=e.find(h=>h.id===l)?.tools?.map(h=>h.name)??[];n[l]=d.length>0&&d.every(h=>i.includes(h))?["*"]:i}if(t.allowAllModels)n.models=["*:*"];else{const l=[];for(const[i,r]of Object.entries(t.modelSet))for(const d of r)l.push(`${i}:${d}`);l.length>0&&(n.models=l)}return n}function Cs(t,e,n){return t.kind==="builtin"?Is(t.role,e,void 0):t.kind==="custom"?Ns(t.role,e,n):{role:{id:void 0,slug:void 0,label:""},allowAllStaticPermissions:!1,staticPermissions:[],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:[]}}function As(t){const e=q.c(6),{readOnly:n,readOnlyMessage:l,onOpen:i}=t,r=l===void 0?"Owner membership cannot be changed":l;if(n){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsxs(ne,{variant:"outline",size:"sm",disabled:!0,children:[s.jsx(Ae,{size:16}),"Add Member"]})})}),e[0]=c):c=e[0];let g;return e[1]!==r?(g=s.jsx(pe,{children:s.jsxs(be,{children:[c,s.jsx(Te,{children:s.jsx("p",{children:r})})]})}),e[1]=r,e[2]=g):g=e[2],g}let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ae,{size:16}),e[3]=d):d=e[3];let h;return e[4]!==i?(h=s.jsxs(ne,{variant:"outline",size:"sm",onClick:i,children:[d,"Add Member"]}),e[4]=i,e[5]=h):h=e[5],h}function Os(t){const e=q.c(14),{locator:n}=Ne(),l=je(),i=yt();let r;e[0]!==n?(r=re.members(n),e[0]=n,e[1]=r):r=e[1];let d;e[2]!==l?(d=()=>l.organization.listMembers(),e[2]=l,e[3]=d):d=e[3];let h;e[4]!==r||e[5]!==d?(h={queryKey:r,queryFn:d},e[4]=r,e[5]=d,e[6]=h):h=e[6];const{data:c,isPending:g}=Oe(h);if(g||!i){let o;return e[7]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:32,className:"animate-spin text-muted-foreground"})})}),e[7]=o):o=e[7],o}let f;e[8]!==c?.data?.members?(f=c?.data?.members??[],e[8]=c?.data?.members,e[9]=f):f=e[9];const a=f;let x;return e[10]!==i||e[11]!==a||e[12]!==t?(x=s.jsx(Rs,{...t,members:a,connections:i}),e[10]=i,e[11]=a,e[12]=t,e[13]=x):x=e[13],x}function Rs({target:t,onBack:e,onSaved:n,members:l,connections:i}){const{locator:r}=Ne(),d=je(),h=$e(),c=t.kind==="builtin",g=t.kind==="builtin"&&t.role==="owner",f=t.kind==="new",[a,x]=$.useState(c?"org":"mcp"),o=mt({resolver:ut(Zt),defaultValues:Cs(t,l,i)}),m=o.formState.isValid,N=o.formState.isDirty,T=Fe({mutationFn:async u=>{const M=Ss(u,i),A=u.role.slug||u.role.label.toLowerCase().replace(/\s+/g,"-"),k=(u.role.slug==="owner"||u.role.slug==="admin"||u.role.slug==="user")&&!u.role.id,G=async(U,B)=>{const w=l.filter(L=>L.role===(B??U)).map(L=>L.id),z=u.memberIds.filter(L=>!w.includes(L)),y=w.filter(L=>!u.memberIds.includes(L));for(const L of z){const Y=await d.organization.updateMemberRole({memberId:L,role:[U]});if(Y?.error)throw new Error(Y.error.message??"Something went wrong")}for(const L of y){const Y=await d.organization.updateMemberRole({memberId:L,role:["user"]});if(Y?.error)throw new Error(Y.error.message??"Something went wrong")}};if(k)return await G(u.role.slug),u;if(u.role.id){const U=u.role.label.toLowerCase().replace(/\s+/g,"-"),B=u.role.slug,w=U!==B,z=await d.organization.updateRole({roleId:u.role.id,data:{permission:M,...w?{roleName:U}:{}}});if(z?.error)throw new Error(z.error.message??"Something went wrong");return await G(w?U:B,w?B:void 0),w?{...u,role:{...u.role,slug:U}}:u}else{const U=await d.organization.createRole({role:A,permission:M});if(U?.error)throw new Error(U.error.message??"Something went wrong");for(const B of u.memberIds){const w=await d.organization.updateMemberRole({memberId:B,role:[A]});if(w?.error)throw new Error(w.error.message)}return{...u,role:{...u.role,id:U.data?.roleData?.id,slug:A}}}},onSuccess:(u,M)=>{h.invalidateQueries({queryKey:re.members(r)}),h.invalidateQueries({queryKey:re.organizationRoles(r)});const A=!M.role.id&&!M.role.slug,k=M.role.slug==="owner"&&!M.role.id;Re(k?"role_members_updated":A?"role_created":"role_updated",{role_slug:M.role.slug??null}),he.success(k?"Members updated successfully!":A?"Role created successfully!":"Role updated successfully!"),o.reset(u),n(u.role.id)},onError:u=>{he.error(u instanceof Error?u.message:"Failed to save role")}}),E=o.handleSubmit(u=>{if(!u.role.label.trim()){he.error("Role name is required"),o.setFocus("role.label");return}T.mutate(u)}),S=!g,C=t.kind==="builtin"?t.role.charAt(0).toUpperCase()+t.role.slice(1):t.kind==="custom"?t.role.label:"",v=[...g?[]:[{id:"mcp",label:"MCP Permissions"}],{id:"org",label:"Organization Permissions"},{id:"models",label:"Models"},{id:"members",label:"Members"}],[_,O]=$.useState(""),[p,R]=$.useState(!1),I=u=>{x(u),O("")},j={mcp:"Search MCP servers...",org:"Search permissions...",models:"Search models...",members:"Search members..."};return s.jsx(te,{children:s.jsxs(te.Content,{className:K("flex flex-col",a!=="org"&&"overflow-hidden"),children:[s.jsx("div",{className:"shrink-0 mx-auto w-full max-w-[1200px] px-4 md:px-10 pt-8 md:pt-12 pb-4",children:s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(te.Title,{actions:S&&s.jsxs(s.Fragment,{children:[s.jsx(ne,{variant:"outline",size:"sm",onClick:e,disabled:T.isPending,children:"Cancel"}),s.jsx(ne,{size:"sm",onClick:E,disabled:T.isPending||!m||!N,children:T.isPending?"Saving...":f?"Create Role":"Save Changes"})]}),children:s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx("div",{className:K("size-2.5 rounded-full shrink-0",t.kind==="builtin"?Ht(t.role):qt(o.watch("role.label")))}),g&&s.jsx(Ke,{size:16,className:"text-muted-foreground shrink-0"}),f||t.kind==="custom"?s.jsx("input",{...o.register("role.label"),placeholder:"Role name",className:"leading-tight text-foreground bg-transparent border-none outline-none px-1 -mx-1 rounded hover:bg-input/25 focus:bg-input/25 transition-colors w-64 placeholder:text-muted-foreground/50",autoFocus:f}):s.jsx("span",{className:"truncate",children:C})]})}),s.jsx("div",{className:"flex items-center gap-2",children:v.map(u=>s.jsx("button",{type:"button",onClick:()=>I(u.id),className:K("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex items-center",a===u.id?"bg-accent border-border text-foreground":"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:u.label},u.id))}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx(ve,{value:_,onChange:O,placeholder:j[a]??"Search...",className:"w-full md:w-[375px]"}),a==="members"&&s.jsx(As,{readOnly:t.kind==="builtin"&&t.role==="owner",onOpen:()=>R(!0)})]})]})}),s.jsx("div",{className:K("mx-auto w-full max-w-[1200px] px-4 md:px-10 pb-6",a!=="org"&&"flex-1 min-h-0"),children:s.jsxs("div",{className:K(a!=="org"&&"h-full overflow-hidden",a!=="models"&&a!=="org"&&"border border-border rounded-xl bg-card"),children:[a==="mcp"&&!g&&s.jsx(Kt,{toolSet:o.watch("toolSet"),onToolSetChange:u=>o.setValue("toolSet",u,{shouldDirty:!0}),searchQuery:_}),a==="org"&&s.jsx(Xt,{allowAllStaticPermissions:o.watch("allowAllStaticPermissions"),staticPermissions:o.watch("staticPermissions"),onAllowAllChange:u=>o.setValue("allowAllStaticPermissions",u,{shouldDirty:!0}),onPermissionsChange:u=>o.setValue("staticPermissions",u,{shouldDirty:!0}),readOnly:g,searchQuery:_}),a==="models"&&s.jsx(gs,{allowAllModels:o.watch("allowAllModels"),modelSet:o.watch("modelSet"),onAllowAllChange:u=>o.setValue("allowAllModels",u,{shouldDirty:!0}),onModelSetChange:u=>o.setValue("modelSet",u,{shouldDirty:!0}),readOnly:g,searchQuery:_}),a==="members"&&s.jsx(Ts,{memberIds:o.watch("memberIds"),onMemberIdsChange:u=>o.setValue("memberIds",u,{shouldDirty:!0}),readOnly:t.kind==="builtin"&&(t.role==="owner"||t.role==="user"),readOnlyMessage:t.kind==="builtin"&&t.role==="user"?"User is the default role — members can't be removed from it; assign another role to change their access":"Owner membership cannot be changed",searchQuery:_,addMemberDialogOpen:p,onAddMemberDialogOpenChange:R})]})})]})})}function js(t){return t.kind==="builtin"?`builtin-${t.role}`:t.kind==="custom"?`custom-${t.role.id}`:"new"}function vs(t){const e=q.c(6),{area:n,children:l}=t,{isPrivileged:i,loading:r,error:d}=Dt();let h;return e[0]!==n||e[1]!==l||e[2]!==d||e[3]!==i||e[4]!==r?(h=s.jsx(kt,{granted:i,loading:r,error:d,area:n,children:l}),e[0]=n,e[1]=l,e[2]=d,e[3]=i,e[4]=r,e[5]=h):h=e[5],h}const ys=[{role:"owner",label:"Owner",color:"bg-red-500"},{role:"admin",label:"Admin",color:"bg-blue-500"},{role:"user",label:"User",color:"bg-green-500"}],Ce=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"];function Ms(t){if(!t)return"bg-neutral-400";let e=0;for(let l=0;l<t.length;l++){const i=t.charCodeAt(l);e=(e<<5)-e+i,e=e&e}const n=Math.abs(e)%Ce.length;return Ce[n]??Ce[0]}const ws={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function Ls(t,e){return e?ws[t]??"bg-neutral-400":Ms(t)}function Ps(){const t=q.c(77),[e,n]=$.useState(""),[l,i]=$.useState(null),r=gt();let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},t[0]=d):d=t[0];const{role:h}=xt(d),{locator:c}=Ne(),g=je(),f=$e(),{customRoles:a,refetch:x}=pt();let o;t[1]!==r?(o=P=>r({to:".",search:V=>({...V,role:P})}),t[1]=r,t[2]=o):o=t[2];const m=o;let N;e:{if(!h){N=null;break e}if(h==="new"){N={kind:"new"};break e}if(h.startsWith("builtin-")){N={kind:"builtin",role:h.slice(8)};break e}let P;t[3]!==h?(P=ae=>ae.id===h,t[3]=h,t[4]=P):P=t[4];const V=a.find(P);N=V?{kind:"custom",role:V}:null}const T=N;let E;t[5]!==c?(E=re.members(c),t[5]=c,t[6]=E):E=t[6];let S;t[7]!==g?(S=()=>g.organization.listMembers(),t[7]=g,t[8]=S):S=t[8];let C;t[9]!==E||t[10]!==S?(C={queryKey:E,queryFn:S},t[9]=E,t[10]=S,t[11]=C):C=t[11];const{data:v}=Oe(C);let _;t[12]!==v?.data?.members?(_=v?.data?.members??[],t[12]=v?.data?.members,t[13]=_):_=t[13];const O=_;let p;t[14]!==O?(p=P=>O.filter(V=>V.role===P).length,t[14]=O,t[15]=p):p=t[15];const R=p;let I;if(t[16]!==a||t[17]!==R||t[18]!==e){let P;t[20]!==R?(P=ce=>({kind:"builtin",role:{...ce,memberCount:R(ce.role)}}),t[20]=R,t[21]=P):P=t[21];const V=ys.map(P);let ae;t[22]!==R?(ae=ce=>({kind:"custom",role:{...ce,memberCount:R(ce.role)}}),t[22]=R,t[23]=ae):ae=t[23];const at=a.map(ae);if(I=[...V,...at],e){const ce=e.toLowerCase();I=I.filter(ct=>ct.role.label.toLowerCase().includes(ce))}t[16]=a,t[17]=R,t[18]=e,t[19]=I}else I=t[19];let j;t[24]!==g?(j=async P=>{const V=await g.organization.deleteRole({roleId:P});if(V?.error)throw new Error(V.error.message);return V?.data},t[24]=g,t[25]=j):j=t[25];const u=Fe({mutationFn:j,onSuccess:(P,V)=>{Re("role_deleted",{role_id:V}),f.invalidateQueries({queryKey:re.members(c)}),f.invalidateQueries({queryKey:re.organizationRoles(c)}),he.success("Role deleted successfully!"),x(),T?.kind==="custom"&&T.role.id===V&&m(void 0)},onError:zs});let M,A,k,G;t[26]===Symbol.for("react.memo_cache_sentinel")?(G={id:"role",header:"Role",render:Vs,cellClassName:"flex-1 min-w-0",sortable:!0},M={id:"type",header:"Type",render:Bs,cellClassName:"w-28 shrink-0"},A={id:"permissions",header:"Permissions",render:Us,cellClassName:"flex-1 min-w-0"},k={id:"members",header:"Members",render:Gs,cellClassName:"w-24 shrink-0"},t[26]=M,t[27]=A,t[28]=k,t[29]=G):(M=t[26],A=t[27],k=t[28],G=t[29]);let U;t[30]===Symbol.for("react.memo_cache_sentinel")?(U=[G,M,A,k,{id:"actions",header:"",render:P=>P.kind==="builtin"?null:s.jsxs(Et,{children:[s.jsx(Tt,{asChild:!0,children:s.jsx(ne,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:ks,children:s.jsx(Nt,{size:16})})}),s.jsx(_t,{align:"end",onClick:Ds,children:s.jsxs(It,{variant:"destructive",onClick:()=>{const V=P.role;V.id&&i({id:V.id,label:V.label})},children:[s.jsx(St,{size:16}),"Delete"]})})]}),cellClassName:"w-12 shrink-0"}],t[30]=U):U=t[30];const B=U;let w;t[31]!==m?(w=P=>{if(P.kind==="builtin")m(`builtin-${P.role.role}`);else{const V=P.role;m(V.id)}},t[31]=m,t[32]=w):w=t[32];const z=w;if(T){let P;t[33]!==m?(P=()=>m(void 0),t[33]=m,t[34]=P):P=t[34];let V;return t[35]!==x||t[36]!==m?(V=()=>{x(),m(void 0)},t[35]=x,t[36]=m,t[37]=V):V=t[37],s.jsx(Os,{target:T,onBack:P,onSaved:V},js(T))}let y;t[38]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(te.Title,{children:"Roles"}),t[38]=y):y=t[38];let L;t[39]===Symbol.for("react.memo_cache_sentinel")?(L=P=>{P.key==="Escape"&&(n(""),P.target.blur())},t[39]=L):L=t[39];let Y;t[40]!==e?(Y=s.jsx(ve,{value:e,onChange:n,placeholder:"Search roles...",className:"w-full md:w-[375px]",onKeyDown:L}),t[40]=e,t[41]=Y):Y=t[41];let F;t[42]!==m?(F=()=>m("new"),t[42]=m,t[43]=F):F=t[43];let X;t[44]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx(Ae,{size:16}),t[44]=X):X=t[44];let J;t[45]!==F?(J=s.jsxs(ne,{onClick:F,children:[X,"Create Role"]}),t[45]=F,t[46]=J):J=t[46];let le;t[47]!==Y||t[48]!==J?(le=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[Y,J]}),t[47]=Y,t[48]=J,t[49]=le):le=t[49];let oe;t[50]!==e?(oe=e?s.jsx(Ge,{title:"No roles found",description:`No roles match "${e}"`}):s.jsx(Ge,{title:"No roles",description:"Create a role to get started."}),t[50]=e,t[51]=oe):oe=t[51];let ie;t[52]!==I||t[53]!==B||t[54]!==z||t[55]!==oe?(ie=s.jsx(bt,{columns:B,data:I,isLoading:!1,onRowClick:z,emptyState:oe}),t[52]=I,t[53]=B,t[54]=z,t[55]=oe,t[56]=ie):ie=t[56];let b;t[57]!==le||t[58]!==ie?(b=s.jsx(te.Content,{children:s.jsx(te.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[y,le,ie]})})}),t[57]=le,t[58]=ie,t[59]=b):b=t[59];const D=l!==null;let Q;t[60]===Symbol.for("react.memo_cache_sentinel")?(Q=P=>!P&&i(null),t[60]=Q):Q=t[60];let H;t[61]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(Ze,{children:"Delete Role"}),t[61]=H):H=t[61];const W=l?.label;let Z;t[62]!==W?(Z=s.jsxs(He,{children:[H,s.jsxs(Xe,{children:['Are you sure you want to delete the "',W,'" role? This action cannot be undone.']})]}),t[62]=W,t[63]=Z):Z=t[63];let ee;t[64]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(Je,{children:"Cancel"}),t[64]=ee):ee=t[64];let de;t[65]!==u||t[66]!==l?(de=s.jsxs(We,{children:[ee,s.jsx(et,{onClick:()=>{l?.id&&u.mutate(l.id),i(null)},className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[65]=u,t[66]=l,t[67]=de):de=t[67];let me;t[68]!==Z||t[69]!==de?(me=s.jsxs(qe,{children:[Z,de]}),t[68]=Z,t[69]=de,t[70]=me):me=t[70];let ue;t[71]!==D||t[72]!==me?(ue=s.jsx(Qe,{open:D,onOpenChange:Q,children:me}),t[71]=D,t[72]=me,t[73]=ue):ue=t[73];let _e;return t[74]!==b||t[75]!==ue?(_e=s.jsxs(te,{children:[b,ue]}),t[74]=b,t[75]=ue,t[76]=_e):_e=t[76],_e}function Ds(t){return t.stopPropagation()}function ks(t){return t.stopPropagation()}function Gs(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.role.memberCount})}function Us(t){if(t.kind==="builtin")return t.role.role==="owner"||t.role.role==="admin"?s.jsx("span",{className:"text-sm text-muted-foreground",children:"Full access"}):s.jsx("span",{className:"text-sm text-muted-foreground",children:"Basic access"});const e=t.role,n=[];return e.allowsAllStaticPermissions?n.push("Full org access"):e.staticPermissionCount&&e.staticPermissionCount>0&&n.push(`${e.staticPermissionCount} org perm${e.staticPermissionCount!==1?"s":""}`),e.allowsAllConnections?n.push("All connections"):e.connectionCount&&e.connectionCount>0&&n.push(`${e.connectionCount} connection${e.connectionCount!==1?"s":""}`),s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:n.length>0?n.join(", "):"No permissions"})}function Bs(t){return t.kind==="builtin"?s.jsx(ge,{variant:"secondary",className:"text-xs",children:"Built-in"}):s.jsx(ge,{variant:"outline",className:"text-xs",children:"Custom"})}function Vs(t){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:K("size-2.5 rounded-full shrink-0",Ls(t.role.role,t.kind==="builtin"))}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.role.label}),t.kind==="builtin"&&s.jsx(Ke,{size:12,className:"text-muted-foreground shrink-0"})]})}function zs(t,e){Re("role_delete_failed",{role_id:e,error:t instanceof Error?t.message:String(t)}),he.error(t instanceof Error?t.message:"Failed to delete role")}function Ys(){const t=q.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:"Failed to load roles"})})}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ht,{fallback:e,children:s.jsx($.Suspense,{fallback:s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(Ps,{})})}),t[1]=n):n=t[1],n}function ul(){const t=q.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(vs,{area:"roles",children:s.jsx(Ys,{})}),t[0]=e):e=t[0],e}export{ul as default};
@@ -1 +0,0 @@
1
- import{c as T,j as t,r as Q,B as je,i as Se}from"./index-DIyNSN96.js";import{i as be}from"./ChevronRight-D8G4YOXh.js";import{J as fe}from"./agent-icon-XUhQzRLX.js";import{S as ue}from"./scroll-area-DSkli5k_.js";import{r as Ne,c as ke,u as _e,a as we,i as Ce,d as Te,f as Fe,P as Re,S as Ee}from"./page-seo-form-DtixMLnX.js";import{s as xe,p as ze}from"./index-BEAvVWMY.js";import{a as ge}from"./Tool01-D68BO4Z1.js";import"./AlertCircle-CWgtpDgs.js";import"./SwitchHorizontal01-DCwK87MF.js";import"./Settings02-CYQjLDZe.js";import"./XCircle-DMTFcHqR.js";import"./ArrowUpRight-O2h0Esun.js";import"./ZapSquare-BOyZ6Rgl.js";import"./Users03-DdlXwWfA.js";import"./CheckCircle-CzbMe8sq.js";import"./ChevronUp-2KGxjR7x.js";import"./ChevronDown-B0d3gCJ4.js";import"./DotsVertical-B-sq-ide.js";import"./Stars02-DBhfsTYG.js";import"./Eye-DmGPRR_e.js";import"./ZoomOut-BVzIyFeW.js";import"./Globe01-DO0D_c2f.js";import"./FilterLines-DEMLsHE0.js";import"./Star01-BiHTCvVR.js";import"./Globe04-XJoX6kmZ.js";import"./HardDrive-BICUWfOq.js";import"./Key01-BtQzPiv-.js";import"./LayoutLeft-Bi6Cd7VR.js";import"./LinkExternal01-CB818nxD.js";import"./Monitor01-DG_zJQKB.js";import"./Sun-YyXJklY4.js";import"./Palette-D5uFHHtD.js";import"./Play-8mfsN5e2.js";import"./Plus-tW6PYhLA.js";import"./SearchLg-BRB4E-a6.js";import"./SearchMd-DCtxyy_L.js";import"./Shield01-BmIMMGLU.js";import"./Stars01-BoOQBwEf.js";import"./Trash01-BDaXEXf_.js";import"./Upload01-B14hHeGP.js";import"./User01-D26yJD3f.js";import"./Users01-DcpQUESq.js";import"./XClose-DnDy-OvD.js";import"./X-C54nvkaE.js";import"./Zap-DtiJN-LC.js";import"./use-clock-tick-nZuMTIzb.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CY1tiWSY.js";import"./tooltip-Dn6TT4fb.js";import"./file-type-icon-BpvAmzSL.js";import"./dialog-a5ZkDZhy.js";import"./use-mobile-Dd_g0aui.js";import"./tab-id-DPNwWMUY.js";import"./content-blocks-o63cs2vh.js";import"./types-CZ4rLOEl.js";import"./use-mcp-client-tU9_Q31R.js";import"./auth-JzTDloGx.js";import"./chat-context-BXYlU18c.js";import"./hooks-DFBNXh69.js";import"./decopilot-sse-pool-4ct7M3nK.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-WZNqIa1a.js";import"./use-collections-BS7_MipP.js";import"./use-ai-providers-zyN1ygBC.js";import"./studio-tools-Bs0xo1Z2.js";import"./use-decopilot-events-CtfZfAhc.js";import"./use-organization-settings-DrjygbOR.js";import"./shell-layout-BCl91e2n.js";import"./avatar-CQ--7kDr.js";import"./alert-dialog-depKBGzY.js";import"./required-auth-layout-C_pN8svZ.js";import"./use-org-sso-2HCpkr8C.js";import"./sheet-B0u11yoj.js";import"./integration-icon-BVqUmyhK.js";import"./use-navigate-to-agent-KaAiMohr.js";import"./use-connection-Cs21veSc.js";import"./use-mcp-prompts-CVL6RAIG.js";import"./form-B8xO7s3Q.js";import"./label-D0Oq_enN.js";import"./input-CaPkg-tG.js";import"./select-z6yZBkEp.js";import"./switch-xjp3ajZN.js";import"./library-tab-pbqcFRtG.js";import"./drawer-CKH1wPOe.js";import"./collection-search-CVteq94G.js";import"./tabs-ChaZLm39.js";import"./toggle-group-C5lfVqY9.js";import"./agent-capabilities-2TzzHD_U.js";import"./connect-desktop-dialog-BP-u_roi.js";import"./decopilot-BzscZwEe.js";import"./checkbox-_ejCMjxu.js";import"./skeleton-BuPVKDK7.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Cn_5NRzd.js";import"./card-BtxpfIMO.js";import"./popover-Q1EdqSJG.js";import"./command-B9iUw_Wf.js";import"./index-Dzrzv-LN.js";import"./useInfiniteQuery-CG1m_ZaE.js";import"./use-infinite-scroll-BUhxpG1i.js";import"./index-COdjrItE.js";import"./toolbar-DfZcXUSS.js";import"./use-debounced-value-fFVCMUXm.js";import"./dropdown-menu-BsT801zR.js";import"./textarea-CvJkxwG_.js";import"./index-PDu5YsgJ.js";import"./question-004-sINsf4GQ.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-syvtXQo3.js";import"./use-registry-connections-D1C6nHHR.js";import"./extract-connection-data--lA2dih1.js";import"./collection-tabs-DHih69-0.js";import"./badge-Cu9Vf21V.js";import"./connection-form-helpers-NLjgFKGu.js";import"./authenticate-and-persist-oauth-DBxyWtpZ.js";import"./mcp-oauth-DkfCvuSl.js";import"./useSuspenseInfiniteQuery-9_oq2OeL.js";import"./shell-route-loading-D29sfZCo.js";import"./task-status-DTdpp4Y7.js";import"./use-status-sounds-DX4ADJSs.js";import"./empty-state-Cd23QDa9.js";import"./use-mcp-tools-B2LI7RR7.js";import"./use-capability-BKrWdNMG.js";import"./tools-list-BKWr5wCK.js";import"./use-debounced-autosave-Cl9vOVRq.js";import"./index-Dn1UY3fg.js";import"./sidebar-haKmZZ-W.js";import"./search-input-BiiOvDrk.js";import"./github-repo-picker-CNVz0qrC.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-CLseSmaH.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-BJjnMzvJ.js";import"./automation-runs-DT5n-ItD.js";import"./table-CyATWOpP.js";import"./use-members-Bm9KhrJN.js";import"./use-org-auth-client-CqXitYKc.js";import"./use-automations-DME2P9Yb.js";import"./use-file-configs-DxHSl6ZD.js";import"./monaco-editor-CQvQ4wyD.js";import"./select-model-CxlVTA2J.js";import"./automation-list-row-BIgl3VhR.js";function U(n){return typeof n=="string"&&n.trim()?n:void 0}function he(n,e){if(n){if(e)try{const i=new URL(n,e).href;return xe(i)}catch{return}return xe(n)}}function Pe(n){if(!n)return{};const e=U(n.title),i=U(n.titleTemplate);return{title:e&&i?.includes("%s")?i.replace(/%s/g,e):e,description:U(n.description),image:U(n.image),favicon:U(n.favicon)}}function Oe(n){if(!n)return"example.com";try{return new URL(n).host}catch{return"example.com"}}const Z="Your page title",ee="Your meta description will appear here.",Le=[{id:"google",label:"Google",color:"#4285F4",layout:"search"},{id:"facebook",label:"Facebook",color:"#1877F2",layout:"card"},{id:"twitter",label:"X (Twitter)",color:"#0f1419",layout:"card"},{id:"linkedin",label:"LinkedIn",color:"#0A66C2",layout:"card"},{id:"whatsapp",label:"WhatsApp",color:"#25D366",layout:"chat"},{id:"telegram",label:"Telegram",color:"#229ED9",layout:"chat"},{id:"slack",label:"Slack",color:"#611f69",layout:"attachment"},{id:"discord",label:"Discord",color:"#5865F2",layout:"attachment"}];function pe(n){const e=T.c(10),{src:i,className:r,iconSize:h}=n,a=h===void 0?20:h;if(i){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={objectFit:"cover"},e[0]=m):m=e[0];let p;return e[1]!==r||e[2]!==i?(p=t.jsx("img",{src:i,alt:"",referrerPolicy:"no-referrer",className:r,style:m}),e[1]=r,e[2]=i,e[3]=p):p=e[3],p}let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={display:"flex",alignItems:"center",justifyContent:"center",background:"#e5e7eb",color:"#9ca3af"},e[4]=s):s=e[4];let o;e[5]!==a?(o=t.jsx(ge,{size:a}),e[5]=a,e[6]=o):o=e[6];let l;return e[7]!==r||e[8]!==o?(l=t.jsx("div",{className:r,style:s,children:o}),e[7]=r,e[8]=o,e[9]=l):l=e[9],l}function $e(n){const e=T.c(27),{seo:i,host:r,path:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#fff",border:"1px solid #dadce0"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={background:"#f1f3f4"},e[1]=s):s=e[1];let o;e[2]!==i.favicon?(o=t.jsx("div",{className:"flex size-6 shrink-0 items-center justify-center overflow-hidden rounded-full",style:s,children:i.favicon?t.jsx("img",{src:i.favicon,alt:"",className:"size-full object-cover"}):t.jsx(ge,{size:12,color:"#9aa0a6"})}),e[2]=i.favicon,e[3]=o):o=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={color:"#202124"},e[4]=l):l=e[4];let m;e[5]!==r?(m=t.jsx("div",{className:"truncate text-[13px] leading-tight",style:l,children:r}),e[5]=r,e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#4d5156"},e[7]=p):p=e[7];let d;e[8]!==r||e[9]!==h?(d=t.jsxs("div",{className:"truncate text-[12px] leading-tight",style:p,children:[r,h]}),e[8]=r,e[9]=h,e[10]=d):d=e[10];let c;e[11]!==m||e[12]!==d?(c=t.jsxs("div",{className:"min-w-0",children:[m,d]}),e[11]=m,e[12]=d,e[13]=c):c=e[13];let g;e[14]!==o||e[15]!==c?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[o,c]}),e[14]=o,e[15]=c,e[16]=g):g=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f={color:"#1a0dab"},e[17]=f):f=e[17];const x=i.title??Z;let u;e[18]!==x?(u=t.jsx("div",{className:"mt-1.5 truncate text-[18px] leading-snug",style:f,children:x}),e[18]=x,e[19]=u):u=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j={color:"#4d5156"},e[20]=j):j=e[20];const v=i.description??ee;let y;e[21]!==v?(y=t.jsx("div",{className:"mt-0.5 line-clamp-2 text-[13px] leading-snug",style:j,children:v}),e[21]=v,e[22]=y):y=e[22];let S;return e[23]!==u||e[24]!==y||e[25]!==g?(S=t.jsxs("div",{className:"rounded-lg p-3 text-left",style:a,children:[g,u,y]}),e[23]=u,e[24]=y,e[25]=g,e[26]=S):S=e[26],S}function De(n){const e=T.c(20),{seo:i,host:r}=n;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={background:"#fff",border:"1px solid #e2e8f0"},e[0]=h):h=e[0];let a;e[1]!==i.image?(a=t.jsx(pe,{src:i.image,className:"h-40 w-full"}),e[1]=i.image,e[2]=a):a=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s={borderTop:"1px solid #e2e8f0"},e[3]=s):s=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={color:"#8a9099"},e[4]=o):o=e[4];let l;e[5]!==r?(l=t.jsx("div",{className:"truncate text-[11px]",style:o,children:r}),e[5]=r,e[6]=l):l=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m={color:"#1c2024"},e[7]=m):m=e[7];const p=i.title??Z;let d;e[8]!==p?(d=t.jsx("div",{className:"line-clamp-1 text-[14px] font-semibold",style:m,children:p}),e[8]=p,e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c={color:"#60666c"},e[10]=c):c=e[10];const g=i.description??ee;let f;e[11]!==g?(f=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:c,children:g}),e[11]=g,e[12]=f):f=e[12];let x;e[13]!==f||e[14]!==l||e[15]!==d?(x=t.jsxs("div",{className:"px-3 py-2",style:s,children:[l,d,f]}),e[13]=f,e[14]=l,e[15]=d,e[16]=x):x=e[16];let u;return e[17]!==x||e[18]!==a?(u=t.jsxs("div",{className:"overflow-hidden rounded-lg text-left",style:h,children:[a,x]}),e[17]=x,e[18]=a,e[19]=u):u=e[19],u}function Ie(n){const e=T.c(23),{seo:i,host:r,accent:h}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"#f0f2f5"},e[0]=a):a=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("p",{className:"px-1 pb-1.5 text-[12px]",style:{color:"#3b4045"},children:"Here's a post you might write with the link of your website:"}),e[1]=s):s=e[1];const o=`3px solid ${h}`;let l;e[2]!==o?(l={background:"#fff",borderLeft:o},e[2]=o,e[3]=l):l=e[3];let m;e[4]!==i.image?(m=t.jsx(pe,{src:i.image,className:"h-28 w-full",iconSize:18}),e[4]=i.image,e[5]=m):m=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p={color:"#1c2024"},e[6]=p):p=e[6];const d=i.title??Z;let c;e[7]!==d?(c=t.jsx("div",{className:"line-clamp-1 text-[12px] font-semibold",style:p,children:d}),e[7]=d,e[8]=c):c=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g={color:"#60666c"},e[9]=g):g=e[9];const f=i.description??ee;let x;e[10]!==f?(x=t.jsx("div",{className:"line-clamp-2 text-[11px]",style:g,children:f}),e[10]=f,e[11]=x):x=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u={color:"#8a9099"},e[12]=u):u=e[12];let j;e[13]!==r?(j=t.jsx("div",{className:"mt-0.5 text-[10px]",style:u,children:r}),e[13]=r,e[14]=j):j=e[14];let v;e[15]!==x||e[16]!==j||e[17]!==c?(v=t.jsxs("div",{className:"px-2.5 py-1.5",children:[c,x,j]}),e[15]=x,e[16]=j,e[17]=c,e[18]=v):v=e[18];let y;return e[19]!==v||e[20]!==l||e[21]!==m?(y=t.jsxs("div",{className:"rounded-lg p-2 text-left",style:a,children:[s,t.jsxs("div",{className:"overflow-hidden rounded-md",style:l,children:[m,v]})]}),e[19]=v,e[20]=l,e[21]=m,e[22]=y):y=e[22],y}function Ae(n){const e=T.c(33),{seo:i,host:r,accent:h,dark:a}=n,s=a?"#2b2d31":"#fff",o=a?"#00a8fc":"#1264a3",l=a?"#dbdee1":"#3b4045",m=a?"#949ba4":"#8a9099",p=a?"none":"1px solid #e2e8f0";let d;e[0]!==s||e[1]!==p?(d={background:s,border:p},e[0]=s,e[1]=p,e[2]=d):d=e[2];const c=`3px solid ${h}`;let g;e[3]!==c?(g={borderLeft:c,borderRadius:2},e[3]=c,e[4]=g):g=e[4];let f;e[5]!==m?(f={color:m},e[5]=m,e[6]=f):f=e[6];let x;e[7]!==r||e[8]!==f?(x=t.jsx("div",{className:"text-[10px]",style:f,children:r}),e[7]=r,e[8]=f,e[9]=x):x=e[9];let u;e[10]!==o?(u={color:o},e[10]=o,e[11]=u):u=e[11];const j=i.title??Z;let v;e[12]!==u||e[13]!==j?(v=t.jsx("div",{className:"line-clamp-1 text-[13px] font-semibold",style:u,children:j}),e[12]=u,e[13]=j,e[14]=v):v=e[14];let y;e[15]!==l?(y={color:l},e[15]=l,e[16]=y):y=e[16];const S=i.description??ee;let _;e[17]!==y||e[18]!==S?(_=t.jsx("div",{className:"line-clamp-2 text-[12px]",style:y,children:S}),e[17]=y,e[18]=S,e[19]=_):_=e[19];let N;e[20]!==_||e[21]!==x||e[22]!==v?(N=t.jsxs("div",{className:"min-w-0 flex-1",children:[x,v,_]}),e[20]=_,e[21]=x,e[22]=v,e[23]=N):N=e[23];let b;e[24]!==i.image?(b=t.jsx(pe,{src:i.image,className:"size-14 shrink-0 rounded",iconSize:16}),e[24]=i.image,e[25]=b):b=e[25];let k;e[26]!==N||e[27]!==b||e[28]!==g?(k=t.jsxs("div",{className:"flex gap-2.5 pl-2.5",style:g,children:[N,b]}),e[26]=N,e[27]=b,e[28]=g,e[29]=k):k=e[29];let C;return e[30]!==k||e[31]!==d?(C=t.jsx("div",{className:"rounded-lg p-2.5 text-left",style:d,children:k}),e[30]=k,e[31]=d,e[32]=C):C=e[32],C}function Be(n){const e=T.c(17),{platform:i,seo:r,host:h,path:a}=n;let s;e[0]!==h||e[1]!==a||e[2]!==i.color||e[3]!==i.id||e[4]!==i.layout||e[5]!==r?(s=i.layout==="search"?t.jsx($e,{seo:r,host:h,path:a}):i.layout==="card"?t.jsx(De,{seo:r,host:h,path:a}):i.layout==="chat"?t.jsx(Ie,{seo:r,host:h,path:a,accent:i.color}):t.jsx(Ae,{seo:r,host:h,path:a,accent:i.color,dark:i.id==="discord"}),e[0]=h,e[1]=a,e[2]=i.color,e[3]=i.id,e[4]=i.layout,e[5]=r,e[6]=s):s=e[6];const o=s;let l;e[7]!==i.color?(l=t.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:i.color}}),e[7]=i.color,e[8]=l):l=e[8];let m;e[9]!==i.label?(m=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:i.label}),e[9]=i.label,e[10]=m):m=e[10];let p;e[11]!==l||e[12]!==m?(p=t.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5",children:[l,m]}),e[11]=l,e[12]=m,e[13]=p):p=e[13];let d;return e[14]!==o||e[15]!==p?(d=t.jsxs("div",{children:[p,o]}),e[14]=o,e[15]=p,e[16]=d):d=e[16],d}function Ue(n){const e=T.c(17),{seo:i,url:r,path:h}=n,a=h===void 0?"/":h;let s,o,l;if(e[0]!==i||e[1]!==r){const u=Pe(i);s=u,o=he(u.image,r),l=he(u.favicon,r),e[0]=i,e[1]=r,e[2]=s,e[3]=o,e[4]=l}else s=e[2],o=e[3],l=e[4];let m;e[5]!==s||e[6]!==o||e[7]!==l?(m={...s,image:o,favicon:l},e[5]=s,e[6]=o,e[7]=l,e[8]=m):m=e[8];const p=m;let d;e[9]!==r?(d=Oe(r),e[9]=r,e[10]=d):d=e[10];const c=d,g=a==="/"?"":a;let f;e[11]!==g||e[12]!==c||e[13]!==p?(f=Le.map(u=>t.jsx(Be,{platform:u,seo:p,host:c,path:g},u.id)),e[11]=g,e[12]=c,e[13]=p,e[14]=f):f=e[14];let x;return e[15]!==f?(x=t.jsx("div",{className:"grid grid-cols-1 gap-4 @2xl:grid-cols-2",children:f}),e[15]=f,e[16]=x):x=e[16],x}function Ti(n){const e=T.c(63),{orgSlug:i,virtualMcpId:r,branch:h,decofile:a,meta:s,target:o,previewBaseUrl:l,onSaved:m,onEditDefaultSeo:p,onBack:d}=n,c=Ne(a,o,s),g=c?.seoData,f=o.kind==="site"?"site":o.pageKey,[x,u]=Q.useState(f),[j,v]=Q.useState(null),[y,S]=Q.useState(0),[_,N]=Q.useState(void 0);x!==f&&(u(f),v(null),N(void 0),S(Me));const{persistSeo:b,persistRawSeo:k,flush:C,isPending:te}=ke({orgSlug:i,virtualMcpId:r,branch:h,target:o,resolved:c,onSaved:m}),K=o.kind==="page",ve=K?c?.rawSeoData:void 0,B=_!==void 0?_:ve,ye=K?_e(B)??void 0:void 0,w=j??ye??g??{},F=c?we(w,c):null,z=F&&(!K||Ce(B))?ze(F,s):null;let M;e[0]!==s?(M=Te(s),e[0]=s,e[1]=M):M=e[1];const oe=M;let R,G;e[2]!==a||e[3]!==w||e[4]!==s||e[5]!==o.kind?(R=o.kind==="page"?Fe(a,s)?.seoData??{}:{},G=o.kind==="page"?Ve(R,w):w,e[2]=a,e[3]=w,e[4]=s,e[5]=o.kind,e[6]=R,e[7]=G):(R=e[6],G=e[7]);const ie=G;let V;e[8]!==b||e[9]!==c||e[10]!==v?(V=E=>{if(!c)return;const de=E;v(de),b(de)},e[8]=b,e[9]=c,e[10]=v,e[11]=V):V=e[11];const se=V;let Y;e[12]!==v?(Y=()=>v(null),e[12]=v,e[13]=Y):Y=e[13];const le=Y;let H;e[14]!==S?(H=()=>S(Ke),e[14]=S,e[15]=H):H=e[15];const re=H;let J;e[16]!==C||e[17]!==d?(J=()=>{C(),d?.()},e[16]=C,e[17]=d,e[18]=J):J=e[18];const ae=J,P=o.kind==="page"?o.path:"/";let W;e[19]!==P||e[20]!==l||e[21]!==o.kind?(W=o.kind==="page"&&l?Ge(P,l):l??null,e[19]=P,e[20]=l,e[21]=o.kind,e[22]=W):W=e[22];const ne=W,ce=o.kind==="site"?"No site-level SEO block found.":c?"SEO schema not found for this page.":"Could not load page SEO.",X=K&&c,me=o.kind==="site"&&c&&z;let O;e[23]!==ae||e[24]!==o.kind||e[25]!==o.pageName?(O=o.kind==="page"?t.jsxs("nav",{className:"flex min-w-0 items-center gap-1 text-sm",children:[t.jsx("button",{type:"button",onClick:ae,title:o.pageName,className:"min-w-0 truncate rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:o.pageName}),t.jsx(be,{className:"size-3 shrink-0 text-muted-foreground/60"}),t.jsx("span",{className:"px-1 py-0.5 font-medium text-foreground",children:"SEO"})]}):t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(fe,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm font-medium",children:"Default SEO"}),t.jsx("span",{className:"hidden truncate text-xs text-muted-foreground sm:inline",children:"· applied to every page unless overridden"})]}),e[23]=ae,e[24]=o.kind,e[25]=o.pageName,e[26]=O):O=e[26];let L;e[27]!==te?(L=te&&t.jsx(Se,{size:14,className:"animate-spin text-muted-foreground"}),e[27]=te,e[28]=L):L=e[28];let $;e[29]!==p||e[30]!==o.kind?($=o.kind==="page"&&p&&t.jsxs(je,{type:"button",variant:"outline",size:"sm",onClick:p,children:[t.jsx(fe,{size:14}),"Edit default SEO"]}),e[29]=p,e[30]=o.kind,e[31]=$):$=e[31];let D;e[32]!==$||e[33]!==L?(D=t.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[L,$]}),e[32]=$,e[33]=L,e[34]=D):D=e[34];let I;e[35]!==D||e[36]!==O?(I=t.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[O,D]}),e[35]=D,e[36]=O,e[37]=I):I=e[37];let A;e[38]!==F||e[39]!==re||e[40]!==le||e[41]!==oe||e[42]!==B||e[43]!==w||e[44]!==ce||e[45]!==y||e[46]!==se||e[47]!==P||e[48]!==k||e[49]!==b||e[50]!==ie||e[51]!==ne||e[52]!==c||e[53]!==z||e[54]!==v||e[55]!==N||e[56]!==X||e[57]!==me||e[58]!==R?(A=!c||!X&&!me?t.jsx("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:ce}):t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsx(ue,{className:"w-full max-w-md shrink-0 border-r [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"px-5 py-4",children:X?t.jsxs(t.Fragment,{children:[t.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Empty fields inherit the default SEO. The preview shows the resolved result."}),t.jsx(Re,{rawSeo:B,innerSeo:w,defaultResolveType:oe,seoSchema:z,activeResolveType:F,seoTypeOptions:c.seoTypeOptions,formResetKey:y,siteDefaultSeo:R,onPersistRaw:E=>{N(E),k(E)},onInnerChange:E=>{v(E),b(E)},onClearForm:le,onBumpFormKey:re})]}):z&&F&&t.jsx(Ee,{schema:z,resolveType:F,value:w,formResetKey:y,onChange:se})})}),t.jsx(ue,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:t.jsx("div",{className:"@container px-5 py-4",children:t.jsx(Ue,{seo:ie,url:ne,path:P})})})]}),e[38]=F,e[39]=re,e[40]=le,e[41]=oe,e[42]=B,e[43]=w,e[44]=ce,e[45]=y,e[46]=se,e[47]=P,e[48]=k,e[49]=b,e[50]=ie,e[51]=ne,e[52]=c,e[53]=z,e[54]=v,e[55]=N,e[56]=X,e[57]=me,e[58]=R,e[59]=A):A=e[59];let q;return e[60]!==I||e[61]!==A?(q=t.jsxs("div",{className:"flex h-full w-full flex-col",children:[I,A]}),e[60]=I,e[61]=A,e[62]=q):q=e[62],q}function Ke(n){return n+1}function Me(n){return n+1}function Ge(n,e){try{return new URL(n,e).href}catch{return e}}function Ve(n,e){const i=e.__resolveType,r=n.__resolveType;if(typeof i=="string"&&typeof r=="string"&&i!==r)return{...e};const h={...n};for(const[a,s]of Object.entries(e))a!=="__resolveType"&&s!=null&&(typeof s=="string"&&s.trim()===""||(h[a]=s));return h}export{Ti as SeoEditor};
@@ -1 +0,0 @@
1
- import{c as S,l as y,j as t,ae as G,i as K}from"./index-DIyNSN96.js";import{i as L}from"./Zap-DtiJN-LC.js";import{T as U,a as V,b as W}from"./tooltip-Dn6TT4fb.js";import{u as q}from"./use-virtual-mcp-WZNqIa1a.js";import{A as H}from"./agent-icon-XUhQzRLX.js";import{g as J}from"./task-status-DTdpp4Y7.js";import{u as O,f as Q}from"./use-clock-tick-nZuMTIzb.js";import{a as X}from"./agent-capabilities-2TzzHD_U.js";function Y(n){return n==="ephemeral"||n.startsWith("thread:")}function re(n){const e=S.c(40),{task:s,isActive:j,onClick:a,onArchive:x,showAutomationBadge:I,showAgentIcon:w,hideStatusIdle:$,indented:B}=n,A=J(s.status),D=A.icon,b=s.metadata?.kind==="tool_call_run",i=q(b?void 0:s.virtual_mcp_id);let N;e[0]!==i?(N=X(i),e[0]=i,e[1]=N):N=e[1];const v=N;O(6e4);const _=I||!!s.trigger_id,E=s.id,F="button",M=0;let r;e[2]!==a?(r=o=>{o.target===o.currentTarget&&(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),a())},e[2]=a,e[3]=r):r=e[3];const T=B?"-ml-4 pl-6":"pl-2",C=j?"bg-accent text-accent-foreground":"hover:bg-accent/60";let l;e[4]!==T||e[5]!==C?(l=y("group/row flex items-center gap-2 py-1.5 pr-2 rounded-md cursor-pointer transition-colors",T,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",C),e[4]=T,e[5]=C,e[6]=l):l=e[6];let c;e[7]!==b||e[8]!==w||e[9]!==i?.icon||e[10]!==i?.title?(c=w&&!b&&t.jsx(H,{icon:i?.icon??null,name:i?.title??"?",size:"2xs"}),e[7]=b,e[8]=w,e[9]=i?.icon,e[10]=i?.title,e[11]=c):c=e[11];let u;e[12]!==_?(u=_&&t.jsx(L,{size:12,"aria-label":"Automation-triggered",className:"shrink-0 text-blue-500"}),e[12]=_,e[13]=u):u=e[13];const z=s.title||"Untitled task";let d;e[14]!==z?(d=t.jsx("div",{className:"text-sm text-foreground truncate",children:z}),e[14]=z,e[15]=d):d=e[15];let m;e[16]!==u||e[17]!==d?(m=t.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[u,d]}),e[16]=u,e[17]=d,e[18]=m):m=e[18];let f;e[19]!==v||e[20]!==j||e[21]!==s.branch||e[22]!==s.updated_at?(f=s.updated_at&&t.jsxs("div",{className:y("flex items-center gap-1 text-[11px] min-w-0",j?"text-accent-foreground/70":"text-muted-foreground/60"),children:[s.branch&&!Y(s.branch)?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"truncate font-mono",children:s.branch}),t.jsx("span",{className:"shrink-0",children:"·"})]}):v?t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"truncate",children:[v.owner,"/",v.name]}),t.jsx("span",{className:"shrink-0",children:"·"})]}):null,t.jsx("span",{className:"shrink-0",children:Q(new Date(s.updated_at))})]}),e[19]=v,e[20]=j,e[21]=s.branch,e[22]=s.updated_at,e[23]=f):f=e[23];let p;e[24]!==m||e[25]!==f?(p=t.jsxs("div",{className:"flex-1 min-w-0",children:[m,f]}),e[24]=m,e[25]=f,e[26]=p):p=e[26];const P="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",R=!$&&t.jsx("span",{className:y("[grid-area:slot] flex size-7 items-center justify-center pointer-events-none transition-opacity",x&&"group-hover/row:opacity-0"),"aria-label":A.label,children:t.jsx(D,{size:14,className:y(A.iconClassName,s.status==="in_progress"&&"animate-spin")})});let h;e[27]!==x?(h=x&&t.jsxs(U,{children:[t.jsx(V,{asChild:!0,children:t.jsx("button",{type:"button","aria-label":"Archive task",onClick:o=>{o.stopPropagation(),x()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto transition-opacity flex size-7 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:t.jsx(G,{size:14})})}),t.jsx(W,{side:"right",children:"Archive"})]}),e[27]=x,e[28]=h):h=e[28];let g;e[29]!==R||e[30]!==h?(g=t.jsxs("div",{className:P,children:[R,h]}),e[29]=R,e[30]=h,e[31]=g):g=e[31];let k;return e[32]!==a||e[33]!==p||e[34]!==g||e[35]!==r||e[36]!==l||e[37]!==c||e[38]!==s.id?(k=t.jsxs("div",{"data-task-id":E,role:F,tabIndex:M,onClick:a,onKeyDown:r,className:l,children:[c,p,g]}),e[32]=a,e[33]=p,e[34]=g,e[35]=r,e[36]=l,e[37]=c,e[38]=s.id,e[39]=k):k=e[39],k}function le(){const n=S.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{"data-testid":"shell-route-loading",className:"absolute inset-0 h-full w-full flex items-center justify-center",children:t.jsx(K,{size:20,className:"animate-spin text-muted-foreground"})}),n[0]=e):e=n[0],e}export{le as S,re as T};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-C4d4IZ2d.js","assets/index-DIyNSN96.js","assets/index-DmMZ0-sF.css","assets/XCircle-DMTFcHqR.js","assets/CheckCircle-CzbMe8sq.js","assets/Settings02-CYQjLDZe.js","assets/use-mcp-client-tU9_Q31R.js","assets/auth-JzTDloGx.js","assets/useInfiniteQuery-CG1m_ZaE.js","assets/use-infinite-scroll-BUhxpG1i.js","assets/studio-tools-Bs0xo1Z2.js","assets/badge-Cu9Vf21V.js","assets/input-CaPkg-tG.js","assets/dropdown-menu-BsT801zR.js","assets/ChevronUp-2KGxjR7x.js","assets/ChevronRight-D8G4YOXh.js","assets/DotsVertical-B-sq-ide.js","assets/table-CyATWOpP.js","assets/toggle-group-C5lfVqY9.js","assets/use-view-mode-CIr8WEyc.js","assets/use-mobile-Dd_g0aui.js","assets/FilterLines-DEMLsHE0.js","assets/Globe01-DO0D_c2f.js","assets/SearchMd-DCtxyy_L.js","assets/dialog-a5ZkDZhy.js","assets/X-C54nvkaE.js","assets/AlertCircle-CWgtpDgs.js","assets/Upload01-B14hHeGP.js","assets/alert-dialog-depKBGzY.js","assets/card-BtxpfIMO.js","assets/Trash01-BDaXEXf_.js","assets/label-D0Oq_enN.js","assets/select-z6yZBkEp.js","assets/tooltip-Dn6TT4fb.js","assets/ChevronDown-B0d3gCJ4.js","assets/switch-xjp3ajZN.js","assets/textarea-CvJkxwG_.js","assets/checkbox-_ejCMjxu.js","assets/Eye-DmGPRR_e.js","assets/LinkExternal01-CB818nxD.js","assets/use-copy-CY1tiWSY.js","assets/Key01-BtQzPiv-.js","assets/Plus-tW6PYhLA.js","assets/mcp-oauth-DkfCvuSl.js","assets/Play-8mfsN5e2.js"])))=>i.map(i=>d[i]);
2
- import{c,b as m,e as n,j as t,i as p,r as l,ac as f}from"./index-DIyNSN96.js";import{R as u}from"./require-capability-DwU8Ss9R.js";import"./use-capability-BKrWdNMG.js";import"./access-gate-CahH-m4n.js";import"./capability-load-error-CZgYniY2.js";const g=l.lazy(()=>f(()=>import("./registry-layout-C4d4IZ2d.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])));function j(){const e=c.c(5),i=m();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=n(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(p,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
@@ -1 +0,0 @@
1
- import{c as h,G as I,K as T,q as b,V as C,$,j as o}from"./index-DIyNSN96.js";import{i as k}from"./mcp-oauth-DkfCvuSl.js";import{B as x}from"./badge-Cu9Vf21V.js";import{T as y,a as j,b as g,c as N}from"./tooltip-Dn6TT4fb.js";import{g as S}from"./types-CZ4rLOEl.js";import{s as _}from"./Eye-DmGPRR_e.js";import{s as A}from"./Star01-BiHTCvVR.js";import{ao as w}from"./agent-icon-XUhQzRLX.js";function M(m){const e=h.c(11),{connectionId:a}=m,{org:r}=I();let i,t,l;e[0]!==a||e[1]!==r.slug?(i=new URL(`/api/${r.slug}/mcp/${a}`,window.location.origin),l=b,t=T.isMCPAuthenticated(i.href,null),e[0]=a,e[1]=r.slug,e[2]=i,e[3]=t,e[4]=l):(i=e[2],t=e[3],l=e[4]);let s;e[5]!==i||e[6]!==r.id?(s=()=>k({url:i.href,token:null,orgId:r.id}),e[5]=i,e[6]=r.id,e[7]=s):s=e[7];let n;e[8]!==t||e[9]!==s?(n={queryKey:t,queryFn:s},e[8]=t,e[9]=s,e[10]=n):n=e[10];const{data:c}=l(n);return c}const H=[{key:"readOnlyHint",label:"Read-only",Icon:_,variant:"secondary"},{key:"destructiveHint",label:"Destructive",Icon:C,variant:"destructive"},{key:"idempotentHint",label:"Idempotent",Icon:$,variant:"secondary"},{key:"openWorldHint",label:"Open-world",Icon:A,variant:"outline"}];function D(m){const e=h.c(18),{annotations:a,_meta:r}=m;let i;e[0]!==r?(i=S(r),e[0]=r,e[1]=i):i=e[1];const t=!!i;let l,s,n,c,u;if(e[2]!==a||e[3]!==t){u=Symbol.for("react.early_return_sentinel");e:{const f=a?H.filter(v=>a[v.key]===!0):[];if(f.length===0&&!t){u=null;break e}l=N,s="flex gap-1 flex-nowrap",e[9]!==t?(n=t&&o.jsxs(y,{children:[o.jsx(j,{asChild:!0,children:o.jsx(x,{asChild:!0,variant:"secondary",className:"size-6 p-1",children:o.jsx(w,{})})}),o.jsx(g,{children:"Interactive"})]}),e[9]=t,e[10]=n):n=e[10],c=f.map(P)}e[2]=a,e[3]=t,e[4]=l,e[5]=s,e[6]=n,e[7]=c,e[8]=u}else l=e[4],s=e[5],n=e[6],c=e[7],u=e[8];if(u!==Symbol.for("react.early_return_sentinel"))return u;let d;e[11]!==s||e[12]!==n||e[13]!==c?(d=o.jsxs("div",{className:s,children:[n,c]}),e[11]=s,e[12]=n,e[13]=c,e[14]=d):d=e[14];let p;return e[15]!==l||e[16]!==d?(p=o.jsx(l,{children:d}),e[15]=l,e[16]=d,e[17]=p):p=e[17],p}function P(m){const{label:e,Icon:a,variant:r}=m;return o.jsxs(y,{children:[o.jsx(j,{asChild:!0,children:o.jsx(x,{asChild:!0,variant:r,className:"size-6 p-1",children:o.jsx(a,{})})}),o.jsx(g,{children:e})]},e)}export{D as T,M as u};
@@ -1 +0,0 @@
1
- import{r as l,c as p,j as I,L as S,b,G as v,a as x}from"./index-DIyNSN96.js";import{a as A}from"./use-virtual-mcp-WZNqIa1a.js";const g=l.createContext(null);function k(e){const r=p.c(7),{children:t}=e,[n,c]=l.useState(!1),[s,a]=l.useState(0);let i;r[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>a(C),r[0]=i):i=r[0];const d=i;let o;r[1]!==n||r[2]!==s?(o={empty:n,setEmpty:c,orderRevision:s,bumpOrderRevision:d},r[1]=n,r[2]=s,r[3]=o):o=r[3];let u;return r[4]!==t||r[5]!==o?(u=I.jsx(g.Provider,{value:o,children:t}),r[4]=t,r[5]=o,r[6]=u):u=r[6],u}function C(e){return e+1}function L(){return l.useContext(g)?.empty??!1}function R(){return l.useContext(g)?.bumpOrderRevision??E}function E(){}const f=new Map;function O(e){return`${e.orgId}:${e.userId}`}function G(e){return`sidebar.group-order.${e}`}function m(e){try{const r=localStorage.getItem(e),t=r?JSON.parse(r):[];return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}catch{return[]}}function P(e,r){try{localStorage.setItem(e,JSON.stringify(r))}catch{}}function $(e){const r=O(e),t=f.get(r);if(t)return t;const n=S.sidebarGroupOrder(e.orgId,e.userId);let c=!1;try{c=localStorage.getItem(n)!==null}catch{}let s=m(n);if(!c&&s.length===0&&e.userId!=="anon"){const a=m(G(e.orgId));a.length>0&&(s=a)}return f.set(r,s),s}function U(e,r){const t=new Set(r);return $(e).filter(n=>!t.has(n))}function w(e,r){f.set(O(e),r),P(S.sidebarGroupOrder(e.orgId,e.userId),r)}function _(e,r,t=[]){if(t.includes(r))return;const n=U(e,t);n.includes(r)||w(e,[r,...n])}function j(e){return(e??[]).filter(r=>!!r.pinned).map(r=>r.id)}function T(){const e=p.c(9),r=b(),{org:t}=v(),n=A(),{data:c}=x.useSession(),s=c?.user?.id??"anon";let a;e[0]!==n?(a=j(n),e[0]=n,e[1]=a):a=e[1];const i=a,d=R();let o;return e[2]!==d||e[3]!==r||e[4]!==t.id||e[5]!==t.slug||e[6]!==i||e[7]!==s?(o=(u,y)=>{_({orgId:t.id,userId:s},u,i),d();const h=crypto.randomUUID();r({to:"/$org/$taskId",params:{org:t.slug,taskId:h},search:{...y?.search??{},virtualmcpid:u}})},e[2]=d,e[3]=r,e[4]=t.id,e[5]=t.slug,e[6]=i,e[7]=s,e[8]=o):o=e[8],o}export{k as S,R as a,_ as b,T as c,j as g,L as u};
@@ -1 +0,0 @@
1
- import{c as S,j as n,l as v,G as T,k as B,K as P}from"./index-DIyNSN96.js";import{e as k,d as I,a as A,T as L,b as z,c as O}from"./table-CyATWOpP.js";import{a as K,n as E}from"./SwitchHorizontal01-DCwK87MF.js";import{u as H}from"./use-org-auth-client-CqXitYKc.js";function D(h){const e=S.c(29),{columns:t,data:m,sortKey:p,sortDirection:d,onSort:o,onRowClick:a,rowClassName:s}=h;let l;e[0]!==d?(l=function(r,N){return n.jsx("div",{className:"w-4 flex items-center justify-center",children:N&&d&&(d==="asc"?n.jsx(K,{size:16,className:"text-muted-foreground transition-colors"}):n.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=d,e[1]=l):l=e[1];const i=l;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=function(r,N){let y="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return r===N-1&&(y="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),y},e[2]=c):c=e[2];const u=c;let f;if(e[3]!==t||e[4]!==o||e[5]!==i||e[6]!==p){let x;e[8]!==t.length||e[9]!==o||e[10]!==i||e[11]!==p?(x=(r,N)=>{const y=p===r.id;return n.jsx(k,{className:v(u(N,t.length),"group transition-colors select-none",r.sortable&&"hover:bg-accent cursor-pointer",r.rowClassName,r.cellClassName),onClick:r.sortable&&o?()=>o(r.id):void 0,children:n.jsxs("span",{className:"flex items-center gap-1",children:[r.header,r.sortable&&i(r.id,y)]})},r.id)},e[8]=t.length,e[9]=o,e[10]=i,e[11]=p,e[12]=x):x=e[12],f=t.map(x),e[3]=t,e[4]=o,e[5]=i,e[6]=p,e[7]=f}else f=e[7];let w;e[13]!==f?(w=n.jsx(I,{className:"border-b-0",children:n.jsx(A,{className:"h-9 hover:bg-transparent border-b border-border",children:f})}),e[13]=f,e[14]=w):w=e[14];let g;if(e[15]!==t||e[16]!==m||e[17]!==a||e[18]!==s){let x;e[20]!==t||e[21]!==a||e[22]!==s?(x=(r,N)=>{const y=s?.(r);return n.jsx(A,{"data-row-index":N,className:v("group/data-row transition-colors border-b-0 hover:bg-accent/50",a?"cursor-pointer":"",y),onClick:a?()=>a(r):void 0,children:t.map(b=>n.jsx(L,{className:v("px-5 py-4 h-16 align-middle text-sm text-foreground",b.cellClassName,b.wrap?"whitespace-normal wrap-break-word":""),children:n.jsx("div",{className:v(b.wrap?"w-full":"min-w-0 w-full",!b.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:b.render?b.render(r):b.accessor?b.accessor(r):null})},b.id))},N)},e[20]=t,e[21]=a,e[22]=s,e[23]=x):x=e[23],g=m.map(x),e[15]=t,e[16]=m,e[17]=a,e[18]=s,e[19]=g}else g=e[19];let C;e[24]!==g?(C=n.jsx(z,{children:g}),e[24]=g,e[25]=C):C=e[25];let j;return e[26]!==w||e[27]!==C?(j=n.jsxs(O,{className:"w-full border-collapse",children:[w,C]}),e[26]=w,e[27]=C,e[28]=j):j=e[28],j}function Q(h){const e=S.c(12),{columns:t,data:m,isLoading:p,sortKey:d,sortDirection:o,onSort:a,onRowClick:s,emptyState:l}=h;if(p===void 0?!1:p){let u;return e[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=u):u=e[0],u}if(m.length===0){let u;e[1]!==l?(u=l||n.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=l,e[2]=u):u=e[2];let f;return e[3]!==u?(f=n.jsx("div",{className:"flex items-center justify-center h-full",children:u}),e[3]=u,e[4]=f):f=e[4],f}let c;return e[5]!==t||e[6]!==m||e[7]!==s||e[8]!==a||e[9]!==o||e[10]!==d?(c=n.jsx("div",{className:"flex-1",children:n.jsx(D,{columns:t,data:m,sortKey:d,sortDirection:o,onSort:a,onRowClick:s})}),e[5]=t,e[6]=m,e[7]=s,e[8]=a,e[9]=o,e[10]=d,e[11]=c):c=e[11],c}const R=[{value:"owner",label:"Owner",isBuiltin:!0},{value:"admin",label:"Admin",isBuiltin:!0},{value:"user",label:"User",isBuiltin:!0}];function M(h){return h.replace(/-/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function U(h){if(!h)return{staticPermissions:[],allowsAllStaticPermissions:!1,connectionIds:[],allowsAllConnections:!1,toolNames:[],allowsAllTools:!1,modelCount:0,allowsAllModels:!1};const e=[];let t=!1;const m=[];let p=!1;const d=new Set;let o=!1,a=0,s=!1;for(const[l,i]of Object.entries(h)){if(l==="self"){i.includes("*")?t=!0:e.push(...i);continue}if(l==="models"){i.includes("*:*")?s=!0:a=i.length;continue}if(l==="*"){if(p=!0,i.includes("*"))o=!0;else for(const c of i)d.add(c);continue}if(m.push(l),i.includes("*"))o=!0;else for(const c of i)d.add(c)}return{staticPermissions:e,allowsAllStaticPermissions:t,connectionIds:m,allowsAllConnections:p,toolNames:Array.from(d),allowsAllTools:o,modelCount:a,allowsAllModels:s}}function W(){const{locator:h}=T(),e=H(),{data:t,isLoading:m,error:p,refetch:d}=B({queryKey:P.organizationRoles(h),queryFn:async()=>{try{const s=await e.organization.listRoles();return s?.error?(console.error("[useOrganizationRoles] API error:",s.error),[]):s?.data??[]}catch(s){return console.error("[useOrganizationRoles] Fetch error:",s),[]}},staleTime:3e4}),o=R.map(s=>({role:s.value,label:s.label,isBuiltin:s.isBuiltin}));if(t&&Array.isArray(t))for(const s of t){const l=s.role;if(!l||R.some(x=>x.value===l))continue;const{staticPermissions:i,allowsAllStaticPermissions:c,connectionIds:u,allowsAllConnections:f,toolNames:w,allowsAllTools:g,modelCount:C,allowsAllModels:j}=U(s.permission);o.push({id:s.id,role:l,label:M(l),isBuiltin:!1,permission:s.permission??void 0,staticPermissionCount:c?-1:i.length,allowsAllStaticPermissions:c,connectionCount:f?-1:u.length,allowsAllConnections:f,toolCount:g?-1:w.length,allowsAllTools:g,modelCount:j?-1:C,allowsAllModels:j})}const a=o.filter(s=>!s.isBuiltin);return{roles:o,customRoles:a,builtinRoles:o.filter(s=>s.isBuiltin),isLoading:m,error:p,refetch:d}}export{Q as C,W as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./use-infinite-scroll-BUhxpG1i.js";import{cC as i}from"./index-DIyNSN96.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./use-infinite-scroll-BUhxpG1i.js";import{cC as s,au as n}from"./index-DIyNSN96.js";function a(r,e){return s({...r,enabled:!0,suspense:!0,throwOnError:n},u,e)}export{a as u};