decocms 4.237.1 → 4.238.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 (270) hide show
  1. package/dist/client/assets/{AlertCircle-1A66ChZ8.js → AlertCircle-NIgamkG1.js} +1 -1
  2. package/dist/client/assets/{AreaChart-Dx1Pn2Co.js → AreaChart-CRpc3cm7.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-CnuKbGpV.js → ArrowLeft-vl2nEIkm.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-Bsjtki2M.js → ArrowUp-DPZSwvHJ.js} +1 -1
  5. package/dist/client/assets/{ArrowUpRight-pDFVKdFq.js → ArrowUpRight-EJcVnEQQ.js} +1 -1
  6. package/dist/client/assets/{Check-BGqmqBTw.js → Check-BjlTRmvp.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-CsivrbxF.js → CheckCircle-DJReLGxy.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-C_pYLdFg.js → ChevronDown-BansJwMw.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-DWL1NiiZ.js → ChevronRight-8cwrWc6Q.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-tGKH4rDz.js → ChevronUp-CBwQlhRH.js} +1 -1
  11. package/dist/client/assets/{Copy01-CXA0XDKj.js → Copy01-DbAHd-uW.js} +1 -1
  12. package/dist/client/assets/{CreditCard01-BTzKnq0J.js → CreditCard01-CYifPwC3.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-BxAQzYD3.js → DotsVertical-DB5B45Uo.js} +1 -1
  14. package/dist/client/assets/{Eye-WE2z9tr4.js → Eye-Bh6RageV.js} +1 -1
  15. package/dist/client/assets/{FilterLines-D_y77zip.js → FilterLines-C7Wg9yVb.js} +1 -1
  16. package/dist/client/assets/{Globe01-Bke6m3TL.js → Globe01-D0Oxc1LP.js} +1 -1
  17. package/dist/client/assets/{Globe04-DXD9GLzl.js → Globe04-BkQE9r8Q.js} +1 -1
  18. package/dist/client/assets/{HardDrive-Cutks7DY.js → HardDrive-BHaqV6HV.js} +1 -1
  19. package/dist/client/assets/{Key01-BBHpeSTD.js → Key01-BwSFgo4R.js} +1 -1
  20. package/dist/client/assets/{LayoutLeft-gC7wddTz.js → LayoutLeft-BSvhSrEB.js} +1 -1
  21. package/dist/client/assets/{LinkExternal01-CsV2BCei.js → LinkExternal01-CyubGI-F.js} +1 -1
  22. package/dist/client/assets/{LogOut01-CNyVSknZ.js → LogOut01-BxGW4Z42.js} +1 -1
  23. package/dist/client/assets/{Monitor01-xpWSTIMp.js → Monitor01-DQW548Gm.js} +1 -1
  24. package/dist/client/assets/{Palette-DACuRL08.js → Palette-CwprQ-n3.js} +1 -1
  25. package/dist/client/assets/{Play-BJoay2-0.js → Play-B9I77UtI.js} +1 -1
  26. package/dist/client/assets/{Plus-CcqTJsL_.js → Plus-BeKip_ti.js} +1 -1
  27. package/dist/client/assets/{SearchLg-BJZ8jH9p.js → SearchLg-CF3SVn_9.js} +1 -1
  28. package/dist/client/assets/{SearchMd-BvAyUAA0.js → SearchMd-B0Qlr1Gl.js} +1 -1
  29. package/dist/client/assets/{Settings02-B-aOV0z_.js → Settings02-ghlI4JM4.js} +1 -1
  30. package/dist/client/assets/{Share07-Rc9qGNOJ.js → Share07-Ccl5KX8-.js} +1 -1
  31. package/dist/client/assets/{Shield01-BPhYIT53.js → Shield01-BRqhsyWc.js} +1 -1
  32. package/dist/client/assets/{Stars01-Y6bhXxbP.js → Stars01-D2FUcwqw.js} +1 -1
  33. package/dist/client/assets/Stars02-IIISJrG5.js +1 -0
  34. package/dist/client/assets/{Sun-B9EAEoFi.js → Sun-qDVj9t4s.js} +1 -1
  35. package/dist/client/assets/{SwitchHorizontal01-DXGZqWl0.js → SwitchHorizontal01-BxCgeiYE.js} +1 -1
  36. package/dist/client/assets/{Tool01-u8-9scb2.js → Tool01-DsnpIm7u.js} +1 -1
  37. package/dist/client/assets/{Tool02-bPVPav5j.js → Tool02-DK48uSLw.js} +1 -1
  38. package/dist/client/assets/{Trash01-BXKzyWuY.js → Trash01-BAawLpcp.js} +1 -1
  39. package/dist/client/assets/{TrendUp01-B6PVGUdm.js → TrendUp01-C6Z_wcrx.js} +1 -1
  40. package/dist/client/assets/{Upload01-ZMcL6A4D.js → Upload01-CpAD4hxw.js} +1 -1
  41. package/dist/client/assets/{User01-BtnxEsNS.js → User01-Ce4Fl6PE.js} +1 -1
  42. package/dist/client/assets/{Users01-CKlZ0ifZ.js → Users01-C5hyD2dw.js} +1 -1
  43. package/dist/client/assets/{Users03-Dq4tGB5S.js → Users03-CPZVCPK9.js} +1 -1
  44. package/dist/client/assets/{X-RK8h6Yen.js → X-lCHRulQP.js} +1 -1
  45. package/dist/client/assets/{XCircle-C3iV3t9M.js → XCircle-BCbY6TY1.js} +1 -1
  46. package/dist/client/assets/{XClose-CxdIr1Pd.js → XClose-DjKz-D2Z.js} +1 -1
  47. package/dist/client/assets/{YAxis-xlG3U_-D.js → YAxis-BgtuEn7S.js} +5 -5
  48. package/dist/client/assets/{Zap-DorwoyzJ.js → Zap-wuOCIL0m.js} +1 -1
  49. package/dist/client/assets/ZapSquare-CS3jzdYe.js +1 -0
  50. package/dist/client/assets/{access-gate-DXuZmGoo.js → access-gate-CTxljPxC.js} +1 -1
  51. package/dist/client/assets/agent-icon-B14THc_Q.js +1 -0
  52. package/dist/client/assets/agents-list-69g8rJEQ.js +1 -0
  53. package/dist/client/assets/ai-providers-CH91MQGS.js +1 -0
  54. package/dist/client/assets/{alert-DOeU_fHD.js → alert-DFcpZ-oA.js} +1 -1
  55. package/dist/client/assets/{alert-dialog--EMJuxQR.js → alert-dialog-D7IFH3T6.js} +1 -1
  56. package/dist/client/assets/api-keys-CrFPjis3.js +1 -0
  57. package/dist/client/assets/app-editor-CrEu8w54.js +1 -0
  58. package/dist/client/assets/{auth-GU7oD7Qh.js → auth-aQ-S9sH7.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-CufCdHmw.js → auth-catchall-D-f5_sUZ.js} +1 -1
  60. package/dist/client/assets/{auth-entry-BQFps86H.js → auth-entry-BV0I_ZJc.js} +1 -1
  61. package/dist/client/assets/{auth-split-layout-D5zoKdG1.js → auth-split-layout-BMNFHPoj.js} +1 -1
  62. package/dist/client/assets/{authenticate-and-persist-oauth-BKQQlvJx.js → authenticate-and-persist-oauth-Bf96RUCL.js} +1 -1
  63. package/dist/client/assets/{automation-list-row-CoWMDcc7.js → automation-list-row-GgPsGmLt.js} +1 -1
  64. package/dist/client/assets/{automation-runs-BKaYXCk3.js → automation-runs-BpvoOdRs.js} +15 -15
  65. package/dist/client/assets/automations-DrdpSq1s.js +1 -0
  66. package/dist/client/assets/{avatar-D5Ixsjnb.js → avatar-CZVTnS3q.js} +1 -1
  67. package/dist/client/assets/{badge-LqRUe-Sk.js → badge-Largeyp5.js} +1 -1
  68. package/dist/client/assets/billing-QSWxDvoo.js +6 -0
  69. package/dist/client/assets/{block-document-B5BAEWZt.js → block-document-BH_hCXmL.js} +1 -1
  70. package/dist/client/assets/{buckets-D1LEPfFu.js → buckets-DoVdPe7_.js} +1 -1
  71. package/dist/client/assets/bulk-category-panel-D4Kjb2t5.js +1 -0
  72. package/dist/client/assets/{capability-load-error-Cn1k6YHy.js → capability-load-error-By5RHmfh.js} +1 -1
  73. package/dist/client/assets/{card-DMPxv-95.js → card-Y4Td6_qp.js} +1 -1
  74. package/dist/client/assets/{cards-GF7qeE7B.js → cards-v-ZQq690.js} +1 -1
  75. package/dist/client/assets/category-editor-CpamqiDH.js +1 -0
  76. package/dist/client/assets/{chart-BAi8YW5B.js → chart-BQq8t5ba.js} +1 -1
  77. package/dist/client/assets/{chat-context-C-0JTfPQ.js → chat-context-D3_WI76a.js} +1 -1
  78. package/dist/client/assets/{checkbox-BMI2s9in.js → checkbox-T7P3CSDd.js} +1 -1
  79. package/dist/client/assets/{cli-auth-success-hLLr4Ots.js → cli-auth-success-CUbHl1Z7.js} +1 -1
  80. package/dist/client/assets/collection-detail-eXDRP9Q8.js +1 -0
  81. package/dist/client/assets/{collection-display-button-Da4MUVLW.js → collection-display-button-BIyaULpN.js} +1 -1
  82. package/dist/client/assets/{collection-search-nYFeTI4m.js → collection-search-mKgfv-P5.js} +1 -1
  83. package/dist/client/assets/{collection-table-wrapper-DCdMm_ab.js → collection-table-wrapper-BiIkdzxw.js} +1 -1
  84. package/dist/client/assets/{collection-tabs-BepKWztZ.js → collection-tabs-Ibp0SPgD.js} +1 -1
  85. package/dist/client/assets/{command-BRj7xyXG.js → command-CPY4g0vY.js} +1 -1
  86. package/dist/client/assets/commerce-onboarding-DSweCkSf.js +1 -0
  87. package/dist/client/assets/connect-Cr5eEYHn.js +8 -0
  88. package/dist/client/assets/{connection-Dh0vbZrp.js → connection-B265IAJQ.js} +1 -1
  89. package/dist/client/assets/{connection-card-Cgl3myc9.js → connection-card-C8ol51ZW.js} +1 -1
  90. package/dist/client/assets/connection-detail-ZyykQc7g.js +1 -0
  91. package/dist/client/assets/{connection-form-helpers-CDbFi5Oy.js → connection-form-helpers-C7wyCDlb.js} +1 -1
  92. package/dist/client/assets/connections-BBbAjJre.js +1 -0
  93. package/dist/client/assets/{decopilot-sse-pool-lHiz-t0B.js → decopilot-sse-pool-MiFwCFec.js} +1 -1
  94. package/dist/client/assets/{dialog-D_lGSAHx.js → dialog-XZdfEVkH.js} +1 -1
  95. package/dist/client/assets/{domain-settings-DlnYttwh.js → domain-settings-B9j2Tomm.js} +1 -1
  96. package/dist/client/assets/{drawer-BzscLxAI.js → drawer-CZRmN4Rl.js} +1 -1
  97. package/dist/client/assets/{dropdown-menu-BYvTczJk.js → dropdown-menu-DVYqDP-D.js} +1 -1
  98. package/dist/client/assets/{empty-state-BdwbWraJ.js → empty-state-1FVnySPh.js} +1 -1
  99. package/dist/client/assets/{extract-connection-data-kfvVMogR.js → extract-connection-data-BpVTWK-J.js} +1 -1
  100. package/dist/client/assets/file-explorer-B8m_Ud7I.js +2 -0
  101. package/dist/client/assets/{file-type-icon-9BOPOFYS.js → file-type-icon-C0Iwwc71.js} +1 -1
  102. package/dist/client/assets/{form-BtKnEteC.js → form-Dxx4h0K2.js} +1 -1
  103. package/dist/client/assets/general-4Cwh9qXG.js +1 -0
  104. package/dist/client/assets/{github-repo-picker-5Rv4LdBK.js → github-repo-picker-BntApwLN.js} +1 -1
  105. package/dist/client/assets/{hooks-DhrDGFKw.js → hooks-D1ngLxRd.js} +1 -1
  106. package/dist/client/assets/{index-C4U-wOWk.js → index-ANK2LJtV.js} +1 -1
  107. package/dist/client/assets/index-B6at7pHi.js +1 -0
  108. package/dist/client/assets/{index-DVVcSzyD.js → index-BW8Kh131.js} +1 -1
  109. package/dist/client/assets/index-BayJ_hOk.js +1 -0
  110. package/dist/client/assets/{index-CqaVlqfp.js → index-CUMFdB46.js} +1 -1
  111. package/dist/client/assets/{index-PFK7zsvF.js → index-CjHBTwzP.js} +1 -1
  112. package/dist/client/assets/{index-DrXVxK2B.js → index-CtD8kCVB.js} +2 -2
  113. package/dist/client/assets/{index-BHvpwVks.js → index-DyK-1LHf.js} +1 -1
  114. package/dist/client/assets/{index-D3-Z9tpK.js → index-P-GX8FW_.js} +21 -21
  115. package/dist/client/assets/{index-B0RQtdH5.js → index-dh0u4IqP.js} +47 -47
  116. package/dist/client/assets/index-iwXkDaR-.css +1 -0
  117. package/dist/client/assets/{index-redirect-CnZzcdtC.js → index-redirect-Bs49GSOc.js} +1 -1
  118. package/dist/client/assets/infra-billing-DaFLqOb1.js +1 -0
  119. package/dist/client/assets/{input-CN-3NSyw.js → input-CjE2QrUF.js} +1 -1
  120. package/dist/client/assets/{integration-icon-agenQFOe.js → integration-icon-DD2uGTto.js} +1 -1
  121. package/dist/client/assets/{invite-member-dialog-BNMHjcA0.js → invite-member-dialog-3RD7lTgh.js} +1 -1
  122. package/dist/client/assets/{label-DSt8qQsi.js → label-BYk5h4ou.js} +1 -1
  123. package/dist/client/assets/{layout-Bxn8W2RS.js → layout-CzV2Jg4F.js} +1 -1
  124. package/dist/client/assets/{login-BiDSz6-3.js → login-kOxWh4FL.js} +1 -1
  125. package/dist/client/assets/{mcp-oauth-Sek06IiV.js → mcp-oauth-YnIysQTC.js} +1 -1
  126. package/dist/client/assets/members-BWZup3yY.js +1 -0
  127. package/dist/client/assets/{monaco-editor-DeihgRjR.js → monaco-editor-CEqNg3BQ.js} +1 -1
  128. package/dist/client/assets/{monitoring-stats-row-Dn8PD1cu.js → monitoring-stats-row-DO9FS6PN.js} +1 -1
  129. package/dist/client/assets/{multi-select-CStrPKDA.js → multi-select-BheAE_Ti.js} +1 -1
  130. package/dist/client/assets/{oauth-callback-8i2YFfOa.js → oauth-callback-Bxh-hXdQ.js} +1 -1
  131. package/dist/client/assets/{oauth-callback-ai-provider-CcTJ4Hog.js → oauth-callback-ai-provider-3iVGzc8O.js} +1 -1
  132. package/dist/client/assets/{onboarding-DPalnThx.js → onboarding-EKkdot5C.js} +1 -1
  133. package/dist/client/assets/{org-layout-d-deKSC2.js → org-layout-BxTmoEir.js} +1 -1
  134. package/dist/client/assets/{organization-choice-BFC79jV3.js → organization-choice-Ci26Yd7s.js} +1 -1
  135. package/dist/client/assets/{orgs-Sh_9Sk7O.js → orgs-CQAUGc_3.js} +1 -1
  136. package/dist/client/assets/{page-seo-form-B-ZHfwh_.js → page-seo-form-rWml4KZv.js} +1 -1
  137. package/dist/client/assets/{popover-CVQ14Xo3.js → popover-DH4sJ-hx.js} +1 -1
  138. package/dist/client/assets/post-editor-BX_oDQpj.js +1 -0
  139. package/dist/client/assets/{primitives-Bvlw6IOg.js → primitives-DgKwbqlI.js} +1 -1
  140. package/dist/client/assets/{profile-B8pfdedd.js → profile-Drr6RyML.js} +1 -1
  141. package/dist/client/assets/project-app-view-C4uK-Ykh.js +1 -0
  142. package/dist/client/assets/record-editor-CNBghvNW.js +1 -0
  143. package/dist/client/assets/redirect-editor-DWVkIY5G.js +1 -0
  144. package/dist/client/assets/{registry-layout-Cvtu2qyJ.js → registry-layout-Bu1cLH4_.js} +1 -1
  145. package/dist/client/assets/registry-yIvFz9E8.js +2 -0
  146. package/dist/client/assets/{reports-Cft2eg8p.js → reports-5TYDahoh.js} +1 -1
  147. package/dist/client/assets/{require-capability-D3Qh2z8-.js → require-capability-k_aaNrmG.js} +1 -1
  148. package/dist/client/assets/{required-auth-layout-HFJP27aq.js → required-auth-layout-Dn81p7H8.js} +1 -1
  149. package/dist/client/assets/{reset-password-5k2Ps7u5.js → reset-password-DwRMgnq7.js} +1 -1
  150. package/dist/client/assets/roles-BvfzqM4Y.js +1 -0
  151. package/dist/client/assets/{search-input-qkKpDftc.js → search-input-CAfA70t6.js} +1 -1
  152. package/dist/client/assets/{secrets-CegPvwmu.js → secrets-DQyg5IaG.js} +1 -1
  153. package/dist/client/assets/{sections-editor-H0h1M9bl.js → sections-editor-1wvlg_V9.js} +2 -2
  154. package/dist/client/assets/{select-0xPUH3tg.js → select-KBOQqb5b.js} +1 -1
  155. package/dist/client/assets/{select-model-CRyNcMdf.js → select-model-D2hJNEZf.js} +1 -1
  156. package/dist/client/assets/{self-tool-result-beS_e9BJ.js → self-tool-result-red_JJVZ.js} +1 -1
  157. package/dist/client/assets/seo-editor-DNfycddR.js +1 -0
  158. package/dist/client/assets/settings-layout-DH-EViOe.js +1 -0
  159. package/dist/client/assets/{settings-section-C1MvjHVP.js → settings-section-uyvyi36n.js} +1 -1
  160. package/dist/client/assets/settings-subnav-DfcYXylW.js +1 -0
  161. package/dist/client/assets/{shell-controls-BHS0BPXu.js → shell-controls-i0HidCqY.js} +1 -1
  162. package/dist/client/assets/shell-layout-Czubm3xQ.js +1 -0
  163. package/dist/client/assets/{sidebar-D6warR-n.js → sidebar-DYOHjP73.js} +1 -1
  164. package/dist/client/assets/{skeleton-BxHgUQPE.js → skeleton-BwaQyECl.js} +1 -1
  165. package/dist/client/assets/{spinner-92ibspxi.js → spinner-D7MklTbP.js} +1 -1
  166. package/dist/client/assets/{sso-DfEu4Pa7.js → sso-Dg3_woQC.js} +1 -1
  167. package/dist/client/assets/{store-UCqr5rSr.js → store-CTLRFju2.js} +1 -1
  168. package/dist/client/assets/store-registry-DFdXvC9d.js +2 -0
  169. package/dist/client/assets/{studio-tools-DpmUpHCO.js → studio-tools-rxH0R7lt.js} +1 -1
  170. package/dist/client/assets/{switch-R--fGiIu.js → switch-B5ZbhCe0.js} +1 -1
  171. package/dist/client/assets/synced-repos-x16ha39u.js +1 -0
  172. package/dist/client/assets/{tab-id-CQiqG3MG.js → tab-id-CTjObiZn.js} +1 -1
  173. package/dist/client/assets/{table-DP1S2ZOw.js → table-D-J833Vt.js} +1 -1
  174. package/dist/client/assets/{tabs-CGV4Cky3.js → tabs-BMNmvzpQ.js} +1 -1
  175. package/dist/client/assets/{textarea-BqJT-S0J.js → textarea-kMyew1mY.js} +1 -1
  176. package/dist/client/assets/{toggle-group-CS_jFxOp.js → toggle-group-DRlvHVKj.js} +1 -1
  177. package/dist/client/assets/{toolbar-BtUNNIJL.js → toolbar-R-lbOcDk.js} +1 -1
  178. package/dist/client/assets/{tooltip-CQmJ9yxt.js → tooltip-CCAgnlkx.js} +1 -1
  179. package/dist/client/assets/{track-CErVpLod.js → track-BEQo3sFg.js} +1 -1
  180. package/dist/client/assets/{types-BL586epY.js → types-BAfCrx4S.js} +1 -1
  181. package/dist/client/assets/{use-ai-providers-BBsV6KPi.js → use-ai-providers-BD3OpOyt.js} +1 -1
  182. package/dist/client/assets/{use-api-keys-tRyUKyYH.js → use-api-keys-DNGO5UEj.js} +1 -1
  183. package/dist/client/assets/{use-automations-PoHb5Omc.js → use-automations-5visjbRc.js} +1 -1
  184. package/dist/client/assets/{use-autosave-DOF9PkBj.js → use-autosave-Chfu4jlL.js} +1 -1
  185. package/dist/client/assets/{use-capability-vZd78wKb.js → use-capability-BG5qAt9K.js} +1 -1
  186. package/dist/client/assets/{use-clock-tick-CvtM4hVa.js → use-clock-tick-qO3IUhYy.js} +1 -1
  187. package/dist/client/assets/use-commerce-diagnostic-p8AlgPkx.js +1 -0
  188. package/dist/client/assets/{use-connection-DY4jPbIv.js → use-connection-DoE4VVnG.js} +1 -1
  189. package/dist/client/assets/{use-copy-Dh4hLJ75.js → use-copy-DwKcHskz.js} +1 -1
  190. package/dist/client/assets/{use-create-virtual-mcp-ChRKd0x4.js → use-create-virtual-mcp-CDZV5SRZ.js} +1 -1
  191. package/dist/client/assets/{use-debounced-autosave-AR_kJzvw.js → use-debounced-autosave-Bn---yMo.js} +1 -1
  192. package/dist/client/assets/{use-debounced-value-BDZvZ9NA.js → use-debounced-value-CDap9oX0.js} +1 -1
  193. package/dist/client/assets/{use-decopilot-events-C9XVk3PD.js → use-decopilot-events-BqPh4BCN.js} +1 -1
  194. package/dist/client/assets/{use-delete-connection-BV05_oW6.js → use-delete-connection-CoZnx8cA.js} +1 -1
  195. package/dist/client/assets/{use-deployment-admin-ClA6pjGX.js → use-deployment-admin-3ODrcPns.js} +1 -1
  196. package/dist/client/assets/{use-file-configs-D7DGgjsE.js → use-file-configs-BTGiD983.js} +1 -1
  197. package/dist/client/assets/{use-infinite-scroll-BaMsPtcI.js → use-infinite-scroll-DV4nhJU-.js} +1 -1
  198. package/dist/client/assets/{use-join-requests-iDuMo_hY.js → use-join-requests-B8mo2OR6.js} +1 -1
  199. package/dist/client/assets/{use-mcp-client-mRwtlRy7.js → use-mcp-client-DMHWuHBR.js} +2 -2
  200. package/dist/client/assets/{use-mcp-tools-BU9ND4Ml.js → use-mcp-tools-Zd5Wb_Ox.js} +1 -1
  201. package/dist/client/assets/{use-members-BI3fS3wC.js → use-members-fvuAoyah.js} +1 -1
  202. package/dist/client/assets/{use-mobile-BbKshr4o.js → use-mobile-iNxeOMfx.js} +1 -1
  203. package/dist/client/assets/{use-navigate-to-agent-B798e0or.js → use-navigate-to-agent-BgN8_rbc.js} +1 -1
  204. package/dist/client/assets/{use-open-billing-url-CSGM5pfk.js → use-open-billing-url-DhGvCL22.js} +1 -1
  205. package/dist/client/assets/{use-org-auth-client-Dzw4SB-X.js → use-org-auth-client-Cag_S-a4.js} +1 -1
  206. package/dist/client/assets/{use-org-sso-CMIUsELl.js → use-org-sso-U6MQkVfh.js} +1 -1
  207. package/dist/client/assets/{use-organization-roles-C6EWqzsA.js → use-organization-roles-C3ByCKmB.js} +1 -1
  208. package/dist/client/assets/{use-organization-settings-DiJKR_LA.js → use-organization-settings-CXQEv0_d.js} +1 -1
  209. package/dist/client/assets/{use-registry-connections-Bc7OPYu1.js → use-registry-connections-DjSot7EF.js} +1 -1
  210. package/dist/client/assets/{use-secrets-BStRdsts.js → use-secrets-Ct36JmLs.js} +1 -1
  211. package/dist/client/assets/{use-section-preview-base-CrkFccMB.js → use-section-preview-base-BijudAg1.js} +1 -1
  212. package/dist/client/assets/use-settings-tabs-DTQ00oCY.js +1 -0
  213. package/dist/client/assets/{use-status-sounds-BDOLBb14.js → use-status-sounds-9UZfO_tZ.js} +1 -1
  214. package/dist/client/assets/{use-tags-9ZWWTuIp.js → use-tags-D4Bd-NDo.js} +1 -1
  215. package/dist/client/assets/{use-view-mode-Co79qvUT.js → use-view-mode-DxkV0rAO.js} +1 -1
  216. package/dist/client/assets/use-virtual-mcp-DdZEMtY_.js +1 -0
  217. package/dist/client/assets/useInfiniteQuery-DTN5TRDI.js +1 -0
  218. package/dist/client/assets/useRouterState-WnRAdRHN.js +1 -0
  219. package/dist/client/assets/useSuspenseInfiniteQuery-QQYAakG4.js +1 -0
  220. package/dist/client/assets/{users-BPP2-L6T.js → users-CoIsMtRi.js} +1 -1
  221. package/dist/client/assets/variant-calendar-Cz-Z7Tjl.js +1 -0
  222. package/dist/client/assets/{view-mode-toggle-CkdPN1S7.js → view-mode-toggle-D6PsJXd2.js} +1 -1
  223. package/dist/client/index.html +2 -2
  224. package/dist/server/cli.js +1 -1
  225. package/dist/server/server.js +1 -1
  226. package/package.json +1 -1
  227. package/dist/client/assets/CpuChip01-vhhTC_4X.js +0 -1
  228. package/dist/client/assets/Star01-FPyExn2D.js +0 -1
  229. package/dist/client/assets/Stars02-BbT5sqUL.js +0 -1
  230. package/dist/client/assets/ZapSquare-BUqSNH_R.js +0 -1
  231. package/dist/client/assets/agent-icon-cJrozeMZ.js +0 -1
  232. package/dist/client/assets/agents-list-sfyb55Nx.js +0 -1
  233. package/dist/client/assets/ai-providers-Dg9Wrzte.js +0 -1
  234. package/dist/client/assets/api-keys-DzZDdzGd.js +0 -1
  235. package/dist/client/assets/app-editor-DBDLik1w.js +0 -1
  236. package/dist/client/assets/automations-CvCND08Z.js +0 -1
  237. package/dist/client/assets/billing-DRrUKLLn.js +0 -6
  238. package/dist/client/assets/brand-context-BjFCglrZ.js +0 -1
  239. package/dist/client/assets/bulk-category-panel-BX8K25Wc.js +0 -1
  240. package/dist/client/assets/category-editor-QoQH_RSC.js +0 -1
  241. package/dist/client/assets/collection-detail-DMjX-GwB.js +0 -1
  242. package/dist/client/assets/commerce-onboarding-DUexdRVD.js +0 -1
  243. package/dist/client/assets/connect-XlMhzTmb.js +0 -8
  244. package/dist/client/assets/connection-detail-G4HSY_qu.js +0 -1
  245. package/dist/client/assets/connections-C3yyVOyo.js +0 -1
  246. package/dist/client/assets/file-explorer-B4AcS16c.js +0 -2
  247. package/dist/client/assets/general-DmHm-V2m.js +0 -1
  248. package/dist/client/assets/index-BX7x5P5r.css +0 -1
  249. package/dist/client/assets/index-Bd3xVpKc.js +0 -1
  250. package/dist/client/assets/index-DcSKkuQx.js +0 -1
  251. package/dist/client/assets/infra-billing-najR53Ni.js +0 -1
  252. package/dist/client/assets/members-DKPDGykp.js +0 -1
  253. package/dist/client/assets/post-editor-ALYY48Fz.js +0 -1
  254. package/dist/client/assets/project-app-view-CFkbvwU8.js +0 -1
  255. package/dist/client/assets/record-editor-VkFURsV1.js +0 -1
  256. package/dist/client/assets/redirect-editor-C0FGIHF8.js +0 -1
  257. package/dist/client/assets/registry-CIqCdg09.js +0 -2
  258. package/dist/client/assets/roles-D2NEX7Uj.js +0 -1
  259. package/dist/client/assets/seo-editor-3ohlf82h.js +0 -1
  260. package/dist/client/assets/settings-layout-B37vktvR.js +0 -1
  261. package/dist/client/assets/shell-layout-BBDxGMS_.js +0 -1
  262. package/dist/client/assets/store-registry-P2X2J2BW.js +0 -2
  263. package/dist/client/assets/synced-repos-DPbIFasN.js +0 -1
  264. package/dist/client/assets/use-commerce-diagnostic-Cuxt8glh.js +0 -1
  265. package/dist/client/assets/use-infra-billing-DVVc_7wd.js +0 -1
  266. package/dist/client/assets/use-virtual-mcp-C4k3uUeZ.js +0 -1
  267. package/dist/client/assets/useInfiniteQuery-DL2FwCrc.js +0 -1
  268. package/dist/client/assets/useRouterState-dccdFb5L.js +0 -1
  269. package/dist/client/assets/useSuspenseInfiniteQuery-Dzn5SBNg.js +0 -1
  270. package/dist/client/assets/variant-calendar-CJL6gWum.js +0 -1
@@ -1 +1 @@
1
- import{c as p,j as m}from"./index-B0RQtdH5.js";import{u as l}from"./use-capability-vZd78wKb.js";import{A as u}from"./access-gate-DXuZmGoo.js";function b(c){const t=p.c(6),{capability:n,area:e,children:i}=c,{granted:a,loading:o,error:s}=l(n);let r;return t[0]!==e||t[1]!==i||t[2]!==s||t[3]!==a||t[4]!==o?(r=m.jsx(u,{granted:a,loading:o,error:s,area:e,children:i}),t[0]=e,t[1]=i,t[2]=s,t[3]=a,t[4]=o,t[5]=r):r=t[5],r}export{b as R};
1
+ import{c as p,j as m}from"./index-dh0u4IqP.js";import{u as l}from"./use-capability-BG5qAt9K.js";import{A as u}from"./access-gate-CTxljPxC.js";function b(c){const t=p.c(6),{capability:n,area:e,children:i}=c,{granted:a,loading:o,error:s}=l(n);let r;return t[0]!==e||t[1]!==i||t[2]!==s||t[3]!==a||t[4]!==o?(r=m.jsx(u,{granted:a,loading:o,error:s,area:e,children:i}),t[0]=e,t[1]=i,t[2]=s,t[3]=a,t[4]=o,t[5]=r):r=t[5],r}export{b as R};
@@ -1 +1 @@
1
- import{c as l,j as s,A as a,S as m,g as h,i as u,N as g}from"./index-B0RQtdH5.js";function x(){const o=l.c(1),e=window.location.pathname+window.location.search;let t;if(o[0]===Symbol.for("react.memo_cache_sentinel")){const n=e==="/login"||e.startsWith("/login?")?{}:{next:e};t=s.jsx(g,{to:"/login",search:n,replace:!0}),o[0]=t}else t=o[0];return t}function f(o){const e=l.c(6),{children:t}=o;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(a,{children:s.jsx(m,{})}),e[0]=i):i=e[0];let n;e[1]!==t?(n=s.jsx(h,{children:t}),e[1]=t,e[2]=n):n=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(u,{children:s.jsx(x,{})}),e[3]=r):r=e[3];let c;return e[4]!==n?(c=s.jsxs(s.Fragment,{children:[i,n,r]}),e[4]=n,e[5]=c):c=e[5],c}export{f as R};
1
+ import{c as l,j as s,A as a,S as m,g as h,i as u,N as g}from"./index-dh0u4IqP.js";function x(){const o=l.c(1),e=window.location.pathname+window.location.search;let t;if(o[0]===Symbol.for("react.memo_cache_sentinel")){const n=e==="/login"||e.startsWith("/login?")?{}:{next:e};t=s.jsx(g,{to:"/login",search:n,replace:!0}),o[0]=t}else t=o[0];return t}function f(o){const e=l.c(6),{children:t}=o;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(a,{children:s.jsx(m,{})}),e[0]=i):i=e[0];let n;e[1]!==t?(n=s.jsx(h,{children:t}),e[1]=t,e[2]=n):n=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(u,{children:s.jsx(x,{})}),e[3]=r):r=e[3];let c;return e[4]!==n?(c=s.jsxs(s.Fragment,{children:[i,n,r]}),e[4]=n,e[5]=c):c=e[5],c}export{f as R};
@@ -1 +1 @@
1
- import{c as O,b as A,u as K,d as V,r as z,e as $,j as s,B as T,a as G}from"./index-B0RQtdH5.js";import{I as D}from"./input-CN-3NSyw.js";function U(){const e=O.c(53),t=A();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/reset-password"},e[0]=n):n=e[0];const{token:o,error:F}=K(n),a=V(),[l,M]=z.useState(""),[i,q]=z.useState(""),[r,B]=z.useState(!1),c=F==="INVALID_TOKEN";let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v={mutationFn:H,onSuccess:()=>{B(!0)}},e[1]=v):v=e[1];const b=$(v),N=l===i,d=l.length>=8&&i.length>=8&&N,m=b.isPending,P=b.error;let y;e[2]!==d||e[3]!==l||e[4]!==b||e[5]!==o?(y=j=>{j.preventDefault(),!(!o||!d)&&b.mutate({newPassword:l,token:o})},e[2]=d,e[3]=l,e[4]=b,e[5]=o,e[6]=y):y=e[6];const I=y;let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--primary-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e[7]=k):k=e[7];let S,_,L,E;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),_=s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),L=s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),E=s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),e[8]=S,e[9]=_,e[10]=L,e[11]=E):(S=e[8],_=e[9],L=e[10],E=e[11]);let C;e[12]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"flex justify-center",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e[12]=C):C=e[12];let u;e[13]!==r||e[14]!==t?(u=t(r?"routes.resetPassword.passwordResetSuccessful":"routes.resetPassword.setNewPassword"),e[13]=r,e[14]=t,e[15]=u):u=e[15];let x;e[16]!==u?(x=s.jsx("div",{className:"text-center space-y-1",children:s.jsx("p",{className:"text-sm text-foreground/70",children:u})}),e[16]=u,e[17]=x):x=e[17];let f;e[18]!==c||e[19]!==a||e[20]!==r||e[21]!==t||e[22]!==o?(f=(c||!o&&!r)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:t("routes.resetPassword.invalidOrExpiredLink")}),s.jsx(T,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:t("routes.resetPassword.backToLogin")})]}),e[18]=c,e[19]=a,e[20]=r,e[21]=t,e[22]=o,e[23]=f):f=e[23];let g;e[24]!==P||e[25]!==t?(g=P&&s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:P.message||t("routes.resetPassword.failedToReset")}),e[24]=P,e[25]=t,e[26]=g):g=e[26];let p;e[27]!==a||e[28]!==r||e[29]!==t?(p=r&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:t("routes.resetPassword.passwordResetDescription")}),s.jsx(T,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:t("routes.resetPassword.goToLogin")})]}),e[27]=a,e[28]=r,e[29]=t,e[30]=p):p=e[30];let w;e[31]!==d||e[32]!==i||e[33]!==I||e[34]!==c||e[35]!==m||e[36]!==l||e[37]!==N||e[38]!==r||e[39]!==t||e[40]!==o?(w=o&&!c&&!r&&s.jsxs("form",{onSubmit:I,className:"grid gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:t("routes.resetPassword.newPasswordLabel")}),s.jsx(D,{type:"password",placeholder:"••••••••",value:l,onChange:j=>M(j.target.value),required:!0,minLength:8,disabled:m})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:t("routes.resetPassword.confirmPasswordLabel")}),s.jsx(D,{type:"password",placeholder:"••••••••",value:i,onChange:j=>q(j.target.value),required:!0,minLength:8,disabled:m}),i&&!N&&s.jsx("p",{className:"text-xs text-destructive mt-1.5",children:t("routes.resetPassword.passwordsDoNotMatch")})]}),s.jsx(T,{type:"submit",disabled:m||!d,className:"w-full font-semibold",size:"lg",children:t(m?"routes.resetPassword.resetting":"routes.resetPassword.resetPassword")})]}),e[31]=d,e[32]=i,e[33]=I,e[34]=c,e[35]=m,e[36]=l,e[37]=N,e[38]=r,e[39]=t,e[40]=o,e[41]=w):w=e[41];let h;e[42]!==a||e[43]!==r||e[44]!==t?(h=!r&&s.jsx("div",{className:"text-center",children:s.jsx(T,{type:"button",variant:"link",onClick:()=>a({to:"/login"}),className:"text-sm text-muted-foreground hover:text-foreground",children:t("routes.resetPassword.backToSignIn")})}),e[42]=a,e[43]=r,e[44]=t,e[45]=h):h=e[45];let R;return e[46]!==x||e[47]!==f||e[48]!==g||e[49]!==p||e[50]!==w||e[51]!==h?(R=s.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-primary to-primary/75 p-4",children:[k,s.jsxs("div",{className:"relative z-10",children:[S,_,L,E,s.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[C,x,f,g,p,w,h]})]})]}),e[46]=x,e[47]=f,e[48]=g,e[49]=p,e[50]=w,e[51]=h,e[52]=R):R=e[52],R}async function H(e){const{newPassword:t,token:n}=e,o=await G.resetPassword({newPassword:t,token:n});if(o.error)throw new Error(o.error.message||"Failed to reset password");return o}export{U as default};
1
+ import{c as O,b as A,u as K,d as V,r as z,e as $,j as s,B as T,a as G}from"./index-dh0u4IqP.js";import{I as D}from"./input-CjE2QrUF.js";function U(){const e=O.c(53),t=A();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/reset-password"},e[0]=n):n=e[0];const{token:o,error:F}=K(n),a=V(),[l,M]=z.useState(""),[i,q]=z.useState(""),[r,B]=z.useState(!1),c=F==="INVALID_TOKEN";let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v={mutationFn:H,onSuccess:()=>{B(!0)}},e[1]=v):v=e[1];const b=$(v),N=l===i,d=l.length>=8&&i.length>=8&&N,m=b.isPending,P=b.error;let y;e[2]!==d||e[3]!==l||e[4]!==b||e[5]!==o?(y=j=>{j.preventDefault(),!(!o||!d)&&b.mutate({newPassword:l,token:o})},e[2]=d,e[3]=l,e[4]=b,e[5]=o,e[6]=y):y=e[6];const I=y;let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--primary-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e[7]=k):k=e[7];let S,_,L,E;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),_=s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),L=s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),E=s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),e[8]=S,e[9]=_,e[10]=L,e[11]=E):(S=e[8],_=e[9],L=e[10],E=e[11]);let C;e[12]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"flex justify-center",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e[12]=C):C=e[12];let u;e[13]!==r||e[14]!==t?(u=t(r?"routes.resetPassword.passwordResetSuccessful":"routes.resetPassword.setNewPassword"),e[13]=r,e[14]=t,e[15]=u):u=e[15];let x;e[16]!==u?(x=s.jsx("div",{className:"text-center space-y-1",children:s.jsx("p",{className:"text-sm text-foreground/70",children:u})}),e[16]=u,e[17]=x):x=e[17];let f;e[18]!==c||e[19]!==a||e[20]!==r||e[21]!==t||e[22]!==o?(f=(c||!o&&!r)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:t("routes.resetPassword.invalidOrExpiredLink")}),s.jsx(T,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:t("routes.resetPassword.backToLogin")})]}),e[18]=c,e[19]=a,e[20]=r,e[21]=t,e[22]=o,e[23]=f):f=e[23];let g;e[24]!==P||e[25]!==t?(g=P&&s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:P.message||t("routes.resetPassword.failedToReset")}),e[24]=P,e[25]=t,e[26]=g):g=e[26];let p;e[27]!==a||e[28]!==r||e[29]!==t?(p=r&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:t("routes.resetPassword.passwordResetDescription")}),s.jsx(T,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:t("routes.resetPassword.goToLogin")})]}),e[27]=a,e[28]=r,e[29]=t,e[30]=p):p=e[30];let w;e[31]!==d||e[32]!==i||e[33]!==I||e[34]!==c||e[35]!==m||e[36]!==l||e[37]!==N||e[38]!==r||e[39]!==t||e[40]!==o?(w=o&&!c&&!r&&s.jsxs("form",{onSubmit:I,className:"grid gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:t("routes.resetPassword.newPasswordLabel")}),s.jsx(D,{type:"password",placeholder:"••••••••",value:l,onChange:j=>M(j.target.value),required:!0,minLength:8,disabled:m})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:t("routes.resetPassword.confirmPasswordLabel")}),s.jsx(D,{type:"password",placeholder:"••••••••",value:i,onChange:j=>q(j.target.value),required:!0,minLength:8,disabled:m}),i&&!N&&s.jsx("p",{className:"text-xs text-destructive mt-1.5",children:t("routes.resetPassword.passwordsDoNotMatch")})]}),s.jsx(T,{type:"submit",disabled:m||!d,className:"w-full font-semibold",size:"lg",children:t(m?"routes.resetPassword.resetting":"routes.resetPassword.resetPassword")})]}),e[31]=d,e[32]=i,e[33]=I,e[34]=c,e[35]=m,e[36]=l,e[37]=N,e[38]=r,e[39]=t,e[40]=o,e[41]=w):w=e[41];let h;e[42]!==a||e[43]!==r||e[44]!==t?(h=!r&&s.jsx("div",{className:"text-center",children:s.jsx(T,{type:"button",variant:"link",onClick:()=>a({to:"/login"}),className:"text-sm text-muted-foreground hover:text-foreground",children:t("routes.resetPassword.backToSignIn")})}),e[42]=a,e[43]=r,e[44]=t,e[45]=h):h=e[45];let R;return e[46]!==x||e[47]!==f||e[48]!==g||e[49]!==p||e[50]!==w||e[51]!==h?(R=s.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-primary to-primary/75 p-4",children:[k,s.jsxs("div",{className:"relative z-10",children:[S,_,L,E,s.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[C,x,f,g,p,w,h]})]})]}),e[46]=x,e[47]=f,e[48]=g,e[49]=p,e[50]=w,e[51]=h,e[52]=R):R=e[52],R}async function H(e){const{newPassword:t,token:n}=e,o=await G.resetPassword({newPassword:t,token:n});if(o.error)throw new Error(o.error.message||"Failed to reset password");return o}export{U as default};
@@ -0,0 +1 @@
1
+ import{b as ie,r as F,F as Ue,K as me,n as ze,j as s,m as q,k as Oe,B as ce,c as J,X as We,Y as ke,Z as re,a1 as Xe,a2 as Je,o as it,$ as bt,a0 as Ot,e as rt,t as je,p as Ke,y as at,z as jt,E as Mt,d as Dt,u as vt}from"./index-dh0u4IqP.js";import{u as yt}from"./use-organization-roles-C3ByCKmB.js";import{u as Fe}from"./use-org-auth-client-Cag_S-a4.js";import{g as ct,a as Lt}from"./role-color-Dn2tXDDF.js";import{B as Me}from"./badge-Largeyp5.js";import{A as dt,a as mt,c as ut,d as ft,b as gt,f as ht,g as xt,e as pt}from"./alert-dialog-D7IFH3T6.js";import{c as Pt,D as wt,b as Gt,a as kt}from"./dropdown-menu-DVYqDP-D.js";import{a as Ut}from"./DotsVertical-DB5B45Uo.js";import{s as Ye}from"./Plus-BeKip_ti.js";import{s as Bt}from"./Trash01-BAawLpcp.js";import{C as Vt}from"./collection-table-wrapper-BiIkdzxw.js";import{P as ae}from"./index-CUMFdB46.js";import{E as et}from"./empty-state-1FVnySPh.js";import{S as $e}from"./search-input-CAfA70t6.js";import{P as Tt,D as _t}from"./ai-providers-logos-DD3qZ33J.js";import{I as Qe}from"./integration-icon-DD2uGTto.js";import{u as Yt}from"./use-infinite-scroll-DV4nhJU-.js";import{C as He}from"./checkbox-T7P3CSDd.js";import{i as zt}from"./ArrowLeft-vl2nEIkm.js";import{u as Kt}from"./useSuspenseInfiniteQuery-QQYAakG4.js";import{u as Ft,S as $t}from"./use-mcp-client-DMHWuHBR.js";import{C as Qt}from"./collection-search-mKgfv-P5.js";import{p as Ht}from"./connection-B265IAJQ.js";import{a as Et}from"./use-members-fvuAoyah.js";import{g as It}from"./get-initials-D-f_fDFw.js";import{u as Zt}from"./use-connection-DoE4VVnG.js";import{u as qt,g as Wt}from"./use-ai-providers-BD3OpOyt.js";import{A as Rt}from"./avatar-CZVTnS3q.js";import{S as De}from"./switch-B5ZbhCe0.js";import{b as ve,c as ye,T as Le,a as Pe}from"./tooltip-CCAgnlkx.js";import{S as tt,a as st,b as lt}from"./settings-section-uyvyi36n.js";import{t as Xt}from"./ChevronDown-BansJwMw.js";import{i as Jt}from"./ChevronRight-8cwrWc6Q.js";import{i as ot}from"./X-lCHRulQP.js";import{a as es}from"./use-capability-BG5qAt9K.js";import{A as ts}from"./access-gate-CTxljPxC.js";import{S as ss}from"./settings-subnav-DfcYXylW.js";import"./Check-BjlTRmvp.js";import"./table-D-J833Vt.js";import"./ArrowUp-DPZSwvHJ.js";import"./sidebar-DYOHjP73.js";import"./LayoutLeft-BSvhSrEB.js";import"./use-mobile-iNxeOMfx.js";import"./SearchMd-B0Qlr1Gl.js";import"./Tool02-DK48uSLw.js";import"./agent-icon-B14THc_Q.js";import"./AlertCircle-NIgamkG1.js";import"./Tool01-DsnpIm7u.js";import"./XCircle-BCbY6TY1.js";import"./ArrowUpRight-EJcVnEQQ.js";import"./TrendUp01-C6Z_wcrx.js";import"./ZapSquare-CS3jzdYe.js";import"./Users03-CPZVCPK9.js";import"./CheckCircle-DJReLGxy.js";import"./ChevronUp-CBwQlhRH.js";import"./Stars02-IIISJrG5.js";import"./Copy01-DbAHd-uW.js";import"./CreditCard01-CYifPwC3.js";import"./Globe01-D0Oxc1LP.js";import"./Settings02-ghlI4JM4.js";import"./Eye-Bh6RageV.js";import"./FilterLines-C7Wg9yVb.js";import"./Share07-Ccl5KX8-.js";import"./Globe04-BkQE9r8Q.js";import"./SwitchHorizontal01-BxCgeiYE.js";import"./HardDrive-BHaqV6HV.js";import"./Key01-BwSFgo4R.js";import"./LinkExternal01-CyubGI-F.js";import"./LogOut01-BxGW4Z42.js";import"./Monitor01-DQW548Gm.js";import"./Sun-qDVj9t4s.js";import"./Palette-CwprQ-n3.js";import"./Play-B9I77UtI.js";import"./SearchLg-CF3SVn_9.js";import"./Shield01-BRqhsyWc.js";import"./Stars01-D2FUcwqw.js";import"./Upload01-CpAD4hxw.js";import"./User01-Ce4Fl6PE.js";import"./Users01-C5hyD2dw.js";import"./XClose-DjKz-D2Z.js";import"./Zap-wuOCIL0m.js";import"./auth-aQ-S9sH7.js";import"./studio-tools-rxH0R7lt.js";import"./card-Y4Td6_qp.js";import"./capability-load-error-By5RHmfh.js";import"./useRouterState-WnRAdRHN.js";import"./use-settings-tabs-DTQ00oCY.js";const Ze="basic-usage",qe=[{id:Ze,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","ORG_REPO_SYNC_LIST","SANDBOX_START","SANDBOX_DELETE","GLOBAL_SEARCH","ORGANIZATION_SETTINGS_GET","USER_GET","BRAND_CONTEXT_LIST","COLLECTION_THREADS_CREATE","COLLECTION_THREADS_LIST","COLLECTION_THREADS_GET","COLLECTION_THREADS_UPDATE","COLLECTION_THREADS_DELETE","COLLECTION_THREAD_MESSAGES_LIST","TASK_BOARD_ITEM_CREATE","TASK_BOARD_ITEM_LIST","TASK_BOARD_ITEM_UPDATE","TASK_BOARD_ITEM_DELETE","TASK_BOARD_ITEM_PRS_GET","TASK_BOARD_ITEM_PR_LINK","TASK_BOARD_ITEM_RERUN","TASK_BOARD_REVIEW_DECISION","TASK_BOARD_PROMOTE_TO_PRODUCTION","TASK_BOARD_ACTIVITY_LIST","TASK_BOARD_COMMENT_LIST","TASK_BOARD_COMMENT_CREATE","TASK_BOARD_COMMENT_UPDATE","TASK_BOARD_COMMENT_DELETE","TASK_BOARD_DISMISSED_LIST","TASK_BOARD_DISMISSED_RESTORE"]},{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_BILLING_CHECKOUT_START","ORGANIZATION_BILLING_PORTAL","ORGANIZATION_TASK_QUOTA_GET","INFRA_BILLING_SITES_LIST","INFRA_BILLING_GET","INFRA_BILLING_PORTAL","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_HEATMAP","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 and synced GitHub repositories",section:"Organization",tools:["FILE_CONFIG_CREATE","FILE_CONFIG_LIST","FILE_CONFIG_UPDATE","FILE_CONFIG_DELETE","FILE_OBJECTS_LIST","FILE_OBJECT_DELETE","ORG_REPO_SYNC_CREATE","ORG_REPO_SYNC_LIST","ORG_REPO_SYNC_UPDATE","ORG_REPO_SYNC_DELETE","ORG_REPO_SYNC_RUN"]},{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","CLAUDE_SUBSCRIPTION_CONNECT","CLAUDE_SUBSCRIPTION_STATUS","CLAUDE_SUBSCRIPTION_DISCONNECT"]},{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}];[...qe.find(t=>t.id===Ze)?.tools??[]];const ls=["agents:manage","connections:manage"];new Set(qe.filter(t=>ls.includes(t.id)).flatMap(t=>t.tools));function os(){const t=new Map;for(const e of qe){if(e.id===Ze)continue;const l=t.get(e.section)??[];l.push(e),t.set(e.section,l)}return Array.from(t.entries()).map(([e,l])=>({section:e,capabilities:l}))}function ns(t,e,l){return l?!0:t.tools.every(n=>e.includes(n))}function is(t,e,l){if(l){const i=new Set(e);for(const o of t.tools)i.add(o);return Array.from(i)}const n=new Set(e);for(const i of t.tools)n.delete(i);return Array.from(n)}function rs(t){const e=J.c(21),{connection:l,isSelected:n,hasToolsEnabled:i,activeToolsCount:o,totalToolsCount:c,onSelect:g,onToggle:h}=t,m=n?"bg-accent/50":"hover:bg-muted/50";let f;e[0]!==m?(f=q("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",m),e[0]=m,e[1]=f):f=e[1];let a;e[2]!==l.icon||e[3]!==l.title?(a=s.jsx(Qe,{icon:l.icon,name:l.title,size:"xs"}),e[2]=l.icon,e[3]=l.title,e[4]=a):a=e[4];let u;e[5]!==l.title?(u=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:l.title})}),e[5]=l.title,e[6]=u):u=e[6];let x;e[7]!==g||e[8]!==a||e[9]!==u?(x=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:g,children:[a,u]}),e[7]=g,e[8]=a,e[9]=u,e[10]=x):x=e[10];let d;e[11]!==o||e[12]!==l.tools||e[13]!==i||e[14]!==h||e[15]!==c?(d=l.tools&&l.tools.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[o,"/",c]}),s.jsx(He,{checked:i,onCheckedChange:h,onClick:as})]}),e[11]=o,e[12]=l.tools,e[13]=i,e[14]=h,e[15]=c,e[16]=d):d=e[16];let p;return e[17]!==f||e[18]!==x||e[19]!==d?(p=s.jsxs("div",{className:f,children:[x,d]}),e[17]=f,e[18]=x,e[19]=d,e[20]=p):p=e[20],p}function as(t){return t.stopPropagation()}function cs(t){const e=J.c(18),{connectionId:l,tool:n,isSelected:i,onToggle:o}=t,c=`tool-${l}-${n.name}`,g=i?"text-foreground":"text-muted-foreground";let h;e[0]!==g?(h=q("text-sm font-medium",g),e[0]=g,e[1]=h):h=e[1];let m;e[2]!==h||e[3]!==n.name?(m=s.jsx("div",{className:"flex items-center gap-2 mb-1",children:s.jsx("span",{className:h,children:n.name})}),e[2]=h,e[3]=n.name,e[4]=m):m=e[4];let f;e[5]!==n.description?(f=n.description&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:n.description}),e[5]=n.description,e[6]=f):f=e[6];let a;e[7]!==m||e[8]!==f?(a=s.jsxs("div",{className:"flex-1 min-w-0",children:[m,f]}),e[7]=m,e[8]=f,e[9]=a):a=e[9];const u=`tool-${l}-${n.name}`;let x;e[10]!==i||e[11]!==o||e[12]!==u?(x=s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(He,{id:u,checked:i,onCheckedChange:o,onClick:ds})}),e[10]=i,e[11]=o,e[12]=u,e[13]=x):x=e[13];let d;return e[14]!==c||e[15]!==a||e[16]!==x?(d=s.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:c,children:[a,x]}),e[14]=c,e[15]=a,e[16]=x,e[17]=d):d=e[17],d}function ds(t){return t.stopPropagation()}function ms({toolSet:t,onToolSetChange:e,excludeVirtualMcpId:l,searchQuery:n}){const i=ie(),[o,c]=F.useState(""),g=n!==void 0?n:o,h=F.useDeferredValue(g),[m,f]=F.useState("all"),[a,u]=F.useState(!1),x=F.useRef(new Set(Object.keys(t))),{org:d}=Ue(),p=Ft({connectionId:$t,orgId:d.id,orgSlug:d.slug}),A=100,R=h.trim(),I=R?{operator:"or",conditions:[{field:["title"],operator:"contains",value:R},{field:["description"],operator:"contains",value:R}]}:void 0,b=!!l,N={...I&&{where:I},orderBy:[{field:["updated_at"],direction:"asc"}],limit:A,offset:0,...b&&{include_virtual:!0}},M=JSON.stringify(N),{data:S,fetchNextPage:O,hasNextPage:D,isFetchingNextPage:_}=Kt({queryKey:me.collectionListInfinite(p,d.id,"","CONNECTIONS",M),queryFn:async({pageParam:T=0})=>(await p.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...I&&{where:I},orderBy:[{field:["updated_at"],direction:"asc"}],limit:A,offset:T,...b&&{include_virtual:!0}}})).structuredContent,initialPageParam:0,getNextPageParam:(T,w)=>{if(T?.hasMore)return w.reduce((Q,X)=>Q+(X?.items?.length??0),0)},staleTime:3e4}),C=S?.pages.flatMap(T=>T?.items??[])??[],v=Yt(O,D??!1,_),r=l?C.filter(T=>T.connection_type!=="VIRTUAL"?!0:Ht(T.connection_url)!==l):C,E=x.current,k=[...E.values()].map(T=>r.find(w=>w.id===T)).filter(T=>T!==void 0),G=r.filter(T=>!E.has(T.id)),Y=[...k,...G],y=T=>{const w=t[T];return w!==void 0&&w.length>0},z=Y.filter(T=>{if(m==="all")return!0;const w=y(T.id);return m==="selected"?w:m==="unselected"?!w:!0}),[L,K]=F.useState(Y[0]?.id??null),V=L?Y.find(T=>T.id===L)??null:null,{data:U,isFetching:B}=ze({queryKey:me.collectionItem(p,d.id,"","CONNECTIONS",L??""),queryFn:async()=>L?(await p.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:L}})).structuredContent?.item??null:null,enabled:!!L,staleTime:3e4}),H=U?.tools??[],W=(T,w)=>t[T]?.includes(w)??!1,te=(T,w)=>{const Q=t[T]??[],X=Q.includes(w),se={...t};if(X){const le=Q.filter(ne=>ne!==w);le.length===0?delete se[T]:se[T]=le}else se[T]=[...Q,w];e(se)},oe=T=>{const w=T===L?H:[];if(!w.length)return;const Q=t[T]??[],X=w.map(ne=>ne.name),se=Q.length>0&&X.every(ne=>Q.includes(ne)),le={...t};se?delete le[T]:(le[T]=X,K(T)),e(le)},$=T=>{K(T),u(!0)},Z=()=>{u(!1)};return s.jsxs("div",{className:"flex h-full",children:[s.jsxs("div",{className:q("w-full md:w-80 border-r border-border flex flex-col",a&&"hidden md:flex"),children:[n===void 0&&s.jsx(Qt,{value:o,onChange:c,placeholder:i("common.toolSetSelector.searchPlaceholder")}),s.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[s.jsx("button",{onClick:()=>f("all"),className:q("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",m==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:i("common.toolSetSelector.filterAll")}),s.jsx("button",{onClick:()=>f("selected"),className:q("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",m==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:i("common.toolSetSelector.filterSelected")}),s.jsx("button",{onClick:()=>f("unselected"),className:q("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",m==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:i("common.toolSetSelector.filterUnselected")})]}),s.jsx("div",{className:"flex-1 overflow-auto",children:z.length===0?s.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:i(g?"common.toolSetSelector.noConnectionsFound":m==="selected"?"common.toolSetSelector.noServersSelected":m==="unselected"?"common.toolSetSelector.noUnselectedServers":"common.toolSetSelector.noConnectionsAvailable")}):s.jsxs("div",{className:"p-2 space-y-1",children:[z.map(T=>{const w=L===T.id,Q=w?H.length:0,X=t[T.id]?.length??0;return s.jsx(rs,{connection:{...T,tools:w?H:T.tools},isSelected:w,hasToolsEnabled:y(T.id),activeToolsCount:X,totalToolsCount:Q,onSelect:()=>$(T.id),onToggle:()=>oe(T.id)},T.id)}),s.jsx("div",{ref:v,className:"h-4"}),_&&s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(Oe,{size:18,className:"animate-spin text-muted-foreground"})})]})})]}),s.jsx("div",{className:q("flex-1 flex-col",a?"flex":"hidden md:flex"),children:V?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(ce,{variant:"ghost",size:"sm",onClick:Z,className:"h-8 w-8 p-0 shrink-0",children:s.jsx(zt,{size:20})}),s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx(Qe,{icon:V.icon,name:V.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:V.title}),V.description&&s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:V.description})]})]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:B?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Oe,{size:18,className:"animate-spin text-muted-foreground"})}):H.length===0?s.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:i("common.toolSetSelector.noToolsAvailable")}):s.jsx("div",{className:"space-y-2",children:H.map(T=>s.jsx(cs,{connectionId:V.id,tool:T,isSelected:W(V.id,T.name),onToggle:()=>te(V.id,T.name)},T.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:i("common.toolSetSelector.selectConnection")})})})]})}const us=We({role:We({id:re().optional(),slug:re().optional(),label:re()}),allowAllStaticPermissions:Je(),staticPermissions:ke(re()),toolSet:Xe(re(),ke(re())),allowAllModels:Je(),modelSet:Xe(re(),ke(re())),memberIds:ke(re())});function nt(t,e,l,n){const i=s.jsx(De,{checked:e,disabled:l,onCheckedChange:n});return l?s.jsx(ve,{children:s.jsxs(ye,{children:[s.jsx(Le,{asChild:!0,children:s.jsx("div",{children:i})}),s.jsx(Pe,{children:s.jsx("p",{children:t("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):i}function fs(t){const e=J.c(41),{allowAllStaticPermissions:l,staticPermissions:n,onAllowAllChange:i,onPermissionsChange:o,readOnly:c,searchQuery:g}=t,h=c===void 0?!1:c,m=ie();let f;e[0]!==g?(f=g.trim().toLowerCase(),e[0]=g,e[1]=f):f=e[1];const a=F.useDeferredValue(f);let u;if(e[2]!==l||e[3]!==a||e[4]!==i||e[5]!==o||e[6]!==h||e[7]!==g||e[8]!==n||e[9]!==m){const x=os(),d=(_,C)=>{if(!h){if(l&&C){const v=x.flatMap(xs).flatMap(hs);i(!1),o(v.filter(r=>!_.tools.includes(r)));return}l||o(is(_,n,!C))}};let p;e[11]!==a?(p=_=>{const{section:C,capabilities:v}=_;return{section:C,capabilities:v.filter(r=>!a||r.label.toLowerCase().includes(a)||r.description.toLowerCase().includes(a))}},e[11]=a,e[12]=p):p=e[12];const A=x.map(p).filter(gs);let R;e[13]!==m?(R=m("settings.orgRoleDetail.general"),e[13]=m,e[14]=R):R=e[14];let I;e[15]!==m?(I=m("settings.orgRoleDetail.allOrgPermissions"),e[15]=m,e[16]=I):I=e[16];let b;e[17]!==m?(b=m("settings.orgRoleDetail.grantFullAccessToAllFeaturesBelow"),e[17]=m,e[18]=b):b=e[18];let N;e[19]!==l||e[20]!==i||e[21]!==o?(N=()=>{i(!l),o([])},e[19]=l,e[20]=i,e[21]=o,e[22]=N):N=e[22];let M;e[23]!==l||e[24]!==h||e[25]!==m||e[26]!==N?(M=nt(m,l,h,N),e[23]=l,e[24]=h,e[25]=m,e[26]=N,e[27]=M):M=e[27];let S;e[28]!==l||e[29]!==i||e[30]!==o||e[31]!==h?(S=h?void 0:()=>{i(!l),o([])},e[28]=l,e[29]=i,e[30]=o,e[31]=h,e[32]=S):S=e[32];let O;e[33]!==S||e[34]!==I||e[35]!==b||e[36]!==M?(O=s.jsx(st,{children:s.jsx(lt,{title:I,description:b,action:M,onClick:S})}),e[33]=S,e[34]=I,e[35]=b,e[36]=M,e[37]=O):O=e[37];let D;e[38]!==O||e[39]!==R?(D=s.jsx(tt,{title:R,children:O}),e[38]=O,e[39]=R,e[40]=D):D=e[40],u=s.jsx("div",{children:s.jsxs("div",{className:"flex flex-col gap-10 py-4",children:[D,A.length===0&&a?s.jsx("p",{className:"text-sm text-muted-foreground py-4",children:m("settings.orgRoleDetail.noPermissionsMatch",{searchQuery:g})}):A.map(_=>{const{section:C,capabilities:v}=_;return s.jsx(tt,{title:C,children:s.jsx(st,{children:v.map(r=>{const E=ns(r,n,l);return s.jsx(lt,{title:s.jsxs("span",{className:"flex items-center gap-1.5",children:[r.label,r.dangerous&&s.jsx(jt,{size:12,className:"text-warning shrink-0"})]}),description:r.description,action:nt(m,E,h,()=>d(r,E)),onClick:h?void 0:()=>d(r,E)},r.id)})})},C)})]})}),e[2]=l,e[3]=a,e[4]=i,e[5]=o,e[6]=h,e[7]=g,e[8]=n,e[9]=m,e[10]=u}else u=e[10];return u}function gs(t){return t.capabilities.length>0}function hs(t){return t.tools}function xs(t){return t.capabilities}const St={anthropic:"Anthropic",openrouter:"OpenRouter"},ps={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 Ts(t,e){const l=t.indexOf("/"),n=l>0?t.slice(0,l):e;return n.startsWith("~")?n.slice(1):n}function _s(t){return ps[t]??St[t]??t}function Es(t){const e=t.indexOf(": ");return e>0&&e<32?t.slice(e+2):t}const Nt=30;function Is(t){const e=J.c(40),{connectionId:l,subProviderId:n,subProviderName:i,groupLogo:o,models:c,allConnectionModelIds:g,selectedModels:h,allowAllModels:m,allConnectionModelsSelected:f,onToggleModel:a,onExitAllowAll:u,readOnly:x,defaultExpanded:d}=t,p=ie(),[A,R]=F.useState(d),I=d||A,b=R,[N,M]=F.useState(Nt);let S;e[0]!==f||e[1]!==m||e[2]!==h?(S=_=>m||f||h.includes("*")||h.includes(_),e[0]=f,e[1]=m,e[2]=h,e[3]=S):S=e[3];const O=S;let D;if(e[4]!==g||e[5]!==m||e[6]!==l||e[7]!==I||e[8]!==o||e[9]!==O||e[10]!==c||e[11]!==u||e[12]!==a||e[13]!==x||e[14]!==n||e[15]!==i||e[16]!==p||e[17]!==N){let _;e[19]!==O?(_=B=>O(B.id),e[19]=O,e[20]=_):_=e[20];const C=c.filter(_).length,v=c.slice(0,N),r=c.length>N;let E;e[21]===Symbol.for("react.memo_cache_sentinel")?(E=()=>b(Cs),e[21]=E):E=e[21];const k=o??Tt[n]??_t;let G;e[22]!==i||e[23]!==k?(G=s.jsx(Qe,{icon:k,name:i,size:"sm"}),e[22]=i,e[23]=k,e[24]=G):G=e[24];let Y;e[25]!==i?(Y=s.jsx("span",{className:"text-sm font-medium truncate",children:i}),e[25]=i,e[26]=Y):Y=e[26];let y;e[27]!==G||e[28]!==Y?(y=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[G,Y]}),e[27]=G,e[28]=Y,e[29]=y):y=e[29];const z=p("settings.orgRoleDetail.enabledCount",{enabledCount:C,total:c.length});let L;e[30]!==z?(L=s.jsx(Me,{variant:"secondary",className:"text-xs text-muted-foreground",children:z}),e[30]=z,e[31]=L):L=e[31];let K;e[32]!==I?(K=I?s.jsx(Xt,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx(Jt,{size:16,className:"text-muted-foreground shrink-0"}),e[32]=I,e[33]=K):K=e[33];let V;e[34]!==L||e[35]!==K?(V=s.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[L,K]}),e[34]=L,e[35]=K,e[36]=V):V=e[36];let U;e[37]!==V||e[38]!==y?(U=s.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3 hover:bg-muted/50 cursor-pointer",onClick:E,children:[y,V]}),e[37]=V,e[38]=y,e[39]=U):U=e[39],D=s.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[U,I&&s.jsxs("div",{className:"border-t border-border bg-muted/20",children:[v.map(B=>{const H=O(B.id),W=()=>{if(!x){if(m){u(l,g,B.id);return}a(l,B.id)}};return s.jsxs("div",{className:q("flex items-center justify-between gap-3 px-4 py-3 border-b border-border last:border-b-0",!x&&"hover:bg-muted/50 cursor-pointer"),onClick:W,children:[s.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s.jsx("span",{className:"text-sm truncate",children:B.title})}),s.jsx("div",{onClick:Ns,children:x?s.jsx(ve,{children:s.jsxs(ye,{children:[s.jsx(Le,{asChild:!0,children:s.jsx("div",{children:s.jsx(De,{checked:H,disabled:!0,onCheckedChange:Ss})})}),s.jsx(Pe,{children:s.jsx("p",{children:p("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(De,{checked:H,onCheckedChange:W})})]},B.id)}),r&&s.jsx("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:()=>M(Rs),children:p("settings.orgRoleDetail.showMore",{remaining:c.length-N})})]})]}),e[4]=g,e[5]=m,e[6]=l,e[7]=I,e[8]=o,e[9]=O,e[10]=c,e[11]=u,e[12]=a,e[13]=x,e[14]=n,e[15]=i,e[16]=p,e[17]=N,e[18]=D}else D=e[18];return D}function Rs(t){return t+Nt}function Ss(){}function Ns(t){return t.stopPropagation()}function Cs(t){return!t}function As(t){const e=J.c(33),{connection:l,selectedModels:n,allowAllModels:i,onToggleModel:o,onExitAllowAll:c,allConnectionModelsSelected:g,searchQuery:h,readOnly:m}=t,f=Wt(l.id);let a,u,x,d,p;if(e[0]!==g||e[1]!==i||e[2]!==l.id||e[3]!==l.label||e[4]!==l.providerId||e[5]!==c||e[6]!==o||e[7]!==f||e[8]!==m||e[9]!==h||e[10]!==n){p=Symbol.for("react.early_return_sentinel");e:{let I;e[16]!==l.label?(I=E=>({...E,id:E.modelId,provider:l.label}),e[16]=l.label,e[17]=I):I=e[17];const b=f.filter(Ms).map(I),N=h.trim().toLowerCase(),M=N?b.filter(E=>E.title.toLowerCase().includes(N)||E.id.toLowerCase().includes(N)||E.provider?.toLowerCase().includes(N)):b;if(M.length===0){p=null;break e}const S=new Map;for(const E of M){const k=Ts(E.id,l.providerId),G=S.get(k)??{models:[],logo:null};G.models.push({id:E.id,title:Es(E.title),logo:E.logo}),!G.logo&&E.logo&&(G.logo=E.logo),S.set(k,G)}const O=Array.from(S.entries()).map(js).sort(Os),D=O.length===1||N.length>0;x="flex flex-col gap-3";const _=Tt[l.providerId]??_t;let C;e[18]!==l.providerId||e[19]!==_?(C=s.jsx("img",{src:_,alt:l.providerId,className:"w-4 h-4 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),e[18]=l.providerId,e[19]=_,e[20]=C):C=e[20];const v=St[l.providerId]??l.providerId;let r;e[21]!==v?(r=s.jsx("h4",{className:"text-sm font-medium",children:v}),e[21]=v,e[22]=r):r=e[22],e[23]!==r||e[24]!==C?(d=s.jsxs("div",{className:"flex items-center gap-2",children:[C,r]}),e[23]=r,e[24]=C,e[25]=d):d=e[25],a="flex flex-col gap-3",u=O.map(E=>s.jsx(Is,{connectionId:l.id,subProviderId:E.id,subProviderName:E.name,groupLogo:E.logo,models:E.models,allConnectionModelIds:b.map(bs),selectedModels:n,allowAllModels:i,allConnectionModelsSelected:g,onToggleModel:o,onExitAllowAll:c,readOnly:m,defaultExpanded:D},E.id))}e[0]=g,e[1]=i,e[2]=l.id,e[3]=l.label,e[4]=l.providerId,e[5]=c,e[6]=o,e[7]=f,e[8]=m,e[9]=h,e[10]=n,e[11]=a,e[12]=u,e[13]=x,e[14]=d,e[15]=p}else a=e[11],u=e[12],x=e[13],d=e[14],p=e[15];if(p!==Symbol.for("react.early_return_sentinel"))return p;let A;e[26]!==a||e[27]!==u?(A=s.jsx("div",{className:a,children:u}),e[26]=a,e[27]=u,e[28]=A):A=e[28];let R;return e[29]!==x||e[30]!==d||e[31]!==A?(R=s.jsxs("div",{className:x,children:[d,A]}),e[29]=x,e[30]=d,e[31]=A,e[32]=R):R=e[32],R}function bs(t){return t.id}function Os(t,e){return t.name.localeCompare(e.name)}function js(t){const[e,l]=t;return{id:e,name:_s(e),logo:l.logo,models:l.models}}function Ms(t,e,l){return l.findIndex(n=>n.modelId===t.modelId)===e}function Ds(t){const e=J.c(41),{allowAllModels:l,modelSet:n,onAllowAllChange:i,onModelSetChange:o,readOnly:c,searchQuery:g}=t,h=c===void 0?!1:c,m=ie(),f=F.useDeferredValue(g),a=qt();let u;e[0]!==n||e[1]!==o?(u=(_,C)=>{const v=n[_]??[],r={...n};if(v.includes(C)){const E=v.filter(k=>k!==C);E.length===0?delete r[_]:r[_]=E}else r[_]=[...v,C];o(r)},e[0]=n,e[1]=o,e[2]=u):u=e[2];const x=u;let d;e[3]!==n||e[4]!==i||e[5]!==o?(d=(_,C,v)=>{i(!1),o({...n,[_]:C.filter(r=>r!==v)})},e[3]=n,e[4]=i,e[5]=o,e[6]=d):d=e[6];const p=d,A=!h&&"hover:bg-muted/50 cursor-pointer";let R;e[7]!==A?(R=q("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",A),e[7]=A,e[8]=R):R=e[8];let I;e[9]!==l||e[10]!==i||e[11]!==o||e[12]!==h?(I=()=>{if(h)return;const _=!l;i(_),_&&o({})},e[9]=l,e[10]=i,e[11]=o,e[12]=h,e[13]=I):I=e[13];let b;e[14]!==m?(b=m("settings.orgRoleDetail.allModels"),e[14]=m,e[15]=b):b=e[15];let N;e[16]!==b?(N=s.jsx("span",{className:"text-sm font-medium",children:b}),e[16]=b,e[17]=N):N=e[17];let M;e[18]!==l||e[19]!==i||e[20]!==o||e[21]!==h||e[22]!==m?(M=s.jsx("div",{onClick:ys,children:h?s.jsx(ve,{children:s.jsxs(ye,{children:[s.jsx(Le,{asChild:!0,children:s.jsx("div",{children:s.jsx(De,{checked:l,disabled:!0,onCheckedChange:vs})})}),s.jsx(Pe,{children:s.jsx("p",{children:m("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(De,{checked:l,onCheckedChange:_=>{i(_),_&&o({})}})}),e[18]=l,e[19]=i,e[20]=o,e[21]=h,e[22]=m,e[23]=M):M=e[23];let S;e[24]!==R||e[25]!==I||e[26]!==N||e[27]!==M?(S=s.jsxs("div",{className:R,onClick:I,children:[N,M]}),e[24]=R,e[25]=I,e[26]=N,e[27]=M,e[28]=S):S=e[28];let O;e[29]!==a||e[30]!==l||e[31]!==f||e[32]!==p||e[33]!==n||e[34]!==h||e[35]!==m||e[36]!==x?(O=a.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:m("settings.orgRoleDetail.noLlmConnectionsConfigured")}):a.map(_=>s.jsx(F.Suspense,{fallback:s.jsxs("div",{className:"px-4 py-3 flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(Oe,{className:"size-4 animate-spin"}),m("settings.orgRoleDetail.loadingModels")]}),children:s.jsx(As,{connection:_,selectedModels:n[_.id]??[],allowAllModels:l,onToggleModel:x,onExitAllowAll:p,allConnectionModelsSelected:(n[_.id]??[]).includes("*"),searchQuery:f,readOnly:h})},_.id)),e[29]=a,e[30]=l,e[31]=f,e[32]=p,e[33]=n,e[34]=h,e[35]=m,e[36]=x,e[37]=O):O=e[37];let D;return e[38]!==S||e[39]!==O?(D=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 pb-6",children:[S,O]}),e[38]=S,e[39]=O,e[40]=D):D=e[40],D}function vs(){}function ys(t){return t.stopPropagation()}function Ls(t){const e=J.c(75),{open:l,onOpenChange:n,selectedMemberIds:i,onAddMembers:o}=t,c=ie(),[g,h]=F.useState(""),m=F.useDeferredValue(g);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[0]=f):f=e[0];const[a,u]=F.useState(f),{data:x}=Et();let d,p,A,R,I,b,N,M,S,O,D;if(e[1]!==x?.data?.members||e[2]!==m||e[3]!==o||e[4]!==n||e[5]!==l||e[6]!==a||e[7]!==g||e[8]!==i||e[9]!==c){const L=x?.data?.members??[];let K;e[21]!==m?(K=$=>{const Z=m.toLowerCase();return $.user?.name?.toLowerCase().includes(Z)||$.user?.email?.toLowerCase().includes(Z)},e[21]=m,e[22]=K):K=e[22];const V=L.filter(K);let U;e[23]!==o||e[24]!==n||e[25]!==a?(U=()=>{o(a),u([]),n(!1)},e[23]=o,e[24]=n,e[25]=a,e[26]=U):U=e[26],A=U,p=dt,O=l,D=n,d=mt,M="sm:max-w-md p-0";let B;e[27]!==c?(B=c("settings.orgRoleDetail.addMembersToRole"),e[27]=c,e[28]=B):B=e[28];let H;e[29]!==B?(H=s.jsx(ut,{children:B}),e[29]=B,e[30]=H):H=e[30];let W;e[31]!==c?(W=c("settings.orgRoleDetail.selectMembersToAddToThisRole"),e[31]=c,e[32]=W):W=e[32];let te;e[33]!==W?(te=s.jsx(ft,{children:W}),e[33]=W,e[34]=te):te=e[34],e[35]!==H||e[36]!==te?(S=s.jsxs(gt,{className:"px-6 pt-6",children:[H,te]}),e[35]=H,e[36]=te,e[37]=S):S=e[37],b="flex flex-col h-80";let oe;e[38]!==c?(oe=c("settings.orgRoleDetail.searchMembers"),e[38]=c,e[39]=oe):oe=e[39],e[40]!==g||e[41]!==oe?(N=s.jsx("div",{className:"border-b border-border px-4 py-3",children:s.jsx($e,{value:g,onChange:h,placeholder:oe,className:"w-full"})}),e[40]=g,e[41]=oe,e[42]=N):N=e[42],R="flex-1 overflow-auto",I=V.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:c(g?"settings.orgRoleDetail.noMembersFound":"settings.orgRoleDetail.noMembersAvailable")})}):s.jsx("div",{className:"px-6 py-2 space-y-1",children:V.map($=>{const Z=$.role!=="owner",T=i.includes($.id),w=a.includes($.id);return s.jsxs("label",{className:q("flex items-center gap-3 p-2 rounded-lg",!Z||T?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-muted/50"),children:[s.jsx(He,{checked:w||T,onCheckedChange:()=>{!Z||T||u(Q=>Q.includes($.id)?Q.filter(X=>X!==$.id):[...Q,$.id])},disabled:!Z||T}),s.jsx(Rt,{url:$.user?.image??void 0,fallback:It($.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:$.user?.name||c("settings.orgRoleDetail.unknown")}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:$.user?.email})]}),!Z&&s.jsx(Me,{variant:"secondary",className:"shrink-0",children:c("settings.orgRoleDetail.owner")}),T&&Z&&s.jsx(Me,{variant:"outline",className:"shrink-0",children:c("settings.orgRoleDetail.added")})]},$.id)})}),e[1]=x?.data?.members,e[2]=m,e[3]=o,e[4]=n,e[5]=l,e[6]=a,e[7]=g,e[8]=i,e[9]=c,e[10]=d,e[11]=p,e[12]=A,e[13]=R,e[14]=I,e[15]=b,e[16]=N,e[17]=M,e[18]=S,e[19]=O,e[20]=D}else d=e[10],p=e[11],A=e[12],R=e[13],I=e[14],b=e[15],N=e[16],M=e[17],S=e[18],O=e[19],D=e[20];let _;e[43]!==R||e[44]!==I?(_=s.jsx("div",{className:R,children:I}),e[43]=R,e[44]=I,e[45]=_):_=e[45];let C;e[46]!==_||e[47]!==b||e[48]!==N?(C=s.jsxs("div",{className:b,children:[N,_]}),e[46]=_,e[47]=b,e[48]=N,e[49]=C):C=e[49];let v;e[50]!==c?(v=c("settings.orgRoleDetail.cancel"),e[50]=c,e[51]=v):v=e[51];let r;e[52]!==v?(r=s.jsx(ht,{children:v}),e[52]=v,e[53]=r):r=e[53];const E=a.length===0;let k;e[54]!==a.length||e[55]!==c?(k=c("settings.orgRoleDetail.addWithCount",{count:a.length}),e[54]=a.length,e[55]=c,e[56]=k):k=e[56];let G;e[57]!==A||e[58]!==E||e[59]!==k?(G=s.jsx(xt,{onClick:A,disabled:E,children:k}),e[57]=A,e[58]=E,e[59]=k,e[60]=G):G=e[60];let Y;e[61]!==r||e[62]!==G?(Y=s.jsxs(pt,{className:"px-6 pb-6",children:[r,G]}),e[61]=r,e[62]=G,e[63]=Y):Y=e[63];let y;e[64]!==d||e[65]!==C||e[66]!==Y||e[67]!==M||e[68]!==S?(y=s.jsxs(d,{className:M,children:[S,C,Y]}),e[64]=d,e[65]=C,e[66]=Y,e[67]=M,e[68]=S,e[69]=y):y=e[69];let z;return e[70]!==p||e[71]!==y||e[72]!==O||e[73]!==D?(z=s.jsx(p,{open:O,onOpenChange:D,children:y}),e[70]=p,e[71]=y,e[72]=O,e[73]=D,e[74]=z):z=e[74],z}function Ps(t){const e=J.c(33),{memberIds:l,onMemberIdsChange:n,readOnly:i,readOnlyMessage:o,searchQuery:c,addMemberDialogOpen:g,onAddMemberDialogOpenChange:h}=t,m=i===void 0?!1:i,f=o===void 0?void 0:o,a=ie(),u=F.useDeferredValue(c),{data:x}=Et();let d,p,A;if(e[0]!==x?.data?.members||e[1]!==u||e[2]!==l||e[3]!==n||e[4]!==m||e[5]!==f||e[6]!==c||e[7]!==a){const M=x?.data?.members??[];let S;e[11]!==l?(S=r=>l.includes(r.id),e[11]=l,e[12]=S):S=e[12];const O=M.filter(S);let D;e[13]!==u?(D=r=>{const E=u.toLowerCase();return r.user?.name?.toLowerCase().includes(E)||r.user?.email?.toLowerCase().includes(E)},e[13]=u,e[14]=D):D=e[14];const _=O.filter(D);let C;e[15]!==f||e[16]!==a?(C=f??a("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),e[15]=f,e[16]=a,e[17]=C):C=e[17];const v=C;A="flex flex-col h-full",d="flex-1 overflow-auto",p=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:a("settings.orgRoleDetail.noMembers")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:a("settings.orgRoleDetail.addMembersToGrantPermissions")})]})}):_.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:a("settings.orgRoleDetail.noMembersMatch",{searchQuery:c})})}):s.jsx("div",{className:"p-4 space-y-2",children:_.map(r=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/30",children:[s.jsx(Rt,{url:r.user?.image??void 0,fallback:It(r.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:r.user?.name||a("settings.orgRoleDetail.unknown")}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:r.user?.email})]}),m?s.jsx(ve,{children:s.jsxs(ye,{children:[s.jsx(Le,{asChild:!0,children:s.jsx("div",{children:s.jsx(ce,{variant:"ghost",size:"sm",disabled:!0,"aria-label":a("settings.orgRoleDetail.removeMember",{name:r.user?.name||a("settings.orgRoleDetail.unknown")}),children:s.jsx(ot,{size:16})})})}),s.jsx(Pe,{children:s.jsx("p",{children:v})})]})}):s.jsx(ce,{variant:"ghost",size:"sm","aria-label":a("settings.orgRoleDetail.removeMember",{name:r.user?.name||a("settings.orgRoleDetail.unknown")}),onClick:()=>n(l.filter(E=>E!==r.id)),children:s.jsx(ot,{size:16})})]},r.id))}),e[0]=x?.data?.members,e[1]=u,e[2]=l,e[3]=n,e[4]=m,e[5]=f,e[6]=c,e[7]=a,e[8]=d,e[9]=p,e[10]=A}else d=e[8],p=e[9],A=e[10];let R;e[18]!==d||e[19]!==p?(R=s.jsx("div",{className:d,children:p}),e[18]=d,e[19]=p,e[20]=R):R=e[20];let I;e[21]!==l||e[22]!==n?(I=M=>n([...l,...M]),e[21]=l,e[22]=n,e[23]=I):I=e[23];let b;e[24]!==g||e[25]!==l||e[26]!==h||e[27]!==I?(b=s.jsx(Ls,{open:g,onOpenChange:h,selectedMemberIds:l,onAddMembers:I}),e[24]=g,e[25]=l,e[26]=h,e[27]=I,e[28]=b):b=e[28];let N;return e[29]!==A||e[30]!==R||e[31]!==b?(N=s.jsxs("div",{className:A,children:[R,b]}),e[29]=A,e[30]=R,e[31]=b,e[32]=N):N=e[32],N}function ws(t){const e=J.c(3);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Oe,{size:24,className:"animate-spin text-muted-foreground"})}),e[0]=l):l=e[0];let n;return e[1]!==t?(n=s.jsx(F.Suspense,{fallback:l,children:s.jsx(Ps,{...t})}),e[1]=t,e[2]=n):n=e[2],n}const Gs={owner:[],admin:[],user:[]};function ks(t,e,l,n){const i=t==="owner"||t==="admin";return{role:{id:l?.id,slug:t,label:t.charAt(0).toUpperCase()+t.slice(1)},allowAllStaticPermissions:i,staticPermissions:Gs[t],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:e.filter(o=>o.role===t).map(o=>o.id)}}function Us(t,e,l){const n=t.permission||{},i=n.self||[],o=i.includes("*"),c=o?[]:i.filter(a=>a!=="*"),g={};for(const[a,u]of Object.entries(n))if(!(a==="self"||a==="models"))if(a==="*")for(const x of l)g[x.id]=u.includes("*")?x.tools?.map(d=>d.name)??[]:u;else{const x=l.find(d=>d.id===a);x&&(g[a]=u.includes("*")?x.tools?.map(d=>d.name)??[]:u)}const h=n.models||[],m=h.length===0||h.includes("*:*"),f={};if(!m)for(const a of h){const u=a.indexOf(":");if(u===-1)continue;const x=a.slice(0,u),d=a.slice(u+1);f[x]||(f[x]=[]),f[x].push(d)}return{role:{id:t.id,slug:t.role,label:t.label},allowAllStaticPermissions:o,staticPermissions:c,toolSet:g,allowAllModels:m,modelSet:f,memberIds:e.filter(a=>a.role===t.role).map(a=>a.id)}}function Bs(t,e){const l={};t.allowAllStaticPermissions?l.self=["*"]:t.staticPermissions.length>0&&(l.self=t.staticPermissions);for(const[n,i]of Object.entries(t.toolSet))if(i.length>0){const c=e.find(g=>g.id===n)?.tools?.map(g=>g.name)??[];l[n]=c.length>0&&c.every(g=>i.includes(g))?["*"]:i}if(t.allowAllModels)l.models=["*:*"];else{const n=[];for(const[i,o]of Object.entries(t.modelSet))for(const c of o)n.push(`${i}:${c}`);n.length>0&&(l.models=n)}return l}function Vs(t,e,l){return t.kind==="builtin"?ks(t.role,e,void 0):t.kind==="custom"?Us(t.role,e,l):{role:{id:void 0,slug:void 0,label:""},allowAllStaticPermissions:!1,staticPermissions:[],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:[]}}function Ys(t){const e=J.c(19),{readOnly:l,readOnlyMessage:n,onOpen:i}=t,o=n===void 0?void 0:n,c=ie();let g;e[0]!==o||e[1]!==c?(g=o??c("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),e[0]=o,e[1]=c,e[2]=g):g=e[2];const h=g;if(l){let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ye,{size:16}),e[3]=u):u=e[3];let x;e[4]!==c?(x=c("settings.orgRoleDetail.addMember"),e[4]=c,e[5]=x):x=e[5];let d;e[6]!==x?(d=s.jsx(Le,{asChild:!0,children:s.jsx("div",{children:s.jsxs(ce,{variant:"outline",size:"sm",disabled:!0,children:[u,x]})})}),e[6]=x,e[7]=d):d=e[7];let p;e[8]!==h?(p=s.jsx(Pe,{children:s.jsx("p",{children:h})}),e[8]=h,e[9]=p):p=e[9];let A;return e[10]!==d||e[11]!==p?(A=s.jsx(ve,{children:s.jsxs(ye,{children:[d,p]})}),e[10]=d,e[11]=p,e[12]=A):A=e[12],A}let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ye,{size:16}),e[13]=m):m=e[13];let f;e[14]!==c?(f=c("settings.orgRoleDetail.addMember"),e[14]=c,e[15]=f):f=e[15];let a;return e[16]!==i||e[17]!==f?(a=s.jsxs(ce,{variant:"outline",size:"sm",onClick:i,children:[m,f]}),e[16]=i,e[17]=f,e[18]=a):a=e[18],a}function zs(t){const e=J.c(14),{locator:l}=Ue(),n=Fe(),i=Zt();let o;e[0]!==l?(o=me.members(l),e[0]=l,e[1]=o):o=e[1];let c;e[2]!==n?(c=()=>n.organization.listMembers(),e[2]=n,e[3]=c):c=e[3];let g;e[4]!==o||e[5]!==c?(g={queryKey:o,queryFn:c},e[4]=o,e[5]=c,e[6]=g):g=e[6];const{data:h,isPending:m}=ze(g);if(m||!i){let x;return e[7]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ae,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Oe,{size:32,className:"animate-spin text-muted-foreground"})})}),e[7]=x):x=e[7],x}let f;e[8]!==h?.data?.members?(f=h?.data?.members??[],e[8]=h?.data?.members,e[9]=f):f=e[9];const a=f;let u;return e[10]!==i||e[11]!==a||e[12]!==t?(u=s.jsx(Ks,{...t,members:a,connections:i}),e[10]=i,e[11]=a,e[12]=t,e[13]=u):u=e[13],u}function Ks({target:t,onBack:e,onSaved:l,members:n,connections:i}){const o=ie(),{locator:c}=Ue(),g=Fe(),h=it(),m=t.kind==="builtin",f=t.kind==="builtin"&&t.role==="owner",a=t.kind==="new",[u,x]=F.useState(m?"org":"mcp"),d=bt({resolver:Ot(us),defaultValues:Vs(t,n,i)}),p=d.formState.isValid,A=d.formState.isDirty,R=rt({mutationFn:async r=>{const E=Bs(r,i),k=r.role.slug||r.role.label.toLowerCase().replace(/\s+/g,"-"),G=(r.role.slug==="owner"||r.role.slug==="admin"||r.role.slug==="user")&&!r.role.id,Y=async(y,z)=>{const L=n.filter(U=>U.role===(z??y)).map(U=>U.id),K=r.memberIds.filter(U=>!L.includes(U)),V=L.filter(U=>!r.memberIds.includes(U));for(const U of K){const B=await g.organization.updateMemberRole({memberId:U,role:[y]});if(B?.error)throw new Error(B.error.message??o("settings.orgRoleDetail.somethingWentWrong"))}for(const U of V){const B=await g.organization.updateMemberRole({memberId:U,role:["user"]});if(B?.error)throw new Error(B.error.message??o("settings.orgRoleDetail.somethingWentWrong"))}};if(G)return await Y(r.role.slug),r;if(r.role.id){const y=r.role.label.toLowerCase().replace(/\s+/g,"-"),z=r.role.slug,L=y!==z,K=await g.organization.updateRole({roleId:r.role.id,data:{permission:E,...L?{roleName:y}:{}}});if(K?.error)throw new Error(K.error.message??o("settings.orgRoleDetail.somethingWentWrong"));return await Y(L?y:z,L?z:void 0),L?{...r,role:{...r.role,slug:y}}:r}else{const y=await g.organization.createRole({role:k,permission:E});if(y?.error)throw new Error(y.error.message??o("settings.orgRoleDetail.somethingWentWrong"));for(const z of r.memberIds){const L=await g.organization.updateMemberRole({memberId:z,role:[k]});if(L?.error)throw new Error(L.error.message)}return{...r,role:{...r.role,id:y.data?.roleData?.id,slug:k}}}},onSuccess:(r,E)=>{h.invalidateQueries({queryKey:me.members(c)}),h.invalidateQueries({queryKey:me.organizationRoles(c)});const k=!E.role.id&&!E.role.slug,G=E.role.slug==="owner"&&!E.role.id;Ke(G?"role_members_updated":k?"role_created":"role_updated",{role_slug:E.role.slug??null}),je.success(o(G?"settings.orgRoleDetail.membersUpdatedSuccessfully":k?"settings.orgRoleDetail.roleCreatedSuccessfully":"settings.orgRoleDetail.roleUpdatedSuccessfully")),d.reset(r),l(r.role.id)},onError:r=>{je.error(r instanceof Error?r.message:o("settings.orgRoleDetail.failedToSaveRole"))}}),I=d.handleSubmit(r=>{if(!r.role.label.trim()){je.error(o("settings.orgRoleDetail.roleNameIsRequired")),d.setFocus("role.label");return}R.mutate(r)}),b=!f,N=t.kind==="builtin"?t.role.charAt(0).toUpperCase()+t.role.slice(1):t.kind==="custom"?t.role.label:"",M=[...f?[]:[{id:"mcp",label:o("settings.orgRoleDetail.mcpPermissions")}],{id:"org",label:o("settings.orgRoleDetail.organizationPermissions")},{id:"models",label:o("settings.orgRoleDetail.models")},{id:"members",label:o("settings.orgRoleDetail.members")}],[S,O]=F.useState(""),[D,_]=F.useState(!1),C=r=>{x(r),O("")},v={mcp:o("settings.orgRoleDetail.searchMcpServers"),org:o("settings.orgRoleDetail.searchPermissions"),models:o("settings.orgRoleDetail.searchModels"),members:o("settings.orgRoleDetail.searchMembers")};return s.jsx(ae,{children:s.jsxs(ae.Content,{className:q("flex flex-col",u!=="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(ae.Title,{actions:b&&s.jsxs(s.Fragment,{children:[s.jsx(ce,{variant:"outline",size:"sm",onClick:e,disabled:R.isPending,children:o("settings.orgRoleDetail.cancel")}),s.jsx(ce,{size:"sm",onClick:I,disabled:R.isPending||!p||!A,children:R.isPending?o("settings.orgRoleDetail.saving"):o(a?"settings.orgRoleDetail.createRole":"settings.orgRoleDetail.saveChanges")})]}),children:s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx("div",{className:q("size-2.5 rounded-full shrink-0",t.kind==="builtin"?ct(t.role,!0):Lt(d.watch("role.label")))}),f&&s.jsx(at,{size:16,className:"text-muted-foreground shrink-0"}),a||t.kind==="custom"?s.jsx("input",{...d.register("role.label"),placeholder:o("settings.orgRoleDetail.roleName"),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:a}):s.jsx("span",{className:"truncate",children:N})]})}),s.jsx("div",{className:"flex items-center gap-2",children:M.map(r=>s.jsx("button",{type:"button",onClick:()=>C(r.id),className:q("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex items-center",u===r.id?"bg-accent border-border text-foreground":"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:r.label},r.id))}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx($e,{value:S,onChange:O,placeholder:v[u]??"Search...",className:"w-full md:w-[375px]"}),u==="members"&&s.jsx(Ys,{readOnly:t.kind==="builtin"&&t.role==="owner",onOpen:()=>_(!0)})]})]})}),s.jsx("div",{className:q("mx-auto w-full max-w-[1200px] px-4 md:px-10 pb-6",u!=="org"&&"flex-1 min-h-0"),children:s.jsxs("div",{className:q(u!=="org"&&"h-full overflow-hidden",u!=="models"&&u!=="org"&&"border border-border rounded-xl bg-card"),children:[u==="mcp"&&!f&&s.jsx(ms,{toolSet:d.watch("toolSet"),onToolSetChange:r=>d.setValue("toolSet",r,{shouldDirty:!0}),searchQuery:S}),u==="org"&&s.jsx(fs,{allowAllStaticPermissions:d.watch("allowAllStaticPermissions"),staticPermissions:d.watch("staticPermissions"),onAllowAllChange:r=>d.setValue("allowAllStaticPermissions",r,{shouldDirty:!0}),onPermissionsChange:r=>d.setValue("staticPermissions",r,{shouldDirty:!0}),readOnly:f,searchQuery:S}),u==="models"&&s.jsx(Ds,{allowAllModels:d.watch("allowAllModels"),modelSet:d.watch("modelSet"),onAllowAllChange:r=>d.setValue("allowAllModels",r,{shouldDirty:!0}),onModelSetChange:r=>d.setValue("modelSet",r,{shouldDirty:!0}),readOnly:f,searchQuery:S}),u==="members"&&s.jsx(ws,{memberIds:d.watch("memberIds"),onMemberIdsChange:r=>d.setValue("memberIds",r,{shouldDirty:!0}),readOnly:t.kind==="builtin"&&(t.role==="owner"||t.role==="user"),readOnlyMessage:t.kind==="builtin"&&t.role==="user"?o("settings.orgRoleDetail.userIsDefaultRoleMessage"):o("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),searchQuery:S,addMemberDialogOpen:D,onAddMemberDialogOpenChange:_})]})})]})})}function Fs(t){return t.kind==="builtin"?`builtin-${t.role}`:t.kind==="custom"?`custom-${t.role.id}`:"new"}function $s(t){const e=J.c(6),{area:l,children:n}=t,{isPrivileged:i,loading:o,error:c}=es();let g;return e[0]!==l||e[1]!==n||e[2]!==c||e[3]!==i||e[4]!==o?(g=s.jsx(ts,{granted:i,loading:o,error:c,area:l,children:n}),e[0]=l,e[1]=n,e[2]=c,e[3]=i,e[4]=o,e[5]=g):g=e[5],g}const Qs=[{role:"owner",labelKey:"settings.roles.roleOwner"},{role:"admin",labelKey:"settings.roles.roleAdmin"},{role:"user",labelKey:"settings.roles.roleUser"}];function Hs(){const t=J.c(131),e=ie(),[l,n]=F.useState(""),[i,o]=F.useState(null),c=Dt();let g;t[0]===Symbol.for("react.memo_cache_sentinel")?(g={strict:!1},t[0]=g):g=t[0];const{role:h}=vt(g),{locator:m}=Ue(),f=Fe(),a=it(),{customRoles:u,refetch:x}=yt();let d;t[1]!==c?(d=j=>c({to:".",search:P=>({...P,role:j})}),t[1]=c,t[2]=d):d=t[2];const p=d;let A;e:{if(!h){A=null;break e}if(h==="new"){A={kind:"new"};break e}if(h.startsWith("builtin-")){A={kind:"builtin",role:h.slice(8)};break e}let j;t[3]!==h?(j=ee=>ee.id===h,t[3]=h,t[4]=j):j=t[4];const P=u.find(j);A=P?{kind:"custom",role:P}:null}const R=A;let I;t[5]!==m?(I=me.members(m),t[5]=m,t[6]=I):I=t[6];let b;t[7]!==f?(b=()=>f.organization.listMembers(),t[7]=f,t[8]=b):b=t[8];let N;t[9]!==I||t[10]!==b?(N={queryKey:I,queryFn:b},t[9]=I,t[10]=b,t[11]=N):N=t[11];const{data:M}=ze(N);let S;t[12]!==M?.data?.members?(S=M?.data?.members??[],t[12]=M?.data?.members,t[13]=S):S=t[13];const O=S;let D;t[14]!==O?(D=j=>O.filter(P=>P.role===j).length,t[14]=O,t[15]=D):D=t[15];const _=D;let C;if(t[16]!==u||t[17]!==_||t[18]!==l||t[19]!==e){let j;t[21]!==_||t[22]!==e?(j=de=>({kind:"builtin",role:{...de,memberCount:_(de.role),label:e(de.labelKey)}}),t[21]=_,t[22]=e,t[23]=j):j=t[23];const P=Qs.map(j);let ee;t[24]!==_?(ee=de=>({kind:"custom",role:{...de,memberCount:_(de.role)}}),t[24]=_,t[25]=ee):ee=t[25];const Ct=u.map(ee);if(C=[...P,...Ct],l){const de=l.toLowerCase();C=C.filter(At=>At.role.label.toLowerCase().includes(de))}t[16]=u,t[17]=_,t[18]=l,t[19]=e,t[20]=C}else C=t[20];let v;t[26]!==f?(v=async j=>{const P=await f.organization.deleteRole({roleId:j});if(P?.error)throw new Error(P.error.message);return P?.data},t[26]=f,t[27]=v):v=t[27];const r=rt({mutationFn:v,onSuccess:(j,P)=>{Ke("role_deleted",{role_id:P}),a.invalidateQueries({queryKey:me.members(m)}),a.invalidateQueries({queryKey:me.organizationRoles(m)}),je.success(e("settings.roles.deletedSuccessfully")),x(),R?.kind==="custom"&&R.role.id===P&&p(void 0)},onError:Js});let E;t[28]!==e?(E=e("settings.roles.columnRole"),t[28]=e,t[29]=E):E=t[29];let k;t[30]!==E?(k={id:"role",header:E,render:Xs,cellClassName:"flex-1 min-w-0",sortable:!0},t[30]=E,t[31]=k):k=t[31];let G;t[32]!==e?(G=e("settings.roles.columnType"),t[32]=e,t[33]=G):G=t[33];let Y;t[34]!==e?(Y=j=>j.kind==="builtin"?s.jsx(Me,{variant:"secondary",className:"text-xs",children:e("settings.roles.builtIn")}):s.jsx(Me,{variant:"outline",className:"text-xs",children:e("settings.roles.custom")}),t[34]=e,t[35]=Y):Y=t[35];let y;t[36]!==G||t[37]!==Y?(y={id:"type",header:G,render:Y,cellClassName:"w-28 shrink-0"},t[36]=G,t[37]=Y,t[38]=y):y=t[38];let z;t[39]!==e?(z=e("settings.roles.columnPermissions"),t[39]=e,t[40]=z):z=t[40];let L;t[41]!==e?(L=j=>{if(j.kind==="builtin")return j.role.role==="owner"||j.role.role==="admin"?s.jsx("span",{className:"text-sm text-muted-foreground",children:e("settings.roles.fullAccess")}):s.jsx("span",{className:"text-sm text-muted-foreground",children:e("settings.roles.basicAccess")});const P=j.role,ee=[];return P.allowsAllStaticPermissions?ee.push(e("settings.roles.fullOrgAccess")):P.staticPermissionCount&&P.staticPermissionCount>0&&ee.push(e("settings.roles.orgPermsCount",{count:P.staticPermissionCount})),P.allowsAllConnections?ee.push(e("settings.roles.allConnections")):P.connectionCount&&P.connectionCount>0&&ee.push(e("settings.roles.connectionCount",{count:P.connectionCount})),s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:ee.length>0?ee.join(", "):e("settings.roles.noPermissions")})},t[41]=e,t[42]=L):L=t[42];let K;t[43]!==z||t[44]!==L?(K={id:"permissions",header:z,render:L,cellClassName:"flex-1 min-w-0"},t[43]=z,t[44]=L,t[45]=K):K=t[45];let V;t[46]!==e?(V=e("settings.roles.columnMembers"),t[46]=e,t[47]=V):V=t[47];let U;t[48]!==V?(U={id:"members",header:V,render:Ws,cellClassName:"w-24 shrink-0"},t[48]=V,t[49]=U):U=t[49];let B;t[50]!==e?(B={id:"actions",header:"",render:j=>j.kind==="builtin"?null:s.jsxs(Pt,{children:[s.jsx(wt,{asChild:!0,children:s.jsx(ce,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:qs,children:s.jsx(Ut,{size:16})})}),s.jsx(Gt,{align:"end",onClick:Zs,children:s.jsxs(kt,{variant:"destructive",onClick:()=>{const P=j.role;P.id&&o({id:P.id,label:P.label})},children:[s.jsx(Bt,{size:16}),e("settings.roles.delete")]})})]}),cellClassName:"w-12 shrink-0"},t[50]=e,t[51]=B):B=t[51];let H;t[52]!==k||t[53]!==y||t[54]!==K||t[55]!==U||t[56]!==B?(H=[k,y,K,U,B],t[52]=k,t[53]=y,t[54]=K,t[55]=U,t[56]=B,t[57]=H):H=t[57];const W=H;let te;t[58]!==p?(te=j=>{if(j.kind==="builtin")p(`builtin-${j.role.role}`);else{const P=j.role;p(P.id)}},t[58]=p,t[59]=te):te=t[59];const oe=te;if(R){let j;t[60]!==p?(j=()=>p(void 0),t[60]=p,t[61]=j):j=t[61];let P;return t[62]!==x||t[63]!==p?(P=()=>{x(),p(void 0)},t[62]=x,t[63]=p,t[64]=P):P=t[64],s.jsx(zs,{target:R,onBack:j,onSaved:P},Fs(R))}let $;t[65]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(ss,{group:"members"}),t[65]=$):$=t[65];let Z;t[66]!==e?(Z=e("settings.roles.searchPlaceholder"),t[66]=e,t[67]=Z):Z=t[67];let T;t[68]===Symbol.for("react.memo_cache_sentinel")?(T=j=>{j.key==="Escape"&&(n(""),j.target.blur())},t[68]=T):T=t[68];let w;t[69]!==l||t[70]!==Z?(w=s.jsx($e,{value:l,onChange:n,placeholder:Z,className:"w-full md:w-[375px]",onKeyDown:T}),t[69]=l,t[70]=Z,t[71]=w):w=t[71];let Q;t[72]!==p?(Q=()=>p("new"),t[72]=p,t[73]=Q):Q=t[73];let X;t[74]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx(Ye,{size:16}),t[74]=X):X=t[74];let se;t[75]!==e?(se=e("settings.roles.createRole"),t[75]=e,t[76]=se):se=t[76];let le;t[77]!==Q||t[78]!==se?(le=s.jsxs(ce,{onClick:Q,children:[X,se]}),t[77]=Q,t[78]=se,t[79]=le):le=t[79];let ne;t[80]!==w||t[81]!==le?(ne=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[w,le]}),t[80]=w,t[81]=le,t[82]=ne):ne=t[82];let ue;t[83]!==l||t[84]!==e?(ue=l?s.jsx(et,{title:e("settings.roles.noRolesFound"),description:e("settings.roles.noRolesMatchSearch",{search:l})}):s.jsx(et,{title:e("settings.roles.noRoles"),description:e("settings.roles.createRoleGetStarted")}),t[83]=l,t[84]=e,t[85]=ue):ue=t[85];let fe;t[86]!==C||t[87]!==W||t[88]!==oe||t[89]!==ue?(fe=s.jsx(Vt,{columns:W,data:C,isLoading:!1,onRowClick:oe,emptyState:ue}),t[86]=C,t[87]=W,t[88]=oe,t[89]=ue,t[90]=fe):fe=t[90];let ge;t[91]!==ne||t[92]!==fe?(ge=s.jsx(ae.Content,{children:s.jsx(ae.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[$,ne,fe]})})}),t[91]=ne,t[92]=fe,t[93]=ge):ge=t[93];const Be=i!==null;let we;t[94]===Symbol.for("react.memo_cache_sentinel")?(we=j=>!j&&o(null),t[94]=we):we=t[94];let he;t[95]!==e?(he=e("settings.roles.deleteRoleTitle"),t[95]=e,t[96]=he):he=t[96];let xe;t[97]!==he?(xe=s.jsx(ut,{children:he}),t[97]=he,t[98]=xe):xe=t[98];const Ve=i?.label??"";let pe;t[99]!==e||t[100]!==Ve?(pe=e("settings.roles.deleteRoleConfirm",{role:Ve}),t[99]=e,t[100]=Ve,t[101]=pe):pe=t[101];let Te;t[102]!==pe?(Te=s.jsx(ft,{children:pe}),t[102]=pe,t[103]=Te):Te=t[103];let _e;t[104]!==xe||t[105]!==Te?(_e=s.jsxs(gt,{children:[xe,Te]}),t[104]=xe,t[105]=Te,t[106]=_e):_e=t[106];let Ee;t[107]!==e?(Ee=e("settings.roles.cancel"),t[107]=e,t[108]=Ee):Ee=t[108];let Ie;t[109]!==Ee?(Ie=s.jsx(ht,{children:Ee}),t[109]=Ee,t[110]=Ie):Ie=t[110];let Re;t[111]!==r||t[112]!==i?(Re=()=>{i?.id&&r.mutate(i.id),o(null)},t[111]=r,t[112]=i,t[113]=Re):Re=t[113];let Se;t[114]!==e?(Se=e("settings.roles.delete"),t[114]=e,t[115]=Se):Se=t[115];let Ne;t[116]!==Re||t[117]!==Se?(Ne=s.jsx(xt,{onClick:Re,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Se}),t[116]=Re,t[117]=Se,t[118]=Ne):Ne=t[118];let Ce;t[119]!==Ie||t[120]!==Ne?(Ce=s.jsxs(pt,{children:[Ie,Ne]}),t[119]=Ie,t[120]=Ne,t[121]=Ce):Ce=t[121];let Ae;t[122]!==_e||t[123]!==Ce?(Ae=s.jsxs(mt,{children:[_e,Ce]}),t[122]=_e,t[123]=Ce,t[124]=Ae):Ae=t[124];let be;t[125]!==Be||t[126]!==Ae?(be=s.jsx(dt,{open:Be,onOpenChange:we,children:Ae}),t[125]=Be,t[126]=Ae,t[127]=be):be=t[127];let Ge;return t[128]!==ge||t[129]!==be?(Ge=s.jsxs(ae,{children:[ge,be]}),t[128]=ge,t[129]=be,t[130]=Ge):Ge=t[130],Ge}function Zs(t){return t.stopPropagation()}function qs(t){return t.stopPropagation()}function Ws(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.role.memberCount})}function Xs(t){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:q("size-2.5 rounded-full shrink-0",ct(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(at,{size:12,className:"text-muted-foreground shrink-0"})]})}function Js(t,e){Ke("role_delete_failed",{role_id:e,error:t instanceof Error?t.message:String(t)}),je.error(t instanceof Error?t.message:"Failed to delete role")}function el(){const t=J.c(7),e=ie();let l;t[0]!==e?(l=e("settings.roles.failedToLoad"),t[0]=e,t[1]=l):l=t[1];let n;t[2]!==l?(n=s.jsx(ae,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:l})})}),t[2]=l,t[3]=n):n=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(F.Suspense,{fallback:s.jsx(ae,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Oe,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(Hs,{})}),t[4]=i):i=t[4];let o;return t[5]!==n?(o=s.jsx(Mt,{fallback:n,children:i}),t[5]=n,t[6]=o):o=t[6],o}function Po(){const t=J.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx($s,{area:"roles",children:s.jsx(el,{})}),t[0]=e):e=t[0],e}export{Po as default};
@@ -1 +1 @@
1
- import{c as b,m as w,j as a,k as j}from"./index-B0RQtdH5.js";import{i as k}from"./SearchMd-BvAyUAA0.js";function S(f){const e=b.c(17),{value:l,onChange:c,placeholder:g,onKeyDown:d,className:u,isSearching:m,disabled:i}=f,p=g===void 0?"Search...":g,x=i&&"pointer-events-none opacity-50";let t;e[0]!==u||e[1]!==x?(t=w("flex items-center gap-4 rounded-lg bg-background dark:bg-input/30 px-3 h-8 card-shadow","focus-within:border-ring focus-within:ring-ring/20 focus-within:ring-[2px]","transition-[color,box-shadow]",x,u),e[0]=u,e[1]=x,e[2]=t):t=e[2];let n;e[3]!==m?(n=m?a.jsx(j,{size:16,className:"animate-spin text-muted-foreground/75 shrink-0"}):a.jsx(k,{size:16,className:"text-muted-foreground/75 shrink-0"}),e[3]=m,e[4]=n):n=e[4];let s;e[5]!==c?(s=h=>c(h.target.value),e[5]=c,e[6]=s):s=e[6];let o;e[7]!==i||e[8]!==d||e[9]!==p||e[10]!==s||e[11]!==l?(o=a.jsx("input",{type:"text",value:l,onChange:s,onKeyDown:d,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[7]=i,e[8]=d,e[9]=p,e[10]=s,e[11]=l,e[12]=o):o=e[12];let r;return e[13]!==t||e[14]!==n||e[15]!==o?(r=a.jsxs("label",{className:t,children:[n,o]}),e[13]=t,e[14]=n,e[15]=o,e[16]=r):r=e[16],r}export{S};
1
+ import{c as b,m as w,j as a,k as j}from"./index-dh0u4IqP.js";import{i as k}from"./SearchMd-B0Qlr1Gl.js";function S(f){const e=b.c(17),{value:l,onChange:c,placeholder:g,onKeyDown:d,className:u,isSearching:m,disabled:i}=f,p=g===void 0?"Search...":g,x=i&&"pointer-events-none opacity-50";let t;e[0]!==u||e[1]!==x?(t=w("flex items-center gap-4 rounded-lg bg-background dark:bg-input/30 px-3 h-8 card-shadow","focus-within:border-ring focus-within:ring-ring/20 focus-within:ring-[2px]","transition-[color,box-shadow]",x,u),e[0]=u,e[1]=x,e[2]=t):t=e[2];let n;e[3]!==m?(n=m?a.jsx(j,{size:16,className:"animate-spin text-muted-foreground/75 shrink-0"}):a.jsx(k,{size:16,className:"text-muted-foreground/75 shrink-0"}),e[3]=m,e[4]=n):n=e[4];let s;e[5]!==c?(s=h=>c(h.target.value),e[5]=c,e[6]=s):s=e[6];let o;e[7]!==i||e[8]!==d||e[9]!==p||e[10]!==s||e[11]!==l?(o=a.jsx("input",{type:"text",value:l,onChange:s,onKeyDown:d,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[7]=i,e[8]=d,e[9]=p,e[10]=s,e[11]=l,e[12]=o):o=e[12];let r;return e[13]!==t||e[14]!==n||e[15]!==o?(r=a.jsxs("label",{className:t,children:[n,o]}),e[13]=t,e[14]=n,e[15]=o,e[16]=r):r=e[16],r}export{S};
@@ -1 +1 @@
1
- import{c as j,b as y,j as s,E as $,r as v,y as k,B as _,t as w}from"./index-B0RQtdH5.js";import{i as F}from"./AlertCircle-1A66ChZ8.js";import{s as E}from"./Plus-CcqTJsL_.js";import{s as B}from"./User01-BtnxEsNS.js";import{t as L}from"./Users01-CKlZ0ifZ.js";import{e as O,d as R,a as A,b as I,h as q,c as V}from"./dialog-D_lGSAHx.js";import{I as z}from"./input-CN-3NSyw.js";import{L as N}from"./label-DSt8qQsi.js";import{S as H,a as G,b as J,c as K,d as D}from"./select-0xPUH3tg.js";import{S as M}from"./skeleton-BxHgUQPE.js";import{T as Q}from"./textarea-BqJT-S0J.js";import{P as C}from"./index-CqaVlqfp.js";import{c as U}from"./settings-section-C1MvjHVP.js";import{u as W,a as X}from"./use-secrets-BStRdsts.js";import{R as Y}from"./require-capability-D3Qh2z8-.js";import"./X-RK8h6Yen.js";import"./tooltip-CQmJ9yxt.js";import"./Check-BGqmqBTw.js";import"./ChevronDown-C_pYLdFg.js";import"./ChevronUp-tGKH4rDz.js";import"./sidebar-D6warR-n.js";import"./LayoutLeft-gC7wddTz.js";import"./use-mobile-BbKshr4o.js";import"./card-DMPxv-95.js";import"./ArrowUpRight-pDFVKdFq.js";import"./studio-tools-DpmUpHCO.js";import"./use-capability-vZd78wKb.js";import"./access-gate-DXuZmGoo.js";import"./capability-load-error-Cn1k6YHy.js";function Z(t){const e=j.c(6),{error:r}=t,i=y();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(F,{size:16}),e[0]=c):c=e[0];let n;e[1]!==r.message||e[2]!==i?(n=i("settings.secrets.failedToLoadError",{error:r.message}),e[1]=r.message,e[2]=i,e[3]=n):n=e[3];let l;return e[4]!==n?(l=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,s.jsx("span",{className:"text-sm font-medium",children:n})]}),e[4]=n,e[5]=l):l=e[5],l}function ee(t){const e=j.c(8),{scope:r}=t,i=y(),c=r==="user"?B:L;let n;e[0]!==r||e[1]!==i?(n=i(r==="user"?"settings.secrets.scopePrivate":"settings.secrets.scopeOrganization"),e[0]=r,e[1]=i,e[2]=n):n=e[2];const l=n;let o;e[3]!==c?(o=s.jsx(c,{size:12}),e[3]=c,e[4]=o):o=e[4];let a;return e[5]!==l||e[6]!==o?(a=s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[o,l]}),e[5]=l,e[6]=o,e[7]=a):a=e[7],a}function T(t){const e=j.c(20),{secret:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(k,{size:16,className:"text-muted-foreground"})}),e[0]=i):i=e[0];let c;e[1]!==r.name?(c=s.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=c):c=e[2];let n;e[3]!==r.scope?(n=s.jsx(ee,{scope:r.scope}),e[3]=r.scope,e[4]=n):n=e[4];let l;e[5]!==c||e[6]!==n?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[c,n]}),e[5]=c,e[6]=n,e[7]=l):l=e[7];let o;e[8]!==r.description?(o=r.description?s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=o):o=e[9];let a;e[10]!==l||e[11]!==o?(a=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[i,s.jsxs("div",{className:"min-w-0",children:[l,o]})]}),e[10]=l,e[11]=o,e[12]=a):a=e[12];let u;e[13]!==r.createdAt?(u=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=u):u=e[14];let d;e[15]!==u?(d=s.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:u}),e[15]=u,e[16]=d):d=e[16];let m;return e[17]!==a||e[18]!==d?(m=s.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[a,d]}),e[17]=a,e[18]=d,e[19]=m):m=e[19],m}function te(t){const e=j.c(21),{onCreate:r}=t,i=y();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(k,{size:20,className:"text-muted-foreground"})}),e[0]=c):c=e[0];let n;e[1]!==i?(n=i("settings.secrets.emptyTitle"),e[1]=i,e[2]=n):n=e[2];let l;e[3]!==n?(l=s.jsx("p",{className:"font-medium text-sm",children:n}),e[3]=n,e[4]=l):l=e[4];let o;e[5]!==i?(o=i("settings.secrets.emptyDescription"),e[5]=i,e[6]=o):o=e[6];let a;e[7]!==o?(a=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:o}),e[7]=o,e[8]=a):a=e[8];let u;e[9]!==l||e[10]!==a?(u=s.jsxs("div",{children:[l,a]}),e[9]=l,e[10]=a,e[11]=u):u=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(E,{size:14}),e[12]=d):d=e[12];let m;e[13]!==i?(m=i("settings.secrets.newSecret"),e[13]=i,e[14]=m):m=e[14];let p;e[15]!==r||e[16]!==m?(p=s.jsxs(_,{onClick:r,size:"sm",className:"mt-2",children:[d,m]}),e[15]=r,e[16]=m,e[17]=p):p=e[17];let x;return e[18]!==u||e[19]!==p?(x=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,u,p]}),e[18]=u,e[19]=p,e[20]=x):x=e[20],x}function P({open:t,onOpenChange:e}){const r=y(),[i,c]=v.useState("organization"),[n,l]=v.useState(""),[o,a]=v.useState(""),[u,d]=v.useState(""),m=X();function p(){c("organization"),l(""),a(""),d("")}function x(){p(),e(!1)}async function g(f){if(f.preventDefault(),!(!n.trim()||!o))try{await m.mutateAsync({scope:i,name:n.trim(),value:o,description:u.trim()||void 0}),w.success(r("settings.secrets.secretCreated",{name:n.trim()})),x()}catch(h){w.error(h instanceof Error?h.message:r("settings.secrets.failedToCreateSecret"))}}return s.jsx(O,{open:t,onOpenChange:f=>{f?e(f):x()},children:s.jsxs(R,{className:"sm:max-w-lg",children:[s.jsxs(A,{children:[s.jsx(I,{children:r("settings.secrets.newSecretTitle")}),s.jsx(q,{children:r("settings.secrets.newSecretDescription")})]}),s.jsxs("form",{onSubmit:g,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(N,{htmlFor:"secret-scope",children:r("settings.secrets.scopeLabel")}),s.jsxs(H,{value:i,onValueChange:f=>c(f),children:[s.jsx(G,{id:"secret-scope",children:s.jsx(J,{})}),s.jsxs(K,{children:[s.jsx(D,{value:"organization",children:r("settings.secrets.scopeOrganizationDescription")}),s.jsx(D,{value:"user",children:r("settings.secrets.scopePrivateDescription")})]})]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(N,{htmlFor:"secret-name",children:r("settings.secrets.nameLabel")}),s.jsx(z,{id:"secret-name",value:n,onChange:f=>l(f.target.value),placeholder:r("settings.secrets.namePlaceholder"),autoComplete:"off",required:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:r("settings.secrets.nameHelp")})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(N,{htmlFor:"secret-value",children:r("settings.secrets.valueLabel")}),s.jsx(z,{id:"secret-value",type:"password",value:o,onChange:f=>a(f.target.value),autoComplete:"new-password",required:!0})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(N,{htmlFor:"secret-description",children:r("settings.secrets.descriptionLabel")}),s.jsx(Q,{id:"secret-description",value:u,onChange:f=>d(f.target.value),rows:2,placeholder:r("settings.secrets.descriptionPlaceholder")})]}),s.jsxs(V,{children:[s.jsx(_,{type:"button",variant:"outline",onClick:x,disabled:m.isPending,children:r("settings.secrets.cancelButton")}),s.jsx(_,{type:"submit",disabled:m.isPending||!n.trim()||!o,children:m.isPending?r("settings.secrets.creatingButton"):r("settings.secrets.createButton")})]})]})]})})}function se(){const t=j.c(30),e=y(),r=W(),[i,c]=v.useState(!1);if(r.length===0){let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(te,{onCreate:()=>c(!0)}),t[0]=d):d=t[0];let m;return t[1]!==i?(m=s.jsxs(s.Fragment,{children:[d,s.jsx(P,{open:i,onOpenChange:c})]}),t[1]=i,t[2]=m):m=t[2],m}let n,l,o;if(t[3]!==r||t[4]!==e){const d=r.filter(ce),m=r.filter(ie),p=r.length===1?"settings.secrets.secretsCountSingular":"settings.secrets.secretsCountPlural";let x;t[8]!==r.length||t[9]!==e||t[10]!==p?(x=e(p,{count:r.length}),t[8]=r.length,t[9]=e,t[10]=p,t[11]=x):x=t[11];let g;t[12]!==x?(g=s.jsx("p",{className:"text-sm text-muted-foreground",children:x}),t[12]=x,t[13]=g):g=t[13];let f;t[14]===Symbol.for("react.memo_cache_sentinel")?(f=()=>c(!0),t[14]=f):f=t[14];let h;t[15]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(E,{size:14}),t[15]=h):h=t[15];let b;t[16]!==e?(b=e("settings.secrets.newSecret"),t[16]=e,t[17]=b):b=t[17];let S;t[18]!==b?(S=s.jsxs(_,{onClick:f,size:"sm",children:[h,b]}),t[18]=b,t[19]=S):S=t[19],t[20]!==g||t[21]!==S?(n=s.jsxs("div",{className:"flex items-center justify-between",children:[g,S]}),t[20]=g,t[21]=S,t[22]=n):n=t[22],l=d.length>0?s.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionOrganization")}),s.jsx("div",{children:d.map(ne)})]}):null,o=m.length>0?s.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionPrivate")}),s.jsx("div",{children:m.map(re)})]}):null,t[3]=r,t[4]=e,t[5]=n,t[6]=l,t[7]=o}else n=t[5],l=t[6],o=t[7];let a;t[23]!==i?(a=s.jsx(P,{open:i,onOpenChange:c}),t[23]=i,t[24]=a):a=t[24];let u;return t[25]!==n||t[26]!==l||t[27]!==o||t[28]!==a?(u=s.jsxs(s.Fragment,{children:[n,l,o,a]}),t[25]=n,t[26]=l,t[27]=o,t[28]=a,t[29]=u):u=t[29],u}function re(t){return s.jsx(T,{secret:t},t.id)}function ne(t){return s.jsx(T,{secret:t},t.id)}function ie(t){return t.scope==="user"}function ce(t){return t.scope==="organization"}function le(){const t=j.c(7),e=y();let r;t[0]!==e?(r=e("settings.nav.secrets"),t[0]=e,t[1]=r):r=t[1];let i;t[2]!==r?(i=s.jsx(C.Title,{children:r}),t[2]=r,t[3]=i):i=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx($,{fallback:oe,children:s.jsx(v.Suspense,{fallback:s.jsx(M,{className:"h-32 w-full"}),children:s.jsx(se,{})})}),t[4]=c):c=t[4];let n;return t[5]!==i?(n=s.jsx(C,{children:s.jsx(C.Content,{children:s.jsx(C.Body,{children:s.jsxs(U,{children:[i,c]})})})}),t[5]=i,t[6]=n):n=t[6],n}function oe(t){const{error:e}=t;return s.jsx(Z,{error:e??new Error("Failed to load secrets")})}function Re(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Y,{capability:"secrets:manage",area:"secrets",children:s.jsx(le,{})}),t[0]=e):e=t[0],e}export{Re as default};
1
+ import{c as j,b as y,j as s,E as $,r as v,y as k,B as _,t as w}from"./index-dh0u4IqP.js";import{i as F}from"./AlertCircle-NIgamkG1.js";import{s as E}from"./Plus-BeKip_ti.js";import{s as B}from"./User01-Ce4Fl6PE.js";import{t as L}from"./Users01-C5hyD2dw.js";import{e as O,d as R,a as A,b as I,h as q,c as V}from"./dialog-XZdfEVkH.js";import{I as z}from"./input-CjE2QrUF.js";import{L as N}from"./label-BYk5h4ou.js";import{S as H,a as G,b as J,c as K,d as D}from"./select-KBOQqb5b.js";import{S as M}from"./skeleton-BwaQyECl.js";import{T as Q}from"./textarea-kMyew1mY.js";import{P as C}from"./index-CUMFdB46.js";import{c as U}from"./settings-section-uyvyi36n.js";import{u as W,a as X}from"./use-secrets-Ct36JmLs.js";import{R as Y}from"./require-capability-k_aaNrmG.js";import"./X-lCHRulQP.js";import"./tooltip-CCAgnlkx.js";import"./Check-BjlTRmvp.js";import"./ChevronDown-BansJwMw.js";import"./ChevronUp-CBwQlhRH.js";import"./sidebar-DYOHjP73.js";import"./LayoutLeft-BSvhSrEB.js";import"./use-mobile-iNxeOMfx.js";import"./card-Y4Td6_qp.js";import"./ArrowUpRight-EJcVnEQQ.js";import"./studio-tools-rxH0R7lt.js";import"./use-capability-BG5qAt9K.js";import"./access-gate-CTxljPxC.js";import"./capability-load-error-By5RHmfh.js";function Z(t){const e=j.c(6),{error:r}=t,i=y();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(F,{size:16}),e[0]=c):c=e[0];let n;e[1]!==r.message||e[2]!==i?(n=i("settings.secrets.failedToLoadError",{error:r.message}),e[1]=r.message,e[2]=i,e[3]=n):n=e[3];let l;return e[4]!==n?(l=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,s.jsx("span",{className:"text-sm font-medium",children:n})]}),e[4]=n,e[5]=l):l=e[5],l}function ee(t){const e=j.c(8),{scope:r}=t,i=y(),c=r==="user"?B:L;let n;e[0]!==r||e[1]!==i?(n=i(r==="user"?"settings.secrets.scopePrivate":"settings.secrets.scopeOrganization"),e[0]=r,e[1]=i,e[2]=n):n=e[2];const l=n;let o;e[3]!==c?(o=s.jsx(c,{size:12}),e[3]=c,e[4]=o):o=e[4];let a;return e[5]!==l||e[6]!==o?(a=s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[o,l]}),e[5]=l,e[6]=o,e[7]=a):a=e[7],a}function T(t){const e=j.c(20),{secret:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(k,{size:16,className:"text-muted-foreground"})}),e[0]=i):i=e[0];let c;e[1]!==r.name?(c=s.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=c):c=e[2];let n;e[3]!==r.scope?(n=s.jsx(ee,{scope:r.scope}),e[3]=r.scope,e[4]=n):n=e[4];let l;e[5]!==c||e[6]!==n?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[c,n]}),e[5]=c,e[6]=n,e[7]=l):l=e[7];let o;e[8]!==r.description?(o=r.description?s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=o):o=e[9];let a;e[10]!==l||e[11]!==o?(a=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[i,s.jsxs("div",{className:"min-w-0",children:[l,o]})]}),e[10]=l,e[11]=o,e[12]=a):a=e[12];let u;e[13]!==r.createdAt?(u=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=u):u=e[14];let d;e[15]!==u?(d=s.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:u}),e[15]=u,e[16]=d):d=e[16];let m;return e[17]!==a||e[18]!==d?(m=s.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[a,d]}),e[17]=a,e[18]=d,e[19]=m):m=e[19],m}function te(t){const e=j.c(21),{onCreate:r}=t,i=y();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(k,{size:20,className:"text-muted-foreground"})}),e[0]=c):c=e[0];let n;e[1]!==i?(n=i("settings.secrets.emptyTitle"),e[1]=i,e[2]=n):n=e[2];let l;e[3]!==n?(l=s.jsx("p",{className:"font-medium text-sm",children:n}),e[3]=n,e[4]=l):l=e[4];let o;e[5]!==i?(o=i("settings.secrets.emptyDescription"),e[5]=i,e[6]=o):o=e[6];let a;e[7]!==o?(a=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:o}),e[7]=o,e[8]=a):a=e[8];let u;e[9]!==l||e[10]!==a?(u=s.jsxs("div",{children:[l,a]}),e[9]=l,e[10]=a,e[11]=u):u=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(E,{size:14}),e[12]=d):d=e[12];let m;e[13]!==i?(m=i("settings.secrets.newSecret"),e[13]=i,e[14]=m):m=e[14];let p;e[15]!==r||e[16]!==m?(p=s.jsxs(_,{onClick:r,size:"sm",className:"mt-2",children:[d,m]}),e[15]=r,e[16]=m,e[17]=p):p=e[17];let x;return e[18]!==u||e[19]!==p?(x=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,u,p]}),e[18]=u,e[19]=p,e[20]=x):x=e[20],x}function P({open:t,onOpenChange:e}){const r=y(),[i,c]=v.useState("organization"),[n,l]=v.useState(""),[o,a]=v.useState(""),[u,d]=v.useState(""),m=X();function p(){c("organization"),l(""),a(""),d("")}function x(){p(),e(!1)}async function g(f){if(f.preventDefault(),!(!n.trim()||!o))try{await m.mutateAsync({scope:i,name:n.trim(),value:o,description:u.trim()||void 0}),w.success(r("settings.secrets.secretCreated",{name:n.trim()})),x()}catch(h){w.error(h instanceof Error?h.message:r("settings.secrets.failedToCreateSecret"))}}return s.jsx(O,{open:t,onOpenChange:f=>{f?e(f):x()},children:s.jsxs(R,{className:"sm:max-w-lg",children:[s.jsxs(A,{children:[s.jsx(I,{children:r("settings.secrets.newSecretTitle")}),s.jsx(q,{children:r("settings.secrets.newSecretDescription")})]}),s.jsxs("form",{onSubmit:g,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(N,{htmlFor:"secret-scope",children:r("settings.secrets.scopeLabel")}),s.jsxs(H,{value:i,onValueChange:f=>c(f),children:[s.jsx(G,{id:"secret-scope",children:s.jsx(J,{})}),s.jsxs(K,{children:[s.jsx(D,{value:"organization",children:r("settings.secrets.scopeOrganizationDescription")}),s.jsx(D,{value:"user",children:r("settings.secrets.scopePrivateDescription")})]})]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(N,{htmlFor:"secret-name",children:r("settings.secrets.nameLabel")}),s.jsx(z,{id:"secret-name",value:n,onChange:f=>l(f.target.value),placeholder:r("settings.secrets.namePlaceholder"),autoComplete:"off",required:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:r("settings.secrets.nameHelp")})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(N,{htmlFor:"secret-value",children:r("settings.secrets.valueLabel")}),s.jsx(z,{id:"secret-value",type:"password",value:o,onChange:f=>a(f.target.value),autoComplete:"new-password",required:!0})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(N,{htmlFor:"secret-description",children:r("settings.secrets.descriptionLabel")}),s.jsx(Q,{id:"secret-description",value:u,onChange:f=>d(f.target.value),rows:2,placeholder:r("settings.secrets.descriptionPlaceholder")})]}),s.jsxs(V,{children:[s.jsx(_,{type:"button",variant:"outline",onClick:x,disabled:m.isPending,children:r("settings.secrets.cancelButton")}),s.jsx(_,{type:"submit",disabled:m.isPending||!n.trim()||!o,children:m.isPending?r("settings.secrets.creatingButton"):r("settings.secrets.createButton")})]})]})]})})}function se(){const t=j.c(30),e=y(),r=W(),[i,c]=v.useState(!1);if(r.length===0){let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(te,{onCreate:()=>c(!0)}),t[0]=d):d=t[0];let m;return t[1]!==i?(m=s.jsxs(s.Fragment,{children:[d,s.jsx(P,{open:i,onOpenChange:c})]}),t[1]=i,t[2]=m):m=t[2],m}let n,l,o;if(t[3]!==r||t[4]!==e){const d=r.filter(ce),m=r.filter(ie),p=r.length===1?"settings.secrets.secretsCountSingular":"settings.secrets.secretsCountPlural";let x;t[8]!==r.length||t[9]!==e||t[10]!==p?(x=e(p,{count:r.length}),t[8]=r.length,t[9]=e,t[10]=p,t[11]=x):x=t[11];let g;t[12]!==x?(g=s.jsx("p",{className:"text-sm text-muted-foreground",children:x}),t[12]=x,t[13]=g):g=t[13];let f;t[14]===Symbol.for("react.memo_cache_sentinel")?(f=()=>c(!0),t[14]=f):f=t[14];let h;t[15]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(E,{size:14}),t[15]=h):h=t[15];let b;t[16]!==e?(b=e("settings.secrets.newSecret"),t[16]=e,t[17]=b):b=t[17];let S;t[18]!==b?(S=s.jsxs(_,{onClick:f,size:"sm",children:[h,b]}),t[18]=b,t[19]=S):S=t[19],t[20]!==g||t[21]!==S?(n=s.jsxs("div",{className:"flex items-center justify-between",children:[g,S]}),t[20]=g,t[21]=S,t[22]=n):n=t[22],l=d.length>0?s.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionOrganization")}),s.jsx("div",{children:d.map(ne)})]}):null,o=m.length>0?s.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionPrivate")}),s.jsx("div",{children:m.map(re)})]}):null,t[3]=r,t[4]=e,t[5]=n,t[6]=l,t[7]=o}else n=t[5],l=t[6],o=t[7];let a;t[23]!==i?(a=s.jsx(P,{open:i,onOpenChange:c}),t[23]=i,t[24]=a):a=t[24];let u;return t[25]!==n||t[26]!==l||t[27]!==o||t[28]!==a?(u=s.jsxs(s.Fragment,{children:[n,l,o,a]}),t[25]=n,t[26]=l,t[27]=o,t[28]=a,t[29]=u):u=t[29],u}function re(t){return s.jsx(T,{secret:t},t.id)}function ne(t){return s.jsx(T,{secret:t},t.id)}function ie(t){return t.scope==="user"}function ce(t){return t.scope==="organization"}function le(){const t=j.c(7),e=y();let r;t[0]!==e?(r=e("settings.nav.secrets"),t[0]=e,t[1]=r):r=t[1];let i;t[2]!==r?(i=s.jsx(C.Title,{children:r}),t[2]=r,t[3]=i):i=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx($,{fallback:oe,children:s.jsx(v.Suspense,{fallback:s.jsx(M,{className:"h-32 w-full"}),children:s.jsx(se,{})})}),t[4]=c):c=t[4];let n;return t[5]!==i?(n=s.jsx(C,{children:s.jsx(C.Content,{children:s.jsx(C.Body,{children:s.jsxs(U,{children:[i,c]})})})}),t[5]=i,t[6]=n):n=t[6],n}function oe(t){const{error:e}=t;return s.jsx(Z,{error:e??new Error("Failed to load secrets")})}function Re(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Y,{capability:"secrets:manage",area:"secrets",children:s.jsx(le,{})}),t[0]=e):e=t[0],e}export{Re as default};