decocms 3.21.2 → 3.21.3
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-GyiOEtAj.js → AlertCircle-CPDzwcNm.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DlUPHWCe.js → ArrowUpRight-ShCMNuxq.js} +1 -1
- package/dist/client/assets/{Check-COv5M0lh.js → Check-notD5fT5.js} +1 -1
- package/dist/client/assets/{CheckCircle-ChsHFiFQ.js → CheckCircle-8aHxGN9L.js} +1 -1
- package/dist/client/assets/{ChevronDown-BdEaOOXp.js → ChevronDown-DagjZ4eX.js} +1 -1
- package/dist/client/assets/{ChevronLeft-B8kAn6JD.js → ChevronLeft-BaqaOx9Y.js} +1 -1
- package/dist/client/assets/{ChevronRight-o4nZK4mj.js → ChevronRight-DVtjidio.js} +1 -1
- package/dist/client/assets/{ChevronUp-y4zusQsp.js → ChevronUp-BMDnNzvq.js} +1 -1
- package/dist/client/assets/{Container-CqLkbSjr.js → Container-D6z1XWRo.js} +1 -1
- package/dist/client/assets/{DotsVertical-W4F6Fa4e.js → DotsVertical-BJhFy0Ao.js} +1 -1
- package/dist/client/assets/{Eye-f801Ko_Z.js → Eye-BB6Aus5x.js} +1 -1
- package/dist/client/assets/{FilterLines-CdYz7NJH.js → FilterLines-DMByO-IA.js} +1 -1
- package/dist/client/assets/{Globe01-BfG_Acce.js → Globe01-CIsVQmOA.js} +1 -1
- package/dist/client/assets/{HardDrive-D9UXv7dX.js → HardDrive-DuCt5CIe.js} +1 -1
- package/dist/client/assets/{Key01-B5dV9ECL.js → Key01-CngsxG29.js} +1 -1
- package/dist/client/assets/{LayoutLeft-B60p8Um4.js → LayoutLeft-DgM7tZde.js} +1 -1
- package/dist/client/assets/{LinkExternal01-6cFTncDa.js → LinkExternal01-CQF0MYqY.js} +1 -1
- package/dist/client/assets/{Monitor01-Cc4WDpkR.js → Monitor01-CT1u4DKh.js} +1 -1
- package/dist/client/assets/{Palette--vnxJff4.js → Palette-GNFXWUwf.js} +1 -1
- package/dist/client/assets/{Play-C7HtzLaD.js → Play-QmNwPHc_.js} +1 -1
- package/dist/client/assets/{Plus-LwySGDxB.js → Plus-Dppw3z2O.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-CqQ0_ss_.js → RefreshCcw01-BEoOvUD1.js} +1 -1
- package/dist/client/assets/{SearchMd-MshnFe0l.js → SearchMd-FY1Qclyu.js} +1 -1
- package/dist/client/assets/{Settings02-StPTnFMx.js → Settings02-ocCz49Kz.js} +1 -1
- package/dist/client/assets/{Shield01-T0cQG3gR.js → Shield01-BzHglsiw.js} +1 -1
- package/dist/client/assets/{Star01-DBs_rPC7.js → Star01-BlvJ3i4w.js} +1 -1
- package/dist/client/assets/{Stars01-DHlDpyBS.js → Stars01-DukS22FM.js} +1 -1
- package/dist/client/assets/{Stars02-B2A2nE0X.js → Stars02-De2-tT4k.js} +1 -1
- package/dist/client/assets/{Sun-Deye0C8A.js → Sun-BcFWhCSK.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CXh2-ORd.js → SwitchHorizontal01-D-Tt77nJ.js} +1 -1
- package/dist/client/assets/{Tool01-nSGgZsVX.js → Tool01-BJXGaU-M.js} +1 -1
- package/dist/client/assets/{Trash01-DZfkybKU.js → Trash01-CZnJ0avm.js} +1 -1
- package/dist/client/assets/{Upload01-rVUdt3iJ.js → Upload01-76tsCZMd.js} +1 -1
- package/dist/client/assets/{User01-NlAzTddi.js → User01-CWOXdoG4.js} +1 -1
- package/dist/client/assets/{Users01-DaydqXQC.js → Users01-WG_iZnJh.js} +1 -1
- package/dist/client/assets/{Users03-BRSJ5vR7.js → Users03-AoZrK_H4.js} +1 -1
- package/dist/client/assets/{X-BN3arG6T.js → X-B0rYwlAH.js} +1 -1
- package/dist/client/assets/{XCircle-xmKSYZKr.js → XCircle-7rwkbF3y.js} +1 -1
- package/dist/client/assets/{XClose-1qd9ainB.js → XClose-DFcy3zV5.js} +1 -1
- package/dist/client/assets/{Zap-CYUIBMS-.js → Zap-DkP77k_W.js} +1 -1
- package/dist/client/assets/{ZapSquare-DsZrIKGl.js → ZapSquare-1g_0m2Au.js} +1 -1
- package/dist/client/assets/{ZoomOut-CVKSaoni.js → ZoomOut-B72QEIIU.js} +1 -1
- package/dist/client/assets/{access-gate-CweS51cI.js → access-gate-CzWH8hLh.js} +1 -1
- package/dist/client/assets/{accordion-Bl7Yi6C4.js → accordion-DmyLwYep.js} +1 -1
- package/dist/client/assets/{add-section-modal-uFfZJI5Z.js → add-section-modal-BwyDPP_M.js} +1 -1
- package/dist/client/assets/{agent-capabilities-D2XTyDA4.js → agent-capabilities-xX47CwbD.js} +1 -1
- package/dist/client/assets/{agent-icon-K7-2Vanq.js → agent-icon-CMmthzuk.js} +1 -1
- package/dist/client/assets/{agent-icons-CeKYocvB.js → agent-icons-kCVtwvlc.js} +1 -1
- package/dist/client/assets/{agents-list-SW53IbcR.js → agents-list-DAgV94Pu.js} +1 -1
- package/dist/client/assets/{ai-providers-CRMVj1sW.js → ai-providers-OepmZUy0.js} +1 -1
- package/dist/client/assets/{alert-dialog-CJQaL6p3.js → alert-dialog-BqYd6k15.js} +1 -1
- package/dist/client/assets/{alert-CyRuR44t.js → alert-kB1ztaR5.js} +1 -1
- package/dist/client/assets/app-editor-XgVpEUlu.js +1 -0
- package/dist/client/assets/{auth-catchall-C0LPYH9l.js → auth-catchall-CA2oimt4.js} +1 -1
- package/dist/client/assets/{auth-split-layout-B0BicaKX.js → auth-split-layout-g9cK_SyP.js} +1 -1
- package/dist/client/assets/{automation-list-row-DO-WP7Ai.js → automation-list-row-Bfqyr7I3.js} +1 -1
- package/dist/client/assets/{automation-runs-eraj829k.js → automation-runs-NbYM1cjn.js} +1 -1
- package/dist/client/assets/{automations-BVY79yPk.js → automations-C7jEtNny.js} +1 -1
- package/dist/client/assets/{avatar-BdxyYnNK.js → avatar-GhNVlFfA.js} +1 -1
- package/dist/client/assets/{badge-CS2sZUxN.js → badge-Dwfe01sI.js} +1 -1
- package/dist/client/assets/{brand-context-CjWlWxwt.js → brand-context-5t0UmL9A.js} +1 -1
- package/dist/client/assets/{buckets-BGHRc7Um.js → buckets-BbeD50DH.js} +1 -1
- package/dist/client/assets/{calendar-DczL_N_A.js → calendar-DUj5Hjlg.js} +1 -1
- package/dist/client/assets/{capability-load-error-DNJuBq-F.js → capability-load-error-DU6WRPuJ.js} +1 -1
- package/dist/client/assets/{card-Br94nOKg.js → card-lBnnILto.js} +1 -1
- package/dist/client/assets/{chat-context-DA35HLXS.js → chat-context-sLONPn-0.js} +1 -1
- package/dist/client/assets/{checkbox-CqOCOG6Q.js → checkbox-B0Z95T9p.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BVqxZix5.js → cli-auth-success-EC1gaXEN.js} +1 -1
- package/dist/client/assets/{collection-detail-CynKMc1R.js → collection-detail-COeu5gwR.js} +1 -1
- package/dist/client/assets/{collection-display-button-Cv9SNAbw.js → collection-display-button-D_AdA-xg.js} +1 -1
- package/dist/client/assets/{collection-search-ChKSSxmH.js → collection-search-DEQMWm_z.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DGk9I-x6.js → collection-table-wrapper-L2lki_mC.js} +1 -1
- package/dist/client/assets/{collection-tabs-C5s6I9ON.js → collection-tabs-BLluwkr_.js} +1 -1
- package/dist/client/assets/{collections-Dk6dLEYA.js → collections-t21R7Da7.js} +1 -1
- package/dist/client/assets/{command-BS0mokMv.js → command-De_vHwL2.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-DpF_sI6h.js → connect-desktop-dialog-DT9M25jO.js} +1 -1
- package/dist/client/assets/{connection-card-CFu6MAht.js → connection-card-HxhqgvOF.js} +1 -1
- package/dist/client/assets/{connection-detail-Bavv4Ydp.js → connection-detail-C9F-N40Y.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-C3EFMKqC.js → connection-form-helpers-BMXuAyPa.js} +1 -1
- package/dist/client/assets/{connections-BTIddADu.js → connections-R13TTVYD.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-CZFgZ3nE.js → decopilot-sse-pool-D3C-kBei.js} +1 -1
- package/dist/client/assets/{dialog-CL1BseA9.js → dialog-B3n4osS2.js} +1 -1
- package/dist/client/assets/{domain-settings-BnveJoGD.js → domain-settings-D2tBGsHy.js} +1 -1
- package/dist/client/assets/{drawer-C9J2FQkF.js → drawer-DVtZCj6U.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DVje-EoW.js → dropdown-menu-C0lExS63.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-WHfaSv1Y.js → dynamic-plugin-layout-Bd7E6PZe.js} +1 -1
- package/dist/client/assets/{empty-state-Bv1Z9MXv.js → empty-state-Cigz9ucf.js} +1 -1
- package/dist/client/assets/{empty-state-DpAFEVjw.js → empty-state-q0Pbk8UD.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CrV9u96Z.js → extract-connection-data-PFgGg6kx.js} +1 -1
- package/dist/client/assets/{features-BEAGHXsv.js → features-B_D2RqKH.js} +1 -1
- package/dist/client/assets/{file-explorer-BwsVi5Sn.js → file-explorer-DwYs1O3Y.js} +1 -1
- package/dist/client/assets/{file-type-icon-DVYPih9c.js → file-type-icon-CE1JVL_T.js} +1 -1
- package/dist/client/assets/{files-10ME_3JG.js → files-CMa9vZqb.js} +1 -1
- package/dist/client/assets/{form-4UXcNbUg.js → form-BDTBUfjP.js} +1 -1
- package/dist/client/assets/{general-CWwyMwhB.js → general-DuuKH-Lu.js} +1 -1
- package/dist/client/assets/{generate-id-CVdT0fIQ.js → generate-id-B00Lqcz6.js} +1 -1
- package/dist/client/assets/{github-repo-picker-DD8wItvg.js → github-repo-picker-CiY30Vug.js} +1 -1
- package/dist/client/assets/{header-tab-button-DgECRSSy.js → header-tab-button-P7xz_OdB.js} +1 -1
- package/dist/client/assets/{hover-card-BA4UtY_2.js → hover-card-BuyKR5LS.js} +1 -1
- package/dist/client/assets/{image-field-U7AFL_og.js → image-field-BKg_4VXm.js} +1 -1
- package/dist/client/assets/{index-DD8pNQTz.js → index-BGZfQmzG.js} +1 -1
- package/dist/client/assets/{index-COXkGBKF.js → index-BZQmTAzr.js} +1 -1
- package/dist/client/assets/{index-4cfzvyaB.js → index-Bo8GgkCy.js} +1 -1
- package/dist/client/assets/{index-BQoodOft.js → index-BwI2_EhO.js} +1 -1
- package/dist/client/assets/{index-CuZbHxuM.js → index-CKYhesP2.js} +1 -1
- package/dist/client/assets/{index-BKKTxT9B.js → index-CP5nxTWj.js} +1 -1
- package/dist/client/assets/{index-BQ89iNpK.js → index-CSU1Z8Qf.js} +1 -1
- package/dist/client/assets/{index-BBFvsGUO.js → index-CXAAlsD9.js} +1 -1
- package/dist/client/assets/{index-DYMkejmQ.js → index-CZFRR26-.js} +1 -1
- package/dist/client/assets/{index-_z9AfqD0.js → index-Cbyz112R.js} +1 -1
- package/dist/client/assets/{index-DinTmsRi.js → index-D8AZU2vU.js} +4 -4
- package/dist/client/assets/{index-BK7hwLt0.js → index-DI-ETavs.js} +1 -1
- package/dist/client/assets/{index-DC5ykVbq.js → index-DKa2bYTS.js} +3 -3
- package/dist/client/assets/{index-DsK69xEH.js → index-DfIw3rZP.js} +1 -1
- package/dist/client/assets/{index-redirect-BYXba1LQ.js → index-redirect-BW-9U163.js} +1 -1
- package/dist/client/assets/{index-CAfQQdyv.js → index-wz9jNcYo.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BFBhoWbn.js → infiniteQueryObserver-CAoHOrzQ.js} +1 -1
- package/dist/client/assets/{input-CmdQXS7m.js → input-BjUn5ElR.js} +1 -1
- package/dist/client/assets/{integration-icon-DubrPseB.js → integration-icon-CxZb-fPL.js} +1 -1
- package/dist/client/assets/{label-BeKFq4Z_.js → label-kHH3gI2u.js} +1 -1
- package/dist/client/assets/{layout-8ZlqaeBv.js → layout-B6WN2IOm.js} +1 -1
- package/dist/client/assets/{login-Xkc831VM.js → login-DkvZH0k5.js} +1 -1
- package/dist/client/assets/{members-8soouHex.js → members-KnkycCao.js} +1 -1
- package/dist/client/assets/{monaco-editor-B-nbM8Ue.js → monaco-editor-DYGOFuTO.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-pLl4ltj8.js → monitoring-stats-row-CLmZT1As.js} +1 -1
- package/dist/client/assets/{oauth-callback-m-HDC-da.js → oauth-callback-Cr_yeFgN.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DgTV983m.js → oauth-callback-ai-provider-BrYkYKpa.js} +1 -1
- package/dist/client/assets/{onboarding-CJD62kRn.js → onboarding-C2HWtNhq.js} +1 -1
- package/dist/client/assets/{org-install-rd8eLbo7.js → org-install-Ds2eKuZ9.js} +1 -1
- package/dist/client/assets/{org-layout-DeIWaN_p.js → org-layout-CWlJCCTr.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-LtGGGoMB.js → org-plugin-layout-DXvLF6tF.js} +1 -1
- package/dist/client/assets/{page-seo-form-BkwbUlnR.js → page-seo-form-gwUc3t6W.js} +1 -1
- package/dist/client/assets/page-seo-sheet-D3VNLk-W.js +1 -0
- package/dist/client/assets/{pair-DE0D0Wie.js → pair-0yfESYcy.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CyD0C1Bf.js → plugin-empty-state-BKFo--oT.js} +1 -1
- package/dist/client/assets/{plugin-header-W1I2_V_j.js → plugin-header-Lxzh4dkA.js} +1 -1
- package/dist/client/assets/{plugin-layout-B4yAz-3-.js → plugin-layout-u2AXSeK4.js} +1 -1
- package/dist/client/assets/{popover-Dp3QS8N6.js → popover-B-ZF248I.js} +1 -1
- package/dist/client/assets/{post-editor-DR83fZSH.js → post-editor-CZlHz9jV.js} +1 -1
- package/dist/client/assets/{primitives-iMjdQad6.js → primitives-yLIBPquV.js} +1 -1
- package/dist/client/assets/{profile-eau3k4Po.js → profile-Dr7PSo2c.js} +1 -1
- package/dist/client/assets/{project-app-view-CRvOiu2b.js → project-app-view-CjNYmwJu.js} +1 -1
- package/dist/client/assets/record-editor-D3YkaDAS.js +1 -0
- package/dist/client/assets/registry-DZI6kLp4.js +2 -0
- package/dist/client/assets/{registry-layout-BmSXJxoZ.js → registry-layout-BfSrEMey.js} +1 -1
- package/dist/client/assets/{require-capability-bCqnmJfy.js → require-capability-AhMmvh6N.js} +1 -1
- package/dist/client/assets/{required-auth-layout-D7jgv78c.js → required-auth-layout-1NjGJ1GA.js} +1 -1
- package/dist/client/assets/{reset-password-D28fxRQV.js → reset-password-BJ3JyWvy.js} +1 -1
- package/dist/client/assets/{resizable-Cd48I16F.js → resizable-CDnnGLy_.js} +1 -1
- package/dist/client/assets/{roles-gGKNgLrN.js → roles-DSakMOYs.js} +1 -1
- package/dist/client/assets/save-referenced-block-D8z6Kvhe.js +1 -0
- package/dist/client/assets/{save-status-B5l1r2yt.js → save-status-Bhokzo-6.js} +1 -1
- package/dist/client/assets/{schema-form-DoBelrVG.js → schema-form-BdhlzGvI.js} +1 -1
- package/dist/client/assets/{scroll-area-P07qVNiz.js → scroll-area-C2jindzS.js} +1 -1
- package/dist/client/assets/{search-input-BC00SFbU.js → search-input-C7EV5zgy.js} +1 -1
- package/dist/client/assets/{secrets-C14kJLTf.js → secrets-BeMofwrf.js} +1 -1
- package/dist/client/assets/{sections-editor-BXkiyOGf.js → sections-editor-D-D4fXgu.js} +1 -1
- package/dist/client/assets/{select-n15H_mpn.js → select-PwFJPxWI.js} +1 -1
- package/dist/client/assets/{select-model-D5qi4yVr.js → select-model-Cj0XuQ9B.js} +1 -1
- package/dist/client/assets/{seo-editor-D-F0mviD.js → seo-editor-BTy_Py6L.js} +1 -1
- package/dist/client/assets/{settings-layout-pqyPhxP-.js → settings-layout-JnI_wktk.js} +1 -1
- package/dist/client/assets/{settings-section-Tanq8jyR.js → settings-section-CcsLWjfi.js} +1 -1
- package/dist/client/assets/{sheet-D4rfwRUO.js → sheet-Dlzq2DLm.js} +1 -1
- package/dist/client/assets/{shell-controls-mDSWSVmf.js → shell-controls-D69Fs-y1.js} +1 -1
- package/dist/client/assets/{shell-layout-BwqpmibN.js → shell-layout-U6oRxAp4.js} +1 -1
- package/dist/client/assets/{shell-route-loading-BcS4ogVM.js → shell-route-loading-Bk2X9n-X.js} +1 -1
- package/dist/client/assets/{sidebar-BROkYxtG.js → sidebar-wL4mjwdl.js} +1 -1
- package/dist/client/assets/{skeleton-DWOWMile.js → skeleton-Bjc1-vnR.js} +1 -1
- package/dist/client/assets/{sortable.esm-QhdKIQMp.js → sortable.esm-BaLGniPk.js} +1 -1
- package/dist/client/assets/{spinner-CtVtBijD.js → spinner-Cerb4AAl.js} +1 -1
- package/dist/client/assets/{sso-iKeLtq8V.js → sso-B8r0KeHz.js} +1 -1
- package/dist/client/assets/{store-D_M-OYO8.js → store-DZoqqgcV.js} +1 -1
- package/dist/client/assets/store-registry-Cn9W0z9v.js +2 -0
- package/dist/client/assets/{switch-QoxQ4Dp8.js → switch-AaQYpmii.js} +1 -1
- package/dist/client/assets/{tab-id-CNkO3hVN.js → tab-id-ClQkYZph.js} +11 -11
- package/dist/client/assets/{table-BsrEIQdy.js → table-tXZdu4xg.js} +1 -1
- package/dist/client/assets/{tabs-kJyWL6V1.js → tabs-DgRLyNv0.js} +1 -1
- package/dist/client/assets/{task-status-j0388nBE.js → task-status-D2UHrjIr.js} +1 -1
- package/dist/client/assets/{textarea-IFOxZRFP.js → textarea-BVmeWwVH.js} +1 -1
- package/dist/client/assets/{toggle-group--w1kOZWe.js → toggle-group-DsBG4yXK.js} +1 -1
- package/dist/client/assets/{toolbar-BBxreRsk.js → toolbar-DimPrw2d.js} +1 -1
- package/dist/client/assets/{tools-list-DJXjW2l9.js → tools-list-CRWK46bj.js} +1 -1
- package/dist/client/assets/{tooltip-D7cmoHaE.js → tooltip-CRGezvtE.js} +1 -1
- package/dist/client/assets/{types-BmGja53h.js → types-DfZ9L9F4.js} +1 -1
- package/dist/client/assets/{use-ai-providers--CmHEwAc.js → use-ai-providers-Bft4iAI7.js} +1 -1
- package/dist/client/assets/{use-automations-BuOkYpgz.js → use-automations-BgW6aFoA.js} +1 -1
- package/dist/client/assets/{use-capability-CxysHd_P.js → use-capability-D76L9anx.js} +1 -1
- package/dist/client/assets/{use-collections-BOfrARHt.js → use-collections-Ciodw5T-.js} +1 -1
- package/dist/client/assets/{use-connection-n0123jPK.js → use-connection-D5VghmN_.js} +1 -1
- package/dist/client/assets/{use-copy-B0vwFN4z.js → use-copy-C6l9b4AS.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-D-CNGeek.js → use-create-virtual-mcp-DQu9pTfE.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-D2Tk122B.js → use-debounced-autosave-Ckz0uq-7.js} +1 -1
- package/dist/client/assets/{use-delete-connection-C4A0wxBY.js → use-delete-connection-BuJlJzk2.js} +1 -1
- package/dist/client/assets/{use-file-configs-CyyHbhaI.js → use-file-configs-DWr7ryUj.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CdSYgiPG.js → use-infinite-scroll-ILdTUQK_.js} +1 -1
- package/dist/client/assets/{use-list-state-eagOZcTM.js → use-list-state-M2tYjik0.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DyuH8eE6.js → use-mcp-client-8Mk4_07F.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-Bwn_S6iL.js → use-mcp-prompts-qMmlGT6D.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DC6ktQK8.js → use-mcp-tools-6tSV8bBT.js} +1 -1
- package/dist/client/assets/{use-members-BzP8QLPf.js → use-members-CmtL-7Xw.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-B09CyGqp.js → use-navigate-to-agent-GneYXT_v.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DHC5iDX4.js → use-org-auth-client-C03WsUCl.js} +1 -1
- package/dist/client/assets/{use-org-sso-qSbMZg_F.js → use-org-sso-DXytk076.js} +1 -1
- package/dist/client/assets/{use-organization-roles-SRzyOUnT.js → use-organization-roles-BGY8todC.js} +1 -1
- package/dist/client/assets/{use-organization-settings-B4dvDS7R.js → use-organization-settings-BxGa6DXL.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Bds9Ypgx.js → use-registry-connections-DPGwglYZ.js} +1 -1
- package/dist/client/assets/{use-secrets-CnpydoP_.js → use-secrets-CwGIrVHL.js} +1 -1
- package/dist/client/assets/{use-status-sounds-CK6N7rMv.js → use-status-sounds-BRiOIxZe.js} +1 -1
- package/dist/client/assets/{use-view-mode-RCfU_Ov_.js → use-view-mode-DHxUj9Og.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Dey3T-Qn.js → use-virtual-mcp-BYEJrKLt.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-D71LulL4.js +1 -0
- package/dist/client/assets/{useRouterState-Suijaaey.js → useRouterState-BypT_ylp.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CDkRkXhL.js +1 -0
- package/dist/client/assets/{user-CZuNKuKE.js → user-4ZM9LPlw.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DB4LJ27d.js → view-mode-toggle-DglPSQoj.js} +1 -1
- package/dist/client/assets/{workflow-DdHZO7TR.js → workflow-Bv3R9Ay6.js} +1 -1
- package/dist/client/assets/workflow-detail-BhI1gxl7.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +392 -390
- package/dist/server/server.js +166 -166
- package/package.json +1 -1
- package/dist/client/assets/app-editor-DrKlBV5m.js +0 -1
- package/dist/client/assets/page-seo-sheet-j1sLOOHG.js +0 -1
- package/dist/client/assets/record-editor-B-ZWb752.js +0 -1
- package/dist/client/assets/registry-B8CD131L.js +0 -2
- package/dist/client/assets/save-referenced-block-BX18LfXg.js +0 -1
- package/dist/client/assets/store-registry-DrWHKBnR.js +0 -2
- package/dist/client/assets/useInfiniteQuery-DMrx4YUI.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BEThz4gg.js +0 -1
- package/dist/client/assets/workflow-detail-DelfG9w7.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as S,c as w,j as r,r as T,bn as A,bt as H,B as P}from"./index-DC5ykVbq.js";import{i as R}from"./LayoutLeft-B60p8Um4.js";import{u as V,c as D,a as B,T as E,b as z}from"./tooltip-D7cmoHaE.js";import{b as W,d as G,S as L,c as q,a as F}from"./sheet-D4rfwRUO.js";const J="15rem",K="18rem",Q="4.5rem",k=T.createContext(null);function O(){const l=T.useContext(k);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function se(l){const e=S.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,d=s===void 0?!1:s,n=V(),[o,h]=T.useState(d),[u,g]=T.useState(!1),c=a!==void 0,b=c?a:o;let N;e[0]!==c||e[1]!==i?(N=_=>{c||h(_),i?.(_)},e[0]=c,e[1]=i,e[2]=N):N=e[2];const f=N;let j;e[3]!==n||e[4]!==b||e[5]!==f?(j=()=>{n?g(U):f(!b)},e[3]=n,e[4]=b,e[5]=f,e[6]=j):j=e[6];const y=j,m=b?"expanded":"collapsed";let p;e[7]!==n||e[8]!==b||e[9]!==u||e[10]!==f||e[11]!==m||e[12]!==y?(p={state:m,open:b,setOpen:f,isMobile:n,openMobile:u,setOpenMobile:g,toggleSidebar:y},e[7]=n,e[8]=b,e[9]=u,e[10]=f,e[11]=m,e[12]=y,e[13]=p):p=e[13];const v=p;let x;e[14]!==t?(x=r.jsx(D,{delayDuration:0,children:t}),e[14]=t,e[15]=x):x=e[15];let C;return e[16]!==v||e[17]!==x?(C=r.jsx(k.Provider,{value:v,children:x}),e[16]=v,e[17]=x,e[18]=C):C=e[18],C}function U(l){return!l}function ie(l){const e=S.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let d;e[5]!==i?(d={"--sidebar-width":J,"--sidebar-width-icon":Q,...i},e[5]=i,e[6]=d):d=e[6];const n=d;let o;e[7]!==s?(o=w("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=o):o=e[8];let h;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==o?(h=r.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:o,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=o,e[13]=h):h=e[13],h}function le(l){const e=S.c(36);let t,s,a,i,d;e[0]!==l?({side:i,variant:d,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5]);const n=i===void 0?"left":i,o=d===void 0?"sidebar":d,{isMobile:h,state:u,openMobile:g,setOpenMobile:c}=O();if(h){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":K},e[6]=C):C=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsxs(G,{className:"sr-only",children:[r.jsx(L,{children:"Sidebar"}),r.jsx(q,{children:"Displays the mobile sidebar."})]}),e[7]=_):_=e[7];let $;e[8]!==t?($=r.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let M;e[10]!==n||e[11]!==$?(M=r.jsxs(F,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[_,$]}),e[10]=n,e[11]=$,e[12]=M):M=e[12];let I;return e[13]!==g||e[14]!==a||e[15]!==c||e[16]!==M?(I=r.jsx(W,{open:g,onOpenChange:c,...a,children:M}),e[13]=g,e[14]=a,e[15]=c,e[16]=M,e[17]=I):I=e[17],I}const b=u==="expanded",N=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let f;e[18]!==N?(f=w("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",N),e[18]=N,e[19]=f):f=e[19];const j=b?void 0:"icon",y=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let m;e[20]!==s||e[21]!==y?(m=w("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=m):m=e[22];let p;e[23]!==t?(p=r.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=p):p=e[24];let v;e[25]!==a||e[26]!==m||e[27]!==p?(v=r.jsx("div",{"data-slot":"sidebar-container",className:m,...a,children:p}),e[25]=a,e[26]=m,e[27]=p,e[28]=v):v=e[28];let x;return e[29]!==n||e[30]!==u||e[31]!==f||e[32]!==j||e[33]!==v||e[34]!==o?(x=r.jsx("div",{className:f,"data-state":u,"data-collapsible":j,"data-variant":o,"data-side":n,"data-slot":"sidebar",children:v}),e[29]=n,e[30]=u,e[31]=f,e[32]=j,e[33]=v,e[34]=o,e[35]=x):x=e[35],x}function re(l){const e=S.c(18);let t,s,a;e[0]!==l?({className:t,onClick:s,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:i}=O();let d;e[4]!==t?(d=w("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==i?(n=b=>{s?.(b),i()},e[6]=s,e[7]=i,e[8]=n):n=e[8];let o,h;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(R,{}),h=r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=o,e[10]=h):(o=e[9],h=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=r.jsx(E,{asChild:!0,children:r.jsxs(P,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[o,h]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsxs(B,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",r.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(X)})]}),e[15]=g):g=e[15];let c;return e[16]!==u?(c=r.jsx(D,{delayDuration:300,children:r.jsxs(z,{children:[u,g]})}),e[16]=u,e[17]=c):c=e[17],c}function X(l){return r.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:l},l)}function ne(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function oe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function de(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ce(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function fe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ue(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function pe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function be(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function me(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Y=H("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function xe(l){const e=S.c(28);let t,s,a,i,d,n,o;e[0]!==l?({asChild:a,isActive:i,variant:d,size:n,tooltip:o,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d,e[6]=n,e[7]=o):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5],n=e[6],o=e[7]);const h=a===void 0?!1:a,u=i===void 0?!1:i,g=d===void 0?"default":d,c=n===void 0?"default":n,b=h?A:"button",{isMobile:N}=O();let f;e[8]!==t||e[9]!==c||e[10]!==g?(f=w(Y({variant:g,size:c}),t),e[8]=t,e[9]=c,e[10]=g,e[11]=f):f=e[11];let j;e[12]!==b||e[13]!==u||e[14]!==s||e[15]!==c||e[16]!==f?(j=r.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":u,className:f,...s}),e[12]=b,e[13]=u,e[14]=s,e[15]=c,e[16]=f,e[17]=j):j=e[17];const y=j;if(!o)return y;if(typeof o=="string"){let x;e[18]!==o?(x={children:o},e[18]=o,e[19]=x):x=e[19],o=x}let m;e[20]!==y?(m=r.jsx(E,{asChild:!0,children:y}),e[20]=y,e[21]=m):m=e[21];let p;e[22]!==N||e[23]!==o?(p=r.jsx(B,{side:"right",align:"center",hidden:N,...o}),e[22]=N,e[23]=o,e[24]=p):p=e[24];let v;return e[25]!==m||e[26]!==p?(v=r.jsxs(z,{children:[m,p]}),e[25]=m,e[26]=p,e[27]=v):v=e[27],v}export{ne as S,ie as a,se as b,me as c,xe as d,ue as e,pe as f,be as g,ce as h,fe as i,le as j,oe as k,de as l,re as m,O as u};
|
|
1
|
+
import{e as S,c as w,j as r,r as T,bn as A,bt as H,B as P}from"./index-DKa2bYTS.js";import{i as R}from"./LayoutLeft-DgM7tZde.js";import{u as V,c as D,a as B,T as E,b as z}from"./tooltip-CRGezvtE.js";import{b as W,d as G,S as L,c as q,a as F}from"./sheet-Dlzq2DLm.js";const J="15rem",K="18rem",Q="4.5rem",k=T.createContext(null);function O(){const l=T.useContext(k);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function se(l){const e=S.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,d=s===void 0?!1:s,n=V(),[o,h]=T.useState(d),[u,g]=T.useState(!1),c=a!==void 0,b=c?a:o;let N;e[0]!==c||e[1]!==i?(N=_=>{c||h(_),i?.(_)},e[0]=c,e[1]=i,e[2]=N):N=e[2];const f=N;let j;e[3]!==n||e[4]!==b||e[5]!==f?(j=()=>{n?g(U):f(!b)},e[3]=n,e[4]=b,e[5]=f,e[6]=j):j=e[6];const y=j,m=b?"expanded":"collapsed";let p;e[7]!==n||e[8]!==b||e[9]!==u||e[10]!==f||e[11]!==m||e[12]!==y?(p={state:m,open:b,setOpen:f,isMobile:n,openMobile:u,setOpenMobile:g,toggleSidebar:y},e[7]=n,e[8]=b,e[9]=u,e[10]=f,e[11]=m,e[12]=y,e[13]=p):p=e[13];const v=p;let x;e[14]!==t?(x=r.jsx(D,{delayDuration:0,children:t}),e[14]=t,e[15]=x):x=e[15];let C;return e[16]!==v||e[17]!==x?(C=r.jsx(k.Provider,{value:v,children:x}),e[16]=v,e[17]=x,e[18]=C):C=e[18],C}function U(l){return!l}function ie(l){const e=S.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let d;e[5]!==i?(d={"--sidebar-width":J,"--sidebar-width-icon":Q,...i},e[5]=i,e[6]=d):d=e[6];const n=d;let o;e[7]!==s?(o=w("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=o):o=e[8];let h;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==o?(h=r.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:o,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=o,e[13]=h):h=e[13],h}function le(l){const e=S.c(36);let t,s,a,i,d;e[0]!==l?({side:i,variant:d,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5]);const n=i===void 0?"left":i,o=d===void 0?"sidebar":d,{isMobile:h,state:u,openMobile:g,setOpenMobile:c}=O();if(h){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":K},e[6]=C):C=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsxs(G,{className:"sr-only",children:[r.jsx(L,{children:"Sidebar"}),r.jsx(q,{children:"Displays the mobile sidebar."})]}),e[7]=_):_=e[7];let $;e[8]!==t?($=r.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let M;e[10]!==n||e[11]!==$?(M=r.jsxs(F,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[_,$]}),e[10]=n,e[11]=$,e[12]=M):M=e[12];let I;return e[13]!==g||e[14]!==a||e[15]!==c||e[16]!==M?(I=r.jsx(W,{open:g,onOpenChange:c,...a,children:M}),e[13]=g,e[14]=a,e[15]=c,e[16]=M,e[17]=I):I=e[17],I}const b=u==="expanded",N=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let f;e[18]!==N?(f=w("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",N),e[18]=N,e[19]=f):f=e[19];const j=b?void 0:"icon",y=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let m;e[20]!==s||e[21]!==y?(m=w("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=m):m=e[22];let p;e[23]!==t?(p=r.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=p):p=e[24];let v;e[25]!==a||e[26]!==m||e[27]!==p?(v=r.jsx("div",{"data-slot":"sidebar-container",className:m,...a,children:p}),e[25]=a,e[26]=m,e[27]=p,e[28]=v):v=e[28];let x;return e[29]!==n||e[30]!==u||e[31]!==f||e[32]!==j||e[33]!==v||e[34]!==o?(x=r.jsx("div",{className:f,"data-state":u,"data-collapsible":j,"data-variant":o,"data-side":n,"data-slot":"sidebar",children:v}),e[29]=n,e[30]=u,e[31]=f,e[32]=j,e[33]=v,e[34]=o,e[35]=x):x=e[35],x}function re(l){const e=S.c(18);let t,s,a;e[0]!==l?({className:t,onClick:s,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:i}=O();let d;e[4]!==t?(d=w("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==i?(n=b=>{s?.(b),i()},e[6]=s,e[7]=i,e[8]=n):n=e[8];let o,h;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(R,{}),h=r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=o,e[10]=h):(o=e[9],h=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=r.jsx(E,{asChild:!0,children:r.jsxs(P,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[o,h]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsxs(B,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",r.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(X)})]}),e[15]=g):g=e[15];let c;return e[16]!==u?(c=r.jsx(D,{delayDuration:300,children:r.jsxs(z,{children:[u,g]})}),e[16]=u,e[17]=c):c=e[17],c}function X(l){return r.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:l},l)}function ne(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function oe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function de(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ce(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function fe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ue(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function pe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function be(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function me(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Y=H("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function xe(l){const e=S.c(28);let t,s,a,i,d,n,o;e[0]!==l?({asChild:a,isActive:i,variant:d,size:n,tooltip:o,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d,e[6]=n,e[7]=o):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5],n=e[6],o=e[7]);const h=a===void 0?!1:a,u=i===void 0?!1:i,g=d===void 0?"default":d,c=n===void 0?"default":n,b=h?A:"button",{isMobile:N}=O();let f;e[8]!==t||e[9]!==c||e[10]!==g?(f=w(Y({variant:g,size:c}),t),e[8]=t,e[9]=c,e[10]=g,e[11]=f):f=e[11];let j;e[12]!==b||e[13]!==u||e[14]!==s||e[15]!==c||e[16]!==f?(j=r.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":u,className:f,...s}),e[12]=b,e[13]=u,e[14]=s,e[15]=c,e[16]=f,e[17]=j):j=e[17];const y=j;if(!o)return y;if(typeof o=="string"){let x;e[18]!==o?(x={children:o},e[18]=o,e[19]=x):x=e[19],o=x}let m;e[20]!==y?(m=r.jsx(E,{asChild:!0,children:y}),e[20]=y,e[21]=m):m=e[21];let p;e[22]!==N||e[23]!==o?(p=r.jsx(B,{side:"right",align:"center",hidden:N,...o}),e[22]=N,e[23]=o,e[24]=p):p=e[24];let v;return e[25]!==m||e[26]!==p?(v=r.jsxs(z,{children:[m,p]}),e[25]=m,e[26]=p,e[27]=v):v=e[27],v}export{ne as S,ie as a,se as b,me as c,xe as d,ue as e,pe as f,be as g,ce as h,fe as i,le as j,oe as k,de as l,re as m,O as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as n,c,j as i}from"./index-
|
|
1
|
+
import{e as n,c,j as i}from"./index-DKa2bYTS.js";function m(o){const e=n.c(8);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=c("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=l):l=e[4];let a;return e[5]!==t||e[6]!==l?(a=i.jsx("div",{"data-slot":"skeleton",className:l,...t}),e[5]=t,e[6]=l,e[7]=a):a=e[7],a}export{m as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{q as an,b as kn,u as gr,H as mr,I as vr,j as i,B as He,o as Le,r as u,G as br,f as xr,l as It,M as Kt,J as Yt,t as ne,K as At,e as yr,p as wr,L as Cr,c as Sr,b5 as $,aU as ft}from"./index-DC5ykVbq.js";import{g as Dr}from"./connection-slug-eyAPH6o3.js";import{u as Tn,a as _n,g as jr,C as Ht}from"./connection-card-CFu6MAht.js";import{C as Rr}from"./collection-search-ChKSSxmH.js";import{C as Nr}from"./collection-tabs-C5s6I9ON.js";import{g as Ir}from"./generate-id-CVdT0fIQ.js";import{D as On,a as Mn,b as Pn,c as Ln,e as Ar,d as Er}from"./dialog-CL1BseA9.js";import{b as kr,a as Tr,c as _r,D as Or,d as Mr,e as Pr,f as Lr}from"./drawer-C9J2FQkF.js";import{u as zr,b as Wt,T as qt,a as Gt}from"./tooltip-D7cmoHaE.js";import{F as De,b as je,c as Re,d as Ne,f as Ie,a as hn}from"./form-4UXcNbUg.js";import{I as Ye}from"./input-CmdQXS7m.js";import{d as Fr,S as $r,a as Br,b as Vr,c as ut}from"./select-n15H_mpn.js";import{T as Xr}from"./textarea-IFOxZRFP.js";import{b as zn}from"./use-connection-n0123jPK.js";import{n as Et}from"./Container-CqLkbSjr.js";import{s as Jt}from"./Star01-DBs_rPC7.js";import{R as Ur}from"./agent-icon-K7-2Vanq.js";import{s as Kr}from"./XClose-1qd9ainB.js";import{c as Yr,i as St,a as pn,E as Hr,p as Wr,b as qr,d as Gr}from"./connection-form-helpers-C3EFMKqC.js";import{u as gn}from"./use-infinite-scroll-CdSYgiPG.js";import{u as Jr}from"./useSuspenseInfiniteQuery-BEThz4gg.js";import{S as Qr,u as Zr}from"./use-mcp-client-DyuH8eE6.js";import{g as eo,e as to,a as no}from"./extract-connection-data-CrV9u96Z.js";import{B as Dt}from"./badge-CS2sZUxN.js";import{c as Qt}from"./XCircle-xmKSYZKr.js";import{i as mn}from"./Check-COv5M0lh.js";import{s as ro}from"./Plus-LwySGDxB.js";function oo({open:t,onOpenChange:e,onCreated:n}){const{org:r}=an(),{data:o}=kn.useSession(),{stdioEnabled:s}=gr(),a=zr(),c=zn(),l=Tn(),h=_n(l,"").items,d=mr({resolver:vr(Yr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),m=d.watch("ui_type"),v=d.watch("connection_url"),N=d.watch("npx_package"),x=St({uiType:m,connectionUrl:v??"",npxPackage:N??""})??pn({uiType:m,connectionUrl:v??"",registryItems:h}),b=g=>{const p=g.trim();if(!p)return;const y=!!d.formState.dirtyFields.title,T=!!d.formState.dirtyFields.description,I=!!d.formState.dirtyFields.env_vars,S=O=>{if(O&&(!y&&!d.getValues("title").trim()&&O.title&&d.setValue("title",O.title,{shouldDirty:!1}),!T&&!(d.getValues("description")??"").trim()&&O.description&&d.setValue("description",O.description,{shouldDirty:!1}),!I&&O.envVarKeys?.length)){const K=d.getValues("env_vars")??[],B=new Set(K.map(V=>V.key)),P=O.envVarKeys.filter(V=>!B.has(V));P.length>0&&d.setValue("env_vars",[...K,...P.map(V=>({key:V,value:""}))],{shouldDirty:!0})}},A=Wr(p);if(A&&s){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",A.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),S(St({uiType:"NPX",npxPackage:A.packageName}));return}if(p.startsWith("http://")||p.startsWith("https://")){const O=m==="HTTP"||m==="SSE"||m==="Websocket"?m:"HTTP";d.setValue("ui_type",O,{shouldDirty:!0}),d.setValue("connection_url",p,{shouldDirty:!0}),S(St({uiType:O,connectionUrl:p})??pn({uiType:O,connectionUrl:p,registryItems:h}));return}m==="NPX"&&S(St({uiType:"NPX",npxPackage:p}))},R=g=>{g||d.reset(),e(g)},w=async g=>{let p,y=null,T=null,I=null;g.ui_type==="NPX"?(p="STDIO",y="",I=qr(g.npx_package||"",g.env_vars||[])):g.ui_type==="STDIO"?(p="STDIO",y="",I=Gr(g.stdio_command||"",g.stdio_args||"",g.stdio_cwd,g.env_vars||[])):(p=g.ui_type,y=g.connection_url||"",T=g.connection_token||null);const S=Ir("conn");try{await c.create.mutateAsync({id:S,title:g.title,description:g.description||null,connection_type:p,connection_url:y,connection_token:T,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:o?.user?.id||"system",organization_id:r.id,icon:g.icon??null,app_name:null,app_id:null,connection_headers:I,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),n?.(S)}catch{Le.error("Failed to create connection")}},C="Create Connection",j="Create a custom connection in your organization. Fill in the details below.",k=d.formState.isSubmitting?"Saving...":"Create Connection",E=i.jsxs("div",{className:"grid gap-4",children:[i.jsx(De,{control:d.control,name:"ui_type",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Type *"}),i.jsxs(Fr,{value:g.value,onValueChange:g.onChange,children:[i.jsx(Ne,{children:i.jsx($r,{children:i.jsx(Br,{})})}),i.jsxs(Vr,{children:[i.jsx(ut,{value:"HTTP",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Jt,{className:"w-4 h-4"}),"HTTP"]})}),i.jsx(ut,{value:"SSE",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Jt,{className:"w-4 h-4"}),"SSE"]})}),i.jsx(ut,{value:"Websocket",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Jt,{className:"w-4 h-4"}),"Websocket"]})}),s&&i.jsxs(i.Fragment,{children:[i.jsx(ut,{value:"NPX",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Et,{className:"w-4 h-4"}),"NPX Package"]})}),i.jsx(ut,{value:"STDIO",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Ur,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),i.jsx(Ie,{})]})}),m==="NPX"&&i.jsx(De,{control:d.control,name:"npx_package",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"NPM Package *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"@perplexity-ai/mcp-server",...g,value:g.value??"",onPaste:p=>{const y=p.clipboardData.getData("text");y&&(p.preventDefault(),d.setValue("npx_package",y.trim(),{shouldDirty:!0}),b(y))},onBlur:p=>{b(p.target.value),g.onBlur()}})}),i.jsx(Ie,{})]})}),m==="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[i.jsx(De,{control:d.control,name:"stdio_command",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Command *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"node, bun, python...",...g,value:g.value??""})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"stdio_args",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Arguments"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"arg1 arg2 --flag value",...g,value:g.value??""})}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"stdio_cwd",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Working Directory"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"/path/to/project (optional)",...g,value:g.value??""})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),i.jsx(Ie,{})]})})]}),(m==="NPX"||m==="STDIO")&&i.jsx(De,{control:d.control,name:"env_vars",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Environment Variables"}),i.jsx(Ne,{children:i.jsx(Hr,{value:g.value??[],onChange:g.onChange})}),i.jsx(Ie,{})]})}),m!=="NPX"&&m!=="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsx(De,{control:d.control,name:"connection_url",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"URL *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"https://example.com/mcp",...g,value:g.value??"",onPaste:p=>{const y=p.clipboardData.getData("text");y&&(p.preventDefault(),d.setValue("connection_url",y.trim(),{shouldDirty:!0}),b(y))},onBlur:p=>{b(p.target.value),g.onBlur()}})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"connection_token",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:x?.token?.label??"Token (optional)"}),i.jsx(Ne,{children:i.jsx(Ye,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...g,value:g.value??""})}),x?.token?.helperText&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&i.jsxs(i.Fragment,{children:[" ","·"," ",i.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"title",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Name *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"My Connection",...g})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"description",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Description"}),i.jsx(Ne,{children:i.jsx(Xr,{placeholder:"A brief description of this connection",rows:3,...g,value:g.value??""})}),i.jsx(Ie,{})]})})]});return a?i.jsx(kr,{open:t,onOpenChange:R,children:i.jsxs(Tr,{className:"max-h-[90vh]",children:[i.jsx(_r,{className:"pb-2",children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 text-left",children:[i.jsx(Or,{children:C}),i.jsx(Mr,{className:"mt-1",children:j})]}),i.jsx(Pr,{asChild:!0,children:i.jsx(He,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:i.jsx(Kr,{size:16})})})]})}),i.jsx(hn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(w),children:[i.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:E}),i.jsx(Lr,{children:i.jsx(He,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:k})})]})})]})}):i.jsx(On,{open:t,onOpenChange:R,children:i.jsxs(Mn,{className:"sm:max-w-[525px]",children:[i.jsxs(Pn,{children:[i.jsx(Ln,{children:C}),i.jsx(Ar,{children:j})]}),i.jsx(hn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(w),children:[i.jsx("div",{className:"py-4",children:E}),i.jsxs(Er,{children:[i.jsx(He,{type:"button",variant:"outline",onClick:()=>R(!1),children:"Cancel"}),i.jsx(He,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:k})]})]})})]})})}function so(t){const e=yr.c(73),{mode:n,agentId:r,addedConnectionIds:o,onAdd:s,onCloneAndAdd:a,onConnectAndAdd:c,connectingItemId:l,search:f,onCreateConnection:h,onBrowseNavigate:d,defaultTab:m}=t,v=n===void 0?"add":n,N=m===void 0?"connected":m,{org:x}=an(),b=u.useDeferredValue(f),R=f!==b,w=b.trim().toLowerCase();let C;e[0]!==N?(C=D=>D??N,e[0]=N,e[1]=C):C=e[1];const[j,k]=wr(Cr.connectionsTab(x.slug)+(N==="all"?":home-modal":":agent-modal"),C);let E;e[2]!==j||e[3]!==k?(E=D=>{D!==j&&ne("connections_dialog_tab_changed",{to_tab:D}),k(D)},e[2]=j,e[3]=k,e[4]=E):E=e[4];const g=E;let p;e[5]!==x.id||e[6]!==x.slug?(p={connectionId:Qr,orgId:x.id,orgSlug:x.slug},e[5]=x.id,e[6]=x.slug,e[7]=p):p=e[7];const y=Zr(p);let T,I,S;if(e[8]!==y||e[9]!==b||e[10]!==x.id){S=b?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:b.trim()},{field:["description"],operator:"contains",value:b.trim()}]}:void 0;const D={...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},L=JSON.stringify(D);I=Jr,T=At.collectionListInfinite(y,x.id,"","CONNECTIONS",L),e[8]=y,e[9]=b,e[10]=x.id,e[11]=T,e[12]=I,e[13]=S}else T=e[11],I=e[12],S=e[13];let A;e[14]!==y||e[15]!==S?(A=async D=>{const{pageParam:L}=D,de=L===void 0?0:L;return(await y.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:de}})).structuredContent},e[14]=y,e[15]=S,e[16]=A):A=e[16];let O;e[17]!==T||e[18]!==A?(O={queryKey:T,queryFn:A,initialPageParam:0,getNextPageParam:fo,staleTime:3e4},e[17]=T,e[18]=A,e[19]=O):O=e[19];const{data:K,fetchNextPage:B,hasNextPage:P,isFetchingNextPage:V}=I(O),re=K?.pages.flatMap(uo)??[],xe=jr(re),qe=new Set(re.filter(lo).map(co)),X=Tn(),H=_n(X,b),he=gn(H.loadMore,H.hasMore,H.isLoadingMore),Ae=gn(B,P??!1,V),z=j==="all"||!!w,Ke=z?H.items.filter(D=>{const L=eo(D);if(L&&qe.has(L))return!1;if(!w)return!0;const de=D._meta?.["mcp.mesh"];return[D.title,D.description,D.name,D.server?.title,D.server?.description,D.server?.name,de?.friendly_name,de?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(w)}):[],Z=Ke.filter(ao),q=Ke.filter(io);let M;e[20]!==o?(M=D=>D.some(L=>o.has(L.id)),e[20]=o,e[21]=M):M=e[21];const Ee=M;let G;e[22]!==o||e[23]!==r||e[24]!==l||e[25]!==Ee||e[26]!==v||e[27]!==s||e[28]!==d||e[29]!==a?(G=(D,L,de,Fe,me)=>{const Ze=Ee(me),$e=me.find(F=>!o.has(F.id)),te=me[0];if(v==="browse"){const F=Dr(te);return i.jsx(Ht,{connection:{title:L,icon:de,description:me.length>1?`${me.length} instances`:Fe??void 0},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs(Dt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(mn,{size:11})," Connected"]}),onClick:()=>{ne("connection_browse_clicked",{app_name:te.app_name??null,connection_id:te.id,instances_count:me.length}),d?.(F)}},D)}return i.jsx(Ht,{connection:{title:L,icon:de,description:Fe},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[Ze&&i.jsxs(Dt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(mn,{size:11})," Added"]}),i.jsx(He,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),$e?(ne("connection_add_clicked",{action:"use_existing",app_name:te.app_name??null,connection_id:$e.id}),r&&ne("agent_connection_attached",{agent_id:r,connection_id:$e.id,app_name:te.app_name??null,mode:"existing"}),s($e.id)):(ne("connection_add_clicked",{action:"clone",app_name:te.app_name??null,base_connection_id:te.id}),a(te))},children:"Add"})]})},D)},e[22]=o,e[23]=r,e[24]=l,e[25]=Ee,e[26]=v,e[27]=s,e[28]=d,e[29]=a,e[30]=G):G=e[30];const pe=G;let ee;e[31]!==l||e[32]!==v||e[33]!==c?(ee=D=>{const L=D._meta?.["mcp.mesh"],de=L?.friendlyName||L?.friendly_name||D.server?.title||D.title||D.server?.name||D.name||D.id||"",Fe=D.server?.description||D.description||null,me=D.server?.icons?.[0]?.src||no(D.server?.repository)||null,Ze=L?.official===!0,$e=L?.verified===!0,te=L?.owner==="deco";return i.jsx(Ht,{connection:{title:de,description:Fe,icon:me},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[te&&i.jsxs(Wt,{children:[i.jsx(qt,{asChild:!0,children:i.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:i.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),i.jsx(Gt,{children:"Built and maintained by Deco"})]}),!te&&Ze&&i.jsxs(Wt,{children:[i.jsx(qt,{asChild:!0,children:i.jsx(Dt,{variant:"outline",size:"icon",children:i.jsx(Qt,{})})}),i.jsx(Gt,{children:"Built and maintained by the official vendor"})]}),!te&&!Ze&&$e&&i.jsxs(Wt,{children:[i.jsx(qt,{asChild:!0,children:i.jsx(Dt,{variant:"outline",size:"icon",children:i.jsx(Qt,{})})}),i.jsx(Gt,{children:"Verified by the Deco team"})]}),i.jsx(He,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),ne("connection_add_clicked",{action:"connect_new",registry_item_id:D.id,app_name:L?.friendlyName||D.server?.name||D.name||null}),c(D)},children:l===D.id?i.jsx(It,{size:14,className:"animate-spin"}):v==="browse"?"Connect":"Add"})]})},`catalog-${D.id}`)},e[31]=l,e[32]=v,e[33]=c,e[34]=ee):ee=e[34];const ke=ee,ye=!w&&i.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[i.jsx(Nr,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:j,onTabChange:D=>g(D)}),i.jsxs(He,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{ne("connections_dialog_custom_clicked"),h()},children:[i.jsx(ro,{size:12}),"Custom Connection"]})]}),Ge=R&&"opacity-50 pointer-events-none";let Te;e[35]!==Ge?(Te=Sr("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[35]=Ge,e[36]=Te):Te=e[36];const st="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let oe;e[37]!==pe?(oe=D=>{if(D.type==="group")return pe(D.key,D.title,D.icon,null,D.connections);const L=D.connection;return pe(L.id,L.title,L.icon,L.description??null,[L])},e[37]=pe,e[38]=oe):oe=e[38];const ze=xe.map(oe);let ge;e[39]!==Ae?(ge=i.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=ge):ge=e[40];let _e;e[41]!==V?(_e=V&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=V,e[42]=_e):_e=e[42];const Je=z&&Z.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx(Qt,{size:13,className:"text-muted-foreground shrink-0"}),i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=z&&Z.map(ke),at=z&&q.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),we=z&&q.map(ke);let se;e[43]!==he||e[44]!==X||e[45]!==z?(se=z&&X.length>0&&i.jsx("div",{ref:he,className:"col-span-full h-1"}),e[43]=he,e[44]=X,e[45]=z,e[46]=se):se=e[46];let le;e[47]!==H.isLoadingMore||e[48]!==z?(le=z&&H.isLoadingMore&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=H.isLoadingMore,e[48]=z,e[49]=le):le=e[49];let Oe;e[50]!==ze||e[51]!==ge||e[52]!==_e||e[53]!==Je||e[54]!==it||e[55]!==at||e[56]!==we||e[57]!==se||e[58]!==le?(Oe=i.jsxs("div",{className:st,children:[ze,ge,_e,Je,it,at,we,se,le]}),e[50]=ze,e[51]=ge,e[52]=_e,e[53]=Je,e[54]=it,e[55]=at,e[56]=we,e[57]=se,e[58]=le,e[59]=Oe):Oe=e[59];let J;e[60]!==j||e[61]!==xe.length||e[62]!==q||e[63]!==f||e[64]!==Z?(J=xe.length===0&&Z.length===0&&q.length===0&&i.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:f?`No connections match "${f}"`:j==="connected"?"No connections yet":"No connections available"}),e[60]=j,e[61]=xe.length,e[62]=q,e[63]=f,e[64]=Z,e[65]=J):J=e[65];let Me;e[66]!==Te||e[67]!==Oe||e[68]!==J?(Me=i.jsxs("div",{className:Te,children:[Oe,J]}),e[66]=Te,e[67]=Oe,e[68]=J,e[69]=Me):Me=e[69];let Qe;return e[70]!==ye||e[71]!==Me?(Qe=i.jsxs(i.Fragment,{children:[ye,Me]}),e[70]=ye,e[71]=Me,e[72]=Qe):Qe=e[72],Qe}function io(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function ao(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function co(t){return t.app_name}function lo(t){return t.app_name}function uo(t){return t?.items??[]}function fo(t,e){if(t?.hasMore)return e.reduce(ho,0)}function ho(t,e){return t+(e?.items?.length??0)}function Ai({open:t,onOpenChange:e,defaultTab:n,initialSearch:r="",...o}){const s=o.mode??"add",a="agentId"in o?o.agentId:void 0,c="addedConnectionIds"in o?o.addedConnectionIds??new Set:new Set,l="onAdd"in o&&o.onAdd?o.onAdd:p=>{},f=(p,y,T)=>{a&&ne("agent_connection_attached",{agent_id:a,connection_id:p,app_name:y,mode:T})},[h,d]=u.useState(null),[m,v]=u.useState(r),[N,x]=u.useState(!1),{org:b}=an(),{data:R}=kn.useSession(),w=zn(),C=br(),j=xr(),k=p=>{e(!1),j({to:"/$org/settings/connections/$appSlug",params:{org:b.slug,appSlug:p}})},E=async p=>{d(p.app_name??p.id);try{const T=`${p.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,S=(await w.create.mutateAsync({title:T,description:p.description??null,connection_type:p.connection_type,connection_url:p.connection_url??null,connection_token:null,icon:p.icon??null,app_name:p.app_name??null,app_id:p.app_id??null,connection_headers:p.connection_headers??null})).id,A=new URL(`/api/${b.slug}/mcp/${S}`,window.location.origin),O=await Kt({url:A.href,token:null,orgId:b.id});if(O.supportsOAuth&&!O.isAuthenticated){const{token:K,tokenInfo:B,error:P}=await Yt({connectionId:S,orgSlug:b.slug,scope:"offline_access"});if(P||!K){ne("connection_oauth_failed",{connection_id:S,flow:"clone",error:P??"no_token"}),Le.error(`Authentication failed: ${P??"no token received"}`),await w.delete.mutateAsync(S);return}if(ne("connection_oauth_succeeded",{connection_id:S,flow:"clone"}),B)try{(await fetch(`/api/${b.slug}/connections/${S}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:B.accessToken,refreshToken:B.refreshToken,expiresIn:B.expiresIn,scope:B.scope,clientId:B.clientId,clientSecret:B.clientSecret,tokenEndpoint:B.tokenEndpoint})})).ok?await w.update.mutateAsync({id:S,data:{}}):await w.update.mutateAsync({id:S,data:{connection_token:K}})}catch{await w.update.mutateAsync({id:S,data:{connection_token:K}})}else await w.update.mutateAsync({id:S,data:{connection_token:K}});await C.invalidateQueries({queryKey:At.isMCPAuthenticated(A.href,null)})}f(S,p.app_name??null,"clone"),l(S)}catch(y){console.error("Failed to add connection:",y),Le.error("Failed to add connection")}finally{d(null)}},g=async p=>{if(!(!b||!R?.user?.id)){d(p.id);try{const y=to(p,b.id,R.user.id,{remoteIndex:0}),T=y.connection_type==="STDIO",I=!!y.connection_url,S=T&&y.connection_headers&&typeof y.connection_headers=="object"&&"command"in y.connection_headers;if(!I&&!S){Le.error("This MCP Server cannot be connected: no connection method available"),d(null);return}const{id:A}=await w.create.mutateAsync(y),O=new URL(`/api/${b.slug}/mcp/${A}`,window.location.origin),K=await Kt({url:O.href,token:null,orgId:b.id});if(K.supportsOAuth&&!K.isAuthenticated){const{token:B,tokenInfo:P,error:V}=await Yt({connectionId:A,orgSlug:b.slug,scope:"offline_access"});if(V||!B){ne("connection_oauth_failed",{connection_id:A,flow:"connect_new",error:V??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${V??"no token received"})`}),f(A,y.app_name??null,"new"),l(A);return}if(ne("connection_oauth_succeeded",{connection_id:A,flow:"connect_new"}),P)try{(await fetch(`/api/${b.slug}/connections/${A}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:P.accessToken,refreshToken:P.refreshToken,expiresIn:P.expiresIn,scope:P.scope,clientId:P.clientId,clientSecret:P.clientSecret,tokenEndpoint:P.tokenEndpoint})})).ok?await w.update.mutateAsync({id:A,data:{}}):await w.update.mutateAsync({id:A,data:{connection_token:B}})}catch{await w.update.mutateAsync({id:A,data:{connection_token:B}})}else await w.update.mutateAsync({id:A,data:{connection_token:B}});await C.invalidateQueries({queryKey:At.isMCPAuthenticated(O.href,null)}),Le.success("Connected and authenticated")}else Le.success("Connected");f(A,y.app_name??null,"new"),l(A)}catch(y){console.error("Failed to connect:",y),Le.error("Failed to connect")}finally{d(null)}}};return i.jsxs(On,{open:t,onOpenChange:e,children:[i.jsxs(Mn,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[i.jsx(Pn,{className:"px-6 pt-5 pb-0 shrink-0",children:i.jsx(Ln,{className:"text-base font-semibold",children:s==="browse"?"Connections":"Add Connection"})}),i.jsx("div",{className:"pt-3 shrink-0",children:i.jsx(Rr,{value:m,onChange:v,placeholder:"Search connections..."})}),i.jsx(u.Suspense,{fallback:i.jsx("div",{className:"flex-1 flex items-center justify-center",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),children:i.jsx(so,{mode:s,agentId:a,addedConnectionIds:c,onAdd:l,onCloneAndAdd:E,onConnectAndAdd:g,connectingItemId:h,search:m,onCreateConnection:()=>x(!0),onBrowseNavigate:k,defaultTab:n})})]}),i.jsx(oo,{open:N,onOpenChange:x,onCreated:async p=>{x(!1);const y=new URL(`/api/${b.slug}/mcp/${p}`,window.location.origin),T=await Kt({url:y.href,token:null,orgId:b.id});if(T.supportsOAuth&&!T.isAuthenticated){const{token:I,tokenInfo:S,error:A}=await Yt({connectionId:p,orgSlug:b.slug,scope:"offline_access"});if(A||!I){ne("connection_oauth_failed",{connection_id:p,flow:"custom_create",error:A??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${A??"no token received"})`}),f(p,null,"custom"),l(p),e(!1);return}if(ne("connection_oauth_succeeded",{connection_id:p,flow:"custom_create"}),S)try{(await fetch(`/api/${b.slug}/connections/${p}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:S.accessToken,refreshToken:S.refreshToken,expiresIn:S.expiresIn,scope:S.scope,clientId:S.clientId,clientSecret:S.clientSecret,tokenEndpoint:S.tokenEndpoint})})).ok?await w.update.mutateAsync({id:p,data:{}}):await w.update.mutateAsync({id:p,data:{connection_token:I}})}catch{await w.update.mutateAsync({id:p,data:{connection_token:I}})}else await w.update.mutateAsync({id:p,data:{connection_token:I}});await C.invalidateQueries({queryKey:At.isMCPAuthenticated(y.href,null)})}f(p,null,"custom"),l(p),e(!1)}})]})}function Ei(t){const e=t?.metadata?.githubRepo;return e?e.connectionId?t?.connections?.some(r=>r.connection_id===e.connectionId)?e:null:e:null}function po(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return u.useMemo(()=>r=>{e.forEach(o=>o(r))},e)}const zt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nt(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function cn(t){return"nodeType"in t}function Q(t){var e,n;return t?nt(t)?t:cn(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function ln(t){const{Document:e}=Q(t);return t instanceof e}function xt(t){return nt(t)?!1:t instanceof Q(t).HTMLElement}function Fn(t){return t instanceof Q(t).SVGElement}function rt(t){return t?nt(t)?t.document:cn(t)?ln(t)?t:xt(t)||Fn(t)?t.ownerDocument:document:document:document}const ve=zt?u.useLayoutEffect:u.useEffect;function Ft(t){const e=u.useRef(t);return ve(()=>{e.current=t}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}function go(){const t=u.useRef(null),e=u.useCallback((r,o)=>{t.current=setInterval(r,o)},[]),n=u.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function mt(t,e){e===void 0&&(e=[t]);const n=u.useRef(t);return ve(()=>{n.current!==t&&(n.current=t)},e),n}function yt(t,e){const n=u.useRef();return u.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function Tt(t){const e=Ft(t),n=u.useRef(null),r=u.useCallback(o=>{o!==n.current&&e?.(o,n.current),n.current=o},[]);return[n,r]}function _t(t){const e=u.useRef();return u.useEffect(()=>{e.current=t},[t]),e.current}let Zt={};function wt(t,e){return u.useMemo(()=>{if(e)return e;const n=Zt[t]==null?0:Zt[t]+1;return Zt[t]=n,t+"-"+n},[t,e])}function $n(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,a)=>{const c=Object.entries(a);for(const[l,f]of c){const h=s[l];h!=null&&(s[l]=h+t*f)}return s},{...e})}}const tt=$n(1),vt=$n(-1);function mo(t){return"clientX"in t&&"clientY"in t}function $t(t){if(!t)return!1;const{KeyboardEvent:e}=Q(t.target);return e&&t instanceof e}function vo(t){if(!t)return!1;const{TouchEvent:e}=Q(t.target);return e&&t instanceof e}function Ot(t){if(vo(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return mo(t)?{x:t.clientX,y:t.clientY}:null}const We=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[We.Translate.toString(t),We.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),vn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function bo(t){return t.matches(vn)?t:t.querySelector(vn)}const xo={display:"none"};function yo(t){let{id:e,value:n}=t;return $.createElement("div",{id:e,style:xo},n)}function wo(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return $.createElement("div",{id:e,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Co(){const[t,e]=u.useState("");return{announce:u.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const Bn=u.createContext(null);function So(t){const e=u.useContext(Bn);u.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function Do(){const[t]=u.useState(()=>new Set),e=u.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[u.useCallback(r=>{let{type:o,event:s}=r;t.forEach(a=>{var c;return(c=a[o])==null?void 0:c.call(a,s)})},[t]),e]}const jo={draggable:`
|
|
1
|
+
import{q as an,b as kn,u as gr,H as mr,I as vr,j as i,B as He,o as Le,r as u,G as br,f as xr,l as It,M as Kt,J as Yt,t as ne,K as At,e as yr,p as wr,L as Cr,c as Sr,b5 as $,aU as ft}from"./index-DKa2bYTS.js";import{g as Dr}from"./connection-slug-eyAPH6o3.js";import{u as Tn,a as _n,g as jr,C as Ht}from"./connection-card-HxhqgvOF.js";import{C as Rr}from"./collection-search-DEQMWm_z.js";import{C as Nr}from"./collection-tabs-BLluwkr_.js";import{g as Ir}from"./generate-id-B00Lqcz6.js";import{D as On,a as Mn,b as Pn,c as Ln,e as Ar,d as Er}from"./dialog-B3n4osS2.js";import{b as kr,a as Tr,c as _r,D as Or,d as Mr,e as Pr,f as Lr}from"./drawer-DVtZCj6U.js";import{u as zr,b as Wt,T as qt,a as Gt}from"./tooltip-CRGezvtE.js";import{F as De,b as je,c as Re,d as Ne,f as Ie,a as hn}from"./form-BDTBUfjP.js";import{I as Ye}from"./input-BjUn5ElR.js";import{d as Fr,S as $r,a as Br,b as Vr,c as ut}from"./select-PwFJPxWI.js";import{T as Xr}from"./textarea-BVmeWwVH.js";import{b as zn}from"./use-connection-D5VghmN_.js";import{n as Et}from"./Container-D6z1XWRo.js";import{s as Jt}from"./Star01-BlvJ3i4w.js";import{R as Ur}from"./agent-icon-CMmthzuk.js";import{s as Kr}from"./XClose-DFcy3zV5.js";import{c as Yr,i as St,a as pn,E as Hr,p as Wr,b as qr,d as Gr}from"./connection-form-helpers-BMXuAyPa.js";import{u as gn}from"./use-infinite-scroll-ILdTUQK_.js";import{u as Jr}from"./useSuspenseInfiniteQuery-CDkRkXhL.js";import{S as Qr,u as Zr}from"./use-mcp-client-8Mk4_07F.js";import{g as eo,e as to,a as no}from"./extract-connection-data-PFgGg6kx.js";import{B as Dt}from"./badge-Dwfe01sI.js";import{c as Qt}from"./XCircle-7rwkbF3y.js";import{i as mn}from"./Check-notD5fT5.js";import{s as ro}from"./Plus-Dppw3z2O.js";function oo({open:t,onOpenChange:e,onCreated:n}){const{org:r}=an(),{data:o}=kn.useSession(),{stdioEnabled:s}=gr(),a=zr(),c=zn(),l=Tn(),h=_n(l,"").items,d=mr({resolver:vr(Yr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),m=d.watch("ui_type"),v=d.watch("connection_url"),N=d.watch("npx_package"),x=St({uiType:m,connectionUrl:v??"",npxPackage:N??""})??pn({uiType:m,connectionUrl:v??"",registryItems:h}),b=g=>{const p=g.trim();if(!p)return;const y=!!d.formState.dirtyFields.title,T=!!d.formState.dirtyFields.description,I=!!d.formState.dirtyFields.env_vars,S=O=>{if(O&&(!y&&!d.getValues("title").trim()&&O.title&&d.setValue("title",O.title,{shouldDirty:!1}),!T&&!(d.getValues("description")??"").trim()&&O.description&&d.setValue("description",O.description,{shouldDirty:!1}),!I&&O.envVarKeys?.length)){const K=d.getValues("env_vars")??[],B=new Set(K.map(V=>V.key)),P=O.envVarKeys.filter(V=>!B.has(V));P.length>0&&d.setValue("env_vars",[...K,...P.map(V=>({key:V,value:""}))],{shouldDirty:!0})}},A=Wr(p);if(A&&s){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",A.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),S(St({uiType:"NPX",npxPackage:A.packageName}));return}if(p.startsWith("http://")||p.startsWith("https://")){const O=m==="HTTP"||m==="SSE"||m==="Websocket"?m:"HTTP";d.setValue("ui_type",O,{shouldDirty:!0}),d.setValue("connection_url",p,{shouldDirty:!0}),S(St({uiType:O,connectionUrl:p})??pn({uiType:O,connectionUrl:p,registryItems:h}));return}m==="NPX"&&S(St({uiType:"NPX",npxPackage:p}))},R=g=>{g||d.reset(),e(g)},w=async g=>{let p,y=null,T=null,I=null;g.ui_type==="NPX"?(p="STDIO",y="",I=qr(g.npx_package||"",g.env_vars||[])):g.ui_type==="STDIO"?(p="STDIO",y="",I=Gr(g.stdio_command||"",g.stdio_args||"",g.stdio_cwd,g.env_vars||[])):(p=g.ui_type,y=g.connection_url||"",T=g.connection_token||null);const S=Ir("conn");try{await c.create.mutateAsync({id:S,title:g.title,description:g.description||null,connection_type:p,connection_url:y,connection_token:T,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:o?.user?.id||"system",organization_id:r.id,icon:g.icon??null,app_name:null,app_id:null,connection_headers:I,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),n?.(S)}catch{Le.error("Failed to create connection")}},C="Create Connection",j="Create a custom connection in your organization. Fill in the details below.",k=d.formState.isSubmitting?"Saving...":"Create Connection",E=i.jsxs("div",{className:"grid gap-4",children:[i.jsx(De,{control:d.control,name:"ui_type",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Type *"}),i.jsxs(Fr,{value:g.value,onValueChange:g.onChange,children:[i.jsx(Ne,{children:i.jsx($r,{children:i.jsx(Br,{})})}),i.jsxs(Vr,{children:[i.jsx(ut,{value:"HTTP",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Jt,{className:"w-4 h-4"}),"HTTP"]})}),i.jsx(ut,{value:"SSE",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Jt,{className:"w-4 h-4"}),"SSE"]})}),i.jsx(ut,{value:"Websocket",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Jt,{className:"w-4 h-4"}),"Websocket"]})}),s&&i.jsxs(i.Fragment,{children:[i.jsx(ut,{value:"NPX",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Et,{className:"w-4 h-4"}),"NPX Package"]})}),i.jsx(ut,{value:"STDIO",children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(Ur,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),i.jsx(Ie,{})]})}),m==="NPX"&&i.jsx(De,{control:d.control,name:"npx_package",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"NPM Package *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"@perplexity-ai/mcp-server",...g,value:g.value??"",onPaste:p=>{const y=p.clipboardData.getData("text");y&&(p.preventDefault(),d.setValue("npx_package",y.trim(),{shouldDirty:!0}),b(y))},onBlur:p=>{b(p.target.value),g.onBlur()}})}),i.jsx(Ie,{})]})}),m==="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[i.jsx(De,{control:d.control,name:"stdio_command",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Command *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"node, bun, python...",...g,value:g.value??""})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"stdio_args",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Arguments"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"arg1 arg2 --flag value",...g,value:g.value??""})}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"stdio_cwd",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Working Directory"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"/path/to/project (optional)",...g,value:g.value??""})}),i.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),i.jsx(Ie,{})]})})]}),(m==="NPX"||m==="STDIO")&&i.jsx(De,{control:d.control,name:"env_vars",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Environment Variables"}),i.jsx(Ne,{children:i.jsx(Hr,{value:g.value??[],onChange:g.onChange})}),i.jsx(Ie,{})]})}),m!=="NPX"&&m!=="STDIO"&&i.jsxs(i.Fragment,{children:[i.jsx(De,{control:d.control,name:"connection_url",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"URL *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"https://example.com/mcp",...g,value:g.value??"",onPaste:p=>{const y=p.clipboardData.getData("text");y&&(p.preventDefault(),d.setValue("connection_url",y.trim(),{shouldDirty:!0}),b(y))},onBlur:p=>{b(p.target.value),g.onBlur()}})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"connection_token",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:x?.token?.label??"Token (optional)"}),i.jsx(Ne,{children:i.jsx(Ye,{type:"password",placeholder:x?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...g,value:g.value??""})}),x?.token?.helperText&&i.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&i.jsxs(i.Fragment,{children:[" ","·"," ",i.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),i.jsx(Ie,{})]})})]}),i.jsx(De,{control:d.control,name:"title",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Name *"}),i.jsx(Ne,{children:i.jsx(Ye,{placeholder:"My Connection",...g})}),i.jsx(Ie,{})]})}),i.jsx(De,{control:d.control,name:"description",render:({field:g})=>i.jsxs(je,{children:[i.jsx(Re,{children:"Description"}),i.jsx(Ne,{children:i.jsx(Xr,{placeholder:"A brief description of this connection",rows:3,...g,value:g.value??""})}),i.jsx(Ie,{})]})})]});return a?i.jsx(kr,{open:t,onOpenChange:R,children:i.jsxs(Tr,{className:"max-h-[90vh]",children:[i.jsx(_r,{className:"pb-2",children:i.jsxs("div",{className:"flex items-start justify-between gap-4",children:[i.jsxs("div",{className:"flex-1 text-left",children:[i.jsx(Or,{children:C}),i.jsx(Mr,{className:"mt-1",children:j})]}),i.jsx(Pr,{asChild:!0,children:i.jsx(He,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:i.jsx(Kr,{size:16})})})]})}),i.jsx(hn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(w),children:[i.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:E}),i.jsx(Lr,{children:i.jsx(He,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:k})})]})})]})}):i.jsx(On,{open:t,onOpenChange:R,children:i.jsxs(Mn,{className:"sm:max-w-[525px]",children:[i.jsxs(Pn,{children:[i.jsx(Ln,{children:C}),i.jsx(Ar,{children:j})]}),i.jsx(hn,{...d,children:i.jsxs("form",{onSubmit:d.handleSubmit(w),children:[i.jsx("div",{className:"py-4",children:E}),i.jsxs(Er,{children:[i.jsx(He,{type:"button",variant:"outline",onClick:()=>R(!1),children:"Cancel"}),i.jsx(He,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:k})]})]})})]})})}function so(t){const e=yr.c(73),{mode:n,agentId:r,addedConnectionIds:o,onAdd:s,onCloneAndAdd:a,onConnectAndAdd:c,connectingItemId:l,search:f,onCreateConnection:h,onBrowseNavigate:d,defaultTab:m}=t,v=n===void 0?"add":n,N=m===void 0?"connected":m,{org:x}=an(),b=u.useDeferredValue(f),R=f!==b,w=b.trim().toLowerCase();let C;e[0]!==N?(C=D=>D??N,e[0]=N,e[1]=C):C=e[1];const[j,k]=wr(Cr.connectionsTab(x.slug)+(N==="all"?":home-modal":":agent-modal"),C);let E;e[2]!==j||e[3]!==k?(E=D=>{D!==j&&ne("connections_dialog_tab_changed",{to_tab:D}),k(D)},e[2]=j,e[3]=k,e[4]=E):E=e[4];const g=E;let p;e[5]!==x.id||e[6]!==x.slug?(p={connectionId:Qr,orgId:x.id,orgSlug:x.slug},e[5]=x.id,e[6]=x.slug,e[7]=p):p=e[7];const y=Zr(p);let T,I,S;if(e[8]!==y||e[9]!==b||e[10]!==x.id){S=b?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:b.trim()},{field:["description"],operator:"contains",value:b.trim()}]}:void 0;const D={...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},L=JSON.stringify(D);I=Jr,T=At.collectionListInfinite(y,x.id,"","CONNECTIONS",L),e[8]=y,e[9]=b,e[10]=x.id,e[11]=T,e[12]=I,e[13]=S}else T=e[11],I=e[12],S=e[13];let A;e[14]!==y||e[15]!==S?(A=async D=>{const{pageParam:L}=D,de=L===void 0?0:L;return(await y.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:de}})).structuredContent},e[14]=y,e[15]=S,e[16]=A):A=e[16];let O;e[17]!==T||e[18]!==A?(O={queryKey:T,queryFn:A,initialPageParam:0,getNextPageParam:fo,staleTime:3e4},e[17]=T,e[18]=A,e[19]=O):O=e[19];const{data:K,fetchNextPage:B,hasNextPage:P,isFetchingNextPage:V}=I(O),re=K?.pages.flatMap(uo)??[],xe=jr(re),qe=new Set(re.filter(lo).map(co)),X=Tn(),H=_n(X,b),he=gn(H.loadMore,H.hasMore,H.isLoadingMore),Ae=gn(B,P??!1,V),z=j==="all"||!!w,Ke=z?H.items.filter(D=>{const L=eo(D);if(L&&qe.has(L))return!1;if(!w)return!0;const de=D._meta?.["mcp.mesh"];return[D.title,D.description,D.name,D.server?.title,D.server?.description,D.server?.name,de?.friendly_name,de?.friendlyName].filter(Boolean).join(" ").toLowerCase().includes(w)}):[],Z=Ke.filter(ao),q=Ke.filter(io);let M;e[20]!==o?(M=D=>D.some(L=>o.has(L.id)),e[20]=o,e[21]=M):M=e[21];const Ee=M;let G;e[22]!==o||e[23]!==r||e[24]!==l||e[25]!==Ee||e[26]!==v||e[27]!==s||e[28]!==d||e[29]!==a?(G=(D,L,de,Fe,me)=>{const Ze=Ee(me),$e=me.find(F=>!o.has(F.id)),te=me[0];if(v==="browse"){const F=Dr(te);return i.jsx(Ht,{connection:{title:L,icon:de,description:me.length>1?`${me.length} instances`:Fe??void 0},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs(Dt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(mn,{size:11})," Connected"]}),onClick:()=>{ne("connection_browse_clicked",{app_name:te.app_name??null,connection_id:te.id,instances_count:me.length}),d?.(F)}},D)}return i.jsx(Ht,{connection:{title:L,icon:de,description:Fe},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[Ze&&i.jsxs(Dt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[i.jsx(mn,{size:11})," Added"]}),i.jsx(He,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),$e?(ne("connection_add_clicked",{action:"use_existing",app_name:te.app_name??null,connection_id:$e.id}),r&&ne("agent_connection_attached",{agent_id:r,connection_id:$e.id,app_name:te.app_name??null,mode:"existing"}),s($e.id)):(ne("connection_add_clicked",{action:"clone",app_name:te.app_name??null,base_connection_id:te.id}),a(te))},children:"Add"})]})},D)},e[22]=o,e[23]=r,e[24]=l,e[25]=Ee,e[26]=v,e[27]=s,e[28]=d,e[29]=a,e[30]=G):G=e[30];const pe=G;let ee;e[31]!==l||e[32]!==v||e[33]!==c?(ee=D=>{const L=D._meta?.["mcp.mesh"],de=L?.friendlyName||L?.friendly_name||D.server?.title||D.title||D.server?.name||D.name||D.id||"",Fe=D.server?.description||D.description||null,me=D.server?.icons?.[0]?.src||no(D.server?.repository)||null,Ze=L?.official===!0,$e=L?.verified===!0,te=L?.owner==="deco";return i.jsx(Ht,{connection:{title:de,description:Fe,icon:me},fallbackIcon:i.jsx(Et,{}),headerActionsAlwaysVisible:!0,headerActions:i.jsxs("div",{className:"flex items-center gap-1.5",children:[te&&i.jsxs(Wt,{children:[i.jsx(qt,{asChild:!0,children:i.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:i.jsx("img",{src:"/logos/deco logo.svg",alt:"Made by Deco",className:"size-3"})})}),i.jsx(Gt,{children:"Built and maintained by Deco"})]}),!te&&Ze&&i.jsxs(Wt,{children:[i.jsx(qt,{asChild:!0,children:i.jsx(Dt,{variant:"outline",size:"icon",children:i.jsx(Qt,{})})}),i.jsx(Gt,{children:"Built and maintained by the official vendor"})]}),!te&&!Ze&&$e&&i.jsxs(Wt,{children:[i.jsx(qt,{asChild:!0,children:i.jsx(Dt,{variant:"outline",size:"icon",children:i.jsx(Qt,{})})}),i.jsx(Gt,{children:"Verified by the Deco team"})]}),i.jsx(He,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:F=>{F.stopPropagation(),ne("connection_add_clicked",{action:"connect_new",registry_item_id:D.id,app_name:L?.friendlyName||D.server?.name||D.name||null}),c(D)},children:l===D.id?i.jsx(It,{size:14,className:"animate-spin"}):v==="browse"?"Connect":"Add"})]})},`catalog-${D.id}`)},e[31]=l,e[32]=v,e[33]=c,e[34]=ee):ee=e[34];const ke=ee,ye=!w&&i.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[i.jsx(Nr,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:j,onTabChange:D=>g(D)}),i.jsxs(He,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{ne("connections_dialog_custom_clicked"),h()},children:[i.jsx(ro,{size:12}),"Custom Connection"]})]}),Ge=R&&"opacity-50 pointer-events-none";let Te;e[35]!==Ge?(Te=Sr("flex-1 overflow-auto p-5 transition-opacity duration-150",Ge),e[35]=Ge,e[36]=Te):Te=e[36];const st="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let oe;e[37]!==pe?(oe=D=>{if(D.type==="group")return pe(D.key,D.title,D.icon,null,D.connections);const L=D.connection;return pe(L.id,L.title,L.icon,L.description??null,[L])},e[37]=pe,e[38]=oe):oe=e[38];const ze=xe.map(oe);let ge;e[39]!==Ae?(ge=i.jsx("div",{ref:Ae,className:"col-span-full h-1"}),e[39]=Ae,e[40]=ge):ge=e[40];let _e;e[41]!==V?(_e=V&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[41]=V,e[42]=_e):_e=e[42];const Je=z&&Z.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx(Qt,{size:13,className:"text-muted-foreground shrink-0"}),i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=z&&Z.map(ke),at=z&&q.length>0&&i.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[i.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),i.jsx("div",{className:"flex-1 h-px bg-border"})]}),we=z&&q.map(ke);let se;e[43]!==he||e[44]!==X||e[45]!==z?(se=z&&X.length>0&&i.jsx("div",{ref:he,className:"col-span-full h-1"}),e[43]=he,e[44]=X,e[45]=z,e[46]=se):se=e[46];let le;e[47]!==H.isLoadingMore||e[48]!==z?(le=z&&H.isLoadingMore&&i.jsx("div",{className:"col-span-full flex justify-center py-6",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),e[47]=H.isLoadingMore,e[48]=z,e[49]=le):le=e[49];let Oe;e[50]!==ze||e[51]!==ge||e[52]!==_e||e[53]!==Je||e[54]!==it||e[55]!==at||e[56]!==we||e[57]!==se||e[58]!==le?(Oe=i.jsxs("div",{className:st,children:[ze,ge,_e,Je,it,at,we,se,le]}),e[50]=ze,e[51]=ge,e[52]=_e,e[53]=Je,e[54]=it,e[55]=at,e[56]=we,e[57]=se,e[58]=le,e[59]=Oe):Oe=e[59];let J;e[60]!==j||e[61]!==xe.length||e[62]!==q||e[63]!==f||e[64]!==Z?(J=xe.length===0&&Z.length===0&&q.length===0&&i.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:f?`No connections match "${f}"`:j==="connected"?"No connections yet":"No connections available"}),e[60]=j,e[61]=xe.length,e[62]=q,e[63]=f,e[64]=Z,e[65]=J):J=e[65];let Me;e[66]!==Te||e[67]!==Oe||e[68]!==J?(Me=i.jsxs("div",{className:Te,children:[Oe,J]}),e[66]=Te,e[67]=Oe,e[68]=J,e[69]=Me):Me=e[69];let Qe;return e[70]!==ye||e[71]!==Me?(Qe=i.jsxs(i.Fragment,{children:[ye,Me]}),e[70]=ye,e[71]=Me,e[72]=Qe):Qe=e[72],Qe}function io(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function ao(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function co(t){return t.app_name}function lo(t){return t.app_name}function uo(t){return t?.items??[]}function fo(t,e){if(t?.hasMore)return e.reduce(ho,0)}function ho(t,e){return t+(e?.items?.length??0)}function Ai({open:t,onOpenChange:e,defaultTab:n,initialSearch:r="",...o}){const s=o.mode??"add",a="agentId"in o?o.agentId:void 0,c="addedConnectionIds"in o?o.addedConnectionIds??new Set:new Set,l="onAdd"in o&&o.onAdd?o.onAdd:p=>{},f=(p,y,T)=>{a&&ne("agent_connection_attached",{agent_id:a,connection_id:p,app_name:y,mode:T})},[h,d]=u.useState(null),[m,v]=u.useState(r),[N,x]=u.useState(!1),{org:b}=an(),{data:R}=kn.useSession(),w=zn(),C=br(),j=xr(),k=p=>{e(!1),j({to:"/$org/settings/connections/$appSlug",params:{org:b.slug,appSlug:p}})},E=async p=>{d(p.app_name??p.id);try{const T=`${p.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,S=(await w.create.mutateAsync({title:T,description:p.description??null,connection_type:p.connection_type,connection_url:p.connection_url??null,connection_token:null,icon:p.icon??null,app_name:p.app_name??null,app_id:p.app_id??null,connection_headers:p.connection_headers??null})).id,A=new URL(`/api/${b.slug}/mcp/${S}`,window.location.origin),O=await Kt({url:A.href,token:null,orgId:b.id});if(O.supportsOAuth&&!O.isAuthenticated){const{token:K,tokenInfo:B,error:P}=await Yt({connectionId:S,orgSlug:b.slug,scope:"offline_access"});if(P||!K){ne("connection_oauth_failed",{connection_id:S,flow:"clone",error:P??"no_token"}),Le.error(`Authentication failed: ${P??"no token received"}`),await w.delete.mutateAsync(S);return}if(ne("connection_oauth_succeeded",{connection_id:S,flow:"clone"}),B)try{(await fetch(`/api/${b.slug}/connections/${S}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:B.accessToken,refreshToken:B.refreshToken,expiresIn:B.expiresIn,scope:B.scope,clientId:B.clientId,clientSecret:B.clientSecret,tokenEndpoint:B.tokenEndpoint})})).ok?await w.update.mutateAsync({id:S,data:{}}):await w.update.mutateAsync({id:S,data:{connection_token:K}})}catch{await w.update.mutateAsync({id:S,data:{connection_token:K}})}else await w.update.mutateAsync({id:S,data:{connection_token:K}});await C.invalidateQueries({queryKey:At.isMCPAuthenticated(A.href,null)})}f(S,p.app_name??null,"clone"),l(S)}catch(y){console.error("Failed to add connection:",y),Le.error("Failed to add connection")}finally{d(null)}},g=async p=>{if(!(!b||!R?.user?.id)){d(p.id);try{const y=to(p,b.id,R.user.id,{remoteIndex:0}),T=y.connection_type==="STDIO",I=!!y.connection_url,S=T&&y.connection_headers&&typeof y.connection_headers=="object"&&"command"in y.connection_headers;if(!I&&!S){Le.error("This MCP Server cannot be connected: no connection method available"),d(null);return}const{id:A}=await w.create.mutateAsync(y),O=new URL(`/api/${b.slug}/mcp/${A}`,window.location.origin),K=await Kt({url:O.href,token:null,orgId:b.id});if(K.supportsOAuth&&!K.isAuthenticated){const{token:B,tokenInfo:P,error:V}=await Yt({connectionId:A,orgSlug:b.slug,scope:"offline_access"});if(V||!B){ne("connection_oauth_failed",{connection_id:A,flow:"connect_new",error:V??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${V??"no token received"})`}),f(A,y.app_name??null,"new"),l(A);return}if(ne("connection_oauth_succeeded",{connection_id:A,flow:"connect_new"}),P)try{(await fetch(`/api/${b.slug}/connections/${A}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:P.accessToken,refreshToken:P.refreshToken,expiresIn:P.expiresIn,scope:P.scope,clientId:P.clientId,clientSecret:P.clientSecret,tokenEndpoint:P.tokenEndpoint})})).ok?await w.update.mutateAsync({id:A,data:{}}):await w.update.mutateAsync({id:A,data:{connection_token:B}})}catch{await w.update.mutateAsync({id:A,data:{connection_token:B}})}else await w.update.mutateAsync({id:A,data:{connection_token:B}});await C.invalidateQueries({queryKey:At.isMCPAuthenticated(O.href,null)}),Le.success("Connected and authenticated")}else Le.success("Connected");f(A,y.app_name??null,"new"),l(A)}catch(y){console.error("Failed to connect:",y),Le.error("Failed to connect")}finally{d(null)}}};return i.jsxs(On,{open:t,onOpenChange:e,children:[i.jsxs(Mn,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[i.jsx(Pn,{className:"px-6 pt-5 pb-0 shrink-0",children:i.jsx(Ln,{className:"text-base font-semibold",children:s==="browse"?"Connections":"Add Connection"})}),i.jsx("div",{className:"pt-3 shrink-0",children:i.jsx(Rr,{value:m,onChange:v,placeholder:"Search connections..."})}),i.jsx(u.Suspense,{fallback:i.jsx("div",{className:"flex-1 flex items-center justify-center",children:i.jsx(It,{size:24,className:"animate-spin text-muted-foreground"})}),children:i.jsx(so,{mode:s,agentId:a,addedConnectionIds:c,onAdd:l,onCloneAndAdd:E,onConnectAndAdd:g,connectingItemId:h,search:m,onCreateConnection:()=>x(!0),onBrowseNavigate:k,defaultTab:n})})]}),i.jsx(oo,{open:N,onOpenChange:x,onCreated:async p=>{x(!1);const y=new URL(`/api/${b.slug}/mcp/${p}`,window.location.origin),T=await Kt({url:y.href,token:null,orgId:b.id});if(T.supportsOAuth&&!T.isAuthenticated){const{token:I,tokenInfo:S,error:A}=await Yt({connectionId:p,orgSlug:b.slug,scope:"offline_access"});if(A||!I){ne("connection_oauth_failed",{connection_id:p,flow:"custom_create",error:A??"no_token"}),Le.warning("Couldn't sign in to this connection",{description:`It was added to your agent, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. (${A??"no token received"})`}),f(p,null,"custom"),l(p),e(!1);return}if(ne("connection_oauth_succeeded",{connection_id:p,flow:"custom_create"}),S)try{(await fetch(`/api/${b.slug}/connections/${p}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:S.accessToken,refreshToken:S.refreshToken,expiresIn:S.expiresIn,scope:S.scope,clientId:S.clientId,clientSecret:S.clientSecret,tokenEndpoint:S.tokenEndpoint})})).ok?await w.update.mutateAsync({id:p,data:{}}):await w.update.mutateAsync({id:p,data:{connection_token:I}})}catch{await w.update.mutateAsync({id:p,data:{connection_token:I}})}else await w.update.mutateAsync({id:p,data:{connection_token:I}});await C.invalidateQueries({queryKey:At.isMCPAuthenticated(y.href,null)})}f(p,null,"custom"),l(p),e(!1)}})]})}function Ei(t){const e=t?.metadata?.githubRepo;return e?e.connectionId?t?.connections?.some(r=>r.connection_id===e.connectionId)?e:null:e:null}function po(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return u.useMemo(()=>r=>{e.forEach(o=>o(r))},e)}const zt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nt(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function cn(t){return"nodeType"in t}function Q(t){var e,n;return t?nt(t)?t:cn(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function ln(t){const{Document:e}=Q(t);return t instanceof e}function xt(t){return nt(t)?!1:t instanceof Q(t).HTMLElement}function Fn(t){return t instanceof Q(t).SVGElement}function rt(t){return t?nt(t)?t.document:cn(t)?ln(t)?t:xt(t)||Fn(t)?t.ownerDocument:document:document:document}const ve=zt?u.useLayoutEffect:u.useEffect;function Ft(t){const e=u.useRef(t);return ve(()=>{e.current=t}),u.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}function go(){const t=u.useRef(null),e=u.useCallback((r,o)=>{t.current=setInterval(r,o)},[]),n=u.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function mt(t,e){e===void 0&&(e=[t]);const n=u.useRef(t);return ve(()=>{n.current!==t&&(n.current=t)},e),n}function yt(t,e){const n=u.useRef();return u.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function Tt(t){const e=Ft(t),n=u.useRef(null),r=u.useCallback(o=>{o!==n.current&&e?.(o,n.current),n.current=o},[]);return[n,r]}function _t(t){const e=u.useRef();return u.useEffect(()=>{e.current=t},[t]),e.current}let Zt={};function wt(t,e){return u.useMemo(()=>{if(e)return e;const n=Zt[t]==null?0:Zt[t]+1;return Zt[t]=n,t+"-"+n},[t,e])}function $n(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,a)=>{const c=Object.entries(a);for(const[l,f]of c){const h=s[l];h!=null&&(s[l]=h+t*f)}return s},{...e})}}const tt=$n(1),vt=$n(-1);function mo(t){return"clientX"in t&&"clientY"in t}function $t(t){if(!t)return!1;const{KeyboardEvent:e}=Q(t.target);return e&&t instanceof e}function vo(t){if(!t)return!1;const{TouchEvent:e}=Q(t.target);return e&&t instanceof e}function Ot(t){if(vo(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return mo(t)?{x:t.clientX,y:t.clientY}:null}const We=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[We.Translate.toString(t),We.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),vn="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function bo(t){return t.matches(vn)?t:t.querySelector(vn)}const xo={display:"none"};function yo(t){let{id:e,value:n}=t;return $.createElement("div",{id:e,style:xo},n)}function wo(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return $.createElement("div",{id:e,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Co(){const[t,e]=u.useState("");return{announce:u.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const Bn=u.createContext(null);function So(t){const e=u.useContext(Bn);u.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function Do(){const[t]=u.useState(()=>new Set),e=u.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[u.useCallback(r=>{let{type:o,event:s}=r;t.forEach(a=>{var c;return(c=a[o])==null?void 0:c.call(a,s)})},[t]),e]}const jo={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as C,c as d,bt as u,j as l}from"./index-
|
|
1
|
+
import{e as C,c as d,bt as u,j as l}from"./index-DKa2bYTS.js";const m=u("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",success:"fill-success text-gray-200",special:"fill-special text-background"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=d(m({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let a,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=l.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=a,e[4]=i):(a=e[3],i=e[4]);let s;e[5]!==t?(s=l.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=l.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=l.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as D,r as v,j as e,B as p,t as S,o as c,e as N}from"./index-
|
|
1
|
+
import{q as D,r as v,j as e,B as p,t as S,o as c,e as N}from"./index-DKa2bYTS.js";import{D as k}from"./domain-settings-D2tBGsHy.js";import{P as f}from"./index-BwI2_EhO.js";import{I as l}from"./input-BjUn5ElR.js";import{S as z}from"./switch-AaQYpmii.js";import{a as P,b as R,c as A,d as T}from"./use-org-sso-DXytk076.js";import{c as q,S as y,a as C,b as r,d as O}from"./settings-section-CcsLWjfi.js";import{s as F}from"./Trash01-CZnJ0avm.js";import{R as L}from"./require-capability-AhMmvh6N.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./use-mcp-client-8Mk4_07F.js";import"./sidebar-wL4mjwdl.js";import"./LayoutLeft-DgM7tZde.js";import"./tooltip-CRGezvtE.js";import"./sheet-Dlzq2DLm.js";import"./X-B0rYwlAH.js";import"./card-lBnnILto.js";import"./ArrowUpRight-ShCMNuxq.js";import"./use-capability-D76L9anx.js";import"./access-gate-CzWH8hLh.js";import"./capability-load-error-DU6WRPuJ.js";function B(){const{org:t}=D(),{data:a,isLoading:E}=P(t.id,t.slug),x=R(t.id,t.slug),h=A(t.id,t.slug),j=T(t.id,t.slug),[s,d]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[m,g]=v.useState(!1),u=a?.configured&&a.config,o=a?.config,I=()=>{o&&d({issuer:o.issuer,clientId:o.clientId,clientSecret:"",discoveryEndpoint:o.discoveryEndpoint??"",domain:o.domain,scopes:o.scopes.join(" ")}),g(!0)},b=async()=>{if(!s.issuer||!s.clientId||!s.domain){c.error("Issuer, Client ID, and Domain are required");return}if(!u&&!s.clientSecret){c.error("Client Secret is required for initial setup");return}try{await x.mutateAsync({issuer:s.issuer,clientId:s.clientId,clientSecret:s.clientSecret,discoveryEndpoint:s.discoveryEndpoint||void 0,scopes:s.scopes.split(/\s+/).filter(Boolean),domain:s.domain,enforced:o?.enforced??!1}),S(u?"sso_config_updated":"sso_configured",{organization_id:t.id,email_domain:s.domain}),c.success("SSO configuration saved"),g(!1)}catch(i){c.error(i instanceof Error?i.message:"Failed to save SSO config")}},w=async()=>{if(confirm("Are you sure you want to remove SSO configuration?"))try{await h.mutateAsync(),S("sso_config_removed",{organization_id:t.id}),c.success("SSO configuration removed"),g(!1)}catch{c.error("Failed to remove SSO config")}},_=async i=>{try{await j.mutateAsync(i),S("sso_enforcement_toggled",{organization_id:t.id,enforced:i}),c.success(i?"SSO enforcement enabled":"SSO enforcement disabled")}catch{c.error("Failed to toggle SSO enforcement")}};return e.jsx(f,{children:e.jsx(f.Content,{children:e.jsx(f.Body,{children:e.jsxs(q,{children:[e.jsx(f.Title,{children:"Security"}),e.jsx(k,{}),E?e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."}):e.jsxs(e.Fragment,{children:[u&&!m&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Provider",action:e.jsx("span",{className:"font-medium",children:o.issuer})}),e.jsx(r,{title:"Client ID",action:e.jsx("span",{className:"font-mono text-xs",children:o.clientId})}),e.jsx(r,{title:"Domain",action:e.jsx("span",{className:"font-medium",children:o.domain})}),e.jsx(r,{title:"Scopes",action:e.jsx("span",{className:"font-mono text-xs",children:o.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(r,{title:"Enforce SSO",description:"Require all members to authenticate via SSO",action:e.jsx(z,{checked:o.enforced,onCheckedChange:_,disabled:j.isPending})}),e.jsxs(O,{children:[e.jsxs(p,{variant:"ghost",size:"sm",onClick:w,disabled:h.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(F,{size:14}),"Remove"]}),e.jsx(p,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${t.slug}/sso/authorize`,"_blank")},children:"Test SSO"}),e.jsx(p,{variant:"outline",size:"sm",onClick:I,children:"Edit configuration"})]})]})}),(!u||m)&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(r,{title:"Issuer URL",description:"The OIDC issuer URL of your identity provider.",action:e.jsx(l,{id:"sso-issuer",placeholder:"https://login.microsoftonline.com/{tenant}/v2.0",value:s.issuer,onChange:i=>d(n=>({...n,issuer:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client ID",action:e.jsx(l,{id:"sso-client-id",placeholder:"your-client-id",value:s.clientId,onChange:i=>d(n=>({...n,clientId:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Client Secret",description:m&&u?"Leave empty to keep current":void 0,action:e.jsx(l,{id:"sso-client-secret",type:"password",placeholder:"your-client-secret",value:s.clientSecret,onChange:i=>d(n=>({...n,clientSecret:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Email Domain",description:"The email domain this SSO provider covers.",action:e.jsx(l,{id:"sso-domain",placeholder:"company.com",value:s.domain,onChange:i=>d(n=>({...n,domain:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Scopes",action:e.jsx(l,{id:"sso-scopes",placeholder:"openid email profile",value:s.scopes,onChange:i=>d(n=>({...n,scopes:i.target.value})),className:"w-[280px]"})}),e.jsx(r,{title:"Discovery Endpoint",description:"Optional — auto-detected from issuer if omitted.",action:e.jsx(l,{id:"sso-discovery",placeholder:"Auto-detected from issuer",value:s.discoveryEndpoint,onChange:i=>d(n=>({...n,discoveryEndpoint:i.target.value})),className:"w-[280px]"})}),e.jsxs(O,{children:[m&&e.jsx(p,{variant:"outline",size:"sm",onClick:()=>g(!1),children:"Cancel"}),e.jsx(p,{onClick:b,disabled:x.isPending,size:"sm",children:x.isPending?"Saving...":m?"Update":"Configure SSO"})]})]})})]})]})})})})}function ce(){const t=N.c(1);let a;return t[0]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(L,{capability:"org:manage",area:"security",children:e.jsx(B,{})}),t[0]=a):a=t[0],a}export{ce as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as D,j as s,E as le,r as K,q as ae,G as ce,f as de,g as me,B as Y,t as te,K as fe,a as ge,o as ie}from"./index-DC5ykVbq.js";import{i as ue}from"./AlertCircle-GyiOEtAj.js";import{i as pe}from"./ChevronRight-o4nZK4mj.js";import{s as xe}from"./Plus-LwySGDxB.js";import{s as he}from"./Trash01-DZfkybKU.js";import{I as X}from"./input-CmdQXS7m.js";import{S as oe}from"./switch-QoxQ4Dp8.js";import{S as ye}from"./skeleton-DWOWMile.js";import{A as ne}from"./avatar-BdxyYnNK.js";import{P as je,a as Ce,b as Se}from"./popover-Dp3QS8N6.js";import{b as re}from"./use-connection-n0123jPK.js";import{W as Z}from"./use-mcp-client-DyuH8eE6.js";import{P as G}from"./index-BQoodOft.js";import{u as ve}from"./use-registry-connections-Bds9Ypgx.js";import{g as _e,h as be}from"./use-organization-settings-B4dvDS7R.js";import{c as Pe,b as I,S as ee,a as Q}from"./settings-section-Tanq8jyR.js";import{R as Re}from"./require-capability-bCqnmJfy.js";import"./User01-NlAzTddi.js";import"./use-collections-BOfrARHt.js";import"./sidebar-BROkYxtG.js";import"./LayoutLeft-B60p8Um4.js";import"./tooltip-D7cmoHaE.js";import"./sheet-D4rfwRUO.js";import"./X-BN3arG6T.js";import"./card-Br94nOKg.js";import"./ArrowUpRight-DlUPHWCe.js";import"./use-capability-CxysHd_P.js";import"./access-gate-CweS51cI.js";import"./capability-load-error-DNJuBq-F.js";function ke(t){const e=D.c(3),{error:o}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let n;return e[1]!==o.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",o.message]})]}),e[1]=o.message,e[2]=n):n=e[2],n}function we(t){const e=D.c(36),{onCancel:o,onSuccess:m}=t,n=re(),[r,j]=K.useState(""),[a,S]=K.useState(""),[x,v]=K.useState("");let h;e[0]!==n||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await n.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=n,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:Ne},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>S(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>v(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==o?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:o,disabled:d,children:"Cancel"}),e[19]=d,e[20]=o,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function Ne(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:o,description:m,icon:n,enabled:r,onToggle:j,onDelete:a,href:S}=t,x=de();let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={from:"/shell/$org"},e[0]=v):v=e[0];const{org:h}=me(v);let f;e[1]!==r||e[2]!==S||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{S?x({to:S,params:{org:h}}):j(!r)},e[1]=r,e[2]=S,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==n||e[8]!==o?(c=n?s.jsx("img",{src:n,alt:o,className:"size-8 rounded-md object-contain"}):s.jsx(ne,{fallback:o.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=n,e[8]=o,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Me,children:s.jsx(he,{size:14})})}),s.jsx(Se,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(oe,{checked:r,onClick:Ae,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==S?(p=S&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=S,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==o||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:o,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=o,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ae(t){return t.stopPropagation()}function Me(t){return t.stopPropagation()}function Te(){const t=D.c(59),{org:e}=ae(),o=ve(),m=re(),n=_e(),{mutateAsync:r}=be(),j=ce(),[a,S]=K.useState(!1);let x,v,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==n||t[4]!==o||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!n)return i===p;const w=n.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=o.find(i=>i.id===p),k=o.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=o.filter(i=>!B.has(i.id));let R;t[13]!==n||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=n??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=n,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const W=C;let q;t[20]!==n||t[21]!==r?(q=async i=>{S(!1);const w=n??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=n,t[21]=r,t[22]=q):q=t[22];const H=q,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>S(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==H||t[28]!==a?(T=a&&s.jsx(we,{onCancel:()=>S(!1),onSuccess:H}),t[27]=H,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let $;t[34]!==z||t[35]!==E?($=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=$):$=t[36];let U;t[37]!==W||t[38]!==P||t[39]!==l?(U=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>W(i.id)},i.id),t[37]=W,t[38]=P,t[39]=l,t[40]=U):U=t[40];const V=A.map(U);let F;t[41]!==$||t[42]!==V?(F=s.jsxs(Q,{children:[$,V]}),t[41]=$,t[42]=V,t[43]=F):F=t[43],t[44]!==F||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,F]}),t[44]=F,t[45]=M,t[46]=T,t[47]=c):c=t[47],v=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(ne,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(oe,{checked:!1,disabled:!0,onCheckedChange:ze})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=n,t[4]=o,t[5]=a,t[6]=r,t[7]=x,t[8]=v,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],v=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==v||t[52]!==f||t[53]!==d?(g=s.jsx(v,{title:f,children:d}),t[51]=v,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function ze(){}function Ee(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(le,{fallback:$e,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Te,{})]})})})})})}),t[1]=o):o=t[1],o}function $e(t){const{error:e}=t;return s.jsx(ke,{error:e??new Error("Failed to load store settings")})}function mt(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Re,{capability:"registry:manage",area:"the store",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}export{mt as default};
|
|
1
|
+
import{e as D,j as s,E as le,r as K,q as ae,G as ce,f as de,g as me,B as Y,t as te,K as fe,a as ge,o as ie}from"./index-DKa2bYTS.js";import{i as ue}from"./AlertCircle-CPDzwcNm.js";import{i as pe}from"./ChevronRight-DVtjidio.js";import{s as xe}from"./Plus-Dppw3z2O.js";import{s as he}from"./Trash01-CZnJ0avm.js";import{I as X}from"./input-BjUn5ElR.js";import{S as oe}from"./switch-AaQYpmii.js";import{S as ye}from"./skeleton-Bjc1-vnR.js";import{A as ne}from"./avatar-GhNVlFfA.js";import{P as je,a as Ce,b as Se}from"./popover-B-ZF248I.js";import{b as re}from"./use-connection-D5VghmN_.js";import{W as Z}from"./use-mcp-client-8Mk4_07F.js";import{P as G}from"./index-BwI2_EhO.js";import{u as ve}from"./use-registry-connections-DPGwglYZ.js";import{g as _e,h as be}from"./use-organization-settings-BxGa6DXL.js";import{c as Pe,b as I,S as ee,a as Q}from"./settings-section-CcsLWjfi.js";import{R as Re}from"./require-capability-AhMmvh6N.js";import"./User01-CWOXdoG4.js";import"./use-collections-Ciodw5T-.js";import"./sidebar-wL4mjwdl.js";import"./LayoutLeft-DgM7tZde.js";import"./tooltip-CRGezvtE.js";import"./sheet-Dlzq2DLm.js";import"./X-B0rYwlAH.js";import"./card-lBnnILto.js";import"./ArrowUpRight-ShCMNuxq.js";import"./use-capability-D76L9anx.js";import"./access-gate-CzWH8hLh.js";import"./capability-load-error-DU6WRPuJ.js";function ke(t){const e=D.c(3),{error:o}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let n;return e[1]!==o.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",o.message]})]}),e[1]=o.message,e[2]=n):n=e[2],n}function we(t){const e=D.c(36),{onCancel:o,onSuccess:m}=t,n=re(),[r,j]=K.useState(""),[a,S]=K.useState(""),[x,v]=K.useState("");let h;e[0]!==n||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await n.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=n,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:Ne},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>S(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>v(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==o?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:o,disabled:d,children:"Cancel"}),e[19]=d,e[20]=o,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function Ne(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:o,description:m,icon:n,enabled:r,onToggle:j,onDelete:a,href:S}=t,x=de();let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={from:"/shell/$org"},e[0]=v):v=e[0];const{org:h}=me(v);let f;e[1]!==r||e[2]!==S||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{S?x({to:S,params:{org:h}}):j(!r)},e[1]=r,e[2]=S,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==n||e[8]!==o?(c=n?s.jsx("img",{src:n,alt:o,className:"size-8 rounded-md object-contain"}):s.jsx(ne,{fallback:o.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=n,e[8]=o,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Me,children:s.jsx(he,{size:14})})}),s.jsx(Se,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(oe,{checked:r,onClick:Ae,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==S?(p=S&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=S,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==o||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:o,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=o,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ae(t){return t.stopPropagation()}function Me(t){return t.stopPropagation()}function Te(){const t=D.c(59),{org:e}=ae(),o=ve(),m=re(),n=_e(),{mutateAsync:r}=be(),j=ce(),[a,S]=K.useState(!1);let x,v,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==n||t[4]!==o||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!n)return i===p;const w=n.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=o.find(i=>i.id===p),k=o.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=o.filter(i=>!B.has(i.id));let R;t[13]!==n||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=n??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=n,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const W=C;let q;t[20]!==n||t[21]!==r?(q=async i=>{S(!1);const w=n??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=n,t[21]=r,t[22]=q):q=t[22];const H=q,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>S(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==H||t[28]!==a?(T=a&&s.jsx(we,{onCancel:()=>S(!1),onSuccess:H}),t[27]=H,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let $;t[34]!==z||t[35]!==E?($=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=$):$=t[36];let U;t[37]!==W||t[38]!==P||t[39]!==l?(U=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>W(i.id)},i.id),t[37]=W,t[38]=P,t[39]=l,t[40]=U):U=t[40];const V=A.map(U);let F;t[41]!==$||t[42]!==V?(F=s.jsxs(Q,{children:[$,V]}),t[41]=$,t[42]=V,t[43]=F):F=t[43],t[44]!==F||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,F]}),t[44]=F,t[45]=M,t[46]=T,t[47]=c):c=t[47],v=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(ne,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(oe,{checked:!1,disabled:!0,onCheckedChange:ze})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=n,t[4]=o,t[5]=a,t[6]=r,t[7]=x,t[8]=v,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],v=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==v||t[52]!==f||t[53]!==d?(g=s.jsx(v,{title:f,children:d}),t[51]=v,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function ze(){}function Ee(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(le,{fallback:$e,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Te,{})]})})})})})}),t[1]=o):o=t[1],o}function $e(t){const{error:e}=t;return s.jsx(ke,{error:e??new Error("Failed to load store settings")})}function mt(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Re,{capability:"registry:manage",area:"the store",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}export{mt as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-BfSrEMey.js","assets/index-DKa2bYTS.js","assets/index-C4D2JWLP.css","assets/XCircle-7rwkbF3y.js","assets/CheckCircle-8aHxGN9L.js","assets/Container-D6z1XWRo.js","assets/Settings02-ocCz49Kz.js","assets/use-mcp-client-8Mk4_07F.js","assets/useInfiniteQuery-D71LulL4.js","assets/infiniteQueryObserver-CAoHOrzQ.js","assets/badge-Dwfe01sI.js","assets/input-BjUn5ElR.js","assets/dropdown-menu-C0lExS63.js","assets/Check-notD5fT5.js","assets/ChevronRight-DVtjidio.js","assets/DotsVertical-BJhFy0Ao.js","assets/table-tXZdu4xg.js","assets/toggle-group-DsBG4yXK.js","assets/use-view-mode-DHxUj9Og.js","assets/tooltip-CRGezvtE.js","assets/FilterLines-DMByO-IA.js","assets/Globe01-CIsVQmOA.js","assets/SearchMd-FY1Qclyu.js","assets/dialog-B3n4osS2.js","assets/X-B0rYwlAH.js","assets/AlertCircle-CPDzwcNm.js","assets/Upload01-76tsCZMd.js","assets/alert-dialog-BqYd6k15.js","assets/card-lBnnILto.js","assets/Trash01-CZnJ0avm.js","assets/label-kHH3gI2u.js","assets/select-PwFJPxWI.js","assets/ChevronDown-DagjZ4eX.js","assets/ChevronUp-BMDnNzvq.js","assets/switch-AaQYpmii.js","assets/textarea-BVmeWwVH.js","assets/RefreshCcw01-BEoOvUD1.js","assets/checkbox-B0Z95T9p.js","assets/Eye-BB6Aus5x.js","assets/LinkExternal01-CQF0MYqY.js","assets/use-copy-C6l9b4AS.js","assets/Key01-CngsxG29.js","assets/Plus-Dppw3z2O.js","assets/Play-QmNwPHc_.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{e as m,f as n,g as c,j as t,l as f,r as l,_ as p}from"./index-DKa2bYTS.js";import{R as u}from"./require-capability-AhMmvh6N.js";import"./use-capability-D76L9anx.js";import"./access-gate-CzWH8hLh.js";import"./capability-load-error-DU6WRPuJ.js";const g=l.lazy(()=>p(()=>import("./registry-layout-BfSrEMey.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(f,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as i,a7 as C,bx as y,bh as T,a8 as I,by as M,bz as z,ag as H,e as A,c as g}from"./index-
|
|
1
|
+
import{r as c,j as i,a7 as C,bx as y,bh as T,a8 as I,by as M,bz as z,ag as H,e as A,c as g}from"./index-DKa2bYTS.js";var m="Switch",[U]=H(m),[q,L]=U(m),E=c.forwardRef((r,e)=>{const{__scopeSwitch:t,name:a,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=r,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(r.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:a,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((r,e)=>{const{__scopeSwitch:t,...a}=r,s=L(P,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...a,ref:e})});R.displayName=P;var O="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:r,control:e,checked:t,bubbles:a=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=z(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:a});h.call(l,t),l.dispatchEvent(v)}},[u,t,a]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=O;function j(r){return r?"checked":"unchecked"}var $=E,D=R;function W(r){const e=A.c(9);let t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==a||e[7]!==s?(o=i.jsx($,{"data-slot":"switch",className:s,...a,children:n}),e[6]=a,e[7]=s,e[8]=o):o=e[8],o}export{W as S};
|