decocms 2.305.1 → 2.305.2
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/README.md +5 -5
- package/dist/client/assets/{AlertCircle-Br9ewHdT.js → AlertCircle-DMzVypio.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-DfAChrcB.js → ArrowNarrowLeft-BrDi0OP6.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-kwr6Olrh.js → ArrowUpRight-CffRTFwr.js} +1 -1
- package/dist/client/assets/{Check-BDdvLFkb.js → Check-Ce2zaI1y.js} +1 -1
- package/dist/client/assets/{CheckCircle-CvaWFdv1.js → CheckCircle-D17Wk4_q.js} +1 -1
- package/dist/client/assets/{ChevronDown-BPP53zSs.js → ChevronDown-DrATxf_L.js} +1 -1
- package/dist/client/assets/{ChevronRight-BMEO9ter.js → ChevronRight-D_n1A1KD.js} +1 -1
- package/dist/client/assets/{ChevronUp-Blh5YuTb.js → ChevronUp-wzMtW3WF.js} +1 -1
- package/dist/client/assets/{Container-kSvRb_TI.js → Container-B9nOU3uH.js} +1 -1
- package/dist/client/assets/{DotsVertical-DlNY9ok5.js → DotsVertical-CFgJEmVd.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DS2oa6z_.js → LinkExternal01-CJuu5L5n.js} +1 -1
- package/dist/client/assets/{Lock01-e_YusQxH.js → Lock01-C0NTjdQ2.js} +1 -1
- package/dist/client/assets/{Palette-50x6cQyB.js → Palette-BqdFVWdR.js} +1 -1
- package/dist/client/assets/{Play-sOXcr7Am.js → Play-CpVaHTKa.js} +1 -1
- package/dist/client/assets/{Plus-DFCNKucG.js → Plus-rlgpPXdn.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-ROHijjHE.js → RefreshCcw01-CjhD_64F.js} +1 -1
- package/dist/client/assets/{SearchMd-DIDMC0x8.js → SearchMd-DdqkiNaX.js} +1 -1
- package/dist/client/assets/{Settings02-CNGOY5wS.js → Settings02-BVGX612X.js} +1 -1
- package/dist/client/assets/{Shield01-DswPRV6t.js → Shield01-CSGiF6c-.js} +1 -1
- package/dist/client/assets/{Star01-DKwz3L6O.js → Star01-DXwrqMmG.js} +1 -1
- package/dist/client/assets/{Sun-DDtl0tTX.js → Sun-CICDmGiY.js} +1 -1
- package/dist/client/assets/{Tool01-CzKvFqBY.js → Tool01-BhvNB9zc.js} +1 -1
- package/dist/client/assets/{Trash01-D7BNCUuW.js → Trash01-DC-0vlKK.js} +1 -1
- package/dist/client/assets/{User01-C5o7vY8e.js → User01-B-bRCO2n.js} +1 -1
- package/dist/client/assets/{Users03-BHkiN8pv.js → Users03-Bgb4m-rj.js} +1 -1
- package/dist/client/assets/{X-BTgbOlZp.js → X-CA0yXZSK.js} +1 -1
- package/dist/client/assets/{XCircle-GkBI4OoY.js → XCircle-C_-dxsPx.js} +1 -1
- package/dist/client/assets/{XClose-1aeyb_5i.js → XClose-1VJ455H5.js} +1 -1
- package/dist/client/assets/{Zap-BV4QuHX8.js → Zap-CT1x4GyR.js} +1 -1
- package/dist/client/assets/{ZapSquare-CE4Xi6jK.js → ZapSquare-B3dm6KZf.js} +1 -1
- package/dist/client/assets/{accordion-Dc2wrek1.js → accordion-DlRvrND8.js} +1 -1
- package/dist/client/assets/{agent-icon-Cc0OK5HW.js → agent-icon-Aidj_nbT.js} +1 -1
- package/dist/client/assets/{agents-list-Bm5Akk_I.js → agents-list-h-PZw07V.js} +1 -1
- package/dist/client/assets/ai-providers-hlFksDgI.js +1 -0
- package/dist/client/assets/{alert-dialog-BcOhLeAS.js → alert-dialog-DHHb9UES.js} +1 -1
- package/dist/client/assets/{auth-catchall-Bcv_GEN6.js → auth-catchall-CMI0fqEP.js} +1 -1
- package/dist/client/assets/{automation-list-row-pzX08kIl.js → automation-list-row-Dw0awDhm.js} +1 -1
- package/dist/client/assets/{automations-CkpX1bDz.js → automations-DgSOIlaP.js} +1 -1
- package/dist/client/assets/{avatar-Bb_UKexv.js → avatar-C4W3LF9U.js} +1 -1
- package/dist/client/assets/{badge-CtLXPOql.js → badge-CKCe4xFX.js} +1 -1
- package/dist/client/assets/{brand-context-CoQwouQo.js → brand-context-CFjUKEZZ.js} +1 -1
- package/dist/client/assets/{card-9KSBCULz.js → card-DvnenXSp.js} +1 -1
- package/dist/client/assets/{chat-context-DpSSbPpF.js → chat-context-DQ9F_zYD.js} +1 -1
- package/dist/client/assets/{checkbox-BhxVCV69.js → checkbox-CpdjRPxz.js} +1 -1
- package/dist/client/assets/{collection-detail-DrhrluPo.js → collection-detail-D3e0mmMi.js} +1 -1
- package/dist/client/assets/{collection-display-button-iLTcoZ8v.js → collection-display-button-DYp1JCHl.js} +1 -1
- package/dist/client/assets/{collection-search-BjYBs0ij.js → collection-search-C-8aWgKY.js} +1 -1
- package/dist/client/assets/{collection-search-BVAD_8E4.js → collection-search-D3JPMk2G.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BA1NNqwU.js → collection-table-wrapper-hKs78OI7.js} +1 -1
- package/dist/client/assets/{collection-tabs-Xy0nDeMn.js → collection-tabs-DIzWCpJi.js} +1 -1
- package/dist/client/assets/{collections-C2uKELRr.js → collections-mK3tmeo_.js} +1 -1
- package/dist/client/assets/{command-BaoEIiCq.js → command-CqNHzNfW.js} +1 -1
- package/dist/client/assets/{connection-card-DO6bL5Cc.js → connection-card-B9jp4WAJ.js} +1 -1
- package/dist/client/assets/{connection-detail-Bnk5mfLJ.js → connection-detail-O5xxE160.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BuIlPwrP.js → connection-form-helpers-DGIGa0jl.js} +1 -1
- package/dist/client/assets/{connections-CkFp7lWx.js → connections-CPceMglQ.js} +1 -1
- package/dist/client/assets/{constants-BBgzLWSw.js → constants-BJbz7WCF.js} +1 -1
- package/dist/client/assets/{constants-D0hFkWmt.js → constants-DlDcmvhJ.js} +1 -1
- package/dist/client/assets/{dialog-D-8iKYyL.js → dialog-CMvXkbcK.js} +1 -1
- package/dist/client/assets/{domain-settings-BJx1AelS.js → domain-settings-D94uqHZi.js} +1 -1
- package/dist/client/assets/{drawer-iSQ1TA5J.js → drawer-DB3e3BTg.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Cqo8Czah.js → dropdown-menu-BgfQQHCp.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-9QCXXZSv.js → dynamic-plugin-layout-CugRGU7x.js} +1 -1
- package/dist/client/assets/{empty-state-DJhaCN6r.js → empty-state-BloqPoX9.js} +1 -1
- package/dist/client/assets/{empty-state-Bi8xfifP.js → empty-state-Cr_Sv9jS.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BoZTN4ct.js → extract-connection-data-Cp7JciHC.js} +1 -1
- package/dist/client/assets/{features-D4XsJcYn.js → features-DQcaVbot.js} +1 -1
- package/dist/client/assets/{form-CtqIjLmm.js → form-ruyF-qzE.js} +1 -1
- package/dist/client/assets/{general-BmiXpGpO.js → general-k-j41zoM.js} +1 -1
- package/dist/client/assets/{index-mqxitPxm.js → index-2zpbfeao.js} +1 -1
- package/dist/client/assets/{index-COWwoaag.js → index-B6Qwj9ip.js} +1 -1
- package/dist/client/assets/{index-BR5R8reE.js → index-BZG21hYr.js} +1 -1
- package/dist/client/assets/{index-r9M0EnR_.js → index-BrlUjE-e.js} +3 -3
- package/dist/client/assets/index-BwlTBk4D.js +1 -0
- package/dist/client/assets/{index-Cb6Wqswz.js → index-C27CjGg7.js} +1 -1
- package/dist/client/assets/{index-BE78uXnk.js → index-C8PfOV9c.js} +1 -1
- package/dist/client/assets/{index-CpmjPXU0.js → index-CghtC7iY.js} +1 -1
- package/dist/client/assets/{index-BddtkUN5.js → index-CpASz2l8.js} +1 -1
- package/dist/client/assets/{index-DpyzImMn.js → index-CvjZRJAq.js} +1 -1
- package/dist/client/assets/{index-CigwZVFo.js → index-DUvCyy06.js} +1 -1
- package/dist/client/assets/{index-DLznuG2S.js → index-DWar01dh.js} +1 -1
- package/dist/client/assets/{index-BetgZtTA.js → index-DXgWutpH.js} +1 -1
- package/dist/client/assets/{index-CdGladh1.js → index-DbwpM0oT.js} +1 -1
- package/dist/client/assets/{index-CNq3A1fb.js → index-QJkyRpKl.js} +1 -1
- package/dist/client/assets/{index-DRcAHhaZ.js → index-Qc-HM-3V.js} +2 -2
- package/dist/client/assets/{infiniteQueryObserver-BGG1V2SW.js → infiniteQueryObserver-CNdVc6Pq.js} +1 -1
- package/dist/client/assets/{input-DZM-sZUE.js → input-DVKZFl3m.js} +1 -1
- package/dist/client/assets/{integration-icon-kCK5G0hc.js → integration-icon-Dvo8MK78.js} +1 -1
- package/dist/client/assets/{label-tgV3YGrK.js → label-Ddv1lEVo.js} +1 -1
- package/dist/client/assets/{layout-DqQ9Ilsl.js → layout-CfRuPQpD.js} +1 -1
- package/dist/client/assets/{lean-canvas-recruit-modal-CC2l0iFS.js → lean-canvas-recruit-modal-CZwn_x-Z.js} +1 -1
- package/dist/client/assets/{login-DH2jR76t.js → login-CfKhDhQu.js} +1 -1
- package/dist/client/assets/{members-xakt_nq_.js → members-INSx14IN.js} +1 -1
- package/dist/client/assets/{monaco-editor-D0NlB5-P.js → monaco-editor-DHBFS1Nz.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BCYL3TVR.js → monitoring-stats-row-nN00-ahk.js} +1 -1
- package/dist/client/assets/{oauth-callback-CHbPqwkB.js → oauth-callback-BHNFQm9G.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CplqstnV.js → oauth-callback-ai-provider-kDr85b4j.js} +1 -1
- package/dist/client/assets/{onboarding-DuPaOSsv.js → onboarding-DayeILgQ.js} +1 -1
- package/dist/client/assets/{org-layout-C7TZf2Jg.js → org-layout-B7tDIjls.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-ytui8nvZ.js → org-plugin-layout-DijtR-Yn.js} +1 -1
- package/dist/client/assets/{pair-n9NIJPmt.js → pair-BTg5U2i_.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CfM59nCo.js → plugin-empty-state-9EVNRwqH.js} +1 -1
- package/dist/client/assets/{plugin-header-NjqXhQtY.js → plugin-header-CCLzoupo.js} +1 -1
- package/dist/client/assets/{plugin-layout-CNQvsyPi.js → plugin-layout-COwnJfBo.js} +1 -1
- package/dist/client/assets/{popover-DqtUnTy9.js → popover-FANYiDWd.js} +1 -1
- package/dist/client/assets/{profile-DR5MZQYT.js → profile-BUQJJNtu.js} +1 -1
- package/dist/client/assets/{project-app-view-CxUipFcI.js → project-app-view-CZmIevtW.js} +1 -1
- package/dist/client/assets/registry-Da4K44Xl.js +2 -0
- package/dist/client/assets/{registry-layout-Bgcp4P6K.js → registry-layout-CQHrnVlQ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-D_ctViyf.js → required-auth-layout-BAyE2y-F.js} +1 -1
- package/dist/client/assets/{reset-password-D4lmEYTa.js → reset-password-Dj4RoKKI.js} +1 -1
- package/dist/client/assets/{roles-CWsuEaZG.js → roles-BLdL9t1d.js} +1 -1
- package/dist/client/assets/{scroll-area-By7jyUhV.js → scroll-area-C_N1tWNB.js} +1 -1
- package/dist/client/assets/{search-input-Bc2GlzPf.js → search-input-oOemXj8U.js} +1 -1
- package/dist/client/assets/{select-GU1JgcQ8.js → select-BZ8Wc1K2.js} +1 -1
- package/dist/client/assets/{select-model-Eeva0uff.js → select-model-Dxld4BD0.js} +1 -1
- package/dist/client/assets/{settings-layout-Czl6BZ2k.js → settings-layout-Db_7efbC.js} +1 -1
- package/dist/client/assets/{settings-section-Bm0E9Bam.js → settings-section-ylY0I5Aj.js} +1 -1
- package/dist/client/assets/{shell-layout-5q7_gZ4N.js → shell-layout-BS0iP_zg.js} +1 -1
- package/dist/client/assets/{skeleton-B-naR4Ue.js → skeleton-whDLNRvh.js} +1 -1
- package/dist/client/assets/{sso-CQ_IeGcT.js → sso-yKSnL6cT.js} +1 -1
- package/dist/client/assets/{store-Cx374GVe.js → store-DVfL7GG2.js} +1 -1
- package/dist/client/assets/store-registry-BGm95aFQ.js +2 -0
- package/dist/client/assets/{switch-svOIXPFQ.js → switch-CoU4JLeW.js} +1 -1
- package/dist/client/assets/{table-CiWJpXWr.js → table-CWTAYJ6R.js} +1 -1
- package/dist/client/assets/{tabs-CQDIgfHu.js → tabs-BK4O-4QH.js} +1 -1
- package/dist/client/assets/{task-status-D2H9p4od.js → task-status-CrVRLNAn.js} +1 -1
- package/dist/client/assets/{textarea-CtQZOqL1.js → textarea-DI97iX9T.js} +1 -1
- package/dist/client/assets/{toggle-group-DnRsv6Tz.js → toggle-group-BWfFiqCs.js} +1 -1
- package/dist/client/assets/{tools-list-DZbTEL-t.js → tools-list-C7QpB8eo.js} +1 -1
- package/dist/client/assets/{tooltip-UFl_p-Yt.js → tooltip-CGOE-2qV.js} +1 -1
- package/dist/client/assets/{types-C2HWQgQd.js → types-BELLiI8t.js} +1 -1
- package/dist/client/assets/{use-ai-providers-B-rgDBoR.js → use-ai-providers-6wi_VCIQ.js} +1 -1
- package/dist/client/assets/{use-collections-THE_UO2l.js → use-collections-VMVmbDwC.js} +1 -1
- package/dist/client/assets/{use-connection-DujrbCZx.js → use-connection-Bs0XMRE_.js} +1 -1
- package/dist/client/assets/{use-copy-CxCKKWo7.js → use-copy-EgoJUqWz.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Dj-60SI2.js → use-create-virtual-mcp-A4WarYTW.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CPg8W5oz.js → use-debounced-autosave-Dte_kAEO.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Cjc1o1Nu.js → use-decopilot-events-Bvp1pSkJ.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CN1nCcIJ.js → use-delete-connection-D0RH1aQq.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CKzLBp1w.js → use-infinite-scroll-Bg90tKAp.js} +1 -1
- package/dist/client/assets/{use-list-state-WnAz6TY1.js → use-list-state-Dkv7POhH.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BeS0ssuN.js → use-mcp-tools-CDG9yfix.js} +1 -1
- package/dist/client/assets/{use-members-3B2IEyuj.js → use-members-Bf9_euWt.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Dw9ITfQX.js → use-navigate-to-agent-DeYPLoEJ.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DnkEDRTk.js → use-org-auth-client-CpJqPVuH.js} +1 -1
- package/dist/client/assets/{use-org-sso-CN15B3wE.js → use-org-sso-GPJYud0h.js} +1 -1
- package/dist/client/assets/{use-organization-roles-qN1PRVvQ.js → use-organization-roles-D9esIXeR.js} +1 -1
- package/dist/client/assets/{use-organization-settings-RqyZhOuo.js → use-organization-settings-C7zflGqs.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BE0aFTI1.js → use-registry-connections-B1vXrR3c.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DkqBbPSS.js → use-status-sounds-Dlkg0R7f.js} +1 -1
- package/dist/client/assets/{use-tasks-DsH6cZRl.js → use-tasks-CKK53Yi7.js} +1 -1
- package/dist/client/assets/{use-view-mode-DbO7_qIE.js → use-view-mode-WSdAEAZS.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DIBjQz5k.js → use-virtual-mcp-C9_YL7kD.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BthTp29S.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-5Axxf4Tp.js +1 -0
- package/dist/client/assets/{user-D3SI9inq.js → user-BMeM8_Kh.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-C1b_D_--.js → view-mode-toggle-C9wA8R9s.js} +1 -1
- package/dist/client/assets/{workflow-bf9m4gQp.js → workflow-CoAUdsHF.js} +1 -1
- package/dist/client/assets/workflow-detail-Dw2RzGR4.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/node_modules/environment/index.d.ts +74 -0
- package/dist/server/node_modules/environment/index.js +47 -0
- package/dist/server/node_modules/environment/license +9 -0
- package/dist/server/node_modules/environment/package.json +74 -0
- package/dist/server/node_modules/environment/readme.md +94 -0
- package/dist/server/node_modules/escape-string-regexp/index.d.ts +18 -0
- package/dist/server/node_modules/escape-string-regexp/index.js +11 -0
- package/dist/server/node_modules/escape-string-regexp/license +9 -0
- package/dist/server/node_modules/escape-string-regexp/package.json +43 -0
- package/dist/server/node_modules/escape-string-regexp/readme.md +29 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- package/dist/server/node_modules/is-fullwidth-code-point/index.js +12 -0
- package/dist/server/node_modules/is-fullwidth-code-point/license +9 -0
- package/dist/server/node_modules/is-fullwidth-code-point/package.json +53 -0
- package/dist/server/node_modules/is-fullwidth-code-point/readme.md +31 -0
- package/dist/server/node_modules/is-unicode-supported/index.d.ts +12 -0
- package/dist/server/node_modules/is-unicode-supported/index.js +21 -0
- package/dist/server/node_modules/is-unicode-supported/license +9 -0
- package/dist/server/node_modules/is-unicode-supported/package.json +47 -0
- package/dist/server/node_modules/is-unicode-supported/readme.md +35 -0
- package/dist/server/node_modules/mimic-fn/index.d.ts +54 -0
- package/dist/server/node_modules/mimic-fn/index.js +13 -0
- package/dist/server/node_modules/mimic-fn/license +9 -0
- package/dist/server/node_modules/mimic-fn/package.json +42 -0
- package/dist/server/node_modules/mimic-fn/readme.md +69 -0
- package/dist/server/node_modules/pg-int8/LICENSE +13 -0
- package/dist/server/node_modules/pg-int8/README.md +16 -0
- package/dist/server/node_modules/pg-int8/index.js +100 -0
- package/dist/server/node_modules/pg-int8/package.json +24 -0
- package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
- package/dist/server/node_modules/postgres-array/index.js +97 -0
- package/dist/server/node_modules/postgres-array/license +21 -0
- package/dist/server/node_modules/postgres-array/package.json +35 -0
- package/dist/server/node_modules/postgres-array/readme.md +43 -0
- package/dist/server/node_modules/restore-cursor/index.d.ts +11 -0
- package/dist/server/node_modules/restore-cursor/index.js +11 -0
- package/dist/server/node_modules/restore-cursor/license +9 -0
- package/dist/server/node_modules/restore-cursor/package.json +55 -0
- package/dist/server/node_modules/restore-cursor/readme.md +31 -0
- package/dist/server/node_modules/split2/LICENSE +13 -0
- package/dist/server/node_modules/split2/README.md +85 -0
- package/dist/server/node_modules/split2/bench.js +27 -0
- package/dist/server/node_modules/split2/index.js +141 -0
- package/dist/server/node_modules/split2/package.json +39 -0
- package/dist/server/node_modules/split2/test.js +409 -0
- package/dist/server/node_modules/string-width/index.d.ts +39 -0
- package/dist/server/node_modules/string-width/index.js +82 -0
- package/dist/server/node_modules/string-width/license +9 -0
- package/dist/server/node_modules/string-width/package.json +64 -0
- package/dist/server/node_modules/string-width/readme.md +66 -0
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-BTHVSznc.js +0 -1
- package/dist/client/assets/index-DR3jGuDX.js +0 -1
- package/dist/client/assets/registry-D_qBGD1h.js +0 -2
- package/dist/client/assets/store-registry-BxAYDZYi.js +0 -2
- package/dist/client/assets/useInfiniteQuery-B3MVtmJM.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BCYthwLz.js +0 -1
- package/dist/client/assets/workflow-detail-_fTRA7hJ.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/plugin-header-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/plugin-header-CCLzoupo.js","assets/Check-Ce2zaI1y.js","assets/ChevronDown-DrATxf_L.js","assets/login-CfKhDhQu.js","assets/input-DVKZFl3m.js","assets/reset-password-Dj4RoKKI.js","assets/shell-layout-BS0iP_zg.js","assets/dialog-CMvXkbcK.js","assets/X-CA0yXZSK.js","assets/required-auth-layout-BAyE2y-F.js","assets/use-tasks-CKK53Yi7.js","assets/use-collections-VMVmbDwC.js","assets/constants-BJbz7WCF.js","assets/use-organization-settings-C7zflGqs.js","assets/use-org-sso-GPJYud0h.js","assets/Lock01-C0NTjdQ2.js","assets/onboarding-DayeILgQ.js","assets/label-Ddv1lEVo.js","assets/Users03-Bgb4m-rj.js","assets/CheckCircle-D17Wk4_q.js","assets/Palette-BqdFVWdR.js","assets/index-BwlTBk4D.js","assets/index-QJkyRpKl.js","assets/tooltip-CGOE-2qV.js","assets/index-2zpbfeao.js","assets/agent-icon-Aidj_nbT.js","assets/AlertCircle-DMzVypio.js","assets/Tool01-BhvNB9zc.js","assets/XClose-1VJ455H5.js","assets/RefreshCcw01-CjhD_64F.js","assets/ArrowNarrowLeft-BrDi0OP6.js","assets/XCircle-C_-dxsPx.js","assets/ArrowUpRight-CffRTFwr.js","assets/ZapSquare-B3dm6KZf.js","assets/ChevronRight-D_n1A1KD.js","assets/ChevronUp-wzMtW3WF.js","assets/DotsVertical-CFgJEmVd.js","assets/Container-B9nOU3uH.js","assets/Star01-DXwrqMmG.js","assets/SearchMd-DdqkiNaX.js","assets/LinkExternal01-CJuu5L5n.js","assets/Sun-CICDmGiY.js","assets/Play-CpVaHTKa.js","assets/Plus-rlgpPXdn.js","assets/Settings02-BVGX612X.js","assets/Shield01-CSGiF6c-.js","assets/Trash01-DC-0vlKK.js","assets/User01-B-bRCO2n.js","assets/Zap-CT1x4GyR.js","assets/pair-BTg5U2i_.js","assets/index-BZG21hYr.js","assets/use-copy-EgoJUqWz.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/content-blocks-o63cs2vh.js","assets/types-BELLiI8t.js","assets/chat-context-DQ9F_zYD.js","assets/use-virtual-mcp-C9_YL7kD.js","assets/use-ai-providers-6wi_VCIQ.js","assets/use-decopilot-events-Bvp1pSkJ.js","assets/create-sse-subscription-CxkOgzKf.js","assets/integration-icon-Dvo8MK78.js","assets/skeleton-whDLNRvh.js","assets/popover-FANYiDWd.js","assets/drawer-DB3e3BTg.js","assets/avatar-C4W3LF9U.js","assets/alert-dialog-DHHb9UES.js","assets/form-ruyF-qzE.js","assets/index-C8PfOV9c.js","assets/use-mcp-tools-CDG9yfix.js","assets/index-DWar01dh.js","assets/switch-CoU4JLeW.js","assets/use-connection-Bs0XMRE_.js","assets/lean-canvas-recruit-modal-CZwn_x-Z.js","assets/use-navigate-to-agent-DeYPLoEJ.js","assets/collection-search-C-8aWgKY.js","assets/checkbox-CpdjRPxz.js","assets/extract-connection-data-Cp7JciHC.js","assets/constants-DlDcmvhJ.js","assets/collections-mK3tmeo_.js","assets/tabs-BK4O-4QH.js","assets/dropdown-menu-BgfQQHCp.js","assets/select-BZ8Wc1K2.js","assets/toggle-group-BWfFiqCs.js","assets/select-model-Dxld4BD0.js","assets/ai-providers-logos-DD3qZ33J.js","assets/use-debounced-autosave-Dte_kAEO.js","assets/settings-section-ylY0I5Aj.js","assets/card-DvnenXSp.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/unwrap-tool-result-BYXdCQMg.js","assets/index-DXgWutpH.js","assets/question-004-sINsf4GQ.js","assets/connection-slug-eyAPH6o3.js","assets/connection-card-B9jp4WAJ.js","assets/use-registry-connections-B1vXrR3c.js","assets/useInfiniteQuery-BthTp29S.js","assets/infiniteQueryObserver-CNdVc6Pq.js","assets/collection-tabs-DIzWCpJi.js","assets/badge-CKCe4xFX.js","assets/textarea-DI97iX9T.js","assets/connection-form-helpers-DGIGa0jl.js","assets/use-infinite-scroll-Bg90tKAp.js","assets/useSuspenseInfiniteQuery-5Axxf4Tp.js","assets/collection-search-D3JPMk2G.js","assets/use-create-virtual-mcp-A4WarYTW.js","assets/empty-state-Cr_Sv9jS.js","assets/task-status-CrVRLNAn.js","assets/index-BrlUjE-e.js","assets/command-CqNHzNfW.js","assets/index-CvjZRJAq.js","assets/use-status-sounds-Dlkg0R7f.js","assets/accordion-DlRvrND8.js","assets/user-BMeM8_Kh.js","assets/tools-list-C7QpB8eo.js","assets/scroll-area-C_N1tWNB.js","assets/view-mode-toggle-C9wA8R9s.js","assets/automation-list-row-Dw0awDhm.js","assets/search-input-oOemXj8U.js","assets/index-DDGTF8rc.css","assets/index-DbwpM0oT.js","assets/settings-layout-Db_7efbC.js","assets/connections-CPceMglQ.js","assets/collection-display-button-DYp1JCHl.js","assets/use-delete-connection-D0RH1aQq.js","assets/use-list-state-Dkv7POhH.js","assets/use-view-mode-WSdAEAZS.js","assets/connection-detail-O5xxE160.js","assets/index-B6Qwj9ip.js","assets/index-CpASz2l8.js","assets/index-DUvCyy06.js","assets/use-members-Bf9_euWt.js","assets/use-org-auth-client-CpJqPVuH.js","assets/layout-CfRuPQpD.js","assets/monitoring-stats-row-nN00-ahk.js","assets/collection-detail-D3e0mmMi.js","assets/index-CghtC7iY.js","assets/monaco-editor-DHBFS1Nz.js","assets/empty-state-BloqPoX9.js","assets/index-C27CjGg7.js","assets/table-CWTAYJ6R.js","assets/general-k-j41zoM.js","assets/domain-settings-D94uqHZi.js","assets/features-DQcaVbot.js","assets/brand-context-CFjUKEZZ.js","assets/ai-providers-hlFksDgI.js","assets/members-INSx14IN.js","assets/collection-table-wrapper-hKs78OI7.js","assets/use-organization-roles-D9esIXeR.js","assets/roles-BLdL9t1d.js","assets/sso-yKSnL6cT.js","assets/profile-BUQJJNtu.js","assets/store-DVfL7GG2.js","assets/workflow-CoAUdsHF.js","assets/workflow-detail-Dw2RzGR4.js","assets/org-plugin-layout-DijtR-Yn.js","assets/plugin-layout-COwnJfBo.js","assets/agents-list-h-PZw07V.js","assets/automations-DgSOIlaP.js","assets/dynamic-plugin-layout-CugRGU7x.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function z$(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const F$="modulepreload",B$=function(e){return"/"+e},X2={},At=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");i=l(n.map(f=>{if(f=B$(f),f in X2)return;X2[f]=!0;const m=f.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const g=document.createElement("link");if(g.rel=m?"stylesheet":F$,m||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),m)return new Promise((v,y)=>{g.addEventListener("load",v),g.addEventListener("error",()=>y(Error(`Unable to preload CSS for ${f}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return i.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};var ele=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function la(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var __={exports:{}},Bu={};var J2;function V$(){if(J2)return Bu;J2=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,s){var l=null;if(s!==void 0&&(l=""+s),i.key!==void 0&&(l=""+i.key),"key"in i){s={};for(var c in i)c!=="key"&&(s[c]=i[c])}else s=i;return i=s.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:s}}return Bu.Fragment=t,Bu.jsx=n,Bu.jsxs=n,Bu}var eO;function q$(){return eO||(eO=1,__.exports=V$()),__.exports}var T=q$(),y_={exports:{}},Vu={},b_={exports:{}},w_={};var tO;function H$(){return tO||(tO=1,(function(e){function t(q,W){var ee=q.length;q.push(W);e:for(;0<ee;){var ae=ee-1>>>1,Q=q[ae];if(0<i(Q,W))q[ae]=W,q[ee]=Q,ee=ae;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var W=q[0],ee=q.pop();if(ee!==W){q[0]=ee;e:for(var ae=0,Q=q.length,k=Q>>>1;ae<k;){var K=2*(ae+1)-1,V=q[K],D=K+1,F=q[D];if(0>i(V,ee))D<Q&&0>i(F,V)?(q[ae]=F,q[D]=ee,ae=D):(q[ae]=V,q[K]=ee,ae=K);else if(D<Q&&0>i(F,ee))q[ae]=F,q[D]=ee,ae=D;else break e}}return W}function i(q,W){var ee=q.sortIndex-W.sortIndex;return ee!==0?ee:q.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],f=[],m=1,p=null,g=3,v=!1,y=!1,b=!1,x=!1,S=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function C(q){for(var W=n(f);W!==null;){if(W.callback===null)r(f);else if(W.startTime<=q)r(f),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(f)}}function O(q){if(b=!1,C(q),!y)if(n(d)!==null)y=!0,A||(A=!0,B());else{var W=n(f);W!==null&&re(O,W.startTime-q)}}var A=!1,M=-1,P=5,L=-1;function H(){return x?!0:!(e.unstable_now()-L<P)}function j(){if(x=!1,A){var q=e.unstable_now();L=q;var W=!0;try{e:{y=!1,b&&(b=!1,E(M),M=-1),v=!0;var ee=g;try{t:{for(C(q),p=n(d);p!==null&&!(p.expirationTime>q&&H());){var ae=p.callback;if(typeof ae=="function"){p.callback=null,g=p.priorityLevel;var Q=ae(p.expirationTime<=q);if(q=e.unstable_now(),typeof Q=="function"){p.callback=Q,C(q),W=!0;break t}p===n(d)&&r(d),C(q)}else r(d);p=n(d)}if(p!==null)W=!0;else{var k=n(f);k!==null&&re(O,k.startTime-q),W=!1}}break e}finally{p=null,g=ee,v=!1}W=void 0}}finally{W?B():A=!1}}}var B;if(typeof R=="function")B=function(){R(j)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,Z=U.port2;U.port1.onmessage=j,B=function(){Z.postMessage(null)}}else B=function(){S(j,0)};function re(q,W){M=S(function(){q(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(q){switch(g){case 1:case 2:case 3:var W=3;break;default:W=g}var ee=g;g=W;try{return q()}finally{g=ee}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(q,W){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var ee=g;g=q;try{return W()}finally{g=ee}},e.unstable_scheduleCallback=function(q,W,ee){var ae=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ae+ee:ae):ee=ae,q){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=ee+Q,q={id:m++,callback:W,priorityLevel:q,startTime:ee,expirationTime:Q,sortIndex:-1},ee>ae?(q.sortIndex=ee,t(f,q),n(d)===null&&q===n(f)&&(b?(E(M),M=-1):b=!0,re(O,ee-ae))):(q.sortIndex=Q,t(d,q),y||v||(y=!0,A||(A=!0,B()))),q},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(q){var W=g;return function(){var ee=g;g=W;try{return q.apply(this,arguments)}finally{g=ee}}}})(w_)),w_}var nO;function G$(){return nO||(nO=1,b_.exports=H$()),b_.exports}var S_={exports:{}},rt={};var rO;function K$(){if(rO)return rt;rO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function v(k){return k===null||typeof k!="object"?null:(k=g&&k[g]||k["@@iterator"],typeof k=="function"?k:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,x={};function S(k,K,V){this.props=k,this.context=K,this.refs=x,this.updater=V||y}S.prototype.isReactComponent={},S.prototype.setState=function(k,K){if(typeof k!="object"&&typeof k!="function"&&k!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,k,K,"setState")},S.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function E(){}E.prototype=S.prototype;function R(k,K,V){this.props=k,this.context=K,this.refs=x,this.updater=V||y}var C=R.prototype=new E;C.constructor=R,b(C,S.prototype),C.isPureReactComponent=!0;var O=Array.isArray;function A(){}var M={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function L(k,K,V){var D=V.ref;return{$$typeof:e,type:k,key:K,ref:D!==void 0?D:null,props:V}}function H(k,K){return L(k.type,K,k.props)}function j(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function B(k){var K={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(V){return K[V]})}var U=/\/+/g;function Z(k,K){return typeof k=="object"&&k!==null&&k.key!=null?B(""+k.key):K.toString(36)}function re(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(A,A):(k.status="pending",k.then(function(K){k.status==="pending"&&(k.status="fulfilled",k.value=K)},function(K){k.status==="pending"&&(k.status="rejected",k.reason=K)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function q(k,K,V,D,F){var X=typeof k;(X==="undefined"||X==="boolean")&&(k=null);var fe=!1;if(k===null)fe=!0;else switch(X){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(k.$$typeof){case e:case t:fe=!0;break;case m:return fe=k._init,q(fe(k._payload),K,V,D,F)}}if(fe)return F=F(k),fe=D===""?"."+Z(k,0):D,O(F)?(V="",fe!=null&&(V=fe.replace(U,"$&/")+"/"),q(F,K,V,"",function(Ue){return Ue})):F!=null&&(j(F)&&(F=H(F,V+(F.key==null||k&&k.key===F.key?"":(""+F.key).replace(U,"$&/")+"/")+fe)),K.push(F)),1;fe=0;var pe=D===""?".":D+":";if(O(k))for(var xe=0;xe<k.length;xe++)D=k[xe],X=pe+Z(D,xe),fe+=q(D,K,V,X,F);else if(xe=v(k),typeof xe=="function")for(k=xe.call(k),xe=0;!(D=k.next()).done;)D=D.value,X=pe+Z(D,xe++),fe+=q(D,K,V,X,F);else if(X==="object"){if(typeof k.then=="function")return q(re(k),K,V,D,F);throw K=String(k),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return fe}function W(k,K,V){if(k==null)return k;var D=[],F=0;return q(k,D,"","",function(X){return K.call(V,X,F++)}),D}function ee(k){if(k._status===-1){var K=k._result;K=K(),K.then(function(V){(k._status===0||k._status===-1)&&(k._status=1,k._result=V)},function(V){(k._status===0||k._status===-1)&&(k._status=2,k._result=V)}),k._status===-1&&(k._status=0,k._result=K)}if(k._status===1)return k._result.default;throw k._result}var ae=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},Q={map:W,forEach:function(k,K,V){W(k,function(){K.apply(this,arguments)},V)},count:function(k){var K=0;return W(k,function(){K++}),K},toArray:function(k){return W(k,function(K){return K})||[]},only:function(k){if(!j(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return rt.Activity=p,rt.Children=Q,rt.Component=S,rt.Fragment=n,rt.Profiler=i,rt.PureComponent=R,rt.StrictMode=r,rt.Suspense=d,rt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,rt.__COMPILER_RUNTIME={__proto__:null,c:function(k){return M.H.useMemoCache(k)}},rt.cache=function(k){return function(){return k.apply(null,arguments)}},rt.cacheSignal=function(){return null},rt.cloneElement=function(k,K,V){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var D=b({},k.props),F=k.key;if(K!=null)for(X in K.key!==void 0&&(F=""+K.key),K)!P.call(K,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&K.ref===void 0||(D[X]=K[X]);var X=arguments.length-2;if(X===1)D.children=V;else if(1<X){for(var fe=Array(X),pe=0;pe<X;pe++)fe[pe]=arguments[pe+2];D.children=fe}return L(k.type,F,D)},rt.createContext=function(k){return k={$$typeof:l,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:s,_context:k},k},rt.createElement=function(k,K,V){var D,F={},X=null;if(K!=null)for(D in K.key!==void 0&&(X=""+K.key),K)P.call(K,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(F[D]=K[D]);var fe=arguments.length-2;if(fe===1)F.children=V;else if(1<fe){for(var pe=Array(fe),xe=0;xe<fe;xe++)pe[xe]=arguments[xe+2];F.children=pe}if(k&&k.defaultProps)for(D in fe=k.defaultProps,fe)F[D]===void 0&&(F[D]=fe[D]);return L(k,X,F)},rt.createRef=function(){return{current:null}},rt.forwardRef=function(k){return{$$typeof:c,render:k}},rt.isValidElement=j,rt.lazy=function(k){return{$$typeof:m,_payload:{_status:-1,_result:k},_init:ee}},rt.memo=function(k,K){return{$$typeof:f,type:k,compare:K===void 0?null:K}},rt.startTransition=function(k){var K=M.T,V={};M.T=V;try{var D=k(),F=M.S;F!==null&&F(V,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(A,ae)}catch(X){ae(X)}finally{K!==null&&V.types!==null&&(K.types=V.types),M.T=K}},rt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},rt.use=function(k){return M.H.use(k)},rt.useActionState=function(k,K,V){return M.H.useActionState(k,K,V)},rt.useCallback=function(k,K){return M.H.useCallback(k,K)},rt.useContext=function(k){return M.H.useContext(k)},rt.useDebugValue=function(){},rt.useDeferredValue=function(k,K){return M.H.useDeferredValue(k,K)},rt.useEffect=function(k,K){return M.H.useEffect(k,K)},rt.useEffectEvent=function(k){return M.H.useEffectEvent(k)},rt.useId=function(){return M.H.useId()},rt.useImperativeHandle=function(k,K,V){return M.H.useImperativeHandle(k,K,V)},rt.useInsertionEffect=function(k,K){return M.H.useInsertionEffect(k,K)},rt.useLayoutEffect=function(k,K){return M.H.useLayoutEffect(k,K)},rt.useMemo=function(k,K){return M.H.useMemo(k,K)},rt.useOptimistic=function(k,K){return M.H.useOptimistic(k,K)},rt.useReducer=function(k,K,V){return M.H.useReducer(k,K,V)},rt.useRef=function(k){return M.H.useRef(k)},rt.useState=function(k){return M.H.useState(k)},rt.useSyncExternalStore=function(k,K,V){return M.H.useSyncExternalStore(k,K,V)},rt.useTransition=function(){return M.H.useTransition()},rt.version="19.2.5",rt}var iO;function ca(){return iO||(iO=1,S_.exports=K$()),S_.exports}var E_={exports:{}},yr={};var oO;function Z$(){if(oO)return yr;oO=1;var e=ca();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function s(d,f,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:d,containerInfo:f,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return yr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,yr.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return s(d,f,null,m)},yr.flushSync=function(d){var f=l.T,m=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=m,r.d.f()}},yr.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},yr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},yr.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,p=c(m,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:v}):m==="script"&&r.d.X(d,{crossOrigin:p,integrity:g,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},yr.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=c(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},yr.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,p=c(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},yr.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=c(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},yr.requestFormReset=function(d){r.d.r(d)},yr.unstable_batchedUpdates=function(d,f){return d(f)},yr.useFormState=function(d,f,m){return l.H.useFormState(d,f,m)},yr.useFormStatus=function(){return l.H.useHostTransitionStatus()},yr.version="19.2.5",yr}var sO;function IM(){if(sO)return E_.exports;sO=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),E_.exports=Z$(),E_.exports}var aO;function Y$(){if(aO)return Vu;aO=1;var e=G$(),t=ca(),n=IM();function r(o){var a="https://react.dev/errors/"+o;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+o+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function s(o){var a=o,u=o;if(o.alternate)for(;a.return;)a=a.return;else{o=a;do a=o,(a.flags&4098)!==0&&(u=a.return),o=a.return;while(o)}return a.tag===3?u:null}function l(o){if(o.tag===13){var a=o.memoizedState;if(a===null&&(o=o.alternate,o!==null&&(a=o.memoizedState)),a!==null)return a.dehydrated}return null}function c(o){if(o.tag===31){var a=o.memoizedState;if(a===null&&(o=o.alternate,o!==null&&(a=o.memoizedState)),a!==null)return a.dehydrated}return null}function d(o){if(s(o)!==o)throw Error(r(188))}function f(o){var a=o.alternate;if(!a){if(a=s(o),a===null)throw Error(r(188));return a!==o?null:o}for(var u=o,h=a;;){var _=u.return;if(_===null)break;var w=_.alternate;if(w===null){if(h=_.return,h!==null){u=h;continue}break}if(_.child===w.child){for(w=_.child;w;){if(w===u)return d(_),o;if(w===h)return d(_),a;w=w.sibling}throw Error(r(188))}if(u.return!==h.return)u=_,h=w;else{for(var N=!1,$=_.child;$;){if($===u){N=!0,u=_,h=w;break}if($===h){N=!0,h=_,u=w;break}$=$.sibling}if(!N){for($=w.child;$;){if($===u){N=!0,u=w,h=_;break}if($===h){N=!0,h=w,u=_;break}$=$.sibling}if(!N)throw Error(r(189))}}if(u.alternate!==h)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?o:a}function m(o){var a=o.tag;if(a===5||a===26||a===27||a===6)return o;for(o=o.child;o!==null;){if(a=m(o),a!==null)return a;o=o.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),R=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),j=Symbol.iterator;function B(o){return o===null||typeof o!="object"?null:(o=j&&o[j]||o["@@iterator"],typeof o=="function"?o:null)}var U=Symbol.for("react.client.reference");function Z(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===U?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case b:return"Fragment";case S:return"Profiler";case x:return"StrictMode";case O:return"Suspense";case A:return"SuspenseList";case L:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case y:return"Portal";case R:return o.displayName||"Context";case E:return(o._context.displayName||"Context")+".Consumer";case C:var a=o.render;return o=o.displayName,o||(o=a.displayName||a.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case M:return a=o.displayName||null,a!==null?a:Z(o.type)||"Memo";case P:a=o._payload,o=o._init;try{return Z(o(a))}catch{}}return null}var re=Array.isArray,q=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},ae=[],Q=-1;function k(o){return{current:o}}function K(o){0>Q||(o.current=ae[Q],ae[Q]=null,Q--)}function V(o,a){Q++,ae[Q]=o.current,o.current=a}var D=k(null),F=k(null),X=k(null),fe=k(null);function pe(o,a){switch(V(X,a),V(F,o),V(D,null),a.nodeType){case 9:case 11:o=(o=a.documentElement)&&(o=o.namespaceURI)?w2(o):0;break;default:if(o=a.tagName,a=a.namespaceURI)a=w2(a),o=S2(a,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}K(D),V(D,o)}function xe(){K(D),K(F),K(X)}function Ue(o){o.memoizedState!==null&&V(fe,o);var a=D.current,u=S2(a,o.type);a!==u&&(V(F,o),V(D,u))}function Y(o){F.current===o&&(K(D),K(F)),fe.current===o&&(K(fe),ju._currentValue=ee)}var te,ve;function se(o){if(te===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);te=a&&a[1]||"",ve=-1<u.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+te+o+ve}var we=!1;function Oe(o,a){if(!o||we)return"";we=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(a){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(ge){var he=ge}Reflect.construct(o,[],Se)}else{try{Se.call()}catch(ge){he=ge}o.call(Se.prototype)}}else{try{throw Error()}catch(ge){he=ge}(Se=o())&&typeof Se.catch=="function"&&Se.catch(function(){})}}catch(ge){if(ge&&he&&typeof ge.stack=="string")return[ge.stack,he.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var _=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");_&&_.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=h.DetermineComponentFrameRoot(),N=w[0],$=w[1];if(N&&$){var J=N.split(`
|
|
@@ -168,4 +168,4 @@ ${r}
|
|
|
168
168
|
${r}
|
|
169
169
|
}`)}if(n.length>0){const r=document.createElement("style");r.id="mesh-theme-overrides",r.textContent=n.join(`
|
|
170
170
|
|
|
171
|
-
`),document.head.appendChild(r)}}function Jse(e){const t=Ro.c(9),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:GM.publicConfig(),queryFn:Qse,staleTime:1/0},t[0]=r):r=t[0];const{data:i}=HM(r),[s]=Yse();i.internalUrl&&Use(i.internalUrl);let l,c;t[1]!==i.theme?(l=()=>{Xse(i.theme)},c=[i.theme],t[1]=i.theme,t[2]=l,t[3]=c):(l=t[2],c=t[3]),I.useLayoutEffect(l,c);let d,f;t[4]!==s.theme?(d=()=>{const p=document.documentElement;if(s.theme==="dark"){p.classList.add("dark");return}if(s.theme==="light"){p.classList.remove("dark");return}const g=window.matchMedia("(prefers-color-scheme: dark)"),v=b=>p.classList.toggle("dark",b);v(g.matches);const y=b=>v(b.matches);return g.addEventListener("change",y),()=>g.removeEventListener("change",y)},f=[s.theme],t[4]=s.theme,t[5]=d,t[6]=f):(d=t[5],f=t[6]),I.useLayoutEffect(d,f);let m;return t[7]!==n?(m=T.jsx(T.Fragment,{children:n}),t[7]=n,t[8]=m):m=t[8],m}const eae=new bj({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});function tae(e){const t=Ro.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=T.jsx(hH,{}),t[0]=r):r=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=T.jsx(jD,{}),t[1]=i):i=t[1];let s;return t[2]!==n?(s=T.jsxs(wj,{client:eae,children:[r,T.jsx(I.Suspense,{fallback:i,children:T.jsx(Jse,{children:T.jsx(Lj,{children:T.jsx(Fee,{children:T.jsx(Wne,{children:n})})})})})]}),t[2]=n,t[3]=s):s=t[3],s}function nae(...e){return BP(pw(e))}const rae=y4("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:hover:bg-input/50 card-shadow",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",success:"bg-success text-success-foreground hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",special:"bg-special text-special-foreground hover:bg-special/90 focus-visible:ring-special/20 dark:focus-visible:ring-special/40",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-8 px-3 has-[>svg]:px-2.5",sm:"h-7 gap-1.5 px-2.5 has-[>svg]:px-2",xs:"h-6 gap-1 px-1.5 text-xs has-[>svg]:px-1",lg:"h-10 px-3.5 has-[>svg]:px-3",icon:"size-8","icon-sm":"size-7"}},defaultVariants:{variant:"default",size:"default"}});function W1(e){const t=Ro.c(14);let n,r,i,s,l;t[0]!==e?({className:n,variant:l,size:i,asChild:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=l):(n=t[1],r=t[2],i=t[3],s=t[4],l=t[5]);const d=(s===void 0?!1:s)?jw:"button";let f;t[6]!==n||t[7]!==i||t[8]!==l?(f=nae(rae({variant:l,size:i,className:n})),t[6]=n,t[7]=i,t[8]=l,t[9]=f):f=t[9];let m;return t[10]!==d||t[11]!==r||t[12]!==f?(m=T.jsx(d,{"data-slot":"button",className:f,...r}),t[10]=d,t[11]=r,t[12]=f,t[13]=m):m=t[13],m}const CM="__mesh_chunk_reload_ts";function AM(e){if(!e)return!1;const t=e.message||"";return t.includes("Failed to fetch dynamically imported module")||t.includes("Importing a module script failed")||t.includes("error loading dynamically imported module")||t.includes("Failed to fetch")&&e.name==="TypeError"}class ice extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n),kD(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null})}resetError=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError){const{fallback:t}=this.props;return typeof t=="function"?t({error:this.state.error,resetError:this.resetError}):t!==void 0?t:T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(NS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(W1,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}class iae extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n);const r=AM(t);if(kD(t,{boundary:"chunk_root",is_chunk_load_error:r,error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!r)return;const i=sessionStorage.getItem(CM),s=Date.now();(!i||s-Number(i)>1e4)&&(sessionStorage.setItem(CM,String(s)),window.location.reload())}render(){return this.state.hasError&&AM(this.state.error)?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:T.jsx($D,{className:"h-6 w-6 text-primary"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"New version available"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:"A new version has been deployed. Refresh to continue."})]}),T.jsx(W1,{onClick:()=>window.location.reload(),children:"Refresh"})]}):this.state.hasError?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(NS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(W1,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}const oae="MCP Workflows",sae="Create workflows using your MCP tools",aae=I.lazy(()=>At(()=>import("./plugin-header-NjqXhQtY.js"),__vite__mapDeps([0,1,2]))),lae=I.lazy(()=>At(()=>import("./plugin-empty-state-CfM59nCo.js"),[])),cae={id:oae,description:sae,bindingName:"WORKFLOW",renderHeader:e=>T.jsx(aae,{...e}),renderEmptyState:()=>T.jsx(lae,{}),setup:e=>{e.registerSettingsSidebarItem({key:"workflows",icon:T.jsx(DD,{size:14}),label:"MCP Workflows",to:"/$org/settings/workflows"})}},uae=[cae],ma=t7({component:()=>T.jsx(iae,{children:T.jsx(tae,{children:T.jsx(I.Suspense,{fallback:T.jsx(jD,{}),children:T.jsx(mP,{})})})})}),dae=mt({getParentRoute:()=>ma,path:"/login",component:It(()=>At(()=>import("./login-DH2jR76t.js"),__vite__mapDeps([3,4]))),validateSearch:ul(()=>Ee({next:z().optional(),client_id:z().optional(),redirect_uri:z().optional(),response_type:z().optional(),state:z().optional(),scope:z().optional(),code_challenge:z().optional(),code_challenge_method:z().optional()}))}),fae=mt({getParentRoute:()=>ma,path:"/reset-password",component:It(()=>At(()=>import("./reset-password-D4lmEYTa.js"),__vite__mapDeps([5,4]))),validateSearch:ul(()=>Ee({token:z().optional(),error:z().optional()}))}),hae=mt({getParentRoute:()=>ma,path:"/auth/$pathname",component:It(()=>At(()=>import("./auth-catchall-Bcv_GEN6.js"),[]))}),pae=mt({getParentRoute:()=>ma,path:"/oauth/callback",component:It(()=>At(()=>import("./oauth-callback-CHbPqwkB.js"),[]))}),mae=mt({getParentRoute:()=>ma,path:"/oauth/callback/ai-provider",component:It(()=>At(()=>import("./oauth-callback-ai-provider-CplqstnV.js"),[]))}),rE=mt({getParentRoute:()=>ma,id:"shell",component:It(()=>At(()=>import("./shell-layout-5q7_gZ4N.js").then(e=>e.s),__vite__mapDeps([6,7,8,9,10,11,12,13,14,15])))}),gae=mt({getParentRoute:()=>rE,path:"/",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(!e)return;const t=localStorage.getItem(Rg.lastOrgSlug());if(t){if(e.some(i=>i.slug===t))throw Oc({to:"/$org",params:{org:t}});localStorage.removeItem(Rg.lastOrgSlug())}const n=e[0];throw Oc(n?{to:"/$org",params:{org:n.slug}}:{to:"/onboarding"})}}),vae=mt({getParentRoute:()=>ma,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(e&&e.length>0)throw Oc({to:"/"})},component:It(()=>At(()=>import("./onboarding-DuPaOSsv.js"),__vite__mapDeps([16,9,4,17,18,19,20])))}),iE=mt({getParentRoute:()=>rE,path:"/$org",component:It(()=>At(()=>import("./org-layout-C7TZf2Jg.js"),[]))}),oE=mt({getParentRoute:()=>iE,id:"org-shell",component:It(()=>At(()=>import("./index-DR3jGuDX.js"),__vite__mapDeps([21,22,23,8,24,25,26,27,28,29,30,31,32,33,18,19,1,2,34,35,36,37,38,20,39,40,15,41,42,43,44,45,46,47,48,6,7,9,10,11,12,13,14,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,17,4,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106])))}),sE=mt({getParentRoute:()=>oE,id:"agent-shell",component:It(()=>At(()=>import("./index-r9M0EnR_.js"),__vite__mapDeps([107,69,7,8,70,4,71,11,12,72,73,56,29,74,39,75,1,15,25,26,27,28,30,31,32,33,18,19,2,34,35,36,37,38,20,22,23,40,41,42,43,44,45,46,47,48,76,77,78,63,60,68,55,57,58,59,10,13,6,9,14,49,50,51,52,53,54,79,66,17,80,81,82,83,61,84,85,86,87,64,65,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,108,109,62,24,67,103,104,105,106,110,111,112,113,114,115,116,117,118])))}),_ae=Ee({virtualmcpid:z().optional(),tab:z().optional(),main:z().optional(),id:z().optional(),toolName:z().optional(),tasks:St().optional(),mainOpen:St().optional(),chat:St().optional(),autosend:z().optional()}),O6=mt({getParentRoute:()=>sE,path:"/$taskId",validateSearch:_ae,component:()=>null}),yae=mt({getParentRoute:()=>oE,path:"/",component:It(()=>At(()=>import("./index-CdGladh1.js"),__vite__mapDeps([119,60,37,25,26,27,28,29,30,31,32,33,18,19,1,2,34,35,36,38,20,39,22,23,8,40,15,41,42,43,44,45,46,47,48,61,12,56,11,13,72,73,7,74,75,71,76,77,78,63,68,69,70,4,55,57,58,59,10,6,9,14,49,50,51,52,53,54,79,66,17,80,81,82,83,84,85,86,87,64,65,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,104])))}),Pn=mt({getParentRoute:()=>iE,path:"/settings",component:It(()=>At(()=>import("./settings-layout-Czl6BZ2k.js"),__vite__mapDeps([120,22,23,8,30,33,18,34,15,45,47,48,110,91,58,59])))}),bae=mt({getParentRoute:()=>Pn,path:"/",beforeLoad:({params:e})=>{throw Oc({to:"/$org/settings/general",params:{org:e.org}})},component:()=>null}),wae=mt({getParentRoute:()=>Pn,path:"/connections",component:It(()=>At(()=>import("./connections-CkFp7lWx.js"),__vite__mapDeps([121,77,78,122,80,1,34,36,28,23,115,98,117,39,97,93,92,94,71,11,12,13,95,96,76,87,60,37,25,26,27,29,30,31,32,33,18,19,2,35,38,20,22,8,40,15,41,42,43,44,45,46,47,48,105,123,65,101,124,125,75,7,63,66,17,4,81,99,56,100]))),validateSearch:ul(()=>Ee({action:dn(["create"]).optional(),tab:dn(["all","connected"]).optional()}))}),Sae=mt({getParentRoute:()=>Pn,path:"/connections/$appSlug",component:It(()=>At(()=>import("./connection-detail-Bnk5mfLJ.js"),__vite__mapDeps([126,77,78,105,100,4,43,46,127,12,68,25,26,27,28,29,30,31,32,33,18,19,1,2,34,35,36,37,38,20,39,22,23,8,40,15,41,42,44,45,47,48,71,11,128,129,76,94,13,81,109,62,56,104,73,113,98,54,130,131,64,79,60,66,17,123,65,132,133,92,74,87,80]))),validateSearch:ul(()=>Ee({tab:z().optional()}))}),Eae=mt({getParentRoute:()=>Pn,path:"/connections/$appSlug/$collectionName/$itemId",component:It(()=>At(()=>import("./collection-detail-DrhrluPo.js"),__vite__mapDeps([134,105,11,12,66,17,4,99,132,22,23,8,135,128,78,129,56,136,50,111,25,26,27,28,29,30,31,32,33,18,19,1,2,34,35,36,37,38,20,39,40,15,41,42,43,44,45,46,47,48,98,81,115,71,68,7,90,80,60,114,67,137,59,54,127,76,77,94,13,109,62,104,73,92,113,53,55,57,58,10,6,9,14]))),validateSearch:ul(()=>Ee({replayId:z().optional()}))}),xae=mt({getParentRoute:()=>Pn,path:"/monitor",component:It(()=>At(()=>import("./index-Cb6Wqswz.js"),__vite__mapDeps([138,117,39,22,23,8,105,98,62,1,31,42,25,26,27,28,29,30,32,33,18,19,2,34,35,36,37,38,20,40,15,41,43,44,45,46,47,48,136,50,130,131,71,11,12,56,4,75,108,109,81,114,99,97,70,17,60,64,87,133,129,68,92,102,96,139,101,95,49,51,52,7,53,54,55,57,58,59,10,13,6,9,14,106]))),validateSearch:ul(()=>Ee({tab:dn(["overview","audit","threads"]).default("overview"),from:z().default("now-30m"),to:z().default("now"),connectionId:Ie(z()).optional().default([]),virtualMcpId:Ie(z()).optional().default([]),tool:z().default(""),status:dn(["all","success","errors"]).default("all"),search:z().default(""),page:St().optional(),streaming:Pt().default(!0),propertyFilters:z().default(""),hideSystem:Pt().default(!1)}))}),Rae=mt({getParentRoute:()=>Pn,path:"/general",component:It(()=>At(()=>import("./general-BmiXpGpO.js"),__vite__mapDeps([140,22,23,8,131,85,64,47,4,86,87,32,141,89,12,70,103,39,56,11,62,61,25,26,27,28,29,30,31,33,18,19,1,2,34,35,36,37,38,20,40,15,41,42,43,44,45,46,48,60,13])))}),Oae=mt({getParentRoute:()=>Pn,path:"/features",component:It(()=>At(()=>import("./features-D4XsJcYn.js"),__vite__mapDeps([142,22,23,8,13,12,70,37,86,87,32])))}),Tae=mt({getParentRoute:()=>Pn,path:"/brand-context",component:It(()=>At(()=>import("./brand-context-CoQwouQo.js"),__vite__mapDeps([143,12,2,34,38,40,43,46,48,65,4,99,22,23,8,89,85])))}),Cae=mt({getParentRoute:()=>Pn,path:"/ai-providers",component:It(()=>At(()=>import("./ai-providers-BTHVSznc.js"),__vite__mapDeps([144,83,75,1,4,7,8,63,23,81,2,35,61,27,29,39,44,57,12,55,56,11,58,59,10,13,84,48,85,26,19,46,22,86,87,32,70,82,64,47,65,88,52,89])))}),Aae=mt({getParentRoute:()=>Pn,path:"/members",component:It(()=>At(()=>import("./members-xakt_nq_.js"),__vite__mapDeps([145,122,80,1,34,36,28,23,115,98,117,39,22,8,146,139,105,7,66,17,81,2,35,99,131,147,130,12,65,64,47,87,45,46,75,108,109,62,43])))}),Iae=mt({getParentRoute:()=>Pn,path:"/roles",component:It(()=>At(()=>import("./roles-CWsuEaZG.js"),__vite__mapDeps([148,147,131,98,65,80,1,34,36,15,43,46,146,139,28,22,23,8,105,117,39,84,60,37,25,26,27,29,30,31,32,33,18,19,2,35,38,20,40,41,42,44,45,47,48,101,75,102,96,12,74,130,71,11,57,64,70,86,87]))),validateSearch:ul(()=>Ee({role:z().optional()}))}),Mae=mt({getParentRoute:()=>Pn,path:"/sso",component:It(()=>At(()=>import("./sso-CQ_IeGcT.js"),__vite__mapDeps([149,141,89,12,70,86,87,32,22,23,8,4,14,46])))}),Pae=mt({getParentRoute:()=>Pn,path:"/profile",component:It(()=>At(()=>import("./profile-DR5MZQYT.js"),__vite__mapDeps([150,22,23,8,64,47,70,81,1,2,35,82,4,41,42,85,91,67,86,87,32])))}),Nae=mt({getParentRoute:()=>Pn,path:"/store",component:It(()=>At(()=>import("./store-Cx374GVe.js"),__vite__mapDeps([151,26,34,43,46,4,70,61,64,47,62,71,11,12,22,23,8,94,13,86,87,32])))}),kae=mt({getParentRoute:()=>Pn,path:"/registry",component:It(()=>At(()=>import("./registry-D_qBGD1h.js"),[]))}),Dae=mt({getParentRoute:()=>Pn,path:"/store/registry",component:It(()=>At(()=>import("./store-registry-BxAYDZYi.js"),[]))}),Lae=mt({getParentRoute:()=>Pn,path:"/workflows",component:It(()=>At(()=>import("./workflow-bf9m4gQp.js"),__vite__mapDeps([152,12,77,78,122,80,1,34,36,28,23,115,98,74,39,87,60,37,25,26,27,29,30,31,32,33,18,19,2,35,38,20,22,8,40,15,41,42,43,44,45,46,47,48,146,139,137,112,64,105,124,125,92,65,11,71,132])))}),$ae=mt({getParentRoute:()=>Pn,path:"/workflows/$itemId",component:It(()=>At(()=>import("./workflow-detail-_fTRA7hJ.js"),__vite__mapDeps([153,135,128,12,78,129,56,11,136,50,111,25,26,27,28,29,30,31,32,33,18,19,1,2,34,35,36,37,38,20,39,22,23,8,40,15,41,42,43,44,45,46,47,48,98,81,115,132,71,68,7,90,80,60,114,67,137,59,4])))}),jae=mt({getParentRoute:()=>sE,path:"/plugins/$pluginId",component:It(()=>At(()=>import("./org-plugin-layout-ytui8nvZ.js"),__vite__mapDeps([154,155,71,11,12,44,22,23,8])))}),Uae=mt({getParentRoute:()=>Pn,path:"/agents",component:It(()=>At(()=>import("./agents-list-Bm5Akk_I.js"),__vite__mapDeps([156,80,1,34,36,18,72,12,73,56,11,7,8,29,74,39,75,71,15,25,26,27,28,30,31,32,33,19,2,35,37,38,20,22,23,40,41,42,43,44,45,46,47,48,76,77,78,63,60,68,87,88,52,105,104,65,117])))}),zae=mt({getParentRoute:()=>Pn,path:"/automations",component:It(()=>At(()=>import("./automations-CkpX1bDz.js"),__vite__mapDeps([157,43,48,117,39,22,23,8,105,116,65,80,1,34,36,25,26,27,28,29,30,31,32,33,18,19,2,35,37,38,20,40,15,41,42,44,45,46,47,56,11,12,73])))}),T6=mt({getParentRoute:()=>O6,path:"/$pluginId",component:It(()=>At(()=>import("./dynamic-plugin-layout-9QCXXZSv.js"),__vite__mapDeps([158,155,71,11,12,44,22,23,8])))}),Fae=[],Bae=[],Vae=[],C6=[];uae.forEach(e=>{if(!e.setup)return;const t={parentRoute:T6,routing:{createRoute:mt,lazyRouteComponent:It},registerRootSidebarItem:n=>Fae.push({pluginId:e.id,...n}),registerSidebarGroup:n=>Bae.push({pluginId:e.id,...n}),registerSettingsSidebarItem:n=>Vae.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{C6.push(...n)}};e.setup(t)});const qae=T6.addChildren(C6),Hae=Pn.addChildren([bae,wae,Sae,Eae,Uae,zae,xae,Rae,Oae,Tae,Cae,Aae,Iae,Mae,Pae,Nae,Dae,kae,Lae,$ae]),Gae=O6.addChildren([qae]),Kae=sE.addChildren([Gae,jae]),Zae=oE.addChildren([yae,Kae]),Yae=iE.addChildren([Zae,Hae]),Wae=rE.addChildren([gae,Yae]),Qae=ma.addChildren([Wae,vae,dae,fae,hae,pae,mae]),Xae=u7({routeTree:Qae,defaultNotFoundComponent:()=>T.jsx("div",{className:"flex h-full items-center justify-center",children:T.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[T.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Page not found"}),T.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:"The page you are looking for does not exist or has been moved."}),T.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"text-sm text-primary hover:underline",children:"Go back"})]})})}),Jae=document.getElementById("root");Q$.createRoot(Jae).render(T.jsx(I.StrictMode,{children:T.jsx(h7,{router:Xae})}));export{KM as $,Mle as A,W1 as B,To as C,tG as D,ice as E,ece as F,nce as G,Ee as H,St as I,z as J,GM as K,fw as L,$D as M,cle as N,mP as O,Yse as P,Gse as Q,Rg as R,jD as S,LJ as T,Yr as U,Jle as V,Fae as W,Bae as X,oae as Y,DD as Z,At as _,kj as a,Ye as a$,sle as a0,xo as a1,eee as a2,ht as a3,no as a4,cW as a5,uW as a6,yn as a7,lt as a8,dW as a9,t3 as aA,sY as aB,cY as aC,aY as aD,ZZ as aE,Ole as aF,Vae as aG,tle as aH,Ut as aI,Xt as aJ,Ie as aK,JH as aL,Xle as aM,Qle as aN,HS as aO,vg as aP,DY as aQ,x3 as aR,X4 as aS,lf as aT,ta as aU,kY as aV,ds as aW,y4 as aX,jw as aY,Wr as aZ,Pt as a_,fW as aa,mW as ab,bW as ac,I3 as ad,fl as ae,hW as af,pW as ag,gW as ah,vW as ai,_W as aj,yW as ak,wW as al,EW as am,xW as an,Ig as ao,dn as ap,fC as aq,Q1 as ar,iY as as,ro as at,Kd as au,Ww as av,jc as aw,aa as ax,fs as ay,io as az,Mg as b,nZ as b$,RV as b0,BP as b1,pw as b2,Rk as b3,Tk as b4,YW as b5,Wn as b6,wQ as b7,d3 as b8,Q4 as b9,wre as bA,xre as bB,Dre as bC,Zre as bD,Qre as bE,bre as bF,Sre as bG,Rre as bH,Ore as bI,Lre as bJ,qre as bK,qle as bL,uae as bM,pV as bN,ule as bO,mle as bP,gq as bQ,ul as bR,VN as bS,GN as bT,fle as bU,rce as bV,rG as bW,nG as bX,u4 as bY,pf as bZ,eZ as b_,rae as ba,la as bb,ne as bc,ele as bd,iZ as be,Lle as bf,uP as bg,ca as bh,as as bi,Dle as bj,$le as bk,rn as bl,dle as bm,qN as bn,zre as bo,Fre as bp,VS as bq,l6 as br,qS as bs,nv as bt,GD as bu,tie as bv,ZD as bw,Wre as bx,cie as by,yre as bz,nae as c,n6 as c$,rZ as c0,af as c1,qM as c2,Aj as c3,S3 as c4,wY as c5,Fw as c6,h3 as c7,k4 as c8,Bw as c9,Wle as cA,eoe as cB,pt as cC,Hoe as cD,to as cE,XW as cF,fP as cG,Ale as cH,oZ as cI,sZ as cJ,tZ as cK,aZ as cL,Bz as cM,HD as cN,YD as cO,XD as cP,e6 as cQ,t6 as cR,r6 as cS,Ble as cT,Vle as cU,zle as cV,Fle as cW,Jne as cX,Ule as cY,WD as cZ,JD as c_,Gd as ca,R4 as cb,zw as cc,Uw as cd,SY as ce,EY as cf,oQ as cg,sQ as ch,iQ as ci,Or as cj,lle as ck,QH as cl,YH as cm,HH as cn,n4 as co,HV as cp,Sw as cq,EV as cr,hle as cs,ZV as ct,xw as cu,Ew as cv,XV as cw,ple as cx,Yle as cy,_se as cz,dw as d,Gle as d0,QD as d1,Zle as d2,kS as d3,fre as d4,jle as d5,qD as d6,Die as d7,Vre as d8,Kle as d9,Tie as da,Iie as db,die as dc,uie as dd,Hle as de,gle as df,BW as dg,VW as dh,GW as di,qW as dj,HW as dk,yle as dl,ble as dm,xle as dn,Rle as dp,Tle as dq,Ele as dr,Sle as ds,wle as dt,_le as du,vle as dv,UM as dw,yO as dx,rle as dy,nle as dz,Ro as e,rf as f,uw as g,Ple as h,Ile as i,T as j,Nle as k,LD as l,tce as m,Nj as n,nw as o,PM as p,Zn as q,I as r,Xne as s,kle as t,ale as u,ole as v,HM as w,RT as x,NS as y,Oo as z};
|
|
171
|
+
`),document.head.appendChild(r)}}function Jse(e){const t=Ro.c(9),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:GM.publicConfig(),queryFn:Qse,staleTime:1/0},t[0]=r):r=t[0];const{data:i}=HM(r),[s]=Yse();i.internalUrl&&Use(i.internalUrl);let l,c;t[1]!==i.theme?(l=()=>{Xse(i.theme)},c=[i.theme],t[1]=i.theme,t[2]=l,t[3]=c):(l=t[2],c=t[3]),I.useLayoutEffect(l,c);let d,f;t[4]!==s.theme?(d=()=>{const p=document.documentElement;if(s.theme==="dark"){p.classList.add("dark");return}if(s.theme==="light"){p.classList.remove("dark");return}const g=window.matchMedia("(prefers-color-scheme: dark)"),v=b=>p.classList.toggle("dark",b);v(g.matches);const y=b=>v(b.matches);return g.addEventListener("change",y),()=>g.removeEventListener("change",y)},f=[s.theme],t[4]=s.theme,t[5]=d,t[6]=f):(d=t[5],f=t[6]),I.useLayoutEffect(d,f);let m;return t[7]!==n?(m=T.jsx(T.Fragment,{children:n}),t[7]=n,t[8]=m):m=t[8],m}const eae=new bj({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});function tae(e){const t=Ro.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=T.jsx(hH,{}),t[0]=r):r=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=T.jsx(jD,{}),t[1]=i):i=t[1];let s;return t[2]!==n?(s=T.jsxs(wj,{client:eae,children:[r,T.jsx(I.Suspense,{fallback:i,children:T.jsx(Jse,{children:T.jsx(Lj,{children:T.jsx(Fee,{children:T.jsx(Wne,{children:n})})})})})]}),t[2]=n,t[3]=s):s=t[3],s}function nae(...e){return BP(pw(e))}const rae=y4("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:hover:bg-input/50 card-shadow",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",success:"bg-success text-success-foreground hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",special:"bg-special text-special-foreground hover:bg-special/90 focus-visible:ring-special/20 dark:focus-visible:ring-special/40",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-8 px-3 has-[>svg]:px-2.5",sm:"h-7 gap-1.5 px-2.5 has-[>svg]:px-2",xs:"h-6 gap-1 px-1.5 text-xs has-[>svg]:px-1",lg:"h-10 px-3.5 has-[>svg]:px-3",icon:"size-8","icon-sm":"size-7"}},defaultVariants:{variant:"default",size:"default"}});function W1(e){const t=Ro.c(14);let n,r,i,s,l;t[0]!==e?({className:n,variant:l,size:i,asChild:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=l):(n=t[1],r=t[2],i=t[3],s=t[4],l=t[5]);const d=(s===void 0?!1:s)?jw:"button";let f;t[6]!==n||t[7]!==i||t[8]!==l?(f=nae(rae({variant:l,size:i,className:n})),t[6]=n,t[7]=i,t[8]=l,t[9]=f):f=t[9];let m;return t[10]!==d||t[11]!==r||t[12]!==f?(m=T.jsx(d,{"data-slot":"button",className:f,...r}),t[10]=d,t[11]=r,t[12]=f,t[13]=m):m=t[13],m}const CM="__mesh_chunk_reload_ts";function AM(e){if(!e)return!1;const t=e.message||"";return t.includes("Failed to fetch dynamically imported module")||t.includes("Importing a module script failed")||t.includes("error loading dynamically imported module")||t.includes("Failed to fetch")&&e.name==="TypeError"}class ice extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n),kD(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null})}resetError=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError){const{fallback:t}=this.props;return typeof t=="function"?t({error:this.state.error,resetError:this.resetError}):t!==void 0?t:T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(NS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(W1,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}class iae extends I.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n);const r=AM(t);if(kD(t,{boundary:"chunk_root",is_chunk_load_error:r,error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!r)return;const i=sessionStorage.getItem(CM),s=Date.now();(!i||s-Number(i)>1e4)&&(sessionStorage.setItem(CM,String(s)),window.location.reload())}render(){return this.state.hasError&&AM(this.state.error)?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:T.jsx($D,{className:"h-6 w-6 text-primary"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"New version available"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:"A new version has been deployed. Refresh to continue."})]}),T.jsx(W1,{onClick:()=>window.location.reload(),children:"Refresh"})]}):this.state.hasError?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(NS,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),T.jsx(W1,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}const oae="MCP Workflows",sae="Create workflows using your MCP tools",aae=I.lazy(()=>At(()=>import("./plugin-header-CCLzoupo.js"),__vite__mapDeps([0,1,2]))),lae=I.lazy(()=>At(()=>import("./plugin-empty-state-9EVNRwqH.js"),[])),cae={id:oae,description:sae,bindingName:"WORKFLOW",renderHeader:e=>T.jsx(aae,{...e}),renderEmptyState:()=>T.jsx(lae,{}),setup:e=>{e.registerSettingsSidebarItem({key:"workflows",icon:T.jsx(DD,{size:14}),label:"MCP Workflows",to:"/$org/settings/workflows"})}},uae=[cae],ma=t7({component:()=>T.jsx(iae,{children:T.jsx(tae,{children:T.jsx(I.Suspense,{fallback:T.jsx(jD,{}),children:T.jsx(mP,{})})})})}),dae=mt({getParentRoute:()=>ma,path:"/login",component:It(()=>At(()=>import("./login-CfKhDhQu.js"),__vite__mapDeps([3,4]))),validateSearch:ul(()=>Ee({next:z().optional(),client_id:z().optional(),redirect_uri:z().optional(),response_type:z().optional(),state:z().optional(),scope:z().optional(),code_challenge:z().optional(),code_challenge_method:z().optional()}))}),fae=mt({getParentRoute:()=>ma,path:"/reset-password",component:It(()=>At(()=>import("./reset-password-Dj4RoKKI.js"),__vite__mapDeps([5,4]))),validateSearch:ul(()=>Ee({token:z().optional(),error:z().optional()}))}),hae=mt({getParentRoute:()=>ma,path:"/auth/$pathname",component:It(()=>At(()=>import("./auth-catchall-CMI0fqEP.js"),[]))}),pae=mt({getParentRoute:()=>ma,path:"/oauth/callback",component:It(()=>At(()=>import("./oauth-callback-BHNFQm9G.js"),[]))}),mae=mt({getParentRoute:()=>ma,path:"/oauth/callback/ai-provider",component:It(()=>At(()=>import("./oauth-callback-ai-provider-kDr85b4j.js"),[]))}),rE=mt({getParentRoute:()=>ma,id:"shell",component:It(()=>At(()=>import("./shell-layout-BS0iP_zg.js").then(e=>e.s),__vite__mapDeps([6,7,8,9,10,11,12,13,14,15])))}),gae=mt({getParentRoute:()=>rE,path:"/",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(!e)return;const t=localStorage.getItem(Rg.lastOrgSlug());if(t){if(e.some(i=>i.slug===t))throw Oc({to:"/$org",params:{org:t}});localStorage.removeItem(Rg.lastOrgSlug())}const n=e[0];throw Oc(n?{to:"/$org",params:{org:n.slug}}:{to:"/onboarding"})}}),vae=mt({getParentRoute:()=>ma,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await Mg.organization.list();if(e&&e.length>0)throw Oc({to:"/"})},component:It(()=>At(()=>import("./onboarding-DayeILgQ.js"),__vite__mapDeps([16,9,4,17,18,19,20])))}),iE=mt({getParentRoute:()=>rE,path:"/$org",component:It(()=>At(()=>import("./org-layout-B7tDIjls.js"),[]))}),oE=mt({getParentRoute:()=>iE,id:"org-shell",component:It(()=>At(()=>import("./index-BwlTBk4D.js"),__vite__mapDeps([21,22,23,8,24,25,26,27,28,29,30,31,32,33,18,19,1,2,34,35,36,37,38,20,39,40,15,41,42,43,44,45,46,47,48,6,7,9,10,11,12,13,14,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,17,4,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106])))}),sE=mt({getParentRoute:()=>oE,id:"agent-shell",component:It(()=>At(()=>import("./index-BrlUjE-e.js"),__vite__mapDeps([107,69,7,8,70,4,71,11,12,72,73,56,29,74,39,75,1,15,25,26,27,28,30,31,32,33,18,19,2,34,35,36,37,38,20,22,23,40,41,42,43,44,45,46,47,48,76,77,78,63,60,68,55,57,58,59,10,13,6,9,14,49,50,51,52,53,54,79,66,17,80,81,82,83,61,84,85,86,87,64,65,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,108,109,62,24,67,103,104,105,106,110,111,112,113,114,115,116,117,118])))}),_ae=Ee({virtualmcpid:z().optional(),tab:z().optional(),main:z().optional(),id:z().optional(),toolName:z().optional(),tasks:St().optional(),mainOpen:St().optional(),chat:St().optional(),autosend:z().optional()}),O6=mt({getParentRoute:()=>sE,path:"/$taskId",validateSearch:_ae,component:()=>null}),yae=mt({getParentRoute:()=>oE,path:"/",component:It(()=>At(()=>import("./index-DbwpM0oT.js"),__vite__mapDeps([119,60,37,25,26,27,28,29,30,31,32,33,18,19,1,2,34,35,36,38,20,39,22,23,8,40,15,41,42,43,44,45,46,47,48,61,12,56,11,13,72,73,7,74,75,71,76,77,78,63,68,69,70,4,55,57,58,59,10,6,9,14,49,50,51,52,53,54,79,66,17,80,81,82,83,84,85,86,87,64,65,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,104])))}),Pn=mt({getParentRoute:()=>iE,path:"/settings",component:It(()=>At(()=>import("./settings-layout-Db_7efbC.js"),__vite__mapDeps([120,22,23,8,30,33,18,34,15,45,47,48,110,91,58,59])))}),bae=mt({getParentRoute:()=>Pn,path:"/",beforeLoad:({params:e})=>{throw Oc({to:"/$org/settings/general",params:{org:e.org}})},component:()=>null}),wae=mt({getParentRoute:()=>Pn,path:"/connections",component:It(()=>At(()=>import("./connections-CPceMglQ.js"),__vite__mapDeps([121,77,78,122,80,1,34,36,28,23,115,98,117,39,97,93,92,94,71,11,12,13,95,96,76,87,60,37,25,26,27,29,30,31,32,33,18,19,2,35,38,20,22,8,40,15,41,42,43,44,45,46,47,48,105,123,65,101,124,125,75,7,63,66,17,4,81,99,56,100]))),validateSearch:ul(()=>Ee({action:dn(["create"]).optional(),tab:dn(["all","connected"]).optional()}))}),Sae=mt({getParentRoute:()=>Pn,path:"/connections/$appSlug",component:It(()=>At(()=>import("./connection-detail-O5xxE160.js"),__vite__mapDeps([126,77,78,105,100,4,43,46,127,12,68,25,26,27,28,29,30,31,32,33,18,19,1,2,34,35,36,37,38,20,39,22,23,8,40,15,41,42,44,45,47,48,71,11,128,129,76,94,13,81,109,62,56,104,73,113,98,54,130,131,64,79,60,66,17,123,65,132,133,92,74,87,80]))),validateSearch:ul(()=>Ee({tab:z().optional()}))}),Eae=mt({getParentRoute:()=>Pn,path:"/connections/$appSlug/$collectionName/$itemId",component:It(()=>At(()=>import("./collection-detail-D3e0mmMi.js"),__vite__mapDeps([134,105,11,12,66,17,4,99,132,22,23,8,135,128,78,129,56,136,50,111,25,26,27,28,29,30,31,32,33,18,19,1,2,34,35,36,37,38,20,39,40,15,41,42,43,44,45,46,47,48,98,81,115,71,68,7,90,80,60,114,67,137,59,54,127,76,77,94,13,109,62,104,73,92,113,53,55,57,58,10,6,9,14]))),validateSearch:ul(()=>Ee({replayId:z().optional()}))}),xae=mt({getParentRoute:()=>Pn,path:"/monitor",component:It(()=>At(()=>import("./index-C27CjGg7.js"),__vite__mapDeps([138,117,39,22,23,8,105,98,62,1,31,42,25,26,27,28,29,30,32,33,18,19,2,34,35,36,37,38,20,40,15,41,43,44,45,46,47,48,136,50,130,131,71,11,12,56,4,75,108,109,81,114,99,97,70,17,60,64,87,133,129,68,92,102,96,139,101,95,49,51,52,7,53,54,55,57,58,59,10,13,6,9,14,106]))),validateSearch:ul(()=>Ee({tab:dn(["overview","audit","threads"]).default("overview"),from:z().default("now-30m"),to:z().default("now"),connectionId:Ie(z()).optional().default([]),virtualMcpId:Ie(z()).optional().default([]),tool:z().default(""),status:dn(["all","success","errors"]).default("all"),search:z().default(""),page:St().optional(),streaming:Pt().default(!0),propertyFilters:z().default(""),hideSystem:Pt().default(!1)}))}),Rae=mt({getParentRoute:()=>Pn,path:"/general",component:It(()=>At(()=>import("./general-k-j41zoM.js"),__vite__mapDeps([140,22,23,8,131,85,64,47,4,86,87,32,141,89,12,70,103,39,56,11,62,61,25,26,27,28,29,30,31,33,18,19,1,2,34,35,36,37,38,20,40,15,41,42,43,44,45,46,48,60,13])))}),Oae=mt({getParentRoute:()=>Pn,path:"/features",component:It(()=>At(()=>import("./features-DQcaVbot.js"),__vite__mapDeps([142,22,23,8,13,12,70,37,86,87,32])))}),Tae=mt({getParentRoute:()=>Pn,path:"/brand-context",component:It(()=>At(()=>import("./brand-context-CFjUKEZZ.js"),__vite__mapDeps([143,12,2,34,38,40,43,46,48,65,4,99,22,23,8,89,85])))}),Cae=mt({getParentRoute:()=>Pn,path:"/ai-providers",component:It(()=>At(()=>import("./ai-providers-hlFksDgI.js"),__vite__mapDeps([144,83,75,1,4,7,8,63,23,81,2,35,61,27,29,39,44,57,12,55,56,11,58,59,10,13,84,48,85,26,19,46,22,86,87,32,70,82,64,47,65,88,52,89])))}),Aae=mt({getParentRoute:()=>Pn,path:"/members",component:It(()=>At(()=>import("./members-INSx14IN.js"),__vite__mapDeps([145,122,80,1,34,36,28,23,115,98,117,39,22,8,146,139,105,7,66,17,81,2,35,99,131,147,130,12,65,64,47,87,45,46,75,108,109,62,43])))}),Iae=mt({getParentRoute:()=>Pn,path:"/roles",component:It(()=>At(()=>import("./roles-BLdL9t1d.js"),__vite__mapDeps([148,147,131,98,65,80,1,34,36,15,43,46,146,139,28,22,23,8,105,117,39,84,60,37,25,26,27,29,30,31,32,33,18,19,2,35,38,20,40,41,42,44,45,47,48,101,75,102,96,12,74,130,71,11,57,64,70,86,87]))),validateSearch:ul(()=>Ee({role:z().optional()}))}),Mae=mt({getParentRoute:()=>Pn,path:"/sso",component:It(()=>At(()=>import("./sso-yKSnL6cT.js"),__vite__mapDeps([149,141,89,12,70,86,87,32,22,23,8,4,14,46])))}),Pae=mt({getParentRoute:()=>Pn,path:"/profile",component:It(()=>At(()=>import("./profile-BUQJJNtu.js"),__vite__mapDeps([150,22,23,8,64,47,70,81,1,2,35,82,4,41,42,85,91,67,86,87,32])))}),Nae=mt({getParentRoute:()=>Pn,path:"/store",component:It(()=>At(()=>import("./store-DVfL7GG2.js"),__vite__mapDeps([151,26,34,43,46,4,70,61,64,47,62,71,11,12,22,23,8,94,13,86,87,32])))}),kae=mt({getParentRoute:()=>Pn,path:"/registry",component:It(()=>At(()=>import("./registry-Da4K44Xl.js"),[]))}),Dae=mt({getParentRoute:()=>Pn,path:"/store/registry",component:It(()=>At(()=>import("./store-registry-BGm95aFQ.js"),[]))}),Lae=mt({getParentRoute:()=>Pn,path:"/workflows",component:It(()=>At(()=>import("./workflow-CoAUdsHF.js"),__vite__mapDeps([152,12,77,78,122,80,1,34,36,28,23,115,98,74,39,87,60,37,25,26,27,29,30,31,32,33,18,19,2,35,38,20,22,8,40,15,41,42,43,44,45,46,47,48,146,139,137,112,64,105,124,125,92,65,11,71,132])))}),$ae=mt({getParentRoute:()=>Pn,path:"/workflows/$itemId",component:It(()=>At(()=>import("./workflow-detail-Dw2RzGR4.js"),__vite__mapDeps([153,135,128,12,78,129,56,11,136,50,111,25,26,27,28,29,30,31,32,33,18,19,1,2,34,35,36,37,38,20,39,22,23,8,40,15,41,42,43,44,45,46,47,48,98,81,115,132,71,68,7,90,80,60,114,67,137,59,4])))}),jae=mt({getParentRoute:()=>sE,path:"/plugins/$pluginId",component:It(()=>At(()=>import("./org-plugin-layout-DijtR-Yn.js"),__vite__mapDeps([154,155,71,11,12,44,22,23,8])))}),Uae=mt({getParentRoute:()=>Pn,path:"/agents",component:It(()=>At(()=>import("./agents-list-h-PZw07V.js"),__vite__mapDeps([156,80,1,34,36,18,72,12,73,56,11,7,8,29,74,39,75,71,15,25,26,27,28,30,31,32,33,19,2,35,37,38,20,22,23,40,41,42,43,44,45,46,47,48,76,77,78,63,60,68,87,88,52,105,104,65,117])))}),zae=mt({getParentRoute:()=>Pn,path:"/automations",component:It(()=>At(()=>import("./automations-DgSOIlaP.js"),__vite__mapDeps([157,43,48,117,39,22,23,8,105,116,65,80,1,34,36,25,26,27,28,29,30,31,32,33,18,19,2,35,37,38,20,40,15,41,42,44,45,46,47,56,11,12,73])))}),T6=mt({getParentRoute:()=>O6,path:"/$pluginId",component:It(()=>At(()=>import("./dynamic-plugin-layout-CugRGU7x.js"),__vite__mapDeps([158,155,71,11,12,44,22,23,8])))}),Fae=[],Bae=[],Vae=[],C6=[];uae.forEach(e=>{if(!e.setup)return;const t={parentRoute:T6,routing:{createRoute:mt,lazyRouteComponent:It},registerRootSidebarItem:n=>Fae.push({pluginId:e.id,...n}),registerSidebarGroup:n=>Bae.push({pluginId:e.id,...n}),registerSettingsSidebarItem:n=>Vae.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{C6.push(...n)}};e.setup(t)});const qae=T6.addChildren(C6),Hae=Pn.addChildren([bae,wae,Sae,Eae,Uae,zae,xae,Rae,Oae,Tae,Cae,Aae,Iae,Mae,Pae,Nae,Dae,kae,Lae,$ae]),Gae=O6.addChildren([qae]),Kae=sE.addChildren([Gae,jae]),Zae=oE.addChildren([yae,Kae]),Yae=iE.addChildren([Zae,Hae]),Wae=rE.addChildren([gae,Yae]),Qae=ma.addChildren([Wae,vae,dae,fae,hae,pae,mae]),Xae=u7({routeTree:Qae,defaultNotFoundComponent:()=>T.jsx("div",{className:"flex h-full items-center justify-center",children:T.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[T.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Page not found"}),T.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:"The page you are looking for does not exist or has been moved."}),T.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"text-sm text-primary hover:underline",children:"Go back"})]})})}),Jae=document.getElementById("root");Q$.createRoot(Jae).render(T.jsx(I.StrictMode,{children:T.jsx(h7,{router:Xae})}));export{KM as $,Mle as A,W1 as B,To as C,tG as D,ice as E,ece as F,nce as G,Ee as H,St as I,z as J,GM as K,fw as L,$D as M,cle as N,mP as O,Yse as P,Gse as Q,Rg as R,jD as S,LJ as T,Yr as U,Jle as V,Fae as W,Bae as X,oae as Y,DD as Z,At as _,kj as a,Ye as a$,sle as a0,xo as a1,eee as a2,ht as a3,no as a4,cW as a5,uW as a6,yn as a7,lt as a8,dW as a9,t3 as aA,sY as aB,cY as aC,aY as aD,ZZ as aE,Ole as aF,Vae as aG,tle as aH,Ut as aI,Xt as aJ,Ie as aK,JH as aL,Xle as aM,Qle as aN,HS as aO,vg as aP,DY as aQ,x3 as aR,X4 as aS,lf as aT,ta as aU,kY as aV,ds as aW,y4 as aX,jw as aY,Wr as aZ,Pt as a_,fW as aa,mW as ab,bW as ac,I3 as ad,fl as ae,hW as af,pW as ag,gW as ah,vW as ai,_W as aj,yW as ak,wW as al,EW as am,xW as an,Ig as ao,dn as ap,fC as aq,Q1 as ar,iY as as,ro as at,Kd as au,Ww as av,jc as aw,aa as ax,fs as ay,io as az,Mg as b,nZ as b$,RV as b0,BP as b1,pw as b2,Rk as b3,Tk as b4,YW as b5,Wn as b6,wQ as b7,d3 as b8,Q4 as b9,wre as bA,xre as bB,Dre as bC,Zre as bD,Qre as bE,bre as bF,Sre as bG,Rre as bH,Ore as bI,Lre as bJ,qre as bK,qle as bL,uae as bM,pV as bN,ule as bO,mle as bP,gq as bQ,ul as bR,VN as bS,GN as bT,fle as bU,rce as bV,rG as bW,nG as bX,u4 as bY,pf as bZ,eZ as b_,rae as ba,la as bb,ne as bc,ele as bd,iZ as be,Lle as bf,uP as bg,ca as bh,as as bi,Dle as bj,$le as bk,rn as bl,dle as bm,qN as bn,zre as bo,Fre as bp,VS as bq,l6 as br,qS as bs,nv as bt,GD as bu,tie as bv,ZD as bw,Wre as bx,cie as by,yre as bz,nae as c,n6 as c$,rZ as c0,af as c1,qM as c2,Aj as c3,S3 as c4,wY as c5,Fw as c6,h3 as c7,k4 as c8,Bw as c9,Wle as cA,eoe as cB,pt as cC,Hoe as cD,to as cE,XW as cF,fP as cG,Ale as cH,oZ as cI,sZ as cJ,tZ as cK,aZ as cL,Bz as cM,HD as cN,YD as cO,XD as cP,e6 as cQ,t6 as cR,r6 as cS,Ble as cT,Vle as cU,zle as cV,Fle as cW,Jne as cX,Ule as cY,WD as cZ,JD as c_,Gd as ca,R4 as cb,zw as cc,Uw as cd,SY as ce,EY as cf,oQ as cg,sQ as ch,iQ as ci,Or as cj,lle as ck,QH as cl,YH as cm,HH as cn,n4 as co,HV as cp,Sw as cq,EV as cr,hle as cs,ZV as ct,xw as cu,Ew as cv,XV as cw,ple as cx,Yle as cy,_se as cz,dw as d,Gle as d0,QD as d1,Zle as d2,kS as d3,fre as d4,jle as d5,qD as d6,Die as d7,Vre as d8,Kle as d9,Tie as da,Iie as db,die as dc,uie as dd,Hle as de,gle as df,BW as dg,VW as dh,GW as di,qW as dj,HW as dk,yle as dl,ble as dm,xle as dn,Rle as dp,Tle as dq,Ele as dr,Sle as ds,wle as dt,_le as du,vle as dv,UM as dw,yO as dx,rle as dy,nle as dz,Ro as e,rf as f,uw as g,Ple as h,Ile as i,T as j,Nle as k,LD as l,tce as m,Nj as n,nw as o,PM as p,Zn as q,I as r,Xne as s,kle as t,ale as u,ole as v,HM as w,RT as x,NS as y,Oo as z};
|
package/dist/client/assets/{infiniteQueryObserver-BGG1V2SW.js → infiniteQueryObserver-CNdVc6Pq.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dw as d,dx as f,dy as v,dz as x}from"./index-
|
|
1
|
+
import{dw as d,dx as f,dy as v,dz as x}from"./index-Qc-HM-3V.js";var N=class extends d{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:f()})}getOptimisticResult(e){return e.behavior=f(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:P,isError:c,isRefetchError:g}=i,r=s.fetchMeta?.fetchMore?.direction,h=c&&r==="forward",o=a&&r==="forward",n=c&&r==="backward",u=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:x(t,s.data),hasPreviousPage:v(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:u,isRefetchError:g&&!h&&!n,isRefetching:P&&!o&&!u}}};export{N as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as s,c as a,j as d}from"./index-
|
|
1
|
+
import{e as s,c as a,j as d}from"./index-Qc-HM-3V.js";function f(l){const e=s.c(10);let i,t,r;e[0]!==l?({className:i,type:r,...t}=l,e[0]=l,e[1]=i,e[2]=t,e[3]=r):(i=e[1],t=e[2],r=e[3]);let n;e[4]!==i?(n=a("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-lg bg-background dark:bg-input/30 px-3 py-1 text-sm transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:opacity-50 card-shadow","focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==r?(o=d.jsx("input",{type:r,"data-slot":"input",className:n,...t}),e[6]=t,e[7]=n,e[8]=r,e[9]=o):o=e[9],o}export{f as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as A,j as h,r as z,c as _}from"./index-
|
|
1
|
+
import{e as A,j as h,r as z,c as _}from"./index-Qc-HM-3V.js";import{n as L}from"./Container-B9nOU3uH.js";import{A as k}from"./agent-icon-Aidj_nbT.js";const C={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},Z={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},y={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},M={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function q(E){const e=A.c(12),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w;if(t?.startsWith("icon://")||t?.includes("#agentcolor=")){const r=M[n];let l;return e[0]!==o||e[1]!==t||e[2]!==s||e[3]!==r?(l=h.jsx(k,{icon:t,name:s,size:r,className:o}),e[0]=o,e[1]=t,e[2]=s,e[3]=r,e[4]=l):l=e[4],l}const g=t??"no-icon";let i;return e[5]!==o||e[6]!==c||e[7]!==t||e[8]!==s||e[9]!==n||e[10]!==g?(i=h.jsx(R,{icon:t,name:s,size:n,className:o,fallbackIcon:c},g),e[5]=o,e[6]=c,e[7]=t,e[8]=s,e[9]=n,e[10]=g,e[11]=i):i=e[11],i}function R(E){const e=A.c(24),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w,[g,i]=z.useState(!1),r=!!t&&g,l=C[n],b=Z[n];let a;e[0]!==o||e[1]!==l||e[2]!==b?(a=_("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,b,o),e[0]=o,e[1]=l,e[2]=b,e[3]=a):a=e[3];const p=t||void 0,N=!r&&"hidden";let m;e[4]!==N?(m=_("h-full w-full object-cover",N),e[4]=N,e[5]=m):m=e[5];let I,S;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=()=>i(!1),S=()=>i(!0),e[6]=I,e[7]=S):(I=e[6],S=e[7]);let d;e[8]!==s||e[9]!==p||e[10]!==m?(d=h.jsx("img",{src:p,alt:s,className:m,onError:I,onLoad:S}),e[8]=s,e[9]=p,e[10]=m,e[11]=d):d=e[11];const v=r&&"hidden";let f;e[12]!==v?(f=_("h-full w-full flex items-center justify-center bg-muted/20",v),e[12]=v,e[13]=f):f=e[13];let x;e[14]!==c||e[15]!==n?(x=c??h.jsx(L,{size:y[n],className:"text-muted-foreground"}),e[14]=c,e[15]=n,e[16]=x):x=e[16];let u;e[17]!==f||e[18]!==x?(u=h.jsx("div",{className:f,children:x}),e[17]=f,e[18]=x,e[19]=u):u=e[19];let j;return e[20]!==d||e[21]!==u||e[22]!==a?(j=h.jsxs("div",{className:a,children:[d,u]}),e[20]=d,e[21]=u,e[22]=a,e[23]=j):j=e[23],j}export{q as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as n,c as r,j as i,b5 as p}from"./index-
|
|
1
|
+
import{e as n,c as r,j as i,b5 as p}from"./index-Qc-HM-3V.js";function c(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{c as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as C,r as i,c as A,j as a,ao as V}from"./index-
|
|
1
|
+
import{e as C,r as i,c as A,j as a,ao as V}from"./index-Qc-HM-3V.js";import{P as E}from"./index-QJkyRpKl.js";const H=i.createContext(null);function z(x){const e=C.c(3),{children:l}=x,s=i.useContext(H);if(!s?.tabsEl)return null;let c;return e[0]!==l||e[1]!==s.tabsEl?(c=V.createPortal(l,s.tabsEl),e[0]=l,e[1]=s.tabsEl,e[2]=c):c=e[2],c}function D(x){const e=C.c(3),{children:l}=x,s=i.useContext(H);if(!s?.actionsEl)return null;let c;return e[0]!==l||e[1]!==s.actionsEl?(c=V.createPortal(l,s.actionsEl),e[0]=l,e[1]=s.actionsEl,e[2]=c):c=e[2],c}const B=D;function F(x){const e=C.c(21),{children:l,breadcrumb:s,hideHeader:c}=x;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={leftEl:null,tabsEl:null,actionsEl:null},e[0]=b):b=e[0];const[w,g]=i.useState(b),N=i.useRef(null),P=i.useRef(null),L=i.useRef(null);let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=t=>{N.current=t,t&&g(n=>n.leftEl===t?n:{...n,leftEl:t})},e[1]=h):h=e[1];const $=h;let R;e[2]===Symbol.for("react.memo_cache_sentinel")?(R=t=>{P.current=t,t&&g(n=>n.tabsEl===t?n:{...n,tabsEl:t})},e[2]=R):R=e[2];const _=R;let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t=>{L.current=t,t&&g(n=>n.actionsEl===t?n:{...n,actionsEl:t})},e[3]=d):d=e[3];const k=d,p=c&&"hidden";let o;e[4]!==p?(o=A(p),e[4]=p,e[5]=o):o=e[5];let j;e[6]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx("div",{ref:$,className:"flex items-center gap-2 min-w-0"}),e[6]=j):j=e[6];let r;e[7]!==s?(r=a.jsxs(E.Header.Left,{children:[s,j]}),e[7]=s,e[8]=r):r=e[8];let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsxs(E.Header.Right,{children:[a.jsx("div",{ref:_,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),a.jsx("div",{ref:k,className:"flex items-center gap-2 shrink-0"})]}),e[9]=y):y=e[9];let f;e[10]!==o||e[11]!==r?(f=a.jsxs(E.Header,{className:o,children:[r,y]}),e[10]=o,e[11]=r,e[12]=f):f=e[12];let m;e[13]!==l?(m=a.jsx(E.Content,{children:l}),e[13]=l,e[14]=m):m=e[14];let u;e[15]!==f||e[16]!==m?(u=a.jsxs(E,{children:[f,m]}),e[15]=f,e[16]=m,e[17]=u):u=e[17];let S;return e[18]!==w||e[19]!==u?(S=a.jsx(H,{value:w,children:u}),e[18]=w,e[19]=u,e[20]=S):S=e[20],S}export{F as V,B as a,z as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as k,j as t,s as $,o as je,b as Fe,r as O,K as ne,n as He,a as Be,c as xe,B as ae,t as D,x as oe,G as Xe,F as Ze,v as ve,P as et,l as Ne,w as tt,f as nt}from"./index-DRcAHhaZ.js";import{S as ce,u as V,d as Ae,W as qe,a as be}from"./constants-BBgzLWSw.js";import{a as _e}from"./use-navigate-to-agent-Dw9ITfQX.js";import{a as le,b as de,c as ue,d as me,D as st}from"./dialog-D-8iKYyL.js";import{i as Ee}from"./RefreshCcw01-ROHijjHE.js";import{C as Qe}from"./collection-search-BjYBs0ij.js";import{C as it}from"./checkbox-BhxVCV69.js";import{b as Se,u as ot}from"./use-connection-DujrbCZx.js";import{i as at}from"./Lock01-e_YusQxH.js";import{n as rt}from"./agent-icon-Cc0OK5HW.js";import{e as ct}from"./extract-connection-data-BoZTN4ct.js";import{b as Oe,a as Le,c as Re,D as Me}from"./drawer-iSQ1TA5J.js";import{u as ke}from"./tooltip-UFl_p-Yt.js";import{I as Ue}from"./integration-icon-kCK5G0hc.js";import{u as lt,d as Ke}from"./use-mcp-tools-BeS0ssuN.js";import{a as Pe,b as dt}from"./use-virtual-mcp-DIBjQz5k.js";function re(i){const e=k.c(4),{size:s,className:a}=i;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=l):l=e[0];let n;return e[1]!==a||e[2]!==s?(n=t.jsx("svg",{width:s,height:s,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:a,children:l}),e[1]=a,e[2]=s,e[3]=n):n=e[3],n}function ut(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function mt(i){const e=await fetch(`/api/${i}/deco-sites`);if(!e.ok){const s=await e.json().catch(()=>({}));throw new Error(s.error??`Failed to load sites (${e.status})`)}return e.json()}function Xt(i){const e=k.c(70),{open:s,onOpenChange:a,onBack:l}=i,{org:n}=$(),r=_e(),u=je(),{data:d}=Fe.useSession(),[_,c]=O.useState(null),[h,C]=O.useState("");let f;e[0]!==n.id||e[1]!==n.slug?(f={connectionId:ce,orgId:n.id,orgSlug:n.slug},e[0]=n.id,e[1]=n.slug,e[2]=f):f=e[2];const p=V(f);let m;e[3]!==d?.user?.email?(m=ne.decoSites(d?.user?.email),e[3]=d?.user?.email,e[4]=m):m=e[4];let g;e[5]!==n.slug?(g=()=>mt(n.slug),e[5]=n.slug,e[6]=g):g=e[6];const x=s&&!!d?.user?.email;let I;e[7]!==m||e[8]!==g||e[9]!==x?(I={queryKey:m,queryFn:g,enabled:x,staleTime:6e4,retry:!1},e[7]=m,e[8]=g,e[9]=x,e[10]=I):I=e[10];const{data:b,isLoading:N,error:y}=He(I),o=b?.sites??[];let T;e[11]!==a?(T=j=>{j||(c(null),C("")),a(j)},e[11]=a,e[12]=T):T=e[12];const w=T;let v;e[13]!==h?(v=j=>j.name.toLowerCase().includes(h.toLowerCase())||j.domains?.[0]?.domain.toLowerCase().includes(h.toLowerCase()),e[13]=h,e[14]=v):v=e[14];const A=o.filter(v),E=!_||A.some(j=>j.name===_);let S;e[15]!==p||e[16]!==n.id||e[17]!==n.slug?(S=async j=>{D("deco_site_import_started",{site_name:j});const P=await fetch(`/api/${n.slug}/deco-sites/connection`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:j,orgId:n.id})}),G=await P.json().catch(pt);if(!P.ok)throw new Error(G.error??`Failed to create connection (${P.status})`);const M=G.connId;if(!M)throw new Error("Server did not return a connection ID");const he=G.icon??null,te=ut(j),Ge=await p.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:j,description:"Imported from deco.cx",pinned:!0,icon:he??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],ui:{banner:null,bannerColor:"#22C55E",icon:he,themeColor:"#22C55E",slug:te,pinnedViews:[{connectionId:M,toolName:"file_explorer",label:"Preview",icon:null},{connectionId:M,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:M,toolName:"get_monitor_data",label:"Monitor",icon:null},{connectionId:M,toolName:"list_pull_requests",label:"Pull Requests",icon:null},{connectionId:M,toolName:"list_releases",label:"Releases",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:M,toolName:"file_explorer"}}}},connections:[{connection_id:M}]}}}),De=Ge.structuredContent??Ge;return{slug:te,virtualMcpId:De.item.id,connId:M,item:De.item}},e[15]=p,e[16]=n.id,e[17]=n.slug,e[18]=S):S=e[18];let R;e[19]!==p||e[20]!==w||e[21]!==r||e[22]!==n.id||e[23]!==u?(R=j=>{const{slug:P,virtualMcpId:G,item:M}=j;D("deco_site_import_succeeded",{site_name:M.title,virtual_mcp_id:G,slug:P}),u.setQueryData(ne.collectionItem(p,n.id,"","VIRTUAL_MCP",G),{item:M}),u.invalidateQueries({predicate:he=>{const te=he.queryKey;return te[1]===n.id&&te[3]==="collection"&&te[4]==="VIRTUAL_MCP"}}),u.invalidateQueries({queryKey:ne.projects(n.id)}),oe.success(`Imported ${P} from deco.cx`),w(!1),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),r(G)},e[19]=p,e[20]=w,e[21]=r,e[22]=n.id,e[23]=u,e[24]=R):R=e[24];let z;e[25]!==S||e[26]!==R?(z={mutationFn:S,onSuccess:R,onError:gt},e[25]=S,e[26]=R,e[27]=z):z=e[27];const U=Be(z),se=de,L=le,ie="sm:max-w-[900px] p-0 gap-0 overflow-hidden";let F;e[28]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(ue,{className:"sr-only",children:t.jsx(me,{children:"Import from deco.cx"})}),e[28]=F):F=e[28];let H;e[29]!==l?(H=l&&t.jsx("button",{type:"button",onClick:l,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":"Go back",children:t.jsx(Ee,{size:18})}),e[29]=l,e[30]=H):H=e[30];let fe;e[31]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from deco.cx"}),e[31]=fe):fe=e[31];let B;e[32]!==H?(B=t.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[H,fe]}),e[32]=H,e[33]=B):B=e[33];let ge;e[34]===Symbol.for("react.memo_cache_sentinel")?(ge=j=>{j.key==="Escape"&&C("")},e[34]=ge):ge=e[34];let q;e[35]!==h?(q=t.jsx("div",{children:t.jsx(Qe,{value:h,onChange:C,placeholder:"Search sites...",onKeyDown:ge})}),e[35]=h,e[36]=q):q=e[36];const Je="pb-0 min-h-[300px]";let Q;e[37]!==N?(Q=N&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Loading sites..."}),e[37]=N,e[38]=Q):Q=e[38];const Ce=!N&&!y&&o.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"No sites found for this account."}),Te=!N&&o.length>0&&t.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[A.length===0&&t.jsxs("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:["No sites match “",h,"”"]}),A.map(j=>{const P=j.domains?.find(ft)?.domain??j.domains?.[0]?.domain,G=_===j.name;return t.jsxs("button",{type:"button",onClick:()=>c(j.name),className:xe("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",G?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[t.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:j.thumb_url?t.jsx("img",{src:j.thumb_url,alt:j.name,className:"w-full h-full object-cover",loading:"lazy"}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsxs("div",{className:"px-4 py-3",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:j.name}),P&&t.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:P})]})]},j.name)})]});let K;e[39]!==Q||e[40]!==Ce||e[41]!==Te?(K=t.jsxs("div",{className:Je,children:[Q,Ce,Te]}),e[39]=Q,e[40]=Ce,e[41]=Te,e[42]=K):K=e[42];let Y;e[43]!==w?(Y=()=>w(!1),e[43]=w,e[44]=Y):Y=e[44];let W;e[45]!==U.isPending||e[46]!==Y?(W=t.jsx(ae,{variant:"outline",onClick:Y,disabled:U.isPending,children:"Cancel"}),e[45]=U.isPending,e[46]=Y,e[47]=W):W=e[47];const Ie=!_||!E||U.isPending||N;let J;e[48]!==U||e[49]!==_?(J=()=>_&&U.mutate(_),e[48]=U,e[49]=_,e[50]=J):J=e[50];const ye=U.isPending?"Importing...":"Import";let X;e[51]!==Ie||e[52]!==J||e[53]!==ye?(X=t.jsx(ae,{disabled:Ie,onClick:J,children:ye}),e[51]=Ie,e[52]=J,e[53]=ye,e[54]=X):X=e[54];let Z;e[55]!==W||e[56]!==X?(Z=t.jsxs(st,{className:"px-8 py-5 border-t border-border",children:[W,X]}),e[55]=W,e[56]=X,e[57]=Z):Z=e[57];let ee;e[58]!==L||e[59]!==F||e[60]!==B||e[61]!==q||e[62]!==K||e[63]!==Z?(ee=t.jsxs(L,{className:ie,children:[F,B,q,K,Z]}),e[58]=L,e[59]=F,e[60]=B,e[61]=q,e[62]=K,e[63]=Z,e[64]=ee):ee=e[64];let pe;return e[65]!==se||e[66]!==w||e[67]!==s||e[68]!==ee?(pe=t.jsx(se,{open:s,onOpenChange:w,children:ee}),e[65]=se,e[66]=w,e[67]=s,e[68]=ee,e[69]=pe):pe=e[69],pe}function ft(i){return i.production}function gt(i){D("deco_site_import_failed",{error:i instanceof Error?i.message:"Unknown error"}),oe.error("Import failed: "+(i instanceof Error?i.message:"Unknown error"))}function pt(){return{}}function Ye(i,e){const s=k.c(12),{org:a}=$();let l;s[0]!==a.id?(l=Ae.REGISTRY(a.id),s[0]=a.id,s[1]=l):l=s[1];const n=l;let r;s[2]!==a.id||s[3]!==a.slug||s[4]!==n?(r={connectionId:n,orgId:a.id,orgSlug:a.slug},s[2]=a.id,s[3]=a.slug,s[4]=n,s[5]=r):r=s[5];const u=V(r);let d;s[6]!==i?(d={name:i},s[6]=i,s[7]=d):d=s[7];const _=e?.enabled??!0;let c;return s[8]!==u||s[9]!==d||s[10]!==_?(c={client:u,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:d,enabled:_,staleTime:3e5,select:ht},s[8]=u,s[9]=d,s[10]=_,s[11]=c):c=s[11],lt(c)}function ht(i){return i.structuredContent?.item??null}const xt="deco/mcp-github";function Nt(i){const{org:e}=$(),{data:s}=Fe.useSession(),a=Se(),l=je(),[n,r]=O.useState("idle"),[u,d]=O.useState(null),[_,c]=O.useState(null),{data:h,isLoading:C}=Ye(xt,{enabled:i.enabled}),f=O.useRef(!1);i.enabled&&h&&!C&&!f.current&&s?.user?.id&&n==="idle"&&(f.current=!0,p());async function p(){if(!(!h||!s?.user?.id||!e))try{r("installing"),d(null);const g=ct(h,e.id,s.user.id,{remoteIndex:0});if(!g.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:I}=await a.create.mutateAsync(g);r("authenticating");const b=new URL(`/api/${e.slug}/mcp/${I}`,window.location.origin),N=await Xe({url:b.href,token:null,orgId:e.id});if(N.supportsOAuth&&!N.isAuthenticated){const{token:y,tokenInfo:o,error:T}=await Ze({connectionId:I,orgSlug:e.slug,scope:"offline_access"});if(T||!y){try{await a.delete.mutateAsync(I)}catch{}throw new Error(T??"No token received from GitHub")}if(o)try{(await fetch(`/api/${e.slug}/connections/${I}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:o.accessToken,refreshToken:o.refreshToken,expiresIn:o.expiresIn,scope:o.scope,clientId:o.clientId,clientSecret:o.clientSecret,tokenEndpoint:o.tokenEndpoint})})).ok||await a.update.mutateAsync({id:I,data:{connection_token:y}})}catch{await a.update.mutateAsync({id:I,data:{connection_token:y}})}}ve(l,e.id),c(g),r("ready")}catch(g){d(g instanceof Error?g.message:String(g)),r("error")}}function m(){r("idle"),d(null),c(null),f.current=!1}return i.enabled&&C&&n==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:n,error:u,connection:_,retry:m}}function Zt(i){const e=k.c(21),{open:s,onOpenChange:a,title:l,hideAutoRespondCheckbox:n,onImportComplete:r}=i,u=l===void 0?"Import from GitHub":l,d=n===void 0?!1:n,[_]=et(),[c,h]=O.useState(null);if(!_.experimental_vibecode)return null;let C;e[0]!==u?(C=t.jsx(ue,{className:"sr-only",children:t.jsx(me,{children:u})}),e[0]=u,e[1]=C):C=e[1];let f;e[2]!==c||e[3]!==u?(f=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:c?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>h(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(Ee,{size:16})}),t.jsx("img",{src:c.avatarUrl,alt:c.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:c.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(re,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:u})]})}),e[2]=c,e[3]=u,e[4]=f):f=e[4];let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ne,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=p):p=e[5];let m;e[6]!==a?(m=()=>a(!1),e[6]=a,e[7]=m):m=e[7];let g;e[8]!==d||e[9]!==r||e[10]!==c||e[11]!==m?(g=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(O.Suspense,{fallback:p,children:t.jsx(_t,{onComplete:m,selectedInstallation:c,onSelectInstallation:h,hideAutoRespondCheckbox:d,onImportComplete:r})})}),e[8]=d,e[9]=r,e[10]=c,e[11]=m,e[12]=g):g=e[12];let x;e[13]!==C||e[14]!==f||e[15]!==g?(x=t.jsxs(le,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[C,f,g]}),e[13]=C,e[14]=f,e[15]=g,e[16]=x):x=e[16];let I;return e[17]!==a||e[18]!==s||e[19]!==x?(I=t.jsx(de,{open:s,onOpenChange:a,children:x}),e[17]=a,e[18]=s,e[19]=x,e[20]=I):I=e[20],I}function _t({onComplete:i,selectedInstallation:e,onSelectInstallation:s,hideAutoRespondCheckbox:a,onImportComplete:l}){const{org:n}=$(),r=je(),u=_e(),[d,_]=O.useState(null),[c,h]=O.useState(!0),C=a?!0:c,f=ot({slug:"mcp-github"}),p=Nt({enabled:f.length===0}),m=f.length===1?f[0]??null:d,g=V({connectionId:m?.id??"",orgId:n.id,orgSlug:n.slug}),x=V({connectionId:ce,orgId:n.id,orgSlug:n.slug}),I=async(o,T)=>{try{const v=await g.callTool({name:"get_file_contents",arguments:{owner:o.owner,repo:o.name,path:T}});if(v.isError)return null;const E=v.content?.find(S=>S.type==="resource")?.resource?.text;if(!E)return null;try{const S=JSON.parse(E);return typeof S=="string"?S:JSON.stringify(S)}catch{return E}}catch{return null}},b=(o,T)=>{Promise.all([I(T,"AGENTS.md"),I(T,"CLAUDE.md")]).then(async([w,v])=>{const A=w??v??null;A&&(await x.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:o,data:{metadata:{instructions:A}}}}),ve(r,n.id))}).catch(w=>{console.error("GitHub instructions fetch failed:",w)})},N=async({virtualMcpId:o,repo:T,connectionId:w})=>{const v=await g.callTool({name:"TRIGGER_LIST",arguments:{}}),A=v.structuredContent??v,E=A.triggers?.find(L=>L.type==="github.issues.opened")??A.triggers?.find(L=>{const ie=L.type.toLowerCase();return/\bissues?\./.test(ie)&&(ie.endsWith(".opened")||ie.endsWith(".created"))});if(!E)throw new Error("No issue-created trigger exposed by GitHub connection");const S=new Set;if(Array.isArray(E.params))for(const L of E.params)S.add(L.name);else if(E.params&&typeof E.params=="object")for(const L of Object.keys(E.params))S.add(L);if(E.paramsSchema)for(const L of Object.keys(E.paramsSchema))S.add(L);const R={};S.has("repo")?R.repo=`${T.owner}/${T.name}`:(S.has("owner")&&(R.owner=T.owner),S.has("name")&&(R.name=T.name),S.has("repository")&&(R.repository=`${T.owner}/${T.name}`));const z=`A new GitHub issue has been opened in ${T.owner}/${T.name}. Read the issue details, explore the relevant code in the repository, create a new branch, implement the fix or feature requested, and open a pull request that resolves the issue. Reference the issue number in the PR description.`,U=await x.callTool({name:"AUTOMATION_CREATE",arguments:{name:`${T.name}: auto-respond to issues`,virtual_mcp_id:o,messages:z,active:!0}}),se=U.structuredContent??U;await x.callTool({name:"AUTOMATION_TRIGGER_ADD",arguments:{automation_id:se.id,type:"event",connection_id:w,event_type:E.type,params:R}})},y=Be({mutationFn:async o=>{if(!m||!e)throw new Error("No GitHub connection or installation");const T=m.id,w=await x.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:o.name,description:o.description||"Imported from GitHub",pinned:!0,icon:null,metadata:{githubRepo:{owner:o.owner,name:o.name,url:o.url,installationId:e.installationId,connectionId:T},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"}}}},connections:[{connection_id:T}]}}}),v=w.structuredContent??w,A=v.item.id;return C&&await N({virtualMcpId:A,repo:o,connectionId:T}).catch(E=>{console.error("Failed to set up issue automation:",E),oe.warning("Imported repo, but failed to set up issue auto-response. You can add the trigger manually from the automations view.")}),{virtualMcpId:A,repo:o,connectionId:T,item:v.item}},onSuccess:({virtualMcpId:o,repo:T,connectionId:w,item:v})=>{if(r.setQueryData(ne.collectionItem(x,n.id,"","VIRTUAL_MCP",o),{item:v}),ve(r,n.id),b(o,T),l){l({virtualMcpId:o,repo:T,connectionId:w});return}oe.success(`Imported ${T.name} from GitHub`),i(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),u(o)},onError:o=>{oe.error("Failed to import repo: "+(o instanceof Error?o.message:"Unknown error"))}});return p.status==="installing"||p.status==="authenticating"?t.jsx(we,{status:p.status,error:null,retry:p.retry}):p.status==="error"?t.jsx(we,{status:"error",error:p.error,retry:p.retry}):f.length===0&&p.status==="idle"?t.jsx(we,{status:"installing",error:null,retry:p.retry}):f.length>1&&!m?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"})}),f.map(o=>t.jsxs("button",{type:"button",onClick:()=>_(o),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[o.icon?t.jsx("img",{src:o.icon,alt:o.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(re,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:o.title})]},o.id))]}):m?e?t.jsx(Tt,{connectionId:m.id,orgId:n.id,orgSlug:n.slug,installation:e,onSelectRepo:o=>y.mutate(o),isSaving:y.isPending,autoRespondToIssues:c,onAutoRespondChange:h,hideAutoRespondCheckbox:a}):t.jsx(Ct,{connectionId:m.id,orgId:n.id,orgSlug:n.slug,onSelect:s,showBackButton:f.length>1,onBack:()=>_(null)}):null}function Ct(i){const e=k.c(31),{connectionId:s,orgId:a,orgSlug:l,onSelect:n,showBackButton:r,onBack:u}=i;let d;e[0]!==a||e[1]!==l?(d={connectionId:ce,orgId:a,orgSlug:l},e[0]=a,e[1]=l,e[2]=d):d=e[2];const _=V(d);let c;e[3]!==s||e[4]!==a?(c=ne.githubUserOrgs(a,s),e[3]=s,e[4]=a,e[5]=c):c=e[5];let h;e[6]!==s||e[7]!==_?(h=async()=>{const T=(await _.callTool({name:"GITHUB_LIST_USER_ORGS",arguments:{connectionId:s}})).content?.[0]?.text;if(!T)throw new Error("No response from GITHUB_LIST_USER_ORGS");return JSON.parse(T)},e[6]=s,e[7]=_,e[8]=h):h=e[8];let C;e[9]!==c||e[10]!==h?(C={queryKey:c,queryFn:h},e[9]=c,e[10]=h,e[11]=C):C=e[11];const f=He(C);if(f.isLoading){let o;return e[12]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ne,{size:18,className:"animate-spin text-muted-foreground"})}),e[12]=o):o=e[12],o}if(f.isError){let o;return e[13]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"})}),e[13]=o):o=e[13],o}const p=f.data;if(!p)return null;let m;e[14]!==u||e[15]!==r?(m=r&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:u,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(Ee,{size:12}),"Change connection"]})}),e[14]=u,e[15]=r,e[16]=m):m=e[16];let g;if(e[17]!==p.installations||e[18]!==n){let o;e[20]!==n?(o=T=>t.jsxs("button",{type:"button",onClick:()=>n(T),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:T.avatarUrl,alt:T.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:T.login}),T.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 →"})]},T.installationId),e[20]=n,e[21]=o):o=e[21],g=p.installations.map(o),e[17]=p.installations,e[18]=n,e[19]=g}else g=e[19];let x;e[22]!==g?(x=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:g}),e[22]=g,e[23]=x):x=e[23];const I=p.appSlug?`https://github.com/apps/${p.appSlug}/installations/new`:"https://github.com/settings/installations";let b;e[24]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[24]=b):b=e[24];let N;e[25]!==I?(N=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:I,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",b]})}),e[25]=I,e[26]=N):N=e[26];let y;return e[27]!==N||e[28]!==m||e[29]!==x?(y=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,x,N]}),e[27]=N,e[28]=m,e[29]=x,e[30]=y):y=e[30],y}function Tt(i){const e=k.c(25),{connectionId:s,orgId:a,orgSlug:l,installation:n,onSelectRepo:r,isSaving:u,autoRespondToIssues:d,onAutoRespondChange:_,hideAutoRespondCheckbox:c}=i,[h,C]=O.useState(""),f=O.useDeferredValue(h),p=h!==f;let m;e[0]!==p||e[1]!==h?(m=t.jsx(Qe,{placeholder:"Search repositories...",value:h,onChange:C,isSearching:p}),e[0]=p,e[1]=h,e[2]=m):m=e[2];const g=p?"opacity-40":"opacity-100";let x;e[3]!==g?(x=xe("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",g),e[3]=g,e[4]=x):x=e[4];let I;e[5]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ne,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=I):I=e[5];let b;e[6]!==s||e[7]!==f||e[8]!==n||e[9]!==u||e[10]!==r||e[11]!==a||e[12]!==l?(b=t.jsx(O.Suspense,{fallback:I,children:t.jsx(It,{connectionId:s,orgId:a,orgSlug:l,installation:n,query:f,onSelectRepo:r,isSaving:u})}),e[6]=s,e[7]=f,e[8]=n,e[9]=u,e[10]=r,e[11]=a,e[12]=l,e[13]=b):b=e[13];let N;e[14]!==x||e[15]!==b?(N=t.jsx("div",{className:x,children:b}),e[14]=x,e[15]=b,e[16]=N):N=e[16];let y;e[17]!==d||e[18]!==c||e[19]!==_?(y=!c&&t.jsxs("label",{className:"flex items-center gap-2 px-4 py-3 border-t border-border shrink-0 cursor-pointer select-none",children:[t.jsx(it,{checked:d,onCheckedChange:T=>_(T===!0)}),t.jsx("span",{className:"text-xs text-foreground",children:"Auto-respond to new issues with a PR"})]}),e[17]=d,e[18]=c,e[19]=_,e[20]=y):y=e[20];let o;return e[21]!==m||e[22]!==N||e[23]!==y?(o=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,N,y]}),e[21]=m,e[22]=N,e[23]=y,e[24]=o):o=e[24],o}function It(i){const e=k.c(29),{connectionId:s,orgId:a,orgSlug:l,installation:n,query:r,onSelectRepo:u,isSaving:d}=i;let _;e[0]!==s||e[1]!==a||e[2]!==l?(_={connectionId:s,orgId:a,orgSlug:l},e[0]=s,e[1]=a,e[2]=l,e[3]=_):_=e[3];const c=V(_),h=n.type==="User"?"user":"org",C=r?`${h}:${n.login} ${r} in:name`:`${h}:${n.login}`;let f;e[4]!==s||e[5]!==n.login||e[6]!==a||e[7]!==r?(f=ne.githubOrgRepos(a,s,n.login,r),e[4]=s,e[5]=n.login,e[6]=a,e[7]=r,e[8]=f):f=e[8];let p;e[9]!==c||e[10]!==C?(p=async()=>{const N=(await c.callTool({name:"search_repositories",arguments:{query:C,page:1,perPage:30}})).content?.[0]?.text;if(!N)throw new Error("No response from search_repositories");return(JSON.parse(N).items??[]).map(yt)},e[9]=c,e[10]=C,e[11]=p):p=e[11];let m;e[12]!==f||e[13]!==p?(m={queryKey:f,queryFn:p},e[12]=f,e[13]=p,e[14]=m):m=e[14];const{data:g}=tt(m);if(g.length===0){let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=b):b=e[15];let N;e[16]!==r?(N=r&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=r,e[17]=N):N=e[17];let y;return e[18]!==N?(y=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[b,N]}),e[18]=N,e[19]=y):y=e[19],y}let x;if(e[20]!==d||e[21]!==u||e[22]!==g){let b;e[24]!==d||e[25]!==u?(b=N=>t.jsxs("button",{type:"button",onClick:()=>u(N),disabled:d,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(re,{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(at,{size:10}):t.jsx(rt,{size:10}),N.private?"Private":"Public"]})]},N.fullName),e[24]=d,e[25]=u,e[26]=b):b=e[26],x=g.map(b),e[20]=d,e[21]=u,e[22]=g,e[23]=x}else x=e[23];let I;return e[27]!==x?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:x}),e[27]=x,e[28]=I):I=e[28],I}function yt(i){return{name:i.name,fullName:i.full_name,owner:i.full_name.split("/")[0]??"",url:i.html_url,private:i.private,description:i.description,updatedAt:i.updated_at}}function we(i){const e=k.c(33),{status:s,error:a,retry:l}=i;if(s==="error"){let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(re,{className:"size-5 text-destructive"})}),e[0]=o):o=e[0];let T;e[1]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=T):T=e[1];const w=a??"Something went wrong while connecting to GitHub.";let v;e[2]!==w?(v=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[T,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:w})]}),e[2]=w,e[3]=v):v=e[3];let A;e[4]!==l?(A=t.jsx("button",{type:"button",onClick:l,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]=l,e[5]=A):A=e[5];let E;return e[6]!==v||e[7]!==A?(E=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[o,v,A]}),e[6]=v,e[7]=A,e[8]=E):E=e[8],E}const n=s==="authenticating";let r;e[9]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(re,{className:"size-5 text-foreground"})}),e[9]=r):r=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsxs("div",{className:"relative size-10",children:[r,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(Ne,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=u):u=e[10];const d=n?"Authenticating with GitHub":"Setting up GitHub";let _;e[11]!==d?(_=t.jsx("p",{className:"text-sm font-medium",children:d}),e[11]=d,e[12]=_):_=e[12];const c=n?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let h;e[13]!==c?(h=t.jsx("p",{className:"text-xs text-muted-foreground",children:c}),e[13]=c,e[14]=h):h=e[14];let C;e[15]!==_||e[16]!==h?(C=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[_,h]}),e[15]=_,e[16]=h,e[17]=C):C=e[17];const f=n?"bg-muted-foreground/30":"bg-foreground animate-pulse";let p;e[18]!==f?(p=xe("size-1.5 rounded-full",f),e[18]=f,e[19]=p):p=e[19];let m;e[20]!==p?(m=t.jsx("span",{className:p}),e[20]=p,e[21]=m):m=e[21];const g=n?"bg-foreground animate-pulse":"bg-muted-foreground/30";let x;e[22]!==g?(x=xe("size-1.5 rounded-full",g),e[22]=g,e[23]=x):x=e[23];let I;e[24]!==x?(I=t.jsx("span",{className:x}),e[24]=x,e[25]=I):I=e[25];let b;e[26]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=b):b=e[26];let N;e[27]!==m||e[28]!==I?(N=t.jsxs("div",{className:"flex items-center gap-1.5",children:[m,I,b]}),e[27]=m,e[28]=I,e[29]=N):N=e[29];let y;return e[30]!==N||e[31]!==C?(y=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[u,C,N]}),e[30]=N,e[31]=C,e[32]=y):y=e[32],y}const bt=["Full HAR capture with cache, TTFB, and request analysis","Screenshot capture for visual inspection","Page discovery via sitemap, navigation, and link crawling","SEO audit — meta tags, structured data, robots.txt","Third-party script inventory and size analysis","Dead link detection across the entire site","Deco-specific diagnostics (?__d debug mode)"];function Ve(i){const e=k.c(7),{onRecruit:s,isRecruiting:a,isLoading:l}=i;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("p",{className:"text-sm text-muted-foreground",children:"Add a blackbox diagnostics agent that tests your storefront from the outside — no internal access needed. Give it a URL and it produces a detailed performance and health report."}),e[0]=n):n=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Capabilities"}),e[1]=r):r=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsxs("div",{className:"space-y-2",children:[r,t.jsx("ul",{className:"space-y-1.5",children:bt.map(wt)})]}),e[2]=u):u=e[2];const d=a||l,_=a?"Setting up...":"Add Site Diagnostics";let c;return e[3]!==s||e[4]!==d||e[5]!==_?(c=t.jsxs("div",{className:"flex flex-col gap-6",children:[n,u,t.jsx(ae,{onClick:s,disabled:d,className:"w-full cursor-pointer",children:_})]}),e[3]=s,e[4]=d,e[5]=_,e[6]=c):c=e[6],c}function wt(i){return t.jsxs("li",{className:"text-sm text-muted-foreground flex items-start gap-2",children:[t.jsx("span",{className:"text-emerald-500 mt-0.5 shrink-0",children:"+"}),i]},i)}function en({open:i,onOpenChange:e,existingAgent:s}){const a=ke(),{org:l}=$(),n=_e(),r=Se(),u=Pe(),d=V({connectionId:ce,orgId:l.id,orgSlug:l.slug}),_=Ke({client:d}),[c,h]=O.useState(!1),C=qe.find(y=>y.id==="site-diagnostics"),{data:f,isLoading:p}=Ye(C.appId,{enabled:i}),m=f?.title||f?.server?.title||f?.server?.name||C.title,g=f?.server?.icons?.[0]?.src??C.icon,x=f?.server?.description??null,I=t.jsx(Ue,{icon:g,name:m,size:"sm"}),b=async()=>{if(f){if(s){e(!1),n(s.id);return}h(!0);try{const y=await _.mutateAsync({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_id"],operator:"eq",value:C.appId},limit:1,offset:0}});let o;const w=y?.structuredContent?.items?.find(A=>A.app_id===C.appId);if(w)o=w.id;else{const A=f.server?.remotes?.[0]?.url;if(!A)throw new Error("Registry item is missing a remote URL for site-diagnostics");o=(await r.create.mutateAsync({title:m,description:x,icon:f.server?.icons?.[0]?.src??C.icon,connection_type:"HTTP",connection_url:A,app_name:f.server?.name??"site-diagnostics",app_id:C.appId,metadata:{type:"site-diagnostics",source:"store",registry_item_id:C.appId,verified:!0}})).id}const v=await u.create.mutateAsync({title:m,description:x,icon:g,status:"active",connections:[{connection_id:o,selected_tools:null,selected_resources:null,selected_prompts:null}],metadata:{type:"site-diagnostics",instructions:null,ui:{pinnedViews:[{connectionId:o,toolName:"diagnose",label:"diagnose",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:o,toolName:"diagnose"}}}}});D("agent_recruit_confirmed",{template_id:"site-diagnostics",agent_id:v.id}),e(!1),n(v.id)}catch(y){D("agent_recruit_failed",{template_id:"site-diagnostics",error:y instanceof Error?y.message:String(y)}),console.error("Failed to create Site Diagnostics agent:",y)}finally{h(!1)}}},N=`Add ${m}`;return a?t.jsx(Oe,{open:i,onOpenChange:e,children:t.jsxs(Le,{className:"h-[70dvh]",children:[t.jsx(Re,{className:"px-4 pt-4 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[I,t.jsx(Me,{className:"text-xl font-semibold",children:N})]})}),t.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:t.jsx(Ve,{onRecruit:b,isRecruiting:c,isLoading:p})})]})}):t.jsx(de,{open:i,onOpenChange:e,children:t.jsxs(le,{className:"sm:max-w-[500px] p-8",children:[t.jsx(ue,{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[I,t.jsx(me,{className:"text-xl font-semibold",children:N})]})}),t.jsx(Ve,{onRecruit:b,isRecruiting:c,isLoading:p})]})})}const vt=`<role>
|
|
1
|
+
import{e as k,j as t,s as $,o as je,b as Fe,r as O,K as ne,n as He,a as Be,c as xe,B as ae,t as D,x as oe,G as Xe,F as Ze,v as ve,P as et,l as Ne,w as tt,f as nt}from"./index-Qc-HM-3V.js";import{S as ce,u as V,d as Ae,W as qe,a as be}from"./constants-BJbz7WCF.js";import{a as _e}from"./use-navigate-to-agent-DeYPLoEJ.js";import{a as le,b as de,c as ue,d as me,D as st}from"./dialog-CMvXkbcK.js";import{i as Ee}from"./RefreshCcw01-CjhD_64F.js";import{C as Qe}from"./collection-search-C-8aWgKY.js";import{C as it}from"./checkbox-CpdjRPxz.js";import{b as Se,u as ot}from"./use-connection-Bs0XMRE_.js";import{i as at}from"./Lock01-C0NTjdQ2.js";import{n as rt}from"./agent-icon-Aidj_nbT.js";import{e as ct}from"./extract-connection-data-Cp7JciHC.js";import{b as Oe,a as Le,c as Re,D as Me}from"./drawer-DB3e3BTg.js";import{u as ke}from"./tooltip-CGOE-2qV.js";import{I as Ue}from"./integration-icon-Dvo8MK78.js";import{u as lt,d as Ke}from"./use-mcp-tools-CDG9yfix.js";import{a as Pe,b as dt}from"./use-virtual-mcp-C9_YL7kD.js";function re(i){const e=k.c(4),{size:s,className:a}=i;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=l):l=e[0];let n;return e[1]!==a||e[2]!==s?(n=t.jsx("svg",{width:s,height:s,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:a,children:l}),e[1]=a,e[2]=s,e[3]=n):n=e[3],n}function ut(i){return i.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function mt(i){const e=await fetch(`/api/${i}/deco-sites`);if(!e.ok){const s=await e.json().catch(()=>({}));throw new Error(s.error??`Failed to load sites (${e.status})`)}return e.json()}function Xt(i){const e=k.c(70),{open:s,onOpenChange:a,onBack:l}=i,{org:n}=$(),r=_e(),u=je(),{data:d}=Fe.useSession(),[_,c]=O.useState(null),[h,C]=O.useState("");let f;e[0]!==n.id||e[1]!==n.slug?(f={connectionId:ce,orgId:n.id,orgSlug:n.slug},e[0]=n.id,e[1]=n.slug,e[2]=f):f=e[2];const p=V(f);let m;e[3]!==d?.user?.email?(m=ne.decoSites(d?.user?.email),e[3]=d?.user?.email,e[4]=m):m=e[4];let g;e[5]!==n.slug?(g=()=>mt(n.slug),e[5]=n.slug,e[6]=g):g=e[6];const x=s&&!!d?.user?.email;let I;e[7]!==m||e[8]!==g||e[9]!==x?(I={queryKey:m,queryFn:g,enabled:x,staleTime:6e4,retry:!1},e[7]=m,e[8]=g,e[9]=x,e[10]=I):I=e[10];const{data:b,isLoading:N,error:y}=He(I),o=b?.sites??[];let T;e[11]!==a?(T=j=>{j||(c(null),C("")),a(j)},e[11]=a,e[12]=T):T=e[12];const w=T;let v;e[13]!==h?(v=j=>j.name.toLowerCase().includes(h.toLowerCase())||j.domains?.[0]?.domain.toLowerCase().includes(h.toLowerCase()),e[13]=h,e[14]=v):v=e[14];const A=o.filter(v),E=!_||A.some(j=>j.name===_);let S;e[15]!==p||e[16]!==n.id||e[17]!==n.slug?(S=async j=>{D("deco_site_import_started",{site_name:j});const P=await fetch(`/api/${n.slug}/deco-sites/connection`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:j,orgId:n.id})}),G=await P.json().catch(pt);if(!P.ok)throw new Error(G.error??`Failed to create connection (${P.status})`);const M=G.connId;if(!M)throw new Error("Server did not return a connection ID");const he=G.icon??null,te=ut(j),Ge=await p.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:j,description:"Imported from deco.cx",pinned:!0,icon:he??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],ui:{banner:null,bannerColor:"#22C55E",icon:he,themeColor:"#22C55E",slug:te,pinnedViews:[{connectionId:M,toolName:"file_explorer",label:"Preview",icon:null},{connectionId:M,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:M,toolName:"get_monitor_data",label:"Monitor",icon:null},{connectionId:M,toolName:"list_pull_requests",label:"Pull Requests",icon:null},{connectionId:M,toolName:"list_releases",label:"Releases",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:M,toolName:"file_explorer"}}}},connections:[{connection_id:M}]}}}),De=Ge.structuredContent??Ge;return{slug:te,virtualMcpId:De.item.id,connId:M,item:De.item}},e[15]=p,e[16]=n.id,e[17]=n.slug,e[18]=S):S=e[18];let R;e[19]!==p||e[20]!==w||e[21]!==r||e[22]!==n.id||e[23]!==u?(R=j=>{const{slug:P,virtualMcpId:G,item:M}=j;D("deco_site_import_succeeded",{site_name:M.title,virtual_mcp_id:G,slug:P}),u.setQueryData(ne.collectionItem(p,n.id,"","VIRTUAL_MCP",G),{item:M}),u.invalidateQueries({predicate:he=>{const te=he.queryKey;return te[1]===n.id&&te[3]==="collection"&&te[4]==="VIRTUAL_MCP"}}),u.invalidateQueries({queryKey:ne.projects(n.id)}),oe.success(`Imported ${P} from deco.cx`),w(!1),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),r(G)},e[19]=p,e[20]=w,e[21]=r,e[22]=n.id,e[23]=u,e[24]=R):R=e[24];let z;e[25]!==S||e[26]!==R?(z={mutationFn:S,onSuccess:R,onError:gt},e[25]=S,e[26]=R,e[27]=z):z=e[27];const U=Be(z),se=de,L=le,ie="sm:max-w-[900px] p-0 gap-0 overflow-hidden";let F;e[28]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(ue,{className:"sr-only",children:t.jsx(me,{children:"Import from deco.cx"})}),e[28]=F):F=e[28];let H;e[29]!==l?(H=l&&t.jsx("button",{type:"button",onClick:l,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":"Go back",children:t.jsx(Ee,{size:18})}),e[29]=l,e[30]=H):H=e[30];let fe;e[31]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from deco.cx"}),e[31]=fe):fe=e[31];let B;e[32]!==H?(B=t.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[H,fe]}),e[32]=H,e[33]=B):B=e[33];let ge;e[34]===Symbol.for("react.memo_cache_sentinel")?(ge=j=>{j.key==="Escape"&&C("")},e[34]=ge):ge=e[34];let q;e[35]!==h?(q=t.jsx("div",{children:t.jsx(Qe,{value:h,onChange:C,placeholder:"Search sites...",onKeyDown:ge})}),e[35]=h,e[36]=q):q=e[36];const Je="pb-0 min-h-[300px]";let Q;e[37]!==N?(Q=N&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Loading sites..."}),e[37]=N,e[38]=Q):Q=e[38];const Ce=!N&&!y&&o.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"No sites found for this account."}),Te=!N&&o.length>0&&t.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[A.length===0&&t.jsxs("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:["No sites match “",h,"”"]}),A.map(j=>{const P=j.domains?.find(ft)?.domain??j.domains?.[0]?.domain,G=_===j.name;return t.jsxs("button",{type:"button",onClick:()=>c(j.name),className:xe("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",G?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[t.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:j.thumb_url?t.jsx("img",{src:j.thumb_url,alt:j.name,className:"w-full h-full object-cover",loading:"lazy"}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsxs("div",{className:"px-4 py-3",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:j.name}),P&&t.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:P})]})]},j.name)})]});let K;e[39]!==Q||e[40]!==Ce||e[41]!==Te?(K=t.jsxs("div",{className:Je,children:[Q,Ce,Te]}),e[39]=Q,e[40]=Ce,e[41]=Te,e[42]=K):K=e[42];let Y;e[43]!==w?(Y=()=>w(!1),e[43]=w,e[44]=Y):Y=e[44];let W;e[45]!==U.isPending||e[46]!==Y?(W=t.jsx(ae,{variant:"outline",onClick:Y,disabled:U.isPending,children:"Cancel"}),e[45]=U.isPending,e[46]=Y,e[47]=W):W=e[47];const Ie=!_||!E||U.isPending||N;let J;e[48]!==U||e[49]!==_?(J=()=>_&&U.mutate(_),e[48]=U,e[49]=_,e[50]=J):J=e[50];const ye=U.isPending?"Importing...":"Import";let X;e[51]!==Ie||e[52]!==J||e[53]!==ye?(X=t.jsx(ae,{disabled:Ie,onClick:J,children:ye}),e[51]=Ie,e[52]=J,e[53]=ye,e[54]=X):X=e[54];let Z;e[55]!==W||e[56]!==X?(Z=t.jsxs(st,{className:"px-8 py-5 border-t border-border",children:[W,X]}),e[55]=W,e[56]=X,e[57]=Z):Z=e[57];let ee;e[58]!==L||e[59]!==F||e[60]!==B||e[61]!==q||e[62]!==K||e[63]!==Z?(ee=t.jsxs(L,{className:ie,children:[F,B,q,K,Z]}),e[58]=L,e[59]=F,e[60]=B,e[61]=q,e[62]=K,e[63]=Z,e[64]=ee):ee=e[64];let pe;return e[65]!==se||e[66]!==w||e[67]!==s||e[68]!==ee?(pe=t.jsx(se,{open:s,onOpenChange:w,children:ee}),e[65]=se,e[66]=w,e[67]=s,e[68]=ee,e[69]=pe):pe=e[69],pe}function ft(i){return i.production}function gt(i){D("deco_site_import_failed",{error:i instanceof Error?i.message:"Unknown error"}),oe.error("Import failed: "+(i instanceof Error?i.message:"Unknown error"))}function pt(){return{}}function Ye(i,e){const s=k.c(12),{org:a}=$();let l;s[0]!==a.id?(l=Ae.REGISTRY(a.id),s[0]=a.id,s[1]=l):l=s[1];const n=l;let r;s[2]!==a.id||s[3]!==a.slug||s[4]!==n?(r={connectionId:n,orgId:a.id,orgSlug:a.slug},s[2]=a.id,s[3]=a.slug,s[4]=n,s[5]=r):r=s[5];const u=V(r);let d;s[6]!==i?(d={name:i},s[6]=i,s[7]=d):d=s[7];const _=e?.enabled??!0;let c;return s[8]!==u||s[9]!==d||s[10]!==_?(c={client:u,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:d,enabled:_,staleTime:3e5,select:ht},s[8]=u,s[9]=d,s[10]=_,s[11]=c):c=s[11],lt(c)}function ht(i){return i.structuredContent?.item??null}const xt="deco/mcp-github";function Nt(i){const{org:e}=$(),{data:s}=Fe.useSession(),a=Se(),l=je(),[n,r]=O.useState("idle"),[u,d]=O.useState(null),[_,c]=O.useState(null),{data:h,isLoading:C}=Ye(xt,{enabled:i.enabled}),f=O.useRef(!1);i.enabled&&h&&!C&&!f.current&&s?.user?.id&&n==="idle"&&(f.current=!0,p());async function p(){if(!(!h||!s?.user?.id||!e))try{r("installing"),d(null);const g=ct(h,e.id,s.user.id,{remoteIndex:0});if(!g.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:I}=await a.create.mutateAsync(g);r("authenticating");const b=new URL(`/api/${e.slug}/mcp/${I}`,window.location.origin),N=await Xe({url:b.href,token:null,orgId:e.id});if(N.supportsOAuth&&!N.isAuthenticated){const{token:y,tokenInfo:o,error:T}=await Ze({connectionId:I,orgSlug:e.slug,scope:"offline_access"});if(T||!y){try{await a.delete.mutateAsync(I)}catch{}throw new Error(T??"No token received from GitHub")}if(o)try{(await fetch(`/api/${e.slug}/connections/${I}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:o.accessToken,refreshToken:o.refreshToken,expiresIn:o.expiresIn,scope:o.scope,clientId:o.clientId,clientSecret:o.clientSecret,tokenEndpoint:o.tokenEndpoint})})).ok||await a.update.mutateAsync({id:I,data:{connection_token:y}})}catch{await a.update.mutateAsync({id:I,data:{connection_token:y}})}}ve(l,e.id),c(g),r("ready")}catch(g){d(g instanceof Error?g.message:String(g)),r("error")}}function m(){r("idle"),d(null),c(null),f.current=!1}return i.enabled&&C&&n==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:n,error:u,connection:_,retry:m}}function Zt(i){const e=k.c(21),{open:s,onOpenChange:a,title:l,hideAutoRespondCheckbox:n,onImportComplete:r}=i,u=l===void 0?"Import from GitHub":l,d=n===void 0?!1:n,[_]=et(),[c,h]=O.useState(null);if(!_.experimental_vibecode)return null;let C;e[0]!==u?(C=t.jsx(ue,{className:"sr-only",children:t.jsx(me,{children:u})}),e[0]=u,e[1]=C):C=e[1];let f;e[2]!==c||e[3]!==u?(f=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:c?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>h(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(Ee,{size:16})}),t.jsx("img",{src:c.avatarUrl,alt:c.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:c.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(re,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:u})]})}),e[2]=c,e[3]=u,e[4]=f):f=e[4];let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ne,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=p):p=e[5];let m;e[6]!==a?(m=()=>a(!1),e[6]=a,e[7]=m):m=e[7];let g;e[8]!==d||e[9]!==r||e[10]!==c||e[11]!==m?(g=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(O.Suspense,{fallback:p,children:t.jsx(_t,{onComplete:m,selectedInstallation:c,onSelectInstallation:h,hideAutoRespondCheckbox:d,onImportComplete:r})})}),e[8]=d,e[9]=r,e[10]=c,e[11]=m,e[12]=g):g=e[12];let x;e[13]!==C||e[14]!==f||e[15]!==g?(x=t.jsxs(le,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[C,f,g]}),e[13]=C,e[14]=f,e[15]=g,e[16]=x):x=e[16];let I;return e[17]!==a||e[18]!==s||e[19]!==x?(I=t.jsx(de,{open:s,onOpenChange:a,children:x}),e[17]=a,e[18]=s,e[19]=x,e[20]=I):I=e[20],I}function _t({onComplete:i,selectedInstallation:e,onSelectInstallation:s,hideAutoRespondCheckbox:a,onImportComplete:l}){const{org:n}=$(),r=je(),u=_e(),[d,_]=O.useState(null),[c,h]=O.useState(!0),C=a?!0:c,f=ot({slug:"mcp-github"}),p=Nt({enabled:f.length===0}),m=f.length===1?f[0]??null:d,g=V({connectionId:m?.id??"",orgId:n.id,orgSlug:n.slug}),x=V({connectionId:ce,orgId:n.id,orgSlug:n.slug}),I=async(o,T)=>{try{const v=await g.callTool({name:"get_file_contents",arguments:{owner:o.owner,repo:o.name,path:T}});if(v.isError)return null;const E=v.content?.find(S=>S.type==="resource")?.resource?.text;if(!E)return null;try{const S=JSON.parse(E);return typeof S=="string"?S:JSON.stringify(S)}catch{return E}}catch{return null}},b=(o,T)=>{Promise.all([I(T,"AGENTS.md"),I(T,"CLAUDE.md")]).then(async([w,v])=>{const A=w??v??null;A&&(await x.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:o,data:{metadata:{instructions:A}}}}),ve(r,n.id))}).catch(w=>{console.error("GitHub instructions fetch failed:",w)})},N=async({virtualMcpId:o,repo:T,connectionId:w})=>{const v=await g.callTool({name:"TRIGGER_LIST",arguments:{}}),A=v.structuredContent??v,E=A.triggers?.find(L=>L.type==="github.issues.opened")??A.triggers?.find(L=>{const ie=L.type.toLowerCase();return/\bissues?\./.test(ie)&&(ie.endsWith(".opened")||ie.endsWith(".created"))});if(!E)throw new Error("No issue-created trigger exposed by GitHub connection");const S=new Set;if(Array.isArray(E.params))for(const L of E.params)S.add(L.name);else if(E.params&&typeof E.params=="object")for(const L of Object.keys(E.params))S.add(L);if(E.paramsSchema)for(const L of Object.keys(E.paramsSchema))S.add(L);const R={};S.has("repo")?R.repo=`${T.owner}/${T.name}`:(S.has("owner")&&(R.owner=T.owner),S.has("name")&&(R.name=T.name),S.has("repository")&&(R.repository=`${T.owner}/${T.name}`));const z=`A new GitHub issue has been opened in ${T.owner}/${T.name}. Read the issue details, explore the relevant code in the repository, create a new branch, implement the fix or feature requested, and open a pull request that resolves the issue. Reference the issue number in the PR description.`,U=await x.callTool({name:"AUTOMATION_CREATE",arguments:{name:`${T.name}: auto-respond to issues`,virtual_mcp_id:o,messages:z,active:!0}}),se=U.structuredContent??U;await x.callTool({name:"AUTOMATION_TRIGGER_ADD",arguments:{automation_id:se.id,type:"event",connection_id:w,event_type:E.type,params:R}})},y=Be({mutationFn:async o=>{if(!m||!e)throw new Error("No GitHub connection or installation");const T=m.id,w=await x.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:o.name,description:o.description||"Imported from GitHub",pinned:!0,icon:null,metadata:{githubRepo:{owner:o.owner,name:o.name,url:o.url,installationId:e.installationId,connectionId:T},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"}}}},connections:[{connection_id:T}]}}}),v=w.structuredContent??w,A=v.item.id;return C&&await N({virtualMcpId:A,repo:o,connectionId:T}).catch(E=>{console.error("Failed to set up issue automation:",E),oe.warning("Imported repo, but failed to set up issue auto-response. You can add the trigger manually from the automations view.")}),{virtualMcpId:A,repo:o,connectionId:T,item:v.item}},onSuccess:({virtualMcpId:o,repo:T,connectionId:w,item:v})=>{if(r.setQueryData(ne.collectionItem(x,n.id,"","VIRTUAL_MCP",o),{item:v}),ve(r,n.id),b(o,T),l){l({virtualMcpId:o,repo:T,connectionId:w});return}oe.success(`Imported ${T.name} from GitHub`),i(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),u(o)},onError:o=>{oe.error("Failed to import repo: "+(o instanceof Error?o.message:"Unknown error"))}});return p.status==="installing"||p.status==="authenticating"?t.jsx(we,{status:p.status,error:null,retry:p.retry}):p.status==="error"?t.jsx(we,{status:"error",error:p.error,retry:p.retry}):f.length===0&&p.status==="idle"?t.jsx(we,{status:"installing",error:null,retry:p.retry}):f.length>1&&!m?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"})}),f.map(o=>t.jsxs("button",{type:"button",onClick:()=>_(o),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[o.icon?t.jsx("img",{src:o.icon,alt:o.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(re,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:o.title})]},o.id))]}):m?e?t.jsx(Tt,{connectionId:m.id,orgId:n.id,orgSlug:n.slug,installation:e,onSelectRepo:o=>y.mutate(o),isSaving:y.isPending,autoRespondToIssues:c,onAutoRespondChange:h,hideAutoRespondCheckbox:a}):t.jsx(Ct,{connectionId:m.id,orgId:n.id,orgSlug:n.slug,onSelect:s,showBackButton:f.length>1,onBack:()=>_(null)}):null}function Ct(i){const e=k.c(31),{connectionId:s,orgId:a,orgSlug:l,onSelect:n,showBackButton:r,onBack:u}=i;let d;e[0]!==a||e[1]!==l?(d={connectionId:ce,orgId:a,orgSlug:l},e[0]=a,e[1]=l,e[2]=d):d=e[2];const _=V(d);let c;e[3]!==s||e[4]!==a?(c=ne.githubUserOrgs(a,s),e[3]=s,e[4]=a,e[5]=c):c=e[5];let h;e[6]!==s||e[7]!==_?(h=async()=>{const T=(await _.callTool({name:"GITHUB_LIST_USER_ORGS",arguments:{connectionId:s}})).content?.[0]?.text;if(!T)throw new Error("No response from GITHUB_LIST_USER_ORGS");return JSON.parse(T)},e[6]=s,e[7]=_,e[8]=h):h=e[8];let C;e[9]!==c||e[10]!==h?(C={queryKey:c,queryFn:h},e[9]=c,e[10]=h,e[11]=C):C=e[11];const f=He(C);if(f.isLoading){let o;return e[12]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ne,{size:18,className:"animate-spin text-muted-foreground"})}),e[12]=o):o=e[12],o}if(f.isError){let o;return e[13]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"})}),e[13]=o):o=e[13],o}const p=f.data;if(!p)return null;let m;e[14]!==u||e[15]!==r?(m=r&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:u,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(Ee,{size:12}),"Change connection"]})}),e[14]=u,e[15]=r,e[16]=m):m=e[16];let g;if(e[17]!==p.installations||e[18]!==n){let o;e[20]!==n?(o=T=>t.jsxs("button",{type:"button",onClick:()=>n(T),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:T.avatarUrl,alt:T.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:T.login}),T.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 →"})]},T.installationId),e[20]=n,e[21]=o):o=e[21],g=p.installations.map(o),e[17]=p.installations,e[18]=n,e[19]=g}else g=e[19];let x;e[22]!==g?(x=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:g}),e[22]=g,e[23]=x):x=e[23];const I=p.appSlug?`https://github.com/apps/${p.appSlug}/installations/new`:"https://github.com/settings/installations";let b;e[24]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[24]=b):b=e[24];let N;e[25]!==I?(N=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:I,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",b]})}),e[25]=I,e[26]=N):N=e[26];let y;return e[27]!==N||e[28]!==m||e[29]!==x?(y=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,x,N]}),e[27]=N,e[28]=m,e[29]=x,e[30]=y):y=e[30],y}function Tt(i){const e=k.c(25),{connectionId:s,orgId:a,orgSlug:l,installation:n,onSelectRepo:r,isSaving:u,autoRespondToIssues:d,onAutoRespondChange:_,hideAutoRespondCheckbox:c}=i,[h,C]=O.useState(""),f=O.useDeferredValue(h),p=h!==f;let m;e[0]!==p||e[1]!==h?(m=t.jsx(Qe,{placeholder:"Search repositories...",value:h,onChange:C,isSearching:p}),e[0]=p,e[1]=h,e[2]=m):m=e[2];const g=p?"opacity-40":"opacity-100";let x;e[3]!==g?(x=xe("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",g),e[3]=g,e[4]=x):x=e[4];let I;e[5]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ne,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=I):I=e[5];let b;e[6]!==s||e[7]!==f||e[8]!==n||e[9]!==u||e[10]!==r||e[11]!==a||e[12]!==l?(b=t.jsx(O.Suspense,{fallback:I,children:t.jsx(It,{connectionId:s,orgId:a,orgSlug:l,installation:n,query:f,onSelectRepo:r,isSaving:u})}),e[6]=s,e[7]=f,e[8]=n,e[9]=u,e[10]=r,e[11]=a,e[12]=l,e[13]=b):b=e[13];let N;e[14]!==x||e[15]!==b?(N=t.jsx("div",{className:x,children:b}),e[14]=x,e[15]=b,e[16]=N):N=e[16];let y;e[17]!==d||e[18]!==c||e[19]!==_?(y=!c&&t.jsxs("label",{className:"flex items-center gap-2 px-4 py-3 border-t border-border shrink-0 cursor-pointer select-none",children:[t.jsx(it,{checked:d,onCheckedChange:T=>_(T===!0)}),t.jsx("span",{className:"text-xs text-foreground",children:"Auto-respond to new issues with a PR"})]}),e[17]=d,e[18]=c,e[19]=_,e[20]=y):y=e[20];let o;return e[21]!==m||e[22]!==N||e[23]!==y?(o=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,N,y]}),e[21]=m,e[22]=N,e[23]=y,e[24]=o):o=e[24],o}function It(i){const e=k.c(29),{connectionId:s,orgId:a,orgSlug:l,installation:n,query:r,onSelectRepo:u,isSaving:d}=i;let _;e[0]!==s||e[1]!==a||e[2]!==l?(_={connectionId:s,orgId:a,orgSlug:l},e[0]=s,e[1]=a,e[2]=l,e[3]=_):_=e[3];const c=V(_),h=n.type==="User"?"user":"org",C=r?`${h}:${n.login} ${r} in:name`:`${h}:${n.login}`;let f;e[4]!==s||e[5]!==n.login||e[6]!==a||e[7]!==r?(f=ne.githubOrgRepos(a,s,n.login,r),e[4]=s,e[5]=n.login,e[6]=a,e[7]=r,e[8]=f):f=e[8];let p;e[9]!==c||e[10]!==C?(p=async()=>{const N=(await c.callTool({name:"search_repositories",arguments:{query:C,page:1,perPage:30}})).content?.[0]?.text;if(!N)throw new Error("No response from search_repositories");return(JSON.parse(N).items??[]).map(yt)},e[9]=c,e[10]=C,e[11]=p):p=e[11];let m;e[12]!==f||e[13]!==p?(m={queryKey:f,queryFn:p},e[12]=f,e[13]=p,e[14]=m):m=e[14];const{data:g}=tt(m);if(g.length===0){let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=b):b=e[15];let N;e[16]!==r?(N=r&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=r,e[17]=N):N=e[17];let y;return e[18]!==N?(y=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[b,N]}),e[18]=N,e[19]=y):y=e[19],y}let x;if(e[20]!==d||e[21]!==u||e[22]!==g){let b;e[24]!==d||e[25]!==u?(b=N=>t.jsxs("button",{type:"button",onClick:()=>u(N),disabled:d,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(re,{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(at,{size:10}):t.jsx(rt,{size:10}),N.private?"Private":"Public"]})]},N.fullName),e[24]=d,e[25]=u,e[26]=b):b=e[26],x=g.map(b),e[20]=d,e[21]=u,e[22]=g,e[23]=x}else x=e[23];let I;return e[27]!==x?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:x}),e[27]=x,e[28]=I):I=e[28],I}function yt(i){return{name:i.name,fullName:i.full_name,owner:i.full_name.split("/")[0]??"",url:i.html_url,private:i.private,description:i.description,updatedAt:i.updated_at}}function we(i){const e=k.c(33),{status:s,error:a,retry:l}=i;if(s==="error"){let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(re,{className:"size-5 text-destructive"})}),e[0]=o):o=e[0];let T;e[1]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=T):T=e[1];const w=a??"Something went wrong while connecting to GitHub.";let v;e[2]!==w?(v=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[T,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:w})]}),e[2]=w,e[3]=v):v=e[3];let A;e[4]!==l?(A=t.jsx("button",{type:"button",onClick:l,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]=l,e[5]=A):A=e[5];let E;return e[6]!==v||e[7]!==A?(E=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[o,v,A]}),e[6]=v,e[7]=A,e[8]=E):E=e[8],E}const n=s==="authenticating";let r;e[9]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(re,{className:"size-5 text-foreground"})}),e[9]=r):r=e[9];let u;e[10]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsxs("div",{className:"relative size-10",children:[r,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(Ne,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=u):u=e[10];const d=n?"Authenticating with GitHub":"Setting up GitHub";let _;e[11]!==d?(_=t.jsx("p",{className:"text-sm font-medium",children:d}),e[11]=d,e[12]=_):_=e[12];const c=n?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let h;e[13]!==c?(h=t.jsx("p",{className:"text-xs text-muted-foreground",children:c}),e[13]=c,e[14]=h):h=e[14];let C;e[15]!==_||e[16]!==h?(C=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[_,h]}),e[15]=_,e[16]=h,e[17]=C):C=e[17];const f=n?"bg-muted-foreground/30":"bg-foreground animate-pulse";let p;e[18]!==f?(p=xe("size-1.5 rounded-full",f),e[18]=f,e[19]=p):p=e[19];let m;e[20]!==p?(m=t.jsx("span",{className:p}),e[20]=p,e[21]=m):m=e[21];const g=n?"bg-foreground animate-pulse":"bg-muted-foreground/30";let x;e[22]!==g?(x=xe("size-1.5 rounded-full",g),e[22]=g,e[23]=x):x=e[23];let I;e[24]!==x?(I=t.jsx("span",{className:x}),e[24]=x,e[25]=I):I=e[25];let b;e[26]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=b):b=e[26];let N;e[27]!==m||e[28]!==I?(N=t.jsxs("div",{className:"flex items-center gap-1.5",children:[m,I,b]}),e[27]=m,e[28]=I,e[29]=N):N=e[29];let y;return e[30]!==N||e[31]!==C?(y=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[u,C,N]}),e[30]=N,e[31]=C,e[32]=y):y=e[32],y}const bt=["Full HAR capture with cache, TTFB, and request analysis","Screenshot capture for visual inspection","Page discovery via sitemap, navigation, and link crawling","SEO audit — meta tags, structured data, robots.txt","Third-party script inventory and size analysis","Dead link detection across the entire site","Deco-specific diagnostics (?__d debug mode)"];function Ve(i){const e=k.c(7),{onRecruit:s,isRecruiting:a,isLoading:l}=i;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("p",{className:"text-sm text-muted-foreground",children:"Add a blackbox diagnostics agent that tests your storefront from the outside — no internal access needed. Give it a URL and it produces a detailed performance and health report."}),e[0]=n):n=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Capabilities"}),e[1]=r):r=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsxs("div",{className:"space-y-2",children:[r,t.jsx("ul",{className:"space-y-1.5",children:bt.map(wt)})]}),e[2]=u):u=e[2];const d=a||l,_=a?"Setting up...":"Add Site Diagnostics";let c;return e[3]!==s||e[4]!==d||e[5]!==_?(c=t.jsxs("div",{className:"flex flex-col gap-6",children:[n,u,t.jsx(ae,{onClick:s,disabled:d,className:"w-full cursor-pointer",children:_})]}),e[3]=s,e[4]=d,e[5]=_,e[6]=c):c=e[6],c}function wt(i){return t.jsxs("li",{className:"text-sm text-muted-foreground flex items-start gap-2",children:[t.jsx("span",{className:"text-emerald-500 mt-0.5 shrink-0",children:"+"}),i]},i)}function en({open:i,onOpenChange:e,existingAgent:s}){const a=ke(),{org:l}=$(),n=_e(),r=Se(),u=Pe(),d=V({connectionId:ce,orgId:l.id,orgSlug:l.slug}),_=Ke({client:d}),[c,h]=O.useState(!1),C=qe.find(y=>y.id==="site-diagnostics"),{data:f,isLoading:p}=Ye(C.appId,{enabled:i}),m=f?.title||f?.server?.title||f?.server?.name||C.title,g=f?.server?.icons?.[0]?.src??C.icon,x=f?.server?.description??null,I=t.jsx(Ue,{icon:g,name:m,size:"sm"}),b=async()=>{if(f){if(s){e(!1),n(s.id);return}h(!0);try{const y=await _.mutateAsync({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_id"],operator:"eq",value:C.appId},limit:1,offset:0}});let o;const w=y?.structuredContent?.items?.find(A=>A.app_id===C.appId);if(w)o=w.id;else{const A=f.server?.remotes?.[0]?.url;if(!A)throw new Error("Registry item is missing a remote URL for site-diagnostics");o=(await r.create.mutateAsync({title:m,description:x,icon:f.server?.icons?.[0]?.src??C.icon,connection_type:"HTTP",connection_url:A,app_name:f.server?.name??"site-diagnostics",app_id:C.appId,metadata:{type:"site-diagnostics",source:"store",registry_item_id:C.appId,verified:!0}})).id}const v=await u.create.mutateAsync({title:m,description:x,icon:g,status:"active",connections:[{connection_id:o,selected_tools:null,selected_resources:null,selected_prompts:null}],metadata:{type:"site-diagnostics",instructions:null,ui:{pinnedViews:[{connectionId:o,toolName:"diagnose",label:"diagnose",icon:null}],layout:{defaultMainView:{type:"ext-apps",id:o,toolName:"diagnose"}}}}});D("agent_recruit_confirmed",{template_id:"site-diagnostics",agent_id:v.id}),e(!1),n(v.id)}catch(y){D("agent_recruit_failed",{template_id:"site-diagnostics",error:y instanceof Error?y.message:String(y)}),console.error("Failed to create Site Diagnostics agent:",y)}finally{h(!1)}}},N=`Add ${m}`;return a?t.jsx(Oe,{open:i,onOpenChange:e,children:t.jsxs(Le,{className:"h-[70dvh]",children:[t.jsx(Re,{className:"px-4 pt-4 pb-4 shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[I,t.jsx(Me,{className:"text-xl font-semibold",children:N})]})}),t.jsx("div",{className:"flex flex-col flex-1 min-h-0 px-4 pb-8",children:t.jsx(Ve,{onRecruit:b,isRecruiting:c,isLoading:p})})]})}):t.jsx(de,{open:i,onOpenChange:e,children:t.jsxs(le,{className:"sm:max-w-[500px] p-8",children:[t.jsx(ue,{className:"mb-4",children:t.jsxs("div",{className:"flex items-center gap-3",children:[I,t.jsx(me,{className:"text-xl font-semibold",children:N})]})}),t.jsx(Ve,{onRecruit:b,isRecruiting:c,isLoading:p})]})})}const vt=`<role>
|
|
2
2
|
You are the Agent Manager. You create, configure, and maintain agents (Virtual MCPs) in this workspace.
|
|
3
3
|
</role>
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as X,r as x,a as V,t as P,b as p,j as e,B as f,c as T,d as ae,S as $,N as ie,e as oe}from"./index-DRcAHhaZ.js";import{I}from"./input-DZM-sZUE.js";function le({redirectUrl:s,callbackUrl:r="/"}){const{emailAndPassword:l,resetPassword:u,emailOtp:i,socialProviders:d}=X(),[n,j]=x.useState(""),[y,D]=x.useState(""),[b,C]=x.useState(""),[O,A]=x.useState(""),[L,R]=x.useState(!1),[z,N]=x.useState(()=>!l.enabled&&i.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[c,S]=x.useState(""),[Y,G]=x.useState(!1),m=z==="signUp",h=z==="forgotPassword",w=z==="emailOtp",F=V({mutationFn:async({email:t,password:a,name:q})=>{try{if(m){const g=await p.signUp.email({email:t,password:a,name:q||""});if(g.error)throw new Error(g.error.message||"Sign up failed");return g}else{const g=await p.signIn.email({email:t,password:a});if(g.error)throw new Error(g.error.message||"Sign in failed");return g}}catch(g){throw g instanceof Error?g:new Error("Authentication failed")}},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??r},onError:t=>{P(m?"user_signup_failed":"user_signin_failed",{error:t instanceof Error?t.message:String(t)})}}),U=V({mutationFn:async({email:t})=>{const a=await p.requestPasswordReset({email:t,redirectTo:"/reset-password"});if(a.error)throw new Error(a.error.message||"Failed to send reset email");return a},onSuccess:()=>{P("password_reset_requested"),G(!0)},onError:t=>{P("password_reset_request_failed",{error:t instanceof Error?t.message:String(t)})}}),E=V({mutationFn:async({email:t})=>{const a=await p.emailOtp.sendVerificationOtp({email:t,type:"sign-in"});if(a.error)throw new Error(a.error.message||"Failed to send code");return a},onSuccess:()=>{P("email_otp_sent"),R(!0)},onError:t=>{P("email_otp_send_failed",{error:t instanceof Error?t.message:String(t)})}}),_=V({mutationFn:async({email:t,otp:a})=>{const q=await p.signIn.emailOtp({email:t,otp:a});if(q.error)throw new Error(q.error.message||"Invalid code");return q},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??r},onError:t=>{P("email_otp_verify_failed",{error:t instanceof Error?t.message:String(t)})}}),B=t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),W=()=>{n.trim()&&!B(n)&&S("Invalid email address")},Z=t=>{if(t.preventDefault(),!B(n)){S("Invalid email address");return}F.mutate({email:n,password:y,name:b})},ee=t=>{if(t.preventDefault(),!B(n)){S("Invalid email address");return}U.mutate({email:n})},te=t=>{if(t.preventDefault(),!B(n)){S("Invalid email address");return}E.mutate({email:n})},se=t=>{t.preventDefault(),_.mutate({email:n,otp:O})},k=t=>a=>{t(a.target.value),H&&F.reset(),J&&U.reset(),K&&(E.reset(),_.reset()),t===j&&c&&S("")},M=t=>{N(t),C(""),A(""),R(!1),S(""),G(!1),F.reset(),U.reset(),E.reset(),_.reset()},o=F.isPending||U.isPending||E.isPending||_.isPending,H=F.error,J=U.error,K=E.error||_.error,v=m?n.trim()&&y.trim()&&b.trim():h?n.trim():w?L?O.trim():n.trim():n.trim()&&y.trim(),re=t=>{if(!t)return null;const a=t.message.toLowerCase();return a.includes("unauthorized")||a.includes("401")?"Invalid email or password. Please try again.":a.includes("already exists")||a.includes("409")?"An account with this email already exists. Try signing in instead.":a.includes("network")||a.includes("fetch")?"Network error. Please check your connection and try again.":a.includes("rate limit")||a.includes("429")?"Too many attempts. Please wait a moment and try again.":a.includes("invalid")&&a.includes("otp")?"Invalid or expired code. Please try again.":t.message||"An error occurred. Please try again."},Q=H||J||K,ne=h?"Reset your password":w?L?"Enter verification code":"Sign in with email code":m?"Create your account":"Login or signup below";return e.jsxs("div",{className:"mx-auto w-full min-h-full md:min-h-0 md:min-w-[400px] max-w-md grid gap-6 content-center bg-card p-6 md:p-10 border border-primary-foreground/20",children:[e.jsx("div",{className:"flex justify-center",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e.jsx("div",{className:"text-center space-y-1",children:e.jsx("p",{className:"text-sm text-foreground/70",children:ne})}),Q&&e.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:re(Q)}),Y&&e.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Check your email for a password reset link."}),!h&&d.enabled&&e.jsx("div",{className:"grid gap-3",children:d.providers.map(t=>e.jsxs(f,{type:"button",variant:"outline",size:"lg",className:"w-full font-medium",disabled:o,onClick:()=>{p.signIn.social({provider:t.name,callbackURL:s??r})},children:[t.icon&&e.jsx("img",{src:t.icon,alt:"",className:"h-5 w-5","aria-hidden":"true"}),"Continue with"," ",t.name.charAt(0).toUpperCase()+t.name.slice(1)]},t.name))}),!h&&d.enabled&&(l.enabled||i.enabled)&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-px flex-1 bg-border"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"or"}),e.jsx("div",{className:"h-px flex-1 bg-border"})]}),w&&i.enabled&&e.jsx(e.Fragment,{children:L?e.jsxs("form",{onSubmit:se,className:"grid gap-4",children:[e.jsxs("div",{className:"rounded-xl bg-muted/50 p-3 text-sm text-muted-foreground text-center",children:["Code sent to ",n]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Verification code"}),e.jsx(I,{type:"text",placeholder:"Enter code",value:O,onChange:k(A),required:!0,disabled:o,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code"})]}),e.jsx(f,{type:"submit",disabled:o||!v,className:"w-full font-semibold",size:"lg",children:o?"Verifying...":"Verify"}),e.jsx(f,{type:"button",variant:"ghost",onClick:()=>{R(!1),A(""),E.reset(),_.reset()},disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Use a different email"})]}):e.jsxs("form",{onSubmit:te,className:"grid gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:n,onChange:k(j),onBlur:W,required:!0,disabled:o,"aria-invalid":!!c}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsx(f,{type:"submit",disabled:o||!v,className:"w-full font-semibold",size:"lg",children:o?"Sending...":"Send code"})]})}),h&&l.enabled&&!Y&&e.jsxs("form",{onSubmit:ee,className:"grid gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:n,onChange:k(j),onBlur:W,required:!0,disabled:o,"aria-invalid":!!c}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsx(f,{type:"submit",disabled:o||!v,className:"w-full font-semibold",size:"lg",children:o?"Sending...":"Send reset link"})]}),!h&&!w&&l.enabled&&e.jsxs("form",{onSubmit:Z,className:"grid gap-4",children:[e.jsx("div",{className:T("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",m?"max-h-[200px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsxs("div",{className:T("p-1",!m&&"pointer-events-none"),children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Name"}),e.jsx(I,{type:"text",placeholder:"Your name",value:b,onChange:k(C),required:!0,disabled:o||!m,"aria-hidden":!m})]})}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:n,onChange:k(j),onBlur:W,required:!0,disabled:o,"aria-invalid":!!c}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Password"}),!m&&u.enabled&&e.jsx("button",{type:"button",onClick:()=>M("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Forgot password?"})]}),e.jsx(I,{type:"password",placeholder:"••••••••",value:y,onChange:k(D),required:!0,disabled:o})]}),e.jsx("div",{className:T("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",v?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsx("div",{className:T("p-1",!v&&"pointer-events-none"),children:e.jsx(f,{type:"submit",disabled:o||!v,className:T("w-full font-semibold"),size:"lg","aria-hidden":!v,children:o?m?"Creating account...":"Signing in...":"Continue"})})})]}),!h&&i.enabled&&l.enabled&&!w&&e.jsx("div",{className:"text-center",children:e.jsx(f,{type:"button",variant:"link",onClick:()=>M("emailOtp"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Sign in with email code instead"})}),w&&l.enabled&&e.jsx("div",{className:"text-center",children:e.jsx(f,{type:"button",variant:"link",onClick:()=>M("signIn"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Sign in with password instead"})}),e.jsx("div",{className:"text-center",children:h?e.jsx(f,{type:"button",variant:"link",onClick:()=>M("signIn"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"}):!w&&l.enabled?e.jsx(f,{type:"button",variant:"link",onClick:()=>M(m?"signIn":"signUp"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:m?"Already have an account? Sign in":"Don't have an account? Sign up"}):null}),e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground pt-4",children:[e.jsx("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",className:"hover:text-foreground transition-colors",children:"Terms of Service"}),e.jsx("a",{href:"https://www.decocms.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"hover:text-foreground transition-colors",children:"Privacy Policy"})]})]})}function de({redirectTo:s}){const[r,l]=x.useState(null);return x.useEffect(()=>{let u=!1;return(async()=>{try{let i;for(let d=0;d<5&&(i=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"}),!(i.ok||i.status<500));d++)await new Promise(n=>setTimeout(n,Math.min(1e3*2**d,1e4)));if(!i?.ok){const d=await i?.json().catch(()=>({}));throw new Error(d?.error||"Auto-login failed")}if(!u){const d=s.startsWith("/")&&!s.startsWith("//")?s:"/";window.location.href=d}}catch(i){u||l(i instanceof Error?i.message:"Auto-login failed")}})(),()=>{u=!0}},[s]),r?e.jsx("div",{className:"flex min-h-screen items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-destructive mb-2",children:["Auto-login failed: ",r]}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Try restarting the server."})]})}):e.jsx($,{})}function ce(s){if(!s.client_id||s.response_type!=="code")return null;const r=new URLSearchParams;return s.client_id&&r.set("client_id",s.client_id),s.redirect_uri&&r.set("redirect_uri",s.redirect_uri),s.response_type&&r.set("response_type",s.response_type),s.state&&r.set("state",s.state),s.scope&&r.set("scope",s.scope),s.code_challenge&&r.set("code_challenge",s.code_challenge),s.code_challenge_method&&r.set("code_challenge_method",s.code_challenge_method),`/api/auth/mcp/authorize?${r.toString()}`}function ue(s){const r=oe.c(5),{callbackURL:l,providerId:u}=s;let i,d;r[0]!==l||r[1]!==u?(i=()=>{(async()=>await p.signIn.sso({providerId:u,callbackURL:l}))()},d=[u,l],r[0]=l,r[1]=u,r[2]=i,r[3]=d):(i=r[2],d=r[3]),x.useEffect(i,d);let n;return r[4]===Symbol.for("react.memo_cache_sentinel")?(n=e.jsx($,{}),r[4]=n):n=r[4],n}function ge(){const s=p.useSession(),r=ae({from:"/login"}),{next:l="/",client_id:u,redirect_uri:i,response_type:d,state:n,scope:j,code_challenge:y,code_challenge_method:D}=r,b=l.startsWith("/")&&!l.startsWith("//")?l:"/",{sso:C,emailAndPassword:O,magicLink:A,emailOtp:L,socialProviders:R,localMode:z}=X(),N=ce({client_id:u,redirect_uri:i,response_type:d,state:n,scope:j,code_challenge:y,code_challenge_method:D}),c=N||b;return s.data?N?(window.location.href=N,e.jsx($,{})):e.jsx(ie,{to:b}):z?e.jsx(de,{redirectTo:c}):C.enabled?e.jsx(ue,{callbackURL:c,providerId:C.providerId}):O.enabled||A.enabled||L.enabled||R.enabled?e.jsxs("main",{className:"relative flex min-h-screen items-stretch md:items-center justify-center bg-gradient-to-br from-brand to-brand/75 p-1 md:p-4",children:[e.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--brand-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e.jsxs("div",{className:"relative z-10 w-full md:w-auto",children:[e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-brand-foreground/15"}),e.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-brand-foreground/15"}),e.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-brand-foreground/15"}),e.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-brand-foreground/15"}),e.jsx(le,{redirectUrl:N,callbackUrl:b})]})]}):e.jsx("div",{children:"No login options available"})}export{ge as default};
|
|
1
|
+
import{u as X,r as x,a as V,t as P,b as p,j as e,B as f,c as T,d as ae,S as $,N as ie,e as oe}from"./index-Qc-HM-3V.js";import{I}from"./input-DVKZFl3m.js";function le({redirectUrl:s,callbackUrl:r="/"}){const{emailAndPassword:l,resetPassword:u,emailOtp:i,socialProviders:d}=X(),[n,j]=x.useState(""),[y,D]=x.useState(""),[b,C]=x.useState(""),[O,A]=x.useState(""),[L,R]=x.useState(!1),[z,N]=x.useState(()=>!l.enabled&&i.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[c,S]=x.useState(""),[Y,G]=x.useState(!1),m=z==="signUp",h=z==="forgotPassword",w=z==="emailOtp",F=V({mutationFn:async({email:t,password:a,name:q})=>{try{if(m){const g=await p.signUp.email({email:t,password:a,name:q||""});if(g.error)throw new Error(g.error.message||"Sign up failed");return g}else{const g=await p.signIn.email({email:t,password:a});if(g.error)throw new Error(g.error.message||"Sign in failed");return g}}catch(g){throw g instanceof Error?g:new Error("Authentication failed")}},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??r},onError:t=>{P(m?"user_signup_failed":"user_signin_failed",{error:t instanceof Error?t.message:String(t)})}}),U=V({mutationFn:async({email:t})=>{const a=await p.requestPasswordReset({email:t,redirectTo:"/reset-password"});if(a.error)throw new Error(a.error.message||"Failed to send reset email");return a},onSuccess:()=>{P("password_reset_requested"),G(!0)},onError:t=>{P("password_reset_request_failed",{error:t instanceof Error?t.message:String(t)})}}),E=V({mutationFn:async({email:t})=>{const a=await p.emailOtp.sendVerificationOtp({email:t,type:"sign-in"});if(a.error)throw new Error(a.error.message||"Failed to send code");return a},onSuccess:()=>{P("email_otp_sent"),R(!0)},onError:t=>{P("email_otp_send_failed",{error:t instanceof Error?t.message:String(t)})}}),_=V({mutationFn:async({email:t,otp:a})=>{const q=await p.signIn.emailOtp({email:t,otp:a});if(q.error)throw new Error(q.error.message||"Invalid code");return q},onSuccess:()=>{globalThis.localStorage?.setItem("hasLoggedIn","true"),window.location.href=s??r},onError:t=>{P("email_otp_verify_failed",{error:t instanceof Error?t.message:String(t)})}}),B=t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),W=()=>{n.trim()&&!B(n)&&S("Invalid email address")},Z=t=>{if(t.preventDefault(),!B(n)){S("Invalid email address");return}F.mutate({email:n,password:y,name:b})},ee=t=>{if(t.preventDefault(),!B(n)){S("Invalid email address");return}U.mutate({email:n})},te=t=>{if(t.preventDefault(),!B(n)){S("Invalid email address");return}E.mutate({email:n})},se=t=>{t.preventDefault(),_.mutate({email:n,otp:O})},k=t=>a=>{t(a.target.value),H&&F.reset(),J&&U.reset(),K&&(E.reset(),_.reset()),t===j&&c&&S("")},M=t=>{N(t),C(""),A(""),R(!1),S(""),G(!1),F.reset(),U.reset(),E.reset(),_.reset()},o=F.isPending||U.isPending||E.isPending||_.isPending,H=F.error,J=U.error,K=E.error||_.error,v=m?n.trim()&&y.trim()&&b.trim():h?n.trim():w?L?O.trim():n.trim():n.trim()&&y.trim(),re=t=>{if(!t)return null;const a=t.message.toLowerCase();return a.includes("unauthorized")||a.includes("401")?"Invalid email or password. Please try again.":a.includes("already exists")||a.includes("409")?"An account with this email already exists. Try signing in instead.":a.includes("network")||a.includes("fetch")?"Network error. Please check your connection and try again.":a.includes("rate limit")||a.includes("429")?"Too many attempts. Please wait a moment and try again.":a.includes("invalid")&&a.includes("otp")?"Invalid or expired code. Please try again.":t.message||"An error occurred. Please try again."},Q=H||J||K,ne=h?"Reset your password":w?L?"Enter verification code":"Sign in with email code":m?"Create your account":"Login or signup below";return e.jsxs("div",{className:"mx-auto w-full min-h-full md:min-h-0 md:min-w-[400px] max-w-md grid gap-6 content-center bg-card p-6 md:p-10 border border-primary-foreground/20",children:[e.jsx("div",{className:"flex justify-center",children:e.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e.jsx("div",{className:"text-center space-y-1",children:e.jsx("p",{className:"text-sm text-foreground/70",children:ne})}),Q&&e.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:re(Q)}),Y&&e.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Check your email for a password reset link."}),!h&&d.enabled&&e.jsx("div",{className:"grid gap-3",children:d.providers.map(t=>e.jsxs(f,{type:"button",variant:"outline",size:"lg",className:"w-full font-medium",disabled:o,onClick:()=>{p.signIn.social({provider:t.name,callbackURL:s??r})},children:[t.icon&&e.jsx("img",{src:t.icon,alt:"",className:"h-5 w-5","aria-hidden":"true"}),"Continue with"," ",t.name.charAt(0).toUpperCase()+t.name.slice(1)]},t.name))}),!h&&d.enabled&&(l.enabled||i.enabled)&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-px flex-1 bg-border"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"or"}),e.jsx("div",{className:"h-px flex-1 bg-border"})]}),w&&i.enabled&&e.jsx(e.Fragment,{children:L?e.jsxs("form",{onSubmit:se,className:"grid gap-4",children:[e.jsxs("div",{className:"rounded-xl bg-muted/50 p-3 text-sm text-muted-foreground text-center",children:["Code sent to ",n]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Verification code"}),e.jsx(I,{type:"text",placeholder:"Enter code",value:O,onChange:k(A),required:!0,disabled:o,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code"})]}),e.jsx(f,{type:"submit",disabled:o||!v,className:"w-full font-semibold",size:"lg",children:o?"Verifying...":"Verify"}),e.jsx(f,{type:"button",variant:"ghost",onClick:()=>{R(!1),A(""),E.reset(),_.reset()},disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Use a different email"})]}):e.jsxs("form",{onSubmit:te,className:"grid gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:n,onChange:k(j),onBlur:W,required:!0,disabled:o,"aria-invalid":!!c}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsx(f,{type:"submit",disabled:o||!v,className:"w-full font-semibold",size:"lg",children:o?"Sending...":"Send code"})]})}),h&&l.enabled&&!Y&&e.jsxs("form",{onSubmit:ee,className:"grid gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:n,onChange:k(j),onBlur:W,required:!0,disabled:o,"aria-invalid":!!c}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsx(f,{type:"submit",disabled:o||!v,className:"w-full font-semibold",size:"lg",children:o?"Sending...":"Send reset link"})]}),!h&&!w&&l.enabled&&e.jsxs("form",{onSubmit:Z,className:"grid gap-4",children:[e.jsx("div",{className:T("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",m?"max-h-[200px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsxs("div",{className:T("p-1",!m&&"pointer-events-none"),children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Name"}),e.jsx(I,{type:"text",placeholder:"Your name",value:b,onChange:k(C),required:!0,disabled:o||!m,"aria-hidden":!m})]})}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Email"}),e.jsx(I,{type:"email",placeholder:"you@example.com",value:n,onChange:k(j),onBlur:W,required:!0,disabled:o,"aria-invalid":!!c}),c&&e.jsx("p",{className:"text-xs text-destructive mt-1.5",children:c})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Password"}),!m&&u.enabled&&e.jsx("button",{type:"button",onClick:()=>M("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Forgot password?"})]}),e.jsx(I,{type:"password",placeholder:"••••••••",value:y,onChange:k(D),required:!0,disabled:o})]}),e.jsx("div",{className:T("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",v?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:e.jsx("div",{className:T("p-1",!v&&"pointer-events-none"),children:e.jsx(f,{type:"submit",disabled:o||!v,className:T("w-full font-semibold"),size:"lg","aria-hidden":!v,children:o?m?"Creating account...":"Signing in...":"Continue"})})})]}),!h&&i.enabled&&l.enabled&&!w&&e.jsx("div",{className:"text-center",children:e.jsx(f,{type:"button",variant:"link",onClick:()=>M("emailOtp"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Sign in with email code instead"})}),w&&l.enabled&&e.jsx("div",{className:"text-center",children:e.jsx(f,{type:"button",variant:"link",onClick:()=>M("signIn"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Sign in with password instead"})}),e.jsx("div",{className:"text-center",children:h?e.jsx(f,{type:"button",variant:"link",onClick:()=>M("signIn"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"}):!w&&l.enabled?e.jsx(f,{type:"button",variant:"link",onClick:()=>M(m?"signIn":"signUp"),disabled:o,className:"text-sm text-muted-foreground hover:text-foreground",children:m?"Already have an account? Sign in":"Don't have an account? Sign up"}):null}),e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground pt-4",children:[e.jsx("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",className:"hover:text-foreground transition-colors",children:"Terms of Service"}),e.jsx("a",{href:"https://www.decocms.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"hover:text-foreground transition-colors",children:"Privacy Policy"})]})]})}function de({redirectTo:s}){const[r,l]=x.useState(null);return x.useEffect(()=>{let u=!1;return(async()=>{try{let i;for(let d=0;d<5&&(i=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"}),!(i.ok||i.status<500));d++)await new Promise(n=>setTimeout(n,Math.min(1e3*2**d,1e4)));if(!i?.ok){const d=await i?.json().catch(()=>({}));throw new Error(d?.error||"Auto-login failed")}if(!u){const d=s.startsWith("/")&&!s.startsWith("//")?s:"/";window.location.href=d}}catch(i){u||l(i instanceof Error?i.message:"Auto-login failed")}})(),()=>{u=!0}},[s]),r?e.jsx("div",{className:"flex min-h-screen items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-destructive mb-2",children:["Auto-login failed: ",r]}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Try restarting the server."})]})}):e.jsx($,{})}function ce(s){if(!s.client_id||s.response_type!=="code")return null;const r=new URLSearchParams;return s.client_id&&r.set("client_id",s.client_id),s.redirect_uri&&r.set("redirect_uri",s.redirect_uri),s.response_type&&r.set("response_type",s.response_type),s.state&&r.set("state",s.state),s.scope&&r.set("scope",s.scope),s.code_challenge&&r.set("code_challenge",s.code_challenge),s.code_challenge_method&&r.set("code_challenge_method",s.code_challenge_method),`/api/auth/mcp/authorize?${r.toString()}`}function ue(s){const r=oe.c(5),{callbackURL:l,providerId:u}=s;let i,d;r[0]!==l||r[1]!==u?(i=()=>{(async()=>await p.signIn.sso({providerId:u,callbackURL:l}))()},d=[u,l],r[0]=l,r[1]=u,r[2]=i,r[3]=d):(i=r[2],d=r[3]),x.useEffect(i,d);let n;return r[4]===Symbol.for("react.memo_cache_sentinel")?(n=e.jsx($,{}),r[4]=n):n=r[4],n}function ge(){const s=p.useSession(),r=ae({from:"/login"}),{next:l="/",client_id:u,redirect_uri:i,response_type:d,state:n,scope:j,code_challenge:y,code_challenge_method:D}=r,b=l.startsWith("/")&&!l.startsWith("//")?l:"/",{sso:C,emailAndPassword:O,magicLink:A,emailOtp:L,socialProviders:R,localMode:z}=X(),N=ce({client_id:u,redirect_uri:i,response_type:d,state:n,scope:j,code_challenge:y,code_challenge_method:D}),c=N||b;return s.data?N?(window.location.href=N,e.jsx($,{})):e.jsx(ie,{to:b}):z?e.jsx(de,{redirectTo:c}):C.enabled?e.jsx(ue,{callbackURL:c,providerId:C.providerId}):O.enabled||A.enabled||L.enabled||R.enabled?e.jsxs("main",{className:"relative flex min-h-screen items-stretch md:items-center justify-center bg-gradient-to-br from-brand to-brand/75 p-1 md:p-4",children:[e.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--brand-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e.jsxs("div",{className:"relative z-10 w-full md:w-auto",children:[e.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-brand-foreground/15"}),e.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-brand-foreground/15"}),e.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-brand-foreground/15"}),e.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-brand-foreground/15"}),e.jsx(le,{redirectUrl:N,callbackUrl:b})]})]}):e.jsx("div",{children:"No login options available"})}export{ge as default};
|