decocms 4.91.13 → 4.91.14
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-bnM-AHGO.js → AlertCircle-CCUF_XuW.js} +1 -1
- package/dist/client/assets/{AreaChart-CGniEng_.js → AreaChart-CiTvN28x.js} +1 -1
- package/dist/client/assets/{ArrowUp-E_r50_2m.js → ArrowUp-XMHMf5NX.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CTGmCwuB.js → ArrowUpRight-CulDaftm.js} +1 -1
- package/dist/client/assets/{CheckCircle-BFjklaOK.js → CheckCircle-CgjhY5LV.js} +1 -1
- package/dist/client/assets/{ChevronDown-CKv359F0.js → ChevronDown-BdTsPAgK.js} +1 -1
- package/dist/client/assets/{ChevronRight-CfjLE0HN.js → ChevronRight-DvmMl5CO.js} +1 -1
- package/dist/client/assets/{ChevronUp-BXnZQZ3H.js → ChevronUp-23IlzYtn.js} +1 -1
- package/dist/client/assets/{Copy01-DKZgR_7b.js → Copy01-BlIndlqs.js} +1 -1
- package/dist/client/assets/{DotsVertical-C4_fm4pn.js → DotsVertical-DzHDFq3H.js} +1 -1
- package/dist/client/assets/{Eye-CAFwHWrY.js → Eye-CmkvvMJU.js} +1 -1
- package/dist/client/assets/{FilterLines-BDXLhdvw.js → FilterLines-Bq_sjxay.js} +1 -1
- package/dist/client/assets/{Globe01-BQUa9MmI.js → Globe01-DcHzoJQD.js} +1 -1
- package/dist/client/assets/{Globe04-CiV5sfOt.js → Globe04-CpAagNOi.js} +1 -1
- package/dist/client/assets/{HardDrive-CZUPAV8x.js → HardDrive-DL8DXGjP.js} +1 -1
- package/dist/client/assets/{Image01-CKQwIs-X.js → Image01-DNtfT2gX.js} +1 -1
- package/dist/client/assets/{Key01-6U7RTmt2.js → Key01-DFY_1p6Q.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Dk_UeFQQ.js → LayoutLeft-D-8uUtX2.js} +1 -1
- package/dist/client/assets/{LinkExternal01-cD5Jzz7-.js → LinkExternal01-BmGqRqxF.js} +1 -1
- package/dist/client/assets/{Monitor01-BgKfGb_C.js → Monitor01-gCEuyi8R.js} +1 -1
- package/dist/client/assets/{Package-BF9Ikoon.js → Package-BKvFItpV.js} +1 -1
- package/dist/client/assets/{Palette-CwbAfJE1.js → Palette-BXzBCNun.js} +1 -1
- package/dist/client/assets/{Play-CcnUngDU.js → Play-DbYR4iOw.js} +1 -1
- package/dist/client/assets/{Plus-Da7EO9JW.js → Plus-CK94CEsU.js} +1 -1
- package/dist/client/assets/{SearchLg-BU9kkayS.js → SearchLg-BNFB42Cs.js} +1 -1
- package/dist/client/assets/{SearchMd-DvFCXO2G.js → SearchMd-C_WdnlmY.js} +1 -1
- package/dist/client/assets/{Settings02-DKg6N4zo.js → Settings02-BVZvtWQu.js} +1 -1
- package/dist/client/assets/{Shield01-Cvfb7wza.js → Shield01-yuD8d9-p.js} +1 -1
- package/dist/client/assets/{Star01-BaOZVkLR.js → Star01-BkNoZV_i.js} +1 -1
- package/dist/client/assets/{Stars01-BCzbdnTA.js → Stars01-CV4R-XDO.js} +1 -1
- package/dist/client/assets/{Stars02-DC2mUh1c.js → Stars02-P4nZ_weV.js} +1 -1
- package/dist/client/assets/{Sun-D9Vmvb3x.js → Sun-DiyNo2lw.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CIB6pEiS.js → SwitchHorizontal01-DguNdC4X.js} +1 -1
- package/dist/client/assets/{Tool01-FIiY7fJ0.js → Tool01-E91EpoBh.js} +1 -1
- package/dist/client/assets/{Tool02-B5Nxme6Y.js → Tool02-RHf44CyL.js} +1 -1
- package/dist/client/assets/{Trash01-DgMONZbo.js → Trash01-OO3-m6FX.js} +1 -1
- package/dist/client/assets/{TrendUp01-AEVL9FCI.js → TrendUp01-BDO-ijTU.js} +1 -1
- package/dist/client/assets/{Upload01-txM4Ed1z.js → Upload01-BEplV68h.js} +1 -1
- package/dist/client/assets/{User01-CB_k4B4C.js → User01-DF_Okkym.js} +1 -1
- package/dist/client/assets/{Users01-BBF6f3lO.js → Users01-Q3ji40Gv.js} +1 -1
- package/dist/client/assets/{Users03-DlrfEd_j.js → Users03-DjEOCShP.js} +1 -1
- package/dist/client/assets/{X-0zKy4PV1.js → X-D35fx72_.js} +1 -1
- package/dist/client/assets/{XCircle-DjghKaHD.js → XCircle-CojucSdj.js} +1 -1
- package/dist/client/assets/{XClose-BG6EvGbU.js → XClose-BkRuy288.js} +1 -1
- package/dist/client/assets/{Zap-B5UqaMnU.js → Zap-CnvEXzkh.js} +1 -1
- package/dist/client/assets/{ZapSquare-zQFlsNS9.js → ZapSquare-fxgfjGhg.js} +1 -1
- package/dist/client/assets/{ZoomOut-D9TWERka.js → ZoomOut-CVlucFEX.js} +1 -1
- package/dist/client/assets/{access-gate-DNm2pSsB.js → access-gate-DcuMnt1p.js} +1 -1
- package/dist/client/assets/{add-section-modal-C6oyMnRD.js → add-section-modal-D9u-YPZR.js} +1 -1
- package/dist/client/assets/{agent-icon-ChVtquyW.js → agent-icon-D2e2QBB1.js} +1 -1
- package/dist/client/assets/{agents-list-n8Ok0pCB.js → agents-list-VMqQlVAp.js} +1 -1
- package/dist/client/assets/{ai-providers-u4zyABCa.js → ai-providers-BTzVbNxU.js} +1 -1
- package/dist/client/assets/{alert-Ctnn2jSu.js → alert-Cc7NhQ7O.js} +1 -1
- package/dist/client/assets/{alert-dialog-rb3D-dE0.js → alert-dialog-CmL22KHv.js} +1 -1
- package/dist/client/assets/{app-editor-C-RUfofU.js → app-editor-BodsxuiO.js} +1 -1
- package/dist/client/assets/{auth-luIK0osn.js → auth-66-GYBbr.js} +1 -1
- package/dist/client/assets/{auth-catchall-5fvS4lvO.js → auth-catchall-CNkSdu4B.js} +1 -1
- package/dist/client/assets/{auth-entry-DEUjBQ6l.js → auth-entry-BqwEGGAw.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Bo0-zDty.js → auth-split-layout-CtAjLOHF.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-D7ClJY6z.js → authenticate-and-persist-oauth-DQAlxYgg.js} +1 -1
- package/dist/client/assets/{automation-list-row-B5YVrOQp.js → automation-list-row-UsDDWsPu.js} +1 -1
- package/dist/client/assets/{automation-runs-97vVniQB.js → automation-runs-CXgmhVTJ.js} +1 -1
- package/dist/client/assets/{automations-Bm2fQrjW.js → automations-D69jf7vS.js} +1 -1
- package/dist/client/assets/{autosend-DdGcTLBu.js → autosend-CTZjZEhW.js} +1 -1
- package/dist/client/assets/{avatar-BaV7IKOZ.js → avatar-LDCW6Mz2.js} +1 -1
- package/dist/client/assets/{badge-9gxuzEJo.js → badge-BNyK1y0a.js} +1 -1
- package/dist/client/assets/{block-document-BchBm-h5.js → block-document-DgCyX3vF.js} +1 -1
- package/dist/client/assets/{brand-context-UEw9ESFM.js → brand-context-BrFc719O.js} +1 -1
- package/dist/client/assets/{buckets-FeAEzHbt.js → buckets-BicHAC_G.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-B45xJdB8.js → bulk-category-panel-BOIvD1bU.js} +1 -1
- package/dist/client/assets/{calendar-CYKpLEK4.js → calendar-DeVM_dni.js} +1 -1
- package/dist/client/assets/{capability-load-error-BWNm8Vlx.js → capability-load-error-BGqwXHSj.js} +1 -1
- package/dist/client/assets/{card-DzAexHYy.js → card-C4ZWH40G.js} +1 -1
- package/dist/client/assets/{category-editor-CocYKaDk.js → category-editor--QFMOwHw.js} +1 -1
- package/dist/client/assets/{chat-context-c0BhAQmo.js → chat-context-DAFqf_qw.js} +1 -1
- package/dist/client/assets/{checkbox-_NM5O-zb.js → checkbox-ByfFQKlh.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CORojAqv.js → cli-auth-success-BTwKEqV6.js} +1 -1
- package/dist/client/assets/{collection-detail-DLEcUL_1.js → collection-detail-BZxuqZjq.js} +1 -1
- package/dist/client/assets/{collection-display-button-K4BxMYlM.js → collection-display-button-C1CaP06H.js} +1 -1
- package/dist/client/assets/{collection-search-Dt7NiO4g.js → collection-search-BcspU3mL.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BCkvrjfu.js → collection-table-wrapper-DH1mpBxF.js} +1 -1
- package/dist/client/assets/{collection-tabs-BwZkgBbZ.js → collection-tabs-BRpMNGF_.js} +1 -1
- package/dist/client/assets/{command-Bqg8EvQe.js → command-B3C9BUxG.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-Dr2cXHZ5.js → commerce-onboarding-Bt1tmnvE.js} +1 -1
- package/dist/client/assets/{companions-core-B0Eh3Zr_.js → companions-core-B0i6M8LX.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-BOIK_vOw.js → connect-desktop-dialog-CPDYqOIO.js} +1 -1
- package/dist/client/assets/{connection-card-BUL5tgWk.js → connection-card-B2KjgDLz.js} +1 -1
- package/dist/client/assets/{connection-detail-B9bFwLTL.js → connection-detail-B5iDIVR0.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Du1LFZ4M.js → connection-form-helpers-CI2WGLeM.js} +1 -1
- package/dist/client/assets/{connections-C2EGW46B.js → connections-B0A_pL5X.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-BVHOHmrO.js → decopilot-sse-pool-Dqj5rGFR.js} +1 -1
- package/dist/client/assets/{dialog-DxYV-693.js → dialog-DHtGP2_0.js} +1 -1
- package/dist/client/assets/{domain-settings-DEC2NMgK.js → domain-settings-Cp5AAAIN.js} +1 -1
- package/dist/client/assets/{drawer-qstCMw0Q.js → drawer-HlSSIaGJ.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BQ-1kZyc.js → dropdown-menu-CCC918Az.js} +1 -1
- package/dist/client/assets/{empty-state-lR_3kEW4.js → empty-state-TSLblvfQ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DardgW4l.js → extract-connection-data-DZgddUX_.js} +1 -1
- package/dist/client/assets/{file-explorer-ClqxSbDP.js → file-explorer-sKQvQShM.js} +1 -1
- package/dist/client/assets/{file-type-icon-AZuZgEJR.js → file-type-icon-CUH8B6VY.js} +1 -1
- package/dist/client/assets/{files-DwiZbIlf.js → files-BR4AgWk2.js} +1 -1
- package/dist/client/assets/{form-B5_Adu-q.js → form-cDRAVeHW.js} +1 -1
- package/dist/client/assets/{general-DNgnDbjf.js → general-DkJUOx9L.js} +1 -1
- package/dist/client/assets/{github-repo-picker-Cwo2CoXO.js → github-repo-picker-C78xjpQs.js} +1 -1
- package/dist/client/assets/{hooks-BQfoSwJf.js → hooks-_IqTFAeZ.js} +1 -1
- package/dist/client/assets/{index-BMMnZ_kU.js → index-4eRsB-gF.js} +3 -3
- package/dist/client/assets/{index-c2qA4sKG.js → index-9fHlVkbA.js} +1 -1
- package/dist/client/assets/{index-DYw7vW9h.js → index-BEFpYLNA.js} +1 -1
- package/dist/client/assets/{index-B2bEP20q.js → index-BxyQm-nC.js} +1 -1
- package/dist/client/assets/{index-DT2lJEWW.js → index-C0gHdBxt.js} +1 -1
- package/dist/client/assets/{index--7Dl1ohP.js → index-CYXOBHRZ.js} +1 -1
- package/dist/client/assets/{index-Cfp3S5Yv.js → index-C_9AFxZZ.js} +1 -1
- package/dist/client/assets/{index-6l6Vg_pR.js → index-CapCxJmU.js} +2 -2
- package/dist/client/assets/{index-jM9Hlwh7.js → index-DAYR4hg2.js} +1 -1
- package/dist/client/assets/{index-D6ohfUq5.js → index-DB8AYrpb.js} +1 -1
- package/dist/client/assets/{index-CJFz8vjp.js → index-DkPlxpvw.js} +1 -1
- package/dist/client/assets/{index-ClyjgNfZ.js → index-jvtzNZaa.js} +1 -1
- package/dist/client/assets/{index-redirect-C4H2Dlej.js → index-redirect-TjXfO3wJ.js} +1 -1
- package/dist/client/assets/{index-bi_pNNOI.js → index-uXx4e0of.js} +1 -1
- package/dist/client/assets/{index-CihUyKVR.js → index-vsP1G6SZ.js} +26 -26
- package/dist/client/assets/{input-DO3omnvV.js → input-ayo3U7sh.js} +1 -1
- package/dist/client/assets/{integration-icon-CWW8IWzL.js → integration-icon-C1gJn4hg.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-sm_KAm4G.js → invite-member-dialog-B3uyGTwe.js} +1 -1
- package/dist/client/assets/{label-mmWPkvpb.js → label-BlwFNI65.js} +1 -1
- package/dist/client/assets/{layout-C13m1wsi.js → layout-BAN6T68Y.js} +1 -1
- package/dist/client/assets/{login-LUR3adNp.js → login-CllD9M5X.js} +1 -1
- package/dist/client/assets/{mcp-oauth-D9VV6Aqh.js → mcp-oauth-D5-UtR0Q.js} +1 -1
- package/dist/client/assets/{members-DKAWzcSX.js → members-D23qOH7j.js} +1 -1
- package/dist/client/assets/{monaco-editor-B_E5AYPW.js → monaco-editor-CNc5euhy.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BQYwpxkV.js → monitoring-stats-row-CK2-xhFz.js} +1 -1
- package/dist/client/assets/{multi-select-C7fvK2JO.js → multi-select-C1pdnoxa.js} +1 -1
- package/dist/client/assets/{oauth-callback-Ca0dVhMs.js → oauth-callback-DRvOqsGW.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-gF8yTd3P.js → oauth-callback-ai-provider-BbHeaugk.js} +1 -1
- package/dist/client/assets/{onboarding-D-7ZuKQ1.js → onboarding-aA7LUKwm.js} +1 -1
- package/dist/client/assets/{org-install-BFIHP6cl.js → org-install-CHF7zTD9.js} +1 -1
- package/dist/client/assets/{org-layout-CqSGObQ4.js → org-layout-BLMmveG9.js} +1 -1
- package/dist/client/assets/{organization-choice-DImju8iJ.js → organization-choice-CH8YPhT6.js} +1 -1
- package/dist/client/assets/{orgs-DdB2tyjf.js → orgs-DwMqD5nV.js} +1 -1
- package/dist/client/assets/{page-seo-form-EY2163Cy.js → page-seo-form-h4FV1nE4.js} +1 -1
- package/dist/client/assets/page-seo-sheet-DnPdyJ9Q.js +1 -0
- package/dist/client/assets/{popover-C0PapJhm.js → popover-GjdJSxox.js} +1 -1
- package/dist/client/assets/{post-editor-B-mGeKuB.js → post-editor-ClGI47T2.js} +1 -1
- package/dist/client/assets/{primitives-DGrpSRc_.js → primitives-Csbhbb3h.js} +1 -1
- package/dist/client/assets/{profile-D_8r6z9t.js → profile-JhlXD43h.js} +1 -1
- package/dist/client/assets/project-app-view-D-9EZSjz.js +1 -0
- package/dist/client/assets/record-editor-Daa9qbqc.js +1 -0
- package/dist/client/assets/redirect-editor-PNb0XSJu.js +1 -0
- package/dist/client/assets/registry-BYt-9hub.js +2 -0
- package/dist/client/assets/{registry-layout-hZdz6-kf.js → registry-layout-CEjZNKDB.js} +2 -2
- package/dist/client/assets/{reports-DH7IjchR.js → reports-D5C_GZQ1.js} +1 -1
- package/dist/client/assets/{require-capability-ujl9whCj.js → require-capability-DNhHdSxp.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Gxfgdr_y.js → required-auth-layout-COkLhCW3.js} +1 -1
- package/dist/client/assets/{reset-password-BGTbATLO.js → reset-password-D6vmpAFH.js} +1 -1
- package/dist/client/assets/{roles-CWdkMWX4.js → roles-BucHwHOx.js} +1 -1
- package/dist/client/assets/{search-input-B7BOe7-Z.js → search-input-B90izymr.js} +1 -1
- package/dist/client/assets/{secrets-BOQDu26Y.js → secrets-fT3Iu8Ly.js} +1 -1
- package/dist/client/assets/{sections-editor-D8ChFJlB.js → sections-editor-BVrHj0BB.js} +1 -1
- package/dist/client/assets/{select-model-D4cfbFuD.js → select-model-B0nHmf5G.js} +1 -1
- package/dist/client/assets/{select-CEjAa51v.js → select-oxL9WRIL.js} +1 -1
- package/dist/client/assets/{self-tool-result-Cstm1W5n.js → self-tool-result-Ci77spLB.js} +1 -1
- package/dist/client/assets/{seo-editor-CO_OqtSk.js → seo-editor-BR6UJP3P.js} +1 -1
- package/dist/client/assets/{settings-layout-B2-ZFvIt.js → settings-layout-BO1ScU8J.js} +1 -1
- package/dist/client/assets/{settings-section-DgtumuNO.js → settings-section-BGZ9zUOY.js} +1 -1
- package/dist/client/assets/{shell-controls-DwnH84JX.js → shell-controls-DR8RyrHT.js} +1 -1
- package/dist/client/assets/{shell-layout-DKSoLsMT.js → shell-layout-DpbKAOOY.js} +1 -1
- package/dist/client/assets/{sidebar-BKJHes1N.js → sidebar-B8VI0F1o.js} +1 -1
- package/dist/client/assets/{skeleton-DRYlvCM9.js → skeleton-hdsZcLHq.js} +1 -1
- package/dist/client/assets/{sso-TrdYZ9Fq.js → sso-CMx79Evx.js} +1 -1
- package/dist/client/assets/{store-B4jbgj1-.js → store-B1JGoj7V.js} +1 -1
- package/dist/client/assets/store-registry-D1GRz-k9.js +2 -0
- package/dist/client/assets/{studio-tools-B-Eij61m.js → studio-tools-C-bQCeyt.js} +1 -1
- package/dist/client/assets/{switch-Cu3VZitj.js → switch-DUy0Gj_r.js} +1 -1
- package/dist/client/assets/{table-Cms01M2Z.js → table-CZ8P660M.js} +1 -1
- package/dist/client/assets/{tabs-C49u88u9.js → tabs-BtYZ1LGW.js} +1 -1
- package/dist/client/assets/{textarea-B35vZ5jN.js → textarea-rmZE0H3k.js} +1 -1
- package/dist/client/assets/{toggle-group-CNog9xMD.js → toggle-group-Dd8IOp9E.js} +1 -1
- package/dist/client/assets/{toolbar-BjEknNG8.js → toolbar-DubwFPe8.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BzzPGdXN.js → toolbar-icon-button-B_ORIp-S.js} +1 -1
- package/dist/client/assets/{tooltip-DGjRuZi1.js → tooltip-C1cD8Sc6.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CCC_yTQZ.js → use-ai-providers-DCkSfBDP.js} +1 -1
- package/dist/client/assets/{use-automations-Dph6FubM.js → use-automations-CXDooqbm.js} +1 -1
- package/dist/client/assets/{use-autosave-CKvDGvgJ.js → use-autosave-DvH56XrT.js} +1 -1
- package/dist/client/assets/{use-capability-CXQN2i28.js → use-capability-BlrxQbdv.js} +1 -1
- package/dist/client/assets/{use-clock-tick-qyYcZOnR.js → use-clock-tick-CSjfTF9b.js} +1 -1
- package/dist/client/assets/{use-collections-DfM_LEkP.js → use-collections-AhV87eUr.js} +1 -1
- package/dist/client/assets/{use-connection-Dtoxwk_v.js → use-connection-D0hZ47dS.js} +1 -1
- package/dist/client/assets/{use-copy-BVQGJ-sy.js → use-copy-BR9rnVF4.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-B0P7lyB0.js → use-create-virtual-mcp-C8G-4mSd.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DDMvbPZQ.js → use-debounced-autosave-BFdr5DmL.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CraLUb40.js → use-debounced-value-CMrQYSTa.js} +1 -1
- package/dist/client/assets/{use-deco-credits-NTd3RI-N.js → use-deco-credits-BDmu2BAQ.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DATU1apS.js → use-decopilot-events-DOD-ldp6.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B6u81CNj.js → use-delete-connection-TNQOz4Cp.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Crqnw_bw.js → use-deployment-admin-qAvIBTn3.js} +1 -1
- package/dist/client/assets/{use-file-configs-wYzg3Q9h.js → use-file-configs-d1aTDG0S.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BQKuGeZW.js → use-infinite-scroll-BhCCaRZ7.js} +1 -1
- package/dist/client/assets/{use-join-requests-BvTFETm1.js → use-join-requests-CMVSNzu-.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-C9F7z-xG.js → use-mcp-auth-status-CNLg2QyJ.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BdvBykSl.js → use-mcp-client-DnL1UNwa.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DwILy75s.js → use-mcp-tools-BMqzOiRo.js} +1 -1
- package/dist/client/assets/{use-members-D4YLs-Jc.js → use-members-OyuFjG7a.js} +1 -1
- package/dist/client/assets/{use-mobile-Bef-oAkh.js → use-mobile-1PYH84OQ.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DC4DOTvY.js → use-navigate-to-agent-0sYVTcXy.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BzbwdJQH.js → use-org-auth-client-our-cxrQ.js} +1 -1
- package/dist/client/assets/{use-org-sso-CAvXAkMi.js → use-org-sso-CUFmDoiK.js} +1 -1
- package/dist/client/assets/{use-organization-roles-B-rkna0z.js → use-organization-roles-Ywh7yK_C.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DR8jU_IF.js → use-organization-settings-Dx5zagT5.js} +1 -1
- package/dist/client/assets/{use-registry-app-S0Rojzrq.js → use-registry-app-DPxlww3C.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BtFws4Kn.js → use-registry-connections-Yim42h1n.js} +1 -1
- package/dist/client/assets/{use-secrets-CnOAKTMF.js → use-secrets-BZLWYp3S.js} +1 -1
- package/dist/client/assets/{use-status-sounds-SizlMvIJ.js → use-status-sounds-DT4X3d3a.js} +1 -1
- package/dist/client/assets/{use-t-BPFwceba.js → use-t-BS6gqmaN.js} +1 -1
- package/dist/client/assets/{use-view-mode-r4kmYloh.js → use-view-mode-DHjW6p4y.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CLPxduRS.js → use-virtual-mcp-YacCwJ34.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Bfn6e9xV.js +1 -0
- package/dist/client/assets/{useRouterState-_1Yy5uzx.js → useRouterState-mm7RWa3z.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Dv_Qaxna.js +1 -0
- package/dist/client/assets/{users-Cv8m_7pY.js → users-CDBIlkmi.js} +1 -1
- package/dist/client/assets/{variant-calendar-nyB4vBQj.js → variant-calendar-eAdLi_eH.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-D5W0l3in.js → view-mode-toggle-BnOl_o6-.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/page-seo-sheet-B4HcV4Jn.js +0 -1
- package/dist/client/assets/project-app-view-Cn_d_3a6.js +0 -1
- package/dist/client/assets/record-editor-BNzZA8dM.js +0 -1
- package/dist/client/assets/redirect-editor-u8-hgrCH.js +0 -1
- package/dist/client/assets/registry-A1ZQQvEy.js +0 -2
- package/dist/client/assets/store-registry-DQ7yErTg.js +0 -2
- package/dist/client/assets/useInfiniteQuery-CTHi40J6.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-7sOHoy9i.js +0 -1
package/dist/client/assets/{github-repo-picker-Cwo2CoXO.js → github-repo-picker-C78xjpQs.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as B,a as Y,n as $,r as T,ac as H,c as R,j as t,i as z,d as Q,t as O,dF as W,K as G,m as X,B as Z,l as F,v as ee,w as te}from"./index-BMMnZ_kU.js";import{D as ne,a as se,d as oe,e as ie}from"./dialog-DxYV-693.js";import{C as re}from"./collection-search-Dt7NiO4g.js";import{u as le}from"./use-debounced-value-CraLUb40.js";import{b as M,u as ae}from"./use-connection-Dtoxwk_v.js";import{u as U,S as V}from"./use-mcp-client-BdvBykSl.js";import{a as K}from"./authenticate-and-persist-oauth-D7ClJY6z.js";import{b as J}from"./Settings02-DKg6N4zo.js";import{L as ce}from"./agent-icon-ChVtquyW.js";import{u as ue,G as P}from"./use-registry-app-S0Rojzrq.js";import{e as de}from"./extract-connection-data-DardgW4l.js";import{c as me}from"./use-navigate-to-agent-DC4DOTvY.js";import{p as q,f as fe}from"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import{g as xe}from"./github-repo-scope-DjMZbiKa.js";const ge="deco/mcp-github";function he(N){const{org:e}=B(),{data:i}=Y.useSession(),f=M(),v=$(),[g,s]=T.useState("idle"),[h,x]=T.useState(null),[p,C]=T.useState(null),{data:b,isLoading:l}=ue(ge,{enabled:N.enabled}),o=T.useRef(!1);N.enabled&&b&&!l&&!o.current&&i?.user?.id&&g==="idle"&&(o.current=!0,a());async function a(){if(!(!b||!i?.user?.id||!e))try{s("installing"),x(null);const r=de(b,e.id,i.user.id,{remoteIndex:0});if(!r.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:y}=await f.create.mutateAsync(r);s("authenticating");const d=await K({connectionId:y,orgId:e.id,orgSlug:e.slug,persistFallback:n=>f.update.mutateAsync({id:y,data:{connection_token:n}}).then(()=>{})});if(d.ran&&!d.ok){try{await f.delete.mutateAsync(y)}catch{}throw new Error(d.error&&d.error!=="no token received"?d.error:"No token received from GitHub")}H(v,e.id),C(r),s("ready")}catch(r){x(r instanceof Error?r.message:String(r)),s("error")}}function c(){s("idle"),x(null),C(null),o.current=!1}return N.enabled&&l&&g==="idle"?{status:"installing",error:null,connection:null,retry:c}:{status:g,error:h,connection:p,retry:c}}function Oe(N){const e=R.c(22),{open:i,onOpenChange:f,title:v,onImportComplete:g,mode:s}=N,h=s===void 0?"agent":s,x=v??(h==="connection"?"Add repo":"Import from GitHub"),[p,C]=T.useState(null);let b;e[0]!==x?(b=t.jsx(ne,{className:"sr-only",children:t.jsx(se,{children:x})}),e[0]=x,e[1]=b):b=e[1];let l;e[2]!==x||e[3]!==p?(l=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:p?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>C(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(J,{size:16})}),t.jsx("img",{src:p.avatarUrl,alt:p.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:p.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(P,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:x})]})}),e[2]=x,e[3]=p,e[4]=l):l=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=o):o=e[5];let a;e[6]!==f?(a=()=>f(!1),e[6]=f,e[7]=a):a=e[7];let c;e[8]!==h||e[9]!==g||e[10]!==i||e[11]!==p||e[12]!==a?(c=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(T.Suspense,{fallback:o,children:t.jsx(pe,{open:i,onComplete:a,selectedInstallation:p,onSelectInstallation:C,onImportComplete:g,mode:h})})}),e[8]=h,e[9]=g,e[10]=i,e[11]=p,e[12]=a,e[13]=c):c=e[13];let r;e[14]!==b||e[15]!==l||e[16]!==c?(r=t.jsxs(oe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[b,l,c]}),e[14]=b,e[15]=l,e[16]=c,e[17]=r):r=e[17];let u;return e[18]!==f||e[19]!==i||e[20]!==r?(u=t.jsx(ie,{open:i,onOpenChange:f,children:r}),e[18]=f,e[19]=i,e[20]=r,e[21]=u):u=e[21],u}function pe({open:N,onComplete:e,selectedInstallation:i,onSelectInstallation:f,onImportComplete:v,mode:g="agent"}){const{org:s}=B(),h=$(),x=me(),[p,C]=T.useState(null),b=ae({slug:"mcp-github"}),l=xe(b),o=he({enabled:N&&l.length===0}),a=l.length===1?l[0]??null:p,c=U({connectionId:a?.id??"",orgId:s.id,orgSlug:s.slug}),r=U({connectionId:V,orgId:s.id,orgSlug:s.slug}),u=async(n,j)=>{try{const k=await c.callTool({name:"get_file_contents",arguments:{owner:n.owner,repo:n.name,path:j}});if(k.isError)return null;const I=k.content?.find(m=>m.type==="resource")?.resource?.text;if(!I)return null;try{const m=JSON.parse(I);return typeof m=="string"?m:JSON.stringify(m)}catch{return I}}catch{return null}},y=(n,j)=>{Promise.all([u(j,"AGENTS.md"),u(j,"CLAUDE.md")]).then(async([S,k])=>{const w=S??k??null;w&&(await r.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:n,data:{metadata:{instructions:w}}}}),H(h,s.id))}).catch(S=>{console.error("GitHub instructions fetch failed:",S)})},d=Q({mutationFn:async n=>{if(!a||!i)throw new Error("No GitHub connection or installation");const j=i.installationId;if(g==="connection"){const{childConnectionId:w}=await q({orgSlug:s.slug,sourceConnection:a,installationId:j,owner:n.owner,repo:n.name,githubCallTool:I=>c.callTool(I),selfCallTool:I=>r.callTool(I),orgShared:!0});return{virtualMcpId:null,repo:n,connectionId:w,item:null}}const{childConnectionId:S}=await q({orgSlug:s.slug,sourceConnection:a,installationId:j,owner:n.owner,repo:n.name,githubCallTool:w=>c.callTool(w),selfCallTool:w=>r.callTool(w)});let k=null;try{const w=await r.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:n.name,description:n.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:n.owner,name:n.name,url:n.url,installationId:j,connectionId:S},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:S}]}}}),I=w.structuredContent??w,m=I.item?.id;if(!I.item||!m)throw new Error("Failed to create the imported agent");return k=m,{virtualMcpId:m,repo:n,connectionId:S,item:I.item}}catch(w){throw k&&await r.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:k}}).catch(()=>{}),await r.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:S,force:!0}}).catch(()=>{}),w}},onSuccess:({virtualMcpId:n,repo:j,connectionId:S,item:k})=>{if(g==="connection"||!n||!k){H(h,s.id),W(h,s.id),O.success(`Added ${j.name}`),e();return}if(h.setQueryData(G.collectionItem(r,s.id,"","VIRTUAL_MCP",n),{item:k}),H(h,s.id),y(n,j),v){v({virtualMcpId:n,repo:j,connectionId:S});return}O.success(`Imported ${j.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),x(n)},onError:n=>{O.error("Failed to import repo: "+(n instanceof Error?n.message:"Unknown error"))}});return o.status==="installing"||o.status==="authenticating"?t.jsx(D,{status:o.status,error:null,retry:o.retry}):o.status==="error"?t.jsx(D,{status:"error",error:o.error,retry:o.retry}):l.length===0&&o.status==="idle"?t.jsx(D,{status:"installing",error:null,retry:o.retry}):l.length>1&&!a?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),l.map(n=>t.jsxs("button",{type:"button",onClick:()=>C(n),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[n.icon?t.jsx("img",{src:n.icon,alt:n.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(P,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:n.title})]},n.id))]}):a?i?t.jsx(Ne,{connectionId:a.id,orgId:s.id,orgSlug:s.slug,installation:i,onSelectRepo:n=>d.mutate(n),isSaving:d.isPending}):t.jsx(be,{connectionId:a.id,orgId:s.id,orgSlug:s.slug,onSelect:f,showBackButton:l.length>1,onBack:()=>C(null)}):null}function be(N){const e=R.c(47),{connectionId:i,orgId:f,orgSlug:v,onSelect:g,showBackButton:s,onBack:h}=N;let x;e[0]!==f||e[1]!==v?(x={connectionId:V,orgId:f,orgSlug:v},e[0]=f,e[1]=v,e[2]=x):x=e[2];const p=U(x),C=$(),b=M();let l;e[3]!==i||e[4]!==f?(l=G.githubUserOrgs(f,i),e[3]=i,e[4]=f,e[5]=l):l=e[5];let o;e[6]!==i||e[7]!==p?(o=()=>fe(m=>p.callTool(m),i),e[6]=i,e[7]=p,e[8]=o):o=e[8];let a;e[9]!==l||e[10]!==o?(a={queryKey:l,queryFn:o},e[9]=l,e[10]=o,e[11]=a):a=e[11];const c=X(a);let r;e[12]!==b||e[13]!==i||e[14]!==c||e[15]!==f||e[16]!==v||e[17]!==C?(r={mutationFn:async()=>{const m=await K({connectionId:i,orgId:f,orgSlug:v,persistFallback:E=>b.update.mutateAsync({id:i,data:{connection_token:E}}).then(je)});if(m.ran&&!m.ok)throw new Error(m.error??"no token received");const _=new URL(`/api/${v}/mcp/${i}`,window.location.origin);await C.invalidateQueries({queryKey:G.isMCPAuthenticated(_.href,null)}),await C.invalidateQueries({queryKey:G.mcpClientPrefix()}),await c.refetch()},onError:ye},e[12]=b,e[13]=i,e[14]=c,e[15]=f,e[16]=v,e[17]=C,e[18]=r):r=e[18];const u=Q(r);if(c.isLoading){let m;return e[19]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[19]=m):m=e[19],m}if(c.isError){let m,_;e[20]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"}),_=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:"Your GitHub connection may have expired. Reconnect to restore access."}),e[20]=m,e[21]=_):(m=e[20],_=e[21]);let E;e[22]!==u?(E=()=>u.mutate(),e[22]=u,e[23]=E):E=e[23];let A;e[24]!==u.isPending?(A=u.isPending?t.jsx(z,{size:14,className:"animate-spin"}):t.jsx(P,{className:"size-3.5"}),e[24]=u.isPending,e[25]=A):A=e[25];let L;return e[26]!==u.isPending||e[27]!==E||e[28]!==A?(L=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[m,_,t.jsxs(Z,{type:"button",variant:"outline",size:"sm",onClick:E,disabled:u.isPending,children:[A,"Reconnect GitHub"]})]}),e[26]=u.isPending,e[27]=E,e[28]=A,e[29]=L):L=e[29],L}const y=c.data;if(!y)return null;let d;e[30]!==h||e[31]!==s?(d=s&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:h,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(J,{size:12}),"Change connection"]})}),e[30]=h,e[31]=s,e[32]=d):d=e[32];let n;if(e[33]!==y.installations||e[34]!==g){let m;e[36]!==g?(m=_=>t.jsxs("button",{type:"button",onClick:()=>g(_),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:_.avatarUrl,alt:_.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:_.login}),_.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},_.installationId),e[36]=g,e[37]=m):m=e[37],n=y.installations.map(m),e[33]=y.installations,e[34]=g,e[35]=n}else n=e[35];let j;e[38]!==n?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:n}),e[38]=n,e[39]=j):j=e[39];const S=y.appSlug?`https://github.com/apps/${y.appSlug}/installations/new`:"https://github.com/settings/installations";let k;e[40]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[40]=k):k=e[40];let w;e[41]!==S?(w=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",k]})}),e[41]=S,e[42]=w):w=e[42];let I;return e[43]!==w||e[44]!==d||e[45]!==j?(I=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[d,j,w]}),e[43]=w,e[44]=d,e[45]=j,e[46]=I):I=e[46],I}function ye(N){O.error("Failed to reconnect GitHub: "+(N instanceof Error?N.message:"Unknown error"))}function je(){}function Ne(N){const e=R.c(20),{connectionId:i,orgId:f,orgSlug:v,installation:g,onSelectRepo:s,isSaving:h}=N,[x,p]=T.useState(""),C=le(x,300),b=T.useDeferredValue(C),l=x!==b;let o;e[0]!==l||e[1]!==x?(o=t.jsx(re,{placeholder:"Search repositories...",value:x,onChange:p,isSearching:l}),e[0]=l,e[1]=x,e[2]=o):o=e[2];const a=l?"opacity-40":"opacity-100";let c;e[3]!==a?(c=F("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",a),e[3]=a,e[4]=c):c=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=r):r=e[5];let u;e[6]!==i||e[7]!==b||e[8]!==g||e[9]!==h||e[10]!==s||e[11]!==f||e[12]!==v?(u=t.jsx(T.Suspense,{fallback:r,children:t.jsx(ve,{connectionId:i,orgId:f,orgSlug:v,installation:g,query:b,onSelectRepo:s,isSaving:h})}),e[6]=i,e[7]=b,e[8]=g,e[9]=h,e[10]=s,e[11]=f,e[12]=v,e[13]=u):u=e[13];let y;e[14]!==c||e[15]!==u?(y=t.jsx("div",{className:c,children:u}),e[14]=c,e[15]=u,e[16]=y):y=e[16];let d;return e[17]!==o||e[18]!==y?(d=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[o,y]}),e[17]=o,e[18]=y,e[19]=d):d=e[19],d}function ve(N){const e=R.c(29),{connectionId:i,orgId:f,orgSlug:v,installation:g,query:s,onSelectRepo:h,isSaving:x}=N;let p;e[0]!==i||e[1]!==f||e[2]!==v?(p={connectionId:i,orgId:f,orgSlug:v},e[0]=i,e[1]=f,e[2]=v,e[3]=p):p=e[3];const C=U(p),b=g.type==="User"?"user":"org",l=s?`${b}:${g.login} ${s} in:name`:`${b}:${g.login}`;let o;e[4]!==i||e[5]!==g.login||e[6]!==f||e[7]!==s?(o=G.githubOrgRepos(f,i,g.login,s),e[4]=i,e[5]=g.login,e[6]=f,e[7]=s,e[8]=o):o=e[8];let a;e[9]!==C||e[10]!==l?(a=async d=>{const{signal:n}=d,S=(await C.callTool({name:"search_repositories",arguments:{query:l,page:1,perPage:30}},void 0,{signal:n})).content?.[0]?.text;if(!S)throw new Error("No response from search_repositories");return(JSON.parse(S).items??[]).map(we)},e[9]=C,e[10]=l,e[11]=a):a=e[11];let c;e[12]!==o||e[13]!==a?(c={queryKey:o,queryFn:a},e[12]=o,e[13]=a,e[14]=c):c=e[14];const{data:r}=ee(c);if(r.length===0){let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=d):d=e[15];let n;e[16]!==s?(n=s&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=s,e[17]=n):n=e[17];let j;return e[18]!==n?(j=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[d,n]}),e[18]=n,e[19]=j):j=e[19],j}let u;if(e[20]!==x||e[21]!==h||e[22]!==r){let d;e[24]!==x||e[25]!==h?(d=n=>t.jsxs("button",{type:"button",onClick:()=>h(n),disabled:x,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(P,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:n.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[n.private?t.jsx(te,{size:10}):t.jsx(ce,{size:10}),n.private?"Private":"Public"]})]},n.fullName),e[24]=x,e[25]=h,e[26]=d):d=e[26],u=r.map(d),e[20]=x,e[21]=h,e[22]=r,e[23]=u}else u=e[23];let y;return e[27]!==u?(y=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:u}),e[27]=u,e[28]=y):y=e[28],y}function we(N){return{name:N.name,fullName:N.full_name,owner:N.full_name.split("/")[0]??"",url:N.html_url,private:N.private,description:N.description,updatedAt:N.updated_at}}function D(N){const e=R.c(33),{status:i,error:f,retry:v}=N;if(i==="error"){let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(P,{className:"size-5 text-destructive"})}),e[0]=S):S=e[0];let k;e[1]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=k):k=e[1];const w=f??"Something went wrong while connecting to GitHub.";let I;e[2]!==w?(I=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:w})]}),e[2]=w,e[3]=I):I=e[3];let m;e[4]!==v?(m=t.jsx("button",{type:"button",onClick:v,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=v,e[5]=m):m=e[5];let _;return e[6]!==I||e[7]!==m?(_=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[S,I,m]}),e[6]=I,e[7]=m,e[8]=_):_=e[8],_}const g=i==="authenticating";let s;e[9]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(P,{className:"size-5 text-foreground"})}),e[9]=s):s=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsxs("div",{className:"relative size-10",children:[s,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=h):h=e[10];const x=g?"Authenticating with GitHub":"Setting up GitHub";let p;e[11]!==x?(p=t.jsx("p",{className:"text-sm font-medium",children:x}),e[11]=x,e[12]=p):p=e[12];const C=g?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let b;e[13]!==C?(b=t.jsx("p",{className:"text-xs text-muted-foreground",children:C}),e[13]=C,e[14]=b):b=e[14];let l;e[15]!==p||e[16]!==b?(l=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[p,b]}),e[15]=p,e[16]=b,e[17]=l):l=e[17];const o=g?"bg-muted-foreground/30":"bg-foreground animate-pulse";let a;e[18]!==o?(a=F("size-1.5 rounded-full",o),e[18]=o,e[19]=a):a=e[19];let c;e[20]!==a?(c=t.jsx("span",{className:a}),e[20]=a,e[21]=c):c=e[21];const r=g?"bg-foreground animate-pulse":"bg-muted-foreground/30";let u;e[22]!==r?(u=F("size-1.5 rounded-full",r),e[22]=r,e[23]=u):u=e[23];let y;e[24]!==u?(y=t.jsx("span",{className:u}),e[24]=u,e[25]=y):y=e[25];let d;e[26]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=d):d=e[26];let n;e[27]!==c||e[28]!==y?(n=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,y,d]}),e[27]=c,e[28]=y,e[29]=n):n=e[29];let j;return e[30]!==n||e[31]!==l?(j=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[h,l,n]}),e[30]=n,e[31]=l,e[32]=j):j=e[32],j}export{Oe as G,he as u};
|
|
1
|
+
import{C as B,a as Y,n as $,r as T,ac as H,c as R,j as t,i as z,d as M,t as O,dF as W,K as G,m as X,B as Z,l as F,v as ee,w as te}from"./index-4eRsB-gF.js";import{D as ne,a as se,d as oe,e as ie}from"./dialog-DHtGP2_0.js";import{C as re}from"./collection-search-BcspU3mL.js";import{u as le}from"./use-debounced-value-CMrQYSTa.js";import{b as Q,u as ae}from"./use-connection-D0hZ47dS.js";import{u as U,S as V}from"./use-mcp-client-DnL1UNwa.js";import{a as K}from"./authenticate-and-persist-oauth-DQAlxYgg.js";import{b as J}from"./Settings02-BVZvtWQu.js";import{M as ce}from"./agent-icon-D2e2QBB1.js";import{u as ue,G as P}from"./use-registry-app-DPxlww3C.js";import{e as de}from"./extract-connection-data-DZgddUX_.js";import{c as me}from"./use-navigate-to-agent-0sYVTcXy.js";import{p as q,f as fe}from"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import{g as xe}from"./github-repo-scope-DjMZbiKa.js";const ge="deco/mcp-github";function he(N){const{org:e}=B(),{data:i}=Y.useSession(),f=Q(),v=$(),[g,s]=T.useState("idle"),[h,x]=T.useState(null),[p,C]=T.useState(null),{data:b,isLoading:l}=ue(ge,{enabled:N.enabled}),o=T.useRef(!1);N.enabled&&b&&!l&&!o.current&&i?.user?.id&&g==="idle"&&(o.current=!0,a());async function a(){if(!(!b||!i?.user?.id||!e))try{s("installing"),x(null);const r=de(b,e.id,i.user.id,{remoteIndex:0});if(!r.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:y}=await f.create.mutateAsync(r);s("authenticating");const d=await K({connectionId:y,orgId:e.id,orgSlug:e.slug,persistFallback:n=>f.update.mutateAsync({id:y,data:{connection_token:n}}).then(()=>{})});if(d.ran&&!d.ok){try{await f.delete.mutateAsync(y)}catch{}throw new Error(d.error&&d.error!=="no token received"?d.error:"No token received from GitHub")}H(v,e.id),C(r),s("ready")}catch(r){x(r instanceof Error?r.message:String(r)),s("error")}}function c(){s("idle"),x(null),C(null),o.current=!1}return N.enabled&&l&&g==="idle"?{status:"installing",error:null,connection:null,retry:c}:{status:g,error:h,connection:p,retry:c}}function Oe(N){const e=R.c(22),{open:i,onOpenChange:f,title:v,onImportComplete:g,mode:s}=N,h=s===void 0?"agent":s,x=v??(h==="connection"?"Add repo":"Import from GitHub"),[p,C]=T.useState(null);let b;e[0]!==x?(b=t.jsx(ne,{className:"sr-only",children:t.jsx(se,{children:x})}),e[0]=x,e[1]=b):b=e[1];let l;e[2]!==x||e[3]!==p?(l=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:p?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>C(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(J,{size:16})}),t.jsx("img",{src:p.avatarUrl,alt:p.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:p.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(P,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:x})]})}),e[2]=x,e[3]=p,e[4]=l):l=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=o):o=e[5];let a;e[6]!==f?(a=()=>f(!1),e[6]=f,e[7]=a):a=e[7];let c;e[8]!==h||e[9]!==g||e[10]!==i||e[11]!==p||e[12]!==a?(c=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(T.Suspense,{fallback:o,children:t.jsx(pe,{open:i,onComplete:a,selectedInstallation:p,onSelectInstallation:C,onImportComplete:g,mode:h})})}),e[8]=h,e[9]=g,e[10]=i,e[11]=p,e[12]=a,e[13]=c):c=e[13];let r;e[14]!==b||e[15]!==l||e[16]!==c?(r=t.jsxs(oe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[b,l,c]}),e[14]=b,e[15]=l,e[16]=c,e[17]=r):r=e[17];let u;return e[18]!==f||e[19]!==i||e[20]!==r?(u=t.jsx(ie,{open:i,onOpenChange:f,children:r}),e[18]=f,e[19]=i,e[20]=r,e[21]=u):u=e[21],u}function pe({open:N,onComplete:e,selectedInstallation:i,onSelectInstallation:f,onImportComplete:v,mode:g="agent"}){const{org:s}=B(),h=$(),x=me(),[p,C]=T.useState(null),b=ae({slug:"mcp-github"}),l=xe(b),o=he({enabled:N&&l.length===0}),a=l.length===1?l[0]??null:p,c=U({connectionId:a?.id??"",orgId:s.id,orgSlug:s.slug}),r=U({connectionId:V,orgId:s.id,orgSlug:s.slug}),u=async(n,j)=>{try{const k=await c.callTool({name:"get_file_contents",arguments:{owner:n.owner,repo:n.name,path:j}});if(k.isError)return null;const I=k.content?.find(m=>m.type==="resource")?.resource?.text;if(!I)return null;try{const m=JSON.parse(I);return typeof m=="string"?m:JSON.stringify(m)}catch{return I}}catch{return null}},y=(n,j)=>{Promise.all([u(j,"AGENTS.md"),u(j,"CLAUDE.md")]).then(async([S,k])=>{const w=S??k??null;w&&(await r.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:n,data:{metadata:{instructions:w}}}}),H(h,s.id))}).catch(S=>{console.error("GitHub instructions fetch failed:",S)})},d=M({mutationFn:async n=>{if(!a||!i)throw new Error("No GitHub connection or installation");const j=i.installationId;if(g==="connection"){const{childConnectionId:w}=await q({orgSlug:s.slug,sourceConnection:a,installationId:j,owner:n.owner,repo:n.name,githubCallTool:I=>c.callTool(I),selfCallTool:I=>r.callTool(I),orgShared:!0});return{virtualMcpId:null,repo:n,connectionId:w,item:null}}const{childConnectionId:S}=await q({orgSlug:s.slug,sourceConnection:a,installationId:j,owner:n.owner,repo:n.name,githubCallTool:w=>c.callTool(w),selfCallTool:w=>r.callTool(w)});let k=null;try{const w=await r.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:n.name,description:n.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:n.owner,name:n.name,url:n.url,installationId:j,connectionId:S},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:S}]}}}),I=w.structuredContent??w,m=I.item?.id;if(!I.item||!m)throw new Error("Failed to create the imported agent");return k=m,{virtualMcpId:m,repo:n,connectionId:S,item:I.item}}catch(w){throw k&&await r.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:k}}).catch(()=>{}),await r.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:S,force:!0}}).catch(()=>{}),w}},onSuccess:({virtualMcpId:n,repo:j,connectionId:S,item:k})=>{if(g==="connection"||!n||!k){H(h,s.id),W(h,s.id),O.success(`Added ${j.name}`),e();return}if(h.setQueryData(G.collectionItem(r,s.id,"","VIRTUAL_MCP",n),{item:k}),H(h,s.id),y(n,j),v){v({virtualMcpId:n,repo:j,connectionId:S});return}O.success(`Imported ${j.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),x(n)},onError:n=>{O.error("Failed to import repo: "+(n instanceof Error?n.message:"Unknown error"))}});return o.status==="installing"||o.status==="authenticating"?t.jsx(D,{status:o.status,error:null,retry:o.retry}):o.status==="error"?t.jsx(D,{status:"error",error:o.error,retry:o.retry}):l.length===0&&o.status==="idle"?t.jsx(D,{status:"installing",error:null,retry:o.retry}):l.length>1&&!a?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),l.map(n=>t.jsxs("button",{type:"button",onClick:()=>C(n),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[n.icon?t.jsx("img",{src:n.icon,alt:n.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(P,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:n.title})]},n.id))]}):a?i?t.jsx(Ne,{connectionId:a.id,orgId:s.id,orgSlug:s.slug,installation:i,onSelectRepo:n=>d.mutate(n),isSaving:d.isPending}):t.jsx(be,{connectionId:a.id,orgId:s.id,orgSlug:s.slug,onSelect:f,showBackButton:l.length>1,onBack:()=>C(null)}):null}function be(N){const e=R.c(47),{connectionId:i,orgId:f,orgSlug:v,onSelect:g,showBackButton:s,onBack:h}=N;let x;e[0]!==f||e[1]!==v?(x={connectionId:V,orgId:f,orgSlug:v},e[0]=f,e[1]=v,e[2]=x):x=e[2];const p=U(x),C=$(),b=Q();let l;e[3]!==i||e[4]!==f?(l=G.githubUserOrgs(f,i),e[3]=i,e[4]=f,e[5]=l):l=e[5];let o;e[6]!==i||e[7]!==p?(o=()=>fe(m=>p.callTool(m),i),e[6]=i,e[7]=p,e[8]=o):o=e[8];let a;e[9]!==l||e[10]!==o?(a={queryKey:l,queryFn:o},e[9]=l,e[10]=o,e[11]=a):a=e[11];const c=X(a);let r;e[12]!==b||e[13]!==i||e[14]!==c||e[15]!==f||e[16]!==v||e[17]!==C?(r={mutationFn:async()=>{const m=await K({connectionId:i,orgId:f,orgSlug:v,persistFallback:E=>b.update.mutateAsync({id:i,data:{connection_token:E}}).then(je)});if(m.ran&&!m.ok)throw new Error(m.error??"no token received");const _=new URL(`/api/${v}/mcp/${i}`,window.location.origin);await C.invalidateQueries({queryKey:G.isMCPAuthenticated(_.href,null)}),await C.invalidateQueries({queryKey:G.mcpClientPrefix()}),await c.refetch()},onError:ye},e[12]=b,e[13]=i,e[14]=c,e[15]=f,e[16]=v,e[17]=C,e[18]=r):r=e[18];const u=M(r);if(c.isLoading){let m;return e[19]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[19]=m):m=e[19],m}if(c.isError){let m,_;e[20]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"}),_=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:"Your GitHub connection may have expired. Reconnect to restore access."}),e[20]=m,e[21]=_):(m=e[20],_=e[21]);let E;e[22]!==u?(E=()=>u.mutate(),e[22]=u,e[23]=E):E=e[23];let A;e[24]!==u.isPending?(A=u.isPending?t.jsx(z,{size:14,className:"animate-spin"}):t.jsx(P,{className:"size-3.5"}),e[24]=u.isPending,e[25]=A):A=e[25];let L;return e[26]!==u.isPending||e[27]!==E||e[28]!==A?(L=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[m,_,t.jsxs(Z,{type:"button",variant:"outline",size:"sm",onClick:E,disabled:u.isPending,children:[A,"Reconnect GitHub"]})]}),e[26]=u.isPending,e[27]=E,e[28]=A,e[29]=L):L=e[29],L}const y=c.data;if(!y)return null;let d;e[30]!==h||e[31]!==s?(d=s&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:h,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(J,{size:12}),"Change connection"]})}),e[30]=h,e[31]=s,e[32]=d):d=e[32];let n;if(e[33]!==y.installations||e[34]!==g){let m;e[36]!==g?(m=_=>t.jsxs("button",{type:"button",onClick:()=>g(_),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:_.avatarUrl,alt:_.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:_.login}),_.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},_.installationId),e[36]=g,e[37]=m):m=e[37],n=y.installations.map(m),e[33]=y.installations,e[34]=g,e[35]=n}else n=e[35];let j;e[38]!==n?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:n}),e[38]=n,e[39]=j):j=e[39];const S=y.appSlug?`https://github.com/apps/${y.appSlug}/installations/new`:"https://github.com/settings/installations";let k;e[40]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[40]=k):k=e[40];let w;e[41]!==S?(w=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",k]})}),e[41]=S,e[42]=w):w=e[42];let I;return e[43]!==w||e[44]!==d||e[45]!==j?(I=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[d,j,w]}),e[43]=w,e[44]=d,e[45]=j,e[46]=I):I=e[46],I}function ye(N){O.error("Failed to reconnect GitHub: "+(N instanceof Error?N.message:"Unknown error"))}function je(){}function Ne(N){const e=R.c(20),{connectionId:i,orgId:f,orgSlug:v,installation:g,onSelectRepo:s,isSaving:h}=N,[x,p]=T.useState(""),C=le(x,300),b=T.useDeferredValue(C),l=x!==b;let o;e[0]!==l||e[1]!==x?(o=t.jsx(re,{placeholder:"Search repositories...",value:x,onChange:p,isSearching:l}),e[0]=l,e[1]=x,e[2]=o):o=e[2];const a=l?"opacity-40":"opacity-100";let c;e[3]!==a?(c=F("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",a),e[3]=a,e[4]=c):c=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(z,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=r):r=e[5];let u;e[6]!==i||e[7]!==b||e[8]!==g||e[9]!==h||e[10]!==s||e[11]!==f||e[12]!==v?(u=t.jsx(T.Suspense,{fallback:r,children:t.jsx(ve,{connectionId:i,orgId:f,orgSlug:v,installation:g,query:b,onSelectRepo:s,isSaving:h})}),e[6]=i,e[7]=b,e[8]=g,e[9]=h,e[10]=s,e[11]=f,e[12]=v,e[13]=u):u=e[13];let y;e[14]!==c||e[15]!==u?(y=t.jsx("div",{className:c,children:u}),e[14]=c,e[15]=u,e[16]=y):y=e[16];let d;return e[17]!==o||e[18]!==y?(d=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[o,y]}),e[17]=o,e[18]=y,e[19]=d):d=e[19],d}function ve(N){const e=R.c(29),{connectionId:i,orgId:f,orgSlug:v,installation:g,query:s,onSelectRepo:h,isSaving:x}=N;let p;e[0]!==i||e[1]!==f||e[2]!==v?(p={connectionId:i,orgId:f,orgSlug:v},e[0]=i,e[1]=f,e[2]=v,e[3]=p):p=e[3];const C=U(p),b=g.type==="User"?"user":"org",l=s?`${b}:${g.login} ${s} in:name`:`${b}:${g.login}`;let o;e[4]!==i||e[5]!==g.login||e[6]!==f||e[7]!==s?(o=G.githubOrgRepos(f,i,g.login,s),e[4]=i,e[5]=g.login,e[6]=f,e[7]=s,e[8]=o):o=e[8];let a;e[9]!==C||e[10]!==l?(a=async d=>{const{signal:n}=d,S=(await C.callTool({name:"search_repositories",arguments:{query:l,page:1,perPage:30}},void 0,{signal:n})).content?.[0]?.text;if(!S)throw new Error("No response from search_repositories");return(JSON.parse(S).items??[]).map(we)},e[9]=C,e[10]=l,e[11]=a):a=e[11];let c;e[12]!==o||e[13]!==a?(c={queryKey:o,queryFn:a},e[12]=o,e[13]=a,e[14]=c):c=e[14];const{data:r}=ee(c);if(r.length===0){let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=d):d=e[15];let n;e[16]!==s?(n=s&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=s,e[17]=n):n=e[17];let j;return e[18]!==n?(j=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[d,n]}),e[18]=n,e[19]=j):j=e[19],j}let u;if(e[20]!==x||e[21]!==h||e[22]!==r){let d;e[24]!==x||e[25]!==h?(d=n=>t.jsxs("button",{type:"button",onClick:()=>h(n),disabled:x,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(P,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:n.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[n.private?t.jsx(te,{size:10}):t.jsx(ce,{size:10}),n.private?"Private":"Public"]})]},n.fullName),e[24]=x,e[25]=h,e[26]=d):d=e[26],u=r.map(d),e[20]=x,e[21]=h,e[22]=r,e[23]=u}else u=e[23];let y;return e[27]!==u?(y=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:u}),e[27]=u,e[28]=y):y=e[28],y}function we(N){return{name:N.name,fullName:N.full_name,owner:N.full_name.split("/")[0]??"",url:N.html_url,private:N.private,description:N.description,updatedAt:N.updated_at}}function D(N){const e=R.c(33),{status:i,error:f,retry:v}=N;if(i==="error"){let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(P,{className:"size-5 text-destructive"})}),e[0]=S):S=e[0];let k;e[1]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=k):k=e[1];const w=f??"Something went wrong while connecting to GitHub.";let I;e[2]!==w?(I=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:w})]}),e[2]=w,e[3]=I):I=e[3];let m;e[4]!==v?(m=t.jsx("button",{type:"button",onClick:v,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=v,e[5]=m):m=e[5];let _;return e[6]!==I||e[7]!==m?(_=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[S,I,m]}),e[6]=I,e[7]=m,e[8]=_):_=e[8],_}const g=i==="authenticating";let s;e[9]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(P,{className:"size-5 text-foreground"})}),e[9]=s):s=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsxs("div",{className:"relative size-10",children:[s,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(z,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=h):h=e[10];const x=g?"Authenticating with GitHub":"Setting up GitHub";let p;e[11]!==x?(p=t.jsx("p",{className:"text-sm font-medium",children:x}),e[11]=x,e[12]=p):p=e[12];const C=g?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let b;e[13]!==C?(b=t.jsx("p",{className:"text-xs text-muted-foreground",children:C}),e[13]=C,e[14]=b):b=e[14];let l;e[15]!==p||e[16]!==b?(l=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[p,b]}),e[15]=p,e[16]=b,e[17]=l):l=e[17];const o=g?"bg-muted-foreground/30":"bg-foreground animate-pulse";let a;e[18]!==o?(a=F("size-1.5 rounded-full",o),e[18]=o,e[19]=a):a=e[19];let c;e[20]!==a?(c=t.jsx("span",{className:a}),e[20]=a,e[21]=c):c=e[21];const r=g?"bg-foreground animate-pulse":"bg-muted-foreground/30";let u;e[22]!==r?(u=F("size-1.5 rounded-full",r),e[22]=r,e[23]=u):u=e[23];let y;e[24]!==u?(y=t.jsx("span",{className:u}),e[24]=u,e[25]=y):y=e[25];let d;e[26]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=d):d=e[26];let n;e[27]!==c||e[28]!==y?(n=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,y,d]}),e[27]=c,e[28]=y,e[29]=n):n=e[29];let j;return e[30]!==n||e[31]!==l?(j=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[h,l,n]}),e[30]=n,e[31]=l,e[32]=j):j=e[32],j}export{Oe as G,he as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{dx as St,dy as It,bi as N,I as c,dz as de,bo as ze,bv as Et,bh as Tt,aW as wt,ag as O,af as G,ad as oe,H as _,bj as m,b3 as F,dA as Mt,dB as I,ae as At,t as ge,c as Ee,r as W,C as Ot,j as Ct}from"./index-
|
|
1
|
+
import{dx as St,dy as It,bi as N,I as c,dz as de,bo as ze,bv as Et,bh as Tt,aW as wt,ag as O,af as G,ad as oe,H as _,bj as m,b3 as F,dA as Mt,dB as I,ae as At,t as ge,c as Ee,r as W,C as Ot,j as Ct}from"./index-4eRsB-gF.js";import{S as Nt,u as Rt}from"./use-mcp-client-DnL1UNwa.js";import{d as xt,D as Pt}from"./decopilot-sse-pool-Dqj5rGFR.js";import{d as Dt}from"./delay-CnY5UFtP.js";import{e as kt}from"./backoff-CrEUbyZT.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(n=>typeof s[s[n]]!="number"),i={};for(const n of o)i[n]=s[n];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},t.find=(s,o)=>{for(const i of s)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(re||(re={}));var Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let n=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(n[u]=n[u]||{_errors:[]},n[u]._errors.push(a(i))):n[u]=n[u]||{_errors:[]},n=n[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];a[o]=a[o]||[],a[o].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));var Je="vercel.ai.error",Lt=Symbol.for(Je),Ce,Ne,Z=class We extends(Ne=Error,Ce=Lt,Ne){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return We.hasMarker(e,Je)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ge(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Ye="AI_InvalidArgumentError",He=`vercel.ai.error.${Ye}`,jt=Symbol.for(He),Re,xe,Zt=class extends(xe=Z,Re=jt,xe){constructor({message:t,cause:e,argument:a}){super({name:Ye,message:t,cause:e}),this[Re]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,He)}},qe="AI_JSONParseError",Xe=`vercel.ai.error.${qe}`,$t=Symbol.for(Xe),Pe,De,ke=class extends(De=Z,Pe=$t,De){constructor({text:t,cause:e}){super({name:qe,message:`JSON parsing failed: Text: ${t}.
|
|
2
2
|
Error message: ${Ge(e)}`,cause:e}),this[Pe]=!0,this.text=t}static isInstance(t){return Z.hasMarker(t,Xe)}},Qe="AI_TypeValidationError",Ke=`vercel.ai.error.${Qe}`,Ut=Symbol.for(Ke),Le,je,X=class ve extends(je=Z,Le=Ut,je){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const o=[];r.entityName&&o.push(r.entityName),r.entityId&&o.push(`id: "${r.entityId}"`),s+=o.join(", "),s+=")"}super({name:Qe,message:`${s}: Value: ${JSON.stringify(e)}.
|
|
3
3
|
Error message: ${Ge(a)}`,cause:a}),this[Le]=!0,this.value=e,this.context=r}static isInstance(e){return Z.hasMarker(e,Ke)}static wrap({value:e,cause:a,context:r}){var s,o,i;return ve.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((o=a.context)==null?void 0:o.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ve({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const o=a.length,i=new Array(e);for(let n=0;n<e;n++)i[n]=a[Math.random()*o|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new Zt({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Ft=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Bt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Ze(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Ft.test(t)===!1&&Bt.test(t)===!1?e:Vt(e)}function Vt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const o=r[s];o&&typeof o=="object"&&e.push(o)}}}return t}function zt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return Ze(t)}try{return Ze(t)}finally{Error.stackTraceLimit=e}}function Te(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=z(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(z):z(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(z)),t.allOf!=null&&(t.allOf=t.allOf.map(z)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(z));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=z(e[a]);return t}function z(t){return typeof t=="boolean"?t:Te(t)}var Jt=Symbol("Let zodToJsonSchema decide on which parser to use"),$e={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Wt=t=>typeof t=="string"?{...$e,name:t}:{...$e,...t};function R(){return{}}function Gt(t,e){var a,r,s;const o={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==h.ZodAny&&(o.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(o.minItems=t.minLength.value),t.maxLength&&(o.maxItems=t.maxLength.value),t.exactLength&&(o.minItems=t.exactLength.value,o.maxItems=t.exactLength.value),o}function Yt(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function Ht(){return{type:"boolean"}}function et(t,e){return b(t.type._def,e)}var qt=(t,e)=>b(t.innerType._def,e);function tt(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,o)=>tt(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Xt(t)}}var Xt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Qt(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function Kt(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):R()}function ea(t){return{type:"string",enum:Array.from(t.values)}}var ta=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function aa(t,e){const a=[b(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),b(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(ta(s))r.push(...s.allOf);else{let o=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...n}=s;o=n}r.push(o)}}),r.length?{allOf:r}:void 0}function ra(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var me=void 0,P={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(me===void 0&&(me=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),me),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function at(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":D(a,"email",r.message,e);break;case"format:idn-email":D(a,"idn-email",r.message,e);break;case"pattern:zod":A(a,P.email,r.message,e);break}break;case"url":D(a,"uri",r.message,e);break;case"uuid":D(a,"uuid",r.message,e);break;case"regex":A(a,r.regex,r.message,e);break;case"cuid":A(a,P.cuid,r.message,e);break;case"cuid2":A(a,P.cuid2,r.message,e);break;case"startsWith":A(a,RegExp(`^${he(r.value,e)}`),r.message,e);break;case"endsWith":A(a,RegExp(`${he(r.value,e)}$`),r.message,e);break;case"datetime":D(a,"date-time",r.message,e);break;case"date":D(a,"date",r.message,e);break;case"time":D(a,"time",r.message,e);break;case"duration":D(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{A(a,RegExp(he(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&D(a,"ipv4",r.message,e),r.version!=="v4"&&D(a,"ipv6",r.message,e);break}case"base64url":A(a,P.base64url,r.message,e);break;case"jwt":A(a,P.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&A(a,P.ipv4Cidr,r.message,e),r.version!=="v4"&&A(a,P.ipv6Cidr,r.message,e);break}case"emoji":A(a,P.emoji(),r.message,e);break;case"ulid":{A(a,P.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{D(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{A(a,P.base64,r.message,e);break}}break}case"nanoid":A(a,P.nanoid,r.message,e)}return a}function he(t,e){return e.patternStrategy==="escape"?na(t):t}var sa=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function na(t){let e="";for(let a=0;a<t.length;a++)sa.has(t[a])||(e+="\\"),e+=t[a];return e}function D(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(o=>o.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function A(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(o=>o.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Ue(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Ue(e,r)}function Ue(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let o="",i=!1,n=!1,p=!1;for(let u=0;u<s.length;u++){if(i){o+=s[u],i=!1;continue}if(r.i){if(n){if(s[u].match(/[a-z]/)){p?(o+=s[u],o+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(o+=s[u],p=!0):o+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){o+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){o+=`(^|(?<=[\r
|
|
4
4
|
]))`;continue}else if(s[u]==="$"){o+=`($|(?=[\r
|