decocms 2.304.15 → 2.305.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CbUYZGF-.js → AlertCircle-B65qDYSH.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-DHj5-FLY.js → ArrowNarrowLeft-fzTyPWny.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BK_iYZ-J.js → ArrowUpRight-BcX-Z0Ku.js} +1 -1
- package/dist/client/assets/Check-a0FPGBtH.js +1 -0
- package/dist/client/assets/{CheckCircle-D9qlmIve.js → CheckCircle-B8cGzYri.js} +1 -1
- package/dist/client/assets/ChevronDown-Z3xhSsnT.js +1 -0
- package/dist/client/assets/{ChevronRight-BIm0-OSp.js → ChevronRight-xkl8cwkd.js} +1 -1
- package/dist/client/assets/{ChevronUp-ClqSoLtD.js → ChevronUp-Cy7lkJW1.js} +1 -1
- package/dist/client/assets/{Container-BCDxdJoG.js → Container-cyfm5-Pb.js} +1 -1
- package/dist/client/assets/{DotsVertical-DEE8M0V4.js → DotsVertical-Bx7sSuAL.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DM7IwrPj.js → LinkExternal01-0g6HjjkD.js} +1 -1
- package/dist/client/assets/{Lock01-BmjkKSvK.js → Lock01-BzMXxHmW.js} +1 -1
- package/dist/client/assets/{Palette-BrJL0UcN.js → Palette-CwWccG-f.js} +1 -1
- package/dist/client/assets/{Play-DSYx2GJ2.js → Play-C-AiMK-Y.js} +1 -1
- package/dist/client/assets/{Plus-BrBimbff.js → Plus-DGrvw6bs.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-Cr84gVY8.js → RefreshCcw01-Biyt7Dy2.js} +1 -1
- package/dist/client/assets/{SearchMd-IP-R-mtT.js → SearchMd-OHnYTa8U.js} +1 -1
- package/dist/client/assets/{Settings02-BOckjEVU.js → Settings02-DO2nBrax.js} +1 -1
- package/dist/client/assets/{Shield01-CJggUHAQ.js → Shield01-DQa1zKSX.js} +1 -1
- package/dist/client/assets/Star01-BoJYsaDm.js +1 -0
- package/dist/client/assets/{Sun-B7BWJEHb.js → Sun-DA-QmugE.js} +1 -1
- package/dist/client/assets/{Tool01-D1Rvo01i.js → Tool01-Cq1N-niG.js} +1 -1
- package/dist/client/assets/{Trash01-DaGrAtTq.js → Trash01-PRSN3sYk.js} +1 -1
- package/dist/client/assets/{User01-DmtseI1g.js → User01-DwPCZdnr.js} +1 -1
- package/dist/client/assets/{Users03-DH9QAbco.js → Users03-CB3lBGeX.js} +1 -1
- package/dist/client/assets/{X-viKat0oa.js → X-dZLz-ulr.js} +1 -1
- package/dist/client/assets/{XCircle-DZEMwZj2.js → XCircle-yJD2sr2j.js} +1 -1
- package/dist/client/assets/{XClose-DY7O9VST.js → XClose-Ci4dmV-Y.js} +1 -1
- package/dist/client/assets/{Zap-BMzMPNv3.js → Zap-CYJdRXq9.js} +1 -1
- package/dist/client/assets/{ZapSquare-BDbWe-zU.js → ZapSquare-M3u7o8sc.js} +1 -1
- package/dist/client/assets/{accordion-YgNI8iqn.js → accordion-DtmZjwNB.js} +1 -1
- package/dist/client/assets/agent-icon-D_KgWkiu.js +1 -0
- package/dist/client/assets/agents-list-yD_xsHNb.js +1 -0
- package/dist/client/assets/ai-providers-BHQQzoPJ.js +1 -0
- package/dist/client/assets/{alert-dialog-BvuFarFf.js → alert-dialog-Dog8t-xg.js} +1 -1
- package/dist/client/assets/{auth-catchall-DQeYnh5P.js → auth-catchall-B_yXTiaF.js} +1 -1
- package/dist/client/assets/automation-list-row-BtOPPlS3.js +1 -0
- package/dist/client/assets/automations-CkfQxJNN.js +1 -0
- package/dist/client/assets/{avatar-C4FRugJb.js → avatar-BebTr4u1.js} +1 -1
- package/dist/client/assets/{badge-_ZGDO29b.js → badge-BWEc0v7O.js} +1 -1
- package/dist/client/assets/brand-context-LmKpYr08.js +1 -0
- package/dist/client/assets/{card-oSxwoJvZ.js → card-mlKWkDqb.js} +1 -1
- package/dist/client/assets/{chat-context-C4Hx_rZK.js → chat-context-BmN5ppM9.js} +1 -1
- package/dist/client/assets/checkbox-55NGf7aS.js +1 -0
- package/dist/client/assets/collection-detail-BaNeXOGS.js +1 -0
- package/dist/client/assets/collection-display-button-DnajjLb7.js +1 -0
- package/dist/client/assets/{collection-search-u94VKjvs.js → collection-search-Bsl0avLq.js} +1 -1
- package/dist/client/assets/{collection-search-D_DqZCmL.js → collection-search-CjDGYe9v.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-LzV9CSI7.js → collection-table-wrapper-D5rnMkP_.js} +1 -1
- package/dist/client/assets/{collection-tabs-DW1xYGdq.js → collection-tabs-DgQ6F5X6.js} +1 -1
- package/dist/client/assets/{collections-Cn7VbUFT.js → collections-DAavnhku.js} +1 -1
- package/dist/client/assets/{command-CgMn1LbK.js → command-CN1iJVAp.js} +1 -1
- package/dist/client/assets/{connection-card-BPUe3B60.js → connection-card-D5opGNgQ.js} +1 -1
- package/dist/client/assets/connection-detail-DWinew7y.js +1 -0
- package/dist/client/assets/{connection-form-helpers-CUlzSClK.js → connection-form-helpers-CXHmM_yU.js} +1 -1
- package/dist/client/assets/connections-yUVM9Wts.js +1 -0
- package/dist/client/assets/{constants-CVDNjJTw.js → constants-BNhCk86i.js} +1 -1
- package/dist/client/assets/{constants-CfwGLQ49.js → constants-Ccnt3rmd.js} +2 -2
- package/dist/client/assets/{dialog-CoECADf1.js → dialog-_YlOXdcS.js} +1 -1
- package/dist/client/assets/{domain-settings-D6RV8b16.js → domain-settings-DLCCNpqs.js} +1 -1
- package/dist/client/assets/{drawer-DTk8g2vK.js → drawer-GKYdquRR.js} +1 -1
- package/dist/client/assets/dropdown-menu-BXZVht4Z.js +1 -0
- package/dist/client/assets/{dynamic-plugin-layout-DCoYGhHP.js → dynamic-plugin-layout-ieJ5SRhD.js} +1 -1
- package/dist/client/assets/{empty-state-DoKR-jUX.js → empty-state-CGCgWL8i.js} +1 -1
- package/dist/client/assets/{empty-state-Be0X9mox.js → empty-state-D1x6Uzf-.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CuIeY90s.js → extract-connection-data-BTJzhkiq.js} +1 -1
- package/dist/client/assets/{features-38ZozsmE.js → features-Bmw2Kywv.js} +1 -1
- package/dist/client/assets/{form-BC40Nvzi.js → form-D4Q00YSx.js} +1 -1
- package/dist/client/assets/general-yzH2a6AI.js +1 -0
- package/dist/client/assets/{index-B0TkoX1b.js → index-7DFELu7_.js} +1 -1
- package/dist/client/assets/{index-CbBINyFK.js → index-BBbwvkmx.js} +1 -1
- package/dist/client/assets/{index-DXHNyf1g.css → index-B_4-KoG_.css} +1 -1
- package/dist/client/assets/index-C1kdSX8Z.js +182 -0
- package/dist/client/assets/index-CHcMm4yb.js +1 -0
- package/dist/client/assets/index-CLv-BJNN.js +1 -0
- package/dist/client/assets/{index-CFyIm5CH.js → index-CUuCKerO.js} +1 -1
- package/dist/client/assets/{index-DjgN9qrV.js → index-Cf-Qb03y.js} +1 -1
- package/dist/client/assets/{index-BBrIielu.js → index-DgtpEOsQ.js} +1 -1
- package/dist/client/assets/{index-_TsJo9Ju.js → index-DsOYCD-H.js} +5 -5
- package/dist/client/assets/index-DsncOedH.js +1 -0
- package/dist/client/assets/{index-CvarGBFr.js → index-I3M58vcg.js} +1 -1
- package/dist/client/assets/{index-Bcf94soS.js → index-ILTPQsH4.js} +1 -1
- package/dist/client/assets/{index-Dl2t23Jt.js → index-Ux_PrmKm.js} +2 -2
- package/dist/client/assets/{index-M_qlHNIS.js → index-Yaw_OxhP.js} +1 -1
- package/dist/client/assets/index-tLkyDiOo.js +1 -0
- package/dist/client/assets/{index-nmtbWm5V.js → index-tngOtpnj.js} +2 -2
- package/dist/client/assets/{infiniteQueryObserver-cqTNhL_G.js → infiniteQueryObserver-C_u8IqUR.js} +1 -1
- package/dist/client/assets/{input-CluxDyoT.js → input-B868_ejo.js} +1 -1
- package/dist/client/assets/{integration-icon-BipCD_m-.js → integration-icon-Ov0IbIMU.js} +1 -1
- package/dist/client/assets/{label-CHKFYnQo.js → label-Cg-2ys6X.js} +1 -1
- package/dist/client/assets/{layout-CV5Wi0Ex.js → layout-DkCp6X2C.js} +1 -1
- package/dist/client/assets/lean-canvas-recruit-modal-BNON-9yt.js +139 -0
- package/dist/client/assets/{login-DdkQloeb.js → login-E_UoTHOE.js} +1 -1
- package/dist/client/assets/{members-BgSG3QM0.js → members-CC6bIoZk.js} +2 -2
- package/dist/client/assets/{monaco-editor-BfaMmupR.js → monaco-editor-DfIGvq7v.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-C8V4hqSK.js → monitoring-stats-row-Chavd_5e.js} +1 -1
- package/dist/client/assets/{oauth-callback-BaZqye0L.js → oauth-callback-BQObPuY8.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-oz8YNRBq.js → oauth-callback-ai-provider-B_SVXSnf.js} +1 -1
- package/dist/client/assets/{onboarding-WJDxBlF8.js → onboarding-ChmBqh-q.js} +1 -1
- package/dist/client/assets/{org-layout-Ax0KGzlT.js → org-layout-BWsgHF7L.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-C5mxyCcm.js → org-plugin-layout-D0N77j4g.js} +1 -1
- package/dist/client/assets/{pair-JxQa_xAh.js → pair-DlIdkD7u.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-C_q24wh6.js → plugin-empty-state-B-u16uuv.js} +1 -1
- package/dist/client/assets/plugin-header-Dt0O0h26.js +1 -0
- package/dist/client/assets/{plugin-layout-NPftDH-k.js → plugin-layout-DK8gsZYL.js} +1 -1
- package/dist/client/assets/{popover-vU5pf5HQ.js → popover-B3f914lR.js} +1 -1
- package/dist/client/assets/profile-pLHlebiO.js +1 -0
- package/dist/client/assets/project-app-view-D-yBQWHo.js +1 -0
- package/dist/client/assets/registry-BcZJCcyc.js +2 -0
- package/dist/client/assets/{registry-layout-D-sbU1qd.js → registry-layout-0cxsWXwz.js} +2 -2
- package/dist/client/assets/{required-auth-layout-BYto5m3H.js → required-auth-layout-DLsc1xkw.js} +1 -1
- package/dist/client/assets/{reset-password-DL944kGr.js → reset-password-BS6m_G36.js} +1 -1
- package/dist/client/assets/roles-B_ljw5IA.js +1 -0
- package/dist/client/assets/{scroll-area-D4F3EM5Z.js → scroll-area-_bumfcjA.js} +1 -1
- package/dist/client/assets/{search-input-CslwpPEh.js → search-input-Bhq8p539.js} +1 -1
- package/dist/client/assets/select-model-D3fobWv8.js +4 -0
- package/dist/client/assets/select-slwRPncS.js +1 -0
- package/dist/client/assets/settings-layout-DRkmNgVc.js +1 -0
- package/dist/client/assets/{settings-section-qcMAXuoQ.js → settings-section-CIXHBPOa.js} +1 -1
- package/dist/client/assets/{shell-layout-CzPr_0c2.js → shell-layout-Drnm9mfO.js} +1 -1
- package/dist/client/assets/{skeleton-eOgaLAHa.js → skeleton-ChUR9knm.js} +1 -1
- package/dist/client/assets/{sso-Dozga0JK.js → sso--URfWQeo.js} +1 -1
- package/dist/client/assets/{store-BA7fLJKJ.js → store-htVNKvqn.js} +1 -1
- package/dist/client/assets/store-registry-CaCyYvRn.js +2 -0
- package/dist/client/assets/{switch-W_Nrj6rK.js → switch-Cf5BCxU5.js} +1 -1
- package/dist/client/assets/{table-rVVQNhet.js → table-CBFs2U43.js} +1 -1
- package/dist/client/assets/{tabs-6T1N4Szc.js → tabs-Ctrs4bAF.js} +1 -1
- package/dist/client/assets/{task-status-DsmpMdW6.js → task-status-DUVd5pLA.js} +1 -1
- package/dist/client/assets/{textarea-Cld3tG5R.js → textarea-BbtfG9Ru.js} +1 -1
- package/dist/client/assets/{toggle-group-COcCk4lG.js → toggle-group-DCLBHyZD.js} +1 -1
- package/dist/client/assets/{tools-list-COvHAWAZ.js → tools-list-DGhR4Qyt.js} +1 -1
- package/dist/client/assets/{tooltip-CxizQODk.js → tooltip-BOsmkVZD.js} +1 -1
- package/dist/client/assets/{types-CvYZZZog.js → types-BSAKF0wC.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Bt2yRX0n.js → use-ai-providers-aNlhpnwf.js} +1 -1
- package/dist/client/assets/{use-collections-CwD8DZNY.js → use-collections-CqB4T92N.js} +1 -1
- package/dist/client/assets/{use-connection-pSv7eY2y.js → use-connection-C_n04i0m.js} +1 -1
- package/dist/client/assets/{use-copy-CHAuyAMC.js → use-copy-B8gaSETz.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-1DfbQRRy.js → use-create-virtual-mcp-DvxMGqTu.js} +1 -1
- package/dist/client/assets/use-debounced-autosave-BAy1X_D8.js +1 -0
- package/dist/client/assets/{use-decopilot-events-CXVUS53e.js → use-decopilot-events-BA4osLiM.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BNRuOYcY.js → use-delete-connection-C4xdydWE.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Ca5zEcXn.js → use-infinite-scroll-CW0QmsIe.js} +1 -1
- package/dist/client/assets/{use-list-state-Jttwyvy3.js → use-list-state-Dm-Ww-Vo.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BdYIFx9S.js → use-mcp-tools-uazou5KQ.js} +1 -1
- package/dist/client/assets/{use-members-s6X83kyp.js → use-members-BM40IfsI.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Tn-rhKXX.js → use-navigate-to-agent-kI9r54wH.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CS0Acn4M.js → use-org-auth-client-DCENSdBc.js} +1 -1
- package/dist/client/assets/{use-org-sso-CPzDtjox.js → use-org-sso-BIqIcUQM.js} +1 -1
- package/dist/client/assets/{use-organization-roles-TW9At1F2.js → use-organization-roles-DAO7QdGg.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Dak2xww8.js → use-organization-settings-C-NHhw4n.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CMFnR2M3.js → use-registry-connections-B1oBXsUK.js} +1 -1
- package/dist/client/assets/{use-status-sounds-D0-nlwJm.js → use-status-sounds-DEn9-reM.js} +1 -1
- package/dist/client/assets/{use-tasks-yxuEm5KK.js → use-tasks-CJ3vNKME.js} +1 -1
- package/dist/client/assets/{use-view-mode-w75x4zz0.js → use-view-mode-DTFti-L5.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BHEEZv3B.js → use-virtual-mcp-Cd4gN6tQ.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BMlr4G1E.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BNLcV52p.js +1 -0
- package/dist/client/assets/{user-QrqGbmQG.js → user-BirTYLn0.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-C9HAxT_f.js → view-mode-toggle-_LNgXbfe.js} +1 -1
- package/dist/client/assets/workflow-CE9nGfJB.js +1 -0
- package/dist/client/assets/workflow-detail-hgfq2rMH.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +24 -25
- package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
- package/dist/server/node_modules/ansi-styles/index.js +223 -0
- package/dist/server/node_modules/ansi-styles/package.json +54 -0
- package/dist/server/node_modules/ansi-styles/readme.md +173 -0
- 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-bytea/index.js +33 -0
- package/dist/server/node_modules/postgres-bytea/license +21 -0
- package/dist/server/node_modules/postgres-bytea/package.json +34 -0
- package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
- package/dist/server/node_modules/postgres-date/index.js +116 -0
- package/dist/server/node_modules/postgres-date/license +21 -0
- package/dist/server/node_modules/postgres-date/package.json +33 -0
- package/dist/server/node_modules/postgres-date/readme.md +49 -0
- package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
- package/dist/server/node_modules/postgres-interval/index.js +125 -0
- package/dist/server/node_modules/postgres-interval/license +21 -0
- package/dist/server/node_modules/postgres-interval/package.json +36 -0
- package/dist/server/node_modules/postgres-interval/readme.md +48 -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/dist/server/server.js +23 -24
- package/package.json +1 -1
- package/dist/client/assets/ChevronDown-tb8ftSUO.js +0 -1
- package/dist/client/assets/Star01-PFA-ZRDO.js +0 -1
- package/dist/client/assets/agent-icon-BXkkrCT3.js +0 -1
- package/dist/client/assets/agents-list-pk00bfJc.js +0 -1
- package/dist/client/assets/ai-providers-Dveb48ZT.js +0 -1
- package/dist/client/assets/automation-list-row-Uxaz0oZ0.js +0 -1
- package/dist/client/assets/automations-D7r6frZo.js +0 -1
- package/dist/client/assets/brand-context-5BxhNz9E.js +0 -1
- package/dist/client/assets/checkbox-CzxaEVzA.js +0 -1
- package/dist/client/assets/collection-detail-Be4vkD6s.js +0 -1
- package/dist/client/assets/collection-display-button-CPI0oCFf.js +0 -1
- package/dist/client/assets/connection-detail-CPlnEGaw.js +0 -1
- package/dist/client/assets/connections-BhKrBMUX.js +0 -1
- package/dist/client/assets/dropdown-menu-C6XDnng5.js +0 -1
- package/dist/client/assets/general-CvDecDeA.js +0 -1
- package/dist/client/assets/index-B1-8qqRf.js +0 -1
- package/dist/client/assets/index-BycfnvwM.js +0 -1
- package/dist/client/assets/index-CwBiuTbX.js +0 -189
- package/dist/client/assets/index-DHF2V7ZS.js +0 -1
- package/dist/client/assets/index-DQfkXdA9.js +0 -1
- package/dist/client/assets/lean-canvas-recruit-modal-CnBIlbd0.js +0 -116
- package/dist/client/assets/plugin-header-CBh0Saol.js +0 -1
- package/dist/client/assets/profile-CW9gorWX.js +0 -1
- package/dist/client/assets/project-app-view-DZI64J4I.js +0 -1
- package/dist/client/assets/registry-Q3WKF7CA.js +0 -2
- package/dist/client/assets/roles-CJua0nhs.js +0 -1
- package/dist/client/assets/select-C0JTp_6a.js +0 -1
- package/dist/client/assets/select-model-D0i0wiFX.js +0 -4
- package/dist/client/assets/settings-layout-CFCdg7G4.js +0 -1
- package/dist/client/assets/store-registry-D0a7tFCj.js +0 -2
- package/dist/client/assets/useInfiniteQuery-3jN4yA7O.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CEYJOeyf.js +0 -1
- package/dist/client/assets/workflow-D70YjEfw.js +0 -1
- package/dist/client/assets/workflow-detail-1NvP9qC0.js +0 -1
- package/dist/server/node_modules/get-east-asian-width/index.d.ts +0 -60
- package/dist/server/node_modules/get-east-asian-width/index.js +0 -30
- package/dist/server/node_modules/get-east-asian-width/lookup-data.js +0 -18
- package/dist/server/node_modules/get-east-asian-width/lookup.js +0 -135
- package/dist/server/node_modules/get-east-asian-width/package.json +0 -71
- package/dist/server/node_modules/get-east-asian-width/readme.md +0 -65
- package/dist/server/node_modules/get-east-asian-width/utilities.js +0 -24
- /package/dist/server/node_modules/{get-east-asian-width → ansi-styles}/license +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as ge,P as ke,j as s,B as pe,s as Ae,r as P,t as w,x as we}from"./index-Ux_PrmKm.js";import{c as U,b as Ce,a as ue,D as xe}from"./dropdown-menu-BXZVht4Z.js";import{a as Pe}from"./Users03-CB3lBGeX.js";import{G as Te,a as Me,I as Oe,S as ze,L as Le,b as Ie}from"./lean-canvas-recruit-modal-BNON-9yt.js";import{W as Ee,b as Ge}from"./constants-Ccnt3rmd.js";import{b as Be,a as He}from"./use-virtual-mcp-Cd4gN6tQ.js";import{P as ne}from"./index-ILTPQsH4.js";import{i as $e}from"./DotsVertical-Bx7sSuAL.js";import{a as Re}from"./Settings02-DO2nBrax.js";import{s as Fe}from"./Trash01-PRSN3sYk.js";import{A as ve,ai as Ve}from"./agent-icon-D_KgWkiu.js";import{a as be}from"./use-navigate-to-agent-kI9r54wH.js";import{C as Ne}from"./card-mlKWkDqb.js";import{f as We}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as Ke}from"./empty-state-D1x6Uzf-.js";import{u as qe}from"./use-create-virtual-mcp-DvxMGqTu.js";import{c as Je,b as Qe,d as Ue,f as Xe,e as Ye,g as Ze,a as et,A as tt}from"./alert-dialog-Dog8t-xg.js";import{S as st}from"./search-input-Bhq8p539.js";import{s as je}from"./Plus-DGrvw6bs.js";import"./Check-a0FPGBtH.js";import"./ChevronRight-xkl8cwkd.js";import"./dialog-_YlOXdcS.js";import"./X-dZLz-ulr.js";import"./RefreshCcw01-Biyt7Dy2.js";import"./collection-search-Bsl0avLq.js";import"./SearchMd-OHnYTa8U.js";import"./checkbox-55NGf7aS.js";import"./use-connection-C_n04i0m.js";import"./use-collections-CqB4T92N.js";import"./Lock01-BzMXxHmW.js";import"./extract-connection-data-BTJzhkiq.js";import"./constants-BNhCk86i.js";import"./collections-DAavnhku.js";import"./drawer-GKYdquRR.js";import"./tooltip-BOsmkVZD.js";import"./integration-icon-Ov0IbIMU.js";import"./Container-cyfm5-Pb.js";import"./use-mcp-tools-uazou5KQ.js";import"./AlertCircle-B65qDYSH.js";import"./Tool01-Cq1N-niG.js";import"./XClose-Ci4dmV-Y.js";import"./ArrowNarrowLeft-fzTyPWny.js";import"./XCircle-yJD2sr2j.js";import"./ArrowUpRight-BcX-Z0Ku.js";import"./ZapSquare-M3u7o8sc.js";import"./CheckCircle-B8cGzYri.js";import"./ChevronDown-Z3xhSsnT.js";import"./ChevronUp-Cy7lkJW1.js";import"./Star01-BoJYsaDm.js";import"./Palette-CwWccG-f.js";import"./LinkExternal01-0g6HjjkD.js";import"./Sun-DA-QmugE.js";import"./Play-C-AiMK-Y.js";import"./Shield01-DQa1zKSX.js";import"./User01-DwPCZdnr.js";import"./Zap-CYJdRXq9.js";import"./differenceInSeconds-NQ4PDo0z.js";function _e(e){const t=ge.c(17),{onCreateFromScratch:i,onImportGitHub:g,onImportDeco:d,isCreating:o,align:j,side:f,showBetaBadge:p}=e,a=j===void 0?"end":j,[n]=ke();let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Pe,{size:14}),t[0]=u):u=t[0];let c;t[1]!==o||t[2]!==i?(c=s.jsxs(U,{disabled:o,onClick:i,children:[u,"Create from scratch"]}),t[1]=o,t[2]=i,t[3]=c):c=t[3];let r;t[4]!==g||t[5]!==n.experimental_vibecode||t[6]!==p?(r=n.experimental_vibecode&&s.jsxs(U,{onClick:g,children:[s.jsx(Te,{className:"size-3.5"}),"Import from GitHub",p&&s.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"})]}),t[4]=g,t[5]=n.experimental_vibecode,t[6]=p,t[7]=r):r=t[7];let x;t[8]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),t[8]=x):x=t[8];let m;t[9]!==d?(m=s.jsxs(U,{onClick:d,children:[x,"Import from deco.cx"]}),t[9]=d,t[10]=m):m=t[10];let _;return t[11]!==a||t[12]!==f||t[13]!==c||t[14]!==r||t[15]!==m?(_=s.jsxs(Ce,{side:f,align:a,className:"w-48",children:[c,r,m]}),t[11]=a,t[12]=f,t[13]=c,t[14]=r,t[15]=m,t[16]=_):_=t[16],_}function it(e){const t=ge.c(44),{project:i,onDeleteClick:g}=e,d=be();let o;t[0]!==d||t[1]!==i.id?(o=()=>d(i.id),t[0]=d,t[1]=i.id,t[2]=o):o=t[2];let j;t[3]!==i.title||t[4]!==o?(j=s.jsx("button",{type:"button",onClick:o,className:"absolute inset-0 z-0","aria-label":i.title}),t[3]=i.title,t[4]=o,t[5]=j):j=t[5];let f;t[6]!==i.icon||t[7]!==i.title?(f=s.jsx(ve,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),t[6]=i.icon,t[7]=i.title,t[8]=f):f=t[8];let p;t[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ue,{asChild:!0,children:s.jsx(pe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx($e,{size:20})})}),t[9]=p):p=t[9];let a;t[10]!==d||t[11]!==i.id?(a=()=>d(i.id,{search:{main:"settings"}}),t[10]=d,t[11]=i.id,t[12]=a):a=t[12];let n;t[13]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Re,{size:16}),t[13]=n):n=t[13];let u;t[14]!==a?(u=s.jsxs(U,{onClick:a,children:[n,"Settings"]}),t[14]=a,t[15]=u):u=t[15];let c;t[16]!==g?(c=g&&s.jsxs(U,{variant:"destructive",onClick:y=>{y.stopPropagation(),g(y)},children:[s.jsx(Fe,{size:16}),"Delete"]}),t[16]=g,t[17]=c):c=t[17];let r;t[18]!==u||t[19]!==c?(r=s.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:s.jsxs(xe,{children:[p,s.jsxs(Ce,{align:"end",children:[u,c]})]})}),t[18]=u,t[19]=c,t[20]=r):r=t[20];let x;t[21]!==f||t[22]!==r?(x=s.jsxs("div",{className:"flex items-start justify-between",children:[f,r]}),t[21]=f,t[22]=r,t[23]=x):x=t[23];let m;t[24]!==i.title?(m=s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),t[24]=i.title,t[25]=m):m=t[25];const _=i.description||"No description";let N;t[26]!==_?(N=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:_}),t[26]=_,t[27]=N):N=t[27];let v;t[28]!==m||t[29]!==N?(v=s.jsxs("div",{className:"flex flex-col gap-1",children:[m,N]}),t[28]=m,t[29]=N,t[30]=v):v=t[30];let D;t[31]!==x||t[32]!==v?(D=s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[x,v]}),t[31]=x,t[32]=v,t[33]=D):D=t[33];let b;t[34]!==i.updated_at?(b=We(new Date(i.updated_at),{addSuffix:!0}),t[34]=i.updated_at,t[35]=b):b=t[35];let S;t[36]!==b?(S=s.jsx("div",{className:"border-t border-border mt-auto",children:s.jsx("div",{className:"h-10 flex items-center px-4.5",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:b})})}),t[36]=b,t[37]=S):S=t[37];let h;t[38]!==D||t[39]!==S?(h=s.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[D,S]}),t[38]=D,t[39]=S,t[40]=h):h=t[40];let C;return t[41]!==h||t[42]!==j?(C=s.jsxs(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[j,h]}),t[41]=h,t[42]=j,t[43]=C):C=t[43],C}function ms(){const e=ge.c(80),{org:t}=Ae(),i=Be(),g=He(),d=be(),[o,j]=P.useState("");let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={navigateOnCreate:!0},e[0]=f):f=e[0];const{createVirtualMCP:p,isCreating:a}=qe(f),[n,u]=P.useState(null),[c,r]=P.useState(!1),[x,m]=P.useState(!1),[_,N]=P.useState(!1),[v,D]=P.useState(!1),[b,S]=P.useState(!1);let h,C,y,T,k,A,M,O,z;if(e[1]!==g||e[2]!==i||e[3]!==p||e[4]!==n||e[5]!==a||e[6]!==d||e[7]!==t||e[8]!==o){const Q=o.toLowerCase(),de=i.filter(l=>l.id!==t.id&&(l.title.toLowerCase().includes(Q)||l.description?.toLowerCase().includes(Q)));let te;e[18]!==i?(te=i.some(rt),e[18]=i,e[19]=te):te=e[19];const De=te,fe=Ee.filter(l=>(!o||l.title.toLowerCase().includes(Q))&&!(l.id==="studio-pack"&&De)),he=i.find(ot);k=i.find(lt);const Se=l=>{w("agents_list_template_clicked",{template_id:l}),l==="site-editor"?r(!0):l==="site-diagnostics"?he?d(he.id):N(!0):l==="lean-canvas"?k?d(k.id):S(!0):l==="studio-pack"&&D(!0)};let se;e[20]!==g||e[21]!==n?(se=async()=>{if(!n)return;const{id:l,title:ye}=n;u(null);try{await g.delete.mutateAsync(l),w("agent_deleted",{agent_id:l,source:"agents_list"}),we.success(`Deleted "${ye}"`)}catch{}},e[20]=g,e[21]=n,e[22]=se):se=e[22],T=se,y=ne,C=ne.Content,h=ne.Body;let ie;e[23]===Symbol.for("react.memo_cache_sentinel")?(ie=s.jsx(ne.Title,{children:"Agents"}),e[23]=ie):ie=e[23];let le;e[24]===Symbol.for("react.memo_cache_sentinel")?(le=l=>{l.key==="Escape"&&(j(""),l.target.blur())},e[24]=le):le=e[24];let K;e[25]!==o?(K=s.jsx(st,{value:o,onChange:j,placeholder:"Search for an agent...",className:"w-full md:w-[375px]",onKeyDown:le}),e[25]=o,e[26]=K):K=e[26];let oe;e[27]===Symbol.for("react.memo_cache_sentinel")?(oe=s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),e[27]=oe):oe=e[27];let q;e[28]!==p?(q=()=>{w("agent_create_clicked",{source:"agents_list",method:"scratch"}),p()},e[28]=p,e[29]=q):q=e[29];let re,ae;e[30]===Symbol.for("react.memo_cache_sentinel")?(re=()=>{w("agent_create_clicked",{source:"agents_list",method:"github"}),m(!0)},ae=()=>{w("agent_create_clicked",{source:"agents_list",method:"deco"}),r(!0)},e[30]=re,e[31]=ae):(re=e[30],ae=e[31]);let J;e[32]!==a||e[33]!==q?(J=s.jsxs(xe,{children:[oe,s.jsx(_e,{onCreateFromScratch:q,onImportGitHub:re,onImportDeco:ae,isCreating:a,align:"end"})]}),e[32]=a,e[33]=q,e[34]=J):J=e[34],e[35]!==J||e[36]!==K?(A=s.jsxs("div",{className:"flex flex-col gap-6",children:[ie,s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[K,J]})]}),e[35]=J,e[36]=K,e[37]=A):A=e[37],M=de.length===0&&fe.length===0&&s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(Ke,{image:s.jsx(Ve,{size:48,className:"text-muted-foreground"}),title:o?"No agents found":"No agents yet",description:o?`No agents match "${o}"`:"Create an agent to get started.",actions:!o&&s.jsxs(xe,{children:[s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),s.jsx(_e,{onCreateFromScratch:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),p()},onImportGitHub:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"github"}),m(!0)},onImportDeco:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),r(!0)},isCreating:a,align:"center",showBetaBadge:!0})]})})}),O=de.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:de.map(l=>s.jsx(it,{project:l,onDeleteClick:()=>u({id:l.id,title:l.title})},l.id))})]}),z=fe.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agent Templates"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:fe.map(l=>s.jsx(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50 cursor-pointer",onClick:()=>Se(l.id),children:s.jsx("div",{className:"flex flex-col flex-1",children:s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[s.jsx(ve,{icon:l.icon,name:l.title,size:"sm",className:"shrink-0 shadow-sm"}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Click to set up"})]})]})})},l.id))})]}),e[1]=g,e[2]=i,e[3]=p,e[4]=n,e[5]=a,e[6]=d,e[7]=t,e[8]=o,e[9]=h,e[10]=C,e[11]=y,e[12]=T,e[13]=k,e[14]=A,e[15]=M,e[16]=O,e[17]=z}else h=e[9],C=e[10],y=e[11],T=e[12],k=e[13],A=e[14],M=e[15],O=e[16],z=e[17];let L;e[38]!==h||e[39]!==A||e[40]!==M||e[41]!==O||e[42]!==z?(L=s.jsxs(h,{children:[A,M,O,z]}),e[38]=h,e[39]=A,e[40]=M,e[41]=O,e[42]=z,e[43]=L):L=e[43];let I;e[44]!==C||e[45]!==L?(I=s.jsx(C,{children:L}),e[44]=C,e[45]=L,e[46]=I):I=e[46];let E;e[47]!==x?(E=s.jsx(Me,{open:x,onOpenChange:m}),e[47]=x,e[48]=E):E=e[48];let G;e[49]!==c?(G=s.jsx(Oe,{open:c,onOpenChange:r}),e[49]=c,e[50]=G):G=e[50];let B;e[51]!==_?(B=s.jsx(ze,{open:_,onOpenChange:N}),e[51]=_,e[52]=B):B=e[52];let H;e[53]!==k||e[54]!==b?(H=s.jsx(Le,{open:b,onOpenChange:S,existingAgent:k}),e[53]=k,e[54]=b,e[55]=H):H=e[55];let $;e[56]!==v?($=s.jsx(Ie,{open:v,onOpenChange:D}),e[56]=v,e[57]=$):$=e[57];const ce=!!n;let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=Q=>!Q&&u(null),e[58]=X):X=e[58];let Y;e[59]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(Je,{children:"Delete Agent?"}),e[59]=Y):Y=e[59];const me=n?.title;let R;e[60]!==me?(R=s.jsxs(Qe,{children:[Y,s.jsxs(Ue,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:me}),"."]})]}),e[60]=me,e[61]=R):R=e[61];let Z;e[62]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx(Xe,{children:"Cancel"}),e[62]=Z):Z=e[62];let F;e[63]!==T?(F=s.jsxs(Ye,{children:[Z,s.jsx(Ze,{onClick:T,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[63]=T,e[64]=F):F=e[64];let V;e[65]!==R||e[66]!==F?(V=s.jsxs(et,{children:[R,F]}),e[65]=R,e[66]=F,e[67]=V):V=e[67];let W;e[68]!==ce||e[69]!==V?(W=s.jsx(tt,{open:ce,onOpenChange:X,children:V}),e[68]=ce,e[69]=V,e[70]=W):W=e[70];let ee;return e[71]!==y||e[72]!==H||e[73]!==$||e[74]!==W||e[75]!==I||e[76]!==E||e[77]!==G||e[78]!==B?(ee=s.jsxs(y,{children:[I,E,G,B,H,$,W]}),e[71]=y,e[72]=H,e[73]=$,e[74]=W,e[75]=I,e[76]=E,e[77]=G,e[78]=B,e[79]=ee):ee=e[79],ee}function lt(e){return e.metadata?.type==="lean-canvas"}function ot(e){return e.metadata?.type==="site-diagnostics"}function rt(e){return Ge(e.id)}export{ms as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as t,j as i}from"./index-Ux_PrmKm.js";import{O as m}from"./select-model-D3fobWv8.js";import"./checkbox-55NGf7aS.js";import"./Check-a0FPGBtH.js";import"./input-B868_ejo.js";import"./dialog-_YlOXdcS.js";import"./X-dZLz-ulr.js";import"./drawer-GKYdquRR.js";import"./tooltip-BOsmkVZD.js";import"./select-slwRPncS.js";import"./ChevronDown-Z3xhSsnT.js";import"./ChevronUp-Cy7lkJW1.js";import"./skeleton-ChUR9knm.js";import"./Tool01-Cq1N-niG.js";import"./RefreshCcw01-Biyt7Dy2.js";import"./SearchMd-OHnYTa8U.js";import"./Settings02-DO2nBrax.js";import"./use-ai-providers-aNlhpnwf.js";import"./constants-Ccnt3rmd.js";import"./chat-context-BmN5ppM9.js";import"./use-virtual-mcp-Cd4gN6tQ.js";import"./use-collections-CqB4T92N.js";import"./use-decopilot-events-BA4osLiM.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-CJ3vNKME.js";import"./use-organization-settings-C-NHhw4n.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Zap-CYJdRXq9.js";import"./use-debounced-autosave-BAy1X_D8.js";import"./AlertCircle-B65qDYSH.js";import"./CheckCircle-B8cGzYri.js";import"./Trash01-PRSN3sYk.js";import"./index-ILTPQsH4.js";import"./settings-section-CIXHBPOa.js";import"./card-mlKWkDqb.js";import"./ArrowUpRight-BcX-Z0Ku.js";import"./switch-Cf5BCxU5.js";import"./toggle-group-DCLBHyZD.js";import"./avatar-BebTr4u1.js";import"./User01-DwPCZdnr.js";import"./alert-dialog-Dog8t-xg.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./unwrap-tool-result-BYXdCQMg.js";function V(){const o=t.c(1);let r;return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(m,{}),o[0]=r):r=o[0],r}export{V as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as i,b6 as m,j as r,cL as A,cI as w,cJ as T,du as O,be as M,a8 as I,b_ as L,dv as v,b$ as z,df as F,ae as G,cK as k,c0 as H,e as n,c as p,ba as D}from"./index-
|
|
1
|
+
import{r as i,b6 as m,j as r,cL as A,cI as w,cJ as T,du as O,be as M,a8 as I,b_ as L,dv as v,b$ as z,df as F,ae as G,cK as k,c0 as H,e as n,c as p,ba as D}from"./index-Ux_PrmKm.js";var x="AlertDialog",[V]=G(x,[v]),d=v(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(L,{...a,...t,modal:!0})};N.displayName=x;var W="AlertDialogTrigger",Y=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(k,{...o,...a,ref:e})});Y.displayName=W;var q="AlertDialogPortal",y=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(z,{...a,...t})};y.displayName=q;var B="AlertDialogOverlay",_=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(H,{...o,...a,ref:e})});_.displayName=B;var f="AlertDialogContent",[J,K]=V(f),Q=F("AlertDialogContent"),b=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=i.useRef(null),P=m(e,c),u=i.useRef(null);return r.jsx(O,{contentName:f,titleName:j,docsSlug:"alert-dialog",children:r.jsx(J,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[r.jsx(Q,{children:a}),r.jsx(X,{contentRef:c})]})})})});b.displayName=f;var j="AlertDialogTitle",h=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(w,{...o,...a,ref:e})});h.displayName=j;var E="AlertDialogDescription",R=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(T,{...o,...a,ref:e})});R.displayName=E;var U="AlertDialogAction",$=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});$.displayName=U;var C="AlertDialogCancel",S=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K(C,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});S.displayName=C;var X=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
|
|
2
2
|
|
|
3
3
|
You can add a description to the \`${f}\` by passing a \`${E}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as l,g as m,j as t,A as f,S as h,h as x,i as r,k as p,N as u}from"./index-
|
|
1
|
+
import{e as l,g as m,j as t,A as f,S as h,h as x,i as r,k as p,N as u}from"./index-Ux_PrmKm.js";function d(){const e=l.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(u,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function g(){const e=l.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=m(a);if(n==="accept-invitation"){let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(f,{children:t.jsx(h,{})}),e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(x,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:"accept-invitation"})})}),e[2]=i):i=e[2];let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(t.Fragment,{children:[c,i,t.jsx(p,{children:t.jsx(d,{})})]}),e[3]=o):o=e[3],o}let s;return e[4]!==n?(s=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:n})}),e[4]=n,e[5]=s):s=e[5],s}export{g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as P,s as q,K as k,n as M,o as z,a as K,x as $,r as U,c as Q,j as o,B}from"./index-Ux_PrmKm.js";import{b as V,d as H,e as Y,g as J,c as W,f as X,a as Z,A as ee}from"./alert-dialog-Dog8t-xg.js";import{a as te,D as se,b as ne,c as ie}from"./dropdown-menu-BXZVht4Z.js";import{A as oe,x as ae}from"./agent-icon-D_KgWkiu.js";import{i as re}from"./DotsVertical-Bx7sSuAL.js";import{s as le}from"./Trash01-PRSN3sYk.js";import{i as ce}from"./Zap-CYJdRXq9.js";import{u as ue}from"./use-virtual-mcp-Cd4gN6tQ.js";import{S as G,u as L}from"./constants-Ccnt3rmd.js";function me(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const s of t.params)e[s.name]={type:s.type,description:s.description,enum:s.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function Ne(t){const e=P.c(12),{org:s}=q(),n=t??G;let a;e[0]!==s.id||e[1]!==s.slug||e[2]!==n?(a={connectionId:n,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=n,e[3]=a):a=e[3];const r=L(a);let i;e[4]!==t?(i=k.toolCall(t??"","TRIGGER_LIST",""),e[4]=t,e[5]=i):i=e[5];let u;e[6]!==r?(u=async()=>{const g=await r.callTool({name:"TRIGGER_LIST",arguments:{}});return(g.structuredContent??g).triggers.map(me)},e[6]=r,e[7]=u):u=e[7];const l=!!t;let d;return e[8]!==i||e[9]!==u||e[10]!==l?(d={queryKey:i,queryFn:u,enabled:l,staleTime:3e4},e[8]=i,e[9]=u,e[10]=l,e[11]=d):d=e[11],M(d)}function Ee(t){const e=P.c(12),{org:s}=q();let n;e[0]!==s.id||e[1]!==s.slug?(n={connectionId:G,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=n):n=e[2];const a=L(n);let r;e[3]!==s.id||e[4]!==t?(r=k.automations(s.id,t),e[3]=s.id,e[4]=t,e[5]=r):r=e[5];let i;e[6]!==a||e[7]!==t?(i=async()=>{const l=t!=null?{virtual_mcp_id:t}:{},d=await a.callTool({name:"AUTOMATION_LIST",arguments:l});return(d.structuredContent??d).automations},e[6]=a,e[7]=t,e[8]=i):i=e[8];let u;return e[9]!==r||e[10]!==i?(u={queryKey:r,queryFn:i,staleTime:1e4},e[9]=r,e[10]=i,e[11]=u):u=e[11],M(u)}function Oe(t){const e=P.c(13),{org:s}=q();let n;e[0]!==s.id||e[1]!==s.slug?(n={connectionId:G,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=n):n=e[2];const a=L(n);let r;e[3]!==t||e[4]!==s.id?(r=k.automation(s.id,t),e[3]=t,e[4]=s.id,e[5]=r):r=e[5];let i;e[6]!==a||e[7]!==t?(i=async()=>{const d=await a.callTool({name:"AUTOMATION_GET",arguments:{id:t}});return(d.structuredContent??d).automation},e[6]=a,e[7]=t,e[8]=i):i=e[8];const u=!!t;let l;return e[9]!==r||e[10]!==i||e[11]!==u?(l={queryKey:r,queryFn:i,enabled:u,staleTime:1e4},e[9]=r,e[10]=i,e[11]=u,e[12]=l):l=e[12],M(l)}function we(t){return{name:"New Automation",messages:[],models:{credentialId:"",thinking:{id:""}},temperature:.5,active:!0,virtual_mcp_id:t}}function de(){const t=P.c(55),{org:e}=q();let s;t[0]!==e.id||t[1]!==e.slug?(s={connectionId:G,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=s):s=t[2];const n=L(s),a=z();let r;t[3]!==e.id||t[4]!==a?(r=()=>a.invalidateQueries({queryKey:k.automationsAll(e.id)}),t[3]=e.id,t[4]=a,t[5]=r):r=t[5];const i=r;let u;t[6]!==e.id||t[7]!==a?(u=m=>a.invalidateQueries({queryKey:k.automation(e.id,m)}),t[6]=e.id,t[7]=a,t[8]=u):u=t[8];const l=u;let d;t[9]!==n?(d=async m=>{const c=await n.callTool({name:"AUTOMATION_CREATE",arguments:m});return c.structuredContent??c},t[9]=n,t[10]=d):d=t[10];let g;t[11]!==i?(g=()=>{i(),$.success("Automation created successfully")},t[11]=i,t[12]=g):g=t[12];let C;t[13]!==d||t[14]!==g?(C={mutationFn:d,onSuccess:g,onError:pe},t[13]=d,t[14]=g,t[15]=C):C=t[15];const F=K(C);let S;t[16]!==n?(S=async m=>{const c=await n.callTool({name:"AUTOMATION_UPDATE",arguments:m});return c.structuredContent??c},t[16]=n,t[17]=S):S=t[17];let f;t[18]!==i||t[19]!==l?(f=(m,c)=>{i(),typeof c.id=="string"&&l(c.id),$.success("Automation updated successfully")},t[18]=i,t[19]=l,t[20]=f):f=t[20];let E;t[21]!==S||t[22]!==f?(E={mutationFn:S,onSuccess:f,onError:fe},t[21]=S,t[22]=f,t[23]=E):E=t[23];const D=K(E);let p;t[24]!==n?(p=async m=>{const c=await n.callTool({name:"AUTOMATION_DELETE",arguments:{id:m}});return c.structuredContent??c},t[24]=n,t[25]=p):p=t[25];let x;t[26]!==i||t[27]!==e.id||t[28]!==a?(x=(m,c)=>{a.removeQueries({queryKey:k.automation(e.id,c)}),i(),$.success("Automation deleted successfully")},t[26]=i,t[27]=e.id,t[28]=a,t[29]=x):x=t[29];let A;t[30]!==x||t[31]!==p?(A={mutationFn:p,onSuccess:x,onError:ge},t[30]=x,t[31]=p,t[32]=A):A=t[32];const v=K(A);let _;t[33]!==n?(_=async m=>{const c=await n.callTool({name:"AUTOMATION_TRIGGER_ADD",arguments:m});if(c.isError){const R=c.content?.[0]?.text??"Failed to add trigger";throw new Error(R)}return c.structuredContent??c},t[33]=n,t[34]=_):_=t[34];let y;t[35]!==i||t[36]!==l?(y=m=>{i(),l(m.automation_id)},t[35]=i,t[36]=l,t[37]=y):y=t[37];let N;t[38]!==_||t[39]!==y?(N={mutationFn:_,onSuccess:y},t[38]=_,t[39]=y,t[40]=N):N=t[40];const O=K(N);let h;t[41]!==n?(h=async m=>{const c=await n.callTool({name:"AUTOMATION_TRIGGER_REMOVE",arguments:{trigger_id:m.trigger_id}});return c.structuredContent??c},t[41]=n,t[42]=h):h=t[42];let T;t[43]!==i||t[44]!==l?(T=(m,c)=>{i(),l(c.automation_id)},t[43]=i,t[44]=l,t[45]=T):T=t[45];let j;t[46]!==h||t[47]!==T?(j={mutationFn:h,onSuccess:T},t[46]=h,t[47]=T,t[48]=j):j=t[48];const w=K(j);let b;return t[49]!==F||t[50]!==v||t[51]!==O||t[52]!==w||t[53]!==D?(b={create:F,update:D,remove:v,triggerAdd:O,triggerRemove:w},t[49]=F,t[50]=v,t[51]=O,t[52]=w,t[53]=D,t[54]=b):b=t[54],b}function ge(t){const e=t instanceof Error?t.message:String(t);$.error(`Failed to delete automation: ${e}`)}function fe(t){const e=t instanceof Error?t.message:String(t);$.error(`Failed to update automation: ${e}`)}function pe(t){const e=t instanceof Error?t.message:String(t);$.error(`Failed to create automation: ${e}`)}function Fe(t){const e=P.c(53),{automation:s,showAgent:n,onClick:a}=t,{remove:r}=de(),[i,u]=U.useState(!1),l=ue(n?s.virtual_mcp_id:void 0);let d;e[0]!==s.id||e[1]!==r?(d=()=>{r.mutate(s.id),u(!1)},e[0]=s.id,e[1]=r,e[2]=d):d=e[2];const g=d;let C;e[3]!==a?(C=I=>{I.target===I.currentTarget&&(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),a())},e[3]=a,e[4]=C):C=e[4];const F=C,S=s.active&&s.trigger_count>0?"bg-emerald-500":"bg-muted-foreground/40";let f;e[5]!==S?(f=Q("inline-block size-2 rounded-full shrink-0",S),e[5]=S,e[6]=f):f=e[6];const E=s.active&&s.trigger_count>0?"Active":s.active?"No triggers configured":"Paused";let D;e[7]!==f||e[8]!==E?(D=o.jsx("span",{className:f,"aria-label":E}),e[7]=f,e[8]=E,e[9]=D):D=e[9];let p;e[10]!==l?.icon||e[11]!==l?.title||e[12]!==s.name||e[13]!==n?(p=n&&o.jsx(oe,{icon:l?.icon??null,name:l?.title??s.name,size:"xs",className:"shrink-0"}),e[10]=l?.icon,e[11]=l?.title,e[12]=s.name,e[13]=n,e[14]=p):p=e[14];let x;e[15]!==s.name?(x=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[15]=s.name,e[16]=x):x=e[16];let A;e[17]!==l||e[18]!==n?(A=n&&l&&o.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",l.title]}),e[17]=l,e[18]=n,e[19]=A):A=e[19];let v;e[20]!==x||e[21]!==A?(v=o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,A]}),e[20]=x,e[21]=A,e[22]=v):v=e[22];let _;e[23]!==s.nearest_next_run_at||e[24]!==s.trigger_count?(_=o.jsx(ye,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[23]=s.nearest_next_run_at,e[24]=s.trigger_count,e[25]=_):_=e[25];let y;e[26]!==v||e[27]!==_?(y=o.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[v,_]}),e[26]=v,e[27]=_,e[28]=y):y=e[28];let N;e[29]===Symbol.for("react.memo_cache_sentinel")?(N=o.jsx(te,{asChild:!0,children:o.jsx(B,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:o.jsx(re,{size:16})})}),e[29]=N):N=e[29];let O;e[30]===Symbol.for("react.memo_cache_sentinel")?(O=o.jsx("div",{onClick:_e,onKeyDown:xe,role:"presentation",className:"shrink-0",children:o.jsxs(se,{children:[N,o.jsx(ne,{align:"end",children:o.jsxs(ie,{variant:"destructive",onClick:I=>{I.stopPropagation(),u(!0)},children:[o.jsx(le,{size:16}),"Delete"]})})]})}),e[30]=O):O=e[30];let h;e[31]!==F||e[32]!==a||e[33]!==y||e[34]!==D||e[35]!==p?(h=o.jsxs("div",{role:"button",tabIndex:0,onClick:a,onKeyDown:F,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[D,p,y,O]}),e[31]=F,e[32]=a,e[33]=y,e[34]=D,e[35]=p,e[36]=h):h=e[36];let T;e[37]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx(W,{children:"Delete automation?"}),e[37]=T):T=e[37];let j;e[38]!==s.name?(j=o.jsxs(V,{children:[T,o.jsxs(H,{children:["This removes"," ",o.jsx("span",{className:"font-medium text-foreground",children:s.name})," ","and all of its triggers. This action cannot be undone."]})]}),e[38]=s.name,e[39]=j):j=e[39];let w;e[40]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(X,{children:"Cancel"}),e[40]=w):w=e[40];let b;e[41]!==g||e[42]!==r.isPending?(b=o.jsxs(Y,{children:[w,o.jsx(J,{onClick:g,disabled:r.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[41]=g,e[42]=r.isPending,e[43]=b):b=e[43];let m;e[44]!==j||e[45]!==b?(m=o.jsxs(Z,{children:[j,b]}),e[44]=j,e[45]=b,e[46]=m):m=e[46];let c;e[47]!==i||e[48]!==m?(c=o.jsx(ee,{open:i,onOpenChange:u,children:m}),e[47]=i,e[48]=m,e[49]=c):c=e[49];let R;return e[50]!==h||e[51]!==c?(R=o.jsxs(o.Fragment,{children:[h,c]}),e[50]=h,e[51]=c,e[52]=R):R=e[52],R}function xe(t){return t.stopPropagation()}function _e(t){return t.stopPropagation()}function ye(t){const e=P.c(4),{triggerCount:s,nextRunAt:n}=t;if(s===0){let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("span",{className:"text-xs text-muted-foreground",children:"No triggers configured"}),e[0]=r):r=e[0],r}let a;return e[1]!==n||e[2]!==s?(a=o.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:n?o.jsxs(o.Fragment,{children:[o.jsx(ae,{size:12,className:"shrink-0"}),o.jsxs("span",{className:"truncate",children:["Next run ",new Date(n).toLocaleString()]})]}):o.jsxs(o.Fragment,{children:[o.jsx(ce,{size:12,className:"shrink-0"}),o.jsxs("span",{className:"truncate",children:[s," trigger",s===1?"":"s"]})]})}),e[1]=n,e[2]=s,e[3]=a):a=e[3],a}export{Fe as A,Ne as a,Oe as b,Ee as c,we as d,de as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as L,s as R,f as T,r as M,j as e,B as $,t as A}from"./index-Ux_PrmKm.js";import{s as D}from"./Plus-DGrvw6bs.js";import{i as S}from"./Zap-CYJdRXq9.js";import{S as O}from"./search-input-Bhq8p539.js";import{P as p}from"./index-ILTPQsH4.js";import{E as b}from"./empty-state-D1x6Uzf-.js";import{c as V,A as q}from"./automation-list-row-BtOPPlS3.js";import{a as F}from"./use-navigate-to-agent-kI9r54wH.js";import{e as G}from"./constants-Ccnt3rmd.js";import{b as H}from"./use-virtual-mcp-Cd4gN6tQ.js";import"./SearchMd-OHnYTa8U.js";import"./tooltip-BOsmkVZD.js";import"./X-dZLz-ulr.js";import"./alert-dialog-Dog8t-xg.js";import"./dropdown-menu-BXZVht4Z.js";import"./Check-a0FPGBtH.js";import"./ChevronRight-xkl8cwkd.js";import"./DotsVertical-Bx7sSuAL.js";import"./agent-icon-D_KgWkiu.js";import"./AlertCircle-B65qDYSH.js";import"./Tool01-Cq1N-niG.js";import"./XClose-Ci4dmV-Y.js";import"./RefreshCcw01-Biyt7Dy2.js";import"./ArrowNarrowLeft-fzTyPWny.js";import"./XCircle-yJD2sr2j.js";import"./ArrowUpRight-BcX-Z0Ku.js";import"./ZapSquare-M3u7o8sc.js";import"./Users03-CB3lBGeX.js";import"./CheckCircle-B8cGzYri.js";import"./ChevronDown-Z3xhSsnT.js";import"./ChevronUp-Cy7lkJW1.js";import"./Container-cyfm5-Pb.js";import"./Star01-BoJYsaDm.js";import"./Palette-CwWccG-f.js";import"./LinkExternal01-0g6HjjkD.js";import"./Lock01-BzMXxHmW.js";import"./Sun-DA-QmugE.js";import"./Play-C-AiMK-Y.js";import"./Settings02-DO2nBrax.js";import"./Shield01-DQa1zKSX.js";import"./Trash01-PRSN3sYk.js";import"./User01-DwPCZdnr.js";import"./use-collections-CqB4T92N.js";function Tt(){const t=L.c(16),{org:n}=R(),{data:_}=V(void 0),u=_===void 0?[]:_,B=H(),k=F(),d=T(),[f,E]=M.useState(""),g=f.toLowerCase(),C=new Map(B.map(I)),N=u.filter(o=>{if(!g||o.name.toLowerCase().includes(g))return!0;const a=C.get(o.virtual_mcp_id);return!!(a&&a.title.toLowerCase().includes(g))}),P=(o,a)=>{const y=C.has(a)?a:G(n.id);A("automations_list_row_clicked",{automation_id:o,agent_id:y,source:"settings_automations"}),k(y,{search:{main:"automation:"+o}})};let m;t[0]!==d||t[1]!==n.slug?(m=()=>{A("automations_empty_state_browse_agents_clicked"),d({to:"/$org/settings/agents",params:{org:n.slug}})},t[0]=d,t[1]=n.slug,t[2]=m):m=t[2];const z=m,x=p,h=p,j=p;let c;t[3]===Symbol.for("react.memo_cache_sentinel")?(c=e.jsx(p.Title,{children:"Automations"}),t[3]=c):c=t[3];const w=u.length>0&&e.jsx(O,{value:f,onChange:E,placeholder:"Search automations...",className:"w-full md:w-[375px]"});let s;t[4]!==w?(s=e.jsxs("div",{className:"flex flex-col gap-6",children:[c,w]}),t[4]=w,t[5]=s):s=t[5];const v=u.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(b,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:"No automations yet",description:"Automations are created per agent. Open an agent and add one from its Automations tab.",actions:e.jsxs($,{size:"sm",onClick:z,children:[e.jsx(D,{size:14}),"Browse agents"]})})}):N.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(b,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:"No automations found",description:`No automations match "${f}"`})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:N.map(o=>e.jsx(q,{automation:o,showAgent:!0,onClick:()=>P(o.id,o.virtual_mcp_id)},o.id))});let i;t[6]!==j.Body||t[7]!==s||t[8]!==v?(i=e.jsxs(j.Body,{children:[s,v]}),t[6]=j.Body,t[7]=s,t[8]=v,t[9]=i):i=t[9];let r;t[10]!==h.Content||t[11]!==i?(r=e.jsx(h.Content,{children:i}),t[10]=h.Content,t[11]=i,t[12]=r):r=t[12];let l;return t[13]!==x||t[14]!==r?(l=e.jsx(x,{children:r}),t[13]=x,t[14]=r,t[15]=l):l=t[15],l}function I(t){return[t.id,t]}export{Tt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as k,j as i,r as V,c as m,aX as S,cg as $,ch as O,ci as U}from"./index-
|
|
1
|
+
import{e as k,j as i,r as V,c as m,aX as S,cg as $,ch as O,ci as U}from"./index-Ux_PrmKm.js";import{s as L}from"./User01-DwPCZdnr.js";function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(U,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function T(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function _(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(O,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const R=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],D="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function W(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%R.length;return R[s]}const I=S("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),X=S("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),B=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function G(r){const e=k.c(35);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,[f,x]=V.useState(!1);let F;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],F=c;break e}F=t}const C=F;let z;e:{if(j){z=D;break e}if(typeof t=="string"){let c;e[11]!==t?(c=W(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=R[0]}const y=z;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const E=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=m(I({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==y||e[23]!==C||e[24]!==E||e[25]!==f||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:m("flex items-center justify-center w-full h-full",y),children:i.jsx(L,{size:B(h)})}):i.jsxs(i.Fragment,{children:[l&&!f&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:m(X({objectFit:u})),onError:()=>x(!0)}),(!l||f)&&i.jsx(_,{className:m(y,"rounded-none"),children:C})]}),e[22]=y,e[23]=C,e[24]=E,e[25]=f,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let A;return e[31]!==o||e[32]!==v||e[33]!==w?(A=i.jsx(M,{className:w,...o,children:v}),e[31]=o,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function H(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,f=h??"base";let x;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==f||e[16]!==l?(x=i.jsx(G,{shape:b,url:l,fallback:t,size:f,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=b,e[15]=f,e[16]=l,e[17]=x):x=e[17],x}H.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:m(I({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{H as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as u,c as l,j as g,aY as v,aX as b}from"./index-
|
|
1
|
+
import{e as u,c as l,j as g,aY as v,aX as b}from"./index-Ux_PrmKm.js";const f=b("inline-flex items-center justify-center rounded-full border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-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 transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"},size:{default:"px-2 py-0.5",icon:"size-5"}},defaultVariants:{variant:"default",size:"default"}});function h(c){const e=u.c(14);let r,s,i,n,t;e[0]!==c?({className:r,variant:t,size:i,asChild:n,...s}=c,e[0]=c,e[1]=r,e[2]=s,e[3]=i,e[4]=n,e[5]=t):(r=e[1],s=e[2],i=e[3],n=e[4],t=e[5]);const d=(n===void 0?!1:n)?v:"span";let a;e[6]!==r||e[7]!==i||e[8]!==t?(a=l(f({variant:t,size:i}),r),e[6]=r,e[7]=i,e[8]=t,e[9]=a):a=e[9];let o;return e[10]!==d||e[11]!==s||e[12]!==a?(o=g.jsx(d,{"data-slot":"badge",className:a,...s}),e[10]=d,e[11]=s,e[12]=a,e[13]=o):o=e[13],o}export{h as B};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as K,$ as Le,s as Ke,o as Ue,K as $e,n as Xe,a as pe,j as n,B as Te,t as Q,x as X,r as Oe,z as He,c as _e,D as ge}from"./index-Ux_PrmKm.js";import{S as Me,u as qe}from"./constants-Ccnt3rmd.js";import{t as Qe}from"./ChevronDown-Z3xhSsnT.js";import{i as Ge}from"./ChevronRight-xkl8cwkd.js";import{s as Ve,t as Ye}from"./Star01-BoJYsaDm.js";import{n as Je}from"./LinkExternal01-0g6HjjkD.js";import{s as Pe}from"./Plus-DGrvw6bs.js";import{s as We}from"./Trash01-PRSN3sYk.js";import{i as Ze}from"./Zap-CYJdRXq9.js";import{c as et,b as tt,d as st,f as nt,g as lt,e as ot,a as rt,A as at}from"./alert-dialog-Dog8t-xg.js";import{I as he}from"./input-B868_ejo.js";import{T as it}from"./textarea-BbtfG9Ru.js";import{P as Ne}from"./index-ILTPQsH4.js";import{u as Re}from"./unwrap-tool-result-BYXdCQMg.js";import{u as ct}from"./use-debounced-autosave-BAy1X_D8.js";import"./tooltip-BOsmkVZD.js";import"./X-dZLz-ulr.js";function we(t){const e=K.c(8),{title:s,children:o,className:l}=t;let r;e[0]!==l?(r=_e("rounded-2xl border border-border/60 bg-background p-5",l),e[0]=l,e[1]=r):r=e[1];let i;e[2]!==s?(i=n.jsx("div",{className:"mb-4",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s})}),e[2]=s,e[3]=i):i=e[3];let m;return e[4]!==o||e[5]!==r||e[6]!==i?(m=n.jsxs("div",{className:r,children:[i,o]}),e[4]=o,e[5]=r,e[6]=i,e[7]=m):m=e[7],m}function dt(t){const e=K.c(25),{onExtract:s,isExtracting:o}=t,[l,r]=Oe.useState("");let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10",children:n.jsx(Ze,{size:18,className:"text-primary"})}),e[0]=i):i=e[0];let m,u;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("p",{className:"text-sm font-medium text-foreground",children:"Auto-extract brand context"}),u=n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Enter your website URL and we'll automatically extract your brand colors, fonts, logos, and company overview."}),e[1]=m,e[2]=u):(m=e[1],u=e[2]);let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=d=>r(d.target.value),e[3]=p):p=e[3];let b;e[4]!==l||e[5]!==o||e[6]!==s?(b=d=>{d.key==="Enter"&&l.trim()&&!o&&s(l.trim())},e[4]=l,e[5]=o,e[6]=s,e[7]=b):b=e[7];let f;e[8]!==l||e[9]!==b?(f=n.jsx(he,{placeholder:"acme.com",value:l,onChange:p,className:"max-w-xs",onKeyDown:b}),e[8]=l,e[9]=b,e[10]=f):f=e[10];let c;e[11]!==l||e[12]!==o?(c=!l.trim()||o,e[11]=l,e[12]=o,e[13]=c):c=e[13];let a;e[14]!==l||e[15]!==s?(a=()=>s(l.trim()),e[14]=l,e[15]=s,e[16]=a):a=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Ve,{size:14}),e[17]=x):x=e[17];const g=o?"Extracting...":"Extract";let h;e[18]!==g||e[19]!==c||e[20]!==a?(h=n.jsxs(Te,{variant:"outline",disabled:c,onClick:a,children:[x,g]}),e[18]=g,e[19]=c,e[20]=a,e[21]=h):h=e[21];let v;return e[22]!==h||e[23]!==f?(v=n.jsx("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-5",children:n.jsxs("div",{className:"flex items-start gap-4",children:[i,n.jsxs("div",{className:"flex-1",children:[m,u,n.jsxs("div",{className:"mt-3 flex gap-2",children:[f,h]})]})]})}),e[22]=h,e[23]=f,e[24]=v):v=e[24],v}function mt(t){const e=K.c(36),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;e[0]!==s?(r=s.watch("domain"),e[0]=s,e[1]=r):r=e[1];const i=r;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Company name"}),e[2]=m):m=e[2];let u;e[3]!==o||e[4]!==l?(u=w=>{const{field:C}=w;return n.jsx(he,{...C,onChange:k=>{C.onChange(k),o()},onBlur:()=>{C.onBlur(),l()},placeholder:"Acme Corp"})},e[3]=o,e[4]=l,e[5]=u):u=e[5];let p;e[6]!==s.control||e[7]!==u?(p=n.jsxs("div",{children:[m,n.jsx(ge,{control:s.control,name:"name",render:u})]}),e[6]=s.control,e[7]=u,e[8]=p):p=e[8];let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx("span",{children:"Domain"}),e[9]=b):b=e[9];let f;e[10]!==i?(f=i&&n.jsxs("a",{href:`https://${i}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 transition-colors hover:text-foreground",children:[n.jsx(Je,{size:10}),"open"]}),e[10]=i,e[11]=f):f=e[11];let c;e[12]!==f?(c=n.jsxs("label",{className:"mb-1 flex items-center justify-between text-xs text-muted-foreground",children:[b,f]}),e[12]=f,e[13]=c):c=e[13];let a;e[14]!==o||e[15]!==l?(a=w=>{const{field:C}=w;return n.jsx(he,{...C,onChange:k=>{C.onChange(k),o()},onBlur:()=>{C.onBlur(),l()},placeholder:"acme.com"})},e[14]=o,e[15]=l,e[16]=a):a=e[16];let x;e[17]!==s.control||e[18]!==a?(x=n.jsx(ge,{control:s.control,name:"domain",render:a}),e[17]=s.control,e[18]=a,e[19]=x):x=e[19];let g;e[20]!==c||e[21]!==x?(g=n.jsxs("div",{children:[c,x]}),e[20]=c,e[21]=x,e[22]=g):g=e[22];let h;e[23]!==g||e[24]!==p?(h=n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[p,g]}),e[23]=g,e[24]=p,e[25]=h):h=e[25];let v;e[26]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Overview"}),e[26]=v):v=e[26];let d;e[27]!==o||e[28]!==l?(d=w=>{const{field:C}=w;return n.jsx(it,{...C,onChange:k=>{C.onChange(k),o()},onBlur:()=>{C.onBlur(),l()},placeholder:"Brief description of what the company does...",rows:3})},e[27]=o,e[28]=l,e[29]=d):d=e[29];let y;e[30]!==s.control||e[31]!==d?(y=n.jsxs("div",{children:[v,n.jsx(ge,{control:s.control,name:"overview",render:d})]}),e[30]=s.control,e[31]=d,e[32]=y):y=e[32];let N;return e[33]!==h||e[34]!==y?(N=n.jsx(we,{title:"Company Overview",children:n.jsxs("div",{className:"space-y-3",children:[h,y]})}),e[33]=h,e[34]=y,e[35]=N):N=e[35],N}const ft={backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"};function Ae(t){const e=K.c(22),{form:s,name:o,label:l,imgClassName:r,onFieldChange:i,onFieldCommit:m}=t,u=r===void 0?"h-full w-full object-contain p-3":r;let p;e[0]!==s||e[1]!==o?(p=s.watch(o),e[0]=s,e[1]=o,e[2]=p):p=e[2];const b=p;let f;e[3]!==u||e[4]!==l||e[5]!==b?(f=n.jsx("div",{className:"flex aspect-video w-28 shrink-0 items-center justify-center overflow-hidden rounded-xl",style:ft,children:b?n.jsx("img",{src:b,alt:l,className:u,loading:"lazy"}):n.jsxs("span",{className:"text-[10px] text-muted-foreground/70",children:["No ",l.toLowerCase()]})}),e[3]=u,e[4]=l,e[5]=b,e[6]=f):f=e[6];let c;e[7]!==l?(c=n.jsxs("label",{className:"mb-1 block text-xs text-muted-foreground",children:[l," URL"]}),e[7]=l,e[8]=c):c=e[8];let a;e[9]!==i||e[10]!==m?(a=v=>{const{field:d}=v;return n.jsx(he,{...d,onChange:y=>{d.onChange(y),i()},onBlur:()=>{d.onBlur(),m()},placeholder:"https://..."})},e[9]=i,e[10]=m,e[11]=a):a=e[11];let x;e[12]!==s.control||e[13]!==o||e[14]!==a?(x=n.jsx(ge,{control:s.control,name:o,render:a}),e[12]=s.control,e[13]=o,e[14]=a,e[15]=x):x=e[15];let g;e[16]!==c||e[17]!==x?(g=n.jsxs("div",{className:"flex-1",children:[c,x]}),e[16]=c,e[17]=x,e[18]=g):g=e[18];let h;return e[19]!==f||e[20]!==g?(h=n.jsxs("div",{className:"flex items-start gap-3",children:[f,g]}),e[19]=f,e[20]=g,e[21]=h):h=e[21],h}function ut(t){const e=K.c(4),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;return e[0]!==s||e[1]!==o||e[2]!==l?(r=n.jsx(we,{title:"Logos & Images",children:n.jsxs("div",{className:"space-y-3",children:[n.jsx(Ae,{form:s,name:"logo",label:"Logo",onFieldChange:o,onFieldCommit:l}),n.jsx(Ae,{form:s,name:"favicon",label:"Favicon",imgClassName:"h-12 w-12 object-contain",onFieldChange:o,onFieldCommit:l}),n.jsx(Ae,{form:s,name:"ogImage",label:"SEO / OG image",imgClassName:"h-full w-full object-contain",onFieldChange:o,onFieldCommit:l})]})}),e[0]=s,e[1]=o,e[2]=l,e[3]=r):r=e[3],r}const xt=[{key:"heading",label:"Headings"},{key:"body",label:"Body"},{key:"code",label:"Code"}];function gt(t){const e=K.c(6),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;e[0]!==s||e[1]!==o||e[2]!==l?(r=xt.map(m=>{const{key:u,label:p}=m,b=`fonts.${u}`,f=s.watch(b);return n.jsxs("div",{children:[n.jsxs("label",{className:"mb-1 flex items-center gap-3 text-xs text-muted-foreground",children:[n.jsx("span",{className:"w-7 text-base font-medium leading-none text-foreground",children:"Aa"}),n.jsx("span",{children:p}),f&&n.jsx("span",{className:"ml-auto truncate text-foreground",style:{fontFamily:f},children:f})]}),n.jsx(ge,{control:s.control,name:b,render:c=>{const{field:a}=c;return n.jsx(he,{...a,value:a.value??"",onChange:x=>{a.onChange(x),o()},onBlur:()=>{a.onBlur(),l()},placeholder:`Font family for ${p.toLowerCase()}`})}})]},u)}),e[0]=s,e[1]=o,e[2]=l,e[3]=r):r=e[3];let i;return e[4]!==r?(i=n.jsx(we,{title:"Fonts",children:n.jsx("div",{className:"space-y-2",children:r})}),e[4]=r,e[5]=i):i=e[5],i}const ht=[{key:"primary",label:"Primary"},{key:"secondary",label:"Secondary"},{key:"accent",label:"Accent"},{key:"background",label:"Background"},{key:"foreground",label:"Foreground"}];function pt(t){const e=K.c(6),{form:s,onFieldChange:o,onFieldCommit:l}=t;let r;e[0]!==s||e[1]!==o||e[2]!==l?(r=ht.map(m=>{const{key:u,label:p}=m,b=`colors.${u}`;return n.jsx(ge,{control:s.control,name:b,render:f=>{const{field:c}=f;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"color",value:c.value??"#000000",onChange:a=>{c.onChange(a.target.value),o()},onBlur:()=>{c.onBlur(),l()},className:"h-9 w-9 shrink-0 cursor-pointer rounded-lg border border-border bg-transparent p-0.5"}),n.jsx(he,{value:c.value??"",onChange:a=>{c.onChange(a.target.value),o()},onBlur:()=>{c.onBlur(),l()},placeholder:"#000000",className:"w-28"}),n.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:p})]})}},u)}),e[0]=s,e[1]=o,e[2]=l,e[3]=r):r=e[3];let i;return e[4]!==r?(i=n.jsx(we,{title:"Colors",children:n.jsx("div",{className:"space-y-2",children:r})}),e[4]=r,e[5]=i):i=e[5],i}function bt(t){const e=K.c(133),{brand:s,client:o,onChanged:l}=t,[r,i]=Oe.useState(s.isDefault??!1),[m,u]=Oe.useState(!1),p=s.name??"",b=s.domain??"",f=s.overview??"",c=s.logo??"",a=s.favicon??"",x=s.ogImage??"";let g;e[0]!==s.fonts?(g=s.fonts??{},e[0]=s.fonts,e[1]=g):g=e[1];let h;e[2]!==s.colors?(h=s.colors??{},e[2]=s.colors,e[3]=h):h=e[3];let v;e[4]!==p||e[5]!==b||e[6]!==f||e[7]!==c||e[8]!==a||e[9]!==x||e[10]!==g||e[11]!==h?(v={values:{name:p,domain:b,overview:f,logo:c,favicon:a,ogImage:x,fonts:g,colors:h}},e[4]=p,e[5]=b,e[6]=f,e[7]=c,e[8]=a,e[9]=x,e[10]=g,e[11]=h,e[12]=v):v=e[12];const d=He(v);let y;e[13]!==s.id||e[14]!==s.images||e[15]!==o?(y=async j=>{const Fe=Object.values(j.fonts).some(Et),Ie=Object.values(j.colors).some(kt),ze={id:s.id,name:j.name,domain:j.domain,overview:j.overview,logo:j.logo||null,favicon:j.favicon||null,ogImage:j.ogImage||null,fonts:Fe?j.fonts:null,colors:Ie?j.colors:null,images:s.images};await o.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:ze})},e[13]=s.id,e[14]=s.images,e[15]=o,e[16]=y):y=e[16];let N;e[17]!==s.id||e[18]!==d||e[19]!==l?(N=(j,Fe)=>{Q("brand_updated",{brand_id:s.id,fields:Object.keys(d.formState.dirtyFields)}),d.reset(Fe),l()},e[17]=s.id,e[18]=d,e[19]=l,e[20]=N):N=e[20];let w;e[21]!==y||e[22]!==N?(w={mutationFn:y,onSuccess:N,onError:Dt},e[21]=y,e[22]=N,e[23]=w):w=e[23];const C=pe(w);let k;e[24]!==d||e[25]!==C?(k={delayMs:500,save:async()=>{d.formState.isDirty&&await C.mutateAsync(d.getValues())}},e[24]=d,e[25]=C,e[26]=k):k=e[26];const{schedule:$,flush:P}=ct(k);let R;e[27]!==s.id||e[28]!==o?(R=async()=>{await o.callTool({name:"BRAND_CONTEXT_DELETE",arguments:{id:s.id}})},e[27]=s.id,e[28]=o,e[29]=R):R=e[29];let H;e[30]!==s.id||e[31]!==l?(H=()=>{Q("brand_deleted",{brand_id:s.id}),u(!1),l(),X.success("Brand deleted")},e[30]=s.id,e[31]=l,e[32]=H):H=e[32];let U;e[33]!==R||e[34]!==H?(U={mutationFn:R,onSuccess:H,onError:wt},e[33]=R,e[34]=H,e[35]=U):U=e[35];const{mutate:I,isPending:D}=pe(U);let E;e[36]!==s.id||e[37]!==s.isDefault||e[38]!==o?(E=async()=>{await o.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:{id:s.id,isDefault:!s.isDefault}})},e[36]=s.id,e[37]=s.isDefault,e[38]=o,e[39]=E):E=e[39];let B;e[40]!==s.id||e[41]!==s.isDefault||e[42]!==l?(B=()=>{Q(s.isDefault?"brand_unset_as_default":"brand_set_as_default",{brand_id:s.id}),l(),X.success(s.isDefault?"Removed as default brand":"Set as default brand")},e[40]=s.id,e[41]=s.isDefault,e[42]=l,e[43]=B):B=e[43];let M;e[44]!==E||e[45]!==B?(M={mutationFn:E,onSuccess:B,onError:_t},e[44]=E,e[45]=B,e[46]=M):M=e[46];const{mutate:G}=pe(M),q=s.isDefault?"border-primary/30":"border-border/60";let z;e[47]!==q?(z=_e("rounded-2xl border bg-background",q),e[47]=q,e[48]=z):z=e[48];let S;e[49]!==r?(S=()=>i(!r),e[49]=r,e[50]=S):S=e[50];let F;e[51]!==r?(F=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:r?n.jsx(Qe,{size:14}):n.jsx(Ge,{size:14})}),e[51]=r,e[52]=F):F=e[52];let A;e[53]!==s.logo||e[54]!==s.name?(A=s.logo?n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"6px 6px",backgroundPosition:"0 0, 3px 3px",backgroundColor:"#fff"},children:n.jsx("img",{src:s.logo,alt:"",className:"h-full w-full object-contain p-1",onError:Nt})}):n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s.name?.charAt(0)?.toUpperCase()||"?"})}),e[53]=s.logo,e[54]=s.name,e[55]=A):A=e[55];const L=s.name||"Untitled Brand";let T;e[56]!==L?(T=n.jsx("span",{className:"text-sm font-medium text-foreground",children:L}),e[56]=L,e[57]=T):T=e[57];let _;e[58]!==s.domain?(_=s.domain&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:s.domain}),e[58]=s.domain,e[59]=_):_=e[59];let O;e[60]!==T||e[61]!==_?(O=n.jsxs("div",{className:"flex flex-1 flex-col items-start gap-0.5 overflow-hidden text-left",children:[T,_]}),e[60]=T,e[61]=_,e[62]=O):O=e[62];let V;e[63]!==s.colors||e[64]!==r?(V=!r&&s.colors&&Object.values(s.colors).some(Ct)&&n.jsx("div",{className:"flex shrink-0 gap-1",children:Object.entries(s.colors).filter(vt).map(yt)}),e[63]=s.colors,e[64]=r,e[65]=V):V=e[65];let Y;e[66]!==s.fonts||e[67]!==r?(Y=!r&&s.fonts&&Object.values(s.fonts).some(jt)&&n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Object.values(s.fonts).filter(Boolean).join(", ")}),e[66]=s.fonts,e[67]=r,e[68]=Y):Y=e[68];const De=s.isDefault?"opacity-100":"opacity-0 hover:bg-muted group-hover:opacity-100";let J;e[69]!==De?(J=_e("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-opacity",De),e[69]=De,e[70]=J):J=e[70];let W,Z;e[71]!==G?(W=j=>{j.stopPropagation(),G()},Z=j=>{j.key==="Enter"&&(j.stopPropagation(),G())},e[71]=G,e[72]=W,e[73]=Z):(W=e[72],Z=e[73]);const ke=s.isDefault?"Unset as default":"Set as default",Ee=s.isDefault?"text-primary fill-primary":"text-muted-foreground";let ee;e[74]!==Ee?(ee=_e(Ee),e[74]=Ee,e[75]=ee):ee=e[75];let te;e[76]!==ee?(te=n.jsx(Ye,{size:13,className:ee}),e[76]=ee,e[77]=te):te=e[77];let se;e[78]!==J||e[79]!==W||e[80]!==Z||e[81]!==ke||e[82]!==te?(se=n.jsx("span",{role:"button",tabIndex:0,className:J,onClick:W,onKeyDown:Z,title:ke,children:te}),e[78]=J,e[79]=W,e[80]=Z,e[81]=ke,e[82]=te,e[83]=se):se=e[83];let be,je;e[84]===Symbol.for("react.memo_cache_sentinel")?(be=j=>{j.stopPropagation(),u(!0)},je=j=>{j.key==="Enter"&&(j.stopPropagation(),u(!0))},e[84]=be,e[85]=je):(be=e[84],je=e[85]);let ye;e[86]===Symbol.for("react.memo_cache_sentinel")?(ye=n.jsx("span",{role:"button",tabIndex:0,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg opacity-0 transition-opacity hover:bg-destructive/10 group-hover:opacity-100",onClick:be,onKeyDown:je,title:"Delete brand",children:n.jsx(We,{size:13,className:"text-muted-foreground"})}),e[86]=ye):ye=e[86];let ne;e[87]!==S||e[88]!==F||e[89]!==A||e[90]!==O||e[91]!==V||e[92]!==Y||e[93]!==se?(ne=n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 p-5",onClick:S,children:[F,A,O,V,Y,se,ye]}),e[87]=S,e[88]=F,e[89]=A,e[90]=O,e[91]=V,e[92]=Y,e[93]=se,e[94]=ne):ne=e[94];let le;e[95]!==r||e[96]!==P||e[97]!==d||e[98]!==$?(le=r&&n.jsxs("div",{className:"space-y-3 px-5 pb-5",children:[n.jsx(mt,{form:d,onFieldChange:$,onFieldCommit:P}),n.jsx(ut,{form:d,onFieldChange:$,onFieldCommit:P}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsx(pt,{form:d,onFieldChange:$,onFieldCommit:P}),n.jsx(gt,{form:d,onFieldChange:$,onFieldCommit:P})]})]}),e[95]=r,e[96]=P,e[97]=d,e[98]=$,e[99]=le):le=e[99];let oe;e[100]!==D?(oe=j=>{!j&&!D&&u(!1)},e[100]=D,e[101]=oe):oe=e[101];let ve;e[102]===Symbol.for("react.memo_cache_sentinel")?(ve=n.jsx(et,{children:"Delete brand?"}),e[102]=ve):ve=e[102];const Be=s.name||"this brand";let re;e[103]!==Be?(re=n.jsxs("p",{children:["This will permanently delete"," ",n.jsx("span",{className:"font-medium text-foreground",children:Be}),". This action cannot be undone."]}),e[103]=Be,e[104]=re):re=e[104];let ae;e[105]!==s.isDefault?(ae=s.isDefault&&n.jsxs("p",{className:"mt-2 rounded-lg border border-destructive/30 bg-destructive/5 p-2 text-destructive",children:[n.jsx("span",{className:"font-medium",children:"Heads up:"})," this is your organization's default brand. Deleting it will leave your organization without a default brand until you set another."]}),e[105]=s.isDefault,e[106]=ae):ae=e[106];let ie;e[107]!==re||e[108]!==ae?(ie=n.jsxs(tt,{children:[ve,n.jsx(st,{asChild:!0,children:n.jsxs("div",{children:[re,ae]})})]}),e[107]=re,e[108]=ae,e[109]=ie):ie=e[109];let ce;e[110]!==D?(ce=n.jsx(nt,{disabled:D,children:"Cancel"}),e[110]=D,e[111]=ce):ce=e[111];let de;e[112]!==I?(de=j=>{j.preventDefault(),I()},e[112]=I,e[113]=de):de=e[113];const Se=D?"Deleting...":"Delete";let me;e[114]!==D||e[115]!==de||e[116]!==Se?(me=n.jsx(lt,{onClick:de,disabled:D,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Se}),e[114]=D,e[115]=de,e[116]=Se,e[117]=me):me=e[117];let fe;e[118]!==ce||e[119]!==me?(fe=n.jsxs(ot,{children:[ce,me]}),e[118]=ce,e[119]=me,e[120]=fe):fe=e[120];let ue;e[121]!==ie||e[122]!==fe?(ue=n.jsxs(rt,{children:[ie,fe]}),e[121]=ie,e[122]=fe,e[123]=ue):ue=e[123];let xe;e[124]!==m||e[125]!==oe||e[126]!==ue?(xe=n.jsx(at,{open:m,onOpenChange:oe,children:ue}),e[124]=m,e[125]=oe,e[126]=ue,e[127]=xe):xe=e[127];let Ce;return e[128]!==z||e[129]!==ne||e[130]!==le||e[131]!==xe?(Ce=n.jsxs("div",{className:z,children:[ne,le,xe]}),e[128]=z,e[129]=ne,e[130]=le,e[131]=xe,e[132]=Ce):Ce=e[132],Ce}function jt(t){return t}function yt(t){const[e,s]=t;return n.jsx("div",{className:"h-5 w-5 rounded-full border border-border/40",style:{backgroundColor:s},title:`${e}: ${s}`},e)}function vt(t){const[,e]=t;return e}function Ct(t){return t}function Nt(t){t.target.style.display="none"}function _t(){return X.error("Failed to update default brand")}function wt(){return X.error("Failed to delete brand")}function Dt(){return X.error("Failed to save brand context")}function kt(t){return t?.trim()}function Et(t){return t?.trim()}function Bt(){const t=K.c(57),{brandExtractEnabled:e}=Le(),{org:s}=Ke();let o;t[0]!==s.id||t[1]!==s.slug?(o={connectionId:Me,orgId:s.id,orgSlug:s.slug},t[0]=s.id,t[1]=s.slug,t[2]=o):o=t[2];const l=qe(o),r=Ue();let i;t[3]!==s.id?(i=$e.brandContext(s.id),t[3]=s.id,t[4]=i):i=t[4];let m;t[5]!==l?(m=async()=>{const _=await l.callTool({name:"BRAND_CONTEXT_LIST",arguments:{includeArchived:!1}}),O=Re(_);return Array.isArray(O?.items)?O.items:[]},t[5]=l,t[6]=m):m=t[6];let u;t[7]!==i||t[8]!==m?(u={queryKey:i,queryFn:m},t[7]=i,t[8]=m,t[9]=u):u=t[9];const{data:p}=Xe(u),f=(p===void 0?[]:p).filter(At);let c;t[10]!==s.id||t[11]!==r?(c=()=>r.invalidateQueries({queryKey:$e.brandContext(s.id),refetchType:"all"}),t[10]=s.id,t[11]=r,t[12]=c):c=t[12];const a=c;let x;t[13]!==l?(x=async()=>{await l.callTool({name:"BRAND_CONTEXT_CREATE",arguments:{name:"New Brand",domain:"example.com",overview:""}})},t[13]=l,t[14]=x):x=t[14];let g;t[15]!==a?(g=()=>{Q("brand_created"),a(),X.success("Brand created")},t[15]=a,t[16]=g):g=t[16];let h;t[17]!==x||t[18]!==g?(h={mutationFn:x,onSuccess:g,onError:Ft},t[17]=x,t[18]=g,t[19]=h):h=t[19];const{mutate:v,isPending:d}=pe(h);let y;t[20]!==l?(y=async _=>{Q("brand_extract_started",{domain:_});const O=await l.callTool({name:"BRAND_CONTEXT_EXTRACT",arguments:{domain:_}});Re(O)},t[20]=l,t[21]=y):y=t[21];let N;t[22]!==a?(N=()=>{Q("brand_extract_succeeded"),a(),X.success("Brand extracted successfully")},t[22]=a,t[23]=N):N=t[23];let w;t[24]!==N||t[25]!==y?(w={mutationFn:y,onSuccess:N,onError:St},t[24]=N,t[25]=y,t[26]=w):w=t[26];const{mutate:C,isPending:k}=pe(w),$=Ne,P=Ne,R=Ne,H="flex flex-col gap-6";let U;t[27]===Symbol.for("react.memo_cache_sentinel")?(U=n.jsxs("div",{children:[n.jsx(Ne.Title,{children:"Brand Context"}),n.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Define your brand profiles. Each brand is available as an MCP prompt for AI clients."})]}),t[27]=U):U=t[27];let I;t[28]!==v?(I=()=>v(),t[28]=v,t[29]=I):I=t[29];let D;t[30]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(Pe,{size:14}),t[30]=D):D=t[30];let E;t[31]!==d||t[32]!==I?(E=n.jsxs("div",{className:"flex items-center justify-between",children:[U,n.jsxs(Te,{variant:"outline",onClick:I,disabled:d,children:[D,"Add Brand"]})]}),t[31]=d,t[32]=I,t[33]=E):E=t[33];let B;t[34]!==e||t[35]!==C||t[36]!==k?(B=e&&n.jsx(dt,{onExtract:_=>C(_),isExtracting:k}),t[34]=e,t[35]=C,t[36]=k,t[37]=B):B=t[37];const M=f.length===0&&n.jsxs("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-8 text-center",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:"No brands configured yet."}),n.jsxs(Te,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>v(),disabled:d,children:[n.jsx(Pe,{size:14}),"Add your first brand"]})]}),G="group space-y-3";let q;t[38]!==l||t[39]!==a?(q=_=>n.jsx(bt,{brand:_,client:l,onChanged:a},_.id),t[38]=l,t[39]=a,t[40]=q):q=t[40];const z=f.map(q);let S;t[41]!==z?(S=n.jsx("div",{className:G,children:z}),t[41]=z,t[42]=S):S=t[42];let F;t[43]!==E||t[44]!==B||t[45]!==M||t[46]!==S?(F=n.jsxs("div",{className:H,children:[E,B,M,S]}),t[43]=E,t[44]=B,t[45]=M,t[46]=S,t[47]=F):F=t[47];let A;t[48]!==R.Body||t[49]!==F?(A=n.jsx(R.Body,{children:F}),t[48]=R.Body,t[49]=F,t[50]=A):A=t[50];let L;t[51]!==P.Content||t[52]!==A?(L=n.jsx(P.Content,{children:A}),t[51]=P.Content,t[52]=A,t[53]=L):L=t[53];let T;return t[54]!==$||t[55]!==L?(T=n.jsx($,{children:L}),t[54]=$,t[55]=L,t[56]=T):T=t[56],T}function St(t){Q("brand_extract_failed",{error:t instanceof Error?t.message:"unknown"}),X.error(t instanceof Error?t.message:"Failed to extract brand")}function Ft(){return X.error("Failed to create brand")}function At(t){return!t.archivedAt}function Yt(){const t=K.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Bt,{}),t[0]=e):e=t[0],e}export{Yt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as l,c as n,j as c}from"./index-
|
|
1
|
+
import{e as l,c as n,j as c}from"./index-Ux_PrmKm.js";function i(a){const e=l.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==s||e[6]!==r?(o=c.jsx("div",{"data-slot":"card",className:r,...s}),e[5]=s,e[6]=r,e[7]=o):o=e[7],o}function f(a){const e=l.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{i as C,f as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bN as or,bO as ir,bl as q,J as m,bP as dt,bQ as ca,bR as lr,bS as cr,I as ur,a_ as V,aI as Ye,aK as Xe,H as D,a$ as E,aJ as pe,bT as dr,bU as $,ap as pr,bb as fr,r as T,R as X,e as et,a1 as ua,o as mt,s as ne,K as ve,x as Ie,Q as le,f as mr,d as da,g as hr,w as gr,b as pa,j as De,t as vr,P as yr,bV as br}from"./index-
|
|
1
|
+
import{bN as or,bO as ir,bl as q,J as m,bP as dt,bQ as ca,bR as lr,bS as cr,I as ur,a_ as V,aI as Ye,aK as Xe,H as D,a$ as E,aJ as pe,bT as dr,bU as $,ap as pr,bb as fr,r as T,R as X,e as et,a1 as ua,o as mt,s as ne,K as ve,x as Ie,Q as le,f as mr,d as da,g as hr,w as gr,b as pa,j as De,t as vr,P as yr,bV as br}from"./index-Ux_PrmKm.js";import{E as Ir,g as Er,S as kt,u as Ot}from"./constants-Ccnt3rmd.js";import{u as fa}from"./use-virtual-mcp-Cd4gN6tQ.js";import{u as ma,a as he}from"./use-ai-providers-aNlhpnwf.js";import{u as ha}from"./use-decopilot-events-BA4osLiM.js";import{u as Sr}from"./use-tasks-CJ3vNKME.js";import{b as _r,c as Tr}from"./use-collections-CqB4T92N.js";import{e as ga}from"./use-organization-settings-C-NHhw4n.js";var He;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function a(s){throw new Error}e.assertNever=a,e.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},e.getValidEnumValues=s=>{const n=e.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(n){return s[n]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},e.find=(s,n)=>{for(const i of s)if(n(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}e.joinValues=r,e.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(He||(He={}));var Bt;(function(e){e.mergeShapes=(t,a)=>({...t,...a})})(Bt||(Bt={}));He.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);He.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class pt extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=t}format(t){const a=t||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,u=0;for(;u<i.path.length;){const l=i.path[u];u===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(a(i))):o[l]=o[l]||{_errors:[]},o=o[l],u++}}};return s(this),r}static assert(t){if(!(t instanceof pt))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,He.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(t(s))}else r.push(t(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}pt.create=e=>new pt(e);var qt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(qt||(qt={}));var w;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(w||(w={}));const Mr={anthropic:["claude-sonnet-4-6","claude-sonnet","claude"],openrouter:["anthropic/claude-opus-4.7","anthropic/claude-sonnet-4-6","anthropic/claude-sonnet","anthropic/claude"],deco:["anthropic/claude-haiku-4-5","anthropic/claude-haiku","anthropic/claude"],google:["gemini-3-flash"],"claude-code":["claude-code:sonnet","claude-code:opus","claude-code:haiku"]},wr={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"]},Cr={anthropic:["claude-sonnet-4-6","claude-sonnet"],openrouter:["anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-opus-4.7","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"]},Ar={anthropic:["claude-opus-4-7","claude-sonnet-4-6","claude-sonnet"],openrouter:["anthropic/claude-opus-4.7","anthropic/claude-sonnet-4.6:extended","anthropic/claude-sonnet-4.6","google/gemini-3-pro"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet"],google:["gemini-3-pro"],"claude-code":["claude-code:opus","claude-code:sonnet"]},Rr={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],google:["gemini-2.0-flash-image"]},xr={openrouter:["perplexity/sonar","perplexity/sonar-pro","perplexity/deep-research"],deco:["perplexity/sonar","perplexity/sonar-pro","perplexity/deep-research"]};function qe(e,t,a,r){for(const s of a){const n=e.find(i=>i.modelId===s);if(n)return{keyId:t,modelId:n.modelId,title:n.title}}for(const s of a){const n=e.find(i=>i.modelId.includes(s));if(n)return{keyId:t,modelId:n.modelId,title:n.title}}if(r){const s=e.find(r);if(s)return{keyId:t,modelId:s.modelId,title:s.title}}return null}function Qn(e,t){const a={chat:{fast:null,smart:null,thinking:null},image:null,webResearch:null};for(const r of e){const s=t[r.id]??[],n=r.providerId;a.chat.fast||(a.chat.fast=qe(s,r.id,wr[n]??[])),a.chat.smart||(a.chat.smart=qe(s,r.id,Cr[n]??[])),a.chat.thinking||(a.chat.thinking=qe(s,r.id,Ar[n]??[])),a.image||(a.image=qe(s,r.id,Rr[n]??[],i=>i.capabilities?.includes("image")===!0)),a.webResearch||(a.webResearch=qe(s,r.id,xr[n]??[],i=>{const o=i.modelId.toLowerCase().replace(/[^a-z0-9]/g,"");return o.includes("sonar")||o.includes("deepresearch")}))}return a}function va(e,t,a){if(e.length===0)return null;const r=Mr[t]??[],s=n=>a!==void 0?{...n,keyId:a}:n;for(const n of r){const i=e.find(o=>o.modelId===n);if(i)return s(i)}for(const n of r){const i=e.find(o=>o.modelId.includes(n));if(i)return s(i)}return s(e[0])}function kr(e,t){const{mimeType:a,data:r}=e;if(a.startsWith("text/"))try{const s=new TextDecoder().decode(Uint8Array.from(atob(r),n=>n.charCodeAt(0)));return[{type:"text",text:`${t}
|
|
2
2
|
${s}`}]}catch(s){console.error("Failed to decode text file:",s)}return[{type:"file",url:`data:${a};base64,${r}`,filename:t,mediaType:a}]}function Jt(e,t){const a=[];for(const r of e)"text"in r&&r.text?a.push({type:"text",text:`[${t}]
|
|
3
3
|
${r.text}`}):"blob"in r&&r.blob&&r.mimeType&&a.push({type:"file",url:`data:${r.mimeType};base64,${r.blob}`,filename:String(r.uri),mediaType:String(r.mimeType)});return a}function Or(e,t){const a=[];for(const r of e){if(r.role!=="user"||!r.content)continue;const s=Array.isArray(r.content)?r.content:[r.content];for(const n of s)switch(n.type){case"text":{const i=n.text?.trim();if(!i)continue;a.push({type:"text",text:`[${t}]
|
|
4
4
|
${i}`});break}case"image":case"audio":{if(!n.data||!n.mimeType)continue;a.push({type:"file",url:`data:${n.mimeType};base64,${n.data}`,mediaType:n.mimeType});break}case"resource":{const i=n.resource;if(!i||!i.mimeType)continue;i&&("text"in i&&i.text?a.push({type:"text",text:`[${t}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as n,c as d,j as c,b3 as l,b4 as b}from"./index-Ux_PrmKm.js";import{i as m}from"./Check-a0FPGBtH.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(b,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as Ke,J as te,e as N,j as t,E as Te,r as C,s as le,z as Ge,c as U,aX as Qe,aY as Xe,l as ie,d as Ye,L as G,B as q,x as Ze,g as ae,aZ as ke}from"./index-Ux_PrmKm.js";import{E as Pe}from"./empty-state-D1x6Uzf-.js";import{u as et,a as Ee}from"./use-collections-CqB4T92N.js";import{u as ce}from"./constants-Ccnt3rmd.js";import{F as se,a as tt,b as de,d as me}from"./form-D4Q00YSx.js";import{I as ue}from"./input-B868_ejo.js";import{T as re}from"./textarea-BbtfG9Ru.js";import{a as st,b as nt,V as xe}from"./layout-DkCp6X2C.js";import{S as ot,W as rt,a as lt}from"./index-BBbwvkmx.js";import{g as it,M as at,b as je}from"./types-BSAKF0wC.js";import{S as be,a as Ne,b as ve,c as Se,d as ne}from"./select-slwRPncS.js";import{c as ct,T as ye,a as we,b as Ce}from"./tooltip-BOsmkVZD.js";import{i as dt}from"./AlertCircle-B65qDYSH.js";import{v as mt,x as ut,U as xt,V as pt,W as ft,X as Ie}from"./agent-icon-D_KgWkiu.js";import{c as ht}from"./XCircle-yJD2sr2j.js";import{i as gt}from"./Play-C-AiMK-Y.js";import{i as jt}from"./ChevronRight-xkl8cwkd.js";import{O as bt,M as Nt}from"./index-DsncOedH.js";import{g as vt}from"./connection-slug-eyAPH6o3.js";import{u as St,T as yt}from"./tools-list-DGhR4Qyt.js";import{a as _e,u as Oe}from"./use-connection-C_n04i0m.js";import{b as wt}from"./use-mcp-tools-uazou5KQ.js";import{c as Ct}from"./content-blocks-o63cs2vh.js";import{I as $e}from"./integration-icon-Ov0IbIMU.js";import{g as It,k as $t}from"./chat-context-BmN5ppM9.js";import{u as Tt}from"./shell-layout-Drnm9mfO.js";import{M as kt}from"./monaco-editor-DfIGvq7v.js";import{E as Pt}from"./empty-state-CGCgWL8i.js";import{n as Et}from"./Container-cyfm5-Pb.js";import"./label-Cg-2ys6X.js";import"./index-ILTPQsH4.js";import"./X-dZLz-ulr.js";import"./index-Yaw_OxhP.js";import"./collections-DAavnhku.js";import"./index-CUuCKerO.js";import"./use-virtual-mcp-Cd4gN6tQ.js";import"./accordion-DtmZjwNB.js";import"./index-DgtpEOsQ.js";import"./badge-BWEc0v7O.js";import"./view-mode-toggle-_LNgXbfe.js";import"./dialog-_YlOXdcS.js";import"./index-I3M58vcg.js";import"./dropdown-menu-BXZVht4Z.js";import"./Check-a0FPGBtH.js";import"./DotsVertical-Bx7sSuAL.js";import"./Plus-DGrvw6bs.js";import"./Tool01-Cq1N-niG.js";import"./XClose-Ci4dmV-Y.js";import"./scroll-area-_bumfcjA.js";import"./index-Cf-Qb03y.js";import"./create-sse-subscription-CxkOgzKf.js";import"./ChevronDown-Z3xhSsnT.js";import"./ChevronUp-Cy7lkJW1.js";import"./RefreshCcw01-Biyt7Dy2.js";import"./ArrowNarrowLeft-fzTyPWny.js";import"./ArrowUpRight-BcX-Z0Ku.js";import"./ZapSquare-M3u7o8sc.js";import"./Users03-CB3lBGeX.js";import"./CheckCircle-B8cGzYri.js";import"./Star01-BoJYsaDm.js";import"./Palette-CwWccG-f.js";import"./SearchMd-OHnYTa8U.js";import"./LinkExternal01-0g6HjjkD.js";import"./Lock01-BzMXxHmW.js";import"./Sun-DA-QmugE.js";import"./Settings02-DO2nBrax.js";import"./Shield01-DQa1zKSX.js";import"./Trash01-PRSN3sYk.js";import"./User01-DwPCZdnr.js";import"./Zap-CYJdRXq9.js";import"./extract-connection-data-BTJzhkiq.js";import"./constants-BNhCk86i.js";import"./use-registry-connections-B1oBXsUK.js";import"./use-organization-settings-C-NHhw4n.js";import"./index-7DFELu7_.js";import"./popover-B3f914lR.js";import"./use-create-virtual-mcp-DvxMGqTu.js";import"./use-navigate-to-agent-kI9r54wH.js";import"./use-ai-providers-aNlhpnwf.js";import"./use-decopilot-events-BA4osLiM.js";import"./use-tasks-CJ3vNKME.js";import"./required-auth-layout-DLsc1xkw.js";import"./use-org-sso-BIqIcUQM.js";Ke({title:te().min(1),description:te().nullable(),body:te()});function oe(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function _t(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function Ot(s){const e=N.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let r;e[1]!==o.control?(r=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(se,{control:o.control,name:"title",render:Dt}),t.jsx(se,{control:o.control,name:"description",render:Rt})]})]}),e[1]=o.control,e[2]=r):r=e[2];let l,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=l,e[4]=a):(l=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[l,a,t.jsx(se,{control:o.control,name:"body",render:At})]}),e[5]=o.control,e[6]=c):c=e[6];let i;e[7]!==r||e[8]!==c?(i=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[r,c]}),e[7]=r,e[8]=c,e[9]=i):i=e[9];let x;return e[10]!==o||e[11]!==i?(x=t.jsx(tt,{...o,children:i}),e[10]=o,e[11]=i,e[12]=x):x=e[12],x}function At(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function Rt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Mt(s){const e=N.c(36),{providerId:o,promptId:n}=s,{org:r}=le(),l=o||null;let a;e[0]!==r.id||e[1]!==r.slug||e[2]!==l?(a={connectionId:l,orgId:r.id,orgSlug:r.slug},e[0]=r.id,e[1]=r.slug,e[2]=l,e[3]=a):a=e[3];const c=ce(a),i=et(o,"PROMPT",n,c),x=Ee(o,"PROMPT",c),f=x.update.isPending;let u;e[4]!==i?(u=i?{title:i.title,description:i.description??null,body:oe(i)}:void 0,e[4]=i,e[5]=u):u=e[5];let h;e[6]!==u?(h={values:u},e[6]=u,e[7]=h):h=e[7];const v=Ge(h);let T;e[8]!==v||e[9]!==i?(T=()=>{i&&v.reset({title:i.title,description:i.description??null,body:oe(i)})},e[8]=v,e[9]=i,e[10]=T):T=e[10];const _=T;let O;e[11]!==x.update||e[12]!==v||e[13]!==n?(O=v.handleSubmit(async j=>{const P=await x.update.mutateAsync({id:n,data:{title:j.title,description:j.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:j.body}}]}});v.reset({title:P.title,description:P.description??null,body:oe(P)})}),e[11]=x.update,e[12]=v,e[13]=n,e[14]=O):O=e[14];const A=O;if(!i){let j;return e[15]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Pe,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=j):j=e[15],j}let w;e[16]!==i.title?(w=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[16]=i.title,e[17]=w):w=e[17];let k;e[18]!==i.description?(k=i.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:i.description})]}):null,e[18]=i.description,e[19]=k):k=e[19];let I;e[20]!==w||e[21]!==k?(I=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[w,k]})}),e[20]=w,e[21]=k,e[22]=I):I=e[22];let g;e[23]!==A?(g=()=>{A()},e[23]=A,e[24]=g):g=e[24];let S;e[25]!==v.formState.isDirty||e[26]!==f||e[27]!==_||e[28]!==g?(S=t.jsx(st,{children:t.jsx(ot,{onSave:g,onUndo:_,isDirty:v.formState.isDirty,isSaving:f})}),e[25]=v.formState.isDirty,e[26]=f,e[27]=_,e[28]=g,e[29]=S):S=e[29];let y;e[30]!==v?(y=t.jsx("div",{className:"h-full",children:t.jsx(Ot,{form:v})}),e[30]=v,e[31]=y):y=e[31];let $;return e[32]!==S||e[33]!==y||e[34]!==I?($=t.jsxs(xe,{children:[I,S,y]}),e[32]=S,e[33]=y,e[34]=I,e[35]=$):$=e[35],$}function zt(s){const e=N.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=_t(),e[0]=n):n=e[0];const r=n;if(!r){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Pe,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let l;return e[2]!==o?(l=t.jsx(Te,{children:t.jsx(C.Suspense,{fallback:null,children:t.jsx(Mt,{providerId:r,promptId:o})})}),e[2]=o,e[3]=l):l=e[3],l}const Ut=Qe("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function Lt(s){const e=N.c(10);let o,n,r;e[0]!==s?({className:o,variant:r,...n}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);let l;e[4]!==o||e[5]!==r?(l=U(Ut({variant:r}),o),e[4]=o,e[5]=r,e[6]=l):l=e[6];let a;return e[7]!==n||e[8]!==l?(a=t.jsx("div",{"data-slot":"alert",role:"alert",className:l,...n}),e[7]=n,e[8]=l,e[9]=a):a=e[9],a}function Vt(s){const e=N.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("line-clamp-1 min-h-4 font-medium tracking-tight",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("div",{"data-slot":"alert-title",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Bt(s){const e=N.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("text-muted-foreground leading-relaxed",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("div",{"data-slot":"alert-description",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Ae(s){const e=N.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("min-w-0 overflow-hidden",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Re(s){const e=N.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("ol",{"data-slot":"breadcrumb-list",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function J(s){const e=N.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("li",{"data-slot":"breadcrumb-item",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function Q(s){const e=N.c(10);let o,n,r;e[0]!==s?({asChild:o,className:n,...r}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);const l=o?Xe:"a";let a;e[4]!==n?(a=U("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==l||e[7]!==r||e[8]!==a?(c=t.jsx(l,{"data-slot":"breadcrumb-link",className:a,...r}),e[6]=l,e[7]=r,e[8]=a,e[9]=c):c=e[9],c}function De(s){const e=N.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let r;e[3]!==o?(r=U("text-foreground font-medium truncate",o),e[3]=o,e[4]=r):r=e[4];let l;return e[5]!==n||e[6]!==r?(l=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:r,...n}),e[5]=n,e[6]=r,e[7]=l):l=e[7],l}function X(s){const e=N.c(12);let o,n,r;e[0]!==s?({children:o,className:n,...r}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=r):(o=e[1],n=e[2],r=e[3]);let l;e[4]!==n?(l=U("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=l):l=e[5];let a;e[6]!==o?(a=o??t.jsx(jt,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==r||e[9]!==l||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...r,children:a}),e[8]=r,e[9]=l,e[10]=a,e[11]=c):c=e[11],c}const Ft=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Jt(s){const e=N.c(11),{toolName:o,connectionId:n,siblings:r,onSelectInstance:l,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const i=St(c);if(!i.isAuthenticated){let u;return e[2]!==i.supportsOAuth||e[3]!==a?(u=t.jsx("div",{className:"flex h-full items-center justify-center",children:i.supportsOAuth?t.jsx(bt,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(Nt,{hasReadme:!1})}),e[2]=i.supportsOAuth,e[3]=a,e[4]=u):u=e[4],u}const x=`${n}:${o}`;let f;return e[5]!==n||e[6]!==l||e[7]!==r||e[8]!==x||e[9]!==o?(f=t.jsx(Wt,{toolName:o,connectionId:n,siblings:r,onSelectInstance:l},x),e[5]=n,e[6]=l,e[7]=r,e[8]=x,e[9]=o,e[10]=f):f=e[10],f}function Wt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:r}=Ye({strict:!1}),l=(()=>{if(!r)return null;const d=`replay-${r}`,m=sessionStorage.getItem(d);if(!m)return null;sessionStorage.removeItem(d);try{return JSON.parse(m)}catch{return null}})(),a=(()=>{if(!l)return null;const d={};for(const[m,b]of Object.entries(l))b!==null&&typeof b=="object"?d[m]=JSON.stringify(b,null,2):d[m]=b;return d})(),[c,i]=C.useState(a??{}),[x,f]=C.useState(l?JSON.stringify(l,null,2):"{}"),[u,h]=C.useState(null),[v,T]=C.useState(null),[_,O]=C.useState(null),[A,w]=C.useState(null),[k,I]=C.useState(!1),[g,S]=C.useState(null),{org:y}=le(),$=_e(e),j=It(),P=$t(),{setChatOpen:L}=Tt(),M=`${e}:${s}`,R=ce({connectionId:e,orgId:y.id,orgSlug:y.slug}),z=wt({client:R}),p=z.data?.tools?.find(d=>d.name===s),E=it(p?._meta),V=d=>{if(!j)return;const m=Ct(d.content);m.content.length>0&&(L(!0),j.sendMessage({tiptapDoc:m}))},[D,Y]=C.useState("json"),[Me,ze]=C.useState(!1);E&&!Me&&(Y("ui"),ze(!0));const pe=p?.inputSchema?.properties,fe=pe?Object.keys(pe):[],W=fe.length>0,H={};if(W&&p?.inputSchema?.properties)for(const d of fe)H[d]=p.inputSchema.required?.includes(d)?"":void 0;const Z=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{I(!0),w(null),h(null),T(null),O(null),S(null);const d=performance.now();try{if(!R)throw new Error("MCP client is not available");const m=W?{...H,...c}:(()=>{const B=x.trim();if(!B)return{};const F=JSON.parse(B);if(F&&typeof F=="object")return F;throw new Error("Raw JSON input must be an object.")})();W&&p?.inputSchema?.properties&&Object.entries(p.inputSchema.properties).forEach(([B,F])=>{if((F.type==="object"||F.type==="array")&&typeof m[B]=="string")try{m[B]=JSON.parse(m[B])}catch{}});const b=await R.callTool({name:s,arguments:m}),K=b.structuredContent??b,We=performance.now(),qe=Math.round(We-d);h(K),T(b),O(m);const He=JSON.stringify(K),ge=new TextEncoder().encode(He).length;S({duration:`${qe}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(m){const b=m instanceof Error?m.message:String(m);w(b||"Unknown error occurred");const K=performance.now();S({duration:`${Math.round(K-d)}ms`})}finally{I(!1)}},ee=(d,m)=>{i(b=>({...b,[d]:m}))},Le=()=>{h(null),T(null),O(null),w(null),S(null)},Ve=p?.name??Ft(s),Be=t.jsx(Ae,{children:t.jsxs(Re,{children:[t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:y.slug},children:"Connections"})})}),t.jsx(X,{}),$&&t.jsxs(t.Fragment,{children:[t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:y.slug,appSlug:vt($)},search:{tab:"tools"},children:$.title})})}),t.jsx(X,{})]}),t.jsx(J,{children:t.jsx(De,{children:Ve})})]})}),he=o.length>1&&t.jsxs(be,{value:e,onValueChange:n,children:[t.jsx(Ne,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ve,{})}),t.jsx(Se,{children:o.map(d=>t.jsx(ne,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx($e,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Fe=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),p?.inputSchema?.required&&p.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:W&&p?.inputSchema?.properties?Object.entries(p.inputSchema.properties).map(([d,m])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,p.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:m.type})]}),m.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:m.description}),m.type==="object"||m.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:Z(d)?c[d]??"":H[d]??"",onChange:b=>ee(d,b.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):m.type==="boolean"?t.jsxs(be,{value:Z(d)?String(c[d]??""):"",onValueChange:b=>ee(d,b==="true"),children:[t.jsx(Ne,{children:t.jsx(ve,{placeholder:"Select true or false..."})}),t.jsxs(Se,{children:[t.jsx(ne,{value:"true",children:"true"}),t.jsx(ne,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:Z(d)?c[d]??"":H[d]??"",onChange:b=>ee(d,b.target.value),placeholder:`Enter ${d}...`})]},d)):p?.inputSchema&&!W?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:d=>f(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:k?t.jsxs(q,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Le,children:[t.jsx(mt,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(q,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(gt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),Je=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[g&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.duration})]}),g.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(xt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.tokens})]}),g.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(pt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:g.bytes})]}),g.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:g.cost})})]}),E&&t.jsx(ct,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(ye,{children:[t.jsx(we,{asChild:!0,children:t.jsx(q,{size:"icon",variant:D==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Y("ui"),children:t.jsx(ft,{size:14})})}),t.jsx(Ce,{children:"Interactive view"})]}),t.jsxs(ye,{children:[t.jsx(we,{asChild:!0,children:t.jsx(q,{size:"icon",variant:D==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Y("json"),children:t.jsx(Ie,{size:14})})}),t.jsx(Ce,{children:"JSON view"})]})]})})]})]}),A&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(Lt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(dt,{className:"h-4 w-4"}),t.jsx(Vt,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(Bt,{className:"text-xs text-destructive",children:A})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:E&&D==="ui"&&R?t.jsx(C.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(at,{resourceURI:E,toolInfo:p?{tool:p}:void 0,toolInput:_??void 0,toolResult:v??void 0,displayMode:"fullscreen",minHeight:je.view.minHeight,maxHeight:je.view.maxHeight,client:R,onMessage:V,onUpdateModelContext:d=>P?.setAppContext(M,d),onTeardown:()=>P?.clearAppContext(M),className:"h-full"})}):u?t.jsxs(t.Fragment,{children:[t.jsx(kt,{code:JSON.stringify(u,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(q,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(u,null,2)),Ze.success("Copied to clipboard")},children:t.jsx(ht,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(Ie,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(xe,{breadcrumb:Be,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx($e,{icon:$?.icon||null,name:$?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[z.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):z.isLoading?t.jsx(ie,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:z.isSuccess?"ready":z.isLoading?"connecting":"error"})]}),t.jsx(yt,{annotations:p?.annotations,_meta:p?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:p?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Fe}),Je]})})]})})}function qt(s){const e=N.c(10),{itemId:o,siblings:n,onBack:r}=s,[l,a]=C.useState(n[0]?.id??"");let c;e[0]!==l||e[1]!==n?(c=n.find(h=>h.id===l)?.id??n[0]?.id??"",e[0]=l,e[1]=n,e[2]=c):c=e[2];const i=c;if(!_e(i||void 0)||!i){let h;return e[3]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=h):h=e[3],h}let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ie,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=f):f=e[4];let u;return e[5]!==i||e[6]!==r||e[7]!==n||e[8]!==o?(u=t.jsx(C.Suspense,{fallback:f,children:t.jsx(Jt,{toolName:o,connectionId:i,siblings:n,onSelectInstance:a,onBack:r})}),e[5]=i,e[6]=r,e[7]=n,e[8]=o,e[9]=u):u=e[9],u}const Ht={workflow:lt,workflow_execution:rt,prompt:zt};function Kt(){const s=N.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),r=decodeURIComponent(n.itemId);let l;s[1]!==n.appSlug?(l={slug:n.appSlug},s[1]=n.appSlug,s[2]=l):l=s[2];const a=Oe(l);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const i=c,x=Gt;let f;return s[5]!==i||s[6]!==r||s[7]!==a?(f=t.jsx(qt,{itemId:r,siblings:a,onBack:i,onUpdate:x}),s[5]=i,s[6]=r,s[7]=a,s[8]=f):f=s[8],f}async function Gt(s){return Promise.resolve()}function Qt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Xt(){const s=N.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),r=decodeURIComponent(n.collectionName),l=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:i}=le();let x;s[3]!==n.appSlug?(x={slug:n.appSlug},s[3]=n.appSlug,s[4]=x):x=s[4];const u=Oe(x)[0]??null,h=u?.id??"",v=h||"no-connection",T=h??null;let _;s[5]!==i.id||s[6]!==i.slug||s[7]!==T?(_={connectionId:T,orgId:i.id,orgSlug:i.slug},s[5]=i.id,s[6]=i.slug,s[7]=T,s[8]=_):_=s[8];const O=ce(_),A=Ee(v,r,O);let w;s[9]!==A||s[10]!==l?(w=async D=>{l&&await A.update.mutateAsync({id:l,data:D})},s[9]=A,s[10]=l,s[11]=w):w=s[11];const k=w;let I;s[12]!==r?(I=r?.toLowerCase(),s[12]=r,s[13]=I):I=s[13];const g=I,S=g&&Ht[g];let y;s[14]!==r?(y=Qt(r),s[14]=r,s[15]=y):y=s[15];const $=y;let j;s[16]!==i.slug?(j=t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:i.slug},children:"Connections"})})}),s[16]=i.slug,s[17]=j):j=s[17];let P;s[18]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(X,{}),s[18]=P):P=s[18];let L;s[19]!==r||s[20]!==u||s[21]!==i.slug||s[22]!==n.appSlug?(L=u&&t.jsxs(t.Fragment,{children:[t.jsx(J,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:n.appSlug},search:{tab:r},children:u.title})})}),t.jsx(X,{})]}),s[19]=r,s[20]=u,s[21]=i.slug,s[22]=n.appSlug,s[23]=L):L=s[23];let M;s[24]!==$?(M=t.jsx(J,{children:t.jsx(De,{children:$})}),s[24]=$,s[25]=M):M=s[25];let R;s[26]!==L||s[27]!==M||s[28]!==j?(R=t.jsx(Ae,{children:t.jsxs(Re,{children:[j,P,L,M]})}),s[26]=L,s[27]=M,s[28]=j,s[29]=R):R=s[29];const z=R;if(S){let D;return s[30]!==S||s[31]!==c||s[32]!==k||s[33]!==l?(D=t.jsx(S,{itemId:l,onBack:c,onUpdate:k}),s[30]=S,s[31]=c,s[32]=k,s[33]=l,s[34]=D):D=s[34],D}let p;s[35]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(Et,{size:36,className:"text-muted-foreground"}),s[35]=p):p=s[35];let E;s[36]!==c?(E=t.jsx(Pt,{icon:p,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=E):E=s[37];let V;return s[38]!==z||s[39]!==E?(V=t.jsx(xe,{breadcrumb:z,children:E}),s[38]=z,s[39]=E,s[40]=V):V=s[40],V}function Yt(){const s=N.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Kt,{}),s[1]=a):a=s[1],a}let l;return s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Xt,{}),s[2]=l):l=s[2],l}function kn(){const s=N.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Te,{children:t.jsx(C.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ie,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{kn as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as B,j as s,c as M,B as V}from"./index-Ux_PrmKm.js";import{c as z,a as _,b as $,D as E}from"./dropdown-menu-BXZVht4Z.js";import{i as L,n as O,b as R,d as A,c as F}from"./XClose-Ci4dmV-Y.js";import{i as S}from"./Check-a0FPGBtH.js";import{a as I,b as K,c as P,T as W}from"./tooltip-BOsmkVZD.js";import{V as q}from"./view-mode-toggle-_LNgXbfe.js";import{B as G}from"./badge-BWEc0v7O.js";function te(t){const e=B.c(31),{viewMode:r,onViewModeChange:m,sortKey:T,sortDirection:p,onSort:f,sortOptions:u,filters:h}=t;let g;e[0]!==u?(g=u===void 0?[]:u,e[0]=u,e[1]=g):g=e[1];const j=g;let b;e[2]!==h?(b=h===void 0?[]:h,e[2]=h,e[3]=b):b=e[3];const l=b;let v;e[4]!==l?(v=l.filter(J),e[4]=l,e[5]=v):v=e[5];const N=v.length;let w;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(R,{size:16}),e[6]=w):w=e[6];let i;e[7]!==N?(i=N>0&&s.jsx(G,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[7]=N,e[8]=i):i=e[8];let o;e[9]!==i?(o=s.jsx(I,{asChild:!0,children:s.jsx(_,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"icon",className:"relative",children:[w,i]})})}),e[9]=i,e[10]=o):o=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(K,{children:"Display & filters"}),e[11]=C):C=e[11];let n;e[12]!==o?(n=s.jsx(P,{children:s.jsxs(W,{children:[o,C]})}),e[12]=o,e[13]=n):n=e[13];let a;e[14]!==m||e[15]!==r?(a=m&&r&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:r,onValueChange:m,fullWidth:!0,options:[{value:"table",icon:s.jsx(A,{})},{value:"cards",icon:s.jsx(F,{})}]})}),e[14]=m,e[15]=r,e[16]=a):a=e[16];let c;e[17]!==f||e[18]!==p||e[19]!==T||e[20]!==j?(c=j.length>0&&f&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),j.map(y=>{const D=T===y.id;return s.jsx(z,{onClick:()=>f(y.id),className:M("h-8 px-2 py-0 cursor-pointer",D&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[D&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!D&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:y.label}),D&&p&&(p==="asc"?s.jsx(L,{size:16,className:"text-foreground shrink-0"}):s.jsx(O,{size:16,className:"text-foreground shrink-0"}))]})},y.id)})]}),e[17]=f,e[18]=p,e[19]=T,e[20]=j,e[21]=c):c=e[21];let d;e[22]!==l?(d=l.map(H),e[22]=l,e[23]=d):d=e[23];let x;e[24]!==a||e[25]!==c||e[26]!==d?(x=s.jsxs($,{align:"end",className:"w-[200px] p-0 gap-0",children:[a,c,d]}),e[24]=a,e[25]=c,e[26]=d,e[27]=x):x=e[27];let k;return e[28]!==n||e[29]!==x?(k=s.jsxs(E,{children:[n,x]}),e[28]=n,e[29]=x,e[30]=k):k=e[30],k}function H(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const r=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:M("h-8 px-2 py-0 cursor-pointer",r&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!r&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function J(t){return t.value!=="ALL"}export{te as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as v,c as b,j as n,l as w}from"./index-
|
|
1
|
+
import{e as v,c as b,j as n,l as w}from"./index-Ux_PrmKm.js";import{i as C}from"./SearchMd-OHnYTa8U.js";function S(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?n.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):n.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==d?(o=n.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=d,e[13]=o):o=e[13];let a;e[14]!==s||e[15]!==l||e[16]!==o?(a=n.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=n.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{S as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,bc as P,ao as Oe,e as En,c as Ot,j as Ne,l as Mn}from"./index-
|
|
1
|
+
import{r as c,bc as P,ao as Oe,e as En,c as Ot,j as Ne,l as Mn}from"./index-Ux_PrmKm.js";import{i as In}from"./SearchMd-OHnYTa8U.js";function An(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const tt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function we(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function bt(e){return"nodeType"in e}function B(e){var t,n;return e?we(e)?e:bt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function mt(e){const{Document:t}=B(e);return e instanceof t}function Fe(e){return we(e)?!1:e instanceof B(e).HTMLElement}function Kt(e){return e instanceof B(e).SVGElement}function ye(e){return e?we(e)?e.document:bt(e)?mt(e)?e:Fe(e)||Kt(e)?e.ownerDocument:document:document:document}const Q=tt?c.useLayoutEffect:c.useEffect;function wt(e){const t=c.useRef(e);return Q(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Nn(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ze(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function $e(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Je(e){const t=wt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function ft(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let ct={};function je(e,t){return c.useMemo(()=>{if(t)return t;const n=ct[e]==null?0:ct[e]+1;return ct[e]=n,e+"-"+n},[e,t])}function Ht(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,s)=>{const a=Object.entries(s);for(const[l,u]of a){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const me=Ht(1),Pe=Ht(-1);function On(e){return"clientX"in e&&"clientY"in e}function yt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function Tn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function ht(e){if(Tn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return On(e)?{x:e.clientX,y:e.clientY}:null}const _e=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[_e.Translate.toString(e),_e.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Tt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ln(e){return e.matches(Tt)?e:e.querySelector(Tt)}const kn={display:"none"};function zn(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:kn},n)}function Pn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Bn(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Vt=c.createContext(null);function Fn(e){const t=c.useContext(Vt);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function $n(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const jn={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as k,j as s,c as C}from"./index-
|
|
1
|
+
import{e as k,j as s,c as C}from"./index-Ux_PrmKm.js";import{e as S,d as R,a as T,T as H,b as L,c as z}from"./table-CBFs2U43.js";import{i as D,n as E}from"./XClose-Ci4dmV-Y.js";function I(y){const e=k.c(29),{columns:r,data:f,sortKey:x,sortDirection:u,onSort:i,onRowClick:n,rowClassName:c}=y;let p;e[0]!==u?(p=function(t,h){return s.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&u&&(u==="asc"?s.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):s.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=u,e[1]=p):p=e[1];const b=p;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=function(t,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return t===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=d):d=e[2];const a=d;let l;if(e[3]!==r||e[4]!==i||e[5]!==b||e[6]!==x){let o;e[8]!==r.length||e[9]!==i||e[10]!==b||e[11]!==x?(o=(t,h)=>{const N=x===t.id;return s.jsx(S,{className:C(a(h,r.length),"group transition-colors select-none",t.sortable&&"hover:bg-accent cursor-pointer",t.rowClassName,t.cellClassName),onClick:t.sortable&&i?()=>i(t.id):void 0,children:s.jsxs("span",{className:"flex items-center gap-1",children:[t.header,t.sortable&&b(t.id,N)]})},t.id)},e[8]=r.length,e[9]=i,e[10]=b,e[11]=x,e[12]=o):o=e[12],l=r.map(o),e[3]=r,e[4]=i,e[5]=b,e[6]=x,e[7]=l}else l=e[7];let g;e[13]!==l?(g=s.jsx(R,{className:"border-b-0",children:s.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:l})}),e[13]=l,e[14]=g):g=e[14];let j;if(e[15]!==r||e[16]!==f||e[17]!==n||e[18]!==c){let o;e[20]!==r||e[21]!==n||e[22]!==c?(o=(t,h)=>{const N=c?.(t);return s.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",n?"cursor-pointer":"",N),onClick:n?()=>n(t):void 0,children:r.map(m=>s.jsx(H,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:s.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(t):m.accessor?m.accessor(t):null})},m.id))},h)},e[20]=r,e[21]=n,e[22]=c,e[23]=o):o=e[23],j=f.map(o),e[15]=r,e[16]=f,e[17]=n,e[18]=c,e[19]=j}else j=e[19];let w;e[24]!==j?(w=s.jsx(L,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==g||e[27]!==w?(v=s.jsxs(z,{className:"w-full border-collapse",children:[g,w]}),e[26]=g,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(12),{columns:r,data:f,isLoading:x,sortKey:u,sortDirection:i,onSort:n,onRowClick:c,emptyState:p}=y;if(x===void 0?!1:x){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=a):a=e[0],a}if(f.length===0){let a;e[1]!==p?(a=p||s.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=p,e[2]=a):a=e[2];let l;return e[3]!==a?(l=s.jsx("div",{className:"flex items-center justify-center h-full",children:a}),e[3]=a,e[4]=l):l=e[4],l}let d;return e[5]!==r||e[6]!==f||e[7]!==c||e[8]!==n||e[9]!==i||e[10]!==u?(d=s.jsx("div",{className:"flex-1",children:s.jsx(I,{columns:r,data:f,sortKey:u,sortDirection:i,onSort:n,onRowClick:c})}),e[5]=r,e[6]=f,e[7]=c,e[8]=n,e[9]=i,e[10]=u,e[11]=d):d=e[11],d}export{B as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as f,c as u,j as m}from"./index-
|
|
1
|
+
import{e as f,c as u,j as m}from"./index-Ux_PrmKm.js";import{B as g}from"./badge-BWEc0v7O.js";function h(x){const e=f.c(12),{tabs:l,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==l){let c;e[6]!==n||e[7]!==s?(c=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=c):c=e[8],r=l.map(c),e[2]=n,e[3]=s,e[4]=l,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as t,J as i,aJ as p,ap as r,aK as a,bR as m,bl as h,I as c,a_ as b}from"./index-
|
|
1
|
+
import{H as t,J as i,aJ as p,ap as r,aK as a,bR as m,bl as h,I as c,a_ as b}from"./index-Ux_PrmKm.js";const N=t({id:i().describe("Unique identifier for the entity"),title:i().describe("Human-readable title for the entity"),description:i().nullish().describe("Description of the entity"),created_at:i().datetime(),updated_at:i().datetime(),created_by:i().optional(),updated_by:i().optional()}),f=t({field:a(i()),operator:r(["eq","gt","gte","lt","lte","in","like","contains"]),value:p()}),l=m(()=>h([f,t({operator:r(["and","or","not"]),conditions:a(l)})])),C=t({field:a(i()),direction:r(["asc","desc"]),nulls:r(["first","last"]).optional()}),S=t({where:l.optional().describe("Filter expression"),orderBy:a(C).optional().describe("Sort expressions"),limit:c().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),offset:c().int().min(0).optional().describe("Number of items to skip")});function O(e){return t({items:a(e).describe("Array of collection items"),totalCount:c().int().min(0).optional().describe("Total number of matching items (if available)"),hasMore:b().optional().describe("Whether there are more items available")})}const I=t({id:i().describe("ID of the entity to retrieve")});function y(e){return t({item:e.nullable().describe("The retrieved item, or null if not found")})}function E(e){return t({data:e.partial().describe("Data for the new entity (id may be auto-generated)")})}function _(e){return t({item:e.describe("The created entity with generated id")})}function T(e){return t({id:i().describe("ID of the entity to update"),data:e.partial().describe("Partial entity data to update")})}function L(e){return t({item:e.describe("The updated entity")})}const D=t({id:i().describe("ID of the entity to delete")});function g(e){return t({item:e.describe("The deleted entity")})}function v(e,n,u){const o=e.toUpperCase(),d=u?.readOnly??!1,s=[{name:`COLLECTION_${o}_LIST`,inputSchema:S,outputSchema:O(n)},{name:`COLLECTION_${o}_GET`,inputSchema:I,outputSchema:y(n)}];return d||s.push({name:`COLLECTION_${o}_CREATE`,inputSchema:E(n),outputSchema:_(n),opt:!0},{name:`COLLECTION_${o}_UPDATE`,inputSchema:T(n),outputSchema:L(n),opt:!0},{name:`COLLECTION_${o}_DELETE`,inputSchema:D,outputSchema:g(n),opt:!0}),s}export{N as B,v as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as r,c as m,j as n}from"./index-
|
|
1
|
+
import{e as r,c as m,j as n}from"./index-Ux_PrmKm.js";import{_ as d}from"./index-7DFELu7_.js";import{i}from"./SearchMd-OHnYTa8U.js";function x(l){const e=r.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 o;e[3]!==t?(o=m("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}function g(l){const e=r.c(9);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 o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(i,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let a;e[4]!==t?(a=m("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=a):a=e[5];let c;return e[6]!==s||e[7]!==a?(c=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(d.Input,{"data-slot":"command-input",className:a,...s})]}),e[6]=s,e[7]=a,e[8]=c):c=e[8],c}function h(l){const e=r.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 o;e[3]!==t?(o=m("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}function N(l){const e=r.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(d.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=r.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 o;e[3]!==t?(o=m("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}function b(l){const e=r.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 o;e[3]!==t?(o=m("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}function _(l){const e=r.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 o;e[3]!==t?(o=m("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==s||e[6]!==o?(a=n.jsx(d.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=a):a=e[7],a}export{N as C,v as a,_ as b,b as c,g as d,h as e,x as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as _}from"./connection-slug-eyAPH6o3.js";import{e as R,s as $,aH as k,K as D,c as E,j as x}from"./index-
|
|
1
|
+
import{g as _}from"./connection-slug-eyAPH6o3.js";import{e as R,s as $,aH as k,K as D,c as E,j as x}from"./index-Ux_PrmKm.js";import{u as K}from"./use-registry-connections-B1oBXsUK.js";import{a as H}from"./use-organization-settings-C-NHhw4n.js";import{S as w,c as Q}from"./constants-Ccnt3rmd.js";import{u as F}from"./useInfiniteQuery-BMlr4G1E.js";import{i as q,f as G}from"./extract-connection-data-BTJzhkiq.js";import{C as U}from"./card-mlKWkDqb.js";import{I as V}from"./integration-icon-Ov0IbIMU.js";function ae(s){const e=new Map;for(const o of s){const l=_(o),r=e.get(l);r?r.push(o):e.set(l,[o])}const t=[],u=new Set;for(const o of s){const l=_(o);if(u.has(l))continue;u.add(l);const r=e.get(l),m=r[0];r.length===1?t.push({type:"single",connection:m}):t.push({type:"group",key:l,icon:m.icon,title:m.app_name?m.title.replace(/\s*\(\d+\)\s*$/,""):m.title,connections:r})}return t}function ce(){const s=R.c(6),e=K(),t=H(),u=$().project.enabledPlugins??[];let o;if(s[0]!==u||s[1]!==t||s[2]!==e){let l;s[4]!==t?(l=r=>t(r.id),s[4]=t,s[5]=l):l=s[5],o=e.filter(l).map(X),u.includes("private-registry")&&t(w)&&o.push({id:w,title:"Private Registry",icon:null}),s[0]=u,s[1]=t,s[2]=e,s[3]=o}else o=s[3];return o}function X(s){return{id:s.id,title:s.title,icon:s.icon}}const Y=24,S=3;function A(s){return s.id.includes("community-registry")}function z(s){const e=s?.trim();if(e)return{operator:"or",conditions:[{field:["title"],operator:"contains",value:e},{field:["description"],operator:"contains",value:e},{field:["name"],operator:"contains",value:e},{field:["server","title"],operator:"contains",value:e}]}}function T(s,e,t,u,o){const l=s.map(c=>c.id).sort().join(","),r=z(o),{data:m,fetchNextPage:d,hasNextPage:f,isFetchingNextPage:p,isLoading:P}=F({queryKey:D.storeDiscovery(e,`${l}:${o??""}`),queryFn:async({pageParam:c})=>{const n=c??{};return await Promise.all(s.map(async i=>{const y=n[i.id];if(y==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const j=q(i.id,e);let h;for(let v=0;v<S;v++){let C=null;try{C=await Q({connectionId:i.id,orgId:e,orgSlug:t});const I={limit:Y};y&&(I.cursor=y),r&&(I.where=r);const b=await C.callTool({name:j,arguments:I}),N=b.structuredContent??b,M=N.nextCursor||N.cursor||void 0,L=G(N?[N]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:L,nextCursor:M}}catch(I){h=I}finally{await C?.close().catch(()=>{})}}return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${S} attempts:`,h),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}))},initialPageParam:{},getNextPageParam:c=>{const n={};let a=!1;for(const i of c)i.registryId&&(i.nextCursor?(n[i.registryId]=i.nextCursor,a=!0):n[i.registryId]="EXHAUSTED");return a?n:void 0},staleTime:3600*1e3,placeholderData:k,retry:!1,enabled:s.length>0}),g=[];if(m?.pages)for(const c of m.pages)for(const n of c)for(const a of n.items)g.push({...a,_sourceName:a._sourceName??n.registryTitle,_sourceIcon:a._sourceIcon??n.registryIcon,_registryId:a._registryId??n.registryId});return{items:g,hasMore:f??!1,isLoadingMore:p,isInitialLoading:P,fetchNextPage:()=>{f&&!p&&d()}}}function ue(s,e){const t=R.c(16),{org:u}=$();let o;t[0]!==s?(o=s.filter(Z),t[0]=s,t[1]=o):o=t[1];const l=o;let r;t[2]!==s?(r=s.filter(W),t[2]=s,t[3]=r):r=t[3];const m=r,d=T(l,u.id,u.slug,!0,e),f=T(m,u.id,u.slug,!0,e);let p;if(t[4]!==f.items||t[5]!==d.items){const y=new Set;p=[];const j=[...d.items,...f.items];for(const h of j){const v=`${h._registryId}:${h.id}`;y.has(v)||(y.add(v),p.push(h))}t[4]=f.items,t[5]=d.items,t[6]=p}else p=t[6];const P=d.isInitialLoading||f.isInitialLoading,g=d.isLoadingMore||f.isLoadingMore,c=d.hasMore||f.hasMore;let n;t[7]!==f||t[8]!==d?(n=()=>{d.hasMore&&d.fetchNextPage(),f.hasMore&&f.fetchNextPage()},t[7]=f,t[8]=d,t[9]=n):n=t[9];const a=n;let i;return t[10]!==c||t[11]!==P||t[12]!==g||t[13]!==p||t[14]!==a?(i={items:p,hasMore:c,isLoadingMore:g,isInitialLoading:P,loadMore:a},t[10]=c,t[11]=P,t[12]=g,t[13]=p,t[14]=a,t[15]=i):i=t[15],i}function W(s){return A(s)}function Z(s){return!A(s)}function fe(s){const e=R.c(37),{connection:t,onClick:u,headerActions:o,headerActionsAlwaysVisible:l,body:r,footer:m,className:d,fallbackIcon:f}=s,p=l===void 0?!1:l,P=u&&"hover:bg-muted/50";let g;e[0]!==d||e[1]!==P?(g=E("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",P,d),e[0]=d,e[1]=P,e[2]=g):g=e[2];let c;e[3]!==t.icon||e[4]!==t.title||e[5]!==f?(c=x.jsx(V,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[3]=t.icon,e[4]=t.title,e[5]=f,e[6]=c):c=e[6];let n;e[7]!==o||e[8]!==p?(n=o&&x.jsx("div",{className:E("transition-opacity",!p&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:J,children:o}),e[7]=o,e[8]=p,e[9]=n):n=e[9];let a;e[10]!==n?(a=x.jsx("div",{className:"relative",children:n}),e[10]=n,e[11]=a):a=e[11];let i;e[12]!==c||e[13]!==a?(i=x.jsxs("div",{className:"flex items-start justify-between",children:[c,a]}),e[12]=c,e[13]=a,e[14]=i):i=e[14];let y;e[15]!==t.title?(y=x.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=y):y=e[16];const j=t.description||"No description";let h;e[17]!==j?(h=x.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j}),e[17]=j,e[18]=h):h=e[18];let v;e[19]!==h||e[20]!==y?(v=x.jsxs("div",{className:"flex flex-col gap-1",children:[y,h]}),e[19]=h,e[20]=y,e[21]=v):v=e[21];let C;e[22]!==r?(C=r&&x.jsx("div",{children:r}),e[22]=r,e[23]=C):C=e[23];let I;e[24]!==v||e[25]!==C||e[26]!==i?(I=x.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,v,C]}),e[24]=v,e[25]=C,e[26]=i,e[27]=I):I=e[27];let b;e[28]!==m?(b=m&&x.jsx("div",{className:"border-t border-border mt-auto",children:x.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:B,children:m})}),e[28]=m,e[29]=b):b=e[29];let N;e[30]!==I||e[31]!==b?(N=x.jsxs("div",{className:"flex flex-col flex-1",children:[I,b]}),e[30]=I,e[31]=b,e[32]=N):N=e[32];let M;return e[33]!==u||e[34]!==N||e[35]!==g?(M=x.jsx(U,{className:g,onClick:u,children:N}),e[33]=u,e[34]=N,e[35]=g,e[36]=M):M=e[36],M}function B(s){return s.stopPropagation()}function J(s){return s.stopPropagation()}export{fe as C,ue as a,ae as g,ce as u};
|