decocms 3.35.5 → 3.35.6
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-31UiSlWs.js → AlertCircle-BdxdLfMZ.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-G1K__Qxa.js → ArrowUpRight-D4WTYONo.js} +1 -1
- package/dist/client/assets/{Check-DMrKOk-W.js → Check-ByG0nAY6.js} +1 -1
- package/dist/client/assets/{CheckCircle-CuJANkMl.js → CheckCircle-C-upsPdg.js} +1 -1
- package/dist/client/assets/{ChevronDown-DSz5ssPm.js → ChevronDown-BnRC7SrH.js} +1 -1
- package/dist/client/assets/{ChevronLeft-CkSAs92L.js → ChevronLeft-C70Azurf.js} +1 -1
- package/dist/client/assets/{ChevronRight-C1PAq-Un.js → ChevronRight--j_9x5Si.js} +1 -1
- package/dist/client/assets/{ChevronUp-BWqHruLj.js → ChevronUp-BQorkh2i.js} +1 -1
- package/dist/client/assets/{Container-1Pc_HrQZ.js → Container-DxN5v3U8.js} +1 -1
- package/dist/client/assets/{DotsVertical-DNK31xsE.js → DotsVertical-C3W2s3WW.js} +1 -1
- package/dist/client/assets/{Eye-CEpp0ZmO.js → Eye-i6HoqOn_.js} +1 -1
- package/dist/client/assets/{FilterLines-DwhZZBde.js → FilterLines-D6io39CJ.js} +1 -1
- package/dist/client/assets/{Globe01-D9mPWR46.js → Globe01-BoP8H_NZ.js} +1 -1
- package/dist/client/assets/{HardDrive-D_47h0Zh.js → HardDrive-DQcSGPZL.js} +1 -1
- package/dist/client/assets/{Key01-CLgAA9v8.js → Key01-BY8TiIH_.js} +1 -1
- package/dist/client/assets/{LayoutLeft-B6ukWLii.js → LayoutLeft-Dk1audj-.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CArzLSWR.js → LinkExternal01-Cv2RkpjT.js} +1 -1
- package/dist/client/assets/{Monitor01-BKZNr1y2.js → Monitor01-CoO9QmCK.js} +1 -1
- package/dist/client/assets/{Palette-BF9pRUee.js → Palette-deno1eEN.js} +1 -1
- package/dist/client/assets/{Play-9jeaOjjI.js → Play-pWfjHR9I.js} +1 -1
- package/dist/client/assets/{Plus-B0pI-EF4.js → Plus-Ca-boKc-.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-fdpiitBO.js → RefreshCcw01-m0oFG4br.js} +1 -1
- package/dist/client/assets/{SearchMd-CkLHWWX8.js → SearchMd-BTjnXp3X.js} +1 -1
- package/dist/client/assets/{Settings02-CFECC-IR.js → Settings02-DQ3JZYho.js} +1 -1
- package/dist/client/assets/{Shield01-B0ODXcZU.js → Shield01-BqgQ6O-B.js} +1 -1
- package/dist/client/assets/{Star01-W-0rzL-U.js → Star01-BI7rxnuz.js} +1 -1
- package/dist/client/assets/{Stars01-BaynVBty.js → Stars01-CbPlZD94.js} +1 -1
- package/dist/client/assets/{Stars02-BF-WR3Hf.js → Stars02-Ba384PUK.js} +1 -1
- package/dist/client/assets/{Sun-Bo0dXdnq.js → Sun-BB5ryFYp.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CHYIr3hf.js → SwitchHorizontal01-C2a9MjMN.js} +1 -1
- package/dist/client/assets/{Tool01-CfeyKXsn.js → Tool01-DiJPRujJ.js} +1 -1
- package/dist/client/assets/{Trash01-C5WgD7p-.js → Trash01-hWwpO1I_.js} +1 -1
- package/dist/client/assets/{Upload01-CRDtP4E8.js → Upload01-tMokiVUz.js} +1 -1
- package/dist/client/assets/{User01-BQUcDlD0.js → User01-qxhPSUm_.js} +1 -1
- package/dist/client/assets/{Users01-BIvCNTO4.js → Users01-DgDkNrBR.js} +1 -1
- package/dist/client/assets/{Users03-C8p6m2i2.js → Users03-dk6WdPnC.js} +1 -1
- package/dist/client/assets/{X-GmOf9On8.js → X-BgQLDqpQ.js} +1 -1
- package/dist/client/assets/{XCircle-DJ0Z1ta2.js → XCircle-Dz_GlHY5.js} +1 -1
- package/dist/client/assets/{XClose-DBvKjQIP.js → XClose-C4uc8l11.js} +1 -1
- package/dist/client/assets/{Zap-CLcQM9Lj.js → Zap-BAnl3IBe.js} +1 -1
- package/dist/client/assets/{ZapSquare-ntafTdnL.js → ZapSquare-CSP4r4PP.js} +1 -1
- package/dist/client/assets/{ZoomOut-C1WJJ4Yu.js → ZoomOut-BANb87-i.js} +1 -1
- package/dist/client/assets/{access-gate-DKAVTAGp.js → access-gate-D8GfJliw.js} +1 -1
- package/dist/client/assets/{accordion-OXCrOz9V.js → accordion-CvUJVGp7.js} +1 -1
- package/dist/client/assets/{add-section-modal-CnFR7Jvo.js → add-section-modal-C8zkVp8O.js} +1 -1
- package/dist/client/assets/{agent-capabilities-Bl046QMJ.js → agent-capabilities-C4o9Cucl.js} +1 -1
- package/dist/client/assets/{agent-icon-CwVKOe-B.js → agent-icon-BZpQDAZU.js} +1 -1
- package/dist/client/assets/{agents-list-D7TWNFAz.js → agents-list-Cy5LjlS-.js} +1 -1
- package/dist/client/assets/{ai-providers-CSkxv_Yc.js → ai-providers-C40CpsyS.js} +1 -1
- package/dist/client/assets/{alert-C-_lRQKh.js → alert-DOmmOyvz.js} +1 -1
- package/dist/client/assets/{alert-dialog-CGdurjbG.js → alert-dialog-RhxX9i57.js} +1 -1
- package/dist/client/assets/app-editor-B8xTj7FL.js +1 -0
- package/dist/client/assets/{auth-BEpSX7Q8.js → auth-BnAEjx9j.js} +1 -1
- package/dist/client/assets/{auth-catchall-sWwZuUW_.js → auth-catchall-DHkZ39dF.js} +1 -1
- package/dist/client/assets/{auth-split-layout-K8jpuXO2.js → auth-split-layout-B2Ec4bNy.js} +1 -1
- package/dist/client/assets/{automation-list-row-CqYTZ9yK.js → automation-list-row-CwvON8r0.js} +1 -1
- package/dist/client/assets/{automation-runs-CQf74tLw.js → automation-runs-BqzjGjNJ.js} +1 -1
- package/dist/client/assets/{automations-B6ZxKlJf.js → automations-D_H0Rurs.js} +1 -1
- package/dist/client/assets/{avatar-BkJDGlfl.js → avatar-B05K9npJ.js} +1 -1
- package/dist/client/assets/{badge-C3P3tlBP.js → badge-DepW8zMP.js} +1 -1
- package/dist/client/assets/{brand-context-DBB5n2Li.js → brand-context-Ded1_fcJ.js} +1 -1
- package/dist/client/assets/{buckets-SEiqieWV.js → buckets-C_lb2aFH.js} +1 -1
- package/dist/client/assets/{calendar-j-vOob4B.js → calendar-cx7Wk4XQ.js} +1 -1
- package/dist/client/assets/{capability-load-error-DgQrAAAc.js → capability-load-error-CXftmPyi.js} +1 -1
- package/dist/client/assets/{card-jKA-euu5.js → card-Dzpiviva.js} +1 -1
- package/dist/client/assets/{chat-context-DsjMikdi.js → chat-context-XxWcMKnK.js} +1 -1
- package/dist/client/assets/{checkbox-e4_po5HP.js → checkbox-CiQiAC_1.js} +1 -1
- package/dist/client/assets/{cli-auth-success-WJNdQhKb.js → cli-auth-success-CEKtx_Vg.js} +1 -1
- package/dist/client/assets/{collection-detail-DG5zKomI.js → collection-detail-BQk4HFTt.js} +1 -1
- package/dist/client/assets/{collection-display-button-syPP49Ut.js → collection-display-button-D3ZkpQKX.js} +1 -1
- package/dist/client/assets/{collection-search-nbxNvWqk.js → collection-search-DGxm46jw.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BRc74VvZ.js → collection-table-wrapper-NdiTX7ev.js} +1 -1
- package/dist/client/assets/{collection-tabs-BKbYeJdR.js → collection-tabs-D8b9Fop0.js} +1 -1
- package/dist/client/assets/{collections-CXoTtMtF.js → collections-DQTIJ43Y.js} +1 -1
- package/dist/client/assets/{command-D_Z2UBVN.js → command-Dw0cdU7u.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-DmEexrvB.js → connect-desktop-dialog-DaREkv_h.js} +1 -1
- package/dist/client/assets/{connection-card-DNKrdo60.js → connection-card-BFSKgi5D.js} +1 -1
- package/dist/client/assets/{connection-detail-D98IvWF5.js → connection-detail-DBWKbL6I.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CCU5G4sF.js → connection-form-helpers-CxYh53Ie.js} +1 -1
- package/dist/client/assets/{connections-3Iki5Fsy.js → connections-BN1ltLel.js} +1 -1
- package/dist/client/assets/{decopilot-BlSXmqcC.js → decopilot-CauvA-RH.js} +1 -1
- package/dist/client/assets/decopilot-sse-pool-sjWpsyX0.js +1 -0
- package/dist/client/assets/{dialog-DcBsN8pA.js → dialog-NbvuzXZV.js} +1 -1
- package/dist/client/assets/{domain-settings-BjMHkMu1.js → domain-settings-9eHrDjOq.js} +1 -1
- package/dist/client/assets/{drawer-BF8jsFPS.js → drawer-5hzhUed3.js} +1 -1
- package/dist/client/assets/{dropdown-menu-84bkXD1e.js → dropdown-menu-DDfjivGs.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-F1V_m8d8.js → dynamic-plugin-layout-Dj2EKcNP.js} +1 -1
- package/dist/client/assets/{empty-state-BxCy5Jed.js → empty-state-DMm5rF2F.js} +1 -1
- package/dist/client/assets/{empty-state-w5S4fPAi.js → empty-state-DgV0_vqZ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DfBP_Vx6.js → extract-connection-data-EC8TuVkD.js} +1 -1
- package/dist/client/assets/{features-DfwmM51Q.js → features-sC0fOIy5.js} +1 -1
- package/dist/client/assets/{file-explorer-DaC31Uw6.js → file-explorer-DQiHabun.js} +1 -1
- package/dist/client/assets/{file-type-icon-CV4uwJNf.js → file-type-icon-evaVS-14.js} +1 -1
- package/dist/client/assets/{files-9dKCDrVh.js → files-DwL8E8iE.js} +1 -1
- package/dist/client/assets/{form-D8mDeRl7.js → form-W67eg754.js} +1 -1
- package/dist/client/assets/{general-BO5waTVQ.js → general-B8hG16F1.js} +1 -1
- package/dist/client/assets/{generate-id-kBy7vya_.js → generate-id-CtRf6mq5.js} +1 -1
- package/dist/client/assets/{github-repo-picker-BvpkOeud.js → github-repo-picker-C38g29Tm.js} +1 -1
- package/dist/client/assets/{header-tab-button-8Sc8XWve.js → header-tab-button-Dj8caQW7.js} +1 -1
- package/dist/client/assets/{hover-card-BZHgt6ym.js → hover-card-CaSThHdV.js} +1 -1
- package/dist/client/assets/{image-field-Cct-NRLT.js → image-field-C_iu9B-F.js} +1 -1
- package/dist/client/assets/{index-Bi2v8k7C.js → index-01Gl_fY8.js} +1 -1
- package/dist/client/assets/{index-rCN6Ye4g.js → index-B6xiIBRQ.js} +1 -1
- package/dist/client/assets/{index-Nu78oYuC.js → index-BV8QivMR.js} +4 -4
- package/dist/client/assets/{index-Dnto8xfU.js → index-BZnUBmmZ.js} +1 -1
- package/dist/client/assets/{index-BWljFL9N.js → index-BkuSFeLL.js} +1 -1
- package/dist/client/assets/{index-BJyTPOe7.js → index-C4vgVevj.js} +1 -1
- package/dist/client/assets/{index-rGp3doXp.js → index-CBGRBCyz.js} +1 -1
- package/dist/client/assets/{index-DFqdRm0K.js → index-Cdks9-wg.js} +1 -1
- package/dist/client/assets/{index-CQlR4vxi.js → index-DcqdobGw.js} +1 -1
- package/dist/client/assets/{index-9V8HlnBp.js → index-DfRR0hsi.js} +1 -1
- package/dist/client/assets/{index-D3xBGq3E.js → index-Dhab5IT3.js} +1 -1
- package/dist/client/assets/{index-BUcOh30J.js → index-DxsS1HLy.js} +1 -1
- package/dist/client/assets/{index-Bunm6B_R.js → index-Uxmxa28N.js} +3 -3
- package/dist/client/assets/{index-Dp8I5tn7.js → index-k0w22874.js} +1 -1
- package/dist/client/assets/{index-Csw4OUms.js → index-qMRY8iiO.js} +1 -1
- package/dist/client/assets/{index-redirect-BiF4PKjU.js → index-redirect-1lsM3-Qy.js} +1 -1
- package/dist/client/assets/{input-CyOWZBj4.js → input-DV0lJPfu.js} +1 -1
- package/dist/client/assets/{integration-icon-BHB4BDVP.js → integration-icon-DOyf0ghu.js} +1 -1
- package/dist/client/assets/{label-BAIINde3.js → label-DsPCNyuh.js} +1 -1
- package/dist/client/assets/{layout-CMgptt9x.js → layout-UVx5jDOd.js} +1 -1
- package/dist/client/assets/{login-DZNNV5F1.js → login-Bdct1Ii1.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CYt2Zrqm.js → mcp-oauth-DPpOCiR5.js} +1 -1
- package/dist/client/assets/{members-C6D5IlRh.js → members-XFuvp9my.js} +1 -1
- package/dist/client/assets/{monaco-editor-ZR2lAisS.js → monaco-editor-CZjzwq84.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CpOeeH-N.js → monitoring-stats-row-fqGAHQb8.js} +1 -1
- package/dist/client/assets/{oauth-callback-DPClZAji.js → oauth-callback-Bi8QWPMB.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CGwLuPC_.js → oauth-callback-ai-provider-YEsxF-8E.js} +1 -1
- package/dist/client/assets/{onboarding-C88FAjK9.js → onboarding-DGKgKbZG.js} +1 -1
- package/dist/client/assets/{org-install-Cu7DZO4o.js → org-install-_XxJ_9mS.js} +1 -1
- package/dist/client/assets/{org-layout-BIjQFkC_.js → org-layout-Bi6c2nSE.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-BDInPhT1.js → org-plugin-layout-Bu5yRNW-.js} +1 -1
- package/dist/client/assets/{page-seo-form-C4S4h0It.js → page-seo-form-C2Ov8d3q.js} +1 -1
- package/dist/client/assets/page-seo-sheet-C6vH6UJp.js +1 -0
- package/dist/client/assets/{pair-D_5AYlMN.js → pair-QRwOdDMh.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-BymtBQkd.js → plugin-empty-state-CeoKe0Wm.js} +1 -1
- package/dist/client/assets/{plugin-header-BwAtgbi1.js → plugin-header-DZRx90au.js} +1 -1
- package/dist/client/assets/{plugin-layout-7gPT5bds.js → plugin-layout-Bao487f4.js} +1 -1
- package/dist/client/assets/{popover-CrLH6wKL.js → popover-Jfd2eq_a.js} +1 -1
- package/dist/client/assets/{post-editor-CS4o8d4k.js → post-editor-V4KLdisO.js} +1 -1
- package/dist/client/assets/{primitives-CTIOH0kq.js → primitives-DP2nN7Dh.js} +1 -1
- package/dist/client/assets/{profile-CuUuKgRl.js → profile-BCp6U0hU.js} +1 -1
- package/dist/client/assets/project-app-view-ovTBsThp.js +1 -0
- package/dist/client/assets/record-editor-Chg9OiEH.js +1 -0
- package/dist/client/assets/registry-DKSgHOjT.js +2 -0
- package/dist/client/assets/{registry-layout-DP_XX2oQ.js → registry-layout-DAbeFTO4.js} +1 -1
- package/dist/client/assets/{require-capability-CwUZ3ZpN.js → require-capability-5Ip6utE2.js} +1 -1
- package/dist/client/assets/{required-auth-layout-C06pvfa-.js → required-auth-layout-DwO_xi24.js} +1 -1
- package/dist/client/assets/{reset-password-BMNE5AYj.js → reset-password-BuhZ5TrW.js} +1 -1
- package/dist/client/assets/{resizable-DCuZsBlg.js → resizable-BWgnQBO-.js} +1 -1
- package/dist/client/assets/{roles-D5I3S8LX.js → roles-tdagbMJT.js} +1 -1
- package/dist/client/assets/save-referenced-block-CHATKao2.js +1 -0
- package/dist/client/assets/{save-status-CXs50J0L.js → save-status-4ua9-mbv.js} +1 -1
- package/dist/client/assets/{schema-form-1CtN1Af7.js → schema-form-DaHWFhOC.js} +1 -1
- package/dist/client/assets/{scroll-area-BSoiojrs.js → scroll-area-B2oPO2DK.js} +1 -1
- package/dist/client/assets/{search-input-BXkfgyF5.js → search-input-BZZZVgMK.js} +1 -1
- package/dist/client/assets/{secrets-aDtkLJN1.js → secrets-ChCzyWyE.js} +1 -1
- package/dist/client/assets/{sections-editor-DudMoOI-.js → sections-editor-CDpSixQy.js} +1 -1
- package/dist/client/assets/{select-CFUImWa3.js → select-DV1FwAD4.js} +1 -1
- package/dist/client/assets/{select-model-DnWyHzYb.js → select-model-DSDBCN6l.js} +1 -1
- package/dist/client/assets/{seo-editor-g_NLEqG6.js → seo-editor-DRHmtRWo.js} +1 -1
- package/dist/client/assets/{settings-layout-yNEfQ0hX.js → settings-layout-ZDFB-szy.js} +1 -1
- package/dist/client/assets/{settings-section-Cr66nK1f.js → settings-section-BKgS_iJ4.js} +1 -1
- package/dist/client/assets/{sheet-D-Bc7_Zm.js → sheet-6C3p1ZVN.js} +1 -1
- package/dist/client/assets/{shell-controls-BRJxYV6k.js → shell-controls-CqpbaRS4.js} +1 -1
- package/dist/client/assets/{shell-layout-DQg6SF_u.js → shell-layout-OG_nqUcJ.js} +1 -1
- package/dist/client/assets/{shell-route-loading-CvUsiF-g.js → shell-route-loading-sAXWvXuw.js} +1 -1
- package/dist/client/assets/{sidebar-KNLjw0cP.js → sidebar-BThc8k1X.js} +1 -1
- package/dist/client/assets/{skeleton-1CAI_U0G.js → skeleton-7xZf6qTy.js} +1 -1
- package/dist/client/assets/{sortable.esm-ebM_sR4V.js → sortable.esm-D9tZZic5.js} +1 -1
- package/dist/client/assets/{spinner-DMOkK4rN.js → spinner-B4TZJa4Y.js} +1 -1
- package/dist/client/assets/{sso-B49rrps9.js → sso-BDMNdqrW.js} +1 -1
- package/dist/client/assets/{store-CA7nDwB7.js → store-DH5SX4uX.js} +1 -1
- package/dist/client/assets/store-registry-DMx_57j5.js +2 -0
- package/dist/client/assets/{studio-tools-DNrxjNDE.js → studio-tools-DUggrN6-.js} +1 -1
- package/dist/client/assets/{switch-DoZjY2Tt.js → switch-BSvxJWjO.js} +1 -1
- package/dist/client/assets/{tab-id-Dakz9RaE.js → tab-id-C8mEsBYo.js} +1 -1
- package/dist/client/assets/{table-B-2BVhG1.js → table-BzJvNvEf.js} +1 -1
- package/dist/client/assets/{tabs-Be-NM5w0.js → tabs-C6WaEkjB.js} +1 -1
- package/dist/client/assets/{task-status-D37SlJP8.js → task-status-BbAuY8YH.js} +1 -1
- package/dist/client/assets/{textarea-BevvTrh5.js → textarea-CnNOCR0A.js} +1 -1
- package/dist/client/assets/{toggle-group-D4uJyrio.js → toggle-group-DLEgMfd4.js} +1 -1
- package/dist/client/assets/{toolbar-B7jx3pih.js → toolbar-B_2b5mvX.js} +1 -1
- package/dist/client/assets/{tools-list-DEtO0B67.js → tools-list-Dmw1yj09.js} +1 -1
- package/dist/client/assets/{tooltip-GjOZYQ8y.js → tooltip-DIuu50IU.js} +1 -1
- package/dist/client/assets/{types-CWksqEvn.js → types-CKeTg986.js} +1 -1
- package/dist/client/assets/{use-ai-providers-B40EKvwY.js → use-ai-providers-BRyts0Gz.js} +1 -1
- package/dist/client/assets/{use-automations-CrB1TaDi.js → use-automations-BNu4-eYB.js} +1 -1
- package/dist/client/assets/{use-capability-4N7OGpDg.js → use-capability-CRoCvU0G.js} +1 -1
- package/dist/client/assets/{use-clock-tick-wMSMVaYN.js → use-clock-tick-DwZ4ZWpf.js} +1 -1
- package/dist/client/assets/{use-collections-DVr7byR-.js → use-collections-DfWTtTs9.js} +1 -1
- package/dist/client/assets/{use-connection-DW60FZqw.js → use-connection-DYCEDRZX.js} +1 -1
- package/dist/client/assets/{use-copy-DbBT4QKI.js → use-copy-CJfFxS8w.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-uWRf5VOn.js → use-create-virtual-mcp-mUufoSEk.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DNCcqNJD.js → use-debounced-autosave-C3pwZJGN.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CGHhwW8n.js → use-delete-connection-Dhw4ztJ-.js} +1 -1
- package/dist/client/assets/{use-file-configs-B1zo2Pd3.js → use-file-configs-DjBhVOXm.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-B89wcI1M.js → use-infinite-scroll-B_947odd.js} +1 -1
- package/dist/client/assets/{use-list-state-C6L50PlY.js → use-list-state-CP1Tc7ip.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BM3YiSU4.js → use-mcp-client-BcxxumZr.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BOYj54GW.js → use-mcp-prompts-Cy0GX04y.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Wj8cik0l.js → use-mcp-tools-BIoKMuS8.js} +1 -1
- package/dist/client/assets/{use-members-DPdDaD6V.js → use-members-CIJZJNZj.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-B2iVQ50f.js → use-navigate-to-agent-BlAYOqxb.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CbM9kTBH.js → use-org-auth-client-D8P8BtbO.js} +1 -1
- package/dist/client/assets/{use-org-sso-BvOYUCTs.js → use-org-sso-1XMjAhdy.js} +1 -1
- package/dist/client/assets/{use-organization-roles-D6dKeq_K.js → use-organization-roles-gt8o0u0P.js} +1 -1
- package/dist/client/assets/{use-organization-settings-B2apLDOa.js → use-organization-settings-BehduVMv.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BSOQq8Dk.js → use-registry-connections-D2zEHIac.js} +1 -1
- package/dist/client/assets/{use-secrets-Et7KNQ65.js → use-secrets-CdGKuher.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DJYbMhkn.js → use-status-sounds-B5sE5rmz.js} +1 -1
- package/dist/client/assets/{use-view-mode-DHW55QAY.js → use-view-mode-RJKP2uKb.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CP7vxTVw.js → use-virtual-mcp-Baf8z8om.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-2xSwq_xW.js +1 -0
- package/dist/client/assets/{useRouterState-Bo7wuie9.js → useRouterState-CajLqzv1.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CGWm3R_U.js +1 -0
- package/dist/client/assets/{user-mBm34PXf.js → user-BkGqIjD6.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CEt9OP51.js → view-mode-toggle-DsfhMQhu.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-CEb0SCvI.js → watch-sse-pool-B9jIyDHD.js} +1 -1
- package/dist/client/assets/{workflow-DjaQMg5O.js → workflow-DcrLJw-M.js} +1 -1
- package/dist/client/assets/workflow-detail-juad0-Hx.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/app-editor-BOZgdrpc.js +0 -1
- package/dist/client/assets/decopilot-sse-pool-CAMgyPwp.js +0 -1
- package/dist/client/assets/page-seo-sheet-OMzx3gOR.js +0 -1
- package/dist/client/assets/project-app-view-Dhe10uza.js +0 -1
- package/dist/client/assets/record-editor-Dei8zgG6.js +0 -1
- package/dist/client/assets/registry-CEymmNxt.js +0 -2
- package/dist/client/assets/save-referenced-block-7nrBneW-.js +0 -1
- package/dist/client/assets/store-registry-D4z60okB.js +0 -2
- package/dist/client/assets/useInfiniteQuery-D4JIfEjq.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D5py2D0S.js +0 -1
- package/dist/client/assets/workflow-detail-_YCY2MUW.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as se,j as s,B as Z,p as me,r as Y,t as v,n as de}from"./index-Bunm6B_R.js";import{c as k,b as ne,a as ee,D as te}from"./dropdown-menu-84bkXD1e.js";import{s as pe}from"./Star01-W-0rzL-U.js";import{a as fe}from"./Users03-C8p6m2i2.js";import{S as ge,G as ue,u as he,H as ie,W as oe,a as xe,I as je}from"./github-repo-picker-BvpkOeud.js";import{a as _e,b as Ce,c as be}from"./use-virtual-mcp-CP7vxTVw.js";import{P as q}from"./index-rCN6Ye4g.js";import{i as ye}from"./DotsVertical-DNK31xsE.js";import{a as Ne}from"./Settings02-CFECC-IR.js";import{s as Se}from"./Trash01-C5WgD7p-.js";import{A as De,aq as ve}from"./agent-icon-CwVKOe-B.js";import{l as Ae}from"./use-navigate-to-agent-B2iVQ50f.js";import{C as ke}from"./card-jKA-euu5.js";import{f as re}from"./formatDistanceToNow-Cb2QZZJn.js";import{u as we}from"./use-capability-4N7OGpDg.js";import{E as Te}from"./empty-state-BxCy5Jed.js";import{u as ze}from"./use-create-virtual-mcp-uWRf5VOn.js";import{c as Ie,b as Pe,d as He,f as Ee,e as Me,g as Oe,a as Be,A as Ge}from"./alert-dialog-CGdurjbG.js";import{S as $e}from"./search-input-BXkfgyF5.js";import{s as le}from"./Plus-B0pI-EF4.js";import"./Check-DMrKOk-W.js";import"./ChevronRight-C1PAq-Un.js";import"./use-connection-DW60FZqw.js";import"./use-collections-DVr7byR-.js";import"./use-mcp-client-BM3YiSU4.js";import"./auth-BEpSX7Q8.js";import"./dialog-DcBsN8pA.js";import"./X-GmOf9On8.js";import"./RefreshCcw01-fdpiitBO.js";import"./collection-search-nbxNvWqk.js";import"./SearchMd-CkLHWWX8.js";import"./checkbox-e4_po5HP.js";import"./mcp-oauth-CYt2Zrqm.js";import"./use-mcp-tools-Wj8cik0l.js";import"./extract-connection-data-DfBP_Vx6.js";import"./generate-id-kBy7vya_.js";import"./collections-CXoTtMtF.js";import"./sidebar-KNLjw0cP.js";import"./LayoutLeft-B6ukWLii.js";import"./tooltip-GjOZYQ8y.js";import"./sheet-D-Bc7_Zm.js";import"./AlertCircle-31UiSlWs.js";import"./Tool01-CfeyKXsn.js";import"./SwitchHorizontal01-CHYIr3hf.js";import"./XCircle-DJ0Z1ta2.js";import"./ArrowUpRight-G1K__Qxa.js";import"./ZapSquare-ntafTdnL.js";import"./CheckCircle-CuJANkMl.js";import"./ChevronDown-DSz5ssPm.js";import"./ChevronLeft-CkSAs92L.js";import"./ChevronUp-BWqHruLj.js";import"./Container-1Pc_HrQZ.js";import"./Eye-CEpp0ZmO.js";import"./ZoomOut-C1WJJ4Yu.js";import"./Globe01-D9mPWR46.js";import"./FilterLines-DwhZZBde.js";import"./Palette-BF9pRUee.js";import"./HardDrive-D_47h0Zh.js";import"./Stars02-BF-WR3Hf.js";import"./Key01-CLgAA9v8.js";import"./LinkExternal01-CArzLSWR.js";import"./Monitor01-BKZNr1y2.js";import"./Sun-Bo0dXdnq.js";import"./Play-9jeaOjjI.js";import"./Shield01-B0ODXcZU.js";import"./Stars01-BaynVBty.js";import"./Upload01-CRDtP4E8.js";import"./User01-BQUcDlD0.js";import"./Users01-BIvCNTO4.js";import"./XClose-DBvKjQIP.js";import"./Zap-CLcQM9Lj.js";import"./differenceInSeconds-NQ4PDo0z.js";function ae(t){const e=se.c(29),{onCreateFromScratch:i,onCreateWebsite:D,onCreateHydrogenStore:l,onImportGitHub:S,onImportDeco:f,isCreating:o,align:y,side:g,showBetaBadge:u}=t,h=y===void 0?"end":y;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(fe,{size:14}),e[0]=x):x=e[0];let a;e[1]!==o||e[2]!==i?(a=s.jsxs(k,{disabled:o,onClick:i,children:[x,"Create from scratch"]}),e[1]=o,e[2]=i,e[3]=a):a=e[3];let j;e[4]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(pe,{size:14}),e[4]=j):j=e[4];let n;e[5]!==o||e[6]!==D?(n=s.jsxs(k,{disabled:o,onClick:D,children:[j,"Start Website"]}),e[5]=o,e[6]=D,e[7]=n):n=e[7];let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("img",{src:ge,alt:"",className:"size-3.5 object-contain"}),e[8]=_):_=e[8];let c;e[9]!==o||e[10]!==l?(c=s.jsxs(k,{disabled:o,onClick:l,children:[_,"Create Shopify Headless Store"]}),e[9]=o,e[10]=l,e[11]=c):c=e[11];let N;e[12]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(ue,{className:"size-3.5"}),e[12]=N):N=e[12];let r;e[13]!==u?(r=u&&s.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"}),e[13]=u,e[14]=r):r=e[14];let C;e[15]!==S||e[16]!==r?(C=s.jsxs(k,{onClick:S,children:[N,"Import from GitHub",r]}),e[15]=S,e[16]=r,e[17]=C):C=e[17];let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),e[18]=p):p=e[18];let m;e[19]!==f?(m=s.jsxs(k,{onClick:f,children:[p,"Import from deco.cx"]}),e[19]=f,e[20]=m):m=e[20];let b;return e[21]!==h||e[22]!==g||e[23]!==C||e[24]!==m||e[25]!==a||e[26]!==n||e[27]!==c?(b=s.jsxs(ne,{side:g,align:h,className:"w-48",children:[a,n,c,C,m]}),e[21]=h,e[22]=g,e[23]=C,e[24]=m,e[25]=a,e[26]=n,e[27]=c,e[28]=b):b=e[28],b}function Fe(t){const e=se.c(45),{project:i,lastUsedAt:D,onDeleteClick:l}=t,S=Ae();let f;e[0]!==S||e[1]!==i.id?(f=()=>S(i.id),e[0]=S,e[1]=i.id,e[2]=f):f=e[2];let o;e[3]!==i.title||e[4]!==f?(o=s.jsx("button",{type:"button",onClick:f,className:"absolute inset-0 z-0","aria-label":i.title}),e[3]=i.title,e[4]=f,e[5]=o):o=e[5];let y;e[6]!==i.icon||e[7]!==i.title?(y=s.jsx(De,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),e[6]=i.icon,e[7]=i.title,e[8]=y):y=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ee,{asChild:!0,children:s.jsx(Z,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx(ye,{size:20})})}),e[9]=g):g=e[9];let u;e[10]!==S||e[11]!==i.id?(u=()=>S(i.id,{search:{main:"settings"}}),e[10]=S,e[11]=i.id,e[12]=u):u=e[12];let h;e[13]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Ne,{size:16}),e[13]=h):h=e[13];let x;e[14]!==u?(x=s.jsxs(k,{onClick:u,children:[h,"Settings"]}),e[14]=u,e[15]=x):x=e[15];let a;e[16]!==l?(a=l&&s.jsxs(k,{variant:"destructive",onClick:w=>{w.stopPropagation(),l(w)},children:[s.jsx(Se,{size:16}),"Delete"]}),e[16]=l,e[17]=a):a=e[17];let j;e[18]!==x||e[19]!==a?(j=s.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:s.jsxs(te,{children:[g,s.jsxs(ne,{align:"end",children:[x,a]})]})}),e[18]=x,e[19]=a,e[20]=j):j=e[20];let n;e[21]!==y||e[22]!==j?(n=s.jsxs("div",{className:"flex items-start justify-between",children:[y,j]}),e[21]=y,e[22]=j,e[23]=n):n=e[23];let _;e[24]!==i.title?(_=s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[24]=i.title,e[25]=_):_=e[25];const c=i.description||"No description";let N;e[26]!==c?(N=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:c}),e[26]=c,e[27]=N):N=e[27];let r;e[28]!==_||e[29]!==N?(r=s.jsxs("div",{className:"flex flex-col gap-1",children:[_,N]}),e[28]=_,e[29]=N,e[30]=r):r=e[30];let C;e[31]!==n||e[32]!==r?(C=s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[n,r]}),e[31]=n,e[32]=r,e[33]=C):C=e[33];let p;e[34]!==D||e[35]!==i.updated_at?(p=D?`Last used ${re(new Date(D),{addSuffix:!0})}`:`Updated ${re(new Date(i.updated_at),{addSuffix:!0})}`,e[34]=D,e[35]=i.updated_at,e[36]=p):p=e[36];let m;e[37]!==p?(m=s.jsx("div",{className:"border-t border-border mt-auto",children:s.jsx("div",{className:"h-10 flex items-center px-4.5",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:p})})}),e[37]=p,e[38]=m):m=e[38];let b;e[39]!==C||e[40]!==m?(b=s.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[C,m]}),e[39]=C,e[40]=m,e[41]=b):b=e[41];let A;return e[42]!==b||e[43]!==o?(A=s.jsxs(ke,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[o,b]}),e[42]=b,e[43]=o,e[44]=A):A=e[44],A}function as(){const t=se.c(48),{org:e}=me(),i=_e(),D=Ce(),[l,S]=Y.useState("");let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f={navigateOnCreate:!0},t[0]=f):f=t[0];const{createVirtualMCP:o,isCreating:y}=ze(f),{createFromTemplate:g,isCreating:u}=he(),[h,x]=Y.useState(null),[a,j]=Y.useState(!1),[n,_]=Y.useState(!1),{granted:c}=we("agents:manage"),N=l.toLowerCase(),r=i.filter(d=>d.id!==e.id&&(d.title.toLowerCase().includes(N)||d.description?.toLowerCase().includes(N))),{data:C}=be(r.map(Le));let p;t[1]!==D||t[2]!==h?(p=async()=>{if(!h)return;const{id:d,title:ce}=h;x(null);try{await D.delete.mutateAsync(d),v("agent_deleted",{agent_id:d,source:"agents_list"}),de.success(`Deleted "${ce}"`)}catch{}},t[1]=D,t[2]=h,t[3]=p):p=t[3];const m=p,b=q,A=q,w=q;let F;t[4]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(q.Title,{children:"Agents"}),t[4]=F):F=t[4];let L;t[5]===Symbol.for("react.memo_cache_sentinel")?(L=d=>{d.key==="Escape"&&(S(""),d.target.blur())},t[5]=L):L=t[5];let T;t[6]!==l?(T=s.jsx($e,{value:l,onChange:S,placeholder:"Search for an agent...",className:"w-full md:w-[375px]",onKeyDown:L}),t[6]=l,t[7]=T):T=t[7];let z;t[8]!==c||t[9]!==g||t[10]!==o||t[11]!==y||t[12]!==u?(z=c&&s.jsxs(te,{children:[s.jsx(ee,{asChild:!0,children:s.jsxs(Z,{size:"sm",children:[s.jsx(le,{size:14}),"Create Agent"]})}),s.jsx(ae,{onCreateFromScratch:()=>{v("agent_create_clicked",{source:"agents_list",method:"scratch"}),o()},onCreateWebsite:()=>{v("agent_create_clicked",{source:"agents_list",method:"website"}),g(oe)},onCreateHydrogenStore:()=>{v("agent_create_clicked",{source:"agents_list",method:"hydrogen"}),g(ie)},onImportGitHub:()=>{v("agent_create_clicked",{source:"agents_list",method:"github"}),_(!0)},onImportDeco:()=>{v("agent_create_clicked",{source:"agents_list",method:"deco"}),j(!0)},isCreating:y||u,align:"end"})]}),t[8]=c,t[9]=g,t[10]=o,t[11]=y,t[12]=u,t[13]=z):z=t[13];let I;t[14]!==T||t[15]!==z?(I=s.jsxs("div",{className:"flex flex-col gap-6",children:[F,s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[T,z]})]}),t[14]=T,t[15]=z,t[16]=I):I=t[16];const K=r.length===0&&s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(Te,{image:s.jsx(ve,{size:48,className:"text-muted-foreground"}),title:l?"No agents found":"No agents yet",description:l?`No agents match "${l}"`:c?"Create an agent to get started.":"Ask an organization admin to create one.",actions:!l&&c&&s.jsxs(te,{children:[s.jsx(ee,{asChild:!0,children:s.jsxs(Z,{size:"sm",children:[s.jsx(le,{size:14}),"Create Agent"]})}),s.jsx(ae,{onCreateFromScratch:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),o()},onCreateWebsite:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"website"}),g(oe)},onCreateHydrogenStore:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"hydrogen"}),g(ie)},onImportGitHub:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"github"}),_(!0)},onImportDeco:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),j(!0)},isCreating:y||u,align:"center",showBetaBadge:!0})]})})}),J=r.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:r.map(d=>s.jsx(Fe,{project:d,lastUsedAt:C?.get(d.id)?.last_used_at,onDeleteClick:c?()=>x({id:d.id,title:d.title}):void 0},d.id))})]});let P;t[17]!==J||t[18]!==w.Body||t[19]!==I||t[20]!==K?(P=s.jsxs(w.Body,{children:[I,K,J]}),t[17]=J,t[18]=w.Body,t[19]=I,t[20]=K,t[21]=P):P=t[21];let H;t[22]!==P||t[23]!==A.Content?(H=s.jsx(A.Content,{children:P}),t[22]=P,t[23]=A.Content,t[24]=H):H=t[24];let E;t[25]!==n?(E=s.jsx(xe,{open:n,onOpenChange:_}),t[25]=n,t[26]=E):E=t[26];let M;t[27]!==a?(M=s.jsx(je,{open:a,onOpenChange:j}),t[27]=a,t[28]=M):M=t[28];const Q=!!h;let W;t[29]===Symbol.for("react.memo_cache_sentinel")?(W=d=>!d&&x(null),t[29]=W):W=t[29];let R;t[30]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(Ie,{children:"Delete Agent?"}),t[30]=R):R=t[30];const X=h?.title;let O;t[31]!==X?(O=s.jsxs(Pe,{children:[R,s.jsxs(He,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:X}),"."]})]}),t[31]=X,t[32]=O):O=t[32];let U;t[33]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(Ee,{children:"Cancel"}),t[33]=U):U=t[33];let B;t[34]!==m?(B=s.jsxs(Me,{children:[U,s.jsx(Oe,{onClick:m,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[34]=m,t[35]=B):B=t[35];let G;t[36]!==O||t[37]!==B?(G=s.jsxs(Be,{children:[O,B]}),t[36]=O,t[37]=B,t[38]=G):G=t[38];let $;t[39]!==Q||t[40]!==G?($=s.jsx(Ge,{open:Q,onOpenChange:W,children:G}),t[39]=Q,t[40]=G,t[41]=$):$=t[41];let V;return t[42]!==b||t[43]!==H||t[44]!==E||t[45]!==M||t[46]!==$?(V=s.jsxs(b,{children:[H,E,M,$]}),t[42]=b,t[43]=H,t[44]=E,t[45]=M,t[46]=$,t[47]=V):V=t[47],V}function Le(t){return t.id}export{as as default};
|
|
1
|
+
import{e as se,j as s,B as Z,p as me,r as Y,t as v,n as de}from"./index-Uxmxa28N.js";import{c as k,b as ne,a as ee,D as te}from"./dropdown-menu-DDfjivGs.js";import{s as pe}from"./Star01-BI7rxnuz.js";import{a as fe}from"./Users03-dk6WdPnC.js";import{S as ge,G as ue,u as he,H as ie,W as oe,a as xe,I as je}from"./github-repo-picker-C38g29Tm.js";import{a as _e,b as Ce,c as be}from"./use-virtual-mcp-Baf8z8om.js";import{P as q}from"./index-B6xiIBRQ.js";import{i as ye}from"./DotsVertical-C3W2s3WW.js";import{a as Ne}from"./Settings02-DQ3JZYho.js";import{s as Se}from"./Trash01-hWwpO1I_.js";import{A as De,aq as ve}from"./agent-icon-BZpQDAZU.js";import{l as Ae}from"./use-navigate-to-agent-BlAYOqxb.js";import{C as ke}from"./card-Dzpiviva.js";import{f as re}from"./formatDistanceToNow-Cb2QZZJn.js";import{u as we}from"./use-capability-CRoCvU0G.js";import{E as Te}from"./empty-state-DMm5rF2F.js";import{u as ze}from"./use-create-virtual-mcp-mUufoSEk.js";import{c as Ie,b as Pe,d as He,f as Ee,e as Me,g as Oe,a as Be,A as Ge}from"./alert-dialog-RhxX9i57.js";import{S as $e}from"./search-input-BZZZVgMK.js";import{s as le}from"./Plus-Ca-boKc-.js";import"./Check-ByG0nAY6.js";import"./ChevronRight--j_9x5Si.js";import"./use-connection-DYCEDRZX.js";import"./use-collections-DfWTtTs9.js";import"./use-mcp-client-BcxxumZr.js";import"./auth-BnAEjx9j.js";import"./dialog-NbvuzXZV.js";import"./X-BgQLDqpQ.js";import"./RefreshCcw01-m0oFG4br.js";import"./collection-search-DGxm46jw.js";import"./SearchMd-BTjnXp3X.js";import"./checkbox-CiQiAC_1.js";import"./mcp-oauth-DPpOCiR5.js";import"./use-mcp-tools-BIoKMuS8.js";import"./extract-connection-data-EC8TuVkD.js";import"./generate-id-CtRf6mq5.js";import"./collections-DQTIJ43Y.js";import"./sidebar-BThc8k1X.js";import"./LayoutLeft-Dk1audj-.js";import"./tooltip-DIuu50IU.js";import"./sheet-6C3p1ZVN.js";import"./AlertCircle-BdxdLfMZ.js";import"./Tool01-DiJPRujJ.js";import"./SwitchHorizontal01-C2a9MjMN.js";import"./XCircle-Dz_GlHY5.js";import"./ArrowUpRight-D4WTYONo.js";import"./ZapSquare-CSP4r4PP.js";import"./CheckCircle-C-upsPdg.js";import"./ChevronDown-BnRC7SrH.js";import"./ChevronLeft-C70Azurf.js";import"./ChevronUp-BQorkh2i.js";import"./Container-DxN5v3U8.js";import"./Eye-i6HoqOn_.js";import"./ZoomOut-BANb87-i.js";import"./Globe01-BoP8H_NZ.js";import"./FilterLines-D6io39CJ.js";import"./Palette-deno1eEN.js";import"./HardDrive-DQcSGPZL.js";import"./Stars02-Ba384PUK.js";import"./Key01-BY8TiIH_.js";import"./LinkExternal01-Cv2RkpjT.js";import"./Monitor01-CoO9QmCK.js";import"./Sun-BB5ryFYp.js";import"./Play-pWfjHR9I.js";import"./Shield01-BqgQ6O-B.js";import"./Stars01-CbPlZD94.js";import"./Upload01-tMokiVUz.js";import"./User01-qxhPSUm_.js";import"./Users01-DgDkNrBR.js";import"./XClose-C4uc8l11.js";import"./Zap-BAnl3IBe.js";import"./differenceInSeconds-NQ4PDo0z.js";function ae(t){const e=se.c(29),{onCreateFromScratch:i,onCreateWebsite:D,onCreateHydrogenStore:l,onImportGitHub:S,onImportDeco:f,isCreating:o,align:y,side:g,showBetaBadge:u}=t,h=y===void 0?"end":y;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(fe,{size:14}),e[0]=x):x=e[0];let a;e[1]!==o||e[2]!==i?(a=s.jsxs(k,{disabled:o,onClick:i,children:[x,"Create from scratch"]}),e[1]=o,e[2]=i,e[3]=a):a=e[3];let j;e[4]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(pe,{size:14}),e[4]=j):j=e[4];let n;e[5]!==o||e[6]!==D?(n=s.jsxs(k,{disabled:o,onClick:D,children:[j,"Start Website"]}),e[5]=o,e[6]=D,e[7]=n):n=e[7];let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("img",{src:ge,alt:"",className:"size-3.5 object-contain"}),e[8]=_):_=e[8];let c;e[9]!==o||e[10]!==l?(c=s.jsxs(k,{disabled:o,onClick:l,children:[_,"Create Shopify Headless Store"]}),e[9]=o,e[10]=l,e[11]=c):c=e[11];let N;e[12]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(ue,{className:"size-3.5"}),e[12]=N):N=e[12];let r;e[13]!==u?(r=u&&s.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"}),e[13]=u,e[14]=r):r=e[14];let C;e[15]!==S||e[16]!==r?(C=s.jsxs(k,{onClick:S,children:[N,"Import from GitHub",r]}),e[15]=S,e[16]=r,e[17]=C):C=e[17];let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),e[18]=p):p=e[18];let m;e[19]!==f?(m=s.jsxs(k,{onClick:f,children:[p,"Import from deco.cx"]}),e[19]=f,e[20]=m):m=e[20];let b;return e[21]!==h||e[22]!==g||e[23]!==C||e[24]!==m||e[25]!==a||e[26]!==n||e[27]!==c?(b=s.jsxs(ne,{side:g,align:h,className:"w-48",children:[a,n,c,C,m]}),e[21]=h,e[22]=g,e[23]=C,e[24]=m,e[25]=a,e[26]=n,e[27]=c,e[28]=b):b=e[28],b}function Fe(t){const e=se.c(45),{project:i,lastUsedAt:D,onDeleteClick:l}=t,S=Ae();let f;e[0]!==S||e[1]!==i.id?(f=()=>S(i.id),e[0]=S,e[1]=i.id,e[2]=f):f=e[2];let o;e[3]!==i.title||e[4]!==f?(o=s.jsx("button",{type:"button",onClick:f,className:"absolute inset-0 z-0","aria-label":i.title}),e[3]=i.title,e[4]=f,e[5]=o):o=e[5];let y;e[6]!==i.icon||e[7]!==i.title?(y=s.jsx(De,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),e[6]=i.icon,e[7]=i.title,e[8]=y):y=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ee,{asChild:!0,children:s.jsx(Z,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx(ye,{size:20})})}),e[9]=g):g=e[9];let u;e[10]!==S||e[11]!==i.id?(u=()=>S(i.id,{search:{main:"settings"}}),e[10]=S,e[11]=i.id,e[12]=u):u=e[12];let h;e[13]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Ne,{size:16}),e[13]=h):h=e[13];let x;e[14]!==u?(x=s.jsxs(k,{onClick:u,children:[h,"Settings"]}),e[14]=u,e[15]=x):x=e[15];let a;e[16]!==l?(a=l&&s.jsxs(k,{variant:"destructive",onClick:w=>{w.stopPropagation(),l(w)},children:[s.jsx(Se,{size:16}),"Delete"]}),e[16]=l,e[17]=a):a=e[17];let j;e[18]!==x||e[19]!==a?(j=s.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:s.jsxs(te,{children:[g,s.jsxs(ne,{align:"end",children:[x,a]})]})}),e[18]=x,e[19]=a,e[20]=j):j=e[20];let n;e[21]!==y||e[22]!==j?(n=s.jsxs("div",{className:"flex items-start justify-between",children:[y,j]}),e[21]=y,e[22]=j,e[23]=n):n=e[23];let _;e[24]!==i.title?(_=s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[24]=i.title,e[25]=_):_=e[25];const c=i.description||"No description";let N;e[26]!==c?(N=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:c}),e[26]=c,e[27]=N):N=e[27];let r;e[28]!==_||e[29]!==N?(r=s.jsxs("div",{className:"flex flex-col gap-1",children:[_,N]}),e[28]=_,e[29]=N,e[30]=r):r=e[30];let C;e[31]!==n||e[32]!==r?(C=s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[n,r]}),e[31]=n,e[32]=r,e[33]=C):C=e[33];let p;e[34]!==D||e[35]!==i.updated_at?(p=D?`Last used ${re(new Date(D),{addSuffix:!0})}`:`Updated ${re(new Date(i.updated_at),{addSuffix:!0})}`,e[34]=D,e[35]=i.updated_at,e[36]=p):p=e[36];let m;e[37]!==p?(m=s.jsx("div",{className:"border-t border-border mt-auto",children:s.jsx("div",{className:"h-10 flex items-center px-4.5",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:p})})}),e[37]=p,e[38]=m):m=e[38];let b;e[39]!==C||e[40]!==m?(b=s.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[C,m]}),e[39]=C,e[40]=m,e[41]=b):b=e[41];let A;return e[42]!==b||e[43]!==o?(A=s.jsxs(ke,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[o,b]}),e[42]=b,e[43]=o,e[44]=A):A=e[44],A}function as(){const t=se.c(48),{org:e}=me(),i=_e(),D=Ce(),[l,S]=Y.useState("");let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f={navigateOnCreate:!0},t[0]=f):f=t[0];const{createVirtualMCP:o,isCreating:y}=ze(f),{createFromTemplate:g,isCreating:u}=he(),[h,x]=Y.useState(null),[a,j]=Y.useState(!1),[n,_]=Y.useState(!1),{granted:c}=we("agents:manage"),N=l.toLowerCase(),r=i.filter(d=>d.id!==e.id&&(d.title.toLowerCase().includes(N)||d.description?.toLowerCase().includes(N))),{data:C}=be(r.map(Le));let p;t[1]!==D||t[2]!==h?(p=async()=>{if(!h)return;const{id:d,title:ce}=h;x(null);try{await D.delete.mutateAsync(d),v("agent_deleted",{agent_id:d,source:"agents_list"}),de.success(`Deleted "${ce}"`)}catch{}},t[1]=D,t[2]=h,t[3]=p):p=t[3];const m=p,b=q,A=q,w=q;let F;t[4]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(q.Title,{children:"Agents"}),t[4]=F):F=t[4];let L;t[5]===Symbol.for("react.memo_cache_sentinel")?(L=d=>{d.key==="Escape"&&(S(""),d.target.blur())},t[5]=L):L=t[5];let T;t[6]!==l?(T=s.jsx($e,{value:l,onChange:S,placeholder:"Search for an agent...",className:"w-full md:w-[375px]",onKeyDown:L}),t[6]=l,t[7]=T):T=t[7];let z;t[8]!==c||t[9]!==g||t[10]!==o||t[11]!==y||t[12]!==u?(z=c&&s.jsxs(te,{children:[s.jsx(ee,{asChild:!0,children:s.jsxs(Z,{size:"sm",children:[s.jsx(le,{size:14}),"Create Agent"]})}),s.jsx(ae,{onCreateFromScratch:()=>{v("agent_create_clicked",{source:"agents_list",method:"scratch"}),o()},onCreateWebsite:()=>{v("agent_create_clicked",{source:"agents_list",method:"website"}),g(oe)},onCreateHydrogenStore:()=>{v("agent_create_clicked",{source:"agents_list",method:"hydrogen"}),g(ie)},onImportGitHub:()=>{v("agent_create_clicked",{source:"agents_list",method:"github"}),_(!0)},onImportDeco:()=>{v("agent_create_clicked",{source:"agents_list",method:"deco"}),j(!0)},isCreating:y||u,align:"end"})]}),t[8]=c,t[9]=g,t[10]=o,t[11]=y,t[12]=u,t[13]=z):z=t[13];let I;t[14]!==T||t[15]!==z?(I=s.jsxs("div",{className:"flex flex-col gap-6",children:[F,s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[T,z]})]}),t[14]=T,t[15]=z,t[16]=I):I=t[16];const K=r.length===0&&s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(Te,{image:s.jsx(ve,{size:48,className:"text-muted-foreground"}),title:l?"No agents found":"No agents yet",description:l?`No agents match "${l}"`:c?"Create an agent to get started.":"Ask an organization admin to create one.",actions:!l&&c&&s.jsxs(te,{children:[s.jsx(ee,{asChild:!0,children:s.jsxs(Z,{size:"sm",children:[s.jsx(le,{size:14}),"Create Agent"]})}),s.jsx(ae,{onCreateFromScratch:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),o()},onCreateWebsite:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"website"}),g(oe)},onCreateHydrogenStore:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"hydrogen"}),g(ie)},onImportGitHub:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"github"}),_(!0)},onImportDeco:()=>{v("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),j(!0)},isCreating:y||u,align:"center",showBetaBadge:!0})]})})}),J=r.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:r.map(d=>s.jsx(Fe,{project:d,lastUsedAt:C?.get(d.id)?.last_used_at,onDeleteClick:c?()=>x({id:d.id,title:d.title}):void 0},d.id))})]});let P;t[17]!==J||t[18]!==w.Body||t[19]!==I||t[20]!==K?(P=s.jsxs(w.Body,{children:[I,K,J]}),t[17]=J,t[18]=w.Body,t[19]=I,t[20]=K,t[21]=P):P=t[21];let H;t[22]!==P||t[23]!==A.Content?(H=s.jsx(A.Content,{children:P}),t[22]=P,t[23]=A.Content,t[24]=H):H=t[24];let E;t[25]!==n?(E=s.jsx(xe,{open:n,onOpenChange:_}),t[25]=n,t[26]=E):E=t[26];let M;t[27]!==a?(M=s.jsx(je,{open:a,onOpenChange:j}),t[27]=a,t[28]=M):M=t[28];const Q=!!h;let W;t[29]===Symbol.for("react.memo_cache_sentinel")?(W=d=>!d&&x(null),t[29]=W):W=t[29];let R;t[30]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(Ie,{children:"Delete Agent?"}),t[30]=R):R=t[30];const X=h?.title;let O;t[31]!==X?(O=s.jsxs(Pe,{children:[R,s.jsxs(He,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:X}),"."]})]}),t[31]=X,t[32]=O):O=t[32];let U;t[33]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(Ee,{children:"Cancel"}),t[33]=U):U=t[33];let B;t[34]!==m?(B=s.jsxs(Me,{children:[U,s.jsx(Oe,{onClick:m,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[34]=m,t[35]=B):B=t[35];let G;t[36]!==O||t[37]!==B?(G=s.jsxs(Be,{children:[O,B]}),t[36]=O,t[37]=B,t[38]=G):G=t[38];let $;t[39]!==Q||t[40]!==G?($=s.jsx(Ge,{open:Q,onOpenChange:W,children:G}),t[39]=Q,t[40]=G,t[41]=$):$=t[41];let V;return t[42]!==b||t[43]!==H||t[44]!==E||t[45]!==M||t[46]!==$?(V=s.jsxs(b,{children:[H,E,M,$]}),t[42]=b,t[43]=H,t[44]=E,t[45]=M,t[46]=$,t[47]=V):V=t[47],V}function Le(t){return t.id}export{as as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as V,R as C,aE as ne,aG as le,aH as he,aF as xe,b7 as me,e as z,H as ge,G as be,r as O,j as s,C as Ee,n as Q,z as ye,p as oe,F as re,a as J,K as G,m as ve,c as ue,B as L,t as je,E as Fe}from"./index-Bunm6B_R.js";import{i as Re}from"./AlertCircle-31UiSlWs.js";import{P as te}from"./index-rCN6Ye4g.js";import{S as ae}from"./skeleton-1CAI_U0G.js";import{b as _e,a as ce,S as de,c as $e}from"./settings-section-Cr66nK1f.js";import{u as X,b as se,c as Se}from"./use-ai-providers-B40EKvwY.js";import{i as Oe}from"./CheckCircle-CuJANkMl.js";import{p as Me}from"./chat-context-DsjMikdi.js";import{e as Te,f as ze}from"./use-organization-settings-B2apLDOa.js";import{M as Ue}from"./select-model-DnWyHzYb.js";import{u as qe}from"./use-debounced-autosave-DNCcqNJD.js";import{I as ie}from"./input-CyOWZBj4.js";import{a as fe,T as Le}from"./toggle-group-D4uJyrio.js";import{b as ke,c as Ie,d as Ce,f as Ne,a as Pe,e as we,g as Ae,A as De}from"./alert-dialog-CGdurjbG.js";import{u as W}from"./studio-tools-DNrxjNDE.js";import{s as Ve}from"./Plus-B0pI-EF4.js";import{i as Ge}from"./Tool01-CfeyKXsn.js";import{s as Be}from"./Trash01-C5WgD7p-.js";import{A as Qe}from"./avatar-BkJDGlfl.js";import{O as Ke,P as Ye,C as pe}from"./decopilot-BlSXmqcC.js";import{a as We}from"./RefreshCcw01-fdpiitBO.js";import{s as He}from"./Eye-CEpp0ZmO.js";import{d as Je,b as Xe,c as Ze,a as et,D as tt}from"./dialog-DcBsN8pA.js";import{S as st}from"./spinner-DMOkK4rN.js";import{f as it}from"./formatDistanceToNow-Cb2QZZJn.js";import{R as ot}from"./require-capability-CwUZ3ZpN.js";import"./sidebar-KNLjw0cP.js";import"./LayoutLeft-B6ukWLii.js";import"./tooltip-GjOZYQ8y.js";import"./sheet-D-Bc7_Zm.js";import"./X-GmOf9On8.js";import"./card-jKA-euu5.js";import"./ArrowUpRight-G1K__Qxa.js";import"./use-mcp-client-BM3YiSU4.js";import"./auth-BEpSX7Q8.js";import"./tab-id-Dakz9RaE.js";import"./watch-sse-pool-CEb0SCvI.js";import"./decopilot-sse-pool-CAMgyPwp.js";import"./use-virtual-mcp-CP7vxTVw.js";import"./use-collections-DVr7byR-.js";import"./drawer-BF8jsFPS.js";import"./connect-desktop-dialog-DmEexrvB.js";import"./Check-DMrKOk-W.js";import"./User01-BQUcDlD0.js";import"./checkbox-e4_po5HP.js";import"./select-CFUImWa3.js";import"./ChevronDown-DSz5ssPm.js";import"./ChevronUp-BWqHruLj.js";import"./Key01-CLgAA9v8.js";import"./SearchMd-CkLHWWX8.js";import"./Settings02-CFECC-IR.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-BKZNr1y2.js";import"./ChevronRight-C1PAq-Un.js";import"./Stars01-BaynVBty.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-capability-4N7OGpDg.js";import"./access-gate-DKAVTAGp.js";import"./capability-load-error-DgQrAAAc.js";V({title:C(),url:C(),icon:C()});V({registries:le(C(),V({enabled:he()})).describe("Per-registry enabled/disabled state. Key is connection ID. Absent registries are treated as enabled."),blockedMcps:ne(C()).describe("List of MCP app_name or app_id values to hide from the store.")});const H=V({keyId:C(),modelId:C(),title:C().optional()}).nullable();xe(["fast","smart","thinking","image","web_research"]);xe(["fast","smart","thinking"]);const rt=V({tiers:V({fast:H,smart:H,thinking:H,image:H,web_research:H})});V({ids:ne(C()).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});V({id:C().describe("Brand context ID"),name:C().describe("Company name"),domain:C().describe("Company domain (e.g. example.com)"),overview:C().describe("Company overview / description"),logo:C().nullable().optional().describe("Logo URL"),favicon:C().nullable().optional().describe("Favicon URL"),ogImage:C().nullable().optional().describe("OG image URL"),fonts:V({heading:C().optional().describe("Font family for headings"),body:C().optional().describe("Font family for body text"),code:C().optional().describe("Font family for code / monospace")}).nullable().optional().describe("Font families by semantic role"),colors:V({primary:C().optional().describe("Primary brand color (hex)"),secondary:C().optional().describe("Secondary brand color (hex)"),accent:C().optional().describe("Accent / highlight color (hex)"),background:C().optional().describe("Background color (hex)"),foreground:C().optional().describe("Foreground / text color (hex)")}).nullable().optional().describe("Semantic color palette"),images:ne(le(C(),me())).nullable().optional().describe("Brand images"),metadata:le(C(),me()).nullable().optional().describe("Extra design tokens (typography, components, spacing, layout, tone, etc.)"),archivedAt:C().nullable().optional().describe("Archive timestamp (null to unarchive)"),isDefault:he().optional().describe("Whether this is the default brand for the organization")});const lt=e=>e.capabilities?.includes("image")===!0,nt=e=>{if(e.asyncResearch===!0)return!0;const t=e.modelId.toLowerCase().replace(/[^a-z0-9]/g,"");return t.includes("sonar")||t.includes("deepresearch")},at=[{key:"fast",label:"Fast",description:"Fastest responses, best for quick tasks",filter:void 0},{key:"smart",label:"Smart",description:"Balanced speed and capability",filter:void 0},{key:"thinking",label:"Thinking",description:"Most capable, best for complex tasks",filter:void 0},{key:"image",label:"Image",description:"Image generation",filter:lt},{key:"web_research",label:"Web research",description:"Web search and deep research",filter:nt}];function ct(e){const t=z.c(20),{slot:i,onSlotChange:n,filterModels:o,defaultKeyId:l}=e,r=X(),[x,_]=O.useState(i?.keyId??l);let b;t[0]!==i?(b=()=>{i?.keyId&&_(i.keyId)},t[0]=i,t[1]=b):b=t[1];const d=i?.keyId;let a;t[2]!==d?(a=[d],t[2]=d,t[3]=a):a=t[3],O.useEffect(b,a);const m=x??l;let c;t[4]!==m||t[5]!==r?(c=m?r.find(y=>y.id===m):null,t[4]=m,t[5]=r,t[6]=c):c=t[6];const u=c,{models:g,isLoading:v}=se(o?m??void 0:void 0),j=o?v||g.some(o):!0;let f;t[7]!==i||t[8]!==u?.providerId?(f=i?{modelId:i.modelId,title:i.title??i.modelId,keyId:i.keyId,providerId:u?.providerId??"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,t[7]=i,t[8]=u?.providerId,t[9]=f):f=t[9];const k=f;if(o&&!j){let y;return t[10]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("p",{className:"text-xs text-muted-foreground italic",children:"Not available with current provider"}),t[10]=y):y=t[10],y}let I;t[11]===Symbol.for("react.memo_cache_sentinel")?(I=y=>_(y),t[11]=I):I=t[11];let h;t[12]!==m||t[13]!==n?(h=y=>{const R=y.keyId??m??"";_(R),n({keyId:R,modelId:y.modelId,title:y.title})},t[12]=m,t[13]=n,t[14]=h):h=t[14];let p;return t[15]!==m||t[16]!==o||t[17]!==k||t[18]!==h?(p=s.jsx(Ue,{variant:"bordered",placeholder:"Pick model",model:k,credentialId:m,filterModels:o,onCredentialChange:I,onModelChange:h}),t[15]=m,t[16]=o,t[17]=k,t[18]=h,t[19]=p):p=t[19],p}function dt(e){const t=z.c(2),{isPending:i,showSaved:n}=e;if(i){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[s.jsx(ye,{size:12,className:"animate-spin"}),"Saving…"]}),t[0]=o):o=t[0],o}if(n){let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[s.jsx(Oe,{size:12}),"Saved"]}),t[1]=o):o=t[1],o}return null}function mt(){const e=z.c(42),t=X(),i=Te(),n=t.length>0;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=ge(rt),e[0]=o):o=e[0];let l;e[1]!==i?(l={resolver:o,values:i,mode:"onChange"},e[1]=i,e[2]=l):l=e[2];const r=be(l),{mutate:x,isPending:_,isSuccess:b}=ze(),d=r.formState.isDirty;let a;e[3]!==r||e[4]!==i||e[5]!==x?(a={delayMs:250,save:async()=>{const S=r.getValues();x(S,{onSuccess:()=>r.reset(S,{keepValues:!0}),onError:w=>{r.reset(i),Q.error(`Failed to save: ${w.message}`)}})}},e[3]=r,e[4]=i,e[5]=x,e[6]=a):a=e[6];const{schedule:m}=qe(a),c=t[0],u=t[1],g=t[2],{models:v}=se(c?.id),{models:j}=se(u?.id),{models:f}=se(g?.id);let k,I;e[7]!==r||e[8]!==n?(k=()=>{n||r.reset({tiers:{fast:null,smart:null,thinking:null,image:null,web_research:null}})},I=[n,r],e[7]=r,e[8]=n,e[9]=k,e[10]=I):(k=e[9],I=e[10]),O.useEffect(k,I);let h;e[11]!==t||e[12]!==r||e[13]!==c||e[14]!==u||e[15]!==g||e[16]!==v||e[17]!==j||e[18]!==f?(h=()=>{const S=r.getValues(),w=new Set(t.map(ut)),F={};c?.id&&(F[c.id]=v),u?.id&&(F[u.id]=j),g?.id&&(F[g.id]=f);const P=Y=>Y!=null&&!w.has(Y.keyId),N={fast:P(S.tiers.fast)?null:S.tiers.fast,smart:P(S.tiers.smart)?null:S.tiers.smart,thinking:P(S.tiers.thinking)?null:S.tiers.thinking,image:P(S.tiers.image)?null:S.tiers.image,web_research:P(S.tiers.web_research)?null:S.tiers.web_research},q=!N.fast||!N.smart||!N.thinking||!N.image||!N.web_research,U=N.fast===S.tiers.fast&&N.smart===S.tiers.smart&&N.thinking===S.tiers.thinking&&N.image===S.tiers.image&&N.web_research===S.tiers.web_research;if(!q&&U)return;const B=Me(t,F);r.reset({tiers:{fast:N.fast??B.chat.fast,smart:N.smart??B.chat.smart,thinking:N.thinking??B.chat.thinking,image:N.image??B.image,web_research:N.web_research??B.webResearch}},{keepDirty:!0})},e[11]=t,e[12]=r,e[13]=c,e[14]=u,e[15]=g,e[16]=v,e[17]=j,e[18]=f,e[19]=h):h=e[19];const p=c?.id,y=u?.id,R=g?.id;let M;e[20]!==t||e[21]!==r||e[22]!==v||e[23]!==j||e[24]!==f||e[25]!==p||e[26]!==y||e[27]!==R?(M=[r,t,v,j,f,p,y,R],e[20]=t,e[21]=r,e[22]=v,e[23]=j,e[24]=f,e[25]=p,e[26]=y,e[27]=R,e[28]=M):M=e[28],O.useEffect(h,M);let T;e[29]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx("p",{className:"text-sm text-muted-foreground",children:"These models power chat, automations, and tools across your organization."}),e[29]=T):T=e[29];const $=b&&!d;let A;e[30]!==_||e[31]!==$?(A=s.jsxs("div",{className:"flex items-center justify-between -mt-2 mb-2",children:[T,s.jsx(dt,{isPending:_,showSaved:$})]}),e[30]=_,e[31]=$,e[32]=A):A=e[32];let D;e[33]!==t[0]?.id||e[34]!==r.control||e[35]!==m?(D=at.map(S=>s.jsx(Ee,{control:r.control,name:`tiers.${S.key}`,render:w=>{const{field:F}=w;return s.jsx(_e,{title:S.label,description:S.description,action:s.jsx(ct,{slot:F.value,defaultKeyId:t[0]?.id??null,filterModels:S.filter,onSlotChange:P=>{F.onChange(P),m()}})})}},S.key)),e[33]=t[0]?.id,e[34]=r.control,e[35]=m,e[36]=D):D=e[36];let K;e[37]!==D?(K=s.jsx(ce,{children:D}),e[37]=D,e[38]=K):K=e[38];let E;return e[39]!==A||e[40]!==K?(E=s.jsxs(de,{title:"Default models",headerClassName:"pl-0",children:[A,K]}),e[39]=A,e[40]=K,e[41]=E):E=e[41],E}function ut(e){return e.id}const ft={usd:[10,20,100],brl:[50,100,500]};function pt(){const e=z.c(26),t=W(),[i,n]=O.useState(!1),{mutate:o,isPending:l}=J({mutationFn:async h=>{const{url:p}=await t.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:h,currency:d});return p},onSuccess:xt,onError:ht}),[r,x]=O.useState(""),[_,b]=O.useState("usd"),d=_,a=parseFloat(r),m=!isNaN(a)&&a>=1,c=d==="brl"?"R$":"$";let u;e[0]!==b?(u=h=>{h&&b(h)},e[0]=b,e[1]=u):u=e[1];let g,v;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(fe,{value:"usd",className:"px-3.5 text-sm",children:"USD"}),v=s.jsx(fe,{value:"brl",className:"px-3.5 text-sm",children:"BRL"}),e[2]=g,e[3]=v):(g=e[2],v=e[3]);let j;e[4]!==d||e[5]!==u?(j=s.jsxs(Le,{type:"single",variant:"outline",size:"default",value:d,onValueChange:u,children:[g,v]}),e[4]=d,e[5]=u,e[6]=j):j=e[6];let f;e[7]!==d||e[8]!==c||e[9]!==i||e[10]!==l||e[11]!==o?(f=!i&&s.jsxs(s.Fragment,{children:[ft[d].map(h=>s.jsxs(L,{variant:"outline",className:"h-10 px-4 text-sm font-medium tabular-nums",disabled:l,onClick:()=>o(h*100),children:[c,h]},h)),s.jsx(L,{variant:"ghost",className:"h-10 px-4 text-sm text-muted-foreground",onClick:()=>n(!0),disabled:l,children:"Custom"})]}),e[7]=d,e[8]=c,e[9]=i,e[10]=l,e[11]=o,e[12]=f):f=e[12];let k;e[13]!==c||e[14]!==r||e[15]!==a||e[16]!==i||e[17]!==m||e[18]!==l||e[19]!==x||e[20]!==o?(k=i&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative max-w-[140px]",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:c}),s.jsx(ie,{type:"number",min:"1",step:"1",placeholder:"50",value:r,onChange:h=>x(h.target.value),className:"h-10 text-sm pl-7",autoFocus:!0})]}),s.jsx(L,{className:"h-10",disabled:!m||l,onClick:()=>o(Math.round(a*100)),children:l?"...":"Add"}),s.jsx(L,{variant:"ghost",className:"h-10 text-sm text-muted-foreground",onClick:()=>{n(!1),x("")},children:"Cancel"})]}),e[13]=c,e[14]=r,e[15]=a,e[16]=i,e[17]=m,e[18]=l,e[19]=x,e[20]=o,e[21]=k):k=e[21];let I;return e[22]!==j||e[23]!==f||e[24]!==k?(I=s.jsx("div",{className:"flex flex-col gap-2.5",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[j,f,k]})}),e[22]=j,e[23]=f,e[24]=k,e[25]=I):I=e[25],I}function ht(e){Q.error(`Top-up failed: ${e.message}`)}function xt(e){e&&window.open(e,"_blank","noopener,noreferrer")}function gt(e){return e<=0?"text-destructive":e<=1?"text-amber-500 dark:text-amber-400":"text-foreground"}function bt(){const e=z.c(58),{org:t}=oe(),i=W(),n=re(),o=X();let l;e[0]!==o?(l=o.find(vt),e[0]=o,e[1]=l):l=e[1];const r=l,[x,_]=O.useState(!1);let b;e[2]!==r||e[3]!==i?(b=async()=>{r&&await i.call("AI_PROVIDER_KEY_DELETE",{keyId:r.id})},e[2]=r,e[3]=i,e[4]=b):b=e[4];let d;e[5]!==t.id||e[6]!==n?(d=()=>{n.invalidateQueries({queryKey:G.aiProviderKeys(t.id)}),n.invalidateQueries({queryKey:G.aiProviders(t.id)}),Q.success("Deco AI Gateway disconnected"),_(!1)},e[5]=t.id,e[6]=n,e[7]=d):d=e[7];let a;e[8]!==b||e[9]!==d?(a={mutationFn:b,onSuccess:d,onError:yt},e[8]=b,e[9]=d,e[10]=a):a=e[10];const{mutate:m,isPending:c}=J(a);let u;e[11]!==t.id?(u=G.aiProviderCredits(t.id,"deco"),e[11]=t.id,e[12]=u):u=e[12];const g=!!r;let v;e[13]!==i?(v=async()=>{try{return await i.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}},e[13]=i,e[14]=v):v=e[14];let j;e[15]!==u||e[16]!==g||e[17]!==v?(j={queryKey:u,enabled:g,staleTime:6e4,queryFn:v},e[15]=u,e[16]=g,e[17]=v,e[18]=j):j=e[18];const{data:f,isLoading:k,refetch:I,isFetching:h}=ve(j);if(!r)return null;const p=f?.balanceCents!=null?f.balanceCents/100:null;let y;e[19]!==p?(y=p!=null?`$${p.toFixed(2)}`:"—",e[19]=p,e[20]=y):y=e[20];const R=y;let M;e[21]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"Deco AI Gateway",className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"}),s.jsx("div",{children:s.jsx("p",{className:"text-xs text-muted-foreground",children:"Access to 100+ models"})})]}),e[21]=M):M=e[21];let T;e[22]===Symbol.for("react.memo_cache_sentinel")?(T=()=>_(!0),e[22]=T):T=e[22];let $;e[23]!==c?($=s.jsxs("div",{className:"flex items-center justify-between",children:[M,s.jsx(L,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground hover:text-destructive",onClick:T,disabled:c,children:"Disconnect"})]}),e[23]=c,e[24]=$):$=e[24];let A;e[25]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsxs(ke,{children:[s.jsx(Ie,{children:"Disconnect Deco AI Gateway"}),s.jsx(Ce,{children:"This will remove the Deco AI Gateway from this workspace. Your credit balance is preserved and will be available if you reconnect."})]}),e[25]=A):A=e[25];let D;e[26]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Ne,{children:"Cancel"}),e[26]=D):D=e[26];let K;e[27]!==m?(K=s.jsxs(Pe,{children:[A,s.jsxs(we,{children:[D,s.jsx(Ae,{onClick:()=>m(),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Disconnect"})]})]}),e[27]=m,e[28]=K):K=e[28];let E;e[29]!==x||e[30]!==K?(E=s.jsx(De,{open:x,onOpenChange:_,children:K}),e[29]=x,e[30]=K,e[31]=E):E=e[31];let S;e[32]!==p||e[33]!==R||e[34]!==h||e[35]!==k?(S=k||h?s.jsx(ae,{className:"h-9 w-24"}):s.jsx("span",{className:ue("text-3xl font-semibold tabular-nums tracking-tight",p!=null&>(p)),children:R}),e[32]=p,e[33]=R,e[34]=h,e[35]=k,e[36]=S):S=e[36];let w;e[37]!==I?(w=()=>I(),e[37]=I,e[38]=w):w=e[38];const F=h&&"animate-spin";let P;e[39]!==F?(P=ue(F),e[39]=F,e[40]=P):P=e[40];let N;e[41]!==P?(N=s.jsx(ye,{size:14,className:P}),e[41]=P,e[42]=N):N=e[42];let q;e[43]!==h||e[44]!==w||e[45]!==N?(q=s.jsx("button",{type:"button",onClick:w,disabled:h,className:"text-muted-foreground hover:text-foreground disabled:opacity-50 transition-colors p-1 rounded-md hover:bg-muted/50","aria-label":"Refresh balance",children:N}),e[43]=h,e[44]=w,e[45]=N,e[46]=q):q=e[46];let U;e[47]!==S||e[48]!==q?(U=s.jsxs("div",{className:"flex items-baseline gap-2",children:[S,q]}),e[47]=S,e[48]=q,e[49]=U):U=e[49];let B;e[50]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Available credit balance"}),e[50]=B):B=e[50];let Y;e[51]!==U?(Y=s.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[U,B]}),e[51]=U,e[52]=Y):Y=e[52];let Z;e[53]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsxs("div",{className:"pt-4 border-t border-border/60",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2.5",children:"Add credits"}),s.jsx(pt,{})]}),e[53]=Z):Z=e[53];let ee;return e[54]!==$||e[55]!==E||e[56]!==Y?(ee=s.jsx(de,{title:"Deco AI Gateway",children:s.jsx(ce,{children:s.jsxs("div",{className:"px-5 py-5 flex flex-col gap-5",children:[$,E,Y,Z]})})}),e[54]=$,e[55]=E,e[56]=Y,e[57]=ee):ee=e[57],ee}function yt(e){Q.error(`Failed to disconnect: ${e.message}`)}function vt(e){return e.providerId==="deco"}function jt(){const e=z.c(8),{org:t}=oe(),i=W(),n=re();let o;e[0]!==i?(o=async()=>{await i.call("AI_PROVIDER_PROVISION_KEY",{providerId:"deco"})},e[0]=i,e[1]=o):o=e[1];let l;e[2]!==t||e[3]!==n?(l=()=>{je("ai_provider_provision_succeeded",{provider_id:"deco"}),n.invalidateQueries({queryKey:G.aiProviderKeys(t.id)}),n.invalidateQueries({queryKey:G.aiProviders(t.id)}),Q.success("Deco AI Gateway connected successfully")},e[2]=t,e[3]=n,e[4]=l):l=e[4];let r;return e[5]!==o||e[6]!==l?(r={mutationFn:o,onSuccess:l,onError:_t},e[5]=o,e[6]=l,e[7]=r):r=e[7],J(r)}function _t(e){je("ai_provider_provision_failed",{provider_id:"deco",error:e.message}),Q.error(`Failed to connect Deco AI Gateway: ${e.message}`)}function St(){const e=z.c(10),{mutate:t,isPending:i}=jt();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=["radial-gradient(ellipse 50% 150% at -15% 50%, rgba(165,149,255,0.14) 0%, transparent 60%)","radial-gradient(ellipse 50% 150% at 115% 50%, rgba(208,236,26,0.11) 0%, transparent 60%)"],e[0]=n):n=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:n.join(", ")}}),e[1]=o):o=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"Deco AI Gateway",className:"size-12 shrink-0 rounded-xl object-contain dark:bg-white dark:p-1"}),e[2]=l):l=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("p",{className:"text-base font-semibold",children:"Deco AI Gateway"}),s.jsx("span",{className:"rounded-full border border-border/60 bg-background/60 px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:"Recommended"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"100+ models, one connection — pay as you go, no API keys to juggle."})]}),e[3]=r):r=e[3];let x;e[4]!==t?(x=()=>t(),e[4]=t,e[5]=x):x=e[5];const _=i?"Connecting…":"Connect Deco";let b;return e[6]!==i||e[7]!==x||e[8]!==_?(b=s.jsxs("div",{className:"relative rounded-xl border border-border overflow-hidden",children:[o,s.jsxs("div",{className:"relative flex items-center gap-5 px-6 py-5",children:[l,r,s.jsx(L,{variant:"outline",disabled:i,onClick:x,children:_})]})]}),e[6]=i,e[7]=x,e[8]=_,e[9]=b):b=e[9],b}const kt=V({label:C().min(1,"Label is required").max(100),apiKey:C().optional(),baseUrl:C().optional()});function It({providerKey:e,provider:t,preset:i,maskedKey:n,currentLabel:o,currentBaseUrl:l,onCancel:r,onSuccess:x}){const{org:_}=oe(),b=W(),d=re(),[a,m]=O.useState(!1),c=t.id==="openai-compatible",u=t.supportedMethods.includes("api-key"),{register:g,handleSubmit:v,watch:j,formState:{errors:f}}=be({resolver:ge(kt),defaultValues:{label:o,apiKey:"",baseUrl:l??""}}),k=j("apiKey")??"",{mutate:I,isPending:h}=J({mutationFn:async p=>{let y;p.apiKey?c?y=JSON.stringify({baseUrl:p.baseUrl||l||"",apiKey:p.apiKey}):y=p.apiKey:c&&p.baseUrl&&p.baseUrl!==l&&(y=JSON.stringify({baseUrl:p.baseUrl,apiKey:""})),await b.call("AI_PROVIDER_KEY_UPDATE",{keyId:e.id,label:p.label,...y!==void 0?{apiKey:y}:{}})},onSuccess:()=>{d.invalidateQueries({queryKey:G.aiProviderKeys(_.id)}),d.invalidateQueries({queryKey:G.aiProviders(_.id)}),Q.success("Provider updated"),x()},onError:p=>Q.error(`Failed to update: ${p.message}`)});return s.jsxs("form",{onSubmit:v(p=>I(p)),className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Label"}),s.jsx(ie,{placeholder:"e.g. Personal key",...g("label"),className:"h-8 text-sm"}),f.label&&s.jsx("p",{className:"text-xs text-destructive",children:f.label.message})]}),c&&!i?.defaultBaseUrl&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Base URL"}),s.jsx(ie,{type:"url",placeholder:i?.baseUrlPlaceholder??"http://localhost:4000/v1",...g("baseUrl"),className:"h-8 text-sm"})]}),u&&s.jsxs("div",{className:"space-y-1",children:[s.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:["API key"," ",s.jsx("span",{className:"text-muted-foreground/60",children:"(leave blank to keep current)"})]}),s.jsxs("div",{className:"relative",children:[s.jsx(ie,{type:a&&k?"text":"password",placeholder:n,...g("apiKey"),className:"ph-no-capture h-8 text-sm pr-8"}),k&&s.jsx("button",{type:"button",onClick:()=>m(!a),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:a?s.jsx(We,{size:14}):s.jsx(He,{size:14})})]})]}),i?.helpText&&s.jsx("p",{className:"text-xs text-muted-foreground",children:i.helpText}),s.jsxs(Je,{children:[s.jsx(L,{type:"button",variant:"ghost",size:"sm",onClick:r,disabled:h,children:"Cancel"}),s.jsx(L,{type:"submit",size:"sm",disabled:h,children:h?"Saving...":"Save"})]})]})}function Ct(e){const t=z.c(28),{providerKey:i,provider:n,open:o,onOpenChange:l}=e,r=W();let x;t[0]!==n.id||t[1]!==i.presetId?(x=n.id==="openai-compatible"&&i.presetId?Ke.find(k=>k.id===i.presetId):void 0,t[0]=n.id,t[1]=i.presetId,t[2]=x):x=t[2];const _=x,b=_?.name??n.name;let d;t[3]!==i.id?(d=G.aiProviderKeyPreview(i.id),t[3]=i.id,t[4]=d):d=t[4];let a;t[5]!==i.id||t[6]!==r?(a=()=>r.call("AI_PROVIDER_KEY_PREVIEW",{keyId:i.id}),t[5]=i.id,t[6]=r,t[7]=a):a=t[7];let m;t[8]!==o||t[9]!==d||t[10]!==a?(m={queryKey:d,queryFn:a,enabled:o,staleTime:0},t[8]=o,t[9]=d,t[10]=a,t[11]=m):m=t[11];const{data:c,isLoading:u}=ve(m);let g;t[12]!==b?(g=s.jsx(Xe,{children:s.jsxs(Ze,{children:["Edit ",b]})}),t[12]=b,t[13]=g):g=t[13];let v;t[14]!==u||t[15]!==l||t[16]!==_||t[17]!==c||t[18]!==n||t[19]!==i?(v=u||!c?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(st,{})}):s.jsx(It,{providerKey:i,provider:n,preset:_,maskedKey:c.maskedKey,currentLabel:c.label,currentBaseUrl:c.baseUrl,onCancel:()=>l(!1),onSuccess:()=>l(!1)}),t[14]=u,t[15]=l,t[16]=_,t[17]=c,t[18]=n,t[19]=i,t[20]=v):v=t[20];let j;t[21]!==g||t[22]!==v?(j=s.jsxs(et,{className:"sm:max-w-md",children:[g,v]}),t[21]=g,t[22]=v,t[23]=j):j=t[23];let f;return t[24]!==l||t[25]!==o||t[26]!==j?(f=s.jsx(tt,{open:o,onOpenChange:l,children:j}),t[24]=l,t[25]=o,t[26]=j,t[27]=f):f=t[27],f}function Nt(e){const t=z.c(48),{providerKey:i,provider:n}=e,{org:o}=oe(),l=W(),r=re(),[x,_]=O.useState(!1),[b,d]=O.useState(!1),a=n.id==="openai-compatible";let m;t[0]!==a||t[1]!==i.presetId?(m=a&&i.presetId?Ke.find(q=>q.id===i.presetId):void 0,t[0]=a,t[1]=i.presetId,t[2]=m):m=t[2];const c=m,u=c?c.name:a?"Custom OpenAI-compatible":n.name,g=c?.logo??n.logo;let v;e:{if(a){v=i.label;break e}const q=i.label;let U;t[3]!==i.createdAt?(U=it(new Date(i.createdAt)),t[3]=i.createdAt,t[4]=U):U=t[4],v=`${q} · added ${U} ago`}const j=v;let f;t[5]!==i.id||t[6]!==l?(f=async()=>{await l.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},t[5]=i.id,t[6]=l,t[7]=f):f=t[7];let k;t[8]!==o||t[9]!==i.id||t[10]!==r?(k=()=>{r.invalidateQueries({queryKey:G.aiProviderKeys(o.id)}),r.invalidateQueries({queryKey:G.aiProviders(o.id)}),r.invalidateQueries({queryKey:G.aiProviderModels(o.id,i.id)}),Q.success("Key deleted"),_(!1)},t[8]=o,t[9]=i.id,t[10]=r,t[11]=k):k=t[11];let I;t[12]!==f||t[13]!==k?(I={mutationFn:f,onSuccess:k,onError:Pt},t[12]=f,t[13]=k,t[14]=I):I=t[14];const{mutate:h,isPending:p}=J(I);let y;t[15]!==u||t[16]!==g?(y=g?s.jsx("img",{src:g,alt:u,className:"size-8 rounded-md object-contain dark:bg-white dark:p-0.5"}):s.jsx(Qe,{fallback:u.charAt(0),className:"size-8 bg-primary/10 text-primary"}),t[15]=u,t[16]=g,t[17]=y):y=t[17];let R;t[18]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:()=>d(!0),children:s.jsx(Ge,{size:14})}),t[18]=R):R=t[18];let M,T;t[19]===Symbol.for("react.memo_cache_sentinel")?(M=()=>_(!0),T=s.jsx(Be,{size:14}),t[19]=M,t[20]=T):(M=t[19],T=t[20]);let $;t[21]!==p?($=s.jsxs("div",{className:"flex items-center gap-0.5",children:[R,s.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",disabled:p,onClick:M,children:T})]}),t[21]=p,t[22]=$):$=t[22];let A;t[23]!==j||t[24]!==u||t[25]!==$||t[26]!==y?(A=s.jsx(_e,{icon:y,title:u,description:j,action:$}),t[23]=j,t[24]=u,t[25]=$,t[26]=y,t[27]=A):A=t[27];let D;t[28]!==b||t[29]!==n||t[30]!==i?(D=s.jsx(Ct,{providerKey:i,provider:n,open:b,onOpenChange:d}),t[28]=b,t[29]=n,t[30]=i,t[31]=D):D=t[31];let K;t[32]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(Ie,{children:"Delete API key"}),t[32]=K):K=t[32];let E;t[33]!==i.label?(E=s.jsxs(ke,{children:[K,s.jsxs(Ce,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:i.label}),"."]})]}),t[33]=i.label,t[34]=E):E=t[34];let S;t[35]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Ne,{children:"Cancel"}),t[35]=S):S=t[35];let w;t[36]!==h?(w=s.jsxs(we,{children:[S,s.jsx(Ae,{onClick:()=>h(),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[36]=h,t[37]=w):w=t[37];let F;t[38]!==E||t[39]!==w?(F=s.jsxs(Pe,{children:[E,w]}),t[38]=E,t[39]=w,t[40]=F):F=t[40];let P;t[41]!==x||t[42]!==F?(P=s.jsx(De,{open:x,onOpenChange:_,children:F}),t[41]=x,t[42]=F,t[43]=P):P=t[43];let N;return t[44]!==A||t[45]!==D||t[46]!==P?(N=s.jsxs(s.Fragment,{children:[A,D,P]}),t[44]=A,t[45]=D,t[46]=P,t[47]=N):N=t[47],N}function Pt(e){return Q.error(`Failed to delete key: ${e.message}`)}function wt(e){const t=z.c(11),{onConnectClick:i}=e,n=X(),o=Se();let l;t[0]!==o?.providers?(l=o?.providers??[],t[0]=o?.providers,t[1]=l):l=t[1];const r=l;let x;if(t[2]!==n||t[3]!==i||t[4]!==r){let _;t[6]!==r?(_=m=>({key:m,provider:r.find(c=>c.id===m.providerId)}),t[6]=r,t[7]=_):_=t[7];const b=n.filter(Kt).map(_).filter(Dt);let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ve,{size:14}),t[8]=d):d=t[8];let a;t[9]!==i?(a=s.jsxs(L,{size:"sm",onClick:i,children:[d,"Connect provider"]}),t[9]=i,t[10]=a):a=t[10],x=s.jsx(de,{title:"Connected providers",headerClassName:"px-0",actions:a,children:b.length===0?s.jsx("p",{className:"text-sm text-muted-foreground px-1",children:"Bring your own keys to use specific models alongside Deco's gateway."}):s.jsx(ce,{children:b.map(At)})}),t[2]=n,t[3]=i,t[4]=r,t[5]=x}else x=t[5];return x}function At(e){const{key:t,provider:i}=e;return s.jsx(Nt,{providerKey:t,provider:i},t.id)}function Dt(e){return e.provider!==void 0}function Kt(e){return e.providerId!=="deco"}function Et(e){const t=z.c(3),{error:i}=e;let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Re,{size:16}),t[0]=n):n=t[0];let o;return t[1]!==i.message?(o=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[n,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load AI providers: ",i.message]})]}),t[1]=i.message,t[2]=o):o=t[2],o}function Ft(){const e=z.c(23),t=X();let i;e[0]!==t?(i=t.some(Rt),e[0]=t,e[1]=i):i=e[1];const n=i,o=t.length>0,[l,r]=O.useState(!1),[x,_]=O.useState(null),b=Se();let d;e[2]!==b?.providers?(d=b?.providers??[],e[2]=b?.providers,e[3]=d):d=e[3];const a=d;if(!o){let j;e[4]===Symbol.for("react.memo_cache_sentinel")?(j=()=>r(!0),e[4]=j):j=e[4];let f;e[5]!==a?(f=s.jsx(Ye,{providers:a,onSelect:_,onShowAll:j}),e[5]=a,e[6]=f):f=e[6];const k=x!==null||l;let I;e[7]===Symbol.for("react.memo_cache_sentinel")?(I=R=>{R||(_(null),r(!1))},e[7]=I):I=e[7];const h=x??void 0;let p;e[8]!==k||e[9]!==h?(p=s.jsx(pe,{open:k,onOpenChange:I,initialProvider:h}),e[8]=k,e[9]=h,e[10]=p):p=e[10];let y;return e[11]!==f||e[12]!==p?(y=s.jsxs(s.Fragment,{children:[f,p]}),e[11]=f,e[12]=p,e[13]=y):y=e[13],y}let m;e[14]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(O.Suspense,{fallback:s.jsx(ae,{className:"h-16 w-full"}),children:s.jsx(mt,{})}),e[14]=m):m=e[14];let c;e[15]!==n?(c=n?s.jsx(bt,{}):s.jsx(St,{}),e[15]=n,e[16]=c):c=e[16];let u;e[17]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(wt,{onConnectClick:()=>r(!0)}),e[17]=u):u=e[17];let g;e[18]!==l?(g=s.jsx(pe,{open:l,onOpenChange:r}),e[18]=l,e[19]=g):g=e[19];let v;return e[20]!==c||e[21]!==g?(v=s.jsxs(s.Fragment,{children:[m,c,u,g]}),e[20]=c,e[21]=g,e[22]=v):v=e[22],v}function Rt(e){return e.providerId==="deco"}function $t(){const e=z.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(te.Title,{children:"AI Providers"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(te,{children:s.jsx(te.Content,{children:s.jsx(te.Body,{children:s.jsxs($e,{children:[t,s.jsx(Fe,{fallback:Ot,children:s.jsx(O.Suspense,{fallback:s.jsx(ae,{className:"h-64 w-full"}),children:s.jsx(Ft,{})})})]})})})}),e[1]=i):i=e[1],i}function Ot(e){const{error:t}=e;return s.jsx(Et,{error:t??new Error("Failed to load AI providers")})}function Ls(){const e=z.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ot,{capability:"ai-providers:manage",area:"AI providers",children:s.jsx($t,{})}),e[0]=t):t=e[0],t}export{Ls as default};
|
|
1
|
+
import{P as V,R as C,aE as ne,aG as le,aH as he,aF as xe,b7 as me,e as z,H as ge,G as be,r as O,j as s,C as Ee,n as Q,z as ye,p as oe,F as re,a as J,K as G,m as ve,c as ue,B as L,t as je,E as Fe}from"./index-Uxmxa28N.js";import{i as Re}from"./AlertCircle-BdxdLfMZ.js";import{P as te}from"./index-B6xiIBRQ.js";import{S as ae}from"./skeleton-7xZf6qTy.js";import{b as _e,a as ce,S as de,c as $e}from"./settings-section-BKgS_iJ4.js";import{u as X,b as se,c as Se}from"./use-ai-providers-BRyts0Gz.js";import{i as Oe}from"./CheckCircle-C-upsPdg.js";import{p as Me}from"./chat-context-XxWcMKnK.js";import{e as Te,f as ze}from"./use-organization-settings-BehduVMv.js";import{M as Ue}from"./select-model-DSDBCN6l.js";import{u as qe}from"./use-debounced-autosave-C3pwZJGN.js";import{I as ie}from"./input-DV0lJPfu.js";import{a as fe,T as Le}from"./toggle-group-DLEgMfd4.js";import{b as ke,c as Ie,d as Ce,f as Ne,a as Pe,e as we,g as Ae,A as De}from"./alert-dialog-RhxX9i57.js";import{u as W}from"./studio-tools-DUggrN6-.js";import{s as Ve}from"./Plus-Ca-boKc-.js";import{i as Ge}from"./Tool01-DiJPRujJ.js";import{s as Be}from"./Trash01-hWwpO1I_.js";import{A as Qe}from"./avatar-B05K9npJ.js";import{O as Ke,P as Ye,C as pe}from"./decopilot-CauvA-RH.js";import{a as We}from"./RefreshCcw01-m0oFG4br.js";import{s as He}from"./Eye-i6HoqOn_.js";import{d as Je,b as Xe,c as Ze,a as et,D as tt}from"./dialog-NbvuzXZV.js";import{S as st}from"./spinner-B4TZJa4Y.js";import{f as it}from"./formatDistanceToNow-Cb2QZZJn.js";import{R as ot}from"./require-capability-5Ip6utE2.js";import"./sidebar-BThc8k1X.js";import"./LayoutLeft-Dk1audj-.js";import"./tooltip-DIuu50IU.js";import"./sheet-6C3p1ZVN.js";import"./X-BgQLDqpQ.js";import"./card-Dzpiviva.js";import"./ArrowUpRight-D4WTYONo.js";import"./use-mcp-client-BcxxumZr.js";import"./auth-BnAEjx9j.js";import"./tab-id-C8mEsBYo.js";import"./watch-sse-pool-B9jIyDHD.js";import"./decopilot-sse-pool-sjWpsyX0.js";import"./use-virtual-mcp-Baf8z8om.js";import"./use-collections-DfWTtTs9.js";import"./drawer-5hzhUed3.js";import"./connect-desktop-dialog-DaREkv_h.js";import"./Check-ByG0nAY6.js";import"./User01-qxhPSUm_.js";import"./checkbox-CiQiAC_1.js";import"./select-DV1FwAD4.js";import"./ChevronDown-BnRC7SrH.js";import"./ChevronUp-BQorkh2i.js";import"./Key01-BY8TiIH_.js";import"./SearchMd-BTjnXp3X.js";import"./Settings02-DQ3JZYho.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-CoO9QmCK.js";import"./ChevronRight--j_9x5Si.js";import"./Stars01-CbPlZD94.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-capability-CRoCvU0G.js";import"./access-gate-D8GfJliw.js";import"./capability-load-error-CXftmPyi.js";V({title:C(),url:C(),icon:C()});V({registries:le(C(),V({enabled:he()})).describe("Per-registry enabled/disabled state. Key is connection ID. Absent registries are treated as enabled."),blockedMcps:ne(C()).describe("List of MCP app_name or app_id values to hide from the store.")});const H=V({keyId:C(),modelId:C(),title:C().optional()}).nullable();xe(["fast","smart","thinking","image","web_research"]);xe(["fast","smart","thinking"]);const rt=V({tiers:V({fast:H,smart:H,thinking:H,image:H,web_research:H})});V({ids:ne(C()).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});V({id:C().describe("Brand context ID"),name:C().describe("Company name"),domain:C().describe("Company domain (e.g. example.com)"),overview:C().describe("Company overview / description"),logo:C().nullable().optional().describe("Logo URL"),favicon:C().nullable().optional().describe("Favicon URL"),ogImage:C().nullable().optional().describe("OG image URL"),fonts:V({heading:C().optional().describe("Font family for headings"),body:C().optional().describe("Font family for body text"),code:C().optional().describe("Font family for code / monospace")}).nullable().optional().describe("Font families by semantic role"),colors:V({primary:C().optional().describe("Primary brand color (hex)"),secondary:C().optional().describe("Secondary brand color (hex)"),accent:C().optional().describe("Accent / highlight color (hex)"),background:C().optional().describe("Background color (hex)"),foreground:C().optional().describe("Foreground / text color (hex)")}).nullable().optional().describe("Semantic color palette"),images:ne(le(C(),me())).nullable().optional().describe("Brand images"),metadata:le(C(),me()).nullable().optional().describe("Extra design tokens (typography, components, spacing, layout, tone, etc.)"),archivedAt:C().nullable().optional().describe("Archive timestamp (null to unarchive)"),isDefault:he().optional().describe("Whether this is the default brand for the organization")});const lt=e=>e.capabilities?.includes("image")===!0,nt=e=>{if(e.asyncResearch===!0)return!0;const t=e.modelId.toLowerCase().replace(/[^a-z0-9]/g,"");return t.includes("sonar")||t.includes("deepresearch")},at=[{key:"fast",label:"Fast",description:"Fastest responses, best for quick tasks",filter:void 0},{key:"smart",label:"Smart",description:"Balanced speed and capability",filter:void 0},{key:"thinking",label:"Thinking",description:"Most capable, best for complex tasks",filter:void 0},{key:"image",label:"Image",description:"Image generation",filter:lt},{key:"web_research",label:"Web research",description:"Web search and deep research",filter:nt}];function ct(e){const t=z.c(20),{slot:i,onSlotChange:n,filterModels:o,defaultKeyId:l}=e,r=X(),[x,_]=O.useState(i?.keyId??l);let b;t[0]!==i?(b=()=>{i?.keyId&&_(i.keyId)},t[0]=i,t[1]=b):b=t[1];const d=i?.keyId;let a;t[2]!==d?(a=[d],t[2]=d,t[3]=a):a=t[3],O.useEffect(b,a);const m=x??l;let c;t[4]!==m||t[5]!==r?(c=m?r.find(y=>y.id===m):null,t[4]=m,t[5]=r,t[6]=c):c=t[6];const u=c,{models:g,isLoading:v}=se(o?m??void 0:void 0),j=o?v||g.some(o):!0;let f;t[7]!==i||t[8]!==u?.providerId?(f=i?{modelId:i.modelId,title:i.title??i.modelId,keyId:i.keyId,providerId:u?.providerId??"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,t[7]=i,t[8]=u?.providerId,t[9]=f):f=t[9];const k=f;if(o&&!j){let y;return t[10]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("p",{className:"text-xs text-muted-foreground italic",children:"Not available with current provider"}),t[10]=y):y=t[10],y}let I;t[11]===Symbol.for("react.memo_cache_sentinel")?(I=y=>_(y),t[11]=I):I=t[11];let h;t[12]!==m||t[13]!==n?(h=y=>{const R=y.keyId??m??"";_(R),n({keyId:R,modelId:y.modelId,title:y.title})},t[12]=m,t[13]=n,t[14]=h):h=t[14];let p;return t[15]!==m||t[16]!==o||t[17]!==k||t[18]!==h?(p=s.jsx(Ue,{variant:"bordered",placeholder:"Pick model",model:k,credentialId:m,filterModels:o,onCredentialChange:I,onModelChange:h}),t[15]=m,t[16]=o,t[17]=k,t[18]=h,t[19]=p):p=t[19],p}function dt(e){const t=z.c(2),{isPending:i,showSaved:n}=e;if(i){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[s.jsx(ye,{size:12,className:"animate-spin"}),"Saving…"]}),t[0]=o):o=t[0],o}if(n){let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[s.jsx(Oe,{size:12}),"Saved"]}),t[1]=o):o=t[1],o}return null}function mt(){const e=z.c(42),t=X(),i=Te(),n=t.length>0;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=ge(rt),e[0]=o):o=e[0];let l;e[1]!==i?(l={resolver:o,values:i,mode:"onChange"},e[1]=i,e[2]=l):l=e[2];const r=be(l),{mutate:x,isPending:_,isSuccess:b}=ze(),d=r.formState.isDirty;let a;e[3]!==r||e[4]!==i||e[5]!==x?(a={delayMs:250,save:async()=>{const S=r.getValues();x(S,{onSuccess:()=>r.reset(S,{keepValues:!0}),onError:w=>{r.reset(i),Q.error(`Failed to save: ${w.message}`)}})}},e[3]=r,e[4]=i,e[5]=x,e[6]=a):a=e[6];const{schedule:m}=qe(a),c=t[0],u=t[1],g=t[2],{models:v}=se(c?.id),{models:j}=se(u?.id),{models:f}=se(g?.id);let k,I;e[7]!==r||e[8]!==n?(k=()=>{n||r.reset({tiers:{fast:null,smart:null,thinking:null,image:null,web_research:null}})},I=[n,r],e[7]=r,e[8]=n,e[9]=k,e[10]=I):(k=e[9],I=e[10]),O.useEffect(k,I);let h;e[11]!==t||e[12]!==r||e[13]!==c||e[14]!==u||e[15]!==g||e[16]!==v||e[17]!==j||e[18]!==f?(h=()=>{const S=r.getValues(),w=new Set(t.map(ut)),F={};c?.id&&(F[c.id]=v),u?.id&&(F[u.id]=j),g?.id&&(F[g.id]=f);const P=Y=>Y!=null&&!w.has(Y.keyId),N={fast:P(S.tiers.fast)?null:S.tiers.fast,smart:P(S.tiers.smart)?null:S.tiers.smart,thinking:P(S.tiers.thinking)?null:S.tiers.thinking,image:P(S.tiers.image)?null:S.tiers.image,web_research:P(S.tiers.web_research)?null:S.tiers.web_research},q=!N.fast||!N.smart||!N.thinking||!N.image||!N.web_research,U=N.fast===S.tiers.fast&&N.smart===S.tiers.smart&&N.thinking===S.tiers.thinking&&N.image===S.tiers.image&&N.web_research===S.tiers.web_research;if(!q&&U)return;const B=Me(t,F);r.reset({tiers:{fast:N.fast??B.chat.fast,smart:N.smart??B.chat.smart,thinking:N.thinking??B.chat.thinking,image:N.image??B.image,web_research:N.web_research??B.webResearch}},{keepDirty:!0})},e[11]=t,e[12]=r,e[13]=c,e[14]=u,e[15]=g,e[16]=v,e[17]=j,e[18]=f,e[19]=h):h=e[19];const p=c?.id,y=u?.id,R=g?.id;let M;e[20]!==t||e[21]!==r||e[22]!==v||e[23]!==j||e[24]!==f||e[25]!==p||e[26]!==y||e[27]!==R?(M=[r,t,v,j,f,p,y,R],e[20]=t,e[21]=r,e[22]=v,e[23]=j,e[24]=f,e[25]=p,e[26]=y,e[27]=R,e[28]=M):M=e[28],O.useEffect(h,M);let T;e[29]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx("p",{className:"text-sm text-muted-foreground",children:"These models power chat, automations, and tools across your organization."}),e[29]=T):T=e[29];const $=b&&!d;let A;e[30]!==_||e[31]!==$?(A=s.jsxs("div",{className:"flex items-center justify-between -mt-2 mb-2",children:[T,s.jsx(dt,{isPending:_,showSaved:$})]}),e[30]=_,e[31]=$,e[32]=A):A=e[32];let D;e[33]!==t[0]?.id||e[34]!==r.control||e[35]!==m?(D=at.map(S=>s.jsx(Ee,{control:r.control,name:`tiers.${S.key}`,render:w=>{const{field:F}=w;return s.jsx(_e,{title:S.label,description:S.description,action:s.jsx(ct,{slot:F.value,defaultKeyId:t[0]?.id??null,filterModels:S.filter,onSlotChange:P=>{F.onChange(P),m()}})})}},S.key)),e[33]=t[0]?.id,e[34]=r.control,e[35]=m,e[36]=D):D=e[36];let K;e[37]!==D?(K=s.jsx(ce,{children:D}),e[37]=D,e[38]=K):K=e[38];let E;return e[39]!==A||e[40]!==K?(E=s.jsxs(de,{title:"Default models",headerClassName:"pl-0",children:[A,K]}),e[39]=A,e[40]=K,e[41]=E):E=e[41],E}function ut(e){return e.id}const ft={usd:[10,20,100],brl:[50,100,500]};function pt(){const e=z.c(26),t=W(),[i,n]=O.useState(!1),{mutate:o,isPending:l}=J({mutationFn:async h=>{const{url:p}=await t.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:h,currency:d});return p},onSuccess:xt,onError:ht}),[r,x]=O.useState(""),[_,b]=O.useState("usd"),d=_,a=parseFloat(r),m=!isNaN(a)&&a>=1,c=d==="brl"?"R$":"$";let u;e[0]!==b?(u=h=>{h&&b(h)},e[0]=b,e[1]=u):u=e[1];let g,v;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(fe,{value:"usd",className:"px-3.5 text-sm",children:"USD"}),v=s.jsx(fe,{value:"brl",className:"px-3.5 text-sm",children:"BRL"}),e[2]=g,e[3]=v):(g=e[2],v=e[3]);let j;e[4]!==d||e[5]!==u?(j=s.jsxs(Le,{type:"single",variant:"outline",size:"default",value:d,onValueChange:u,children:[g,v]}),e[4]=d,e[5]=u,e[6]=j):j=e[6];let f;e[7]!==d||e[8]!==c||e[9]!==i||e[10]!==l||e[11]!==o?(f=!i&&s.jsxs(s.Fragment,{children:[ft[d].map(h=>s.jsxs(L,{variant:"outline",className:"h-10 px-4 text-sm font-medium tabular-nums",disabled:l,onClick:()=>o(h*100),children:[c,h]},h)),s.jsx(L,{variant:"ghost",className:"h-10 px-4 text-sm text-muted-foreground",onClick:()=>n(!0),disabled:l,children:"Custom"})]}),e[7]=d,e[8]=c,e[9]=i,e[10]=l,e[11]=o,e[12]=f):f=e[12];let k;e[13]!==c||e[14]!==r||e[15]!==a||e[16]!==i||e[17]!==m||e[18]!==l||e[19]!==x||e[20]!==o?(k=i&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative max-w-[140px]",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:c}),s.jsx(ie,{type:"number",min:"1",step:"1",placeholder:"50",value:r,onChange:h=>x(h.target.value),className:"h-10 text-sm pl-7",autoFocus:!0})]}),s.jsx(L,{className:"h-10",disabled:!m||l,onClick:()=>o(Math.round(a*100)),children:l?"...":"Add"}),s.jsx(L,{variant:"ghost",className:"h-10 text-sm text-muted-foreground",onClick:()=>{n(!1),x("")},children:"Cancel"})]}),e[13]=c,e[14]=r,e[15]=a,e[16]=i,e[17]=m,e[18]=l,e[19]=x,e[20]=o,e[21]=k):k=e[21];let I;return e[22]!==j||e[23]!==f||e[24]!==k?(I=s.jsx("div",{className:"flex flex-col gap-2.5",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[j,f,k]})}),e[22]=j,e[23]=f,e[24]=k,e[25]=I):I=e[25],I}function ht(e){Q.error(`Top-up failed: ${e.message}`)}function xt(e){e&&window.open(e,"_blank","noopener,noreferrer")}function gt(e){return e<=0?"text-destructive":e<=1?"text-amber-500 dark:text-amber-400":"text-foreground"}function bt(){const e=z.c(58),{org:t}=oe(),i=W(),n=re(),o=X();let l;e[0]!==o?(l=o.find(vt),e[0]=o,e[1]=l):l=e[1];const r=l,[x,_]=O.useState(!1);let b;e[2]!==r||e[3]!==i?(b=async()=>{r&&await i.call("AI_PROVIDER_KEY_DELETE",{keyId:r.id})},e[2]=r,e[3]=i,e[4]=b):b=e[4];let d;e[5]!==t.id||e[6]!==n?(d=()=>{n.invalidateQueries({queryKey:G.aiProviderKeys(t.id)}),n.invalidateQueries({queryKey:G.aiProviders(t.id)}),Q.success("Deco AI Gateway disconnected"),_(!1)},e[5]=t.id,e[6]=n,e[7]=d):d=e[7];let a;e[8]!==b||e[9]!==d?(a={mutationFn:b,onSuccess:d,onError:yt},e[8]=b,e[9]=d,e[10]=a):a=e[10];const{mutate:m,isPending:c}=J(a);let u;e[11]!==t.id?(u=G.aiProviderCredits(t.id,"deco"),e[11]=t.id,e[12]=u):u=e[12];const g=!!r;let v;e[13]!==i?(v=async()=>{try{return await i.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}},e[13]=i,e[14]=v):v=e[14];let j;e[15]!==u||e[16]!==g||e[17]!==v?(j={queryKey:u,enabled:g,staleTime:6e4,queryFn:v},e[15]=u,e[16]=g,e[17]=v,e[18]=j):j=e[18];const{data:f,isLoading:k,refetch:I,isFetching:h}=ve(j);if(!r)return null;const p=f?.balanceCents!=null?f.balanceCents/100:null;let y;e[19]!==p?(y=p!=null?`$${p.toFixed(2)}`:"—",e[19]=p,e[20]=y):y=e[20];const R=y;let M;e[21]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"Deco AI Gateway",className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"}),s.jsx("div",{children:s.jsx("p",{className:"text-xs text-muted-foreground",children:"Access to 100+ models"})})]}),e[21]=M):M=e[21];let T;e[22]===Symbol.for("react.memo_cache_sentinel")?(T=()=>_(!0),e[22]=T):T=e[22];let $;e[23]!==c?($=s.jsxs("div",{className:"flex items-center justify-between",children:[M,s.jsx(L,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground hover:text-destructive",onClick:T,disabled:c,children:"Disconnect"})]}),e[23]=c,e[24]=$):$=e[24];let A;e[25]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsxs(ke,{children:[s.jsx(Ie,{children:"Disconnect Deco AI Gateway"}),s.jsx(Ce,{children:"This will remove the Deco AI Gateway from this workspace. Your credit balance is preserved and will be available if you reconnect."})]}),e[25]=A):A=e[25];let D;e[26]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Ne,{children:"Cancel"}),e[26]=D):D=e[26];let K;e[27]!==m?(K=s.jsxs(Pe,{children:[A,s.jsxs(we,{children:[D,s.jsx(Ae,{onClick:()=>m(),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Disconnect"})]})]}),e[27]=m,e[28]=K):K=e[28];let E;e[29]!==x||e[30]!==K?(E=s.jsx(De,{open:x,onOpenChange:_,children:K}),e[29]=x,e[30]=K,e[31]=E):E=e[31];let S;e[32]!==p||e[33]!==R||e[34]!==h||e[35]!==k?(S=k||h?s.jsx(ae,{className:"h-9 w-24"}):s.jsx("span",{className:ue("text-3xl font-semibold tabular-nums tracking-tight",p!=null&>(p)),children:R}),e[32]=p,e[33]=R,e[34]=h,e[35]=k,e[36]=S):S=e[36];let w;e[37]!==I?(w=()=>I(),e[37]=I,e[38]=w):w=e[38];const F=h&&"animate-spin";let P;e[39]!==F?(P=ue(F),e[39]=F,e[40]=P):P=e[40];let N;e[41]!==P?(N=s.jsx(ye,{size:14,className:P}),e[41]=P,e[42]=N):N=e[42];let q;e[43]!==h||e[44]!==w||e[45]!==N?(q=s.jsx("button",{type:"button",onClick:w,disabled:h,className:"text-muted-foreground hover:text-foreground disabled:opacity-50 transition-colors p-1 rounded-md hover:bg-muted/50","aria-label":"Refresh balance",children:N}),e[43]=h,e[44]=w,e[45]=N,e[46]=q):q=e[46];let U;e[47]!==S||e[48]!==q?(U=s.jsxs("div",{className:"flex items-baseline gap-2",children:[S,q]}),e[47]=S,e[48]=q,e[49]=U):U=e[49];let B;e[50]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Available credit balance"}),e[50]=B):B=e[50];let Y;e[51]!==U?(Y=s.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[U,B]}),e[51]=U,e[52]=Y):Y=e[52];let Z;e[53]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsxs("div",{className:"pt-4 border-t border-border/60",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2.5",children:"Add credits"}),s.jsx(pt,{})]}),e[53]=Z):Z=e[53];let ee;return e[54]!==$||e[55]!==E||e[56]!==Y?(ee=s.jsx(de,{title:"Deco AI Gateway",children:s.jsx(ce,{children:s.jsxs("div",{className:"px-5 py-5 flex flex-col gap-5",children:[$,E,Y,Z]})})}),e[54]=$,e[55]=E,e[56]=Y,e[57]=ee):ee=e[57],ee}function yt(e){Q.error(`Failed to disconnect: ${e.message}`)}function vt(e){return e.providerId==="deco"}function jt(){const e=z.c(8),{org:t}=oe(),i=W(),n=re();let o;e[0]!==i?(o=async()=>{await i.call("AI_PROVIDER_PROVISION_KEY",{providerId:"deco"})},e[0]=i,e[1]=o):o=e[1];let l;e[2]!==t||e[3]!==n?(l=()=>{je("ai_provider_provision_succeeded",{provider_id:"deco"}),n.invalidateQueries({queryKey:G.aiProviderKeys(t.id)}),n.invalidateQueries({queryKey:G.aiProviders(t.id)}),Q.success("Deco AI Gateway connected successfully")},e[2]=t,e[3]=n,e[4]=l):l=e[4];let r;return e[5]!==o||e[6]!==l?(r={mutationFn:o,onSuccess:l,onError:_t},e[5]=o,e[6]=l,e[7]=r):r=e[7],J(r)}function _t(e){je("ai_provider_provision_failed",{provider_id:"deco",error:e.message}),Q.error(`Failed to connect Deco AI Gateway: ${e.message}`)}function St(){const e=z.c(10),{mutate:t,isPending:i}=jt();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=["radial-gradient(ellipse 50% 150% at -15% 50%, rgba(165,149,255,0.14) 0%, transparent 60%)","radial-gradient(ellipse 50% 150% at 115% 50%, rgba(208,236,26,0.11) 0%, transparent 60%)"],e[0]=n):n=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:n.join(", ")}}),e[1]=o):o=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"Deco AI Gateway",className:"size-12 shrink-0 rounded-xl object-contain dark:bg-white dark:p-1"}),e[2]=l):l=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("p",{className:"text-base font-semibold",children:"Deco AI Gateway"}),s.jsx("span",{className:"rounded-full border border-border/60 bg-background/60 px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:"Recommended"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"100+ models, one connection — pay as you go, no API keys to juggle."})]}),e[3]=r):r=e[3];let x;e[4]!==t?(x=()=>t(),e[4]=t,e[5]=x):x=e[5];const _=i?"Connecting…":"Connect Deco";let b;return e[6]!==i||e[7]!==x||e[8]!==_?(b=s.jsxs("div",{className:"relative rounded-xl border border-border overflow-hidden",children:[o,s.jsxs("div",{className:"relative flex items-center gap-5 px-6 py-5",children:[l,r,s.jsx(L,{variant:"outline",disabled:i,onClick:x,children:_})]})]}),e[6]=i,e[7]=x,e[8]=_,e[9]=b):b=e[9],b}const kt=V({label:C().min(1,"Label is required").max(100),apiKey:C().optional(),baseUrl:C().optional()});function It({providerKey:e,provider:t,preset:i,maskedKey:n,currentLabel:o,currentBaseUrl:l,onCancel:r,onSuccess:x}){const{org:_}=oe(),b=W(),d=re(),[a,m]=O.useState(!1),c=t.id==="openai-compatible",u=t.supportedMethods.includes("api-key"),{register:g,handleSubmit:v,watch:j,formState:{errors:f}}=be({resolver:ge(kt),defaultValues:{label:o,apiKey:"",baseUrl:l??""}}),k=j("apiKey")??"",{mutate:I,isPending:h}=J({mutationFn:async p=>{let y;p.apiKey?c?y=JSON.stringify({baseUrl:p.baseUrl||l||"",apiKey:p.apiKey}):y=p.apiKey:c&&p.baseUrl&&p.baseUrl!==l&&(y=JSON.stringify({baseUrl:p.baseUrl,apiKey:""})),await b.call("AI_PROVIDER_KEY_UPDATE",{keyId:e.id,label:p.label,...y!==void 0?{apiKey:y}:{}})},onSuccess:()=>{d.invalidateQueries({queryKey:G.aiProviderKeys(_.id)}),d.invalidateQueries({queryKey:G.aiProviders(_.id)}),Q.success("Provider updated"),x()},onError:p=>Q.error(`Failed to update: ${p.message}`)});return s.jsxs("form",{onSubmit:v(p=>I(p)),className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Label"}),s.jsx(ie,{placeholder:"e.g. Personal key",...g("label"),className:"h-8 text-sm"}),f.label&&s.jsx("p",{className:"text-xs text-destructive",children:f.label.message})]}),c&&!i?.defaultBaseUrl&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Base URL"}),s.jsx(ie,{type:"url",placeholder:i?.baseUrlPlaceholder??"http://localhost:4000/v1",...g("baseUrl"),className:"h-8 text-sm"})]}),u&&s.jsxs("div",{className:"space-y-1",children:[s.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:["API key"," ",s.jsx("span",{className:"text-muted-foreground/60",children:"(leave blank to keep current)"})]}),s.jsxs("div",{className:"relative",children:[s.jsx(ie,{type:a&&k?"text":"password",placeholder:n,...g("apiKey"),className:"ph-no-capture h-8 text-sm pr-8"}),k&&s.jsx("button",{type:"button",onClick:()=>m(!a),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:a?s.jsx(We,{size:14}):s.jsx(He,{size:14})})]})]}),i?.helpText&&s.jsx("p",{className:"text-xs text-muted-foreground",children:i.helpText}),s.jsxs(Je,{children:[s.jsx(L,{type:"button",variant:"ghost",size:"sm",onClick:r,disabled:h,children:"Cancel"}),s.jsx(L,{type:"submit",size:"sm",disabled:h,children:h?"Saving...":"Save"})]})]})}function Ct(e){const t=z.c(28),{providerKey:i,provider:n,open:o,onOpenChange:l}=e,r=W();let x;t[0]!==n.id||t[1]!==i.presetId?(x=n.id==="openai-compatible"&&i.presetId?Ke.find(k=>k.id===i.presetId):void 0,t[0]=n.id,t[1]=i.presetId,t[2]=x):x=t[2];const _=x,b=_?.name??n.name;let d;t[3]!==i.id?(d=G.aiProviderKeyPreview(i.id),t[3]=i.id,t[4]=d):d=t[4];let a;t[5]!==i.id||t[6]!==r?(a=()=>r.call("AI_PROVIDER_KEY_PREVIEW",{keyId:i.id}),t[5]=i.id,t[6]=r,t[7]=a):a=t[7];let m;t[8]!==o||t[9]!==d||t[10]!==a?(m={queryKey:d,queryFn:a,enabled:o,staleTime:0},t[8]=o,t[9]=d,t[10]=a,t[11]=m):m=t[11];const{data:c,isLoading:u}=ve(m);let g;t[12]!==b?(g=s.jsx(Xe,{children:s.jsxs(Ze,{children:["Edit ",b]})}),t[12]=b,t[13]=g):g=t[13];let v;t[14]!==u||t[15]!==l||t[16]!==_||t[17]!==c||t[18]!==n||t[19]!==i?(v=u||!c?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(st,{})}):s.jsx(It,{providerKey:i,provider:n,preset:_,maskedKey:c.maskedKey,currentLabel:c.label,currentBaseUrl:c.baseUrl,onCancel:()=>l(!1),onSuccess:()=>l(!1)}),t[14]=u,t[15]=l,t[16]=_,t[17]=c,t[18]=n,t[19]=i,t[20]=v):v=t[20];let j;t[21]!==g||t[22]!==v?(j=s.jsxs(et,{className:"sm:max-w-md",children:[g,v]}),t[21]=g,t[22]=v,t[23]=j):j=t[23];let f;return t[24]!==l||t[25]!==o||t[26]!==j?(f=s.jsx(tt,{open:o,onOpenChange:l,children:j}),t[24]=l,t[25]=o,t[26]=j,t[27]=f):f=t[27],f}function Nt(e){const t=z.c(48),{providerKey:i,provider:n}=e,{org:o}=oe(),l=W(),r=re(),[x,_]=O.useState(!1),[b,d]=O.useState(!1),a=n.id==="openai-compatible";let m;t[0]!==a||t[1]!==i.presetId?(m=a&&i.presetId?Ke.find(q=>q.id===i.presetId):void 0,t[0]=a,t[1]=i.presetId,t[2]=m):m=t[2];const c=m,u=c?c.name:a?"Custom OpenAI-compatible":n.name,g=c?.logo??n.logo;let v;e:{if(a){v=i.label;break e}const q=i.label;let U;t[3]!==i.createdAt?(U=it(new Date(i.createdAt)),t[3]=i.createdAt,t[4]=U):U=t[4],v=`${q} · added ${U} ago`}const j=v;let f;t[5]!==i.id||t[6]!==l?(f=async()=>{await l.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},t[5]=i.id,t[6]=l,t[7]=f):f=t[7];let k;t[8]!==o||t[9]!==i.id||t[10]!==r?(k=()=>{r.invalidateQueries({queryKey:G.aiProviderKeys(o.id)}),r.invalidateQueries({queryKey:G.aiProviders(o.id)}),r.invalidateQueries({queryKey:G.aiProviderModels(o.id,i.id)}),Q.success("Key deleted"),_(!1)},t[8]=o,t[9]=i.id,t[10]=r,t[11]=k):k=t[11];let I;t[12]!==f||t[13]!==k?(I={mutationFn:f,onSuccess:k,onError:Pt},t[12]=f,t[13]=k,t[14]=I):I=t[14];const{mutate:h,isPending:p}=J(I);let y;t[15]!==u||t[16]!==g?(y=g?s.jsx("img",{src:g,alt:u,className:"size-8 rounded-md object-contain dark:bg-white dark:p-0.5"}):s.jsx(Qe,{fallback:u.charAt(0),className:"size-8 bg-primary/10 text-primary"}),t[15]=u,t[16]=g,t[17]=y):y=t[17];let R;t[18]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:()=>d(!0),children:s.jsx(Ge,{size:14})}),t[18]=R):R=t[18];let M,T;t[19]===Symbol.for("react.memo_cache_sentinel")?(M=()=>_(!0),T=s.jsx(Be,{size:14}),t[19]=M,t[20]=T):(M=t[19],T=t[20]);let $;t[21]!==p?($=s.jsxs("div",{className:"flex items-center gap-0.5",children:[R,s.jsx(L,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",disabled:p,onClick:M,children:T})]}),t[21]=p,t[22]=$):$=t[22];let A;t[23]!==j||t[24]!==u||t[25]!==$||t[26]!==y?(A=s.jsx(_e,{icon:y,title:u,description:j,action:$}),t[23]=j,t[24]=u,t[25]=$,t[26]=y,t[27]=A):A=t[27];let D;t[28]!==b||t[29]!==n||t[30]!==i?(D=s.jsx(Ct,{providerKey:i,provider:n,open:b,onOpenChange:d}),t[28]=b,t[29]=n,t[30]=i,t[31]=D):D=t[31];let K;t[32]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(Ie,{children:"Delete API key"}),t[32]=K):K=t[32];let E;t[33]!==i.label?(E=s.jsxs(ke,{children:[K,s.jsxs(Ce,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:i.label}),"."]})]}),t[33]=i.label,t[34]=E):E=t[34];let S;t[35]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Ne,{children:"Cancel"}),t[35]=S):S=t[35];let w;t[36]!==h?(w=s.jsxs(we,{children:[S,s.jsx(Ae,{onClick:()=>h(),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[36]=h,t[37]=w):w=t[37];let F;t[38]!==E||t[39]!==w?(F=s.jsxs(Pe,{children:[E,w]}),t[38]=E,t[39]=w,t[40]=F):F=t[40];let P;t[41]!==x||t[42]!==F?(P=s.jsx(De,{open:x,onOpenChange:_,children:F}),t[41]=x,t[42]=F,t[43]=P):P=t[43];let N;return t[44]!==A||t[45]!==D||t[46]!==P?(N=s.jsxs(s.Fragment,{children:[A,D,P]}),t[44]=A,t[45]=D,t[46]=P,t[47]=N):N=t[47],N}function Pt(e){return Q.error(`Failed to delete key: ${e.message}`)}function wt(e){const t=z.c(11),{onConnectClick:i}=e,n=X(),o=Se();let l;t[0]!==o?.providers?(l=o?.providers??[],t[0]=o?.providers,t[1]=l):l=t[1];const r=l;let x;if(t[2]!==n||t[3]!==i||t[4]!==r){let _;t[6]!==r?(_=m=>({key:m,provider:r.find(c=>c.id===m.providerId)}),t[6]=r,t[7]=_):_=t[7];const b=n.filter(Kt).map(_).filter(Dt);let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ve,{size:14}),t[8]=d):d=t[8];let a;t[9]!==i?(a=s.jsxs(L,{size:"sm",onClick:i,children:[d,"Connect provider"]}),t[9]=i,t[10]=a):a=t[10],x=s.jsx(de,{title:"Connected providers",headerClassName:"px-0",actions:a,children:b.length===0?s.jsx("p",{className:"text-sm text-muted-foreground px-1",children:"Bring your own keys to use specific models alongside Deco's gateway."}):s.jsx(ce,{children:b.map(At)})}),t[2]=n,t[3]=i,t[4]=r,t[5]=x}else x=t[5];return x}function At(e){const{key:t,provider:i}=e;return s.jsx(Nt,{providerKey:t,provider:i},t.id)}function Dt(e){return e.provider!==void 0}function Kt(e){return e.providerId!=="deco"}function Et(e){const t=z.c(3),{error:i}=e;let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Re,{size:16}),t[0]=n):n=t[0];let o;return t[1]!==i.message?(o=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[n,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load AI providers: ",i.message]})]}),t[1]=i.message,t[2]=o):o=t[2],o}function Ft(){const e=z.c(23),t=X();let i;e[0]!==t?(i=t.some(Rt),e[0]=t,e[1]=i):i=e[1];const n=i,o=t.length>0,[l,r]=O.useState(!1),[x,_]=O.useState(null),b=Se();let d;e[2]!==b?.providers?(d=b?.providers??[],e[2]=b?.providers,e[3]=d):d=e[3];const a=d;if(!o){let j;e[4]===Symbol.for("react.memo_cache_sentinel")?(j=()=>r(!0),e[4]=j):j=e[4];let f;e[5]!==a?(f=s.jsx(Ye,{providers:a,onSelect:_,onShowAll:j}),e[5]=a,e[6]=f):f=e[6];const k=x!==null||l;let I;e[7]===Symbol.for("react.memo_cache_sentinel")?(I=R=>{R||(_(null),r(!1))},e[7]=I):I=e[7];const h=x??void 0;let p;e[8]!==k||e[9]!==h?(p=s.jsx(pe,{open:k,onOpenChange:I,initialProvider:h}),e[8]=k,e[9]=h,e[10]=p):p=e[10];let y;return e[11]!==f||e[12]!==p?(y=s.jsxs(s.Fragment,{children:[f,p]}),e[11]=f,e[12]=p,e[13]=y):y=e[13],y}let m;e[14]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(O.Suspense,{fallback:s.jsx(ae,{className:"h-16 w-full"}),children:s.jsx(mt,{})}),e[14]=m):m=e[14];let c;e[15]!==n?(c=n?s.jsx(bt,{}):s.jsx(St,{}),e[15]=n,e[16]=c):c=e[16];let u;e[17]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(wt,{onConnectClick:()=>r(!0)}),e[17]=u):u=e[17];let g;e[18]!==l?(g=s.jsx(pe,{open:l,onOpenChange:r}),e[18]=l,e[19]=g):g=e[19];let v;return e[20]!==c||e[21]!==g?(v=s.jsxs(s.Fragment,{children:[m,c,u,g]}),e[20]=c,e[21]=g,e[22]=v):v=e[22],v}function Rt(e){return e.providerId==="deco"}function $t(){const e=z.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(te.Title,{children:"AI Providers"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(te,{children:s.jsx(te.Content,{children:s.jsx(te.Body,{children:s.jsxs($e,{children:[t,s.jsx(Fe,{fallback:Ot,children:s.jsx(O.Suspense,{fallback:s.jsx(ae,{className:"h-64 w-full"}),children:s.jsx(Ft,{})})})]})})})}),e[1]=i):i=e[1],i}function Ot(e){const{error:t}=e;return s.jsx(Et,{error:t??new Error("Failed to load AI providers")})}function Ls(){const e=z.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ot,{capability:"ai-providers:manage",area:"AI providers",children:s.jsx($t,{})}),e[0]=t):t=e[0],t}export{Ls as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as n,c as o,j as c,bq as d}from"./index-
|
|
1
|
+
import{e as n,c as o,j as c,bq as d}from"./index-Uxmxa28N.js";const u=d("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function f(l){const e=n.c(10);let t,r,s;e[0]!==l?({className:t,variant:s,...r}=l,e[0]=l,e[1]=t,e[2]=r,e[3]=s):(t=e[1],r=e[2],s=e[3]);let a;e[4]!==t||e[5]!==s?(a=o(u({variant:s}),t),e[4]=t,e[5]=s,e[6]=a):a=e[6];let i;return e[7]!==r||e[8]!==a?(i=c.jsx("div",{"data-slot":"alert",role:"alert",className:a,...r}),e[7]=r,e[8]=a,e[9]=i):i=e[9],i}function x(l){const e=n.c(8);let t,r;e[0]!==l?({className:t,...r}=l,e[0]=l,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=o("line-clamp-1 min-h-4 font-medium tracking-tight",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==r||e[6]!==s?(a=c.jsx("div",{"data-slot":"alert-title",className:s,...r}),e[5]=r,e[6]=s,e[7]=a):a=e[7],a}function v(l){const e=n.c(8);let t,r;e[0]!==l?({className:t,...r}=l,e[0]=l,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=o("text-muted-foreground leading-relaxed",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==r||e[6]!==s?(a=c.jsx("div",{"data-slot":"alert-description",className:s,...r}),e[5]=r,e[6]=s,e[7]=a):a=e[7],a}export{f as A,x as a,v as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as i,bu as m,j as r,dp as A,dm as w,dn as T,dL as O,bB as M,a5 as I,cw as L,dM as D,cx as z,dA as F,ad as G,dq as k,cy as q,e as n,c as p,dN as v}from"./index-
|
|
1
|
+
import{r as i,bu as m,j as r,dp as A,dm as w,dn as T,dL as O,bB as M,a5 as I,cw as L,dM as D,cx as z,dA as F,ad as G,dq as k,cy as q,e as n,c as p,dN as v}from"./index-Uxmxa28N.js";var x="AlertDialog",[B]=G(x,[D]),d=D(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(L,{...a,...t,modal:!0})};N.displayName=x;var H="AlertDialogTrigger",V=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(k,{...o,...a,ref:e})});V.displayName=H;var W="AlertDialogPortal",y=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(z,{...a,...t})};y.displayName=W;var Y="AlertDialogOverlay",_=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(q,{...o,...a,ref:e})});_.displayName=Y;var f="AlertDialogContent",[J,K]=B(f),Q=F("AlertDialogContent"),j=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=i.useRef(null),P=m(e,c),u=i.useRef(null);return r.jsx(O,{contentName:f,titleName:b,docsSlug:"alert-dialog",children:r.jsx(J,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[r.jsx(Q,{children:a}),r.jsx(X,{contentRef:c})]})})})});j.displayName=f;var b="AlertDialogTitle",h=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(w,{...o,...a,ref:e})});h.displayName=b;var E="AlertDialogDescription",R=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(T,{...o,...a,ref:e})});R.displayName=E;var U="AlertDialogAction",C=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});C.displayName=U;var $="AlertDialogCancel",S=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K($,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});S.displayName=$;var X=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
|
|
2
2
|
|
|
3
3
|
You can add a description to the \`${f}\` by passing a \`${E}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
4
4
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as W,r as B,j as e,c as X,l as Y}from"./index-Uxmxa28N.js";import{i as Z}from"./ChevronRight--j_9x5Si.js";import{S as tt}from"./scroll-area-B2oPO2DK.js";import{aa as et,ab as rt,f as ot}from"./index-BV8QivMR.js";import{c as it}from"./save-referenced-block-CHATKao2.js";import{S as mt}from"./schema-form-DaHWFhOC.js";import{S as pt}from"./save-status-4ua9-mbv.js";import"./select-DV1FwAD4.js";import"./tooltip-DIuu50IU.js";import"./Check-ByG0nAY6.js";import"./ChevronDown-BnRC7SrH.js";import"./ChevronUp-BQorkh2i.js";import"./agent-capabilities-C4o9Cucl.js";import"./chat-context-XxWcMKnK.js";import"./tab-id-C8mEsBYo.js";import"./use-mcp-client-BcxxumZr.js";import"./auth-BnAEjx9j.js";import"./watch-sse-pool-B9jIyDHD.js";import"./decopilot-sse-pool-sjWpsyX0.js";import"./use-virtual-mcp-Baf8z8om.js";import"./use-collections-DfWTtTs9.js";import"./use-ai-providers-BRyts0Gz.js";import"./use-organization-settings-BehduVMv.js";import"./pair-QRwOdDMh.js";import"./agent-icon-BZpQDAZU.js";import"./AlertCircle-BdxdLfMZ.js";import"./Tool01-DiJPRujJ.js";import"./SwitchHorizontal01-C2a9MjMN.js";import"./RefreshCcw01-m0oFG4br.js";import"./XCircle-Dz_GlHY5.js";import"./ArrowUpRight-D4WTYONo.js";import"./ZapSquare-CSP4r4PP.js";import"./Users03-dk6WdPnC.js";import"./CheckCircle-C-upsPdg.js";import"./ChevronLeft-C70Azurf.js";import"./DotsVertical-C3W2s3WW.js";import"./Container-DxN5v3U8.js";import"./Eye-i6HoqOn_.js";import"./ZoomOut-BANb87-i.js";import"./Globe01-BoP8H_NZ.js";import"./FilterLines-D6io39CJ.js";import"./Star01-BI7rxnuz.js";import"./Palette-deno1eEN.js";import"./HardDrive-DQcSGPZL.js";import"./Stars02-Ba384PUK.js";import"./Key01-BY8TiIH_.js";import"./LayoutLeft-Dk1audj-.js";import"./LinkExternal01-Cv2RkpjT.js";import"./Monitor01-CoO9QmCK.js";import"./Sun-BB5ryFYp.js";import"./Play-pWfjHR9I.js";import"./Plus-Ca-boKc-.js";import"./SearchMd-BTjnXp3X.js";import"./Settings02-DQ3JZYho.js";import"./Shield01-BqgQ6O-B.js";import"./Stars01-CbPlZD94.js";import"./Trash01-hWwpO1I_.js";import"./Upload01-tMokiVUz.js";import"./User01-qxhPSUm_.js";import"./Users01-DgDkNrBR.js";import"./XClose-C4uc8l11.js";import"./X-BgQLDqpQ.js";import"./Zap-BAnl3IBe.js";import"./use-clock-tick-DwZ4ZWpf.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CJfFxS8w.js";import"./file-type-icon-evaVS-14.js";import"./dialog-NbvuzXZV.js";import"./content-blocks-o63cs2vh.js";import"./types-CKeTg986.js";import"./studio-tools-DUggrN6-.js";import"./shell-layout-OG_nqUcJ.js";import"./avatar-B05K9npJ.js";import"./required-auth-layout-DwO_xi24.js";import"./useRouterState-CajLqzv1.js";import"./use-org-sso-1XMjAhdy.js";import"./integration-icon-DOyf0ghu.js";import"./use-navigate-to-agent-BlAYOqxb.js";import"./use-connection-DYCEDRZX.js";import"./use-mcp-prompts-Cy0GX04y.js";import"./form-W67eg754.js";import"./label-DsPCNyuh.js";import"./input-DV0lJPfu.js";import"./spinner-B4TZJa4Y.js";import"./drawer-5hzhUed3.js";import"./collection-search-DGxm46jw.js";import"./tabs-C6WaEkjB.js";import"./toggle-group-DLEgMfd4.js";import"./sortable.esm-D9tZZic5.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BFSKgi5D.js";import"./use-registry-connections-D2zEHIac.js";import"./useInfiniteQuery-2xSwq_xW.js";import"./use-infinite-scroll-B_947odd.js";import"./extract-connection-data-EC8TuVkD.js";import"./generate-id-CtRf6mq5.js";import"./collections-DQTIJ43Y.js";import"./card-Dzpiviva.js";import"./collection-tabs-D8b9Fop0.js";import"./badge-DepW8zMP.js";import"./textarea-CnNOCR0A.js";import"./connection-form-helpers-CxYh53Ie.js";import"./useSuspenseInfiniteQuery-CGWm3R_U.js";import"./mcp-oauth-DPpOCiR5.js";import"./connect-desktop-dialog-DaREkv_h.js";import"./decopilot-CauvA-RH.js";import"./checkbox-CiQiAC_1.js";import"./skeleton-7xZf6qTy.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BKgS_iJ4.js";import"./popover-Jfd2eq_a.js";import"./command-Dw0cdU7u.js";import"./index-DcqdobGw.js";import"./index-01Gl_fY8.js";import"./dropdown-menu-DDfjivGs.js";import"./question-004-sINsf4GQ.js";import"./shell-route-loading-sAXWvXuw.js";import"./sidebar-BThc8k1X.js";import"./sheet-6C3p1ZVN.js";import"./toolbar-B_2b5mvX.js";import"./use-create-virtual-mcp-mUufoSEk.js";import"./github-repo-picker-C38g29Tm.js";import"./use-mcp-tools-BIoKMuS8.js";import"./alert-dialog-RhxX9i57.js";import"./index-CBGRBCyz.js";import"./use-org-auth-client-D8P8BtbO.js";import"./hover-card-CaSThHdV.js";import"./task-status-BbAuY8YH.js";import"./use-status-sounds-B5sE5rmz.js";import"./empty-state-DMm5rF2F.js";import"./resizable-BWgnQBO-.js";import"./use-capability-CRoCvU0G.js";import"./header-tab-button-Dj8caQW7.js";import"./index-Cdks9-wg.js";import"./user-BkGqIjD6.js";import"./tools-list-Dmw1yj09.js";import"./switch-BSvxJWjO.js";import"./use-debounced-autosave-C3pwZJGN.js";import"./index-B6xiIBRQ.js";import"./search-input-BZZZVgMK.js";import"./use-secrets-CdGKuher.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-CvUJVGp7.js";import"./view-mode-toggle-DsfhMQhu.js";import"./select-model-DSDBCN6l.js";import"./use-automations-BNu4-eYB.js";import"./monaco-editor-CZjzwq84.js";import"./automation-runs-BqzjGjNJ.js";import"./table-BzJvNvEf.js";import"./use-members-CIJZJNZj.js";import"./automation-list-row-CwvON8r0.js";import"./calendar-cx7Wk4XQ.js";import"./image-field-C_iu9B-F.js";import"./use-file-configs-DjBhVOXm.js";function eo(E){const t=W.c(51),{orgSlug:R,virtualMcpId:P,branch:$,blockKey:r,block:m,meta:p,decofile:C,title:F,excludeFields:K,schemaPending:M}=E,V=M===void 0?!1:M,a=typeof m?.__resolveType=="string"?m.__resolveType:"";let v;t[0]!==K||t[1]!==p||t[2]!==a?(v=et(a,p,K),t[0]=K,t[1]=p,t[2]=a,t[3]=v):v=t[3];const s=v;let b;t[4]!==s?(b=!!s&&Object.keys(s.properties??{}).length>0,t[4]=s,t[5]=b):b=t[5];const T=b;let g;t[6]!==m||t[7]!==r||t[8]!==p||t[9]!==F?(g=F??(m?rt(r,m,p):r),t[6]=m,t[7]=r,t[8]=p,t[9]=F,t[10]=g):g=t[10];const n=g;let j;t[11]!==$||t[12]!==R||t[13]!==P?(j={orgSlug:R,virtualMcpId:P,branch:$},t[11]=$,t[12]=R,t[13]=P,t[14]=j):j=t[14];const{save:c,isPending:A}=ot(j);let y;t[15]!==c?(y=it((l,i)=>c(l,i)),t[15]=c,t[16]=y):y=t[16];const L=y,[G,H]=B.useState(r),[J,q]=B.useState(null),[z,Q]=B.useState(0);let S;t[17]===Symbol.for("react.memo_cache_sentinel")?(S=[],t[17]=S):S=t[17];const[o,O]=B.useState(S);G!==r&&(H(r),q(null),Q(st),O([]));let N;t[18]!==m?(N=m??{},t[18]=m,t[19]=N):N=t[19];const D=J??N;let k;t[20]!==r||t[21]!==a||t[22]!==c?(k=l=>{const i=l;q(i),c(r,{...i,__resolveType:a})},t[20]=r,t[21]=a,t[22]=c,t[23]=k):k=t[23];const I=k;let _;t[24]!==o||t[25]!==n?(_=o.length>0?[n,...o]:[],t[24]=o,t[25]=n,t[26]=_):_=t[26];const h=_;let d;t[27]!==o||t[28]!==h||t[29]!==n?(d=h.length>0?e.jsx("nav",{"aria-label":"Editing breadcrumb",className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:h.map((l,i)=>{const U=i===h.length-1;return e.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[i>0&&e.jsx(Z,{className:"size-3 shrink-0 text-muted-foreground/60"}),e.jsx("button",{type:"button",onClick:()=>O(i===0?[]:o.slice(0,i)),title:l,className:X("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors",U?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:l})]},`${l}-${i}`)})}):e.jsx("span",{className:"text-sm font-medium",children:n}),t[27]=o,t[28]=h,t[29]=n,t[30]=d):d=t[30];let f;t[31]!==A?(f=e.jsx(pt,{isPending:A,isError:!1}),t[31]=A,t[32]=f):f=t[32];let u;t[33]!==d||t[34]!==f?(u=e.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[d,f]}),t[33]=d,t[34]=f,t[35]=u):u=t[35];let x;t[36]!==r||t[37]!==o||t[38]!==C||t[39]!==D||t[40]!==z||t[41]!==I||t[42]!==T||t[43]!==p||t[44]!==L||t[45]!==s||t[46]!==V?(x=e.jsx(tt,{className:"min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-6",children:e.jsx("div",{className:"mx-auto max-w-xl",children:T?e.jsx(mt,{schema:s,value:D,onChange:I,basePath:"",breadcrumbPath:o,onBreadcrumbChange:O,decofile:C,meta:p,onSaveReferencedBlock:L},`${r}:${z}`):V?e.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[e.jsx(Y,{size:16,className:"animate-spin"}),"Loading app schema…"]}):e.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:"No editable schema found for this app."})})})}),t[36]=r,t[37]=o,t[38]=C,t[39]=D,t[40]=z,t[41]=I,t[42]=T,t[43]=p,t[44]=L,t[45]=s,t[46]=V,t[47]=x):x=t[47];let w;return t[48]!==u||t[49]!==x?(w=e.jsxs("div",{className:"flex h-full flex-col",children:[u,x]}),t[48]=u,t[49]=x,t[50]=w):w=t[50],w}function st(E){return E+1}export{eo as AppEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cE as v,cF as $,cG as W,cH as L,cI as H,cJ as D,cK as V,cL as x,cM as q,cN as j,cO as y,cP as N,cQ as B,cR as F,cS as Z}from"./index-Bunm6B_R.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function K(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function Q(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&K(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Y(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function M(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=N.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=B[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof H||n instanceof D)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof V)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await T(c,{fetchFn:i}),!o)try{o=await P(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new q(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const k=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(k),d=k}}const C=!e.redirectUrl;if(n!==void 0||C){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const S=await e.tokens();if(S?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:S.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof j)||l instanceof y))throw l}const z=e.state?await e.state():void 0,{authorizationUrl:I,codeVerifier:b}=await ue(c,{metadata:u,clientInformation:d,state:z,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(b),await e.redirectToAuthorization(I),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function P(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return v.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function E(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??L;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await E(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await E(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function T(e,{fetchFn:t=fetch,protocolVersion:n=L}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?$.parse(await o.json()):W.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await P(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await T(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await Z(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function O(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=Q(r,h);Y(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await M(u);return x.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=O(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=O(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await M(s);return F.parse(await s.json())}export{pe as U,T as a,_e as b,Ue as c,P as d,me as e};
|
|
1
|
+
import{cE as v,cF as $,cG as W,cH as L,cI as H,cJ as D,cK as V,cL as x,cM as q,cN as j,cO as y,cP as N,cQ as B,cR as F,cS as Z}from"./index-Uxmxa28N.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function K(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function Q(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&K(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Y(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function M(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=N.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=B[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof H||n instanceof D)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof V)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await T(c,{fetchFn:i}),!o)try{o=await P(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new q(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const k=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(k),d=k}}const C=!e.redirectUrl;if(n!==void 0||C){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const S=await e.tokens();if(S?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:S.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof j)||l instanceof y))throw l}const z=e.state?await e.state():void 0,{authorizationUrl:I,codeVerifier:b}=await ue(c,{metadata:u,clientInformation:d,state:z,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(b),await e.redirectToAuthorization(I),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function P(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return v.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function E(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??L;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await E(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await E(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function T(e,{fetchFn:t=fetch,protocolVersion:n=L}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?$.parse(await o.json()):W.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await P(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await T(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await Z(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function O(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=Q(r,h);Y(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await M(u);return x.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=O(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=O(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await M(s);return F.parse(await s.json())}export{pe as U,T as a,_e as b,Ue as c,P as d,me as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as l,g as m,j as t,A as f,S as h,h as x,i as r,k as p,N as u}from"./index-
|
|
1
|
+
import{e as l,g as m,j as t,A as f,S as h,h as x,i as r,k as p,N as u}from"./index-Uxmxa28N.js";function d(){const e=l.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(u,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function g(){const e=l.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=m(a);if(n==="accept-invitation"){let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(f,{children:t.jsx(h,{})}),e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(x,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:"accept-invitation"})})}),e[2]=i):i=e[2];let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(t.Fragment,{children:[c,i,t.jsx(p,{children:t.jsx(d,{})})]}),e[3]=o):o=e[3],o}let s;return e[4]!==n?(s=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:n})}),e[4]=n,e[5]=s):s=e[5],s}export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as o,j as i}from"./index-
|
|
1
|
+
import{e as o,j as i}from"./index-Uxmxa28N.js";function f(r){const e=o.c(9),{children:n,visual:c}=r;let l;e[0]!==n?(l=i.jsx("section",{className:"flex flex-1 items-center justify-center bg-sidebar p-6 md:p-10",children:i.jsx("div",{className:"w-full max-w-[440px]",children:n})}),e[0]=n,e[1]=l):l=e[1];let s;e[2]!==c?(s=c??i.jsx("img",{src:"/onboarding-placeholder.png",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e[2]=c,e[3]=s):s=e[3];let t;e[4]!==s?(t=i.jsx("aside",{className:"relative hidden md:flex flex-1 overflow-hidden bg-muted",children:s}),e[4]=s,e[5]=t):t=e[5];let a;return e[6]!==l||e[7]!==t?(a=i.jsxs("main",{className:"flex min-h-screen w-full",children:[l,t]}),e[6]=l,e[7]=t,e[8]=a):a=e[8],a}export{f as A};
|
package/dist/client/assets/{automation-list-row-CqYTZ9yK.js → automation-list-row-CwvON8r0.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as E,r as F,c as $,j as t,B as K}from"./index-
|
|
1
|
+
import{e as E,r as F,c as $,j as t,B as K}from"./index-Uxmxa28N.js";import{b as O,d as B,e as I,g as L,c as H,f as V,a as q,A as G}from"./alert-dialog-RhxX9i57.js";import{a as J,D as Q,b as U,c as W}from"./dropdown-menu-DDfjivGs.js";import{A as X,R as Y}from"./agent-icon-BZpQDAZU.js";import{i as Z}from"./DotsVertical-C3W2s3WW.js";import{s as ee}from"./Trash01-hWwpO1I_.js";import{i as te}from"./Zap-BAnl3IBe.js";import{u as se}from"./use-virtual-mcp-Baf8z8om.js";import{u as ne}from"./use-automations-BNu4-eYB.js";function pe(a){const e=E.c(53),{automation:s,showAgent:n,onClick:r}=a,{remove:i}=ne(),[P,S]=F.useState(!1),o=se(n?s.virtual_mcp_id:void 0);let D;e[0]!==s.id||e[1]!==i?(D=()=>{i.mutate(s.id),S(!1)},e[0]=s.id,e[1]=i,e[2]=D):D=e[2];const z=D;let A;e[3]!==r?(A=l=>{l.target===l.currentTarget&&(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),r())},e[3]=r,e[4]=A):A=e[4];const R=A,T=s.active&&s.trigger_count>0?"bg-emerald-500":"bg-muted-foreground/40";let c;e[5]!==T?(c=$("inline-block size-2 rounded-full shrink-0",T),e[5]=T,e[6]=c):c=e[6];const M=s.active&&s.trigger_count>0?"Active":s.active?"No triggers configured":"Paused";let m;e[7]!==c||e[8]!==M?(m=t.jsx("span",{className:c,"aria-label":M}),e[7]=c,e[8]=M,e[9]=m):m=e[9];let u;e[10]!==o?.icon||e[11]!==o?.title||e[12]!==s.name||e[13]!==n?(u=n&&t.jsx(X,{icon:o?.icon??null,name:o?.title??s.name,size:"xs",className:"shrink-0"}),e[10]=o?.icon,e[11]=o?.title,e[12]=s.name,e[13]=n,e[14]=u):u=e[14];let d;e[15]!==s.name?(d=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[15]=s.name,e[16]=d):d=e[16];let g;e[17]!==o||e[18]!==n?(g=n&&o&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",o.title]}),e[17]=o,e[18]=n,e[19]=g):g=e[19];let f;e[20]!==d||e[21]!==g?(f=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d,g]}),e[20]=d,e[21]=g,e[22]=f):f=e[22];let x;e[23]!==s.nearest_next_run_at||e[24]!==s.trigger_count?(x=t.jsx(oe,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[23]=s.nearest_next_run_at,e[24]=s.trigger_count,e[25]=x):x=e[25];let p;e[26]!==f||e[27]!==x?(p=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[f,x]}),e[26]=f,e[27]=x,e[28]=p):p=e[28];let N;e[29]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(J,{asChild:!0,children:t.jsx(K,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(Z,{size:16})})}),e[29]=N):N=e[29];let y;e[30]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("div",{onClick:ie,onKeyDown:re,role:"presentation",className:"shrink-0",children:t.jsxs(Q,{children:[N,t.jsx(U,{align:"end",children:t.jsxs(W,{variant:"destructive",onClick:l=>{l.stopPropagation(),S(!0)},children:[t.jsx(ee,{size:16}),"Delete"]})})]})}),e[30]=y):y=e[30];let h;e[31]!==R||e[32]!==r||e[33]!==p||e[34]!==m||e[35]!==u?(h=t.jsxs("div",{role:"button",tabIndex:0,onClick:r,onKeyDown:R,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[m,u,p,y]}),e[31]=R,e[32]=r,e[33]=p,e[34]=m,e[35]=u,e[36]=h):h=e[36];let w;e[37]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(H,{children:"Delete automation?"}),e[37]=w):w=e[37];let j;e[38]!==s.name?(j=t.jsxs(O,{children:[w,t.jsxs(B,{children:["This removes"," ",t.jsx("span",{className:"font-medium text-foreground",children:s.name})," ","and all of its triggers. This action cannot be undone."]})]}),e[38]=s.name,e[39]=j):j=e[39];let C;e[40]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(V,{children:"Cancel"}),e[40]=C):C=e[40];let _;e[41]!==z||e[42]!==i.isPending?(_=t.jsxs(I,{children:[C,t.jsx(L,{onClick:z,disabled:i.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[41]=z,e[42]=i.isPending,e[43]=_):_=e[43];let v;e[44]!==j||e[45]!==_?(v=t.jsxs(q,{children:[j,_]}),e[44]=j,e[45]=_,e[46]=v):v=e[46];let b;e[47]!==P||e[48]!==v?(b=t.jsx(G,{open:P,onOpenChange:S,children:v}),e[47]=P,e[48]=v,e[49]=b):b=e[49];let k;return e[50]!==h||e[51]!==b?(k=t.jsxs(t.Fragment,{children:[h,b]}),e[50]=h,e[51]=b,e[52]=k):k=e[52],k}function re(a){return a.stopPropagation()}function ie(a){return a.stopPropagation()}function oe(a){const e=E.c(4),{triggerCount:s,nextRunAt:n}=a;if(s===0){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("span",{className:"text-xs text-muted-foreground",children:"No triggers configured"}),e[0]=i):i=e[0],i}let r;return e[1]!==n||e[2]!==s?(r=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:n?t.jsxs(t.Fragment,{children:[t.jsx(Y,{size:12,className:"shrink-0"}),t.jsxs("span",{className:"truncate",children:["Next run ",new Date(n).toLocaleString()]})]}):t.jsxs(t.Fragment,{children:[t.jsx(te,{size:12,className:"shrink-0"}),t.jsxs("span",{className:"truncate",children:[s," trigger",s===1?"":"s"]})]})}),e[1]=n,e[2]=s,e[3]=r):r=e[3],r}export{pe as A};
|