decocms 4.61.2 → 4.62.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.
- package/dist/client/assets/{AlertCircle-BsA2wZmN.js → AlertCircle-pDwFaZ69.js} +1 -1
- package/dist/client/assets/{AreaChart-BHEk1VG5.js → AreaChart-CUV8xbg8.js} +1 -1
- package/dist/client/assets/{ArrowUp-CDnEKV2Y.js → ArrowUp-DtY9ye1M.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DdPCnlNm.js → ArrowUpRight-BF8RC7lQ.js} +1 -1
- package/dist/client/assets/{Check-CcLLJc-z.js → Check-c3mV_Uni.js} +1 -1
- package/dist/client/assets/{CheckCircle-lXciCGfG.js → CheckCircle-CE_q_EWl.js} +1 -1
- package/dist/client/assets/{ChevronDown-BmFaSDo8.js → ChevronDown-Be1kUurm.js} +1 -1
- package/dist/client/assets/{ChevronRight-C3Tgk-3m.js → ChevronRight-86cbncTU.js} +1 -1
- package/dist/client/assets/{ChevronUp-Dew3RmKl.js → ChevronUp-7vDXTQHH.js} +1 -1
- package/dist/client/assets/{Circle-C_fdyhr8.js → Circle-Jj2lB_OB.js} +1 -1
- package/dist/client/assets/{Copy01-b3lIb5yu.js → Copy01-bnpfrlf8.js} +1 -1
- package/dist/client/assets/{DotsVertical-CK1a4mKj.js → DotsVertical-Cw_RGd0K.js} +1 -1
- package/dist/client/assets/{Eye-DM8bmzm7.js → Eye-DSKes5cc.js} +1 -1
- package/dist/client/assets/{FilterLines-DCNZa1GS.js → FilterLines-AFo6zz8G.js} +1 -1
- package/dist/client/assets/{Globe01-B6kdhpV9.js → Globe01-CINqduC_.js} +1 -1
- package/dist/client/assets/{Globe04-CGLGspo5.js → Globe04-Df4bCIam.js} +1 -1
- package/dist/client/assets/{HardDrive-CR6Rs-a1.js → HardDrive-C9RJVCTC.js} +1 -1
- package/dist/client/assets/{Key01-1r4YrQER.js → Key01-BufYrbpv.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DvNM8qhm.js → LayoutLeft-Dg-hdc1o.js} +1 -1
- package/dist/client/assets/{LinkExternal01-Ck4lryDE.js → LinkExternal01-jNsZTUJe.js} +1 -1
- package/dist/client/assets/{List-DfPIAPM_.js → List-jTag997N.js} +1 -1
- package/dist/client/assets/{Loading02-Dx-xiZND.js → Loading02-DXivv_GE.js} +1 -1
- package/dist/client/assets/{Monitor01-D_DrBwt_.js → Monitor01-Cgb6dKKW.js} +1 -1
- package/dist/client/assets/{Package-CV2Q9Uup.js → Package-Bm7E2eK0.js} +1 -1
- package/dist/client/assets/{Palette-BY5BmUDa.js → Palette-D0cmCBJm.js} +1 -1
- package/dist/client/assets/{Play-Ci1OqtIO.js → Play-DL5iVtNY.js} +1 -1
- package/dist/client/assets/{Plus-Cgq7ON9K.js → Plus-SxhLmH-g.js} +1 -1
- package/dist/client/assets/{SearchLg-2as_l8YT.js → SearchLg-DalS_9no.js} +1 -1
- package/dist/client/assets/{SearchMd-ZfoTl6vw.js → SearchMd-DXMQuWHS.js} +1 -1
- package/dist/client/assets/{Settings02-CS2jOfO5.js → Settings02-Ci6H3sb0.js} +1 -1
- package/dist/client/assets/{Shield01-C6TdRfmI.js → Shield01-CFnvQppZ.js} +1 -1
- package/dist/client/assets/{Star01-2DHf7kTZ.js → Star01-ZuQ9gpI3.js} +1 -1
- package/dist/client/assets/{Stars01-BEHbN5c3.js → Stars01-MX3VUC0h.js} +1 -1
- package/dist/client/assets/{Stars02-HLp9q8iP.js → Stars02-ClT22kUl.js} +1 -1
- package/dist/client/assets/{Sun-ByaEjJ0N.js → Sun-C2eqMrg3.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-ilLzkPr_.js → SwitchHorizontal01-CTbgmfyn.js} +1 -1
- package/dist/client/assets/{Tool01-DVCGutKV.js → Tool01-CcmA_w81.js} +1 -1
- package/dist/client/assets/{Tool02-CSTMjTef.js → Tool02-DsdesO-0.js} +1 -1
- package/dist/client/assets/{Trash01--uX5q_ti.js → Trash01-RuXWiql6.js} +1 -1
- package/dist/client/assets/{TrendUp01-acR-ekUr.js → TrendUp01-RmaL7vVA.js} +1 -1
- package/dist/client/assets/{Upload01-BaheeKQP.js → Upload01-t4JMvfO4.js} +1 -1
- package/dist/client/assets/{User01-5hu8D3_O.js → User01-nY_0gSR5.js} +1 -1
- package/dist/client/assets/{Users01-Dh5E4dqf.js → Users01-COP9ABdE.js} +1 -1
- package/dist/client/assets/{Users03-tGwfKVJc.js → Users03-CwOsvMmx.js} +1 -1
- package/dist/client/assets/{X-OFSHASit.js → X-82Zaa9wO.js} +1 -1
- package/dist/client/assets/{XCircle-D3cI1Aep.js → XCircle-DFVEpL7j.js} +1 -1
- package/dist/client/assets/{XClose-D5Ra7e-f.js → XClose-DGRyO79b.js} +1 -1
- package/dist/client/assets/{Zap-CgjpaG4V.js → Zap-DGilRzov.js} +1 -1
- package/dist/client/assets/{ZapSquare-Dzb50Gix.js → ZapSquare-x5bylaAn.js} +1 -1
- package/dist/client/assets/{ZoomOut-DYAXxr_v.js → ZoomOut-d0pU1jsr.js} +1 -1
- package/dist/client/assets/{access-gate-B4XS-sin.js → access-gate-B9Uqf_RZ.js} +1 -1
- package/dist/client/assets/{add-section-modal-2QsV6sh6.js → add-section-modal-F3LoJMj-.js} +1 -1
- package/dist/client/assets/agent-icon-Bx7GZZkT.js +1 -0
- package/dist/client/assets/agents-list-DA2O4yFI.js +1 -0
- package/dist/client/assets/ai-providers-_h8FzskN.js +1 -0
- package/dist/client/assets/{alert-DBWDLZgp.js → alert-D7vvtYHx.js} +1 -1
- package/dist/client/assets/{alert-dialog-Bd5XLC3F.js → alert-dialog-BbUTua7Y.js} +3 -3
- package/dist/client/assets/{app-editor-CC9wPnl_.js → app-editor-Ba6EJE8k.js} +1 -1
- package/dist/client/assets/{auth-D_bm0-t3.js → auth-Cduc78Mk.js} +1 -1
- package/dist/client/assets/{auth-catchall-CDVAqOkY.js → auth-catchall-BiGQzMvA.js} +1 -1
- package/dist/client/assets/auth-entry-B1IjK16Y.js +1 -0
- package/dist/client/assets/{auth-split-layout-DB8qmgLK.js → auth-split-layout-B5WaIo2U.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-ClCvWDci.js → authenticate-and-persist-oauth-Bsjhlz6M.js} +1 -1
- package/dist/client/assets/{automation-list-row-ByoN-o6y.js → automation-list-row-tfqwgW_l.js} +1 -1
- package/dist/client/assets/{automation-runs-Y9TSuy3F.js → automation-runs-HchqpNoW.js} +1 -1
- package/dist/client/assets/automations-3g-k57eu.js +1 -0
- package/dist/client/assets/{autosend-qB5BaOSA.js → autosend-CFSFemh9.js} +1 -1
- package/dist/client/assets/{avatar-DOYkgu8W.js → avatar-ChSwYwdc.js} +1 -1
- package/dist/client/assets/{badge-BMMjntMn.js → badge-BDCVlL_X.js} +1 -1
- package/dist/client/assets/{block-document-CCtmnkDi.js → block-document-CwHUDj3Z.js} +1 -1
- package/dist/client/assets/brand-context-KxYFeM0J.js +1 -0
- package/dist/client/assets/{buckets-B22IEfKD.js → buckets-BB9qHXCG.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-C3pu2Jik.js → bulk-category-panel-mDoc713s.js} +1 -1
- package/dist/client/assets/{calendar-Io_vhk-a.js → calendar-DkErgVju.js} +1 -1
- package/dist/client/assets/capability-load-error-C5KrMr5A.js +1 -0
- package/dist/client/assets/{card-Bc92PJFP.js → card-CZ_4AnzZ.js} +1 -1
- package/dist/client/assets/{category-editor-C1FxzSFF.js → category-editor-CoE1JSlR.js} +1 -1
- package/dist/client/assets/{chat-context-Awe2cIoY.js → chat-context-DHiffp4D.js} +6 -6
- package/dist/client/assets/{checkbox-B-y-IHdE.js → checkbox-B0y92ybh.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BlIIxKPd.js → cli-auth-success-BJQaPA_u.js} +1 -1
- package/dist/client/assets/collection-detail-B85L8fXv.js +1 -0
- package/dist/client/assets/{collection-display-button-BVhQtAEp.js → collection-display-button-CTkls5Hq.js} +1 -1
- package/dist/client/assets/{collection-search-DSP3ov6A.js → collection-search-B1ZoXYDP.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CeR2zvlX.js → collection-table-wrapper-CzOELqST.js} +1 -1
- package/dist/client/assets/{collection-tabs-PTC62n_G.js → collection-tabs-DSyyuCu8.js} +1 -1
- package/dist/client/assets/{command-DzGwZa9g.js → command-NscuxjlL.js} +1 -1
- package/dist/client/assets/commerce-onboarding-DS2bNsVf.js +1 -0
- package/dist/client/assets/{connect-desktop-dialog-DiutLBhU.js → connect-desktop-dialog-C_zkxzg2.js} +1 -1
- package/dist/client/assets/connection-card-DgJ4fCkV.js +1 -0
- package/dist/client/assets/connection-detail-BHWNvMoI.js +1 -0
- package/dist/client/assets/{connection-form-helpers-POWe2kJ-.js → connection-form-helpers-CoPiWrjw.js} +1 -1
- package/dist/client/assets/connections-ByyzNSeZ.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-CJtSg3wj.js → decopilot-sse-pool-jzNdhqzZ.js} +1 -1
- package/dist/client/assets/dialog-BxiPyolh.js +1 -0
- package/dist/client/assets/domain-settings-DixzI7vw.js +1 -0
- package/dist/client/assets/{drawer-Ck_Oak77.js → drawer-HMFyJ4Dn.js} +1 -1
- package/dist/client/assets/{dropdown-menu-C9SSwIby.js → dropdown-menu-B8LX4IYo.js} +1 -1
- package/dist/client/assets/{empty-state-DD15-E7x.js → empty-state-BJyyJcI7.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Di6SAuY0.js → extract-connection-data-CgMMiKb9.js} +1 -1
- package/dist/client/assets/{file-explorer-CMqCjVts.js → file-explorer-B2mELjEV.js} +2 -2
- package/dist/client/assets/{file-type-icon-CuakGACj.js → file-type-icon-aF4rioSK.js} +1 -1
- package/dist/client/assets/{files-DrQIRu5a.js → files-DlatlTEv.js} +1 -1
- package/dist/client/assets/{form-YJrSMpNL.js → form-NWTw1_w9.js} +1 -1
- package/dist/client/assets/general-B6MHlXUW.js +1 -0
- package/dist/client/assets/github-repo-picker-BgT_NiIP.js +1 -0
- package/dist/client/assets/{hooks-GnFkomrq.js → hooks-7RE64ble.js} +1 -1
- package/dist/client/assets/index-6OJYzM5S.js +1 -0
- package/dist/client/assets/{index-DS3hrf0F.js → index-BQNtvMv8.js} +1 -1
- package/dist/client/assets/index-Bn17GDJi.js +1 -0
- package/dist/client/assets/{index-0yvnZiwb.js → index-C6SqXYAf.js} +1 -1
- package/dist/client/assets/{index-Cim2j5YD.js → index-CGtkbkWC.js} +1 -1
- package/dist/client/assets/{index-CCnsgP9d.js → index-CNXl1ql2.js} +5 -5
- package/dist/client/assets/{index-Dv19SgJH.js → index-CPLWHNIg.js} +5 -5
- package/dist/client/assets/{index-CsZhMKFM.js → index-CtlgC1KW.js} +26 -26
- package/dist/client/assets/{index-Cyr1IOqy.js → index-Cv4TIpz2.js} +1 -1
- package/dist/client/assets/index-D6W0Zja4.css +1 -0
- package/dist/client/assets/index-DX7CG04Y.js +1 -0
- package/dist/client/assets/index-Dz-SEkbI.js +1 -0
- package/dist/client/assets/{index-DPzJsdBC.js → index-FOhB290E.js} +1 -1
- package/dist/client/assets/{index-MwzluG1w.js → index-Fk54aBQb.js} +1 -1
- package/dist/client/assets/{index-redirect-Hp_EA6DJ.js → index-redirect-D_1i3wgr.js} +1 -1
- package/dist/client/assets/{index-BraRl60q.js → index-w9OsdEvg.js} +1 -1
- package/dist/client/assets/{input-D5ccsU_1.js → input-D0-jk8XC.js} +1 -1
- package/dist/client/assets/{integration-icon-6pGkEdul.js → integration-icon-BxCXFWwF.js} +1 -1
- package/dist/client/assets/invite-member-dialog-CczkEEVJ.js +3 -0
- package/dist/client/assets/{label-BULuaMoF.js → label-CI8zXgUl.js} +1 -1
- package/dist/client/assets/{layout-BloKJFhD.js → layout-DsSv6cI0.js} +1 -1
- package/dist/client/assets/{login-Dzlh5qYT.js → login-vc557tVg.js} +1 -1
- package/dist/client/assets/{mcp-oauth-z9GFPjDo.js → mcp-oauth-Crm2yFws.js} +1 -1
- package/dist/client/assets/members-BriZzAKO.js +1 -0
- package/dist/client/assets/{monaco-editor-CiP0ChuC.js → monaco-editor-BSERZA56.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CLHK9ypI.js → monitoring-stats-row-Bzy4MOqt.js} +3 -3
- package/dist/client/assets/{oauth-callback-CdWGFVi8.js → oauth-callback-BweaHAfJ.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-qp9LO32T.js → oauth-callback-ai-provider-DGFuYZT6.js} +1 -1
- package/dist/client/assets/{onboarding-iL9ZeHnE.js → onboarding-CGfqD1Pb.js} +1 -1
- package/dist/client/assets/{org-install-ZxTYabEU.js → org-install-C4kxLg_g.js} +1 -1
- package/dist/client/assets/{org-layout-DWaUEBqs.js → org-layout-DzZAcdj6.js} +1 -1
- package/dist/client/assets/{organization-choice-5GYvmez0.js → organization-choice-D69Iyg_P.js} +1 -1
- package/dist/client/assets/{orgs-CRRA1WCm.js → orgs-CvM6zK17.js} +1 -1
- package/dist/client/assets/{page-seo-form-C4SLs6YG.js → page-seo-form-C8i2PCcW.js} +1 -1
- package/dist/client/assets/page-seo-sheet-Bj1PQ_T3.js +1 -0
- package/dist/client/assets/{popover-C5PoRwEk.js → popover-4SjKIFSf.js} +1 -1
- package/dist/client/assets/{post-editor-DQzYF8Ef.js → post-editor-DwhUQfz3.js} +1 -1
- package/dist/client/assets/{primitives-BEmjSMO9.js → primitives-IUnUzi8K.js} +1 -1
- package/dist/client/assets/profile-op77lWAk.js +1 -0
- package/dist/client/assets/project-app-view-Bw5vRwKV.js +1 -0
- package/dist/client/assets/record-editor-CO3ZgdGS.js +1 -0
- package/dist/client/assets/registry-DasK6zXw.js +2 -0
- package/dist/client/assets/{registry-layout-BDNmgEhN.js → registry-layout-DPozdEQJ.js} +4 -4
- package/dist/client/assets/{reports-C6ascunL.js → reports-AOzd79LO.js} +1 -1
- package/dist/client/assets/{require-capability-BjscC7QS.js → require-capability-BIrGCy6a.js} +1 -1
- package/dist/client/assets/{required-auth-layout-R2McgzF5.js → required-auth-layout-CQN5hr5X.js} +1 -1
- package/dist/client/assets/{reset-password-Fw4tx_9w.js → reset-password-DyAxea_4.js} +1 -1
- package/dist/client/assets/roles-Bmag3QoK.js +1 -0
- package/dist/client/assets/{search-input-BREJK7qA.js → search-input-DAhQOW8w.js} +1 -1
- package/dist/client/assets/secrets-Bca-yEgx.js +1 -0
- package/dist/client/assets/{sections-editor-CKmy6jCA.js → sections-editor-A9ozMN_I.js} +1 -1
- package/dist/client/assets/{select-CVMXwLRV.js → select-DymbSi1i.js} +1 -1
- package/dist/client/assets/{select-model-Cg3FzUNI.js → select-model-CBmm5efp.js} +1 -1
- package/dist/client/assets/self-tool-result-DQZF7wnw.js +1 -0
- package/dist/client/assets/{seo-editor-DVVtxnZN.js → seo-editor-D8BRx5cO.js} +1 -1
- package/dist/client/assets/settings-layout-BbrrKyAB.js +1 -0
- package/dist/client/assets/{settings-section-BYCtjEaG.js → settings-section-BorHlHtt.js} +1 -1
- package/dist/client/assets/{shell-controls-Daj0PZIQ.js → shell-controls-D4pwQUJp.js} +1 -1
- package/dist/client/assets/shell-layout-DSlq9QDA.js +1 -0
- package/dist/client/assets/sidebar-BGBaPTiJ.js +1 -0
- package/dist/client/assets/{skeleton-BZzqWIif.js → skeleton-Cs7umMol.js} +1 -1
- package/dist/client/assets/sso-CSY_I7_s.js +1 -0
- package/dist/client/assets/store-CbwbkmsP.js +1 -0
- package/dist/client/assets/store-registry-3IML_T0w.js +2 -0
- package/dist/client/assets/studio-tools-Dm4swbDJ.js +1 -0
- package/dist/client/assets/{switch-B36ltQ63.js → switch-DenJ-Rqp.js} +1 -1
- package/dist/client/assets/{table-CLRsCUXA.js → table-6yLqG5BG.js} +1 -1
- package/dist/client/assets/{tabs-BoNNus4B.js → tabs-B41R3KT7.js} +1 -1
- package/dist/client/assets/{textarea-DPLwPKZJ.js → textarea-DDx4ded2.js} +1 -1
- package/dist/client/assets/{toggle-group-DkGsY2u-.js → toggle-group-DxbzbSVL.js} +1 -1
- package/dist/client/assets/{toolbar-CedVmC1P.js → toolbar-Dw7sJZzm.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-5fStNBy9.js → toolbar-icon-button-DRu94yPg.js} +1 -1
- package/dist/client/assets/tools-list-gF6CK4rd.js +1 -0
- package/dist/client/assets/{tooltip-Cs5hng3q.js → tooltip-2S76Z1GN.js} +1 -1
- package/dist/client/assets/use-ai-providers-BRJFSGox.js +1 -0
- package/dist/client/assets/use-automations-CtMMZwGK.js +1 -0
- package/dist/client/assets/use-capability-Cr4AoWjX.js +1 -0
- package/dist/client/assets/{use-clock-tick-CB7NlnVZ.js → use-clock-tick-YishFSE2.js} +1 -1
- package/dist/client/assets/{use-collections-Cl7KVWNQ.js → use-collections-Bq6tf4lW.js} +1 -1
- package/dist/client/assets/use-connection-C0xfUPl-.js +1 -0
- package/dist/client/assets/{use-copy-B-pxrD6E.js → use-copy-D7Lvwi_8.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DPkT8FPW.js → use-create-virtual-mcp-CT3JpXjp.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-teletZQd.js → use-debounced-autosave-DnYuRWI8.js} +1 -1
- package/dist/client/assets/{use-debounced-value-ChKSUuxz.js → use-debounced-value-LiVhfciY.js} +1 -1
- package/dist/client/assets/use-deco-credits-DTpKn8hS.js +1 -0
- package/dist/client/assets/{use-decopilot-events-CWf9qNc0.js → use-decopilot-events-42PTdhf1.js} +1 -1
- package/dist/client/assets/use-delete-connection-CKLjJrR4.js +1 -0
- package/dist/client/assets/{use-deployment-admin-C3JCAXzA.js → use-deployment-admin-Cfv-0c-V.js} +1 -1
- package/dist/client/assets/use-file-configs-DRXMLwD-.js +1 -0
- package/dist/client/assets/use-infinite-scroll-BkP7H-cz.js +1 -0
- package/dist/client/assets/use-join-requests-l1azjTjY.js +1 -0
- package/dist/client/assets/{use-mcp-client-Bv8WGceO.js → use-mcp-client-8-W_7yBa.js} +4 -4
- package/dist/client/assets/{use-mcp-tools-_p3Gu3UX.js → use-mcp-tools-CUOQhfsg.js} +1 -1
- package/dist/client/assets/use-members-CynVAzPM.js +1 -0
- package/dist/client/assets/{use-mobile-DhhfLpzh.js → use-mobile-CcO0QCgb.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-DNjmGLp3.js +1 -0
- package/dist/client/assets/use-org-auth-client-mw0sCxV3.js +1 -0
- package/dist/client/assets/{use-org-sso-DDm0m5Eb.js → use-org-sso-BjHGhVgE.js} +1 -1
- package/dist/client/assets/use-organization-roles-Cjha62oV.js +1 -0
- package/dist/client/assets/use-organization-settings-B3aKfsZI.js +1 -0
- package/dist/client/assets/use-registry-connections-CVi0ypH7.js +1 -0
- package/dist/client/assets/use-secrets-C5knhQtS.js +1 -0
- package/dist/client/assets/use-status-sounds-C434uotZ.js +1 -0
- package/dist/client/assets/{use-view-mode-H6oFviHU.js → use-view-mode-BeALUlwT.js} +1 -1
- package/dist/client/assets/use-virtual-mcp-BjiOjpKa.js +1 -0
- package/dist/client/assets/useInfiniteQuery-C5v-SAtB.js +1 -0
- package/dist/client/assets/{useRouterState-DjtN_ggp.js → useRouterState-BRB-iA8I.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BeixZw8P.js +1 -0
- package/dist/client/assets/{users-CwhV7o0r.js → users-D2x-LE8o.js} +1 -1
- package/dist/client/assets/{variant-calendar-5liHDWH_.js → variant-calendar-BcqsqX_c.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DovE7i8d.js → view-mode-toggle-JDik54gp.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-icon-dPkJbbXq.js +0 -1
- package/dist/client/assets/agents-list-CBbQQUEx.js +0 -1
- package/dist/client/assets/ai-providers-CeevjV97.js +0 -1
- package/dist/client/assets/auth-entry-Bo3LWJI9.js +0 -1
- package/dist/client/assets/automations-DDTM3E3g.js +0 -1
- package/dist/client/assets/brand-context-Bkaj5nz3.js +0 -1
- package/dist/client/assets/capability-load-error-COzn8-Xb.js +0 -1
- package/dist/client/assets/collection-detail-CcnshY5k.js +0 -1
- package/dist/client/assets/commerce-onboarding-v6NmdNz5.js +0 -1
- package/dist/client/assets/connection-card-CXwWR_5h.js +0 -1
- package/dist/client/assets/connection-detail-B_tl4TZx.js +0 -1
- package/dist/client/assets/connections-C1NH7yoX.js +0 -1
- package/dist/client/assets/dialog-DZtdYFi_.js +0 -1
- package/dist/client/assets/domain-settings-C7CfCyw6.js +0 -1
- package/dist/client/assets/general-XFvP4tXw.js +0 -1
- package/dist/client/assets/github-repo-picker-VDMXf52q.js +0 -1
- package/dist/client/assets/index-CEI6wi5Z.js +0 -1
- package/dist/client/assets/index-DFCCfX3B.js +0 -1
- package/dist/client/assets/index-DKyQrM3l.js +0 -1
- package/dist/client/assets/index-DPKpPAQv.js +0 -1
- package/dist/client/assets/index-DhnTILyr.css +0 -1
- package/dist/client/assets/invite-member-dialog-DV_-RNy8.js +0 -3
- package/dist/client/assets/members-BfULkB51.js +0 -1
- package/dist/client/assets/page-seo-sheet-CqzS0lEJ.js +0 -1
- package/dist/client/assets/profile-Dh73-0Iy.js +0 -1
- package/dist/client/assets/project-app-view-KN05BOuo.js +0 -1
- package/dist/client/assets/record-editor-BGeMoeUP.js +0 -1
- package/dist/client/assets/registry-DGAgXfxF.js +0 -2
- package/dist/client/assets/roles-D6vLw9pS.js +0 -1
- package/dist/client/assets/secrets-B2rqgV3S.js +0 -1
- package/dist/client/assets/settings-layout-CS4A10kE.js +0 -1
- package/dist/client/assets/shell-layout-Bi4LjwsI.js +0 -1
- package/dist/client/assets/sidebar-DRSu2iBz.js +0 -1
- package/dist/client/assets/sso-C6uqUsih.js +0 -1
- package/dist/client/assets/store-BZ7eoytz.js +0 -1
- package/dist/client/assets/store-registry-DA7t2U9g.js +0 -2
- package/dist/client/assets/studio-tools-CTswP4mA.js +0 -1
- package/dist/client/assets/tools-list-DyAKlhYk.js +0 -1
- package/dist/client/assets/use-ai-providers-D77UFwvU.js +0 -1
- package/dist/client/assets/use-automations-WNGih4F_.js +0 -1
- package/dist/client/assets/use-capability-DmeYLlad.js +0 -1
- package/dist/client/assets/use-connection-CcLotHiI.js +0 -1
- package/dist/client/assets/use-deco-credits-1Xd5keqC.js +0 -1
- package/dist/client/assets/use-delete-connection-BJuEHINL.js +0 -1
- package/dist/client/assets/use-file-configs-G_3bUBDS.js +0 -1
- package/dist/client/assets/use-infinite-scroll-BTdf9pFZ.js +0 -1
- package/dist/client/assets/use-join-requests-NgN8gue3.js +0 -1
- package/dist/client/assets/use-members-eaM3vNiv.js +0 -1
- package/dist/client/assets/use-navigate-to-agent-BsdctirU.js +0 -1
- package/dist/client/assets/use-org-auth-client-DYoTiK8H.js +0 -1
- package/dist/client/assets/use-organization-roles-CcwnCugJ.js +0 -1
- package/dist/client/assets/use-organization-settings-C4hP3pVq.js +0 -1
- package/dist/client/assets/use-registry-connections-xg-zrNmx.js +0 -1
- package/dist/client/assets/use-secrets-CdGKHqA-.js +0 -1
- package/dist/client/assets/use-status-sounds-Uz1qdvt2.js +0 -1
- package/dist/client/assets/use-virtual-mcp-CMvxAHEJ.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BosqZeNZ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Dh0QZdLF.js +0 -1
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{I as M,r as N,a4 as R,n as L,a as V,M as B,d as K,R as p,t as c,K as j,j as s,B as C}from"./index-CsZhMKFM.js";import{e as O,b as q,d as z,D as Q,a as k,c as H}from"./dialog-DZtdYFi_.js";import{a as U,F as b,b as v,c as Y,d as w,e as S}from"./form-YJrSMpNL.js";import{S as G,a as J,b as W,c as X,d as Z}from"./select-CVMXwLRV.js";import{T as _}from"./textarea-DPLwPKZJ.js";import{u as ee}from"./use-org-auth-client-DYoTiK8H.js";import{u as se}from"./use-organization-roles-CcwnCugJ.js";const te=M().email("Invalid email address");function ne(r){if(!r.trim())return[];const m=r.split(/[,;\n]/).map(a=>a.trim().toLowerCase()).filter(a=>a.length>0);return Array.from(new Set(m))}function de({trigger:r}){const[m,a]=N.useState(!1),{locator:g}=R(),E=ee(),x=L(),{data:F}=V.useSession(),f=F?.user?.email,{roles:P,isLoading:y}=se(),T=P.filter(t=>t.role!=="owner"),i=B({mode:"onChange",defaultValues:{emailsText:"",role:"user"}}),$=i.watch("emailsText"),I=i.watch("role"),l=ne($).filter(t=>{const e=te.safeParse(t).success,n=!f||t!==f.toLowerCase();return e&&n}),o=K({mutationFn:async({emails:t,role:e})=>{if(!e)throw new Error("Please select a role");const n=await Promise.allSettled(t.map(async d=>{const h=await E.organization.inviteMember({email:d,role:e});if(h.error)throw new Error(h.error.message);return h.data})),u=n.filter(d=>d.status==="rejected");if(u.length>0)throw new Error(`Failed to invite ${u.length} member${u.length>1?"s":""}`);return n},onSuccess:(t,{emails:e,role:n})=>{p("member_invited",{count:e.length,role:n}),x.invalidateQueries({queryKey:j.members(g)}),x.invalidateQueries({queryKey:j.invitations(g)}),c.success(e.length===1?"Member invited successfully!":`${e.length} members invited successfully!`),i.reset({emailsText:"",role:"user"}),a(!1)},onError:(t,{emails:e,role:n})=>{p("member_invite_failed",{count:e.length,role:n,error:t instanceof Error?t.message:String(t)}),c.error(t instanceof Error?t.message:"Failed to invite members")}}),A=t=>{if(l.length===0){c.error("Please enter at least one valid email address");return}if(!t.role){c.error("Please select a role");return}o.mutate({emails:l,role:t.role})},D=l.length>0&&!!I;return s.jsxs(O,{open:m,onOpenChange:a,children:[s.jsx(q,{asChild:!0,children:r}),s.jsxs(z,{className:"sm:max-w-lg",children:[s.jsx(Q,{children:s.jsx(k,{children:"Invite members"})}),s.jsx(U,{...i,children:s.jsxs("form",{onSubmit:i.handleSubmit(A),className:"space-y-4",children:[s.jsx(b,{control:i.control,name:"emailsText",render:({field:t})=>s.jsxs(v,{children:[s.jsx(Y,{children:"Email addresses"}),s.jsx(w,{children:s.jsx(_,{...t,disabled:o.isPending,placeholder:`Enter email addresses separated by commas or new lines
|
|
2
|
-
e.g. user1@example.com, user2@example.com
|
|
3
|
-
or one per line`,className:"min-h-[120px] resize-none"})}),s.jsx(S,{})]})}),s.jsx(b,{control:i.control,name:"role",render:({field:t})=>s.jsxs(v,{children:[s.jsx(w,{children:s.jsxs(G,{value:t.value,onValueChange:t.onChange,disabled:o.isPending||y,children:[s.jsx(J,{className:"w-full",children:s.jsx(W,{placeholder:"Select a role"})}),s.jsx(X,{children:T.map(e=>{const n=[];return e.isBuiltin||(e.allowsAllStaticPermissions?n.push("Full org access"):e.staticPermissionCount&&e.staticPermissionCount>0&&n.push(`${e.staticPermissionCount} org perm${e.staticPermissionCount!==1?"s":""}`),e.allowsAllConnections?n.push("All connections"):e.connectionCount&&e.connectionCount>0&&n.push(`${e.connectionCount} connection${e.connectionCount!==1?"s":""}`),(e.connectionCount!==0||e.allowsAllConnections)&&(e.allowsAllTools?n.push("all tools"):e.toolCount&&e.toolCount>0&&n.push(`${e.toolCount} tool${e.toolCount!==1?"s":""}`))),s.jsx(Z,{value:e.role,children:s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{children:e.label}),!e.isBuiltin&&n.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:n.join(", ")})]})},e.role)})})]})}),s.jsx(S,{})]})}),s.jsxs(H,{children:[s.jsx(C,{variant:"outline",onClick:()=>{i.reset({emailsText:"",role:"user"}),a(!1)},type:"button",disabled:o.isPending,children:"Cancel"}),s.jsx(C,{type:"submit",disabled:o.isPending||!D,children:o.isPending?"Inviting...":`Invite ${l.length||0} Member${l.length!==1?"s":""}`})]})]})})]})]})}export{de as I};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as G,j as s,B as ze,a4 as pe,P as Mt,n as Qe,d as Me,K as ce,t as oe,m as Ct,r as re,l as ke,i as Xe,U as Rt,R as Re}from"./index-CsZhMKFM.js";import{C as zt}from"./collection-display-button-BVhQtAEp.js";import{S as Pt}from"./search-input-BREJK7qA.js";import{P as Ae}from"./index-DS3hrf0F.js";import{C as Et}from"./collection-table-wrapper-CeR2zvlX.js";import{E as We}from"./empty-state-DD15-E7x.js";import{I as kt}from"./invite-member-dialog-DV_-RNy8.js";import{b as Dt,S as $t,a as Ot}from"./settings-section-BYCtjEaG.js";import{u as qt,a as Lt}from"./use-join-requests-NgN8gue3.js";import{A as De}from"./avatar-DOYkgu8W.js";import{f as Ft}from"./format-time-BnbuEtat.js";import{g as Ve}from"./get-initials-D-f_fDFw.js";import{u as Bt}from"./use-members-eaM3vNiv.js";import{u as $e}from"./studio-tools-CTswP4mA.js";import{u as yt}from"./use-org-auth-client-DYoTiK8H.js";import{u as Kt}from"./use-organization-roles-CcwnCugJ.js";import{a as Vt,b as Qt,c as Ut,T as Gt}from"./tooltip-Cs5hng3q.js";import{a as st,e as nt,g as it,b as at,c as lt,d as ot,A as rt,f as ct}from"./alert-dialog-Bd5XLC3F.js";import{B as Ue}from"./badge-BMMjntMn.js";import{C as mt}from"./card-Bc92PJFP.js";import{D as St,a as Nt,c as wt,e as Jt,f as Ht,g as Wt,d as et,j as Yt}from"./dropdown-menu-C9SSwIby.js";import{i as _t}from"./DotsVertical-CK1a4mKj.js";import{i as Zt}from"./Key01-1r4YrQER.js";import{i as Xt}from"./Shield01-C6TdRfmI.js";import{a as es}from"./SwitchHorizontal01-ilLzkPr_.js";import{s as ts}from"./Trash01--uX5q_ti.js";import{s as Tt}from"./XClose-D5Ra7e-f.js";import{b as dt,a as ut,d as ft,c as pt,S as ht}from"./select-CVMXwLRV.js";import{C as gt}from"./checkbox-B-y-IHdE.js";import{e as Ye,a as Ze,f as xt,C as ss,c as ns,d as is,b as as}from"./command-DzGwZa9g.js";import{a as ls,b as os,P as rs}from"./popover-C5PoRwEk.js";import{t as cs}from"./ChevronDown-BmFaSDo8.js";import{s as ms}from"./Plus-Cgq7ON9K.js";import{R as ds}from"./require-capability-BjscC7QS.js";import"./ArrowUp-CDnEKV2Y.js";import"./Check-CcLLJc-z.js";import"./List-DfPIAPM_.js";import"./view-mode-toggle-DovE7i8d.js";import"./SearchMd-ZfoTl6vw.js";import"./sidebar-DRSu2iBz.js";import"./LayoutLeft-DvNM8qhm.js";import"./use-mobile-DhhfLpzh.js";import"./X-OFSHASit.js";import"./table-CLRsCUXA.js";import"./dialog-DZtdYFi_.js";import"./form-YJrSMpNL.js";import"./label-BULuaMoF.js";import"./textarea-DPLwPKZJ.js";import"./ArrowUpRight-DdPCnlNm.js";import"./use-capability-DmeYLlad.js";import"./User01-5hu8D3_O.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./ChevronRight-C3Tgk-3m.js";import"./Circle-C_fdyhr8.js";import"./ChevronUp-Dew3RmKl.js";import"./index-DKyQrM3l.js";import"./access-gate-B4XS-sin.js";import"./capability-load-error-COzn8-Xb.js";function us(){const t=G.c(9),e=qt(),{approve:n,deny:l}=Lt();if(e.length===0)return null;let i;if(t[0]!==n||t[1]!==l||t[2]!==e){let o;t[4]!==n||t[5]!==l?(o=r=>s.jsx(Dt,{icon:s.jsx(De,{url:r.user?.image??void 0,fallback:(r.user?.name??r.user?.email??"?").charAt(0).toUpperCase(),shape:"circle",size:"sm"}),title:r.user?.name??r.user?.email??r.userId,description:r.user?.email,action:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ze,{size:"sm",variant:"outline",onClick:()=>l.mutate(r.id),disabled:l.isPending||n.isPending,children:"Deny"}),s.jsx(ze,{size:"sm",onClick:()=>n.mutate(r.id),disabled:n.isPending||l.isPending,children:"Approve"})]})},r.id),t[4]=n,t[5]=l,t[6]=o):o=t[6],i=e.map(o),t[0]=n,t[1]=l,t[2]=e,t[3]=i}else i=t[3];let a;return t[7]!==i?(a=s.jsx($t,{title:"Join requests",description:"People who requested to join via a domain in approval mode.",children:s.jsx(Ot,{children:i})}),t[7]=i,t[8]=a):a=t[8],a}function fs(){const t=G.c(7),{locator:e}=pe(),n=$e();let l;t[0]!==e?(l=ce.invitations(e),t[0]=e,t[1]=l):l=t[1];let i;t[2]!==n?(i=async()=>(await n.call("ORGANIZATION_GET",{}))?.invitations??[],t[2]=n,t[3]=i):i=t[3];let a;return t[4]!==l||t[5]!==i?(a={queryKey:l,queryFn:i},t[4]=l,t[5]=i,t[6]=a):a=t[6],Mt(a)}function ps(){const t=G.c(10),{locator:e}=pe(),n=yt(),l=Qe();let i;t[0]!==n?(i=async f=>{const g=await n.organization.cancelInvitation({invitationId:f});if(g?.error)throw new Error(g.error.message);return g.data},t[0]=n,t[1]=i):i=t[1];let a;t[2]!==e||t[3]!==l?(a=()=>{l.invalidateQueries({queryKey:ce.invitations(e)}),oe.success("Invitation cancelled")},t[2]=e,t[3]=l,t[4]=a):a=t[4];let o;t[5]!==i||t[6]!==a?(o={mutationFn:i,onSuccess:a,onError:hs},t[5]=i,t[6]=a,t[7]=o):o=t[7];const r=Me(o);let u;return t[8]!==r?(u={cancel:r},t[8]=r,t[9]=u):u=t[9],u}function hs(t){oe.error(t instanceof Error?t.message:"Failed to cancel invitation")}function gs(){const t=G.c(7),{locator:e}=pe(),n=$e();let l;t[0]!==e?(l=ce.tags(e),t[0]=e,t[1]=l):l=t[1];let i;t[2]!==n?(i=async()=>{const{tags:o}=await n.call("TAGS_LIST",{});return o},t[2]=n,t[3]=i):i=t[3];let a;return t[4]!==l||t[5]!==i?(a={queryKey:l,queryFn:i,staleTime:3e4},t[4]=l,t[5]=i,t[6]=a):a=t[6],Ct(a)}function xs(){const t=G.c(8),e=Qe(),{locator:n}=pe(),l=$e();let i;t[0]!==l?(i=async r=>{const{tag:u}=await l.call("TAGS_CREATE",{name:r});return u},t[0]=l,t[1]=i):i=t[1];let a;t[2]!==n||t[3]!==e?(a=()=>{e.invalidateQueries({queryKey:ce.tags(n)})},t[2]=n,t[3]=e,t[4]=a):a=t[4];let o;return t[5]!==i||t[6]!==a?(o={mutationFn:i,onSuccess:a,onError:bs},t[5]=i,t[6]=a,t[7]=o):o=t[7],Me(o)}function bs(t){oe.error(t instanceof Error?t.message:"Failed to create tag")}function js(t){const e=G.c(10),{locator:n}=pe(),l=$e();let i;e[0]!==n||e[1]!==t?(i=ce.memberTags(n,t),e[0]=n,e[1]=t,e[2]=i):i=e[2];let a;e[3]!==t||e[4]!==l?(a=async()=>{const{tags:u}=await l.call("MEMBER_TAGS_GET",{memberId:t});return u},e[3]=t,e[4]=l,e[5]=a):a=e[5];const o=!!t;let r;return e[6]!==i||e[7]!==a||e[8]!==o?(r={queryKey:i,queryFn:a,staleTime:3e4,enabled:o},e[6]=i,e[7]=a,e[8]=o,e[9]=r):r=e[9],Ct(r)}function vs(){const t=G.c(8),e=Qe(),{locator:n}=pe(),l=$e();let i;t[0]!==l?(i=async r=>{const{memberId:u,tagIds:f}=r;return await l.call("MEMBER_TAGS_SET",{memberId:u,tagIds:f})},t[0]=l,t[1]=i):i=t[1];let a;t[2]!==n||t[3]!==e?(a=(r,u)=>{e.invalidateQueries({queryKey:ce.memberTags(n,u.memberId)})},t[2]=n,t[3]=e,t[4]=a):a=t[4];let o;return t[5]!==i||t[6]!==a?(o={mutationFn:i,onSuccess:a,onError:Cs},t[5]=i,t[6]=a,t[7]=o):o=t[7],Me(o)}function Cs(t){oe.error(t instanceof Error?t.message:"Failed to update member tags")}function It(t){const e=G.c(44),{memberId:n,className:l,disabled:i,placeholder:a,maxDisplay:o}=t,r=i===void 0?!1:i,u=a===void 0?"Add tags...":a,f=o===void 0?2:o,[g,b]=re.useState(!1),[p,I]=re.useState(""),{data:M,isLoading:j}=gs(),D=M===void 0?[]:M,{data:v,isLoading:$}=js(n),C=v===void 0?[]:v,E=xs(),N=vs(),R=j||$,S=C.map(Ss);let z;e[0]!==p?(z=x=>x.name.toLowerCase().includes(p.toLowerCase()),e[0]=p,e[1]=z):z=e[1];const A=D.filter(z);let y;e[2]!==p?(y=x=>x.name.toLowerCase()===p.toLowerCase(),e[2]=p,e[3]=y):y=e[3];const K=D.find(y),w=p.trim()&&!K,k=async x=>{const fe=S.includes(x.id)?S.filter(xe=>xe!==x.id):[...S,x.id];await N.mutateAsync({memberId:n,tagIds:fe})},_=async()=>{if(!p.trim())return;const x=await E.mutateAsync(p.trim());await N.mutateAsync({memberId:n,tagIds:[...S,x.id]}),I("")},c=async x=>{const se=S.filter(fe=>fe!==x);await N.mutateAsync({memberId:n,tagIds:se})},h=E.isPending||N.isPending,L=os;let P;e[4]!==g?(P=()=>b(!g),e[4]=g,e[5]=P):P=e[5];let O;e[6]!==l?(O=ke("h-auto min-h-8 px-2 py-1 justify-start font-normal","hover:bg-accent/50",l),e[6]=l,e[7]=O):O=e[7];const V=r||R,q=R?s.jsx(Xe,{size:14,className:"animate-spin text-muted-foreground"}):C.length>0?s.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[C.slice(0,f).map(ys),C.length>f&&s.jsxs(Ue,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:["+",C.length-f]})]}):s.jsx("span",{className:"text-muted-foreground text-xs",children:u});let Q;e[8]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(cs,{size:14,className:"ml-1 shrink-0 opacity-50"}),e[8]=Q):Q=e[8];let F;e[9]!==V||e[10]!==q||e[11]!==P||e[12]!==O?(F=s.jsx(rs,{asChild:!0,children:s.jsxs(ze,{variant:"ghost",size:"sm",onClick:P,className:O,disabled:V,children:[q,Q]})}),e[9]=V,e[10]=q,e[11]=P,e[12]=O,e[13]=F):F=e[13];const U=ls,J="w-56 p-0",H="start";let W;e[14]===Symbol.for("react.memo_cache_sentinel")?(W=()=>b(!1),e[14]=W):W=e[14];const ne=is,he=!1;let Y;e[15]!==p?(Y=s.jsx(as,{placeholder:"Search or create...",value:p,onValueChange:I,className:"h-9"}),e[15]=p,e[16]=Y):Y=e[16];const ie=ns,me=C.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(Ye,{heading:"Selected",children:C.map(x=>s.jsx(Ze,{onSelect:()=>k(x),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center justify-between w-full",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(gt,{checked:!0,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:x.name})]}),s.jsx("button",{onClick:se=>{se.stopPropagation(),c(x.id)},className:"opacity-50 hover:opacity-100",disabled:h,children:s.jsx(Tt,{size:14})})]})},x.id))}),s.jsx(xt,{})]}),Pe=Ye,ge="Available",Ee=A.length===0&&!w&&s.jsx(ss,{children:"No tags found."}),ue=A.filter(x=>!S.includes(x.id)).map(x=>s.jsx(Ze,{onSelect:()=>k(x),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(gt,{checked:!1,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:x.name})]})},x.id));let ae;e[17]!==Pe||e[18]!==Ee||e[19]!==ue?(ae=s.jsxs(Pe,{heading:ge,children:[Ee,ue]}),e[17]=Pe,e[18]=Ee,e[19]=ue,e[20]=ae):ae=e[20];let le;e[21]!==_||e[22]!==h||e[23]!==p||e[24]!==w?(le=w&&s.jsxs(s.Fragment,{children:[s.jsx(xt,{}),s.jsx(Ye,{children:s.jsx(Ze,{onSelect:_,className:"cursor-pointer",disabled:h,children:s.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[h?s.jsx(Xe,{size:14,className:"animate-spin"}):s.jsx(ms,{size:14}),s.jsxs("span",{children:['Create "',p.trim(),'"']})]})})})]}),e[21]=_,e[22]=h,e[23]=p,e[24]=w,e[25]=le):le=e[25];let Z;e[26]!==ie||e[27]!==me||e[28]!==ae||e[29]!==le?(Z=s.jsxs(ie,{children:[me,ae,le]}),e[26]=ie,e[27]=me,e[28]=ae,e[29]=le,e[30]=Z):Z=e[30];let X;e[31]!==ne||e[32]!==Y||e[33]!==Z?(X=s.jsxs(ne,{shouldFilter:he,children:[Y,Z]}),e[31]=ne,e[32]=Y,e[33]=Z,e[34]=X):X=e[34];let ee;e[35]!==U||e[36]!==W||e[37]!==X?(ee=s.jsx(U,{className:J,align:H,onEscapeKeyDown:W,children:X}),e[35]=U,e[36]=W,e[37]=X,e[38]=ee):ee=e[38];let te;return e[39]!==L||e[40]!==g||e[41]!==F||e[42]!==ee?(te=s.jsxs(L,{open:g,onOpenChange:b,children:[F,ee]}),e[39]=L,e[40]=g,e[41]=F,e[42]=ee,e[43]=te):te=e[43],te}function ys(t){return s.jsx(Ue,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:t.name},t.id)}function Ss(t){return t.id}const bt=["bg-neutral-400","bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500","bg-slate-500"],Ns={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function ws(t){const e=new Map;for(const[n,l]of Object.entries(Ns))e.set(n,l);for(let n=0;n<t.length;n++){const l=t[n];l&&!e.has(l.role)&&e.set(l.role,bt[n%bt.length]??"bg-neutral-400")}return e}function Ke(t){const e=G.c(79),{role:n,memberId:l,isOwner:i,roleColorMap:a,selectableRoles:o,onRoleChange:r,size:u,className:f}=t,g=u===void 0?"xs":u;let b,p,I,M,j,D,v,$,C,E,N;if(e[0]!==f||e[1]!==i||e[2]!==l||e[3]!==r||e[4]!==n||e[5]!==a||e[6]!==o||e[7]!==g){N=Symbol.for("react.early_return_sentinel");e:{const _=a.get(n)??"bg-neutral-400";if(i){let c;e[19]!==l||e[20]!==r?(c=J=>r(l,J),e[19]=l,e[20]=r,e[21]=c):c=e[21];let h;e[22]!==n?(h=s.jsx("span",{className:"capitalize truncate",children:n}),e[22]=n,e[23]=h):h=e[23];const L=s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx("div",{className:ke("size-2 rounded-full shrink-0",_)}),h]});let P;e[24]!==L?(P=s.jsx(dt,{children:L}),e[24]=L,e[25]=P):P=e[25];let O;e[26]!==f||e[27]!==g||e[28]!==P?(O=s.jsx(ut,{size:g,className:f,children:P}),e[26]=f,e[27]=g,e[28]=P,e[29]=O):O=e[29];let V;if(e[30]!==a||e[31]!==o){let J;e[33]!==a?(J=H=>{const W=a.get(H.role)??"bg-neutral-400";return s.jsx(ft,{value:H.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:ke("size-3 rounded-full",W)}),s.jsx("span",{className:"capitalize",children:H.label})]})},H.role)},e[33]=a,e[34]=J):J=e[34],V=o.map(J),e[30]=a,e[31]=o,e[32]=V}else V=e[32];let q;e[35]!==V?(q=s.jsx(pt,{children:V}),e[35]=V,e[36]=q):q=e[36];let Q;e[37]!==i||e[38]!==n||e[39]!==c||e[40]!==O||e[41]!==q?(Q=s.jsx(Vt,{asChild:!0,children:s.jsx("div",{className:"w-fit",children:s.jsxs(ht,{value:n,onValueChange:c,disabled:i,children:[O,q]})})}),e[37]=i,e[38]=n,e[39]=c,e[40]=O,e[41]=q,e[42]=Q):Q=e[42];let F;e[43]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(Qt,{children:s.jsx("p",{children:"The owner role cannot be changed"})}),e[43]=F):F=e[43];let U;e[44]!==Q?(U=s.jsx(Ut,{children:s.jsxs(Gt,{children:[Q,F]})}),e[44]=Q,e[45]=U):U=e[45],N=U;break e}I=ht,$=n,e[46]!==l||e[47]!==r?(C=c=>r(l,c),e[46]=l,e[47]=r,e[48]=C):C=e[48],E=i,p=ut,D=g,v=f,b=dt,j="flex items-center gap-2 min-w-0",M=ke("size-2 rounded-full shrink-0",_)}e[0]=f,e[1]=i,e[2]=l,e[3]=r,e[4]=n,e[5]=a,e[6]=o,e[7]=g,e[8]=b,e[9]=p,e[10]=I,e[11]=M,e[12]=j,e[13]=D,e[14]=v,e[15]=$,e[16]=C,e[17]=E,e[18]=N}else b=e[8],p=e[9],I=e[10],M=e[11],j=e[12],D=e[13],v=e[14],$=e[15],C=e[16],E=e[17],N=e[18];if(N!==Symbol.for("react.early_return_sentinel"))return N;let R;e[49]!==M?(R=s.jsx("div",{className:M}),e[49]=M,e[50]=R):R=e[50];let S;e[51]!==n?(S=s.jsx("span",{className:"capitalize truncate",children:n}),e[51]=n,e[52]=S):S=e[52];let z;e[53]!==R||e[54]!==S||e[55]!==j?(z=s.jsxs("div",{className:j,children:[R,S]}),e[53]=R,e[54]=S,e[55]=j,e[56]=z):z=e[56];let A;e[57]!==b||e[58]!==z?(A=s.jsx(b,{children:z}),e[57]=b,e[58]=z,e[59]=A):A=e[59];let y;e[60]!==p||e[61]!==A||e[62]!==D||e[63]!==v?(y=s.jsx(p,{size:D,className:v,children:A}),e[60]=p,e[61]=A,e[62]=D,e[63]=v,e[64]=y):y=e[64];let K;if(e[65]!==a||e[66]!==o){let _;e[68]!==a?(_=c=>{const h=a.get(c.role)??"bg-neutral-400";return s.jsx(ft,{value:c.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:ke("size-3 rounded-full",h)}),s.jsx("span",{className:"capitalize",children:c.label})]})},c.role)},e[68]=a,e[69]=_):_=e[69],K=o.map(_),e[65]=a,e[66]=o,e[67]=K}else K=e[67];let w;e[70]!==K?(w=s.jsx(pt,{children:K}),e[70]=K,e[71]=w):w=e[71];let k;return e[72]!==I||e[73]!==y||e[74]!==w||e[75]!==$||e[76]!==C||e[77]!==E?(k=s.jsxs(I,{value:$,onValueChange:C,disabled:E,children:[y,w]}),e[72]=I,e[73]=y,e[74]=w,e[75]=$,e[76]=C,e[77]=E,e[78]=k):k=e[78],k}function jt(t){const e=G.c(51),{member:n,roles:l,onChangeRole:i,onRemove:a,isUpdating:o}=t,r=o===void 0?!1:o,u=n.role==="owner";let f,g,b,p,I,M,j,D,v;if(e[0]!==u||e[1]!==r||e[2]!==n.id||e[3]!==n.role||e[4]!==i||e[5]!==l){let y;e[15]!==n.role?(y=c=>c.role!==n.role&&c.role!=="owner",e[15]=n.role,e[16]=y):y=e[16];const K=l.filter(y);p=St;let w;e[17]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(_t,{size:20}),e[17]=w):w=e[17],e[18]!==u?(v=s.jsx(Nt,{asChild:!0,children:s.jsx(ze,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:u,onClick:Ts,children:w})}),e[18]=u,e[19]=v):v=e[19],b=wt,j="end",D=_s,g=Jt;let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(es,{size:16}),e[20]=k):k=e[20],e[21]!==r?(M=s.jsxs(Ht,{disabled:r,children:[k,"Change Role"]}),e[21]=r,e[22]=M):M=e[22],f=Wt;let _;e[23]!==r||e[24]!==n.id||e[25]!==i?(_=c=>{const h=[];return c.isBuiltin||(c.allowsAllStaticPermissions?h.push("Full org access"):c.staticPermissionCount&&c.staticPermissionCount>0&&h.push(`${c.staticPermissionCount} org perm${c.staticPermissionCount!==1?"s":""}`),c.allowsAllConnections?h.push("All connections"):c.connectionCount&&c.connectionCount>0&&h.push(`${c.connectionCount} connection${c.connectionCount!==1?"s":""}`),(c.connectionCount!==0||c.allowsAllConnections)&&(c.allowsAllTools?h.push("all tools"):c.toolCount&&c.toolCount>0&&h.push(`${c.toolCount} tool${c.toolCount!==1?"s":""}`))),s.jsxs(et,{onClick:L=>{L.stopPropagation(),i(n.id,c.role)},disabled:r,children:[c.isBuiltin?s.jsx(Xt,{size:16}):s.jsx(Zt,{size:16}),s.jsxs("span",{className:"flex flex-col",children:[s.jsx("span",{children:c.label}),!c.isBuiltin&&h.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:h.join(", ")})]})]},c.role)},e[23]=r,e[24]=n.id,e[25]=i,e[26]=_):_=e[26],I=K.map(_),e[0]=u,e[1]=r,e[2]=n.id,e[3]=n.role,e[4]=i,e[5]=l,e[6]=f,e[7]=g,e[8]=b,e[9]=p,e[10]=I,e[11]=M,e[12]=j,e[13]=D,e[14]=v}else f=e[6],g=e[7],b=e[8],p=e[9],I=e[10],M=e[11],j=e[12],D=e[13],v=e[14];let $;e[27]!==f||e[28]!==I?($=s.jsx(f,{children:I}),e[27]=f,e[28]=I,e[29]=$):$=e[29];let C;e[30]!==g||e[31]!==M||e[32]!==$?(C=s.jsxs(g,{children:[M,$]}),e[30]=g,e[31]=M,e[32]=$,e[33]=C):C=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(Yt,{}),e[34]=E):E=e[34];let N;e[35]!==n.id||e[36]!==a?(N=y=>{y.stopPropagation(),a(n.id)},e[35]=n.id,e[36]=a,e[37]=N):N=e[37];let R;e[38]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(ts,{size:16}),e[38]=R):R=e[38];let S;e[39]!==N?(S=s.jsxs(et,{variant:"destructive",onClick:N,children:[R,"Remove Member"]}),e[39]=N,e[40]=S):S=e[40];let z;e[41]!==b||e[42]!==S||e[43]!==j||e[44]!==D||e[45]!==C?(z=s.jsxs(b,{align:j,onClick:D,children:[C,E,S]}),e[41]=b,e[42]=S,e[43]=j,e[44]=D,e[45]=C,e[46]=z):z=e[46];let A;return e[47]!==p||e[48]!==z||e[49]!==v?(A=s.jsxs(p,{children:[v,z]}),e[47]=p,e[48]=z,e[49]=v,e[50]=A):A=e[50],A}function _s(t){return t.stopPropagation()}function Ts(t){return t.stopPropagation()}function vt(t){const e=G.c(8),{invitationId:n,onCancel:l,isCancelling:i}=t,a=i===void 0?!1:i;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Nt,{asChild:!0,children:s.jsx(ze,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:As,children:s.jsx(_t,{size:20})})}),e[0]=o):o=e[0];let r;e[1]!==n||e[2]!==l?(r=g=>{g.stopPropagation(),l(n)},e[1]=n,e[2]=l,e[3]=r):r=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Tt,{size:16}),e[4]=u):u=e[4];let f;return e[5]!==a||e[6]!==r?(f=s.jsxs(St,{children:[o,s.jsx(wt,{align:"end",onClick:Is,children:s.jsxs(et,{variant:"destructive",onClick:r,disabled:a,children:[u,"Cancel Invitation"]})})]}),e[5]=a,e[6]=r,e[7]=f):f=e[7],f}function Is(t){return t.stopPropagation()}function As(t){return t.stopPropagation()}function Ms(){const t=G.c(103),{data:e}=Bt(),{data:n}=fs(),l=ps(),i=Qe(),{locator:a}=pe(),o=yt(),[r,u]=re.useState(null),[f,g]=re.useState(null),[b,p]=re.useState(""),[I,M]=re.useState("table"),[j,D]=re.useState("member"),[v,$]=re.useState("asc"),C=e?.data?.members;let E;t[0]!==j?(E=m=>{j===m?$(Fs):(D(m),$("asc"))},t[0]=j,t[1]=E):E=t[1];const N=E;let R=C??[],S=n??[];if(b){const m=b.toLowerCase();R=R.filter(d=>d.user?.name?.toLowerCase().includes(m)||d.user?.email?.toLowerCase().includes(m)||d.role?.toLowerCase().includes(m)),S=S.filter(d=>d.email?.toLowerCase().includes(m)||d.role?.toLowerCase().includes(m))}if(j&&v){let m;t[2]!==v||t[3]!==j?(m=(d,T)=>{let B,de;e:switch(j){case"member":{B=d.user?.name||"",de=T.user?.name||"";break e}case"role":{B=d.role||"",de=T.role||"";break e}case"joined":{B=d.createdAt?typeof d.createdAt=="string"?d.createdAt:d.createdAt.toISOString():"",de=T.createdAt?typeof T.createdAt=="string"?T.createdAt:T.createdAt.toISOString():"";break e}default:return 0}return v==="asc"?B.localeCompare(de):de.localeCompare(B)},t[2]=v,t[3]=j,t[4]=m):m=t[4],R=[...R].sort(m)}const z=R;let A;t[5]!==o?(A=async m=>{const d=await o.organization.removeMember({memberIdOrEmail:m});if(d?.error)throw new Error(d.error.message)},t[5]=o,t[6]=A):A=t[6];let y;t[7]!==a||t[8]!==i?(y=()=>{Re("member_removed"),i.invalidateQueries({queryKey:ce.members(a)}),oe.success("Member has been removed from the organization"),u(null)},t[7]=a,t[8]=i,t[9]=y):y=t[9];let K;t[10]!==A||t[11]!==y?(K={mutationFn:A,onSuccess:y,onError:Ls},t[10]=A,t[11]=y,t[12]=K):K=t[12];const w=Me(K);let k;t[13]!==o?(k=async m=>{const{memberId:d,role:T}=m,B=await o.organization.updateMemberRole({memberId:d,role:[T]});if(B?.error)throw new Error(B.error.message)},t[13]=o,t[14]=k):k=t[14];let _;t[15]!==a||t[16]!==i?(_=(m,d)=>{Re("member_role_updated",{new_role:d.role}),i.invalidateQueries({queryKey:ce.members(a)}),oe.success("Member's role has been updated")},t[15]=a,t[16]=i,t[17]=_):_=t[17];let c;t[18]!==k||t[19]!==_?(c={mutationFn:k,onSuccess:_,onError:qs},t[18]=k,t[19]=_,t[20]=c):c=t[20];const h=Me(c);let L;t[21]!==o?(L=async m=>{const{invitationId:d,role:T,email:B}=m,de=await o.organization.cancelInvitation({invitationId:d});if(de?.error)throw new Error(de.error.message);const tt=await o.organization.inviteMember({email:B,role:T});if(tt?.error)throw new Error(tt.error.message)},t[21]=o,t[22]=L):L=t[22];let P;t[23]!==a||t[24]!==i?(P=(m,d)=>{Re("invitation_role_updated",{new_role:d.role}),i.invalidateQueries({queryKey:ce.invitations(a)}),oe.success("Invitation role has been updated")},t[23]=a,t[24]=i,t[25]=P):P=t[25];let O;t[26]!==L||t[27]!==P?(O={mutationFn:L,onSuccess:P,onError:Os},t[26]=L,t[27]=P,t[28]=O):O=t[28];const V=Me(O),{roles:q,customRoles:Q}=Kt();let F;t[29]!==Q?(F=ws(Q),t[29]=Q,t[30]=F):F=t[30];const U=F;let J;t[31]!==q?(J=q.filter($s),t[31]=q,t[32]=J):J=t[32];const H=J;let W;t[33]===Symbol.for("react.memo_cache_sentinel")?(W={id:"member",header:"Member",render:Ds,cellClassName:"flex-1 min-w-0",sortable:!0},t[33]=W):W=t[33];let ne;t[34]!==U||t[35]!==H||t[36]!==V||t[37]!==h?(ne={id:"role",header:"Role",render:m=>m.type==="member"?s.jsx(Ke,{role:m.data.role,memberId:m.data.id,isOwner:m.data.role==="owner",roleColorMap:U,selectableRoles:H,onRoleChange:(d,T)=>h.mutate({memberId:d,role:T}),className:"w-36"}):s.jsx(Ke,{role:m.data.role,memberId:m.data.id,isOwner:!1,roleColorMap:U,selectableRoles:H,onRoleChange:(d,T)=>V.mutate({invitationId:d,role:T,email:m.data.email}),className:"w-36"}),cellClassName:"w-36 shrink-0",sortable:!0},t[34]=U,t[35]=H,t[36]=V,t[37]=h,t[38]=ne):ne=t[38];let he,Y;t[39]===Symbol.for("react.memo_cache_sentinel")?(he={id:"tags",header:"Tags",render:ks,cellClassName:"w-40 shrink-0"},Y={id:"joined",header:"Joined",render:Es,cellClassName:"w-48 shrink-0",sortable:!0},t[39]=he,t[40]=Y):(he=t[39],Y=t[40]);let ie;t[41]!==l.cancel.isPending||t[42]!==q||t[43]!==h?(ie={id:"actions",header:"",render:m=>m.type==="member"?s.jsx(jt,{member:m.data,roles:q,onChangeRole:(d,T)=>h.mutate({memberId:d,role:T}),onRemove:u,isUpdating:h.isPending}):s.jsx(vt,{invitationId:m.data.id,onCancel:g,isCancelling:l.cancel.isPending}),cellClassName:"w-12 shrink-0"},t[41]=l.cancel.isPending,t[42]=q,t[43]=h,t[44]=ie):ie=t[44];let me;t[45]!==ne||t[46]!==ie?(me=[W,ne,he,Y,ie],t[45]=ne,t[46]=ie,t[47]=me):me=t[47];const Pe=me;let ge;t[48]===Symbol.for("react.memo_cache_sentinel")?(ge=s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(kt,{trigger:s.jsx(ze,{children:"Invite Member"})})}),t[48]=ge):ge=t[48];const Ee=ge,ue=[...z.map(Ps),...S.filter(zs).map(Rs)],ae=Ae,le=!!f;let Z;t[49]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>g(null),t[49]=Z):Z=t[49];let X;t[50]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsxs(at,{children:[s.jsx(lt,{children:"Cancel Invitation"}),s.jsx(ot,{children:"Are you sure you want to cancel this invitation? The invitee will no longer be able to join the organization with this invitation."})]}),t[50]=X):X=t[50];let ee;t[51]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(rt,{children:"Keep Invitation"}),t[51]=ee):ee=t[51];let te;t[52]!==l.cancel||t[53]!==f?(te=()=>{f&&(l.cancel.mutate(f),g(null))},t[52]=l.cancel,t[53]=f,t[54]=te):te=t[54];let x;t[55]!==l.cancel.isPending||t[56]!==te?(x=s.jsxs(st,{children:[X,s.jsxs(nt,{children:[ee,s.jsx(it,{onClick:te,disabled:l.cancel.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Cancel Invitation"})]})]}),t[55]=l.cancel.isPending,t[56]=te,t[57]=x):x=t[57];let se;t[58]!==le||t[59]!==x?(se=s.jsx(ct,{open:le,onOpenChange:Z,children:x}),t[58]=le,t[59]=x,t[60]=se):se=t[60];const fe=!!r;let xe;t[61]===Symbol.for("react.memo_cache_sentinel")?(xe=()=>u(null),t[61]=xe):xe=t[61];let Oe;t[62]===Symbol.for("react.memo_cache_sentinel")?(Oe=s.jsxs(at,{children:[s.jsx(lt,{children:"Remove Member"}),s.jsx(ot,{children:"Are you sure you want to remove this member from the organization? This action cannot be undone."})]}),t[62]=Oe):Oe=t[62];let qe;t[63]===Symbol.for("react.memo_cache_sentinel")?(qe=s.jsx(rt,{children:"Cancel"}),t[63]=qe):qe=t[63];let be;t[64]!==r||t[65]!==w?(be=()=>r&&w.mutate(r),t[64]=r,t[65]=w,t[66]=be):be=t[66];let je;t[67]!==w.isPending||t[68]!==be?(je=s.jsxs(st,{children:[Oe,s.jsxs(nt,{children:[qe,s.jsx(it,{onClick:be,disabled:w.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Remove"})]})]}),t[67]=w.isPending,t[68]=be,t[69]=je):je=t[69];let ve;t[70]!==fe||t[71]!==je?(ve=s.jsx(ct,{open:fe,onOpenChange:xe,children:je}),t[70]=fe,t[71]=je,t[72]=ve):ve=t[72];const Ge=Ae,Je=Ae,At="flex flex-col gap-6";let Ce,ye;t[73]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(us,{}),ye=s.jsx(Ae.Title,{children:"Members"}),t[73]=Ce,t[74]=ye):(Ce=t[73],ye=t[74]);let Le;t[75]===Symbol.for("react.memo_cache_sentinel")?(Le=m=>{m.key==="Escape"&&(p(""),m.target.blur())},t[75]=Le):Le=t[75];let Se;t[76]!==b?(Se=s.jsx(Pt,{value:b,onChange:p,placeholder:"Search members...",className:"w-full md:w-[375px]",onKeyDown:Le}),t[76]=b,t[77]=Se):Se=t[77];let Fe;t[78]===Symbol.for("react.memo_cache_sentinel")?(Fe=[{id:"member",label:"Name"},{id:"role",label:"Role"},{id:"joined",label:"Joined"}],t[78]=Fe):Fe=t[78];let Ne;t[79]!==N||t[80]!==v||t[81]!==j||t[82]!==I?(Ne=s.jsx(zt,{viewMode:I,onViewModeChange:M,sortKey:j,sortDirection:v,onSort:N,sortOptions:Fe}),t[79]=N,t[80]=v,t[81]=j,t[82]=I,t[83]=Ne):Ne=t[83];let we;t[84]!==Se||t[85]!==Ne?(we=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[Se,Ne]}),Ee]}),t[84]=Se,t[85]=Ne,t[86]=we):we=t[86];const He=I==="cards"?s.jsx("div",{children:ue.length===0?s.jsx(We,{title:"No members found",description:b?`No members match "${b}"`:"Invite members to get started."}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:ue.map(m=>{if(m.type==="invitation")return s.jsxs(mt,{className:"transition-colors relative opacity-75",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(vt,{invitationId:m.data.id,onCancel:g,isCancelling:l.cancel.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(De,{fallback:Ve(m.data.email),shape:"circle",size:"lg",className:"shrink-0"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:m.data.email}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(Ue,{variant:"outline",className:"w-fit text-amber-600 border-amber-400",children:"Pending"})}),s.jsx(Ke,{role:m.data.role,memberId:m.data.id,isOwner:!1,roleColorMap:U,selectableRoles:H,onRoleChange:(T,B)=>V.mutate({invitationId:T,role:B,email:m.data.email}),className:"w-fit"})]})]})]},`inv-${m.data.id}`);const d=m.data;return s.jsxs(mt,{className:"transition-colors relative",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(jt,{member:d,roles:q,onChangeRole:(T,B)=>h.mutate({memberId:T,role:B}),onRemove:u,isUpdating:h.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(De,{url:d.user?.image??void 0,fallback:Ve(d.user?.name),shape:"circle",size:"lg",className:"shrink-0"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:d.user?.name||"Unknown"}),s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:d.user?.email}),s.jsx(Ke,{role:d.role,memberId:d.id,isOwner:d.role==="owner",roleColorMap:U,selectableRoles:H,onRoleChange:(T,B)=>h.mutate({memberId:T,role:B}),className:"w-fit"}),s.jsx(It,{memberId:d.id,maxDisplay:3})]})]})]},d.id)})})}):s.jsx(Et,{columns:Pe,data:ue,isLoading:!1,sortKey:j,sortDirection:v,onSort:N,emptyState:b?s.jsx(We,{title:"No members found",description:`No members match "${b}"`}):s.jsx(We,{title:"No members found",description:"Invite members to get started."})});let _e;t[87]!==Ce||t[88]!==ye||t[89]!==we||t[90]!==He?(_e=s.jsxs("div",{className:At,children:[Ce,ye,we,He]}),t[87]=Ce,t[88]=ye,t[89]=we,t[90]=He,t[91]=_e):_e=t[91];let Te;t[92]!==Je.Body||t[93]!==_e?(Te=s.jsx(Je.Body,{children:_e}),t[92]=Je.Body,t[93]=_e,t[94]=Te):Te=t[94];let Ie;t[95]!==Ge.Content||t[96]!==Te?(Ie=s.jsx(Ge.Content,{children:Te}),t[95]=Ge.Content,t[96]=Te,t[97]=Ie):Ie=t[97];let Be;return t[98]!==ae||t[99]!==se||t[100]!==ve||t[101]!==Ie?(Be=s.jsxs(ae,{children:[se,ve,Ie]}),t[98]=ae,t[99]=se,t[100]=ve,t[101]=Ie,t[102]=Be):Be=t[102],Be}function Rs(t){return{type:"invitation",data:t}}function zs(t){return t.status==="pending"}function Ps(t){return{type:"member",data:t}}function Es(t){return t.type==="member"?s.jsx("span",{className:"text-sm text-foreground",children:t.data.createdAt?Ft(t.data.createdAt):"N/A"}):s.jsx(Ue,{variant:"outline",children:"Pending"})}function ks(t){return t.type==="member"?s.jsx(It,{memberId:t.data.id,maxDisplay:2}):s.jsx("span",{className:"text-xs text-muted-foreground",children:"-"})}function Ds(t){return t.type==="member"?s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(De,{url:t.data.user?.image??void 0,fallback:Ve(t.data.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.data.user?.name||"Unknown"}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.data.user?.email})]})]}):s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(De,{fallback:Ve(t.data.email),shape:"circle",size:"sm"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.data.email}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:"Invitation sent"})]})]})}function $s(t){return t.role!=="owner"}function Os(t,e){Re("invitation_role_update_failed",{new_role:e.role,error:t instanceof Error?t.message:String(t)}),oe.error(t instanceof Error?t.message:"Failed to update invitation role")}function qs(t,e){Re("member_role_update_failed",{new_role:e.role,error:t instanceof Error?t.message:String(t)}),oe.error(t instanceof Error?t.message:"Failed to update role")}function Ls(t){Re("member_remove_failed",{error:t instanceof Error?t.message:String(t)}),oe.error(t instanceof Error?t.message:"Failed to remove member")}function Fs(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function Bs(){const t=G.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=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:"Failed to load members"})})}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Rt,{fallback:e,children:s.jsx(re.Suspense,{fallback:s.jsx(Ae,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Xe,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(Ms,{})})}),t[1]=n):n=t[1],n}function Jn(){const t=G.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ds,{capability:"members:manage",area:"members",children:s.jsx(Bs,{})}),t[0]=e):e=t[0],e}export{Jn as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as it,r as E,j as e,i as rt}from"./index-CsZhMKFM.js";import{m as mt,o as pt,p as st,q as at}from"./sidebar-DRSu2iBz.js";import{A as nt}from"./automation-runs-Y9TSuy3F.js";import{r as lt,u as ct,a as dt,b as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-C4SLs6YG.js";import{r as xt}from"./index-Dv19SgJH.js";import"./LayoutLeft-DvNM8qhm.js";import"./use-mobile-DhhfLpzh.js";import"./X-OFSHASit.js";import"./tooltip-Cs5hng3q.js";import"./select-CVMXwLRV.js";import"./Check-CcLLJc-z.js";import"./ChevronDown-BmFaSDo8.js";import"./ChevronUp-Dew3RmKl.js";import"./useInfiniteQuery-BosqZeNZ.js";import"./use-infinite-scroll-BTdf9pFZ.js";import"./use-connection-CcLotHiI.js";import"./use-collections-Cl7KVWNQ.js";import"./use-mcp-client-Bv8WGceO.js";import"./constants-CaIX_f5U.js";import"./auth-D_bm0-t3.js";import"./use-virtual-mcp-CMvxAHEJ.js";import"./card-Bc92PJFP.js";import"./table-CLRsCUXA.js";import"./empty-state-DD15-E7x.js";import"./use-members-eaM3vNiv.js";import"./use-org-auth-client-DYoTiK8H.js";import"./use-clock-tick-CB7NlnVZ.js";import"./AlertCircle-BsA2wZmN.js";import"./CheckCircle-lXciCGfG.js";import"./Circle-C_fdyhr8.js";import"./agent-icon-dPkJbbXq.js";import"./Tool01-DVCGutKV.js";import"./ArrowUp-CDnEKV2Y.js";import"./Settings02-CS2jOfO5.js";import"./Tool02-CSTMjTef.js";import"./XCircle-D3cI1Aep.js";import"./ArrowUpRight-DdPCnlNm.js";import"./TrendUp01-acR-ekUr.js";import"./ZapSquare-Dzb50Gix.js";import"./Users03-tGwfKVJc.js";import"./Loading02-Dx-xiZND.js";import"./ChevronRight-C3Tgk-3m.js";import"./Stars02-HLp9q8iP.js";import"./Copy01-b3lIb5yu.js";import"./ZoomOut-DYAXxr_v.js";import"./DotsVertical-CK1a4mKj.js";import"./Globe01-B6kdhpV9.js";import"./Eye-DM8bmzm7.js";import"./FilterLines-DCNZa1GS.js";import"./Star01-2DHf7kTZ.js";import"./Globe04-CGLGspo5.js";import"./SwitchHorizontal01-ilLzkPr_.js";import"./HardDrive-CR6Rs-a1.js";import"./Key01-1r4YrQER.js";import"./LinkExternal01-Ck4lryDE.js";import"./List-DfPIAPM_.js";import"./Monitor01-D_DrBwt_.js";import"./Sun-ByaEjJ0N.js";import"./Package-CV2Q9Uup.js";import"./Palette-BY5BmUDa.js";import"./Play-Ci1OqtIO.js";import"./Plus-Cgq7ON9K.js";import"./SearchLg-2as_l8YT.js";import"./SearchMd-ZfoTl6vw.js";import"./Shield01-C6TdRfmI.js";import"./Stars01-BEHbN5c3.js";import"./Trash01--uX5q_ti.js";import"./Upload01-BaheeKQP.js";import"./User01-5hu8D3_O.js";import"./Users01-Dh5E4dqf.js";import"./XClose-D5Ra7e-f.js";import"./Zap-CgjpaG4V.js";import"./use-automations-WNGih4F_.js";import"./studio-tools-CTswP4mA.js";import"./useSuspenseInfiniteQuery-Dh0QZdLF.js";import"./badge-BMMjntMn.js";import"./checkbox-B-y-IHdE.js";import"./command-DzGwZa9g.js";import"./index-DKyQrM3l.js";import"./dialog-DZtdYFi_.js";import"./popover-C5PoRwEk.js";import"./avatar-DOYkgu8W.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-B-pxrD6E.js";import"./file-type-icon-CuakGACj.js";import"./tab-id-bb-jjgGv.js";import"./monaco-editor-CiP0ChuC.js";import"./index-Cim2j5YD.js";import"./chat-context-Awe2cIoY.js";import"./autosend-qB5BaOSA.js";import"./hooks-GnFkomrq.js";import"./decopilot-sse-pool-CJtSg3wj.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-D77UFwvU.js";import"./use-decopilot-events-CWf9qNc0.js";import"./use-organization-settings-C4hP3pVq.js";import"./index-DPzJsdBC.js";import"./shell-layout-Bi4LjwsI.js";import"./alert-dialog-Bd5XLC3F.js";import"./required-auth-layout-R2McgzF5.js";import"./use-org-sso-DDm0m5Eb.js";import"./integration-icon-6pGkEdul.js";import"./use-navigate-to-agent-BsdctirU.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BHEk1VG5.js";import"./form-YJrSMpNL.js";import"./label-BULuaMoF.js";import"./input-D5ccsU_1.js";import"./switch-B36ltQ63.js";import"./drawer-Ck_Oak77.js";import"./collection-search-DSP3ov6A.js";import"./tabs-BoNNus4B.js";import"./toggle-group-DkGsY2u-.js";import"./use-deco-credits-1Xd5keqC.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CXwWR_5h.js";import"./use-registry-connections-xg-zrNmx.js";import"./extract-connection-data-Di6SAuY0.js";import"./collection-tabs-PTC62n_G.js";import"./textarea-DPLwPKZJ.js";import"./connection-form-helpers-POWe2kJ-.js";import"./authenticate-and-persist-oauth-ClCvWDci.js";import"./mcp-oauth-z9GFPjDo.js";import"./connect-desktop-dialog-DiutLBhU.js";import"./select-model-Cg3FzUNI.js";import"./skeleton-BZzqWIif.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BYCtjEaG.js";import"./dropdown-menu-C9SSwIby.js";import"./index-0yvnZiwb.js";import"./toolbar-CedVmC1P.js";import"./use-debounced-value-ChKSUuxz.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-Uz1qdvt2.js";import"./use-mcp-tools-_p3Gu3UX.js";import"./use-capability-DmeYLlad.js";import"./tools-list-DyAKlhYk.js";import"./use-debounced-autosave-teletZQd.js";import"./index-DS3hrf0F.js";import"./search-input-BREJK7qA.js";import"./github-repo-picker-VDMXf52q.js";import"./github-installations-D2vHSx02.js";import"./use-secrets-CdGKHqA-.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./index-DPKpPAQv.js";import"./get-initials-D-f_fDFw.js";import"./calendar-Io_vhk-a.js";import"./toolbar-icon-button-5fStNBy9.js";import"./use-file-configs-G_3bUBDS.js";import"./automation-list-row-ByoN-o6y.js";function Si(u){const t=it.c(46),{open:N,onOpenChange:P,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),k=m.kind==="site"?"site":m.pageKey,[Y,Z]=E.useState(k),[tt,i]=E.useState(null),[J,g]=E.useState(void 0),[x,y]=E.useState(0);Y!==k&&(Z(k),i(null),g(void 0),y(wt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),w=m.kind==="page",ot=w?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=w?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!w||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let j;t[0]!==s?(j=vt(s),t[0]=s,t[1]=j):j=t[1];const A=j;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const M=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const V=F,q=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,z=m.kind==="site"&&o&&n,B=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const H=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const $=O;let l;t[13]!==q?(l=e.jsx(mt,{className:"text-sm font-semibold",children:q}),t[13]=q,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==$||t[22]!==H||t[23]!==A||t[24]!==v||t[25]!==h||t[26]!==B||t[27]!==x||t[28]!==M||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==z||t[37]!==_?(S=!o||!T&&!z?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:B}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:A,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:H,onBumpFormKey:$}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:M})})})}),t[20]=p,t[21]=$,t[22]=H,t[23]=A,t[24]=v,t[25]=h,t[26]=B,t[27]=x,t[28]=M,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=z,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let b;return t[42]!==V||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:V,children:f}),t[42]=V,t[43]=N,t[44]=f,t[45]=b):b=t[45],b}function yt(u){return u+1}function wt(u){return u+1}export{Si as SeoSheet};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as V,j as t,a as D,M as F,af as q,a6 as B,R as N,t as T}from"./index-CsZhMKFM.js";import{P as L}from"./index-DS3hrf0F.js";import{A as U}from"./avatar-DOYkgu8W.js";import{S as I}from"./switch-B36ltQ63.js";import{S as G,a as Y,d as $,c as K}from"./select-CVMXwLRV.js";import{a as M,T as z}from"./toggle-group-DkGsY2u-.js";import{I as O}from"./input-D5ccsU_1.js";import{i as H}from"./Monitor01-D_DrBwt_.js";import{n as J,a as Q}from"./Sun-ByaEjJ0N.js";import{i as W}from"./Play-Ci1OqtIO.js";import{u as X}from"./use-debounced-autosave-teletZQd.js";import{p as Z,q as ee}from"./question-004-sINsf4GQ.js";import"./index-BraRl60q.js";import{c as te,b as A,S as E,a as R}from"./settings-section-BYCtjEaG.js";import"./sidebar-DRSu2iBz.js";import"./LayoutLeft-DvNM8qhm.js";import"./use-mobile-DhhfLpzh.js";import"./X-OFSHASit.js";import"./tooltip-Cs5hng3q.js";import"./User01-5hu8D3_O.js";import"./Check-CcLLJc-z.js";import"./ChevronDown-BmFaSDo8.js";import"./ChevronUp-Dew3RmKl.js";import"./card-Bc92PJFP.js";import"./ArrowUpRight-DdPCnlNm.js";function se(){const e=V.c(19),{data:s,isPending:o}=D.useSession(),v=s?.user,p=v?.image,h=v?.name??"";let S;e[0]!==h?(S={values:{name:h}},e[0]=h,e[1]=S):S=e[1];const n=F(S);let _;e[2]!==n?(_={save:async()=>{const g=n.control._formState.dirtyFields;if(Object.keys(g).length===0)return;const r=n.getValues(),f=n.control._defaultValues;n.reset(r,{keepValues:!0});try{await D.updateUser({name:r.name}),N("profile_updated",{fields:["name"]}),T.success("Profile updated successfully")}catch{n.reset(f,{keepValues:!0}),T.error("Failed to update profile")}}},e[2]=n,e[3]=_):_=e[3];const{schedule:x,flush:m}=X(_);if(o)return null;const j=v?.name??"U";let i;e[4]!==j||e[5]!==p?(i=t.jsx(A,{title:"Avatar",action:t.jsx(U,{url:p,fallback:j,shape:"circle",size:"base"})}),e[4]=j,e[5]=p,e[6]=i):i=e[6];let l;e[7]!==m||e[8]!==x?(l=g=>{const{field:r}=g;return t.jsx(O,{id:"display-name",...r,onChange:f=>{r.onChange(f),x()},onBlur:()=>{r.onBlur(),m()},onKeyDown:f=>{f.key==="Enter"&&m()},placeholder:"Your name",className:"w-[280px]"})},e[7]=m,e[8]=x,e[9]=l):l=e[9];let d;e[10]!==n.control||e[11]!==l?(d=t.jsx(A,{title:"Display name",action:t.jsx(q,{control:n.control,name:"name",render:l})}),e[10]=n.control,e[11]=l,e[12]=d):d=e[12];const b=v?.email;let a;e[13]!==b?(a=t.jsx(A,{title:"Email",action:t.jsx("span",{className:"text-sm text-muted-foreground",children:b})}),e[13]=b,e[14]=a):a=e[14];let u;return e[15]!==i||e[16]!==d||e[17]!==a?(u=t.jsx(E,{children:t.jsxs(R,{children:[i,d,a]})}),e[15]=i,e[16]=d,e[17]=a,e[18]=u):u=e[18],u}function oe(){const e=V.c(48),[s,o]=B();let v;e[0]!==o?(v=async c=>{if(c&&await Notification.requestPermission()!=="granted"){N("preferences_notifications_permission_denied"),T.error("Notifications denied. Please enable them in your browser settings."),o(ae);return}N("preferences_notifications_toggled",{enabled:c}),o(y=>({...y,enableNotifications:c}))},e[0]=o,e[1]=v):v=e[1];const p=v;let h;e[2]!==o?(h=c=>{c&&(N("preferences_theme_changed",{to_value:c}),o(y=>({...y,theme:c})))},e[2]=o,e[3]=h):h=e[3];let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(z,{value:"light","aria-label":"Light theme",children:t.jsx(J,{size:14})}),e[4]=S):S=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(z,{value:"dark","aria-label":"Dark theme",children:t.jsx(Q,{size:14})}),e[5]=n):n=e[5];let _;e[6]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(z,{value:"system","aria-label":"System theme",children:t.jsx(H,{size:14})}),e[6]=_):_=e[6];let x;e[7]!==s.theme||e[8]!==h?(x=t.jsx(A,{title:"Theme",description:"Your preferred color scheme.",action:t.jsxs(M,{type:"single",size:"sm",variant:"outline",value:s.theme,onValueChange:h,children:[S,n,_]})}),e[7]=s.theme,e[8]=h,e[9]=x):x=e[9];let m;e[10]!==p||e[11]!==s.enableNotifications?(m=typeof Notification<"u"?()=>p(!s.enableNotifications):void 0,e[10]=p,e[11]=s.enableNotifications,e[12]=m):m=e[12];let j;e[13]!==p||e[14]!==s.enableNotifications?(j=t.jsx(I,{disabled:typeof Notification>"u",checked:s.enableNotifications,onCheckedChange:p}),e[13]=p,e[14]=s.enableNotifications,e[15]=j):j=e[15];let i;e[16]!==m||e[17]!==j?(i=t.jsx(A,{title:"Notifications",description:"Receive browser notifications for important events.",onClick:m,action:j}),e[16]=m,e[17]=j,e[18]=i):i=e[18];let l;e[19]!==s.enableSounds||e[20]!==o?(l=()=>{N("preferences_sounds_toggled",{enabled:!s.enableSounds}),o(le)},e[19]=s.enableSounds,e[20]=o,e[21]=l):l=e[21];let d;e[22]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("button",{type:"button","aria-label":"Preview notification sound",onClick:ne,className:"size-6 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",children:t.jsx(W,{size:11})}),e[22]=d):d=e[22];let b;e[23]!==o?(b=c=>{N("preferences_sounds_toggled",{enabled:c}),o(y=>({...y,enableSounds:c}))},e[23]=o,e[24]=b):b=e[24];let a;e[25]!==s.enableSounds||e[26]!==b?(a=t.jsxs("div",{className:"flex items-center gap-2",children:[d,t.jsx(I,{checked:s.enableSounds,onCheckedChange:b})]}),e[25]=s.enableSounds,e[26]=b,e[27]=a):a=e[27];let u;e[28]!==a||e[29]!==l?(u=t.jsx(A,{title:"Sounds",description:"Play sounds for agent actions and notifications.",onClick:l,action:a}),e[28]=a,e[29]=l,e[30]=u):u=e[30];let g;e[31]!==o?(g=c=>{N("preferences_tool_approval_changed",{to_value:c}),o(y=>({...y,toolApprovalLevel:c}))},e[31]=o,e[32]=g):g=e[32];let r;e[33]!==s.toolApprovalLevel?(r={readonly:"Ask before edit",auto:"Auto approve"}[s.toolApprovalLevel]??"Ask before edit",e[33]=s.toolApprovalLevel,e[34]=r):r=e[34];let f;e[35]!==r?(f=t.jsx(Y,{className:"w-36 h-7 text-xs",children:t.jsx("span",{children:r})}),e[35]=r,e[36]=f):f=e[36];let C;e[37]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx($,{value:"readonly",textValue:"Ask before edit",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Ask before edit"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[37]=C):C=e[37];let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsxs(K,{children:[C,t.jsx($,{value:"auto",textValue:"Auto approve",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Auto approve"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all without approval"})]})})]}),e[38]=k):k=e[38];let P;e[39]!==s.toolApprovalLevel||e[40]!==g||e[41]!==f?(P=t.jsx(A,{title:"Tool Approval",description:"Control how tools are approved before execution.",action:t.jsxs(G,{value:s.toolApprovalLevel,onValueChange:g,children:[f,k]})}),e[39]=s.toolApprovalLevel,e[40]=g,e[41]=f,e[42]=P):P=e[42];let w;return e[43]!==u||e[44]!==P||e[45]!==x||e[46]!==i?(w=t.jsx(E,{title:"Preferences",children:t.jsxs(R,{children:[x,i,u,P]})}),e[43]=u,e[44]=P,e[45]=x,e[46]=i,e[47]=w):w=e[47],w}function ne(){N("preferences_sounds_previewed"),Z(ee.dataUri).catch(ie)}function ie(){}function le(e){return{...e,enableSounds:!e.enableSounds}}function ae(e){return{...e,enableNotifications:!1}}function re(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(L,{children:t.jsx(L.Content,{children:t.jsx(L.Body,{children:t.jsxs(te,{children:[t.jsx(L.Title,{children:"Profile & Preferences"}),t.jsx(se,{}),t.jsx(oe,{})]})})})}),e[0]=s):s=e[0],s}function De(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(re,{}),e[0]=s):s=e[0],s}export{De as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as $,a4 as H,j as v}from"./index-CsZhMKFM.js";import{a as L,g as E,s as b}from"./automation-runs-Y9TSuy3F.js";import{u as O}from"./use-mcp-client-Bv8WGceO.js";import{p as k}from"./constants-CaIX_f5U.js";import{b as q,c as B}from"./use-mcp-tools-_p3Gu3UX.js";import{u as Y}from"./index-Dv19SgJH.js";import{c as G}from"./monaco-editor-CiP0ChuC.js";import{g as K,M as V,a as w}from"./index-DPzJsdBC.js";import{b as z,a as F}from"./chat-context-Awe2cIoY.js";import{u as J}from"./shell-layout-Bi4LjwsI.js";import"./select-CVMXwLRV.js";import"./tooltip-Cs5hng3q.js";import"./Check-CcLLJc-z.js";import"./ChevronDown-BmFaSDo8.js";import"./ChevronUp-Dew3RmKl.js";import"./useInfiniteQuery-BosqZeNZ.js";import"./use-infinite-scroll-BTdf9pFZ.js";import"./use-connection-CcLotHiI.js";import"./use-collections-Cl7KVWNQ.js";import"./use-virtual-mcp-CMvxAHEJ.js";import"./card-Bc92PJFP.js";import"./sidebar-DRSu2iBz.js";import"./LayoutLeft-DvNM8qhm.js";import"./use-mobile-DhhfLpzh.js";import"./X-OFSHASit.js";import"./table-CLRsCUXA.js";import"./empty-state-DD15-E7x.js";import"./use-members-eaM3vNiv.js";import"./use-org-auth-client-DYoTiK8H.js";import"./use-clock-tick-CB7NlnVZ.js";import"./AlertCircle-BsA2wZmN.js";import"./CheckCircle-lXciCGfG.js";import"./Circle-C_fdyhr8.js";import"./agent-icon-dPkJbbXq.js";import"./Tool01-DVCGutKV.js";import"./ArrowUp-CDnEKV2Y.js";import"./Settings02-CS2jOfO5.js";import"./Tool02-CSTMjTef.js";import"./XCircle-D3cI1Aep.js";import"./ArrowUpRight-DdPCnlNm.js";import"./TrendUp01-acR-ekUr.js";import"./ZapSquare-Dzb50Gix.js";import"./Users03-tGwfKVJc.js";import"./Loading02-Dx-xiZND.js";import"./ChevronRight-C3Tgk-3m.js";import"./Stars02-HLp9q8iP.js";import"./Copy01-b3lIb5yu.js";import"./ZoomOut-DYAXxr_v.js";import"./DotsVertical-CK1a4mKj.js";import"./Globe01-B6kdhpV9.js";import"./Eye-DM8bmzm7.js";import"./FilterLines-DCNZa1GS.js";import"./Star01-2DHf7kTZ.js";import"./Globe04-CGLGspo5.js";import"./SwitchHorizontal01-ilLzkPr_.js";import"./HardDrive-CR6Rs-a1.js";import"./Key01-1r4YrQER.js";import"./LinkExternal01-Ck4lryDE.js";import"./List-DfPIAPM_.js";import"./Monitor01-D_DrBwt_.js";import"./Sun-ByaEjJ0N.js";import"./Package-CV2Q9Uup.js";import"./Palette-BY5BmUDa.js";import"./Play-Ci1OqtIO.js";import"./Plus-Cgq7ON9K.js";import"./SearchLg-2as_l8YT.js";import"./SearchMd-ZfoTl6vw.js";import"./Shield01-C6TdRfmI.js";import"./Stars01-BEHbN5c3.js";import"./Trash01--uX5q_ti.js";import"./Upload01-BaheeKQP.js";import"./User01-5hu8D3_O.js";import"./Users01-Dh5E4dqf.js";import"./XClose-D5Ra7e-f.js";import"./Zap-CgjpaG4V.js";import"./use-automations-WNGih4F_.js";import"./studio-tools-CTswP4mA.js";import"./useSuspenseInfiniteQuery-Dh0QZdLF.js";import"./badge-BMMjntMn.js";import"./checkbox-B-y-IHdE.js";import"./command-DzGwZa9g.js";import"./index-DKyQrM3l.js";import"./dialog-DZtdYFi_.js";import"./popover-C5PoRwEk.js";import"./avatar-DOYkgu8W.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-B-pxrD6E.js";import"./file-type-icon-CuakGACj.js";import"./tab-id-bb-jjgGv.js";import"./hooks-GnFkomrq.js";import"./decopilot-sse-pool-CJtSg3wj.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./integration-icon-6pGkEdul.js";import"./use-navigate-to-agent-BsdctirU.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BHEk1VG5.js";import"./form-YJrSMpNL.js";import"./label-BULuaMoF.js";import"./input-D5ccsU_1.js";import"./auth-D_bm0-t3.js";import"./drawer-Ck_Oak77.js";import"./collection-search-DSP3ov6A.js";import"./autosend-qB5BaOSA.js";import"./tabs-BoNNus4B.js";import"./toggle-group-DkGsY2u-.js";import"./use-deco-credits-1Xd5keqC.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CXwWR_5h.js";import"./use-registry-connections-xg-zrNmx.js";import"./use-organization-settings-C4hP3pVq.js";import"./extract-connection-data-Di6SAuY0.js";import"./collection-tabs-PTC62n_G.js";import"./textarea-DPLwPKZJ.js";import"./connection-form-helpers-POWe2kJ-.js";import"./authenticate-and-persist-oauth-ClCvWDci.js";import"./mcp-oauth-z9GFPjDo.js";import"./use-ai-providers-D77UFwvU.js";import"./connect-desktop-dialog-DiutLBhU.js";import"./select-model-Cg3FzUNI.js";import"./skeleton-BZzqWIif.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BYCtjEaG.js";import"./dropdown-menu-C9SSwIby.js";import"./index-0yvnZiwb.js";import"./alert-dialog-Bd5XLC3F.js";import"./toolbar-CedVmC1P.js";import"./use-debounced-value-ChKSUuxz.js";import"./index-Cim2j5YD.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-Uz1qdvt2.js";import"./use-decopilot-events-CWf9qNc0.js";import"./use-capability-DmeYLlad.js";import"./tools-list-DyAKlhYk.js";import"./switch-B36ltQ63.js";import"./use-debounced-autosave-teletZQd.js";import"./index-DS3hrf0F.js";import"./search-input-BREJK7qA.js";import"./github-repo-picker-VDMXf52q.js";import"./github-installations-D2vHSx02.js";import"./use-secrets-CdGKHqA-.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./index-DPKpPAQv.js";import"./get-initials-D-f_fDFw.js";import"./calendar-Io_vhk-a.js";import"./toolbar-icon-button-5fStNBy9.js";import"./use-file-configs-G_3bUBDS.js";import"./automation-list-row-ByoN-o6y.js";import"./required-auth-layout-R2McgzF5.js";import"./use-org-sso-DDm0m5Eb.js";const Q={};function W(A){const t=$.c(37),{client:i,resourceURI:h,tool:o,connectionId:p,orgId:l,args:M}=A,{sendMessage:I}=z(),{setAppContext:u,clearAppContext:n}=F(),{openSidePanel:f,openTab:g}=J(),r=`${p}:${o.name}`;let a;t[0]!==g?(a=C=>C==="inline"?(g("0"),"inline"):"fullscreen",t[0]=g,t[1]=a):a=t[1];const m=a,s=M??Q;let c;t[2]!==i||t[3]!==o.name||t[4]!==s?(c={client:i,toolName:o.name,toolArguments:s},t[2]=i,t[3]=o.name,t[4]=s,t[5]=c):c=t[5];const{data:e}=B(c);let x;if(t[6]!==o._meta||t[7]!==o.name){const C=E(o._meta);x=b(o.name,C),t[6]=o._meta,t[7]=o.name,t[8]=x}else x=t[8];const U=x;let d;t[9]!==o.inputSchema?(d=o.inputSchema??{type:"object"},t[9]=o.inputSchema,t[10]=d):d=t[10];let N;t[11]!==U||t[12]!==d||t[13]!==o?(N={...o,name:U,inputSchema:d},t[11]=U,t[12]=d,t[13]=o,t[14]=N):N=t[14];const j=N;let S;t[15]!==f||t[16]!==I?(S=C=>{const D=G(C.content);D.content.length>0&&(f("chat"),I({tiptapDoc:D}))},t[15]=f,t[16]=I,t[17]=S):S=t[17];const y=S;let P;t[18]!==j?(P={tool:j},t[18]=j,t[19]=P):P=t[19];let T;t[20]!==u||t[21]!==r?(T=C=>u(r,C),t[20]=u,t[21]=r,t[22]=T):T=t[22];let R;t[23]!==n||t[24]!==r?(R=()=>n(r),t[23]=n,t[24]=r,t[25]=R):R=t[25];let _;return t[26]!==i||t[27]!==y||t[28]!==m||t[29]!==l||t[30]!==h||t[31]!==P||t[32]!==T||t[33]!==R||t[34]!==s||t[35]!==e?(_=v.jsx(V,{resourceURI:h,orgId:l,toolInfo:P,toolInput:s,toolResult:e,displayMode:"fullscreen",minHeight:w.fullscreen.minHeight,maxHeight:w.fullscreen.maxHeight,client:i,onMessage:y,onUpdateModelContext:T,onTeardown:R,onRequestDisplayMode:m,className:"h-full"}),t[26]=i,t[27]=y,t[28]=m,t[29]=l,t[30]=h,t[31]=P,t[32]=T,t[33]=R,t[34]=s,t[35]=e,t[36]=_):_=t[36],_}function Br(A){const t=$.c(24),{connectionId:i,toolName:h,args:o}=A,{org:p}=H(),l=Y();let M;t[0]!==i||t[1]!==l?(M=k(i)&&l.vmEntry?.sandboxProviderKind==="user-desktop"&&l.previewUrl?`${l.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=i,t[1]=l,t[2]=M):M=t[2];const I=M;let u;t[3]!==i||t[4]!==I||t[5]!==p.id||t[6]!==p.slug?(u={connectionId:i,orgId:p.id,orgSlug:p.slug,mcpUrl:I},t[3]=i,t[4]=I,t[5]=p.id,t[6]=p.slug,t[7]=u):u=t[7];const n=O(u);let f;t[8]!==n?(f={client:n},t[8]=n,t[9]=f):f=t[9];const{data:g}=q(f);let r,a,m;t[10]!==h||t[11]!==g.tools?(r=L(decodeURIComponent(h)),m=g.tools.find(e=>e.name===r)??g.tools.find(e=>{const x=E(e._meta);if(!x)return!1;if(b(e.name,x)===r)return!0;const d=b(r,x);return d!==r&&e.name===d}),a=m?._meta?K(m._meta):void 0,t[10]=h,t[11]=g.tools,t[12]=r,t[13]=a,t[14]=m):(r=t[12],a=t[13],m=t[14]);const s=a;if(!m||!s){let e;return t[15]!==r?(e=v.jsx("div",{className:"flex items-center justify-center h-full w-full",children:v.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',r,'" not found or has no UI']})}),t[15]=r,t[16]=e):e=t[16],e}let c;return t[17]!==o||t[18]!==n||t[19]!==i||t[20]!==p.id||t[21]!==s||t[22]!==m?(c=v.jsx(W,{client:n,resourceURI:s,tool:m,connectionId:i,orgId:p.id,args:o}),t[17]=o,t[18]=n,t[19]=i,t[20]=p.id,t[21]=s,t[22]=m,t[23]=c):c=t[23],c}export{Br as AppViewContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as S,j as r}from"./index-CsZhMKFM.js";import{I as T}from"./input-D5ccsU_1.js";import{L as C}from"./label-BULuaMoF.js";import{T as L}from"./textarea-DPLwPKZJ.js";import{v as A,w as R,o as D,x as J,I as K}from"./index-Dv19SgJH.js";import{u as M,s as P}from"./primitives-BEmjSMO9.js";import"./ArrowUp-CDnEKV2Y.js";import"./chat-context-Awe2cIoY.js";import"./autosend-qB5BaOSA.js";import"./hooks-GnFkomrq.js";import"./use-mcp-client-Bv8WGceO.js";import"./constants-CaIX_f5U.js";import"./auth-D_bm0-t3.js";import"./decopilot-sse-pool-CJtSg3wj.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-CTswP4mA.js";import"./use-virtual-mcp-CMvxAHEJ.js";import"./use-collections-Cl7KVWNQ.js";import"./use-ai-providers-D77UFwvU.js";import"./use-decopilot-events-CWf9qNc0.js";import"./tab-id-bb-jjgGv.js";import"./use-organization-settings-C4hP3pVq.js";import"./automation-runs-Y9TSuy3F.js";import"./select-CVMXwLRV.js";import"./tooltip-Cs5hng3q.js";import"./Check-CcLLJc-z.js";import"./ChevronDown-BmFaSDo8.js";import"./ChevronUp-Dew3RmKl.js";import"./useInfiniteQuery-BosqZeNZ.js";import"./use-infinite-scroll-BTdf9pFZ.js";import"./use-connection-CcLotHiI.js";import"./card-Bc92PJFP.js";import"./sidebar-DRSu2iBz.js";import"./LayoutLeft-DvNM8qhm.js";import"./use-mobile-DhhfLpzh.js";import"./X-OFSHASit.js";import"./table-CLRsCUXA.js";import"./empty-state-DD15-E7x.js";import"./use-members-eaM3vNiv.js";import"./use-org-auth-client-DYoTiK8H.js";import"./use-clock-tick-CB7NlnVZ.js";import"./AlertCircle-BsA2wZmN.js";import"./CheckCircle-lXciCGfG.js";import"./Circle-C_fdyhr8.js";import"./agent-icon-dPkJbbXq.js";import"./Tool01-DVCGutKV.js";import"./Settings02-CS2jOfO5.js";import"./Tool02-CSTMjTef.js";import"./XCircle-D3cI1Aep.js";import"./ArrowUpRight-DdPCnlNm.js";import"./TrendUp01-acR-ekUr.js";import"./ZapSquare-Dzb50Gix.js";import"./Users03-tGwfKVJc.js";import"./Loading02-Dx-xiZND.js";import"./ChevronRight-C3Tgk-3m.js";import"./Stars02-HLp9q8iP.js";import"./Copy01-b3lIb5yu.js";import"./ZoomOut-DYAXxr_v.js";import"./DotsVertical-CK1a4mKj.js";import"./Globe01-B6kdhpV9.js";import"./Eye-DM8bmzm7.js";import"./FilterLines-DCNZa1GS.js";import"./Star01-2DHf7kTZ.js";import"./Globe04-CGLGspo5.js";import"./SwitchHorizontal01-ilLzkPr_.js";import"./HardDrive-CR6Rs-a1.js";import"./Key01-1r4YrQER.js";import"./LinkExternal01-Ck4lryDE.js";import"./List-DfPIAPM_.js";import"./Monitor01-D_DrBwt_.js";import"./Sun-ByaEjJ0N.js";import"./Package-CV2Q9Uup.js";import"./Palette-BY5BmUDa.js";import"./Play-Ci1OqtIO.js";import"./Plus-Cgq7ON9K.js";import"./SearchLg-2as_l8YT.js";import"./SearchMd-ZfoTl6vw.js";import"./Shield01-C6TdRfmI.js";import"./Stars01-BEHbN5c3.js";import"./Trash01--uX5q_ti.js";import"./Upload01-BaheeKQP.js";import"./User01-5hu8D3_O.js";import"./Users01-Dh5E4dqf.js";import"./XClose-D5Ra7e-f.js";import"./Zap-CgjpaG4V.js";import"./use-automations-WNGih4F_.js";import"./useSuspenseInfiniteQuery-Dh0QZdLF.js";import"./badge-BMMjntMn.js";import"./checkbox-B-y-IHdE.js";import"./command-DzGwZa9g.js";import"./index-DKyQrM3l.js";import"./dialog-DZtdYFi_.js";import"./popover-C5PoRwEk.js";import"./avatar-DOYkgu8W.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-B-pxrD6E.js";import"./file-type-icon-CuakGACj.js";import"./monaco-editor-CiP0ChuC.js";import"./index-Cim2j5YD.js";import"./index-DPzJsdBC.js";import"./shell-layout-Bi4LjwsI.js";import"./alert-dialog-Bd5XLC3F.js";import"./required-auth-layout-R2McgzF5.js";import"./use-org-sso-DDm0m5Eb.js";import"./integration-icon-6pGkEdul.js";import"./use-navigate-to-agent-BsdctirU.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-BHEk1VG5.js";import"./form-YJrSMpNL.js";import"./drawer-Ck_Oak77.js";import"./collection-search-DSP3ov6A.js";import"./tabs-BoNNus4B.js";import"./toggle-group-DkGsY2u-.js";import"./use-deco-credits-1Xd5keqC.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CXwWR_5h.js";import"./use-registry-connections-xg-zrNmx.js";import"./extract-connection-data-Di6SAuY0.js";import"./collection-tabs-PTC62n_G.js";import"./connection-form-helpers-POWe2kJ-.js";import"./authenticate-and-persist-oauth-ClCvWDci.js";import"./mcp-oauth-z9GFPjDo.js";import"./connect-desktop-dialog-DiutLBhU.js";import"./select-model-Cg3FzUNI.js";import"./skeleton-BZzqWIif.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BYCtjEaG.js";import"./dropdown-menu-C9SSwIby.js";import"./index-0yvnZiwb.js";import"./toolbar-CedVmC1P.js";import"./use-debounced-value-ChKSUuxz.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-Uz1qdvt2.js";import"./use-mcp-tools-_p3Gu3UX.js";import"./use-capability-DmeYLlad.js";import"./tools-list-DyAKlhYk.js";import"./switch-B36ltQ63.js";import"./use-debounced-autosave-teletZQd.js";import"./index-DS3hrf0F.js";import"./search-input-BREJK7qA.js";import"./github-repo-picker-VDMXf52q.js";import"./github-installations-D2vHSx02.js";import"./use-secrets-CdGKHqA-.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./index-DPKpPAQv.js";import"./get-initials-D-f_fDFw.js";import"./calendar-Io_vhk-a.js";import"./toolbar-icon-button-5fStNBy9.js";import"./use-file-configs-G_3bUBDS.js";import"./automation-list-row-ByoN-o6y.js";const $={authors:[{key:"name",label:"Name",widget:"text"},{key:"email",label:"Email",widget:"text",placeholder:"author@example.com"},{key:"jobTitle",label:"Job title",widget:"text"},{key:"company",label:"Company",widget:"text"},{key:"avatar",label:"Avatar",widget:"image"}]},q={authors:"Author"};function Lr(B){const t=S.c(34),{orgSlug:v,virtualMcpId:j,branch:w,kind:p,blockKey:g,block:f}=B;let y;t[0]!==w||t[1]!==v||t[2]!==j?(y={orgSlug:v,virtualMcpId:j,branch:w},t[0]=w,t[1]=v,t[2]=j,t[3]=y):y=t[3];const m=A(y);let d;t[4]!==f||t[5]!==p?(d=R(f,p),t[4]=f,t[5]=p,t[6]=d):d=t[6];const F=d;let h;t[7]!==g||t[8]!==p||t[9]!==m?(h=e=>{m.mutate({blockKey:g,data:J(g,p,e)})},t[7]=g,t[8]=p,t[9]=m,t[10]=h):h=t[10];const[i,E]=M(F,h);let k;t[11]!==i||t[12]!==E?(k=(e,o)=>E({...i,[e]:o}),t[11]=i,t[12]=E,t[13]=k):k=t[13];const a=k,N=q[p];let s;t[14]!==N?(s=r.jsx("span",{className:"text-sm font-medium",children:N}),t[14]=N,t[15]=s):s=t[15];let l;t[16]!==m.isError||t[17]!==m.isPending?(l=r.jsx(D,{isPending:m.isPending,isError:m.isError}),t[16]=m.isError,t[17]=m.isPending,t[18]=l):l=t[18];let n;t[19]!==s||t[20]!==l?(n=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[s,l]}),t[19]=s,t[20]=l,t[21]=n):n=t[21];const I=$[p];let c;if(t[22]!==i||t[23]!==a||t[24]!==I){let e;t[26]!==i||t[27]!==a?(e=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(K,{schema:{type:"string",format:"image-uri",title:o.label},value:i[o.key],onChange:u=>a(o.key,u),path:o.key,label:o.label}):r.jsxs(r.Fragment,{children:[r.jsx(C,{htmlFor:o.key,children:o.label}),o.widget==="textarea"?r.jsx(L,{id:o.key,value:P(i[o.key]),onChange:u=>a(o.key,u.target.value),rows:3}):r.jsx(T,{id:o.key,value:P(i[o.key]),placeholder:o.placeholder,onChange:u=>a(o.key,u.target.value),className:"h-10"})]})},o.key),t[26]=i,t[27]=a,t[28]=e):e=t[28],c=I.map(e),t[22]=i,t[23]=a,t[24]=I,t[25]=c}else c=t[25];let x;t[29]!==c?(x=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:c})}),t[29]=c,t[30]=x):x=t[30];let b;return t[31]!==x||t[32]!==n?(b=r.jsxs("div",{className:"flex h-full flex-col",children:[n,x]}),t[31]=x,t[32]=n,t[33]=b):b=t[33],b}export{Lr as RecordEditor};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-BDNmgEhN.js","assets/index-CsZhMKFM.js","assets/index-DhnTILyr.css","assets/Tool02-CSTMjTef.js","assets/CheckCircle-lXciCGfG.js","assets/Settings02-CS2jOfO5.js","assets/use-mcp-client-Bv8WGceO.js","assets/constants-CaIX_f5U.js","assets/auth-D_bm0-t3.js","assets/useInfiniteQuery-BosqZeNZ.js","assets/use-infinite-scroll-BTdf9pFZ.js","assets/studio-tools-CTswP4mA.js","assets/badge-BMMjntMn.js","assets/input-D5ccsU_1.js","assets/dropdown-menu-C9SSwIby.js","assets/Check-CcLLJc-z.js","assets/ChevronRight-C3Tgk-3m.js","assets/Circle-C_fdyhr8.js","assets/table-CLRsCUXA.js","assets/toggle-group-DkGsY2u-.js","assets/use-view-mode-H6oFviHU.js","assets/use-mobile-DhhfLpzh.js","assets/DotsVertical-CK1a4mKj.js","assets/FilterLines-DCNZa1GS.js","assets/Globe01-B6kdhpV9.js","assets/SearchMd-ZfoTl6vw.js","assets/dialog-DZtdYFi_.js","assets/X-OFSHASit.js","assets/AlertCircle-BsA2wZmN.js","assets/Upload01-BaheeKQP.js","assets/alert-dialog-Bd5XLC3F.js","assets/card-Bc92PJFP.js","assets/Trash01--uX5q_ti.js","assets/label-BULuaMoF.js","assets/select-CVMXwLRV.js","assets/tooltip-Cs5hng3q.js","assets/ChevronDown-BmFaSDo8.js","assets/ChevronUp-Dew3RmKl.js","assets/switch-B36ltQ63.js","assets/textarea-DPLwPKZJ.js","assets/XCircle-D3cI1Aep.js","assets/checkbox-B-y-IHdE.js","assets/Eye-DM8bmzm7.js","assets/LinkExternal01-Ck4lryDE.js","assets/use-copy-B-pxrD6E.js","assets/Copy01-b3lIb5yu.js","assets/Key01-1r4YrQER.js","assets/Plus-Cgq7ON9K.js","assets/mcp-oauth-z9GFPjDo.js","assets/Play-Ci1OqtIO.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as s,j as e,r as i,i as a,aW as o}from"./index-CsZhMKFM.js";import{R as m}from"./require-capability-BjscC7QS.js";import"./use-capability-DmeYLlad.js";import"./access-gate-B4XS-sin.js";import"./capability-load-error-COzn8-Xb.js";const n=i.lazy(()=>o(()=>import("./registry-layout-BDNmgEhN.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49])));function f(){const r=s.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(m,{capability:"registry:manage",area:"the registry",children:e.jsx(i.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(n,{})})}),r[0]=t):t=r[0],t}export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as $,a4 as Se,K as re,b3 as dt,m as Re,j as s,l as K,i as fe,B as ne,c as H,H as Pe,ab as Ie,I as se,ad as De,ae as ke,n as $e,M as mt,J as ut,d as Fe,t as he,R as Oe,_ as Ke,$ as ft,U as ht,b as gt,u as xt}from"./index-CsZhMKFM.js";import{u as pt}from"./use-organization-roles-CcwnCugJ.js";import{u as je}from"./use-org-auth-client-DYoTiK8H.js";import{B as ge}from"./badge-BMMjntMn.js";import{f as Qe,a as He,b as qe,c as Ze,d as Je,A as Xe,e as We,g as et}from"./alert-dialog-Bd5XLC3F.js";import{D as bt,a as Tt,c as Et,d as _t}from"./dropdown-menu-C9SSwIby.js";import{i as It}from"./DotsVertical-CK1a4mKj.js";import{s as Ae}from"./Plus-Cgq7ON9K.js";import{s as St}from"./Trash01--uX5q_ti.js";import{C as Nt}from"./collection-table-wrapper-CeR2zvlX.js";import{P as te}from"./index-DS3hrf0F.js";import{E as Ge}from"./empty-state-DD15-E7x.js";import{S as ve}from"./search-input-BREJK7qA.js";import{P as tt,D as st}from"./ai-providers-logos-DD3qZ33J.js";import{I as ye}from"./integration-icon-6pGkEdul.js";import{u as Ct}from"./use-infinite-scroll-BTdf9pFZ.js";import{C as Me}from"./checkbox-B-y-IHdE.js";import{b as At}from"./Settings02-CS2jOfO5.js";import{u as Rt}from"./useSuspenseInfiniteQuery-Dh0QZdLF.js";import{u as Ot}from"./use-mcp-client-Bv8WGceO.js";import{S as jt}from"./constants-CaIX_f5U.js";import{C as vt}from"./collection-search-DSP3ov6A.js";import{u as nt}from"./use-members-eaM3vNiv.js";import{g as lt}from"./get-initials-D-f_fDFw.js";import{u as yt}from"./use-connection-CcLotHiI.js";import{u as Mt,c as wt}from"./use-ai-providers-D77UFwvU.js";import{A as ot}from"./avatar-DOYkgu8W.js";import{S as xe}from"./switch-B36ltQ63.js";import{c as pe,T as be,a as Te,b as Ee}from"./tooltip-Cs5hng3q.js";import{S as Ue,a as Be,b as Ve}from"./settings-section-BYCtjEaG.js";import{t as Lt}from"./ChevronDown-BmFaSDo8.js";import{i as Pt}from"./ChevronRight-C3Tgk-3m.js";import{i as ze}from"./X-OFSHASit.js";import{a as Dt}from"./use-capability-DmeYLlad.js";import{A as kt}from"./access-gate-B4XS-sin.js";import"./Check-CcLLJc-z.js";import"./Circle-C_fdyhr8.js";import"./table-CLRsCUXA.js";import"./ArrowUp-CDnEKV2Y.js";import"./sidebar-DRSu2iBz.js";import"./LayoutLeft-DvNM8qhm.js";import"./use-mobile-DhhfLpzh.js";import"./SearchMd-ZfoTl6vw.js";import"./Tool02-CSTMjTef.js";import"./agent-icon-dPkJbbXq.js";import"./AlertCircle-BsA2wZmN.js";import"./Tool01-DVCGutKV.js";import"./XCircle-D3cI1Aep.js";import"./ArrowUpRight-DdPCnlNm.js";import"./TrendUp01-acR-ekUr.js";import"./ZapSquare-Dzb50Gix.js";import"./Users03-tGwfKVJc.js";import"./Loading02-Dx-xiZND.js";import"./CheckCircle-lXciCGfG.js";import"./ChevronUp-Dew3RmKl.js";import"./Stars02-HLp9q8iP.js";import"./Copy01-b3lIb5yu.js";import"./ZoomOut-DYAXxr_v.js";import"./Globe01-B6kdhpV9.js";import"./Eye-DM8bmzm7.js";import"./FilterLines-DCNZa1GS.js";import"./Star01-2DHf7kTZ.js";import"./Globe04-CGLGspo5.js";import"./SwitchHorizontal01-ilLzkPr_.js";import"./HardDrive-CR6Rs-a1.js";import"./Key01-1r4YrQER.js";import"./LinkExternal01-Ck4lryDE.js";import"./List-DfPIAPM_.js";import"./Monitor01-D_DrBwt_.js";import"./Sun-ByaEjJ0N.js";import"./Package-CV2Q9Uup.js";import"./Palette-BY5BmUDa.js";import"./Play-Ci1OqtIO.js";import"./SearchLg-2as_l8YT.js";import"./Shield01-C6TdRfmI.js";import"./Stars01-BEHbN5c3.js";import"./Upload01-BaheeKQP.js";import"./User01-5hu8D3_O.js";import"./Users01-Dh5E4dqf.js";import"./XClose-D5Ra7e-f.js";import"./Zap-CgjpaG4V.js";import"./auth-D_bm0-t3.js";import"./use-collections-Cl7KVWNQ.js";import"./studio-tools-CTswP4mA.js";import"./card-Bc92PJFP.js";import"./capability-load-error-COzn8-Xb.js";const we="basic-usage",Le=[{id:we,label:"Basic Usage",description:"Tools all org members can access by default",section:"Basic Usage",tools:["COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET","CONNECTION_TEST","COLLECTION_VIRTUAL_MCP_LIST","COLLECTION_VIRTUAL_MCP_GET","VIRTUAL_MCP_PLUGIN_CONFIG_GET","VIRTUAL_MCP_LAST_USED_LIST","AUTOMATION_GET","AUTOMATION_LIST","AUTOMATION_RUN_STATS","AI_PROVIDERS_LIST","AI_PROVIDERS_LIST_MODELS","AI_PROVIDERS_ACTIVE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_CREDITS","AI_PROVIDER_TOPUP_URL","LIST_OBJECTS","GET_OBJECT_METADATA","GET_PRESIGNED_URL","PUT_PRESIGNED_URL","FILE_OBJECTS_LIST","SANDBOX_START","SANDBOX_DELETE","GLOBAL_SEARCH","ORGANIZATION_SETTINGS_GET","USER_GET","LINK_CURRENT_GET","LINK_DISCONNECT","BRAND_CONTEXT_LIST","COLLECTION_THREADS_CREATE","COLLECTION_THREADS_LIST","COLLECTION_THREADS_GET","COLLECTION_THREADS_UPDATE","COLLECTION_THREADS_DELETE","COLLECTION_THREAD_MESSAGES_LIST","THREAD_BACKGROUND_TOOL_START","THREAD_SUBTASK_DELIVER","TASK_BOARD_ITEM_CREATE","TASK_BOARD_ITEM_LIST","TASK_BOARD_ITEM_UPDATE","TASK_BOARD_ITEM_DELETE"]},{id:"org:manage",label:"Manage organization",description:"Edit organization settings, brand context, and domain configuration",section:"Organization",tools:["ORGANIZATION_GET","ORGANIZATION_LIST","ORGANIZATION_UPDATE","ORGANIZATION_SETTINGS_GET","ORGANIZATION_SETTINGS_UPDATE","BRAND_CONTEXT_LIST","BRAND_CONTEXT_GET","BRAND_CONTEXT_CREATE","BRAND_CONTEXT_UPDATE","BRAND_CONTEXT_DELETE","BRAND_CONTEXT_EXTRACT","BRAND_GET","BRAND_LIST","ORGANIZATION_DOMAIN_LIST","ORGANIZATION_DOMAIN_ADD","ORGANIZATION_DOMAIN_UPDATE","ORGANIZATION_DOMAIN_VERIFY","ORGANIZATION_DOMAIN_REMOVE"]},{id:"members:manage",label:"Manage members",description:"Invite members, remove them, and change their roles",section:"Organization",tools:["ORGANIZATION_MEMBER_LIST","ORGANIZATION_MEMBER_ADD","ORGANIZATION_MEMBER_REMOVE","ORGANIZATION_MEMBER_UPDATE_ROLE","ORGANIZATION_JOIN_REQUEST_LIST","ORGANIZATION_JOIN_REQUEST_APPROVE","ORGANIZATION_JOIN_REQUEST_DENY"],dangerous:!0},{id:"connections:manage",label:"Manage connections",description:"Create, update, and delete connections",section:"Connections & Agents",tools:["COLLECTION_CONNECTIONS_CREATE","COLLECTION_CONNECTIONS_UPDATE","COLLECTION_CONNECTIONS_DELETE","COMMERCE_DISCOVERY_SETUP","COMMERCE_DISCOVERY_RUN","COMMERCE_DISCOVERY_BIND","COMMERCE_DISCOVERY_CONNECTION_STATUS"],dangerous:!0},{id:"agents:manage",label:"Manage agents",description:"Create, configure, and delete agents",section:"Connections & Agents",tools:["COLLECTION_VIRTUAL_MCP_CREATE","COLLECTION_VIRTUAL_MCP_UPDATE","COLLECTION_VIRTUAL_MCP_DELETE","VIRTUAL_MCP_PLUGIN_CONFIG_UPDATE","VIRTUAL_MCP_PINNED_VIEWS_UPDATE"],dangerous:!0},{id:"automations:manage",label:"Manage automations",description:"Create, update, run, and delete automations",section:"Automations",tools:["AUTOMATION_CREATE","AUTOMATION_UPDATE","AUTOMATION_DELETE","AUTOMATION_TRIGGER_ADD","AUTOMATION_TRIGGER_REMOVE","AUTOMATION_TRIGGER_ROTATE_TOKEN","AUTOMATION_RUN"],dangerous:!0},{id:"monitoring:view",label:"View monitoring",description:"Access logs and usage statistics",section:"Monitoring",tools:["MONITORING_LOG_GET","MONITORING_LOGS_LIST","MONITORING_STATS","MONITORING_THREAD_USAGE"]},{id:"secrets:manage",label:"Manage secrets",description:"Create and list secrets stored in the credential vault",section:"Organization",tools:["SECRET_CREATE","SECRET_LIST"]},{id:"file-configs:manage",label:"Manage file configs",description:"Create, list, update and delete S3 bucket configurations",section:"Organization",tools:["FILE_CONFIG_CREATE","FILE_CONFIG_LIST","FILE_CONFIG_UPDATE","FILE_CONFIG_DELETE","FILE_OBJECTS_LIST"]},{id:"ai-providers:manage",label:"Manage AI providers",description:"Add or remove API keys and provision provider credentials",section:"AI Providers",tools:["AI_PROVIDER_KEY_CREATE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_KEY_DELETE","AI_PROVIDER_KEY_UPDATE","AI_PROVIDER_KEY_PREVIEW","AI_PROVIDER_OAUTH_URL","AI_PROVIDER_OAUTH_EXCHANGE","AI_PROVIDER_PROVISION_KEY","AI_PROVIDER_TOPUP_URL","AI_PROVIDER_CREDITS"]},{id:"tags:manage",label:"Manage tags",description:"Create, assign, and delete organization tags",section:"Organization",tools:["TAGS_LIST","TAGS_CREATE","TAGS_DELETE","MEMBER_TAGS_GET","MEMBER_TAGS_SET"]},{id:"registry:manage",label:"Manage registry",description:"Browse, publish, and manage items in the registry",section:"Store & Registry",tools:["COLLECTION_REGISTRY_APP_LIST","COLLECTION_REGISTRY_APP_GET","COLLECTION_REGISTRY_APP_VERSIONS","COLLECTION_REGISTRY_APP_FILTERS","REGISTRY_ITEM_LIST","REGISTRY_ITEM_SEARCH","REGISTRY_ITEM_GET","REGISTRY_ITEM_VERSIONS","REGISTRY_ITEM_FILTERS","REGISTRY_DISCOVER_TOOLS","REGISTRY_ITEM_CREATE","REGISTRY_ITEM_BULK_CREATE","REGISTRY_ITEM_UPDATE","REGISTRY_ITEM_DELETE","REGISTRY_AI_GENERATE","REGISTRY_PUBLISH_REQUEST_LIST","REGISTRY_PUBLISH_REQUEST_REVIEW","REGISTRY_PUBLISH_REQUEST_COUNT","REGISTRY_PUBLISH_REQUEST_DELETE","REGISTRY_PUBLISH_API_KEY_GENERATE","REGISTRY_PUBLISH_API_KEY_LIST","REGISTRY_PUBLISH_API_KEY_REVOKE"],dangerous:!0},{id:"registry:monitor",label:"Monitor registry health",description:"Run health checks on registry connections and view results",section:"Store & Registry",tools:["REGISTRY_MONITOR_RUN_START","REGISTRY_MONITOR_RUN_LIST","REGISTRY_MONITOR_RUN_GET","REGISTRY_MONITOR_RUN_CANCEL","REGISTRY_MONITOR_RESULT_LIST","REGISTRY_MONITOR_CONNECTION_LIST","REGISTRY_MONITOR_CONNECTION_SYNC","REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH"]},{id:"api-keys:manage",label:"Manage API keys",description:"Create, update, and revoke API keys",section:"Developer",tools:["API_KEY_CREATE","API_KEY_LIST","API_KEY_UPDATE","API_KEY_DELETE"]},{id:"storage:delete",label:"Delete from storage",description:"Permanently delete files from object storage",section:"Developer",tools:["DELETE_OBJECT","DELETE_OBJECTS"],dangerous:!0},{id:"connections:sql",label:"Run SQL queries",description:"Execute raw SQL against connected databases",section:"Developer",tools:["DATABASES_RUN_SQL"],dangerous:!0}];[...Le.find(t=>t.id===we)?.tools??[]];const Gt=["agents:manage","connections:manage"];new Set(Le.filter(t=>Gt.includes(t.id)).flatMap(t=>t.tools));function Ut(){const t=new Map;for(const e of Le){if(e.id===we)continue;const n=t.get(e.section)??[];n.push(e),t.set(e.section,n)}return Array.from(t.entries()).map(([e,n])=>({section:e,capabilities:n}))}function Bt(t,e,n){return n?!0:t.tools.every(l=>e.includes(l))}function Vt(t,e,n){if(n){const i=new Set(e);for(const r of t.tools)i.add(r);return Array.from(i)}const l=new Set(e);for(const i of t.tools)l.delete(i);return Array.from(l)}function zt(t){const e=H.c(21),{connection:n,isSelected:l,hasToolsEnabled:i,activeToolsCount:r,totalToolsCount:d,onSelect:h,onToggle:c}=t,g=l?"bg-accent/50":"hover:bg-muted/50";let f;e[0]!==g?(f=K("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",g),e[0]=g,e[1]=f):f=e[1];let a;e[2]!==n.icon||e[3]!==n.title?(a=s.jsx(ye,{icon:n.icon,name:n.title,size:"xs"}),e[2]=n.icon,e[3]=n.title,e[4]=a):a=e[4];let x;e[5]!==n.title?(x=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:n.title})}),e[5]=n.title,e[6]=x):x=e[6];let o;e[7]!==h||e[8]!==a||e[9]!==x?(o=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:h,children:[a,x]}),e[7]=h,e[8]=a,e[9]=x,e[10]=o):o=e[10];let m;e[11]!==r||e[12]!==n.tools||e[13]!==i||e[14]!==c||e[15]!==d?(m=n.tools&&n.tools.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[r,"/",d]}),s.jsx(Me,{checked:i,onCheckedChange:c,onClick:Yt})]}),e[11]=r,e[12]=n.tools,e[13]=i,e[14]=c,e[15]=d,e[16]=m):m=e[16];let S;return e[17]!==f||e[18]!==o||e[19]!==m?(S=s.jsxs("div",{className:f,children:[o,m]}),e[17]=f,e[18]=o,e[19]=m,e[20]=S):S=e[20],S}function Yt(t){return t.stopPropagation()}function $t(t){const e=H.c(18),{connectionId:n,tool:l,isSelected:i,onToggle:r}=t,d=`tool-${n}-${l.name}`,h=i?"text-foreground":"text-muted-foreground";let c;e[0]!==h?(c=K("text-sm font-medium",h),e[0]=h,e[1]=c):c=e[1];let g;e[2]!==c||e[3]!==l.name?(g=s.jsx("div",{className:"flex items-center gap-2 mb-1",children:s.jsx("span",{className:c,children:l.name})}),e[2]=c,e[3]=l.name,e[4]=g):g=e[4];let f;e[5]!==l.description?(f=l.description&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:l.description}),e[5]=l.description,e[6]=f):f=e[6];let a;e[7]!==g||e[8]!==f?(a=s.jsxs("div",{className:"flex-1 min-w-0",children:[g,f]}),e[7]=g,e[8]=f,e[9]=a):a=e[9];const x=`tool-${n}-${l.name}`;let o;e[10]!==i||e[11]!==r||e[12]!==x?(o=s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(Me,{id:x,checked:i,onCheckedChange:r,onClick:Ft})}),e[10]=i,e[11]=r,e[12]=x,e[13]=o):o=e[13];let m;return e[14]!==d||e[15]!==a||e[16]!==o?(m=s.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:d,children:[a,o]}),e[14]=d,e[15]=a,e[16]=o,e[17]=m):m=e[17],m}function Ft(t){return t.stopPropagation()}function Kt({toolSet:t,onToolSetChange:e,excludeVirtualMcpId:n,searchQuery:l}){const[i,r]=$.useState(""),d=l!==void 0?l:i,h=$.useDeferredValue(d),[c,g]=$.useState("all"),[f,a]=$.useState(!1),x=$.useRef(new Set(Object.keys(t))),{org:o}=Se(),m=Ot({connectionId:jt,orgId:o.id,orgSlug:o.slug}),S=100,E=h.trim(),T=E?{operator:"or",conditions:[{field:["title"],operator:"contains",value:E},{field:["description"],operator:"contains",value:E}]}:void 0,N=!!n,C={...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:S,offset:0,...N&&{include_virtual:!0}},v=JSON.stringify(C),{data:_,fetchNextPage:R,hasNextPage:p,isFetchingNextPage:O}=Rt({queryKey:re.collectionListInfinite(m,o.id,"","CONNECTIONS",v),queryFn:async({pageParam:b=0})=>(await m.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:S,offset:b,...N&&{include_virtual:!0}}})).structuredContent,initialPageParam:0,getNextPageParam:(b,D)=>{if(b?.hasMore)return D.reduce((Q,q)=>Q+(q?.items?.length??0),0)},staleTime:3e4}),I=_?.pages.flatMap(b=>b?.items??[])??[],j=Ct(R,p??!1,O),u=n?I.filter(b=>b.connection_type!=="VIRTUAL"?!0:dt(b.connection_url)!==n):I,M=x.current,A=[...M.values()].map(b=>u.find(D=>D.id===b)).filter(b=>b!==void 0),k=u.filter(b=>!M.has(b.id)),G=[...A,...k],U=b=>{const D=t[b];return D!==void 0&&D.length>0},B=G.filter(b=>{if(c==="all")return!0;const D=U(b.id);return c==="selected"?D:c==="unselected"?!D:!0}),[w,z]=$.useState(G[0]?.id??null),y=w?G.find(b=>b.id===w)??null:null,{data:L,isFetching:Y}=Re({queryKey:re.collectionItem(m,o.id,"","CONNECTIONS",w??""),queryFn:async()=>w?(await m.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:w}})).structuredContent?.item??null:null,enabled:!!w,staleTime:3e4}),F=L?.tools??[],J=(b,D)=>t[b]?.includes(D)??!1,X=(b,D)=>{const Q=t[b]??[],q=Q.includes(D),W={...t};if(q){const Z=Q.filter(ee=>ee!==D);Z.length===0?delete W[b]:W[b]=Z}else W[b]=[...Q,D];e(W)},le=b=>{const D=b===w?F:[];if(!D.length)return;const Q=t[b]??[],q=D.map(ee=>ee.name),W=Q.length>0&&q.every(ee=>Q.includes(ee)),Z={...t};W?delete Z[b]:(Z[b]=q,z(b)),e(Z)},oe=b=>{z(b),a(!0)},ie=()=>{a(!1)};return s.jsxs("div",{className:"flex h-full",children:[s.jsxs("div",{className:K("w-full md:w-80 border-r border-border flex flex-col",f&&"hidden md:flex"),children:[l===void 0&&s.jsx(vt,{value:i,onChange:r,placeholder:"Search MCP Servers..."}),s.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[s.jsx("button",{onClick:()=>g("all"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),s.jsx("button",{onClick:()=>g("selected"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),s.jsx("button",{onClick:()=>g("unselected"),className:K("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",c==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),s.jsx("div",{className:"flex-1 overflow-auto",children:B.length===0?s.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:d?"No connections found":c==="selected"?"No servers selected":c==="unselected"?"No unselected servers":"No connections available"}):s.jsxs("div",{className:"p-2 space-y-1",children:[B.map(b=>{const D=w===b.id,Q=D?F.length:0,q=t[b.id]?.length??0;return s.jsx(zt,{connection:{...b,tools:D?F:b.tools},isSelected:D,hasToolsEnabled:U(b.id),activeToolsCount:q,totalToolsCount:Q,onSelect:()=>oe(b.id),onToggle:()=>le(b.id)},b.id)}),s.jsx("div",{ref:j,className:"h-4"}),O&&s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(fe,{size:18,className:"animate-spin text-muted-foreground"})})]})})]}),s.jsx("div",{className:K("flex-1 flex-col",f?"flex":"hidden md:flex"),children:y?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[s.jsx(ne,{variant:"ghost",size:"sm",onClick:ie,className:"h-8 w-8 p-0 shrink-0",children:s.jsx(At,{size:20})}),s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx(ye,{icon:y.icon,name:y.title,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:y.title}),y.description&&s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:y.description})]})]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:Y?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(fe,{size:18,className:"animate-spin text-muted-foreground"})}):F.length===0?s.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:"This connection has no tools available"}):s.jsx("div",{className:"space-y-2",children:F.map(b=>s.jsx($t,{connectionId:y.id,tool:b,isSelected:J(y.id,b.name),onToggle:()=>X(y.id,b.name)},b.name))})})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"Select a connection to view its tools"})})})]})}const Ne=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"],Qt={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function Ht(t){if(!t)return"bg-neutral-400";let e=0;for(let l=0;l<t.length;l++){const i=t.charCodeAt(l);e=(e<<5)-e+i,e=e&e}const n=Math.abs(e)%Ne.length;return Ne[n]??Ne[0]}function qt(t,e){return Qt[t]??"bg-neutral-400"}const Zt=Pe({role:Pe({id:se().optional(),slug:se().optional(),label:se()}),allowAllStaticPermissions:ke(),staticPermissions:Ie(se()),toolSet:De(se(),Ie(se())),allowAllModels:ke(),modelSet:De(se(),Ie(se())),memberIds:Ie(se())});function Ye(t,e,n){const l=s.jsx(xe,{checked:t,disabled:e,onCheckedChange:n});return e?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Te,{asChild:!0,children:s.jsx("div",{children:l})}),s.jsx(Ee,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):l}function Jt(t){const e=H.c(28),{allowAllStaticPermissions:n,staticPermissions:l,onAllowAllChange:i,onPermissionsChange:r,readOnly:d,searchQuery:h}=t,c=d===void 0?!1:d;let g;e[0]!==h?(g=h.trim().toLowerCase(),e[0]=h,e[1]=g):g=e[1];const f=$.useDeferredValue(g);let a;if(e[2]!==n||e[3]!==f||e[4]!==i||e[5]!==r||e[6]!==c||e[7]!==h||e[8]!==l){const x=Ut(),o=(v,_)=>{if(!c){if(n&&_){const R=x.flatMap(es).flatMap(Wt);i(!1),r(R.filter(p=>!v.tools.includes(p)));return}n||r(Vt(v,l,!_))}};let m;e[10]!==f?(m=v=>{const{section:_,capabilities:R}=v;return{section:_,capabilities:R.filter(p=>!f||p.label.toLowerCase().includes(f)||p.description.toLowerCase().includes(f))}},e[10]=f,e[11]=m):m=e[11];const S=x.map(m).filter(Xt);let E;e[12]!==n||e[13]!==i||e[14]!==r?(E=()=>{i(!n),r([])},e[12]=n,e[13]=i,e[14]=r,e[15]=E):E=e[15];let T;e[16]!==n||e[17]!==c||e[18]!==E?(T=Ye(n,c,E),e[16]=n,e[17]=c,e[18]=E,e[19]=T):T=e[19];let N;e[20]!==n||e[21]!==i||e[22]!==r||e[23]!==c?(N=c?void 0:()=>{i(!n),r([])},e[20]=n,e[21]=i,e[22]=r,e[23]=c,e[24]=N):N=e[24];let C;e[25]!==T||e[26]!==N?(C=s.jsx(Ue,{title:"General",children:s.jsx(Be,{children:s.jsx(Ve,{title:"All organization permissions",description:"Grant full access to all features below",action:T,onClick:N})})}),e[25]=T,e[26]=N,e[27]=C):C=e[27],a=s.jsx("div",{children:s.jsxs("div",{className:"flex flex-col gap-10 py-4",children:[C,S.length===0&&f?s.jsxs("p",{className:"text-sm text-muted-foreground py-4",children:["No permissions match “",h,"”"]}):S.map(v=>{const{section:_,capabilities:R}=v;return s.jsx(Ue,{title:_,children:s.jsx(Be,{children:R.map(p=>{const O=Bt(p,l,n);return s.jsx(Ve,{title:s.jsxs("span",{className:"flex items-center gap-1.5",children:[p.label,p.dangerous&&s.jsx(ft,{size:12,className:"text-amber-500 shrink-0"})]}),description:p.description,action:Ye(O,c,()=>o(p,O)),onClick:c?void 0:()=>o(p,O)},p.id)})})},_)})]})}),e[2]=n,e[3]=f,e[4]=i,e[5]=r,e[6]=c,e[7]=h,e[8]=l,e[9]=a}else a=e[9];return a}function Xt(t){return t.capabilities.length>0}function Wt(t){return t.tools}function es(t){return t.capabilities}const it={anthropic:"Anthropic",openrouter:"OpenRouter"},ts={openai:"OpenAI",anthropic:"Anthropic",google:"Google","meta-llama":"Meta",mistralai:"Mistral","x-ai":"xAI",deepseek:"DeepSeek",qwen:"Qwen",moonshotai:"MoonshotAI",nvidia:"NVIDIA",perplexity:"Perplexity",cohere:"Cohere",amazon:"Amazon",microsoft:"Microsoft","z-ai":"Z.ai","ibm-granite":"IBM Granite",alibaba:"Alibaba",baidu:"Baidu",bytedance:"ByteDance",tencent:"Tencent",minimax:"MiniMax",nousresearch:"Nous Research",allenai:"Allen AI",inception:"Inception"};function ss(t,e){const n=t.indexOf("/"),l=n>0?t.slice(0,n):e;return l.startsWith("~")?l.slice(1):l}function ns(t){return ts[t]??it[t]??t}function ls(t){const e=t.indexOf(": ");return e>0&&e<32?t.slice(e+2):t}const rt=30;function os(t){const e=H.c(44),{connectionId:n,subProviderId:l,subProviderName:i,groupLogo:r,models:d,allConnectionModelIds:h,selectedModels:c,allowAllModels:g,allConnectionModelsSelected:f,onToggleModel:a,onExitAllowAll:x,readOnly:o,defaultExpanded:m}=t,[S,E]=$.useState(m),T=m||S,N=E,[C,v]=$.useState(rt);let _;e[0]!==f||e[1]!==g||e[2]!==c?(_=j=>g||f||c.includes("*")||c.includes(j),e[0]=f,e[1]=g,e[2]=c,e[3]=_):_=e[3];const R=_;let p;if(e[4]!==R||e[5]!==d){let j;e[7]!==R?(j=u=>R(u.id),e[7]=R,e[8]=j):j=e[8],p=d.filter(j),e[4]=R,e[5]=d,e[6]=p}else p=e[6];const O=p.length;let I;if(e[9]!==h||e[10]!==g||e[11]!==n||e[12]!==O||e[13]!==T||e[14]!==r||e[15]!==R||e[16]!==d||e[17]!==x||e[18]!==a||e[19]!==o||e[20]!==l||e[21]!==i||e[22]!==C){const j=d.slice(0,C),u=d.length>C;let M;e[24]===Symbol.for("react.memo_cache_sentinel")?(M=()=>N(cs),e[24]=M):M=e[24];const A=r??tt[l]??st;let k;e[25]!==i||e[26]!==A?(k=s.jsx(ye,{icon:A,name:i,size:"sm"}),e[25]=i,e[26]=A,e[27]=k):k=e[27];let G;e[28]!==i?(G=s.jsx("span",{className:"text-sm font-medium truncate",children:i}),e[28]=i,e[29]=G):G=e[29];let U;e[30]!==k||e[31]!==G?(U=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[k,G]}),e[30]=k,e[31]=G,e[32]=U):U=e[32];let B;e[33]!==O||e[34]!==d.length?(B=s.jsxs(ge,{variant:"secondary",className:"text-xs text-muted-foreground",children:[O,"/",d.length," enabled"]}),e[33]=O,e[34]=d.length,e[35]=B):B=e[35];let w;e[36]!==T?(w=T?s.jsx(Lt,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx(Pt,{size:16,className:"text-muted-foreground shrink-0"}),e[36]=T,e[37]=w):w=e[37];let z;e[38]!==w||e[39]!==B?(z=s.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[B,w]}),e[38]=w,e[39]=B,e[40]=z):z=e[40];let y;e[41]!==z||e[42]!==U?(y=s.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3 hover:bg-muted/50 cursor-pointer",onClick:M,children:[U,z]}),e[41]=z,e[42]=U,e[43]=y):y=e[43],I=s.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[y,T&&s.jsxs("div",{className:"border-t border-border bg-muted/20",children:[j.map(L=>{const Y=R(L.id),F=()=>{if(!o){if(g){x(n,h,L.id);return}a(n,L.id)}};return s.jsxs("div",{className:K("flex items-center justify-between gap-3 px-4 py-3 border-b border-border last:border-b-0",!o&&"hover:bg-muted/50 cursor-pointer"),onClick:F,children:[s.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s.jsx("span",{className:"text-sm truncate",children:L.title})}),s.jsx("div",{onClick:as,children:o?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Te,{asChild:!0,children:s.jsx("div",{children:s.jsx(xe,{checked:Y,disabled:!0,onCheckedChange:rs})})}),s.jsx(Ee,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):s.jsx(xe,{checked:Y,onCheckedChange:F})})]},L.id)}),u&&s.jsxs("button",{type:"button",className:"w-full px-4 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:()=>v(is),children:["Show more (",d.length-C," remaining)"]})]})]}),e[9]=h,e[10]=g,e[11]=n,e[12]=O,e[13]=T,e[14]=r,e[15]=R,e[16]=d,e[17]=x,e[18]=a,e[19]=o,e[20]=l,e[21]=i,e[22]=C,e[23]=I}else I=e[23];return I}function is(t){return t+rt}function rs(){}function as(t){return t.stopPropagation()}function cs(t){return!t}function ds(t){const e=H.c(33),{connection:n,selectedModels:l,allowAllModels:i,onToggleModel:r,onExitAllowAll:d,allConnectionModelsSelected:h,searchQuery:c,readOnly:g}=t,f=wt(n.id);let a,x,o,m,S;if(e[0]!==h||e[1]!==i||e[2]!==n.id||e[3]!==n.label||e[4]!==n.providerId||e[5]!==d||e[6]!==r||e[7]!==f||e[8]!==g||e[9]!==c||e[10]!==l){S=Symbol.for("react.early_return_sentinel");e:{let N;e[16]!==n.label?(N=A=>({...A,id:A.modelId,provider:n.label}),e[16]=n.label,e[17]=N):N=e[17];const C=f.filter(hs).map(N),v=c.trim().toLowerCase(),_=v?C.filter(A=>A.title.toLowerCase().includes(v)||A.id.toLowerCase().includes(v)||A.provider?.toLowerCase().includes(v)):C;if(_.length===0){S=null;break e}const R=new Map;for(const A of _){const k=ss(A.id,n.providerId),G=R.get(k)??{models:[],logo:null};G.models.push({id:A.id,title:ls(A.title),logo:A.logo}),!G.logo&&A.logo&&(G.logo=A.logo),R.set(k,G)}const p=Array.from(R.entries()).map(fs).sort(us),O=p.length===1||v.length>0;o="flex flex-col gap-3";const I=tt[n.providerId]??st;let j;e[18]!==n.providerId||e[19]!==I?(j=s.jsx("img",{src:I,alt:n.providerId,className:"w-4 h-4 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),e[18]=n.providerId,e[19]=I,e[20]=j):j=e[20];const u=it[n.providerId]??n.providerId;let M;e[21]!==u?(M=s.jsx("h4",{className:"text-sm font-medium",children:u}),e[21]=u,e[22]=M):M=e[22],e[23]!==M||e[24]!==j?(m=s.jsxs("div",{className:"flex items-center gap-2",children:[j,M]}),e[23]=M,e[24]=j,e[25]=m):m=e[25],a="flex flex-col gap-3",x=p.map(A=>s.jsx(os,{connectionId:n.id,subProviderId:A.id,subProviderName:A.name,groupLogo:A.logo,models:A.models,allConnectionModelIds:C.map(ms),selectedModels:l,allowAllModels:i,allConnectionModelsSelected:h,onToggleModel:r,onExitAllowAll:d,readOnly:g,defaultExpanded:O},A.id))}e[0]=h,e[1]=i,e[2]=n.id,e[3]=n.label,e[4]=n.providerId,e[5]=d,e[6]=r,e[7]=f,e[8]=g,e[9]=c,e[10]=l,e[11]=a,e[12]=x,e[13]=o,e[14]=m,e[15]=S}else a=e[11],x=e[12],o=e[13],m=e[14],S=e[15];if(S!==Symbol.for("react.early_return_sentinel"))return S;let E;e[26]!==a||e[27]!==x?(E=s.jsx("div",{className:a,children:x}),e[26]=a,e[27]=x,e[28]=E):E=e[28];let T;return e[29]!==o||e[30]!==m||e[31]!==E?(T=s.jsxs("div",{className:o,children:[m,E]}),e[29]=o,e[30]=m,e[31]=E,e[32]=T):T=e[32],T}function ms(t){return t.id}function us(t,e){return t.name.localeCompare(e.name)}function fs(t){const[e,n]=t;return{id:e,name:ns(e),logo:n.logo,models:n.models}}function hs(t,e,n){return n.findIndex(l=>l.modelId===t.modelId)===e}function gs(t){const e=H.c(35),{allowAllModels:n,modelSet:l,onAllowAllChange:i,onModelSetChange:r,readOnly:d,searchQuery:h}=t,c=d===void 0?!1:d,g=$.useDeferredValue(h),f=Mt();let a;e[0]!==l||e[1]!==r?(a=(p,O)=>{const I=l[p]??[],j={...l};if(I.includes(O)){const u=I.filter(M=>M!==O);u.length===0?delete j[p]:j[p]=u}else j[p]=[...I,O];r(j)},e[0]=l,e[1]=r,e[2]=a):a=e[2];const x=a;let o;e[3]!==l||e[4]!==i||e[5]!==r?(o=(p,O,I)=>{i(!1),r({...l,[p]:O.filter(j=>j!==I)})},e[3]=l,e[4]=i,e[5]=r,e[6]=o):o=e[6];const m=o,S=!c&&"hover:bg-muted/50 cursor-pointer";let E;e[7]!==S?(E=K("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",S),e[7]=S,e[8]=E):E=e[8];let T;e[9]!==n||e[10]!==i||e[11]!==r||e[12]!==c?(T=()=>{if(c)return;const p=!n;i(p),p&&r({})},e[9]=n,e[10]=i,e[11]=r,e[12]=c,e[13]=T):T=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("span",{className:"text-sm font-medium",children:"All models"}),e[14]=N):N=e[14];let C;e[15]!==n||e[16]!==i||e[17]!==r||e[18]!==c?(C=s.jsx("div",{onClick:ps,children:c?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Te,{asChild:!0,children:s.jsx("div",{children:s.jsx(xe,{checked:n,disabled:!0,onCheckedChange:xs})})}),s.jsx(Ee,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):s.jsx(xe,{checked:n,onCheckedChange:p=>{i(p),p&&r({})}})}),e[15]=n,e[16]=i,e[17]=r,e[18]=c,e[19]=C):C=e[19];let v;e[20]!==E||e[21]!==T||e[22]!==C?(v=s.jsxs("div",{className:E,onClick:T,children:[N,C]}),e[20]=E,e[21]=T,e[22]=C,e[23]=v):v=e[23];let _;e[24]!==f||e[25]!==n||e[26]!==g||e[27]!==m||e[28]!==l||e[29]!==c||e[30]!==x?(_=f.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No LLM connections configured"}):f.map(p=>s.jsx($.Suspense,{fallback:s.jsxs("div",{className:"px-4 py-3 flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(fe,{className:"size-4 animate-spin"}),"Loading models..."]}),children:s.jsx(ds,{connection:p,selectedModels:l[p.id]??[],allowAllModels:n,onToggleModel:x,onExitAllowAll:m,allConnectionModelsSelected:(l[p.id]??[]).includes("*"),searchQuery:g,readOnly:c})},p.id)),e[24]=f,e[25]=n,e[26]=g,e[27]=m,e[28]=l,e[29]=c,e[30]=x,e[31]=_):_=e[31];let R;return e[32]!==_||e[33]!==v?(R=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 pb-6",children:[v,_]}),e[32]=_,e[33]=v,e[34]=R):R=e[34],R}function xs(){}function ps(t){return t.stopPropagation()}function bs(t){const e=H.c(52),{open:n,onOpenChange:l,selectedMemberIds:i,onAddMembers:r}=t,[d,h]=$.useState(""),c=$.useDeferredValue(d);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=[],e[0]=g):g=e[0];const[f,a]=$.useState(g),{data:x}=nt();let o,m,S,E,T,N,C,v,_,R,p;if(e[1]!==x?.data?.members||e[2]!==c||e[3]!==r||e[4]!==l||e[5]!==n||e[6]!==f||e[7]!==d||e[8]!==i){const U=x?.data?.members??[];let B;e[20]!==c?(B=y=>{const L=c.toLowerCase();return y.user?.name?.toLowerCase().includes(L)||y.user?.email?.toLowerCase().includes(L)},e[20]=c,e[21]=B):B=e[21];const w=U.filter(B);let z;e[22]!==r||e[23]!==l||e[24]!==f?(z=()=>{r(f),a([]),l(!1)},e[22]=r,e[23]=l,e[24]=f,e[25]=z):z=e[25],S=z,m=Qe,R=n,p=l,o=He,v="sm:max-w-md p-0",e[26]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs(qe,{className:"px-6 pt-6",children:[s.jsx(Ze,{children:"Add Members to Role"}),s.jsx(Je,{children:"Select members to add to this role."})]}),e[26]=_):_=e[26],N="flex flex-col h-80",e[27]!==d?(C=s.jsx("div",{className:"border-b border-border px-4 py-3",children:s.jsx(ve,{value:d,onChange:h,placeholder:"Search members...",className:"w-full"})}),e[27]=d,e[28]=C):C=e[28],E="flex-1 overflow-auto",T=w.length===0?s.jsx("div",{className:"flex items-center justify-center h-full px-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:d?"No members found":"No members available"})}):s.jsx("div",{className:"px-6 py-2 space-y-1",children:w.map(y=>{const L=y.role!=="owner",Y=i.includes(y.id),F=f.includes(y.id);return s.jsxs("label",{className:K("flex items-center gap-3 p-2 rounded-lg",!L||Y?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-muted/50"),children:[s.jsx(Me,{checked:F||Y,onCheckedChange:()=>{!L||Y||a(J=>J.includes(y.id)?J.filter(X=>X!==y.id):[...J,y.id])},disabled:!L||Y}),s.jsx(ot,{url:y.user?.image??void 0,fallback:lt(y.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:y.user?.name||"Unknown"}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y.user?.email})]}),!L&&s.jsx(ge,{variant:"secondary",className:"shrink-0",children:"Owner"}),Y&&L&&s.jsx(ge,{variant:"outline",className:"shrink-0",children:"Added"})]},y.id)})}),e[1]=x?.data?.members,e[2]=c,e[3]=r,e[4]=l,e[5]=n,e[6]=f,e[7]=d,e[8]=i,e[9]=o,e[10]=m,e[11]=S,e[12]=E,e[13]=T,e[14]=N,e[15]=C,e[16]=v,e[17]=_,e[18]=R,e[19]=p}else o=e[9],m=e[10],S=e[11],E=e[12],T=e[13],N=e[14],C=e[15],v=e[16],_=e[17],R=e[18],p=e[19];let O;e[29]!==E||e[30]!==T?(O=s.jsx("div",{className:E,children:T}),e[29]=E,e[30]=T,e[31]=O):O=e[31];let I;e[32]!==O||e[33]!==N||e[34]!==C?(I=s.jsxs("div",{className:N,children:[C,O]}),e[32]=O,e[33]=N,e[34]=C,e[35]=I):I=e[35];let j;e[36]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Xe,{children:"Cancel"}),e[36]=j):j=e[36];const u=f.length===0,M=f.length>0&&`(${f.length})`;let A;e[37]!==S||e[38]!==u||e[39]!==M?(A=s.jsxs(We,{className:"px-6 pb-6",children:[j,s.jsxs(et,{onClick:S,disabled:u,children:["Add ",M]})]}),e[37]=S,e[38]=u,e[39]=M,e[40]=A):A=e[40];let k;e[41]!==o||e[42]!==I||e[43]!==A||e[44]!==v||e[45]!==_?(k=s.jsxs(o,{className:v,children:[_,I,A]}),e[41]=o,e[42]=I,e[43]=A,e[44]=v,e[45]=_,e[46]=k):k=e[46];let G;return e[47]!==m||e[48]!==k||e[49]!==R||e[50]!==p?(G=s.jsx(m,{open:R,onOpenChange:p,children:k}),e[47]=m,e[48]=k,e[49]=R,e[50]=p,e[51]=G):G=e[51],G}function Ts(t){const e=H.c(29),{memberIds:n,onMemberIdsChange:l,readOnly:i,readOnlyMessage:r,searchQuery:d,addMemberDialogOpen:h,onAddMemberDialogOpenChange:c}=t,g=i===void 0?!1:i,f=r===void 0?"Owner membership cannot be changed":r,a=$.useDeferredValue(d),{data:x}=nt();let o,m,S;if(e[0]!==x?.data?.members||e[1]!==a||e[2]!==n||e[3]!==l||e[4]!==g||e[5]!==f||e[6]!==d){const v=x?.data?.members??[];let _;e[10]!==n?(_=I=>n.includes(I.id),e[10]=n,e[11]=_):_=e[11];const R=v.filter(_);let p;e[12]!==a?(p=I=>{const j=a.toLowerCase();return I.user?.name?.toLowerCase().includes(j)||I.user?.email?.toLowerCase().includes(j)},e[12]=a,e[13]=p):p=e[13];const O=R.filter(p);S="flex flex-col h-full",o="flex-1 overflow-auto",m=R.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-base font-medium mb-1",children:"No members"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Add members to grant them the configured permissions."})]})}):O.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("p",{className:"text-sm text-muted-foreground",children:['No members match "',d,'"']})}):s.jsx("div",{className:"p-4 space-y-2",children:O.map(I=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/30",children:[s.jsx(ot,{url:I.user?.image??void 0,fallback:lt(I.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:I.user?.name||"Unknown"}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:I.user?.email})]}),g?s.jsx(pe,{children:s.jsxs(be,{children:[s.jsx(Te,{asChild:!0,children:s.jsx("div",{children:s.jsx(ne,{variant:"ghost",size:"sm",disabled:!0,children:s.jsx(ze,{size:16})})})}),s.jsx(Ee,{children:s.jsx("p",{children:f})})]})}):s.jsx(ne,{variant:"ghost",size:"sm",onClick:()=>l(n.filter(j=>j!==I.id)),children:s.jsx(ze,{size:16})})]},I.id))}),e[0]=x?.data?.members,e[1]=a,e[2]=n,e[3]=l,e[4]=g,e[5]=f,e[6]=d,e[7]=o,e[8]=m,e[9]=S}else o=e[7],m=e[8],S=e[9];let E;e[14]!==o||e[15]!==m?(E=s.jsx("div",{className:o,children:m}),e[14]=o,e[15]=m,e[16]=E):E=e[16];let T;e[17]!==n||e[18]!==l?(T=v=>l([...n,...v]),e[17]=n,e[18]=l,e[19]=T):T=e[19];let N;e[20]!==h||e[21]!==n||e[22]!==c||e[23]!==T?(N=s.jsx(bs,{open:h,onOpenChange:c,selectedMemberIds:n,onAddMembers:T}),e[20]=h,e[21]=n,e[22]=c,e[23]=T,e[24]=N):N=e[24];let C;return e[25]!==S||e[26]!==E||e[27]!==N?(C=s.jsxs("div",{className:S,children:[E,N]}),e[25]=S,e[26]=E,e[27]=N,e[28]=C):C=e[28],C}function Es(t){const e=H.c(3);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:24,className:"animate-spin text-muted-foreground"})}),e[0]=n):n=e[0];let l;return e[1]!==t?(l=s.jsx($.Suspense,{fallback:n,children:s.jsx(Ts,{...t})}),e[1]=t,e[2]=l):l=e[2],l}const _s={owner:[],admin:[],user:[]};function Is(t,e,n,l){const i=t==="owner"||t==="admin";return{role:{id:n?.id,slug:t,label:t.charAt(0).toUpperCase()+t.slice(1)},allowAllStaticPermissions:i,staticPermissions:_s[t],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:e.filter(r=>r.role===t).map(r=>r.id)}}function Ss(t,e,n){const l=t.permission||{},i=l.self||[],r=i.includes("*"),d=r?[]:i.filter(a=>a!=="*"),h={};for(const[a,x]of Object.entries(l))if(!(a==="self"||a==="models"))if(a==="*")for(const o of n)h[o.id]=x.includes("*")?o.tools?.map(m=>m.name)??[]:x;else{const o=n.find(m=>m.id===a);o&&(h[a]=x.includes("*")?o.tools?.map(m=>m.name)??[]:x)}const c=l.models||[],g=c.length===0||c.includes("*:*"),f={};if(!g)for(const a of c){const x=a.indexOf(":");if(x===-1)continue;const o=a.slice(0,x),m=a.slice(x+1);f[o]||(f[o]=[]),f[o].push(m)}return{role:{id:t.id,slug:t.role,label:t.label},allowAllStaticPermissions:r,staticPermissions:d,toolSet:h,allowAllModels:g,modelSet:f,memberIds:e.filter(a=>a.role===t.role).map(a=>a.id)}}function Ns(t,e){const n={};t.allowAllStaticPermissions?n.self=["*"]:t.staticPermissions.length>0&&(n.self=t.staticPermissions);for(const[l,i]of Object.entries(t.toolSet))if(i.length>0){const d=e.find(h=>h.id===l)?.tools?.map(h=>h.name)??[];n[l]=d.length>0&&d.every(h=>i.includes(h))?["*"]:i}if(t.allowAllModels)n.models=["*:*"];else{const l=[];for(const[i,r]of Object.entries(t.modelSet))for(const d of r)l.push(`${i}:${d}`);l.length>0&&(n.models=l)}return n}function Cs(t,e,n){return t.kind==="builtin"?Is(t.role,e,void 0):t.kind==="custom"?Ss(t.role,e,n):{role:{id:void 0,slug:void 0,label:""},allowAllStaticPermissions:!1,staticPermissions:[],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:[]}}function As(t){const e=H.c(6),{readOnly:n,readOnlyMessage:l,onOpen:i}=t,r=l===void 0?"Owner membership cannot be changed":l;if(n){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Te,{asChild:!0,children:s.jsx("div",{children:s.jsxs(ne,{variant:"outline",size:"sm",disabled:!0,children:[s.jsx(Ae,{size:16}),"Add Member"]})})}),e[0]=c):c=e[0];let g;return e[1]!==r?(g=s.jsx(pe,{children:s.jsxs(be,{children:[c,s.jsx(Ee,{children:s.jsx("p",{children:r})})]})}),e[1]=r,e[2]=g):g=e[2],g}let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ae,{size:16}),e[3]=d):d=e[3];let h;return e[4]!==i?(h=s.jsxs(ne,{variant:"outline",size:"sm",onClick:i,children:[d,"Add Member"]}),e[4]=i,e[5]=h):h=e[5],h}function Rs(t){const e=H.c(14),{locator:n}=Se(),l=je(),i=yt();let r;e[0]!==n?(r=re.members(n),e[0]=n,e[1]=r):r=e[1];let d;e[2]!==l?(d=()=>l.organization.listMembers(),e[2]=l,e[3]=d):d=e[3];let h;e[4]!==r||e[5]!==d?(h={queryKey:r,queryFn:d},e[4]=r,e[5]=d,e[6]=h):h=e[6];const{data:c,isPending:g}=Re(h);if(g||!i){let o;return e[7]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:32,className:"animate-spin text-muted-foreground"})})}),e[7]=o):o=e[7],o}let f;e[8]!==c?.data?.members?(f=c?.data?.members??[],e[8]=c?.data?.members,e[9]=f):f=e[9];const a=f;let x;return e[10]!==i||e[11]!==a||e[12]!==t?(x=s.jsx(Os,{...t,members:a,connections:i}),e[10]=i,e[11]=a,e[12]=t,e[13]=x):x=e[13],x}function Os({target:t,onBack:e,onSaved:n,members:l,connections:i}){const{locator:r}=Se(),d=je(),h=$e(),c=t.kind==="builtin",g=t.kind==="builtin"&&t.role==="owner",f=t.kind==="new",[a,x]=$.useState(c?"org":"mcp"),o=mt({resolver:ut(Zt),defaultValues:Cs(t,l,i)}),m=o.formState.isValid,S=o.formState.isDirty,E=Fe({mutationFn:async u=>{const M=Ns(u,i),A=u.role.slug||u.role.label.toLowerCase().replace(/\s+/g,"-"),k=(u.role.slug==="owner"||u.role.slug==="admin"||u.role.slug==="user")&&!u.role.id,G=async(U,B)=>{const w=l.filter(L=>L.role===(B??U)).map(L=>L.id),z=u.memberIds.filter(L=>!w.includes(L)),y=w.filter(L=>!u.memberIds.includes(L));for(const L of z){const Y=await d.organization.updateMemberRole({memberId:L,role:[U]});if(Y?.error)throw new Error(Y.error.message??"Something went wrong")}for(const L of y){const Y=await d.organization.updateMemberRole({memberId:L,role:["user"]});if(Y?.error)throw new Error(Y.error.message??"Something went wrong")}};if(k)return await G(u.role.slug),u;if(u.role.id){const U=u.role.label.toLowerCase().replace(/\s+/g,"-"),B=u.role.slug,w=U!==B,z=await d.organization.updateRole({roleId:u.role.id,data:{permission:M,...w?{roleName:U}:{}}});if(z?.error)throw new Error(z.error.message??"Something went wrong");return await G(w?U:B,w?B:void 0),w?{...u,role:{...u.role,slug:U}}:u}else{const U=await d.organization.createRole({role:A,permission:M});if(U?.error)throw new Error(U.error.message??"Something went wrong");for(const B of u.memberIds){const w=await d.organization.updateMemberRole({memberId:B,role:[A]});if(w?.error)throw new Error(w.error.message)}return{...u,role:{...u.role,id:U.data?.roleData?.id,slug:A}}}},onSuccess:(u,M)=>{h.invalidateQueries({queryKey:re.members(r)}),h.invalidateQueries({queryKey:re.organizationRoles(r)});const A=!M.role.id&&!M.role.slug,k=M.role.slug==="owner"&&!M.role.id;Oe(k?"role_members_updated":A?"role_created":"role_updated",{role_slug:M.role.slug??null}),he.success(k?"Members updated successfully!":A?"Role created successfully!":"Role updated successfully!"),o.reset(u),n(u.role.id)},onError:u=>{he.error(u instanceof Error?u.message:"Failed to save role")}}),T=o.handleSubmit(u=>{if(!u.role.label.trim()){he.error("Role name is required"),o.setFocus("role.label");return}E.mutate(u)}),N=!g,C=t.kind==="builtin"?t.role.charAt(0).toUpperCase()+t.role.slice(1):t.kind==="custom"?t.role.label:"",v=[...g?[]:[{id:"mcp",label:"MCP Permissions"}],{id:"org",label:"Organization Permissions"},{id:"models",label:"Models"},{id:"members",label:"Members"}],[_,R]=$.useState(""),[p,O]=$.useState(!1),I=u=>{x(u),R("")},j={mcp:"Search MCP servers...",org:"Search permissions...",models:"Search models...",members:"Search members..."};return s.jsx(te,{children:s.jsxs(te.Content,{className:K("flex flex-col",a!=="org"&&"overflow-hidden"),children:[s.jsx("div",{className:"shrink-0 mx-auto w-full max-w-[1200px] px-4 md:px-10 pt-8 md:pt-12 pb-4",children:s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(te.Title,{actions:N&&s.jsxs(s.Fragment,{children:[s.jsx(ne,{variant:"outline",size:"sm",onClick:e,disabled:E.isPending,children:"Cancel"}),s.jsx(ne,{size:"sm",onClick:T,disabled:E.isPending||!m||!S,children:E.isPending?"Saving...":f?"Create Role":"Save Changes"})]}),children:s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx("div",{className:K("size-2.5 rounded-full shrink-0",t.kind==="builtin"?qt(t.role):Ht(o.watch("role.label")))}),g&&s.jsx(Ke,{size:16,className:"text-muted-foreground shrink-0"}),f||t.kind==="custom"?s.jsx("input",{...o.register("role.label"),placeholder:"Role name",className:"leading-tight text-foreground bg-transparent border-none outline-none px-1 -mx-1 rounded hover:bg-input/25 focus:bg-input/25 transition-colors w-64 placeholder:text-muted-foreground/50",autoFocus:f}):s.jsx("span",{className:"truncate",children:C})]})}),s.jsx("div",{className:"flex items-center gap-2",children:v.map(u=>s.jsx("button",{type:"button",onClick:()=>I(u.id),className:K("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex items-center",a===u.id?"bg-accent border-border text-foreground":"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:u.label},u.id))}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx(ve,{value:_,onChange:R,placeholder:j[a]??"Search...",className:"w-full md:w-[375px]"}),a==="members"&&s.jsx(As,{readOnly:t.kind==="builtin"&&t.role==="owner",onOpen:()=>O(!0)})]})]})}),s.jsx("div",{className:K("mx-auto w-full max-w-[1200px] px-4 md:px-10 pb-6",a!=="org"&&"flex-1 min-h-0"),children:s.jsxs("div",{className:K(a!=="org"&&"h-full overflow-hidden",a!=="models"&&a!=="org"&&"border border-border rounded-xl bg-card"),children:[a==="mcp"&&!g&&s.jsx(Kt,{toolSet:o.watch("toolSet"),onToolSetChange:u=>o.setValue("toolSet",u,{shouldDirty:!0}),searchQuery:_}),a==="org"&&s.jsx(Jt,{allowAllStaticPermissions:o.watch("allowAllStaticPermissions"),staticPermissions:o.watch("staticPermissions"),onAllowAllChange:u=>o.setValue("allowAllStaticPermissions",u,{shouldDirty:!0}),onPermissionsChange:u=>o.setValue("staticPermissions",u,{shouldDirty:!0}),readOnly:g,searchQuery:_}),a==="models"&&s.jsx(gs,{allowAllModels:o.watch("allowAllModels"),modelSet:o.watch("modelSet"),onAllowAllChange:u=>o.setValue("allowAllModels",u,{shouldDirty:!0}),onModelSetChange:u=>o.setValue("modelSet",u,{shouldDirty:!0}),readOnly:g,searchQuery:_}),a==="members"&&s.jsx(Es,{memberIds:o.watch("memberIds"),onMemberIdsChange:u=>o.setValue("memberIds",u,{shouldDirty:!0}),readOnly:t.kind==="builtin"&&(t.role==="owner"||t.role==="user"),readOnlyMessage:t.kind==="builtin"&&t.role==="user"?"User is the default role — members can't be removed from it; assign another role to change their access":"Owner membership cannot be changed",searchQuery:_,addMemberDialogOpen:p,onAddMemberDialogOpenChange:O})]})})]})})}function js(t){return t.kind==="builtin"?`builtin-${t.role}`:t.kind==="custom"?`custom-${t.role.id}`:"new"}function vs(t){const e=H.c(6),{area:n,children:l}=t,{isPrivileged:i,loading:r,error:d}=Dt();let h;return e[0]!==n||e[1]!==l||e[2]!==d||e[3]!==i||e[4]!==r?(h=s.jsx(kt,{granted:i,loading:r,error:d,area:n,children:l}),e[0]=n,e[1]=l,e[2]=d,e[3]=i,e[4]=r,e[5]=h):h=e[5],h}const ys=[{role:"owner",label:"Owner",color:"bg-red-500"},{role:"admin",label:"Admin",color:"bg-blue-500"},{role:"user",label:"User",color:"bg-green-500"}],Ce=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"];function Ms(t){if(!t)return"bg-neutral-400";let e=0;for(let l=0;l<t.length;l++){const i=t.charCodeAt(l);e=(e<<5)-e+i,e=e&e}const n=Math.abs(e)%Ce.length;return Ce[n]??Ce[0]}const ws={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function Ls(t,e){return e?ws[t]??"bg-neutral-400":Ms(t)}function Ps(){const t=H.c(77),[e,n]=$.useState(""),[l,i]=$.useState(null),r=gt();let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},t[0]=d):d=t[0];const{role:h}=xt(d),{locator:c}=Se(),g=je(),f=$e(),{customRoles:a,refetch:x}=pt();let o;t[1]!==r?(o=P=>r({to:".",search:V=>({...V,role:P})}),t[1]=r,t[2]=o):o=t[2];const m=o;let S;e:{if(!h){S=null;break e}if(h==="new"){S={kind:"new"};break e}if(h.startsWith("builtin-")){S={kind:"builtin",role:h.slice(8)};break e}let P;t[3]!==h?(P=ae=>ae.id===h,t[3]=h,t[4]=P):P=t[4];const V=a.find(P);S=V?{kind:"custom",role:V}:null}const E=S;let T;t[5]!==c?(T=re.members(c),t[5]=c,t[6]=T):T=t[6];let N;t[7]!==g?(N=()=>g.organization.listMembers(),t[7]=g,t[8]=N):N=t[8];let C;t[9]!==T||t[10]!==N?(C={queryKey:T,queryFn:N},t[9]=T,t[10]=N,t[11]=C):C=t[11];const{data:v}=Re(C);let _;t[12]!==v?.data?.members?(_=v?.data?.members??[],t[12]=v?.data?.members,t[13]=_):_=t[13];const R=_;let p;t[14]!==R?(p=P=>R.filter(V=>V.role===P).length,t[14]=R,t[15]=p):p=t[15];const O=p;let I;if(t[16]!==a||t[17]!==O||t[18]!==e){let P;t[20]!==O?(P=ce=>({kind:"builtin",role:{...ce,memberCount:O(ce.role)}}),t[20]=O,t[21]=P):P=t[21];const V=ys.map(P);let ae;t[22]!==O?(ae=ce=>({kind:"custom",role:{...ce,memberCount:O(ce.role)}}),t[22]=O,t[23]=ae):ae=t[23];const at=a.map(ae);if(I=[...V,...at],e){const ce=e.toLowerCase();I=I.filter(ct=>ct.role.label.toLowerCase().includes(ce))}t[16]=a,t[17]=O,t[18]=e,t[19]=I}else I=t[19];let j;t[24]!==g?(j=async P=>{const V=await g.organization.deleteRole({roleId:P});if(V?.error)throw new Error(V.error.message);return V?.data},t[24]=g,t[25]=j):j=t[25];const u=Fe({mutationFn:j,onSuccess:(P,V)=>{Oe("role_deleted",{role_id:V}),f.invalidateQueries({queryKey:re.members(c)}),f.invalidateQueries({queryKey:re.organizationRoles(c)}),he.success("Role deleted successfully!"),x(),E?.kind==="custom"&&E.role.id===V&&m(void 0)},onError:zs});let M,A,k,G;t[26]===Symbol.for("react.memo_cache_sentinel")?(G={id:"role",header:"Role",render:Vs,cellClassName:"flex-1 min-w-0",sortable:!0},M={id:"type",header:"Type",render:Bs,cellClassName:"w-28 shrink-0"},A={id:"permissions",header:"Permissions",render:Us,cellClassName:"flex-1 min-w-0"},k={id:"members",header:"Members",render:Gs,cellClassName:"w-24 shrink-0"},t[26]=M,t[27]=A,t[28]=k,t[29]=G):(M=t[26],A=t[27],k=t[28],G=t[29]);let U;t[30]===Symbol.for("react.memo_cache_sentinel")?(U=[G,M,A,k,{id:"actions",header:"",render:P=>P.kind==="builtin"?null:s.jsxs(bt,{children:[s.jsx(Tt,{asChild:!0,children:s.jsx(ne,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:ks,children:s.jsx(It,{size:16})})}),s.jsx(Et,{align:"end",onClick:Ds,children:s.jsxs(_t,{variant:"destructive",onClick:()=>{const V=P.role;V.id&&i({id:V.id,label:V.label})},children:[s.jsx(St,{size:16}),"Delete"]})})]}),cellClassName:"w-12 shrink-0"}],t[30]=U):U=t[30];const B=U;let w;t[31]!==m?(w=P=>{if(P.kind==="builtin")m(`builtin-${P.role.role}`);else{const V=P.role;m(V.id)}},t[31]=m,t[32]=w):w=t[32];const z=w;if(E){let P;t[33]!==m?(P=()=>m(void 0),t[33]=m,t[34]=P):P=t[34];let V;return t[35]!==x||t[36]!==m?(V=()=>{x(),m(void 0)},t[35]=x,t[36]=m,t[37]=V):V=t[37],s.jsx(Rs,{target:E,onBack:P,onSaved:V},js(E))}let y;t[38]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(te.Title,{children:"Roles"}),t[38]=y):y=t[38];let L;t[39]===Symbol.for("react.memo_cache_sentinel")?(L=P=>{P.key==="Escape"&&(n(""),P.target.blur())},t[39]=L):L=t[39];let Y;t[40]!==e?(Y=s.jsx(ve,{value:e,onChange:n,placeholder:"Search roles...",className:"w-full md:w-[375px]",onKeyDown:L}),t[40]=e,t[41]=Y):Y=t[41];let F;t[42]!==m?(F=()=>m("new"),t[42]=m,t[43]=F):F=t[43];let J;t[44]===Symbol.for("react.memo_cache_sentinel")?(J=s.jsx(Ae,{size:16}),t[44]=J):J=t[44];let X;t[45]!==F?(X=s.jsxs(ne,{onClick:F,children:[J,"Create Role"]}),t[45]=F,t[46]=X):X=t[46];let le;t[47]!==Y||t[48]!==X?(le=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[Y,X]}),t[47]=Y,t[48]=X,t[49]=le):le=t[49];let oe;t[50]!==e?(oe=e?s.jsx(Ge,{title:"No roles found",description:`No roles match "${e}"`}):s.jsx(Ge,{title:"No roles",description:"Create a role to get started."}),t[50]=e,t[51]=oe):oe=t[51];let ie;t[52]!==I||t[53]!==B||t[54]!==z||t[55]!==oe?(ie=s.jsx(Nt,{columns:B,data:I,isLoading:!1,onRowClick:z,emptyState:oe}),t[52]=I,t[53]=B,t[54]=z,t[55]=oe,t[56]=ie):ie=t[56];let b;t[57]!==le||t[58]!==ie?(b=s.jsx(te.Content,{children:s.jsx(te.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[y,le,ie]})})}),t[57]=le,t[58]=ie,t[59]=b):b=t[59];const D=l!==null;let Q;t[60]===Symbol.for("react.memo_cache_sentinel")?(Q=P=>!P&&i(null),t[60]=Q):Q=t[60];let q;t[61]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(Ze,{children:"Delete Role"}),t[61]=q):q=t[61];const W=l?.label;let Z;t[62]!==W?(Z=s.jsxs(qe,{children:[q,s.jsxs(Je,{children:['Are you sure you want to delete the "',W,'" role? This action cannot be undone.']})]}),t[62]=W,t[63]=Z):Z=t[63];let ee;t[64]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(Xe,{children:"Cancel"}),t[64]=ee):ee=t[64];let de;t[65]!==u||t[66]!==l?(de=s.jsxs(We,{children:[ee,s.jsx(et,{onClick:()=>{l?.id&&u.mutate(l.id),i(null)},className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[65]=u,t[66]=l,t[67]=de):de=t[67];let me;t[68]!==Z||t[69]!==de?(me=s.jsxs(He,{children:[Z,de]}),t[68]=Z,t[69]=de,t[70]=me):me=t[70];let ue;t[71]!==D||t[72]!==me?(ue=s.jsx(Qe,{open:D,onOpenChange:Q,children:me}),t[71]=D,t[72]=me,t[73]=ue):ue=t[73];let _e;return t[74]!==b||t[75]!==ue?(_e=s.jsxs(te,{children:[b,ue]}),t[74]=b,t[75]=ue,t[76]=_e):_e=t[76],_e}function Ds(t){return t.stopPropagation()}function ks(t){return t.stopPropagation()}function Gs(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.role.memberCount})}function Us(t){if(t.kind==="builtin")return t.role.role==="owner"||t.role.role==="admin"?s.jsx("span",{className:"text-sm text-muted-foreground",children:"Full access"}):s.jsx("span",{className:"text-sm text-muted-foreground",children:"Basic access"});const e=t.role,n=[];return e.allowsAllStaticPermissions?n.push("Full org access"):e.staticPermissionCount&&e.staticPermissionCount>0&&n.push(`${e.staticPermissionCount} org perm${e.staticPermissionCount!==1?"s":""}`),e.allowsAllConnections?n.push("All connections"):e.connectionCount&&e.connectionCount>0&&n.push(`${e.connectionCount} connection${e.connectionCount!==1?"s":""}`),s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:n.length>0?n.join(", "):"No permissions"})}function Bs(t){return t.kind==="builtin"?s.jsx(ge,{variant:"secondary",className:"text-xs",children:"Built-in"}):s.jsx(ge,{variant:"outline",className:"text-xs",children:"Custom"})}function Vs(t){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:K("size-2.5 rounded-full shrink-0",Ls(t.role.role,t.kind==="builtin"))}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.role.label}),t.kind==="builtin"&&s.jsx(Ke,{size:12,className:"text-muted-foreground shrink-0"})]})}function zs(t,e){Oe("role_delete_failed",{role_id:e,error:t instanceof Error?t.message:String(t)}),he.error(t instanceof Error?t.message:"Failed to delete role")}function Ys(){const t=H.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:"Failed to load roles"})})}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ht,{fallback:e,children:s.jsx($.Suspense,{fallback:s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(fe,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(Ps,{})})}),t[1]=n):n=t[1],n}function Sl(){const t=H.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(vs,{area:"roles",children:s.jsx(Ys,{})}),t[0]=e):e=t[0],e}export{Sl as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as p,j as t,U as P,r as j,_ as w,B as S,t as y}from"./index-CsZhMKFM.js";import{i as k}from"./AlertCircle-BsA2wZmN.js";import{s as z}from"./Plus-Cgq7ON9K.js";import{s as F}from"./User01-5hu8D3_O.js";import{t as E}from"./Users01-Dh5E4dqf.js";import{e as $,d as I,D as O,a as A,f as R,c as T}from"./dialog-DZtdYFi_.js";import{I as N}from"./input-D5ccsU_1.js";import{L as g}from"./label-BULuaMoF.js";import{S as B,a as V,b as L,c as q,d as C}from"./select-CVMXwLRV.js";import{S as H}from"./skeleton-BZzqWIif.js";import{T as K}from"./textarea-DPLwPKZJ.js";import{P as b}from"./index-DS3hrf0F.js";import{c as U}from"./settings-section-BYCtjEaG.js";import{u as W,a as Y}from"./use-secrets-CdGKHqA-.js";import{R as G}from"./require-capability-BjscC7QS.js";import"./X-OFSHASit.js";import"./tooltip-Cs5hng3q.js";import"./Check-CcLLJc-z.js";import"./ChevronDown-BmFaSDo8.js";import"./ChevronUp-Dew3RmKl.js";import"./sidebar-DRSu2iBz.js";import"./LayoutLeft-DvNM8qhm.js";import"./use-mobile-DhhfLpzh.js";import"./card-Bc92PJFP.js";import"./ArrowUpRight-DdPCnlNm.js";import"./studio-tools-CTswP4mA.js";import"./use-capability-DmeYLlad.js";import"./access-gate-B4XS-sin.js";import"./capability-load-error-COzn8-Xb.js";function J(s){const e=p.c(3),{error:r}=s;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(k,{size:16}),e[0]=c):c=e[0];let n;return e[1]!==r.message?(n=t.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,t.jsxs("span",{className:"text-sm font-medium",children:["Failed to load secrets: ",r.message]})]}),e[1]=r.message,e[2]=n):n=e[2],n}function M(s){const e=p.c(5),{scope:r}=s,c=r==="user"?F:E,n=r==="user"?"Private":"Organization";let i;e[0]!==c?(i=t.jsx(c,{size:12}),e[0]=c,e[1]=i):i=e[1];let a;return e[2]!==n||e[3]!==i?(a=t.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[i,n]}),e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function D(s){const e=p.c(20),{secret:r}=s;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:t.jsx(w,{size:16,className:"text-muted-foreground"})}),e[0]=c):c=e[0];let n;e[1]!==r.name?(n=t.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=n):n=e[2];let i;e[3]!==r.scope?(i=t.jsx(M,{scope:r.scope}),e[3]=r.scope,e[4]=i):i=e[4];let a;e[5]!==n||e[6]!==i?(a=t.jsxs("div",{className:"flex items-center gap-2",children:[n,i]}),e[5]=n,e[6]=i,e[7]=a):a=e[7];let d;e[8]!==r.description?(d=r.description?t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=d):d=e[9];let u;e[10]!==a||e[11]!==d?(u=t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[c,t.jsxs("div",{className:"min-w-0",children:[a,d]})]}),e[10]=a,e[11]=d,e[12]=u):u=e[12];let l;e[13]!==r.createdAt?(l=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=l):l=e[14];let o;e[15]!==l?(o=t.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:l}),e[15]=l,e[16]=o):o=e[16];let x;return e[17]!==u||e[18]!==o?(x=t.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[u,o]}),e[17]=u,e[18]=o,e[19]=x):x=e[19],x}function Q(s){const e=p.c(5),{onCreate:r}=s;let c,n;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:t.jsx(w,{size:20,className:"text-muted-foreground"})}),n=t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-sm",children:"No secrets yet"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:"Store API keys, tokens, and other sensitive values. Values are encrypted at rest and never returned over the API."})]}),e[0]=c,e[1]=n):(c=e[0],n=e[1]);let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(z,{size:14}),e[2]=i):i=e[2];let a;return e[3]!==r?(a=t.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,n,t.jsxs(S,{onClick:r,size:"sm",className:"mt-2",children:[i,"New secret"]})]}),e[3]=r,e[4]=a):a=e[4],a}function _({open:s,onOpenChange:e}){const[r,c]=j.useState("organization"),[n,i]=j.useState(""),[a,d]=j.useState(""),[u,l]=j.useState(""),o=Y();function x(){c("organization"),i(""),d(""),l("")}function f(){x(),e(!1)}async function h(m){if(m.preventDefault(),!(!n.trim()||!a))try{await o.mutateAsync({scope:r,name:n.trim(),value:a,description:u.trim()||void 0}),y.success(`Secret "${n.trim()}" created`),f()}catch(v){y.error(v instanceof Error?v.message:"Failed to create secret")}}return t.jsx($,{open:s,onOpenChange:m=>{m?e(m):f()},children:t.jsxs(I,{className:"sm:max-w-lg",children:[t.jsxs(O,{children:[t.jsx(A,{children:"New secret"}),t.jsx(R,{children:"Stored encrypted in the credential vault. Choose who can read it."})]}),t.jsxs("form",{onSubmit:h,className:"space-y-4",children:[t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-scope",children:"Scope"}),t.jsxs(B,{value:r,onValueChange:m=>c(m),children:[t.jsx(V,{id:"secret-scope",children:t.jsx(L,{})}),t.jsxs(q,{children:[t.jsx(C,{value:"organization",children:"Organization — visible to all members"}),t.jsx(C,{value:"user",children:"Private — only visible to me"})]})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-name",children:"Name"}),t.jsx(N,{id:"secret-name",value:n,onChange:m=>i(m.target.value),placeholder:"STRIPE_API_KEY",autoComplete:"off",required:!0}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Letters, digits, underscore, dot, hyphen. Case-insensitive within its scope."})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-value",children:"Value"}),t.jsx(N,{id:"secret-value",type:"password",value:a,onChange:m=>d(m.target.value),autoComplete:"new-password",required:!0})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(g,{htmlFor:"secret-description",children:"Description (optional)"}),t.jsx(K,{id:"secret-description",value:u,onChange:m=>l(m.target.value),rows:2,placeholder:"What is this secret used for?"})]}),t.jsxs(T,{children:[t.jsx(S,{type:"button",variant:"outline",onClick:f,disabled:o.isPending,children:"Cancel"}),t.jsx(S,{type:"submit",disabled:o.isPending||!n.trim()||!a,children:o.isPending?"Creating…":"Create secret"})]})]})]})})}function X(){const s=p.c(21),e=W(),[r,c]=j.useState(!1);if(e.length===0){let l;s[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Q,{onCreate:()=>c(!0)}),s[0]=l):l=s[0];let o;return s[1]!==r?(o=t.jsxs(t.Fragment,{children:[l,t.jsx(_,{open:r,onOpenChange:c})]}),s[1]=r,s[2]=o):o=s[2],o}let n,i,a;if(s[3]!==e){const l=e.filter(se),o=e.filter(te),x=e.length===1?"":"s";let f;s[7]!==e.length||s[8]!==x?(f=t.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.length," secret",x," stored"]}),s[7]=e.length,s[8]=x,s[9]=f):f=s[9];let h;s[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>c(!0),s[10]=h):h=s[10];let m;s[11]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs(S,{onClick:h,size:"sm",children:[t.jsx(z,{size:14}),"New secret"]}),s[11]=m):m=s[11],s[12]!==f?(n=t.jsxs("div",{className:"flex items-center justify-between",children:[f,m]}),s[12]=f,s[13]=n):n=s[13],i=l.length>0?t.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[t.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Organization"}),t.jsx("div",{children:l.map(ee)})]}):null,a=o.length>0?t.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[t.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Private to me"}),t.jsx("div",{children:o.map(Z)})]}):null,s[3]=e,s[4]=n,s[5]=i,s[6]=a}else n=s[4],i=s[5],a=s[6];let d;s[14]!==r?(d=t.jsx(_,{open:r,onOpenChange:c}),s[14]=r,s[15]=d):d=s[15];let u;return s[16]!==n||s[17]!==i||s[18]!==a||s[19]!==d?(u=t.jsxs(t.Fragment,{children:[n,i,a,d]}),s[16]=n,s[17]=i,s[18]=a,s[19]=d,s[20]=u):u=s[20],u}function Z(s){return t.jsx(D,{secret:s},s.id)}function ee(s){return t.jsx(D,{secret:s},s.id)}function te(s){return s.scope==="user"}function se(s){return s.scope==="organization"}function re(){const s=p.c(2);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(b.Title,{children:"Secrets"}),s[0]=e):e=s[0];let r;return s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(b,{children:t.jsx(b.Content,{children:t.jsx(b.Body,{children:t.jsxs(U,{children:[e,t.jsx(P,{fallback:ne,children:t.jsx(j.Suspense,{fallback:t.jsx(H,{className:"h-32 w-full"}),children:t.jsx(X,{})})})]})})})}),s[1]=r):r=s[1],r}function ne(s){const{error:e}=s;return t.jsx(J,{error:e??new Error("Failed to load secrets")})}function Ie(){const s=p.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(G,{capability:"secrets:manage",area:"secrets",children:t.jsx(re,{})}),s[0]=e):e=s[0],e}export{Ie as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as S,e as A,j as s,a4 as J,l as k,_ as Q,L,R as B,a8 as I,a as G,i as D,r as F,O as K}from"./index-CsZhMKFM.js";import{u as T}from"./useRouterState-DjtN_ggp.js";import{j as U,k as V,l as X,S as q,a as w,b as M,d as P,c as O,g as Y,h as Z}from"./sidebar-DRSu2iBz.js";import{a as ee}from"./index-DS3hrf0F.js";import{n as se,c as te,a as le,d as re,b as ie,i as E}from"./ZapSquare-Dzb50Gix.js";import{t as oe,a as R}from"./Users03-tGwfKVJc.js";import{i as ne}from"./HardDrive-CR6Rs-a1.js";import{i as ae}from"./Key01-1r4YrQER.js";import{i as ce}from"./Shield01-C6TdRfmI.js";import{s as me}from"./User01-5hu8D3_O.js";import{i as fe}from"./Zap-CgjpaG4V.js";import{a as de}from"./use-capability-DmeYLlad.js";import{u as xe}from"./use-join-requests-NgN8gue3.js";import{u as W}from"./use-mobile-DhhfLpzh.js";import{u as be}from"./use-status-sounds-Uz1qdvt2.js";import{T as y}from"./toolbar-CedVmC1P.js";import{S as ue,M as he}from"./shell-controls-Daj0PZIQ.js";import"./LayoutLeft-DvNM8qhm.js";import"./X-OFSHASit.js";import"./tooltip-Cs5hng3q.js";import"./studio-tools-CTswP4mA.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-CWf9qNc0.js";import"./decopilot-sse-pool-CJtSg3wj.js";import"./backoff-CrEUbyZT.js";import"./toolbar-icon-button-5fStNBy9.js";function H(){const e=S.c(21),{capabilities:t,isPrivileged:m,loading:l,error:i}=de(),o=xe().length;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(oe,{size:14}),e[0]=n):n=e[0];let r,a;if(e[1]!==t||e[2]!==i||e[3]!==m||e[4]!==o||e[5]!==l){a=Symbol.for("react.early_return_sentinel");e:{let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(se,{size:14}),e[8]=f):f=e[8];let d;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(te,{size:14}),e[9]=d):d=e[9];let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ae,{size:14}),e[10]=c):c=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ne,{size:14}),e[11]=x):x=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(le,{size:14}),e[12]=b):b=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(R,{size:14}),e[13]=p):p=e[13];let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(fe,{size:14}),e[14]=h):h=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(re,{size:14}),e[15]=g):g=e[15];let u;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ie,{size:14}),e[16]=u):u=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(R,{size:14}),e[17]=_):_=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ce,{size:14}),e[18]=j):j=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Q,{size:14}),e[19]=v):v=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(me,{size:14}),e[20]=N):N=e[20];const z=[{label:"Organization",items:[{key:"general",label:"General",icon:n,to:"/$org/settings/general",requires:"org:manage"},{key:"brand-context",label:"Brand Context",icon:f,to:"/$org/settings/brand-context",requires:"org:manage"},{key:"ai-providers",label:"AI Providers",icon:d,to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"secrets",label:"Secrets",icon:c,to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"buckets",label:"Buckets",icon:x,to:"/$org/settings/buckets",requires:"file-configs:manage"}]},{label:"Build",items:[{key:"connections",label:"Connections",icon:b,to:"/$org/settings/connections"},{key:"agents",label:"Agents",icon:p,to:"/$org/settings/agents"},{key:"automations",label:"Automations",icon:h,to:"/$org/settings/automations",requires:"automations:manage"},{key:"store",label:"Store",icon:g,to:"/$org/settings/store",requires:"registry:manage"}]},{label:"Manage",items:[{key:"monitor",label:"Monitor",icon:u,to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:"Members",icon:_,to:"/$org/settings/members",requires:"members:manage",badge:o},{key:"roles",label:"Roles",icon:j,to:"/$org/settings/roles",privilegedOnly:!0},{key:"sso",label:"Security",icon:v,to:"/$org/settings/sso",requires:"org:manage"}]},{label:"Account",items:[{key:"profile",label:"Profile & Preferences",icon:N,to:"/$org/settings/profile"}]}];if(l||i){a=z;break e}r=z.map(C=>({...C,items:C.items.filter($=>$.privilegedOnly?m:$.requires?m||t[$.requires]:!0)})).filter(pe)}e[1]=t,e[2]=i,e[3]=m,e[4]=o,e[5]=l,e[6]=r,e[7]=a}else r=e[6],a=e[7];return a!==Symbol.for("react.early_return_sentinel")?a:r}function pe(e){return e.items.length>0}function ge(){const e=S.c(19),t=H();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={from:"/shell/$org"},e[0]=m):m=e[0];const{org:l}=A(m);let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i={select:_e},e[1]=i):i=e[1];const o=T(i);let n;e[2]!==l||e[3]!==o?(n=p=>{const h=p.replace("$org",l);return o.startsWith(h)},e[2]=l,e[3]=o,e[4]=n):n=e[4];const r=n;let a;if(e[5]!==t||e[6]!==r||e[7]!==l){let p;e[9]!==r||e[10]!==l?(p=(h,g)=>s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[h.label&&s.jsx("p",{className:k("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",g>0&&"mt-3"),children:h.label}),s.jsx(w,{children:s.jsx(M,{className:"gap-0.5",children:h.items.map(u=>s.jsx(P,{children:s.jsx(O,{asChild:!0,isActive:r(u.to),children:s.jsxs(L,{to:u.to,params:{org:l},onClick:()=>B("settings_nav_clicked",{section_key:u.key,section_label:u.label,group_label:h.label||"main"}),className:"flex items-center gap-2.5 text-sm",children:[s.jsxs("span",{className:"relative shrink-0",children:[u.icon,u.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:u.label})]})})},u.key))})})]},`${h.label}-${g}`),e[9]=r,e[10]=l,e[11]=p):p=e[11],a=t.map(p),e[5]=t,e[6]=r,e[7]=l,e[8]=a}else a=e[8];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[12]=f):f=e[12];let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(q,{className:"pt-0 pr-0 pb-0 pl-0",children:[f,s.jsx(w,{children:s.jsx(M,{className:"gap-0.5",children:s.jsx(P,{children:s.jsxs(O,{onClick:je,className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(E,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})})})})]}),e[13]=d):d=e[13];let c;e[14]!==a?(c=s.jsxs(Y,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0 overflow-y-auto",children:[a,d]}),e[14]=a,e[15]=c):c=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.61.2"]})}),e[16]=x):x=e[16];let b;return e[17]!==c?(b=s.jsxs(Z,{variant:"sidebar",children:[c,x]}),e[17]=c,e[18]=b):b=e[18],b}function je(){B("signed_out",{source:"settings_sidebar"}),I(),G.signOut()}function _e(e){return e.location.pathname}function ye(e){const t=S.c(21),{onClose:m}=e,l=H();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org"},t[0]=i):i=t[0];const{org:o}=A(i);let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n={select:ve},t[1]=n):n=t[1];const r=T(n);let a;t[2]!==o||t[3]!==r?(a=g=>{const u=g.replace("$org",o);return r.startsWith(u)},t[2]=o,t[3]=r,t[4]=a):a=t[4];const f=a;let d;if(t[5]!==l||t[6]!==f||t[7]!==m||t[8]!==o){let g;t[10]!==f||t[11]!==m||t[12]!==o?(g=(u,_)=>s.jsxs("div",{className:"flex flex-col gap-0.5",children:[u.label&&s.jsx("p",{className:k("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",_>0&&"mt-3"),children:u.label}),u.items.map(j=>s.jsxs(L,{to:j.to,params:{org:o},onClick:m,className:k("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",f(j.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[s.jsxs("span",{className:"relative shrink-0",children:[j.icon,j.badge?s.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-red-500 pointer-events-none"}):null]}),s.jsx("span",{className:"truncate",children:j.label})]},j.key))]},`${u.label}-${_}`),t[10]=f,t[11]=m,t[12]=o,t[13]=g):g=t[13],d=l.map(g),t[5]=l,t[6]=f,t[7]=m,t[8]=o,t[9]=d}else d=t[9];let c;t[14]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"h-px bg-border/50 my-2"}),t[14]=c):c=t[14];let x;t[15]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[c,s.jsxs("button",{type:"button",onClick:Se,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(E,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})]}),t[15]=x):x=t[15];let b;t[16]!==d?(b=s.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[d,x]}),t[16]=d,t[17]=b):b=t[17];let p;t[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.61.2"]})}),t[18]=p):p=t[18];let h;return t[19]!==b?(h=s.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[b,p]}),t[19]=b,t[20]=h):h=t[20],h}function Se(){I(),G.signOut()}function ve(e){return e.location.pathname}function Ne(){const e=S.c(4),t=W(),{org:m}=J();be(m.slug);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(D,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=l):l=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(F.Suspense,{fallback:l,children:s.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:s.jsx(ee,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(K,{})})})})}),e[1]=i):i=e[1];const o=i;if(t){let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:o}),e[2]=r):r=e[2],r}let n;return e[3]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex-1 min-h-0 p-1",children:s.jsx("div",{className:k("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:o})}),e[3]=n):n=e[3],n}function Ye(){const e=S.c(21),t=W();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(y.LogoLink,{}),e[0]=m):m=e[0];let l;e[1]!==t?(l=t&&s.jsx(ue,{}),e[1]=t,e[2]=l):l=e[2];let i;e[3]!==l?(i=s.jsxs(y.LeftColumn,{children:[m,l]}),e[3]=l,e[4]=i):i=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(y.CenterSlot,{}),e[5]=o):o=e[5];let n;e[6]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(y.RightColumn,{children:s.jsx("span",{})}),e[6]=n):n=e[6];let r;e[7]!==i?(r=s.jsxs(y.Header,{children:[i,o,n]}),e[7]=i,e[8]=r):r=e[8];let a;e[9]===Symbol.for("react.memo_cache_sentinel")?(a={"--sidebar-width-icon":"3.125rem"},e[9]=a):a=e[9];let f;e[10]!==t?(f=!t&&s.jsx(ge,{}),e[10]=t,e[11]=f):f=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(U,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:s.jsx(Ne,{})}),e[12]=d):d=e[12];let c;e[13]!==f?(c=s.jsxs(V,{className:"flex-1 bg-sidebar min-h-0",style:a,children:[f,d]}),e[13]=f,e[14]=c):c=e[14];let x;e[15]!==t?(x=t&&s.jsx(he,{renderSidebar:ke}),e[15]=t,e[16]=x):x=e[16];let b;return e[17]!==x||e[18]!==r||e[19]!==c?(b=s.jsx(y.Provider,{children:s.jsx(X,{defaultOpen:!0,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[r,c,x]})})}),e[17]=x,e[18]=r,e[19]=c,e[20]=b):b=e[20],b}function ke(e){const{onClose:t}=e;return s.jsx(ye,{onClose:t})}export{ge as SettingsSidebar,ye as SettingsSidebarMobile,Ye as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as k,d as ee,j as s,B as O,bU as H,t as J,_ as xe,a as Y,X as Ce,P as be,K as se,bV as Te,bW as Ee,Y as B,r as K,m as te,bX as $e,bY as Le,b as ze,a4 as De,e as we,u as Ie,a5 as Me,aY as Pe,bZ as Fe,b_ as me,b$ as Re,c0 as qe,S as Ue,O as Ge,c1 as Ke}from"./index-CsZhMKFM.js";import{A as oe}from"./avatar-DOYkgu8W.js";import{t as Se,a as He}from"./Users03-tGwfKVJc.js";import{i as Be}from"./SearchLg-2as_l8YT.js";import{i as Ye,s as Je,a as z,n as We}from"./Stars02-HLp9q8iP.js";import{s as Ve}from"./XClose-D5Ra7e-f.js";import{i as I}from"./CheckCircle-lXciCGfG.js";import{i as fe}from"./FilterLines-DCNZa1GS.js";import{i as G}from"./Zap-CgjpaG4V.js";import{d as Qe,D as Xe,a as Ze,e as et}from"./dialog-DZtdYFi_.js";import{b as tt,c as nt,d as st,a as ot,e as it,g as at,f as rt}from"./alert-dialog-Bd5XLC3F.js";import{R as lt}from"./required-auth-layout-R2McgzF5.js";import{A as ct}from"./autosend-qB5BaOSA.js";import{m as dt}from"./use-mcp-client-Bv8WGceO.js";import{a as he,S as ut}from"./constants-CaIX_f5U.js";import{g as mt,c as ft}from"./hooks-GnFkomrq.js";import{q as ht}from"./tab-id-bb-jjgGv.js";import{e as gt}from"./use-organization-settings-C4hP3pVq.js";import{u as pt}from"./use-org-sso-DDm0m5Eb.js";function yt(t){const e=k.c(27),{orgName:n,orgSlug:o,orgLogo:i,domain:r}=t;let a;e[0]!==o?(a={mutationFn:async()=>{const S=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),v=await S.json();if(!S.ok||!v.success)throw new Error(v.error??"Failed to join organization");return v},onSuccess:S=>{window.location.href=`/${S.slug??o}`},onError:bt},e[0]=o,e[1]=a):a=e[1];const l=ee(a),c=xt;let u;e[2]!==i||e[3]!==n?(u=i?s.jsx(oe,{url:i,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Se,{className:"h-6 w-6 text-primary"})}),e[2]=i,e[3]=n,e[4]=u):u=e[4];let d;e[5]!==n?(d=s.jsxs("h3",{className:"text-lg font-medium",children:["Join ",n,"?"]}),e[5]=n,e[6]=d):d=e[6];let m;e[7]!==r?(m=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Anyone with an ",s.jsxs("strong",{children:["@",r]})," email can join this organization."]}),e[7]=r,e[8]=m):m=e[8];let h;e[9]!==d||e[10]!==m?(h=s.jsxs("div",{className:"space-y-2",children:[d,m]}),e[9]=d,e[10]=m,e[11]=h):h=e[11];let p;e[12]!==l?(p=()=>l.mutate(),e[12]=l,e[13]=p):p=e[13];const f=l.isPending?"Joining…":`Enter ${n}`;let g;e[14]!==l.isPending||e[15]!==p||e[16]!==f?(g=s.jsx(O,{onClick:p,disabled:l.isPending,children:f}),e[14]=l.isPending,e[15]=p,e[16]=f,e[17]=g):g=e[17];let y;e[18]!==l.isPending?(y=s.jsx(O,{variant:"ghost",onClick:c,disabled:l.isPending,children:"Go to home"}),e[18]=l.isPending,e[19]=y):y=e[19];let w;e[20]!==g||e[21]!==y?(w=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[g,y]}),e[20]=g,e[21]=y,e[22]=w):w=e[22];let b;return e[23]!==w||e[24]!==u||e[25]!==h?(b=s.jsxs(H,{children:[u,h,w]}),e[23]=w,e[24]=u,e[25]=h,e[26]=b):b=e[26],b}function xt(){window.location.href="/"}function bt(t){J.error(t instanceof Error?t.message:"Failed to join organization")}function ge(t){const e=k.c(17),{orgSlug:n,orgName:o,reason:i}=t,r=wt,a=i==="not-found",l=a?Be:xe,c=a?"Organization not found":"No access";let u;e[0]!==a||e[1]!==o||e[2]!==n?(u=a?s.jsxs(s.Fragment,{children:["We couldn't find an organization called ",s.jsx("strong",{children:n}),"."]}):s.jsxs(s.Fragment,{children:["You don't have access to ",s.jsx("strong",{children:o??n}),".",s.jsx("br",{}),"Ask an admin to invite you."]}),e[0]=a,e[1]=o,e[2]=n,e[3]=u):u=e[3];const d=u;let m;e[4]!==l?(m=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(l,{className:"h-6 w-6 text-muted-foreground"})}),e[4]=l,e[5]=m):m=e[5];let h;e[6]!==c?(h=s.jsx("h3",{className:"text-lg font-medium",children:c}),e[6]=c,e[7]=h):h=e[7];let p;e[8]!==d?(p=s.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[8]=d,e[9]=p):p=e[9];let f;e[10]!==h||e[11]!==p?(f=s.jsxs("div",{className:"space-y-2",children:[h,p]}),e[10]=h,e[11]=p,e[12]=f):f=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(O,{onClick:r,children:"Go to home"}),e[13]=g):g=e[13];let y;return e[14]!==m||e[15]!==f?(y=s.jsxs(H,{children:[m,f,g]}),e[14]=m,e[15]=f,e[16]=y):y=e[16],y}function wt(){window.location.href="/"}function St(t){const e=k.c(39),{invitationId:n,orgName:o,orgSlug:i,orgLogo:r}=t;let a;e[0]!==n?(a=async()=>{const _=await Y.organization.acceptInvitation({invitationId:n});if(_.error)throw new Error(_.error.message);return _.data},e[0]=n,e[1]=a):a=e[1];let l;e[2]!==i?(l=()=>{Ce(),window.location.href=`/${i}`},e[2]=i,e[3]=l):l=e[3];let c;e[4]!==a||e[5]!==l?(c={mutationFn:a,onSuccess:l,onError:kt},e[4]=a,e[5]=l,e[6]=c):c=e[6];const u=ee(c);let d;e[7]!==n?(d=async()=>{const _=await Y.organization.rejectInvitation({invitationId:n});if(_.error)throw new Error(_.error.message);return _.data},e[7]=n,e[8]=d):d=e[8];let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m=vt,e[9]=m):m=e[9];let h;e[10]!==d?(h={mutationFn:d,onSuccess:m,onError:jt},e[10]=d,e[11]=h):h=e[11];const p=ee(h),f=u.isPending||p.isPending;let g;e[12]!==r||e[13]!==o?(g=r?s.jsx(oe,{url:r,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Ye,{className:"h-6 w-6 text-primary"})}),e[12]=r,e[13]=o,e[14]=g):g=e[14];let y;e[15]!==o?(y=s.jsxs("h3",{className:"text-lg font-medium",children:["You've been invited to ",s.jsx("strong",{children:o})]}),e[15]=o,e[16]=y):y=e[16];let w;e[17]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("p",{className:"text-sm text-muted-foreground",children:"Accept the invitation to join this organization."}),e[17]=w):w=e[17];let b;e[18]!==y?(b=s.jsxs("div",{className:"space-y-2",children:[y,w]}),e[18]=y,e[19]=b):b=e[19];let S;e[20]!==u?(S=()=>u.mutate(),e[20]=u,e[21]=S):S=e[21];const v=u.isPending?"Accepting…":"Accept invitation";let N;e[22]!==f||e[23]!==S||e[24]!==v?(N=s.jsx(O,{onClick:S,disabled:f,children:v}),e[22]=f,e[23]=S,e[24]=v,e[25]=N):N=e[25];let T;e[26]!==p?(T=()=>p.mutate(),e[26]=p,e[27]=T):T=e[27];const $=p.isPending?"Declining…":"Decline";let x;e[28]!==f||e[29]!==T||e[30]!==$?(x=s.jsx(O,{variant:"ghost",onClick:T,disabled:f,children:$}),e[28]=f,e[29]=T,e[30]=$,e[31]=x):x=e[31];let E;e[32]!==N||e[33]!==x?(E=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,x]}),e[32]=N,e[33]=x,e[34]=E):E=e[34];let L;return e[35]!==b||e[36]!==E||e[37]!==g?(L=s.jsxs(H,{children:[g,b,E]}),e[35]=b,e[36]=E,e[37]=g,e[38]=L):L=e[38],L}function jt(t){J.error(t instanceof Error?t.message:"Failed to decline invitation")}function vt(){J.success("Invitation declined"),window.location.href="/"}function kt(t){J.error(t instanceof Error?t.message:"Failed to accept invitation")}function Nt(t){const e=k.c(10),{orgName:n,orgLogo:o}=t;let i;e[0]!==o||e[1]!==n?(i=o?s.jsx(oe,{url:o,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Je,{className:"h-6 w-6 text-primary"})}),e[0]=o,e[1]=n,e[2]=i):i=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("h3",{className:"text-lg font-medium",children:"Request pending"}),e[3]=r):r=e[3];let a;e[4]!==n?(a=s.jsxs("div",{className:"space-y-2",children:[r,s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Your request to join ",s.jsx("strong",{children:n})," is waiting for an admin to approve it. You'll get access once it's approved."]})]}),e[4]=n,e[5]=a):a=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(O,{variant:"ghost",onClick:_t,children:"Go to home"}),e[6]=l):l=e[6];let c;return e[7]!==i||e[8]!==a?(c=s.jsxs(H,{children:[i,a,l]}),e[7]=i,e[8]=a,e[9]=c):c=e[9],c}function _t(){window.location.href="/"}function At(t){const e=k.c(30),{orgName:n,orgSlug:o,orgLogo:i,domain:r}=t;let a;e[0]!==o?(a=async()=>{const v=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:o})}),N=await v.json();if(!v.ok||!N.success)throw new Error(N.error??"Failed to request access");return N},e[0]=o,e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=Tt,e[2]=l):l=e[2];let c;e[3]!==a?(c={mutationFn:a,onSuccess:l,onError:Ct},e[3]=a,e[4]=c):c=e[4];const u=ee(c);let d;e[5]!==i||e[6]!==n?(d=i?s.jsx(oe,{url:i,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(Se,{className:"h-6 w-6 text-primary"})}),e[5]=i,e[6]=n,e[7]=d):d=e[7];let m;e[8]!==n?(m=s.jsxs("h3",{className:"text-lg font-medium",children:["Request to join ",n,"?"]}),e[8]=n,e[9]=m):m=e[9];let h;e[10]!==r?(h=s.jsxs("p",{className:"text-sm text-muted-foreground",children:["An admin must approve requests from ",s.jsxs("strong",{children:["@",r]})," emails before you can join."]}),e[10]=r,e[11]=h):h=e[11];let p;e[12]!==m||e[13]!==h?(p=s.jsxs("div",{className:"space-y-2",children:[m,h]}),e[12]=m,e[13]=h,e[14]=p):p=e[14];let f;e[15]!==u?(f=()=>u.mutate(),e[15]=u,e[16]=f):f=e[16];const g=u.isPending?"Requesting…":"Request to join";let y;e[17]!==u.isPending||e[18]!==f||e[19]!==g?(y=s.jsx(O,{onClick:f,disabled:u.isPending,children:g}),e[17]=u.isPending,e[18]=f,e[19]=g,e[20]=y):y=e[20];let w;e[21]!==u.isPending?(w=s.jsx(O,{variant:"ghost",onClick:Ot,disabled:u.isPending,children:"Go to home"}),e[21]=u.isPending,e[22]=w):w=e[22];let b;e[23]!==y||e[24]!==w?(b=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[y,w]}),e[23]=y,e[24]=w,e[25]=b):b=e[25];let S;return e[26]!==b||e[27]!==d||e[28]!==p?(S=s.jsxs(H,{children:[d,p,b]}),e[26]=b,e[27]=d,e[28]=p,e[29]=S):S=e[29],S}function Ot(){window.location.href="/"}function Ct(t){J.error(t instanceof Error?t.message:"Failed to request access")}function Tt(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function Et(t){const e=k.c(7);let n;e[0]!==t?(n=se.orgAccessStatus(t),e[0]=t,e[1]=n):n=e[1];let o;e[2]!==t?(o=async()=>{const r=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!r.ok)throw new Error(`org-access-status failed (${r.status})`);return await r.json()},e[2]=t,e[3]=o):o=e[3];let i;return e[4]!==n||e[5]!==o?(i={queryKey:n,queryFn:o,refetchOnWindowFocus:!1},e[4]=n,e[5]=o,e[6]=i):i=e[6],be(i)}function $t({orgSlug:t}){const{data:e}=Et(t);if(e.status!=="member"){Te()?.org===t&&Ee();const n=localStorage.getItem(B.lastOrgSlug())===t;if(n&&localStorage.removeItem(B.lastOrgSlug()),n&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?s.jsx(ge,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?s.jsx(St,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?s.jsx(yt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?s.jsx(At,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?s.jsx(Nt,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):s.jsx(ge,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function Lt(t){const e=k.c(20),{release:n,onCtaClick:o,onLearnMoreClick:i}=t;let r;e[0]!==n.eyebrow?(r=n.eyebrow&&s.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[0]=n.eyebrow,e[1]=r):r=e[1];let a;e[2]!==n.title?(a=s.jsx("h3",{className:"text-base font-semibold text-foreground",children:n.title}),e[2]=n.title,e[3]=a):a=e[3];let l;e[4]!==r||e[5]!==a?(l=s.jsxs("div",{children:[r,a]}),e[4]=r,e[5]=a,e[6]=l):l=e[6];let c;e[7]!==n.bullets?(c=n.bullets.map(zt),e[7]=n.bullets,e[8]=c):c=e[8];let u;e[9]!==c?(u=s.jsx("ul",{className:"flex flex-col gap-3",children:c}),e[9]=c,e[10]=u):u=e[10];let d;e[11]!==o||e[12]!==i||e[13]!==n.cta||e[14]!==n.learnMoreHref?(d=(n.cta||n.learnMoreHref)&&s.jsxs("div",{className:"flex items-center justify-between pt-1",children:[n.learnMoreHref?s.jsx("a",{href:n.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:i,className:"text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline",children:"Learn More"}):s.jsx("span",{}),n.cta&&s.jsx(O,{asChild:!0,size:"sm",onClick:o,children:s.jsx("a",{href:n.cta.href,children:n.cta.label})})]}),e[11]=o,e[12]=i,e[13]=n.cta,e[14]=n.learnMoreHref,e[15]=d):d=e[15];let m;return e[16]!==l||e[17]!==u||e[18]!==d?(m=s.jsxs("div",{className:"flex flex-col gap-3",children:[l,u,d]}),e[16]=l,e[17]=u,e[18]=d,e[19]=m):m=e[19],m}function zt(t,e){return s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx(t.icon,{size:20,className:"text-muted-foreground mt-0.5 shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),s.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const je=[{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:z,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:I,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:G,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:z,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:I,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:G,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:I,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:z,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:G,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:z,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:I,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:G,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:z,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:I,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:G,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:z,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:fe,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:I,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:He,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:G,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:I,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:z,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:fe,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:z,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:We,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],ne="studio.release-feed.v1",ce=new Set;let M="",P={},de=!1;function Dt(){if(de)return M||"{}";try{return localStorage.getItem(ne)??"{}"}catch{return M||"{}"}}function ve(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function pe(){const t=Dt();return t!==M&&(M=t,P=ve(t)),P}function It(t){ce.add(t);const e=n=>{if(!(n.key!==ne&&n.key!==null)){try{const o=localStorage.getItem(ne)??"{}",r={...ve(o),...P};P=r,M=JSON.stringify(r)}catch{}t()}};return window.addEventListener("storage",e),()=>{ce.delete(t),window.removeEventListener("storage",e)}}function Mt(t){P=t,M=JSON.stringify(t);try{localStorage.setItem(ne,M),de=!1}catch{de=!0}ce.forEach(e=>e())}function Pt(){const t=k.c(7),e=K.useSyncExternalStore(It,pe,pe);let n;t[0]!==e?(n=c=>!!e[c],t[0]=e,t[1]=n):n=t[1];const o=n,i=Ft;let r;t[2]!==e?(r=je.reduce((c,u)=>e[u.id]?c:c+1,0),t[2]=e,t[3]=r):r=t[3];const a=r;let l;return t[4]!==o||t[5]!==a?(l={isSeen:o,markSeen:i,unseenCount:a},t[4]=o,t[5]=a,t[6]=l):l=t[6],l}function Ft(t){P[t]||Mt({...P,[t]:{seenAt:new Date().toISOString()}})}const Rt=720*60*60*1e3,qt=10080*60*1e3;function Ut(t){const[e,n,o]=t.split("-").map(Number);return!e||!n||!o?new Date(t).getTime():new Date(e,n-1,o).getTime()}function Gt(t){const e=je[0];if(!e)return null;const n=Ut(e.date),o=t-n;return o<0||o>Rt?null:e}function Kt(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function Ht(t,e){const n=Kt(t);return n===null?!1:e-n>=qt}function Bt(){const t=k.c(22),{data:e}=Y.useSession(),{isSeen:n,markSeen:o}=Pt();let i,r,a;if(t[0]!==n||t[1]!==e?.user?.createdAt){a=Symbol.for("react.early_return_sentinel");e:{const f=Date.now();if(i=Gt(f),!i){a=null;break e}if(!Ht(e?.user?.createdAt,f)){a=null;break e}r=n(i.id)}t[0]=n,t[1]=e?.user?.createdAt,t[2]=i,t[3]=r,t[4]=a}else i=t[2],r=t[3],a=t[4];if(a!==Symbol.for("react.early_return_sentinel"))return a;if(r)return null;let l;t[5]!==i.id||t[6]!==o?(l=()=>o(i.id),t[5]=i.id,t[6]=o,t[7]=l):l=t[7];let c;t[8]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ve,{size:14}),t[8]=c):c=t[8];let u;t[9]!==l?(u=s.jsx(O,{size:"icon",variant:"ghost","aria-label":"Dismiss release announcement",className:"absolute right-2 top-2 size-7 text-muted-foreground",onClick:l,children:c}),t[9]=l,t[10]=u):u=t[10];let d,m;t[11]!==i.id||t[12]!==o?(d=()=>o(i.id),m=()=>o(i.id),t[11]=i.id,t[12]=o,t[13]=d,t[14]=m):(d=t[13],m=t[14]);let h;t[15]!==i||t[16]!==d||t[17]!==m?(h=s.jsx(Lt,{release:i,onCtaClick:d,onLearnMoreClick:m}),t[15]=i,t[16]=d,t[17]=m,t[18]=h):h=t[18];let p;return t[19]!==u||t[20]!==h?(p=s.jsxs("div",{role:"dialog","aria-label":"Release announcement",className:"fixed bottom-6 right-6 z-50 w-[min(360px,calc(100vw-3rem))] rounded-lg border border-border bg-background p-4 shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[u,h]}),t[19]=u,t[20]=h,t[21]=p):p=t[21],p}const ke=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),D=ke?"⌘":"Ctrl",C={keyboardShortcuts:{keys:[D,"K"],description:"Keyboard shortcuts"},back:{keys:[D,"["],description:"Back to previous"},focusChatInput:{keys:[D,"L"],description:"Focus chat input"},saveAndFormat:{keys:[D,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[D,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[D,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",D,"S"],description:"New task"},toggleDaemon:{keys:[D,"D"],description:"Toggle daemon logs"}},Yt=[{label:"General",shortcuts:[C.keyboardShortcuts,C.back,C.newTask,C.toggleDaemon]},{label:"Editor",shortcuts:[C.saveAndFormat]},{label:"Chat",shortcuts:[C.focusChatInput,C.togglePlanMode,C.sendMessage,C.newLine]},{label:"Questions",shortcuts:[C.selectOption]},{label:"Monitoring",shortcuts:[C.applyFilter]}];function ye(t){return ke?t.metaKey:t.ctrlKey}function Jt(t){const e=k.c(5),{open:n,onOpenChange:o}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Xe,{children:s.jsx(Ze,{children:"Keyboard Shortcuts"})}),e[0]=i):i=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(Qe,{className:"sm:max-w-md",children:[i,s.jsx("div",{className:"flex flex-col gap-4",children:Yt.map(Wt)})]}),e[1]=r):r=e[1];let a;return e[2]!==o||e[3]!==n?(a=s.jsx(et,{open:n,onOpenChange:o,children:r}),e[2]=o,e[3]=n,e[4]=a):a=e[4],a}function Wt(t){return s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),s.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Vt)})]},t.label)}function Vt(t){return s.jsxs("div",{className:"flex items-center justify-between py-1",children:[s.jsx("span",{className:"text-sm",children:t.description}),s.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Qt)})]},t.description)}function Qt(t){return s.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const Xt=300*1e3,Zt=2;function en(t,e,n){return!e||e===n?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function tn(){const t=k.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={queryKey:se.appVersionCheck(),queryFn:sn,refetchInterval:Xt,refetchIntervalInBackground:!0,staleTime:0},t[0]=e):e=t[0];const{data:n,dataUpdatedAt:o}=te(e),[i,r]=K.useState(0);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={version:null,count:0},t[1]=a):a=t[1];const[l,c]=K.useState(a);o!==i&&(r(o),c(p=>en(p,n,"4.61.2")));const u=l.count>=Zt;let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(tt,{children:[s.jsx(nt,{children:"A new version is available"}),s.jsx(st,{children:"You're viewing an outdated version of this page. Refresh to get the latest updates."})]}),t[2]=d):d=t[2];let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsxs(ot,{children:[d,s.jsx(it,{children:s.jsx(at,{onClick:nn,children:"Refresh"})})]}),t[3]=m):m=t[3];let h;return t[4]!==u?(h=s.jsx(rt,{open:u,children:m}),t[4]=u,t[5]=h):h=t[5],h}function nn(){return window.location.reload()}async function sn(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}function on({activeOrg:t}){return t&&($e(t.id,{name:t.name??void 0,slug:t.slug??void 0}),Le()),null}function an(t,e,n){if(!n)return null;const o=mt(t,e);return o?o.threads.get().find(r=>r.id===n)?.branch??null:null}function rn(t){const{prev:e,virtualMcpId:n,decopilotId:o,savedLayout:i,opts:r,autosendValue:a}=t,l={};n?l.virtualmcpid=n:e.virtualmcpid&&(l.virtualmcpid=e.virtualmcpid);const c=typeof e.virtualmcpid=="string"?e.virtualmcpid:o,d=(n??c)!==c;let m="chat";if(r?.main)l.main=r.main;else if(i)i.main!==void 0&&(l.main=i.main),i.sidepanel!==void 0&&(m=i.sidepanel);else if(!d){const h=e.main;h&&typeof h=="string"&&!ht(h)&&(l.main=h)}return l.sidepanel=m,r?.autosend&&(l.autosend=a),l}const Ne="studio:thread-layout:v1",ln=50;function _e(t){const e={};return(t.main===0||typeof t.main=="string")&&(e.main=t.main),(t.sidepanel===0||t.sidepanel==="chat")&&(e.sidepanel=t.sidepanel),e}function cn(t,e,n,o=ln){const i=t.filter(([r])=>r!==e);for(i.push([e,_e(n)]);i.length>o;)i.shift();return i}function ue(){try{const t=sessionStorage.getItem(Ne);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(n=>Array.isArray(n)&&n.length===2&&typeof n[0]=="string"):[]}catch{return[]}}function Ae(t){try{sessionStorage.setItem(Ne,JSON.stringify(t))}catch{}}function dn(t,e){t&&Ae(cn(ue(),t,e))}function un(t){if(!t)return null;const e=ue().find(([n])=>n===t);return e?_e(e[1]):null}function Fn(t){if(!t)return;const e=ue(),n=e.filter(([o])=>o!==t);n.length!==e.length&&Ae(n)}function Oe(t){return{queryKey:se.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function Rn(t){const e=k.c(10);let n;e[0]!==t?(n=Oe(t),e[0]=t,e[1]=n):n=e[1];const o=te(n);let i;e[2]!==o.data?.prompts?(i=o.data?.prompts??[],e[2]=o.data?.prompts,e[3]=i):i=e[3];let r;e[4]!==o.data?.tiles?(r=o.data?.tiles??[],e[4]=o.data?.tiles,e[5]=r):r=e[5];let a;return e[6]!==o.isLoading||e[7]!==i||e[8]!==r?(a={isLoading:o.isLoading,prompts:i,tiles:r},e[6]=o.isLoading,e[7]=i,e[8]=r,e[9]=a):a=e[9],a}function mn(t){const e=k.c(17),{orgSlug:n,orgName:o,domain:i}=t;let r;e[0]!==n?(r=()=>{window.location.href=`/api/${encodeURIComponent(n)}/sso/authorize`},e[0]=n,e[1]=r):r=e[1];const a=r,l=fn;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(xe,{className:"h-6 w-6 text-primary"})}),e[2]=c):c=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("h3",{className:"text-lg font-medium",children:"SSO Authentication Required"}),e[3]=u):u=e[3];let d;e[4]!==i||e[5]!==o?(d=o?s.jsxs(s.Fragment,{children:[s.jsx("strong",{children:o})," requires SSO authentication",i?` via ${i}`:"","."]}):"This organization requires SSO authentication to access.",e[4]=i,e[5]=o,e[6]=d):d=e[6];let m;e[7]!==d?(m=s.jsxs("div",{className:"space-y-2",children:[u,s.jsx("p",{className:"text-sm text-muted-foreground",children:d})]}),e[7]=d,e[8]=m):m=e[8];let h;e[9]!==a?(h=s.jsx(O,{onClick:a,children:"Sign in with SSO"}),e[9]=a,e[10]=h):h=e[10];let p;e[11]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(O,{variant:"ghost",onClick:l,children:"Go back"}),e[11]=p):p=e[11];let f;e[12]!==h?(f=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[h,p]}),e[12]=h,e[13]=f):f=e[13];let g;return e[14]!==m||e[15]!==f?(g=s.jsxs(H,{children:[c,m,f]}),e[14]=m,e[15]=f,e[16]=g):g=e[16],g}function fn(){window.location.href="/"}function hn(t){const e=k.c(8),{org:n,children:o}=t,r=gt(n.id,n.slug)?.enabled_plugins??null;let a;e[0]!==n.id||e[1]!==n.name||e[2]!==r?(a={id:n.id,organizationId:n.id,slug:"_org",name:n.name,enabledPlugins:r,ui:null},e[0]=n.id,e[1]=n.name,e[2]=r,e[3]=a):a=e[3];const l=a;let c;return e[4]!==o||e[5]!==n||e[6]!==l?(c=s.jsx(Ke,{org:n,project:l,children:o}),e[4]=o,e[5]=n,e[6]=l,e[7]=c):c=e[7],c}function gn(){const t=ze(),e=ft(),{org:n,locator:o}=De(),i=we({strict:!1}),r=Ie({strict:!1}),a=i.org??"",l=i.taskId??"",c=(f,g,y=!0)=>t({to:"/$org/$taskId",params:{org:a,taskId:f},search:g,replace:y}),u=(f,g=!0)=>c(l,f,g),d=f=>u(g=>({...g,sidepanel:f})),m=(f,g,y)=>{const w=!!l&&l===f;l&&!w&&dn(l,{main:r.main,sidepanel:r.sidepanel});const b=w?null:un(f),S=he(n.id).id;return c(f,v=>rn({prev:v,virtualMcpId:g,decopilotId:S,savedLayout:b,opts:y,autosendValue:ct}),!1)};return{openSidePanel:d,setTaskId:m,createNewTask:async f=>{const g=crypto.randomUUID(),y=f??r.virtualmcpid??he(n.id).id,b=y===r.virtualmcpid?an(n.slug,o,l):null;try{await e?.create({id:g,virtual_mcp_id:y,...b?{branch:b}:{}})}catch{}m(g,y)},openTab:f=>c(l||crypto.randomUUID(),g=>({...g,main:f}))}}function pn(){const t=k.c(53);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const o=Me(e)?.params.org;let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},t[1]=i):i=t[1];const{taskId:r}=we(i),[a,l]=K.useState(!1),c=Pe(),u=o??"";let d;t[2]!==u?(d=Oe(u),t[2]=u,t[3]=d):d=t[3];const m=!!o&&!r;let h;t[4]!==d||t[5]!==m?(h={...d,enabled:m},t[4]=d,t[5]=m,t[6]=h):h=t[6],te(h);const{data:p}=Y.useSession(),f=p?.user?.id;let g;t[7]!==o||t[8]!==f?(g=o&&f?Fe(f,o):null,t[7]=o,t[8]=f,t[9]=g):g=t[9];const y=g;let w,b;t[10]!==c?(w=()=>{const j=A=>{if(ye(A)&&A.code==="KeyK"){A.preventDefault(),l(!0);return}ye(A)&&A.code==="BracketLeft"&&c.history.canGoBack()&&(A.preventDefault(),c.history.back())};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},b=[c],t[10]=c,t[11]=w,t[12]=b):(w=t[11],b=t[12]),K.useEffect(w,b);let S;t[13]!==o?(S=se.activeOrganization(o),t[13]=o,t[14]=S):S=t[14];let v;t[15]!==o||t[16]!==f?(v=async()=>{if(!o)return null;performance.mark("mesh:active-org-fetch:start");const{data:j}=await Y.organization.getFullOrganization({query:{organizationSlug:o}}).finally(yn),A=me(j);return j&&!A&&localStorage.setItem(B.lastOrgSlug(),o),f&&j&&qe(f,o,j),j},t[15]=o,t[16]=f,t[17]=v):v=t[17];const N=y?y.data:void 0,T=y?.updatedAt;let $;t[18]!==v||t[19]!==N||t[20]!==T||t[21]!==S?($={queryKey:S,queryFn:v,initialData:N,initialDataUpdatedAt:T,gcTime:1/0,refetchOnWindowFocus:!1},t[18]=v,t[19]=N,t[20]=T,t[21]=S,t[22]=$):$=t[22];const{data:x}=be($),E=x?.id,L=x?.slug,{data:_}=pt(E,L),ie=E??"",ae=L??"";let F;t[23]!==ie||t[24]!==ae?(F=dt({connectionId:ut,orgId:ie,orgSlug:ae}),t[23]=ie,t[24]=ae,t[25]=F):F=t[25];const re=!!E&&!!L;let W;if(t[26]!==F||t[27]!==re?(W={...F,enabled:re},t[26]=F,t[27]=re,t[28]=W):W=t[28],te(W),!x){let j;t[29]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Ue,{}),t[29]=j):j=t[29];let A;return t[30]!==o?(A=s.jsx(K.Suspense,{fallback:j,children:s.jsx($t,{orgSlug:o})}),t[30]=o,t[31]=A):A=t[31],A}if(me(x)){localStorage.getItem(B.lastOrgSlug())===o&&localStorage.removeItem(B.lastOrgSlug());let j;return t[32]!==x.name?(j=s.jsx(Re,{orgName:x.name}),t[32]=x.name,t[33]=j):j=t[33],j}if(_?.ssoRequired&&!_.authenticated){let j;return t[34]!==x.id||t[35]!==x.name||t[36]!==x.slug||t[37]!==_.domain?(j=s.jsx(mn,{orgId:x.id,orgSlug:x.slug,orgName:x.name,domain:_.domain}),t[34]=x.id,t[35]=x.name,t[36]=x.slug,t[37]=_.domain,t[38]=j):j=t[38],j}const le=x.logo??null;let R;t[39]!==x||t[40]!==le?(R={...x,logo:le},t[39]=x,t[40]=le,t[41]=R):R=t[41];let q;t[42]!==x?(q=s.jsx(on,{activeOrg:x}),t[42]=x,t[43]=q):q=t[43];let V,Q;t[44]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx(Ge,{}),Q=s.jsx(Bt,{}),t[44]=V,t[45]=Q):(V=t[44],Q=t[45]);let U;t[46]!==a?(U=s.jsx(Jt,{open:a,onOpenChange:l}),t[46]=a,t[47]=U):U=t[47];let X;t[48]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx(tn,{}),t[48]=X):X=t[48];let Z;return t[49]!==R||t[50]!==q||t[51]!==U?(Z=s.jsxs(hn,{org:R,children:[q,V,Q,U,X]}),t[49]=R,t[50]=q,t[51]=U,t[52]=Z):Z=t[52],Z}function yn(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function xn(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(lt,{children:s.jsx(pn,{})}),t[0]=e):e=t[0],e}const qn=Object.freeze(Object.defineProperty({__proto__:null,default:xn,usePanelActions:gn},Symbol.toStringTag,{value:"Module"}));export{C as K,Rn as a,Fn as f,ye as i,an as r,qn as s,gn as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as b,l as g,j as o,cL as P,cM as R,bP as A,cN as H,cO as L,cP as V,cQ as W,r as T,B as q,bc as G,bB as F}from"./index-CsZhMKFM.js";import{i as Q}from"./LayoutLeft-DvNM8qhm.js";import{u as J}from"./use-mobile-DhhfLpzh.js";import{i as K}from"./X-OFSHASit.js";import{c as I,a as z,b as D,T as k}from"./tooltip-Cs5hng3q.js";function U(i){const e=b.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=o.jsx(R,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function X(i){const e=b.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=o.jsx(L,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function Y(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(W,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Z(i){const e=b.c(20);let t,s,a,l,d;e[0]!==i?({className:s,children:t,side:l,hideCloseButton:d,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5]);const n=l===void 0?"right":l,r=d===void 0?!1:d;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(Y,{}),e[6]=m):m=e[6];const u=n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",h=n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",f=n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",p=n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let x;e[7]!==s||e[8]!==u||e[9]!==h||e[10]!==f||e[11]!==p?(x=g("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",u,h,f,p,s),e[7]=s,e[8]=u,e[9]=h,e[10]=f,e[11]=p,e[12]=x):x=e[12];let c;e[13]!==r?(c=!r&&o.jsxs(V,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[o.jsx(K,{className:"size-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=r,e[14]=c):c=e[14];let v;return e[15]!==t||e[16]!==a||e[17]!==x||e[18]!==c?(v=o.jsxs(X,{children:[m,o.jsxs(A,{"data-slot":"sheet-content",className:x,...a,children:[t,c]})]}),e[15]=t,e[16]=a,e[17]=x,e[18]=c,e[19]=v):v=e[19],v}function ee(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function te(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(P,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function se(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(H,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const ae="15rem",le="18rem",ie="4.5rem",E=T.createContext(null);function B(){const i=T.useContext(E);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function be(i){const e=b.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:l}=i,d=s===void 0?!1:s,n=J(),[r,m]=T.useState(d),[u,h]=T.useState(!1),f=a!==void 0,p=f?a:r;let x;e[0]!==f||e[1]!==l?(x=$=>{f||m($),l?.($)},e[0]=f,e[1]=l,e[2]=x):x=e[2];const c=x;let v;e[3]!==n||e[4]!==p||e[5]!==c?(v=()=>{n?h(oe):c(!p)},e[3]=n,e[4]=p,e[5]=c,e[6]=v):v=e[6];const y=v,w=p?"expanded":"collapsed";let j;e[7]!==n||e[8]!==p||e[9]!==u||e[10]!==c||e[11]!==w||e[12]!==y?(j={state:w,open:p,setOpen:c,isMobile:n,openMobile:u,setOpenMobile:h,toggleSidebar:y},e[7]=n,e[8]=p,e[9]=u,e[10]=c,e[11]=w,e[12]=y,e[13]=j):j=e[13];const S=j;let N;e[14]!==t?(N=o.jsx(I,{delayDuration:0,children:t}),e[14]=t,e[15]=N):N=e[15];let C;return e[16]!==S||e[17]!==N?(C=o.jsx(E.Provider,{value:S,children:N}),e[16]=S,e[17]=N,e[18]=C):C=e[18],C}function oe(i){return!i}function me(i){const e=b.c(14);let t,s,a,l;e[0]!==i?({className:s,style:l,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l):(t=e[1],s=e[2],a=e[3],l=e[4]);let d;e[5]!==l?(d={"--sidebar-width":ae,"--sidebar-width-icon":ie,...l},e[5]=l,e[6]=d):d=e[6];const n=d;let r;e[7]!==s?(r=g("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=r):r=e[8];let m;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==r?(m=o.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:r,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=r,e[13]=m):m=e[13],m}function he(i){const e=b.c(36);let t,s,a,l,d;e[0]!==i?({side:l,variant:d,className:s,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5]);const n=l===void 0?"left":l,r=d===void 0?"sidebar":d,{isMobile:m,state:u,openMobile:h,setOpenMobile:f}=B();if(m){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":le},e[6]=C):C=e[6];let $;e[7]===Symbol.for("react.memo_cache_sentinel")?($=o.jsxs(ee,{className:"sr-only",children:[o.jsx(te,{children:"Sidebar"}),o.jsx(se,{children:"Displays the mobile sidebar."})]}),e[7]=$):$=e[7];let _;e[8]!==t?(_=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=_):_=e[9];let M;e[10]!==n||e[11]!==_?(M=o.jsxs(Z,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[$,_]}),e[10]=n,e[11]=_,e[12]=M):M=e[12];let O;return e[13]!==h||e[14]!==a||e[15]!==f||e[16]!==M?(O=o.jsx(U,{open:h,onOpenChange:f,...a,children:M}),e[13]=h,e[14]=a,e[15]=f,e[16]=M,e[17]=O):O=e[17],O}const p=u==="expanded",x=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let c;e[18]!==x?(c=g("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",x),e[18]=x,e[19]=c):c=e[19];const v=p?void 0:"icon",y=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let w;e[20]!==s||e[21]!==y?(w=g("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=w):w=e[22];let j;e[23]!==t?(j=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=j):j=e[24];let S;e[25]!==a||e[26]!==w||e[27]!==j?(S=o.jsx("div",{"data-slot":"sidebar-container",className:w,...a,children:j}),e[25]=a,e[26]=w,e[27]=j,e[28]=S):S=e[28];let N;return e[29]!==n||e[30]!==u||e[31]!==c||e[32]!==v||e[33]!==S||e[34]!==r?(N=o.jsx("div",{className:c,"data-state":u,"data-collapsible":v,"data-variant":r,"data-side":n,"data-slot":"sidebar",children:S}),e[29]=n,e[30]=u,e[31]=c,e[32]=v,e[33]=S,e[34]=r,e[35]=N):N=e[35],N}function xe(i){const e=b.c(18);let t,s,a;e[0]!==i?({className:t,onClick:s,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:l}=B();let d;e[4]!==t?(d=g("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==l?(n=p=>{s?.(p),l()},e[6]=s,e[7]=l,e[8]=n):n=e[8];let r,m;e[9]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(Q,{}),m=o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=r,e[10]=m):(r=e[9],m=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=o.jsx(z,{asChild:!0,children:o.jsxs(q,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[r,m]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsxs(D,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",o.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(ne)})]}),e[15]=h):h=e[15];let f;return e[16]!==u?(f=o.jsx(I,{delayDuration:300,children:o.jsxs(k,{children:[u,h]})}),e[16]=u,e[17]=f):f=e[17],f}function ne(i){return o.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:i},i)}function ge(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ve(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function je(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function we(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Ne(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Se(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ye(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Ce(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function $e(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const re=F("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function _e(i){const e=b.c(28);let t,s,a,l,d,n,r;e[0]!==i?({asChild:a,isActive:l,variant:d,size:n,tooltip:r,className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d,e[6]=n,e[7]=r):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5],n=e[6],r=e[7]);const m=a===void 0?!1:a,u=l===void 0?!1:l,h=d===void 0?"default":d,f=n===void 0?"default":n,p=m?G:"button",{isMobile:x}=B();let c;e[8]!==t||e[9]!==f||e[10]!==h?(c=g(re({variant:h,size:f}),t),e[8]=t,e[9]=f,e[10]=h,e[11]=c):c=e[11];let v;e[12]!==p||e[13]!==u||e[14]!==s||e[15]!==f||e[16]!==c?(v=o.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":f,"data-active":u,className:c,...s}),e[12]=p,e[13]=u,e[14]=s,e[15]=f,e[16]=c,e[17]=v):v=e[17];const y=v;if(!r)return y;if(typeof r=="string"){let N;e[18]!==r?(N={children:r},e[18]=r,e[19]=N):N=e[19],r=N}let w;e[20]!==y?(w=o.jsx(z,{asChild:!0,children:y}),e[20]=y,e[21]=w):w=e[21];let j;e[22]!==x||e[23]!==r?(j=o.jsx(D,{side:"right",align:"center",hidden:x,...r}),e[22]=x,e[23]=r,e[24]=j):j=e[24];let S;return e[25]!==w||e[26]!==j?(S=o.jsxs(k,{children:[w,j]}),e[25]=w,e[26]=j,e[27]=S):S=e[27],S}export{Se as S,ye as a,Ce as b,_e as c,$e as d,we as e,ve as f,Ne as g,he as h,je as i,ge as j,me as k,be as l,te as m,se as n,ee as o,Z as p,U as q,xe as r,B as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a4 as D,r as v,j as e,B as p,R as S,t as c,c as N}from"./index-CsZhMKFM.js";import{D as k}from"./domain-settings-C7CfCyw6.js";import{P as f}from"./index-DS3hrf0F.js";import{I as l}from"./input-D5ccsU_1.js";import{S as z}from"./switch-B36ltQ63.js";import{a as P,b as R,c as A,d as T}from"./use-org-sso-DDm0m5Eb.js";import{c as F,S as y,a as C,b as r,d as O}from"./settings-section-BYCtjEaG.js";import{s as L}from"./Trash01--uX5q_ti.js";import{R as q}from"./require-capability-BjscC7QS.js";import"./studio-tools-CTswP4mA.js";import"./badge-BMMjntMn.js";import"./select-CVMXwLRV.js";import"./tooltip-Cs5hng3q.js";import"./Check-CcLLJc-z.js";import"./ChevronDown-BmFaSDo8.js";import"./ChevronUp-Dew3RmKl.js";import"./sidebar-DRSu2iBz.js";import"./LayoutLeft-DvNM8qhm.js";import"./use-mobile-DhhfLpzh.js";import"./X-OFSHASit.js";import"./card-Bc92PJFP.js";import"./ArrowUpRight-DdPCnlNm.js";import"./use-capability-DmeYLlad.js";import"./access-gate-B4XS-sin.js";import"./capability-load-error-COzn8-Xb.js";function B(){const{org:s}=D(),{data:a,isLoading:E}=P(s.id,s.slug),x=R(s.id,s.slug),h=A(s.id,s.slug),j=T(s.id,s.slug),[t,d]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[m,g]=v.useState(!1),u=a?.configured&&a.config,o=a?.config,I=()=>{o&&d({issuer:o.issuer,clientId:o.clientId,clientSecret:"",discoveryEndpoint:o.discoveryEndpoint??"",domain:o.domain,scopes:o.scopes.join(" ")}),g(!0)},b=async()=>{if(!t.issuer||!t.clientId||!t.domain){c.error("Issuer, Client ID, and Domain are required");return}if(!u&&!t.clientSecret){c.error("Client Secret is required for initial setup");return}try{await x.mutateAsync({issuer:t.issuer,clientId:t.clientId,clientSecret:t.clientSecret,discoveryEndpoint:t.discoveryEndpoint||void 0,scopes:t.scopes.split(/\s+/).filter(Boolean),domain:t.domain,enforced:o?.enforced??!1}),S(u?"sso_config_updated":"sso_configured",{organization_id:s.id,email_domain:t.domain}),c.success("SSO configuration saved"),g(!1)}catch(i){c.error(i instanceof Error?i.message:"Failed to save SSO config")}},w=async()=>{if(confirm("Are you sure you want to remove SSO configuration?"))try{await h.mutateAsync(),S("sso_config_removed",{organization_id:s.id}),c.success("SSO configuration removed"),g(!1)}catch{c.error("Failed to remove SSO config")}},_=async i=>{try{await j.mutateAsync(i),S("sso_enforcement_toggled",{organization_id:s.id,enforced:i}),c.success(i?"SSO enforcement enabled":"SSO enforcement disabled")}catch{c.error("Failed to toggle SSO enforcement")}};return e.jsx(f,{children:e.jsx(f.Content,{children:e.jsx(f.Body,{children:e.jsxs(F,{children:[e.jsx(f.Title,{children:"Security"}),e.jsx(k,{}),E?e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."}):e.jsxs(e.Fragment,{children:[u&&!m&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Provider",action:e.jsx("span",{className:"font-medium",children:o.issuer})}),e.jsx(r,{title:"Client ID",action:e.jsx("span",{className:"font-mono text-xs",children:o.clientId})}),e.jsx(r,{title:"Domain",action:e.jsx("span",{className:"font-medium",children:o.domain})}),e.jsx(r,{title:"Scopes",action:e.jsx("span",{className:"font-mono text-xs",children:o.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(r,{title:"Enforce SSO",description:"Require all members to authenticate via SSO",action:e.jsx(z,{checked:o.enforced,onCheckedChange:_,disabled:j.isPending})}),e.jsxs(O,{children:[e.jsxs(p,{variant:"ghost",size:"sm",onClick:w,disabled:h.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(L,{size:14}),"Remove"]}),e.jsx(p,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${s.slug}/sso/authorize`,"_blank")},children:"Test SSO"}),e.jsx(p,{variant:"outline",size:"sm",onClick:I,children:"Edit configuration"})]})]})}),(!u||m)&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Issuer URL",description:"The OIDC issuer URL of your identity provider.",action:e.jsx(l,{id:"sso-issuer",placeholder:"https://login.microsoftonline.com/{tenant}/v2.0",value:t.issuer,onChange:i=>d(n=>({...n,issuer:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client ID",action:e.jsx(l,{id:"sso-client-id",placeholder:"your-client-id",value:t.clientId,onChange:i=>d(n=>({...n,clientId:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client Secret",description:m&&u?"Leave empty to keep current":void 0,action:e.jsx(l,{id:"sso-client-secret",type:"password",placeholder:"your-client-secret",value:t.clientSecret,onChange:i=>d(n=>({...n,clientSecret:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Email Domain",description:"The email domain this SSO provider covers.",action:e.jsx(l,{id:"sso-domain",placeholder:"company.com",value:t.domain,onChange:i=>d(n=>({...n,domain:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Scopes",action:e.jsx(l,{id:"sso-scopes",placeholder:"openid email profile",value:t.scopes,onChange:i=>d(n=>({...n,scopes:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Discovery Endpoint",description:"Optional — auto-detected from issuer if omitted.",action:e.jsx(l,{id:"sso-discovery",placeholder:"Auto-detected from issuer",value:t.discoveryEndpoint,onChange:i=>d(n=>({...n,discoveryEndpoint:i.target.value})),className:"w-[280px]"})}),e.jsxs(O,{children:[m&&e.jsx(p,{variant:"outline",size:"sm",onClick:()=>g(!1),children:"Cancel"}),e.jsx(p,{onClick:b,disabled:x.isPending,size:"sm",children:x.isPending?"Saving...":m?"Update":"Configure SSO"})]})]})})]})]})})})})}function ue(){const s=N.c(1);let a;return s[0]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(q,{capability:"org:manage",area:"security",children:e.jsx(B,{})}),s[0]=a):a=s[0],a}export{ue as default};
|