decocms 4.573.0 → 4.574.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-Cn7aLqGD.js → AlertCircle-Co3RPbIZ.js} +1 -1
- package/dist/client/assets/{AreaChart-CMeTgrZu.js → AreaChart-BvS2pAoE.js} +1 -1
- package/dist/client/assets/{ArrowLeft-Clex4DU3.js → ArrowLeft-XBSBGQal.js} +1 -1
- package/dist/client/assets/{ArrowUp-DPT2wlR7.js → ArrowUp-DLnkUu9S.js} +1 -1
- package/dist/client/assets/{CartesianChart-B2gOTKNo.js → CartesianChart-DOb1QHVF.js} +1 -1
- package/dist/client/assets/{CategoricalChart-Djc5Q1Zp.js → CategoricalChart-BkeCXQf9.js} +1 -1
- package/dist/client/assets/{CheckCircle-l0BgBdex.js → CheckCircle-kNwBDDVU.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BbXlLdNT.js → ChevronSelectorVertical-Gg7YcxlH.js} +1 -1
- package/dist/client/assets/{ChevronUp-D0xD4CWi.js → ChevronUp-D1T3kSyr.js} +1 -1
- package/dist/client/assets/{CreditCard01-CAgfpVLC.js → CreditCard01-D65BAIaV.js} +1 -1
- package/dist/client/assets/{Globe04-DFwi3CoQ.js → Globe04-D17A2x5l.js} +1 -1
- package/dist/client/assets/{Key01-q3498IuC.js → Key01-awxHKnoL.js} +1 -1
- package/dist/client/assets/{LinkBroken01-BkclpWPr.js → LinkBroken01-loTkm0G5.js} +1 -1
- package/dist/client/assets/{Minus-D2H1757g.js → Minus-CYrsmoRb.js} +1 -1
- package/dist/client/assets/{Monitor01-pdAw5Hpb.js → Monitor01-DalIAdj7.js} +1 -1
- package/dist/client/assets/{Play-mj0Zbxy1.js → Play-C6Weq-wk.js} +1 -1
- package/dist/client/assets/{Plus-DD-WVS1P.js → Plus-D7X8Q2-q.js} +1 -1
- package/dist/client/assets/{ReferenceLine-obrmbgU1.js → ReferenceLine-HGyXAqMo.js} +1 -1
- package/dist/client/assets/{SearchMd-D2GFNI7a.js → SearchMd-e6xPeRPD.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-BQMf6OTu.js → ShoppingBag01-zloi0TDl.js} +1 -1
- package/dist/client/assets/{Sun-BWeGTNdA.js → Sun-C1lyqton.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-amrllZXH.js → SwitchHorizontal01-elXb4-4d.js} +1 -1
- package/dist/client/assets/{Tool01-CMaWHp8E.js → Tool01-Bo2g-Ylw.js} +1 -1
- package/dist/client/assets/{Tooltip-DFEqzaZu.js → Tooltip-C2g-R1Ae.js} +1 -1
- package/dist/client/assets/{Trash01-CrG-kC_D.js → Trash01-C-PU5Hm-.js} +1 -1
- package/dist/client/assets/{Upload01-CyQARd6T.js → Upload01-NPnXKs-J.js} +1 -1
- package/dist/client/assets/{UserSquare-CPjVW48L.js → UserSquare-Qd-FKVqK.js} +1 -1
- package/dist/client/assets/{Users01-BPY3vewQ.js → Users01-CTNixqdX.js} +1 -1
- package/dist/client/assets/{XClose-BBI2UlVL.js → XClose-BuJ6u6eL.js} +1 -1
- package/dist/client/assets/{Zap-B1DyovfK.js → Zap-pmN7zSOE.js} +1 -1
- package/dist/client/assets/{access-gate-ZWgi9qYj.js → access-gate-Bj4L1Bay.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-BQNXbA5n.js → add-connection-dialog-BL3Uj9Py.js} +1 -1
- package/dist/client/assets/agent-app-C3J9IT10.js +1 -0
- package/dist/client/assets/agent-assets-CvnH7aBA.js +1 -0
- package/dist/client/assets/{agent-automation-CU9zTpQA.js → agent-automation-Bea1eB6T.js} +2 -2
- package/dist/client/assets/agent-automations-R-Eaz2To.js +1 -0
- package/dist/client/assets/agent-calendar-Cd8km6Ln.js +1 -0
- package/dist/client/assets/{agent-capabilities-C8QrjnQn.js → agent-capabilities-BGShibnD.js} +1 -1
- package/dist/client/assets/agent-connect-sources-BrM4y83H.js +1 -0
- package/dist/client/assets/agent-deck-DRKoTD-S.js +1 -0
- package/dist/client/assets/agent-e2e-BuKHozb1.js +1 -0
- package/dist/client/assets/agent-experiments-CgtwbbvZ.js +1 -0
- package/dist/client/assets/agent-file-wlYMcv_9.js +1 -0
- package/dist/client/assets/agent-hosting-BaITgwKU.js +1 -0
- package/dist/client/assets/{agent-icon-2MzErGc_.js → agent-icon-CTbTFMnU.js} +1 -1
- package/dist/client/assets/agent-library-CC7Sh_px.js +1 -0
- package/dist/client/assets/agent-library-file-DB9_i_YI.js +1 -0
- package/dist/client/assets/agent-overview-BkJ7Az2Q.js +1 -0
- package/dist/client/assets/agent-releases-Dh0xH2nd.js +2 -0
- package/dist/client/assets/agent-settings-B8F88lFa.js +1 -0
- package/dist/client/assets/{agent-site-editor-BpKx1qkb.js → agent-site-editor-D_QBdAc9.js} +2 -2
- package/dist/client/assets/agent-site-editor-code-TQZ-nnUV.js +2 -0
- package/dist/client/assets/agent-site-editor-content-CAE4z8AF.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-gLgYeQTA.js +1 -0
- package/dist/client/assets/{agent-view-guard-4G3ZLLJ6.js → agent-view-guard-CL3qLzE2.js} +1 -1
- package/dist/client/assets/agent-view-mJs78en_.js +1 -0
- package/dist/client/assets/{ai-providers-uRKTNSKv.js → ai-providers-CKuZmBiu.js} +1 -1
- package/dist/client/assets/{alert-DEZDXwhI.js → alert-wYcDlQSf.js} +1 -1
- package/dist/client/assets/{analytics-sections-CyCVHqsU.js → analytics-sections-BjzpdbBT.js} +1 -1
- package/dist/client/assets/api-keys-BtDMAyj2.js +1 -0
- package/dist/client/assets/{api-keys-DpXs9tft.js → api-keys-am7hNPgd.js} +1 -1
- package/dist/client/assets/app-editor-D88RxUP1.js +1 -0
- package/dist/client/assets/{asset-utils-CksrawxC.js → asset-utils-C5mv1eiH.js} +1 -1
- package/dist/client/assets/{auth-Zsy5lyIS.js → auth-CQxDIkM-.js} +1 -1
- package/dist/client/assets/{auth-catchall-BA7Y2mUQ.js → auth-catchall-DX0dhfK_.js} +1 -1
- package/dist/client/assets/{auth-entry-DTgpDRCa.js → auth-entry-Bkznmv5L.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DnneloZ-.js → auth-split-layout-BRZioxOZ.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DNTXHLOn.js → authenticate-and-persist-oauth-o7XKLq_6.js} +1 -1
- package/dist/client/assets/{automation-list-row-DBYEb7yh.js → automation-list-row-knBDKeRb.js} +1 -1
- package/dist/client/assets/{automation-runs-WkjLeJLn.js → automation-runs-CvC4BqLv.js} +1 -1
- package/dist/client/assets/{automations-DQbfRFSm.js → automations-Ajx2woko.js} +1 -1
- package/dist/client/assets/{autosend-C5Y0g7p2.js → autosend-B0POegpm.js} +1 -1
- package/dist/client/assets/{badge-CR0zmQ24.js → badge-BpzeYR5Z.js} +1 -1
- package/dist/client/assets/{block-document-C3eGsk46.js → block-document-DIhkVhEf.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-BSZxdExq.js → blocks-preview-workspace-context-BnkXYZX_.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-WlRP2osS.js → blocks-tab-states-BRjgrPty.js} +1 -1
- package/dist/client/assets/{blog-schema-KDZONLbr.js → blog-schema-BdMdKJFM.js} +1 -1
- package/dist/client/assets/{buckets-BleX9NUY.js → buckets-C62arTZK.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BoBB4xB3.js → build-improve-prompt-doc-DNVGwsoG.js} +1 -1
- package/dist/client/assets/{calendar-BK-qPKHr.js → calendar-SB5YBzj8.js} +1 -1
- package/dist/client/assets/{capability-load-error-C9JRNP4k.js → capability-load-error-BkOUGX51.js} +1 -1
- package/dist/client/assets/category-editor-CozNeVRI.js +1 -0
- package/dist/client/assets/{chart-C9hiF3-H.js → chart-D-gatwT8.js} +1 -1
- package/dist/client/assets/{chat-context-DyGpAf46.js → chat-context-PvP_Q1CV.js} +6 -6
- package/dist/client/assets/{chat-draft-CD_ST5_c.js → chat-draft-C714j1Wd.js} +1 -1
- package/dist/client/assets/{checkbox-HvlgUNAP.js → checkbox-Bk98t4UK.js} +1 -1
- package/dist/client/assets/{choose-editor-CnjAnqj_.js → choose-editor-DmqmkbHo.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Bwy0nso2.js → cli-auth-success-D4NODEkN.js} +1 -1
- package/dist/client/assets/{client-icons-Be9kjZ93.js → client-icons-WHlOXnmn.js} +1 -1
- package/dist/client/assets/cms-settings-editor-kiB9O6al.js +1 -0
- package/dist/client/assets/{cms-store-drafts-BISchbEr.js → cms-store-drafts-DEGbfccc.js} +1 -1
- package/dist/client/assets/collapsible-C7N88_dp.js +1 -0
- package/dist/client/assets/collection-detail-a6oC0bB8.js +1 -0
- package/dist/client/assets/{collection-display-button-ES-6OdCv.js → collection-display-button-Dl9vfdLR.js} +1 -1
- package/dist/client/assets/{collection-search-EpeR-DRK.js → collection-search-Din8SB5Y.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-KbLz2yHx.js → collection-table-wrapper-BYDcFi4z.js} +1 -1
- package/dist/client/assets/{collection-tabs-B_be-L9Y.js → collection-tabs-BJDa_4_F.js} +1 -1
- package/dist/client/assets/{combobox-B18VgXI1.js → combobox-CVchGkTE.js} +1 -1
- package/dist/client/assets/{command-BNUAVYAm.js → command-DA2t4jTW.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-CxXAX0y8.js → companion-mcps-section-BKP3xr1j.js} +1 -1
- package/dist/client/assets/{config-TryZ4RX0.js → config-B1mE6oOL.js} +1 -1
- package/dist/client/assets/{connect-CoilE_s4.js → connect-CAAYdS8d.js} +2 -2
- package/dist/client/assets/{connect-layout-BhfEVfq1.js → connect-layout-DUesEwTl.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-DPKdRpQi.js → connect-source-dialog-DQtWLoYH.js} +1 -1
- package/dist/client/assets/{connection-card-CNcOtDo-.js → connection-card-CPhS4jEh.js} +1 -1
- package/dist/client/assets/{connection-detail-DxRuUlKe.js → connection-detail-D0-sYPQS.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-UVT13B_U.js → connection-form-helpers-CRMRmqMW.js} +1 -1
- package/dist/client/assets/{connection-8A6_dw75.js → connection-giFDA0-u.js} +1 -1
- package/dist/client/assets/{connection-slug-C2s7RBeT.js → connection-slug-DTdYIX0A.js} +1 -1
- package/dist/client/assets/{connections-tE6aWKQG.js → connections-D-1tH9cf.js} +1 -1
- package/dist/client/assets/{content-tab-qUSnNt0b.js → content-tab-DH5bq_bz.js} +3 -3
- package/dist/client/assets/context-DK_qXRQL.js +1 -0
- package/dist/client/assets/{context-menu-DtOAkxnl.js → context-menu-CsBFFEsr.js} +1 -1
- package/dist/client/assets/{context-shell-ClsbZC3c.js → context-shell-l0daBgQ1.js} +3 -3
- package/dist/client/assets/{core.esm-rLLWAwJX.js → core.esm-tIHbtjKb.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-BX56eATK.js → create-organization-dialog-Dy6I2vcX.js} +1 -1
- package/dist/client/assets/{device-hint-CUm6BAQf.js → device-hint-DslC2w9a.js} +1 -1
- package/dist/client/assets/discover-DzzEIO43.js +1 -0
- package/dist/client/assets/{domain-settings-CKu_dJSz.js → domain-settings-Dq_m7HYl.js} +1 -1
- package/dist/client/assets/{drawer-Cn25WPda.js → drawer-BYGTIOoj.js} +1 -1
- package/dist/client/assets/{editor-classes-fUC3onT7.js → editor-classes-LFKjNX_0.js} +1 -1
- package/dist/client/assets/{editor-D2cdCxzq.js → editor-x1lgFdfy.js} +1 -1
- package/dist/client/assets/{empty-state-Ced795Fu.js → empty-state-CH3GYanB.js} +1 -1
- package/dist/client/assets/{empty-state-BBHWcru0.js → empty-state-CtwVPMDf.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-BTxa6G1X.js → experiments-tab-choice-DMVM7f3S.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DPARA3fa.js → extract-connection-data-hvaA6rrK.js} +1 -1
- package/dist/client/assets/{feature-gate-DmEXSzsv.js → feature-gate-ru6FBLZU.js} +1 -1
- package/dist/client/assets/{feature-paywall-CnmlocfU.js → feature-paywall-eifo7eqe.js} +1 -1
- package/dist/client/assets/file-explorer-Bgho9rLt.js +2 -0
- package/dist/client/assets/{file-preview-DDtKFulA.js → file-preview-BzUEEwEK.js} +1 -1
- package/dist/client/assets/{file-share-button-z-0u2RSG.js → file-share-button-CFBrVPAQ.js} +1 -1
- package/dist/client/assets/{file-type-icon-DKzfESDS.js → file-type-icon-DM9o0Fkb.js} +1 -1
- package/dist/client/assets/{folder-icon-D5X4rDtM.js → folder-icon-DSGoR_x6.js} +1 -1
- package/dist/client/assets/{form-DlOI0nvB.js → form-gd_hA5VT.js} +1 -1
- package/dist/client/assets/{general-BaTc6G8G.js → general-Cn8XvemK.js} +1 -1
- package/dist/client/assets/{github-icon-Fl1CK57w.js → github-icon-BVy-v7gH.js} +1 -1
- package/dist/client/assets/home-C9onXt5U.js +1 -0
- package/dist/client/assets/{home-overview-BFMTQOYy.js → home-overview-DZBjDQoG.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-DlXpLWPa.js → hosted-reconcile-DNkBVm-1.js} +1 -1
- package/dist/client/assets/{icon-button-igm3gACH.js → icon-button-Ze0c1pwp.js} +1 -1
- package/dist/client/assets/{index-B9BVHbVj.js → index-B-T__H4R.js} +1 -1
- package/dist/client/assets/{index-BvVW5l1B.js → index-Bbmo8mh-.js} +1 -1
- package/dist/client/assets/{index-CZHAvvQX.js → index-Bgxp_wDH.js} +1 -1
- package/dist/client/assets/index-BkJtJQz4.css +1 -0
- package/dist/client/assets/{index-DWwfYL9X.js → index-C3XZ4Hr3.js} +2 -2
- package/dist/client/assets/{index-BiDkG-fY.js → index-CQQpem-0.js} +1 -1
- package/dist/client/assets/{index-BqYmVY5c.js → index-CnOVjrIG.js} +1 -1
- package/dist/client/assets/{index-D13d0Rz8.js → index-D5i1_B2b.js} +1 -1
- package/dist/client/assets/{index-BvIbbFRO.js → index-D8y5KFA4.js} +1 -1
- package/dist/client/assets/index-DB454549.js +1 -0
- package/dist/client/assets/{index-B0M6fld0.js → index-DEZ1imMJ.js} +41 -41
- package/dist/client/assets/{index-woHs2Bei.js → index-DYgzDE_k.js} +1 -1
- package/dist/client/assets/{index-qF2eIicz.js → index-DkhsKOTp.js} +1 -1
- package/dist/client/assets/{index-BjDHxKQ1.js → index-DsbWutG1.js} +1 -1
- package/dist/client/assets/{index-RvC7A_Zr.js → index-Kbjjvu85.js} +1 -1
- package/dist/client/assets/{index-BK7RpYPl.js → index-_l1iac4T.js} +1 -1
- package/dist/client/assets/{index-bp35vkxQ.js → index-i75UpmlW.js} +1 -1
- package/dist/client/assets/{index-redirect-Y2-2LqtJ.js → index-redirect-BbZ_bzp6.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CQdhIsL1.js → infiniteQueryObserver-C0Gb02df.js} +1 -1
- package/dist/client/assets/{infra-billing-D0aBn-2W.js → infra-billing-BCVZN9OG.js} +1 -1
- package/dist/client/assets/{input-WEG44w8N.js → input-CxHdmxHa.js} +1 -1
- package/dist/client/assets/{input-DPyEB9OP.js → input-Dla4T1vA.js} +4 -4
- package/dist/client/assets/{integration-icon-CbGo7Hoi.js → integration-icon-CFHOt7sY.js} +1 -1
- package/dist/client/assets/{jira-icon-C8Fhxneh.js → jira-icon-_AEc9Yhw.js} +1 -1
- package/dist/client/assets/{label-C2-_lSSQ.js → label-BEWDSeNl.js} +1 -1
- package/dist/client/assets/{layout-B7jJw3TW.js → layout--y8zVnrP.js} +1 -1
- package/dist/client/assets/legacy-admin-welcome-dialog-B223MrIf.js +1 -0
- package/dist/client/assets/{legacy-agents-deep-ZncRE9wV.js → legacy-agents-deep-PO1FuZ04.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BU-BNhBf.js → legacy-main-redirect-CLP7AoCb.js} +1 -1
- package/dist/client/assets/library-Cx1S-GVi.js +1 -0
- package/dist/client/assets/{library-tab-KFeYjSPq.js → library-tab-CqMcp5u0.js} +1 -1
- package/dist/client/assets/login-BuRZE0OR.js +1 -0
- package/dist/client/assets/{markdown-CBPGMAeL.js → markdown-Db8a3LUX.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-Ct_65kSq.js → mcp-app-renderer-C8G6NLBz.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BRzA5Pv_.js → mcp-oauth-BBT3ip6Z.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BzDrrJmr.js → mcp-oauth-CHmbtYyN.js} +1 -1
- package/dist/client/assets/{members-DmQ1d6J9.js → members-CF1S2ayK.js} +1 -1
- package/dist/client/assets/{memory-veer-4dg.js → memory-Bk61fr1m.js} +2 -2
- package/dist/client/assets/{mock-board-CKa4hpGl.js → mock-board-CYJBKLD5.js} +3 -3
- package/dist/client/assets/{monaco-editor-CpFV1RfN.js → monaco-editor-DTwBEUg_.js} +1 -1
- package/dist/client/assets/{monitoring-CBecEU71.js → monitoring-Cqe9DCsk.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-Dn8Q55tj.js → monitoring-stats-row-GkTmJnnE.js} +1 -1
- package/dist/client/assets/{multi-select-CrGD5Ooc.js → multi-select-GRYee_BH.js} +1 -1
- package/dist/client/assets/{mustache-CfZeeK0-.js → mustache-DtDLolVD.js} +1 -1
- package/dist/client/assets/{named-rule-view-DCoLjOb_.js → named-rule-view-BNwXQD8T.js} +1 -1
- package/dist/client/assets/{new-project-dialog-xaa497EH.js → new-project-dialog-Dfe2Pik9.js} +1 -1
- package/dist/client/assets/{oauth-callback-BZYuOZDS.js → oauth-callback-C9LKZChW.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-ht2kAjnJ.js → oauth-callback-ai-provider-C7LWQiJX.js} +1 -1
- package/dist/client/assets/{oauth-consent-Cycay5jx.js → oauth-consent-Dm4zOEtc.js} +1 -1
- package/dist/client/assets/{onboarding-CW6ecLdB.js → onboarding-xP-6CuuS.js} +1 -1
- package/dist/client/assets/{openai-conversation-BIBsPprq.js → openai-conversation-BH1GqT3q.js} +2 -2
- package/dist/client/assets/{optimistic-project-sidebar-views-ClxmmxQQ.js → optimistic-project-sidebar-views-BcV4r24I.js} +1 -1
- package/dist/client/assets/{order-monitor-day-ujguBEEi.js → order-monitor-day-BrCrwZlv.js} +1 -1
- package/dist/client/assets/{organization-choice-Dmg8UAst.js → organization-choice-Bb3OozNa.js} +1 -1
- package/dist/client/assets/{orgs-DwXxjD5w.js → orgs-BwWx4Gpo.js} +1 -1
- package/dist/client/assets/{own-accounts-section-B1_zf8oO.js → own-accounts-section-CL57nUX5.js} +1 -1
- package/dist/client/assets/{pair-CYQ33Koe.js → pair-D5JEvK2M.js} +7 -7
- package/dist/client/assets/{parse-sections-D19DrjFN.js → parse-sections-Ca4qHQSq.js} +3 -3
- package/dist/client/assets/{plan-ladder-DMGBEO8S.js → plan-ladder-DdqVPKf9.js} +1 -1
- package/dist/client/assets/plan-q4Vm_z4g.js +1 -0
- package/dist/client/assets/{plan-usage-card-Dh5aZ9Wu.js → plan-usage-card-397aTXRB.js} +2 -2
- package/dist/client/assets/{popover-CQC-Pea_.js → popover-DsvzKyw_.js} +1 -1
- package/dist/client/assets/post-calendar-CvHtHQHg.js +1 -0
- package/dist/client/assets/{post-editor-Bi0Lvuv1.js → post-editor-0bthmrQK.js} +2 -2
- package/dist/client/assets/{preview-content-DmNC5FDZ.js → preview-content-Bs_qZ8yA.js} +1 -1
- package/dist/client/assets/{preview-dialog-BXuQsxvP.js → preview-dialog-Bn3JJkpc.js} +1 -1
- package/dist/client/assets/{preview-panel-BvPhN_GC.js → preview-panel-CX3l3cru.js} +1 -1
- package/dist/client/assets/{preview-tab-kdq5fsPz.js → preview-tab-C506bsNP.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-BMl-NFfE.js → product-picker-dialog-DRJETx9Q.js} +1 -1
- package/dist/client/assets/{profile-CHLa-N2x.js → profile-BlRaDfot.js} +1 -1
- package/dist/client/assets/project-app-view-CKUZlcwf.js +1 -0
- package/dist/client/assets/{project-apps-DLoX3eK_.js → project-apps-B_xWF85u.js} +1 -1
- package/dist/client/assets/{project-icon-BFEgPANo.js → project-icon-rrJh6PJx.js} +1 -1
- package/dist/client/assets/{project-index-Bt04pJyj.js → project-index-CoA3rtsT.js} +1 -1
- package/dist/client/assets/project-reports-bT7h-_SM.js +1 -0
- package/dist/client/assets/project-tasks-CqL0-1p3.js +1 -0
- package/dist/client/assets/{projects-DBgcy_ko.js → projects-CM1tg94T.js} +1 -1
- package/dist/client/assets/{projects-empty-state-DSl1yjrE.js → projects-empty-state-llpcLXG9.js} +1 -1
- package/dist/client/assets/{prompts-DLHllT_u.js → prompts-B0OAMamK.js} +1 -1
- package/dist/client/assets/record-editor-fYL_geiT.js +1 -0
- package/dist/client/assets/redirect-editor-CqeB0Mu0.js +1 -0
- package/dist/client/assets/reports-CtLMPNBD.js +1 -0
- package/dist/client/assets/{reports-BLJvZSDk.js → reports-Rgui-AzR.js} +1 -1
- package/dist/client/assets/{reports-onboarding-B_ps3py4.js → reports-onboarding-Bb3vI6W8.js} +1 -1
- package/dist/client/assets/reports-tab-BaN84XaS.js +2 -0
- package/dist/client/assets/repositories-DR2_ORl-.js +1 -0
- package/dist/client/assets/{repositories-Bvm6e85d.js → repositories-OwZ7bC1j.js} +1 -1
- package/dist/client/assets/{repository-binding-D5Bfxppj.js → repository-binding-C0msapZZ.js} +1 -1
- package/dist/client/assets/{repository-picker-BG4RNPTd.js → repository-picker-BYFeDBpn.js} +1 -1
- package/dist/client/assets/{require-capability-DRWZ_9vY.js → require-capability-cQiPB2TO.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BDLyo6_T.js → required-auth-layout-DfUx9vzb.js} +1 -1
- package/dist/client/assets/{reset-password-DaveZxAM.js → reset-password-CwNbLDfo.js} +1 -1
- package/dist/client/assets/{resizable-ZTEIsDw7.js → resizable-CHI5UJHW.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-bd7hcPCn.js → resolve-tab-icon-BWeUUKzK.js} +1 -1
- package/dist/client/assets/review-settings-DUhDHWEg.js +1 -0
- package/dist/client/assets/{role-color-BoSKmMc3.js → role-color-DlPdNUQM.js} +1 -1
- package/dist/client/assets/{roles-ll9CMZdV.js → roles-ChXNdo9W.js} +1 -1
- package/dist/client/assets/route-8zXp8Zmg.js +1 -0
- package/dist/client/assets/route-DW6RzQLd.js +1 -0
- package/dist/client/assets/route-oGUs3Dt9.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context--ksv8XqS.js → sandbox-lifecycle-context-WXIR2CMZ.js} +1 -1
- package/dist/client/assets/{schema-DDAhL9Cr.js → schema-9jBUPMLq.js} +1 -1
- package/dist/client/assets/{schema-BObR_fJ_.js → schema-BFmIytlm.js} +1 -1
- package/dist/client/assets/{scroll-area-CYr4aRZr.js → scroll-area-CQ_g6hBm.js} +1 -1
- package/dist/client/assets/search-input-Co3g-t6C.js +1 -0
- package/dist/client/assets/{search-toggle-OJssd2AY.js → search-toggle-CO5TN956.js} +1 -1
- package/dist/client/assets/{secret-picker-wjLxUG7e.js → secret-picker-VlsiGxPi.js} +1 -1
- package/dist/client/assets/{secrets-BYPmdyMN.js → secrets-DJboETC0.js} +1 -1
- package/dist/client/assets/{section-array-field-DZEuNEZT.js → section-array-field-CvmfLv3q.js} +1 -1
- package/dist/client/assets/{sections-BDGuApqp.js → sections-C_Jmzzpn.js} +1 -1
- package/dist/client/assets/sections-editor-D1U5_lZq.js +1 -0
- package/dist/client/assets/{select-taudESnf.js → select-BJaUvbIR.js} +1 -1
- package/dist/client/assets/{select-model-JxuGnGfN.js → select-model-CftP-ks_.js} +1 -1
- package/dist/client/assets/{seo-editor-D7qUpqtC.js → seo-editor-B6UrHPko.js} +1 -1
- package/dist/client/assets/{separator-rYurNu9w.js → separator-BXKmXRi8.js} +1 -1
- package/dist/client/assets/settings-tab-CHBeACws.js +1 -0
- package/dist/client/assets/{sheet-C5Vpqn4B.js → sheet-D2hfPw7P.js} +1 -1
- package/dist/client/assets/shell-layout-BLRNx2fV.js +1 -0
- package/dist/client/assets/{site-draft-actions-I-a6sWGq.js → site-draft-actions-5nXph2SS.js} +1 -1
- package/dist/client/assets/{site-draft-view-B9eorarP.js → site-draft-view-3CfqUHrV.js} +1 -1
- package/dist/client/assets/site-editor-BqlLTFw0.js +1 -0
- package/dist/client/assets/{site-editor-toast-BkfBkyel.js → site-editor-toast-Cgezu0A5.js} +1 -1
- package/dist/client/assets/skills-B_05tfLr.js +1 -0
- package/dist/client/assets/{slider-Va2dwWaV.js → slider-C6h9g0cI.js} +1 -1
- package/dist/client/assets/{sortable.esm-BmFrP3rv.js → sortable.esm-D2_ALuVf.js} +1 -1
- package/dist/client/assets/{sso-BZP02FnS.js → sso-CtTl7KnN.js} +1 -1
- package/dist/client/assets/{suggestion-CJnvcEOz.js → suggestion-C8VoNVDk.js} +2 -2
- package/dist/client/assets/{super-agent-icon-BpFks7bc.js → super-agent-icon-B-73GF60.js} +1 -1
- package/dist/client/assets/{switch-NBzUnGw4.js → switch-C53DVv3y.js} +1 -1
- package/dist/client/assets/{synced-repos-x20dApIj.js → synced-repos-Cqz-evGv.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-De_GoXbo.js → tab-icon-glyph-I3aa1qRZ.js} +1 -1
- package/dist/client/assets/{table-B6HdX-5W.js → table-DjgVXWdP.js} +1 -1
- package/dist/client/assets/{tabs-B9Fkm8UP.js → tabs-DtOFAaIp.js} +1 -1
- package/dist/client/assets/{task-board-r7mBQBfA.js → task-board-D3wT6_aG.js} +1 -1
- package/dist/client/assets/{task-route-DzXY9dAT.js → task-route-DngvTiyh.js} +1 -1
- package/dist/client/assets/{task-status-nf4sWabv.js → task-status-BfFZ6nf8.js} +1 -1
- package/dist/client/assets/taskboard-analytics-D-vAg9Px.js +1 -0
- package/dist/client/assets/{tasks-DiiwePJH.js → tasks-BHa2qCWg.js} +3 -3
- package/dist/client/assets/tasks-adXvugV8.js +1 -0
- package/dist/client/assets/{textarea-8xMov02r.js → textarea-_jcGqOvl.js} +1 -1
- package/dist/client/assets/thread-analytics-DPDga_ap.js +1 -0
- package/dist/client/assets/{thread-intent-B-lUepd6.js → thread-intent-DuI80508.js} +1 -1
- package/dist/client/assets/{thread-route-CidpLna8.js → thread-route-B-uAlF3E.js} +1 -1
- package/dist/client/assets/{thread-route-BHZi-1Lx.js → thread-route-Ci8rIker.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-CJ90Ecr4.js → thread-sheet-body-BiNfUUQ_.js} +1 -1
- package/dist/client/assets/{time-range-picker-Bf3LTcPm.js → time-range-picker-F9SEOG2b.js} +1 -1
- package/dist/client/assets/{toggle-group-GmYScomU.js → toggle-group-C6oiEKlf.js} +1 -1
- package/dist/client/assets/{tool-namespace-BMJphfly.js → tool-namespace-DdU5nhii.js} +1 -1
- package/dist/client/assets/{tool-set-selector-ORY0JK_a.js → tool-set-selector-2nfgy8us.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DLb2L87M.js → toolbar-icon-button-BmJKmAUK.js} +1 -1
- package/dist/client/assets/{tooltip-DUgZeaAs.js → tooltip-Dam-ym8O.js} +1 -1
- package/dist/client/assets/{tooltipContext-DhhamGUz.js → tooltipContext-PzKiic-J.js} +1 -1
- package/dist/client/assets/{track-CDDSJk6a.js → track-Dj7QHX2C.js} +1 -1
- package/dist/client/assets/{types-D5f5_4KC.js → types-gyofjZHf.js} +6 -6
- package/dist/client/assets/{url-slug-BgFXpKTa.js → url-slug-BMHzx0XY.js} +1 -1
- package/dist/client/assets/{usage-stats-Db2409wH.js → usage-stats-C3KvQP9T.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CegsSqNf.js → use-ai-providers-DwpUgHpj.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-CoAQZSng.js → use-apply-named-rule-BnEs0jP7.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-BIANNd7Z.js +1 -0
- package/dist/client/assets/{use-automations-IINULJEn.js → use-automations-CyrAu8XA.js} +1 -1
- package/dist/client/assets/{use-autosave-B28tAi82.js → use-autosave-TV-hF63e.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-4PZwWSEO.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-SKM2dTYC.js → use-chat-layout-state-BG2-xqQp.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-D7FBZjX-.js → use-cms-publish-actions-CmQuU9AY.js} +5 -5
- package/dist/client/assets/{use-connect-companion-aYlKXW1g.js → use-connect-companion-CowVgnp9.js} +1 -1
- package/dist/client/assets/use-connection-BozgIoMu.js +1 -0
- package/dist/client/assets/{use-content-sync-Wt7A-cqi.js → use-content-sync-BBbOIir0.js} +1 -1
- package/dist/client/assets/{use-copy-jRaPRTwC.js → use-copy-o0P-kroy.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-C5zF4lje.js → use-date-fns-locale-bKU2Q73X.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DI_mWee1.js → use-debounced-autosave-BmvZzlB_.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Df5Y0bKp.js → use-debounced-value-yZdJ1f2K.js} +1 -1
- package/dist/client/assets/{use-deco-credits-IyUHS95H.js → use-deco-credits-Bjfx0bAt.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CVaB2Rhy.js → use-decopilot-events-C_C16-Ln.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DrZnUntQ.js → use-delete-connection-B4rX1qgg.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CoSxtFqU.js → use-deployment-admin-CS9K9Ea9.js} +1 -1
- package/dist/client/assets/{use-entitlements-n2MsZM9p.js → use-entitlements-DidlVdLU.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-otug38hg.js → use-fast-preview-draft-url-KJzyk03O.js} +1 -1
- package/dist/client/assets/{use-file-configs-BvpMQAvp.js → use-file-configs-DhXDYO83.js} +1 -1
- package/dist/client/assets/{use-id-selection-DlXip3K9.js → use-id-selection-BHXFVfAt.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-CVBam4xO.js → use-inbox-feed-CKkWXum7.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-qE2UPD2B.js → use-infinite-scroll-CED9GMTE.js} +1 -1
- package/dist/client/assets/{use-join-requests-Dmu4TFw2.js → use-join-requests-DAuosANz.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-DfOwinBC.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-CdzqA_1C.js → use-mcp-auth-status-Dls0bLQE.js} +1 -1
- package/dist/client/assets/{use-mcp-client-C8sFqQYs.js → use-mcp-client-DJjkIlNp.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-KGxEzqRw.js → use-mcp-prompts-it9pO2QZ.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DMaf2rKI.js → use-mcp-tools-wfurU0oX.js} +1 -1
- package/dist/client/assets/{use-mobile-JxzmRS3O.js → use-mobile-CJITN8uI.js} +1 -1
- package/dist/client/assets/{use-move-blocks-B66Z69SN.js → use-move-blocks-CC1C41-K.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BPUG-DwT.js → use-navigate-to-agent-MlXDIBYX.js} +1 -1
- package/dist/client/assets/{use-org-fs-BTZCBdxy.js → use-org-fs-BH012Up0.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CBRIaGB1.js → use-org-repo-syncs-jV2kVf-q.js} +1 -1
- package/dist/client/assets/{use-org-sso-CxdxMmbI.js → use-org-sso-Bo72RJ5p.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DgPYo7py.js → use-organization-settings-bWX185lw.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-DltS_Jdi.js → use-project-native-view-presence-DhhbOsoh.js} +1 -1
- package/dist/client/assets/use-project-scope-pwqcjGo8.js +1 -0
- package/dist/client/assets/{use-recent-apps-DCrhrE1r.js → use-recent-apps-Rr1jTj-T.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BMotCZC_.js → use-reports-diagnostic-0n4ScjpC.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-CPma0JnN.js → use-sandbox-events-D1_GHzsF.js} +1 -1
- package/dist/client/assets/{use-secrets-U7VdTPCn.js → use-secrets-Dim43C3b.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-CVV-8YE0.js → use-section-preview-base-B6FS0lTt.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-D8frxAVL.js → use-sidebar-collapsed-DcAIYhdp.js} +1 -1
- package/dist/client/assets/{use-tags-zNsAvyT2.js → use-tags-6ljf50Kl.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CE11Vums.js → use-task-board-analytics-5XuzJjLw.js} +1 -1
- package/dist/client/assets/{use-task-board-events-WJfNx3Vw.js → use-task-board-events-DnEp5edD.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-BkBj5QMy.js → use-task-board-item-prs-CycVEDhs.js} +1 -1
- package/dist/client/assets/{use-task-board-items-CmUbMz1G.js → use-task-board-items-pvi4Vcv1.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-Dsyp8Uoc.js → use-task-board-prompts-CE5ytMaB.js} +1 -1
- package/dist/client/assets/{use-task-metadata-DRP-RY0l.js → use-task-metadata-D4kXdUwO.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BOXdgR_A.js → use-thread-outputs-BPYn8k3d.js} +1 -1
- package/dist/client/assets/{use-voice-input-CQSYzFMw.js → use-voice-input-BKZpbbiI.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CtNfxLxq.js +1 -0
- package/dist/client/assets/{useQueries-BpjN820-.js → useQueries-B3iHMIbL.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-OzDVxqdl.js +1 -0
- package/dist/client/assets/{users-DgPmfgcj.js → users-7Hqe-w13.js} +1 -1
- package/dist/client/assets/{utils-DwY9C3Mj.js → utils-BbEfYi1l.js} +1 -1
- package/dist/client/assets/{variant-calendar-ByGN-Vpc.js → variant-calendar-vayISj1w.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-CzeUMJ70.js → variant-matcher-override-ulDJ4YBu.js} +1 -1
- package/dist/client/assets/{view-header-JSqDfdkj.js → view-header-y27ISHbd.js} +1 -1
- package/dist/client/assets/{virtual-mcp-CVLIL1Oq.js → virtual-mcp-vRvxAZ15.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-CwQVaju9.js → watch-sse-pool-DhoYakYc.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/legacy-admin-welcome.webp +0 -0
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-Bj3EYwlx.js +0 -1
- package/dist/client/assets/agent-assets-DI6qPyKd.js +0 -1
- package/dist/client/assets/agent-automations---UAtRbI.js +0 -1
- package/dist/client/assets/agent-calendar-cf-gDNxH.js +0 -1
- package/dist/client/assets/agent-connect-sources-DWV9WSKP.js +0 -1
- package/dist/client/assets/agent-deck-D0lCoowF.js +0 -1
- package/dist/client/assets/agent-e2e-BOiuADaK.js +0 -1
- package/dist/client/assets/agent-experiments-BMv9LCIg.js +0 -1
- package/dist/client/assets/agent-file-CNp-H5vm.js +0 -1
- package/dist/client/assets/agent-hosting-C-EBAKmR.js +0 -1
- package/dist/client/assets/agent-library-file-Agr0p3aP.js +0 -1
- package/dist/client/assets/agent-library-slTipnE2.js +0 -1
- package/dist/client/assets/agent-overview-BS9_YnvP.js +0 -1
- package/dist/client/assets/agent-releases-KTwDvjK6.js +0 -2
- package/dist/client/assets/agent-settings-DrVJjCl1.js +0 -1
- package/dist/client/assets/agent-site-editor-code-1vmtmGbS.js +0 -2
- package/dist/client/assets/agent-site-editor-content-DLlGzEUS.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-Qe8DbwSs.js +0 -1
- package/dist/client/assets/agent-view-B8yeRN99.js +0 -1
- package/dist/client/assets/api-keys-CqXC8hcJ.js +0 -1
- package/dist/client/assets/app-editor-BaI-amod.js +0 -1
- package/dist/client/assets/category-editor-CcG8-9VQ.js +0 -1
- package/dist/client/assets/cms-settings-editor-BrJarYyE.js +0 -1
- package/dist/client/assets/collapsible-f_iRDMCl.js +0 -1
- package/dist/client/assets/collection-detail-C3I3Gpfg.js +0 -1
- package/dist/client/assets/context-5V6pbdZV.js +0 -1
- package/dist/client/assets/discover-C3KntGhQ.js +0 -1
- package/dist/client/assets/file-explorer-BQ3nHrzo.js +0 -2
- package/dist/client/assets/home-_5AX_rte.js +0 -1
- package/dist/client/assets/index-K-NS4tm_.css +0 -1
- package/dist/client/assets/index-cB2W9GP1.js +0 -1
- package/dist/client/assets/library-2jjA6huk.js +0 -1
- package/dist/client/assets/login-CYw53vfL.js +0 -1
- package/dist/client/assets/plan-C3-HdCti.js +0 -1
- package/dist/client/assets/post-calendar-DyAhp07d.js +0 -1
- package/dist/client/assets/project-app-view--F2yE3h6.js +0 -1
- package/dist/client/assets/project-reports-CQX2n1pZ.js +0 -1
- package/dist/client/assets/project-tasks-BxS2RWnj.js +0 -1
- package/dist/client/assets/record-editor-DSuyBQvO.js +0 -1
- package/dist/client/assets/redirect-editor-Dg4EE9RJ.js +0 -1
- package/dist/client/assets/reports-DfhDFmgz.js +0 -1
- package/dist/client/assets/reports-tab-NBJtBy1O.js +0 -2
- package/dist/client/assets/repositories-Cdm1E3kt.js +0 -1
- package/dist/client/assets/review-settings-DWBDMXEy.js +0 -1
- package/dist/client/assets/route-CARtHArs.js +0 -1
- package/dist/client/assets/route-CE2T-4lr.js +0 -1
- package/dist/client/assets/route-apqFkN8H.js +0 -1
- package/dist/client/assets/search-input-CEHMJvIu.js +0 -1
- package/dist/client/assets/sections-editor-w8bIFtKt.js +0 -1
- package/dist/client/assets/settings-tab-BjoW2SLa.js +0 -1
- package/dist/client/assets/shell-layout-B_Je98M9.js +0 -1
- package/dist/client/assets/site-editor-A0UTz4FO.js +0 -1
- package/dist/client/assets/skills-DFP73eqq.js +0 -1
- package/dist/client/assets/taskboard-analytics-sh1MutiR.js +0 -1
- package/dist/client/assets/tasks-CDaME30v.js +0 -1
- package/dist/client/assets/thread-analytics-CI4Ww-tz.js +0 -1
- package/dist/client/assets/use-ask-in-chat-D8s6kqgy.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-390kM-ss.js +0 -1
- package/dist/client/assets/use-connection-BLq1Zghk.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-CmG1gXaL.js +0 -1
- package/dist/client/assets/use-project-scope-BLJIcw6l.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CrPhADUx.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B5oEM_Vd.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,a5 as d,e as g,ak as m,K as I,q as O}from"./index-
|
|
1
|
+
import{c as u,a5 as d,e as g,ak as m,K as I,q as O}from"./index-DEZ1imMJ.js";import{u as $}from"./useInfiniteQuery-CtNfxLxq.js";function T(e){const t=u.c(17),{org:s}=d(),c=m();let i,n,o,l;t[0]!==s.id||t[1]!==e.configId||t[2]!==e.imageOnly||t[3]!==e.search?(n=e.search?.trim()||void 0,i=e.imageOnly??!1,l=$,o=I.filePickerObjects(s.id,e.configId,n,i),t[0]=s.id,t[1]=e.configId,t[2]=e.imageOnly,t[3]=e.search,t[4]=i,t[5]=n,t[6]=o,t[7]=l):(i=t[4],n=t[5],o=t[6],l=t[7]);const r=e.enabled!==!1&&!!e.configId;let a;t[8]!==i||t[9]!==e.configId||t[10]!==n||t[11]!==c?(a=async y=>{const{pageParam:p}=y;return await c.call("FILE_OBJECTS_LIST",{configId:e.configId,cursor:p??void 0,search:n,imageOnly:i||void 0})},t[8]=i,t[9]=e.configId,t[10]=n,t[11]=c,t[12]=a):a=t[12];let f;return t[13]!==o||t[14]!==r||t[15]!==a?(f={queryKey:o,enabled:r,staleTime:3e4,initialPageParam:null,queryFn:a,getNextPageParam:h},t[13]=o,t[14]=r,t[15]=a,t[16]=f):f=t[16],l(f)}function h(e){return e.nextCursor??void 0}function E(){const e=u.c(2),{org:t}=d();let s;return e[0]!==t?(s={mutationFn:async c=>{const i=c.file.type||"application/octet-stream",n=await fetch(`/api/${encodeURIComponent(t.slug)}/file-configs/${encodeURIComponent(c.configId)}/upload?filename=${encodeURIComponent(c.file.name)}`,{method:"POST",headers:{"Content-Type":i},body:c.file});if(!n.ok){const o=await n.text().catch(x);let l=`${n.status} ${n.statusText}`;try{const r=JSON.parse(o);r.message&&(l=r.message)}catch{o&&(l=o.slice(0,200))}throw new Error(`Upload failed: ${l}`)}return await n.json()}},e[0]=t,e[1]=s):s=e[1],g(s)}function x(){return""}function F(){const e=u.c(8),{org:t}=d(),s=m(),c=O();let i;e[0]!==s?(i=l=>s.call("FILE_OBJECT_DELETE",l),e[0]=s,e[1]=i):i=e[1];let n;e[2]!==t||e[3]!==c?(n=(l,r)=>{c.invalidateQueries({queryKey:I.filePickerObjectsByConfig(t.id,r.configId)})},e[2]=t,e[3]=c,e[4]=n):n=e[4];let o;return e[5]!==i||e[6]!==n?(o={mutationFn:i,onSuccess:n},e[5]=i,e[6]=n,e[7]=o):o=e[7],g(o)}function w(e){return/\.(png|jpe?g|gif|webp|svg|avif|bmp)$/i.test(e)}function S(e){const t=e.lastIndexOf(".");return t<0||t===e.length-1?"file":e.slice(t+1).toLowerCase()}function v(e){const t=e.split("/");return t[t.length-1]??e}function _(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}export{E as a,v as b,F as c,S as e,_ as f,w as i,T as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ca as v,cb as $,cc as W,cd as H,ce as D,cf as y,cg as V,ch as x,ci as L,cj as j,ck as q,cl as N,cm as B,cn as Z,co as F}from"./index-B0M6fld0.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function Y(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function K(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Y(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Q(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function M(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=B.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=Z[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof v||n instanceof $)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof W)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await P(c,{fetchFn:i}),!o)try{o=await T(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new H(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(S),d=S}}const C=!e.redirectUrl;if(n!==void 0||C){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const k=await e.tokens();if(k?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:k.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof D)||l instanceof y))throw l}const z=e.state?await e.state():void 0,{authorizationUrl:b,codeVerifier:I}=await ue(c,{metadata:u,clientInformation:d,state:z,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(I),await e.redirectToAuthorization(b),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function T(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return j.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function E(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??L;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await E(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await E(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function P(e,{fetchFn:t=fetch,protocolVersion:n=L}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?V.parse(await o.json()):x.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await T(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await P(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await N(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function O(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=K(r,h);Q(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await M(u);return F.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=O(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=O(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await M(s);return q.parse(await s.json())}export{pe as U,P as a,_e as b,Ue as c,T as d,me as e};
|
|
1
|
+
import{cd as v,ce as $,cf as W,cg as H,ch as D,ci as y,cj as V,ck as q,cl as L,cm as x,cn as j,co as N,cp as B,cq as Z,cr as F}from"./index-DEZ1imMJ.js";function G(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function J({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class pe extends Error{constructor(t){super(t??"Unauthorized")}}function Y(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const p="code",_="S256";function K(e,t){const n=e.client_secret!==void 0;return"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Y(e.token_endpoint_auth_method)&&(t.length===0||t.includes(e.token_endpoint_auth_method))?e.token_endpoint_auth_method:t.length===0?n?"client_secret_basic":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Q(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":X(a,i,n);return;case"client_secret_post":ee(a,i,r);return;case"none":te(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function X(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function ee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function te(e,t){t.set("client_id",e)}async function M(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=B.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:s}=r,o=Z[a]||y;return new o(i||"",s)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new y(a)}}async function _e(e,t){try{return await U(e,t)}catch(n){if(n instanceof v||n instanceof $)return await e.invalidateCredentials?.("all"),await U(e,t);if(n instanceof W)return await e.invalidateCredentials?.("tokens"),await U(e,t);throw n}}async function U(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const s=await e.discoveryState?.();let o,c,u,h=a;if(!h&&s?.resourceMetadataUrl&&(h=new URL(s.resourceMetadataUrl)),s?.authorizationServerUrl){if(c=s.authorizationServerUrl,o=s.resourceMetadata,u=s.authorizationServerMetadata??await P(c,{fetchFn:i}),!o)try{o=await T(t,{resourceMetadataUrl:h},i)}catch{}(u!==s.authorizationServerMetadata||o!==s.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}else{const l=await ce(t,{resourceMetadataUrl:h,fetchFn:i});c=l.authorizationServerUrl,u=l.authorizationServerMetadata,o=l.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(c),resourceMetadataUrl:h?.toString(),resourceMetadata:o,authorizationServerMetadata:u})}const f=await re(t,e,o),A=r||o?.scopes_supported?.join(" ")||e.clientMetadata.scope;let d=await Promise.resolve(e.clientInformation());if(!d){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const l=u?.client_id_metadata_document_supported===!0,w=e.clientMetadataUrl;if(w&&!ne(w))throw new H(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${w}`);if(l&&w)d={client_id:w},await e.saveClientInformation?.(d);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await de(c,{metadata:u,clientMetadata:e.clientMetadata,scope:A,fetchFn:i});await e.saveClientInformation(S),d=S}}const C=!e.redirectUrl;if(n!==void 0||C){const l=await he(e,c,{metadata:u,resource:f,authorizationCode:n,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}const k=await e.tokens();if(k?.refresh_token)try{const l=await le(c,{metadata:u,clientInformation:d,refreshToken:k.refresh_token,resource:f,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(l),"AUTHORIZED"}catch(l){if(!(!(l instanceof D)||l instanceof y))throw l}const z=e.state?await e.state():void 0,{authorizationUrl:b,codeVerifier:I}=await ue(c,{metadata:u,clientInformation:d,state:z,redirectUrl:e.redirectUrl,scope:A,resource:f});return await e.saveCodeVerifier(I),await e.redirectToAuthorization(b),"REDIRECT"}function ne(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function re(e,t,n){const r=G(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!J({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function Ue(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=m(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const s=m(e,"scope")||void 0,o=m(e,"error")||void 0;return{resourceMetadataUrl:i,scope:s,error:o}}function m(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function T(e,t,n=fetch){const r=await ie(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return x.parse(await r.json())}async function R(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?R(e,void 0,n):void 0;throw r}}function ae(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function E(e,t,n=fetch){return await R(e,{"MCP-Protocol-Version":t},n)}function oe(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function ie(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??L;let s;if(r?.metadataUrl)s=new URL(r.metadataUrl);else{const c=ae(t,a.pathname);s=new URL(c,r?.metadataServerUrl??a),s.search=a.search}let o=await E(s,i,n);if(!r?.metadataUrl&&oe(o,a.pathname)){const c=new URL(`/.well-known/${t}`,a);o=await E(c,i,n)}return o}function se(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function P(e,{fetchFn:t=fetch,protocolVersion:n=L}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=se(e);for(const{url:i,type:s}of a){const o=await R(i,r,t);if(o){if(!o.ok){if(await o.body?.cancel(),o.status>=400&&o.status<500)continue;throw new Error(`HTTP ${o.status} trying to load ${s==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return s==="oauth"?V.parse(await o.json()):q.parse(await o.json())}}}async function ce(e,t){let n,r;try{n=await T(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await P(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function ue(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:s}){let o;if(t){if(o=new URL(t.authorization_endpoint),!t.response_types_supported.includes(p))throw new Error(`Incompatible auth server: does not support response type ${p}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(_))throw new Error(`Incompatible auth server: does not support code challenge method ${_}`)}else o=new URL("/authorize",e);const c=await N(),u=c.code_verifier,h=c.code_challenge;return o.searchParams.set("response_type",p),o.searchParams.set("client_id",n.client_id),o.searchParams.set("code_challenge",h),o.searchParams.set("code_challenge_method",_),o.searchParams.set("redirect_uri",String(r)),i&&o.searchParams.set("state",i),a&&o.searchParams.set("scope",a),a?.includes("offline_access")&&o.searchParams.append("prompt","consent"),s&&o.searchParams.set("resource",s.href),{authorizationUrl:o,codeVerifier:u}}function O(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function g(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:s}){const o=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),c=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(c,n,o,t);else if(r){const h=t?.token_endpoint_auth_methods_supported??[],f=K(r,h);Q(f,r,c,n)}const u=await(s??fetch)(o,{method:"POST",headers:c,body:n});if(!u.ok)throw await M(u);return F.parse(await u.json())}async function me(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:s,addClientAuthentication:o,fetchFn:c}){const u=O(r,a,i);return g(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:o,resource:s,fetchFn:c})}async function le(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:s}){const o=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),c=await g(e,{metadata:t,tokenRequestParams:o,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:s});return{refresh_token:r,...c}}async function he(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const s=e.clientMetadata.scope;let o;if(e.prepareTokenRequest&&(o=await e.prepareTokenRequest(s)),!o){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const u=await e.codeVerifier();o=O(a,u,e.redirectUrl)}const c=await e.clientInformation();return g(t,{metadata:n,tokenRequestParams:o,clientInformation:c??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function de(e,{metadata:t,clientMetadata:n,scope:r,fetchFn:a}){let i;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");i=new URL(t.registration_endpoint)}else i=new URL("/register",e);const s=await(a??fetch)(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,...r!==void 0?{scope:r}:{}})});if(!s.ok)throw await M(s);return j.parse(await s.json())}export{pe as U,P as a,_e as b,Ue as c,T as d,me as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,f as l,j as t,S as m,A as o,g as f,N as x}from"./index-
|
|
1
|
+
import{c as r,f as l,j as t,S as m,A as o,g as f,N as x}from"./index-DEZ1imMJ.js";function h(){const e=r.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(x,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function u(){const e=r.c(5);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=l(a);if(n==="accept-invitation"){let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(m,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(o,{pathname:"accept-invitation"})})}),e[1]=s):s=e[1];let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs(t.Fragment,{children:[s,t.jsx(f,{children:t.jsx(h,{})})]}),e[2]=i):i=e[2],i}let c;return e[3]!==n?(c=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(o,{pathname:n})}),e[3]=n,e[4]=c):c=e[4],c}export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a3 as Ue,a as $,a4 as Ne,r as b,e as ae,E as W,j as t,m as x,B as X,I as G,c as Ie,b as Ce,h as qe}from"./index-B0M6fld0.js";import{d as De}from"./delay-CnY5UFtP.js";class Pe extends Error{constructor(e,o){super(`Retrying exceeded the maxAttempts (${o}).`),this.name="RetryError",this.cause=e}}async function ze(i,e){const{multiplier:o=2,maxTimeout:l=6e4,maxAttempts:w=5,minTimeout:g=1e3,jitter:r=1,isRetriable:u=()=>!0,signal:d}=e??{};if(!Number.isInteger(w)||w<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${w}`);if(!Number.isFinite(o)||o<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${o}`);if(Number.isNaN(l)||l<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${l}`);if(Number.isNaN(g)||g<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${g}`);if(g>l)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${g}', 'maxTimeout=${l}'`);if(Number.isNaN(r)||r<0||r>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${r}`);let P=0;for(;;){d?.throwIfAborted();try{return await i()}catch(A){if(!u(A))throw A;if(P+1>=w)throw new Pe(A,w);const O=Ue(l,g,P,o,r);await De(O,d?{signal:d}:void 0)}P++}}const Ae={submitEmailPassword:({mode:i,email:e,password:o,name:l})=>i==="sign_up"?$.signUp.email({email:e,password:o,name:l||""}):$.signIn.email({email:e,password:o}),requestPasswordReset:({email:i,redirectTo:e})=>$.requestPasswordReset({email:i,redirectTo:e}),sendOtp:({email:i})=>$.emailOtp.sendVerificationOtp({email:i,type:"sign-in"}),submitOtp:({email:i,otp:e})=>$.signIn.emailOtp({email:i,otp:e}),socialSignIn:({provider:i,callbackURL:e})=>$.signIn.social({provider:i,callbackURL:e}),ssoSignIn:({providerId:i,callbackURL:e})=>$.signIn.sso({providerId:i,callbackURL:e}),onAuthenticated:i=>{window.location.href=i}},ie="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Be={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:i=>`Code sent to ${i}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:i=>`Continue with ${i}`,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 Ve({redirectUrl:i,callbackUrl:e="/",title:o,subtitle:l,brand:w,copy:g,variant:r="default",allowedSocialProviders:u,allowPassword:d=!0,onAuthEvent:P,actions:A}){const{emailAndPassword:O,resetPassword:S,emailOtp:E,socialProviders:F}=Ne(),j={...Ae,...A},h=s=>{try{P?.(s)}catch{}},p=r==="compact",Z=u?F.providers.filter(s=>u.includes(s.name)):F.providers,ee=F.enabled&&Z.length>0,ne=O.enabled&&(d||!E.enabled&&!ee),te=F.enabled&&F.providers.length>0&&!ee&&!E.enabled&&!ne?F.providers:Z,I=F.enabled&&te.length>0,C=O.enabled&&(d||!E.enabled&&!I),[c,N]=b.useState(""),[_,f]=b.useState(""),[re,ge]=b.useState(""),[oe,le]=b.useState(""),[M,de]=b.useState(!1),[ce,_e]=b.useState(()=>E.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[y,U]=b.useState(""),[he,pe]=b.useState(!1),[ke,me]=b.useState(null),a={...Be,...g},Y=b.useId(),q=`${Y}-email`,D=`${Y}-email-error`,fe=`${Y}-name`,xe=`${Y}-password`,be=`${Y}-otp`,v=ce==="signUp",R=ce==="forgotPassword",k=ce==="emailOtp",J=ae({mutationFn:async({email:s,password:n,name:L})=>{try{const H=await j.submitEmailPassword({mode:v?"sign_up":"sign_in",email:s,password:n,name:L});if(H.error)throw new Error(H.error.message||(v?a.signUpFailed:a.signInFailed));return H}catch(H){throw H instanceof Error?H:new Error(a.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:v?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:v?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),W(v?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),K=ae({mutationFn:async({email:s})=>{const n=await j.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(n.error)throw new Error(n.error.message||a.resetEmailFailed);return n},onSuccess:()=>{W("password_reset_requested"),pe(!0)},onError:s=>{W("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),z=ae({mutationFn:async({email:s})=>{const n=await j.sendOtp({email:s});if(n.error)throw new Error(n.error.message||a.otpSendFailed);return n},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),W("email_otp_sent"),de(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),B=ae({mutationFn:async({email:s,otp:n})=>{const L=await j.submitOtp({email:s,otp:n});if(L.error)throw new Error(L.error.message||a.invalidCode);return L},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),se=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),ue=()=>{c.trim()&&!se(c)&&U(a.invalidEmail)},Le=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}J.mutate({email:c,password:_,name:re})},Oe=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail);return}K.mutate({email:c})},Re=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}z.mutate({email:c})},Te=s=>{s.preventDefault(),B.mutate({email:c,otp:oe})},V=s=>n=>{s(n.target.value),we&&J.reset(),ve&&K.reset(),ye&&(z.reset(),B.reset()),s===N&&y&&U("")},Q=s=>{_e(s),ge(""),le(""),de(!1),U(""),pe(!1),me(null),J.reset(),K.reset(),z.reset(),B.reset()},m=J.isPending||K.isPending||z.isPending||B.isPending,we=J.error,ve=K.error,ye=z.error||B.error,T=v?c.trim()&&_.trim()&&re.trim():R?c.trim():k?M?oe.trim():c.trim():c.trim()&&_.trim(),$e=s=>{if(!s)return null;const n=s.message.toLowerCase();return n.includes("unauthorized")||n.includes("401")?a.invalidEmailOrPassword:n.includes("already exists")||n.includes("409")?a.accountExists:n.includes("network")||n.includes("fetch")?a.networkError:n.includes("rate limit")||n.includes("429")?a.tooManyAttempts:n.includes("invalid")&&n.includes("otp")?a.invalidOrExpiredCode:s.message||a.genericError},Ee=we||ve||ye||ke,We=async s=>{h({type:"started",method:"social",provider:s}),me(null);try{const n=await j.socialSignIn({provider:s,callbackURL:i??e});if(n.error)throw new Error(n.error.message||a.authenticationFailed)}catch(n){const L=n instanceof Error?n.message:String(n);h({type:"failed",method:"social",provider:s,stage:"redirect",error:L}),W("social_signin_failed",{provider:s,error:L}),me(n instanceof Error?n:new Error(L))}},Me=R?a.resetPasswordTitle:k&&M?a.verificationCodeTitle:o??a.welcomeTitle,Se=R?a.resetPasswordSubtitle:k&&M?a.codeSentTo(c):l===void 0?a.defaultSubtitle:l;return t.jsxs("div",{className:x("grid w-full",p?"gap-5":"gap-10"),children:[w??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:x("font-medium",p?"text-xl leading-7":"text-2xl leading-8"),children:Me}),Se&&t.jsx("p",{className:x("text-muted-foreground",p?"text-sm leading-5":"text-base leading-6"),children:Se})]}),Ee&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:$e(Ee)}),he&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:a.resetEmailSent}),!R&&!(k&&M)&&I&&t.jsx("div",{className:"grid gap-2",children:te.map(s=>t.jsxs(X,{type:"button",variant:"outline",size:p?"lg":"xl",disabled:m,onClick:()=>{We(s.name)},className:"w-full gap-3",children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:x("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),a.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!R&&!(k&&M)&&I&&(C||E.enabled)&&t.jsxs("div",{className:x("flex items-center gap-2.5",p?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:x("text-muted-foreground",p?"text-sm":"text-base"),children:a.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),k&&E.enabled&&t.jsx(t.Fragment,{children:M?t.jsxs("form",{onSubmit:Te,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:be,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.verificationCodeLabel}),t.jsx(G,{id:be,type:"text",placeholder:a.enterCodePlaceholder,value:oe,onChange:V(le),required:!0,disabled:m,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11"})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.verifying:a.verify}),t.jsx("button",{type:"button",onClick:()=>{de(!1),le(""),z.reset(),B.reset()},disabled:m,className:x("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",p&&"sm:col-span-2"),children:a.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Re,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:q,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:a.emailPlaceholder,value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive",children:y})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.sending:a.sendCode})]})}),R&&C&&!he&&t.jsxs("form",{onSubmit:Oe,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsx(X,{type:"submit",disabled:m||!T,className:"w-full font-semibold",size:"xl",children:m?a.sending:a.sendResetLink})]}),!R&&!k&&C&&t.jsxs("form",{onSubmit:Le,className:"grid gap-5",children:[v&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:fe,className:"block text-sm font-medium text-foreground mb-2",children:a.nameLabel}),t.jsx(G,{id:fe,type:"text",placeholder:a.namePlaceholder,value:re,onChange:V(ge),required:!0,disabled:m,autoComplete:"name",className:"h-11"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:xe,className:"block text-sm font-medium text-foreground",children:a.passwordLabel}),!v&&S.enabled&&t.jsx("button",{type:"button",onClick:()=>Q("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:a.forgotPassword})]}),t.jsx(G,{id:xe,type:"password",placeholder:"••••••••",value:_,onChange:V(f),required:!0,disabled:m,autoComplete:v?"new-password":"current-password",className:"h-11"})]}),t.jsx("div",{className:x("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",T?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:x("p-1",!T&&"pointer-events-none"),children:t.jsx(X,{type:"submit",disabled:m||!T,className:x("w-full font-semibold"),size:"xl","aria-hidden":!T,children:m?v?a.creatingAccount:a.signingIn:a.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:R?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.backToSignIn}):k&&C?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.signInWithPassword}):!k&&C?t.jsxs(t.Fragment,{children:[v?a.alreadyHaveAccount:a.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>Q(v?"signIn":"signUp"),disabled:m,className:ie,children:v?a.signIn:a.signUp}),E.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>Q("emailOtp"),disabled:m,className:ie,children:a.signInWithEmailCode})]})]}):null})]})}class je{constructor(e){this.response=e}response}function He(i){return i.startsWith("/")&&!i.startsWith("//")&&!i.startsWith("/\\")?i:"/"}function Ge({redirectTo:i,onAuthEvent:e}){const o=Ce(),[l,w]=b.useState(null),g=b.useEffectEvent(r=>{try{e?.(r)}catch{}});return b.useEffect(()=>{let r=!1;return(async()=>{g({type:"started",method:"local"});try{let u;try{u=await ze(async()=>{const d=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(d.status>=500)throw new je(d);return d},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(d){if(d instanceof Pe&&d.cause instanceof je)u=d.cause.response;else throw d}if(!u.ok){const d=await u.json().catch(()=>({}));throw new Error(d?.error||o("common.authEntry.autoLoginFailed"))}r||(g({type:"succeeded",method:"local"}),window.location.href=He(i))}catch(u){r||(g({type:"failed",method:"local",stage:"authenticate",error:u instanceof Error?u.message:String(u)}),w(u instanceof Error?u.message:o("common.authEntry.autoLoginFailed")))}})(),()=>{r=!0}},[i]),l?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:o("common.authEntry.autoLoginFailedWithError",{error:l})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:o("common.authEntry.tryRestartingServer")})]})}):t.jsx(Fe,{})}function Fe(){const i=Ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(qe,{size:"lg",label:"Signing in"})}),i[0]=e):e=i[0],e}function Ye({callbackURL:i,providerId:e,ssoSignIn:o,onAuthEvent:l}){const w=b.useEffectEvent(r=>{try{l?.(r)}catch{}}),g=b.useEffectEvent(o);return b.useEffect(()=>{(async()=>{w({type:"started",method:"sso",provider:e});try{const r=await g({providerId:e,callbackURL:i});if(r.error)throw new Error(r.error.message||"SSO redirect failed")}catch(r){w({type:"failed",method:"sso",provider:e,stage:"redirect",error:r instanceof Error?r.message:String(r)})}})()},[e,i]),t.jsx(Fe,{})}function Qe(i){const e=Ie.c(25),{callbackUrl:o,redirectUrl:l,allowAutoLogin:w,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,onAuthenticated:E}=i,F=w===void 0?!0:w,j=Ce(),{sso:h,emailAndPassword:p,magicLink:Z,emailOtp:ee,socialProviders:ne,localMode:te}=Ne(),I=l||o;let C;e[0]!==E?(C=E?{onAuthenticated:E}:void 0,e[0]=E,e[1]=C):C=e[1];const c=C;if(te&&F){let f;return e[2]!==S||e[3]!==I?(f=t.jsx(Ge,{redirectTo:I,onAuthEvent:S}),e[2]=S,e[3]=I,e[4]=f):f=e[4],f}if(h.enabled){let f;return e[5]!==S||e[6]!==I||e[7]!==h.providerId?(f=t.jsx(Ye,{callbackURL:I,providerId:h.providerId,ssoSignIn:Ae.ssoSignIn,onAuthEvent:S}),e[5]=S,e[6]=I,e[7]=h.providerId,e[8]=f):f=e[8],f}if(p.enabled||Z.enabled||ee.enabled||ne.enabled){let f;return e[9]!==O||e[10]!==A||e[11]!==u||e[12]!==o||e[13]!==c||e[14]!==d||e[15]!==S||e[16]!==l||e[17]!==r||e[18]!==g||e[19]!==P?(f=t.jsx(Ve,{redirectUrl:l,callbackUrl:o,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,actions:c}),e[9]=O,e[10]=A,e[11]=u,e[12]=o,e[13]=c,e[14]=d,e[15]=S,e[16]=l,e[17]=r,e[18]=g,e[19]=P,e[20]=f):f=e[20],f}let N;e[21]!==j?(N=j("common.authEntry.noLoginOptions"),e[21]=j,e[22]=N):N=e[22];let _;return e[23]!==N?(_=t.jsx("div",{children:N}),e[23]=N,e[24]=_):_=e[24],_}export{Fe as A,Qe as a};
|
|
1
|
+
import{a3 as Ue,a as $,a4 as Ne,r as b,e as ae,E as W,j as t,m as x,B as X,I as G,c as Ie,b as Ce,h as qe}from"./index-DEZ1imMJ.js";import{d as De}from"./delay-CnY5UFtP.js";class Pe extends Error{constructor(e,o){super(`Retrying exceeded the maxAttempts (${o}).`),this.name="RetryError",this.cause=e}}async function ze(i,e){const{multiplier:o=2,maxTimeout:l=6e4,maxAttempts:w=5,minTimeout:g=1e3,jitter:r=1,isRetriable:u=()=>!0,signal:d}=e??{};if(!Number.isInteger(w)||w<1)throw new RangeError(`Cannot retry as 'maxAttempts' must be a positive integer: current value is ${w}`);if(!Number.isFinite(o)||o<1)throw new RangeError(`Cannot retry as 'multiplier' must be a finite number >= 1: current value is ${o}`);if(Number.isNaN(l)||l<=0)throw new RangeError(`Cannot retry as 'maxTimeout' must be a positive number: current value is ${l}`);if(Number.isNaN(g)||g<0)throw new RangeError(`Cannot retry as 'minTimeout' must be >= 0: current value is ${g}`);if(g>l)throw new RangeError(`Cannot retry as 'minTimeout' must be <= 'maxTimeout': current values 'minTimeout=${g}', 'maxTimeout=${l}'`);if(Number.isNaN(r)||r<0||r>1)throw new RangeError(`Cannot retry as 'jitter' must be between 0 and 1: current value is ${r}`);let P=0;for(;;){d?.throwIfAborted();try{return await i()}catch(A){if(!u(A))throw A;if(P+1>=w)throw new Pe(A,w);const O=Ue(l,g,P,o,r);await De(O,d?{signal:d}:void 0)}P++}}const Ae={submitEmailPassword:({mode:i,email:e,password:o,name:l})=>i==="sign_up"?$.signUp.email({email:e,password:o,name:l||""}):$.signIn.email({email:e,password:o}),requestPasswordReset:({email:i,redirectTo:e})=>$.requestPasswordReset({email:i,redirectTo:e}),sendOtp:({email:i})=>$.emailOtp.sendVerificationOtp({email:i,type:"sign-in"}),submitOtp:({email:i,otp:e})=>$.signIn.emailOtp({email:i,otp:e}),socialSignIn:({provider:i,callbackURL:e})=>$.signIn.social({provider:i,callbackURL:e}),ssoSignIn:({providerId:i,callbackURL:e})=>$.signIn.sso({providerId:i,callbackURL:e}),onAuthenticated:i=>{window.location.href=i}},ie="font-medium text-[#8CAA25] hover:underline disabled:opacity-50",Be={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:i=>`Code sent to ${i}`,defaultSubtitle:"Sign in or create a new account",resetEmailSent:"Check your email for a password reset link.",continueWith:i=>`Continue with ${i}`,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 Ve({redirectUrl:i,callbackUrl:e="/",title:o,subtitle:l,brand:w,copy:g,variant:r="default",allowedSocialProviders:u,allowPassword:d=!0,onAuthEvent:P,actions:A}){const{emailAndPassword:O,resetPassword:S,emailOtp:E,socialProviders:F}=Ne(),j={...Ae,...A},h=s=>{try{P?.(s)}catch{}},p=r==="compact",Z=u?F.providers.filter(s=>u.includes(s.name)):F.providers,ee=F.enabled&&Z.length>0,ne=O.enabled&&(d||!E.enabled&&!ee),te=F.enabled&&F.providers.length>0&&!ee&&!E.enabled&&!ne?F.providers:Z,I=F.enabled&&te.length>0,C=O.enabled&&(d||!E.enabled&&!I),[c,N]=b.useState(""),[_,f]=b.useState(""),[re,ge]=b.useState(""),[oe,le]=b.useState(""),[M,de]=b.useState(!1),[ce,_e]=b.useState(()=>E.enabled?"emailOtp":globalThis.localStorage?.getItem("hasLoggedIn")!=="true"?"signUp":"signIn"),[y,U]=b.useState(""),[he,pe]=b.useState(!1),[ke,me]=b.useState(null),a={...Be,...g},Y=b.useId(),q=`${Y}-email`,D=`${Y}-email-error`,fe=`${Y}-name`,xe=`${Y}-password`,be=`${Y}-otp`,v=ce==="signUp",R=ce==="forgotPassword",k=ce==="emailOtp",J=ae({mutationFn:async({email:s,password:n,name:L})=>{try{const H=await j.submitEmailPassword({mode:v?"sign_up":"sign_in",email:s,password:n,name:L});if(H.error)throw new Error(H.error.message||(v?a.signUpFailed:a.signInFailed));return H}catch(H){throw H instanceof Error?H:new Error(a.authenticationFailed)}},onMutate:()=>{h({type:"started",method:"email_password",mode:v?"sign_up":"sign_in"})},onSuccess:()=>{h({type:"succeeded",method:"email_password",mode:v?"sign_up":"sign_in"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"authenticate",error:s instanceof Error?s.message:String(s)}),W(v?"user_signup_failed":"user_signin_failed",{error:s instanceof Error?s.message:String(s)})}}),K=ae({mutationFn:async({email:s})=>{const n=await j.requestPasswordReset({email:s,redirectTo:"/reset-password"});if(n.error)throw new Error(n.error.message||a.resetEmailFailed);return n},onSuccess:()=>{W("password_reset_requested"),pe(!0)},onError:s=>{W("password_reset_request_failed",{error:s instanceof Error?s.message:String(s)})}}),z=ae({mutationFn:async({email:s})=>{const n=await j.sendOtp({email:s});if(n.error)throw new Error(n.error.message||a.otpSendFailed);return n},onMutate:()=>{h({type:"started",method:"email_otp"})},onSuccess:()=>{h({type:"otp_sent",method:"email_otp"}),W("email_otp_sent"),de(!0)},onError:s=>{h({type:"failed",method:"email_otp",stage:"send_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_send_failed",{error:s instanceof Error?s.message:String(s)})}}),B=ae({mutationFn:async({email:s,otp:n})=>{const L=await j.submitOtp({email:s,otp:n});if(L.error)throw new Error(L.error.message||a.invalidCode);return L},onMutate:()=>{h({type:"otp_submitted",method:"email_otp"})},onSuccess:()=>{h({type:"succeeded",method:"email_otp"}),globalThis.localStorage?.setItem("hasLoggedIn","true"),j.onAuthenticated(i??e)},onError:s=>{h({type:"failed",method:"email_otp",stage:"verify_otp",error:s instanceof Error?s.message:String(s)}),W("email_otp_verify_failed",{error:s instanceof Error?s.message:String(s)})}}),se=s=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s),ue=()=>{c.trim()&&!se(c)&&U(a.invalidEmail)},Le=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_password",mode:v?"sign_up":"sign_in",stage:"validation",error:"invalid_email"});return}J.mutate({email:c,password:_,name:re})},Oe=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail);return}K.mutate({email:c})},Re=s=>{if(s.preventDefault(),!se(c)){U(a.invalidEmail),h({type:"failed",method:"email_otp",stage:"validation",error:"invalid_email"});return}z.mutate({email:c})},Te=s=>{s.preventDefault(),B.mutate({email:c,otp:oe})},V=s=>n=>{s(n.target.value),we&&J.reset(),ve&&K.reset(),ye&&(z.reset(),B.reset()),s===N&&y&&U("")},Q=s=>{_e(s),ge(""),le(""),de(!1),U(""),pe(!1),me(null),J.reset(),K.reset(),z.reset(),B.reset()},m=J.isPending||K.isPending||z.isPending||B.isPending,we=J.error,ve=K.error,ye=z.error||B.error,T=v?c.trim()&&_.trim()&&re.trim():R?c.trim():k?M?oe.trim():c.trim():c.trim()&&_.trim(),$e=s=>{if(!s)return null;const n=s.message.toLowerCase();return n.includes("unauthorized")||n.includes("401")?a.invalidEmailOrPassword:n.includes("already exists")||n.includes("409")?a.accountExists:n.includes("network")||n.includes("fetch")?a.networkError:n.includes("rate limit")||n.includes("429")?a.tooManyAttempts:n.includes("invalid")&&n.includes("otp")?a.invalidOrExpiredCode:s.message||a.genericError},Ee=we||ve||ye||ke,We=async s=>{h({type:"started",method:"social",provider:s}),me(null);try{const n=await j.socialSignIn({provider:s,callbackURL:i??e});if(n.error)throw new Error(n.error.message||a.authenticationFailed)}catch(n){const L=n instanceof Error?n.message:String(n);h({type:"failed",method:"social",provider:s,stage:"redirect",error:L}),W("social_signin_failed",{provider:s,error:L}),me(n instanceof Error?n:new Error(L))}},Me=R?a.resetPasswordTitle:k&&M?a.verificationCodeTitle:o??a.welcomeTitle,Se=R?a.resetPasswordSubtitle:k&&M?a.codeSentTo(c):l===void 0?a.defaultSubtitle:l;return t.jsxs("div",{className:x("grid w-full",p?"gap-5":"gap-10"),children:[w??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:x("font-medium",p?"text-xl leading-7":"text-2xl leading-8"),children:Me}),Se&&t.jsx("p",{className:x("text-muted-foreground",p?"text-sm leading-5":"text-base leading-6"),children:Se})]}),Ee&&t.jsx("div",{role:"alert",className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:$e(Ee)}),he&&t.jsx("div",{role:"status",className:"rounded-xl bg-success/10 p-3 text-sm text-success text-center",children:a.resetEmailSent}),!R&&!(k&&M)&&I&&t.jsx("div",{className:"grid gap-2",children:te.map(s=>t.jsxs(X,{type:"button",variant:"outline",size:p?"lg":"xl",disabled:m,onClick:()=>{We(s.name)},className:"w-full gap-3",children:[s.icon&&t.jsx("img",{src:s.icon,alt:"",className:x("h-5 w-5",s.name==="github"&&"dark:invert"),"aria-hidden":"true"}),a.continueWith(s.name.charAt(0).toUpperCase()+s.name.slice(1))]},s.name))}),!R&&!(k&&M)&&I&&(C||E.enabled)&&t.jsxs("div",{className:x("flex items-center gap-2.5",p?"my-0":"-my-4"),children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:x("text-muted-foreground",p?"text-sm":"text-base"),children:a.divider}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),k&&E.enabled&&t.jsx(t.Fragment,{children:M?t.jsxs("form",{onSubmit:Te,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:be,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.verificationCodeLabel}),t.jsx(G,{id:be,type:"text",placeholder:a.enterCodePlaceholder,value:oe,onChange:V(le),required:!0,disabled:m,autoFocus:!0,inputMode:"numeric",autoComplete:"one-time-code",className:"h-11"})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.verifying:a.verify}),t.jsx("button",{type:"button",onClick:()=>{de(!1),le(""),z.reset(),B.reset()},disabled:m,className:x("mt-1 text-sm text-muted-foreground transition-colors hover:text-foreground",p&&"sm:col-span-2"),children:a.useDifferentEmail})]}):t.jsxs("form",{onSubmit:Re,className:x("grid gap-2",p&&"sm:grid-cols-[minmax(0,1fr)_auto] sm:items-start"),children:[t.jsxs("div",{className:"grid gap-2",children:[t.jsx("label",{htmlFor:q,className:x("text-sm font-medium text-foreground",p&&"sr-only"),children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:a.emailPlaceholder,value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive",children:y})]}),t.jsx(X,{type:"submit",size:p?"lg":"xl",disabled:m||!T,className:x(p?"sm:w-auto":"w-full"),children:m?a.sending:a.sendCode})]})}),R&&C&&!he&&t.jsxs("form",{onSubmit:Oe,className:"grid gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsx(X,{type:"submit",disabled:m||!T,className:"w-full font-semibold",size:"xl",children:m?a.sending:a.sendResetLink})]}),!R&&!k&&C&&t.jsxs("form",{onSubmit:Le,className:"grid gap-5",children:[v&&t.jsxs("div",{children:[t.jsx("label",{htmlFor:fe,className:"block text-sm font-medium text-foreground mb-2",children:a.nameLabel}),t.jsx(G,{id:fe,type:"text",placeholder:a.namePlaceholder,value:re,onChange:V(ge),required:!0,disabled:m,autoComplete:"name",className:"h-11"})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:q,className:"block text-sm font-medium text-foreground mb-2",children:a.emailLabel}),t.jsx(G,{id:q,type:"email",placeholder:"you@example.com",value:c,onChange:V(N),onBlur:ue,required:!0,disabled:m,autoComplete:"email","aria-invalid":!!y,"aria-describedby":y?D:void 0,className:"h-11"}),y&&t.jsx("p",{id:D,role:"alert",className:"text-xs text-destructive mt-1.5",children:y})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{htmlFor:xe,className:"block text-sm font-medium text-foreground",children:a.passwordLabel}),!v&&S.enabled&&t.jsx("button",{type:"button",onClick:()=>Q("forgotPassword"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:a.forgotPassword})]}),t.jsx(G,{id:xe,type:"password",placeholder:"••••••••",value:_,onChange:V(f),required:!0,disabled:m,autoComplete:v?"new-password":"current-password",className:"h-11"})]}),t.jsx("div",{className:x("overflow-hidden transition-all duration-300 ease-[cubic-bezier(0.075,0.82,0.165,1)]",T?"max-h-[100px] opacity-100 translate-y-0":"max-h-0 opacity-0 -translate-y-2"),children:t.jsx("div",{className:x("p-1",!T&&"pointer-events-none"),children:t.jsx(X,{type:"submit",disabled:m||!T,className:x("w-full font-semibold"),size:"xl","aria-hidden":!T,children:m?v?a.creatingAccount:a.signingIn:a.continue})})})]}),t.jsx("div",{className:"text-sm text-muted-foreground",children:R?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.backToSignIn}):k&&C?t.jsx("button",{type:"button",onClick:()=>Q("signIn"),disabled:m,className:ie,children:a.signInWithPassword}):!k&&C?t.jsxs(t.Fragment,{children:[v?a.alreadyHaveAccount:a.dontHaveAccount,t.jsx("button",{type:"button",onClick:()=>Q(v?"signIn":"signUp"),disabled:m,className:ie,children:v?a.signIn:a.signUp}),E.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"mx-2",children:"·"}),t.jsx("button",{type:"button",onClick:()=>Q("emailOtp"),disabled:m,className:ie,children:a.signInWithEmailCode})]})]}):null})]})}class je{constructor(e){this.response=e}response}function He(i){return i.startsWith("/")&&!i.startsWith("//")&&!i.startsWith("/\\")?i:"/"}function Ge({redirectTo:i,onAuthEvent:e}){const o=Ce(),[l,w]=b.useState(null),g=b.useEffectEvent(r=>{try{e?.(r)}catch{}});return b.useEffect(()=>{let r=!1;return(async()=>{g({type:"started",method:"local"});try{let u;try{u=await ze(async()=>{const d=await fetch("/api/auth/custom/local-session",{method:"POST",credentials:"include"});if(d.status>=500)throw new je(d);return d},{maxAttempts:5,minTimeout:1e3,maxTimeout:1e4,multiplier:2,jitter:0})}catch(d){if(d instanceof Pe&&d.cause instanceof je)u=d.cause.response;else throw d}if(!u.ok){const d=await u.json().catch(()=>({}));throw new Error(d?.error||o("common.authEntry.autoLoginFailed"))}r||(g({type:"succeeded",method:"local"}),window.location.href=He(i))}catch(u){r||(g({type:"failed",method:"local",stage:"authenticate",error:u instanceof Error?u.message:String(u)}),w(u instanceof Error?u.message:o("common.authEntry.autoLoginFailed")))}})(),()=>{r=!0}},[i]),l?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:o("common.authEntry.autoLoginFailedWithError",{error:l})}),t.jsx("p",{className:"text-muted-foreground text-sm",children:o("common.authEntry.tryRestartingServer")})]})}):t.jsx(Fe,{})}function Fe(){const i=Ie.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex min-h-screen items-center justify-center",children:t.jsx(qe,{size:"lg",label:"Signing in"})}),i[0]=e):e=i[0],e}function Ye({callbackURL:i,providerId:e,ssoSignIn:o,onAuthEvent:l}){const w=b.useEffectEvent(r=>{try{l?.(r)}catch{}}),g=b.useEffectEvent(o);return b.useEffect(()=>{(async()=>{w({type:"started",method:"sso",provider:e});try{const r=await g({providerId:e,callbackURL:i});if(r.error)throw new Error(r.error.message||"SSO redirect failed")}catch(r){w({type:"failed",method:"sso",provider:e,stage:"redirect",error:r instanceof Error?r.message:String(r)})}})()},[e,i]),t.jsx(Fe,{})}function Qe(i){const e=Ie.c(25),{callbackUrl:o,redirectUrl:l,allowAutoLogin:w,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,onAuthenticated:E}=i,F=w===void 0?!0:w,j=Ce(),{sso:h,emailAndPassword:p,magicLink:Z,emailOtp:ee,socialProviders:ne,localMode:te}=Ne(),I=l||o;let C;e[0]!==E?(C=E?{onAuthenticated:E}:void 0,e[0]=E,e[1]=C):C=e[1];const c=C;if(te&&F){let f;return e[2]!==S||e[3]!==I?(f=t.jsx(Ge,{redirectTo:I,onAuthEvent:S}),e[2]=S,e[3]=I,e[4]=f):f=e[4],f}if(h.enabled){let f;return e[5]!==S||e[6]!==I||e[7]!==h.providerId?(f=t.jsx(Ye,{callbackURL:I,providerId:h.providerId,ssoSignIn:Ae.ssoSignIn,onAuthEvent:S}),e[5]=S,e[6]=I,e[7]=h.providerId,e[8]=f):f=e[8],f}if(p.enabled||Z.enabled||ee.enabled||ne.enabled){let f;return e[9]!==O||e[10]!==A||e[11]!==u||e[12]!==o||e[13]!==c||e[14]!==d||e[15]!==S||e[16]!==l||e[17]!==r||e[18]!==g||e[19]!==P?(f=t.jsx(Ve,{redirectUrl:l,callbackUrl:o,title:g,subtitle:r,brand:u,copy:d,variant:P,allowedSocialProviders:A,allowPassword:O,onAuthEvent:S,actions:c}),e[9]=O,e[10]=A,e[11]=u,e[12]=o,e[13]=c,e[14]=d,e[15]=S,e[16]=l,e[17]=r,e[18]=g,e[19]=P,e[20]=f):f=e[20],f}let N;e[21]!==j?(N=j("common.authEntry.noLoginOptions"),e[21]=j,e[22]=N):N=e[22];let _;return e[23]!==N?(_=t.jsx("div",{children:N}),e[23]=N,e[24]=_):_=e[24],_}export{Fe as A,Qe as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,m as p,j as f}from"./index-
|
|
1
|
+
import{c as g,m as p,j as f}from"./index-DEZ1imMJ.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{a as u}from"./mcp-oauth-
|
|
1
|
+
import{a as u}from"./mcp-oauth-CHmbtYyN.js";import{i as p}from"./mcp-oauth-BBT3ip6Z.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 p({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 u({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-DBYEb7yh.js → automation-list-row-knBDKeRb.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Q,b as U,r as ee,m as G,j as t,X as te,B as se,_ as ie,Z as ne,Y as ae,aH as oe,aI as le,aJ as re,aK as ce,bj as me,aL as ue,aM as de,aN as fe}from"./index-
|
|
1
|
+
import{c as Q,b as U,r as ee,m as G,j as t,X as te,B as se,_ as ie,Z as ne,Y as ae,aH as oe,aI as le,aJ as re,aK as ce,bj as me,aL as ue,aM as de,aN as fe}from"./index-DEZ1imMJ.js";import{B as ge}from"./badge-BpzeYR5Z.js";import{A as xe,S as pe}from"./agent-icon-CTbTFMnU.js";import{a as he}from"./SwitchHorizontal01-elXb4-4d.js";import{s as je}from"./Trash01-C-PU5Hm-.js";import{i as _e}from"./Zap-pmN7zSOE.js";import{b as we}from"./repository-binding-C0msapZZ.js";import{a as ve}from"./use-automations-CyrAu8XA.js";function ze(c){const e=Q.c(89),{automation:s,showAgent:o,onClick:n}=c,i=U(),{remove:a}=ve(),[r,J]=ee.useState(!1),l=we(o?s.virtual_mcp_id:void 0);let F;e[0]!==s.id||e[1]!==a?(F=()=>{a.mutate(s.id),J(!1)},e[0]=s.id,e[1]=a,e[2]=F):F=e[2];const V=F;let K;e[3]!==n?(K=m=>{m.target===m.currentTarget&&(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),n())},e[3]=n,e[4]=K):K=e[4];const X=K,Y=s.active&&s.trigger_count>0?"bg-success":"bg-muted-foreground/40";let u;e[5]!==Y?(u=G("inline-block size-2 rounded-full shrink-0",Y),e[5]=Y,e[6]=u):u=e[6];const Z=s.active&&s.trigger_count>0?"automations.automationListRow.ariaActive":s.active?"automations.automationListRow.ariaNoTriggers":"automations.automationListRow.ariaPaused";let d;e[7]!==i||e[8]!==Z?(d=i(Z),e[7]=i,e[8]=Z,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]!==l?.icon||e[14]!==l?.title||e[15]!==s.name||e[16]!==o?(g=o&&t.jsx(xe,{icon:l?.icon??null,name:l?.title??s.name,size:"xs",className:"shrink-0"}),e[13]=l?.icon,e[14]=l?.title,e[15]=s.name,e[16]=o,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]!==s.system_key||e[21]!==i?(p=s.system_key&&t.jsx(ge,{variant:"muted",children:i("automations.builtin.badge")}),e[20]=s.system_key,e[21]=i,e[22]=p):p=e[22];let h;e[23]!==l||e[24]!==o?(h=o&&l&&t.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",l.title]}),e[23]=l,e[24]=o,e[25]=h):h=e[25];let j;e[26]!==p||e[27]!==h||e[28]!==x?(j=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,p,h]}),e[26]=p,e[27]=h,e[28]=x,e[29]=j):j=e[29];let _;e[30]!==s.nearest_next_run_at||e[31]!==s.trigger_count?(_=t.jsx(De,{triggerCount:s.trigger_count,nextRunAt:s.nearest_next_run_at}),e[30]=s.nearest_next_run_at,e[31]=s.trigger_count,e[32]=_):_=e[32];let w;e[33]!==j||e[34]!==_?(w=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[j,_]}),e[33]=j,e[34]=_,e[35]=w):w=e[35];const q=s.system_key&&"invisible";let v;e[36]!==q?(v=G("shrink-0",q),e[36]=q,e[37]=v):v=e[37];let O;e[38]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(te,{asChild:!0,children:t.jsx(se,{variant:"ghost",size:"icon",className:"opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:t.jsx(he,{size:16})})}),e[38]=O):O=e[38];let $,I;e[39]===Symbol.for("react.memo_cache_sentinel")?($=m=>{m.stopPropagation(),J(!0)},I=t.jsx(je,{size:16}),e[39]=$,e[40]=I):($=e[39],I=e[40]);let y;e[41]!==i?(y=i("automations.automationListRow.delete"),e[41]=i,e[42]=y):y=e[42];let A;e[43]!==y?(A=t.jsxs(ie,{children:[O,t.jsx(ne,{align:"end",children:t.jsxs(ae,{variant:"destructive",onClick:$,children:[I,y]})})]}),e[43]=y,e[44]=A):A=e[44];let D;e[45]!==v||e[46]!==A?(D=t.jsx("div",{onClick:Ae,onKeyDown:ye,role:"presentation",className:v,children:A}),e[45]=v,e[46]=A,e[47]=D):D=e[47];let N;e[48]!==X||e[49]!==n||e[50]!==w||e[51]!==D||e[52]!==f||e[53]!==g?(N=t.jsxs("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:X,className:"group w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-accent transition-colors cursor-pointer focus-ring",children:[f,g,w,D]}),e[48]=X,e[49]=n,e[50]=w,e[51]=D,e[52]=f,e[53]=g,e[54]=N):N=e[54];let R;e[55]!==i?(R=i("automations.automationListRow.deleteTitle"),e[55]=i,e[56]=R):R=e[56];let k;e[57]!==R?(k=t.jsx(oe,{children:R}),e[57]=R,e[58]=k):k=e[58];let b;e[59]!==s.name||e[60]!==i?(b=i("automations.automationListRow.deleteDescription",{name:s.name}),e[59]=s.name,e[60]=i,e[61]=b):b=e[61];let L;e[62]!==b?(L=t.jsx(le,{children:b}),e[62]=b,e[63]=L):L=e[63];let C;e[64]!==k||e[65]!==L?(C=t.jsxs(re,{children:[k,L]}),e[64]=k,e[65]=L,e[66]=C):C=e[66];let P;e[67]!==i?(P=i("automations.automationListRow.cancel"),e[67]=i,e[68]=P):P=e[68];let T;e[69]!==P?(T=t.jsx(ce,{children:P}),e[69]=P,e[70]=T):T=e[70];const W=a.isPending;let z;e[71]!==i?(z=i("automations.automationListRow.deleteButton"),e[71]=i,e[72]=z):z=e[72];let B;e[73]!==V||e[74]!==a.isPending||e[75]!==z?(B=t.jsx(me,{onClick:V,disabled:W,variant:"destructive",children:z}),e[73]=V,e[74]=a.isPending,e[75]=z,e[76]=B):B=e[76];let M;e[77]!==T||e[78]!==B?(M=t.jsxs(ue,{children:[T,B]}),e[77]=T,e[78]=B,e[79]=M):M=e[79];let S;e[80]!==C||e[81]!==M?(S=t.jsxs(de,{children:[C,M]}),e[80]=C,e[81]=M,e[82]=S):S=e[82];let E;e[83]!==r||e[84]!==S?(E=t.jsx(fe,{open:r,onOpenChange:J,children:S}),e[83]=r,e[84]=S,e[85]=E):E=e[85];let H;return e[86]!==N||e[87]!==E?(H=t.jsxs(t.Fragment,{children:[N,E]}),e[86]=N,e[87]=E,e[88]=H):H=e[88],H}function ye(c){return c.stopPropagation()}function Ae(c){return c.stopPropagation()}function De(c){const e=Q.c(8),{triggerCount:s,nextRunAt:o}=c,n=U();if(s===0){let a;e[0]!==n?(a=n("automations.automationListRow.noTriggers"),e[0]=n,e[1]=a):a=e[1];let r;return e[2]!==a?(r=t.jsx("span",{className:"text-xs text-muted-foreground",children:a}),e[2]=a,e[3]=r):r=e[3],r}let i;return e[4]!==o||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:o?t.jsxs(t.Fragment,{children:[t.jsx(pe,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:n("automations.automationListRow.nextRun",{date:new Date(o).toLocaleString()})})]}):t.jsxs(t.Fragment,{children:[t.jsx(_e,{size:12,className:"shrink-0"}),t.jsx("span",{className:"truncate",children:s===1?n("automations.automationListRow.triggersOne"):n("automations.automationListRow.triggers",{count:s})})]})}),e[4]=o,e[5]=n,e[6]=s,e[7]=i):i=e[7],i}export{ze as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Y,b as X,a5 as lt,T as it,ak as rt,fd as ct,K as tt,j as s,m as ut,i as mt,gy as dt}from"./index-B0M6fld0.js";import{u as ft}from"./useInfiniteQuery-CrPhADUx.js";import{u as xt}from"./use-connection-BLq1Zghk.js";import{u as pt}from"./use-mcp-client-C8sFqQYs.js";import{a as gt}from"./repository-binding-D5Bfxppj.js";import{b as ht,a as Rt}from"./sheet-C5Vpqn4B.js";import{e as jt,a as Nt,b as st,T as G,d as Tt,c as Q}from"./table-B6HdX-5W.js";import{E as et}from"./empty-state-BBHWcru0.js";import{u as bt}from"./use-id-selection-DlXip3K9.js";import{u as St}from"./use-infinite-scroll-qE2UPD2B.js";import{g as vt}from"./task-status-nf4sWabv.js";import{e as Ct}from"./use-automations-IINULJEn.js";import{T as wt,f as at,a as nt}from"./thread-sheet-body-CJ90Ecr4.js";const W=50;function J(m){const t=Y.c(10),{title:r,value:c,subtitle:e}=m;let o;t[0]!==r?(o=s.jsx("span",{className:"text-sm text-foreground/70",children:r}),t[0]=r,t[1]=o):o=t[1];let n;t[2]!==c?(n=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:c}),t[2]=c,t[3]=n):n=t[3];let a;t[4]!==e?(a=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=a):a=t[5];let l;return t[6]!==o||t[7]!==n||t[8]!==a?(l=s.jsxs(dt,{className:"pt-4 px-4 pb-5 gap-1",children:[o,n,a]}),t[6]=o,t[7]=n,t[8]=a,t[9]=l):l=t[9],l}function yt(m){const t=Y.c(45),{automationId:r,range:c}=m,e=X(),{data:o,isLoading:n}=Ct(r,c),a=o?.runs,l=o?.usage;let k;t[0]!==a?(k=a&&a.total>0?`${Math.round(a.completed/a.total*100)}%`:"—",t[0]=a,t[1]=k):k=t[1];const C=k;let w;t[2]!==e||t[3]!==l?(w=l&&l.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:l.sampledRuns}):void 0,t[2]=e,t[3]=l,t[4]=w):w=t[4];const h=w;let b;t[5]!==e?(b=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=b):b=t[6];let d;t[7]!==n||t[8]!==a?.total?(d=n?"…":a?.total.toLocaleString()??"0",t[7]=n,t[8]=a?.total,t[9]=d):d=t[9];let f;t[10]!==a||t[11]!==e?(f=a?`${a.completed} ${e("automations.automationRuns.ok")} · ${a.failed} ${e("automations.automationRuns.failed")}${a.inProgress>0?` · ${a.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=a,t[11]=e,t[12]=f):f=t[12];let x;t[13]!==b||t[14]!==d||t[15]!==f?(x=s.jsx(J,{title:b,value:d,subtitle:f}),t[13]=b,t[14]=d,t[15]=f,t[16]=x):x=t[16];let j;t[17]!==e?(j=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=j):j=t[18];const y=n?"…":C;let S;t[19]!==j||t[20]!==y?(S=s.jsx(J,{title:j,value:y}),t[19]=j,t[20]=y,t[21]=S):S=t[21];let N;t[22]!==e?(N=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=N):N=t[23];let u;t[24]!==n||t[25]!==l?.totalTokens?(u=n?"…":at(l?.totalTokens??0),t[24]=n,t[25]=l?.totalTokens,t[26]=u):u=t[26];let v;t[27]!==N||t[28]!==u||t[29]!==h?(v=s.jsx(J,{title:N,value:u,subtitle:h}),t[27]=N,t[28]=u,t[29]=h,t[30]=v):v=t[30];let i;t[31]!==e?(i=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=i):i=t[32];let p;t[33]!==n||t[34]!==l?(p=n?"…":l&&l.costUsd>0?nt(l.costUsd):"—",t[33]=n,t[34]=l,t[35]=p):p=t[35];let T;t[36]!==i||t[37]!==p||t[38]!==h?(T=s.jsx(J,{title:i,value:p,subtitle:h}),t[36]=i,t[37]=p,t[38]=h,t[39]=T):T=t[39];let g;return t[40]!==v||t[41]!==T||t[42]!==x||t[43]!==S?(g=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[x,S,v,T]}),t[40]=v,t[41]=T,t[42]=x,t[43]=S,t[44]=g):g=t[44],g}function It(m){const t=Y.c(57),{run:r,usage:c,onClick:e,lastRowRef:o}=m,n=X();let a,l;if(t[0]!==r.created_at){const _=new Date(r.created_at);a=_.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=_.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=r.created_at,t[1]=a,t[2]=l}else a=t[1],l=t[2];const k=l;let C,w,h,b,d,f,x,j,y,S,N;if(t[3]!==o||t[4]!==e||t[5]!==r.status||t[6]!==r.title||t[7]!==n){const _=vt(r.status),$=_.icon;w=st,y=o,S="h-14 cursor-pointer hover:bg-accent transition-colors border-b-0",N=e,t[19]!==r.title?(h=s.jsx(Q,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:s.jsx("div",{className:"font-medium text-foreground truncate",children:r.title})}),t[19]=r.title,t[20]=h):h=t[20],C=Q,j="w-28 px-3",f="flex items-center gap-1.5",x=s.jsx($,{size:14,className:_.iconClassName}),b=ut("text-sm",_.labelColor),d=n(_.labelKey),t[3]=o,t[4]=e,t[5]=r.status,t[6]=r.title,t[7]=n,t[8]=C,t[9]=w,t[10]=h,t[11]=b,t[12]=d,t[13]=f,t[14]=x,t[15]=j,t[16]=y,t[17]=S,t[18]=N}else C=t[8],w=t[9],h=t[10],b=t[11],d=t[12],f=t[13],x=t[14],j=t[15],y=t[16],S=t[17],N=t[18];let u;t[21]!==b||t[22]!==d?(u=s.jsx("span",{className:b,children:d}),t[21]=b,t[22]=d,t[23]=u):u=t[23];let v;t[24]!==u||t[25]!==f||t[26]!==x?(v=s.jsxs("div",{className:f,children:[x,u]}),t[24]=u,t[25]=f,t[26]=x,t[27]=v):v=t[27];let i;t[28]!==C||t[29]!==v||t[30]!==j?(i=s.jsx(C,{className:j,children:v}),t[28]=C,t[29]=v,t[30]=j,t[31]=i):i=t[31];let p;t[32]!==c?(p=c?at(c.totalTokens):"—",t[32]=c,t[33]=p):p=t[33];let T;t[34]!==p?(T=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:p}),t[34]=p,t[35]=T):T=t[35];let g;t[36]!==c?(g=c&&c.costUsd>0?nt(c.costUsd):"—",t[36]=c,t[37]=g):g=t[37];let I;t[38]!==g?(I=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:g}),t[38]=g,t[39]=I):I=t[39];let D;t[40]!==a?(D=s.jsx("div",{children:a}),t[40]=a,t[41]=D):D=t[41];let P;t[42]!==k?(P=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:k}),t[42]=k,t[43]=P):P=t[43];let E;t[44]!==D||t[45]!==P?(E=s.jsxs(Q,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,P]}),t[44]=D,t[45]=P,t[46]=E):E=t[46];let M;return t[47]!==w||t[48]!==h||t[49]!==i||t[50]!==T||t[51]!==I||t[52]!==E||t[53]!==y||t[54]!==S||t[55]!==N?(M=s.jsxs(w,{ref:y,className:S,onClick:N,children:[h,i,T,I,E]}),t[47]=w,t[48]=h,t[49]=i,t[50]=T,t[51]=I,t[52]=E,t[53]=y,t[54]=S,t[55]=N,t[56]=M):M=t[56],M}function Vt(m){const t=Y.c(73),{automationId:r,triggerIds:c,range:e}=m,o=X(),{org:n,locator:a}=lt();let l;t[0]!==n.id||t[1]!==n.slug?(l={connectionId:it,orgId:n.id,orgSlug:n.slug},t[0]=n.id,t[1]=n.slug,t[2]=l):l=t[2];const k=pt(l),C=rt(),w=xt(),h=gt(),{data:b}=ct(),d=c.length>0;let f;t[3]!==r||t[4]!==n.id||t[5]!==c?(f=tt.automationRuns(n.id,r,c),t[3]=r,t[4]=n.id,t[5]=c,t[6]=f):f=t[6];let x;t[7]!==C||t[8]!==c?(x=async U=>{const{pageParam:z}=U,ot=z===void 0?0:z;return await C.call("COLLECTION_THREADS_LIST",{limit:W,offset:ot,where:{trigger_ids:c}})},t[7]=C,t[8]=c,t[9]=x):x=t[9];let j;t[10]!==d||t[11]!==f||t[12]!==x?(j={queryKey:f,queryFn:x,initialPageParam:0,getNextPageParam:Dt,enabled:d,staleTime:3e4},t[10]=d,t[11]=f,t[12]=x,t[13]=j):j=t[13];const{data:y,fetchNextPage:S,hasNextPage:N,isFetchingNextPage:u,isLoading:v}=ft(j);let i,p,T,g;t[14]!==y?.pages||t[15]!==a||t[16]!==e?(i=(y?.pages??[]).flatMap(_t),g=i.map(Pt),T=mt,p=tt.monitoringThreadUsage(a,JSON.stringify({ids:g,...e})),t[14]=y?.pages,t[15]=a,t[16]=e,t[17]=i,t[18]=p,t[19]=T,t[20]=g):(i=t[17],p=t[18],T=t[19],g=t[20]);let I;t[21]!==e||t[22]!==C||t[23]!==g?(I=async()=>await C.call("MONITORING_THREAD_USAGE",{threadIds:g,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=C,t[23]=g,t[24]=I):I=t[24];const D=g.length>0;let P;t[25]!==p||t[26]!==I||t[27]!==D?(P={queryKey:p,queryFn:I,enabled:D,staleTime:3e4},t[25]=p,t[26]=I,t[27]=D,t[28]=P):P=t[28];const{data:E}=T(P);let M;t[29]!==E?.items?(M=new Map((E?.items??[]).map(kt)),t[29]=E?.items,t[30]=M):M=t[30];const _=M;let $;t[31]!==S||t[32]!==N||t[33]!==u?($=()=>{N&&!u&&S()},t[31]=S,t[32]=N,t[33]=u,t[34]=$):$=t[34];const Z=St($,N??!1,u),R=bt(i),V=R.selected;let L;t[35]!==r||t[36]!==e?(L=s.jsx(yt,{automationId:r,range:e}),t[35]=r,t[36]=e,t[37]=L):L=t[37];let A;t[38]!==d||t[39]!==v||t[40]!==Z||t[41]!==i||t[42]!==R||t[43]!==o||t[44]!==_?(A=d?v?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:o("automations.automationRuns.loadingRuns")}):i.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:o("automations.automationRuns.noRunsTitle"),description:o("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 font-normal text-meta",children:o("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 font-normal text-meta",children:o("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:o("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:o("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 font-normal text-meta",children:o("automations.automationRuns.startedHeader")})]})}),s.jsx(Tt,{children:i.map((U,z)=>s.jsx(It,{run:U,usage:_.get(U.id),onClick:()=>R.select(U.id),lastRowRef:z===i.length-1?Z:void 0},U.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:o("automations.automationRuns.noStartersTitle"),description:o("automations.automationRuns.noStartersDescription")})}),t[38]=d,t[39]=v,t[40]=Z,t[41]=i,t[42]=R,t[43]=o,t[44]=_,t[45]=A):A=t[45];let H;t[46]!==u||t[47]!==o?(H=u&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:o("automations.automationRuns.loadingMore")}),t[46]=u,t[47]=o,t[48]=H):H=t[48];let O;t[49]!==R?(O=U=>{U||R.close()},t[49]=R,t[50]=O):O=t[50];let K;t[51]!==w||t[52]!==h||t[53]!==k||t[54]!==a||t[55]!==b||t[56]!==i||t[57]!==V||t[58]!==R.index||t[59]!==R.next||t[60]!==R.prev?(K=V&&s.jsx(wt,{thread:V,client:k,locator:a,connections:w,virtualMcps:h,members:b,nav:{index:R.index,total:i.length,onPrev:R.prev,onNext:R.next}}),t[51]=w,t[52]=h,t[53]=k,t[54]=a,t[55]=b,t[56]=i,t[57]=V,t[58]=R.index,t[59]=R.next,t[60]=R.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]!==R.isOpen||t[65]!==O||t[66]!==q?(F=s.jsx(ht,{open:R.isOpen,onOpenChange:O,children:q}),t[64]=R.isOpen,t[65]=O,t[66]=q,t[67]=F):F=t[67];let B;return t[68]!==L||t[69]!==A||t[70]!==H||t[71]!==F?(B=s.jsxs("div",{className:"flex flex-col gap-5",children:[L,A,H,F]}),t[68]=L,t[69]=A,t[70]=H,t[71]=F,t[72]=B):B=t[72],B}function kt(m){return[m.threadId,{calls:m.calls,inputTokens:m.inputTokens,outputTokens:m.outputTokens,totalTokens:m.totalTokens,costUsd:m.costUsd}]}function Pt(m){return m.id}function _t(m){return m.items??[]}function Dt(m,t){const r=m,c=t;if(!((r?.items?.length??0)<W))return c.length*W}export{Vt as A};
|
|
1
|
+
import{c as Y,b as X,a5 as lt,T as it,ak as rt,fg as ct,K as tt,j as s,m as ut,i as mt,gA as dt}from"./index-DEZ1imMJ.js";import{u as ft}from"./useInfiniteQuery-CtNfxLxq.js";import{u as xt}from"./use-connection-BozgIoMu.js";import{u as pt}from"./use-mcp-client-DJjkIlNp.js";import{a as gt}from"./repository-binding-C0msapZZ.js";import{b as ht,a as Rt}from"./sheet-D2hfPw7P.js";import{e as jt,a as Nt,b as st,T as G,d as Tt,c as Q}from"./table-DjgVXWdP.js";import{E as et}from"./empty-state-CtwVPMDf.js";import{u as bt}from"./use-id-selection-BHXFVfAt.js";import{u as St}from"./use-infinite-scroll-CED9GMTE.js";import{g as vt}from"./task-status-BfFZ6nf8.js";import{e as Ct}from"./use-automations-CyrAu8XA.js";import{T as wt,f as at,a as nt}from"./thread-sheet-body-BiNfUUQ_.js";const W=50;function J(m){const t=Y.c(10),{title:r,value:c,subtitle:e}=m;let o;t[0]!==r?(o=s.jsx("span",{className:"text-sm text-foreground/70",children:r}),t[0]=r,t[1]=o):o=t[1];let n;t[2]!==c?(n=s.jsx("span",{className:"text-3xl font-normal tabular-nums",children:c}),t[2]=c,t[3]=n):n=t[3];let a;t[4]!==e?(a=e&&s.jsx("span",{className:"text-xs text-muted-foreground",children:e}),t[4]=e,t[5]=a):a=t[5];let l;return t[6]!==o||t[7]!==n||t[8]!==a?(l=s.jsxs(dt,{className:"pt-4 px-4 pb-5 gap-1",children:[o,n,a]}),t[6]=o,t[7]=n,t[8]=a,t[9]=l):l=t[9],l}function yt(m){const t=Y.c(45),{automationId:r,range:c}=m,e=X(),{data:o,isLoading:n}=Ct(r,c),a=o?.runs,l=o?.usage;let k;t[0]!==a?(k=a&&a.total>0?`${Math.round(a.completed/a.total*100)}%`:"—",t[0]=a,t[1]=k):k=t[1];const C=k;let w;t[2]!==e||t[3]!==l?(w=l&&l.truncated?e("automations.automationRuns.lastRunsSubtitle",{count:l.sampledRuns}):void 0,t[2]=e,t[3]=l,t[4]=w):w=t[4];const h=w;let b;t[5]!==e?(b=e("automations.automationRuns.runsTitle"),t[5]=e,t[6]=b):b=t[6];let d;t[7]!==n||t[8]!==a?.total?(d=n?"…":a?.total.toLocaleString()??"0",t[7]=n,t[8]=a?.total,t[9]=d):d=t[9];let f;t[10]!==a||t[11]!==e?(f=a?`${a.completed} ${e("automations.automationRuns.ok")} · ${a.failed} ${e("automations.automationRuns.failed")}${a.inProgress>0?` · ${a.inProgress} ${e("automations.automationRuns.running")}`:""}`:void 0,t[10]=a,t[11]=e,t[12]=f):f=t[12];let x;t[13]!==b||t[14]!==d||t[15]!==f?(x=s.jsx(J,{title:b,value:d,subtitle:f}),t[13]=b,t[14]=d,t[15]=f,t[16]=x):x=t[16];let j;t[17]!==e?(j=e("automations.automationRuns.successRateTitle"),t[17]=e,t[18]=j):j=t[18];const y=n?"…":C;let S;t[19]!==j||t[20]!==y?(S=s.jsx(J,{title:j,value:y}),t[19]=j,t[20]=y,t[21]=S):S=t[21];let N;t[22]!==e?(N=e("automations.automationRuns.tokensTitle"),t[22]=e,t[23]=N):N=t[23];let u;t[24]!==n||t[25]!==l?.totalTokens?(u=n?"…":at(l?.totalTokens??0),t[24]=n,t[25]=l?.totalTokens,t[26]=u):u=t[26];let v;t[27]!==N||t[28]!==u||t[29]!==h?(v=s.jsx(J,{title:N,value:u,subtitle:h}),t[27]=N,t[28]=u,t[29]=h,t[30]=v):v=t[30];let i;t[31]!==e?(i=e("automations.automationRuns.costTitle"),t[31]=e,t[32]=i):i=t[32];let p;t[33]!==n||t[34]!==l?(p=n?"…":l&&l.costUsd>0?nt(l.costUsd):"—",t[33]=n,t[34]=l,t[35]=p):p=t[35];let T;t[36]!==i||t[37]!==p||t[38]!==h?(T=s.jsx(J,{title:i,value:p,subtitle:h}),t[36]=i,t[37]=p,t[38]=h,t[39]=T):T=t[39];let g;return t[40]!==v||t[41]!==T||t[42]!==x||t[43]!==S?(g=s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[x,S,v,T]}),t[40]=v,t[41]=T,t[42]=x,t[43]=S,t[44]=g):g=t[44],g}function It(m){const t=Y.c(57),{run:r,usage:c,onClick:e,lastRowRef:o}=m,n=X();let a,l;if(t[0]!==r.created_at){const _=new Date(r.created_at);a=_.toLocaleDateString("en-US",{month:"short",day:"numeric"}),l=_.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),t[0]=r.created_at,t[1]=a,t[2]=l}else a=t[1],l=t[2];const k=l;let C,w,h,b,d,f,x,j,y,S,N;if(t[3]!==o||t[4]!==e||t[5]!==r.status||t[6]!==r.title||t[7]!==n){const _=vt(r.status),$=_.icon;w=st,y=o,S="h-14 cursor-pointer hover:bg-accent transition-colors border-b-0",N=e,t[19]!==r.title?(h=s.jsx(Q,{className:"min-w-0 pr-2 pl-4 md:pr-4",children:s.jsx("div",{className:"font-medium text-foreground truncate",children:r.title})}),t[19]=r.title,t[20]=h):h=t[20],C=Q,j="w-28 px-3",f="flex items-center gap-1.5",x=s.jsx($,{size:14,className:_.iconClassName}),b=ut("text-sm",_.labelColor),d=n(_.labelKey),t[3]=o,t[4]=e,t[5]=r.status,t[6]=r.title,t[7]=n,t[8]=C,t[9]=w,t[10]=h,t[11]=b,t[12]=d,t[13]=f,t[14]=x,t[15]=j,t[16]=y,t[17]=S,t[18]=N}else C=t[8],w=t[9],h=t[10],b=t[11],d=t[12],f=t[13],x=t[14],j=t[15],y=t[16],S=t[17],N=t[18];let u;t[21]!==b||t[22]!==d?(u=s.jsx("span",{className:b,children:d}),t[21]=b,t[22]=d,t[23]=u):u=t[23];let v;t[24]!==u||t[25]!==f||t[26]!==x?(v=s.jsxs("div",{className:f,children:[x,u]}),t[24]=u,t[25]=f,t[26]=x,t[27]=v):v=t[27];let i;t[28]!==C||t[29]!==v||t[30]!==j?(i=s.jsx(C,{className:j,children:v}),t[28]=C,t[29]=v,t[30]=j,t[31]=i):i=t[31];let p;t[32]!==c?(p=c?at(c.totalTokens):"—",t[32]=c,t[33]=p):p=t[33];let T;t[34]!==p?(T=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:p}),t[34]=p,t[35]=T):T=t[35];let g;t[36]!==c?(g=c&&c.costUsd>0?nt(c.costUsd):"—",t[36]=c,t[37]=g):g=t[37];let I;t[38]!==g?(I=s.jsx(Q,{className:"w-24 px-3 text-right tabular-nums text-muted-foreground",children:g}),t[38]=g,t[39]=I):I=t[39];let D;t[40]!==a?(D=s.jsx("div",{children:a}),t[40]=a,t[41]=D):D=t[41];let P;t[42]!==k?(P=s.jsx("div",{className:"text-xs text-muted-foreground/60",children:k}),t[42]=k,t[43]=P):P=t[43];let E;t[44]!==D||t[45]!==P?(E=s.jsxs(Q,{className:"w-32 px-3 pr-5 text-muted-foreground",children:[D,P]}),t[44]=D,t[45]=P,t[46]=E):E=t[46];let M;return t[47]!==w||t[48]!==h||t[49]!==i||t[50]!==T||t[51]!==I||t[52]!==E||t[53]!==y||t[54]!==S||t[55]!==N?(M=s.jsxs(w,{ref:y,className:S,onClick:N,children:[h,i,T,I,E]}),t[47]=w,t[48]=h,t[49]=i,t[50]=T,t[51]=I,t[52]=E,t[53]=y,t[54]=S,t[55]=N,t[56]=M):M=t[56],M}function Vt(m){const t=Y.c(73),{automationId:r,triggerIds:c,range:e}=m,o=X(),{org:n,locator:a}=lt();let l;t[0]!==n.id||t[1]!==n.slug?(l={connectionId:it,orgId:n.id,orgSlug:n.slug},t[0]=n.id,t[1]=n.slug,t[2]=l):l=t[2];const k=pt(l),C=rt(),w=xt(),h=gt(),{data:b}=ct(),d=c.length>0;let f;t[3]!==r||t[4]!==n.id||t[5]!==c?(f=tt.automationRuns(n.id,r,c),t[3]=r,t[4]=n.id,t[5]=c,t[6]=f):f=t[6];let x;t[7]!==C||t[8]!==c?(x=async U=>{const{pageParam:z}=U,ot=z===void 0?0:z;return await C.call("COLLECTION_THREADS_LIST",{limit:W,offset:ot,where:{trigger_ids:c}})},t[7]=C,t[8]=c,t[9]=x):x=t[9];let j;t[10]!==d||t[11]!==f||t[12]!==x?(j={queryKey:f,queryFn:x,initialPageParam:0,getNextPageParam:Dt,enabled:d,staleTime:3e4},t[10]=d,t[11]=f,t[12]=x,t[13]=j):j=t[13];const{data:y,fetchNextPage:S,hasNextPage:N,isFetchingNextPage:u,isLoading:v}=ft(j);let i,p,T,g;t[14]!==y?.pages||t[15]!==a||t[16]!==e?(i=(y?.pages??[]).flatMap(_t),g=i.map(Pt),T=mt,p=tt.monitoringThreadUsage(a,JSON.stringify({ids:g,...e})),t[14]=y?.pages,t[15]=a,t[16]=e,t[17]=i,t[18]=p,t[19]=T,t[20]=g):(i=t[17],p=t[18],T=t[19],g=t[20]);let I;t[21]!==e||t[22]!==C||t[23]!==g?(I=async()=>await C.call("MONITORING_THREAD_USAGE",{threadIds:g,...e.startDate?{startDate:e.startDate}:{},...e.endDate?{endDate:e.endDate}:{}}),t[21]=e,t[22]=C,t[23]=g,t[24]=I):I=t[24];const D=g.length>0;let P;t[25]!==p||t[26]!==I||t[27]!==D?(P={queryKey:p,queryFn:I,enabled:D,staleTime:3e4},t[25]=p,t[26]=I,t[27]=D,t[28]=P):P=t[28];const{data:E}=T(P);let M;t[29]!==E?.items?(M=new Map((E?.items??[]).map(kt)),t[29]=E?.items,t[30]=M):M=t[30];const _=M;let $;t[31]!==S||t[32]!==N||t[33]!==u?($=()=>{N&&!u&&S()},t[31]=S,t[32]=N,t[33]=u,t[34]=$):$=t[34];const Z=St($,N??!1,u),R=bt(i),V=R.selected;let A;t[35]!==r||t[36]!==e?(A=s.jsx(yt,{automationId:r,range:e}),t[35]=r,t[36]=e,t[37]=A):A=t[37];let L;t[38]!==d||t[39]!==v||t[40]!==Z||t[41]!==i||t[42]!==R||t[43]!==o||t[44]!==_?(L=d?v?s.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:o("automations.automationRuns.loadingRuns")}):i.length===0?s.jsx("div",{className:"py-16",children:s.jsx(et,{title:o("automations.automationRuns.noRunsTitle"),description:o("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 font-normal text-meta",children:o("automations.automationRuns.runHeader")}),s.jsx(G,{className:"w-28 px-3 font-normal text-meta",children:o("automations.automationRuns.statusHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:o("automations.automationRuns.tokensHeader")}),s.jsx(G,{className:"w-24 px-3 font-normal text-meta text-right",children:o("automations.automationRuns.costHeader")}),s.jsx(G,{className:"w-32 px-3 pr-5 font-normal text-meta",children:o("automations.automationRuns.startedHeader")})]})}),s.jsx(Tt,{children:i.map((U,z)=>s.jsx(It,{run:U,usage:_.get(U.id),onClick:()=>R.select(U.id),lastRowRef:z===i.length-1?Z:void 0},U.id))})]}):s.jsx("div",{className:"py-16",children:s.jsx(et,{title:o("automations.automationRuns.noStartersTitle"),description:o("automations.automationRuns.noStartersDescription")})}),t[38]=d,t[39]=v,t[40]=Z,t[41]=i,t[42]=R,t[43]=o,t[44]=_,t[45]=L):L=t[45];let H;t[46]!==u||t[47]!==o?(H=u&&s.jsx("div",{className:"py-4 text-center text-sm text-muted-foreground",children:o("automations.automationRuns.loadingMore")}),t[46]=u,t[47]=o,t[48]=H):H=t[48];let O;t[49]!==R?(O=U=>{U||R.close()},t[49]=R,t[50]=O):O=t[50];let K;t[51]!==w||t[52]!==h||t[53]!==k||t[54]!==a||t[55]!==b||t[56]!==i||t[57]!==V||t[58]!==R.index||t[59]!==R.next||t[60]!==R.prev?(K=V&&s.jsx(wt,{thread:V,client:k,locator:a,connections:w,virtualMcps:h,members:b,nav:{index:R.index,total:i.length,onPrev:R.prev,onNext:R.next}}),t[51]=w,t[52]=h,t[53]=k,t[54]=a,t[55]=b,t[56]=i,t[57]=V,t[58]=R.index,t[59]=R.next,t[60]=R.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]!==R.isOpen||t[65]!==O||t[66]!==q?(F=s.jsx(ht,{open:R.isOpen,onOpenChange:O,children:q}),t[64]=R.isOpen,t[65]=O,t[66]=q,t[67]=F):F=t[67];let B;return t[68]!==A||t[69]!==L||t[70]!==H||t[71]!==F?(B=s.jsxs("div",{className:"flex flex-col gap-5",children:[A,L,H,F]}),t[68]=A,t[69]=L,t[70]=H,t[71]=F,t[72]=B):B=t[72],B}function kt(m){return[m.threadId,{calls:m.calls,inputTokens:m.inputTokens,outputTokens:m.outputTokens,totalTokens:m.totalTokens,costUsd:m.costUsd}]}function Pt(m){return m.id}function _t(m){return m.items??[]}function Dt(m,t){const r=m,c=t;if(!((r?.items?.length??0)<W))return c.length*W}export{Vt as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as e,b as $,a5 as D,d as M,r as q,n as d,B as V,
|
|
1
|
+
import{c as k,j as e,b as $,a5 as D,d as M,r as q,n as d,B as V,he as F,E as S}from"./index-DEZ1imMJ.js";import{s as G}from"./Plus-D7X8Q2-q.js";import{i as b}from"./Zap-pmN7zSOE.js";import{S as H}from"./search-input-Co3g-t6C.js";import{E as T}from"./empty-state-CtwVPMDf.js";import{u as J}from"./use-automations-CyrAu8XA.js";import{u as K}from"./use-navigate-to-agent-MlXDIBYX.js";import{A as O}from"./automation-list-row-knBDKeRb.js";import{a as Q}from"./repository-binding-C0msapZZ.js";import{R as U}from"./require-capability-cQiPB2TO.js";import"./SearchMd-e6xPeRPD.js";import"./use-mcp-client-DJjkIlNp.js";import"./auth-CQxDIkM-.js";import"./thread-intent-DuI80508.js";import"./delay-CnY5UFtP.js";import"./watch-sse-pool-DhoYakYc.js";import"./task-board-D3wT6_aG.js";import"./schema-9jBUPMLq.js";import"./badge-BpzeYR5Z.js";import"./agent-icon-CTbTFMnU.js";import"./AlertCircle-Co3RPbIZ.js";import"./Tool01-Bo2g-Ylw.js";import"./ArrowUp-DLnkUu9S.js";import"./ArrowLeft-XBSBGQal.js";import"./LinkBroken01-loTkm0G5.js";import"./ShoppingBag01-zloi0TDl.js";import"./Globe04-D17A2x5l.js";import"./CheckCircle-kNwBDDVU.js";import"./ChevronUp-D1T3kSyr.js";import"./ChevronSelectorVertical-Gg7YcxlH.js";import"./UserSquare-Qd-FKVqK.js";import"./CreditCard01-D65BAIaV.js";import"./SwitchHorizontal01-elXb4-4d.js";import"./Key01-awxHKnoL.js";import"./Minus-CYrsmoRb.js";import"./Monitor01-DalIAdj7.js";import"./Sun-C1lyqton.js";import"./Play-C6Weq-wk.js";import"./Trash01-C-PU5Hm-.js";import"./Upload01-NPnXKs-J.js";import"./Users01-CTNixqdX.js";import"./XClose-BuJ6u6eL.js";import"./access-gate-Bj4L1Bay.js";import"./capability-load-error-BkOUGX51.js";function W(){const t=k.c(20),o=$(),{org:c}=D(),{data:y}=J(void 0),g=y===void 0?[]:y,E=Q(),P=K(),f=M(),[x,z]=q.useState(""),h=x.toLowerCase(),A=new Map(E.map(X)),N=g.filter(s=>{if(!h||s.name.toLowerCase().includes(h))return!0;if(s.virtual_mcp_id){const l=A.get(s.virtual_mcp_id);if(l&&l.title.toLowerCase().includes(h))return!0}return!1}),B=(s,l)=>{const R=l&&A.has(l)?l:F(c.id);S("automations_list_row_clicked",{automation_id:s,agent_id:R,source:"settings_automations"}),P(R,{panel:`automation:${s}`})};let p;t[0]!==f||t[1]!==c.slug?(p=()=>{S("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/projects",params:{org:c.slug}})},t[0]=f,t[1]=c.slug,t[2]=p):p=t[2];const L=p,j=d,v=d,w=d;let i;t[3]!==o?(i=o("settings.automations.pageTitle"),t[3]=o,t[4]=i):i=t[4];let r;t[5]!==i?(r=e.jsx(d.Title,{children:i}),t[5]=i,t[6]=r):r=t[6];const C=g.length>0&&e.jsx(H,{value:x,onChange:z,placeholder:o("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let n;t[7]!==r||t[8]!==C?(n=e.jsxs("div",{className:"flex flex-col gap-6",children:[r,C]}),t[7]=r,t[8]=C,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(b,{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")]})})}):N.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(T,{image:e.jsx(b,{size:48,className:"text-muted-foreground"}),title:o("settings.automations.noResultsTitle"),description:o("settings.automations.noResultsDescription",{search:x})})}):e.jsx("div",{className:"mt-6 flex flex-col divide-y divide-border overflow-hidden rounded-xl bg-card shadow-edge",children:N.map(s=>e.jsx(O,{automation:s,showAgent:!0,onClick:()=>B(s.id,s.virtual_mcp_id)},s.id))});let a;t[10]!==w.Container||t[11]!==n||t[12]!==_?(a=e.jsxs(w.Container,{children:[n,_]}),t[10]=w.Container,t[11]=n,t[12]=_,t[13]=a):a=t[13];let m;t[14]!==v.Content||t[15]!==a?(m=e.jsx(v.Content,{children:a}),t[14]=v.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 Ft(){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{Ft as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as
|
|
1
|
+
import{c as y,f as A,u as w,de as E,d as V,l as I,df as T,dg as N,at as k}from"./index-DEZ1imMJ.js";import{b as O}from"./thread-route-B-uAlF3E.js";import{u as P}from"./use-project-scope-pwqcjGo8.js";function D(e){const t=e.destination==="agent",n={thread:t?e.previous.thread:void 0,sidepanel:e.previous.sidepanel,autosend:t?e.previous.autosend:void 0};return{...e.update?e.update(n):n,mainpanel:void 0}}function R(){const e=y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={structuralSharing:!0,select:L},e[0]=t):t=e[0],I(t)}function L(e){for(let t=e.matches.length-1;t>=0;t--){const n=e.matches[t]?.staticData;if(n?.mainView||n?.siteEditorView)return{mainView:n.mainView,siteEditorView:n.siteEditorView}}return{mainView:void 0,siteEditorView:void 0}}function Y(){const e=y.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=A(t);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[1]=r):r=e[1];const a=w(r),o={file:"file"in a&&typeof a.file=="string"?a.file:void 0,key:"key"in a&&typeof a.key=="string"?a.key:void 0,path:"path"in a&&typeof a.path=="string"?a.path:void 0},{mainView:s,siteEditorView:i}=R();return E({mainView:s,siteEditorView:i,params:n,search:o})}function C(){const e=y.c(11),t=V();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const r=A(n),a=O(),o=P(),s=r.org??"";let i;e[1]!==t||e[2]!==s||e[3]!==a||e[4]!==o?(i=(d,c)=>{const v=T(d),h=c?.virtualmcpid!==void 0||o!==null?"project":"organization",S=v.kind==="org-destination"||v.kind==="project-destination"&&h==="organization",_=b=>D({previous:b,destination:S?"organization":"agent",update:c?.search});N(t,{org:s,agentId:c?.virtualmcpid??a,tabId:d,destinationScope:h,taskKey:c?.taskKey,search:_,replace:c?.replace??!0})},e[1]=t,e[2]=s,e[3]=a,e[4]=o,e[5]=i):i=e[5];const f=i;let u;e[6]!==t?(u=d=>t({to:".",search:M,replace:d?.replace??!0}),e[6]=t,e[7]=u):u=e[7];const p=u;let l;return e[8]!==p||e[9]!==f?(l={openPanel:f,closePanel:p},e[8]=p,e[9]=f,e[10]=l):l=e[10],l}function M(e){return{...e,mainpanel:!1,sidepanel:!0}}const j=1e4,F="true",g=2;function m(e,t){return k.chatAutosend(e,t)}function U(e){return e==="pending"||e==="sending"}function x(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}if(!t||typeof t!="object")return null;const n=t;let r=0;n.status==="sending"?r=n.retryAt===void 0?1:g:n.retryAt!==void 0&&(r=1);const a=n.attempt===void 0?r:n.attempt;return typeof n.createdAt!="number"||typeof n.message!="object"||!U(n.status)||n.retryAt!==void 0&&typeof n.retryAt!="number"||typeof a!="number"||!Number.isInteger(a)||a<0||a>g?null:{...t,attempt:a}}function G(e,t,n,r,a=Date.now()){const o={message:r,createdAt:a,status:"pending",attempt:0};return e.setItem(m(t,n),JSON.stringify(o)),o}function K(e,t,n){const r=m(t,n),a=x(e.getItem(r));return a||(e.removeItem(r),null)}function Q(e,t,n,r=Date.now()){const a=m(t,n),o=K(e,t,n);if(!o||o.status!=="pending")return null;if(o.attempt>=g)return e.removeItem(a),null;const s=o.retryAt??o.createdAt;if(r-s>=j)return e.removeItem(a),null;const i={...o,status:"sending",attempt:o.attempt+1};return e.setItem(a,JSON.stringify(i)),{message:i.message,createdAt:i.createdAt,attempt:i.attempt}}function X(e,t,n){e.removeItem(m(t,n))}export{F as A,C as a,X as b,Q as c,D as r,Y as u,G as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,m as u,j as l,
|
|
1
|
+
import{c as b,m as u,j as l,cv as c,cw as v}from"./index-DEZ1imMJ.js";const p=v("inline-flex items-center justify-center rounded-full text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1.5 [&>svg]:pointer-events-none focus-ring transition-[color,background-color] overflow-hidden",{variants:{variant:{default:"bg-muted text-foreground [a&]:hover:bg-secondary-hover",neutral:"bg-muted text-foreground [a&]:hover:bg-secondary-hover",secondary:"bg-muted text-foreground [a&]:hover:bg-secondary-hover",success:"bg-success/10 text-success [a&]:hover:bg-success/15",warning:"bg-warning/10 text-warning [a&]:hover:bg-warning/15",destructive:"bg-destructive/10 text-destructive [a&]:hover:bg-destructive/15",agent:"bg-brand-purple-tint text-brand-purple-dark dark:bg-brand-purple/20 dark:text-brand-purple",lime:"bg-brand-lime-tint text-brand-green-dark dark:bg-brand/20 dark:text-brand",info:"bg-brand-blue-tint text-brand-blue-dark dark:bg-brand-blue/20 dark:text-brand-blue",outline:"bg-card shadow-edge text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",muted:"bg-muted text-muted-foreground [a&]:hover:bg-secondary-hover",brand:"bg-brand/30 text-foreground [a&]:hover:bg-brand/40 [button&]:hover:bg-brand/40"},size:{sm:"h-4 gap-1 px-1.5 text-[0.6875rem]",default:"h-5 px-2",lg:"h-6 px-2.5 text-sm [&>svg]:size-3.5",control:"h-7 gap-1.5 pr-3 pl-1.5",icon:"size-5",segmented:"h-7 gap-0 rounded-lg bg-card p-0 shadow-edge"}},defaultVariants:{variant:"default",size:"default"}});function f(g){const e=b.c(14);let t,r,a,s,n;e[0]!==g?({className:t,variant:n,size:a,asChild:s,...r}=g,e[0]=g,e[1]=t,e[2]=r,e[3]=a,e[4]=s,e[5]=n):(t=e[1],r=e[2],a=e[3],s=e[4],n=e[5]);const i=(s===void 0?!1:s)?c:"span";let d;e[6]!==t||e[7]!==a||e[8]!==n?(d=u(p({variant:n,size:a}),t),e[6]=t,e[7]=a,e[8]=n,e[9]=d):d=e[9];let o;return e[10]!==i||e[11]!==r||e[12]!==d?(o=l.jsx(i,{"data-slot":"badge",className:d,...r}),e[10]=i,e[11]=r,e[12]=d,e[13]=o):o=e[13],o}export{f as B};
|