decocms 4.393.1 → 4.393.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-CAZCGIym.js → AlertCircle-Bw5IjQll.js} +1 -1
- package/dist/client/assets/{AreaChart-csHp4l4h.js → AreaChart-CoImiSZ8.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CqVRyVC4.js → ArrowLeft-o7Y-fEOP.js} +1 -1
- package/dist/client/assets/{ArrowRight-CN5fIGvW.js → ArrowRight-B9KOH6Mp.js} +1 -1
- package/dist/client/assets/{ArrowUp-B0NBLEx_.js → ArrowUp-siSqnojJ.js} +1 -1
- package/dist/client/assets/{CartesianChart-BeQ1BVpH.js → CartesianChart-B_oczkwR.js} +1 -1
- package/dist/client/assets/{Check-osjC9XAT.js → Check-UJc6KAi4.js} +1 -1
- package/dist/client/assets/{CheckCircle-BQVXo8SX.js → CheckCircle-BMHJHOxj.js} +1 -1
- package/dist/client/assets/{ChevronUp-CWFKBmTR.js → ChevronUp-BfOf-CcT.js} +1 -1
- package/dist/client/assets/{Copy01-C3qedNFV.js → Copy01-jqAaecgQ.js} +1 -1
- package/dist/client/assets/{CreditCard01-X_bLShoe.js → CreditCard01-CTgYXlxC.js} +1 -1
- package/dist/client/assets/{DotsVertical-WjgV6Sz3.js → DotsVertical-DtamlI3j.js} +1 -1
- package/dist/client/assets/{Download01-BxpFiQae.js → Download01-BncQoTgS.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-DAk7EcDA.js → ErrorBarContext-BO0Qz3lQ.js} +1 -1
- package/dist/client/assets/{Eye-ClOyTajV.js → Eye-B7WWrfVK.js} +1 -1
- package/dist/client/assets/{Globe04-kFsTYMZt.js → Globe04-CvitSAdn.js} +1 -1
- package/dist/client/assets/{Image01-CZ5ChEda.js → Image01-BcdinLnP.js} +1 -1
- package/dist/client/assets/{Key01-B8Wj8PkA.js → Key01-DfBLIcDO.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BQilm9GH.js → LayoutLeft-fyXbrdze.js} +1 -1
- package/dist/client/assets/{Line-BNKFz7ks.js → Line-Bve7YiyC.js} +1 -1
- package/dist/client/assets/{Link01-DUz2pQNV.js → Link01-CUNNOfMo.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CvuOMgs8.js → LinkExternal01-CjlXJ8JK.js} +1 -1
- package/dist/client/assets/{Monitor01-CCsQ-B6D.js → Monitor01-Bgx96mK1.js} +1 -1
- package/dist/client/assets/{Package-Cm2wb2c_.js → Package-CCyqVpLL.js} +1 -1
- package/dist/client/assets/{Palette-BSBAE3IQ.js → Palette-uwPl9fbG.js} +1 -1
- package/dist/client/assets/{Plus-WfTftgTi.js → Plus-DVO5ynNJ.js} +1 -1
- package/dist/client/assets/{SearchLg-CMx4kSga.js → SearchLg-BuXTAvmm.js} +1 -1
- package/dist/client/assets/{SearchMd-Deh4spzU.js → SearchMd-4YJlY5kp.js} +1 -1
- package/dist/client/assets/{Sector-DIzARH0M.js → Sector-C0TyewPL.js} +1 -1
- package/dist/client/assets/{Share07-B-CaWtRk.js → Share07-slK9gs7d.js} +1 -1
- package/dist/client/assets/{Stars01-CIfg88Aw.js → Stars01-BHCqXxdF.js} +1 -1
- package/dist/client/assets/{Sun-BeEVq7FM.js → Sun-CD9h4ghg.js} +1 -1
- package/dist/client/assets/{Tool01-DXV90eZp.js → Tool01-BGKWFxqT.js} +1 -1
- package/dist/client/assets/{Trash01-CKvnXwav.js → Trash01-elTVICGJ.js} +1 -1
- package/dist/client/assets/{Upload01-ChdQ8FAD.js → Upload01-C_pNo17d.js} +1 -1
- package/dist/client/assets/{User01-CPMi0clz.js → User01-A5ycKGmZ.js} +1 -1
- package/dist/client/assets/{UserSquare-C9kzzswT.js → UserSquare-CjWcARYJ.js} +1 -1
- package/dist/client/assets/{Users01-q9yK0HY-.js → Users01-CYLXmuWv.js} +1 -1
- package/dist/client/assets/{X-XbUtFT5N.js → X-DfL64JB-.js} +1 -1
- package/dist/client/assets/{XCircle-BrmD7rCp.js → XCircle-Cn_6vXwx.js} +1 -1
- package/dist/client/assets/{XClose-D7CZc-Y8.js → XClose-B001-Pfs.js} +1 -1
- package/dist/client/assets/{Zap-OydN7TCA.js → Zap-vgIAjKVr.js} +1 -1
- package/dist/client/assets/{ZoomOut-DHONvuYn.js → ZoomOut-DckCENcg.js} +1 -1
- package/dist/client/assets/{access-gate-DzUD_Rz8.js → access-gate-0Jk-hZos.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-rVwaJ1no.js → add-connection-dialog-CXhnysPD.js} +1 -1
- package/dist/client/assets/{agent-analytics-CdhgHttW.js → agent-analytics-BhYprSIO.js} +1 -1
- package/dist/client/assets/agent-app-DVQdsoCP.js +1 -0
- package/dist/client/assets/{agent-assets-a6vAQUAU.js → agent-assets-CS42OR4f.js} +1 -1
- package/dist/client/assets/{agent-automation-CvrmRmKp.js → agent-automation-D1d7OJUi.js} +1 -1
- package/dist/client/assets/{agent-automations-BzM17hCZ.js → agent-automations-CbaldEol.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-CxAeBbTS.js → agent-connect-sources-zJfGAKvI.js} +1 -1
- package/dist/client/assets/agent-deck-DwkEMcun.js +1 -0
- package/dist/client/assets/{agent-e2e-BP835YP5.js → agent-e2e-BqhXL_2D.js} +1 -1
- package/dist/client/assets/{agent-experiments-DgNmITWp.js → agent-experiments-D0OMBW0K.js} +1 -1
- package/dist/client/assets/agent-file-kb3kZGOR.js +1 -0
- package/dist/client/assets/{agent-git-Dt-lR7q1.js → agent-git-oYCjVN4D.js} +1 -1
- package/dist/client/assets/{agent-hosting-q-td_9QW.js → agent-hosting-DYUWky5K.js} +1 -1
- package/dist/client/assets/{agent-icon-DpnWPizr.js → agent-icon-zd22KZWY.js} +1 -1
- package/dist/client/assets/agent-library-file-B26RhOf0.js +1 -0
- package/dist/client/assets/{agent-monitor-CP4F0vIz.js → agent-monitor-ByQaXaRH.js} +1 -1
- package/dist/client/assets/{agent-overview-DxHPryIY.js → agent-overview-DIOaHJov.js} +1 -1
- package/dist/client/assets/agent-settings-BQ_MplXY.js +1 -0
- package/dist/client/assets/{agent-site-editor-Dal_nhq0.js → agent-site-editor-ZmxLibT8.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-DY_zO3AJ.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-C1bZZXyB.js → agent-site-editor-content-DRt9vlIp.js} +3 -3
- package/dist/client/assets/{agent-site-editor-preview-CbgEmJVs.js → agent-site-editor-preview-7Z9SMUI4.js} +3 -3
- package/dist/client/assets/agent-view-BpAqFgTh.js +1 -0
- package/dist/client/assets/{agent-view-guard-BuO6alvH.js → agent-view-guard-B9HgiZ1B.js} +1 -1
- package/dist/client/assets/{agents-list-xeT8iHfY.js → agents-list-DG9VPQx9.js} +1 -1
- package/dist/client/assets/{ai-providers-F48YOClz.js → ai-providers-0H-9yOOS.js} +1 -1
- package/dist/client/assets/{alert-Cv4YsoTB.js → alert-Buf9oiWa.js} +1 -1
- package/dist/client/assets/{alert-dialog-BGNyf8_T.js → alert-dialog-DG5_wKgz.js} +1 -1
- package/dist/client/assets/api-keys-DbPrfCxe.js +1 -0
- package/dist/client/assets/{api-keys-BIOBkExB.js → api-keys-DcivUdvJ.js} +1 -1
- package/dist/client/assets/app-editor-DuO1pc7m.js +1 -0
- package/dist/client/assets/{asset-utils-B19bt1ML.js → asset-utils-C3onDFgi.js} +1 -1
- package/dist/client/assets/{auth-BdTqkjKW.js → auth-53fyYgiO.js} +1 -1
- package/dist/client/assets/{auth-catchall-DFuU0nWY.js → auth-catchall-DMZWFewT.js} +1 -1
- package/dist/client/assets/{auth-entry-DPaQtFVO.js → auth-entry-CFGe0IMr.js} +1 -1
- package/dist/client/assets/{auth-split-layout-CtHsmnha.js → auth-split-layout-wTIwUQun.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DfHeo6XU.js → authenticate-and-persist-oauth-l6FFkSS7.js} +1 -1
- package/dist/client/assets/{automation-list-row-B5bdsRlJ.js → automation-list-row-DhjFlSDJ.js} +1 -1
- package/dist/client/assets/{automation-runs-B5LbdxJK.js → automation-runs-mbixKpuo.js} +1 -1
- package/dist/client/assets/{automations-BSR-wDw5.js → automations-CTADvQov.js} +1 -1
- package/dist/client/assets/{autosend-C5CH8Kv_.js → autosend-DAAxKqft.js} +1 -1
- package/dist/client/assets/{avatar-BuBijS2t.js → avatar-DfT409hq.js} +1 -1
- package/dist/client/assets/{badge-BNQNKg0b.js → badge-CbxyjOGk.js} +1 -1
- package/dist/client/assets/{block-document-DORiAwbc.js → block-document-DbC1itU8.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-DwATmEux.js → blocks-preview-workspace-context-B1GaYQuE.js} +1 -1
- package/dist/client/assets/{breadcrumb-QjE9J74b.js → breadcrumb-DHQJNhJR.js} +1 -1
- package/dist/client/assets/{buckets-B_85RYP6.js → buckets-4eM8JDqA.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BCV2VvlA.js → build-improve-prompt-doc-B9GRKFtg.js} +1 -1
- package/dist/client/assets/{calendar-CfVU54EG.js → calendar-BARhOOLs.js} +1 -1
- package/dist/client/assets/{capability-load-error-CbJ9ZzCB.js → capability-load-error-ULojqFhh.js} +1 -1
- package/dist/client/assets/{category-editor-piRWLx2t.js → category-editor-Ci_lv1Kn.js} +1 -1
- package/dist/client/assets/{chart-Cro1YyeH.js → chart-B51bLH2f.js} +1 -1
- package/dist/client/assets/{chat-context-C11mERBr.js → chat-context-Biuolo5l.js} +1 -1
- package/dist/client/assets/{chat-draft-Cdyy_ZaJ.js → chat-draft-DVuLPy-j.js} +1 -1
- package/dist/client/assets/{checkbox-tEVfKex5.js → checkbox-wlUWF7hx.js} +1 -1
- package/dist/client/assets/{choose-editor-BzW1X_Gx.js → choose-editor-CfaxqMkO.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-CBbywr-E.js → claim-phase-copy-CCRVAHif.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Da2JmnRU.js → cli-auth-success-CP3p1uvq.js} +1 -1
- package/dist/client/assets/{client-icons-Ccs-iuPw.js → client-icons-BR1lKQvc.js} +1 -1
- package/dist/client/assets/{collapsible-DePYhMBn.js → collapsible-CNrrD80N.js} +1 -1
- package/dist/client/assets/{collection-detail-BhtO5G9E.js → collection-detail-DlQAEEKO.js} +1 -1
- package/dist/client/assets/{collection-display-button-DIAK9YZL.js → collection-display-button-CYn3y4wE.js} +1 -1
- package/dist/client/assets/{collection-search-tlAk0D2T.js → collection-search-eq8Jx08C.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CrfE5X7q.js → collection-table-wrapper-UUqdFF6D.js} +1 -1
- package/dist/client/assets/{collection-tabs-48AXMZkw.js → collection-tabs-DOg1wSrf.js} +1 -1
- package/dist/client/assets/{combobox-g3qBIFHm.js → combobox-DjacBfQl.js} +1 -1
- package/dist/client/assets/{command-C-r5sx5V.js → command-fcrvAs5N.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-DMw9QL7t.js → companion-mcps-section-BUgcQwu4.js} +1 -1
- package/dist/client/assets/{connect-COIxgZeh.js → connect-CXE8VD1-.js} +1 -1
- package/dist/client/assets/{connect-layout-DLMD9wkO.js → connect-layout-we_wWtwn.js} +1 -1
- package/dist/client/assets/{connection-CNU7MCMV.js → connection-N1n0cOU1.js} +1 -1
- package/dist/client/assets/{connection-card-D376cueq.js → connection-card-CimJ0_Nn.js} +1 -1
- package/dist/client/assets/{connection-detail-CToAiBOE.js → connection-detail-DvIWvhqF.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CaCe-22s.js → connection-form-helpers-B3f1xsmc.js} +1 -1
- package/dist/client/assets/{connections-CJeS1gEN.js → connections-3TDgqTMn.js} +1 -1
- package/dist/client/assets/{context-Bm8sNWBn.js → context-CebZ2Cct.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CWwz-e0D.js → create-organization-dialog-BdCFwYq9.js} +1 -1
- package/dist/client/assets/{decofile-api-CMt-Sefg.js → decofile-api-CPs_PsP6.js} +1 -1
- package/dist/client/assets/{decopilot-Dbmw_-Dy.js → decopilot-4O7tybPz.js} +1 -1
- package/dist/client/assets/{dialog-Dt_E9wmY.js → dialog-Fq0nM2c3.js} +1 -1
- package/dist/client/assets/{discover-CYGnXa5J.js → discover-BU5y4Bvv.js} +1 -1
- package/dist/client/assets/{domain-settings-UxT7otZT.js → domain-settings-BDx0Eb04.js} +1 -1
- package/dist/client/assets/{download-app-dialog-BSZH45AW.js → download-app-dialog-B3AxYOeQ.js} +1 -1
- package/dist/client/assets/{drawer-Bo2lykGg.js → drawer-BUmwqcdF.js} +1 -1
- package/dist/client/assets/{editor-DY0gniQ0.js → editor-DWYOPm_Z.js} +1 -1
- package/dist/client/assets/{empty-state-B2SpKzDm.js → empty-state-gX-Wv4YC.js} +1 -1
- package/dist/client/assets/{empty-state-CDUe3tn0.js → empty-state-yvdmqB8T.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CnfKRYNf.js → extract-connection-data-BOVjMhIV.js} +1 -1
- package/dist/client/assets/{feature-gate-CvSWEnli.js → feature-gate-CRsogGiy.js} +1 -1
- package/dist/client/assets/{feature-paywall-CGvloST1.js → feature-paywall-CEyVPyUB.js} +1 -1
- package/dist/client/assets/{file-explorer-DYEIQQxw.js → file-explorer-Bspsi2W2.js} +1 -1
- package/dist/client/assets/{file-preview-CeR2xF4M.js → file-preview-AD_9B9zi.js} +1 -1
- package/dist/client/assets/{file-share-button-UbrO25iu.js → file-share-button-DkWghzVW.js} +1 -1
- package/dist/client/assets/{file-type-icon-BAcJ-gRp.js → file-type-icon-Ba6U7kMI.js} +1 -1
- package/dist/client/assets/{folder-icon-_yCMhmLN.js → folder-icon-DaSOqQDi.js} +1 -1
- package/dist/client/assets/{form-Bz-Keo7k.js → form-DwboDCoC.js} +1 -1
- package/dist/client/assets/{gateway-client-D5k7zcJK.js → gateway-client-U-aebFOp.js} +1 -1
- package/dist/client/assets/{general-BbSSEjJq.js → general-Bu1PxERY.js} +1 -1
- package/dist/client/assets/{github-icon-B8T9fbHW.js → github-icon-Bczff7w9.js} +1 -1
- package/dist/client/assets/{home-B6A_KWPD.js → home-CCdzOU8E.js} +1 -1
- package/dist/client/assets/{hooks-BKcgVPwe.js → hooks-AXSBDhcZ.js} +1 -1
- package/dist/client/assets/{icon-button-BcW9XgoS.js → icon-button-DN7NI2o6.js} +1 -1
- package/dist/client/assets/{index-BR8i50YQ.js → index-8CYOhgaG.js} +1 -1
- package/dist/client/assets/{index-lzir6TXP.js → index-B0qklDzl.js} +1 -1
- package/dist/client/assets/{index-DouGIYci.js → index-BDb83FE4.js} +1 -1
- package/dist/client/assets/{index-bfAPcQJQ.js → index-BMy4NaZ7.js} +1 -1
- package/dist/client/assets/{index-Bmbp3xBS.js → index-BQxAqOiP.js} +1 -1
- package/dist/client/assets/{index-DdFj8Xwq.js → index-Bry0pxcS.js} +1 -1
- package/dist/client/assets/{index-DQParzZ4.js → index-C-DpAA_l.js} +1 -1
- package/dist/client/assets/{index-D-16c9sJ.js → index-C9q3x3zt.js} +1 -1
- package/dist/client/assets/{index-DcM0fnrE.js → index-CBBWa_aS.js} +1 -1
- package/dist/client/assets/{index-LPyqg8-3.js → index-CCj1WqkC.js} +1 -1
- package/dist/client/assets/{index-CzbeZwh3.js → index-CDlZjUqm.js} +1 -1
- package/dist/client/assets/{index-9uj_-gJ4.js → index-ClatepTO.js} +1 -1
- package/dist/client/assets/{index-CcdwM6i1.js → index-D8J5Sxky.js} +1 -1
- package/dist/client/assets/{index-Bv7m6pZJ.js → index-jpNIlPuy.js} +2 -2
- package/dist/client/assets/{index-redirect-DWm8xJA-.js → index-redirect-C6u8gj-W.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-D1sRgsQJ.js → infiniteQueryObserver-Bh_fjXey.js} +1 -1
- package/dist/client/assets/{infra-billing-CUSjhFVd.js → infra-billing-CSgHD_R2.js} +1 -1
- package/dist/client/assets/{input-CyVfmTFZ.js → input-AEl9FaSr.js} +1 -1
- package/dist/client/assets/{input-D07U23f5.js → input-B1-dAf6o.js} +1 -1
- package/dist/client/assets/{input-CHrUn7HF.js → input-CxmpW7Ek.js} +1 -1
- package/dist/client/assets/{integration-icon-BALP9e7t.js → integration-icon-D86q1Lsj.js} +1 -1
- package/dist/client/assets/{label-C7LXwY4c.js → label-oK9z5afE.js} +1 -1
- package/dist/client/assets/{last-preview-page-Br-qo0JQ.js → last-preview-page-BZ6mQEgl.js} +1 -1
- package/dist/client/assets/{layout-mQgMx3D0.js → layout-rWWMXjrM.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-GsVPRazb.js → legacy-agents-deep-D75KaBzt.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-CFsTS2Yt.js → legacy-main-redirect-BYmbBZTf.js} +1 -1
- package/dist/client/assets/{library-DZfo1ill.js → library-LbSkWNn5.js} +1 -1
- package/dist/client/assets/{login-Bx_G-ZfM.js → login-C5K6zPK9.js} +1 -1
- package/dist/client/assets/{markdown-UrG1OUwx.js → markdown-DewRRxkR.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-D6yOnt3X.js → mcp-app-renderer-B8WWFBjV.js} +1 -1
- package/dist/client/assets/{mcp-oauth-7y-TBSgg.js → mcp-oauth-DF-3wjVL.js} +1 -1
- package/dist/client/assets/{members-KYY24wBr.js → members-gpZjw-0e.js} +1 -1
- package/dist/client/assets/{message-templates-C4q0pMiN.js → message-templates-CGvvfznj.js} +1 -1
- package/dist/client/assets/{mini-report-page-B36HzYKH.js → mini-report-page-B18w4HJM.js} +1 -1
- package/dist/client/assets/{mock-board-B8mPRdKv.js → mock-board-PHDWZ5Rj.js} +3 -3
- package/dist/client/assets/{monaco-editor-CLoQO8ua.js → monaco-editor-1VDRMi5Z.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Dz2Z5Leg.js → monitoring-stats-row-BTHr4fZ5.js} +1 -1
- package/dist/client/assets/{multi-select-BQEJMcpt.js → multi-select-_hBjuZhJ.js} +1 -1
- package/dist/client/assets/{mustache-BBPquBDn.js → mustache-qkuFcNLb.js} +1 -1
- package/dist/client/assets/{oauth-callback-EFwcXKm-.js → oauth-callback-B1Uai9y4.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BqaIKxHZ.js → oauth-callback-ai-provider-glRwYBh0.js} +1 -1
- package/dist/client/assets/{onboarding-BuTjRMnK.js → onboarding-DDANr9IQ.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-Bp5keE3H.js → optimistic-project-sidebar-views-DMA4YBZs.js} +1 -1
- package/dist/client/assets/{org-file-open-context-DHpNV-Za.js → org-file-open-context-CcPURBkR.js} +1 -1
- package/dist/client/assets/{organization-choice-C88iEhc9.js → organization-choice-q4iDzxaT.js} +1 -1
- package/dist/client/assets/{orgs-VjsNpb3l.js → orgs-B2MwX22p.js} +1 -1
- package/dist/client/assets/{page-seo-form-DxijkNF3.js → page-seo-form-DPxJXv8-.js} +1 -1
- package/dist/client/assets/{pair-DkCaPZGG.js → pair-C60j_huQ.js} +1 -1
- package/dist/client/assets/{plan-ladder-B7BHKanR.js → plan-ladder-DiEGIMNA.js} +1 -1
- package/dist/client/assets/{popover-BVDv_qcw.js → popover-Ddu4iAPr.js} +1 -1
- package/dist/client/assets/{post-calendar-DlgaB_mv.js → post-calendar-DmX3brDp.js} +1 -1
- package/dist/client/assets/{post-editor-Dg0XPKjI.js → post-editor-DDpQa9aK.js} +1 -1
- package/dist/client/assets/{preview-content-BGVXSIuy.js → preview-content-nP7rYoVp.js} +1 -1
- package/dist/client/assets/{preview-dialog-mvYZITqK.js → preview-dialog-DVTbqSrZ.js} +1 -1
- package/dist/client/assets/{profile-DnuPEuMr.js → profile-DH86JppE.js} +1 -1
- package/dist/client/assets/{project-app-view-Bm7ebFhY.js → project-app-view-D1ahOteG.js} +1 -1
- package/dist/client/assets/{project-feed-C8MYxRQr.js → project-feed-DcdY9b8p.js} +1 -1
- package/dist/client/assets/{project-icon-DfGWWram.js → project-icon-CE-voYeF.js} +1 -1
- package/dist/client/assets/project-reports-BORRGsRz.js +1 -0
- package/dist/client/assets/project-tasks-CRStWfOr.js +1 -0
- package/dist/client/assets/{prompts-CcbY66hh.js → prompts-B0m81b-P.js} +1 -1
- package/dist/client/assets/record-editor-DB5V4dOD.js +1 -0
- package/dist/client/assets/{redirect-editor-DAZz80-W.js → redirect-editor-BxGeAe1m.js} +1 -1
- package/dist/client/assets/{reports-s0iM3bai.js → reports-BGuoAK-j.js} +1 -1
- package/dist/client/assets/reports-bnYiC_GO.js +1 -0
- package/dist/client/assets/{reports-onboarding-B7TG-bDs.js → reports-onboarding-BSr5xqLY.js} +1 -1
- package/dist/client/assets/{reports-tab-CM14iFQ4.js → reports-tab-Dv1b1trN.js} +2 -2
- package/dist/client/assets/{repositories-D76jdZGS.js → repositories-DhDdUI7t.js} +1 -1
- package/dist/client/assets/{repository-import-picker-D63E_FEB.js → repository-import-picker-DQ2X5vYR.js} +1 -1
- package/dist/client/assets/{repository-picker-Ilzy9Kv8.js → repository-picker-DuUqRm8X.js} +1 -1
- package/dist/client/assets/{require-capability-C0MD5CDU.js → require-capability-DbxXicMT.js} +1 -1
- package/dist/client/assets/{required-auth-layout-D8RoPgqo.js → required-auth-layout-nM5VBqDv.js} +1 -1
- package/dist/client/assets/{reset-password-CRhea7-u.js → reset-password-B9WOYVDd.js} +1 -1
- package/dist/client/assets/{resizable-CEPHaLdf.js → resizable-BAWWm2nK.js} +1 -1
- package/dist/client/assets/{review-settings-CfN-lmLA.js → review-settings-BGS7uQ6I.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-CivqII9W.js → rich-text-link-control-Bdhpb3Zg.js} +1 -1
- package/dist/client/assets/{roles-D7xhHY5g.js → roles-V5JoTuaT.js} +1 -1
- package/dist/client/assets/{route-BsEMFU2I.js → route-BqHCYCsv.js} +1 -1
- package/dist/client/assets/{route-CFJ0YCVD.js → route-DjwL1Fx5.js} +1 -1
- package/dist/client/assets/{route-DykpJaTp.js → route-ZOU_9LwH.js} +1 -1
- package/dist/client/assets/{route-page-header-D0xiRjXr.js → route-page-header-BpBVey10.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-CcLMQzGK.js → runnable-block-editor-BhysVT_d.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-DdzUVnCQ.js → sandbox-lifecycle-context-MYXX62o9.js} +1 -1
- package/dist/client/assets/{schema-BtjpCkBi.js → schema-CbxRw8u0.js} +1 -1
- package/dist/client/assets/{scroll-area-BJWIwL31.js → scroll-area-cGn3a7WI.js} +1 -1
- package/dist/client/assets/{search-input-pdt0PjHf.js → search-input-BDrnENeI.js} +1 -1
- package/dist/client/assets/{search-toggle-C34D8JZy.js → search-toggle-D3OE1eNA.js} +1 -1
- package/dist/client/assets/{secret-picker-Ckm17aBF.js → secret-picker-7NmqTvJr.js} +1 -1
- package/dist/client/assets/{secrets-BPQSzLEe.js → secrets-C8RnJX_t.js} +1 -1
- package/dist/client/assets/{sections-editor-CTc0eCxh.js → sections-editor-B7HawNxT.js} +1 -1
- package/dist/client/assets/{select-DCf8mW_F.js → select-DxhjEfyz.js} +1 -1
- package/dist/client/assets/{select-model-DPpoAruH.js → select-model-BANyElMS.js} +1 -1
- package/dist/client/assets/{seo-editor-DqNiw3Gu.js → seo-editor-DfUSXMZj.js} +1 -1
- package/dist/client/assets/{separator-DkJFgiVz.js → separator-ByET-GLC.js} +1 -1
- package/dist/client/assets/{settings-tab-X9MsSJaG.js → settings-tab-XTpgZ69I.js} +1 -1
- package/dist/client/assets/{sheet-CRpiY1-P.js → sheet-n9kcgSxF.js} +1 -1
- package/dist/client/assets/{shell-layout-BhxJycDB.js → shell-layout-3Y13kkhL.js} +1 -1
- package/dist/client/assets/{sidebar-jYcM8g67.js → sidebar-CJTXGZDA.js} +1 -1
- package/dist/client/assets/{skill-preview-BX-_amDj.js → skill-preview-By3pB2y3.js} +1 -1
- package/dist/client/assets/{skills-skZ-d2he.js → skills-D4_sFwwl.js} +1 -1
- package/dist/client/assets/{sso-B8ybivYm.js → sso-BYhFmBwz.js} +1 -1
- package/dist/client/assets/{suggestion-D9IPPiJm.js → suggestion-C4rd6y9a.js} +1 -1
- package/dist/client/assets/{switch-DF6wdqfh.js → switch-DKrCkEm_.js} +1 -1
- package/dist/client/assets/{synced-repos-CCUZGqTp.js → synced-repos-2MrHm3BW.js} +1 -1
- package/dist/client/assets/{table-BxgDzT2Q.js → table-CVXiShGi.js} +1 -1
- package/dist/client/assets/{tabs-DA1AIZDN.js → tabs-DZsSgDfP.js} +1 -1
- package/dist/client/assets/{task-board-DWNkcIT9.js → task-board-Ny1PbjMW.js} +1 -1
- package/dist/client/assets/{task-route-CzUc59tY.js → task-route-9MeQLYQ9.js} +1 -1
- package/dist/client/assets/{task-status-DRe5owa5.js → task-status-DbQ_mzm6.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-B0aiNvOj.js → taskboard-analytics-DywDB_Qc.js} +1 -1
- package/dist/client/assets/{tasks-KzSZR8oQ.js → tasks-DEcROjS5.js} +1 -1
- package/dist/client/assets/tasks-Dok3BfRQ.js +1 -0
- package/dist/client/assets/{textarea-BswM-JJn.js → textarea-DGsUkzqN.js} +1 -1
- package/dist/client/assets/{thread-button-DpvYBb08.js → thread-button-PKgxAUks.js} +1 -1
- package/dist/client/assets/{thread-intent-D2yH8NQG.js → thread-intent-CDjInTZL.js} +1 -1
- package/dist/client/assets/{thread-route-Qq_kbYd9.js → thread-route-CC_31SLX.js} +1 -1
- package/dist/client/assets/{thread-route-DkDGVcOv.js → thread-route-D30inKGP.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-Dl3leyvL.js → thread-sheet-body-hFIE9VHn.js} +1 -1
- package/dist/client/assets/{toggle-group-DX3mdFud.js → toggle-group-DPI9Gz2N.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DO_Pu4gv.js → toolbar-icon-button-BkDKNKtL.js} +1 -1
- package/dist/client/assets/{tooltip-MZWOYG63.js → tooltip-CSEjy-r8.js} +1 -1
- package/dist/client/assets/{track-BOO7JHvQ.js → track-K6tQy-wy.js} +1 -1
- package/dist/client/assets/{types-CdIb-oSa.js → types-k3vJw7wx.js} +1 -1
- package/dist/client/assets/{usage-stats-D9_UDdxp.js → usage-stats-HcbmSz7a.js} +1 -1
- package/dist/client/assets/{use-ai-providers-LNkRnBQk.js → use-ai-providers-CcGxl3Gi.js} +1 -1
- package/dist/client/assets/{use-automations-wHZIlCBG.js → use-automations-CDFazwkf.js} +1 -1
- package/dist/client/assets/{use-autosave-BYzOUZ9X.js → use-autosave-DsxiIWxA.js} +1 -1
- package/dist/client/assets/{use-connect-companion-CpQsI1Ur.js → use-connect-companion-D6711Opr.js} +1 -1
- package/dist/client/assets/{use-connection-B-USUnQN.js → use-connection-CMx-XZiq.js} +1 -1
- package/dist/client/assets/{use-copy-Nse-byOh.js → use-copy-BpzZQl2g.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-w0UfekMk.js → use-create-virtual-mcp--ht4Rkm7.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DSMUf9DP.js → use-date-fns-locale-BjV4TzBE.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BIyRiVKw.js → use-debounced-autosave-CEylLohK.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BBnUBOSq.js → use-debounced-value-C6okEGbV.js} +1 -1
- package/dist/client/assets/{use-deco-credits-gF2uD0li.js → use-deco-credits-CpqHEICB.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CtrWnhxy.js → use-decopilot-events-Dppj3YU9.js} +1 -1
- package/dist/client/assets/{use-delete-connection-C8-NvdUG.js → use-delete-connection-DUW9f2u1.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CJ8ciOjT.js → use-deployment-admin-DshXpxI2.js} +1 -1
- package/dist/client/assets/{use-entitlements-BHhFQNz5.js → use-entitlements-Ba17FhRN.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-BC-z9fhi.js → use-fast-preview-draft-url-kMKxC_Pw.js} +1 -1
- package/dist/client/assets/{use-file-configs-BAx_Bctw.js → use-file-configs-BmEDH0VE.js} +1 -1
- package/dist/client/assets/{use-in-settings-CX8maZJ7.js → use-in-settings-YUhZQzYy.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BNK1GE9k.js → use-infinite-scroll-CSRrFY6h.js} +1 -1
- package/dist/client/assets/{use-join-requests-GN9Xi7io.js → use-join-requests-BoS4qMQi.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-Bs2TK-ce.js → use-main-panel-tabs-By5S27Gp.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DQ2enOLs.js → use-mcp-auth-status-CWdlR5O6.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CiFGnu7b.js → use-mcp-client-C8DXVUZj.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-lZTjG1mH.js → use-mcp-prompts-JOWAmkEq.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BOO1IMIj.js → use-mcp-tools-D-S9SAOh.js} +1 -1
- package/dist/client/assets/{use-members-Z0iLDtCA.js → use-members-CAwVsdC4.js} +1 -1
- package/dist/client/assets/{use-mobile-FeK7AF2-.js → use-mobile-BYW51CpD.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CPtcDApl.js → use-navigate-to-agent-ebIYYmYW.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-C1TkXtsG.js → use-open-billing-url-i3U-Ki4a.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BcsB9kzf.js → use-org-auth-client-D-B1M9Fj.js} +1 -1
- package/dist/client/assets/{use-org-fs-DZVXkCx9.js → use-org-fs-D3EWDZUC.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-oHWqq1Hv.js → use-org-repo-syncs-DmuKbSlB.js} +1 -1
- package/dist/client/assets/{use-org-sso-BrL8hF5L.js → use-org-sso-CzqSMhda.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DWETaDWP.js → use-organization-roles-_GFhEaSJ.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CDeGu_eP.js → use-organization-settings-BG_WfOIn.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-D_YT_rEt.js → use-panel-navigate-DI4UQ_n7.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-aCoQogoA.js → use-project-native-view-presence-CcjNty9d.js} +1 -1
- package/dist/client/assets/{use-project-scope-Bg0KmzUM.js → use-project-scope-CdVgPS_9.js} +1 -1
- package/dist/client/assets/{use-releases-CF_duBCQ.js → use-releases-D_nd9qj6.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-DlQkRAqW.js → use-reports-diagnostic-C-GusDUW.js} +1 -1
- package/dist/client/assets/{use-route-default-main-D-CU2nKW.js → use-route-default-main-CVXNK-Ds.js} +1 -1
- package/dist/client/assets/{use-secrets-BbiQEKkz.js → use-secrets-CKbHXdHu.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DMJs1jQ3.js → use-section-preview-base-BHfKu4Be.js} +1 -1
- package/dist/client/assets/{use-session-runtime-Y6K8YOdz.js → use-session-runtime-a9Y20Jh0.js} +1 -1
- package/dist/client/assets/{use-tags-BSU7h4nA.js → use-tags-BQDPMaYa.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-BKJ8I9Cs.js → use-task-board-analytics-dyWG2Jj9.js} +1 -1
- package/dist/client/assets/{use-task-metadata-CvYiPjE8.js → use-task-metadata-De4dYawr.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-JEXsALbU.js → use-thread-outputs-CHuFDG4c.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-FRNqyFl7.js → use-virtual-mcp-BnIp2YQj.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-HKtw1Zwv.js +1 -0
- package/dist/client/assets/{useQueries-9Xvfq4o_.js → useQueries-DX5YqUyF.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CIYuI7yd.js +1 -0
- package/dist/client/assets/{users-CB4moz77.js → users-C1JPEsq0.js} +1 -1
- package/dist/client/assets/{utils-h4IU03oF.js → utils-Dnu7Z_7W.js} +1 -1
- package/dist/client/assets/{variant-calendar-G4X0EVoH.js → variant-calendar-52QBX61v.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-CfLSliOF.js → variant-matcher-override-G4ZIBzQZ.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BB8DfoWq.js → view-mode-toggle-BHHm82Wa.js} +1 -1
- package/dist/client/assets/{virtual-mcp-DOLKk3ac.js → virtual-mcp-VENiZcwc.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/agent-app-BEn3DHbU.js +0 -1
- package/dist/client/assets/agent-deck-Cdi72ZuY.js +0 -1
- package/dist/client/assets/agent-file-DWqJLMKY.js +0 -1
- package/dist/client/assets/agent-library-file-Bc9zk09x.js +0 -1
- package/dist/client/assets/agent-settings-Dkp6jsMM.js +0 -1
- package/dist/client/assets/agent-site-editor-code-CJi1470H.js +0 -2
- package/dist/client/assets/agent-view-BHtjcZQK.js +0 -1
- package/dist/client/assets/api-keys-D-h5jmiI.js +0 -1
- package/dist/client/assets/app-editor-B4pRY03V.js +0 -1
- package/dist/client/assets/project-reports-Xaq5q-8V.js +0 -1
- package/dist/client/assets/project-tasks-Bk6SIhsH.js +0 -1
- package/dist/client/assets/record-editor-CHeB7WJ0.js +0 -1
- package/dist/client/assets/reports-D4_laEx2.js +0 -1
- package/dist/client/assets/tasks-NSYirPqf.js +0 -1
- package/dist/client/assets/useInfiniteQuery-D7pUQ9-H.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CCPBpqAT.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as V,Y as Fe,r as w,e as me,q as z,j as t,l as P,B as xe,o as Ve,m as ze,K as ue,c as oe,b as be,h as _e}from"./index-Bv7m6pZJ.js";import{I as ee}from"./input-CyVfmTFZ.js";import{i as Qe}from"./use-is-desktop-app-BNujXJc_.js";import{d as He,e as Ke}from"./backoff-8mStPHYB.js";class Le extends Error{constructor(e,a){super(`Retrying exceeded the maxAttempts (${a}).`),this.name="RetryError",this.cause=e}}async function Ye(n,e){const{multiplier:a=2,maxTimeout:u=6e4,maxAttempts:f=5,minTimeout:o=1e3,jitter:i=1,isRetriable:m=()=>!0,signal:g}=e??{};if(!Number.isInteger(f)||f<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${f}`);if(!Number.isFinite(a)||a<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${a}`);if(Number.isNaN(u)||u<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${u}`);if(Number.isNaN(o)||o<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${o}`);if(o>u)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${o}', 'maxTimeout=${u}'`);if(Number.isNaN(i)||i<0||i>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${i}`);let j=0;for(;;){g?.throwIfAborted();try{return await n()}catch(v){if(!m(v))throw v;if(j+1>=f)throw new Le(v,f);const C=Ke(u,o,j,a,i);await He(C,g?{signal:g}:void 0)}j++}}const Oe={submitEmailPassword:({mode:n,email:e,password:a,name:u})=>n==="sign_up"?V.signUp.email({email:e,password:a,name:u||""}):V.signIn.email({email:e,password:a}),requestPasswordReset:({email:n,redirectTo:e})=>V.requestPasswordReset({email:n,redirectTo:e}),sendOtp:({email:n})=>V.emailOtp.sendVerificationOtp({email:n,type:"sign-in"}),submitOtp:({email:n,otp:e})=>V.signIn.emailOtp({email:n,otp:e}),socialSignIn:({provider:n,callbackURL:e})=>V.signIn.social({provider:n,callbackURL:e}),ssoSignIn:({providerId:n,callbackURL:e})=>V.signIn.sso({providerId:n,callbackURL:e}),onAuthenticated:n=>{window.location.href=n}},ge="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Ge={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:n=>`Code sent to ${n}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:n=>`Continue with ${n}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Je({redirectUrl:n,callbackUrl:e="/",title:a,subtitle:u,brand:f,copy:o,variant:i="default",allowedSocialProviders:m,allowPassword:g=!0,onAuthEvent:j,actions:v}){const{emailAndPassword:C,resetPassword:E,emailOtp:y,socialProviders:N}=Fe(),d={...Oe,...v},h=s=>{try{j?.(s)}catch{}},I=i==="compact",te=m?N.providers.filter(s=>m.includes(s.name)):N.providers,se=N.enabled&&te.length>0,le=C.enabled&&(g||!y.enabled&&!se),de=N.enabled&&N.providers.length>0&&!se&&!y.enabled&&!le?N.providers:te,p=N.enabled&&de.length>0,F=C.enabled&&(g||!y.enabled&&!p),[b,_]=w.useState(""),[L,Q]=w.useState(""),[U,O]=w.useState(""),[D,l]=w.useState(""),[x,$]=w.useState(!1),[M,W]=w.useState(()=>y.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[A,H]=w.useState(""),[ye,we]=w.useState(!1),[Re,fe]=w.useState(null),r={...Ge,...o},ne=w.useId(),K=`${ne}-email`,Y=`${ne}-email-error`,ve=`${ne}-name`,Ee=`${ne}-password`,Se=`${ne}-otp`,k=M==="signUp",q=M==="forgotPassword",T=M==="emailOtp",re=me({mutationFn:async({email:s,password:c,name:R})=>{try{const Z=await d.submitEmailPassword({mode:k?"sign_up":"sign_in",email:s,password:c,name:R});if(Z.error)throw new Error(Z.error.message||(k?r.signUpFailed:r.signInFailed));return Z}catch(Z){throw Z instanceof Error?Z:new Error(r.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:k?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:k?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),z(k?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),ie=me({mutationFn:async({email:s})=>{const c=await d.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(c.error)throw new Error(c.error.message||r.resetEmailFailed);return c},onSuccess:()=>{z("password_reset_requested"),we(!0)},onError:s=>{z("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),G=me({mutationFn:async({email:s})=>{const c=await d.sendOtp({email:s});if(c.error)throw new Error(c.error.message||r.otpSendFailed);return c},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),z("email_otp_sent"),$(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),z("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),J=me({mutationFn:async({email:s,otp:c})=>{const R=await d.submitOtp({email:s,otp:c});if(R.error)throw new Error(R.error.message||r.invalidCode);return R},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),z("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),ce=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),pe=()=>{b.trim()&&!ce(b)&&H(r.invalidEmail)},De=s=>{if(s.preventDefault(),!ce(b)){H(r.invalidEmail),h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}re.mutate({email:b,password:L,name:U})},$e=s=>{if(s.preventDefault(),!ce(b)){H(r.invalidEmail);return}ie.mutate({email:b})},Me=s=>{if(s.preventDefault(),!ce(b)){H(r.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}G.mutate({email:b})},We=s=>{s.preventDefault(),J.mutate({email:b,otp:D})},X=s=>c=>{s(c.target.value),je&&re.reset(),Ne&&ie.reset(),Ae&&(G.reset(),J.reset()),s===_&&A&&H("")},ae=s=>{W(s),O(""),l(""),$(!1),H(""),we(!1),fe(null),re.reset(),ie.reset(),G.reset(),J.reset()},S=re.isPending||ie.isPending||G.isPending||J.isPending,je=re.error,Ne=ie.error,Ae=G.error||J.error,B=k?b.trim()&&L.trim()&&U.trim():q?b.trim():T?x?D.trim():b.trim():b.trim()&&L.trim(),qe=s=>{if(!s)return null;const c=s.message.toLowerCase();return c.includes("unauthorized")||c.includes("401")?r.invalidEmailOrPassword:c.includes("already exists")||c.includes("409")?r.accountExists:c.includes("network")||c.includes("fetch")?r.networkError:c.includes("rate limit")||c.includes("429")?r.tooManyAttempts:c.includes("invalid")&&c.includes("otp")?r.invalidOrExpiredCode:s.message||r.genericError},Ce=je||Ne||Ae||Re,Ue=async s=>{h({type:"started",method:"social",provider:s}),fe(null);try{const c=await d.socialSignIn({provider:s,callbackURL:n??e});if(c.error)throw new Error(c.error.message||r.authenticationFailed)}catch(c){const R=c instanceof Error?c.message:String(c);h({type:"failed",method:"social",provider:s,stage:"redirect",error:R}),z("social_signin_failed",{provider:s,error:R}),fe(c instanceof Error?c:new Error(R))}},Be=q?r.resetPasswordTitle:T&&x?r.verificationCodeTitle:a??r.welcomeTitle,Pe=q?r.resetPasswordSubtitle:T&&x?r.codeSentTo(b):u===void 0?r.defaultSubtitle:u;return t.jsxs("div",{className:P("grid w-full",I?"gap-5":"gap-10"),children:[f??t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:P("font-medium",I?"text-xl leading-7":"text-2xl leading-8"),children:Be}),Pe&&t.jsx("p",{className:P("text-muted-foreground",I?"text-sm leading-5":"text-base leading-6"),children:Pe})]}),Ce&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:qe(Ce)}),ye&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:r.resetEmailSent}),!q&&!(T&&x)&&p&&t.jsx("div",{className:"grid gap-2",children:de.map(s=>t.jsxs("button",{type:"button",disabled:S,onClick:()=>{Ue(s.name)},className:P("flex w-full items-center justify-center gap-3 bg-background px-3 text-sm font-medium text-foreground card-shadow transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50 compact:rounded-lg",I?"h-11":"h-12"),children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:P("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),r.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!q&&!(T&&x)&&p&&(F||y.enabled)&&t.jsxs("div",{className:P("flex items-center gap-2.5",I?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:P("text-muted-foreground",I?"text-sm":"text-base"),children:r.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),T&&y.enabled&&t.jsx(t.Fragment,{children:x?t.jsxs("form",{onSubmit:We,className:P("grid gap-2",I&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:Se,className:P("text-sm font-medium text-foreground",I&&"sr-only"),children:r.verificationCodeLabel}),t.jsx(ee,{id:Se,type:"text",placeholder:r.enterCodePlaceholder,value:D,onChange:X(l),required:!0,disabled:S,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),t.jsx("button",{type:"submit",disabled:S||!B,className:P("flex items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:pointer-events-none disabled:opacity-50",I?"h-11 sm:w-auto":"h-12 w-full"),children:S?r.verifying:r.verify}),t.jsx("button",{type:"button",onClick:()=>{$(!1),l(""),G.reset(),J.reset()},disabled:S,className:P("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",I&&"sm:col-span-2"),children:r.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Me,className:P("grid gap-2",I&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:K,className:P("text-sm font-medium text-foreground",I&&"sr-only"),children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:r.emailPlaceholder,value:b,onChange:X(_),onBlur:pe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!A,"aria-describedby":A?Y:void 0,className:"h-11 rounded-lg"}),A&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive",children:A})]}),t.jsx("button",{type:"submit",disabled:S||!B,className:P("flex items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:pointer-events-none disabled:opacity-50",I?"h-11 sm:w-auto":"h-12 w-full"),children:S?r.sending:r.sendCode})]})}),q&&F&&!ye&&t.jsxs("form",{onSubmit:$e,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:pe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!A,"aria-describedby":A?Y:void 0,className:"h-11 rounded-lg"}),A&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:A})]}),t.jsx(xe,{type:"submit",disabled:S||!B,className:"w-full font-semibold",size:"xl",children:S?r.sending:r.sendResetLink})]}),!q&&!T&&F&&t.jsxs("form",{onSubmit:De,className:"grid gap-5",children:[k&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:ve,className:"block text-sm font-medium text-foreground mb-2",children:r.nameLabel}),t.jsx(ee,{id:ve,type:"text",placeholder:r.namePlaceholder,value:U,onChange:X(O),required:!0,disabled:S,autoComplete:"name",className:"h-11 rounded-lg"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:pe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!A,"aria-describedby":A?Y:void 0,className:"h-11 rounded-lg"}),A&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:A})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:Ee,className:"block text-sm font-medium text-foreground",children:r.passwordLabel}),!k&&E.enabled&&t.jsx("button",{type:"button",onClick:()=>ae("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:r.forgotPassword})]}),t.jsx(ee,{id:Ee,type:"password",placeholder:"••••••••",value:L,onChange:X(Q),required:!0,disabled:S,autoComplete:k?"new-password":"current-password",className:"h-11 rounded-lg"})]}),t.jsx("div",{className:P("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",B?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:P("p-1",!B&&"pointer-events-none"),children:t.jsx(xe,{type:"submit",disabled:S||!B,className:P("w-full font-semibold"),size:"xl","aria-hidden":!B,children:S?k?r.creatingAccount:r.signingIn:r.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:q?t.jsx("button",{type:"button",onClick:()=>ae("signIn"),disabled:S,className:ge,children:r.backToSignIn}):T&&F?t.jsx("button",{type:"button",onClick:()=>ae("signIn"),disabled:S,className:ge,children:r.signInWithPassword}):!T&&F?t.jsxs(t.Fragment,{children:[k?r.alreadyHaveAccount:r.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>ae(k?"signIn":"signUp"),disabled:S,className:ge,children:k?r.signIn:r.signUp}),y.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>ae("emailOtp"),disabled:S,className:ge,children:r.signInWithEmailCode})]})]}):null})]})}async function he(){throw new Error("Tauri bridge is unavailable outside the desktop build")}function Xe(){const n=Ve(),e=Qe(),a=ze({queryKey:ue.desktopAuthStatus(),queryFn:async()=>(await he()).fetchAuthStatus(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0}),[u,f]=w.useState(!1),[o,i]=w.useState(null),[m,g]=w.useState(!1),[j,v]=w.useState(null);w.useEffect(()=>{},[e,n]);async function C(){f(!0),i(null);try{const d=await he();await d.performAuthLogin();const h=await d.fetchAuthStatus();n.setQueryData(ue.desktopAuthStatus(),h)}catch(d){i(d instanceof Error?d.message:"Sign-in failed")}finally{f(!1)}}async function E(){f(!0);try{const d=await he();await d.performAuthLogout();const h=await d.fetchAuthStatus();n.setQueryData(ue.desktopAuthStatus(),h)}finally{f(!1)}}async function y(){g(!0),v(null);let d;try{d=await he()}catch(h){v(h instanceof Error?h.message:"Sign-in failed"),g(!1);return}try{await d.performAuthCompleteSession()}catch(h){v(h instanceof Error?h.message:"Sign-in failed")}finally{try{const h=await d.fetchAuthStatus();n.setQueryData(ue.desktopAuthStatus(),h)}finally{g(!1)}}}async function N(){await a.refetch()}return{status:a.data,isChecking:a.isLoading,isRetryingStatus:a.isFetching,isPending:u,loginError:o,login:C,logout:E,isCompletingSession:m,completeSessionError:j,completeSession:y,retryStatus:N}}function Ze(n){return!(n.emailAndPassword.enabled||n.emailOtp.enabled||n.socialProviders.enabled)&&!n.sso.enabled&&n.magicLink.enabled}function et(){return oe.c(10),Xe(),null}function tt(n){const e=oe.c(25),{onContinue:a,isPending:u,error:f}=n,o=be();let i;e[0]!==o?(i=o("common.authEntry.browserOnlyTitle"),e[0]=o,e[1]=i):i=e[1];let m;e[2]!==i?(m=t.jsx("h1",{className:"text-lg font-medium text-foreground",children:i}),e[2]=i,e[3]=m):m=e[3];let g;e[4]!==o?(g=o("common.authEntry.browserOnlyDescription"),e[4]=o,e[5]=g):g=e[5];let j;e[6]!==g?(j=t.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:g}),e[6]=g,e[7]=j):j=e[7];let v;e[8]!==m||e[9]!==j?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[m,j]}),e[8]=m,e[9]=j,e[10]=v):v=e[10];let C;e[11]!==a?(C=()=>{a()},e[11]=a,e[12]=C):C=e[12];let E;e[13]!==o?(E=o("common.authEntry.browserOnlyCta"),e[13]=o,e[14]=E):E=e[14];let y;e[15]!==u||e[16]!==C||e[17]!==E?(y=t.jsx(xe,{onClick:C,disabled:u,children:E}),e[15]=u,e[16]=C,e[17]=E,e[18]=y):y=e[18];let N;e[19]!==f?(N=f&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:f}),e[19]=f,e[20]=N):N=e[20];let d;return e[21]!==v||e[22]!==y||e[23]!==N?(d=t.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[v,y,N]}),e[21]=v,e[22]=y,e[23]=N,e[24]=d):d=e[24],d}function Ie(n){const e=oe.c(8),{label:a,error:u}=n;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(_e,{size:"lg"}),e[0]=f):f=e[0];let o;e[1]!==a?(o=a&&t.jsx("p",{className:"text-sm text-muted-foreground",children:a}),e[1]=a,e[2]=o):o=e[2];let i;e[3]!==u?(i=u&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:u}),e[3]=u,e[4]=i):i=e[4];let m;return e[5]!==o||e[6]!==i?(m=t.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[f,o,i]}),e[5]=o,e[6]=i,e[7]=m):m=e[7],m}class ke{constructor(e){this.response=e}response}function st(n){return n.startsWith("/")&&!n.startsWith("//")?n:"/"}function nt({redirectTo:n,onAuthEvent:e}){const a=be(),[u,f]=w.useState(null),o=w.useEffectEvent(i=>{try{e?.(i)}catch{}});return w.useEffect(()=>{let i=!1;return(async()=>{o({type:"started",method:"local"});try{let m;try{m=await Ye(async()=>{const g=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(g.status>=500)throw new ke(g);return g},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(g){if(g instanceof Le&&g.cause instanceof ke)m=g.cause.response;else throw g}if(!m.ok){const g=await m.json().catch(()=>({}));throw new Error(g?.error||a("common.authEntry.autoLoginFailed"))}i||(o({type:"succeeded",method:"local"}),window.location.href=st(n))}catch(m){i||(o({type:"failed",method:"local",stage:"authenticate",error:m instanceof Error?m.message:String(m)}),f(m instanceof Error?m.message:a("common.authEntry.autoLoginFailed")))}})(),()=>{i=!0}},[n]),u?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:a("common.authEntry.autoLoginFailedWithError",{error:u})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:a("common.authEntry.tryRestartingServer")})]})}):t.jsx(Te,{})}function Te(){const n=oe.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(_e,{size:"lg",label:"Signing in"})}),n[0]=e):e=n[0],e}function rt({callbackURL:n,providerId:e,ssoSignIn:a,onAuthEvent:u}){const f=w.useEffectEvent(i=>{try{u?.(i)}catch{}}),o=w.useEffectEvent(a);return w.useEffect(()=>{(async()=>{f({type:"started",method:"sso",provider:e});try{const i=await o({providerId:e,callbackURL:n});if(i.error)throw new Error(i.error.message||"SSO redirect failed")}catch(i){f({type:"failed",method:"sso",provider:e,stage:"redirect",error:i instanceof Error?i.message:String(i)})}})()},[e,n]),t.jsx(Te,{})}function dt(n){const e=oe.c(51),{callbackUrl:a,redirectUrl:u,allowAutoLogin:f,title:o,subtitle:i,brand:m,copy:g,variant:j,allowedSocialProviders:v,allowPassword:C,onAuthEvent:E,onAuthenticated:y}=n,N=f===void 0?!0:f,d=be(),{sso:h,emailAndPassword:I,magicLink:te,emailOtp:se,socialProviders:le,localMode:de}=Fe(),p=et(),F=u||a;let b;e[0]!==y?(b=y?{onAuthenticated:y}:void 0,e[0]=y,e[1]=b):b=e[1];const _=b,L=p?.actions;let Q;e[2]!==_||e[3]!==L?(Q={...Oe,..._,...L},e[2]=_,e[3]=L,e[4]=Q):Q=e[4];const U=Q;if(p?.isPending){let l;e[5]!==d?(l=d("common.authEntry.finishSignInInBrowser"),e[5]=d,e[6]=l):l=e[6];let x;return e[7]!==p.loginError||e[8]!==l?(x=t.jsx(Ie,{label:l,error:p.loginError}),e[7]=p.loginError,e[8]=l,e[9]=x):x=e[9],x}if(p?.isCompletingSession){let l;e[10]!==d?(l=d("common.authEntry.finishingSignIn"),e[10]=d,e[11]=l):l=e[11];let x;return e[12]!==p.completeSessionError||e[13]!==l?(x=t.jsx(Ie,{label:l,error:p.completeSessionError}),e[12]=p.completeSessionError,e[13]=l,e[14]=x):x=e[14],x}if(de&&N){let l;return e[15]!==E||e[16]!==F?(l=t.jsx(nt,{redirectTo:F,onAuthEvent:E}),e[15]=E,e[16]=F,e[17]=l):l=e[17],l}if(h.enabled){let l;return e[18]!==E||e[19]!==F||e[20]!==U.ssoSignIn||e[21]!==h.providerId?(l=t.jsx(rt,{callbackURL:F,providerId:h.providerId,ssoSignIn:U.ssoSignIn,onAuthEvent:E}),e[18]=E,e[19]=F,e[20]=U.ssoSignIn,e[21]=h.providerId,e[22]=l):l=e[22],l}if(p&&Ze({emailAndPassword:I,emailOtp:se,socialProviders:le,magicLink:te,sso:h})){let l;return e[23]!==p.isPending||e[24]!==p.login||e[25]!==p.loginError?(l=t.jsx(tt,{onContinue:p.login,isPending:p.isPending,error:p.loginError}),e[23]=p.isPending,e[24]=p.login,e[25]=p.loginError,e[26]=l):l=e[26],l}if(I.enabled||te.enabled||se.enabled||le.enabled){const l=p?.loginError??p?.completeSessionError??null;let x;e[27]!==_||e[28]!==L?(x={..._,...L},e[27]=_,e[28]=L,e[29]=x):x=e[29];let $;e[30]!==C||e[31]!==v||e[32]!==m||e[33]!==a||e[34]!==g||e[35]!==E||e[36]!==u||e[37]!==i||e[38]!==x||e[39]!==o||e[40]!==j?($=t.jsx(Je,{redirectUrl:u,callbackUrl:a,title:o,subtitle:i,brand:m,copy:g,variant:j,allowedSocialProviders:v,allowPassword:C,onAuthEvent:E,actions:x}),e[30]=C,e[31]=v,e[32]=m,e[33]=a,e[34]=g,e[35]=E,e[36]=u,e[37]=i,e[38]=x,e[39]=o,e[40]=j,e[41]=$):$=e[41];const M=$;if(!l)return M;let W;e[42]!==l?(W=t.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:l}),e[42]=l,e[43]=W):W=e[43];let A;return e[44]!==M||e[45]!==W?(A=t.jsxs("div",{className:"grid gap-4",children:[W,M]}),e[44]=M,e[45]=W,e[46]=A):A=e[46],A}let O;e[47]!==d?(O=d("common.authEntry.noLoginOptions"),e[47]=d,e[48]=O):O=e[48];let D;return e[49]!==O?(D=t.jsx("div",{children:O}),e[49]=O,e[50]=D):D=e[50],D}export{Te as A,dt as a,Xe as u};
|
|
1
|
+
import{a as V,Y as Fe,r as w,e as me,q as z,j as t,l as P,B as xe,o as Ve,m as ze,K as ue,c as oe,b as be,h as _e}from"./index-jpNIlPuy.js";import{I as ee}from"./input-AEl9FaSr.js";import{i as Qe}from"./use-is-desktop-app-BNujXJc_.js";import{d as He,e as Ke}from"./backoff-8mStPHYB.js";class Le extends Error{constructor(e,a){super(`Retrying exceeded the maxAttempts (${a}).`),this.name="RetryError",this.cause=e}}async function Ye(n,e){const{multiplier:a=2,maxTimeout:u=6e4,maxAttempts:f=5,minTimeout:o=1e3,jitter:i=1,isRetriable:m=()=>!0,signal:g}=e??{};if(!Number.isInteger(f)||f<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${f}`);if(!Number.isFinite(a)||a<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${a}`);if(Number.isNaN(u)||u<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${u}`);if(Number.isNaN(o)||o<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${o}`);if(o>u)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${o}', 'maxTimeout=${u}'`);if(Number.isNaN(i)||i<0||i>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${i}`);let j=0;for(;;){g?.throwIfAborted();try{return await n()}catch(v){if(!m(v))throw v;if(j+1>=f)throw new Le(v,f);const C=Ke(u,o,j,a,i);await He(C,g?{signal:g}:void 0)}j++}}const Oe={submitEmailPassword:({mode:n,email:e,password:a,name:u})=>n==="sign_up"?V.signUp.email({email:e,password:a,name:u||""}):V.signIn.email({email:e,password:a}),requestPasswordReset:({email:n,redirectTo:e})=>V.requestPasswordReset({email:n,redirectTo:e}),sendOtp:({email:n})=>V.emailOtp.sendVerificationOtp({email:n,type:"sign-in"}),submitOtp:({email:n,otp:e})=>V.signIn.emailOtp({email:n,otp:e}),socialSignIn:({provider:n,callbackURL:e})=>V.signIn.social({provider:n,callbackURL:e}),ssoSignIn:({providerId:n,callbackURL:e})=>V.signIn.sso({providerId:n,callbackURL:e}),onAuthenticated:n=>{window.location.href=n}},ge="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Ge={signUpFailed:"Sign up failed",signInFailed:"Sign in failed",authenticationFailed:"Authentication failed",resetEmailFailed:"Failed to send reset email",otpSendFailed:"Failed to send code",invalidCode:"Invalid code",invalidEmail:"Invalid email address",invalidEmailOrPassword:"Invalid email or password. Please try again.",accountExists:"An account with this email already exists. Try signing in instead.",networkError:"Network error. Please check your connection and try again.",tooManyAttempts:"Too many attempts. Please wait a moment and try again.",invalidOrExpiredCode:"Invalid or expired code. Please try again.",genericError:"An error occurred. Please try again.",resetPasswordTitle:"Reset your password",verificationCodeTitle:"Enter verification code",welcomeTitle:"Welcome to deco",resetPasswordSubtitle:"We'll send you a reset link",codeSentTo:n=>`Code sent to ${n}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:n=>`Continue with ${n}`,divider:"or",emailLabel:"Email",emailPlaceholder:"Email address",sending:"Sending...",sendCode:"Send code",verificationCodeLabel:"Verification code",enterCodePlaceholder:"Enter code",verifying:"Verifying...",verify:"Verify",useDifferentEmail:"Use a different email",sendResetLink:"Send reset link",nameLabel:"Name",namePlaceholder:"Your name",passwordLabel:"Password",forgotPassword:"Forgot password?",creatingAccount:"Creating account...",signingIn:"Signing in...",continue:"Continue",backToSignIn:"Back to sign in",signInWithPassword:"Sign in with password instead",alreadyHaveAccount:"Already have an account? ",dontHaveAccount:"Don't have an account? ",signIn:"Sign in",signUp:"Sign up",signInWithEmailCode:"Sign in with email code"};function Je({redirectUrl:n,callbackUrl:e="/",title:a,subtitle:u,brand:f,copy:o,variant:i="default",allowedSocialProviders:m,allowPassword:g=!0,onAuthEvent:j,actions:v}){const{emailAndPassword:C,resetPassword:E,emailOtp:y,socialProviders:N}=Fe(),d={...Oe,...v},h=s=>{try{j?.(s)}catch{}},I=i==="compact",te=m?N.providers.filter(s=>m.includes(s.name)):N.providers,se=N.enabled&&te.length>0,le=C.enabled&&(g||!y.enabled&&!se),de=N.enabled&&N.providers.length>0&&!se&&!y.enabled&&!le?N.providers:te,p=N.enabled&&de.length>0,F=C.enabled&&(g||!y.enabled&&!p),[b,_]=w.useState(""),[L,Q]=w.useState(""),[U,O]=w.useState(""),[D,l]=w.useState(""),[x,$]=w.useState(!1),[M,W]=w.useState(()=>y.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[A,H]=w.useState(""),[ye,we]=w.useState(!1),[Re,fe]=w.useState(null),r={...Ge,...o},ne=w.useId(),K=`${ne}-email`,Y=`${ne}-email-error`,ve=`${ne}-name`,Ee=`${ne}-password`,Se=`${ne}-otp`,k=M==="signUp",q=M==="forgotPassword",T=M==="emailOtp",re=me({mutationFn:async({email:s,password:c,name:R})=>{try{const Z=await d.submitEmailPassword({mode:k?"sign_up":"sign_in",email:s,password:c,name:R});if(Z.error)throw new Error(Z.error.message||(k?r.signUpFailed:r.signInFailed));return Z}catch(Z){throw Z instanceof Error?Z:new Error(r.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:k?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:k?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),z(k?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),ie=me({mutationFn:async({email:s})=>{const c=await d.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(c.error)throw new Error(c.error.message||r.resetEmailFailed);return c},onSuccess:()=>{z("password_reset_requested"),we(!0)},onError:s=>{z("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),G=me({mutationFn:async({email:s})=>{const c=await d.sendOtp({email:s});if(c.error)throw new Error(c.error.message||r.otpSendFailed);return c},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),z("email_otp_sent"),$(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),z("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),J=me({mutationFn:async({email:s,otp:c})=>{const R=await d.submitOtp({email:s,otp:c});if(R.error)throw new Error(R.error.message||r.invalidCode);return R},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),d.onAuthenticated(n??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),z("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),ce=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),pe=()=>{b.trim()&&!ce(b)&&H(r.invalidEmail)},De=s=>{if(s.preventDefault(),!ce(b)){H(r.invalidEmail),h({type:"failed",method:"email_password",mode:k?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}re.mutate({email:b,password:L,name:U})},$e=s=>{if(s.preventDefault(),!ce(b)){H(r.invalidEmail);return}ie.mutate({email:b})},Me=s=>{if(s.preventDefault(),!ce(b)){H(r.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}G.mutate({email:b})},We=s=>{s.preventDefault(),J.mutate({email:b,otp:D})},X=s=>c=>{s(c.target.value),je&&re.reset(),Ne&&ie.reset(),Ae&&(G.reset(),J.reset()),s===_&&A&&H("")},ae=s=>{W(s),O(""),l(""),$(!1),H(""),we(!1),fe(null),re.reset(),ie.reset(),G.reset(),J.reset()},S=re.isPending||ie.isPending||G.isPending||J.isPending,je=re.error,Ne=ie.error,Ae=G.error||J.error,B=k?b.trim()&&L.trim()&&U.trim():q?b.trim():T?x?D.trim():b.trim():b.trim()&&L.trim(),qe=s=>{if(!s)return null;const c=s.message.toLowerCase();return c.includes("unauthorized")||c.includes("401")?r.invalidEmailOrPassword:c.includes("already exists")||c.includes("409")?r.accountExists:c.includes("network")||c.includes("fetch")?r.networkError:c.includes("rate limit")||c.includes("429")?r.tooManyAttempts:c.includes("invalid")&&c.includes("otp")?r.invalidOrExpiredCode:s.message||r.genericError},Ce=je||Ne||Ae||Re,Ue=async s=>{h({type:"started",method:"social",provider:s}),fe(null);try{const c=await d.socialSignIn({provider:s,callbackURL:n??e});if(c.error)throw new Error(c.error.message||r.authenticationFailed)}catch(c){const R=c instanceof Error?c.message:String(c);h({type:"failed",method:"social",provider:s,stage:"redirect",error:R}),z("social_signin_failed",{provider:s,error:R}),fe(c instanceof Error?c:new Error(R))}},Be=q?r.resetPasswordTitle:T&&x?r.verificationCodeTitle:a??r.welcomeTitle,Pe=q?r.resetPasswordSubtitle:T&&x?r.codeSentTo(b):u===void 0?r.defaultSubtitle:u;return t.jsxs("div",{className:P("grid w-full",I?"gap-5":"gap-10"),children:[f??t.jsxs("div",{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h1",{className:P("font-medium",I?"text-xl leading-7":"text-2xl leading-8"),children:Be}),Pe&&t.jsx("p",{className:P("text-muted-foreground",I?"text-sm leading-5":"text-base leading-6"),children:Pe})]}),Ce&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:qe(Ce)}),ye&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:r.resetEmailSent}),!q&&!(T&&x)&&p&&t.jsx("div",{className:"grid gap-2",children:de.map(s=>t.jsxs("button",{type:"button",disabled:S,onClick:()=>{Ue(s.name)},className:P("flex w-full items-center justify-center gap-3 bg-background px-3 text-sm font-medium text-foreground card-shadow transition-colors hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 dark:bg-input/30 dark:hover:bg-input/50 compact:rounded-lg",I?"h-11":"h-12"),children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:P("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),r.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!q&&!(T&&x)&&p&&(F||y.enabled)&&t.jsxs("div",{className:P("flex items-center gap-2.5",I?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:P("text-muted-foreground",I?"text-sm":"text-base"),children:r.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),T&&y.enabled&&t.jsx(t.Fragment,{children:x?t.jsxs("form",{onSubmit:We,className:P("grid gap-2",I&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:Se,className:P("text-sm font-medium text-foreground",I&&"sr-only"),children:r.verificationCodeLabel}),t.jsx(ee,{id:Se,type:"text",placeholder:r.enterCodePlaceholder,value:D,onChange:X(l),required:!0,disabled:S,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11 rounded-lg"})]}),t.jsx("button",{type:"submit",disabled:S||!B,className:P("flex items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:pointer-events-none disabled:opacity-50",I?"h-11 sm:w-auto":"h-12 w-full"),children:S?r.verifying:r.verify}),t.jsx("button",{type:"button",onClick:()=>{$(!1),l(""),G.reset(),J.reset()},disabled:S,className:P("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",I&&"sm:col-span-2"),children:r.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Me,className:P("grid gap-2",I&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:K,className:P("text-sm font-medium text-foreground",I&&"sr-only"),children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:r.emailPlaceholder,value:b,onChange:X(_),onBlur:pe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!A,"aria-describedby":A?Y:void 0,className:"h-11 rounded-lg"}),A&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive",children:A})]}),t.jsx("button",{type:"submit",disabled:S||!B,className:P("flex items-center justify-center rounded-lg bg-primary px-4 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/80 disabled:pointer-events-none disabled:opacity-50",I?"h-11 sm:w-auto":"h-12 w-full"),children:S?r.sending:r.sendCode})]})}),q&&F&&!ye&&t.jsxs("form",{onSubmit:$e,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:pe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!A,"aria-describedby":A?Y:void 0,className:"h-11 rounded-lg"}),A&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:A})]}),t.jsx(xe,{type:"submit",disabled:S||!B,className:"w-full font-semibold",size:"xl",children:S?r.sending:r.sendResetLink})]}),!q&&!T&&F&&t.jsxs("form",{onSubmit:De,className:"grid gap-5",children:[k&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:ve,className:"block text-sm font-medium text-foreground mb-2",children:r.nameLabel}),t.jsx(ee,{id:ve,type:"text",placeholder:r.namePlaceholder,value:U,onChange:X(O),required:!0,disabled:S,autoComplete:"name",className:"h-11 rounded-lg"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:K,className:"block text-sm font-medium text-foreground mb-2",children:r.emailLabel}),t.jsx(ee,{id:K,type:"email",placeholder:"you@example.com",value:b,onChange:X(_),onBlur:pe,required:!0,disabled:S,autoComplete:"email","aria-invalid":!!A,"aria-describedby":A?Y:void 0,className:"h-11 rounded-lg"}),A&&t.jsx("p",{id:Y,role:"alert",className:"text-xs text-destructive mt-1.5",children:A})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:Ee,className:"block text-sm font-medium text-foreground",children:r.passwordLabel}),!k&&E.enabled&&t.jsx("button",{type:"button",onClick:()=>ae("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:r.forgotPassword})]}),t.jsx(ee,{id:Ee,type:"password",placeholder:"••••••••",value:L,onChange:X(Q),required:!0,disabled:S,autoComplete:k?"new-password":"current-password",className:"h-11 rounded-lg"})]}),t.jsx("div",{className:P("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",B?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:P("p-1",!B&&"pointer-events-none"),children:t.jsx(xe,{type:"submit",disabled:S||!B,className:P("w-full font-semibold"),size:"xl","aria-hidden":!B,children:S?k?r.creatingAccount:r.signingIn:r.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:q?t.jsx("button",{type:"button",onClick:()=>ae("signIn"),disabled:S,className:ge,children:r.backToSignIn}):T&&F?t.jsx("button",{type:"button",onClick:()=>ae("signIn"),disabled:S,className:ge,children:r.signInWithPassword}):!T&&F?t.jsxs(t.Fragment,{children:[k?r.alreadyHaveAccount:r.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>ae(k?"signIn":"signUp"),disabled:S,className:ge,children:k?r.signIn:r.signUp}),y.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>ae("emailOtp"),disabled:S,className:ge,children:r.signInWithEmailCode})]})]}):null})]})}async function he(){throw new Error("Tauri bridge is unavailable outside the desktop build")}function Xe(){const n=Ve(),e=Qe(),a=ze({queryKey:ue.desktopAuthStatus(),queryFn:async()=>(await he()).fetchAuthStatus(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0}),[u,f]=w.useState(!1),[o,i]=w.useState(null),[m,g]=w.useState(!1),[j,v]=w.useState(null);w.useEffect(()=>{},[e,n]);async function C(){f(!0),i(null);try{const d=await he();await d.performAuthLogin();const h=await d.fetchAuthStatus();n.setQueryData(ue.desktopAuthStatus(),h)}catch(d){i(d instanceof Error?d.message:"Sign-in failed")}finally{f(!1)}}async function E(){f(!0);try{const d=await he();await d.performAuthLogout();const h=await d.fetchAuthStatus();n.setQueryData(ue.desktopAuthStatus(),h)}finally{f(!1)}}async function y(){g(!0),v(null);let d;try{d=await he()}catch(h){v(h instanceof Error?h.message:"Sign-in failed"),g(!1);return}try{await d.performAuthCompleteSession()}catch(h){v(h instanceof Error?h.message:"Sign-in failed")}finally{try{const h=await d.fetchAuthStatus();n.setQueryData(ue.desktopAuthStatus(),h)}finally{g(!1)}}}async function N(){await a.refetch()}return{status:a.data,isChecking:a.isLoading,isRetryingStatus:a.isFetching,isPending:u,loginError:o,login:C,logout:E,isCompletingSession:m,completeSessionError:j,completeSession:y,retryStatus:N}}function Ze(n){return!(n.emailAndPassword.enabled||n.emailOtp.enabled||n.socialProviders.enabled)&&!n.sso.enabled&&n.magicLink.enabled}function et(){return oe.c(10),Xe(),null}function tt(n){const e=oe.c(25),{onContinue:a,isPending:u,error:f}=n,o=be();let i;e[0]!==o?(i=o("common.authEntry.browserOnlyTitle"),e[0]=o,e[1]=i):i=e[1];let m;e[2]!==i?(m=t.jsx("h1",{className:"text-lg font-medium text-foreground",children:i}),e[2]=i,e[3]=m):m=e[3];let g;e[4]!==o?(g=o("common.authEntry.browserOnlyDescription"),e[4]=o,e[5]=g):g=e[5];let j;e[6]!==g?(j=t.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:g}),e[6]=g,e[7]=j):j=e[7];let v;e[8]!==m||e[9]!==j?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[m,j]}),e[8]=m,e[9]=j,e[10]=v):v=e[10];let C;e[11]!==a?(C=()=>{a()},e[11]=a,e[12]=C):C=e[12];let E;e[13]!==o?(E=o("common.authEntry.browserOnlyCta"),e[13]=o,e[14]=E):E=e[14];let y;e[15]!==u||e[16]!==C||e[17]!==E?(y=t.jsx(xe,{onClick:C,disabled:u,children:E}),e[15]=u,e[16]=C,e[17]=E,e[18]=y):y=e[18];let N;e[19]!==f?(N=f&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:f}),e[19]=f,e[20]=N):N=e[20];let d;return e[21]!==v||e[22]!==y||e[23]!==N?(d=t.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[v,y,N]}),e[21]=v,e[22]=y,e[23]=N,e[24]=d):d=e[24],d}function Ie(n){const e=oe.c(8),{label:a,error:u}=n;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(_e,{size:"lg"}),e[0]=f):f=e[0];let o;e[1]!==a?(o=a&&t.jsx("p",{className:"text-sm text-muted-foreground",children:a}),e[1]=a,e[2]=o):o=e[2];let i;e[3]!==u?(i=u&&t.jsx("p",{className:"max-w-sm text-xs text-destructive",children:u}),e[3]=u,e[4]=i):i=e[4];let m;return e[5]!==o||e[6]!==i?(m=t.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[f,o,i]}),e[5]=o,e[6]=i,e[7]=m):m=e[7],m}class ke{constructor(e){this.response=e}response}function st(n){return n.startsWith("/")&&!n.startsWith("//")?n:"/"}function nt({redirectTo:n,onAuthEvent:e}){const a=be(),[u,f]=w.useState(null),o=w.useEffectEvent(i=>{try{e?.(i)}catch{}});return w.useEffect(()=>{let i=!1;return(async()=>{o({type:"started",method:"local"});try{let m;try{m=await Ye(async()=>{const g=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(g.status>=500)throw new ke(g);return g},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(g){if(g instanceof Le&&g.cause instanceof ke)m=g.cause.response;else throw g}if(!m.ok){const g=await m.json().catch(()=>({}));throw new Error(g?.error||a("common.authEntry.autoLoginFailed"))}i||(o({type:"succeeded",method:"local"}),window.location.href=st(n))}catch(m){i||(o({type:"failed",method:"local",stage:"authenticate",error:m instanceof Error?m.message:String(m)}),f(m instanceof Error?m.message:a("common.authEntry.autoLoginFailed")))}})(),()=>{i=!0}},[n]),u?t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-destructive mb-2",children:a("common.authEntry.autoLoginFailedWithError",{error:u})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:a("common.authEntry.tryRestartingServer")})]})}):t.jsx(Te,{})}function Te(){const n=oe.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(_e,{size:"lg",label:"Signing in"})}),n[0]=e):e=n[0],e}function rt({callbackURL:n,providerId:e,ssoSignIn:a,onAuthEvent:u}){const f=w.useEffectEvent(i=>{try{u?.(i)}catch{}}),o=w.useEffectEvent(a);return w.useEffect(()=>{(async()=>{f({type:"started",method:"sso",provider:e});try{const i=await o({providerId:e,callbackURL:n});if(i.error)throw new Error(i.error.message||"SSO redirect failed")}catch(i){f({type:"failed",method:"sso",provider:e,stage:"redirect",error:i instanceof Error?i.message:String(i)})}})()},[e,n]),t.jsx(Te,{})}function dt(n){const e=oe.c(51),{callbackUrl:a,redirectUrl:u,allowAutoLogin:f,title:o,subtitle:i,brand:m,copy:g,variant:j,allowedSocialProviders:v,allowPassword:C,onAuthEvent:E,onAuthenticated:y}=n,N=f===void 0?!0:f,d=be(),{sso:h,emailAndPassword:I,magicLink:te,emailOtp:se,socialProviders:le,localMode:de}=Fe(),p=et(),F=u||a;let b;e[0]!==y?(b=y?{onAuthenticated:y}:void 0,e[0]=y,e[1]=b):b=e[1];const _=b,L=p?.actions;let Q;e[2]!==_||e[3]!==L?(Q={...Oe,..._,...L},e[2]=_,e[3]=L,e[4]=Q):Q=e[4];const U=Q;if(p?.isPending){let l;e[5]!==d?(l=d("common.authEntry.finishSignInInBrowser"),e[5]=d,e[6]=l):l=e[6];let x;return e[7]!==p.loginError||e[8]!==l?(x=t.jsx(Ie,{label:l,error:p.loginError}),e[7]=p.loginError,e[8]=l,e[9]=x):x=e[9],x}if(p?.isCompletingSession){let l;e[10]!==d?(l=d("common.authEntry.finishingSignIn"),e[10]=d,e[11]=l):l=e[11];let x;return e[12]!==p.completeSessionError||e[13]!==l?(x=t.jsx(Ie,{label:l,error:p.completeSessionError}),e[12]=p.completeSessionError,e[13]=l,e[14]=x):x=e[14],x}if(de&&N){let l;return e[15]!==E||e[16]!==F?(l=t.jsx(nt,{redirectTo:F,onAuthEvent:E}),e[15]=E,e[16]=F,e[17]=l):l=e[17],l}if(h.enabled){let l;return e[18]!==E||e[19]!==F||e[20]!==U.ssoSignIn||e[21]!==h.providerId?(l=t.jsx(rt,{callbackURL:F,providerId:h.providerId,ssoSignIn:U.ssoSignIn,onAuthEvent:E}),e[18]=E,e[19]=F,e[20]=U.ssoSignIn,e[21]=h.providerId,e[22]=l):l=e[22],l}if(p&&Ze({emailAndPassword:I,emailOtp:se,socialProviders:le,magicLink:te,sso:h})){let l;return e[23]!==p.isPending||e[24]!==p.login||e[25]!==p.loginError?(l=t.jsx(tt,{onContinue:p.login,isPending:p.isPending,error:p.loginError}),e[23]=p.isPending,e[24]=p.login,e[25]=p.loginError,e[26]=l):l=e[26],l}if(I.enabled||te.enabled||se.enabled||le.enabled){const l=p?.loginError??p?.completeSessionError??null;let x;e[27]!==_||e[28]!==L?(x={..._,...L},e[27]=_,e[28]=L,e[29]=x):x=e[29];let $;e[30]!==C||e[31]!==v||e[32]!==m||e[33]!==a||e[34]!==g||e[35]!==E||e[36]!==u||e[37]!==i||e[38]!==x||e[39]!==o||e[40]!==j?($=t.jsx(Je,{redirectUrl:u,callbackUrl:a,title:o,subtitle:i,brand:m,copy:g,variant:j,allowedSocialProviders:v,allowPassword:C,onAuthEvent:E,actions:x}),e[30]=C,e[31]=v,e[32]=m,e[33]=a,e[34]=g,e[35]=E,e[36]=u,e[37]=i,e[38]=x,e[39]=o,e[40]=j,e[41]=$):$=e[41];const M=$;if(!l)return M;let W;e[42]!==l?(W=t.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:l}),e[42]=l,e[43]=W):W=e[43];let A;return e[44]!==M||e[45]!==W?(A=t.jsxs("div",{className:"grid gap-4",children:[W,M]}),e[44]=M,e[45]=W,e[46]=A):A=e[46],A}let O;e[47]!==d?(O=d("common.authEntry.noLoginOptions"),e[47]=d,e[48]=O):O=e[48];let D;return e[49]!==O?(D=t.jsx("div",{children:O}),e[49]=O,e[50]=D):D=e[50],D}export{Te as A,dt as a,Xe as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,l as p,j as f}from"./index-
|
|
1
|
+
import{c as g,l as p,j as f}from"./index-jpNIlPuy.js";function w(b){const e=g.c(20),{children:m,visual:r,align:j}=b,d=(j===void 0?"center":j)==="fill",x=d?"min-h-[100dvh] md:min-h-screen":"min-h-screen";let l;e[0]!==x?(l=p("flex w-full",x),e[0]=x,e[1]=l):l=e[1];const h=d?"h-[100dvh] justify-start pt-4 pb-8 md:h-auto":"justify-center py-6";let t;e[2]!==h?(t=p("flex flex-1 flex-col items-center bg-sidebar px-6 md:justify-center md:px-10 md:py-10",h),e[2]=h,e[3]=t):t=e[3];const u=d&&"flex min-h-0 flex-1 flex-col md:block md:flex-none";let s;e[4]!==u?(s=p("w-full max-w-[440px]",u),e[4]=u,e[5]=s):s=e[5];let i;e[6]!==m||e[7]!==s?(i=f.jsx("div",{className:s,children:m}),e[6]=m,e[7]=s,e[8]=i):i=e[8];let n;e[9]!==t||e[10]!==i?(n=f.jsx("section",{className:t,children:i}),e[9]=t,e[10]=i,e[11]=n):n=e[11];let c;e[12]!==r?(c=r??f.jsx("img",{src:"/onboarding-placeholder.png",alt:"",className:"absolute inset-0 h-full w-full object-cover"}),e[12]=r,e[13]=c):c=e[13];let a;e[14]!==c?(a=f.jsx("aside",{className:"relative hidden flex-1 overflow-hidden bg-muted md:flex",children:c}),e[14]=c,e[15]=a):a=e[15];let o;return e[16]!==a||e[17]!==l||e[18]!==n?(o=f.jsxs("main",{className:l,children:[n,a]}),e[16]=a,e[17]=l,e[18]=n,e[19]=o):o=e[19],o}export{w as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./index-
|
|
1
|
+
import"./index-jpNIlPuy.js";import{i as u,a as p}from"./mcp-oauth-DF-3wjVL.js";async function k({connectionId:n,orgId:s,orgSlug:o,persistFallback:r}){const c=new URL(`/api/${o}/mcp/${n}`,window.location.origin),i=await u({url:c.href,token:null,orgId:s});if(!i.supportsOAuth||i.isAuthenticated)return{ran:!1,ok:!0,error:null};const{token:t,tokenInfo:e,error:a}=await p({connectionId:n,orgSlug:o,scope:"offline_access"});if(a||!t)return{ran:!0,ok:!1,error:a??"no token received"};if(e)try{(await fetch(`/api/${o}/connections/${n}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:e.accessToken,refreshToken:e.refreshToken,expiresIn:e.expiresIn,scope:e.scope,clientId:e.clientId,clientSecret:e.clientSecret,tokenEndpoint:e.tokenEndpoint})})).ok||await r(t)}catch{await r(t)}else await r(t);return{ran:!0,ok:!0,error:null}}export{k as a};
|
package/dist/client/assets/{automation-list-row-B5bdsRlJ.js → automation-list-row-DhjFlSDJ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as q,b as J,r as U,l as W,j as t,F as X,B as Y,I as Z,H as ee,G as te}from"./index-
|
|
1
|
+
import{c as q,b as J,r as U,l as W,j as t,F as X,B as Y,I as Z,H as ee,G as te}from"./index-jpNIlPuy.js";import{A as se,a as ie,b as ne,c as oe,g as ae,d as re,e as le,f as ce}from"./alert-dialog-DG5_wKgz.js";import{A as me,K as ue}from"./agent-icon-zd22KZWY.js";import{i as de}from"./DotsVertical-DtamlI3j.js";import{s as fe}from"./Trash01-elTVICGJ.js";import{i as ge}from"./Zap-vgIAjKVr.js";import{a as xe}from"./use-virtual-mcp-BnIp2YQj.js";import{a as pe}from"./use-automations-CDFazwkf.js";function Ce(c){const e=q.c(80),{automation:s,showAgent:a,onClick:n}=c,i=J(),{remove:o}=pe(),[l,I]=U.useState(!1),r=xe(a?s.virtual_mcp_id:void 0);let M;e[0]!==s.id||e[1]!==o?(M=()=>{o.mutate(s.id),I(!1)},e[0]=s.id,e[1]=o,e[2]=M):M=e[2];const O=M;let S;e[3]!==n?(S=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=S):S=e[4];const H=S,G=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==G?(u=W("inline-block size-2 rounded-full shrink-0",G),e[5]=G,e[6]=u):u=e[6];const V=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==V?(d=i(V),e[7]=i,e[8]=V,e[9]=d):d=e[9];let f;e[10]!==u||e[11]!==d?(f=t.jsx("span",{className:u,"aria-label":d}),e[10]=u,e[11]=d,e[12]=f):f=e[12];let g;e[13]!==r?.icon||e[14]!==r?.title||e[15]!==s.name||e[16]!==a?(g=a&&t.jsx(me,{icon:r?.icon??null,name:r?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=r?.icon,e[14]=r?.title,e[15]=s.name,e[16]=a,e[17]=g):g=e[17];let x;e[18]!==s.name?(x=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.name}),e[18]=s.name,e[19]=x):x=e[19];let p;e[20]!==r||e[21]!==a?(p=a&&r&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",r.title]}),e[20]=r,e[21]=a,e[22]=p):p=e[22];let h;e[23]!==p||e[24]!==x?(h=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p]}),e[23]=p,e[24]=x,e[25]=h):h=e[25];let j;e[26]!==s.nearest_next_run_at||e[27]!==s.trigger_count?(j=t.jsx(we,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[26]=s.nearest_next_run_at,e[27]=s.trigger_count,e[28]=j):j=e[28];let w;e[29]!==h||e[30]!==j?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[h,j]}),e[29]=h,e[30]=j,e[31]=w):w=e[31];let E;e[32]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(X,{asChild:!0,children:t.jsx(Y,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(de,{size:16})})}),e[32]=E):E=e[32];let K,$;e[33]===Symbol.for("react.memo_cache_sentinel")?(K=m=>{m.stopPropagation(),I(!0)},$=t.jsx(fe,{size:16}),e[33]=K,e[34]=$):(K=e[33],$=e[34]);let v;e[35]!==i?(v=i("automations.automationListRow.delete"),e[35]=i,e[36]=v):v=e[36];let _;e[37]!==v?(_=t.jsx("div",{onClick:je,onKeyDown:he,role:"presentation",className:"shrink-0",children:t.jsxs(Z,{children:[E,t.jsx(ee,{align:"end",children:t.jsxs(te,{variant:"destructive",onClick:K,children:[$,v]})})]})}),e[37]=v,e[38]=_):_=e[38];let A;e[39]!==H||e[40]!==n||e[41]!==w||e[42]!==_||e[43]!==f||e[44]!==g?(A=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:H,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:[f,g,w,_]}),e[39]=H,e[40]=n,e[41]=w,e[42]=_,e[43]=f,e[44]=g,e[45]=A):A=e[45];let b;e[46]!==i?(b=i("automations.automationListRow.deleteTitle"),e[46]=i,e[47]=b):b=e[47];let D;e[48]!==b?(D=t.jsx(se,{children:b}),e[48]=b,e[49]=D):D=e[49];let N;e[50]!==s.name||e[51]!==i?(N=i("automations.automationListRow.deleteDescription",{name:s.name}),e[50]=s.name,e[51]=i,e[52]=N):N=e[52];let R;e[53]!==N?(R=t.jsx(ie,{children:N}),e[53]=N,e[54]=R):R=e[54];let y;e[55]!==D||e[56]!==R?(y=t.jsxs(ne,{children:[D,R]}),e[55]=D,e[56]=R,e[57]=y):y=e[57];let C;e[58]!==i?(C=i("automations.automationListRow.cancel"),e[58]=i,e[59]=C):C=e[59];let L;e[60]!==C?(L=t.jsx(oe,{children:C}),e[60]=C,e[61]=L):L=e[61];const Q=o.isPending;let k;e[62]!==i?(k=i("automations.automationListRow.deleteButton"),e[62]=i,e[63]=k):k=e[63];let P;e[64]!==O||e[65]!==o.isPending||e[66]!==k?(P=t.jsx(ae,{onClick:O,disabled:Q,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:k}),e[64]=O,e[65]=o.isPending,e[66]=k,e[67]=P):P=e[67];let T;e[68]!==L||e[69]!==P?(T=t.jsxs(re,{children:[L,P]}),e[68]=L,e[69]=P,e[70]=T):T=e[70];let z;e[71]!==y||e[72]!==T?(z=t.jsxs(le,{children:[y,T]}),e[71]=y,e[72]=T,e[73]=z):z=e[73];let F;e[74]!==l||e[75]!==z?(F=t.jsx(ce,{open:l,onOpenChange:I,children:z}),e[74]=l,e[75]=z,e[76]=F):F=e[76];let B;return e[77]!==A||e[78]!==F?(B=t.jsxs(t.Fragment,{children:[A,F]}),e[77]=A,e[78]=F,e[79]=B):B=e[79],B}function he(c){return c.stopPropagation()}function je(c){return c.stopPropagation()}function we(c){const e=q.c(8),{triggerCount:s,nextRunAt:a}=c,n=J();if(s===0){let o;e[0]!==n?(o=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=o):o=e[1];let l;return e[2]!==o?(l=t.jsx("span",{className:"text-xs text-muted-foreground",children:o}),e[2]=o,e[3]=l):l=e[3],l}let i;return e[4]!==a||e[5]!==n||e[6]!==s?(i=t.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:a?t.jsxs(t.Fragment,{children:[t.jsx(ue,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(a).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(ge,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=a,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{Ce as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as z,r as lt,b as X,a0 as it,z as rt,a6 as ct,K as tt,j as s,l as ut,m as dt,eM as mt}from"./index-Bv7m6pZJ.js";import{u as ft}from"./useInfiniteQuery-D7pUQ9-H.js";import{u as xt}from"./use-connection-B-USUnQN.js";import{u as pt}from"./use-mcp-client-CiFGnu7b.js";import{b as gt}from"./use-virtual-mcp-FRNqyFl7.js";import{b as ht,a as Rt}from"./sheet-CRpiY1-P.js";import{e as jt,a as Nt,b as st,T as G,d as bt,c as V}from"./table-BxgDzT2Q.js";import{E as et}from"./empty-state-B2SpKzDm.js";import{u as Tt}from"./use-infinite-scroll-BNK1GE9k.js";import{a as St}from"./use-members-Z0iLDtCA.js";import{g as vt}from"./task-status-DRe5owa5.js";import{e as wt}from"./use-automations-wHZIlCBG.js";import{T as Ct,f as at,a as nt}from"./thread-sheet-body-Dl3leyvL.js";function It(c){const t=z.c(15),[i,r]=lt.useState(null);let e;t[0]!==c||t[1]!==i?(e=i!==null?c.findIndex(u=>u.id===i):-1,t[0]=c,t[1]=i,t[2]=e):e=t[2];const a=e,o=a!==-1?c[a]:null,n=o!==null;let l,w;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=u=>r(u),w=()=>r(null),t[3]=l,t[4]=w):(l=t[3],w=t[4]);let f,x;t[5]!==a||t[6]!==c?(f=()=>{const u=c[a-1];a>0&&u&&r(u.id)},x=()=>{const u=c[a+1];a!==-1&&u&&r(u.id)},t[5]=a,t[6]=c,t[7]=f,t[8]=x):(f=t[7],x=t[8]);let m;return t[9]!==a||t[10]!==o||t[11]!==n||t[12]!==f||t[13]!==x?(m={selected:o,index:a,isOpen:n,select:l,close:w,prev:f,next:x},t[9]=a,t[10]=o,t[11]=n,t[12]=f,t[13]=x,t[14]=m):m=t[14],m}const W=50;function Y(c){const t=z.c(10),{title:i,value:r,subtitle:e}=c;let a;t[0]!==i?(a=s.jsx("span",{className:"text-sm text-foreground/70",children:i}),t[0]=i,t[1]=a):a=t[1];let o;t[2]!==r?(o=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:r}),t[2]=r,t[3]=o):o=t[3];let n;t[4]!==e?(n=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=n):n=t[5];let l;return t[6]!==a||t[7]!==o||t[8]!==n?(l=s.jsxs(mt,{className:"pt-4 px-4 pb-5 gap-1",children:[a,o,n]}),t[6]=a,t[7]=o,t[8]=n,t[9]=l):l=t[9],l}function kt(c){const t=z.c(45),{automationId:i,range:r}=c,e=X(),{data:a,isLoading:o}=wt(i,r),n=a?.runs,l=a?.usage;let w;t[0]!==n?(w=n&&n.total>0?`${Math.round(n.completed/n.total*100)}%`:"—",t[0]=n,t[1]=w):w=t[1];const f=w;let x;t[2]!==e||t[3]!==l?(x=l&&l.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:l.sampledRuns}):void 0,t[2]=e,t[3]=l,t[4]=x):x=t[4];const m=x;let u;t[5]!==e?(u=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=u):u=t[6];let g;t[7]!==o||t[8]!==n?.total?(g=o?"…":n?.total.toLocaleString()??"0",t[7]=o,t[8]=n?.total,t[9]=g):g=t[9];let h;t[10]!==n||t[11]!==e?(h=n?`${n.completed} ${e("automations.automationRuns.ok")} · ${n.failed} ${e("automations.automationRuns.failed")}${n.inProgress>0?` · ${n.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=n,t[11]=e,t[12]=h):h=t[12];let R;t[13]!==u||t[14]!==g||t[15]!==h?(R=s.jsx(Y,{title:u,value:g,subtitle:h}),t[13]=u,t[14]=g,t[15]=h,t[16]=R):R=t[16];let T;t[17]!==e?(T=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=T):T=t[18];const k=o?"…":f;let C;t[19]!==T||t[20]!==k?(C=s.jsx(Y,{title:T,value:k}),t[19]=T,t[20]=k,t[21]=C):C=t[21];let S;t[22]!==e?(S=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=S):S=t[23];let p;t[24]!==o||t[25]!==l?.totalTokens?(p=o?"…":at(l?.totalTokens??0),t[24]=o,t[25]=l?.totalTokens,t[26]=p):p=t[26];let I;t[27]!==S||t[28]!==p||t[29]!==m?(I=s.jsx(Y,{title:S,value:p,subtitle:m}),t[27]=S,t[28]=p,t[29]=m,t[30]=I):I=t[30];let d;t[31]!==e?(d=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=d):d=t[32];let j;t[33]!==o||t[34]!==l?(j=o?"…":l&&l.costUsd>0?nt(l.costUsd):"—",t[33]=o,t[34]=l,t[35]=j):j=t[35];let v;t[36]!==d||t[37]!==j||t[38]!==m?(v=s.jsx(Y,{title:d,value:j,subtitle:m}),t[36]=d,t[37]=j,t[38]=m,t[39]=v):v=t[39];let N;return t[40]!==I||t[41]!==v||t[42]!==R||t[43]!==C?(N=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[R,C,I,v]}),t[40]=I,t[41]=v,t[42]=R,t[43]=C,t[44]=N):N=t[44],N}function yt(c){const t=z.c(57),{run:i,usage:r,onClick:e,lastRowRef:a}=c,o=X();let n,l;if(t[0]!==i.created_at){const P=new Date(i.created_at);n=P.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=P.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=i.created_at,t[1]=n,t[2]=l}else n=t[1],l=t[2];const w=l;let f,x,m,u,g,h,R,T,k,C,S;if(t[3]!==a||t[4]!==e||t[5]!==i.status||t[6]!==i.title||t[7]!==o){const P=vt(i.status),U=P.icon;x=st,k=a,C="h-14 cursor-pointer hover:bg-muted/40 transition-colors border-b-0",S=e,t[19]!==i.title?(m=s.jsx(V,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:s.jsx("div",{className:"font-medium text-foreground truncate",children:i.title})}),t[19]=i.title,t[20]=m):m=t[20],f=V,T="w-28 px-3",h="flex items-center gap-1.5",R=s.jsx(U,{size:14,className:P.iconClassName}),u=ut("text-sm",P.labelColor),g=o(P.labelKey),t[3]=a,t[4]=e,t[5]=i.status,t[6]=i.title,t[7]=o,t[8]=f,t[9]=x,t[10]=m,t[11]=u,t[12]=g,t[13]=h,t[14]=R,t[15]=T,t[16]=k,t[17]=C,t[18]=S}else f=t[8],x=t[9],m=t[10],u=t[11],g=t[12],h=t[13],R=t[14],T=t[15],k=t[16],C=t[17],S=t[18];let p;t[21]!==u||t[22]!==g?(p=s.jsx("span",{className:u,children:g}),t[21]=u,t[22]=g,t[23]=p):p=t[23];let I;t[24]!==p||t[25]!==h||t[26]!==R?(I=s.jsxs("div",{className:h,children:[R,p]}),t[24]=p,t[25]=h,t[26]=R,t[27]=I):I=t[27];let d;t[28]!==f||t[29]!==I||t[30]!==T?(d=s.jsx(f,{className:T,children:I}),t[28]=f,t[29]=I,t[30]=T,t[31]=d):d=t[31];let j;t[32]!==r?(j=r?at(r.totalTokens):"—",t[32]=r,t[33]=j):j=t[33];let v;t[34]!==j?(v=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:j}),t[34]=j,t[35]=v):v=t[35];let N;t[36]!==r?(N=r&&r.costUsd>0?nt(r.costUsd):"—",t[36]=r,t[37]=N):N=t[37];let y;t[38]!==N?(y=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:N}),t[38]=N,t[39]=y):y=t[39];let D;t[40]!==n?(D=s.jsx("div",{children:n}),t[40]=n,t[41]=D):D=t[41];let _;t[42]!==w?(_=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:w}),t[42]=w,t[43]=_):_=t[43];let E;t[44]!==D||t[45]!==_?(E=s.jsxs(V,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,_]}),t[44]=D,t[45]=_,t[46]=E):E=t[46];let M;return t[47]!==x||t[48]!==m||t[49]!==d||t[50]!==v||t[51]!==y||t[52]!==E||t[53]!==k||t[54]!==C||t[55]!==S?(M=s.jsxs(x,{ref:k,className:C,onClick:S,children:[m,d,v,y,E]}),t[47]=x,t[48]=m,t[49]=d,t[50]=v,t[51]=y,t[52]=E,t[53]=k,t[54]=C,t[55]=S,t[56]=M):M=t[56],M}function Bt(c){const t=z.c(73),{automationId:i,triggerIds:r,range:e}=c,a=X(),{org:o,locator:n}=it();let l;t[0]!==o.id||t[1]!==o.slug?(l={connectionId:rt,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=l):l=t[2];const w=pt(l),f=ct(),x=xt(),m=gt(),{data:u}=St(),g=r.length>0;let h;t[3]!==i||t[4]!==o.id||t[5]!==r?(h=tt.automationRuns(o.id,i,r),t[3]=i,t[4]=o.id,t[5]=r,t[6]=h):h=t[6];let R;t[7]!==f||t[8]!==r?(R=async $=>{const{pageParam:J}=$,ot=J===void 0?0:J;return await f.call("COLLECTION_THREADS_LIST",{limit:W,offset:ot,where:{trigger_ids:r}})},t[7]=f,t[8]=r,t[9]=R):R=t[9];let T;t[10]!==g||t[11]!==h||t[12]!==R?(T={queryKey:h,queryFn:R,initialPageParam:0,getNextPageParam:Et,enabled:g,staleTime:3e4},t[10]=g,t[11]=h,t[12]=R,t[13]=T):T=t[13];const{data:k,fetchNextPage:C,hasNextPage:S,isFetchingNextPage:p,isLoading:I}=ft(T);let d,j,v,N;t[14]!==k?.pages||t[15]!==n||t[16]!==e?(d=(k?.pages??[]).flatMap(Dt),N=d.map(Pt),v=dt,j=tt.monitoringThreadUsage(n,JSON.stringify({ids:N,...e})),t[14]=k?.pages,t[15]=n,t[16]=e,t[17]=d,t[18]=j,t[19]=v,t[20]=N):(d=t[17],j=t[18],v=t[19],N=t[20]);let y;t[21]!==e||t[22]!==f||t[23]!==N?(y=async()=>await f.call("MONITORING_THREAD_USAGE",{threadIds:N,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=f,t[23]=N,t[24]=y):y=t[24];const D=N.length>0;let _;t[25]!==j||t[26]!==y||t[27]!==D?(_={queryKey:j,queryFn:y,enabled:D,staleTime:3e4},t[25]=j,t[26]=y,t[27]=D,t[28]=_):_=t[28];const{data:E}=v(_);let M;t[29]!==E?.items?(M=new Map((E?.items??[]).map(_t)),t[29]=E?.items,t[30]=M):M=t[30];const P=M;let U;t[31]!==C||t[32]!==S||t[33]!==p?(U=()=>{S&&!p&&C()},t[31]=C,t[32]=S,t[33]=p,t[34]=U):U=t[34];const Z=Tt(U,S??!1,p),b=It(d),B=b.selected;let L;t[35]!==i||t[36]!==e?(L=s.jsx(kt,{automationId:i,range:e}),t[35]=i,t[36]=e,t[37]=L):L=t[37];let O;t[38]!==g||t[39]!==I||t[40]!==Z||t[41]!==d||t[42]!==b||t[43]!==a||t[44]!==P?(O=g?I?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingRuns")}):d.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noRunsTitle"),description:a("automations.automationRuns.noRunsDescription")})}):s.jsxs(jt,{className:"w-full border-collapse",children:[s.jsx(Nt,{className:"border-b-0",children:s.jsxs(st,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(G,{className:"pl-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.startedHeader")})]})}),s.jsx(bt,{children:d.map(($,J)=>s.jsx(yt,{run:$,usage:P.get($.id),onClick:()=>b.select($.id),lastRowRef:J===d.length-1?Z:void 0},$.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noStartersTitle"),description:a("automations.automationRuns.noStartersDescription")})}),t[38]=g,t[39]=I,t[40]=Z,t[41]=d,t[42]=b,t[43]=a,t[44]=P,t[45]=O):O=t[45];let A;t[46]!==p||t[47]!==a?(A=p&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingMore")}),t[46]=p,t[47]=a,t[48]=A):A=t[48];let H;t[49]!==b?(H=$=>{$||b.close()},t[49]=b,t[50]=H):H=t[50];let K;t[51]!==x||t[52]!==m||t[53]!==w||t[54]!==n||t[55]!==u||t[56]!==d||t[57]!==B||t[58]!==b.index||t[59]!==b.next||t[60]!==b.prev?(K=B&&s.jsx(Ct,{thread:B,client:w,locator:n,connections:x,virtualMcps:m,members:u,nav:{index:b.index,total:d.length,onPrev:b.prev,onNext:b.next}}),t[51]=x,t[52]=m,t[53]=w,t[54]=n,t[55]=u,t[56]=d,t[57]=B,t[58]=b.index,t[59]=b.next,t[60]=b.prev,t[61]=K):K=t[61];let q;t[62]!==K?(q=s.jsx(Rt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:K}),t[62]=K,t[63]=q):q=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==q?(F=s.jsx(ht,{open:b.isOpen,onOpenChange:H,children:q}),t[64]=b.isOpen,t[65]=H,t[66]=q,t[67]=F):F=t[67];let Q;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(Q=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,O,A,F]}),t[68]=L,t[69]=O,t[70]=A,t[71]=F,t[72]=Q):Q=t[72],Q}function _t(c){return[c.threadId,{calls:c.calls,inputTokens:c.inputTokens,outputTokens:c.outputTokens,totalTokens:c.totalTokens,costUsd:c.costUsd}]}function Pt(c){return c.id}function Dt(c){return c.items??[]}function Et(c,t){const i=c,r=t;if(!((i?.items?.length??0)<W))return r.length*W}export{Bt as A,It as u};
|
|
1
|
+
import{c as z,r as lt,b as X,a0 as it,z as rt,a6 as ct,K as tt,j as s,l as ut,m as dt,eM as mt}from"./index-jpNIlPuy.js";import{u as ft}from"./useInfiniteQuery-HKtw1Zwv.js";import{u as xt}from"./use-connection-CMx-XZiq.js";import{u as pt}from"./use-mcp-client-C8DXVUZj.js";import{b as gt}from"./use-virtual-mcp-BnIp2YQj.js";import{b as ht,a as Rt}from"./sheet-n9kcgSxF.js";import{e as jt,a as Nt,b as st,T as G,d as bt,c as V}from"./table-CVXiShGi.js";import{E as et}from"./empty-state-gX-Wv4YC.js";import{u as Tt}from"./use-infinite-scroll-CSRrFY6h.js";import{a as St}from"./use-members-CAwVsdC4.js";import{g as vt}from"./task-status-DbQ_mzm6.js";import{e as wt}from"./use-automations-CDFazwkf.js";import{T as Ct,f as at,a as nt}from"./thread-sheet-body-hFIE9VHn.js";function It(c){const t=z.c(15),[i,r]=lt.useState(null);let e;t[0]!==c||t[1]!==i?(e=i!==null?c.findIndex(u=>u.id===i):-1,t[0]=c,t[1]=i,t[2]=e):e=t[2];const a=e,o=a!==-1?c[a]:null,n=o!==null;let l,w;t[3]===Symbol.for("react.memo_cache_sentinel")?(l=u=>r(u),w=()=>r(null),t[3]=l,t[4]=w):(l=t[3],w=t[4]);let f,x;t[5]!==a||t[6]!==c?(f=()=>{const u=c[a-1];a>0&&u&&r(u.id)},x=()=>{const u=c[a+1];a!==-1&&u&&r(u.id)},t[5]=a,t[6]=c,t[7]=f,t[8]=x):(f=t[7],x=t[8]);let m;return t[9]!==a||t[10]!==o||t[11]!==n||t[12]!==f||t[13]!==x?(m={selected:o,index:a,isOpen:n,select:l,close:w,prev:f,next:x},t[9]=a,t[10]=o,t[11]=n,t[12]=f,t[13]=x,t[14]=m):m=t[14],m}const W=50;function Y(c){const t=z.c(10),{title:i,value:r,subtitle:e}=c;let a;t[0]!==i?(a=s.jsx("span",{className:"text-sm text-foreground/70",children:i}),t[0]=i,t[1]=a):a=t[1];let o;t[2]!==r?(o=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:r}),t[2]=r,t[3]=o):o=t[3];let n;t[4]!==e?(n=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=n):n=t[5];let l;return t[6]!==a||t[7]!==o||t[8]!==n?(l=s.jsxs(mt,{className:"pt-4 px-4 pb-5 gap-1",children:[a,o,n]}),t[6]=a,t[7]=o,t[8]=n,t[9]=l):l=t[9],l}function kt(c){const t=z.c(45),{automationId:i,range:r}=c,e=X(),{data:a,isLoading:o}=wt(i,r),n=a?.runs,l=a?.usage;let w;t[0]!==n?(w=n&&n.total>0?`${Math.round(n.completed/n.total*100)}%`:"—",t[0]=n,t[1]=w):w=t[1];const f=w;let x;t[2]!==e||t[3]!==l?(x=l&&l.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:l.sampledRuns}):void 0,t[2]=e,t[3]=l,t[4]=x):x=t[4];const m=x;let u;t[5]!==e?(u=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=u):u=t[6];let g;t[7]!==o||t[8]!==n?.total?(g=o?"…":n?.total.toLocaleString()??"0",t[7]=o,t[8]=n?.total,t[9]=g):g=t[9];let h;t[10]!==n||t[11]!==e?(h=n?`${n.completed} ${e("automations.automationRuns.ok")} · ${n.failed} ${e("automations.automationRuns.failed")}${n.inProgress>0?` · ${n.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=n,t[11]=e,t[12]=h):h=t[12];let R;t[13]!==u||t[14]!==g||t[15]!==h?(R=s.jsx(Y,{title:u,value:g,subtitle:h}),t[13]=u,t[14]=g,t[15]=h,t[16]=R):R=t[16];let T;t[17]!==e?(T=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=T):T=t[18];const k=o?"…":f;let C;t[19]!==T||t[20]!==k?(C=s.jsx(Y,{title:T,value:k}),t[19]=T,t[20]=k,t[21]=C):C=t[21];let S;t[22]!==e?(S=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=S):S=t[23];let p;t[24]!==o||t[25]!==l?.totalTokens?(p=o?"…":at(l?.totalTokens??0),t[24]=o,t[25]=l?.totalTokens,t[26]=p):p=t[26];let I;t[27]!==S||t[28]!==p||t[29]!==m?(I=s.jsx(Y,{title:S,value:p,subtitle:m}),t[27]=S,t[28]=p,t[29]=m,t[30]=I):I=t[30];let d;t[31]!==e?(d=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=d):d=t[32];let j;t[33]!==o||t[34]!==l?(j=o?"…":l&&l.costUsd>0?nt(l.costUsd):"—",t[33]=o,t[34]=l,t[35]=j):j=t[35];let v;t[36]!==d||t[37]!==j||t[38]!==m?(v=s.jsx(Y,{title:d,value:j,subtitle:m}),t[36]=d,t[37]=j,t[38]=m,t[39]=v):v=t[39];let N;return t[40]!==I||t[41]!==v||t[42]!==R||t[43]!==C?(N=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[R,C,I,v]}),t[40]=I,t[41]=v,t[42]=R,t[43]=C,t[44]=N):N=t[44],N}function yt(c){const t=z.c(57),{run:i,usage:r,onClick:e,lastRowRef:a}=c,o=X();let n,l;if(t[0]!==i.created_at){const P=new Date(i.created_at);n=P.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=P.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=i.created_at,t[1]=n,t[2]=l}else n=t[1],l=t[2];const w=l;let f,x,m,u,g,h,R,T,k,C,S;if(t[3]!==a||t[4]!==e||t[5]!==i.status||t[6]!==i.title||t[7]!==o){const P=vt(i.status),U=P.icon;x=st,k=a,C="h-14 cursor-pointer hover:bg-muted/40 transition-colors border-b-0",S=e,t[19]!==i.title?(m=s.jsx(V,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:s.jsx("div",{className:"font-medium text-foreground truncate",children:i.title})}),t[19]=i.title,t[20]=m):m=t[20],f=V,T="w-28 px-3",h="flex items-center gap-1.5",R=s.jsx(U,{size:14,className:P.iconClassName}),u=ut("text-sm",P.labelColor),g=o(P.labelKey),t[3]=a,t[4]=e,t[5]=i.status,t[6]=i.title,t[7]=o,t[8]=f,t[9]=x,t[10]=m,t[11]=u,t[12]=g,t[13]=h,t[14]=R,t[15]=T,t[16]=k,t[17]=C,t[18]=S}else f=t[8],x=t[9],m=t[10],u=t[11],g=t[12],h=t[13],R=t[14],T=t[15],k=t[16],C=t[17],S=t[18];let p;t[21]!==u||t[22]!==g?(p=s.jsx("span",{className:u,children:g}),t[21]=u,t[22]=g,t[23]=p):p=t[23];let I;t[24]!==p||t[25]!==h||t[26]!==R?(I=s.jsxs("div",{className:h,children:[R,p]}),t[24]=p,t[25]=h,t[26]=R,t[27]=I):I=t[27];let d;t[28]!==f||t[29]!==I||t[30]!==T?(d=s.jsx(f,{className:T,children:I}),t[28]=f,t[29]=I,t[30]=T,t[31]=d):d=t[31];let j;t[32]!==r?(j=r?at(r.totalTokens):"—",t[32]=r,t[33]=j):j=t[33];let v;t[34]!==j?(v=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:j}),t[34]=j,t[35]=v):v=t[35];let N;t[36]!==r?(N=r&&r.costUsd>0?nt(r.costUsd):"—",t[36]=r,t[37]=N):N=t[37];let y;t[38]!==N?(y=s.jsx(V,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:N}),t[38]=N,t[39]=y):y=t[39];let D;t[40]!==n?(D=s.jsx("div",{children:n}),t[40]=n,t[41]=D):D=t[41];let _;t[42]!==w?(_=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:w}),t[42]=w,t[43]=_):_=t[43];let E;t[44]!==D||t[45]!==_?(E=s.jsxs(V,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,_]}),t[44]=D,t[45]=_,t[46]=E):E=t[46];let M;return t[47]!==x||t[48]!==m||t[49]!==d||t[50]!==v||t[51]!==y||t[52]!==E||t[53]!==k||t[54]!==C||t[55]!==S?(M=s.jsxs(x,{ref:k,className:C,onClick:S,children:[m,d,v,y,E]}),t[47]=x,t[48]=m,t[49]=d,t[50]=v,t[51]=y,t[52]=E,t[53]=k,t[54]=C,t[55]=S,t[56]=M):M=t[56],M}function Bt(c){const t=z.c(73),{automationId:i,triggerIds:r,range:e}=c,a=X(),{org:o,locator:n}=it();let l;t[0]!==o.id||t[1]!==o.slug?(l={connectionId:rt,orgId:o.id,orgSlug:o.slug},t[0]=o.id,t[1]=o.slug,t[2]=l):l=t[2];const w=pt(l),f=ct(),x=xt(),m=gt(),{data:u}=St(),g=r.length>0;let h;t[3]!==i||t[4]!==o.id||t[5]!==r?(h=tt.automationRuns(o.id,i,r),t[3]=i,t[4]=o.id,t[5]=r,t[6]=h):h=t[6];let R;t[7]!==f||t[8]!==r?(R=async $=>{const{pageParam:J}=$,ot=J===void 0?0:J;return await f.call("COLLECTION_THREADS_LIST",{limit:W,offset:ot,where:{trigger_ids:r}})},t[7]=f,t[8]=r,t[9]=R):R=t[9];let T;t[10]!==g||t[11]!==h||t[12]!==R?(T={queryKey:h,queryFn:R,initialPageParam:0,getNextPageParam:Et,enabled:g,staleTime:3e4},t[10]=g,t[11]=h,t[12]=R,t[13]=T):T=t[13];const{data:k,fetchNextPage:C,hasNextPage:S,isFetchingNextPage:p,isLoading:I}=ft(T);let d,j,v,N;t[14]!==k?.pages||t[15]!==n||t[16]!==e?(d=(k?.pages??[]).flatMap(Dt),N=d.map(Pt),v=dt,j=tt.monitoringThreadUsage(n,JSON.stringify({ids:N,...e})),t[14]=k?.pages,t[15]=n,t[16]=e,t[17]=d,t[18]=j,t[19]=v,t[20]=N):(d=t[17],j=t[18],v=t[19],N=t[20]);let y;t[21]!==e||t[22]!==f||t[23]!==N?(y=async()=>await f.call("MONITORING_THREAD_USAGE",{threadIds:N,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=f,t[23]=N,t[24]=y):y=t[24];const D=N.length>0;let _;t[25]!==j||t[26]!==y||t[27]!==D?(_={queryKey:j,queryFn:y,enabled:D,staleTime:3e4},t[25]=j,t[26]=y,t[27]=D,t[28]=_):_=t[28];const{data:E}=v(_);let M;t[29]!==E?.items?(M=new Map((E?.items??[]).map(_t)),t[29]=E?.items,t[30]=M):M=t[30];const P=M;let U;t[31]!==C||t[32]!==S||t[33]!==p?(U=()=>{S&&!p&&C()},t[31]=C,t[32]=S,t[33]=p,t[34]=U):U=t[34];const Z=Tt(U,S??!1,p),b=It(d),B=b.selected;let L;t[35]!==i||t[36]!==e?(L=s.jsx(kt,{automationId:i,range:e}),t[35]=i,t[36]=e,t[37]=L):L=t[37];let O;t[38]!==g||t[39]!==I||t[40]!==Z||t[41]!==d||t[42]!==b||t[43]!==a||t[44]!==P?(O=g?I?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingRuns")}):d.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noRunsTitle"),description:a("automations.automationRuns.noRunsDescription")})}):s.jsxs(jt,{className:"w-full border-collapse",children:[s.jsx(Nt,{className:"border-b-0",children:s.jsxs(st,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(G,{className:"pl-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:a("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:a("automations.automationRuns.startedHeader")})]})}),s.jsx(bt,{children:d.map(($,J)=>s.jsx(yt,{run:$,usage:P.get($.id),onClick:()=>b.select($.id),lastRowRef:J===d.length-1?Z:void 0},$.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:a("automations.automationRuns.noStartersTitle"),description:a("automations.automationRuns.noStartersDescription")})}),t[38]=g,t[39]=I,t[40]=Z,t[41]=d,t[42]=b,t[43]=a,t[44]=P,t[45]=O):O=t[45];let A;t[46]!==p||t[47]!==a?(A=p&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:a("automations.automationRuns.loadingMore")}),t[46]=p,t[47]=a,t[48]=A):A=t[48];let H;t[49]!==b?(H=$=>{$||b.close()},t[49]=b,t[50]=H):H=t[50];let K;t[51]!==x||t[52]!==m||t[53]!==w||t[54]!==n||t[55]!==u||t[56]!==d||t[57]!==B||t[58]!==b.index||t[59]!==b.next||t[60]!==b.prev?(K=B&&s.jsx(Ct,{thread:B,client:w,locator:n,connections:x,virtualMcps:m,members:u,nav:{index:b.index,total:d.length,onPrev:b.prev,onNext:b.next}}),t[51]=x,t[52]=m,t[53]=w,t[54]=n,t[55]=u,t[56]=d,t[57]=B,t[58]=b.index,t[59]=b.next,t[60]=b.prev,t[61]=K):K=t[61];let q;t[62]!==K?(q=s.jsx(Rt,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:K}),t[62]=K,t[63]=q):q=t[63];let F;t[64]!==b.isOpen||t[65]!==H||t[66]!==q?(F=s.jsx(ht,{open:b.isOpen,onOpenChange:H,children:q}),t[64]=b.isOpen,t[65]=H,t[66]=q,t[67]=F):F=t[67];let Q;return t[68]!==L||t[69]!==O||t[70]!==A||t[71]!==F?(Q=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,O,A,F]}),t[68]=L,t[69]=O,t[70]=A,t[71]=F,t[72]=Q):Q=t[72],Q}function _t(c){return[c.threadId,{calls:c.calls,inputTokens:c.inputTokens,outputTokens:c.outputTokens,totalTokens:c.totalTokens,costUsd:c.costUsd}]}function Pt(c){return c.id}function Dt(c){return c.items??[]}function Et(c,t){const i=c,r=t;if(!((i?.items?.length??0)<W))return r.length*W}export{Bt as A,It as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as e,b as $,a0 as D,d as M,r as q,n as d,B as V,fz as F,q as R}from"./index-
|
|
1
|
+
import{c as k,j as e,b as $,a0 as D,d as M,r as q,n as d,B as V,fz as F,q as R}from"./index-jpNIlPuy.js";import{s as G}from"./Plus-DVO5ynNJ.js";import{i as S}from"./Zap-vgIAjKVr.js";import{S as H}from"./search-input-BDrnENeI.js";import{E as T}from"./empty-state-gX-Wv4YC.js";import{u as J}from"./use-automations-CDFazwkf.js";import{u as K}from"./use-navigate-to-agent-ebIYYmYW.js";import{A as O}from"./automation-list-row-DhjFlSDJ.js";import{b as Q}from"./use-virtual-mcp-BnIp2YQj.js";import{R as U}from"./require-capability-DbxXicMT.js";import"./SearchMd-4YJlY5kp.js";import"./use-mcp-client-C8DXVUZj.js";import"./auth-53fyYgiO.js";import"./hooks-AXSBDhcZ.js";import"./backoff-8mStPHYB.js";import"./task-board-Ny1PbjMW.js";import"./schema-CbxRw8u0.js";import"./thread-intent-CDjInTZL.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-BknN0SVI.js";import"./alert-dialog-DG5_wKgz.js";import"./agent-icon-zd22KZWY.js";import"./AlertCircle-Bw5IjQll.js";import"./Tool01-BGKWFxqT.js";import"./ArrowUp-siSqnojJ.js";import"./ArrowLeft-o7Y-fEOP.js";import"./ArrowRight-B9KOH6Mp.js";import"./XCircle-Cn_6vXwx.js";import"./ZoomOut-DckCENcg.js";import"./Globe04-CvitSAdn.js";import"./CheckCircle-BMHJHOxj.js";import"./Check-UJc6KAi4.js";import"./ChevronUp-BfOf-CcT.js";import"./UserSquare-CjWcARYJ.js";import"./Copy01-jqAaecgQ.js";import"./CreditCard01-CTgYXlxC.js";import"./DotsVertical-DtamlI3j.js";import"./Download01-BncQoTgS.js";import"./Eye-B7WWrfVK.js";import"./Share07-slK9gs7d.js";import"./XClose-B001-Pfs.js";import"./Image01-BcdinLnP.js";import"./Key01-DfBLIcDO.js";import"./LayoutLeft-fyXbrdze.js";import"./Link01-CUNNOfMo.js";import"./LinkExternal01-CjlXJ8JK.js";import"./Monitor01-Bgx96mK1.js";import"./Sun-CD9h4ghg.js";import"./Package-CCyqVpLL.js";import"./Palette-uwPl9fbG.js";import"./SearchLg-BuXTAvmm.js";import"./Stars01-BHCqXxdF.js";import"./Trash01-elTVICGJ.js";import"./Upload01-C_pNo17d.js";import"./User01-A5ycKGmZ.js";import"./Users01-CYLXmuWv.js";import"./X-DfL64JB-.js";import"./access-gate-0Jk-hZos.js";import"./capability-load-error-ULojqFhh.js";function W(){const t=k.c(20),o=$(),{org:l}=D(),{data:y}=J(void 0),g=y===void 0?[]:y,z=Q(),E=K(),f=M(),[x,P]=q.useState(""),h=x.toLowerCase(),b=new Map(z.map(X)),A=g.filter(i=>{if(!h||i.name.toLowerCase().includes(h))return!0;if(i.virtual_mcp_id){const p=b.get(i.virtual_mcp_id);if(p&&p.title.toLowerCase().includes(h))return!0}return!1}),B=(i,p)=>{const N=p&&b.has(p)?p:F(l.id);R("automations_list_row_clicked",{automation_id:i,agent_id:N,source:"settings_automations"}),E(N,{panel:`automation:${i}`})};let c;t[0]!==f||t[1]!==l.slug?(c=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/agents",params:{org:l.slug}})},t[0]=f,t[1]=l.slug,t[2]=c):c=t[2];const L=c,j=d,C=d,v=d;let s;t[3]!==o?(s=o("settings.automations.pageTitle"),t[3]=o,t[4]=s):s=t[4];let r;t[5]!==s?(r=e.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const w=g.length>0&&e.jsx(H,{value:x,onChange:P,placeholder:o("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let n;t[7]!==r||t[8]!==w?(n=e.jsxs("div",{className:"flex flex-col gap-6",children:[r,w]}),t[7]=r,t[8]=w,t[9]=n):n=t[9];const _=g.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.emptyTitle"),description:o("settings.automations.emptyDescription"),actions:e.jsxs(V,{size:"sm",onClick:L,children:[e.jsx(G,{size:14}),o("settings.automations.browseAgentsButton")]})})}):A.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(S,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.noResultsTitle"),description:o("settings.automations.noResultsDescription",{search:x})})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:A.map(i=>e.jsx(O,{automation:i,showAgent:!0,onClick:()=>B(i.id,i.virtual_mcp_id)},i.id))});let a;t[10]!==v.Container||t[11]!==n||t[12]!==_?(a=e.jsxs(v.Container,{children:[n,_]}),t[10]=v.Container,t[11]=n,t[12]=_,t[13]=a):a=t[13];let m;t[14]!==C.Content||t[15]!==a?(m=e.jsx(C.Content,{children:a}),t[14]=C.Content,t[15]=a,t[16]=m):m=t[16];let u;return t[17]!==j||t[18]!==m?(u=e.jsx(j,{children:m}),t[17]=j,t[18]=m,t[19]=u):u=t[19],u}function X(t){return[t.id,t]}function oe(){const t=k.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(U,{capability:"automations:manage",area:"automations",children:e.jsx(W,{})}),t[0]=o):o=t[0],o}export{oe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as d}from"./index-
|
|
1
|
+
import{$ as d}from"./index-jpNIlPuy.js";const m=1e4,y="true",i=2;function a(t,n){return d.chatAutosend(t,n)}function l(t){return t==="pending"||t==="sending"}function f(t){if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!n||typeof n!="object")return null;const e=n;let o=0;e.status==="sending"?o=e.retryAt===void 0?1:i:e.retryAt!==void 0&&(o=1);const r=e.attempt===void 0?o:e.attempt;return typeof e.createdAt!="number"||typeof e.message!="object"||!l(e.status)||e.retryAt!==void 0&&typeof e.retryAt!="number"||typeof r!="number"||!Number.isInteger(r)||r<0||r>i?null:{...n,attempt:r}}function S(t,n,e,o,r=Date.now()){const s={message:o,createdAt:r,status:"pending",attempt:0};return t.setItem(a(n,e),JSON.stringify(s)),s}function p(t,n,e){const o=a(n,e),r=f(t.getItem(o));return r||(t.removeItem(o),null)}function g(t,n,e,o=Date.now()){const r=a(n,e),s=p(t,n,e);if(!s||s.status!=="pending")return null;if(s.attempt>=i)return t.removeItem(r),null;const c=s.retryAt??s.createdAt;if(o-c>=m)return t.removeItem(r),null;const u={...s,status:"sending",attempt:s.attempt+1};return t.setItem(r,JSON.stringify(u)),{message:u.message,createdAt:u.createdAt,attempt:u.attempt}}function T(t,n,e){t.removeItem(a(n,e))}export{y as A,T as a,g as c,S as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as i,l as f,aE as R,bd as V,be as I,bf as $}from"./index-
|
|
1
|
+
import{c as k,j as i,l as f,aE as R,bd as V,be as I,bf as $}from"./index-jpNIlPuy.js";import{s as E}from"./User01-A5ycKGmZ.js";function O(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=f("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($,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function U(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=f("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(V,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}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=f("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(I,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const C=["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"],L="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function T(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%C.length;return C[s]}const S=R("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"}}),_=R("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),D=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 W(r){const e=k.c(34);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 m=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g;let x;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],x=c;break e}x=t}const b=x;let y;e:{if(j){y=L;break e}if(typeof t=="string"){let c;e[11]!==t?(c=T(t),e[11]=t,e[12]=c):c=e[12],y=c;break e}y=C[0]}const z=y;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 F=q;let w;e[18]!==s||e[19]!==m||e[20]!==h?(w=f(S({shape:m,size:h}),s),e[18]=s,e[19]=m,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==z||e[23]!==b||e[24]!==F||e[25]!==p||e[26]!==u||e[27]!==h||e[28]!==l?(v=p&&F?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",z),children:i.jsx(E,{size:D(h)})}):i.jsxs(i.Fragment,{children:[l&&i.jsx(U,{src:l,loading:"lazy",alt:"Avatar",className:f(_({objectFit:u}))}),i.jsx(M,{className:f(z,"rounded-none"),delayMs:l?600:0,children:b})]}),e[22]=z,e[23]=b,e[24]=F,e[25]=p,e[26]=u,e[27]=h,e[28]=l,e[29]=v):v=e[29];let A;return e[30]!==o||e[31]!==v||e[32]!==w?(A=i.jsx(O,{className:w,...o,children:v}),e[30]=o,e[31]=v,e[32]=w,e[33]=A):A=e[33],A}function B(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 m=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,x=h??"base";let b;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==m||e[15]!==x||e[16]!==l?(b=i.jsx(W,{shape:m,url:l,fallback:t,size:x,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=m,e[15]=x,e[16]=l,e[17]=b):b=e[17],b}B.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(S({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{B as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,l,j as u,bg as v,aE as b}from"./index-
|
|
1
|
+
import{c as g,l,j as u,bg as v,aE as b}from"./index-jpNIlPuy.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",segmented:"h-7 gap-0 rounded-lg border-transparent bg-card p-0 card-shadow"}},defaultVariants:{variant:"default",size:"default"}});function h(d){const e=g.c(14);let r,s,a,n,t;e[0]!==d?({className:r,variant:t,size:a,asChild:n,...s}=d,e[0]=d,e[1]=r,e[2]=s,e[3]=a,e[4]=n,e[5]=t):(r=e[1],s=e[2],a=e[3],n=e[4],t=e[5]);const c=(n===void 0?!1:n)?v:"span";let i;e[6]!==r||e[7]!==a||e[8]!==t?(i=l(f({variant:t,size:a}),r),e[6]=r,e[7]=a,e[8]=t,e[9]=i):i=e[9];let o;return e[10]!==c||e[11]!==s||e[12]!==i?(o=u.jsx(c,{"data-slot":"badge",className:i,...s}),e[10]=c,e[11]=s,e[12]=i,e[13]=o):o=e[13],o}export{h as B};
|