decocms 4.344.3 → 4.344.4
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-C3hNX-U3.js → AlertCircle-MMXQB5BT.js} +1 -1
- package/dist/client/assets/{AreaChart-V5K73xTf.js → AreaChart-yVeAt06n.js} +1 -1
- package/dist/client/assets/{ArrowLeft-xkekPehv.js → ArrowLeft-DcqEiCXC.js} +1 -1
- package/dist/client/assets/{ArrowUp-CYfoVlFX.js → ArrowUp-C0l-cSxr.js} +1 -1
- package/dist/client/assets/{Check-BcH3mbli.js → Check-COlZG_Iq.js} +1 -1
- package/dist/client/assets/{CheckCircle-efnyoYbr.js → CheckCircle-DlrGO-LV.js} +1 -1
- package/dist/client/assets/{ChevronRight-zWIGH7_7.js → ChevronRight-lhy77Wwp.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-Q_MhqA-g.js → ChevronSelectorVertical-DrBBU4AT.js} +1 -1
- package/dist/client/assets/{ChevronUp-CcnNOmjW.js → ChevronUp-BBoq4dQx.js} +1 -1
- package/dist/client/assets/{Copy01-B-07BGuw.js → Copy01-ByTSNoHg.js} +1 -1
- package/dist/client/assets/{CreditCard01-DZdhUpRr.js → CreditCard01-qqfxWQO_.js} +1 -1
- package/dist/client/assets/{DotsVertical-Cha1vnex.js → DotsVertical-BK7lUtpM.js} +1 -1
- package/dist/client/assets/{Download01-BH00OOK2.js → Download01-Cqs5gANt.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-DGy0g17o.js → ErrorBarContext-CaFlLJMw.js} +1 -1
- package/dist/client/assets/{Eye-s_5OI3rP.js → Eye-De6iXjt2.js} +1 -1
- package/dist/client/assets/{GitBranch01-DPsdhEPj.js → GitBranch01-C7r39_B1.js} +1 -1
- package/dist/client/assets/{Globe01-BOLRhWz3.js → Globe01-BVw1J1dL.js} +1 -1
- package/dist/client/assets/{HardDrive-Jz5aKVF-.js → HardDrive-UD8cThYr.js} +1 -1
- package/dist/client/assets/{Image01-Dde0njV5.js → Image01-2rJjksWt.js} +1 -1
- package/dist/client/assets/{Key01-CL0l8cke.js → Key01-g1jGSd1T.js} +1 -1
- package/dist/client/assets/{Link01-c7H6evzR.js → Link01-BECijxK2.js} +1 -1
- package/dist/client/assets/{LinkExternal01-mF6LE9cE.js → LinkExternal01-CO1G1_g7.js} +1 -1
- package/dist/client/assets/{Monitor01-CxZPUqxw.js → Monitor01-BbOgpVrd.js} +1 -1
- package/dist/client/assets/{Package-D1Oz_AXu.js → Package-CLE_ytpB.js} +1 -1
- package/dist/client/assets/{Palette-BZi2CQIb.js → Palette-CLZ81RQu.js} +1 -1
- package/dist/client/assets/{Play-DL08uuDR.js → Play-BS6znGOA.js} +1 -1
- package/dist/client/assets/{Plus-UnZHTGwg.js → Plus-RDqtgmUn.js} +1 -1
- package/dist/client/assets/{SearchMd-BoghbLrR.js → SearchMd-BPJyn57v.js} +1 -1
- package/dist/client/assets/{Sector-CwzoDHdp.js → Sector-0dGAognD.js} +1 -1
- package/dist/client/assets/{Settings02-CRvAtfO0.js → Settings02-DCwLCWga.js} +1 -1
- package/dist/client/assets/{Share07-CTpIecy0.js → Share07-CZ9aibs3.js} +1 -1
- package/dist/client/assets/{Shield01-DPL17IT0.js → Shield01-D_ej3uf2.js} +1 -1
- package/dist/client/assets/{Stars01-DveEX2vy.js → Stars01-CpnggJLh.js} +1 -1
- package/dist/client/assets/{Sun-cPKIj7uq.js → Sun-BVXGJtHB.js} +1 -1
- package/dist/client/assets/{Tool01-DXqO9hP4.js → Tool01-lLgSUXVY.js} +1 -1
- package/dist/client/assets/{Tool02-B4NLpHjP.js → Tool02-DbSkbpld.js} +1 -1
- package/dist/client/assets/{Trash01-CRSthTGO.js → Trash01-BKalTQIS.js} +1 -1
- package/dist/client/assets/{TrendUp01-Dug8rn5Y.js → TrendUp01-Cm7YwYbt.js} +1 -1
- package/dist/client/assets/{Upload01-D_Fv189I.js → Upload01-HHF0-qzw.js} +1 -1
- package/dist/client/assets/{User01-CDa2pgjQ.js → User01-r0_GbQ8r.js} +1 -1
- package/dist/client/assets/{UserSquare-CWhx4AsN.js → UserSquare-hcaj17gz.js} +1 -1
- package/dist/client/assets/{Users01-DZlH1wbC.js → Users01-Bu5fyBA6.js} +1 -1
- package/dist/client/assets/{Users03-CoUu6iB3.js → Users03-BOFJsacM.js} +1 -1
- package/dist/client/assets/{XCircle-TCv3gxEk.js → XCircle-Mj5ql-Qx.js} +1 -1
- package/dist/client/assets/{XClose-DqZ5Ef7p.js → XClose-Df2qGXCV.js} +1 -1
- package/dist/client/assets/{Zap-HRAvXFnr.js → Zap-Cokcdzem.js} +1 -1
- package/dist/client/assets/{ZoomOut-DC7lYRrH.js → ZoomOut-T2TmOAC7.js} +1 -1
- package/dist/client/assets/{access-gate-LG7Db20W.js → access-gate-tjl-KQc5.js} +1 -1
- package/dist/client/assets/{agent-icon-B0j2UorE.js → agent-icon-Dud4Dgyt.js} +1 -1
- package/dist/client/assets/{agents-list-DJgBBD1W.js → agents-list-C2SALbi7.js} +1 -1
- package/dist/client/assets/{ai-providers-D9b6lp9s.js → ai-providers-DrsNB3ZL.js} +1 -1
- package/dist/client/assets/{alert-Yw6picdx.js → alert-CSBIES1I.js} +1 -1
- package/dist/client/assets/{alert-dialog-B6LS36Sm.js → alert-dialog-DR3U9WH-.js} +1 -1
- package/dist/client/assets/{analytics-tab-D-B27giR.js → analytics-tab-NgL3s46L.js} +1 -1
- package/dist/client/assets/{api-keys-D7tL_p1k.js → api-keys-B9YvTwjr.js} +1 -1
- package/dist/client/assets/api-keys-BKUTfUtI.js +1 -0
- package/dist/client/assets/app-editor-B7bRgdBC.js +1 -0
- package/dist/client/assets/{auth-catchall-DU8qDYnm.js → auth-catchall-DlIPkq35.js} +1 -1
- package/dist/client/assets/{auth-entry-6o1YBMQ6.js → auth-entry-DYxJPWB9.js} +1 -1
- package/dist/client/assets/{auth-DBYGTgFE.js → auth-pxmXflMC.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Csg-iIgy.js → auth-split-layout-BEtw3h52.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-AGm_2YIv.js → authenticate-and-persist-oauth-DEt4nWzC.js} +1 -1
- package/dist/client/assets/{automation-list-row-yl7Jr9Us.js → automation-list-row-w_6dod7A.js} +1 -1
- package/dist/client/assets/{automation-runs-DBYd6ygh.js → automation-runs-CSMD6Fno.js} +1 -1
- package/dist/client/assets/{automations-Dlvl2Sbn.js → automations-Chklo3P6.js} +1 -1
- package/dist/client/assets/{autosend-9lrcbCup.js → autosend-BTepWx3_.js} +1 -1
- package/dist/client/assets/{avatar-BusY4imm.js → avatar--vQE0XAV.js} +1 -1
- package/dist/client/assets/{badge-COtyjjy2.js → badge-BsDrwMQC.js} +1 -1
- package/dist/client/assets/{block-document-pw3BZW3I.js → block-document-CvifDrCI.js} +1 -1
- package/dist/client/assets/{breadcrumb-aEyQOqqG.js → breadcrumb--1eSMHFt.js} +1 -1
- package/dist/client/assets/{buckets-CrIxq0vO.js → buckets-CXTxvCv-.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-D7gbHLhl.js → bulk-category-panel-Bx5YHxjU.js} +1 -1
- package/dist/client/assets/{capability-load-error-BeQsW5u1.js → capability-load-error-Dafmx4Ll.js} +1 -1
- package/dist/client/assets/{cards-CAtXduAN.js → cards-DWh17eYP.js} +1 -1
- package/dist/client/assets/{category-editor-CQj0g1PN.js → category-editor-BeXDYFhG.js} +1 -1
- package/dist/client/assets/{cdn-tab-VWG7A8ek.js → cdn-tab-C1FgbuSh.js} +1 -1
- package/dist/client/assets/{chart-BSIlcmgf.js → chart-DClpxfm_.js} +1 -1
- package/dist/client/assets/{chat-context-DU7jeH6U.js → chat-context-C9lWTtFJ.js} +1 -1
- package/dist/client/assets/{checkbox-D1r9ixw9.js → checkbox-QNc1bP0G.js} +1 -1
- package/dist/client/assets/{choose-editor-BEZHaCP7.js → choose-editor-CHBT1o2b.js} +1 -1
- package/dist/client/assets/{cli-auth-success-ChhNt2lr.js → cli-auth-success-ItLmOJgn.js} +1 -1
- package/dist/client/assets/{client-icons-CqD2Q5XK.js → client-icons-CAQi5x0D.js} +1 -1
- package/dist/client/assets/{collection-detail-Bc1N9_b4.js → collection-detail-D8x6ZU5_.js} +1 -1
- package/dist/client/assets/{collection-display-button-Bc0_77tr.js → collection-display-button-sHhiXn17.js} +1 -1
- package/dist/client/assets/{collection-search-CkYj4zLQ.js → collection-search-BQUnJFre.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DRVe2c2R.js → collection-table-wrapper-BEX1_xVZ.js} +1 -1
- package/dist/client/assets/{collection-tabs-N31SqJ5M.js → collection-tabs-CPQ4VrZ9.js} +1 -1
- package/dist/client/assets/{command-M5Hy4Bca.js → command-CfiREnnD.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-g6xIZGng.js → commerce-onboarding-DiMj1pm4.js} +1 -1
- package/dist/client/assets/{connect-Cf-9oNPe.js → connect-C590HPCH.js} +1 -1
- package/dist/client/assets/{connect-layout-Z933g_CV.js → connect-layout-uoNJYOn4.js} +1 -1
- package/dist/client/assets/{connection-Cimig8VQ.js → connection-C8iBaknC.js} +1 -1
- package/dist/client/assets/{connection-card-kDFhfbya.js → connection-card-BRtH_NyF.js} +1 -1
- package/dist/client/assets/{connection-detail-D3l8WE-Y.js → connection-detail-DAZ9PGtT.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Bb00vWyO.js → connection-form-helpers-BExi3iUW.js} +1 -1
- package/dist/client/assets/{connections-BS7ow6ak.js → connections-DxzZcAAQ.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-DF7Gz0pf.js → create-organization-dialog-CMEbcfeY.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-C6z-rtNE.js → decopilot-sse-pool-BEKKOta-.js} +1 -1
- package/dist/client/assets/{dialog-CIbVvLCQ.js → dialog-Dn9dA6Rv.js} +1 -1
- package/dist/client/assets/{domain-settings-Bmfy9jDz.js → domain-settings-HD-p0a2P.js} +1 -1
- package/dist/client/assets/{drawer-CJFC-0Fv.js → drawer-C2zduVGY.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BHHO3QAR.js → dropdown-menu-nFmVNZOj.js} +1 -1
- package/dist/client/assets/{e2e-tab-DNyiIyOa.js → e2e-tab-CPMFk97B.js} +1 -1
- package/dist/client/assets/{editor-D6mstx7z.js → editor-CTbgd0DG.js} +1 -1
- package/dist/client/assets/{empty-state-BOUJ1IRI.js → empty-state-B4rx-IxR.js} +1 -1
- package/dist/client/assets/{empty-state-CFTbSuP9.js → empty-state-BhGR8qhU.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BAwcjEs9.js → extract-connection-data-BzkNyMFd.js} +1 -1
- package/dist/client/assets/{file-explorer-Bh9n4VYl.js → file-explorer-Czaff-IK.js} +1 -1
- package/dist/client/assets/{file-type-icon-VaomZQ4k.js → file-type-icon-DdLRSJG1.js} +1 -1
- package/dist/client/assets/{folder-icon-BPPBLsSQ.js → folder-icon-BmvMT_Zn.js} +1 -1
- package/dist/client/assets/{form-BLZF8D8t.js → form-fu44NVNg.js} +1 -1
- package/dist/client/assets/{general-1KXfjgkN.js → general-DbNOgsZ8.js} +1 -1
- package/dist/client/assets/{github-icon-BMwS5NHP.js → github-icon-CWspdq_p.js} +1 -1
- package/dist/client/assets/{hooks-Dx8_BRAv.js → hooks-DbYjnhUf.js} +1 -1
- package/dist/client/assets/{hosting-tab-HpfZRgGl.js → hosting-tab-Cgg1sG_u.js} +1 -1
- package/dist/client/assets/{index-816NyhfX.js → index-8Crc8SXX.js} +1 -1
- package/dist/client/assets/{index-DSjfYpae.js → index-BWDxLD35.js} +6 -6
- package/dist/client/assets/{index-B_lUDZ9B.js → index-BZsplvNT.js} +25 -25
- package/dist/client/assets/{index-CIa7ef_A.js → index-BjFdFeie.js} +1 -1
- package/dist/client/assets/{index-scWMkxhM.js → index-Ct5rA0-g.js} +1 -1
- package/dist/client/assets/{index-CiTAcnLT.js → index-CynzbMm4.js} +1 -1
- package/dist/client/assets/{index-BozOu9tc.js → index-DN-3imGW.js} +1 -1
- package/dist/client/assets/{index-BnQgQVCt.js → index-QjV5PBHw.js} +1 -1
- package/dist/client/assets/{index-Dd37LnAd.js → index-jvb5JpTh.js} +1 -1
- package/dist/client/assets/{index-CVcEeQb5.js → index-kyz_nUCi.js} +1 -1
- package/dist/client/assets/{index-redirect-CxyJoKV4.js → index-redirect-D3POnIh8.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CwY974C7.js → infiniteQueryObserver-OPx_IdGS.js} +1 -1
- package/dist/client/assets/{infra-billing-_yVOOYJd.js → infra-billing-CRZG7-9t.js} +1 -1
- package/dist/client/assets/{input-COX_MHDV.js → input-MZsLaCQZ.js} +1 -1
- package/dist/client/assets/{integration-icon-DCPy_52o.js → integration-icon-BN_v-AR8.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BHafD7C7.js → invite-member-dialog-BLEWp8gy.js} +1 -1
- package/dist/client/assets/{label-BWr2mmGs.js → label-CLbn6I-z.js} +1 -1
- package/dist/client/assets/{layout-C7V0gFy0.js → layout-Cndx-lJE.js} +1 -1
- package/dist/client/assets/{login-D1Nz670h.js → login-HuqqF-1k.js} +1 -1
- package/dist/client/assets/{markdown-BYbXDv7N.js → markdown-DAt9kqvI.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-C-wnTv6N.js → mcp-app-renderer-BWNi86_e.js} +1 -1
- package/dist/client/assets/{mcp-oauth-D4bG2HDW.js → mcp-oauth-Dwal9CtL.js} +1 -1
- package/dist/client/assets/{members-wTEykKnV.js → members-m6A5KiaB.js} +1 -1
- package/dist/client/assets/{monaco-editor-YC0wWRXT.js → monaco-editor-BDGu60Kj.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BvTSmQaL.js → monitoring-stats-row-CbsfH-jC.js} +1 -1
- package/dist/client/assets/{multi-select-BmB9r4YL.js → multi-select-BWbyu4GD.js} +1 -1
- package/dist/client/assets/{oauth-callback-D2Gp_wZF.js → oauth-callback-DI2eutSn.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CoABKbtI.js → oauth-callback-ai-provider-Bq0wfzLm.js} +1 -1
- package/dist/client/assets/{onboarding-CftT1nG0.js → onboarding-CkiQtPaQ.js} +1 -1
- package/dist/client/assets/{org-layout-B1FHoYea.js → org-layout-d65Yldzy.js} +1 -1
- package/dist/client/assets/{organization-choice-CBe05Pnl.js → organization-choice-C88i014U.js} +1 -1
- package/dist/client/assets/{orgs-CtakA9D0.js → orgs-B2ed6u31.js} +1 -1
- package/dist/client/assets/{page-seo-form-ZY8ZbyqT.js → page-seo-form-wint5qXC.js} +1 -1
- package/dist/client/assets/{popover-BGEouS4O.js → popover-hKCv1VM6.js} +1 -1
- package/dist/client/assets/{post-calendar-C4PHtaZV.js → post-calendar-pp6SUqf1.js} +1 -1
- package/dist/client/assets/{post-editor-D6FwVD0B.js → post-editor-CmMNYzrc.js} +1 -1
- package/dist/client/assets/{primitives-BFeFdEFz.js → primitives-B-O1UE0A.js} +1 -1
- package/dist/client/assets/{profile-GTCpmwYq.js → profile-DM7rMY2F.js} +1 -1
- package/dist/client/assets/{project-app-view-BQZfjkf1.js → project-app-view-BNsHn5Uh.js} +1 -1
- package/dist/client/assets/{project-icon-mS3w82ZB.js → project-icon-D8jpcjeG.js} +1 -1
- package/dist/client/assets/{prompts-uofkMfaL.js → prompts-DkkC-eqS.js} +1 -1
- package/dist/client/assets/record-editor-BmqGb_Zo.js +1 -0
- package/dist/client/assets/redirect-editor-CyyPNlIj.js +1 -0
- package/dist/client/assets/{registry-layout-YOADDKZS.js → registry-layout-D4YhR76r.js} +1 -1
- package/dist/client/assets/registry-tFRQZakc.js +2 -0
- package/dist/client/assets/{reports-DYmaGRqW.js → reports-CH1NPn70.js} +1 -1
- package/dist/client/assets/repositories-VIP8TM6S.js +1 -0
- package/dist/client/assets/{repository-import-picker-DKCHkj_0.js → repository-import-picker-BtZlpocU.js} +1 -1
- package/dist/client/assets/repository-picker-nNmLRtMV.js +1 -0
- package/dist/client/assets/{require-capability-D7WPxMT8.js → require-capability-DeSNM-qc.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BzHLhAY7.js → required-auth-layout-DDtOwDBP.js} +1 -1
- package/dist/client/assets/{reset-password-Db8RpI71.js → reset-password-CCPqEEuB.js} +1 -1
- package/dist/client/assets/{review-settings-CcgZS4Qu.js → review-settings-D7yIvq08.js} +1 -1
- package/dist/client/assets/{roles-D5JKlKQL.js → roles-ByD_eMtG.js} +1 -1
- package/dist/client/assets/{schema-7gcATtGd.js → schema-D-Yt_dVJ.js} +1 -1
- package/dist/client/assets/{scroll-area-BV67BPd_.js → scroll-area-BCJcp5qm.js} +1 -1
- package/dist/client/assets/{search-input-D-ESO_3b.js → search-input-CfYSReFc.js} +1 -1
- package/dist/client/assets/{secrets-DslGN31D.js → secrets-VhaU4I-n.js} +1 -1
- package/dist/client/assets/{sections-editor-Cl6Tz3LM.js → sections-editor-CbIx_gFP.js} +1 -1
- package/dist/client/assets/{select-DrcEVnZ2.js → select-NANblt2H.js} +1 -1
- package/dist/client/assets/{select-model-BxS8auXw.js → select-model-DUIjK9U7.js} +1 -1
- package/dist/client/assets/{self-tool-result-BJzf7f_D.js → self-tool-result-C6WuYAjK.js} +1 -1
- package/dist/client/assets/{seo-editor-BE4i-LT0.js → seo-editor-MilAfPeH.js} +1 -1
- package/dist/client/assets/settings-layout-qx89HSSt.js +1 -0
- package/dist/client/assets/{settings-sidebar-C6TvhfID.js → settings-sidebar-jJm3A_Wp.js} +1 -1
- package/dist/client/assets/{shell-controls-BxmxydXV.js → shell-controls-B0eaQlPV.js} +1 -1
- package/dist/client/assets/{shell-layout-Bx5eb743.js → shell-layout-CV8Ixl8_.js} +1 -1
- package/dist/client/assets/{skill-preview-DttG8VYN.js → skill-preview-DqgiXYj-.js} +1 -1
- package/dist/client/assets/{skills-DHAWKG4x.js → skills-PrvnaupX.js} +1 -1
- package/dist/client/assets/{sso-Bx-8EZnD.js → sso-gxLIhDQT.js} +1 -1
- package/dist/client/assets/{store-C6L68gEz.js → store-BTWjEs30.js} +1 -1
- package/dist/client/assets/store-registry-DIHiXDnw.js +2 -0
- package/dist/client/assets/{switch-6gOY7p_B.js → switch-2iiOxMIT.js} +1 -1
- package/dist/client/assets/{synced-repos-5BNmNf6C.js → synced-repos-Dq0mvbwm.js} +1 -1
- package/dist/client/assets/{table-CiqNoZ31.js → table-BI2-Msk8.js} +1 -1
- package/dist/client/assets/{tabs-Bkqs8f-5.js → tabs-KWxF94R5.js} +1 -1
- package/dist/client/assets/{task-board-DZmRPJBt.js → task-board-CIYSPfni.js} +1 -1
- package/dist/client/assets/{task-route-DFWTcvum.js → task-route-Qet1qaWg.js} +1 -1
- package/dist/client/assets/{tasks-CzRXtD5l.js → tasks-mySCoXvt.js} +1 -1
- package/dist/client/assets/{textarea-BPKnRKFj.js → textarea-BrZpmcDa.js} +1 -1
- package/dist/client/assets/{thread-intent-CFtt_nS5.js → thread-intent-D83P1YX-.js} +1 -1
- package/dist/client/assets/{thread-route-Cqs0O0Ez.js → thread-route-BJMImioz.js} +1 -1
- package/dist/client/assets/{toggle-group-dwqfI-na.js → toggle-group-B8axbJ88.js} +1 -1
- package/dist/client/assets/{toolbar-ClAV86ux.js → toolbar-CQ1c9TU5.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-_od4zlTM.js → toolbar-icon-button-TKQD0EoO.js} +1 -1
- package/dist/client/assets/{track-DR1-LwVK.js → track-DtXEYVxz.js} +1 -1
- package/dist/client/assets/{types-CXQqC75q.js → types-DIafnHyw.js} +1 -1
- package/dist/client/assets/{use-ai-providers-dsyrDnO9.js → use-ai-providers-C6jqS37t.js} +1 -1
- package/dist/client/assets/{use-automations-GJZG9mot.js → use-automations-0rXR_jur.js} +1 -1
- package/dist/client/assets/{use-autosave-edA5EL24.js → use-autosave-ONqifd0v.js} +1 -1
- package/dist/client/assets/{use-connection-BRJSF7XV.js → use-connection-BASuVort.js} +1 -1
- package/dist/client/assets/{use-copy-BYPpXCK2.js → use-copy-CfbW_sJF.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CK3FIQpt.js → use-create-virtual-mcp-BFwR2LLd.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-xY0hnak0.js → use-date-fns-locale-rJyU17pO.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BZz1Sh5T.js → use-debounced-autosave-DE2qvgUH.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BBOX-Vjy.js → use-debounced-value-CPoNgVAT.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CrymWsPY.js → use-decopilot-events-Ba2e0p8u.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BwDOMJxj.js → use-delete-connection-CLSY2jpQ.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BHuzOYuO.js → use-deployment-admin-DjyhNRVh.js} +1 -1
- package/dist/client/assets/{use-destination-route-OdrYRKi6.js → use-destination-route-BqyAy3Oj.js} +1 -1
- package/dist/client/assets/{use-file-configs-B8jXjEAi.js → use-file-configs-DEwUByyO.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DQ_XrNCL.js → use-infinite-scroll-xe2j8vP-.js} +1 -1
- package/dist/client/assets/{use-join-requests-35XhVVHr.js → use-join-requests-DWRW4Nw6.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-nQqJOE5j.js → use-mcp-auth-status-D_UjuiQT.js} +1 -1
- package/dist/client/assets/{use-mcp-client-xRPKqtBd.js → use-mcp-client-Czt5As3J.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BH2161nI.js → use-mcp-prompts-BdJKj4LE.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DhWg8eQ9.js → use-mcp-tools-CrhdqfI1.js} +1 -1
- package/dist/client/assets/{use-members-CTCpXWvz.js → use-members-CjQN-pzi.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DEnupm5-.js → use-navigate-to-agent-CSvXEd48.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-tX4pyhvY.js → use-org-auth-client-C1KTKuFD.js} +1 -1
- package/dist/client/assets/{use-org-notice-BrqrQNrZ.js → use-org-notice-CMibf9Lb.js} +1 -1
- package/dist/client/assets/{use-org-sso-ax_WPM-e.js → use-org-sso-Dt4n-uJ6.js} +1 -1
- package/dist/client/assets/{use-organization-roles-le6n88uk.js → use-organization-roles-BQX1Apru.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DeqTyhDT.js → use-organization-settings-DUnuAPqv.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-DufE4TQe.js → use-panel-navigate-CClWc1o5.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CnQcaAch.js → use-registry-connections--YU44G6-.js} +1 -1
- package/dist/client/assets/{use-secrets-BKeXLH1Q.js → use-secrets-CAcbMNuV.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-C_rHbM66.js → use-section-preview-base-BJKm5dYq.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Cw977hrS.js → use-status-sounds-DRFYHjKx.js} +1 -1
- package/dist/client/assets/{use-tags-C-FksPQ4.js → use-tags-WZbYjj0q.js} +1 -1
- package/dist/client/assets/{use-view-mode-BzXvEzDG.js → use-view-mode-ClHuh5-e.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-8rv5G58S.js → use-virtual-mcp-B-ZmtBG6.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Cfow7UUh.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-Btts--oR.js +1 -0
- package/dist/client/assets/{users-Hybgdqlv.js → users-CbysTzDo.js} +1 -1
- package/dist/client/assets/{variant-calendar-CVemYhc_.js → variant-calendar-COq-MIb2.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-ZMf_pu5n.js → view-mode-toggle-CNRnTxNm.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/api-keys-BpX-le77.js +0 -1
- package/dist/client/assets/app-editor-Dr01DzC2.js +0 -1
- package/dist/client/assets/record-editor-DZ_Ht_rf.js +0 -1
- package/dist/client/assets/redirect-editor-DLSqpC6c.js +0 -1
- package/dist/client/assets/registry-R33rTMC7.js +0 -2
- package/dist/client/assets/repositories-BgsdtnFm.js +0 -1
- package/dist/client/assets/repository-picker-hMZKUmSe.js +0 -1
- package/dist/client/assets/settings-layout-CUALOfuk.js +0 -1
- package/dist/client/assets/store-registry-DGHd6xRw.js +0 -2
- package/dist/client/assets/useInfiniteQuery-D-5t1K3F.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CzeWzIJb.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as A,j as s,dt as ve,b as V,r as ne,t as ee,u as ye,b4 as he,B as X,dp as je}from"./index-BZsplvNT.js";import{a as Ne,b as ke,R as De,c as Ae,d as _e,e as re,u as Re,G as Ce}from"./repository-picker-nNmLRtMV.js";import{i as Se}from"./GitBranch01-C7r39_B1.js";import{n as we}from"./LinkExternal01-CO1G1_g7.js";import{s as le}from"./Plus-RDqtgmUn.js";import{c as ce,d as ae,b as de,f as fe,g as ue,e as pe,a as me,A as xe}from"./alert-dialog-DR3U9WH-.js";import{A as Pe}from"./avatar--vQE0XAV.js";import{B as oe}from"./badge-BsDrwMQC.js";import{b as ze,A as Ee}from"./alert-CSBIES1I.js";import{G as Ue}from"./github-icon-CWspdq_p.js";import{R as Te}from"./require-capability-DeSNM-qc.js";import"./ChevronRight-lhy77Wwp.js";import"./dialog-Dn9dA6Rv.js";import"./input-MZsLaCQZ.js";import"./label-CLbn6I-z.js";import"./useInfiniteQuery-Cfow7UUh.js";import"./infiniteQueryObserver-OPx_IdGS.js";import"./ArrowLeft-DcqEiCXC.js";import"./collection-search-BQUnJFre.js";import"./SearchMd-BPJyn57v.js";import"./use-debounced-value-CPoNgVAT.js";import"./User01-r0_GbQ8r.js";import"./access-gate-tjl-KQc5.js";import"./capability-load-error-Dafmx4Ll.js";function be(t){const e=A.c(3),{provider:i,size:l}=t,n=l===void 0?16:l;let o;return e[0]!==i||e[1]!==n?(o=i==="gitlab"?s.jsx(Ce,{size:n,className:"text-muted-foreground"}):s.jsx(Ue,{size:n,className:"text-muted-foreground"}),e[0]=i,e[1]=n,e[2]=o):o=e[2],o}function ge(t,e){return t instanceof Error&&t.message?t.message:e}function Ge(t,e){return t.authKind==="github_app"?e("settings.repositories.authKindGithubApp"):t.authKind==="oauth"?e("settings.repositories.authKindOauth"):e("settings.repositories.authKindToken")}function $e(t,e){return t==="public"?e("settings.repositories.visibilityPublic"):t==="private"?e("settings.repositories.visibilityPrivate"):t==="internal"?e("settings.repositories.visibilityInternal"):null}function Be(t){const e=A.c(39),{account:i,onDisconnect:l}=t,n=V(),o=i.status==="revoked"||!i.servable;let a;e[0]!==i.avatarUrl?(a=i.avatarUrl?.trim()||void 0,e[0]=i.avatarUrl,e[1]=a):a=e[1];let d;e[2]!==i.type?(d=s.jsx(be,{provider:i.type}),e[2]=i.type,e[3]=d):d=e[3];let r;e[4]!==a||e[5]!==d?(r=s.jsx(Pe,{url:a,fallback:d,shape:"circle",size:"sm",className:"size-9",muted:!0}),e[4]=a,e[5]=d,e[6]=r):r=e[6];let u;e[7]!==i.login?(u=s.jsx("span",{className:"font-medium text-sm truncate",children:i.login}),e[7]=i.login,e[8]=u):u=e[8];let c;e[9]!==o||e[10]!==n?(c=o&&s.jsx(oe,{variant:"outline",className:"shrink-0",children:n("settings.repositories.needsReconnect")}),e[9]=o,e[10]=n,e[11]=c):c=e[11];let f;e[12]!==u||e[13]!==c?(f=s.jsxs("div",{className:"flex items-center gap-2",children:[u,c]}),e[12]=u,e[13]=c,e[14]=f):f=e[14];const x=i.host;let p;e[15]!==i||e[16]!==n?(p=Ge(i,n),e[15]=i,e[16]=n,e[17]=p):p=e[17];let m;e[18]!==i.host||e[19]!==p?(m=s.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:[x," · ",p]}),e[18]=i.host,e[19]=p,e[20]=m):m=e[20];let g;e[21]!==o||e[22]!==n?(g=o&&s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:n("settings.repositories.needsReconnectHint")}),e[21]=o,e[22]=n,e[23]=g):g=e[23];let b;e[24]!==g||e[25]!==f||e[26]!==m?(b=s.jsxs("div",{className:"min-w-0",children:[f,m,g]}),e[24]=g,e[25]=f,e[26]=m,e[27]=b):b=e[27];let j;e[28]!==b||e[29]!==r?(j=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[r,b]}),e[28]=b,e[29]=r,e[30]=j):j=e[30];let v;e[31]!==n?(v=n("settings.repositories.disconnect"),e[31]=n,e[32]=v):v=e[32];let h;e[33]!==l||e[34]!==v?(h=s.jsx(X,{variant:"outline",size:"sm",onClick:l,children:v}),e[33]=l,e[34]=v,e[35]=h):h=e[35];let y;return e[36]!==j||e[37]!==h?(y=s.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[j,h]}),e[36]=j,e[37]=h,e[38]=y):y=e[38],y}function Ie(t){const e=A.c(45),{repository:i,onUnlink:l}=t,n=V();let o;e[0]!==i.visibility||e[1]!==n?(o=$e(i.visibility,n),e[0]=i.visibility,e[1]=n,e[2]=o):o=e[2];const a=o;let d;e[3]!==i.provider?(d=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(be,{provider:i.provider})}),e[3]=i.provider,e[4]=d):d=e[4];let r;e[5]!==i.path?(r=s.jsx("span",{className:"font-medium text-sm truncate",children:i.path}),e[5]=i.path,e[6]=r):r=e[6];let u;e[7]!==a?(u=a&&s.jsx(oe,{variant:"secondary",className:"shrink-0",children:a}),e[7]=a,e[8]=u):u=e[8];let c;e[9]!==i.accountId||e[10]!==n?(c=!i.accountId&&s.jsx(oe,{variant:"outline",className:"shrink-0",children:n("settings.repositories.anonymousClone")}),e[9]=i.accountId,e[10]=n,e[11]=c):c=e[11];let f;e[12]!==r||e[13]!==u||e[14]!==c?(f=s.jsxs("div",{className:"flex items-center gap-2",children:[r,u,c]}),e[12]=r,e[13]=u,e[14]=c,e[15]=f):f=e[15];let x;e[16]!==i.defaultBranch||e[17]!==n?(x=i.defaultBranch?` · ${n("settings.repositories.defaultBranch",{branch:i.defaultBranch})}`:"",e[16]=i.defaultBranch,e[17]=n,e[18]=x):x=e[18];let p;e[19]!==i.host||e[20]!==x?(p=s.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:[i.host,x]}),e[19]=i.host,e[20]=x,e[21]=p):p=e[21];let m;e[22]!==f||e[23]!==p?(m=s.jsxs("div",{className:"min-w-0",children:[f,p]}),e[22]=f,e[23]=p,e[24]=m):m=e[24];let g;e[25]!==d||e[26]!==m?(g=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[d,m]}),e[25]=d,e[26]=m,e[27]=g):g=e[27];const b=i.webUrl;let j;e[28]!==n?(j=n("settings.repositories.openInProvider"),e[28]=n,e[29]=j):j=e[29];let v;e[30]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(we,{size:14}),e[30]=v):v=e[30];let h;e[31]!==i.webUrl||e[32]!==j?(h=s.jsx(X,{variant:"ghost",size:"sm",asChild:!0,children:s.jsx("a",{href:b,target:"_blank",rel:"noreferrer","aria-label":j,children:v})}),e[31]=i.webUrl,e[32]=j,e[33]=h):h=e[33];let y;e[34]!==n?(y=n("settings.repositories.unlink"),e[34]=n,e[35]=y):y=e[35];let N;e[36]!==l||e[37]!==y?(N=s.jsx(X,{variant:"outline",size:"sm",onClick:l,children:y}),e[36]=l,e[37]=y,e[38]=N):N=e[38];let D;e[39]!==h||e[40]!==N?(D=s.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[h,N]}),e[39]=h,e[40]=N,e[41]=D):D=e[41];let k;return e[42]!==g||e[43]!==D?(k=s.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[g,D]}),e[42]=g,e[43]=D,e[44]=k):k=e[44],k}function Oe(t){const e=A.c(19),{onDisconnect:i}=t,l=V(),n=Ae(),o=_e(),a=n.data?.github.configured===!0,d=(n.data?.gitlab.oauthHosts.length??0)>0,r=a||d;if(o.isError)throw o.error;let u;e[0]!==o.data?(u=o.data??[],e[0]=o.data,e[1]=u):u=e[1];const c=u;let f;e[2]!==l?(f=l("settings.repositories.accountsTitle"),e[2]=l,e[3]=f):f=e[3];let x;e[4]!==l?(x=l("settings.repositories.accountsDescription"),e[4]=l,e[5]=x):x=e[5];let p;e[6]!==c.length?(p=c.length>0?s.jsx(re,{}):null,e[6]=c.length,e[7]=p):p=e[7];let m;e[8]!==o.isPending||e[9]!==r||e[10]!==i||e[11]!==c||e[12]!==l?(m=o.isPending?s.jsx(he,{className:"h-24 w-full"}):!r&&c.length===0?s.jsxs("div",{"data-testid":"git-accounts-list",className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[s.jsx("p",{className:"font-medium text-sm",children:l("settings.repositories.noProvidersTitle")}),s.jsx("p",{className:"text-xs text-muted-foreground max-w-sm",children:l("settings.repositories.noProvidersDescription")}),s.jsx(re,{})]}):c.length===0?s.jsxs("div",{"data-testid":"git-accounts-list",className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(Se,{size:20,className:"text-muted-foreground"})}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm",children:l("settings.repositories.accountsEmptyTitle")}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:l("settings.repositories.accountsEmptyDescription")})]}),s.jsx(re,{})]}):s.jsx("section",{"data-testid":"git-accounts-list",className:"rounded-2xl border border-border/60 bg-background px-5 py-2",children:c.map(b=>s.jsx(Be,{account:b,onDisconnect:()=>i(b)},b.id))}),e[8]=o.isPending,e[9]=r,e[10]=i,e[11]=c,e[12]=l,e[13]=m):m=e[13];let g;return e[14]!==f||e[15]!==x||e[16]!==p||e[17]!==m?(g=s.jsx(je,{title:f,description:x,actions:p,children:m}),e[14]=f,e[15]=x,e[16]=p,e[17]=m,e[18]=g):g=e[18],g}function Ke(t){const e=A.c(21),{onAdd:i,onUnlink:l}=t,n=V(),o=Re();if(o.isError)throw o.error;let a;e[0]!==o.data?(a=o.data??[],e[0]=o.data,e[1]=a):a=e[1];const d=a;let r;e[2]!==n?(r=n("settings.repositories.reposTitle"),e[2]=n,e[3]=r):r=e[3];let u;e[4]!==n?(u=n("settings.repositories.reposDescription"),e[4]=n,e[5]=u):u=e[5];let c;e[6]!==i||e[7]!==d.length||e[8]!==n?(c=d.length>0?s.jsxs(X,{size:"sm",onClick:i,children:[s.jsx(le,{size:14}),n("settings.repositories.addRepository")]}):null,e[6]=i,e[7]=d.length,e[8]=n,e[9]=c):c=e[9];let f;e[10]!==i||e[11]!==l||e[12]!==o.isPending||e[13]!==d||e[14]!==n?(f=o.isPending?s.jsx(he,{className:"h-24 w-full"}):d.length===0?s.jsxs("div",{"data-testid":"repositories-list",className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm",children:n("settings.repositories.reposEmptyTitle")}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:n("settings.repositories.reposEmptyDescription")})]}),s.jsxs(X,{size:"sm",onClick:i,children:[s.jsx(le,{size:14}),n("settings.repositories.addRepository")]})]}):s.jsx("section",{"data-testid":"repositories-list",className:"rounded-2xl border border-border/60 bg-background px-5 py-2",children:d.map(p=>s.jsx(Ie,{repository:p,onUnlink:()=>l(p)},p.id))}),e[10]=i,e[11]=l,e[12]=o.isPending,e[13]=d,e[14]=n,e[15]=f):f=e[15];let x;return e[16]!==r||e[17]!==u||e[18]!==c||e[19]!==f?(x=s.jsx(je,{title:r,description:u,actions:c,children:f}),e[16]=r,e[17]=u,e[18]=c,e[19]=f,e[20]=x):x=e[20],x}function He(){const t=A.c(16),e=V();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1,select:Fe},t[0]=i):i=t[0];const l=ye(i);if(!l)return null;let n;e:switch(l){case"no_installations":{let r;t[1]!==e?(r=e("settings.repositories.oauthNoInstallations"),t[1]=e,t[2]=r):r=t[2],n=r;break e}case"denied":case"access_denied":{let r;t[3]!==e?(r=e("settings.repositories.oauthDenied"),t[3]=e,t[4]=r):r=t[4],n=r;break e}case"missing_state":case"invalid_state":case"session_mismatch":{let r;t[5]!==e?(r=e("settings.repositories.oauthExpired"),t[5]=e,t[6]=r):r=t[6],n=r;break e}case"not_configured":{let r;t[7]!==e?(r=e("settings.repositories.oauthNotConfigured"),t[7]=e,t[8]=r):r=t[8],n=r;break e}default:{let r;t[9]!==e?(r=e("settings.repositories.oauthFailed"),t[9]=e,t[10]=r):r=t[10],n=r}}const o=l==="no_installations"?"info":"destructive";let a;t[11]!==n?(a=s.jsx(ze,{children:n}),t[11]=n,t[12]=a):a=t[12];let d;return t[13]!==o||t[14]!==a?(d=s.jsx(Ee,{variant:o,children:a}),t[13]=o,t[14]=a,t[15]=d):d=t[15],d}function Fe(t){return t.git_error}function Le(){const t=A.c(85),e=V(),i=Ne(),l=ke(),[n,o]=ne.useState(!1),[a,d]=ne.useState(null),[r,u]=ne.useState(null);let c;t[0]!==i||t[1]!==a||t[2]!==e?(c=function(){a&&i.mutate(a.id,{onSuccess:()=>ee.success(e("settings.repositories.disconnected")),onError:ie=>ee.error(ge(ie,e("settings.repositories.failed"))),onSettled:()=>d(null)})},t[0]=i,t[1]=a,t[2]=e,t[3]=c):c=t[3];const f=c;let x;t[4]!==l||t[5]!==r||t[6]!==e?(x=function(){r&&l.mutate(r.id,{onSuccess:()=>ee.success(e("settings.repositories.unlinked")),onError:ie=>ee.error(ge(ie,e("settings.repositories.failed"))),onSettled:()=>u(null)})},t[4]=l,t[5]=r,t[6]=e,t[7]=x):x=t[7];const p=x;let m;t[8]!==e?(m=e("settings.repositories.pageDescription"),t[8]=e,t[9]=m):m=t[9];let g;t[10]!==m?(g=s.jsx("p",{className:"text-sm text-muted-foreground",children:m}),t[10]=m,t[11]=g):g=t[11];let b,j;t[12]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(He,{}),j=s.jsx(Oe,{onDisconnect:d}),t[12]=b,t[13]=j):(b=t[12],j=t[13]);let v;t[14]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Ke,{onAdd:()=>o(!0),onUnlink:u}),t[14]=v):v=t[14];let h;t[15]!==n||t[16]!==e?(h=n&&s.jsx(De,{open:!0,onOpenChange:o,title:e("settings.repositories.addDialogTitle"),onPicked:()=>o(!1)}),t[15]=n,t[16]=e,t[17]=h):h=t[17];const y=a!==null;let N;t[18]===Symbol.for("react.memo_cache_sentinel")?(N=W=>{W||d(null)},t[18]=N):N=t[18];const D=a?.login??"";let k;t[19]!==e||t[20]!==D?(k=e("settings.repositories.disconnectTitle",{login:D}),t[19]=e,t[20]=D,t[21]=k):k=t[21];let _;t[22]!==k?(_=s.jsx(ce,{children:k}),t[22]=k,t[23]=_):_=t[23];let R;t[24]!==e?(R=e("settings.repositories.disconnectDescription"),t[24]=e,t[25]=R):R=t[25];let C;t[26]!==R?(C=s.jsx(ae,{children:R}),t[26]=R,t[27]=C):C=t[27];let S;t[28]!==_||t[29]!==C?(S=s.jsxs(de,{children:[_,C]}),t[28]=_,t[29]=C,t[30]=S):S=t[30];let w;t[31]!==e?(w=e("settings.repositories.cancel"),t[31]=e,t[32]=w):w=t[32];let P;t[33]!==w?(P=s.jsx(fe,{children:w}),t[33]=w,t[34]=P):P=t[34];let z;t[35]!==e?(z=e("settings.repositories.disconnect"),t[35]=e,t[36]=z):z=t[36];let E;t[37]!==f||t[38]!==z?(E=s.jsx(ue,{onClick:f,children:z}),t[37]=f,t[38]=z,t[39]=E):E=t[39];let U;t[40]!==P||t[41]!==E?(U=s.jsxs(pe,{children:[P,E]}),t[40]=P,t[41]=E,t[42]=U):U=t[42];let T;t[43]!==S||t[44]!==U?(T=s.jsxs(me,{children:[S,U]}),t[43]=S,t[44]=U,t[45]=T):T=t[45];let G;t[46]!==T||t[47]!==y?(G=s.jsx(xe,{open:y,onOpenChange:N,children:T}),t[46]=T,t[47]=y,t[48]=G):G=t[48];const te=r!==null;let Y;t[49]===Symbol.for("react.memo_cache_sentinel")?(Y=W=>{W||u(null)},t[49]=Y):Y=t[49];const se=r?.path??"";let $;t[50]!==e||t[51]!==se?($=e("settings.repositories.unlinkTitle",{path:se}),t[50]=e,t[51]=se,t[52]=$):$=t[52];let B;t[53]!==$?(B=s.jsx(ce,{children:$}),t[53]=$,t[54]=B):B=t[54];let I;t[55]!==e?(I=e("settings.repositories.unlinkDescription"),t[55]=e,t[56]=I):I=t[56];let O;t[57]!==I?(O=s.jsx(ae,{children:I}),t[57]=I,t[58]=O):O=t[58];let K;t[59]!==B||t[60]!==O?(K=s.jsxs(de,{children:[B,O]}),t[59]=B,t[60]=O,t[61]=K):K=t[61];let H;t[62]!==e?(H=e("settings.repositories.cancel"),t[62]=e,t[63]=H):H=t[63];let F;t[64]!==H?(F=s.jsx(fe,{children:H}),t[64]=H,t[65]=F):F=t[65];let L;t[66]!==e?(L=e("settings.repositories.unlink"),t[66]=e,t[67]=L):L=t[67];let q;t[68]!==p||t[69]!==L?(q=s.jsx(ue,{onClick:p,children:L}),t[68]=p,t[69]=L,t[70]=q):q=t[70];let M;t[71]!==F||t[72]!==q?(M=s.jsxs(pe,{children:[F,q]}),t[71]=F,t[72]=q,t[73]=M):M=t[73];let J;t[74]!==K||t[75]!==M?(J=s.jsxs(me,{children:[K,M]}),t[74]=K,t[75]=M,t[76]=J):J=t[76];let Q;t[77]!==te||t[78]!==J?(Q=s.jsx(xe,{open:te,onOpenChange:Y,children:J}),t[77]=te,t[78]=J,t[79]=Q):Q=t[79];let Z;return t[80]!==G||t[81]!==g||t[82]!==Q||t[83]!==h?(Z=s.jsxs(s.Fragment,{children:[g,b,j,v,h,G,Q]}),t[80]=G,t[81]=g,t[82]=Q,t[83]=h,t[84]=Z):Z=t[84],Z}function qe(){const t=A.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ve,{group:"repositories",children:s.jsx(Le,{})}),t[0]=e):e=t[0],e}function gt(){const t=A.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Te,{capability:"file-configs:manage",area:"files",children:s.jsx(qe,{})}),t[0]=e):e=t[0],e}export{gt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,b as T,G as _,n as x,aR as j,t as b,j as L}from"./index-
|
|
1
|
+
import{c as M,b as T,G as _,n as x,aR as j,t as b,j as L}from"./index-BZsplvNT.js";import{u as O}from"./use-mcp-client-Czt5As3J.js";import{S}from"./constants-Daqiz8AS.js";import{u as V}from"./use-navigate-to-agent-CSvXEd48.js";import{R as D}from"./repository-picker-nNmLRtMV.js";function F(n){const e=n.path.split("/"),r=e[e.length-1]??n.path;return{owner:e.slice(0,-1).join("/"),name:r,url:n.webUrl}}function G(n,e,r){return{title:e.name,description:r.description,pinned:!1,icon:null,metadata:{githubRepo:{owner:e.owner,name:e.name,url:e.url,repositoryId:n.id},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"site-editor"},chatDefaultOpen:!0}}},connections:[]}}function B(n){const e=M.c(26),{open:r,onOpenChange:s,title:P,onImportComplete:m,mode:v}=n,a=v===void 0?"agent":v,t=T(),{org:o}=_(),h=x(),C=V();let p;e[0]!==o.id||e[1]!==o.slug?(p={connectionId:S,orgId:o.id,orgSlug:o.slug},e[0]=o.id,e[1]=o.slug,e[2]=p):p=e[2];const k=O(p);let d;e[3]!==a||e[4]!==t||e[5]!==P?(d=P??t(a==="link"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[3]=a,e[4]=t,e[5]=P,e[6]=d):d=e[6];const y=d;let g;e[7]!==k||e[8]!==t?(g=async function(i,u){const l=await k.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:G(i,u,{description:t("common.repositoryPicker.agentDescription",{path:i.path})})}}),E=(l.structuredContent??l).item?.id;if(!E)throw new Error(t("common.repositoryPicker.createAgentFailed"));return E},e[7]=k,e[8]=t,e[9]=g):g=e[9];const I=g;let f;e[10]!==I||e[11]!==a||e[12]!==C||e[13]!==m||e[14]!==s||e[15]!==o.id||e[16]!==h||e[17]!==t?(f=async function(i){const u=F(i),l=a==="agent"?await I(i,u):null;j(h,o.id),s(!1),m?m({virtualMcpId:l,repository:i}):l?(b.success(t("common.githubRepoPicker.importedRepo",{name:u.name})),C(l)):b.success(t("common.githubRepoPicker.addedRepo",{name:u.name}))},e[10]=I,e[11]=a,e[12]=C,e[13]=m,e[14]=s,e[15]=o.id,e[16]=h,e[17]=t,e[18]=f):f=e[18];const w=f;let c;e[19]!==w?(c=A=>{const{repository:i}=A;return w(i)},e[19]=w,e[20]=c):c=e[20];let R;return e[21]!==s||e[22]!==r||e[23]!==y||e[24]!==c?(R=L.jsx(D,{open:r,onOpenChange:s,title:y,onPicked:c,onError:N}),e[21]=s,e[22]=r,e[23]=y,e[24]=c,e[25]=R):R=e[25],R}function N(n){return b.error(n)}export{B as R};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as k,j as l,G as D,a7 as F,K as R,m as se,n as J,e as W,r as L,b as M,l as X,b4 as ie,t as oe,B as U,a4 as be,a1 as je,a2 as ye,h as ce}from"./index-BZsplvNT.js";import{i as ne}from"./ChevronRight-lhy77Wwp.js";import{d as de,h as ue,c as fe,e as ve,b as me,D as pe}from"./dialog-Dn9dA6Rv.js";import{I as re}from"./input-MZsLaCQZ.js";import{L as ae}from"./label-CLbn6I-z.js";import{G as ee}from"./github-icon-CWspdq_p.js";import{u as Ne}from"./useInfiniteQuery-Cfow7UUh.js";import{i as ke}from"./ArrowLeft-DcqEiCXC.js";import{i as Pe}from"./GitBranch01-C7r39_B1.js";import{A as xe}from"./avatar--vQE0XAV.js";import{C as he}from"./collection-search-BQUnJFre.js";import{u as Ce}from"./use-debounced-value-CPoNgVAT.js";function te(t){const e=k.c(4),{size:n,className:o}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=l.jsx("path",{d:"M23.6004 9.5927l-.0337-.0862L20.3.9814a.851.851 0 00-.3362-.405.8748.8748 0 00-.9997.0539.8748.8748 0 00-.29.4399l-2.2055 6.748H7.5375L5.3318 1.0702a.8573.8573 0 00-.29-.4412.8748.8748 0 00-.9997-.0537.8585.8585 0 00-.3361.4049L.4332 9.5015l-.0325.0862a6.0657 6.0657 0 002.0119 7.0105l.0113.0087.03.0213 4.976 3.7264 2.462 1.8633 1.4995 1.1321a1.0085 1.0085 0 001.2197 0l1.4995-1.1321 2.462-1.8633 5.0062-3.7489.0125-.01a6.0682 6.0682 0 002.0094-7.003z"}),e[0]=s):s=e[0];let i;return e[1]!==o||e[2]!==n?(i=l.jsx("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:o,children:s}),e[1]=o,e[2]=n,e[3]=i):i=e[3],i}const Se=5*6e4;function Te(){const t=k.c(7),{org:e}=D(),n=F();let o;t[0]!==e.id?(o=R.gitProviderCapabilities(e.id),t[0]=e.id,t[1]=o):o=t[1];let s;t[2]!==n?(s=()=>n.call("GIT_PROVIDER_CAPABILITIES",{}),t[2]=n,t[3]=s):s=t[3];let i;return t[4]!==o||t[5]!==s?(i={queryKey:o,staleTime:Se,queryFn:s},t[4]=o,t[5]=s,t[6]=i):i=t[6],se(i)}function we(){const t=k.c(7),{org:e}=D(),n=F();let o;t[0]!==e.id?(o=R.gitAccounts(e.id),t[0]=e.id,t[1]=o):o=t[1];let s;t[2]!==n?(s=async()=>(await n.call("GIT_ACCOUNT_LIST",{})).accounts,t[2]=n,t[3]=s):s=t[3];let i;return t[4]!==o||t[5]!==s?(i={queryKey:o,staleTime:6e4,queryFn:s},t[4]=o,t[5]=s,t[6]=i):i=t[6],se(i)}function Ee(t){const e=k.c(9),{org:n}=D(),o=F();let s;e[0]!==t||e[1]!==n.id?(s=R.repositories(n.id,t),e[0]=t,e[1]=n.id,e[2]=s):s=e[2];let i;e[3]!==t||e[4]!==o?(i=async()=>(await o.call("REPOSITORY_LIST",{})).repositories,e[3]=t,e[4]=o,e[5]=i):i=e[5];let r;return e[6]!==s||e[7]!==i?(r={queryKey:s,staleTime:6e4,queryFn:i},e[6]=s,e[7]=i,e[8]=r):r=e[8],se(r)}function _e(t,e){const n=k.c(12),{org:o}=D(),s=F();let i;n[0]!==t||n[1]!==o.id||n[2]!==e?(i=R.providerRepoSearch(o.id,t??"",e),n[0]=t,n[1]=o.id,n[2]=e,n[3]=i):i=n[3];const r=t!==null;let f;n[4]!==t||n[5]!==e||n[6]!==s?(f=async u=>{const{pageParam:d}=u;return t===null?{repositories:[],hasMore:!1}:await s.call("REPOSITORY_SEARCH",{accountId:t,page:d,perPage:100,...e?{query:e}:{}})},n[4]=t,n[5]=e,n[6]=s,n[7]=f):f=n[7];let c;return n[8]!==i||n[9]!==r||n[10]!==f?(c={queryKey:i,enabled:r,initialPageParam:1,getNextPageParam:$e,staleTime:3e4,retry:!1,queryFn:f},n[8]=i,n[9]=r,n[10]=f,n[11]=c):c=n[11],Ne(c)}function $e(t,e){return t.hasMore?e.length+1:void 0}function Ae(){const t=k.c(8),{org:e}=D(),n=F(),o=J();let s;t[0]!==n?(s=async f=>(await n.call("GIT_ACCOUNT_CONNECT_TOKEN",f)).account,t[0]=n,t[1]=s):s=t[1];let i;t[2]!==e||t[3]!==o?(i=()=>o.invalidateQueries({queryKey:R.gitAccounts(e.id)}),t[2]=e,t[3]=o,t[4]=i):i=t[4];let r;return t[5]!==s||t[6]!==i?(r={mutationFn:s,onSettled:i},t[5]=s,t[6]=i,t[7]=r):r=t[7],W(r)}function tt(){const t=k.c(8),{org:e}=D(),n=F(),o=J();let s;t[0]!==n?(s=f=>n.call("GIT_ACCOUNT_DELETE",{id:f}),t[0]=n,t[1]=s):s=t[1];let i;t[2]!==e||t[3]!==o?(i=()=>{o.invalidateQueries({queryKey:R.gitAccounts(e.id)}),o.invalidateQueries({queryKey:R.repositories(e.id)})},t[2]=e,t[3]=o,t[4]=i):i=t[4];let r;return t[5]!==s||t[6]!==i?(r={mutationFn:s,onSettled:i},t[5]=s,t[6]=i,t[7]=r):r=t[7],W(r)}function ze(){const t=k.c(8),{org:e}=D(),n=F(),o=J();let s;t[0]!==n?(s=async f=>(await n.call("REPOSITORY_LINK",f)).repository,t[0]=n,t[1]=s):s=t[1];let i;t[2]!==e||t[3]!==o?(i=()=>o.invalidateQueries({queryKey:R.repositories(e.id)}),t[2]=e,t[3]=o,t[4]=i):i=t[4];let r;return t[5]!==s||t[6]!==i?(r={mutationFn:s,onSettled:i},t[5]=s,t[6]=i,t[7]=r):r=t[7],W(r)}function st(){const t=k.c(8),{org:e}=D(),n=F(),o=J();let s;t[0]!==n?(s=f=>n.call("REPOSITORY_DELETE",{id:f}),t[0]=n,t[1]=s):s=t[1];let i;t[2]!==e||t[3]!==o?(i=()=>o.invalidateQueries({queryKey:R.repositories(e.id)}),t[2]=e,t[3]=o,t[4]=i):i=t[4];let r;return t[5]!==s||t[6]!==i?(r={mutationFn:s,onSettled:i},t[5]=s,t[6]=i,t[7]=r):r=t[7],W(r)}function Le(t,e){return t instanceof Error?t.message:e}function Re(t){const e=k.c(9),{layout:n,disabled:o}=t,s=n===void 0?"buttons":n,i=o===void 0?!1:o,[r,f]=L.useState(!1);let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>f(!0),e[0]=c):c=e[0];let u;e[1]!==i||e[2]!==s?(u=l.jsx(Fe,{layout:s,disabled:i,onTokenDialog:c}),e[1]=i,e[2]=s,e[3]=u):u=e[3];let d;e[4]!==r?(d=r&&l.jsx(De,{open:!0,onOpenChange:f}),e[4]=r,e[5]=d):d=e[5];let a;return e[6]!==u||e[7]!==d?(a=l.jsxs(l.Fragment,{children:[u,d]}),e[6]=u,e[7]=d,e[8]=a):a=e[8],a}function De(t){const e=k.c(76),{open:n,onOpenChange:o}=t,s=M(),i=Ae(),[r,f]=L.useState("gitlab.com"),[c,u]=L.useState("");let d;e[0]!==i||e[1]!==r||e[2]!==o||e[3]!==s||e[4]!==c?(d=function(){!r.trim()||!c.trim()||i.mutate({type:"gitlab",host:r.trim(),token:c.trim()},{onSuccess:Z=>{oe.success(s("settings.repositories.connected",{login:Z.login})),u(""),o(!1)},onError:Z=>oe.error(Le(Z,s("settings.repositories.failed")))})},e[0]=i,e[1]=r,e[2]=o,e[3]=s,e[4]=c,e[5]=d):d=e[5];const a=d;let h;e[6]!==s?(h=s("settings.repositories.tokenDialogTitle"),e[6]=s,e[7]=h):h=e[7];let m;e[8]!==h?(m=l.jsx(de,{children:h}),e[8]=h,e[9]=m):m=e[9];let j;e[10]!==s?(j=s("settings.repositories.tokenDialogDescription"),e[10]=s,e[11]=j):j=e[11];let p;e[12]!==j?(p=l.jsx(ue,{children:j}),e[12]=j,e[13]=p):p=e[13];let x;e[14]!==m||e[15]!==p?(x=l.jsxs(fe,{children:[m,p]}),e[14]=m,e[15]=p,e[16]=x):x=e[16];let b;e[17]!==s?(b=s("settings.repositories.tokenHostLabel"),e[17]=s,e[18]=b):b=e[18];let g;e[19]!==b?(g=l.jsx(ae,{htmlFor:"gitlab-host",children:b}),e[19]=b,e[20]=g):g=e[20];let y;e[21]===Symbol.for("react.memo_cache_sentinel")?(y=Y=>f(Y.target.value),e[21]=y):y=e[21];let N;e[22]!==s?(N=s("settings.repositories.tokenHostPlaceholder"),e[22]=s,e[23]=N):N=e[23];let P;e[24]!==r||e[25]!==N?(P=l.jsx(re,{id:"gitlab-host",value:r,onChange:y,placeholder:N}),e[24]=r,e[25]=N,e[26]=P):P=e[26];let C;e[27]!==P||e[28]!==g?(C=l.jsxs("div",{className:"flex flex-col gap-1.5",children:[g,P]}),e[27]=P,e[28]=g,e[29]=C):C=e[29];let v;e[30]!==s?(v=s("settings.repositories.tokenLabel"),e[30]=s,e[31]=v):v=e[31];let S;e[32]!==v?(S=l.jsx(ae,{htmlFor:"gitlab-token",children:v}),e[32]=v,e[33]=S):S=e[33];let $;e[34]===Symbol.for("react.memo_cache_sentinel")?($=Y=>u(Y.target.value),e[34]=$):$=e[34];let T;e[35]!==s?(T=s("settings.repositories.tokenPlaceholder"),e[35]=s,e[36]=T):T=e[36];let w;e[37]!==T||e[38]!==c?(w=l.jsx(re,{id:"gitlab-token",type:"password",value:c,onChange:$,placeholder:T,autoComplete:"off"}),e[37]=T,e[38]=c,e[39]=w):w=e[39];let A;e[40]!==S||e[41]!==w?(A=l.jsxs("div",{className:"flex flex-col gap-1.5",children:[S,w]}),e[40]=S,e[41]=w,e[42]=A):A=e[42];let E;e[43]!==C||e[44]!==A?(E=l.jsxs("div",{className:"flex flex-col gap-3",children:[C,A]}),e[43]=C,e[44]=A,e[45]=E):E=e[45];let z;e[46]!==o?(z=()=>o(!1),e[46]=o,e[47]=z):z=e[47];const _=i.isPending;let G;e[48]!==s?(G=s("settings.repositories.cancel"),e[48]=s,e[49]=G):G=e[49];let O;e[50]!==i.isPending||e[51]!==z||e[52]!==G?(O=l.jsx(U,{variant:"outline",onClick:z,disabled:_,children:G}),e[50]=i.isPending,e[51]=z,e[52]=G,e[53]=O):O=e[53];let I;e[54]!==i.isPending||e[55]!==r||e[56]!==c?(I=!r.trim()||!c.trim()||i.isPending,e[54]=i.isPending,e[55]=r,e[56]=c,e[57]=I):I=e[57];let q;e[58]!==i.isPending||e[59]!==s?(q=i.isPending?s("settings.repositories.connecting"):s("settings.repositories.connect"),e[58]=i.isPending,e[59]=s,e[60]=q):q=e[60];let K;e[61]!==a||e[62]!==I||e[63]!==q?(K=l.jsx(U,{onClick:a,disabled:I,children:q}),e[61]=a,e[62]=I,e[63]=q,e[64]=K):K=e[64];let H;e[65]!==O||e[66]!==K?(H=l.jsxs(ve,{children:[O,K]}),e[65]=O,e[66]=K,e[67]=H):H=e[67];let Q;e[68]!==E||e[69]!==H||e[70]!==x?(Q=l.jsxs(me,{className:"sm:max-w-md",children:[x,E,H]}),e[68]=E,e[69]=H,e[70]=x,e[71]=Q):Q=e[71];let B;return e[72]!==o||e[73]!==n||e[74]!==Q?(B=l.jsx(pe,{open:n,onOpenChange:o,children:Q}),e[72]=o,e[73]=n,e[74]=Q,e[75]=B):B=e[75],B}function V(t){const e=k.c(25),{layout:n,label:o,description:s,icon:i,href:r,onClick:f,disabled:c}=t;let u;e[0]!==s||e[1]!==c||e[2]!==i||e[3]!==o||e[4]!==n?(u=n==="picker"?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"size-8 rounded-lg bg-muted flex items-center justify-center shrink-0",children:i}),l.jsxs("span",{className:"flex-1 min-w-0 text-left",children:[l.jsx("span",{className:"block text-sm font-medium",children:o}),l.jsx("span",{className:"block text-xs font-normal text-muted-foreground whitespace-normal",children:s})]}),!c&&l.jsx("span",{className:"shrink-0 text-muted-foreground",children:l.jsx(ne,{size:16})})]}):l.jsxs(l.Fragment,{children:[i,o]}),e[0]=s,e[1]=c,e[2]=i,e[3]=o,e[4]=n,e[5]=u):u=e[5];const d=u,a=n==="picker"?"ghost":"outline",h=n==="picker"&&"w-full h-auto justify-start gap-3 rounded-none px-4 py-3 hover:bg-accent";let m;e[6]!==h?(m=X(h),e[6]=h,e[7]=m):m=e[7];const j=!!r&&!c;let p;e[8]!==d||e[9]!==c||e[10]!==r?(p=r&&!c?l.jsx("a",{href:r,children:d}):d,e[8]=d,e[9]=c,e[10]=r,e[11]=p):p=e[11];let x;e[12]!==c||e[13]!==o||e[14]!==f||e[15]!==a||e[16]!==m||e[17]!==j||e[18]!==p?(x=l.jsx(U,{size:"sm",variant:a,className:m,"aria-label":o,disabled:c,asChild:j,onClick:f,children:p}),e[12]=c,e[13]=o,e[14]=f,e[15]=a,e[16]=m,e[17]=j,e[18]=p,e[19]=x):x=e[19];const b=x;let g;return e[20]!==b||e[21]!==s||e[22]!==c||e[23]!==n?(g=n==="buttons"&&c?l.jsxs(be,{children:[l.jsx(je,{asChild:!0,children:l.jsx("span",{tabIndex:0,children:b})}),l.jsx(ye,{children:s})]}):b,e[20]=b,e[21]=s,e[22]=c,e[23]=n,e[24]=g):g=e[24],g}function Fe(t){const e=k.c(50),{layout:n,disabled:o,onTokenDialog:s}=t,i=M(),r=Te(),{org:f}=D(),c=`/${f.slug}/settings/repositories`;let u;e[0]!==c?(u=_=>`${_}?returnTo=${encodeURIComponent(c)}`,e[0]=c,e[1]=u):u=e[1];const d=u;if(r.isError){let _;return e[2]!==r.error.message?(_=l.jsx("p",{role:"alert",className:"text-sm text-destructive",children:r.error.message}),e[2]=r.error.message,e[3]=_):_=e[3],_}const a=r.data?.github,h=r.data?.gitlab,m=a?.configured===!0,j=(h?.oauthHosts.length??0)>0;if(r.isPending){let _;return e[4]===Symbol.for("react.memo_cache_sentinel")?(_=l.jsx(ie,{className:"h-9 w-40"}),e[4]=_):_=e[4],_}const p=n==="picker"?"flex-col":"flex-wrap items-center gap-2";let x;e[5]!==p?(x=X("flex",p),e[5]=p,e[6]=x):x=e[6];let b;e[7]!==i?(b=i("settings.repositories.connectGithub"),e[7]=i,e[8]=b):b=e[8];const g=m?"settings.repositories.browseAccount":"settings.repositories.githubUnavailable";let y;e[9]!==i||e[10]!==g?(y=i(g),e[9]=i,e[10]=g,e[11]=y):y=e[11];let N;e[12]===Symbol.for("react.memo_cache_sentinel")?(N=l.jsx(ee,{size:16}),e[12]=N):N=e[12];const P=a?.connectPath?d(a.connectPath):void 0,C=o||!m||!a?.connectPath;let v;e[13]!==n||e[14]!==b||e[15]!==y||e[16]!==P||e[17]!==C?(v=l.jsx(V,{layout:n,label:b,description:y,icon:N,href:P,disabled:C}),e[13]=n,e[14]=b,e[15]=y,e[16]=P,e[17]=C,e[18]=v):v=e[18];let S;e[19]!==d||e[20]!==o||e[21]!==a||e[22]!==m||e[23]!==n||e[24]!==i?(S=m&&a?.installPath&&l.jsx(V,{layout:n,label:i("settings.repositories.manageGithub"),description:i("settings.repositories.manageGithubHint"),icon:l.jsx(ee,{size:16}),href:d(a.installPath),disabled:o}),e[19]=d,e[20]=o,e[21]=a,e[22]=m,e[23]=n,e[24]=i,e[25]=S):S=e[25];let $;e[26]!==d||e[27]!==o||e[28]!==h||e[29]!==j||e[30]!==n||e[31]!==i?($=j&&h?.connectPath&&l.jsx(V,{layout:n,label:i("settings.repositories.connectGitlab"),description:i("settings.repositories.browseAccount"),icon:l.jsx(te,{size:16}),href:d(h.connectPath),disabled:o}),e[26]=d,e[27]=o,e[28]=h,e[29]=j,e[30]=n,e[31]=i,e[32]=$):$=e[32];let T;e[33]!==i?(T=i("settings.repositories.connectGitlabToken"),e[33]=i,e[34]=T):T=e[34];let w;e[35]!==i?(w=i("settings.repositories.gitlabTokenHint"),e[35]=i,e[36]=w):w=e[36];let A;e[37]===Symbol.for("react.memo_cache_sentinel")?(A=l.jsx(te,{size:16}),e[37]=A):A=e[37];let E;e[38]!==o||e[39]!==n||e[40]!==s||e[41]!==T||e[42]!==w?(E=l.jsx(V,{layout:n,label:T,description:w,icon:A,onClick:s,disabled:o}),e[38]=o,e[39]=n,e[40]=s,e[41]=T,e[42]=w,e[43]=E):E=e[43];let z;return e[44]!==v||e[45]!==S||e[46]!==$||e[47]!==E||e[48]!==x?(z=l.jsxs("div",{className:x,children:[v,S,$,E]}),e[44]=v,e[45]=S,e[46]=$,e[47]=E,e[48]=x,e[49]=z):z=e[49],z}function le(t){const e=k.c(3),{provider:n,className:o}=t;let s;return e[0]!==o||e[1]!==n?(s=n==="gitlab"?l.jsx(te,{size:16,className:o}):l.jsx(ee,{size:16,className:o}),e[0]=o,e[1]=n,e[2]=s):s=e[2],s}function Ge(t){return(t??[]).filter(e=>e.status==="active"&&e.servable)}function ge(t){const e=k.c(20),{provider:n,path:o,host:s,hint:i,disabled:r,busy:f,onSelect:c}=t,u=r&&"opacity-60 cursor-not-allowed";let d;e[0]!==u?(d=X("w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-accent transition-colors focus-visible:outline-none focus-visible:bg-accent",u),e[0]=u,e[1]=d):d=e[1];let a;e[2]!==n?(a=l.jsx("div",{className:"size-8 rounded-lg bg-muted flex items-center justify-center shrink-0",children:l.jsx(le,{provider:n,className:"text-muted-foreground"})}),e[2]=n,e[3]=a):a=e[3];let h;e[4]!==o?(h=l.jsx("span",{className:"block text-sm font-medium truncate",children:o}),e[4]=o,e[5]=h):h=e[5];const m=i?`${s} · ${i}`:s;let j;e[6]!==m?(j=l.jsx("span",{className:"block text-xs text-muted-foreground truncate",children:m}),e[6]=m,e[7]=j):j=e[7];let p;e[8]!==h||e[9]!==j?(p=l.jsxs("span",{className:"flex-1 min-w-0",children:[h,j]}),e[8]=h,e[9]=j,e[10]=p):p=e[10];let x;e[11]!==f?(x=f?l.jsx(ce,{className:"size-4 text-muted-foreground"}):l.jsx(ne,{size:16,className:"shrink-0 text-muted-foreground"}),e[11]=f,e[12]=x):x=e[12];let b;return e[13]!==r||e[14]!==c||e[15]!==d||e[16]!==a||e[17]!==p||e[18]!==x?(b=l.jsxs("button",{type:"button",disabled:r,onClick:c,className:d,children:[a,p,x]}),e[13]=r,e[14]=c,e[15]=d,e[16]=a,e[17]=p,e[18]=x,e[19]=b):b=e[19],b}function Oe(t){const e=k.c(25),{onPick:n,pendingPath:o}=t,s=M(),i=Ee(),[r,f]=L.useState("");if(i.isPending){let d;return e[0]===Symbol.for("react.memo_cache_sentinel")?(d=l.jsx(ie,{className:"h-24 w-full"}),e[0]=d):d=e[0],d}if(i.isError){let d;return e[1]!==i.error.message?(d=l.jsx("p",{role:"alert",className:"p-4 text-sm text-destructive",children:i.error.message}),e[1]=i.error.message,e[2]=d):d=e[2],d}let c,u;if(e[3]!==n||e[4]!==o||e[5]!==r||e[6]!==i.data||e[7]!==s){u=Symbol.for("react.early_return_sentinel");e:{const d=i.data??[];if(d.length===0){u=null;break e}let a;e[10]!==r?(a=y=>y.path.toLowerCase().includes(r.trim().toLowerCase()),e[10]=r,e[11]=a):a=e[11];const h=d.filter(a);let m;e[12]!==s?(m=s("common.repositoryPicker.searchPlaceholder"),e[12]=s,e[13]=m):m=e[13];const j=o!==null;let p;e[14]!==r||e[15]!==m||e[16]!==j?(p=l.jsx(he,{value:r,onChange:f,placeholder:m,disabled:j}),e[14]=r,e[15]=m,e[16]=j,e[17]=p):p=e[17];let x;e[18]!==s?(x=s("common.repositoryPicker.linkedSection"),e[18]=s,e[19]=x):x=e[19];let b;e[20]!==x?(b=l.jsx("p",{className:"px-4 pt-4 pb-2 text-xs font-medium text-muted-foreground",children:x}),e[20]=x,e[21]=b):b=e[21];let g;e[22]!==n||e[23]!==o?(g=y=>l.jsx(ge,{provider:y.provider,path:y.path,host:y.host,hint:y.defaultBranch,disabled:o!==null,busy:o===y.id,onSelect:()=>n(y)},y.id),e[22]=n,e[23]=o,e[24]=g):g=e[24],c=l.jsxs("div",{className:"pb-2",children:[p,b,h.length===0&&l.jsx("p",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:s("common.repositoryPicker.searchEmpty")}),h.map(g)]})}e[3]=n,e[4]=o,e[5]=r,e[6]=i.data,e[7]=s,e[8]=c,e[9]=u}else c=e[8],u=e[9];return u!==Symbol.for("react.early_return_sentinel")?u:c}function Ie(t){const e=k.c(35),{account:n,onLink:o,pendingPath:s}=t,i=M(),[r,f]=L.useState(""),c=Ce(r,300),u=L.useDeferredValue(c),d=r!==u,a=_e(n.id,u);let h,m,j,p;if(e[0]!==d||e[1]!==o||e[2]!==s||e[3]!==r||e[4]!==a.data?.pages||e[5]!==a.error||e[6]!==a.hasNextPage||e[7]!==a.isError||e[8]!==a.isFetching||e[9]!==a.isPending||e[10]!==i){const y=a.data?.pages.flatMap(qe)??[];j="h-80 min-h-0 flex flex-col overflow-hidden";let N;e[15]!==i?(N=i("common.repositoryPicker.searchPlaceholder"),e[15]=i,e[16]=N):N=e[16];const P=d||a.isFetching;e[17]!==r||e[18]!==N||e[19]!==P?(p=l.jsx(he,{placeholder:N,value:r,onChange:f,isSearching:P}),e[17]=r,e[18]=N,e[19]=P,e[20]=p):p=e[20];const C=d?"opacity-40":"opacity-100";e[21]!==C?(h=X("flex-1 overflow-y-auto transition-opacity duration-150",C),e[21]=C,e[22]=h):h=e[22],m=a.isPending?l.jsx("div",{className:"flex-1 flex items-center justify-center py-10",children:l.jsx(ce,{className:"size-4.5 text-muted-foreground"})}):a.isError?l.jsx("p",{className:"px-4 py-10 text-center text-sm text-muted-foreground",children:a.error instanceof Error?a.error.message:i("common.repositoryPicker.searchFailed")}):y.length===0?l.jsx("p",{className:"px-4 py-10 text-center text-sm text-muted-foreground",children:i(a.hasNextPage?"common.repositoryPicker.searchMore":"common.repositoryPicker.searchEmpty")}):y.map(v=>l.jsx(ge,{provider:v.ref.provider,path:v.ref.path,host:v.ref.host,hint:v.visibility,disabled:s!==null,busy:s===v.ref.path,onSelect:()=>o(v.webUrl,v.ref.path)},`${v.ref.host}/${v.ref.path}`)),e[0]=d,e[1]=o,e[2]=s,e[3]=r,e[4]=a.data?.pages,e[5]=a.error,e[6]=a.hasNextPage,e[7]=a.isError,e[8]=a.isFetching,e[9]=a.isPending,e[10]=i,e[11]=h,e[12]=m,e[13]=j,e[14]=p}else h=e[11],m=e[12],j=e[13],p=e[14];let x;e[23]!==s||e[24]!==a||e[25]!==i?(x=a.hasNextPage&&l.jsx(U,{variant:"ghost",className:"w-full",disabled:a.isFetchingNextPage||s!==null,onClick:()=>{a.fetchNextPage()},children:i("common.repositoryPicker.loadMore")}),e[23]=s,e[24]=a,e[25]=i,e[26]=x):x=e[26];let b;e[27]!==h||e[28]!==m||e[29]!==x?(b=l.jsxs("div",{className:h,children:[m,x]}),e[27]=h,e[28]=m,e[29]=x,e[30]=b):b=e[30];let g;return e[31]!==j||e[32]!==p||e[33]!==b?(g=l.jsxs("div",{className:j,children:[p,b]}),e[31]=j,e[32]=p,e[33]=b,e[34]=g):g=e[34],g}function qe(t){return t.repositories}function Ke(t){const e=k.c(14),{accounts:n,onSelect:o,disabled:s}=t,i=M();let r;e[0]!==i?(r=i("common.repositoryPicker.browseSection"),e[0]=i,e[1]=r):r=e[1];let f;e[2]!==r?(f=l.jsx("p",{className:"px-4 py-2 text-xs font-medium text-muted-foreground",children:r}),e[2]=r,e[3]=f):f=e[3];let c;if(e[4]!==n||e[5]!==s||e[6]!==o){let d;e[8]!==s||e[9]!==o?(d=a=>l.jsxs("button",{type:"button",onClick:()=>o(a),disabled:s,className:"w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-accent transition-colors focus-visible:outline-none focus-visible:bg-accent disabled:opacity-50",children:[l.jsx(xe,{url:a.avatarUrl?.trim()||void 0,fallback:l.jsx(le,{provider:a.type,className:"text-muted-foreground"}),shape:"circle",size:"sm",className:"size-8",muted:!0}),l.jsxs("span",{className:"flex-1 min-w-0",children:[l.jsx("span",{className:"block text-sm font-medium truncate",children:a.login}),l.jsx("span",{className:"block text-xs text-muted-foreground truncate",children:a.host})]}),l.jsx(ne,{size:16,className:"text-muted-foreground"})]},a.id),e[8]=s,e[9]=o,e[10]=d):d=e[10],c=n.map(d),e[4]=n,e[5]=s,e[6]=o,e[7]=c}else c=e[7];let u;return e[11]!==f||e[12]!==c?(u=l.jsxs("div",{className:"py-2",children:[f,c]}),e[11]=f,e[12]=c,e[13]=u):u=e[13],u}function it({open:t,onOpenChange:e,title:n,onPicked:o,onError:s}){const i=M(),r=we(),f=ze(),[c,u]=L.useState(null),[d,a]=L.useState(null),[h,m]=L.useState(null),j=Ge(r.data);function p(g){const y=g instanceof Error?g.message:i("common.repositoryPicker.linkFailed");m(y),s?.(y)}async function x(g){a(g.id),m(null);try{await o({repository:g})}catch(y){p(y)}finally{a(null)}}async function b(g,y){if(c){a(y),m(null);try{const N=await f.mutateAsync({url:g,accountId:c.id});await o({repository:N})}catch(N){p(N)}finally{a(null)}}}return l.jsx(pe,{open:t,onOpenChange:g=>{d===null&&(g||(u(null),m(null)),e(g))},children:l.jsxs(me,{className:"sm:max-w-lg max-h-[85svh] p-0 gap-0 overflow-hidden flex flex-col",children:[l.jsxs(fe,{className:"sr-only",children:[l.jsx(de,{children:n}),l.jsx(ue,{children:i("common.repositoryPicker.description")})]}),l.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 pr-12 gap-3 shrink-0",children:[c?l.jsx(U,{size:"icon",variant:"ghost",className:"size-6 -ml-1",disabled:d!==null,onClick:()=>u(null),"aria-label":i("common.repositoryPicker.back"),children:l.jsx(ke,{size:16})}):l.jsx(Pe,{size:16,className:"text-muted-foreground shrink-0"}),c&&l.jsx(xe,{url:c.avatarUrl?.trim()||void 0,fallback:l.jsx(le,{provider:c.type,className:"text-muted-foreground"}),shape:"circle",size:"sm",className:"size-6",muted:!0}),l.jsx("span",{className:"text-sm font-medium truncate",children:c?c.login:n})]}),r.isPending?l.jsx("div",{className:"p-4",children:l.jsx(ie,{className:"h-24 w-full"})}):r.isError?l.jsx("p",{role:"alert",className:"p-4 text-sm text-destructive",children:r.error.message}):c?l.jsx(Ie,{account:c,onLink:(g,y)=>{b(g,y)},pendingPath:d},c.id):l.jsxs("div",{className:"flex-1 overflow-y-auto",children:[l.jsx(Oe,{onPick:x,pendingPath:d}),j.length>0&&l.jsx(Ke,{accounts:j,onSelect:u,disabled:d!==null}),l.jsxs("div",{className:"border-t border-border py-2",children:[l.jsx("p",{className:"px-4 py-2 text-xs text-muted-foreground leading-relaxed",children:i("common.repositoryPicker.description")}),l.jsx(Re,{layout:"picker",disabled:d!==null})]})]}),h&&l.jsx("p",{role:"alert",className:"px-4 pb-3 text-sm text-destructive",children:h})]})})}export{te as G,it as R,tt as a,st as b,Te as c,we as d,Re as e,Ee as u};
|
package/dist/client/assets/{require-capability-D7WPxMT8.js → require-capability-DeSNM-qc.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p,b8 as l,j as m}from"./index-
|
|
1
|
+
import{c as p,b8 as l,j as m}from"./index-BZsplvNT.js";import{A as u}from"./access-gate-tjl-KQc5.js";function f(c){const t=p.c(6),{capability:n,area:r,children:a}=c,{granted:i,loading:s,error:o}=l(n);let e;return t[0]!==r||t[1]!==a||t[2]!==o||t[3]!==i||t[4]!==s?(e=m.jsx(u,{granted:i,loading:s,error:o,area:r,children:a}),t[0]=r,t[1]=a,t[2]=o,t[3]=i,t[4]=s,t[5]=e):e=t[5],e}export{f as R};
|
package/dist/client/assets/{required-auth-layout-BzHLhAY7.js → required-auth-layout-DDtOwDBP.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,b as u,a as f,j as s,h as d,N as h}from"./index-
|
|
1
|
+
import{c as a,b as u,a as f,j as s,h as d,N as h}from"./index-BZsplvNT.js";function x(){const i=a.c(1),e=window.location.pathname+window.location.search;let n;if(i[0]===Symbol.for("react.memo_cache_sentinel")){const c=e==="/login"||e.startsWith("/login?")?{}:{next:e};n=s.jsx(h,{to:"/login",search:c,replace:!0}),i[0]=n}else n=i[0];return n}function j(i){const e=a.c(7),{children:n}=i,o=u(),{data:c,isPending:m}=f.useSession();if(c){let t;return e[0]!==n?(t=s.jsx(s.Fragment,{children:n}),e[0]=n,e[1]=t):t=e[1],t}if(m){let t;e[2]!==o?(t=o("common.loading"),e[2]=o,e[3]=t):t=e[3];let l;return e[4]!==t?(l=s.jsx("div",{className:"flex min-h-dvh w-full items-center justify-center",children:s.jsx(d,{className:"size-5 text-muted-foreground",label:t})}),e[4]=t,e[5]=l):l=e[5],l}let r;return e[6]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(x,{}),e[6]=r):r=e[6],r}export{j as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as O,b as A,u as K,d as V,r as z,e as $,j as s,B as T,a as G}from"./index-
|
|
1
|
+
import{c as O,b as A,u as K,d as V,r as z,e as $,j as s,B as T,a as G}from"./index-BZsplvNT.js";import{I as D}from"./input-MZsLaCQZ.js";function U(){const e=O.c(53),t=A();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/reset-password"},e[0]=n):n=e[0];const{token:o,error:F}=K(n),a=V(),[l,M]=z.useState(""),[i,q]=z.useState(""),[r,B]=z.useState(!1),c=F==="INVALID_TOKEN";let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v={mutationFn:H,onSuccess:()=>{B(!0)}},e[1]=v):v=e[1];const b=$(v),N=l===i,d=l.length>=8&&i.length>=8&&N,m=b.isPending,P=b.error;let y;e[2]!==d||e[3]!==l||e[4]!==b||e[5]!==o?(y=j=>{j.preventDefault(),!(!o||!d)&&b.mutate({newPassword:l,token:o})},e[2]=d,e[3]=l,e[4]=b,e[5]=o,e[6]=y):y=e[6];const I=y;let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--primary-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e[7]=k):k=e[7];let S,_,L,E;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),_=s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),L=s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),E=s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),e[8]=S,e[9]=_,e[10]=L,e[11]=E):(S=e[8],_=e[9],L=e[10],E=e[11]);let C;e[12]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"flex justify-center",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e[12]=C):C=e[12];let u;e[13]!==r||e[14]!==t?(u=t(r?"routes.resetPassword.passwordResetSuccessful":"routes.resetPassword.setNewPassword"),e[13]=r,e[14]=t,e[15]=u):u=e[15];let x;e[16]!==u?(x=s.jsx("div",{className:"text-center space-y-1",children:s.jsx("p",{className:"text-sm text-foreground/70",children:u})}),e[16]=u,e[17]=x):x=e[17];let f;e[18]!==c||e[19]!==a||e[20]!==r||e[21]!==t||e[22]!==o?(f=(c||!o&&!r)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:t("routes.resetPassword.invalidOrExpiredLink")}),s.jsx(T,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:t("routes.resetPassword.backToLogin")})]}),e[18]=c,e[19]=a,e[20]=r,e[21]=t,e[22]=o,e[23]=f):f=e[23];let g;e[24]!==P||e[25]!==t?(g=P&&s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:P.message||t("routes.resetPassword.failedToReset")}),e[24]=P,e[25]=t,e[26]=g):g=e[26];let p;e[27]!==a||e[28]!==r||e[29]!==t?(p=r&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:t("routes.resetPassword.passwordResetDescription")}),s.jsx(T,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:t("routes.resetPassword.goToLogin")})]}),e[27]=a,e[28]=r,e[29]=t,e[30]=p):p=e[30];let w;e[31]!==d||e[32]!==i||e[33]!==I||e[34]!==c||e[35]!==m||e[36]!==l||e[37]!==N||e[38]!==r||e[39]!==t||e[40]!==o?(w=o&&!c&&!r&&s.jsxs("form",{onSubmit:I,className:"grid gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:t("routes.resetPassword.newPasswordLabel")}),s.jsx(D,{type:"password",placeholder:"••••••••",value:l,onChange:j=>M(j.target.value),required:!0,minLength:8,disabled:m})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:t("routes.resetPassword.confirmPasswordLabel")}),s.jsx(D,{type:"password",placeholder:"••••••••",value:i,onChange:j=>q(j.target.value),required:!0,minLength:8,disabled:m}),i&&!N&&s.jsx("p",{className:"text-xs text-destructive mt-1.5",children:t("routes.resetPassword.passwordsDoNotMatch")})]}),s.jsx(T,{type:"submit",disabled:m||!d,className:"w-full font-semibold",size:"lg",children:t(m?"routes.resetPassword.resetting":"routes.resetPassword.resetPassword")})]}),e[31]=d,e[32]=i,e[33]=I,e[34]=c,e[35]=m,e[36]=l,e[37]=N,e[38]=r,e[39]=t,e[40]=o,e[41]=w):w=e[41];let h;e[42]!==a||e[43]!==r||e[44]!==t?(h=!r&&s.jsx("div",{className:"text-center",children:s.jsx(T,{type:"button",variant:"link",onClick:()=>a({to:"/login"}),className:"text-sm text-muted-foreground hover:text-foreground",children:t("routes.resetPassword.backToSignIn")})}),e[42]=a,e[43]=r,e[44]=t,e[45]=h):h=e[45];let R;return e[46]!==x||e[47]!==f||e[48]!==g||e[49]!==p||e[50]!==w||e[51]!==h?(R=s.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-primary to-primary/75 p-4",children:[k,s.jsxs("div",{className:"relative z-10",children:[S,_,L,E,s.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[C,x,f,g,p,w,h]})]})]}),e[46]=x,e[47]=f,e[48]=g,e[49]=p,e[50]=w,e[51]=h,e[52]=R):R=e[52],R}async function H(e){const{newPassword:t,token:n}=e,o=await G.resetPassword({newPassword:t,token:n});if(o.error)throw new Error(o.error.message||"Failed to reset password");return o}export{U as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as x,b as j,j as n,dq as w,dp as h,t as S,dr as K}from"./index-
|
|
1
|
+
import{c as x,b as j,j as n,dq as w,dp as h,t as S,dr as K}from"./index-BZsplvNT.js";import{S as C}from"./switch-2iiOxMIT.js";import{e as R,a as A,i as $,d as z,f as D,c as M,b as k}from"./UserSquare-hcaj17gz.js";import{i as E}from"./GitBranch01-C7r39_B1.js";import{i as F,u as O,j as P}from"./use-organization-settings-DUnuAPqv.js";function H(){const e=x.c(13),t=j();let s;e[0]!==t?(s=t("settings.review.title"),e[0]=t,e[1]=s):s=e[1];let i;e[2]!==t?(i=t("settings.review.description"),e[2]=t,e[3]=i):i=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(g,{flag:"reviewer_enabled",icon:n.jsx(R,{size:16}),titleKey:"settings.review.reviewerTitle",descriptionKey:"settings.review.reviewerDescription"}),e[4]=o):o=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(g,{flag:"cheap_reviewer_model",icon:n.jsx(A,{size:16}),titleKey:"settings.review.cheapReviewerModelTitle",descriptionKey:"settings.review.cheapReviewerModelDescription"}),e[5]=r):r=e[5];let d,l;e[6]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(g,{flag:"auto_merge",icon:n.jsx($,{size:16}),titleKey:"settings.review.autoMergeTitle",descriptionKey:"settings.review.autoMergeDescription"}),l=n.jsx(L,{}),e[6]=d,e[7]=l):(d=e[6],l=e[7]);let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(g,{flag:"delivery_lanes_enabled",icon:n.jsx(z,{size:16}),titleKey:"settings.review.deliveryLanesTitle",descriptionKey:"settings.review.deliveryLanesDescription"}),e[8]=f):f=e[8];let a;e[9]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsxs(w,{children:[o,r,d,l,f,n.jsx(g,{flag:"auto_assign_report_tasks_to_super_agent",icon:n.jsx(D,{size:16}),titleKey:"settings.review.autoAssignReportTasksTitle",descriptionKey:"settings.review.autoAssignReportTasksDescription"})]}),e[9]=a):a=e[9];let c;return e[10]!==s||e[11]!==i?(c=n.jsx(h,{title:s,description:i,children:a}),e[10]=s,e[11]=i,e[12]=c):c=e[12],c}function J(){const e=x.c(8),t=j();let s;e[0]!==t?(s=t("settings.agentTools.title"),e[0]=t,e[1]=s):s=e[1];let i;e[2]!==t?(i=t("settings.agentTools.description"),e[2]=t,e[3]=i):i=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(w,{children:n.jsx(g,{flag:"coding_agent_org_mcps",icon:n.jsx(M,{size:16}),titleKey:"settings.agentTools.orgMcpsTitle",descriptionKey:"settings.agentTools.orgMcpsDescription"})}),e[4]=o):o=e[4];let r;return e[5]!==s||e[6]!==i?(r=n.jsx(h,{title:s,description:i,children:o}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}function N(){const e=x.c(5),t=j();let s;e[0]!==t?(s=t("sidebar.agentsSection.codeAgents"),e[0]=t,e[1]=s):s=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(w,{children:n.jsx(g,{flag:"coding_agents_claude_code",icon:n.jsx(k,{size:16}),titleKey:"settings.agentTools.codingAgentsClaudeCodeTitle",descriptionKey:"settings.agentTools.codingAgentsClaudeCodeDescription"})}),e[2]=i):i=e[2];let o;return e[3]!==s?(o=n.jsx(h,{title:s,children:i}),e[3]=s,e[4]=o):o=e[4],o}function L(){const e=x.c(3),t=F();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(E,{size:16}),e[0]=s):s=e[0];let i;return e[1]!==t?(i=n.jsx(g,{flag:"auto_resolve_conflicts",icon:s,titleKey:"settings.review.autoResolveConflictsTitle",descriptionKey:"settings.review.autoResolveConflictsDescription",enabled:t}),e[1]=t,e[2]=i):i=e[2],i}function g(e){const t=x.c(23),{flag:s,icon:i,titleKey:o,descriptionKey:r,enabled:d}=e,l=j(),f=O(s),a=d??f,c=P();let p;t[0]!==l||t[1]!==o?(p=l(o),t[0]=l,t[1]=o,t[2]=p):p=t[2];let m;t[3]!==r||t[4]!==l?(m=l(r),t[3]=r,t[4]=l,t[5]=m):m=t[5];const T=c.isPending;let _;t[6]!==l||t[7]!==o?(_=l(o),t[6]=l,t[7]=o,t[8]=_):_=t[8];let u;t[9]!==s||t[10]!==c||t[11]!==l?(u=b=>c.mutate(s,b,{onError:()=>S.error(l("settings.review.updateError"))}),t[9]=s,t[10]=c,t[11]=l,t[12]=u):u=t[12];let v;t[13]!==a||t[14]!==c.isPending||t[15]!==_||t[16]!==u?(v=n.jsx(C,{checked:a,disabled:T,"aria-label":_,onCheckedChange:u}),t[13]=a,t[14]=c.isPending,t[15]=_,t[16]=u,t[17]=v):v=t[17];let y;return t[18]!==i||t[19]!==p||t[20]!==m||t[21]!==v?(y=n.jsx(K,{icon:i,title:p,description:m,action:v}),t[18]=i,t[19]=p,t[20]=m,t[21]=v,t[22]=y):y=t[22],y}export{J as A,N as C,H as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as ie,r as Q,G as Ge,K as de,m as Ve,j as s,l as Z,h as Oe,B as ae,c as X,ae as qe,af as we,ag as re,ak as Ze,ah as Je,n as ot,aq as Ct,ar as bt,e as nt,t as Ce,o as Ye,P as Ne,z as it,dp as We,dq as Xe,dr as et,C as jt,a3 as Me,a4 as De,a1 as Pe,a2 as ve,ap as tt,bZ as Mt,u as rt,dt as at,fg as Dt,E as Pt,d as vt}from"./index-B_lUDZ9B.js";import{u as Lt}from"./use-organization-roles-le6n88uk.js";import{u as Ke}from"./use-org-auth-client-tX4pyhvY.js";import{g as ct,a as yt}from"./role-color-Dn2tXDDF.js";import{B as be}from"./badge-COtyjjy2.js";import{A as dt,a as mt,c as ut,d as ft,b as gt,f as Tt,g as _t,e as ht}from"./alert-dialog-B6LS36Sm.js";import{c as wt,D as Gt,b as Ut,a as kt}from"./dropdown-menu-BHHO3QAR.js";import{i as Bt}from"./DotsVertical-Cha1vnex.js";import{s as Be}from"./Plus-UnZHTGwg.js";import{s as Vt}from"./Trash01-CRSthTGO.js";import{C as Yt}from"./collection-table-wrapper-DRVe2c2R.js";import{E as st}from"./empty-state-BOUJ1IRI.js";import{S as ze}from"./search-input-D-ESO_3b.js";import{P as Et,D as It}from"./ai-providers-logos-DD3qZ33J.js";import{I as Fe}from"./integration-icon-DCPy_52o.js";import{u as Kt}from"./use-infinite-scroll-DQ_XrNCL.js";import{C as Qe}from"./checkbox-D1r9ixw9.js";import{i as zt}from"./ArrowLeft-xkekPehv.js";import{u as Ft}from"./useSuspenseInfiniteQuery-CzeWzIJb.js";import{u as Qt}from"./use-mcp-client-xRPKqtBd.js";import{S as $t}from"./constants-Daqiz8AS.js";import{C as Ht}from"./collection-search-CkYj4zLQ.js";import{p as qt}from"./connection-Cimig8VQ.js";import{a as xt}from"./use-members-CTCpXWvz.js";import{g as pt}from"./get-initials-D-f_fDFw.js";import{u as Zt}from"./use-connection-BRJSF7XV.js";import{u as Jt,g as Wt}from"./use-ai-providers-dsyrDnO9.js";import{A as Rt}from"./avatar-BusY4imm.js";import{S as je}from"./switch-6gOY7p_B.js";import{t as Xt}from"./ChevronUp-CcnNOmjW.js";import{i as es}from"./ChevronRight-zWIGH7_7.js";import{A as ts}from"./access-gate-LG7Db20W.js";import"./Check-BcH3mbli.js";import"./table-CiqNoZ31.js";import"./ArrowUp-CYfoVlFX.js";import"./SearchMd-BoghbLrR.js";import"./Tool02-B4NLpHjP.js";import"./agent-icon-B0j2UorE.js";import"./AlertCircle-C3hNX-U3.js";import"./Tool01-DXqO9hP4.js";import"./XCircle-TCv3gxEk.js";import"./TrendUp01-Dug8rn5Y.js";import"./ZoomOut-DC7lYRrH.js";import"./Users03-CoUu6iB3.js";import"./CheckCircle-efnyoYbr.js";import"./ChevronSelectorVertical-Q_MhqA-g.js";import"./UserSquare-CWhx4AsN.js";import"./Copy01-B-07BGuw.js";import"./CreditCard01-DZdhUpRr.js";import"./Download01-BH00OOK2.js";import"./Settings02-CRvAtfO0.js";import"./Eye-s_5OI3rP.js";import"./Share07-CTpIecy0.js";import"./GitBranch01-DPsdhEPj.js";import"./Globe01-BOLRhWz3.js";import"./XClose-DqZ5Ef7p.js";import"./HardDrive-Jz5aKVF-.js";import"./Image01-Dde0njV5.js";import"./Key01-CL0l8cke.js";import"./Link01-c7H6evzR.js";import"./LinkExternal01-mF6LE9cE.js";import"./Monitor01-CxZPUqxw.js";import"./Sun-cPKIj7uq.js";import"./Package-D1Oz_AXu.js";import"./Palette-BZi2CQIb.js";import"./Play-DL08uuDR.js";import"./Shield01-DPL17IT0.js";import"./Stars01-DveEX2vy.js";import"./Upload01-D_Fv189I.js";import"./User01-CDa2pgjQ.js";import"./Users01-DZlH1wbC.js";import"./Zap-HRAvXFnr.js";import"./infiniteQueryObserver-CwY974C7.js";import"./auth-DBYGTgFE.js";import"./capability-load-error-BeQsW5u1.js";const $e="basic-usage",He=[{id:$e,label:"Basic Usage",description:"Tools all org members can access by default",section:"Basic Usage",tools:["COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET","CONNECTION_TEST","COLLECTION_VIRTUAL_MCP_LIST","COLLECTION_VIRTUAL_MCP_GET","VIRTUAL_MCP_PLUGIN_CONFIG_GET","VIRTUAL_MCP_LAST_USED_LIST","AUTOMATION_GET","AUTOMATION_LIST","AUTOMATION_RUN_STATS","AI_PROVIDERS_LIST","AI_PROVIDERS_LIST_MODELS","AI_PROVIDERS_ACTIVE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_CREDITS","AI_PROVIDER_TOPUP_URL","LIST_OBJECTS","GET_OBJECT_METADATA","GET_PRESIGNED_URL","PUT_PRESIGNED_URL","FILE_OBJECTS_LIST","ORG_REPO_SYNC_LIST","SANDBOX_START","SANDBOX_DELETE","REPOSITORY_SEARCH_BRANCHES","GIT_PROVIDER_CAPABILITIES","GIT_ACCOUNT_LIST","REPOSITORY_LIST","REPOSITORY_SEARCH","CHANGE_REQUEST_STATE","CHANGE_REQUEST_LAST_MERGED","CHANGE_REQUEST_LIST_OPEN","CHANGE_REQUEST_CHECK_LOG","GLOBAL_SEARCH","ORGANIZATION_SETTINGS_GET","USER_GET","BRAND_CONTEXT_LIST","COLLECTION_THREADS_CREATE","COLLECTION_THREADS_LIST","COLLECTION_THREADS_GET","COLLECTION_THREADS_UPDATE","COLLECTION_THREADS_DELETE","COLLECTION_THREAD_MESSAGES_LIST","TASK_BOARD_ITEM_CREATE","TASK_BOARD_ITEM_LIST","TASK_BOARD_ITEM_UPDATE","TASK_BOARD_ITEM_DELETE","TASK_BOARD_AUTOMATION_LIST","TASK_BOARD_AUTOMATION_UPSERT","TASK_BOARD_AUTOMATION_DELETE","TASK_BOARD_PROMPT_LIST","TASK_BOARD_PROMPT_UPSERT","TASK_BOARD_PROMPT_DELETE","TASK_BOARD_ITEM_PRS_GET","TASK_BOARD_PREVIEW_PROBE","TASK_BOARD_ITEM_RERUN","TASK_BOARD_REVIEW_DECISION","TASK_BOARD_PROMOTE_TO_PRODUCTION","TASK_BOARD_ACTIVITY_LIST","TASK_BOARD_COMMENT_LIST","TASK_BOARD_COMMENT_CREATE","TASK_BOARD_COMMENT_UPDATE","TASK_BOARD_COMMENT_DELETE","TASK_BOARD_DISMISSED_LIST","TASK_BOARD_DISMISSED_RESTORE","NOTIFICATION_LIST","NOTIFICATION_MARK_READ","NOTIFICATION_SUBSCRIPTION_SET","NOTIFICATION_SUBSCRIPTION_LIST"]},{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","JIRA_INTEGRATION_GET","JIRA_INTEGRATION_UPSERT","JIRA_INTEGRATION_DELETE","JIRA_BOARDS_LIST","JIRA_BOARD_COLUMNS_LIST","JIRA_AUTOMATION_LIST","JIRA_AUTOMATION_UPSERT","JIRA_AUTOMATION_DELETE"]},{id:"members:manage",label:"Manage members",description:"Invite members, remove them, and change their roles",section:"Organization",tools:["ORGANIZATION_MEMBER_LIST","ORGANIZATION_MEMBER_ADD","ORGANIZATION_MEMBER_REMOVE","ORGANIZATION_MEMBER_UPDATE_ROLE","ORGANIZATION_BILLING_CHECKOUT_START","ORGANIZATION_BILLING_PORTAL","ORGANIZATION_TASK_QUOTA_GET","INFRA_BILLING_SITES_LIST","INFRA_BILLING_GET","INFRA_BILLING_PORTAL","ORGANIZATION_JOIN_REQUEST_LIST","ORGANIZATION_JOIN_REQUEST_APPROVE","ORGANIZATION_JOIN_REQUEST_DENY"],dangerous:!0},{id:"connections:manage",label:"Manage connections",description:"Create, update, and delete connections",section:"Connections & Agents",tools:["COLLECTION_CONNECTIONS_CREATE","COLLECTION_CONNECTIONS_UPDATE","COLLECTION_CONNECTIONS_DELETE","COMMERCE_DISCOVERY_SETUP","COMMERCE_DISCOVERY_RUN","COMMERCE_DISCOVERY_BIND","COMMERCE_DISCOVERY_CONNECTION_STATUS"],dangerous:!0},{id:"agents:manage",label:"Manage agents",description:"Create, configure, and delete agents",section:"Connections & Agents",tools:["COLLECTION_VIRTUAL_MCP_CREATE","COLLECTION_VIRTUAL_MCP_UPDATE","COLLECTION_VIRTUAL_MCP_DELETE","VIRTUAL_MCP_PLUGIN_CONFIG_UPDATE","VIRTUAL_MCP_PINNED_VIEWS_UPDATE"],dangerous:!0},{id:"automations:manage",label:"Manage automations",description:"Create, update, run, and delete automations",section:"Automations",tools:["AUTOMATION_CREATE","AUTOMATION_UPDATE","AUTOMATION_DELETE","AUTOMATION_TRIGGER_ADD","AUTOMATION_TRIGGER_REMOVE","AUTOMATION_TRIGGER_ROTATE_TOKEN","AUTOMATION_RUN"],dangerous:!0},{id:"monitoring:view",label:"View monitoring",description:"Access logs and usage statistics",section:"Monitoring",tools:["MONITORING_HEATMAP","MONITORING_LOG_GET","MONITORING_LOGS_LIST","MONITORING_STATS","MONITORING_THREAD_USAGE"]},{id:"secrets:manage",label:"Manage secrets",description:"Create and list secrets stored in the credential vault",section:"Organization",tools:["SECRET_CREATE","SECRET_LIST"]},{id:"file-configs:manage",label:"Manage file configs",description:"Create, list, update and delete S3 bucket configurations and synced GitHub repositories",section:"Organization",tools:["FILE_CONFIG_CREATE","FILE_CONFIG_LIST","FILE_CONFIG_UPDATE","FILE_CONFIG_DELETE","FILE_OBJECTS_LIST","FILE_OBJECT_DELETE","ORG_REPO_SYNC_CREATE","ORG_REPO_SYNC_LIST","ORG_REPO_SYNC_UPDATE","ORG_REPO_SYNC_DELETE","ORG_REPO_SYNC_RUN"]},{id:"ai-providers:manage",label:"Manage AI providers",description:"Add or remove API keys and provision provider credentials",section:"AI Providers",tools:["AI_PROVIDER_KEY_CREATE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_KEY_DELETE","AI_PROVIDER_KEY_UPDATE","AI_PROVIDER_KEY_PREVIEW","AI_PROVIDER_OAUTH_URL","AI_PROVIDER_OAUTH_EXCHANGE","AI_PROVIDER_PROVISION_KEY","AI_PROVIDER_TOPUP_URL","AI_PROVIDER_CREDITS","CLAUDE_SUBSCRIPTION_CONNECT","CLAUDE_SUBSCRIPTION_STATUS","CLAUDE_SUBSCRIPTION_DISCONNECT"]},{id:"tags:manage",label:"Manage tags",description:"Create, assign, and delete organization tags",section:"Organization",tools:["TAGS_LIST","TAGS_CREATE","TAGS_DELETE","MEMBER_TAGS_GET","MEMBER_TAGS_SET"]},{id:"registry:manage",label:"Manage registry",description:"Browse, publish, and manage items in the registry",section:"Store & Registry",tools:["COLLECTION_REGISTRY_APP_LIST","COLLECTION_REGISTRY_APP_GET","COLLECTION_REGISTRY_APP_VERSIONS","COLLECTION_REGISTRY_APP_FILTERS","REGISTRY_ITEM_LIST","REGISTRY_ITEM_SEARCH","REGISTRY_ITEM_GET","REGISTRY_ITEM_VERSIONS","REGISTRY_ITEM_FILTERS","REGISTRY_DISCOVER_TOOLS","REGISTRY_ITEM_CREATE","REGISTRY_ITEM_BULK_CREATE","REGISTRY_ITEM_UPDATE","REGISTRY_ITEM_DELETE","REGISTRY_AI_GENERATE","REGISTRY_PUBLISH_REQUEST_LIST","REGISTRY_PUBLISH_REQUEST_REVIEW","REGISTRY_PUBLISH_REQUEST_COUNT","REGISTRY_PUBLISH_REQUEST_DELETE","REGISTRY_PUBLISH_API_KEY_GENERATE","REGISTRY_PUBLISH_API_KEY_LIST","REGISTRY_PUBLISH_API_KEY_REVOKE"],dangerous:!0},{id:"registry:monitor",label:"Monitor registry health",description:"Run health checks on registry connections and view results",section:"Store & Registry",tools:["REGISTRY_MONITOR_RUN_START","REGISTRY_MONITOR_RUN_LIST","REGISTRY_MONITOR_RUN_GET","REGISTRY_MONITOR_RUN_CANCEL","REGISTRY_MONITOR_RESULT_LIST","REGISTRY_MONITOR_CONNECTION_LIST","REGISTRY_MONITOR_CONNECTION_SYNC","REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH"]},{id:"api-keys:manage",label:"Manage API keys",description:"Create, update, and revoke API keys",section:"Developer",tools:["API_KEY_CREATE","API_KEY_LIST","API_KEY_UPDATE","API_KEY_DELETE"]},{id:"storage:delete",label:"Delete from storage",description:"Permanently delete files from object storage",section:"Developer",tools:["DELETE_OBJECT","DELETE_OBJECTS"],dangerous:!0},{id:"connections:sql",label:"Run SQL queries",description:"Execute raw SQL against connected databases",section:"Developer",tools:["DATABASES_RUN_SQL"],dangerous:!0}];[...He.find(t=>t.id===$e)?.tools??[]];const ss=["agents:manage","connections:manage"];new Set(He.filter(t=>ss.includes(t.id)).flatMap(t=>t.tools));function ls(){const t=new Map;for(const e of He){if(e.id===$e)continue;const l=t.get(e.section)??[];l.push(e),t.set(e.section,l)}return Array.from(t.entries()).map(([e,l])=>({section:e,capabilities:l}))}function os(t,e,l){return l?!0:t.tools.every(r=>e.includes(r))}function ns(t,e,l){if(l){const n=new Set(e);for(const o of t.tools)n.add(o);return Array.from(n)}const r=new Set(e);for(const n of t.tools)r.delete(n);return Array.from(r)}function is(t){const e=X.c(21),{connection:l,isSelected:r,hasToolsEnabled:n,activeToolsCount:o,totalToolsCount:c,onSelect:u,onToggle:f}=t,d=r?"bg-accent/50":"hover:bg-muted/50";let T;e[0]!==d?(T=Z("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",d),e[0]=d,e[1]=T):T=e[1];let a;e[2]!==l.icon||e[3]!==l.title?(a=s.jsx(Fe,{icon:l.icon,name:l.title,size:"xs"}),e[2]=l.icon,e[3]=l.title,e[4]=a):a=e[4];let g;e[5]!==l.title?(g=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:l.title})}),e[5]=l.title,e[6]=g):g=e[6];let _;e[7]!==u||e[8]!==a||e[9]!==g?(_=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:u,children:[a,g]}),e[7]=u,e[8]=a,e[9]=g,e[10]=_):_=e[10];let m;e[11]!==o||e[12]!==l.tools||e[13]!==n||e[14]!==f||e[15]!==c?(m=l.tools&&l.tools.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[o,"/",c]}),s.jsx(Qe,{checked:n,onCheckedChange:f,onClick:rs})]}),e[11]=o,e[12]=l.tools,e[13]=n,e[14]=f,e[15]=c,e[16]=m):m=e[16];let h;return e[17]!==T||e[18]!==_||e[19]!==m?(h=s.jsxs("div",{className:T,children:[_,m]}),e[17]=T,e[18]=_,e[19]=m,e[20]=h):h=e[20],h}function rs(t){return t.stopPropagation()}function as(t){const e=X.c(18),{connectionId:l,tool:r,isSelected:n,onToggle:o}=t,c=`tool-${l}-${r.name}`,u=n?"text-foreground":"text-muted-foreground";let f;e[0]!==u?(f=Z("text-sm font-medium",u),e[0]=u,e[1]=f):f=e[1];let d;e[2]!==f||e[3]!==r.name?(d=s.jsx("div",{className:"flex items-center gap-2 mb-1",children:s.jsx("span",{className:f,children:r.name})}),e[2]=f,e[3]=r.name,e[4]=d):d=e[4];let T;e[5]!==r.description?(T=r.description&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:r.description}),e[5]=r.description,e[6]=T):T=e[6];let a;e[7]!==d||e[8]!==T?(a=s.jsxs("div",{className:"flex-1 min-w-0",children:[d,T]}),e[7]=d,e[8]=T,e[9]=a):a=e[9];const g=`tool-${l}-${r.name}`;let _;e[10]!==n||e[11]!==o||e[12]!==g?(_=s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(Qe,{id:g,checked:n,onCheckedChange:o,onClick:cs})}),e[10]=n,e[11]=o,e[12]=g,e[13]=_):_=e[13];let m;return e[14]!==c||e[15]!==a||e[16]!==_?(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:c,children:[a,_]}),e[14]=c,e[15]=a,e[16]=_,e[17]=m):m=e[17],m}function cs(t){return t.stopPropagation()}function ds({toolSet:t,onToolSetChange:e,excludeVirtualMcpId:l,searchQuery:r}){const n=ie(),[o,c]=Q.useState(""),u=r!==void 0?r:o,f=Q.useDeferredValue(u),[d,T]=Q.useState("all"),[a,g]=Q.useState(!1),_=Q.useRef(new Set(Object.keys(t))),{org:m}=Ge(),h=Qt({connectionId:$t,orgId:m.id,orgSlug:m.slug}),O=100,R=f.trim(),p=R?{operator:"or",conditions:[{field:["title"],operator:"contains",value:R},{field:["description"],operator:"contains",value:R}]}:void 0,C=!!l,A={...p&&{where:p},orderBy:[{field:["updated_at"],direction:"asc"}],limit:O,offset:0,...C&&{include_virtual:!0}},M=JSON.stringify(A),{data:S,fetchNextPage:b,hasNextPage:D,isFetchingNextPage:I}=Ft({queryKey:de.collectionListInfinite(h,m.id,"","CONNECTIONS",M),queryFn:async({pageParam:E=0})=>(await h.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...p&&{where:p},orderBy:[{field:["updated_at"],direction:"asc"}],limit:O,offset:E,...C&&{include_virtual:!0}}})).structuredContent,initialPageParam:0,getNextPageParam:(E,w)=>{if(E?.hasMore)return w.reduce((H,q)=>H+(q?.items?.length??0),0)},staleTime:3e4}),N=S?.pages.flatMap(E=>E?.items??[])??[],P=Kt(b,D??!1,I),i=l?N.filter(E=>E.connection_type!=="VIRTUAL"?!0:qt(E.connection_url)!==l):N,x=_.current,U=[...x.values()].map(E=>i.find(w=>w.id===E)).filter(E=>E!==void 0),G=i.filter(E=>!x.has(E.id)),Y=[...U,...G],v=E=>{const w=t[E];return w!==void 0&&w.length>0},K=Y.filter(E=>{if(d==="all")return!0;const w=v(E.id);return d==="selected"?w:d==="unselected"?!w:!0}),[L,z]=Q.useState(Y[0]?.id??null),V=L?Y.find(E=>E.id===L)??null:null,{data:k,isFetching:B}=Ve({queryKey:de.collectionItem(h,m.id,"","CONNECTIONS",L??""),queryFn:async()=>L?(await h.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:L}})).structuredContent?.item??null:null,enabled:!!L,staleTime:3e4}),$=k?.tools??[],J=(E,w)=>t[E]?.includes(w)??!1,te=(E,w)=>{const H=t[E]??[],q=H.includes(w),se={...t};if(q){const le=H.filter(ne=>ne!==w);le.length===0?delete se[E]:se[E]=le}else se[E]=[...H,w];e(se)},oe=E=>{const w=E===L?$:[];if(!w.length)return;const H=t[E]??[],q=w.map(ne=>ne.name),se=H.length>0&&q.every(ne=>H.includes(ne)),le={...t};se?delete le[E]:(le[E]=q,z(E)),e(le)},F=E=>{z(E),g(!0)},W=()=>{g(!1)};return s.jsxs("div",{className:"flex h-full",children:[s.jsxs("div",{className:Z("w-full md:w-80 border-r border-border flex flex-col",a&&"hidden md:flex"),children:[r===void 0&&s.jsx(Ht,{value:o,onChange:c,placeholder:n("common.toolSetSelector.searchPlaceholder")}),s.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[s.jsx("button",{onClick:()=>T("all"),className:Z("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",d==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:n("common.toolSetSelector.filterAll")}),s.jsx("button",{onClick:()=>T("selected"),className:Z("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",d==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:n("common.toolSetSelector.filterSelected")}),s.jsx("button",{onClick:()=>T("unselected"),className:Z("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",d==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:n("common.toolSetSelector.filterUnselected")})]}),s.jsx("div",{className:"flex-1 overflow-auto",children:K.length===0?s.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:n(u?"common.toolSetSelector.noConnectionsFound":d==="selected"?"common.toolSetSelector.noServersSelected":d==="unselected"?"common.toolSetSelector.noUnselectedServers":"common.toolSetSelector.noConnectionsAvailable")}):s.jsxs("div",{className:"p-2 space-y-1",children:[K.map(E=>{const w=L===E.id,H=w?$.length:0,q=t[E.id]?.length??0;return s.jsx(is,{connection:{...E,tools:w?$:E.tools},isSelected:w,hasToolsEnabled:v(E.id),activeToolsCount:q,totalToolsCount:H,onSelect:()=>F(E.id),onToggle:()=>oe(E.id)},E.id)}),s.jsx("div",{ref:P,className:"h-4"}),I&&s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(Oe,{className:"size-4.5 text-muted-foreground"})})]})})]}),s.jsx("div",{className:Z("flex-1 flex-col",a?"flex":"hidden md:flex"),children:V?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[s.jsx(ae,{variant:"ghost",size:"sm",onClick:W,className:"h-8 w-8 p-0 shrink-0",children:s.jsx(zt,{size:20})}),s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx(Fe,{icon:V.icon,name:V.title,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:V.title}),V.description&&s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:V.description})]})]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:B?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Oe,{className:"size-4.5 text-muted-foreground"})}):$.length===0?s.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:n("common.toolSetSelector.noToolsAvailable")}):s.jsx("div",{className:"space-y-2",children:$.map(E=>s.jsx(as,{connectionId:V.id,tool:E,isSelected:J(V.id,E.name),onToggle:()=>te(V.id,E.name)},E.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:n("common.toolSetSelector.selectConnection")})})})]})}const ms=qe({role:qe({id:re().optional(),slug:re().optional(),label:re()}),allowAllStaticPermissions:Je(),staticPermissions:we(re()),toolSet:Ze(re(),we(re())),allowAllModels:Je(),modelSet:Ze(re(),we(re())),memberIds:we(re())});function lt(t,e,l,r){const n=s.jsx(je,{checked:e,disabled:l,onCheckedChange:r});return l?s.jsx(Me,{children:s.jsxs(De,{children:[s.jsx(Pe,{asChild:!0,children:s.jsx("div",{children:n})}),s.jsx(ve,{children:s.jsx("p",{children:t("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):n}function us(t){const e=X.c(41),{allowAllStaticPermissions:l,staticPermissions:r,onAllowAllChange:n,onPermissionsChange:o,readOnly:c,searchQuery:u}=t,f=c===void 0?!1:c,d=ie();let T;e[0]!==u?(T=u.trim().toLowerCase(),e[0]=u,e[1]=T):T=e[1];const a=Q.useDeferredValue(T);let g;if(e[2]!==l||e[3]!==a||e[4]!==n||e[5]!==o||e[6]!==f||e[7]!==u||e[8]!==r||e[9]!==d){const _=ls(),m=(I,N)=>{if(!f){if(l&&N){const P=_.flatMap(Ts).flatMap(gs);n(!1),o(P.filter(i=>!I.tools.includes(i)));return}l||o(ns(I,r,!N))}};let h;e[11]!==a?(h=I=>{const{section:N,capabilities:P}=I;return{section:N,capabilities:P.filter(i=>!a||i.label.toLowerCase().includes(a)||i.description.toLowerCase().includes(a))}},e[11]=a,e[12]=h):h=e[12];const O=_.map(h).filter(fs);let R;e[13]!==d?(R=d("settings.orgRoleDetail.general"),e[13]=d,e[14]=R):R=e[14];let p;e[15]!==d?(p=d("settings.orgRoleDetail.allOrgPermissions"),e[15]=d,e[16]=p):p=e[16];let C;e[17]!==d?(C=d("settings.orgRoleDetail.grantFullAccessToAllFeaturesBelow"),e[17]=d,e[18]=C):C=e[18];let A;e[19]!==l||e[20]!==n||e[21]!==o?(A=()=>{n(!l),o([])},e[19]=l,e[20]=n,e[21]=o,e[22]=A):A=e[22];let M;e[23]!==l||e[24]!==f||e[25]!==d||e[26]!==A?(M=lt(d,l,f,A),e[23]=l,e[24]=f,e[25]=d,e[26]=A,e[27]=M):M=e[27];let S;e[28]!==l||e[29]!==n||e[30]!==o||e[31]!==f?(S=f?void 0:()=>{n(!l),o([])},e[28]=l,e[29]=n,e[30]=o,e[31]=f,e[32]=S):S=e[32];let b;e[33]!==S||e[34]!==p||e[35]!==C||e[36]!==M?(b=s.jsx(Xe,{children:s.jsx(et,{title:p,description:C,action:M,onClick:S})}),e[33]=S,e[34]=p,e[35]=C,e[36]=M,e[37]=b):b=e[37];let D;e[38]!==b||e[39]!==R?(D=s.jsx(We,{title:R,children:b}),e[38]=b,e[39]=R,e[40]=D):D=e[40],g=s.jsx("div",{children:s.jsxs("div",{className:"flex flex-col gap-10 py-4",children:[D,O.length===0&&a?s.jsx("p",{className:"text-sm text-muted-foreground py-4",children:d("settings.orgRoleDetail.noPermissionsMatch",{searchQuery:u})}):O.map(I=>{const{section:N,capabilities:P}=I;return s.jsx(We,{title:N,children:s.jsx(Xe,{children:P.map(i=>{const x=os(i,r,l);return s.jsx(et,{title:s.jsxs("span",{className:"flex items-center gap-1.5",children:[i.label,i.dangerous&&s.jsx(jt,{size:12,className:"text-warning shrink-0"})]}),description:i.description,action:lt(d,x,f,()=>m(i,x)),onClick:f?void 0:()=>m(i,x)},i.id)})})},N)})]})}),e[2]=l,e[3]=a,e[4]=n,e[5]=o,e[6]=f,e[7]=u,e[8]=r,e[9]=d,e[10]=g}else g=e[10];return g}function fs(t){return t.capabilities.length>0}function gs(t){return t.tools}function Ts(t){return t.capabilities}const St={anthropic:"Anthropic",openrouter:"OpenRouter"},_s={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 hs(t,e){const l=t.indexOf("/"),r=l>0?t.slice(0,l):e;return r.startsWith("~")?r.slice(1):r}function Es(t){return _s[t]??St[t]??t}function Is(t){const e=t.indexOf(": ");return e>0&&e<32?t.slice(e+2):t}const At=30;function xs(t){const e=X.c(40),{connectionId:l,subProviderId:r,subProviderName:n,groupLogo:o,models:c,allConnectionModelIds:u,selectedModels:f,allowAllModels:d,allConnectionModelsSelected:T,onToggleModel:a,onExitAllowAll:g,readOnly:_,defaultExpanded:m}=t,h=ie(),[O,R]=Q.useState(m),p=m||O,C=R,[A,M]=Q.useState(At);let S;e[0]!==T||e[1]!==d||e[2]!==f?(S=I=>d||T||f.includes("*")||f.includes(I),e[0]=T,e[1]=d,e[2]=f,e[3]=S):S=e[3];const b=S;let D;if(e[4]!==u||e[5]!==d||e[6]!==l||e[7]!==p||e[8]!==o||e[9]!==b||e[10]!==c||e[11]!==g||e[12]!==a||e[13]!==_||e[14]!==r||e[15]!==n||e[16]!==h||e[17]!==A){let I;e[19]!==b?(I=B=>b(B.id),e[19]=b,e[20]=I):I=e[20];const N=c.filter(I).length,P=c.slice(0,A),i=c.length>A;let x;e[21]===Symbol.for("react.memo_cache_sentinel")?(x=()=>C(As),e[21]=x):x=e[21];const U=o??Et[r]??It;let G;e[22]!==n||e[23]!==U?(G=s.jsx(Fe,{icon:U,name:n,size:"sm"}),e[22]=n,e[23]=U,e[24]=G):G=e[24];let Y;e[25]!==n?(Y=s.jsx("span",{className:"text-sm font-medium truncate",children:n}),e[25]=n,e[26]=Y):Y=e[26];let v;e[27]!==G||e[28]!==Y?(v=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[G,Y]}),e[27]=G,e[28]=Y,e[29]=v):v=e[29];const K=h("settings.orgRoleDetail.enabledCount",{enabledCount:N,total:c.length});let L;e[30]!==K?(L=s.jsx(be,{variant:"secondary",className:"text-xs text-muted-foreground",children:K}),e[30]=K,e[31]=L):L=e[31];let z;e[32]!==p?(z=p?s.jsx(Xt,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx(es,{size:16,className:"text-muted-foreground shrink-0"}),e[32]=p,e[33]=z):z=e[33];let V;e[34]!==L||e[35]!==z?(V=s.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[L,z]}),e[34]=L,e[35]=z,e[36]=V):V=e[36];let k;e[37]!==V||e[38]!==v?(k=s.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3 hover:bg-muted/50 cursor-pointer",onClick:x,children:[v,V]}),e[37]=V,e[38]=v,e[39]=k):k=e[39],D=s.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[k,p&&s.jsxs("div",{className:"border-t border-border bg-muted/20",children:[P.map(B=>{const $=b(B.id),J=()=>{if(!_){if(d){g(l,u,B.id);return}a(l,B.id)}};return s.jsxs("div",{className:Z("flex items-center justify-between gap-3 px-4 py-3 border-b border-border last:border-b-0",!_&&"hover:bg-muted/50 cursor-pointer"),onClick:J,children:[s.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s.jsx("span",{className:"text-sm truncate",children:B.title})}),s.jsx("div",{onClick:Ss,children:_?s.jsx(Me,{children:s.jsxs(De,{children:[s.jsx(Pe,{asChild:!0,children:s.jsx("div",{children:s.jsx(je,{checked:$,disabled:!0,onCheckedChange:Rs})})}),s.jsx(ve,{children:s.jsx("p",{children:h("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(je,{checked:$,onCheckedChange:J})})]},B.id)}),i&&s.jsx("button",{type:"button",className:"w-full px-4 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:()=>M(ps),children:h("settings.orgRoleDetail.showMore",{remaining:c.length-A})})]})]}),e[4]=u,e[5]=d,e[6]=l,e[7]=p,e[8]=o,e[9]=b,e[10]=c,e[11]=g,e[12]=a,e[13]=_,e[14]=r,e[15]=n,e[16]=h,e[17]=A,e[18]=D}else D=e[18];return D}function ps(t){return t+At}function Rs(){}function Ss(t){return t.stopPropagation()}function As(t){return!t}function Ns(t){const e=X.c(33),{connection:l,selectedModels:r,allowAllModels:n,onToggleModel:o,onExitAllowAll:c,allConnectionModelsSelected:u,searchQuery:f,readOnly:d}=t,T=Wt(l.id);let a,g,_,m,h;if(e[0]!==u||e[1]!==n||e[2]!==l.id||e[3]!==l.label||e[4]!==l.providerId||e[5]!==c||e[6]!==o||e[7]!==T||e[8]!==d||e[9]!==f||e[10]!==r){h=Symbol.for("react.early_return_sentinel");e:{let p;e[16]!==l.label?(p=x=>({...x,id:x.modelId,provider:l.label}),e[16]=l.label,e[17]=p):p=e[17];const C=T.filter(js).map(p),A=f.trim().toLowerCase(),M=A?C.filter(x=>x.title.toLowerCase().includes(A)||x.id.toLowerCase().includes(A)||x.provider?.toLowerCase().includes(A)):C;if(M.length===0){h=null;break e}const S=new Map;for(const x of M){const U=hs(x.id,l.providerId),G=S.get(U)??{models:[],logo:null};G.models.push({id:x.id,title:Is(x.title),logo:x.logo}),!G.logo&&x.logo&&(G.logo=x.logo),S.set(U,G)}const b=Array.from(S.entries()).map(bs).sort(Cs),D=b.length===1||A.length>0;_="flex flex-col gap-3";const I=Et[l.providerId]??It;let N;e[18]!==l.providerId||e[19]!==I?(N=s.jsx("img",{src:I,alt:l.providerId,className:"w-4 h-4 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),e[18]=l.providerId,e[19]=I,e[20]=N):N=e[20];const P=St[l.providerId]??l.providerId;let i;e[21]!==P?(i=s.jsx("h4",{className:"text-sm font-medium",children:P}),e[21]=P,e[22]=i):i=e[22],e[23]!==i||e[24]!==N?(m=s.jsxs("div",{className:"flex items-center gap-2",children:[N,i]}),e[23]=i,e[24]=N,e[25]=m):m=e[25],a="flex flex-col gap-3",g=b.map(x=>s.jsx(xs,{connectionId:l.id,subProviderId:x.id,subProviderName:x.name,groupLogo:x.logo,models:x.models,allConnectionModelIds:C.map(Os),selectedModels:r,allowAllModels:n,allConnectionModelsSelected:u,onToggleModel:o,onExitAllowAll:c,readOnly:d,defaultExpanded:D},x.id))}e[0]=u,e[1]=n,e[2]=l.id,e[3]=l.label,e[4]=l.providerId,e[5]=c,e[6]=o,e[7]=T,e[8]=d,e[9]=f,e[10]=r,e[11]=a,e[12]=g,e[13]=_,e[14]=m,e[15]=h}else a=e[11],g=e[12],_=e[13],m=e[14],h=e[15];if(h!==Symbol.for("react.early_return_sentinel"))return h;let O;e[26]!==a||e[27]!==g?(O=s.jsx("div",{className:a,children:g}),e[26]=a,e[27]=g,e[28]=O):O=e[28];let R;return e[29]!==_||e[30]!==m||e[31]!==O?(R=s.jsxs("div",{className:_,children:[m,O]}),e[29]=_,e[30]=m,e[31]=O,e[32]=R):R=e[32],R}function Os(t){return t.id}function Cs(t,e){return t.name.localeCompare(e.name)}function bs(t){const[e,l]=t;return{id:e,name:Es(e),logo:l.logo,models:l.models}}function js(t,e,l){return l.findIndex(r=>r.modelId===t.modelId)===e}function Ms(t){const e=X.c(41),{allowAllModels:l,modelSet:r,onAllowAllChange:n,onModelSetChange:o,readOnly:c,searchQuery:u}=t,f=c===void 0?!1:c,d=ie(),T=Q.useDeferredValue(u),a=Jt();let g;e[0]!==r||e[1]!==o?(g=(I,N)=>{const P=r[I]??[],i={...r};if(P.includes(N)){const x=P.filter(U=>U!==N);x.length===0?delete i[I]:i[I]=x}else i[I]=[...P,N];o(i)},e[0]=r,e[1]=o,e[2]=g):g=e[2];const _=g;let m;e[3]!==r||e[4]!==n||e[5]!==o?(m=(I,N,P)=>{n(!1),o({...r,[I]:N.filter(i=>i!==P)})},e[3]=r,e[4]=n,e[5]=o,e[6]=m):m=e[6];const h=m,O=!f&&"hover:bg-muted/50 cursor-pointer";let R;e[7]!==O?(R=Z("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",O),e[7]=O,e[8]=R):R=e[8];let p;e[9]!==l||e[10]!==n||e[11]!==o||e[12]!==f?(p=()=>{if(f)return;const I=!l;n(I),I&&o({})},e[9]=l,e[10]=n,e[11]=o,e[12]=f,e[13]=p):p=e[13];let C;e[14]!==d?(C=d("settings.orgRoleDetail.allModels"),e[14]=d,e[15]=C):C=e[15];let A;e[16]!==C?(A=s.jsx("span",{className:"text-sm font-medium",children:C}),e[16]=C,e[17]=A):A=e[17];let M;e[18]!==l||e[19]!==n||e[20]!==o||e[21]!==f||e[22]!==d?(M=s.jsx("div",{onClick:Ps,children:f?s.jsx(Me,{children:s.jsxs(De,{children:[s.jsx(Pe,{asChild:!0,children:s.jsx("div",{children:s.jsx(je,{checked:l,disabled:!0,onCheckedChange:Ds})})}),s.jsx(ve,{children:s.jsx("p",{children:d("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(je,{checked:l,onCheckedChange:I=>{n(I),I&&o({})}})}),e[18]=l,e[19]=n,e[20]=o,e[21]=f,e[22]=d,e[23]=M):M=e[23];let S;e[24]!==R||e[25]!==p||e[26]!==A||e[27]!==M?(S=s.jsxs("div",{className:R,onClick:p,children:[A,M]}),e[24]=R,e[25]=p,e[26]=A,e[27]=M,e[28]=S):S=e[28];let b;e[29]!==a||e[30]!==l||e[31]!==T||e[32]!==h||e[33]!==r||e[34]!==f||e[35]!==d||e[36]!==_?(b=a.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:d("settings.orgRoleDetail.noLlmConnectionsConfigured")}):a.map(I=>s.jsx(Q.Suspense,{fallback:s.jsxs("div",{className:"px-4 py-3 flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(Oe,{className:"size-4"}),d("settings.orgRoleDetail.loadingModels")]}),children:s.jsx(Ns,{connection:I,selectedModels:r[I.id]??[],allowAllModels:l,onToggleModel:_,onExitAllowAll:h,allConnectionModelsSelected:(r[I.id]??[]).includes("*"),searchQuery:T,readOnly:f})},I.id)),e[29]=a,e[30]=l,e[31]=T,e[32]=h,e[33]=r,e[34]=f,e[35]=d,e[36]=_,e[37]=b):b=e[37];let D;return e[38]!==S||e[39]!==b?(D=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 pb-6",children:[S,b]}),e[38]=S,e[39]=b,e[40]=D):D=e[40],D}function Ds(){}function Ps(t){return t.stopPropagation()}function vs(t){const e=X.c(75),{open:l,onOpenChange:r,selectedMemberIds:n,onAddMembers:o}=t,c=ie(),[u,f]=Q.useState(""),d=Q.useDeferredValue(u);let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=[],e[0]=T):T=e[0];const[a,g]=Q.useState(T),{data:_}=xt();let m,h,O,R,p,C,A,M,S,b,D;if(e[1]!==_?.data?.members||e[2]!==d||e[3]!==o||e[4]!==r||e[5]!==l||e[6]!==a||e[7]!==u||e[8]!==n||e[9]!==c){const L=_?.data?.members??[];let z;e[21]!==d?(z=F=>{const W=d.toLowerCase();return F.user?.name?.toLowerCase().includes(W)||F.user?.email?.toLowerCase().includes(W)},e[21]=d,e[22]=z):z=e[22];const V=L.filter(z);let k;e[23]!==o||e[24]!==r||e[25]!==a?(k=()=>{o(a),g([]),r(!1)},e[23]=o,e[24]=r,e[25]=a,e[26]=k):k=e[26],O=k,h=dt,b=l,D=r,m=mt,M="sm:max-w-md p-0";let B;e[27]!==c?(B=c("settings.orgRoleDetail.addMembersToRole"),e[27]=c,e[28]=B):B=e[28];let $;e[29]!==B?($=s.jsx(ut,{children:B}),e[29]=B,e[30]=$):$=e[30];let J;e[31]!==c?(J=c("settings.orgRoleDetail.selectMembersToAddToThisRole"),e[31]=c,e[32]=J):J=e[32];let te;e[33]!==J?(te=s.jsx(ft,{children:J}),e[33]=J,e[34]=te):te=e[34],e[35]!==$||e[36]!==te?(S=s.jsxs(gt,{className:"px-6 pt-6",children:[$,te]}),e[35]=$,e[36]=te,e[37]=S):S=e[37],C="flex flex-col h-80";let oe;e[38]!==c?(oe=c("settings.orgRoleDetail.searchMembers"),e[38]=c,e[39]=oe):oe=e[39],e[40]!==u||e[41]!==oe?(A=s.jsx("div",{className:"border-b border-border px-4 py-3",children:s.jsx(ze,{value:u,onChange:f,placeholder:oe,className:"w-full"})}),e[40]=u,e[41]=oe,e[42]=A):A=e[42],R="flex-1 overflow-auto",p=V.length===0?s.jsx("div",{className:"flex items-center justify-center h-full px-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:c(u?"settings.orgRoleDetail.noMembersFound":"settings.orgRoleDetail.noMembersAvailable")})}):s.jsx("div",{className:"px-6 py-2 space-y-1",children:V.map(F=>{const W=F.role!=="owner",E=n.includes(F.id),w=a.includes(F.id);return s.jsxs("label",{className:Z("flex items-center gap-3 p-2 rounded-lg",!W||E?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-muted/50"),children:[s.jsx(Qe,{checked:w||E,onCheckedChange:()=>{!W||E||g(H=>H.includes(F.id)?H.filter(q=>q!==F.id):[...H,F.id])},disabled:!W||E}),s.jsx(Rt,{url:F.user?.image??void 0,fallback:pt(F.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:F.user?.name||c("settings.orgRoleDetail.unknown")}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:F.user?.email})]}),!W&&s.jsx(be,{variant:"secondary",className:"shrink-0",children:c("settings.orgRoleDetail.owner")}),E&&W&&s.jsx(be,{variant:"outline",className:"shrink-0",children:c("settings.orgRoleDetail.added")})]},F.id)})}),e[1]=_?.data?.members,e[2]=d,e[3]=o,e[4]=r,e[5]=l,e[6]=a,e[7]=u,e[8]=n,e[9]=c,e[10]=m,e[11]=h,e[12]=O,e[13]=R,e[14]=p,e[15]=C,e[16]=A,e[17]=M,e[18]=S,e[19]=b,e[20]=D}else m=e[10],h=e[11],O=e[12],R=e[13],p=e[14],C=e[15],A=e[16],M=e[17],S=e[18],b=e[19],D=e[20];let I;e[43]!==R||e[44]!==p?(I=s.jsx("div",{className:R,children:p}),e[43]=R,e[44]=p,e[45]=I):I=e[45];let N;e[46]!==I||e[47]!==C||e[48]!==A?(N=s.jsxs("div",{className:C,children:[A,I]}),e[46]=I,e[47]=C,e[48]=A,e[49]=N):N=e[49];let P;e[50]!==c?(P=c("settings.orgRoleDetail.cancel"),e[50]=c,e[51]=P):P=e[51];let i;e[52]!==P?(i=s.jsx(Tt,{children:P}),e[52]=P,e[53]=i):i=e[53];const x=a.length===0;let U;e[54]!==a.length||e[55]!==c?(U=c("settings.orgRoleDetail.addWithCount",{count:a.length}),e[54]=a.length,e[55]=c,e[56]=U):U=e[56];let G;e[57]!==O||e[58]!==x||e[59]!==U?(G=s.jsx(_t,{onClick:O,disabled:x,children:U}),e[57]=O,e[58]=x,e[59]=U,e[60]=G):G=e[60];let Y;e[61]!==i||e[62]!==G?(Y=s.jsxs(ht,{className:"px-6 pb-6",children:[i,G]}),e[61]=i,e[62]=G,e[63]=Y):Y=e[63];let v;e[64]!==m||e[65]!==N||e[66]!==Y||e[67]!==M||e[68]!==S?(v=s.jsxs(m,{className:M,children:[S,N,Y]}),e[64]=m,e[65]=N,e[66]=Y,e[67]=M,e[68]=S,e[69]=v):v=e[69];let K;return e[70]!==h||e[71]!==v||e[72]!==b||e[73]!==D?(K=s.jsx(h,{open:b,onOpenChange:D,children:v}),e[70]=h,e[71]=v,e[72]=b,e[73]=D,e[74]=K):K=e[74],K}function Ls(t){const e=X.c(33),{memberIds:l,onMemberIdsChange:r,readOnly:n,readOnlyMessage:o,searchQuery:c,addMemberDialogOpen:u,onAddMemberDialogOpenChange:f}=t,d=n===void 0?!1:n,T=o===void 0?void 0:o,a=ie(),g=Q.useDeferredValue(c),{data:_}=xt();let m,h,O;if(e[0]!==_?.data?.members||e[1]!==g||e[2]!==l||e[3]!==r||e[4]!==d||e[5]!==T||e[6]!==c||e[7]!==a){const M=_?.data?.members??[];let S;e[11]!==l?(S=i=>l.includes(i.id),e[11]=l,e[12]=S):S=e[12];const b=M.filter(S);let D;e[13]!==g?(D=i=>{const x=g.toLowerCase();return i.user?.name?.toLowerCase().includes(x)||i.user?.email?.toLowerCase().includes(x)},e[13]=g,e[14]=D):D=e[14];const I=b.filter(D);let N;e[15]!==T||e[16]!==a?(N=T??a("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),e[15]=T,e[16]=a,e[17]=N):N=e[17];const P=N;O="flex flex-col h-full",m="flex-1 overflow-auto",h=b.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-base font-medium mb-1",children:a("settings.orgRoleDetail.noMembers")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:a("settings.orgRoleDetail.addMembersToGrantPermissions")})]})}):I.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:a("settings.orgRoleDetail.noMembersMatch",{searchQuery:c})})}):s.jsx("div",{className:"p-4 space-y-2",children:I.map(i=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/30",children:[s.jsx(Rt,{url:i.user?.image??void 0,fallback:pt(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||a("settings.orgRoleDetail.unknown")}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:i.user?.email})]}),d?s.jsx(Me,{children:s.jsxs(De,{children:[s.jsx(Pe,{asChild:!0,children:s.jsx("div",{children:s.jsx(ae,{variant:"ghost",size:"sm",disabled:!0,"aria-label":a("settings.orgRoleDetail.removeMember",{name:i.user?.name||a("settings.orgRoleDetail.unknown")}),children:s.jsx(tt,{size:16})})})}),s.jsx(ve,{children:s.jsx("p",{children:P})})]})}):s.jsx(ae,{variant:"ghost",size:"sm","aria-label":a("settings.orgRoleDetail.removeMember",{name:i.user?.name||a("settings.orgRoleDetail.unknown")}),onClick:()=>r(l.filter(x=>x!==i.id)),children:s.jsx(tt,{size:16})})]},i.id))}),e[0]=_?.data?.members,e[1]=g,e[2]=l,e[3]=r,e[4]=d,e[5]=T,e[6]=c,e[7]=a,e[8]=m,e[9]=h,e[10]=O}else m=e[8],h=e[9],O=e[10];let R;e[18]!==m||e[19]!==h?(R=s.jsx("div",{className:m,children:h}),e[18]=m,e[19]=h,e[20]=R):R=e[20];let p;e[21]!==l||e[22]!==r?(p=M=>r([...l,...M]),e[21]=l,e[22]=r,e[23]=p):p=e[23];let C;e[24]!==u||e[25]!==l||e[26]!==f||e[27]!==p?(C=s.jsx(vs,{open:u,onOpenChange:f,selectedMemberIds:l,onAddMembers:p}),e[24]=u,e[25]=l,e[26]=f,e[27]=p,e[28]=C):C=e[28];let A;return e[29]!==O||e[30]!==R||e[31]!==C?(A=s.jsxs("div",{className:O,children:[R,C]}),e[29]=O,e[30]=R,e[31]=C,e[32]=A):A=e[32],A}function ys(t){const e=X.c(3);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Oe,{className:"size-6 text-muted-foreground"})}),e[0]=l):l=e[0];let r;return e[1]!==t?(r=s.jsx(Q.Suspense,{fallback:l,children:s.jsx(Ls,{...t})}),e[1]=t,e[2]=r):r=e[2],r}const ws={owner:[],admin:[],user:[]};function Gs(t,e,l,r){const n=t==="owner"||t==="admin";return{role:{id:l?.id,slug:t,label:t.charAt(0).toUpperCase()+t.slice(1)},allowAllStaticPermissions:n,staticPermissions:ws[t],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:e.filter(o=>o.role===t).map(o=>o.id)}}function Us(t,e,l){const r=t.permission||{},n=r.self||[],o=n.includes("*"),c=o?[]:n.filter(a=>a!=="*"),u={};for(const[a,g]of Object.entries(r))if(!(a==="self"||a==="models"))if(a==="*")for(const _ of l)u[_.id]=g.includes("*")?_.tools?.map(m=>m.name)??[]:g;else{const _=l.find(m=>m.id===a);_&&(u[a]=g.includes("*")?_.tools?.map(m=>m.name)??[]:g)}const f=r.models||[],d=f.length===0||f.includes("*:*"),T={};if(!d)for(const a of f){const g=a.indexOf(":");if(g===-1)continue;const _=a.slice(0,g),m=a.slice(g+1);T[_]||(T[_]=[]),T[_].push(m)}return{role:{id:t.id,slug:t.role,label:t.label},allowAllStaticPermissions:o,staticPermissions:c,toolSet:u,allowAllModels:d,modelSet:T,memberIds:e.filter(a=>a.role===t.role).map(a=>a.id)}}function ks(t,e){const l={};t.allowAllStaticPermissions?l.self=["*"]:t.staticPermissions.length>0&&(l.self=t.staticPermissions);for(const[r,n]of Object.entries(t.toolSet))if(n.length>0){const c=e.find(u=>u.id===r)?.tools?.map(u=>u.name)??[];l[r]=c.length>0&&c.every(u=>n.includes(u))?["*"]:n}if(t.allowAllModels)l.models=["*:*"];else{const r=[];for(const[n,o]of Object.entries(t.modelSet))for(const c of o)r.push(`${n}:${c}`);r.length>0&&(l.models=r)}return l}function Bs(t,e,l){return t.kind==="builtin"?Gs(t.role,e,void 0):t.kind==="custom"?Us(t.role,e,l):{role:{id:void 0,slug:void 0,label:""},allowAllStaticPermissions:!1,staticPermissions:[],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:[]}}function Vs(t){const e=X.c(19),{readOnly:l,readOnlyMessage:r,onOpen:n}=t,o=r===void 0?void 0:r,c=ie();let u;e[0]!==o||e[1]!==c?(u=o??c("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),e[0]=o,e[1]=c,e[2]=u):u=e[2];const f=u;if(l){let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Be,{size:16}),e[3]=g):g=e[3];let _;e[4]!==c?(_=c("settings.orgRoleDetail.addMember"),e[4]=c,e[5]=_):_=e[5];let m;e[6]!==_?(m=s.jsx(Pe,{asChild:!0,children:s.jsx("div",{children:s.jsxs(ae,{variant:"outline",size:"sm",disabled:!0,children:[g,_]})})}),e[6]=_,e[7]=m):m=e[7];let h;e[8]!==f?(h=s.jsx(ve,{children:s.jsx("p",{children:f})}),e[8]=f,e[9]=h):h=e[9];let O;return e[10]!==m||e[11]!==h?(O=s.jsx(Me,{children:s.jsxs(De,{children:[m,h]})}),e[10]=m,e[11]=h,e[12]=O):O=e[12],O}let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Be,{size:16}),e[13]=d):d=e[13];let T;e[14]!==c?(T=c("settings.orgRoleDetail.addMember"),e[14]=c,e[15]=T):T=e[15];let a;return e[16]!==n||e[17]!==T?(a=s.jsxs(ae,{variant:"outline",size:"sm",onClick:n,children:[d,T]}),e[16]=n,e[17]=T,e[18]=a):a=e[18],a}function Ys(t){const e=X.c(14),{locator:l}=Ge(),r=Ke(),n=Zt();let o;e[0]!==l?(o=de.members(l),e[0]=l,e[1]=o):o=e[1];let c;e[2]!==r?(c=()=>r.organization.listMembers(),e[2]=r,e[3]=c):c=e[3];let u;e[4]!==o||e[5]!==c?(u={queryKey:o,queryFn:c},e[4]=o,e[5]=c,e[6]=u):u=e[6];const{data:f,isPending:d}=Ve(u);if(d||!n){let _;return e[7]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Ne,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Oe,{className:"size-8 text-muted-foreground"})})}),e[7]=_):_=e[7],_}let T;e[8]!==f?.data?.members?(T=f?.data?.members??[],e[8]=f?.data?.members,e[9]=T):T=e[9];const a=T;let g;return e[10]!==n||e[11]!==a||e[12]!==t?(g=s.jsx(Ks,{...t,members:a,connections:n}),e[10]=n,e[11]=a,e[12]=t,e[13]=g):g=e[13],g}function Ks({target:t,onBack:e,onSaved:l,members:r,connections:n}){const o=ie(),{locator:c}=Ge(),u=Ke(),f=ot(),d=t.kind==="builtin",T=t.kind==="builtin"&&t.role==="owner",a=t.kind==="new",[g,_]=Q.useState(d?"org":"mcp"),m=Ct({resolver:bt(ms),defaultValues:Bs(t,r,n)}),h=m.formState.isValid,O=m.formState.isDirty,R=nt({mutationFn:async i=>{const x=ks(i,n),U=i.role.slug||i.role.label.toLowerCase().replace(/\s+/g,"-"),G=(i.role.slug==="owner"||i.role.slug==="admin"||i.role.slug==="user")&&!i.role.id,Y=async(v,K)=>{const L=r.filter(k=>k.role===(K??v)).map(k=>k.id),z=i.memberIds.filter(k=>!L.includes(k)),V=L.filter(k=>!i.memberIds.includes(k));for(const k of z){const B=await u.organization.updateMemberRole({memberId:k,role:[v]});if(B?.error)throw new Error(B.error.message??o("settings.orgRoleDetail.somethingWentWrong"))}for(const k of V){const B=await u.organization.updateMemberRole({memberId:k,role:["user"]});if(B?.error)throw new Error(B.error.message??o("settings.orgRoleDetail.somethingWentWrong"))}};if(G)return await Y(i.role.slug),i;if(i.role.id){const v=i.role.label.toLowerCase().replace(/\s+/g,"-"),K=i.role.slug,L=v!==K,z=await u.organization.updateRole({roleId:i.role.id,data:{permission:x,...L?{roleName:v}:{}}});if(z?.error)throw new Error(z.error.message??o("settings.orgRoleDetail.somethingWentWrong"));return await Y(L?v:K,L?K:void 0),L?{...i,role:{...i.role,slug:v}}:i}else{const v=await u.organization.createRole({role:U,permission:x});if(v?.error)throw new Error(v.error.message??o("settings.orgRoleDetail.somethingWentWrong"));for(const K of i.memberIds){const L=await u.organization.updateMemberRole({memberId:K,role:[U]});if(L?.error)throw new Error(L.error.message)}return{...i,role:{...i.role,id:v.data?.roleData?.id,slug:U}}}},onSuccess:(i,x)=>{f.invalidateQueries({queryKey:de.members(c)}),f.invalidateQueries({queryKey:de.organizationRoles(c)});const U=!x.role.id&&!x.role.slug,G=x.role.slug==="owner"&&!x.role.id;Ye(G?"role_members_updated":U?"role_created":"role_updated",{role_slug:x.role.slug??null}),Ce.success(o(G?"settings.orgRoleDetail.membersUpdatedSuccessfully":U?"settings.orgRoleDetail.roleCreatedSuccessfully":"settings.orgRoleDetail.roleUpdatedSuccessfully")),m.reset(i),l(i.role.id)},onError:i=>{Ce.error(i instanceof Error?i.message:o("settings.orgRoleDetail.failedToSaveRole"))}}),p=m.handleSubmit(i=>{if(!i.role.label.trim()){Ce.error(o("settings.orgRoleDetail.roleNameIsRequired")),m.setFocus("role.label");return}R.mutate(i)}),C=!T,A=t.kind==="builtin"?t.role.charAt(0).toUpperCase()+t.role.slice(1):t.kind==="custom"?t.role.label:"",M=[...T?[]:[{id:"mcp",label:o("settings.orgRoleDetail.mcpPermissions")}],{id:"org",label:o("settings.orgRoleDetail.organizationPermissions")},{id:"models",label:o("settings.orgRoleDetail.models")},{id:"members",label:o("settings.orgRoleDetail.members")}],[S,b]=Q.useState(""),[D,I]=Q.useState(!1),N=i=>{_(i),b("")},P={mcp:o("settings.orgRoleDetail.searchMcpServers"),org:o("settings.orgRoleDetail.searchPermissions"),models:o("settings.orgRoleDetail.searchModels"),members:o("settings.orgRoleDetail.searchMembers")};return s.jsx(Ne,{children:s.jsxs(Ne.Content,{className:Z("flex flex-col",g!=="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(Ne.Title,{actions:C&&s.jsxs(s.Fragment,{children:[s.jsx(ae,{variant:"outline",size:"sm",onClick:e,disabled:R.isPending,children:o("settings.orgRoleDetail.cancel")}),s.jsx(ae,{size:"sm",onClick:p,disabled:R.isPending||!h||!O,children:R.isPending?o("settings.orgRoleDetail.saving"):o(a?"settings.orgRoleDetail.createRole":"settings.orgRoleDetail.saveChanges")})]}),children:s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx("div",{className:Z("size-2.5 rounded-full shrink-0",t.kind==="builtin"?ct(t.role,!0):yt(m.watch("role.label")))}),T&&s.jsx(it,{size:16,className:"text-muted-foreground shrink-0"}),a||t.kind==="custom"?s.jsx("input",{...m.register("role.label"),placeholder:o("settings.orgRoleDetail.roleName"),className:"leading-tight text-foreground bg-transparent border-none outline-none px-1 -mx-1 rounded hover:bg-input/25 focus:bg-input/25 transition-colors w-64 placeholder:text-muted-foreground/50",autoFocus:a}):s.jsx("span",{className:"truncate",children:A})]})}),s.jsx("div",{className:"flex items-center gap-2",children:M.map(i=>s.jsx("button",{type:"button",onClick:()=>N(i.id),className:Z("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex items-center",g===i.id?"bg-accent border-border text-foreground":"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:i.label},i.id))}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx(ze,{value:S,onChange:b,placeholder:P[g]??"Search...",className:"w-full md:w-[375px]"}),g==="members"&&s.jsx(Vs,{readOnly:t.kind==="builtin"&&t.role==="owner",onOpen:()=>I(!0)})]})]})}),s.jsx("div",{className:Z("mx-auto w-full max-w-[1200px] px-4 md:px-10 pb-6",g!=="org"&&"flex-1 min-h-0"),children:s.jsxs("div",{className:Z(g!=="org"&&"h-full overflow-hidden",g!=="models"&&g!=="org"&&"border border-border rounded-xl bg-card"),children:[g==="mcp"&&!T&&s.jsx(ds,{toolSet:m.watch("toolSet"),onToolSetChange:i=>m.setValue("toolSet",i,{shouldDirty:!0}),searchQuery:S}),g==="org"&&s.jsx(us,{allowAllStaticPermissions:m.watch("allowAllStaticPermissions"),staticPermissions:m.watch("staticPermissions"),onAllowAllChange:i=>m.setValue("allowAllStaticPermissions",i,{shouldDirty:!0}),onPermissionsChange:i=>m.setValue("staticPermissions",i,{shouldDirty:!0}),readOnly:T,searchQuery:S}),g==="models"&&s.jsx(Ms,{allowAllModels:m.watch("allowAllModels"),modelSet:m.watch("modelSet"),onAllowAllChange:i=>m.setValue("allowAllModels",i,{shouldDirty:!0}),onModelSetChange:i=>m.setValue("modelSet",i,{shouldDirty:!0}),readOnly:T,searchQuery:S}),g==="members"&&s.jsx(ys,{memberIds:m.watch("memberIds"),onMemberIdsChange:i=>m.setValue("memberIds",i,{shouldDirty:!0}),readOnly:t.kind==="builtin"&&(t.role==="owner"||t.role==="user"),readOnlyMessage:t.kind==="builtin"&&t.role==="user"?o("settings.orgRoleDetail.userIsDefaultRoleMessage"):o("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),searchQuery:S,addMemberDialogOpen:D,onAddMemberDialogOpenChange:I})]})})]})})}function zs(t){return t.kind==="builtin"?`builtin-${t.role}`:t.kind==="custom"?`custom-${t.role.id}`:"new"}function Fs(t){const e=X.c(6),{area:l,children:r}=t,{isPrivileged:n,loading:o,error:c}=Mt();let u;return e[0]!==l||e[1]!==r||e[2]!==c||e[3]!==n||e[4]!==o?(u=s.jsx(ts,{granted:n,loading:o,error:c,area:l,children:r}),e[0]=l,e[1]=r,e[2]=c,e[3]=n,e[4]=o,e[5]=u):u=e[5],u}const Qs=[{role:"owner",labelKey:"settings.roles.roleOwner"},{role:"admin",labelKey:"settings.roles.roleAdmin"},{role:"user",labelKey:"settings.roles.roleUser"}];function $s(){const t=X.c(128),e=ie(),[l,r]=Q.useState(""),[n,o]=Q.useState(null),c=vt();let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u={strict:!1},t[0]=u):u=t[0];const{role:f}=rt(u),{locator:d}=Ge(),T=Ke(),a=ot(),{customRoles:g,refetch:_}=Lt();let m;t[1]!==c?(m=j=>c({to:".",search:y=>({...y,role:j})}),t[1]=c,t[2]=m):m=t[2];const h=m;let O;e:{if(!f){O=null;break e}if(f==="new"){O={kind:"new"};break e}if(f.startsWith("builtin-")){O={kind:"builtin",role:f.slice(8)};break e}let j;t[3]!==f?(j=ee=>ee.id===f,t[3]=f,t[4]=j):j=t[4];const y=g.find(j);O=y?{kind:"custom",role:y}:null}const R=O;let p;t[5]!==d?(p=de.members(d),t[5]=d,t[6]=p):p=t[6];let C;t[7]!==T?(C=()=>T.organization.listMembers(),t[7]=T,t[8]=C):C=t[8];let A;t[9]!==p||t[10]!==C?(A={queryKey:p,queryFn:C},t[9]=p,t[10]=C,t[11]=A):A=t[11];const{data:M}=Ve(A);let S;t[12]!==M?.data?.members?(S=M?.data?.members??[],t[12]=M?.data?.members,t[13]=S):S=t[13];const b=S;let D;t[14]!==b?(D=j=>b.filter(y=>y.role===j).length,t[14]=b,t[15]=D):D=t[15];const I=D;let N;if(t[16]!==g||t[17]!==I||t[18]!==l||t[19]!==e){let j;t[21]!==I||t[22]!==e?(j=ce=>({kind:"builtin",role:{...ce,memberCount:I(ce.role),label:e(ce.labelKey)}}),t[21]=I,t[22]=e,t[23]=j):j=t[23];const y=Qs.map(j);let ee;t[24]!==I?(ee=ce=>({kind:"custom",role:{...ce,memberCount:I(ce.role)}}),t[24]=I,t[25]=ee):ee=t[25];const Nt=g.map(ee);if(N=[...y,...Nt],l){const ce=l.toLowerCase();N=N.filter(Ot=>Ot.role.label.toLowerCase().includes(ce))}t[16]=g,t[17]=I,t[18]=l,t[19]=e,t[20]=N}else N=t[20];let P;t[26]!==T?(P=async j=>{const y=await T.organization.deleteRole({roleId:j});if(y?.error)throw new Error(y.error.message);return y?.data},t[26]=T,t[27]=P):P=t[27];const i=nt({mutationFn:P,onSuccess:(j,y)=>{Ye("role_deleted",{role_id:y}),a.invalidateQueries({queryKey:de.members(d)}),a.invalidateQueries({queryKey:de.organizationRoles(d)}),Ce.success(e("settings.roles.deletedSuccessfully")),_(),R?.kind==="custom"&&R.role.id===y&&h(void 0)},onError:Ws});let x;t[28]!==e?(x=e("settings.roles.columnRole"),t[28]=e,t[29]=x):x=t[29];let U;t[30]!==x?(U={id:"role",header:x,render:Js,cellClassName:"flex-1 min-w-0",sortable:!0},t[30]=x,t[31]=U):U=t[31];let G;t[32]!==e?(G=e("settings.roles.columnType"),t[32]=e,t[33]=G):G=t[33];let Y;t[34]!==e?(Y=j=>j.kind==="builtin"?s.jsx(be,{variant:"secondary",className:"text-xs",children:e("settings.roles.builtIn")}):s.jsx(be,{variant:"outline",className:"text-xs",children:e("settings.roles.custom")}),t[34]=e,t[35]=Y):Y=t[35];let v;t[36]!==G||t[37]!==Y?(v={id:"type",header:G,render:Y,cellClassName:"w-28 shrink-0"},t[36]=G,t[37]=Y,t[38]=v):v=t[38];let K;t[39]!==e?(K=e("settings.roles.columnPermissions"),t[39]=e,t[40]=K):K=t[40];let L;t[41]!==e?(L=j=>{if(j.kind==="builtin")return j.role.role==="owner"||j.role.role==="admin"?s.jsx("span",{className:"text-sm text-muted-foreground",children:e("settings.roles.fullAccess")}):s.jsx("span",{className:"text-sm text-muted-foreground",children:e("settings.roles.basicAccess")});const y=j.role,ee=[];return y.allowsAllStaticPermissions?ee.push(e("settings.roles.fullOrgAccess")):y.staticPermissionCount&&y.staticPermissionCount>0&&ee.push(e("settings.roles.orgPermsCount",{count:y.staticPermissionCount})),y.allowsAllConnections?ee.push(e("settings.roles.allConnections")):y.connectionCount&&y.connectionCount>0&&ee.push(e("settings.roles.connectionCount",{count:y.connectionCount})),s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:ee.length>0?ee.join(", "):e("settings.roles.noPermissions")})},t[41]=e,t[42]=L):L=t[42];let z;t[43]!==K||t[44]!==L?(z={id:"permissions",header:K,render:L,cellClassName:"flex-1 min-w-0"},t[43]=K,t[44]=L,t[45]=z):z=t[45];let V;t[46]!==e?(V=e("settings.roles.columnMembers"),t[46]=e,t[47]=V):V=t[47];let k;t[48]!==V?(k={id:"members",header:V,render:Zs,cellClassName:"w-24 shrink-0"},t[48]=V,t[49]=k):k=t[49];let B;t[50]!==e?(B={id:"actions",header:"",render:j=>j.kind==="builtin"?null:s.jsxs(wt,{children:[s.jsx(Gt,{asChild:!0,children:s.jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:qs,children:s.jsx(Bt,{size:16})})}),s.jsx(Ut,{align:"end",onClick:Hs,children:s.jsxs(kt,{variant:"destructive",onClick:()=>{const y=j.role;y.id&&o({id:y.id,label:y.label})},children:[s.jsx(Vt,{size:16}),e("settings.roles.delete")]})})]}),cellClassName:"w-12 shrink-0"},t[50]=e,t[51]=B):B=t[51];let $;t[52]!==U||t[53]!==v||t[54]!==z||t[55]!==k||t[56]!==B?($=[U,v,z,k,B],t[52]=U,t[53]=v,t[54]=z,t[55]=k,t[56]=B,t[57]=$):$=t[57];const J=$;let te;t[58]!==h?(te=j=>{if(j.kind==="builtin")h(`builtin-${j.role.role}`);else{const y=j.role;h(y.id)}},t[58]=h,t[59]=te):te=t[59];const oe=te;if(R){let j;t[60]!==h?(j=()=>h(void 0),t[60]=h,t[61]=j):j=t[61];let y;return t[62]!==_||t[63]!==h?(y=()=>{_(),h(void 0)},t[62]=_,t[63]=h,t[64]=y):y=t[64],s.jsx(Ys,{target:R,onBack:j,onSaved:y},zs(R))}let F;t[65]!==e?(F=e("settings.roles.searchPlaceholder"),t[65]=e,t[66]=F):F=t[66];let W;t[67]===Symbol.for("react.memo_cache_sentinel")?(W=j=>{j.key==="Escape"&&(r(""),j.target.blur())},t[67]=W):W=t[67];let E;t[68]!==l||t[69]!==F?(E=s.jsx(ze,{value:l,onChange:r,placeholder:F,className:"w-full md:w-[375px]",onKeyDown:W}),t[68]=l,t[69]=F,t[70]=E):E=t[70];let w;t[71]!==h?(w=()=>h("new"),t[71]=h,t[72]=w):w=t[72];let H;t[73]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(Be,{size:16}),t[73]=H):H=t[73];let q;t[74]!==e?(q=e("settings.roles.createRole"),t[74]=e,t[75]=q):q=t[75];let se;t[76]!==w||t[77]!==q?(se=s.jsxs(ae,{onClick:w,children:[H,q]}),t[76]=w,t[77]=q,t[78]=se):se=t[78];let le;t[79]!==E||t[80]!==se?(le=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[E,se]}),t[79]=E,t[80]=se,t[81]=le):le=t[81];let ne;t[82]!==l||t[83]!==e?(ne=l?s.jsx(st,{title:e("settings.roles.noRolesFound"),description:e("settings.roles.noRolesMatchSearch",{search:l})}):s.jsx(st,{title:e("settings.roles.noRoles"),description:e("settings.roles.createRoleGetStarted")}),t[82]=l,t[83]=e,t[84]=ne):ne=t[84];let me;t[85]!==N||t[86]!==J||t[87]!==oe||t[88]!==ne?(me=s.jsx(Yt,{columns:J,data:N,isLoading:!1,onRowClick:oe,emptyState:ne}),t[85]=N,t[86]=J,t[87]=oe,t[88]=ne,t[89]=me):me=t[89];const Ue=n!==null;let Le;t[90]===Symbol.for("react.memo_cache_sentinel")?(Le=j=>!j&&o(null),t[90]=Le):Le=t[90];let ue;t[91]!==e?(ue=e("settings.roles.deleteRoleTitle"),t[91]=e,t[92]=ue):ue=t[92];let fe;t[93]!==ue?(fe=s.jsx(ut,{children:ue}),t[93]=ue,t[94]=fe):fe=t[94];const ke=n?.label??"";let ge;t[95]!==e||t[96]!==ke?(ge=e("settings.roles.deleteRoleConfirm",{role:ke}),t[95]=e,t[96]=ke,t[97]=ge):ge=t[97];let Te;t[98]!==ge?(Te=s.jsx(ft,{children:ge}),t[98]=ge,t[99]=Te):Te=t[99];let _e;t[100]!==fe||t[101]!==Te?(_e=s.jsxs(gt,{children:[fe,Te]}),t[100]=fe,t[101]=Te,t[102]=_e):_e=t[102];let he;t[103]!==e?(he=e("settings.roles.cancel"),t[103]=e,t[104]=he):he=t[104];let Ee;t[105]!==he?(Ee=s.jsx(Tt,{children:he}),t[105]=he,t[106]=Ee):Ee=t[106];let Ie;t[107]!==i||t[108]!==n?(Ie=()=>{n?.id&&i.mutate(n.id),o(null)},t[107]=i,t[108]=n,t[109]=Ie):Ie=t[109];let xe;t[110]!==e?(xe=e("settings.roles.delete"),t[110]=e,t[111]=xe):xe=t[111];let pe;t[112]!==Ie||t[113]!==xe?(pe=s.jsx(_t,{onClick:Ie,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:xe}),t[112]=Ie,t[113]=xe,t[114]=pe):pe=t[114];let Re;t[115]!==Ee||t[116]!==pe?(Re=s.jsxs(ht,{children:[Ee,pe]}),t[115]=Ee,t[116]=pe,t[117]=Re):Re=t[117];let Se;t[118]!==_e||t[119]!==Re?(Se=s.jsxs(mt,{children:[_e,Re]}),t[118]=_e,t[119]=Re,t[120]=Se):Se=t[120];let Ae;t[121]!==Ue||t[122]!==Se?(Ae=s.jsx(dt,{open:Ue,onOpenChange:Le,children:Se}),t[121]=Ue,t[122]=Se,t[123]=Ae):Ae=t[123];let ye;return t[124]!==le||t[125]!==me||t[126]!==Ae?(ye=s.jsxs(at,{group:"members",className:"gap-6",children:[le,me,Ae]}),t[124]=le,t[125]=me,t[126]=Ae,t[127]=ye):ye=t[127],ye}function Hs(t){return t.stopPropagation()}function qs(t){return t.stopPropagation()}function Zs(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.role.memberCount})}function Js(t){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:Z("size-2.5 rounded-full shrink-0",ct(t.role.role,t.kind==="builtin"))}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.role.label}),t.kind==="builtin"&&s.jsx(it,{size:12,className:"text-muted-foreground shrink-0"})]})}function Ws(t,e){Ye("role_delete_failed",{role_id:e,error:t instanceof Error?t.message:String(t)}),Ce.error(t instanceof Error?t.message:"Failed to delete role")}function Xs(){const t=X.c(13),e=ie();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[0]=l):l=t[0];const{role:r}=rt(l);let n;t[1]!==e?(n=e("settings.roles.failedToLoad"),t[1]=e,t[2]=n):n=t[2];let o;t[3]!==n?(o=s.jsx(Ne,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:n})})}),t[3]=n,t[4]=o):o=t[4];let c;t[5]!==r?(c=r?s.jsx(Ne,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Oe,{className:"size-8 text-muted-foreground"})})}):s.jsx(at,{group:"members",className:"gap-6",children:s.jsx(Dt,{})}),t[5]=r,t[6]=c):c=t[6];let u;t[7]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx($s,{}),t[7]=u):u=t[7];let f;t[8]!==c?(f=s.jsx(Q.Suspense,{fallback:c,children:u}),t[8]=c,t[9]=f):f=t[9];let d;return t[10]!==o||t[11]!==f?(d=s.jsx(Pt,{fallback:o,children:f}),t[10]=o,t[11]=f,t[12]=d):d=t[12],d}function Ro(){const t=X.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Fs,{area:"roles",children:s.jsx(Xs,{})}),t[0]=e):e=t[0],e}export{Ro as default};
|
|
1
|
+
import{b as ie,r as Q,G as Ge,K as de,m as Ve,j as s,l as Z,h as Oe,B as ae,c as X,ae as qe,af as we,ag as re,ak as Ze,ah as Je,n as ot,aq as Ct,ar as bt,e as nt,t as Ce,o as Ye,P as Ne,z as it,dp as We,dq as Xe,dr as et,C as jt,a3 as Me,a4 as De,a1 as Pe,a2 as ve,ap as tt,bZ as Mt,u as rt,dt as at,fg as Dt,E as Pt,d as vt}from"./index-BZsplvNT.js";import{u as Lt}from"./use-organization-roles-BQX1Apru.js";import{u as Ke}from"./use-org-auth-client-C1KTKuFD.js";import{g as ct,a as yt}from"./role-color-Dn2tXDDF.js";import{B as be}from"./badge-BsDrwMQC.js";import{A as dt,a as mt,c as ut,d as ft,b as gt,f as Tt,g as _t,e as ht}from"./alert-dialog-DR3U9WH-.js";import{c as wt,D as Gt,b as Ut,a as kt}from"./dropdown-menu-nFmVNZOj.js";import{i as Bt}from"./DotsVertical-BK7lUtpM.js";import{s as Be}from"./Plus-RDqtgmUn.js";import{s as Vt}from"./Trash01-BKalTQIS.js";import{C as Yt}from"./collection-table-wrapper-BEX1_xVZ.js";import{E as st}from"./empty-state-B4rx-IxR.js";import{S as ze}from"./search-input-CfYSReFc.js";import{P as Et,D as It}from"./ai-providers-logos-DD3qZ33J.js";import{I as Fe}from"./integration-icon-BN_v-AR8.js";import{u as Kt}from"./use-infinite-scroll-xe2j8vP-.js";import{C as Qe}from"./checkbox-QNc1bP0G.js";import{i as zt}from"./ArrowLeft-DcqEiCXC.js";import{u as Ft}from"./useSuspenseInfiniteQuery-Btts--oR.js";import{u as Qt}from"./use-mcp-client-Czt5As3J.js";import{S as $t}from"./constants-Daqiz8AS.js";import{C as Ht}from"./collection-search-BQUnJFre.js";import{p as qt}from"./connection-C8iBaknC.js";import{a as xt}from"./use-members-CjQN-pzi.js";import{g as pt}from"./get-initials-D-f_fDFw.js";import{u as Zt}from"./use-connection-BASuVort.js";import{u as Jt,g as Wt}from"./use-ai-providers-C6jqS37t.js";import{A as Rt}from"./avatar--vQE0XAV.js";import{S as je}from"./switch-2iiOxMIT.js";import{t as Xt}from"./ChevronUp-BBoq4dQx.js";import{i as es}from"./ChevronRight-lhy77Wwp.js";import{A as ts}from"./access-gate-tjl-KQc5.js";import"./Check-COlZG_Iq.js";import"./table-BI2-Msk8.js";import"./ArrowUp-C0l-cSxr.js";import"./SearchMd-BPJyn57v.js";import"./Tool02-DbSkbpld.js";import"./agent-icon-Dud4Dgyt.js";import"./AlertCircle-MMXQB5BT.js";import"./Tool01-lLgSUXVY.js";import"./XCircle-Mj5ql-Qx.js";import"./TrendUp01-Cm7YwYbt.js";import"./ZoomOut-T2TmOAC7.js";import"./Users03-BOFJsacM.js";import"./CheckCircle-DlrGO-LV.js";import"./ChevronSelectorVertical-DrBBU4AT.js";import"./UserSquare-hcaj17gz.js";import"./Copy01-ByTSNoHg.js";import"./CreditCard01-qqfxWQO_.js";import"./Download01-Cqs5gANt.js";import"./Settings02-DCwLCWga.js";import"./Eye-De6iXjt2.js";import"./Share07-CZ9aibs3.js";import"./GitBranch01-C7r39_B1.js";import"./Globe01-BVw1J1dL.js";import"./XClose-Df2qGXCV.js";import"./HardDrive-UD8cThYr.js";import"./Image01-2rJjksWt.js";import"./Key01-g1jGSd1T.js";import"./Link01-BECijxK2.js";import"./LinkExternal01-CO1G1_g7.js";import"./Monitor01-BbOgpVrd.js";import"./Sun-BVXGJtHB.js";import"./Package-CLE_ytpB.js";import"./Palette-CLZ81RQu.js";import"./Play-BS6znGOA.js";import"./Shield01-D_ej3uf2.js";import"./Stars01-CpnggJLh.js";import"./Upload01-HHF0-qzw.js";import"./User01-r0_GbQ8r.js";import"./Users01-Bu5fyBA6.js";import"./Zap-Cokcdzem.js";import"./infiniteQueryObserver-OPx_IdGS.js";import"./auth-pxmXflMC.js";import"./capability-load-error-Dafmx4Ll.js";const $e="basic-usage",He=[{id:$e,label:"Basic Usage",description:"Tools all org members can access by default",section:"Basic Usage",tools:["COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET","CONNECTION_TEST","COLLECTION_VIRTUAL_MCP_LIST","COLLECTION_VIRTUAL_MCP_GET","VIRTUAL_MCP_PLUGIN_CONFIG_GET","VIRTUAL_MCP_LAST_USED_LIST","AUTOMATION_GET","AUTOMATION_LIST","AUTOMATION_RUN_STATS","AI_PROVIDERS_LIST","AI_PROVIDERS_LIST_MODELS","AI_PROVIDERS_ACTIVE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_CREDITS","AI_PROVIDER_TOPUP_URL","LIST_OBJECTS","GET_OBJECT_METADATA","GET_PRESIGNED_URL","PUT_PRESIGNED_URL","FILE_OBJECTS_LIST","ORG_REPO_SYNC_LIST","SANDBOX_START","SANDBOX_DELETE","REPOSITORY_SEARCH_BRANCHES","GIT_PROVIDER_CAPABILITIES","GIT_ACCOUNT_LIST","REPOSITORY_LIST","REPOSITORY_SEARCH","CHANGE_REQUEST_STATE","CHANGE_REQUEST_LAST_MERGED","CHANGE_REQUEST_LIST_OPEN","CHANGE_REQUEST_CHECK_LOG","GLOBAL_SEARCH","ORGANIZATION_SETTINGS_GET","USER_GET","BRAND_CONTEXT_LIST","COLLECTION_THREADS_CREATE","COLLECTION_THREADS_LIST","COLLECTION_THREADS_GET","COLLECTION_THREADS_UPDATE","COLLECTION_THREADS_DELETE","COLLECTION_THREAD_MESSAGES_LIST","TASK_BOARD_ITEM_CREATE","TASK_BOARD_ITEM_LIST","TASK_BOARD_ITEM_UPDATE","TASK_BOARD_ITEM_DELETE","TASK_BOARD_AUTOMATION_LIST","TASK_BOARD_AUTOMATION_UPSERT","TASK_BOARD_AUTOMATION_DELETE","TASK_BOARD_PROMPT_LIST","TASK_BOARD_PROMPT_UPSERT","TASK_BOARD_PROMPT_DELETE","TASK_BOARD_ITEM_PRS_GET","TASK_BOARD_PREVIEW_PROBE","TASK_BOARD_ITEM_RERUN","TASK_BOARD_REVIEW_DECISION","TASK_BOARD_PROMOTE_TO_PRODUCTION","TASK_BOARD_ACTIVITY_LIST","TASK_BOARD_COMMENT_LIST","TASK_BOARD_COMMENT_CREATE","TASK_BOARD_COMMENT_UPDATE","TASK_BOARD_COMMENT_DELETE","TASK_BOARD_DISMISSED_LIST","TASK_BOARD_DISMISSED_RESTORE","NOTIFICATION_LIST","NOTIFICATION_MARK_READ","NOTIFICATION_SUBSCRIPTION_SET","NOTIFICATION_SUBSCRIPTION_LIST"]},{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","JIRA_INTEGRATION_GET","JIRA_INTEGRATION_UPSERT","JIRA_INTEGRATION_DELETE","JIRA_BOARDS_LIST","JIRA_BOARD_COLUMNS_LIST","JIRA_AUTOMATION_LIST","JIRA_AUTOMATION_UPSERT","JIRA_AUTOMATION_DELETE"]},{id:"members:manage",label:"Manage members",description:"Invite members, remove them, and change their roles",section:"Organization",tools:["ORGANIZATION_MEMBER_LIST","ORGANIZATION_MEMBER_ADD","ORGANIZATION_MEMBER_REMOVE","ORGANIZATION_MEMBER_UPDATE_ROLE","ORGANIZATION_BILLING_CHECKOUT_START","ORGANIZATION_BILLING_PORTAL","ORGANIZATION_TASK_QUOTA_GET","INFRA_BILLING_SITES_LIST","INFRA_BILLING_GET","INFRA_BILLING_PORTAL","ORGANIZATION_JOIN_REQUEST_LIST","ORGANIZATION_JOIN_REQUEST_APPROVE","ORGANIZATION_JOIN_REQUEST_DENY"],dangerous:!0},{id:"connections:manage",label:"Manage connections",description:"Create, update, and delete connections",section:"Connections & Agents",tools:["COLLECTION_CONNECTIONS_CREATE","COLLECTION_CONNECTIONS_UPDATE","COLLECTION_CONNECTIONS_DELETE","COMMERCE_DISCOVERY_SETUP","COMMERCE_DISCOVERY_RUN","COMMERCE_DISCOVERY_BIND","COMMERCE_DISCOVERY_CONNECTION_STATUS"],dangerous:!0},{id:"agents:manage",label:"Manage agents",description:"Create, configure, and delete agents",section:"Connections & Agents",tools:["COLLECTION_VIRTUAL_MCP_CREATE","COLLECTION_VIRTUAL_MCP_UPDATE","COLLECTION_VIRTUAL_MCP_DELETE","VIRTUAL_MCP_PLUGIN_CONFIG_UPDATE","VIRTUAL_MCP_PINNED_VIEWS_UPDATE"],dangerous:!0},{id:"automations:manage",label:"Manage automations",description:"Create, update, run, and delete automations",section:"Automations",tools:["AUTOMATION_CREATE","AUTOMATION_UPDATE","AUTOMATION_DELETE","AUTOMATION_TRIGGER_ADD","AUTOMATION_TRIGGER_REMOVE","AUTOMATION_TRIGGER_ROTATE_TOKEN","AUTOMATION_RUN"],dangerous:!0},{id:"monitoring:view",label:"View monitoring",description:"Access logs and usage statistics",section:"Monitoring",tools:["MONITORING_HEATMAP","MONITORING_LOG_GET","MONITORING_LOGS_LIST","MONITORING_STATS","MONITORING_THREAD_USAGE"]},{id:"secrets:manage",label:"Manage secrets",description:"Create and list secrets stored in the credential vault",section:"Organization",tools:["SECRET_CREATE","SECRET_LIST"]},{id:"file-configs:manage",label:"Manage file configs",description:"Create, list, update and delete S3 bucket configurations and synced GitHub repositories",section:"Organization",tools:["FILE_CONFIG_CREATE","FILE_CONFIG_LIST","FILE_CONFIG_UPDATE","FILE_CONFIG_DELETE","FILE_OBJECTS_LIST","FILE_OBJECT_DELETE","ORG_REPO_SYNC_CREATE","ORG_REPO_SYNC_LIST","ORG_REPO_SYNC_UPDATE","ORG_REPO_SYNC_DELETE","ORG_REPO_SYNC_RUN"]},{id:"ai-providers:manage",label:"Manage AI providers",description:"Add or remove API keys and provision provider credentials",section:"AI Providers",tools:["AI_PROVIDER_KEY_CREATE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_KEY_DELETE","AI_PROVIDER_KEY_UPDATE","AI_PROVIDER_KEY_PREVIEW","AI_PROVIDER_OAUTH_URL","AI_PROVIDER_OAUTH_EXCHANGE","AI_PROVIDER_PROVISION_KEY","AI_PROVIDER_TOPUP_URL","AI_PROVIDER_CREDITS","CLAUDE_SUBSCRIPTION_CONNECT","CLAUDE_SUBSCRIPTION_STATUS","CLAUDE_SUBSCRIPTION_DISCONNECT"]},{id:"tags:manage",label:"Manage tags",description:"Create, assign, and delete organization tags",section:"Organization",tools:["TAGS_LIST","TAGS_CREATE","TAGS_DELETE","MEMBER_TAGS_GET","MEMBER_TAGS_SET"]},{id:"registry:manage",label:"Manage registry",description:"Browse, publish, and manage items in the registry",section:"Store & Registry",tools:["COLLECTION_REGISTRY_APP_LIST","COLLECTION_REGISTRY_APP_GET","COLLECTION_REGISTRY_APP_VERSIONS","COLLECTION_REGISTRY_APP_FILTERS","REGISTRY_ITEM_LIST","REGISTRY_ITEM_SEARCH","REGISTRY_ITEM_GET","REGISTRY_ITEM_VERSIONS","REGISTRY_ITEM_FILTERS","REGISTRY_DISCOVER_TOOLS","REGISTRY_ITEM_CREATE","REGISTRY_ITEM_BULK_CREATE","REGISTRY_ITEM_UPDATE","REGISTRY_ITEM_DELETE","REGISTRY_AI_GENERATE","REGISTRY_PUBLISH_REQUEST_LIST","REGISTRY_PUBLISH_REQUEST_REVIEW","REGISTRY_PUBLISH_REQUEST_COUNT","REGISTRY_PUBLISH_REQUEST_DELETE","REGISTRY_PUBLISH_API_KEY_GENERATE","REGISTRY_PUBLISH_API_KEY_LIST","REGISTRY_PUBLISH_API_KEY_REVOKE"],dangerous:!0},{id:"registry:monitor",label:"Monitor registry health",description:"Run health checks on registry connections and view results",section:"Store & Registry",tools:["REGISTRY_MONITOR_RUN_START","REGISTRY_MONITOR_RUN_LIST","REGISTRY_MONITOR_RUN_GET","REGISTRY_MONITOR_RUN_CANCEL","REGISTRY_MONITOR_RESULT_LIST","REGISTRY_MONITOR_CONNECTION_LIST","REGISTRY_MONITOR_CONNECTION_SYNC","REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH"]},{id:"api-keys:manage",label:"Manage API keys",description:"Create, update, and revoke API keys",section:"Developer",tools:["API_KEY_CREATE","API_KEY_LIST","API_KEY_UPDATE","API_KEY_DELETE"]},{id:"storage:delete",label:"Delete from storage",description:"Permanently delete files from object storage",section:"Developer",tools:["DELETE_OBJECT","DELETE_OBJECTS"],dangerous:!0},{id:"connections:sql",label:"Run SQL queries",description:"Execute raw SQL against connected databases",section:"Developer",tools:["DATABASES_RUN_SQL"],dangerous:!0}];[...He.find(t=>t.id===$e)?.tools??[]];const ss=["agents:manage","connections:manage"];new Set(He.filter(t=>ss.includes(t.id)).flatMap(t=>t.tools));function ls(){const t=new Map;for(const e of He){if(e.id===$e)continue;const l=t.get(e.section)??[];l.push(e),t.set(e.section,l)}return Array.from(t.entries()).map(([e,l])=>({section:e,capabilities:l}))}function os(t,e,l){return l?!0:t.tools.every(r=>e.includes(r))}function ns(t,e,l){if(l){const n=new Set(e);for(const o of t.tools)n.add(o);return Array.from(n)}const r=new Set(e);for(const n of t.tools)r.delete(n);return Array.from(r)}function is(t){const e=X.c(21),{connection:l,isSelected:r,hasToolsEnabled:n,activeToolsCount:o,totalToolsCount:c,onSelect:u,onToggle:f}=t,d=r?"bg-accent/50":"hover:bg-muted/50";let T;e[0]!==d?(T=Z("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",d),e[0]=d,e[1]=T):T=e[1];let a;e[2]!==l.icon||e[3]!==l.title?(a=s.jsx(Fe,{icon:l.icon,name:l.title,size:"xs"}),e[2]=l.icon,e[3]=l.title,e[4]=a):a=e[4];let g;e[5]!==l.title?(g=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:l.title})}),e[5]=l.title,e[6]=g):g=e[6];let _;e[7]!==u||e[8]!==a||e[9]!==g?(_=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:u,children:[a,g]}),e[7]=u,e[8]=a,e[9]=g,e[10]=_):_=e[10];let m;e[11]!==o||e[12]!==l.tools||e[13]!==n||e[14]!==f||e[15]!==c?(m=l.tools&&l.tools.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[o,"/",c]}),s.jsx(Qe,{checked:n,onCheckedChange:f,onClick:rs})]}),e[11]=o,e[12]=l.tools,e[13]=n,e[14]=f,e[15]=c,e[16]=m):m=e[16];let h;return e[17]!==T||e[18]!==_||e[19]!==m?(h=s.jsxs("div",{className:T,children:[_,m]}),e[17]=T,e[18]=_,e[19]=m,e[20]=h):h=e[20],h}function rs(t){return t.stopPropagation()}function as(t){const e=X.c(18),{connectionId:l,tool:r,isSelected:n,onToggle:o}=t,c=`tool-${l}-${r.name}`,u=n?"text-foreground":"text-muted-foreground";let f;e[0]!==u?(f=Z("text-sm font-medium",u),e[0]=u,e[1]=f):f=e[1];let d;e[2]!==f||e[3]!==r.name?(d=s.jsx("div",{className:"flex items-center gap-2 mb-1",children:s.jsx("span",{className:f,children:r.name})}),e[2]=f,e[3]=r.name,e[4]=d):d=e[4];let T;e[5]!==r.description?(T=r.description&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:r.description}),e[5]=r.description,e[6]=T):T=e[6];let a;e[7]!==d||e[8]!==T?(a=s.jsxs("div",{className:"flex-1 min-w-0",children:[d,T]}),e[7]=d,e[8]=T,e[9]=a):a=e[9];const g=`tool-${l}-${r.name}`;let _;e[10]!==n||e[11]!==o||e[12]!==g?(_=s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(Qe,{id:g,checked:n,onCheckedChange:o,onClick:cs})}),e[10]=n,e[11]=o,e[12]=g,e[13]=_):_=e[13];let m;return e[14]!==c||e[15]!==a||e[16]!==_?(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:c,children:[a,_]}),e[14]=c,e[15]=a,e[16]=_,e[17]=m):m=e[17],m}function cs(t){return t.stopPropagation()}function ds({toolSet:t,onToolSetChange:e,excludeVirtualMcpId:l,searchQuery:r}){const n=ie(),[o,c]=Q.useState(""),u=r!==void 0?r:o,f=Q.useDeferredValue(u),[d,T]=Q.useState("all"),[a,g]=Q.useState(!1),_=Q.useRef(new Set(Object.keys(t))),{org:m}=Ge(),h=Qt({connectionId:$t,orgId:m.id,orgSlug:m.slug}),O=100,R=f.trim(),p=R?{operator:"or",conditions:[{field:["title"],operator:"contains",value:R},{field:["description"],operator:"contains",value:R}]}:void 0,C=!!l,A={...p&&{where:p},orderBy:[{field:["updated_at"],direction:"asc"}],limit:O,offset:0,...C&&{include_virtual:!0}},M=JSON.stringify(A),{data:S,fetchNextPage:b,hasNextPage:D,isFetchingNextPage:I}=Ft({queryKey:de.collectionListInfinite(h,m.id,"","CONNECTIONS",M),queryFn:async({pageParam:E=0})=>(await h.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...p&&{where:p},orderBy:[{field:["updated_at"],direction:"asc"}],limit:O,offset:E,...C&&{include_virtual:!0}}})).structuredContent,initialPageParam:0,getNextPageParam:(E,w)=>{if(E?.hasMore)return w.reduce((H,q)=>H+(q?.items?.length??0),0)},staleTime:3e4}),N=S?.pages.flatMap(E=>E?.items??[])??[],P=Kt(b,D??!1,I),i=l?N.filter(E=>E.connection_type!=="VIRTUAL"?!0:qt(E.connection_url)!==l):N,x=_.current,U=[...x.values()].map(E=>i.find(w=>w.id===E)).filter(E=>E!==void 0),G=i.filter(E=>!x.has(E.id)),Y=[...U,...G],v=E=>{const w=t[E];return w!==void 0&&w.length>0},K=Y.filter(E=>{if(d==="all")return!0;const w=v(E.id);return d==="selected"?w:d==="unselected"?!w:!0}),[L,z]=Q.useState(Y[0]?.id??null),V=L?Y.find(E=>E.id===L)??null:null,{data:k,isFetching:B}=Ve({queryKey:de.collectionItem(h,m.id,"","CONNECTIONS",L??""),queryFn:async()=>L?(await h.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:L}})).structuredContent?.item??null:null,enabled:!!L,staleTime:3e4}),$=k?.tools??[],J=(E,w)=>t[E]?.includes(w)??!1,te=(E,w)=>{const H=t[E]??[],q=H.includes(w),se={...t};if(q){const le=H.filter(ne=>ne!==w);le.length===0?delete se[E]:se[E]=le}else se[E]=[...H,w];e(se)},oe=E=>{const w=E===L?$:[];if(!w.length)return;const H=t[E]??[],q=w.map(ne=>ne.name),se=H.length>0&&q.every(ne=>H.includes(ne)),le={...t};se?delete le[E]:(le[E]=q,z(E)),e(le)},F=E=>{z(E),g(!0)},W=()=>{g(!1)};return s.jsxs("div",{className:"flex h-full",children:[s.jsxs("div",{className:Z("w-full md:w-80 border-r border-border flex flex-col",a&&"hidden md:flex"),children:[r===void 0&&s.jsx(Ht,{value:o,onChange:c,placeholder:n("common.toolSetSelector.searchPlaceholder")}),s.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[s.jsx("button",{onClick:()=>T("all"),className:Z("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",d==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:n("common.toolSetSelector.filterAll")}),s.jsx("button",{onClick:()=>T("selected"),className:Z("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",d==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:n("common.toolSetSelector.filterSelected")}),s.jsx("button",{onClick:()=>T("unselected"),className:Z("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",d==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:n("common.toolSetSelector.filterUnselected")})]}),s.jsx("div",{className:"flex-1 overflow-auto",children:K.length===0?s.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:n(u?"common.toolSetSelector.noConnectionsFound":d==="selected"?"common.toolSetSelector.noServersSelected":d==="unselected"?"common.toolSetSelector.noUnselectedServers":"common.toolSetSelector.noConnectionsAvailable")}):s.jsxs("div",{className:"p-2 space-y-1",children:[K.map(E=>{const w=L===E.id,H=w?$.length:0,q=t[E.id]?.length??0;return s.jsx(is,{connection:{...E,tools:w?$:E.tools},isSelected:w,hasToolsEnabled:v(E.id),activeToolsCount:q,totalToolsCount:H,onSelect:()=>F(E.id),onToggle:()=>oe(E.id)},E.id)}),s.jsx("div",{ref:P,className:"h-4"}),I&&s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(Oe,{className:"size-4.5 text-muted-foreground"})})]})})]}),s.jsx("div",{className:Z("flex-1 flex-col",a?"flex":"hidden md:flex"),children:V?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[s.jsx(ae,{variant:"ghost",size:"sm",onClick:W,className:"h-8 w-8 p-0 shrink-0",children:s.jsx(zt,{size:20})}),s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx(Fe,{icon:V.icon,name:V.title,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:V.title}),V.description&&s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:V.description})]})]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:B?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Oe,{className:"size-4.5 text-muted-foreground"})}):$.length===0?s.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:n("common.toolSetSelector.noToolsAvailable")}):s.jsx("div",{className:"space-y-2",children:$.map(E=>s.jsx(as,{connectionId:V.id,tool:E,isSelected:J(V.id,E.name),onToggle:()=>te(V.id,E.name)},E.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:n("common.toolSetSelector.selectConnection")})})})]})}const ms=qe({role:qe({id:re().optional(),slug:re().optional(),label:re()}),allowAllStaticPermissions:Je(),staticPermissions:we(re()),toolSet:Ze(re(),we(re())),allowAllModels:Je(),modelSet:Ze(re(),we(re())),memberIds:we(re())});function lt(t,e,l,r){const n=s.jsx(je,{checked:e,disabled:l,onCheckedChange:r});return l?s.jsx(Me,{children:s.jsxs(De,{children:[s.jsx(Pe,{asChild:!0,children:s.jsx("div",{children:n})}),s.jsx(ve,{children:s.jsx("p",{children:t("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):n}function us(t){const e=X.c(41),{allowAllStaticPermissions:l,staticPermissions:r,onAllowAllChange:n,onPermissionsChange:o,readOnly:c,searchQuery:u}=t,f=c===void 0?!1:c,d=ie();let T;e[0]!==u?(T=u.trim().toLowerCase(),e[0]=u,e[1]=T):T=e[1];const a=Q.useDeferredValue(T);let g;if(e[2]!==l||e[3]!==a||e[4]!==n||e[5]!==o||e[6]!==f||e[7]!==u||e[8]!==r||e[9]!==d){const _=ls(),m=(I,N)=>{if(!f){if(l&&N){const P=_.flatMap(Ts).flatMap(gs);n(!1),o(P.filter(i=>!I.tools.includes(i)));return}l||o(ns(I,r,!N))}};let h;e[11]!==a?(h=I=>{const{section:N,capabilities:P}=I;return{section:N,capabilities:P.filter(i=>!a||i.label.toLowerCase().includes(a)||i.description.toLowerCase().includes(a))}},e[11]=a,e[12]=h):h=e[12];const O=_.map(h).filter(fs);let R;e[13]!==d?(R=d("settings.orgRoleDetail.general"),e[13]=d,e[14]=R):R=e[14];let p;e[15]!==d?(p=d("settings.orgRoleDetail.allOrgPermissions"),e[15]=d,e[16]=p):p=e[16];let C;e[17]!==d?(C=d("settings.orgRoleDetail.grantFullAccessToAllFeaturesBelow"),e[17]=d,e[18]=C):C=e[18];let A;e[19]!==l||e[20]!==n||e[21]!==o?(A=()=>{n(!l),o([])},e[19]=l,e[20]=n,e[21]=o,e[22]=A):A=e[22];let M;e[23]!==l||e[24]!==f||e[25]!==d||e[26]!==A?(M=lt(d,l,f,A),e[23]=l,e[24]=f,e[25]=d,e[26]=A,e[27]=M):M=e[27];let S;e[28]!==l||e[29]!==n||e[30]!==o||e[31]!==f?(S=f?void 0:()=>{n(!l),o([])},e[28]=l,e[29]=n,e[30]=o,e[31]=f,e[32]=S):S=e[32];let b;e[33]!==S||e[34]!==p||e[35]!==C||e[36]!==M?(b=s.jsx(Xe,{children:s.jsx(et,{title:p,description:C,action:M,onClick:S})}),e[33]=S,e[34]=p,e[35]=C,e[36]=M,e[37]=b):b=e[37];let D;e[38]!==b||e[39]!==R?(D=s.jsx(We,{title:R,children:b}),e[38]=b,e[39]=R,e[40]=D):D=e[40],g=s.jsx("div",{children:s.jsxs("div",{className:"flex flex-col gap-10 py-4",children:[D,O.length===0&&a?s.jsx("p",{className:"text-sm text-muted-foreground py-4",children:d("settings.orgRoleDetail.noPermissionsMatch",{searchQuery:u})}):O.map(I=>{const{section:N,capabilities:P}=I;return s.jsx(We,{title:N,children:s.jsx(Xe,{children:P.map(i=>{const x=os(i,r,l);return s.jsx(et,{title:s.jsxs("span",{className:"flex items-center gap-1.5",children:[i.label,i.dangerous&&s.jsx(jt,{size:12,className:"text-warning shrink-0"})]}),description:i.description,action:lt(d,x,f,()=>m(i,x)),onClick:f?void 0:()=>m(i,x)},i.id)})})},N)})]})}),e[2]=l,e[3]=a,e[4]=n,e[5]=o,e[6]=f,e[7]=u,e[8]=r,e[9]=d,e[10]=g}else g=e[10];return g}function fs(t){return t.capabilities.length>0}function gs(t){return t.tools}function Ts(t){return t.capabilities}const St={anthropic:"Anthropic",openrouter:"OpenRouter"},_s={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 hs(t,e){const l=t.indexOf("/"),r=l>0?t.slice(0,l):e;return r.startsWith("~")?r.slice(1):r}function Es(t){return _s[t]??St[t]??t}function Is(t){const e=t.indexOf(": ");return e>0&&e<32?t.slice(e+2):t}const At=30;function xs(t){const e=X.c(40),{connectionId:l,subProviderId:r,subProviderName:n,groupLogo:o,models:c,allConnectionModelIds:u,selectedModels:f,allowAllModels:d,allConnectionModelsSelected:T,onToggleModel:a,onExitAllowAll:g,readOnly:_,defaultExpanded:m}=t,h=ie(),[O,R]=Q.useState(m),p=m||O,C=R,[A,M]=Q.useState(At);let S;e[0]!==T||e[1]!==d||e[2]!==f?(S=I=>d||T||f.includes("*")||f.includes(I),e[0]=T,e[1]=d,e[2]=f,e[3]=S):S=e[3];const b=S;let D;if(e[4]!==u||e[5]!==d||e[6]!==l||e[7]!==p||e[8]!==o||e[9]!==b||e[10]!==c||e[11]!==g||e[12]!==a||e[13]!==_||e[14]!==r||e[15]!==n||e[16]!==h||e[17]!==A){let I;e[19]!==b?(I=B=>b(B.id),e[19]=b,e[20]=I):I=e[20];const N=c.filter(I).length,P=c.slice(0,A),i=c.length>A;let x;e[21]===Symbol.for("react.memo_cache_sentinel")?(x=()=>C(As),e[21]=x):x=e[21];const U=o??Et[r]??It;let G;e[22]!==n||e[23]!==U?(G=s.jsx(Fe,{icon:U,name:n,size:"sm"}),e[22]=n,e[23]=U,e[24]=G):G=e[24];let Y;e[25]!==n?(Y=s.jsx("span",{className:"text-sm font-medium truncate",children:n}),e[25]=n,e[26]=Y):Y=e[26];let v;e[27]!==G||e[28]!==Y?(v=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[G,Y]}),e[27]=G,e[28]=Y,e[29]=v):v=e[29];const K=h("settings.orgRoleDetail.enabledCount",{enabledCount:N,total:c.length});let L;e[30]!==K?(L=s.jsx(be,{variant:"secondary",className:"text-xs text-muted-foreground",children:K}),e[30]=K,e[31]=L):L=e[31];let z;e[32]!==p?(z=p?s.jsx(Xt,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx(es,{size:16,className:"text-muted-foreground shrink-0"}),e[32]=p,e[33]=z):z=e[33];let V;e[34]!==L||e[35]!==z?(V=s.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[L,z]}),e[34]=L,e[35]=z,e[36]=V):V=e[36];let k;e[37]!==V||e[38]!==v?(k=s.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3 hover:bg-muted/50 cursor-pointer",onClick:x,children:[v,V]}),e[37]=V,e[38]=v,e[39]=k):k=e[39],D=s.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[k,p&&s.jsxs("div",{className:"border-t border-border bg-muted/20",children:[P.map(B=>{const $=b(B.id),J=()=>{if(!_){if(d){g(l,u,B.id);return}a(l,B.id)}};return s.jsxs("div",{className:Z("flex items-center justify-between gap-3 px-4 py-3 border-b border-border last:border-b-0",!_&&"hover:bg-muted/50 cursor-pointer"),onClick:J,children:[s.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s.jsx("span",{className:"text-sm truncate",children:B.title})}),s.jsx("div",{onClick:Ss,children:_?s.jsx(Me,{children:s.jsxs(De,{children:[s.jsx(Pe,{asChild:!0,children:s.jsx("div",{children:s.jsx(je,{checked:$,disabled:!0,onCheckedChange:Rs})})}),s.jsx(ve,{children:s.jsx("p",{children:h("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(je,{checked:$,onCheckedChange:J})})]},B.id)}),i&&s.jsx("button",{type:"button",className:"w-full px-4 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:()=>M(ps),children:h("settings.orgRoleDetail.showMore",{remaining:c.length-A})})]})]}),e[4]=u,e[5]=d,e[6]=l,e[7]=p,e[8]=o,e[9]=b,e[10]=c,e[11]=g,e[12]=a,e[13]=_,e[14]=r,e[15]=n,e[16]=h,e[17]=A,e[18]=D}else D=e[18];return D}function ps(t){return t+At}function Rs(){}function Ss(t){return t.stopPropagation()}function As(t){return!t}function Ns(t){const e=X.c(33),{connection:l,selectedModels:r,allowAllModels:n,onToggleModel:o,onExitAllowAll:c,allConnectionModelsSelected:u,searchQuery:f,readOnly:d}=t,T=Wt(l.id);let a,g,_,m,h;if(e[0]!==u||e[1]!==n||e[2]!==l.id||e[3]!==l.label||e[4]!==l.providerId||e[5]!==c||e[6]!==o||e[7]!==T||e[8]!==d||e[9]!==f||e[10]!==r){h=Symbol.for("react.early_return_sentinel");e:{let p;e[16]!==l.label?(p=x=>({...x,id:x.modelId,provider:l.label}),e[16]=l.label,e[17]=p):p=e[17];const C=T.filter(js).map(p),A=f.trim().toLowerCase(),M=A?C.filter(x=>x.title.toLowerCase().includes(A)||x.id.toLowerCase().includes(A)||x.provider?.toLowerCase().includes(A)):C;if(M.length===0){h=null;break e}const S=new Map;for(const x of M){const U=hs(x.id,l.providerId),G=S.get(U)??{models:[],logo:null};G.models.push({id:x.id,title:Is(x.title),logo:x.logo}),!G.logo&&x.logo&&(G.logo=x.logo),S.set(U,G)}const b=Array.from(S.entries()).map(bs).sort(Cs),D=b.length===1||A.length>0;_="flex flex-col gap-3";const I=Et[l.providerId]??It;let N;e[18]!==l.providerId||e[19]!==I?(N=s.jsx("img",{src:I,alt:l.providerId,className:"w-4 h-4 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),e[18]=l.providerId,e[19]=I,e[20]=N):N=e[20];const P=St[l.providerId]??l.providerId;let i;e[21]!==P?(i=s.jsx("h4",{className:"text-sm font-medium",children:P}),e[21]=P,e[22]=i):i=e[22],e[23]!==i||e[24]!==N?(m=s.jsxs("div",{className:"flex items-center gap-2",children:[N,i]}),e[23]=i,e[24]=N,e[25]=m):m=e[25],a="flex flex-col gap-3",g=b.map(x=>s.jsx(xs,{connectionId:l.id,subProviderId:x.id,subProviderName:x.name,groupLogo:x.logo,models:x.models,allConnectionModelIds:C.map(Os),selectedModels:r,allowAllModels:n,allConnectionModelsSelected:u,onToggleModel:o,onExitAllowAll:c,readOnly:d,defaultExpanded:D},x.id))}e[0]=u,e[1]=n,e[2]=l.id,e[3]=l.label,e[4]=l.providerId,e[5]=c,e[6]=o,e[7]=T,e[8]=d,e[9]=f,e[10]=r,e[11]=a,e[12]=g,e[13]=_,e[14]=m,e[15]=h}else a=e[11],g=e[12],_=e[13],m=e[14],h=e[15];if(h!==Symbol.for("react.early_return_sentinel"))return h;let O;e[26]!==a||e[27]!==g?(O=s.jsx("div",{className:a,children:g}),e[26]=a,e[27]=g,e[28]=O):O=e[28];let R;return e[29]!==_||e[30]!==m||e[31]!==O?(R=s.jsxs("div",{className:_,children:[m,O]}),e[29]=_,e[30]=m,e[31]=O,e[32]=R):R=e[32],R}function Os(t){return t.id}function Cs(t,e){return t.name.localeCompare(e.name)}function bs(t){const[e,l]=t;return{id:e,name:Es(e),logo:l.logo,models:l.models}}function js(t,e,l){return l.findIndex(r=>r.modelId===t.modelId)===e}function Ms(t){const e=X.c(41),{allowAllModels:l,modelSet:r,onAllowAllChange:n,onModelSetChange:o,readOnly:c,searchQuery:u}=t,f=c===void 0?!1:c,d=ie(),T=Q.useDeferredValue(u),a=Jt();let g;e[0]!==r||e[1]!==o?(g=(I,N)=>{const P=r[I]??[],i={...r};if(P.includes(N)){const x=P.filter(U=>U!==N);x.length===0?delete i[I]:i[I]=x}else i[I]=[...P,N];o(i)},e[0]=r,e[1]=o,e[2]=g):g=e[2];const _=g;let m;e[3]!==r||e[4]!==n||e[5]!==o?(m=(I,N,P)=>{n(!1),o({...r,[I]:N.filter(i=>i!==P)})},e[3]=r,e[4]=n,e[5]=o,e[6]=m):m=e[6];const h=m,O=!f&&"hover:bg-muted/50 cursor-pointer";let R;e[7]!==O?(R=Z("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",O),e[7]=O,e[8]=R):R=e[8];let p;e[9]!==l||e[10]!==n||e[11]!==o||e[12]!==f?(p=()=>{if(f)return;const I=!l;n(I),I&&o({})},e[9]=l,e[10]=n,e[11]=o,e[12]=f,e[13]=p):p=e[13];let C;e[14]!==d?(C=d("settings.orgRoleDetail.allModels"),e[14]=d,e[15]=C):C=e[15];let A;e[16]!==C?(A=s.jsx("span",{className:"text-sm font-medium",children:C}),e[16]=C,e[17]=A):A=e[17];let M;e[18]!==l||e[19]!==n||e[20]!==o||e[21]!==f||e[22]!==d?(M=s.jsx("div",{onClick:Ps,children:f?s.jsx(Me,{children:s.jsxs(De,{children:[s.jsx(Pe,{asChild:!0,children:s.jsx("div",{children:s.jsx(je,{checked:l,disabled:!0,onCheckedChange:Ds})})}),s.jsx(ve,{children:s.jsx("p",{children:d("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(je,{checked:l,onCheckedChange:I=>{n(I),I&&o({})}})}),e[18]=l,e[19]=n,e[20]=o,e[21]=f,e[22]=d,e[23]=M):M=e[23];let S;e[24]!==R||e[25]!==p||e[26]!==A||e[27]!==M?(S=s.jsxs("div",{className:R,onClick:p,children:[A,M]}),e[24]=R,e[25]=p,e[26]=A,e[27]=M,e[28]=S):S=e[28];let b;e[29]!==a||e[30]!==l||e[31]!==T||e[32]!==h||e[33]!==r||e[34]!==f||e[35]!==d||e[36]!==_?(b=a.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:d("settings.orgRoleDetail.noLlmConnectionsConfigured")}):a.map(I=>s.jsx(Q.Suspense,{fallback:s.jsxs("div",{className:"px-4 py-3 flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(Oe,{className:"size-4"}),d("settings.orgRoleDetail.loadingModels")]}),children:s.jsx(Ns,{connection:I,selectedModels:r[I.id]??[],allowAllModels:l,onToggleModel:_,onExitAllowAll:h,allConnectionModelsSelected:(r[I.id]??[]).includes("*"),searchQuery:T,readOnly:f})},I.id)),e[29]=a,e[30]=l,e[31]=T,e[32]=h,e[33]=r,e[34]=f,e[35]=d,e[36]=_,e[37]=b):b=e[37];let D;return e[38]!==S||e[39]!==b?(D=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 pb-6",children:[S,b]}),e[38]=S,e[39]=b,e[40]=D):D=e[40],D}function Ds(){}function Ps(t){return t.stopPropagation()}function vs(t){const e=X.c(75),{open:l,onOpenChange:r,selectedMemberIds:n,onAddMembers:o}=t,c=ie(),[u,f]=Q.useState(""),d=Q.useDeferredValue(u);let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=[],e[0]=T):T=e[0];const[a,g]=Q.useState(T),{data:_}=xt();let m,h,O,R,p,C,A,M,S,b,D;if(e[1]!==_?.data?.members||e[2]!==d||e[3]!==o||e[4]!==r||e[5]!==l||e[6]!==a||e[7]!==u||e[8]!==n||e[9]!==c){const L=_?.data?.members??[];let z;e[21]!==d?(z=F=>{const W=d.toLowerCase();return F.user?.name?.toLowerCase().includes(W)||F.user?.email?.toLowerCase().includes(W)},e[21]=d,e[22]=z):z=e[22];const V=L.filter(z);let k;e[23]!==o||e[24]!==r||e[25]!==a?(k=()=>{o(a),g([]),r(!1)},e[23]=o,e[24]=r,e[25]=a,e[26]=k):k=e[26],O=k,h=dt,b=l,D=r,m=mt,M="sm:max-w-md p-0";let B;e[27]!==c?(B=c("settings.orgRoleDetail.addMembersToRole"),e[27]=c,e[28]=B):B=e[28];let $;e[29]!==B?($=s.jsx(ut,{children:B}),e[29]=B,e[30]=$):$=e[30];let J;e[31]!==c?(J=c("settings.orgRoleDetail.selectMembersToAddToThisRole"),e[31]=c,e[32]=J):J=e[32];let te;e[33]!==J?(te=s.jsx(ft,{children:J}),e[33]=J,e[34]=te):te=e[34],e[35]!==$||e[36]!==te?(S=s.jsxs(gt,{className:"px-6 pt-6",children:[$,te]}),e[35]=$,e[36]=te,e[37]=S):S=e[37],C="flex flex-col h-80";let oe;e[38]!==c?(oe=c("settings.orgRoleDetail.searchMembers"),e[38]=c,e[39]=oe):oe=e[39],e[40]!==u||e[41]!==oe?(A=s.jsx("div",{className:"border-b border-border px-4 py-3",children:s.jsx(ze,{value:u,onChange:f,placeholder:oe,className:"w-full"})}),e[40]=u,e[41]=oe,e[42]=A):A=e[42],R="flex-1 overflow-auto",p=V.length===0?s.jsx("div",{className:"flex items-center justify-center h-full px-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:c(u?"settings.orgRoleDetail.noMembersFound":"settings.orgRoleDetail.noMembersAvailable")})}):s.jsx("div",{className:"px-6 py-2 space-y-1",children:V.map(F=>{const W=F.role!=="owner",E=n.includes(F.id),w=a.includes(F.id);return s.jsxs("label",{className:Z("flex items-center gap-3 p-2 rounded-lg",!W||E?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-muted/50"),children:[s.jsx(Qe,{checked:w||E,onCheckedChange:()=>{!W||E||g(H=>H.includes(F.id)?H.filter(q=>q!==F.id):[...H,F.id])},disabled:!W||E}),s.jsx(Rt,{url:F.user?.image??void 0,fallback:pt(F.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:F.user?.name||c("settings.orgRoleDetail.unknown")}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:F.user?.email})]}),!W&&s.jsx(be,{variant:"secondary",className:"shrink-0",children:c("settings.orgRoleDetail.owner")}),E&&W&&s.jsx(be,{variant:"outline",className:"shrink-0",children:c("settings.orgRoleDetail.added")})]},F.id)})}),e[1]=_?.data?.members,e[2]=d,e[3]=o,e[4]=r,e[5]=l,e[6]=a,e[7]=u,e[8]=n,e[9]=c,e[10]=m,e[11]=h,e[12]=O,e[13]=R,e[14]=p,e[15]=C,e[16]=A,e[17]=M,e[18]=S,e[19]=b,e[20]=D}else m=e[10],h=e[11],O=e[12],R=e[13],p=e[14],C=e[15],A=e[16],M=e[17],S=e[18],b=e[19],D=e[20];let I;e[43]!==R||e[44]!==p?(I=s.jsx("div",{className:R,children:p}),e[43]=R,e[44]=p,e[45]=I):I=e[45];let N;e[46]!==I||e[47]!==C||e[48]!==A?(N=s.jsxs("div",{className:C,children:[A,I]}),e[46]=I,e[47]=C,e[48]=A,e[49]=N):N=e[49];let P;e[50]!==c?(P=c("settings.orgRoleDetail.cancel"),e[50]=c,e[51]=P):P=e[51];let i;e[52]!==P?(i=s.jsx(Tt,{children:P}),e[52]=P,e[53]=i):i=e[53];const x=a.length===0;let U;e[54]!==a.length||e[55]!==c?(U=c("settings.orgRoleDetail.addWithCount",{count:a.length}),e[54]=a.length,e[55]=c,e[56]=U):U=e[56];let G;e[57]!==O||e[58]!==x||e[59]!==U?(G=s.jsx(_t,{onClick:O,disabled:x,children:U}),e[57]=O,e[58]=x,e[59]=U,e[60]=G):G=e[60];let Y;e[61]!==i||e[62]!==G?(Y=s.jsxs(ht,{className:"px-6 pb-6",children:[i,G]}),e[61]=i,e[62]=G,e[63]=Y):Y=e[63];let v;e[64]!==m||e[65]!==N||e[66]!==Y||e[67]!==M||e[68]!==S?(v=s.jsxs(m,{className:M,children:[S,N,Y]}),e[64]=m,e[65]=N,e[66]=Y,e[67]=M,e[68]=S,e[69]=v):v=e[69];let K;return e[70]!==h||e[71]!==v||e[72]!==b||e[73]!==D?(K=s.jsx(h,{open:b,onOpenChange:D,children:v}),e[70]=h,e[71]=v,e[72]=b,e[73]=D,e[74]=K):K=e[74],K}function Ls(t){const e=X.c(33),{memberIds:l,onMemberIdsChange:r,readOnly:n,readOnlyMessage:o,searchQuery:c,addMemberDialogOpen:u,onAddMemberDialogOpenChange:f}=t,d=n===void 0?!1:n,T=o===void 0?void 0:o,a=ie(),g=Q.useDeferredValue(c),{data:_}=xt();let m,h,O;if(e[0]!==_?.data?.members||e[1]!==g||e[2]!==l||e[3]!==r||e[4]!==d||e[5]!==T||e[6]!==c||e[7]!==a){const M=_?.data?.members??[];let S;e[11]!==l?(S=i=>l.includes(i.id),e[11]=l,e[12]=S):S=e[12];const b=M.filter(S);let D;e[13]!==g?(D=i=>{const x=g.toLowerCase();return i.user?.name?.toLowerCase().includes(x)||i.user?.email?.toLowerCase().includes(x)},e[13]=g,e[14]=D):D=e[14];const I=b.filter(D);let N;e[15]!==T||e[16]!==a?(N=T??a("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),e[15]=T,e[16]=a,e[17]=N):N=e[17];const P=N;O="flex flex-col h-full",m="flex-1 overflow-auto",h=b.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-base font-medium mb-1",children:a("settings.orgRoleDetail.noMembers")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:a("settings.orgRoleDetail.addMembersToGrantPermissions")})]})}):I.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:a("settings.orgRoleDetail.noMembersMatch",{searchQuery:c})})}):s.jsx("div",{className:"p-4 space-y-2",children:I.map(i=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/30",children:[s.jsx(Rt,{url:i.user?.image??void 0,fallback:pt(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||a("settings.orgRoleDetail.unknown")}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:i.user?.email})]}),d?s.jsx(Me,{children:s.jsxs(De,{children:[s.jsx(Pe,{asChild:!0,children:s.jsx("div",{children:s.jsx(ae,{variant:"ghost",size:"sm",disabled:!0,"aria-label":a("settings.orgRoleDetail.removeMember",{name:i.user?.name||a("settings.orgRoleDetail.unknown")}),children:s.jsx(tt,{size:16})})})}),s.jsx(ve,{children:s.jsx("p",{children:P})})]})}):s.jsx(ae,{variant:"ghost",size:"sm","aria-label":a("settings.orgRoleDetail.removeMember",{name:i.user?.name||a("settings.orgRoleDetail.unknown")}),onClick:()=>r(l.filter(x=>x!==i.id)),children:s.jsx(tt,{size:16})})]},i.id))}),e[0]=_?.data?.members,e[1]=g,e[2]=l,e[3]=r,e[4]=d,e[5]=T,e[6]=c,e[7]=a,e[8]=m,e[9]=h,e[10]=O}else m=e[8],h=e[9],O=e[10];let R;e[18]!==m||e[19]!==h?(R=s.jsx("div",{className:m,children:h}),e[18]=m,e[19]=h,e[20]=R):R=e[20];let p;e[21]!==l||e[22]!==r?(p=M=>r([...l,...M]),e[21]=l,e[22]=r,e[23]=p):p=e[23];let C;e[24]!==u||e[25]!==l||e[26]!==f||e[27]!==p?(C=s.jsx(vs,{open:u,onOpenChange:f,selectedMemberIds:l,onAddMembers:p}),e[24]=u,e[25]=l,e[26]=f,e[27]=p,e[28]=C):C=e[28];let A;return e[29]!==O||e[30]!==R||e[31]!==C?(A=s.jsxs("div",{className:O,children:[R,C]}),e[29]=O,e[30]=R,e[31]=C,e[32]=A):A=e[32],A}function ys(t){const e=X.c(3);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Oe,{className:"size-6 text-muted-foreground"})}),e[0]=l):l=e[0];let r;return e[1]!==t?(r=s.jsx(Q.Suspense,{fallback:l,children:s.jsx(Ls,{...t})}),e[1]=t,e[2]=r):r=e[2],r}const ws={owner:[],admin:[],user:[]};function Gs(t,e,l,r){const n=t==="owner"||t==="admin";return{role:{id:l?.id,slug:t,label:t.charAt(0).toUpperCase()+t.slice(1)},allowAllStaticPermissions:n,staticPermissions:ws[t],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:e.filter(o=>o.role===t).map(o=>o.id)}}function Us(t,e,l){const r=t.permission||{},n=r.self||[],o=n.includes("*"),c=o?[]:n.filter(a=>a!=="*"),u={};for(const[a,g]of Object.entries(r))if(!(a==="self"||a==="models"))if(a==="*")for(const _ of l)u[_.id]=g.includes("*")?_.tools?.map(m=>m.name)??[]:g;else{const _=l.find(m=>m.id===a);_&&(u[a]=g.includes("*")?_.tools?.map(m=>m.name)??[]:g)}const f=r.models||[],d=f.length===0||f.includes("*:*"),T={};if(!d)for(const a of f){const g=a.indexOf(":");if(g===-1)continue;const _=a.slice(0,g),m=a.slice(g+1);T[_]||(T[_]=[]),T[_].push(m)}return{role:{id:t.id,slug:t.role,label:t.label},allowAllStaticPermissions:o,staticPermissions:c,toolSet:u,allowAllModels:d,modelSet:T,memberIds:e.filter(a=>a.role===t.role).map(a=>a.id)}}function ks(t,e){const l={};t.allowAllStaticPermissions?l.self=["*"]:t.staticPermissions.length>0&&(l.self=t.staticPermissions);for(const[r,n]of Object.entries(t.toolSet))if(n.length>0){const c=e.find(u=>u.id===r)?.tools?.map(u=>u.name)??[];l[r]=c.length>0&&c.every(u=>n.includes(u))?["*"]:n}if(t.allowAllModels)l.models=["*:*"];else{const r=[];for(const[n,o]of Object.entries(t.modelSet))for(const c of o)r.push(`${n}:${c}`);r.length>0&&(l.models=r)}return l}function Bs(t,e,l){return t.kind==="builtin"?Gs(t.role,e,void 0):t.kind==="custom"?Us(t.role,e,l):{role:{id:void 0,slug:void 0,label:""},allowAllStaticPermissions:!1,staticPermissions:[],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:[]}}function Vs(t){const e=X.c(19),{readOnly:l,readOnlyMessage:r,onOpen:n}=t,o=r===void 0?void 0:r,c=ie();let u;e[0]!==o||e[1]!==c?(u=o??c("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),e[0]=o,e[1]=c,e[2]=u):u=e[2];const f=u;if(l){let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Be,{size:16}),e[3]=g):g=e[3];let _;e[4]!==c?(_=c("settings.orgRoleDetail.addMember"),e[4]=c,e[5]=_):_=e[5];let m;e[6]!==_?(m=s.jsx(Pe,{asChild:!0,children:s.jsx("div",{children:s.jsxs(ae,{variant:"outline",size:"sm",disabled:!0,children:[g,_]})})}),e[6]=_,e[7]=m):m=e[7];let h;e[8]!==f?(h=s.jsx(ve,{children:s.jsx("p",{children:f})}),e[8]=f,e[9]=h):h=e[9];let O;return e[10]!==m||e[11]!==h?(O=s.jsx(Me,{children:s.jsxs(De,{children:[m,h]})}),e[10]=m,e[11]=h,e[12]=O):O=e[12],O}let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Be,{size:16}),e[13]=d):d=e[13];let T;e[14]!==c?(T=c("settings.orgRoleDetail.addMember"),e[14]=c,e[15]=T):T=e[15];let a;return e[16]!==n||e[17]!==T?(a=s.jsxs(ae,{variant:"outline",size:"sm",onClick:n,children:[d,T]}),e[16]=n,e[17]=T,e[18]=a):a=e[18],a}function Ys(t){const e=X.c(14),{locator:l}=Ge(),r=Ke(),n=Zt();let o;e[0]!==l?(o=de.members(l),e[0]=l,e[1]=o):o=e[1];let c;e[2]!==r?(c=()=>r.organization.listMembers(),e[2]=r,e[3]=c):c=e[3];let u;e[4]!==o||e[5]!==c?(u={queryKey:o,queryFn:c},e[4]=o,e[5]=c,e[6]=u):u=e[6];const{data:f,isPending:d}=Ve(u);if(d||!n){let _;return e[7]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Ne,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Oe,{className:"size-8 text-muted-foreground"})})}),e[7]=_):_=e[7],_}let T;e[8]!==f?.data?.members?(T=f?.data?.members??[],e[8]=f?.data?.members,e[9]=T):T=e[9];const a=T;let g;return e[10]!==n||e[11]!==a||e[12]!==t?(g=s.jsx(Ks,{...t,members:a,connections:n}),e[10]=n,e[11]=a,e[12]=t,e[13]=g):g=e[13],g}function Ks({target:t,onBack:e,onSaved:l,members:r,connections:n}){const o=ie(),{locator:c}=Ge(),u=Ke(),f=ot(),d=t.kind==="builtin",T=t.kind==="builtin"&&t.role==="owner",a=t.kind==="new",[g,_]=Q.useState(d?"org":"mcp"),m=Ct({resolver:bt(ms),defaultValues:Bs(t,r,n)}),h=m.formState.isValid,O=m.formState.isDirty,R=nt({mutationFn:async i=>{const x=ks(i,n),U=i.role.slug||i.role.label.toLowerCase().replace(/\s+/g,"-"),G=(i.role.slug==="owner"||i.role.slug==="admin"||i.role.slug==="user")&&!i.role.id,Y=async(v,K)=>{const L=r.filter(k=>k.role===(K??v)).map(k=>k.id),z=i.memberIds.filter(k=>!L.includes(k)),V=L.filter(k=>!i.memberIds.includes(k));for(const k of z){const B=await u.organization.updateMemberRole({memberId:k,role:[v]});if(B?.error)throw new Error(B.error.message??o("settings.orgRoleDetail.somethingWentWrong"))}for(const k of V){const B=await u.organization.updateMemberRole({memberId:k,role:["user"]});if(B?.error)throw new Error(B.error.message??o("settings.orgRoleDetail.somethingWentWrong"))}};if(G)return await Y(i.role.slug),i;if(i.role.id){const v=i.role.label.toLowerCase().replace(/\s+/g,"-"),K=i.role.slug,L=v!==K,z=await u.organization.updateRole({roleId:i.role.id,data:{permission:x,...L?{roleName:v}:{}}});if(z?.error)throw new Error(z.error.message??o("settings.orgRoleDetail.somethingWentWrong"));return await Y(L?v:K,L?K:void 0),L?{...i,role:{...i.role,slug:v}}:i}else{const v=await u.organization.createRole({role:U,permission:x});if(v?.error)throw new Error(v.error.message??o("settings.orgRoleDetail.somethingWentWrong"));for(const K of i.memberIds){const L=await u.organization.updateMemberRole({memberId:K,role:[U]});if(L?.error)throw new Error(L.error.message)}return{...i,role:{...i.role,id:v.data?.roleData?.id,slug:U}}}},onSuccess:(i,x)=>{f.invalidateQueries({queryKey:de.members(c)}),f.invalidateQueries({queryKey:de.organizationRoles(c)});const U=!x.role.id&&!x.role.slug,G=x.role.slug==="owner"&&!x.role.id;Ye(G?"role_members_updated":U?"role_created":"role_updated",{role_slug:x.role.slug??null}),Ce.success(o(G?"settings.orgRoleDetail.membersUpdatedSuccessfully":U?"settings.orgRoleDetail.roleCreatedSuccessfully":"settings.orgRoleDetail.roleUpdatedSuccessfully")),m.reset(i),l(i.role.id)},onError:i=>{Ce.error(i instanceof Error?i.message:o("settings.orgRoleDetail.failedToSaveRole"))}}),p=m.handleSubmit(i=>{if(!i.role.label.trim()){Ce.error(o("settings.orgRoleDetail.roleNameIsRequired")),m.setFocus("role.label");return}R.mutate(i)}),C=!T,A=t.kind==="builtin"?t.role.charAt(0).toUpperCase()+t.role.slice(1):t.kind==="custom"?t.role.label:"",M=[...T?[]:[{id:"mcp",label:o("settings.orgRoleDetail.mcpPermissions")}],{id:"org",label:o("settings.orgRoleDetail.organizationPermissions")},{id:"models",label:o("settings.orgRoleDetail.models")},{id:"members",label:o("settings.orgRoleDetail.members")}],[S,b]=Q.useState(""),[D,I]=Q.useState(!1),N=i=>{_(i),b("")},P={mcp:o("settings.orgRoleDetail.searchMcpServers"),org:o("settings.orgRoleDetail.searchPermissions"),models:o("settings.orgRoleDetail.searchModels"),members:o("settings.orgRoleDetail.searchMembers")};return s.jsx(Ne,{children:s.jsxs(Ne.Content,{className:Z("flex flex-col",g!=="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(Ne.Title,{actions:C&&s.jsxs(s.Fragment,{children:[s.jsx(ae,{variant:"outline",size:"sm",onClick:e,disabled:R.isPending,children:o("settings.orgRoleDetail.cancel")}),s.jsx(ae,{size:"sm",onClick:p,disabled:R.isPending||!h||!O,children:R.isPending?o("settings.orgRoleDetail.saving"):o(a?"settings.orgRoleDetail.createRole":"settings.orgRoleDetail.saveChanges")})]}),children:s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx("div",{className:Z("size-2.5 rounded-full shrink-0",t.kind==="builtin"?ct(t.role,!0):yt(m.watch("role.label")))}),T&&s.jsx(it,{size:16,className:"text-muted-foreground shrink-0"}),a||t.kind==="custom"?s.jsx("input",{...m.register("role.label"),placeholder:o("settings.orgRoleDetail.roleName"),className:"leading-tight text-foreground bg-transparent border-none outline-none px-1 -mx-1 rounded hover:bg-input/25 focus:bg-input/25 transition-colors w-64 placeholder:text-muted-foreground/50",autoFocus:a}):s.jsx("span",{className:"truncate",children:A})]})}),s.jsx("div",{className:"flex items-center gap-2",children:M.map(i=>s.jsx("button",{type:"button",onClick:()=>N(i.id),className:Z("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex items-center",g===i.id?"bg-accent border-border text-foreground":"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:i.label},i.id))}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx(ze,{value:S,onChange:b,placeholder:P[g]??"Search...",className:"w-full md:w-[375px]"}),g==="members"&&s.jsx(Vs,{readOnly:t.kind==="builtin"&&t.role==="owner",onOpen:()=>I(!0)})]})]})}),s.jsx("div",{className:Z("mx-auto w-full max-w-[1200px] px-4 md:px-10 pb-6",g!=="org"&&"flex-1 min-h-0"),children:s.jsxs("div",{className:Z(g!=="org"&&"h-full overflow-hidden",g!=="models"&&g!=="org"&&"border border-border rounded-xl bg-card"),children:[g==="mcp"&&!T&&s.jsx(ds,{toolSet:m.watch("toolSet"),onToolSetChange:i=>m.setValue("toolSet",i,{shouldDirty:!0}),searchQuery:S}),g==="org"&&s.jsx(us,{allowAllStaticPermissions:m.watch("allowAllStaticPermissions"),staticPermissions:m.watch("staticPermissions"),onAllowAllChange:i=>m.setValue("allowAllStaticPermissions",i,{shouldDirty:!0}),onPermissionsChange:i=>m.setValue("staticPermissions",i,{shouldDirty:!0}),readOnly:T,searchQuery:S}),g==="models"&&s.jsx(Ms,{allowAllModels:m.watch("allowAllModels"),modelSet:m.watch("modelSet"),onAllowAllChange:i=>m.setValue("allowAllModels",i,{shouldDirty:!0}),onModelSetChange:i=>m.setValue("modelSet",i,{shouldDirty:!0}),readOnly:T,searchQuery:S}),g==="members"&&s.jsx(ys,{memberIds:m.watch("memberIds"),onMemberIdsChange:i=>m.setValue("memberIds",i,{shouldDirty:!0}),readOnly:t.kind==="builtin"&&(t.role==="owner"||t.role==="user"),readOnlyMessage:t.kind==="builtin"&&t.role==="user"?o("settings.orgRoleDetail.userIsDefaultRoleMessage"):o("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),searchQuery:S,addMemberDialogOpen:D,onAddMemberDialogOpenChange:I})]})})]})})}function zs(t){return t.kind==="builtin"?`builtin-${t.role}`:t.kind==="custom"?`custom-${t.role.id}`:"new"}function Fs(t){const e=X.c(6),{area:l,children:r}=t,{isPrivileged:n,loading:o,error:c}=Mt();let u;return e[0]!==l||e[1]!==r||e[2]!==c||e[3]!==n||e[4]!==o?(u=s.jsx(ts,{granted:n,loading:o,error:c,area:l,children:r}),e[0]=l,e[1]=r,e[2]=c,e[3]=n,e[4]=o,e[5]=u):u=e[5],u}const Qs=[{role:"owner",labelKey:"settings.roles.roleOwner"},{role:"admin",labelKey:"settings.roles.roleAdmin"},{role:"user",labelKey:"settings.roles.roleUser"}];function $s(){const t=X.c(128),e=ie(),[l,r]=Q.useState(""),[n,o]=Q.useState(null),c=vt();let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u={strict:!1},t[0]=u):u=t[0];const{role:f}=rt(u),{locator:d}=Ge(),T=Ke(),a=ot(),{customRoles:g,refetch:_}=Lt();let m;t[1]!==c?(m=j=>c({to:".",search:y=>({...y,role:j})}),t[1]=c,t[2]=m):m=t[2];const h=m;let O;e:{if(!f){O=null;break e}if(f==="new"){O={kind:"new"};break e}if(f.startsWith("builtin-")){O={kind:"builtin",role:f.slice(8)};break e}let j;t[3]!==f?(j=ee=>ee.id===f,t[3]=f,t[4]=j):j=t[4];const y=g.find(j);O=y?{kind:"custom",role:y}:null}const R=O;let p;t[5]!==d?(p=de.members(d),t[5]=d,t[6]=p):p=t[6];let C;t[7]!==T?(C=()=>T.organization.listMembers(),t[7]=T,t[8]=C):C=t[8];let A;t[9]!==p||t[10]!==C?(A={queryKey:p,queryFn:C},t[9]=p,t[10]=C,t[11]=A):A=t[11];const{data:M}=Ve(A);let S;t[12]!==M?.data?.members?(S=M?.data?.members??[],t[12]=M?.data?.members,t[13]=S):S=t[13];const b=S;let D;t[14]!==b?(D=j=>b.filter(y=>y.role===j).length,t[14]=b,t[15]=D):D=t[15];const I=D;let N;if(t[16]!==g||t[17]!==I||t[18]!==l||t[19]!==e){let j;t[21]!==I||t[22]!==e?(j=ce=>({kind:"builtin",role:{...ce,memberCount:I(ce.role),label:e(ce.labelKey)}}),t[21]=I,t[22]=e,t[23]=j):j=t[23];const y=Qs.map(j);let ee;t[24]!==I?(ee=ce=>({kind:"custom",role:{...ce,memberCount:I(ce.role)}}),t[24]=I,t[25]=ee):ee=t[25];const Nt=g.map(ee);if(N=[...y,...Nt],l){const ce=l.toLowerCase();N=N.filter(Ot=>Ot.role.label.toLowerCase().includes(ce))}t[16]=g,t[17]=I,t[18]=l,t[19]=e,t[20]=N}else N=t[20];let P;t[26]!==T?(P=async j=>{const y=await T.organization.deleteRole({roleId:j});if(y?.error)throw new Error(y.error.message);return y?.data},t[26]=T,t[27]=P):P=t[27];const i=nt({mutationFn:P,onSuccess:(j,y)=>{Ye("role_deleted",{role_id:y}),a.invalidateQueries({queryKey:de.members(d)}),a.invalidateQueries({queryKey:de.organizationRoles(d)}),Ce.success(e("settings.roles.deletedSuccessfully")),_(),R?.kind==="custom"&&R.role.id===y&&h(void 0)},onError:Ws});let x;t[28]!==e?(x=e("settings.roles.columnRole"),t[28]=e,t[29]=x):x=t[29];let U;t[30]!==x?(U={id:"role",header:x,render:Js,cellClassName:"flex-1 min-w-0",sortable:!0},t[30]=x,t[31]=U):U=t[31];let G;t[32]!==e?(G=e("settings.roles.columnType"),t[32]=e,t[33]=G):G=t[33];let Y;t[34]!==e?(Y=j=>j.kind==="builtin"?s.jsx(be,{variant:"secondary",className:"text-xs",children:e("settings.roles.builtIn")}):s.jsx(be,{variant:"outline",className:"text-xs",children:e("settings.roles.custom")}),t[34]=e,t[35]=Y):Y=t[35];let v;t[36]!==G||t[37]!==Y?(v={id:"type",header:G,render:Y,cellClassName:"w-28 shrink-0"},t[36]=G,t[37]=Y,t[38]=v):v=t[38];let K;t[39]!==e?(K=e("settings.roles.columnPermissions"),t[39]=e,t[40]=K):K=t[40];let L;t[41]!==e?(L=j=>{if(j.kind==="builtin")return j.role.role==="owner"||j.role.role==="admin"?s.jsx("span",{className:"text-sm text-muted-foreground",children:e("settings.roles.fullAccess")}):s.jsx("span",{className:"text-sm text-muted-foreground",children:e("settings.roles.basicAccess")});const y=j.role,ee=[];return y.allowsAllStaticPermissions?ee.push(e("settings.roles.fullOrgAccess")):y.staticPermissionCount&&y.staticPermissionCount>0&&ee.push(e("settings.roles.orgPermsCount",{count:y.staticPermissionCount})),y.allowsAllConnections?ee.push(e("settings.roles.allConnections")):y.connectionCount&&y.connectionCount>0&&ee.push(e("settings.roles.connectionCount",{count:y.connectionCount})),s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:ee.length>0?ee.join(", "):e("settings.roles.noPermissions")})},t[41]=e,t[42]=L):L=t[42];let z;t[43]!==K||t[44]!==L?(z={id:"permissions",header:K,render:L,cellClassName:"flex-1 min-w-0"},t[43]=K,t[44]=L,t[45]=z):z=t[45];let V;t[46]!==e?(V=e("settings.roles.columnMembers"),t[46]=e,t[47]=V):V=t[47];let k;t[48]!==V?(k={id:"members",header:V,render:Zs,cellClassName:"w-24 shrink-0"},t[48]=V,t[49]=k):k=t[49];let B;t[50]!==e?(B={id:"actions",header:"",render:j=>j.kind==="builtin"?null:s.jsxs(wt,{children:[s.jsx(Gt,{asChild:!0,children:s.jsx(ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:qs,children:s.jsx(Bt,{size:16})})}),s.jsx(Ut,{align:"end",onClick:Hs,children:s.jsxs(kt,{variant:"destructive",onClick:()=>{const y=j.role;y.id&&o({id:y.id,label:y.label})},children:[s.jsx(Vt,{size:16}),e("settings.roles.delete")]})})]}),cellClassName:"w-12 shrink-0"},t[50]=e,t[51]=B):B=t[51];let $;t[52]!==U||t[53]!==v||t[54]!==z||t[55]!==k||t[56]!==B?($=[U,v,z,k,B],t[52]=U,t[53]=v,t[54]=z,t[55]=k,t[56]=B,t[57]=$):$=t[57];const J=$;let te;t[58]!==h?(te=j=>{if(j.kind==="builtin")h(`builtin-${j.role.role}`);else{const y=j.role;h(y.id)}},t[58]=h,t[59]=te):te=t[59];const oe=te;if(R){let j;t[60]!==h?(j=()=>h(void 0),t[60]=h,t[61]=j):j=t[61];let y;return t[62]!==_||t[63]!==h?(y=()=>{_(),h(void 0)},t[62]=_,t[63]=h,t[64]=y):y=t[64],s.jsx(Ys,{target:R,onBack:j,onSaved:y},zs(R))}let F;t[65]!==e?(F=e("settings.roles.searchPlaceholder"),t[65]=e,t[66]=F):F=t[66];let W;t[67]===Symbol.for("react.memo_cache_sentinel")?(W=j=>{j.key==="Escape"&&(r(""),j.target.blur())},t[67]=W):W=t[67];let E;t[68]!==l||t[69]!==F?(E=s.jsx(ze,{value:l,onChange:r,placeholder:F,className:"w-full md:w-[375px]",onKeyDown:W}),t[68]=l,t[69]=F,t[70]=E):E=t[70];let w;t[71]!==h?(w=()=>h("new"),t[71]=h,t[72]=w):w=t[72];let H;t[73]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(Be,{size:16}),t[73]=H):H=t[73];let q;t[74]!==e?(q=e("settings.roles.createRole"),t[74]=e,t[75]=q):q=t[75];let se;t[76]!==w||t[77]!==q?(se=s.jsxs(ae,{onClick:w,children:[H,q]}),t[76]=w,t[77]=q,t[78]=se):se=t[78];let le;t[79]!==E||t[80]!==se?(le=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[E,se]}),t[79]=E,t[80]=se,t[81]=le):le=t[81];let ne;t[82]!==l||t[83]!==e?(ne=l?s.jsx(st,{title:e("settings.roles.noRolesFound"),description:e("settings.roles.noRolesMatchSearch",{search:l})}):s.jsx(st,{title:e("settings.roles.noRoles"),description:e("settings.roles.createRoleGetStarted")}),t[82]=l,t[83]=e,t[84]=ne):ne=t[84];let me;t[85]!==N||t[86]!==J||t[87]!==oe||t[88]!==ne?(me=s.jsx(Yt,{columns:J,data:N,isLoading:!1,onRowClick:oe,emptyState:ne}),t[85]=N,t[86]=J,t[87]=oe,t[88]=ne,t[89]=me):me=t[89];const Ue=n!==null;let Le;t[90]===Symbol.for("react.memo_cache_sentinel")?(Le=j=>!j&&o(null),t[90]=Le):Le=t[90];let ue;t[91]!==e?(ue=e("settings.roles.deleteRoleTitle"),t[91]=e,t[92]=ue):ue=t[92];let fe;t[93]!==ue?(fe=s.jsx(ut,{children:ue}),t[93]=ue,t[94]=fe):fe=t[94];const ke=n?.label??"";let ge;t[95]!==e||t[96]!==ke?(ge=e("settings.roles.deleteRoleConfirm",{role:ke}),t[95]=e,t[96]=ke,t[97]=ge):ge=t[97];let Te;t[98]!==ge?(Te=s.jsx(ft,{children:ge}),t[98]=ge,t[99]=Te):Te=t[99];let _e;t[100]!==fe||t[101]!==Te?(_e=s.jsxs(gt,{children:[fe,Te]}),t[100]=fe,t[101]=Te,t[102]=_e):_e=t[102];let he;t[103]!==e?(he=e("settings.roles.cancel"),t[103]=e,t[104]=he):he=t[104];let Ee;t[105]!==he?(Ee=s.jsx(Tt,{children:he}),t[105]=he,t[106]=Ee):Ee=t[106];let Ie;t[107]!==i||t[108]!==n?(Ie=()=>{n?.id&&i.mutate(n.id),o(null)},t[107]=i,t[108]=n,t[109]=Ie):Ie=t[109];let xe;t[110]!==e?(xe=e("settings.roles.delete"),t[110]=e,t[111]=xe):xe=t[111];let pe;t[112]!==Ie||t[113]!==xe?(pe=s.jsx(_t,{onClick:Ie,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:xe}),t[112]=Ie,t[113]=xe,t[114]=pe):pe=t[114];let Re;t[115]!==Ee||t[116]!==pe?(Re=s.jsxs(ht,{children:[Ee,pe]}),t[115]=Ee,t[116]=pe,t[117]=Re):Re=t[117];let Se;t[118]!==_e||t[119]!==Re?(Se=s.jsxs(mt,{children:[_e,Re]}),t[118]=_e,t[119]=Re,t[120]=Se):Se=t[120];let Ae;t[121]!==Ue||t[122]!==Se?(Ae=s.jsx(dt,{open:Ue,onOpenChange:Le,children:Se}),t[121]=Ue,t[122]=Se,t[123]=Ae):Ae=t[123];let ye;return t[124]!==le||t[125]!==me||t[126]!==Ae?(ye=s.jsxs(at,{group:"members",className:"gap-6",children:[le,me,Ae]}),t[124]=le,t[125]=me,t[126]=Ae,t[127]=ye):ye=t[127],ye}function Hs(t){return t.stopPropagation()}function qs(t){return t.stopPropagation()}function Zs(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.role.memberCount})}function Js(t){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:Z("size-2.5 rounded-full shrink-0",ct(t.role.role,t.kind==="builtin"))}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.role.label}),t.kind==="builtin"&&s.jsx(it,{size:12,className:"text-muted-foreground shrink-0"})]})}function Ws(t,e){Ye("role_delete_failed",{role_id:e,error:t instanceof Error?t.message:String(t)}),Ce.error(t instanceof Error?t.message:"Failed to delete role")}function Xs(){const t=X.c(13),e=ie();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[0]=l):l=t[0];const{role:r}=rt(l);let n;t[1]!==e?(n=e("settings.roles.failedToLoad"),t[1]=e,t[2]=n):n=t[2];let o;t[3]!==n?(o=s.jsx(Ne,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:n})})}),t[3]=n,t[4]=o):o=t[4];let c;t[5]!==r?(c=r?s.jsx(Ne,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Oe,{className:"size-8 text-muted-foreground"})})}):s.jsx(at,{group:"members",className:"gap-6",children:s.jsx(Dt,{})}),t[5]=r,t[6]=c):c=t[6];let u;t[7]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx($s,{}),t[7]=u):u=t[7];let f;t[8]!==c?(f=s.jsx(Q.Suspense,{fallback:c,children:u}),t[8]=c,t[9]=f):f=t[9];let d;return t[10]!==o||t[11]!==f?(d=s.jsx(Pt,{fallback:o,children:f}),t[10]=o,t[11]=f,t[12]=d):d=t[12],d}function Ro(){const t=X.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Fs,{area:"roles",children:s.jsx(Xs,{})}),t[0]=e):e=t[0],e}export{Ro as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ae as a,ah as t,ag as e,af as c,ak as d,ai as p,ao as m}from"./index-
|
|
1
|
+
import{ae as a,ah as t,ag as e,af as c,ak as d,ai as p,ao as m}from"./index-BZsplvNT.js";const s=500;a({title:e().max(s),url:e().max(s),icon:e().max(s)});a({registries:d(e().max(s),a({enabled:t()})).describe("Per-registry enabled/disabled state. Key is connection ID. Absent registries are treated as enabled."),blockedMcps:c(e().max(s)).describe("List of MCP app_name or app_id values to hide from the store.")});const i=a({keyId:e().max(s),modelId:e().max(s),title:e().max(s).optional()}).nullable();p(["fast","smart","thinking","image","web_search","deep_research"]);p(["fast","smart","thinking"]);const _=a({tiers:a({fast:i,smart:i,thinking:i,image:i,web_search:i,deep_research:i})});a({tiers:a({fast:i.optional(),smart:i.optional(),thinking:i.optional()})});a({ids:c(e().max(s)).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});const y=a({demo_mode:t().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),reports_only:t().optional().describe("Curated commerce (reports) look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),reviewer_enabled:t().optional().describe("Run the Reviewer on a task's pull request once it's In Review — it reviews the code with the repo's stack-appropriate skills, fixes what it finds on the PR's own branch, then exercises the change on the deploy preview and approves or hands the card to a human."),qa_agent_enabled:t().optional().describe("Deprecated: see reviewer_enabled."),code_reviewer_enabled:t().optional().describe("Deprecated: see reviewer_enabled."),auto_merge:t().optional().describe("When the Reviewer approves a task's pull request, merge it automatically instead of leaving the merge to a human."),auto_resolve_conflicts:t().optional().describe("When an approved pull request can't be merged because it conflicts with its base branch, hand it back to the Super Agent to resolve the conflict (check out the branch, merge the base, push). Unset, it follows `auto_merge`; set it explicitly to run one without the other."),cheap_reviewer_model:t().optional().describe("Run the Reviewer on a cheaper model than the Super Agent that wrote the code. On by default — turning it off trades cost for some review depth."),coding_agent_org_mcps:t().optional().describe("Give a coding-agent run (the claude-code harness in a sandbox) every MCP connection in the org as its own MCP server, on top of the narrow task-run surface it always gets. Off by default: each connection is one more server the agent connects to at session start, and all of their tools land in its context."),coding_agents_claude_code:t().optional().describe("Run chats on a Code Agent (an agent imported from a GitHub repo) with the claude-code harness inside its sandbox, instead of hosted Decopilot. Off by default: it changes the runtime of every such chat, and claude-code flushes whole turns rather than streaming tokens."),auto_assign_report_tasks_to_super_agent:t().optional().describe("When a report import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned."),hosting_enabled:t().optional().describe("Per-site Hosting tab (deployments, domains, deploy outcomes). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),deco_analytics_enabled:t().optional().describe("Per-site Deco Analytics tab (traffic, realtime, usage & limits). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),e2e_enabled:t().optional().describe("Per-site E2E tab (end-to-end test runs). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),monitor_enabled:t().optional().describe("Per-site Monitor tab (CDN Performance + Audience from the stats-lake warehouse). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. Its own deployment-wide switch `MONITOR_GA` opens it to every org at once (independent of the control-plane trio)."),delivery_lanes_enabled:t().optional().describe("Board lanes for shipping: Approved, Merged and Post-deploy Validation sit between In Review and Done, and a merged pull request lands on Merged instead of Done. For teams whose release process continues after the merge. Off by default — with it off the board and the state machine behave exactly as if the lanes did not exist."),cms_auto_fresh_branch:t().optional().describe("When a user opens the CMS on a branch whose last commit is older than the staleness window (2 days), move the session to a freshly minted branch cut from the default branch. The stale branch is left intact on GitHub. Off by default.")}),b=new Set(["reviewer_enabled","cheap_reviewer_model"]);function v(n,r){const h=n?.[r];return b.has(r)?h!==!1:h===!0}function w(n){const r=n?.auto_resolve_conflicts;return typeof r=="boolean"?r:n?.auto_merge===!0}const l=256*1024,u=50,o=500,f=5e3;a({id:e().describe("Brand context ID"),name:e().max(o).describe("Company name"),domain:e().max(o).describe("Company domain (e.g. example.com)"),overview:e().max(f).describe("Company overview / description"),logo:e().max(o).nullable().optional().describe("Logo URL"),favicon:e().max(o).nullable().optional().describe("Favicon URL"),ogImage:e().max(o).nullable().optional().describe("OG image URL"),fonts:a({heading:e().max(o).optional().describe("Font family for headings"),body:e().max(o).optional().describe("Font family for body text"),code:e().max(o).optional().describe("Font family for code / monospace")}).nullable().optional().describe("Font families by semantic role"),colors:a({primary:e().max(o).optional().describe("Primary brand color (hex)"),secondary:e().max(o).optional().describe("Secondary brand color (hex)"),accent:e().max(o).optional().describe("Accent / highlight color (hex)"),background:e().max(o).optional().describe("Background color (hex)"),foreground:e().max(o).optional().describe("Foreground / text color (hex)")}).nullable().optional().describe("Semantic color palette"),images:c(d(e(),m())).max(u).nullable().optional().refine(n=>n==null||JSON.stringify(n).length<=l,{message:`images must serialize to at most ${l} bytes`}).describe("Brand images"),metadata:d(e(),m()).nullable().optional().refine(n=>n==null||JSON.stringify(n).length<=l,{message:`metadata must serialize to at most ${l} bytes`}).describe("Extra design tokens (typography, components, spacing, layout, tone, etc.)"),archivedAt:e().nullable().optional().describe("Archive timestamp (null to unarchive)"),isDefault:t().optional().describe("Whether this is the default brand for the organization")});export{b as D,y as O,_ as S,w as a,v as o};
|