decocms 4.514.4 → 4.514.6
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/{ActiveShapeUtils-nFzQGM_y.js → ActiveShapeUtils-DV40gvcg.js} +1 -1
- package/dist/client/assets/{AlertCircle-BKEHXsE7.js → AlertCircle-Ctbquk5a.js} +1 -1
- package/dist/client/assets/{AreaChart-CW_cA_el.js → AreaChart-C_4ebEom.js} +1 -1
- package/dist/client/assets/{ArrowLeft-D81aL8fM.js → ArrowLeft-DZ0mAFgb.js} +1 -1
- package/dist/client/assets/{ArrowUp-DfLaoCfv.js → ArrowUp-bYg1aEOe.js} +1 -1
- package/dist/client/assets/{BarChart-D0FGQ4Mg.js → BarChart-DfTtCBDv.js} +1 -1
- package/dist/client/assets/{Building02-CfaCzC7T.js → Building02-BHIVlbfK.js} +1 -1
- package/dist/client/assets/{CartesianChart-8wmktLTV.js → CartesianChart-uNdbRuTj.js} +1 -1
- package/dist/client/assets/{CategoricalChart-zXV0drbf.js → CategoricalChart-CRSSpo7X.js} +1 -1
- package/dist/client/assets/{CheckCircle-pswqe0yQ.js → CheckCircle-C2ndOEUO.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-yLR6uZzh.js → ChevronSelectorVertical-DaUdbCWk.js} +1 -1
- package/dist/client/assets/{ChevronUp-DtK5u9ST.js → ChevronUp-C8mqlnDX.js} +1 -1
- package/dist/client/assets/{Copy01-LCHR9m-G.js → Copy01-DC8f0fwU.js} +1 -1
- package/dist/client/assets/{CreditCard01-DDybX_8i.js → CreditCard01-P7j8oDkg.js} +1 -1
- package/dist/client/assets/{DotsVertical-Dl2HDAjP.js → DotsVertical-BvwGTDkC.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-DE4zTG89.js → ErrorBarContext-KwnilJkg.js} +1 -1
- package/dist/client/assets/{Globe04-C3qOiXr7.js → Globe04-D6C-ihBU.js} +1 -1
- package/dist/client/assets/{Image01-t87ZE04W.js → Image01-D7F4wuKx.js} +1 -1
- package/dist/client/assets/{Key01-S4YXCnrO.js → Key01-u4HXXUPa.js} +1 -1
- package/dist/client/assets/{Link01-nrYS0m93.js → Link01-BoUupQbW.js} +1 -1
- package/dist/client/assets/{LinkBroken01-CjyqnNbo.js → LinkBroken01-BJx0R97x.js} +1 -1
- package/dist/client/assets/{Minus-Q9-Po73D.js → Minus-C1PMcNV0.js} +1 -1
- package/dist/client/assets/{Monitor01-BmtAT73A.js → Monitor01-D3VwU2ni.js} +1 -1
- package/dist/client/assets/{Play-B5do76Ow.js → Play-DxsFk4r2.js} +1 -1
- package/dist/client/assets/{Plus-DEIwMEqz.js → Plus-BDveVGJf.js} +1 -1
- package/dist/client/assets/{ReferenceLine-DwjozkX7.js → ReferenceLine-ILm1GG8J.js} +1 -1
- package/dist/client/assets/{SearchMd-UGgqPivi.js → SearchMd-Cuf45jFP.js} +1 -1
- package/dist/client/assets/{Sector-C2CduweT.js → Sector-D2xOkxuc.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-BvYm46M_.js → ShoppingBag01-BMRnsG58.js} +1 -1
- package/dist/client/assets/{Sun-rxG-ROZD.js → Sun-sKGpeIhM.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BUQctc0G.js → SwitchHorizontal01-CshMTQzi.js} +1 -1
- package/dist/client/assets/{Tool01-BjWCTgWh.js → Tool01-BM29_KWq.js} +1 -1
- package/dist/client/assets/{Trash01-CIzl9L8e.js → Trash01-D92WhXf2.js} +1 -1
- package/dist/client/assets/{Upload01-BZdlKO8o.js → Upload01-BSDy4f7m.js} +1 -1
- package/dist/client/assets/{User01-C-yKb_Na.js → User01-Cn3JqTjv.js} +1 -1
- package/dist/client/assets/{UserSquare-BX_UIOch.js → UserSquare-Drp4z0v0.js} +1 -1
- package/dist/client/assets/{Users01-BAB4CQHt.js → Users01-Cxbx87gg.js} +1 -1
- package/dist/client/assets/{XClose-BW8V9Mau.js → XClose-dOW_RI9u.js} +1 -1
- package/dist/client/assets/{ZoomOut-BaK1kO8c.js → ZoomOut-BfQx-fBr.js} +1 -1
- package/dist/client/assets/{access-gate-R9-SDKyD.js → access-gate-BjUA5Gw_.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-bYFWev7Q.js → add-connection-dialog-B0vtW1sl.js} +1 -1
- package/dist/client/assets/{agent-analytics-BgXU0CmI.js → agent-analytics-D74l8HWB.js} +1 -1
- package/dist/client/assets/agent-app-CEBVAZwO.js +1 -0
- package/dist/client/assets/{agent-assets-BJZg8qhR.js → agent-assets-Bwo-LFkg.js} +1 -1
- package/dist/client/assets/{agent-automation--X0QS-Gl.js → agent-automation-Cc45Az0m.js} +1 -1
- package/dist/client/assets/{agent-automations-eEPMDBMc.js → agent-automations-Du82D3qr.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-CRXebciL.js → agent-connect-sources-mK6fw0FS.js} +1 -1
- package/dist/client/assets/agent-deck-BZZHzjdZ.js +1 -0
- package/dist/client/assets/{agent-e2e-DJ0skb34.js → agent-e2e-D6ovLSkg.js} +1 -1
- package/dist/client/assets/{agent-experiments-DjAzPErc.js → agent-experiments-Bf1OqB1m.js} +1 -1
- package/dist/client/assets/agent-file-CzvpBEaK.js +1 -0
- package/dist/client/assets/{agent-hosting-DudPkaIg.js → agent-hosting-6te_9jdz.js} +1 -1
- package/dist/client/assets/{agent-icon-rZeVl9Rl.js → agent-icon-U4gZaLOQ.js} +1 -1
- package/dist/client/assets/agent-library-BOSIxUYz.js +1 -0
- package/dist/client/assets/agent-library-file-C0RqJ45T.js +1 -0
- package/dist/client/assets/{agent-monitor-ayWTyLig.js → agent-monitor-C3Fta9kk.js} +1 -1
- package/dist/client/assets/{agent-overview-BXPfkXp6.js → agent-overview-NPCMkyDB.js} +1 -1
- package/dist/client/assets/{agent-releases-BHf3P0zv.js → agent-releases-COSsnWfe.js} +1 -1
- package/dist/client/assets/agent-settings-DDIl5jyz.js +1 -0
- package/dist/client/assets/{agent-site-editor-BUjwQa1T.js → agent-site-editor-DlN_1OE1.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-ByOIwjcy.js +2 -0
- package/dist/client/assets/agent-site-editor-content-DSEuxkJh.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-pw2RBbYs.js +1 -0
- package/dist/client/assets/agent-view-IbmF6KBh.js +1 -0
- package/dist/client/assets/{agent-view-guard-BpxxI-Li.js → agent-view-guard-Bk4OTT2f.js} +1 -1
- package/dist/client/assets/{agents-list-BqVe9HeB.js → agents-list-B_j46cpj.js} +1 -1
- package/dist/client/assets/{ai-providers-Cbeufjse.js → ai-providers-Cb4AWs2D.js} +1 -1
- package/dist/client/assets/{alert-Ge1PvRkU.js → alert-B29bfkXd.js} +1 -1
- package/dist/client/assets/{alert-dialog-DGPL6Sul.js → alert-dialog-CKDHmJ-l.js} +1 -1
- package/dist/client/assets/{analytics-sections-DfU-HPHE.js → analytics-sections-wgH0NLyS.js} +1 -1
- package/dist/client/assets/api-keys-CiMyiLjo.js +1 -0
- package/dist/client/assets/{api-keys-CGj2gphX.js → api-keys-Xjw7lgqR.js} +1 -1
- package/dist/client/assets/{app-editor-Bnf2IFBn.js → app-editor-DgdEdwhZ.js} +1 -1
- package/dist/client/assets/{asset-utils-BfDmoNac.js → asset-utils-DrTFUoo_.js} +1 -1
- package/dist/client/assets/{auth-catchall-szGfHVda.js → auth-catchall-CIV9IiTJ.js} +1 -1
- package/dist/client/assets/{auth-entry-CfqU_pp2.js → auth-entry-ctrK7teX.js} +1 -1
- package/dist/client/assets/{auth-dECedNaO.js → auth-hgpoCSIS.js} +1 -1
- package/dist/client/assets/{auth-split-layout-zFJVMQW0.js → auth-split-layout-DkyooQGo.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BI5fpBCJ.js → authenticate-and-persist-oauth-jn1R1qId.js} +1 -1
- package/dist/client/assets/{automation-list-row-nTIicn2r.js → automation-list-row-qFFhCtZo.js} +1 -1
- package/dist/client/assets/{automation-runs-C_Fenz8y.js → automation-runs-C367-v6a.js} +1 -1
- package/dist/client/assets/{automations-C3HG2AUA.js → automations-8JKgpNEK.js} +1 -1
- package/dist/client/assets/{autosend-CUbKy0s-.js → autosend-BZOm698U.js} +1 -1
- package/dist/client/assets/{avatar-Bwp-Xc5s.js → avatar-RpIBVCkY.js} +1 -1
- package/dist/client/assets/{badge-dosB_-4a.js → badge-Cnnepvq1.js} +1 -1
- package/dist/client/assets/{block-document-SqlzHipw.js → block-document-baEM6UJG.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-J4LmPADm.js → blocks-preview-workspace-context-Ca46yWEV.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-DKkBL3yJ.js → blocks-tab-states-jGeS9iVz.js} +3 -3
- package/dist/client/assets/{blog-schema-DrvA3-E7.js → blog-schema-CUOOV4a2.js} +1 -1
- package/dist/client/assets/{buckets-MFDKP_DD.js → buckets-p2Fiyc0f.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-CmyFLmXV.js → build-improve-prompt-doc-ClmcYJRa.js} +1 -1
- package/dist/client/assets/{calendar-CS0FMW9V.js → calendar-DqVFnL9A.js} +1 -1
- package/dist/client/assets/{capability-load-error-DwR-XbDb.js → capability-load-error-DdN4o47w.js} +1 -1
- package/dist/client/assets/{category-editor-BH1u-0CE.js → category-editor-Gr46SDP4.js} +1 -1
- package/dist/client/assets/{chart-CK7GPIHE.js → chart-B5vy2nis.js} +1 -1
- package/dist/client/assets/{chat-context-DGKtupvP.js → chat-context-_d3c57p1.js} +1 -1
- package/dist/client/assets/{chat-draft-CR7qKiZW.js → chat-draft-CKcHhXuF.js} +1 -1
- package/dist/client/assets/{checkbox-CSo6M-6b.js → checkbox-CUzk21sc.js} +1 -1
- package/dist/client/assets/{choose-editor-D9oQ3uFZ.js → choose-editor-BFcNvSv4.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DLlz7zNV.js → cli-auth-success-BolfyrKO.js} +1 -1
- package/dist/client/assets/{client-icons-Cu_VeKS2.js → client-icons-50FpZDWK.js} +1 -1
- package/dist/client/assets/cms-settings-editor-CxJ3W3GB.js +1 -0
- package/dist/client/assets/{collapsible-82CZUSRZ.js → collapsible-CeBZpglT.js} +1 -1
- package/dist/client/assets/{collection-detail-DFiz0PNq.js → collection-detail-BXVqh2XU.js} +1 -1
- package/dist/client/assets/{collection-display-button-u8azE1jK.js → collection-display-button-El-xnsaW.js} +1 -1
- package/dist/client/assets/{collection-search-JLOqgXSU.js → collection-search-gW4FCqmq.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-xzcEzLCL.js → collection-table-wrapper-CB0t7kAl.js} +1 -1
- package/dist/client/assets/{collection-tabs-ClvmGOqD.js → collection-tabs-DIFXv7hR.js} +1 -1
- package/dist/client/assets/{column-rules-BuMug1kg.js → column-rules-o-DlIK_-.js} +1 -1
- package/dist/client/assets/{combobox-TZ4RmWfI.js → combobox-DlpsfK7m.js} +1 -1
- package/dist/client/assets/{coming-soon-page-BrWbdSFq.js → coming-soon-page-ZTZUbFgV.js} +1 -1
- package/dist/client/assets/{command-YtmkYLwE.js → command-C7n5qLsN.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-DmfKGx8E.js → companion-mcps-section-C2rDEgkL.js} +1 -1
- package/dist/client/assets/{config-BXEb6qjV.js → config-BCpfsSBB.js} +1 -1
- package/dist/client/assets/{connect-Dk5dqwe8.js → connect-Du_rXIM1.js} +1 -1
- package/dist/client/assets/{connect-layout-CAq5B13E.js → connect-layout-DyGwITyt.js} +1 -1
- package/dist/client/assets/{connection-CU2PwZyg.js → connection-Dik4epzq.js} +1 -1
- package/dist/client/assets/{connection-card-Bf6UkDd9.js → connection-card-DCnmTKpJ.js} +1 -1
- package/dist/client/assets/{connection-detail-CS3q9gzr.js → connection-detail-CaTyUBlA.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-B_xUWFll.js → connection-form-helpers-ta2yIvIb.js} +1 -1
- package/dist/client/assets/{connections--l3N3T2i.js → connections-Dy2qa1bG.js} +1 -1
- package/dist/client/assets/{content-tab-tOKm2eMX.js → content-tab-YH7YYY48.js} +3 -3
- package/dist/client/assets/{context-DkeFELTS.js → context-3twD8BEv.js} +1 -1
- package/dist/client/assets/{context-menu-3z4rcXzD.js → context-menu-BUZj1ZG7.js} +1 -1
- package/dist/client/assets/{context-shell-CMaJQRGG.js → context-shell-CWF9i3Vt.js} +3 -3
- package/dist/client/assets/{core.esm-DeTgmZgN.js → core.esm-DNra8pgf.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CuiwUtLx.js → create-organization-dialog-BkJvAp86.js} +1 -1
- package/dist/client/assets/{daily-pulse-BEmMTzG-.js → daily-pulse-DYjhyf3I.js} +1 -1
- package/dist/client/assets/{discover-G4Np02u5.js → discover-nnC5Qnas.js} +1 -1
- package/dist/client/assets/{domain-settings--EwUJ9iT.js → domain-settings-CpxFWOzU.js} +1 -1
- package/dist/client/assets/{drawer-COuxoIPq.js → drawer-ZlYTI3Z6.js} +1 -1
- package/dist/client/assets/{editor-CT6aDT4h.js → editor-BFHySd1K.js} +1 -1
- package/dist/client/assets/{editor-classes-C5mmUd_p.js → editor-classes-DPi5BWR5.js} +1 -1
- package/dist/client/assets/{empty-state-BJ_BjmBA.js → empty-state-Bok1L2hc.js} +1 -1
- package/dist/client/assets/{empty-state-DjiRKbHi.js → empty-state-Cu20Qj3-.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DCoskE6n.js → extract-connection-data-CNLani4P.js} +1 -1
- package/dist/client/assets/{feature-gate-DZNUWe0P.js → feature-gate-dfnyrtcC.js} +1 -1
- package/dist/client/assets/{feature-paywall-BaUYa8qG.js → feature-paywall-D-GfxA1X.js} +1 -1
- package/dist/client/assets/{file-explorer-DogEkKeq.js → file-explorer-DOlx1A5r.js} +1 -1
- package/dist/client/assets/{file-preview-DI0eRAl3.js → file-preview-DSIiiWjA.js} +1 -1
- package/dist/client/assets/{file-share-button-CcxRIY2R.js → file-share-button-CB7fcIJI.js} +1 -1
- package/dist/client/assets/{file-type-icon-Fh4lxmRD.js → file-type-icon-DPqHd815.js} +1 -1
- package/dist/client/assets/{folder-icon-DucOOoml.js → folder-icon-qexQSaYN.js} +1 -1
- package/dist/client/assets/{form-6kVfawT3.js → form-Dpwt-9St.js} +1 -1
- package/dist/client/assets/{general-DqtTv7tP.js → general-DJuGMWNv.js} +1 -1
- package/dist/client/assets/{home-m8gee_-f.js → home-D9ErGwHG.js} +1 -1
- package/dist/client/assets/{hosted-publish-feedback-spvj7jCb.js → hosted-publish-feedback-9IsLIhi6.js} +1 -1
- package/dist/client/assets/{icon-button-B0NXCYZw.js → icon-button-CwrVRVUS.js} +1 -1
- package/dist/client/assets/{index-DVLeW6hW.js → index-2uBqLA9S.js} +1 -1
- package/dist/client/assets/{index-DwjOqgVq.js → index-BRzGXE32.js} +1 -1
- package/dist/client/assets/{index-CjiOeyZB.js → index-BWUABroT.js} +1 -1
- package/dist/client/assets/{index-DKt3w3pV.js → index-BpRXpcv4.js} +1 -1
- package/dist/client/assets/index-BqS2UmN9.css +1 -0
- package/dist/client/assets/{index-OmMe1wxV.js → index-C9OgV5Vt.js} +1 -1
- package/dist/client/assets/{index-BDYGqdZJ.js → index-CJu3ft8V.js} +1 -1
- package/dist/client/assets/{index-BpE9ALKU.js → index-CaH7O3hJ.js} +2 -2
- package/dist/client/assets/{index-DTn--46s.js → index-Cd_jqW-G.js} +1 -1
- package/dist/client/assets/{index-CVrQhouC.js → index-DJM5MV7l.js} +1 -1
- package/dist/client/assets/{index-BnQcNfAh.js → index-DK4LlU65.js} +1 -1
- package/dist/client/assets/{index-DpoGKrcE.js → index-DLuP-oy3.js} +1 -1
- package/dist/client/assets/{index-BdqvPq_I.js → index-DPulqOQn.js} +1 -1
- package/dist/client/assets/{index-BeRT15sS.js → index-DUXVtfV1.js} +1 -1
- package/dist/client/assets/{index-4mqxQ_CF.js → index-DzppA2EQ.js} +1 -1
- package/dist/client/assets/{index-DzUJHy5n.js → index-TNsA6rsO.js} +1 -1
- package/dist/client/assets/{index-redirect-B4nMcc4Y.js → index-redirect-CLzDU0fe.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CUzkqvrD.js → infiniteQueryObserver-u-Zd7Oxq.js} +1 -1
- package/dist/client/assets/{infra-billing-DhxORp3B.js → infra-billing-DkMlIjvS.js} +1 -1
- package/dist/client/assets/{input-Hbd41rUw.js → input-D2sd1bar.js} +3 -3
- package/dist/client/assets/{input-DSXv99TZ.js → input-DN6U5jAj.js} +1 -1
- package/dist/client/assets/{integration-icon-Ilfqyxys.js → integration-icon-DCiBepJw.js} +1 -1
- package/dist/client/assets/{jira-icon-tlwupM6f.js → jira-icon-DoiJbCfx.js} +1 -1
- package/dist/client/assets/{label-Byb6HWZH.js → label-Cnc4HQwP.js} +1 -1
- package/dist/client/assets/{layout-voCKlRfq.js → layout-BVW5q62A.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DUEMoq7I.js → legacy-agents-deep-DMfsC9-u.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-DCXAudzh.js → legacy-main-redirect-mSx9JMxj.js} +1 -1
- package/dist/client/assets/library-BNARKbpY.js +1 -0
- package/dist/client/assets/{login-HOxtRiGZ.js → login-CN9ueiIT.js} +1 -1
- package/dist/client/assets/{markdown-Dej9RATS.js → markdown-CA3yd3L6.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CQ1qp5-9.js → mcp-app-renderer-Xaw0krD3.js} +1 -1
- package/dist/client/assets/{mcp-oauth-oGpWuhVi.js → mcp-oauth-3Gakbc_U.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BG-oWBlL.js → mcp-oauth-CxgfM8zh.js} +1 -1
- package/dist/client/assets/{members-B_G0pbYI.js → members-54kLIghY.js} +1 -1
- package/dist/client/assets/{memory-BPjaQ4Kh.js → memory-CQX6dqQP.js} +1 -1
- package/dist/client/assets/{mini-report-page-abzNXw_Q.js → mini-report-page-DCq4FNu-.js} +1 -1
- package/dist/client/assets/{mock-board-CaXwh2tM.js → mock-board-CrlDKQvj.js} +3 -3
- package/dist/client/assets/{monaco-editor-CdL13Ko4.js → monaco-editor-C7rmyhBT.js} +1 -1
- package/dist/client/assets/monitoring-DX0mWeP-.js +1 -0
- package/dist/client/assets/{monitoring-stats-row-CGXhSW6L.js → monitoring-stats-row-Bhxzz0Gz.js} +1 -1
- package/dist/client/assets/{multi-select-Ca36UGU7.js → multi-select-DtSzZ5RJ.js} +1 -1
- package/dist/client/assets/{mustache-HR1Haumz.js → mustache-BxPGtFxk.js} +1 -1
- package/dist/client/assets/{new-project-dialog-Doo7kyhT.js → new-project-dialog-DpHJ0D5s.js} +1 -1
- package/dist/client/assets/{oauth-callback-BDajeWC8.js → oauth-callback-ChXsONZm.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BrXBkfFZ.js → oauth-callback-ai-provider-BnJfOlsF.js} +1 -1
- package/dist/client/assets/{onboarding-BRNk4bDG.js → onboarding-CuSBfoiA.js} +1 -1
- package/dist/client/assets/{openai-conversation-Cp4VzKaN.js → openai-conversation-B0QRsRtq.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-DfS24tBi.js → optimistic-project-sidebar-views-Cgq6MsN2.js} +1 -1
- package/dist/client/assets/{order-monitor-day-BUGNDHbx.js → order-monitor-day-BHpHKh9K.js} +1 -1
- package/dist/client/assets/{organization-choice-vWQUgFdw.js → organization-choice-hoXHHizl.js} +1 -1
- package/dist/client/assets/{orgs-BLAeoNKy.js → orgs-CsgsGgsX.js} +1 -1
- package/dist/client/assets/{page-seo-form-DVnVZHhC.js → page-seo-form-PX_1VQkb.js} +1 -1
- package/dist/client/assets/{pair-nOzQH_7U.js → pair-5gOZrfkD.js} +1 -1
- package/dist/client/assets/plan-BnqYpKp5.js +1 -0
- package/dist/client/assets/{plan-ladder-Bo1QCqxw.js → plan-ladder-BydnH1hR.js} +1 -1
- package/dist/client/assets/{popover-c8imB8ZN.js → popover-DSRFfUdL.js} +1 -1
- package/dist/client/assets/{post-calendar-DFyAd_qH.js → post-calendar-D_8Ms9Cq.js} +1 -1
- package/dist/client/assets/{post-editor-D0lVlOEr.js → post-editor-lU8h7ku9.js} +1 -1
- package/dist/client/assets/{preview-content-Cp2YMUQv.js → preview-content-hWNiqB3L.js} +1 -1
- package/dist/client/assets/{preview-dialog-MFyGLxAK.js → preview-dialog-HJF1l34b.js} +1 -1
- package/dist/client/assets/{preview-panel-D-U4T9gu.js → preview-panel-PigPEt4W.js} +1 -1
- package/dist/client/assets/{preview-tab-CRczEj8G.js → preview-tab-B-uX9H3E.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-ukCeHMzo.js → product-picker-dialog-BUcziHgK.js} +1 -1
- package/dist/client/assets/{profile-CmgN3YJp.js → profile-D-LHzn9e.js} +1 -1
- package/dist/client/assets/{project-app-view-C0zebxGj.js → project-app-view-CGbP48WX.js} +1 -1
- package/dist/client/assets/{project-apps-BAHY134E.js → project-apps-CajNRGrz.js} +1 -1
- package/dist/client/assets/{project-feed-CKWqMBF-.js → project-feed-uKBIzmIi.js} +1 -1
- package/dist/client/assets/{project-icon-xn6KKGaE.js → project-icon-njec1yh1.js} +1 -1
- package/dist/client/assets/project-reports-BwZ6fxIs.js +1 -0
- package/dist/client/assets/project-tasks-zYigtiRn.js +1 -0
- package/dist/client/assets/{projects-BqBJC9d2.js → projects-OJnagyMB.js} +1 -1
- package/dist/client/assets/{projects-empty-state-D55m_jaW.js → projects-empty-state-C9IhB7We.js} +1 -1
- package/dist/client/assets/{prompts-COT0cmpR.js → prompts-B590L6x_.js} +1 -1
- package/dist/client/assets/record-editor-BxllIkC_.js +1 -0
- package/dist/client/assets/{redirect-editor-C0Vt0bpp.js → redirect-editor-CTLxiYxe.js} +1 -1
- package/dist/client/assets/reports-CJqSx9sD.js +1 -0
- package/dist/client/assets/{reports-CeCMlBXV.js → reports-DBL7SnEu.js} +1 -1
- package/dist/client/assets/{reports-onboarding-sIGyoIIM.js → reports-onboarding-Be9p494r.js} +1 -1
- package/dist/client/assets/{reports-tab-B2Gjt8_e.js → reports-tab-B0M7UKAQ.js} +2 -2
- package/dist/client/assets/{repositories-DhflHwKe.js → repositories-BEFfDE3p.js} +1 -1
- package/dist/client/assets/repositories-DceuH_GA.js +1 -0
- package/dist/client/assets/{repository-binding-3oH3TnyD.js → repository-binding-BLgLcT4o.js} +1 -1
- package/dist/client/assets/{repository-import-picker-C-BHOdIZ.js → repository-import-picker-lphgZTGu.js} +1 -1
- package/dist/client/assets/{repository-picker-D2zUBg0A.js → repository-picker-Dadd-3sc.js} +1 -1
- package/dist/client/assets/{require-capability-DGAfsfb0.js → require-capability-D4hkdMxt.js} +1 -1
- package/dist/client/assets/{required-auth-layout-D4q3UHWX.js → required-auth-layout-e3_y0Tns.js} +1 -1
- package/dist/client/assets/{reset-password-CjXG8DCL.js → reset-password-DPAO5WIu.js} +1 -1
- package/dist/client/assets/{resizable-D0sQwLi7.js → resizable-D4wP3vt7.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-Bsy-SAnr.js → resolve-tab-icon-CE5OwNrK.js} +1 -1
- package/dist/client/assets/{review-settings-CqIcqOZz.js → review-settings-BJK_0aY-.js} +1 -1
- package/dist/client/assets/{roles-CwfZN2Zs.js → roles-CJ569tPn.js} +1 -1
- package/dist/client/assets/{route-1Hputyx-.js → route-Bzf1UEGL.js} +1 -1
- package/dist/client/assets/route-CG_vDQP9.js +1 -0
- package/dist/client/assets/{route-BaysvQtq.js → route-Dfqmjwjm.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-BxTbwuaV.js → sandbox-lifecycle-context-v9W7lV1M.js} +1 -1
- package/dist/client/assets/{schema-Cdnttv65.js → schema-BdFq22Hl.js} +1 -1
- package/dist/client/assets/{schema-CrOnn79s.js → schema-Cx9ZLa-H.js} +1 -1
- package/dist/client/assets/{scroll-area-D2nZWmkP.js → scroll-area-Bnrys5oj.js} +1 -1
- package/dist/client/assets/{search-input-CRQ84Rcs.js → search-input-CXQLMhKZ.js} +1 -1
- package/dist/client/assets/{search-toggle-DJe6aOx6.js → search-toggle-DxUZFRWy.js} +1 -1
- package/dist/client/assets/{secret-ciphertext-DFEUxQ2Q.js → secret-ciphertext-DZr2qcb4.js} +1 -1
- package/dist/client/assets/{secret-picker-BLAtxBgC.js → secret-picker-HHgZv9y6.js} +1 -1
- package/dist/client/assets/{secrets-DZqnvevo.js → secrets-Cm2ZaKef.js} +1 -1
- package/dist/client/assets/{sections-QfQgZ0Fk.js → sections-DT5ozPKC.js} +1 -1
- package/dist/client/assets/{sections-editor-Dju5cdx3.js → sections-editor-CkId24Js.js} +1 -1
- package/dist/client/assets/{select-DbboDM2Y.js → select-CSQbGY9x.js} +1 -1
- package/dist/client/assets/{select-model-CkEgdTiU.js → select-model-NUb0C_oX.js} +1 -1
- package/dist/client/assets/{seo-editor-Bgqf8Wvw.js → seo-editor-D886xssW.js} +1 -1
- package/dist/client/assets/{separator-3Nzbh-2_.js → separator-CjiQChVR.js} +1 -1
- package/dist/client/assets/settings-tab-BmEKDSFe.js +1 -0
- package/dist/client/assets/{sheet-IZSv9mMV.js → sheet-C-yunzji.js} +1 -1
- package/dist/client/assets/{shell-layout-o5EDGsgV.js → shell-layout-vQvYndIW.js} +1 -1
- package/dist/client/assets/site-editor-1ZGqBXbh.js +1 -0
- package/dist/client/assets/{site-editor-toast-CMmEyjwn.js → site-editor-toast-BtFL0E4q.js} +1 -1
- package/dist/client/assets/{skills-C1ZfhZ8l.js → skills-9HRxIPqn.js} +1 -1
- package/dist/client/assets/{slider-Da5umJzS.js → slider-DB0IY-tO.js} +1 -1
- package/dist/client/assets/{sortable.esm-DygwBK0K.js → sortable.esm-C1zl1f3P.js} +1 -1
- package/dist/client/assets/{sso-CfMlD7Ei.js → sso-PqsQn3xP.js} +1 -1
- package/dist/client/assets/{suggestion-16V23GET.js → suggestion-Wgq7DDQo.js} +1 -1
- package/dist/client/assets/{switch-B3SL4byd.js → switch-DYA2xfHU.js} +1 -1
- package/dist/client/assets/{symbol-DjFHt_qH.js → symbol-B8wQ7lKk.js} +1 -1
- package/dist/client/assets/{synced-repos-Cq5hQBT3.js → synced-repos-mXhCt1sQ.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-DygpknPW.js → tab-icon-glyph-BpaLtZlY.js} +1 -1
- package/dist/client/assets/{table-B20C_A4l.js → table-BQLxO2Sb.js} +1 -1
- package/dist/client/assets/{tabs-z8w4lUhq.js → tabs-2NCCfhSA.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-DwrkOT2r.js → task-assignee-avatar-FdiZZP36.js} +1 -1
- package/dist/client/assets/{task-board-BllghPg4.js → task-board-DRNr9Dsj.js} +1 -1
- package/dist/client/assets/{task-route-7R43gp5A.js → task-route-BaANwBST.js} +1 -1
- package/dist/client/assets/{task-status-D5NZV4J9.js → task-status-VcYcBtq_.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-Du8PW_1F.js → taskboard-analytics-RJkelUr8.js} +1 -1
- package/dist/client/assets/{tasks-Dum2n8yE.js → tasks-COZY0QCJ.js} +1 -1
- package/dist/client/assets/tasks-CYZeHeAX.js +1 -0
- package/dist/client/assets/{textarea-DIB5tw4r.js → textarea-CxhXyMKI.js} +1 -1
- package/dist/client/assets/{thread-analytics-DWvPjsmt.js → thread-analytics-BGQNbVS2.js} +1 -1
- package/dist/client/assets/{thread-intent-BZm-EFCO.js → thread-intent-DKuqiaG7.js} +1 -1
- package/dist/client/assets/{thread-route-Cqps-enJ.js → thread-route-CQ0phZyI.js} +1 -1
- package/dist/client/assets/{thread-route-Be_GBqtE.js → thread-route-jNELZX1N.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-owT2bQp5.js → thread-sheet-body-Cdv_wHnA.js} +1 -1
- package/dist/client/assets/{time-range-picker-CMWhorHO.js → time-range-picker-DEciYFPf.js} +1 -1
- package/dist/client/assets/{toggle-group-DwqOZ4MY.js → toggle-group-CtdhsZGp.js} +1 -1
- package/dist/client/assets/{tool-namespace-Cg8zLvjP.js → tool-namespace-DTl3so75.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-B3HvaLAv.js → toolbar-icon-button-BPY5dUh9.js} +1 -1
- package/dist/client/assets/{tooltip-BVI2BtDO.js → tooltip-B5RmO6BW.js} +1 -1
- package/dist/client/assets/{tooltipContext-DWII1oNN.js → tooltipContext-C93Q6WFf.js} +1 -1
- package/dist/client/assets/{track-9VatN5GC.js → track-BBpplM-4.js} +1 -1
- package/dist/client/assets/{types-DGEWLhFA.js → types-Bt5yyj-z.js} +1 -1
- package/dist/client/assets/{url-slug-BxAIS32w.js → url-slug-B41xLFy_.js} +1 -1
- package/dist/client/assets/{usage-stats-RC7HVDz7.js → usage-stats-BkcKNXzu.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CwDx9RGv.js → use-ai-providers-D1TJRnIR.js} +1 -1
- package/dist/client/assets/{use-automations-esI-a9ei.js → use-automations-B9eI7BBQ.js} +1 -1
- package/dist/client/assets/{use-autosave-BlJaWBoS.js → use-autosave-D3uy94Wi.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-Bp6y46wP.js → use-chat-layout-state-BNudmQ0u.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CcmqI1TT.js → use-clock-tick-D3FoyBXt.js} +1 -1
- package/dist/client/assets/{use-connect-companion-EK_tBR0R.js → use-connect-companion-BLomLbPK.js} +1 -1
- package/dist/client/assets/{use-connection-C5PJp5ki.js → use-connection-BwU_KLSF.js} +1 -1
- package/dist/client/assets/{use-content-sync-CT_R89DD.js → use-content-sync-BgOMBs5q.js} +1 -1
- package/dist/client/assets/{use-copy-CHLOIJ7B.js → use-copy-d7X6hrKI.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CjupUFBL.js → use-create-virtual-mcp-OUIvni0u.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-mo7KqOi2.js → use-date-fns-locale-BuGEMgXR.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-B_tNUqHF.js → use-debounced-autosave-KHVF-MyQ.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DRcqPkU3.js → use-debounced-value-DJkh4QSx.js} +1 -1
- package/dist/client/assets/{use-deco-credits-kpB_ljAl.js → use-deco-credits-Dx8wT8P5.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-7DVNLqw5.js → use-decopilot-events-AlKmmETJ.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BJGj8-x3.js → use-delete-connection-BQjQHz64.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CfS1pvxP.js → use-deployment-admin-BIA7CHLS.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-M1Pf_Hev.js → use-fast-preview-draft-url-5oeXM-kY.js} +1 -1
- package/dist/client/assets/{use-file-configs-D_kctJ5n.js → use-file-configs-tsH4be9V.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-VSLuhS60.js → use-inbox-feed-bGge9UaE.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-RN9jGFYf.js → use-infinite-scroll-BO0n6TVn.js} +1 -1
- package/dist/client/assets/{use-join-requests-BCOdXbZZ.js → use-join-requests-DqhkfI-R.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-CXxVz1ce.js → use-main-panel-tabs-BrJK-bL3.js} +1 -1
- package/dist/client/assets/{use-main-schema-v8-B2SCuhcn.js → use-main-schema-v8-CZLsOlEV.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-aacZjJ6n.js → use-mcp-auth-status-DmZSbEuf.js} +1 -1
- package/dist/client/assets/{use-mcp-client-J1ndEcf9.js → use-mcp-client-MRThuZpK.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DNJWm8dw.js → use-mcp-prompts-DHm-ZTib.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-D4L1wGVI.js → use-mcp-tools-DiCKzhUm.js} +1 -1
- package/dist/client/assets/{use-members-B24eH4jf.js → use-members-h3MYd8gX.js} +1 -1
- package/dist/client/assets/{use-mobile-Tr1QHP7F.js → use-mobile-DCpa1RnA.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DF_GAhPU.js → use-navigate-to-agent-Bt0oZ-ou.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-CRea1MGx.js → use-open-billing-url-B2NuYLXS.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BvXF9uek.js → use-org-auth-client-CL0a2tPL.js} +1 -1
- package/dist/client/assets/{use-org-fs-NBkzIlLN.js → use-org-fs-D_4Q985K.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-DJQ1Emm8.js → use-org-repo-syncs-CC0BNhdO.js} +1 -1
- package/dist/client/assets/{use-org-sso-D6QGk2qX.js → use-org-sso-LC63-uuA.js} +1 -1
- package/dist/client/assets/{use-organization-roles-cAP4d5Qj.js → use-organization-roles-D1Q7317o.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CvNS5uqj.js → use-organization-settings-DhvN44pQ.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-xzho_IdK.js → use-panel-navigate-DoD4Atgz.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-B1sZ244h.js → use-project-native-view-presence-DF_1PP5b.js} +1 -1
- package/dist/client/assets/{use-project-scope-BL_T_B-0.js → use-project-scope-Cq4vb2Sy.js} +1 -1
- package/dist/client/assets/{use-recent-apps-uKwF1ZKT.js → use-recent-apps-CeIVmzp8.js} +1 -1
- package/dist/client/assets/{use-releases-BRWfch3N.js → use-releases-DQ--CsAF.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-PHzF2U7A.js → use-reports-diagnostic-CWir9L_Y.js} +1 -1
- package/dist/client/assets/{use-secrets-Fjq05jIs.js → use-secrets-D6tUoaJC.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-C5Y0tyB9.js → use-section-preview-base-Ca45yoz9.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-DEH_3BJ7.js → use-sidebar-collapsed-DPHQfMII.js} +1 -1
- package/dist/client/assets/{use-tags-B8VFTGb1.js → use-tags-DE48pnzl.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-e_iVjVgI.js → use-task-board-analytics-DlTk43Uu.js} +1 -1
- package/dist/client/assets/{use-task-board-events-Bi71rM-b.js → use-task-board-events-CSRq29Tm.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CKLjOfFC.js → use-task-board-item-prs-BsxjjcBf.js} +1 -1
- package/dist/client/assets/{use-task-metadata-CJXzsRtm.js → use-task-metadata-ToXrxOCT.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-C4-tdyMf.js → use-thread-analytics-Bu_i1v9r.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BRyva6jJ.js → use-thread-outputs-jyAHyZHI.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-ZoWXsJcj.js +1 -0
- package/dist/client/assets/{useQueries-CXXzgfBx.js → useQueries-CddGJ3VE.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D2W70ffp.js +1 -0
- package/dist/client/assets/{users-d19YD92D.js → users-2guAvf9G.js} +1 -1
- package/dist/client/assets/{utils-DZ5cUVcx.js → utils-DzhKsxx8.js} +1 -1
- package/dist/client/assets/{variant-calendar-DF0w82xq.js → variant-calendar-Bdj0O-mA.js} +1 -1
- package/dist/client/assets/{variant-draft-pointer-5TG4p4cZ.js → variant-draft-pointer-_apEPqxm.js} +1 -1
- package/dist/client/assets/{virtual-mcp-BYkH2aU6.js → virtual-mcp-CMZ8dHEU.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-D4CyjfYE.js → watch-sse-pool-DwBbAQ97.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-Caj60l9D.js +0 -1
- package/dist/client/assets/agent-deck-C__HnZM1.js +0 -1
- package/dist/client/assets/agent-file-BeBp8n5C.js +0 -1
- package/dist/client/assets/agent-library-DdVopENE.js +0 -1
- package/dist/client/assets/agent-library-file-uDNgnKii.js +0 -1
- package/dist/client/assets/agent-settings-DU_TfnoX.js +0 -1
- package/dist/client/assets/agent-site-editor-code-C-6QY89K.js +0 -2
- package/dist/client/assets/agent-site-editor-content-BxY50t8F.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-oopH768H.js +0 -1
- package/dist/client/assets/agent-view-BReXQMze.js +0 -1
- package/dist/client/assets/api-keys-N7gnHDXr.js +0 -1
- package/dist/client/assets/cms-settings-editor-Bn9fRyLD.js +0 -1
- package/dist/client/assets/index-CWfwo1z9.css +0 -1
- package/dist/client/assets/library-C4bjd1Q1.js +0 -1
- package/dist/client/assets/monitoring-DplmubBN.js +0 -1
- package/dist/client/assets/plan-UUfA5CZ5.js +0 -1
- package/dist/client/assets/project-reports-a-FYZHJz.js +0 -1
- package/dist/client/assets/project-tasks-Ci9CnGcj.js +0 -1
- package/dist/client/assets/record-editor-BzL4Kfgp.js +0 -1
- package/dist/client/assets/reports-BrsdMCkM.js +0 -1
- package/dist/client/assets/repositories-PPuEUfpS.js +0 -1
- package/dist/client/assets/route-CeQaMp2n.js +0 -1
- package/dist/client/assets/settings-tab-BvyLrsti.js +0 -1
- package/dist/client/assets/site-editor-bo0E_jA0.js +0 -1
- package/dist/client/assets/tasks-jHi238nZ.js +0 -1
- package/dist/client/assets/useInfiniteQuery-B6hNZdP6.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BLScoOeo.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as Q,b as Z,aD as nt,aE as rt,r as ee,j as s,ba as St,et as Ee,t as Y,es as oe,er as ce,aX as De,a2 as ae,an as ne,o as de,e as le,F as we,B as V,I as me,K as W,m as ue,b2 as Ne,l as re,dm as at,g4 as Nt,aU as Ct,eZ as Ce,am as _t,av as Pt,L as It,af as kt,y as Ve,v as wt,s as Ut,h as At,q as Et,D as Dt,w as Kt,aF as Tt,aG as Ae,z as Rt,a as ot,g3 as Ot}from"./index-BpE9ALKU.js";import{i as Mt}from"./AlertCircle-BKEHXsE7.js";import{u as ct,a as Ie,i as Ft,b as $t,p as Lt,f as Ke,g as Bt,e as dt}from"./use-ai-providers-CwDx9RGv.js";import{i as qt}from"./CheckCircle-pswqe0yQ.js";import{d as zt,l as Ht}from"./use-organization-settings-CvNS5uqj.js";import{S as Gt}from"./schema-Cdnttv65.js";import{M as Vt}from"./select-model-CkEgdTiU.js";import{u as Qt}from"./use-debounced-autosave-B_tNUqHF.js";import{T as Qe,a as Wt}from"./toggle-group-DwqOZ4MY.js";import{A as Te,a as Re,b as Oe,c as Me,g as Fe,d as $e,e as Le,f as Be}from"./alert-dialog-DGPL6Sul.js";import{u as Ue,e as qe,a as ut,f as Yt}from"./use-decopilot-events-7DVNLqw5.js";import{u as mt}from"./use-open-billing-url-CRea1MGx.js";import{u as ft,P as ze,a as Xt,C as Zt,i as Jt,f as es,F as ts,S as gt}from"./plan-ladder-Bo1QCqxw.js";import{i as ss}from"./Minus-Q9-Po73D.js";import{s as is}from"./Plus-DEIwMEqz.js";import{i as ls,b as ns}from"./Tool01-BjWCTgWh.js";import{s as rs}from"./Trash01-CIzl9L8e.js";import{A as as}from"./avatar-Bwp-Xc5s.js";import{u as os,f as cs}from"./use-date-fns-locale-mo7KqOi2.js";import{d as pt,P as ds,C as We}from"./index-DKt3w3pV.js";import{P as us}from"./ai-providers-logos-DD3qZ33J.js";import{s as ms}from"./Image01-t87ZE04W.js";import{S as fs}from"./switch-B3SL4byd.js";import{R as gs}from"./require-capability-DGAfsfb0.js";import"./task-board-BllghPg4.js";import"./drawer-COuxoIPq.js";import"./use-mobile-Tr1QHP7F.js";import"./chat-context-DGKtupvP.js";import"./use-panel-navigate-xzho_IdK.js";import"./thread-route-Cqps-enJ.js";import"./use-project-scope-BL_T_B-0.js";import"./repository-binding-3oH3TnyD.js";import"./use-mcp-client-J1ndEcf9.js";import"./auth-dECedNaO.js";import"./autosend-CUbKy0s-.js";import"./thread-intent-BZm-EFCO.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-D4CyjfYE.js";import"./slugify-CEUa2lfQ.js";import"./location-V0VwTJTt.js";import"./active-indicator-CCMhAsc_.js";import"./tooltip-BVI2BtDO.js";import"./index-OmMe1wxV.js";import"./User01-C-yKb_Na.js";import"./differenceInSeconds-C3x8sHUj.js";import"./checkbox-CSo6M-6b.js";import"./select-DbboDM2Y.js";import"./index-BdQq_4o_.js";import"./ChevronUp-DtK5u9ST.js";import"./ArrowLeft-D81aL8fM.js";import"./ChevronSelectorVertical-yLR6uZzh.js";import"./Key01-S4YXCnrO.js";import"./SearchMd-UGgqPivi.js";import"./Monitor01-BmtAT73A.js";import"./access-gate-R9-SDKyD.js";import"./capability-load-error-DwR-XbDb.js";const ps=e=>e.capabilities?.includes("image")===!0,xs=e=>Ft(e),hs=e=>$t(e),vs=[{key:"fast",filter:void 0},{key:"smart",filter:void 0},{key:"thinking",filter:void 0},{key:"image",filter:ps},{key:"web_search",filter:xs},{key:"deep_research",filter:hs}];function bs(e){const t=Q.c(27),{slot:i,onSlotChange:c,filterModels:n,defaultKeyId:a}=e,l=ct(),r=l.some(b=>b.id===i?.keyId)?i?.keyId:null,[f,x]=ee.useState(r??a),[g,o]=ee.useState(r);g!==r&&(o(r),r&&x(r));let p;t[0]!==l||t[1]!==a||t[2]!==f?(p=l.some(b=>b.id===f)?f:a,t[0]=l,t[1]=a,t[2]=f,t[3]=p):p=t[3];const d=p;let m;t[4]!==d||t[5]!==l?(m=d?l.find(b=>b.id===d):null,t[4]=d,t[5]=l,t[6]=m):m=t[6];const j=m,{models:y,isLoading:v}=Ie(n?d??void 0:void 0),S=n?v||y.some(n):!0;let _;t[7]!==i||t[8]!==j?.providerId||t[9]!==r?(_=i&&r?{modelId:i.modelId,title:i.title??i.modelId,keyId:i.keyId,providerId:j?.providerId??"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,t[7]=i,t[8]=j?.providerId,t[9]=r,t[10]=_):_=t[10];const N=_,h=Z();if(n&&!S){let b;t[11]!==h?(b=h("settings.simpleModeSection.notAvailableWithCurrentProvider"),t[11]=h,t[12]=b):b=t[12];let w;return t[13]!==b?(w=s.jsx("p",{className:"text-xs text-muted-foreground italic",children:b}),t[13]=b,t[14]=w):w=t[14],w}let C;t[15]!==h?(C=h("settings.simpleModeSection.pickModel"),t[15]=h,t[16]=C):C=t[16];let P;t[17]===Symbol.for("react.memo_cache_sentinel")?(P=b=>x(b),t[17]=P):P=t[17];let u;t[18]!==d||t[19]!==c?(u=b=>{const w=b.keyId??d??"";x(w),c({keyId:w,modelId:b.modelId,title:b.title})},t[18]=d,t[19]=c,t[20]=u):u=t[20];let I;return t[21]!==d||t[22]!==n||t[23]!==N||t[24]!==C||t[25]!==u?(I=s.jsx(Vt,{variant:"bordered",placeholder:C,model:N,credentialId:d,filterModels:n,onCredentialChange:P,onModelChange:u}),t[21]=d,t[22]=n,t[23]=N,t[24]=C,t[25]=u,t[26]=I):I=t[26],I}function js(e){const t=Q.c(10),{isPending:i,showSaved:c}=e,n=Z();if(i){let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(De,{size:12,className:"animate-spin"}),t[0]=a):a=t[0];let l;t[1]!==n?(l=n("settings.simpleModeSection.saving"),t[1]=n,t[2]=l):l=t[2];let r;return t[3]!==l?(r=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[a,l]}),t[3]=l,t[4]=r):r=t[4],r}if(c){let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(qt,{size:12}),t[5]=a):a=t[5];let l;t[6]!==n?(l=n("settings.simpleModeSection.saved"),t[6]=n,t[7]=l):l=t[7];let r;return t[8]!==l?(r=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[a,l]}),t[8]=l,t[9]=r):r=t[9],r}return null}function ys(){const e=Q.c(58),t=Z(),i=ct(),c=zt(),n=i.length>0;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=nt(Gt),e[0]=a):a=e[0];let l;e[1]!==c?(l={resolver:a,values:c,mode:"onChange"},e[1]=c,e[2]=l):l=e[2];const r=rt(l),{mutate:f,isPending:x,isSuccess:g}=Ht(),o=r.formState.isDirty;let p;e[3]!==r||e[4]!==c||e[5]!==t||e[6]!==f?(p={delayMs:250,save:async()=>{const k=r.getValues();f(k,{onSuccess:()=>r.reset(k,{keepValues:!0}),onError:$=>{r.reset(c),Y.error(t("settings.simpleModeSection.failedToSave",{error:$.message}))}})}},e[3]=r,e[4]=c,e[5]=t,e[6]=f,e[7]=p):p=e[7];const{schedule:d}=Qt(p),m=i[0],j=i[1],y=i[2],{models:v}=Ie(m?.id),{models:S}=Ie(j?.id),{models:_}=Ie(y?.id);let N,h;e[8]!==r||e[9]!==n?(N=()=>{n||r.reset({tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}})},h=[n,r],e[8]=r,e[9]=n,e[10]=N,e[11]=h):(N=e[10],h=e[11]),ee.useEffect(N,h);let C;e[12]!==i||e[13]!==r||e[14]!==m||e[15]!==j||e[16]!==y||e[17]!==v||e[18]!==S||e[19]!==_?(C=()=>{const k=r.getValues(),$=new Set(i.map(Ss)),z={};m?.id&&(z[m.id]=v),j?.id&&(z[j.id]=S),y?.id&&(z[y.id]=_);const H=se=>se!=null&&!$.has(se.keyId),R={fast:H(k.tiers.fast)?null:k.tiers.fast,smart:H(k.tiers.smart)?null:k.tiers.smart,thinking:H(k.tiers.thinking)?null:k.tiers.thinking,image:H(k.tiers.image)?null:k.tiers.image,web_search:H(k.tiers.web_search)?null:k.tiers.web_search,deep_research:H(k.tiers.deep_research)?null:k.tiers.deep_research},X=!R.fast||!R.smart||!R.thinking||!R.image||!R.web_search||!R.deep_research,te=R.fast===k.tiers.fast&&R.smart===k.tiers.smart&&R.thinking===k.tiers.thinking&&R.image===k.tiers.image&&R.web_search===k.tiers.web_search&&R.deep_research===k.tiers.deep_research;if(!X&&te)return;const J=Lt(i,z);r.reset({tiers:{fast:R.fast??J.chat.fast,smart:R.smart??J.chat.smart,thinking:R.thinking??J.chat.thinking,image:R.image??J.image,web_search:R.web_search??J.webSearch,deep_research:R.deep_research??J.deepResearch}},{keepDirty:!0})},e[12]=i,e[13]=r,e[14]=m,e[15]=j,e[16]=y,e[17]=v,e[18]=S,e[19]=_,e[20]=C):C=e[20];const P=m?.id,u=j?.id,I=y?.id;let b;e[21]!==i||e[22]!==r||e[23]!==v||e[24]!==S||e[25]!==_||e[26]!==P||e[27]!==u||e[28]!==I?(b=[r,i,v,S,_,P,u,I],e[21]=i,e[22]=r,e[23]=v,e[24]=S,e[25]=_,e[26]=P,e[27]=u,e[28]=I,e[29]=b):b=e[29],ee.useEffect(C,b);let w;e[30]!==t?(w=k=>({fast:t("settings.simpleModeSection.tierFast"),smart:t("settings.simpleModeSection.tierSmart"),thinking:t("settings.simpleModeSection.tierThinking"),image:t("settings.simpleModeSection.tierImage"),web_search:t("settings.simpleModeSection.tierWebSearch"),deep_research:t("settings.simpleModeSection.tierDeepResearch")})[k]||k,e[30]=t,e[31]=w):w=e[31];const U=w;let A;e[32]!==t?(A=k=>({fast:t("settings.simpleModeSection.tierFastDesc"),smart:t("settings.simpleModeSection.tierSmartDesc"),thinking:t("settings.simpleModeSection.tierThinkingDesc"),image:t("settings.simpleModeSection.tierImageDesc"),web_search:t("settings.simpleModeSection.tierWebSearchDesc"),deep_research:t("settings.simpleModeSection.tierDeepResearchDesc")})[k]||"",e[32]=t,e[33]=A):A=e[33];const D=A;let K;e[34]!==t?(K=t("settings.simpleModeSection.defaultModels"),e[34]=t,e[35]=K):K=e[35];let T;e[36]!==t?(T=t("settings.simpleModeSection.modelsPowerDescription"),e[36]=t,e[37]=T):T=e[37];let M;e[38]!==T?(M=s.jsx("p",{className:"text-sm text-muted-foreground",children:T}),e[38]=T,e[39]=M):M=e[39];const B=g&&!o;let L;e[40]!==x||e[41]!==B?(L=s.jsx(js,{isPending:x,showSaved:B}),e[40]=x,e[41]=B,e[42]=L):L=e[42];let F;e[43]!==M||e[44]!==L?(F=s.jsxs("div",{className:"flex items-center justify-between -mt-2 mb-2 px-4",children:[M,L]}),e[43]=M,e[44]=L,e[45]=F):F=e[45];let q;e[46]!==i[0]?.id||e[47]!==r.control||e[48]!==D||e[49]!==U||e[50]!==d?(q=vs.map(k=>s.jsx(St,{control:r.control,name:`tiers.${k.key}`,render:$=>{const{field:z}=$;return s.jsx(Ee,{title:U(k.key),description:D(k.key),action:s.jsx(bs,{slot:z.value,defaultKeyId:i[0]?.id??null,filterModels:k.filter,onSlotChange:H=>{z.onChange(H),d()}})})}},k.key)),e[46]=i[0]?.id,e[47]=r.control,e[48]=D,e[49]=U,e[50]=d,e[51]=q):q=e[51];let E;e[52]!==q?(E=s.jsx(oe,{children:q}),e[52]=q,e[53]=E):E=e[53];let O;return e[54]!==K||e[55]!==F||e[56]!==E?(O=s.jsxs(ce,{title:K,children:[F,E]}),e[54]=K,e[55]=F,e[56]=E,e[57]=O):O=e[57],O}function Ss(e){return e.id}const Ns={usd:[10,20,100],brl:[50,100,500]};function xt(){const e=Q.c(30),t=Z(),i=ne(),[c]=we(),[n,a]=ee.useState(!1);let l;e[0]!==t?(l=u=>{Y.error(t("settings.decoCreditsHero.topUpFailed",{message:u.message}))},e[0]=t,e[1]=l):l=e[1];const{mutate:r,isPending:f}=le({mutationFn:async u=>{const{url:I}=await i.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:u,currency:d});return I},onSuccess:Cs,onError:l}),[x,g]=ee.useState(""),[o,p]=ee.useState(c.language==="pt-BR"?"brl":"usd"),d=o,m=parseFloat(x),j=!isNaN(m)&&m>=1,y=d==="brl"?"R$":"$";let v;e[2]!==p?(v=u=>{u&&p(u)},e[2]=p,e[3]=v):v=e[3];let S,_;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Qe,{value:"usd",className:"h-8 px-3 text-sm",children:"USD"}),_=s.jsx(Qe,{value:"brl",className:"h-8 px-3 text-sm",children:"BRL"}),e[4]=S,e[5]=_):(S=e[4],_=e[5]);let N;e[6]!==d||e[7]!==v?(N=s.jsxs(Wt,{type:"single",variant:"outline",size:"sm",value:d,onValueChange:v,children:[S,_]}),e[6]=d,e[7]=v,e[8]=N):N=e[8];let h;e[9]!==d||e[10]!==y||e[11]!==n||e[12]!==f||e[13]!==t||e[14]!==r?(h=!n&&s.jsxs(s.Fragment,{children:[Ns[d].map(u=>s.jsxs(V,{variant:"outline",className:"tabular-nums",disabled:f,onClick:()=>r(u*100),children:[y,u]},u)),s.jsx(V,{variant:"ghost",className:"text-muted-foreground",onClick:()=>a(!0),disabled:f,children:t("settings.decoCreditsHero.custom")})]}),e[9]=d,e[10]=y,e[11]=n,e[12]=f,e[13]=t,e[14]=r,e[15]=h):h=e[15];let C;e[16]!==y||e[17]!==x||e[18]!==m||e[19]!==n||e[20]!==j||e[21]!==f||e[22]!==g||e[23]!==t||e[24]!==r?(C=n&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative max-w-[140px]",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:y}),s.jsx(me,{type:"number",min:"1",step:"1",placeholder:t("settings.decoCreditsHero.amountPlaceholder"),value:x,onChange:u=>g(u.target.value),size:"sm",className:"pl-7",autoFocus:!0})]}),s.jsx(V,{disabled:!j||f,onClick:()=>r(Math.round(m*100)),children:f?"...":t("settings.decoCreditsHero.add")}),s.jsx(V,{variant:"ghost",className:"text-muted-foreground",onClick:()=>{a(!1),g("")},children:t("settings.decoCreditsHero.cancel")})]}),e[16]=y,e[17]=x,e[18]=m,e[19]=n,e[20]=j,e[21]=f,e[22]=g,e[23]=t,e[24]=r,e[25]=C):C=e[25];let P;return e[26]!==N||e[27]!==h||e[28]!==C?(P=s.jsx("div",{className:"flex flex-col gap-2.5",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[N,h,C]})}),e[26]=N,e[27]=h,e[28]=C,e[29]=P):P=e[29],P}function Cs(e){e&&window.open(e,"_blank","noopener,noreferrer")}function _s(e){return e<=0?"text-destructive":e<=1?"text-warning":"text-foreground"}function Ps(e){const t=Q.c(38),{enabled:i}=e,c=Z(),{org:n}=ae(),a=ne();let l;t[0]!==n.id?(l=W.aiProviderCredits(n.id,"deco"),t[0]=n.id,t[1]=l):l=t[1];let r;t[2]!==a?(r=async()=>{try{return await a.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}},t[2]=a,t[3]=r):r=t[3];let f;t[4]!==i||t[5]!==l||t[6]!==r?(f={queryKey:l,enabled:i,staleTime:6e4,queryFn:r},t[4]=i,t[5]=l,t[6]=r,t[7]=f):f=t[7];const{data:x,isLoading:g,refetch:o,isFetching:p}=ue(f);if(!i)return null;const d=x?.balanceCents!=null?x.balanceCents/100:null;let m;t[8]!==d?(m=d!=null?`$${d.toFixed(2)}`:"—",t[8]=d,t[9]=m):m=t[9];const j=m;let y;t[10]!==d||t[11]!==j||t[12]!==p||t[13]!==g?(y=g||p?s.jsx(Ne,{className:"h-9 w-24"}):s.jsx("span",{className:re("text-3xl font-semibold tabular-nums tracking-tight",d!=null&&_s(d)),children:j}),t[10]=d,t[11]=j,t[12]=p,t[13]=g,t[14]=y):y=t[14];let v;t[15]!==o?(v=()=>o(),t[15]=o,t[16]=v):v=t[16];let S;t[17]!==c?(S=c("settings.decoCreditsHero.refreshBalance"),t[17]=c,t[18]=S):S=t[18];const _=p&&"animate-spin";let N;t[19]!==_?(N=re("size-3.5",_),t[19]=_,t[20]=N):N=t[20];let h;t[21]!==N?(h=s.jsx(De,{className:N}),t[21]=N,t[22]=h):h=t[22];let C;t[23]!==p||t[24]!==h||t[25]!==v||t[26]!==S?(C=s.jsx(V,{type:"button",variant:"ghost",size:"icon-xs",onClick:v,disabled:p,className:"text-muted-foreground hover:text-foreground","aria-label":S,children:h}),t[23]=p,t[24]=h,t[25]=v,t[26]=S,t[27]=C):C=t[27];let P;t[28]!==C||t[29]!==y?(P=s.jsxs("div",{className:"flex items-baseline gap-2",children:[y,C]}),t[28]=C,t[29]=y,t[30]=P):P=t[30];let u;t[31]!==c?(u=c("settings.decoCreditsHero.availableBalance"),t[31]=c,t[32]=u):u=t[32];let I;t[33]!==u?(I=s.jsx("p",{className:"text-xs text-muted-foreground",children:u}),t[33]=u,t[34]=I):I=t[34];let b;return t[35]!==P||t[36]!==I?(b=s.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[P,I]}),t[35]=P,t[36]=I,t[37]=b):b=t[37],b}function Is(){const e=Q.c(74),t=Z(),{org:i}=ae(),c=ne(),n=de(),a=Ke();let l;e[0]!==a?(l=a.find(ks),e[0]=a,e[1]=l):l=e[1];const r=l,f=Ue(),x=qe("credits"),[g,o]=ee.useState(!1);let p;e[2]!==r||e[3]!==c?(p=async()=>{r&&await c.call("AI_PROVIDER_KEY_DELETE",{keyId:r.id})},e[2]=r,e[3]=c,e[4]=p):p=e[4];let d;e[5]!==i||e[6]!==n||e[7]!==t?(d=()=>{n.invalidateQueries({queryKey:W.aiProviderKeys(i.id)}),n.invalidateQueries({queryKey:W.aiProviders(i.id)}),Y.success(t("settings.decoCreditsHero.disconnectSuccess")),o(!1)},e[5]=i,e[6]=n,e[7]=t,e[8]=d):d=e[8];let m;e[9]!==t?(m=H=>{Y.error(t("settings.decoCreditsHero.disconnectError",{message:H.message}))},e[9]=t,e[10]=m):m=e[10];let j;e[11]!==p||e[12]!==d||e[13]!==m?(j={mutationFn:p,onSuccess:d,onError:m},e[11]=p,e[12]=d,e[13]=m,e[14]=j):j=e[14];const{mutate:y,isPending:v}=le(j);if(!r)return null;let S;e[15]!==t?(S=t("settings.decoCreditsHero.title"),e[15]=t,e[16]=S):S=e[16];let _;e[17]!==t?(_=t("settings.decoCreditsHero.decoAiGatewayAlt"),e[17]=t,e[18]=_):_=e[18];let N;e[19]!==_?(N=s.jsx("div",{className:"flex items-center gap-3",children:s.jsx("img",{src:"/logos/deco%20logo.svg",alt:_,className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"})}),e[19]=_,e[20]=N):N=e[20];let h;e[21]===Symbol.for("react.memo_cache_sentinel")?(h=()=>o(!0),e[21]=h):h=e[21];let C;e[22]!==t?(C=t("settings.decoCreditsHero.disconnect"),e[22]=t,e[23]=C):C=e[23];let P;e[24]!==v||e[25]!==C?(P=s.jsx(V,{variant:"ghost-destructive",size:"sm",onClick:h,disabled:v,children:C}),e[24]=v,e[25]=C,e[26]=P):P=e[26];let u;e[27]!==P||e[28]!==N?(u=s.jsxs("div",{className:"flex items-center justify-between",children:[N,P]}),e[27]=P,e[28]=N,e[29]=u):u=e[29];let I;e[30]!==t?(I=t("settings.decoCreditsHero.disconnectTitle"),e[30]=t,e[31]=I):I=e[31];let b;e[32]!==I?(b=s.jsx(Te,{children:I}),e[32]=I,e[33]=b):b=e[33];let w;e[34]!==t?(w=t("settings.decoCreditsHero.disconnectDescription"),e[34]=t,e[35]=w):w=e[35];let U;e[36]!==w?(U=s.jsx(Re,{children:w}),e[36]=w,e[37]=U):U=e[37];let A;e[38]!==b||e[39]!==U?(A=s.jsxs(Oe,{children:[b,U]}),e[38]=b,e[39]=U,e[40]=A):A=e[40];let D;e[41]!==t?(D=t("settings.decoCreditsHero.cancelButton"),e[41]=t,e[42]=D):D=e[42];let K;e[43]!==D?(K=s.jsx(Me,{children:D}),e[43]=D,e[44]=K):K=e[44];let T;e[45]!==y?(T=()=>y(),e[45]=y,e[46]=T):T=e[46];let M;e[47]!==t?(M=t("settings.decoCreditsHero.disconnectButton"),e[47]=t,e[48]=M):M=e[48];let B;e[49]!==T||e[50]!==M?(B=s.jsx(Fe,{onClick:T,variant:"destructive",children:M}),e[49]=T,e[50]=M,e[51]=B):B=e[51];let L;e[52]!==K||e[53]!==B?(L=s.jsxs($e,{children:[K,B]}),e[52]=K,e[53]=B,e[54]=L):L=e[54];let F;e[55]!==A||e[56]!==L?(F=s.jsxs(Le,{children:[A,L]}),e[55]=A,e[56]=L,e[57]=F):F=e[57];let q;e[58]!==g||e[59]!==F?(q=s.jsx(Be,{open:g,onOpenChange:o,children:F}),e[58]=g,e[59]=F,e[60]=q):q=e[60];const E=!f;let O;e[61]!==E?(O=s.jsx(Ps,{enabled:E}),e[61]=E,e[62]=O):O=e[62];let k;e[63]!==x||e[64]!==t?(k=x?s.jsxs("div",{className:"pt-4 border-t border-border/60",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2.5",children:t("settings.decoCreditsHero.addCredits")}),s.jsx(xt,{})]}):null,e[63]=x,e[64]=t,e[65]=k):k=e[65];let $;e[66]!==u||e[67]!==q||e[68]!==O||e[69]!==k?($=s.jsx(oe,{children:s.jsxs("div",{className:"px-5 py-5 flex flex-col gap-5",children:[u,q,O,k]})}),e[66]=u,e[67]=q,e[68]=O,e[69]=k,e[70]=$):$=e[70];let z;return e[71]!==$||e[72]!==S?(z=s.jsx(ce,{title:S,children:$}),e[71]=$,e[72]=S,e[73]=z):z=e[73],z}function ks(e){return e.providerId==="deco"}var He="Progress",Ge=100,[ws]=Nt(He),[Us,As]=ws(He),ht=ee.forwardRef((e,t)=>{const{__scopeProgress:i,value:c=null,max:n,getValueLabel:a=Es,...l}=e;(n||n===0)&&!Ye(n)&&console.error(Ds(`${n}`,"Progress"));const r=Ye(n)?n:Ge;c!==null&&!Xe(c,r)&&console.error(Ks(`${c}`,"Progress"));const f=Xe(c,r)?c:null,x=ke(f)?a(f,r):void 0;return s.jsx(Us,{scope:i,value:f,max:r,children:s.jsx(at.div,{"aria-valuemax":r,"aria-valuemin":0,"aria-valuenow":ke(f)?f:void 0,"aria-valuetext":x,role:"progressbar","data-state":jt(f,r),"data-value":f??void 0,"data-max":r,...l,ref:t})})});ht.displayName=He;var vt="ProgressIndicator",bt=ee.forwardRef((e,t)=>{const{__scopeProgress:i,...c}=e,n=As(vt,i);return s.jsx(at.div,{"data-state":jt(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...c,ref:t})});bt.displayName=vt;function Es(e,t){return`${Math.round(e/t*100)}%`}function jt(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function ke(e){return typeof e=="number"}function Ye(e){return ke(e)&&!isNaN(e)&&e>0}function Xe(e,t){return ke(e)&&!isNaN(e)&&e<=t&&e>=0}function Ds(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Ge}\`.`}function Ks(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
1
|
+
import{c as Q,b as Z,aD as nt,aE as rt,r as ee,j as s,ba as St,et as Ee,t as Y,es as oe,er as ce,aX as De,a2 as ae,an as ne,o as de,e as le,F as we,B as V,I as me,K as W,m as ue,b2 as Ne,l as re,dm as at,g4 as Nt,aU as Ct,eZ as Ce,am as _t,av as Pt,L as It,af as kt,y as Ve,v as wt,s as Ut,h as At,q as Et,D as Dt,w as Kt,aF as Tt,aG as Ae,z as Rt,a as ot,g3 as Ot}from"./index-CaH7O3hJ.js";import{i as Mt}from"./AlertCircle-Ctbquk5a.js";import{u as ct,a as Ie,i as Ft,b as $t,p as Lt,f as Ke,g as Bt,e as dt}from"./use-ai-providers-D1TJRnIR.js";import{i as qt}from"./CheckCircle-C2ndOEUO.js";import{d as zt,l as Ht}from"./use-organization-settings-DhvN44pQ.js";import{S as Gt}from"./schema-BdFq22Hl.js";import{M as Vt}from"./select-model-NUb0C_oX.js";import{u as Qt}from"./use-debounced-autosave-KHVF-MyQ.js";import{T as Qe,a as Wt}from"./toggle-group-CtdhsZGp.js";import{A as Te,a as Re,b as Oe,c as Me,g as Fe,d as $e,e as Le,f as Be}from"./alert-dialog-CKDHmJ-l.js";import{u as Ue,e as qe,a as ut,f as Yt}from"./use-decopilot-events-AlKmmETJ.js";import{u as mt}from"./use-open-billing-url-B2NuYLXS.js";import{u as ft,P as ze,a as Xt,C as Zt,i as Jt,f as es,F as ts,S as gt}from"./plan-ladder-BydnH1hR.js";import{i as ss}from"./Minus-C1PMcNV0.js";import{s as is}from"./Plus-BDveVGJf.js";import{i as ls,b as ns}from"./Tool01-BM29_KWq.js";import{s as rs}from"./Trash01-D92WhXf2.js";import{A as as}from"./avatar-RpIBVCkY.js";import{u as os,f as cs}from"./use-date-fns-locale-BuGEMgXR.js";import{d as pt,P as ds,C as We}from"./index-BpRXpcv4.js";import{P as us}from"./ai-providers-logos-DD3qZ33J.js";import{s as ms}from"./Image01-D7F4wuKx.js";import{S as fs}from"./switch-DYA2xfHU.js";import{R as gs}from"./require-capability-D4hkdMxt.js";import"./task-board-DRNr9Dsj.js";import"./drawer-ZlYTI3Z6.js";import"./use-mobile-DCpa1RnA.js";import"./chat-context-_d3c57p1.js";import"./use-panel-navigate-DoD4Atgz.js";import"./thread-route-CQ0phZyI.js";import"./use-project-scope-Cq4vb2Sy.js";import"./repository-binding-BLgLcT4o.js";import"./use-mcp-client-MRThuZpK.js";import"./auth-hgpoCSIS.js";import"./autosend-BZOm698U.js";import"./thread-intent-DKuqiaG7.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DwBbAQ97.js";import"./slugify-CEUa2lfQ.js";import"./location-V0VwTJTt.js";import"./active-indicator-CCMhAsc_.js";import"./tooltip-B5RmO6BW.js";import"./index-C9OgV5Vt.js";import"./User01-Cn3JqTjv.js";import"./differenceInSeconds-C3x8sHUj.js";import"./checkbox-CUzk21sc.js";import"./select-CSQbGY9x.js";import"./index-BdQq_4o_.js";import"./ChevronUp-C8mqlnDX.js";import"./ArrowLeft-DZ0mAFgb.js";import"./ChevronSelectorVertical-DaUdbCWk.js";import"./Key01-u4HXXUPa.js";import"./SearchMd-Cuf45jFP.js";import"./Monitor01-D3VwU2ni.js";import"./access-gate-BjUA5Gw_.js";import"./capability-load-error-DdN4o47w.js";const ps=e=>e.capabilities?.includes("image")===!0,xs=e=>Ft(e),hs=e=>$t(e),vs=[{key:"fast",filter:void 0},{key:"smart",filter:void 0},{key:"thinking",filter:void 0},{key:"image",filter:ps},{key:"web_search",filter:xs},{key:"deep_research",filter:hs}];function bs(e){const t=Q.c(27),{slot:i,onSlotChange:c,filterModels:n,defaultKeyId:a}=e,l=ct(),r=l.some(b=>b.id===i?.keyId)?i?.keyId:null,[f,x]=ee.useState(r??a),[g,o]=ee.useState(r);g!==r&&(o(r),r&&x(r));let p;t[0]!==l||t[1]!==a||t[2]!==f?(p=l.some(b=>b.id===f)?f:a,t[0]=l,t[1]=a,t[2]=f,t[3]=p):p=t[3];const d=p;let m;t[4]!==d||t[5]!==l?(m=d?l.find(b=>b.id===d):null,t[4]=d,t[5]=l,t[6]=m):m=t[6];const j=m,{models:y,isLoading:v}=Ie(n?d??void 0:void 0),S=n?v||y.some(n):!0;let _;t[7]!==i||t[8]!==j?.providerId||t[9]!==r?(_=i&&r?{modelId:i.modelId,title:i.title??i.modelId,keyId:i.keyId,providerId:j?.providerId??"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,t[7]=i,t[8]=j?.providerId,t[9]=r,t[10]=_):_=t[10];const N=_,h=Z();if(n&&!S){let b;t[11]!==h?(b=h("settings.simpleModeSection.notAvailableWithCurrentProvider"),t[11]=h,t[12]=b):b=t[12];let w;return t[13]!==b?(w=s.jsx("p",{className:"text-xs text-muted-foreground italic",children:b}),t[13]=b,t[14]=w):w=t[14],w}let C;t[15]!==h?(C=h("settings.simpleModeSection.pickModel"),t[15]=h,t[16]=C):C=t[16];let P;t[17]===Symbol.for("react.memo_cache_sentinel")?(P=b=>x(b),t[17]=P):P=t[17];let u;t[18]!==d||t[19]!==c?(u=b=>{const w=b.keyId??d??"";x(w),c({keyId:w,modelId:b.modelId,title:b.title})},t[18]=d,t[19]=c,t[20]=u):u=t[20];let I;return t[21]!==d||t[22]!==n||t[23]!==N||t[24]!==C||t[25]!==u?(I=s.jsx(Vt,{variant:"bordered",placeholder:C,model:N,credentialId:d,filterModels:n,onCredentialChange:P,onModelChange:u}),t[21]=d,t[22]=n,t[23]=N,t[24]=C,t[25]=u,t[26]=I):I=t[26],I}function js(e){const t=Q.c(10),{isPending:i,showSaved:c}=e,n=Z();if(i){let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(De,{size:12,className:"animate-spin"}),t[0]=a):a=t[0];let l;t[1]!==n?(l=n("settings.simpleModeSection.saving"),t[1]=n,t[2]=l):l=t[2];let r;return t[3]!==l?(r=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[a,l]}),t[3]=l,t[4]=r):r=t[4],r}if(c){let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(qt,{size:12}),t[5]=a):a=t[5];let l;t[6]!==n?(l=n("settings.simpleModeSection.saved"),t[6]=n,t[7]=l):l=t[7];let r;return t[8]!==l?(r=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[a,l]}),t[8]=l,t[9]=r):r=t[9],r}return null}function ys(){const e=Q.c(58),t=Z(),i=ct(),c=zt(),n=i.length>0;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=nt(Gt),e[0]=a):a=e[0];let l;e[1]!==c?(l={resolver:a,values:c,mode:"onChange"},e[1]=c,e[2]=l):l=e[2];const r=rt(l),{mutate:f,isPending:x,isSuccess:g}=Ht(),o=r.formState.isDirty;let p;e[3]!==r||e[4]!==c||e[5]!==t||e[6]!==f?(p={delayMs:250,save:async()=>{const k=r.getValues();f(k,{onSuccess:()=>r.reset(k,{keepValues:!0}),onError:$=>{r.reset(c),Y.error(t("settings.simpleModeSection.failedToSave",{error:$.message}))}})}},e[3]=r,e[4]=c,e[5]=t,e[6]=f,e[7]=p):p=e[7];const{schedule:d}=Qt(p),m=i[0],j=i[1],y=i[2],{models:v}=Ie(m?.id),{models:S}=Ie(j?.id),{models:_}=Ie(y?.id);let N,h;e[8]!==r||e[9]!==n?(N=()=>{n||r.reset({tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}})},h=[n,r],e[8]=r,e[9]=n,e[10]=N,e[11]=h):(N=e[10],h=e[11]),ee.useEffect(N,h);let C;e[12]!==i||e[13]!==r||e[14]!==m||e[15]!==j||e[16]!==y||e[17]!==v||e[18]!==S||e[19]!==_?(C=()=>{const k=r.getValues(),$=new Set(i.map(Ss)),z={};m?.id&&(z[m.id]=v),j?.id&&(z[j.id]=S),y?.id&&(z[y.id]=_);const H=se=>se!=null&&!$.has(se.keyId),R={fast:H(k.tiers.fast)?null:k.tiers.fast,smart:H(k.tiers.smart)?null:k.tiers.smart,thinking:H(k.tiers.thinking)?null:k.tiers.thinking,image:H(k.tiers.image)?null:k.tiers.image,web_search:H(k.tiers.web_search)?null:k.tiers.web_search,deep_research:H(k.tiers.deep_research)?null:k.tiers.deep_research},X=!R.fast||!R.smart||!R.thinking||!R.image||!R.web_search||!R.deep_research,te=R.fast===k.tiers.fast&&R.smart===k.tiers.smart&&R.thinking===k.tiers.thinking&&R.image===k.tiers.image&&R.web_search===k.tiers.web_search&&R.deep_research===k.tiers.deep_research;if(!X&&te)return;const J=Lt(i,z);r.reset({tiers:{fast:R.fast??J.chat.fast,smart:R.smart??J.chat.smart,thinking:R.thinking??J.chat.thinking,image:R.image??J.image,web_search:R.web_search??J.webSearch,deep_research:R.deep_research??J.deepResearch}},{keepDirty:!0})},e[12]=i,e[13]=r,e[14]=m,e[15]=j,e[16]=y,e[17]=v,e[18]=S,e[19]=_,e[20]=C):C=e[20];const P=m?.id,u=j?.id,I=y?.id;let b;e[21]!==i||e[22]!==r||e[23]!==v||e[24]!==S||e[25]!==_||e[26]!==P||e[27]!==u||e[28]!==I?(b=[r,i,v,S,_,P,u,I],e[21]=i,e[22]=r,e[23]=v,e[24]=S,e[25]=_,e[26]=P,e[27]=u,e[28]=I,e[29]=b):b=e[29],ee.useEffect(C,b);let w;e[30]!==t?(w=k=>({fast:t("settings.simpleModeSection.tierFast"),smart:t("settings.simpleModeSection.tierSmart"),thinking:t("settings.simpleModeSection.tierThinking"),image:t("settings.simpleModeSection.tierImage"),web_search:t("settings.simpleModeSection.tierWebSearch"),deep_research:t("settings.simpleModeSection.tierDeepResearch")})[k]||k,e[30]=t,e[31]=w):w=e[31];const U=w;let A;e[32]!==t?(A=k=>({fast:t("settings.simpleModeSection.tierFastDesc"),smart:t("settings.simpleModeSection.tierSmartDesc"),thinking:t("settings.simpleModeSection.tierThinkingDesc"),image:t("settings.simpleModeSection.tierImageDesc"),web_search:t("settings.simpleModeSection.tierWebSearchDesc"),deep_research:t("settings.simpleModeSection.tierDeepResearchDesc")})[k]||"",e[32]=t,e[33]=A):A=e[33];const D=A;let K;e[34]!==t?(K=t("settings.simpleModeSection.defaultModels"),e[34]=t,e[35]=K):K=e[35];let T;e[36]!==t?(T=t("settings.simpleModeSection.modelsPowerDescription"),e[36]=t,e[37]=T):T=e[37];let M;e[38]!==T?(M=s.jsx("p",{className:"text-sm text-muted-foreground",children:T}),e[38]=T,e[39]=M):M=e[39];const B=g&&!o;let L;e[40]!==x||e[41]!==B?(L=s.jsx(js,{isPending:x,showSaved:B}),e[40]=x,e[41]=B,e[42]=L):L=e[42];let F;e[43]!==M||e[44]!==L?(F=s.jsxs("div",{className:"flex items-center justify-between -mt-2 mb-2 px-4",children:[M,L]}),e[43]=M,e[44]=L,e[45]=F):F=e[45];let q;e[46]!==i[0]?.id||e[47]!==r.control||e[48]!==D||e[49]!==U||e[50]!==d?(q=vs.map(k=>s.jsx(St,{control:r.control,name:`tiers.${k.key}`,render:$=>{const{field:z}=$;return s.jsx(Ee,{title:U(k.key),description:D(k.key),action:s.jsx(bs,{slot:z.value,defaultKeyId:i[0]?.id??null,filterModels:k.filter,onSlotChange:H=>{z.onChange(H),d()}})})}},k.key)),e[46]=i[0]?.id,e[47]=r.control,e[48]=D,e[49]=U,e[50]=d,e[51]=q):q=e[51];let E;e[52]!==q?(E=s.jsx(oe,{children:q}),e[52]=q,e[53]=E):E=e[53];let O;return e[54]!==K||e[55]!==F||e[56]!==E?(O=s.jsxs(ce,{title:K,children:[F,E]}),e[54]=K,e[55]=F,e[56]=E,e[57]=O):O=e[57],O}function Ss(e){return e.id}const Ns={usd:[10,20,100],brl:[50,100,500]};function xt(){const e=Q.c(30),t=Z(),i=ne(),[c]=we(),[n,a]=ee.useState(!1);let l;e[0]!==t?(l=u=>{Y.error(t("settings.decoCreditsHero.topUpFailed",{message:u.message}))},e[0]=t,e[1]=l):l=e[1];const{mutate:r,isPending:f}=le({mutationFn:async u=>{const{url:I}=await i.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:u,currency:d});return I},onSuccess:Cs,onError:l}),[x,g]=ee.useState(""),[o,p]=ee.useState(c.language==="pt-BR"?"brl":"usd"),d=o,m=parseFloat(x),j=!isNaN(m)&&m>=1,y=d==="brl"?"R$":"$";let v;e[2]!==p?(v=u=>{u&&p(u)},e[2]=p,e[3]=v):v=e[3];let S,_;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Qe,{value:"usd",className:"h-8 px-3 text-sm",children:"USD"}),_=s.jsx(Qe,{value:"brl",className:"h-8 px-3 text-sm",children:"BRL"}),e[4]=S,e[5]=_):(S=e[4],_=e[5]);let N;e[6]!==d||e[7]!==v?(N=s.jsxs(Wt,{type:"single",variant:"outline",size:"sm",value:d,onValueChange:v,children:[S,_]}),e[6]=d,e[7]=v,e[8]=N):N=e[8];let h;e[9]!==d||e[10]!==y||e[11]!==n||e[12]!==f||e[13]!==t||e[14]!==r?(h=!n&&s.jsxs(s.Fragment,{children:[Ns[d].map(u=>s.jsxs(V,{variant:"outline",className:"tabular-nums",disabled:f,onClick:()=>r(u*100),children:[y,u]},u)),s.jsx(V,{variant:"ghost",className:"text-muted-foreground",onClick:()=>a(!0),disabled:f,children:t("settings.decoCreditsHero.custom")})]}),e[9]=d,e[10]=y,e[11]=n,e[12]=f,e[13]=t,e[14]=r,e[15]=h):h=e[15];let C;e[16]!==y||e[17]!==x||e[18]!==m||e[19]!==n||e[20]!==j||e[21]!==f||e[22]!==g||e[23]!==t||e[24]!==r?(C=n&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative max-w-[140px]",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:y}),s.jsx(me,{type:"number",min:"1",step:"1",placeholder:t("settings.decoCreditsHero.amountPlaceholder"),value:x,onChange:u=>g(u.target.value),size:"sm",className:"pl-7",autoFocus:!0})]}),s.jsx(V,{disabled:!j||f,onClick:()=>r(Math.round(m*100)),children:f?"...":t("settings.decoCreditsHero.add")}),s.jsx(V,{variant:"ghost",className:"text-muted-foreground",onClick:()=>{a(!1),g("")},children:t("settings.decoCreditsHero.cancel")})]}),e[16]=y,e[17]=x,e[18]=m,e[19]=n,e[20]=j,e[21]=f,e[22]=g,e[23]=t,e[24]=r,e[25]=C):C=e[25];let P;return e[26]!==N||e[27]!==h||e[28]!==C?(P=s.jsx("div",{className:"flex flex-col gap-2.5",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[N,h,C]})}),e[26]=N,e[27]=h,e[28]=C,e[29]=P):P=e[29],P}function Cs(e){e&&window.open(e,"_blank","noopener,noreferrer")}function _s(e){return e<=0?"text-destructive":e<=1?"text-warning":"text-foreground"}function Ps(e){const t=Q.c(38),{enabled:i}=e,c=Z(),{org:n}=ae(),a=ne();let l;t[0]!==n.id?(l=W.aiProviderCredits(n.id,"deco"),t[0]=n.id,t[1]=l):l=t[1];let r;t[2]!==a?(r=async()=>{try{return await a.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}},t[2]=a,t[3]=r):r=t[3];let f;t[4]!==i||t[5]!==l||t[6]!==r?(f={queryKey:l,enabled:i,staleTime:6e4,queryFn:r},t[4]=i,t[5]=l,t[6]=r,t[7]=f):f=t[7];const{data:x,isLoading:g,refetch:o,isFetching:p}=ue(f);if(!i)return null;const d=x?.balanceCents!=null?x.balanceCents/100:null;let m;t[8]!==d?(m=d!=null?`$${d.toFixed(2)}`:"—",t[8]=d,t[9]=m):m=t[9];const j=m;let y;t[10]!==d||t[11]!==j||t[12]!==p||t[13]!==g?(y=g||p?s.jsx(Ne,{className:"h-9 w-24"}):s.jsx("span",{className:re("text-3xl font-semibold tabular-nums tracking-tight",d!=null&&_s(d)),children:j}),t[10]=d,t[11]=j,t[12]=p,t[13]=g,t[14]=y):y=t[14];let v;t[15]!==o?(v=()=>o(),t[15]=o,t[16]=v):v=t[16];let S;t[17]!==c?(S=c("settings.decoCreditsHero.refreshBalance"),t[17]=c,t[18]=S):S=t[18];const _=p&&"animate-spin";let N;t[19]!==_?(N=re("size-3.5",_),t[19]=_,t[20]=N):N=t[20];let h;t[21]!==N?(h=s.jsx(De,{className:N}),t[21]=N,t[22]=h):h=t[22];let C;t[23]!==p||t[24]!==h||t[25]!==v||t[26]!==S?(C=s.jsx(V,{type:"button",variant:"ghost",size:"icon-xs",onClick:v,disabled:p,className:"text-muted-foreground hover:text-foreground","aria-label":S,children:h}),t[23]=p,t[24]=h,t[25]=v,t[26]=S,t[27]=C):C=t[27];let P;t[28]!==C||t[29]!==y?(P=s.jsxs("div",{className:"flex items-baseline gap-2",children:[y,C]}),t[28]=C,t[29]=y,t[30]=P):P=t[30];let u;t[31]!==c?(u=c("settings.decoCreditsHero.availableBalance"),t[31]=c,t[32]=u):u=t[32];let I;t[33]!==u?(I=s.jsx("p",{className:"text-xs text-muted-foreground",children:u}),t[33]=u,t[34]=I):I=t[34];let b;return t[35]!==P||t[36]!==I?(b=s.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[P,I]}),t[35]=P,t[36]=I,t[37]=b):b=t[37],b}function Is(){const e=Q.c(74),t=Z(),{org:i}=ae(),c=ne(),n=de(),a=Ke();let l;e[0]!==a?(l=a.find(ks),e[0]=a,e[1]=l):l=e[1];const r=l,f=Ue(),x=qe("credits"),[g,o]=ee.useState(!1);let p;e[2]!==r||e[3]!==c?(p=async()=>{r&&await c.call("AI_PROVIDER_KEY_DELETE",{keyId:r.id})},e[2]=r,e[3]=c,e[4]=p):p=e[4];let d;e[5]!==i||e[6]!==n||e[7]!==t?(d=()=>{n.invalidateQueries({queryKey:W.aiProviderKeys(i.id)}),n.invalidateQueries({queryKey:W.aiProviders(i.id)}),Y.success(t("settings.decoCreditsHero.disconnectSuccess")),o(!1)},e[5]=i,e[6]=n,e[7]=t,e[8]=d):d=e[8];let m;e[9]!==t?(m=H=>{Y.error(t("settings.decoCreditsHero.disconnectError",{message:H.message}))},e[9]=t,e[10]=m):m=e[10];let j;e[11]!==p||e[12]!==d||e[13]!==m?(j={mutationFn:p,onSuccess:d,onError:m},e[11]=p,e[12]=d,e[13]=m,e[14]=j):j=e[14];const{mutate:y,isPending:v}=le(j);if(!r)return null;let S;e[15]!==t?(S=t("settings.decoCreditsHero.title"),e[15]=t,e[16]=S):S=e[16];let _;e[17]!==t?(_=t("settings.decoCreditsHero.decoAiGatewayAlt"),e[17]=t,e[18]=_):_=e[18];let N;e[19]!==_?(N=s.jsx("div",{className:"flex items-center gap-3",children:s.jsx("img",{src:"/logos/deco%20logo.svg",alt:_,className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"})}),e[19]=_,e[20]=N):N=e[20];let h;e[21]===Symbol.for("react.memo_cache_sentinel")?(h=()=>o(!0),e[21]=h):h=e[21];let C;e[22]!==t?(C=t("settings.decoCreditsHero.disconnect"),e[22]=t,e[23]=C):C=e[23];let P;e[24]!==v||e[25]!==C?(P=s.jsx(V,{variant:"ghost-destructive",size:"sm",onClick:h,disabled:v,children:C}),e[24]=v,e[25]=C,e[26]=P):P=e[26];let u;e[27]!==P||e[28]!==N?(u=s.jsxs("div",{className:"flex items-center justify-between",children:[N,P]}),e[27]=P,e[28]=N,e[29]=u):u=e[29];let I;e[30]!==t?(I=t("settings.decoCreditsHero.disconnectTitle"),e[30]=t,e[31]=I):I=e[31];let b;e[32]!==I?(b=s.jsx(Te,{children:I}),e[32]=I,e[33]=b):b=e[33];let w;e[34]!==t?(w=t("settings.decoCreditsHero.disconnectDescription"),e[34]=t,e[35]=w):w=e[35];let U;e[36]!==w?(U=s.jsx(Re,{children:w}),e[36]=w,e[37]=U):U=e[37];let A;e[38]!==b||e[39]!==U?(A=s.jsxs(Oe,{children:[b,U]}),e[38]=b,e[39]=U,e[40]=A):A=e[40];let D;e[41]!==t?(D=t("settings.decoCreditsHero.cancelButton"),e[41]=t,e[42]=D):D=e[42];let K;e[43]!==D?(K=s.jsx(Me,{children:D}),e[43]=D,e[44]=K):K=e[44];let T;e[45]!==y?(T=()=>y(),e[45]=y,e[46]=T):T=e[46];let M;e[47]!==t?(M=t("settings.decoCreditsHero.disconnectButton"),e[47]=t,e[48]=M):M=e[48];let B;e[49]!==T||e[50]!==M?(B=s.jsx(Fe,{onClick:T,variant:"destructive",children:M}),e[49]=T,e[50]=M,e[51]=B):B=e[51];let L;e[52]!==K||e[53]!==B?(L=s.jsxs($e,{children:[K,B]}),e[52]=K,e[53]=B,e[54]=L):L=e[54];let F;e[55]!==A||e[56]!==L?(F=s.jsxs(Le,{children:[A,L]}),e[55]=A,e[56]=L,e[57]=F):F=e[57];let q;e[58]!==g||e[59]!==F?(q=s.jsx(Be,{open:g,onOpenChange:o,children:F}),e[58]=g,e[59]=F,e[60]=q):q=e[60];const E=!f;let O;e[61]!==E?(O=s.jsx(Ps,{enabled:E}),e[61]=E,e[62]=O):O=e[62];let k;e[63]!==x||e[64]!==t?(k=x?s.jsxs("div",{className:"pt-4 border-t border-border/60",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2.5",children:t("settings.decoCreditsHero.addCredits")}),s.jsx(xt,{})]}):null,e[63]=x,e[64]=t,e[65]=k):k=e[65];let $;e[66]!==u||e[67]!==q||e[68]!==O||e[69]!==k?($=s.jsx(oe,{children:s.jsxs("div",{className:"px-5 py-5 flex flex-col gap-5",children:[u,q,O,k]})}),e[66]=u,e[67]=q,e[68]=O,e[69]=k,e[70]=$):$=e[70];let z;return e[71]!==$||e[72]!==S?(z=s.jsx(ce,{title:S,children:$}),e[71]=$,e[72]=S,e[73]=z):z=e[73],z}function ks(e){return e.providerId==="deco"}var He="Progress",Ge=100,[ws]=Nt(He),[Us,As]=ws(He),ht=ee.forwardRef((e,t)=>{const{__scopeProgress:i,value:c=null,max:n,getValueLabel:a=Es,...l}=e;(n||n===0)&&!Ye(n)&&console.error(Ds(`${n}`,"Progress"));const r=Ye(n)?n:Ge;c!==null&&!Xe(c,r)&&console.error(Ks(`${c}`,"Progress"));const f=Xe(c,r)?c:null,x=ke(f)?a(f,r):void 0;return s.jsx(Us,{scope:i,value:f,max:r,children:s.jsx(at.div,{"aria-valuemax":r,"aria-valuemin":0,"aria-valuenow":ke(f)?f:void 0,"aria-valuetext":x,role:"progressbar","data-state":jt(f,r),"data-value":f??void 0,"data-max":r,...l,ref:t})})});ht.displayName=He;var vt="ProgressIndicator",bt=ee.forwardRef((e,t)=>{const{__scopeProgress:i,...c}=e,n=As(vt,i);return s.jsx(at.div,{"data-state":jt(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...c,ref:t})});bt.displayName=vt;function Es(e,t){return`${Math.round(e/t*100)}%`}function jt(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function ke(e){return typeof e=="number"}function Ye(e){return ke(e)&&!isNaN(e)&&e>0}function Xe(e,t){return ke(e)&&!isNaN(e)&&e<=t&&e>=0}function Ds(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Ge}\`.`}function Ks(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
2
2
|
- a positive number
|
|
3
3
|
- less than the value passed to \`max\` (or ${Ge} if no \`max\` prop is set)
|
|
4
4
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n,l as c,j as o,aU as d}from"./index-
|
|
1
|
+
import{c as n,l as c,j as o,aU as d}from"./index-CaH7O3hJ.js";const u=d("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/5 text-warning border-warning/25 [&>svg]:text-current *:data-[slot=alert-description]:text-warning/90",success:"bg-success/5 text-success border-success/25 [&>svg]:text-current *:data-[slot=alert-description]:text-success/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function x(l){const t=n.c(10);let e,r,s;t[0]!==l?({className:e,variant:s,...r}=l,t[0]=l,t[1]=e,t[2]=r,t[3]=s):(e=t[1],r=t[2],s=t[3]);let a;t[4]!==e||t[5]!==s?(a=c(u({variant:s}),e),t[4]=e,t[5]=s,t[6]=a):a=t[6];let i;return t[7]!==r||t[8]!==a?(i=o.jsx("div",{"data-slot":"alert",role:"alert",className:a,...r}),t[7]=r,t[8]=a,t[9]=i):i=t[9],i}function f(l){const t=n.c(8);let e,r;t[0]!==l?({className:e,...r}=l,t[0]=l,t[1]=e,t[2]=r):(e=t[1],r=t[2]);let s;t[3]!==e?(s=c("line-clamp-1 min-h-4 font-medium tracking-tight",e),t[3]=e,t[4]=s):s=t[4];let a;return t[5]!==r||t[6]!==s?(a=o.jsx("div",{"data-slot":"alert-title",className:s,...r}),t[5]=r,t[6]=s,t[7]=a):a=t[7],a}function v(l){const t=n.c(8);let e,r;t[0]!==l?({className:e,...r}=l,t[0]=l,t[1]=e,t[2]=r):(e=t[1],r=t[2]);let s;t[3]!==e?(s=c("text-muted-foreground leading-relaxed",e),t[3]=e,t[4]=s):s=t[4];let a;return t[5]!==r||t[6]!==s?(a=o.jsx("div",{"data-slot":"alert-description",className:s,...r}),t[5]=r,t[6]=s,t[7]=a):a=t[7],a}export{x as A,f as a,v as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r,dn as T,r as c,bE as A,dy as O,aJ as w,bH as M,dz as I,dA as z,dB as D,dC as v,dp as F,dt as L,bT as G,dD as H,dq as W,c as d,l as u,aW as x}from"./index-
|
|
1
|
+
import{j as r,dn as T,r as c,bE as A,dy as O,aJ as w,bH as M,dz as I,dA as z,dB as D,dC as v,dp as F,dt as L,bT as G,dD as H,dq as W,c as d,l as u,aW as x}from"./index-CaH7O3hJ.js";var N="AlertDialog",[q]=G(N,[v]),p=v(),y=l=>{const{__scopeAlertDialog:e,...t}=l,a=p(e);return r.jsx(T,{...a,...t,modal:!0})};y.displayName=N;var B="AlertDialogTrigger",V=c.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=p(t);return r.jsx(H,{...o,...a,ref:e})});V.displayName=B;var Y="AlertDialogPortal",_=l=>{const{__scopeAlertDialog:e,...t}=l,a=p(e);return r.jsx(F,{...a,...t})};_.displayName=Y;var k="AlertDialogOverlay",j=c.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=p(t);return r.jsx(W,{...o,...a,ref:e})});j.displayName=k;var m="AlertDialogContent",[J,K]=q(m),Q=L("AlertDialogContent"),h=c.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=p(t),i=c.useRef(null),f=A(e,i),g=c.useRef(null);return r.jsx(O,{contentName:m,titleName:E,docsSlug:"alert-dialog",children:r.jsx(J,{scope:t,cancelRef:g,children:r.jsxs(w,{role:"alertdialog",...s,...o,ref:f,onOpenAutoFocus:M(o.onOpenAutoFocus,n=>{n.preventDefault(),g.current?.focus({preventScroll:!0})}),onPointerDownOutside:n=>n.preventDefault(),onInteractOutside:n=>n.preventDefault(),children:[r.jsx(Q,{children:a}),r.jsx(X,{contentRef:i})]})})})});h.displayName=m;var E="AlertDialogTitle",b=c.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=p(t);return r.jsx(I,{...o,...a,ref:e})});b.displayName=E;var C="AlertDialogDescription",R=c.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=p(t);return r.jsx(z,{...o,...a,ref:e})});R.displayName=C;var U="AlertDialogAction",$=c.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=p(t);return r.jsx(D,{...o,...a,ref:e})});$.displayName=U;var P="AlertDialogCancel",S=c.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K(P,t),s=p(t),i=A(e,o);return r.jsx(D,{...s,...a,ref:i})});S.displayName=P;var X=({contentRef:l})=>{const e=`\`${m}\` requires a description for the component to be accessible for screen reader users.
|
|
2
2
|
|
|
3
3
|
You can add a description to the \`${m}\` by passing a \`${C}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
4
4
|
|
package/dist/client/assets/{analytics-sections-DfU-HPHE.js → analytics-sections-wgH0NLyS.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as w,j as s,b as B,er as Q,l as D,z as fe,r as Z,d as xe}from"./index-BpE9ALKU.js";import{b as q,C as J}from"./chart-CK7GPIHE.js";import{e as pe,a as he,b as W,T as ge,d as je,c as be}from"./table-B20C_A4l.js";import{i as ye}from"./AlertCircle-BKEHXsE7.js";import{i as ve,n as ke}from"./ArrowUp-DfLaoCfv.js";import{a6 as Ne,a3 as Se,at as Ce,ac as we}from"./agent-icon-rZeVl9Rl.js";import{s as $e}from"./User01-C-yKb_Na.js";import{a as ee,T as te}from"./toggle-group-DwqOZ4MY.js";import{e as se}from"./format-time-Cq80KKvY.js";import{B as Y}from"./badge-dosB_-4a.js";import{l as ne,c as Te,b as De,S as Oe}from"./config-BXEb6qjV.js";import{a as G,B as U}from"./BarChart-D0FGQ4Mg.js";import{C as H,X as P,Y as V}from"./CartesianChart-8wmktLTV.js";import{a as Ie,A as Be}from"./AreaChart-CW_cA_el.js";function le(a){const e=w.c(8),{href:t,className:d,children:o}=a,c=xe();let r;e[0]!==t||e[1]!==c?(r=n=>{!t||n.button!==0||n.metaKey||n.ctrlKey||n.shiftKey||(n.preventDefault(),c({href:t}))},e[0]=t,e[1]=c,e[2]=r):r=e[2];let l;return e[3]!==o||e[4]!==d||e[5]!==t||e[6]!==r?(l=s.jsx("a",{href:t,className:d,onClick:r,children:o}),e[3]=o,e[4]=d,e[5]=t,e[6]=r,e[7]=l):l=e[7],l}const L=(a,e,t)=>a&&e?()=>a({drill:e,label:t}):void 0,F="cursor-pointer text-left transition-colors hover:bg-accent focus-ring",E=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"],A={fontSize:11,fill:"var(--muted-foreground)",opacity:.7};function ae(a){const e=Math.abs(a);return e<60?`${Math.round(a)}s`:e<3600?`${Math.round(a/60)}m`:e<86400?`${(a/3600).toFixed(1)}h`:`${(a/86400).toFixed(1)}d`}function M(a,e){return a===null||Number.isNaN(a)?"—":e==="s"?ae(a):e==="%"?`${Math.round(a*10)/10}%`:e==="USD"?`$${a.toFixed(2)}`:a.toLocaleString()}function X(a,e){return e==="s"?ae(a):e==="%"?`${a}%`:e==="USD"?`$${a}`:a>=1e3?`${(a/1e3).toFixed(1)}k`:String(a)}const re=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/,Le=/^\d{4}-\d{2}-\d{2}$/;function Me(a,e){return typeof a=="number"?M(a,e):Le.test(a)?new Date(`${a}T12:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric"}):re.test(a)?se(a):a}function _(a){const e=w.c(20),{title:t,value:d,caption:o,aside:c,children:r,onClick:l}=a,n=l?"button":"section",i=l?"button":void 0,u=l&&F;let m;e[0]!==u?(m=D("surface flex h-full w-full flex-col gap-6 px-4 pt-4 pb-5",u),e[0]=u,e[1]=m):m=e[1];let x;e[2]!==t?(x=s.jsx("h3",{className:"text-sm text-foreground/70",children:t}),e[2]=t,e[3]=x):x=e[3];let f;e[4]!==d?(f=d!==void 0&&s.jsx("span",{className:"tnum text-4xl font-normal text-foreground",children:d}),e[4]=d,e[5]=f):f=e[5];let h;e[6]!==o||e[7]!==x||e[8]!==f?(h=s.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[x,f,o]}),e[6]=o,e[7]=x,e[8]=f,e[9]=h):h=e[9];let p;e[10]!==c||e[11]!==h?(p=s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[h,c]}),e[10]=c,e[11]=h,e[12]=p):p=e[12];let j;return e[13]!==n||e[14]!==r||e[15]!==l||e[16]!==i||e[17]!==m||e[18]!==p?(j=s.jsxs(n,{type:i,onClick:l,className:m,children:[p,r]}),e[13]=n,e[14]=r,e[15]=l,e[16]=i,e[17]=m,e[18]=p,e[19]=j):j=e[19],j}function ie(a){const e=w.c(9),{lane:t}=a,d=B();let o;e[0]!==t||e[1]!==d?(o=ne(t,d),e[0]=t,e[1]=d,e[2]=o):o=e[2];const{label:c,visual:r}=o,l=r.icon;let n;e[3]!==l||e[4]!==r.iconClassName?(n=s.jsx(l,{className:r.iconClassName}),e[3]=l,e[4]=r.iconClassName,e[5]=n):n=e[5];let i;return e[6]!==c||e[7]!==n?(i=s.jsxs(Y,{variant:"muted",children:[n,c]}),e[6]=c,e[7]=n,e[8]=i):i=e[8],i}function R(a){const e=w.c(2),{children:t}=a;let d;return e[0]!==t?(d=s.jsx("div",{className:"flex h-20 items-center justify-center text-sm text-muted-foreground",children:t}),e[0]=t,e[1]=d):d=e[1],d}function _e(a){const e=w.c(21),{value:t,previous:d,unit:o,better:c}=a,r=B();if(t===null||d===null||d===void 0){let p;e[0]!==r?(p=r("taskBoard.analytics.noPrior"),e[0]=r,e[1]=p):p=e[1];let j;return e[2]!==p?(j=s.jsx("span",{className:"text-meta",children:p}),e[2]=p,e[3]=j):j=e[3],j}const l=Math.round((t-d)*10)/10,n=c==="down"?l<0:l>0;let i;e[4]!==l||e[5]!==r||e[6]!==o?(i=o==="%"?r("taskBoard.analytics.points",{n:String(Math.abs(l))}):M(Math.abs(l),o),e[4]=l,e[5]=r,e[6]=o,e[7]=i):i=e[7];const u=i;let m;e[8]!==u||e[9]!==c||e[10]!==l||e[11]!==n||e[12]!==r?(m=l===0?r("taskBoard.analytics.unchanged"):s.jsxs("span",{className:D("inline-flex items-center gap-0.5 font-medium",c&&(n?"text-success":"text-destructive")),children:[l>0?s.jsx(ve,{size:12}):s.jsx(ke,{size:12}),u]}),e[8]=u,e[9]=c,e[10]=l,e[11]=n,e[12]=r,e[13]=m):m=e[13];let x;e[14]!==r?(x=r("taskBoard.analytics.vsPrevious"),e[14]=r,e[15]=x):x=e[15];let f;e[16]!==x?(f=s.jsx("span",{children:x}),e[16]=x,e[17]=f):f=e[17];let h;return e[18]!==m||e[19]!==f?(h=s.jsxs("span",{className:"text-meta inline-flex items-center gap-1",children:[m,f]}),e[18]=m,e[19]=f,e[20]=h):h=e[20],h}const Re={1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",5:"lg:grid-cols-5",6:"lg:grid-cols-3",9:"lg:grid-cols-3"};function Ae(a){const e=w.c(10),{section:t,onDrill:d}=a,o=Re[t.values.length]??"lg:grid-cols-4";let c;e[0]!==o?(c=D("grid grid-cols-2 gap-4",o),e[0]=o,e[1]=c):c=e[1];let r;if(e[2]!==d||e[3]!==t.values){let n;e[5]!==d?(n=i=>s.jsx(_,{title:i.label,value:M(i.value,i.unit),onClick:L(d,i.drill,i.label),caption:s.jsxs(s.Fragment,{children:[i.detail&&s.jsx("span",{className:"text-sm text-muted-foreground",children:i.detail}),i.previous!==void 0&&s.jsx(_e,{value:i.value,previous:i.previous,unit:i.unit,better:i.better})]})},i.label),e[5]=d,e[6]=n):n=e[6],r=t.values.map(n),e[2]=d,e[3]=t.values,e[4]=r}else r=e[4];let l;return e[7]!==c||e[8]!==r?(l=s.jsx("div",{className:c,children:r}),e[7]=c,e[8]=r,e[9]=l):l=e[9],l}function Ke(a){return Array.from(new Set(a.flatMap(e=>Object.keys(e)))).filter(e=>e!=="t").sort()}function Ee(a,e){const t=e.filter(d=>a.some(o=>typeof o[d]=="number"&&o[d]!==0));return t.length>0?t:e}function Fe(a,e,t){const d=new Map(a.map(l=>[String(l.t??"").slice(0,10),l])),o=new Date(`${t.from.slice(0,10)}T00:00:00.000Z`),c=t.to.slice(0,10),r=[];for(;o.toISOString().slice(0,10)<=c;){const l=o.toISOString().slice(0,10);r.push(d.get(l)??{t:o.toISOString(),...Object.fromEntries(e.map(n=>[n,0]))}),o.setUTCDate(o.getUTCDate()+1)}return r}function oe(a){const e=w.c(17),{active:t,payload:d,unit:o,nameOf:c}=a,r=c===void 0?String:c;if(!t||!d?.length)return null;const l=d[0]?.payload,n=l?.t;let i;e[0]!==l?.label||e[1]!==n?(i=typeof n=="string"?new Date(n).toLocaleDateString(void 0,{month:"short",day:"numeric"}):String(l?.label??""),e[0]=l?.label,e[1]=n,e[2]=i):i=e[2];let u;e[3]!==i?(u=s.jsx("div",{className:"mb-1 text-xs text-muted-foreground",children:i}),e[3]=i,e[4]=u):u=e[4];let m;if(e[5]!==r||e[6]!==d||e[7]!==o){let h;e[9]!==r||e[10]!==o?(h=p=>s.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[s.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:p.color}}),s.jsx("span",{className:"text-muted-foreground",children:r(String(p.dataKey))}),s.jsx("span",{className:"tnum ml-auto pl-3 font-medium",children:M(typeof p.value=="number"?p.value:null,o)})]},String(p.dataKey)),e[9]=r,e[10]=o,e[11]=h):h=e[11],m=d.map(h),e[5]=r,e[6]=d,e[7]=o,e[8]=m}else m=e[8];let x;e[12]!==m?(x=s.jsx("div",{className:"flex flex-col gap-1",children:m}),e[12]=m,e[13]=x):x=e[13];let f;return e[14]!==u||e[15]!==x?(f=s.jsxs("div",{className:"rounded-lg bg-popover px-3 py-2 shadow-soft",children:[u,x]}),e[14]=u,e[15]=x,e[16]=f):f=e[16],f}function ze(a){const e=w.c(27),{section:t,range:d}=a,o=B(),c=t.unit??void 0,r=c!=="%"&&c!=="s";let l;if(e[0]!==r||e[1]!==d||e[2]!==t.points||e[3]!==t.title||e[4]!==o||e[5]!==c){const n=Ke(t.points),i=r?Ee(t.points,n):n,u=y=>E[n.indexOf(y)%E.length],m=Object.fromEntries(i.map(y=>[y,{label:y,color:u(y)}])),f=(r&&d?Fe(t.points,n,d):t.points).map(Ge);let h;if(e[7]!==t.title){let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=/\W+/g,e[9]=y):y=e[9],h=t.title.replace(y,"-"),e[7]=t.title,e[8]=h}else h=e[8];const p=`analytics-${h}`;let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),e[10]=j):j=e[10];const v=j;let k;e[11]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(P,{dataKey:"label",axisLine:!1,tickLine:!1,tick:A,minTickGap:24,tickMargin:8}),e[11]=k):k=e[11];const b=k;let $;e[12]!==c?($=c==="%"?[0,100]:[0,"auto"],e[12]=c,e[13]=$):$=e[13];const S=c!==void 0;let g;e[14]!==c?(g=y=>X(y,c),e[14]=c,e[15]=g):g=e[15];let C;e[16]!==$||e[17]!==S||e[18]!==g?(C=s.jsx(V,{orientation:"right",axisLine:!1,tickLine:!1,tick:A,domain:$,allowDecimals:S,tickFormatter:g,width:48,tickCount:5}),e[16]=$,e[17]=S,e[18]=g,e[19]=C):C=e[19];const O=C;let T;e[20]!==r?(T=r?{fill:"var(--muted)",opacity:.4}:{stroke:"var(--border)",strokeDasharray:"4 4"},e[20]=r,e[21]=T):T=e[21];let I;e[22]!==c?(I=y=>{const{active:z,payload:me}=y;return s.jsx(oe,{active:z,payload:me,unit:c})},e[22]=c,e[23]=I):I=e[23];let N;e[24]!==I||e[25]!==T?(N=s.jsx(J,{cursor:T,content:I}),e[24]=I,e[25]=T,e[26]=N):N=e[26];const K=N;l=s.jsx(_,{title:t.title,aside:i.length>1&&s.jsx("ul",{className:"flex flex-wrap justify-end gap-x-3 gap-y-1",children:i.map(y=>s.jsxs("li",{className:"text-meta flex items-center gap-1.5",children:[s.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:u(y)}}),y]},y))}),children:f.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx(q,{role:"img","aria-label":t.title,className:"h-[140px] w-full md:h-[180px]",config:m,children:r?s.jsxs(G,{data:f,margin:{left:0,right:0,top:8},children:[v,b,O,K,i.map((y,z)=>s.jsx(U,{dataKey:y,stackId:"day",fill:u(y),maxBarSize:24,radius:z===i.length-1?[4,4,0,0]:0,animationDuration:300},y))]}):s.jsxs(Ie,{data:f,margin:{left:0,right:0,top:8},children:[i.length===1&&s.jsx("defs",{children:s.jsxs("linearGradient",{id:p,x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:u(i[0]??""),stopOpacity:.2}),s.jsx("stop",{offset:"100%",stopColor:u(i[0]??""),stopOpacity:0})]})}),v,b,O,K,i.map(y=>s.jsx(Be,{type:"linear",dataKey:y,stroke:u(y),strokeWidth:2,fill:i.length===1?`url(#${p})`:"none",dot:f.length===1?{r:4}:!1,activeDot:{r:4,stroke:"var(--background)",strokeWidth:2},connectNulls:!0,animationDuration:300},y))]})})}),e[0]=r,e[1]=d,e[2]=t.points,e[3]=t.title,e[4]=o,e[5]=c,e[6]=l}else l=e[6];return l}function Ge(a){return{...a,label:new Date(String(a.t??"")).toLocaleDateString(void 0,{month:"short",day:"numeric"})}}function ce(a){const e=w.c(25),{label:t,note:d,share:o,value:c,fill:r,color:l,onClick:n}=a,i=n?"button":"div",u=n?"button":void 0;let m;e[0]!==n?(m=n&&D(F,"-mx-2 w-[calc(100%+1rem)] rounded-md px-2"),e[0]=n,e[1]=m):m=e[1];let x;e[2]!==m?(x=D("flex h-10 w-full items-center gap-3",m),e[2]=m,e[3]=x):x=e[3];let f;e[4]!==d?(f=d&&s.jsx("span",{className:"text-meta ml-2",children:d}),e[4]=d,e[5]=f):f=e[5];let h;e[6]!==t||e[7]!==f?(h=s.jsxs("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:[t,f]}),e[6]=t,e[7]=f,e[8]=h):h=e[8];const p=`${Math.max(0,Math.min(100,r))}%`;let j;e[9]!==l||e[10]!==p?(j=s.jsx("span",{className:"h-1.5 w-20 shrink-0 overflow-hidden rounded-full bg-muted",children:s.jsx("span",{className:"block h-full rounded-full",style:{width:p,backgroundColor:l}})}),e[9]=l,e[10]=p,e[11]=j):j=e[11];let v;e[12]!==o?(v=o!==void 0&&s.jsx("span",{className:"tnum w-16 shrink-0 text-right text-sm text-foreground/40",children:o}),e[12]=o,e[13]=v):v=e[13];let k;e[14]!==c?(k=s.jsx("span",{className:"tnum w-8 shrink-0 text-right text-sm text-foreground",children:c}),e[14]=c,e[15]=k):k=e[15];let b;return e[16]!==i||e[17]!==n||e[18]!==u||e[19]!==x||e[20]!==h||e[21]!==j||e[22]!==v||e[23]!==k?(b=s.jsx("li",{className:"border-b border-border/50 last:border-b-0",children:s.jsxs(i,{type:u,onClick:n,className:x,children:[h,j,v,k]})}),e[16]=i,e[17]=n,e[18]=u,e[19]=x,e[20]=h,e[21]=j,e[22]=v,e[23]=k,e[24]=b):b=e[24],b}function Ue(a){const e=w.c(17),{section:t,onDrill:d}=a,o=B(),c=t.stages[0]?.value??0,r=t.stages.at(-1)?.value??0;let l;e[0]!==r||e[1]!==c?(l=c?`${Math.round(100*r/c)}%`:"—",e[0]=r,e[1]=c,e[2]=l):l=e[2];let n;e[3]!==r||e[4]!==c||e[5]!==o?(n=c>0&&s.jsx("span",{className:"text-meta",children:o("taskBoard.analytics.funnelCaption",{end:String(r),start:String(c)})}),e[3]=r,e[4]=c,e[5]=o,e[6]=n):n=e[6];let i;e[7]!==d||e[8]!==t.stages||e[9]!==c||e[10]!==o?(i=c===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx("ol",{className:"flex flex-col",children:t.stages.map((m,x)=>{const f=t.stages[x-1]?.value,h=f===void 0?0:f-m.value;return s.jsx(ce,{label:m.label,note:h>0?o("taskBoard.analytics.dropped",{n:String(h)}):void 0,share:`${Math.round(100*m.value/c)}%`,value:m.value.toLocaleString(),fill:100*m.value/c,color:"var(--chart-2)",onClick:L(d,m.drill,m.label)},m.label)})}),e[7]=d,e[8]=t.stages,e[9]=c,e[10]=o,e[11]=i):i=e[11];let u;return e[12]!==t.title||e[13]!==l||e[14]!==n||e[15]!==i?(u=s.jsx(_,{title:t.title,value:l,caption:n,children:i}),e[12]=t.title,e[13]=l,e[14]=n,e[15]=i,e[16]=u):u=e[16],u}function He(a){const e=w.c(19),{section:t,onDrill:d}=a,o=B();let c;e[0]!==t.bars?(c=Math.max(0,...t.bars.map(Pe)),e[0]=t.bars,e[1]=c):c=e[1];const r=c;let l;e[2]!==t.total?.value?(l=t.total?.value.toLocaleString(),e[2]=t.total?.value,e[3]=l):l=e[3];let n;e[4]!==t.total?(n=t.total&&s.jsx("span",{className:"text-meta",children:t.total.label}),e[4]=t.total,e[5]=n):n=e[5];let i;e[6]!==t.unit?(i=t.unit&&s.jsx("span",{className:"text-meta",children:t.unit}),e[6]=t.unit,e[7]=i):i=e[7];let u;e[8]!==r||e[9]!==d||e[10]!==t.bars||e[11]!==o?(u=t.bars.length===0?s.jsx(R,{children:o("taskBoard.analytics.nobodyStepped")}):s.jsx("ul",{className:"flex flex-col",children:t.bars.map(x=>s.jsx(ce,{label:x.label,note:x.note,share:x.detail,value:x.value.toLocaleString(),fill:r?100*x.value/r:0,color:"var(--chart-1)",onClick:L(d,x.drill,x.label)},x.label))}),e[8]=r,e[9]=d,e[10]=t.bars,e[11]=o,e[12]=u):u=e[12];let m;return e[13]!==t.title||e[14]!==l||e[15]!==n||e[16]!==i||e[17]!==u?(m=s.jsx(_,{title:t.title,value:l,caption:n,aside:i,children:u}),e[13]=t.title,e[14]=l,e[15]=n,e[16]=i,e[17]=u,e[18]=m):m=e[18],m}function Pe(a){return a.value}function Ve(a,e){return`/${encodeURIComponent(a)}/${encodeURIComponent(e)}`}const Xe=new Set(["Org ID","Task ID"]),Ye=new Set(["Run outcome","Failure kind","Moved in by","State"]),Qe=new Set(["Error","Signature"]),We=new Set(["Org","Orgs"]);function Ze(a){const e=w.c(32),{section:t,threadLinks:d,showOrg:o,taskHref:c,onDrill:r}=a,l=B(),n=t.columns.indexOf("Org");let i;e[0]!==n||e[1]!==t.columns||e[2]!==d?(i=d&&n>=0?t.columns.indexOf("Thread"):-1,e[0]=n,e[1]=t.columns,e[2]=d,e[3]=i):i=e[3];const u=i,m=t.columns.indexOf("Task ID");let x;e[4]!==t.columns||e[5]!==c||e[6]!==m?(x=c&&m>=0?t.columns.indexOf("Task"):-1,e[4]=t.columns,e[5]=c,e[6]=m,e[7]=x):x=e[7];const f=x,h=t.columns;let p,j;if(e[8]!==r||e[9]!==n||e[10]!==t.columns||e[11]!==t.drills||e[12]!==t.rows||e[13]!==t.title||e[14]!==t.units||e[15]!==o||e[16]!==l||e[17]!==f||e[18]!==c||e[19]!==m||e[20]!==u){j=Symbol.for("react.early_return_sentinel");e:{let v;e[23]!==o?(v=S=>{const{c:g}=S;return!Xe.has(g)&&(o!==!1||!We.has(g))},e[23]=o,e[24]=v):v=e[24];const k=h.map(st).filter(v).sort(tt);let b;e[25]!==t.rows?(b=S=>{const{j:g}=S,C=t.rows.map(O=>O[g]).filter(et);return C.length>0&&C.every(Je)},e[25]=t.rows,e[26]=b):b=e[26];const $=new Set(k.filter(b).map(qe));if(t.rows.length===1&&k.every(S=>{const{c:g}=S;return $.has(g)})){let S;e[27]!==t.rows[0]?(S=t.rows[0]??[],e[27]=t.rows[0],e[28]=S):S=e[28];const g=S;let C;e[29]!==g||e[30]!==t.units?(C=O=>{const{c:T,j:I}=O,N=g[I];return s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("dt",{className:"text-meta",children:T}),s.jsx("dd",{className:"tnum text-2xl text-foreground",children:typeof N=="number"?M(N,t.units?.[T]):"—"})]},T)},e[29]=g,e[30]=t.units,e[31]=C):C=e[31],j=s.jsx(Q,{title:t.title,children:s.jsx("dl",{className:"surface grid px-4 pt-4 pb-5 grid-cols-2 gap-x-6 gap-y-4 sm:grid-cols-3 lg:grid-cols-[repeat(auto-fill,minmax(120px,1fr))]",children:k.map(C)})});break e}p=s.jsx(Q,{title:t.title,children:t.rows.length===0?s.jsx("p",{className:"surface px-4 py-4 text-sm text-muted-foreground",children:l("taskBoard.analytics.nothingToShow")}):s.jsx("div",{className:"surface max-h-[480px] overflow-auto",children:s.jsxs(pe,{variant:"flush",children:[s.jsx(he,{children:s.jsx(W,{children:k.map(S=>{const{c:g}=S;return s.jsx(ge,{className:D("whitespace-nowrap first:pl-4 last:pr-4",$.has(g)&&"text-right"),children:g==="Thread"?"":g},g)})})}),s.jsx(je,{children:t.rows.map((S,g)=>s.jsx(W,{children:k.map((C,O)=>{const{c:T,j:I}=C,N=S[I],K=f===I?S[m]:null,y=O===0?L(r,t.drills?.[g]??void 0,String(N??"")):void 0;return s.jsx(be,{className:D("max-w-md truncate text-sm first:pl-4 last:pr-4",$.has(T)&&"text-right"),children:N==null?s.jsx("span",{className:"text-muted-foreground",children:"—"}):I===u?s.jsxs("a",{href:Ve(String(S[n]),String(N)),target:"_blank",rel:"noreferrer",className:"focus-ring inline-flex items-center gap-1 text-muted-foreground underline-offset-2 hover:text-foreground hover:underline",children:[l("taskBoard.analytics.openChat"),s.jsx(fe,{size:12})]}):y?s.jsx("button",{type:"button",onClick:y,className:"focus-ring text-left text-foreground underline-offset-2 hover:underline",children:String(N)}):K?s.jsx(le,{href:c?.(String(K)),className:"focus-ring text-foreground underline-offset-2 hover:underline",children:String(N)}):T==="Lane"&&typeof N=="string"?s.jsx(ie,{lane:N}):T==="Priority"&&typeof N=="string"?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(de,{drill:`priority:${N.toLowerCase()}`}),N]}):Ye.has(T)?s.jsx(Y,{variant:"muted",children:String(N)}):Qe.has(T)?s.jsx("span",{title:String(N),className:"font-mono text-xs text-muted-foreground",children:String(N)}):s.jsx("span",{className:D("tnum",typeof N=="string"&&re.test(N)&&"text-muted-foreground"),children:Me(N,t.units?.[T])})},T)})},`${t.title}-${g}`))})]})})})}e[8]=r,e[9]=n,e[10]=t.columns,e[11]=t.drills,e[12]=t.rows,e[13]=t.title,e[14]=t.units,e[15]=o,e[16]=l,e[17]=f,e[18]=c,e[19]=m,e[20]=u,e[21]=p,e[22]=j}else p=e[21],j=e[22];return j!==Symbol.for("react.early_return_sentinel")?j:p}function qe(a){const{c:e}=a;return e}function Je(a){return typeof a=="number"}function et(a){return a!==null}function tt(a,e){return+(e.c==="Task")-+(a.c==="Task")}function st(a,e){return{c:a,j:e}}function Ot(a){const e=w.c(17),{section:t,taskHref:d}=a,o=B();let c;e[0]!==t.columns?(c=i=>t.columns.indexOf(i),e[0]=t.columns,e[1]=c):c=e[1];const r=c;if(t.rows.length===0){let i;e[2]!==o?(i=o("taskBoard.analytics.nothingToShow"),e[2]=o,e[3]=i):i=e[3];let u;return e[4]!==i?(u=s.jsx(R,{children:i}),e[4]=i,e[5]=u):u=e[5],u}let l;if(e[6]!==r||e[7]!==t.rows||e[8]!==o||e[9]!==d){let i;e[11]!==r||e[12]!==o||e[13]!==d?(i=u=>{const m=String(u[r("Task ID")]??""),x=u[r("Lane")],f=u[r("Picked up")],h=Number(u[r("Actions by people")]??0),p=Number(u[r("Failed QA")]??0),j=[typeof f=="string"?se(f):null,h>0&&o(h===1?"taskBoard.analytics.humanActionsOne":"taskBoard.analytics.humanActions",{n:String(h)})].filter(Boolean),v=s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[s.jsx("span",{className:"truncate text-sm text-foreground",children:String(u[r("Task")]??"")}),s.jsx("span",{className:"text-meta truncate",children:j.join(" · ")})]}),p>0&&s.jsxs(Y,{variant:"muted",children:[s.jsx(ye,{className:"text-destructive"}),p===1?o("taskBoard.analytics.failedQa"):o("taskBoard.analytics.failedQaTimes",{n:String(p)})]}),typeof x=="string"&&s.jsx(ie,{lane:x})]});return s.jsx("li",{className:"border-b border-border/50 last:border-b-0",children:d?s.jsx(le,{href:d(m),className:D(F,"flex items-center gap-3 rounded-md p-2"),children:v}):s.jsx("div",{className:"flex items-center gap-3 p-2",children:v})},m)},e[11]=r,e[12]=o,e[13]=d,e[14]=i):i=e[14],l=t.rows.map(i),e[6]=r,e[7]=t.rows,e[8]=o,e[9]=d,e[10]=l}else l=e[10];let n;return e[15]!==l?(n=s.jsx("ul",{className:"flex flex-col",children:l}),e[15]=l,e[16]=n):n=e[16],n}const nt={Type:we,Priority:Ce,Tag:Se,Sprint:Ne,"Brief by":$e};function de(a){const e=w.c(10),{drill:t}=a;let d;e[0]!==t?(d=(t??"").split("&")[0]?.split(":")??[],e[0]=t,e[1]=d):d=e[1];const[o,c]=d;let r,l,n;if(e[2]!==o||e[3]!==c){n=Symbol.for("react.early_return_sentinel");e:{const u=o==="type"?Object.entries(Te).find(x=>{const[f]=x;return f===c})?.[1]:o==="priority"?Object.entries(De).find(x=>{const[f]=x;return f===c})?.[1]:void 0;if(!u){n=null;break e}r=u.icon,l=D("size-3.5 shrink-0",u.iconClassName)}e[2]=o,e[3]=c,e[4]=r,e[5]=l,e[6]=n}else r=e[4],l=e[5],n=e[6];if(n!==Symbol.for("react.early_return_sentinel"))return n;let i;return e[7]!==r||e[8]!==l?(i=s.jsx(r,{className:l}),e[7]=r,e[8]=l,e[9]=i):i=e[9],i}function lt(a){const e=w.c(11),{value:t,metric:d,color:o}=a,c=t??0,r=`${d.unit==="%"?Math.min(100,c):0}%`;let l;e[0]!==o||e[1]!==r?(l=s.jsx("span",{className:"h-1.5 min-w-0 flex-1 overflow-hidden rounded-full bg-muted",children:s.jsx("span",{className:"block h-full rounded-full",style:{width:r,backgroundColor:o}})}),e[0]=o,e[1]=r,e[2]=l):l=e[2];const n=t??null;let i;e[3]!==d.unit||e[4]!==n?(i=M(n,d.unit),e[3]=d.unit,e[4]=n,e[5]=i):i=e[5];let u;e[6]!==i?(u=s.jsx("span",{className:"tnum w-12 shrink-0 text-right text-sm text-foreground",children:i}),e[6]=i,e[7]=u):u=e[7];let m;return e[8]!==l||e[9]!==u?(m=s.jsxs("span",{className:"flex items-center gap-2",children:[l,u]}),e[8]=l,e[9]=u,e[10]=m):m=e[10],m}function at(a){const e=w.c(16),{section:t,onDrill:d}=a,o=B(),[c,r]=Z.useState(t.dimensions[0]?.label??"");let l;e[0]!==c||e[1]!==t.dimensions?(l=t.dimensions.find(f=>f.label===c)??t.dimensions[0],e[0]=c,e[1]=t.dimensions,e[2]=l):l=e[2];const n=l,i=`minmax(0,1fr) 56px repeat(${t.metrics.length}, minmax(96px, 168px))`;let u;e[3]!==n?.label||e[4]!==t.dimensions?(u=t.dimensions.length>1&&s.jsx(ee,{type:"single",variant:"segmented",size:"sm",value:n?.label??"",onValueChange:f=>f&&r(f),children:t.dimensions.map(it)}),e[3]=n?.label,e[4]=t.dimensions,e[5]=u):u=e[5];let m;e[6]!==i||e[7]!==n||e[8]!==d||e[9]!==t.metrics||e[10]!==o?(m=!n||n.rows.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("div",{className:"text-meta grid items-center gap-4 border-b border-border/50 pb-2",style:{gridTemplateColumns:i},children:[s.jsx("span",{children:n.label}),s.jsx("span",{className:"text-right",children:o("taskBoard.analytics.tasks")}),t.metrics.map(rt)]}),n.rows.map(f=>{const h=L(d,f.drill,f.label),p=h?"button":"div";return s.jsxs(p,{type:h?"button":void 0,onClick:h,className:D("grid h-11 items-center gap-4 border-b border-border/50 last:border-b-0",h&&D(F,"-mx-2 w-[calc(100%+1rem)] rounded-md px-2")),style:{gridTemplateColumns:i},children:[s.jsxs("span",{className:"flex min-w-0 items-center gap-2 text-sm text-foreground",children:[s.jsx(de,{drill:f.drill}),s.jsx("span",{className:"truncate",children:f.label})]}),s.jsx("span",{className:"tnum text-right text-sm text-muted-foreground",children:f.count.toLocaleString()}),t.metrics.map(j=>s.jsx(lt,{value:f.values[j.key],metric:j,color:j.better==="up"?"var(--success)":"var(--destructive)"},j.key))]},f.label)})]}),e[6]=i,e[7]=n,e[8]=d,e[9]=t.metrics,e[10]=o,e[11]=m):m=e[11];let x;return e[12]!==t.title||e[13]!==u||e[14]!==m?(x=s.jsx(_,{title:t.title,aside:u,children:m}),e[12]=t.title,e[13]=u,e[14]=m,e[15]=x):x=e[15],x}function rt(a){return s.jsx("span",{className:"text-right",children:a.label},a.key)}function it(a){const e=nt[a.label];return s.jsxs(te,{value:a.label,children:[e&&s.jsx(e,{}),a.label]},a.label)}const ue=3;function ot(a){const e=w.c(26),{section:t,onDrill:d}=a,o=B(),[c,r]=Z.useState(t.metrics[0]?.key??"");let l;e[0]!==c||e[1]!==t.metrics?(l=t.metrics.find(b=>b.key===c)??t.metrics[0],e[0]=c,e[1]=t.metrics,e[2]=l):l=e[2];const n=l;if(!n)return null;const i=n.better==="up"?"var(--success)":"var(--destructive)";let u;e[3]!==t.cols||e[4]!==t.rows?(u=t.rows.length===t.cols.length&&t.rows.every((b,$)=>t.cols[$]===b),e[3]=t.cols,e[4]=t.rows,e[5]=u):u=e[5];const m=u,x=`minmax(96px, 1fr) repeat(${t.cols.length}, minmax(72px, 1fr))`,f=t.title;let h;e[6]!==o?(h=o("taskBoard.analytics.matrixCaption",{n:String(ue)}),e[6]=o,e[7]=h):h=e[7];let p;e[8]!==h?(p=s.jsx("span",{className:"text-meta",children:h}),e[8]=h,e[9]=p):p=e[9];let j;e[10]!==n.key||e[11]!==t.metrics?(j=t.metrics.length>1&&s.jsx(ee,{type:"single",variant:"segmented",size:"sm",value:n.key,onValueChange:b=>b&&r(b),children:t.metrics.map(dt)}),e[10]=n.key,e[11]=t.metrics,e[12]=j):j=e[12];let v;e[13]!==x||e[14]!==n||e[15]!==d||e[16]!==t||e[17]!==m||e[18]!==o||e[19]!==i?(v=t.rows.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("div",{className:"grid min-w-fit gap-1",style:{gridTemplateColumns:x},children:[s.jsxs("span",{className:"text-meta self-end pb-1",children:[t.rowLabel," / ",t.colLabel]}),t.cols.map(ct),t.rows.map((b,$)=>s.jsx(ut,{row:b,section:t,metric:n,tint:i,onDrill:d,upTo:m?$:void 0},b))]})}),e[13]=x,e[14]=n,e[15]=d,e[16]=t,e[17]=m,e[18]=o,e[19]=i,e[20]=v):v=e[20];let k;return e[21]!==t.title||e[22]!==p||e[23]!==j||e[24]!==v?(k=s.jsx(_,{title:f,caption:p,aside:j,children:v}),e[21]=t.title,e[22]=p,e[23]=j,e[24]=v,e[25]=k):k=e[25],k}function ct(a){return s.jsx("span",{className:"text-meta self-end pb-1 text-center",children:a},a)}function dt(a){return s.jsx(te,{value:a.key,children:a.label},a.key)}function ut(a){const e=w.c(22),{row:t,section:d,metric:o,tint:c,onDrill:r,upTo:l}=a,n=B();let i;e[0]!==t?(i=s.jsx("span",{className:"flex items-center truncate pr-2 text-sm text-foreground",children:t}),e[0]=t,e[1]=i):i=e[1];let u;if(e[2]!==o||e[3]!==r||e[4]!==t||e[5]!==d.cells||e[6]!==d.cols||e[7]!==n||e[8]!==c||e[9]!==l){let x;e[11]!==o||e[12]!==r||e[13]!==t||e[14]!==d.cells||e[15]!==n||e[16]!==c||e[17]!==l?(x=(f,h)=>{if(l!==void 0&&h>l)return s.jsx("span",{},f);const p=d.cells.find(b=>b.row===t&&b.col===f),j=p?.values[o.key]??null;if(!p)return s.jsx("span",{className:"flex h-14 items-center justify-center rounded-md bg-muted/40 text-sm text-muted-foreground",children:"—"},f);const v=j===null?0:Math.min(100,o.unit==="%"?j:0),k=L(r,p.drill,t===f?t:`${t} · ${f}`);return s.jsxs("button",{type:"button",onClick:k,disabled:!k,className:D("flex h-14 flex-col items-center justify-center rounded-md transition-opacity focus-ring",k&&"cursor-pointer hover:opacity-80",p.count<ue&&"opacity-50"),style:{backgroundColor:`color-mix(in oklch, ${c} ${Math.round(8+v*.5)}%, var(--muted))`},children:[s.jsx("span",{className:"tnum text-sm font-medium text-foreground",children:M(j,o.unit)}),s.jsx("span",{className:"text-meta",children:p.count===1?n("taskBoard.analytics.drillCountOne"):n("taskBoard.analytics.drillCount",{n:String(p.count)})})]},f)},e[11]=o,e[12]=r,e[13]=t,e[14]=d.cells,e[15]=n,e[16]=c,e[17]=l,e[18]=x):x=e[18],u=d.cols.map(x),e[2]=o,e[3]=r,e[4]=t,e[5]=d.cells,e[6]=d.cols,e[7]=n,e[8]=c,e[9]=l,e[10]=u}else u=e[10];let m;return e[19]!==i||e[20]!==u?(m=s.jsxs(s.Fragment,{children:[i,u]}),e[19]=i,e[20]=u,e[21]=m):m=e[21],m}function mt(){const a=w.c(2),e=B();let t;return a[0]!==e?(t=d=>Object.hasOwn(Oe,d)?ne(d,e).label:d,a[0]=e,a[1]=t):t=a[1],t}function ft(a){const e=w.c(21),{section:t,onDrill:d}=a,o=B(),c=mt(),r=t.unit??void 0,l=t.layout==="stacked";let n;if(e[0]!==c||e[1]!==d||e[2]!==t.baseline||e[3]!==t.categories||e[4]!==t.keys||e[5]!==t.title||e[6]!==l||e[7]!==o||e[8]!==r){let i;e[10]!==t.baseline?(i=g=>g!==t.baseline,e[10]=t.baseline,e[11]=i):i=e[11];const u=t.keys.filter(i),m=g=>g===t.baseline?"var(--border)":E[u.indexOf(g)%E.length]??"",x=Object.fromEntries(t.keys.map(g=>[g,{label:c(g),color:m(g)}]));let f;e[12]!==t.categories?(f=t.categories.map(pt),e[12]=t.categories,e[13]=f):f=e[13];const h=f;let p;e[14]!==d||e[15]!==t.categories?(p=g=>{const C=t.categories[g];C&&L(d,C.drill,C.label)?.()},e[14]=d,e[15]=t.categories,e[16]=p):p=e[16];const j=p,v=t.categories.some(xt)&&!!d,k=l?Math.max(120,t.categories.length*44+32):220;let b;e[17]===Symbol.for("react.memo_cache_sentinel")?(b={fill:"var(--muted)",opacity:.4},e[17]=b):b=e[17];let $;e[18]!==c||e[19]!==r?($=s.jsx(J,{cursor:b,content:g=>{const{active:C,payload:O}=g;return s.jsx(oe,{active:C,payload:O,unit:r,nameOf:c})}}),e[18]=c,e[19]=r,e[20]=$):$=e[20];const S=$;n=s.jsx(_,{title:t.title,aside:s.jsx("ul",{className:"flex flex-wrap justify-end gap-x-3 gap-y-1",children:t.keys.map(g=>s.jsxs("li",{className:"text-meta flex items-center gap-1.5",children:[s.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:m(g)}}),c(g)]},g))}),children:h.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx(q,{role:"img","aria-label":t.title,className:"w-full",style:{height:k},config:x,children:l?s.jsxs(G,{data:h,layout:"vertical",margin:{left:0,right:8,top:0},children:[s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,horizontal:!1}),s.jsx(P,{type:"number",axisLine:!1,tickLine:!1,tick:A,tickFormatter:g=>X(g,r)}),s.jsx(V,{type:"category",dataKey:"label",axisLine:!1,tickLine:!1,tick:A,width:72}),S,t.keys.map((g,C)=>s.jsx(U,{dataKey:g,stackId:"all",fill:m(g),maxBarSize:22,radius:C===t.keys.length-1?[0,4,4,0]:0,animationDuration:300},g))]}):s.jsxs(G,{data:h,margin:{left:0,right:0,top:8},barGap:4,barCategoryGap:"28%",children:[s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),s.jsx(P,{dataKey:"label",axisLine:!1,tickLine:!1,tick:A,tickMargin:8}),s.jsx(V,{orientation:"right",axisLine:!1,tickLine:!1,tick:A,allowDecimals:r!==void 0,tickFormatter:g=>X(g,r),width:48}),S,t.keys.map(g=>s.jsx(U,{dataKey:g,fill:m(g),maxBarSize:32,radius:[4,4,0,0],animationDuration:300,className:D(v&&"cursor-pointer"),onClick:(C,O)=>j(O)},g))]})})}),e[0]=c,e[1]=d,e[2]=t.baseline,e[3]=t.categories,e[4]=t.keys,e[5]=t.title,e[6]=l,e[7]=o,e[8]=r,e[9]=n}else n=e[9];return n}function xt(a){return a.drill}function pt(a){return{label:a.label,...a.values}}function It(a){return a.kind==="funnel"||a.kind==="bars"?"half":"full"}function Bt(a){const e=w.c(27),{section:t,threadLinks:d,showOrg:o,taskHref:c,range:r,onDrill:l}=a;switch(t.kind){case"stat":{let n;return e[0]!==l||e[1]!==t?(n=s.jsx(Ae,{section:t,onDrill:l}),e[0]=l,e[1]=t,e[2]=n):n=e[2],n}case"series":{let n;return e[3]!==r||e[4]!==t?(n=s.jsx(ze,{section:t,range:r}),e[3]=r,e[4]=t,e[5]=n):n=e[5],n}case"funnel":{let n;return e[6]!==l||e[7]!==t?(n=s.jsx(Ue,{section:t,onDrill:l}),e[6]=l,e[7]=t,e[8]=n):n=e[8],n}case"bars":{let n;return e[9]!==l||e[10]!==t?(n=s.jsx(He,{section:t,onDrill:l}),e[9]=l,e[10]=t,e[11]=n):n=e[11],n}case"breakdown":{let n;return e[12]!==l||e[13]!==t?(n=s.jsx(at,{section:t,onDrill:l}),e[12]=l,e[13]=t,e[14]=n):n=e[14],n}case"matrix":{let n;return e[15]!==l||e[16]!==t?(n=s.jsx(ot,{section:t,onDrill:l}),e[15]=l,e[16]=t,e[17]=n):n=e[17],n}case"categories":{let n;return e[18]!==l||e[19]!==t?(n=s.jsx(ft,{section:t,onDrill:l}),e[18]=l,e[19]=t,e[20]=n):n=e[20],n}case"table":{let n;return e[21]!==l||e[22]!==t||e[23]!==o||e[24]!==c||e[25]!==d?(n=s.jsx(Ze,{section:t,threadLinks:d,showOrg:o,taskHref:c,onDrill:l}),e[21]=l,e[22]=t,e[23]=o,e[24]=c,e[25]=d,e[26]=n):n=e[26],n}default:return t}}export{Ot as D,Bt as S,It as s};
|
|
1
|
+
import{c as w,j as s,b as B,er as Q,l as D,z as fe,r as Z,d as xe}from"./index-CaH7O3hJ.js";import{b as q,C as J}from"./chart-B5vy2nis.js";import{e as pe,a as he,b as W,T as ge,d as je,c as be}from"./table-BQLxO2Sb.js";import{i as ye}from"./AlertCircle-Ctbquk5a.js";import{i as ve,n as ke}from"./ArrowUp-bYg1aEOe.js";import{a6 as Ne,a3 as Se,at as Ce,ac as we}from"./agent-icon-U4gZaLOQ.js";import{s as $e}from"./User01-Cn3JqTjv.js";import{a as ee,T as te}from"./toggle-group-CtdhsZGp.js";import{e as se}from"./format-time-Cq80KKvY.js";import{B as Y}from"./badge-Cnnepvq1.js";import{l as ne,c as Te,b as De,S as Oe}from"./config-BCpfsSBB.js";import{a as G,B as U}from"./BarChart-DfTtCBDv.js";import{C as H,X as P,Y as V}from"./CartesianChart-uNdbRuTj.js";import{a as Ie,A as Be}from"./AreaChart-C_4ebEom.js";function le(a){const e=w.c(8),{href:t,className:d,children:o}=a,c=xe();let r;e[0]!==t||e[1]!==c?(r=n=>{!t||n.button!==0||n.metaKey||n.ctrlKey||n.shiftKey||(n.preventDefault(),c({href:t}))},e[0]=t,e[1]=c,e[2]=r):r=e[2];let l;return e[3]!==o||e[4]!==d||e[5]!==t||e[6]!==r?(l=s.jsx("a",{href:t,className:d,onClick:r,children:o}),e[3]=o,e[4]=d,e[5]=t,e[6]=r,e[7]=l):l=e[7],l}const L=(a,e,t)=>a&&e?()=>a({drill:e,label:t}):void 0,F="cursor-pointer text-left transition-colors hover:bg-accent focus-ring",E=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"],A={fontSize:11,fill:"var(--muted-foreground)",opacity:.7};function ae(a){const e=Math.abs(a);return e<60?`${Math.round(a)}s`:e<3600?`${Math.round(a/60)}m`:e<86400?`${(a/3600).toFixed(1)}h`:`${(a/86400).toFixed(1)}d`}function M(a,e){return a===null||Number.isNaN(a)?"—":e==="s"?ae(a):e==="%"?`${Math.round(a*10)/10}%`:e==="USD"?`$${a.toFixed(2)}`:a.toLocaleString()}function X(a,e){return e==="s"?ae(a):e==="%"?`${a}%`:e==="USD"?`$${a}`:a>=1e3?`${(a/1e3).toFixed(1)}k`:String(a)}const re=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/,Le=/^\d{4}-\d{2}-\d{2}$/;function Me(a,e){return typeof a=="number"?M(a,e):Le.test(a)?new Date(`${a}T12:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric"}):re.test(a)?se(a):a}function _(a){const e=w.c(20),{title:t,value:d,caption:o,aside:c,children:r,onClick:l}=a,n=l?"button":"section",i=l?"button":void 0,u=l&&F;let m;e[0]!==u?(m=D("surface flex h-full w-full flex-col gap-6 px-4 pt-4 pb-5",u),e[0]=u,e[1]=m):m=e[1];let x;e[2]!==t?(x=s.jsx("h3",{className:"text-sm text-foreground/70",children:t}),e[2]=t,e[3]=x):x=e[3];let f;e[4]!==d?(f=d!==void 0&&s.jsx("span",{className:"tnum text-4xl font-normal text-foreground",children:d}),e[4]=d,e[5]=f):f=e[5];let h;e[6]!==o||e[7]!==x||e[8]!==f?(h=s.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[x,f,o]}),e[6]=o,e[7]=x,e[8]=f,e[9]=h):h=e[9];let p;e[10]!==c||e[11]!==h?(p=s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[h,c]}),e[10]=c,e[11]=h,e[12]=p):p=e[12];let j;return e[13]!==n||e[14]!==r||e[15]!==l||e[16]!==i||e[17]!==m||e[18]!==p?(j=s.jsxs(n,{type:i,onClick:l,className:m,children:[p,r]}),e[13]=n,e[14]=r,e[15]=l,e[16]=i,e[17]=m,e[18]=p,e[19]=j):j=e[19],j}function ie(a){const e=w.c(9),{lane:t}=a,d=B();let o;e[0]!==t||e[1]!==d?(o=ne(t,d),e[0]=t,e[1]=d,e[2]=o):o=e[2];const{label:c,visual:r}=o,l=r.icon;let n;e[3]!==l||e[4]!==r.iconClassName?(n=s.jsx(l,{className:r.iconClassName}),e[3]=l,e[4]=r.iconClassName,e[5]=n):n=e[5];let i;return e[6]!==c||e[7]!==n?(i=s.jsxs(Y,{variant:"muted",children:[n,c]}),e[6]=c,e[7]=n,e[8]=i):i=e[8],i}function R(a){const e=w.c(2),{children:t}=a;let d;return e[0]!==t?(d=s.jsx("div",{className:"flex h-20 items-center justify-center text-sm text-muted-foreground",children:t}),e[0]=t,e[1]=d):d=e[1],d}function _e(a){const e=w.c(21),{value:t,previous:d,unit:o,better:c}=a,r=B();if(t===null||d===null||d===void 0){let p;e[0]!==r?(p=r("taskBoard.analytics.noPrior"),e[0]=r,e[1]=p):p=e[1];let j;return e[2]!==p?(j=s.jsx("span",{className:"text-meta",children:p}),e[2]=p,e[3]=j):j=e[3],j}const l=Math.round((t-d)*10)/10,n=c==="down"?l<0:l>0;let i;e[4]!==l||e[5]!==r||e[6]!==o?(i=o==="%"?r("taskBoard.analytics.points",{n:String(Math.abs(l))}):M(Math.abs(l),o),e[4]=l,e[5]=r,e[6]=o,e[7]=i):i=e[7];const u=i;let m;e[8]!==u||e[9]!==c||e[10]!==l||e[11]!==n||e[12]!==r?(m=l===0?r("taskBoard.analytics.unchanged"):s.jsxs("span",{className:D("inline-flex items-center gap-0.5 font-medium",c&&(n?"text-success":"text-destructive")),children:[l>0?s.jsx(ve,{size:12}):s.jsx(ke,{size:12}),u]}),e[8]=u,e[9]=c,e[10]=l,e[11]=n,e[12]=r,e[13]=m):m=e[13];let x;e[14]!==r?(x=r("taskBoard.analytics.vsPrevious"),e[14]=r,e[15]=x):x=e[15];let f;e[16]!==x?(f=s.jsx("span",{children:x}),e[16]=x,e[17]=f):f=e[17];let h;return e[18]!==m||e[19]!==f?(h=s.jsxs("span",{className:"text-meta inline-flex items-center gap-1",children:[m,f]}),e[18]=m,e[19]=f,e[20]=h):h=e[20],h}const Re={1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",5:"lg:grid-cols-5",6:"lg:grid-cols-3",9:"lg:grid-cols-3"};function Ae(a){const e=w.c(10),{section:t,onDrill:d}=a,o=Re[t.values.length]??"lg:grid-cols-4";let c;e[0]!==o?(c=D("grid grid-cols-2 gap-4",o),e[0]=o,e[1]=c):c=e[1];let r;if(e[2]!==d||e[3]!==t.values){let n;e[5]!==d?(n=i=>s.jsx(_,{title:i.label,value:M(i.value,i.unit),onClick:L(d,i.drill,i.label),caption:s.jsxs(s.Fragment,{children:[i.detail&&s.jsx("span",{className:"text-sm text-muted-foreground",children:i.detail}),i.previous!==void 0&&s.jsx(_e,{value:i.value,previous:i.previous,unit:i.unit,better:i.better})]})},i.label),e[5]=d,e[6]=n):n=e[6],r=t.values.map(n),e[2]=d,e[3]=t.values,e[4]=r}else r=e[4];let l;return e[7]!==c||e[8]!==r?(l=s.jsx("div",{className:c,children:r}),e[7]=c,e[8]=r,e[9]=l):l=e[9],l}function Ke(a){return Array.from(new Set(a.flatMap(e=>Object.keys(e)))).filter(e=>e!=="t").sort()}function Ee(a,e){const t=e.filter(d=>a.some(o=>typeof o[d]=="number"&&o[d]!==0));return t.length>0?t:e}function Fe(a,e,t){const d=new Map(a.map(l=>[String(l.t??"").slice(0,10),l])),o=new Date(`${t.from.slice(0,10)}T00:00:00.000Z`),c=t.to.slice(0,10),r=[];for(;o.toISOString().slice(0,10)<=c;){const l=o.toISOString().slice(0,10);r.push(d.get(l)??{t:o.toISOString(),...Object.fromEntries(e.map(n=>[n,0]))}),o.setUTCDate(o.getUTCDate()+1)}return r}function oe(a){const e=w.c(17),{active:t,payload:d,unit:o,nameOf:c}=a,r=c===void 0?String:c;if(!t||!d?.length)return null;const l=d[0]?.payload,n=l?.t;let i;e[0]!==l?.label||e[1]!==n?(i=typeof n=="string"?new Date(n).toLocaleDateString(void 0,{month:"short",day:"numeric"}):String(l?.label??""),e[0]=l?.label,e[1]=n,e[2]=i):i=e[2];let u;e[3]!==i?(u=s.jsx("div",{className:"mb-1 text-xs text-muted-foreground",children:i}),e[3]=i,e[4]=u):u=e[4];let m;if(e[5]!==r||e[6]!==d||e[7]!==o){let h;e[9]!==r||e[10]!==o?(h=p=>s.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[s.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:p.color}}),s.jsx("span",{className:"text-muted-foreground",children:r(String(p.dataKey))}),s.jsx("span",{className:"tnum ml-auto pl-3 font-medium",children:M(typeof p.value=="number"?p.value:null,o)})]},String(p.dataKey)),e[9]=r,e[10]=o,e[11]=h):h=e[11],m=d.map(h),e[5]=r,e[6]=d,e[7]=o,e[8]=m}else m=e[8];let x;e[12]!==m?(x=s.jsx("div",{className:"flex flex-col gap-1",children:m}),e[12]=m,e[13]=x):x=e[13];let f;return e[14]!==u||e[15]!==x?(f=s.jsxs("div",{className:"rounded-lg bg-popover px-3 py-2 shadow-soft",children:[u,x]}),e[14]=u,e[15]=x,e[16]=f):f=e[16],f}function ze(a){const e=w.c(27),{section:t,range:d}=a,o=B(),c=t.unit??void 0,r=c!=="%"&&c!=="s";let l;if(e[0]!==r||e[1]!==d||e[2]!==t.points||e[3]!==t.title||e[4]!==o||e[5]!==c){const n=Ke(t.points),i=r?Ee(t.points,n):n,u=y=>E[n.indexOf(y)%E.length],m=Object.fromEntries(i.map(y=>[y,{label:y,color:u(y)}])),f=(r&&d?Fe(t.points,n,d):t.points).map(Ge);let h;if(e[7]!==t.title){let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=/\W+/g,e[9]=y):y=e[9],h=t.title.replace(y,"-"),e[7]=t.title,e[8]=h}else h=e[8];const p=`analytics-${h}`;let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),e[10]=j):j=e[10];const v=j;let k;e[11]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(P,{dataKey:"label",axisLine:!1,tickLine:!1,tick:A,minTickGap:24,tickMargin:8}),e[11]=k):k=e[11];const b=k;let $;e[12]!==c?($=c==="%"?[0,100]:[0,"auto"],e[12]=c,e[13]=$):$=e[13];const S=c!==void 0;let g;e[14]!==c?(g=y=>X(y,c),e[14]=c,e[15]=g):g=e[15];let C;e[16]!==$||e[17]!==S||e[18]!==g?(C=s.jsx(V,{orientation:"right",axisLine:!1,tickLine:!1,tick:A,domain:$,allowDecimals:S,tickFormatter:g,width:48,tickCount:5}),e[16]=$,e[17]=S,e[18]=g,e[19]=C):C=e[19];const O=C;let T;e[20]!==r?(T=r?{fill:"var(--muted)",opacity:.4}:{stroke:"var(--border)",strokeDasharray:"4 4"},e[20]=r,e[21]=T):T=e[21];let I;e[22]!==c?(I=y=>{const{active:z,payload:me}=y;return s.jsx(oe,{active:z,payload:me,unit:c})},e[22]=c,e[23]=I):I=e[23];let N;e[24]!==I||e[25]!==T?(N=s.jsx(J,{cursor:T,content:I}),e[24]=I,e[25]=T,e[26]=N):N=e[26];const K=N;l=s.jsx(_,{title:t.title,aside:i.length>1&&s.jsx("ul",{className:"flex flex-wrap justify-end gap-x-3 gap-y-1",children:i.map(y=>s.jsxs("li",{className:"text-meta flex items-center gap-1.5",children:[s.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:u(y)}}),y]},y))}),children:f.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx(q,{role:"img","aria-label":t.title,className:"h-[140px] w-full md:h-[180px]",config:m,children:r?s.jsxs(G,{data:f,margin:{left:0,right:0,top:8},children:[v,b,O,K,i.map((y,z)=>s.jsx(U,{dataKey:y,stackId:"day",fill:u(y),maxBarSize:24,radius:z===i.length-1?[4,4,0,0]:0,animationDuration:300},y))]}):s.jsxs(Ie,{data:f,margin:{left:0,right:0,top:8},children:[i.length===1&&s.jsx("defs",{children:s.jsxs("linearGradient",{id:p,x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"0%",stopColor:u(i[0]??""),stopOpacity:.2}),s.jsx("stop",{offset:"100%",stopColor:u(i[0]??""),stopOpacity:0})]})}),v,b,O,K,i.map(y=>s.jsx(Be,{type:"linear",dataKey:y,stroke:u(y),strokeWidth:2,fill:i.length===1?`url(#${p})`:"none",dot:f.length===1?{r:4}:!1,activeDot:{r:4,stroke:"var(--background)",strokeWidth:2},connectNulls:!0,animationDuration:300},y))]})})}),e[0]=r,e[1]=d,e[2]=t.points,e[3]=t.title,e[4]=o,e[5]=c,e[6]=l}else l=e[6];return l}function Ge(a){return{...a,label:new Date(String(a.t??"")).toLocaleDateString(void 0,{month:"short",day:"numeric"})}}function ce(a){const e=w.c(25),{label:t,note:d,share:o,value:c,fill:r,color:l,onClick:n}=a,i=n?"button":"div",u=n?"button":void 0;let m;e[0]!==n?(m=n&&D(F,"-mx-2 w-[calc(100%+1rem)] rounded-md px-2"),e[0]=n,e[1]=m):m=e[1];let x;e[2]!==m?(x=D("flex h-10 w-full items-center gap-3",m),e[2]=m,e[3]=x):x=e[3];let f;e[4]!==d?(f=d&&s.jsx("span",{className:"text-meta ml-2",children:d}),e[4]=d,e[5]=f):f=e[5];let h;e[6]!==t||e[7]!==f?(h=s.jsxs("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:[t,f]}),e[6]=t,e[7]=f,e[8]=h):h=e[8];const p=`${Math.max(0,Math.min(100,r))}%`;let j;e[9]!==l||e[10]!==p?(j=s.jsx("span",{className:"h-1.5 w-20 shrink-0 overflow-hidden rounded-full bg-muted",children:s.jsx("span",{className:"block h-full rounded-full",style:{width:p,backgroundColor:l}})}),e[9]=l,e[10]=p,e[11]=j):j=e[11];let v;e[12]!==o?(v=o!==void 0&&s.jsx("span",{className:"tnum w-16 shrink-0 text-right text-sm text-foreground/40",children:o}),e[12]=o,e[13]=v):v=e[13];let k;e[14]!==c?(k=s.jsx("span",{className:"tnum w-8 shrink-0 text-right text-sm text-foreground",children:c}),e[14]=c,e[15]=k):k=e[15];let b;return e[16]!==i||e[17]!==n||e[18]!==u||e[19]!==x||e[20]!==h||e[21]!==j||e[22]!==v||e[23]!==k?(b=s.jsx("li",{className:"border-b border-border/50 last:border-b-0",children:s.jsxs(i,{type:u,onClick:n,className:x,children:[h,j,v,k]})}),e[16]=i,e[17]=n,e[18]=u,e[19]=x,e[20]=h,e[21]=j,e[22]=v,e[23]=k,e[24]=b):b=e[24],b}function Ue(a){const e=w.c(17),{section:t,onDrill:d}=a,o=B(),c=t.stages[0]?.value??0,r=t.stages.at(-1)?.value??0;let l;e[0]!==r||e[1]!==c?(l=c?`${Math.round(100*r/c)}%`:"—",e[0]=r,e[1]=c,e[2]=l):l=e[2];let n;e[3]!==r||e[4]!==c||e[5]!==o?(n=c>0&&s.jsx("span",{className:"text-meta",children:o("taskBoard.analytics.funnelCaption",{end:String(r),start:String(c)})}),e[3]=r,e[4]=c,e[5]=o,e[6]=n):n=e[6];let i;e[7]!==d||e[8]!==t.stages||e[9]!==c||e[10]!==o?(i=c===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx("ol",{className:"flex flex-col",children:t.stages.map((m,x)=>{const f=t.stages[x-1]?.value,h=f===void 0?0:f-m.value;return s.jsx(ce,{label:m.label,note:h>0?o("taskBoard.analytics.dropped",{n:String(h)}):void 0,share:`${Math.round(100*m.value/c)}%`,value:m.value.toLocaleString(),fill:100*m.value/c,color:"var(--chart-2)",onClick:L(d,m.drill,m.label)},m.label)})}),e[7]=d,e[8]=t.stages,e[9]=c,e[10]=o,e[11]=i):i=e[11];let u;return e[12]!==t.title||e[13]!==l||e[14]!==n||e[15]!==i?(u=s.jsx(_,{title:t.title,value:l,caption:n,children:i}),e[12]=t.title,e[13]=l,e[14]=n,e[15]=i,e[16]=u):u=e[16],u}function He(a){const e=w.c(19),{section:t,onDrill:d}=a,o=B();let c;e[0]!==t.bars?(c=Math.max(0,...t.bars.map(Pe)),e[0]=t.bars,e[1]=c):c=e[1];const r=c;let l;e[2]!==t.total?.value?(l=t.total?.value.toLocaleString(),e[2]=t.total?.value,e[3]=l):l=e[3];let n;e[4]!==t.total?(n=t.total&&s.jsx("span",{className:"text-meta",children:t.total.label}),e[4]=t.total,e[5]=n):n=e[5];let i;e[6]!==t.unit?(i=t.unit&&s.jsx("span",{className:"text-meta",children:t.unit}),e[6]=t.unit,e[7]=i):i=e[7];let u;e[8]!==r||e[9]!==d||e[10]!==t.bars||e[11]!==o?(u=t.bars.length===0?s.jsx(R,{children:o("taskBoard.analytics.nobodyStepped")}):s.jsx("ul",{className:"flex flex-col",children:t.bars.map(x=>s.jsx(ce,{label:x.label,note:x.note,share:x.detail,value:x.value.toLocaleString(),fill:r?100*x.value/r:0,color:"var(--chart-1)",onClick:L(d,x.drill,x.label)},x.label))}),e[8]=r,e[9]=d,e[10]=t.bars,e[11]=o,e[12]=u):u=e[12];let m;return e[13]!==t.title||e[14]!==l||e[15]!==n||e[16]!==i||e[17]!==u?(m=s.jsx(_,{title:t.title,value:l,caption:n,aside:i,children:u}),e[13]=t.title,e[14]=l,e[15]=n,e[16]=i,e[17]=u,e[18]=m):m=e[18],m}function Pe(a){return a.value}function Ve(a,e){return`/${encodeURIComponent(a)}/${encodeURIComponent(e)}`}const Xe=new Set(["Org ID","Task ID"]),Ye=new Set(["Run outcome","Failure kind","Moved in by","State"]),Qe=new Set(["Error","Signature"]),We=new Set(["Org","Orgs"]);function Ze(a){const e=w.c(32),{section:t,threadLinks:d,showOrg:o,taskHref:c,onDrill:r}=a,l=B(),n=t.columns.indexOf("Org");let i;e[0]!==n||e[1]!==t.columns||e[2]!==d?(i=d&&n>=0?t.columns.indexOf("Thread"):-1,e[0]=n,e[1]=t.columns,e[2]=d,e[3]=i):i=e[3];const u=i,m=t.columns.indexOf("Task ID");let x;e[4]!==t.columns||e[5]!==c||e[6]!==m?(x=c&&m>=0?t.columns.indexOf("Task"):-1,e[4]=t.columns,e[5]=c,e[6]=m,e[7]=x):x=e[7];const f=x,h=t.columns;let p,j;if(e[8]!==r||e[9]!==n||e[10]!==t.columns||e[11]!==t.drills||e[12]!==t.rows||e[13]!==t.title||e[14]!==t.units||e[15]!==o||e[16]!==l||e[17]!==f||e[18]!==c||e[19]!==m||e[20]!==u){j=Symbol.for("react.early_return_sentinel");e:{let v;e[23]!==o?(v=S=>{const{c:g}=S;return!Xe.has(g)&&(o!==!1||!We.has(g))},e[23]=o,e[24]=v):v=e[24];const k=h.map(st).filter(v).sort(tt);let b;e[25]!==t.rows?(b=S=>{const{j:g}=S,C=t.rows.map(O=>O[g]).filter(et);return C.length>0&&C.every(Je)},e[25]=t.rows,e[26]=b):b=e[26];const $=new Set(k.filter(b).map(qe));if(t.rows.length===1&&k.every(S=>{const{c:g}=S;return $.has(g)})){let S;e[27]!==t.rows[0]?(S=t.rows[0]??[],e[27]=t.rows[0],e[28]=S):S=e[28];const g=S;let C;e[29]!==g||e[30]!==t.units?(C=O=>{const{c:T,j:I}=O,N=g[I];return s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("dt",{className:"text-meta",children:T}),s.jsx("dd",{className:"tnum text-2xl text-foreground",children:typeof N=="number"?M(N,t.units?.[T]):"—"})]},T)},e[29]=g,e[30]=t.units,e[31]=C):C=e[31],j=s.jsx(Q,{title:t.title,children:s.jsx("dl",{className:"surface grid px-4 pt-4 pb-5 grid-cols-2 gap-x-6 gap-y-4 sm:grid-cols-3 lg:grid-cols-[repeat(auto-fill,minmax(120px,1fr))]",children:k.map(C)})});break e}p=s.jsx(Q,{title:t.title,children:t.rows.length===0?s.jsx("p",{className:"surface px-4 py-4 text-sm text-muted-foreground",children:l("taskBoard.analytics.nothingToShow")}):s.jsx("div",{className:"surface max-h-[480px] overflow-auto",children:s.jsxs(pe,{variant:"flush",children:[s.jsx(he,{children:s.jsx(W,{children:k.map(S=>{const{c:g}=S;return s.jsx(ge,{className:D("whitespace-nowrap first:pl-4 last:pr-4",$.has(g)&&"text-right"),children:g==="Thread"?"":g},g)})})}),s.jsx(je,{children:t.rows.map((S,g)=>s.jsx(W,{children:k.map((C,O)=>{const{c:T,j:I}=C,N=S[I],K=f===I?S[m]:null,y=O===0?L(r,t.drills?.[g]??void 0,String(N??"")):void 0;return s.jsx(be,{className:D("max-w-md truncate text-sm first:pl-4 last:pr-4",$.has(T)&&"text-right"),children:N==null?s.jsx("span",{className:"text-muted-foreground",children:"—"}):I===u?s.jsxs("a",{href:Ve(String(S[n]),String(N)),target:"_blank",rel:"noreferrer",className:"focus-ring inline-flex items-center gap-1 text-muted-foreground underline-offset-2 hover:text-foreground hover:underline",children:[l("taskBoard.analytics.openChat"),s.jsx(fe,{size:12})]}):y?s.jsx("button",{type:"button",onClick:y,className:"focus-ring text-left text-foreground underline-offset-2 hover:underline",children:String(N)}):K?s.jsx(le,{href:c?.(String(K)),className:"focus-ring text-foreground underline-offset-2 hover:underline",children:String(N)}):T==="Lane"&&typeof N=="string"?s.jsx(ie,{lane:N}):T==="Priority"&&typeof N=="string"?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(de,{drill:`priority:${N.toLowerCase()}`}),N]}):Ye.has(T)?s.jsx(Y,{variant:"muted",children:String(N)}):Qe.has(T)?s.jsx("span",{title:String(N),className:"font-mono text-xs text-muted-foreground",children:String(N)}):s.jsx("span",{className:D("tnum",typeof N=="string"&&re.test(N)&&"text-muted-foreground"),children:Me(N,t.units?.[T])})},T)})},`${t.title}-${g}`))})]})})})}e[8]=r,e[9]=n,e[10]=t.columns,e[11]=t.drills,e[12]=t.rows,e[13]=t.title,e[14]=t.units,e[15]=o,e[16]=l,e[17]=f,e[18]=c,e[19]=m,e[20]=u,e[21]=p,e[22]=j}else p=e[21],j=e[22];return j!==Symbol.for("react.early_return_sentinel")?j:p}function qe(a){const{c:e}=a;return e}function Je(a){return typeof a=="number"}function et(a){return a!==null}function tt(a,e){return+(e.c==="Task")-+(a.c==="Task")}function st(a,e){return{c:a,j:e}}function Ot(a){const e=w.c(17),{section:t,taskHref:d}=a,o=B();let c;e[0]!==t.columns?(c=i=>t.columns.indexOf(i),e[0]=t.columns,e[1]=c):c=e[1];const r=c;if(t.rows.length===0){let i;e[2]!==o?(i=o("taskBoard.analytics.nothingToShow"),e[2]=o,e[3]=i):i=e[3];let u;return e[4]!==i?(u=s.jsx(R,{children:i}),e[4]=i,e[5]=u):u=e[5],u}let l;if(e[6]!==r||e[7]!==t.rows||e[8]!==o||e[9]!==d){let i;e[11]!==r||e[12]!==o||e[13]!==d?(i=u=>{const m=String(u[r("Task ID")]??""),x=u[r("Lane")],f=u[r("Picked up")],h=Number(u[r("Actions by people")]??0),p=Number(u[r("Failed QA")]??0),j=[typeof f=="string"?se(f):null,h>0&&o(h===1?"taskBoard.analytics.humanActionsOne":"taskBoard.analytics.humanActions",{n:String(h)})].filter(Boolean),v=s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[s.jsx("span",{className:"truncate text-sm text-foreground",children:String(u[r("Task")]??"")}),s.jsx("span",{className:"text-meta truncate",children:j.join(" · ")})]}),p>0&&s.jsxs(Y,{variant:"muted",children:[s.jsx(ye,{className:"text-destructive"}),p===1?o("taskBoard.analytics.failedQa"):o("taskBoard.analytics.failedQaTimes",{n:String(p)})]}),typeof x=="string"&&s.jsx(ie,{lane:x})]});return s.jsx("li",{className:"border-b border-border/50 last:border-b-0",children:d?s.jsx(le,{href:d(m),className:D(F,"flex items-center gap-3 rounded-md p-2"),children:v}):s.jsx("div",{className:"flex items-center gap-3 p-2",children:v})},m)},e[11]=r,e[12]=o,e[13]=d,e[14]=i):i=e[14],l=t.rows.map(i),e[6]=r,e[7]=t.rows,e[8]=o,e[9]=d,e[10]=l}else l=e[10];let n;return e[15]!==l?(n=s.jsx("ul",{className:"flex flex-col",children:l}),e[15]=l,e[16]=n):n=e[16],n}const nt={Type:we,Priority:Ce,Tag:Se,Sprint:Ne,"Brief by":$e};function de(a){const e=w.c(10),{drill:t}=a;let d;e[0]!==t?(d=(t??"").split("&")[0]?.split(":")??[],e[0]=t,e[1]=d):d=e[1];const[o,c]=d;let r,l,n;if(e[2]!==o||e[3]!==c){n=Symbol.for("react.early_return_sentinel");e:{const u=o==="type"?Object.entries(Te).find(x=>{const[f]=x;return f===c})?.[1]:o==="priority"?Object.entries(De).find(x=>{const[f]=x;return f===c})?.[1]:void 0;if(!u){n=null;break e}r=u.icon,l=D("size-3.5 shrink-0",u.iconClassName)}e[2]=o,e[3]=c,e[4]=r,e[5]=l,e[6]=n}else r=e[4],l=e[5],n=e[6];if(n!==Symbol.for("react.early_return_sentinel"))return n;let i;return e[7]!==r||e[8]!==l?(i=s.jsx(r,{className:l}),e[7]=r,e[8]=l,e[9]=i):i=e[9],i}function lt(a){const e=w.c(11),{value:t,metric:d,color:o}=a,c=t??0,r=`${d.unit==="%"?Math.min(100,c):0}%`;let l;e[0]!==o||e[1]!==r?(l=s.jsx("span",{className:"h-1.5 min-w-0 flex-1 overflow-hidden rounded-full bg-muted",children:s.jsx("span",{className:"block h-full rounded-full",style:{width:r,backgroundColor:o}})}),e[0]=o,e[1]=r,e[2]=l):l=e[2];const n=t??null;let i;e[3]!==d.unit||e[4]!==n?(i=M(n,d.unit),e[3]=d.unit,e[4]=n,e[5]=i):i=e[5];let u;e[6]!==i?(u=s.jsx("span",{className:"tnum w-12 shrink-0 text-right text-sm text-foreground",children:i}),e[6]=i,e[7]=u):u=e[7];let m;return e[8]!==l||e[9]!==u?(m=s.jsxs("span",{className:"flex items-center gap-2",children:[l,u]}),e[8]=l,e[9]=u,e[10]=m):m=e[10],m}function at(a){const e=w.c(16),{section:t,onDrill:d}=a,o=B(),[c,r]=Z.useState(t.dimensions[0]?.label??"");let l;e[0]!==c||e[1]!==t.dimensions?(l=t.dimensions.find(f=>f.label===c)??t.dimensions[0],e[0]=c,e[1]=t.dimensions,e[2]=l):l=e[2];const n=l,i=`minmax(0,1fr) 56px repeat(${t.metrics.length}, minmax(96px, 168px))`;let u;e[3]!==n?.label||e[4]!==t.dimensions?(u=t.dimensions.length>1&&s.jsx(ee,{type:"single",variant:"segmented",size:"sm",value:n?.label??"",onValueChange:f=>f&&r(f),children:t.dimensions.map(it)}),e[3]=n?.label,e[4]=t.dimensions,e[5]=u):u=e[5];let m;e[6]!==i||e[7]!==n||e[8]!==d||e[9]!==t.metrics||e[10]!==o?(m=!n||n.rows.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("div",{className:"text-meta grid items-center gap-4 border-b border-border/50 pb-2",style:{gridTemplateColumns:i},children:[s.jsx("span",{children:n.label}),s.jsx("span",{className:"text-right",children:o("taskBoard.analytics.tasks")}),t.metrics.map(rt)]}),n.rows.map(f=>{const h=L(d,f.drill,f.label),p=h?"button":"div";return s.jsxs(p,{type:h?"button":void 0,onClick:h,className:D("grid h-11 items-center gap-4 border-b border-border/50 last:border-b-0",h&&D(F,"-mx-2 w-[calc(100%+1rem)] rounded-md px-2")),style:{gridTemplateColumns:i},children:[s.jsxs("span",{className:"flex min-w-0 items-center gap-2 text-sm text-foreground",children:[s.jsx(de,{drill:f.drill}),s.jsx("span",{className:"truncate",children:f.label})]}),s.jsx("span",{className:"tnum text-right text-sm text-muted-foreground",children:f.count.toLocaleString()}),t.metrics.map(j=>s.jsx(lt,{value:f.values[j.key],metric:j,color:j.better==="up"?"var(--success)":"var(--destructive)"},j.key))]},f.label)})]}),e[6]=i,e[7]=n,e[8]=d,e[9]=t.metrics,e[10]=o,e[11]=m):m=e[11];let x;return e[12]!==t.title||e[13]!==u||e[14]!==m?(x=s.jsx(_,{title:t.title,aside:u,children:m}),e[12]=t.title,e[13]=u,e[14]=m,e[15]=x):x=e[15],x}function rt(a){return s.jsx("span",{className:"text-right",children:a.label},a.key)}function it(a){const e=nt[a.label];return s.jsxs(te,{value:a.label,children:[e&&s.jsx(e,{}),a.label]},a.label)}const ue=3;function ot(a){const e=w.c(26),{section:t,onDrill:d}=a,o=B(),[c,r]=Z.useState(t.metrics[0]?.key??"");let l;e[0]!==c||e[1]!==t.metrics?(l=t.metrics.find(b=>b.key===c)??t.metrics[0],e[0]=c,e[1]=t.metrics,e[2]=l):l=e[2];const n=l;if(!n)return null;const i=n.better==="up"?"var(--success)":"var(--destructive)";let u;e[3]!==t.cols||e[4]!==t.rows?(u=t.rows.length===t.cols.length&&t.rows.every((b,$)=>t.cols[$]===b),e[3]=t.cols,e[4]=t.rows,e[5]=u):u=e[5];const m=u,x=`minmax(96px, 1fr) repeat(${t.cols.length}, minmax(72px, 1fr))`,f=t.title;let h;e[6]!==o?(h=o("taskBoard.analytics.matrixCaption",{n:String(ue)}),e[6]=o,e[7]=h):h=e[7];let p;e[8]!==h?(p=s.jsx("span",{className:"text-meta",children:h}),e[8]=h,e[9]=p):p=e[9];let j;e[10]!==n.key||e[11]!==t.metrics?(j=t.metrics.length>1&&s.jsx(ee,{type:"single",variant:"segmented",size:"sm",value:n.key,onValueChange:b=>b&&r(b),children:t.metrics.map(dt)}),e[10]=n.key,e[11]=t.metrics,e[12]=j):j=e[12];let v;e[13]!==x||e[14]!==n||e[15]!==d||e[16]!==t||e[17]!==m||e[18]!==o||e[19]!==i?(v=t.rows.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("div",{className:"grid min-w-fit gap-1",style:{gridTemplateColumns:x},children:[s.jsxs("span",{className:"text-meta self-end pb-1",children:[t.rowLabel," / ",t.colLabel]}),t.cols.map(ct),t.rows.map((b,$)=>s.jsx(ut,{row:b,section:t,metric:n,tint:i,onDrill:d,upTo:m?$:void 0},b))]})}),e[13]=x,e[14]=n,e[15]=d,e[16]=t,e[17]=m,e[18]=o,e[19]=i,e[20]=v):v=e[20];let k;return e[21]!==t.title||e[22]!==p||e[23]!==j||e[24]!==v?(k=s.jsx(_,{title:f,caption:p,aside:j,children:v}),e[21]=t.title,e[22]=p,e[23]=j,e[24]=v,e[25]=k):k=e[25],k}function ct(a){return s.jsx("span",{className:"text-meta self-end pb-1 text-center",children:a},a)}function dt(a){return s.jsx(te,{value:a.key,children:a.label},a.key)}function ut(a){const e=w.c(22),{row:t,section:d,metric:o,tint:c,onDrill:r,upTo:l}=a,n=B();let i;e[0]!==t?(i=s.jsx("span",{className:"flex items-center truncate pr-2 text-sm text-foreground",children:t}),e[0]=t,e[1]=i):i=e[1];let u;if(e[2]!==o||e[3]!==r||e[4]!==t||e[5]!==d.cells||e[6]!==d.cols||e[7]!==n||e[8]!==c||e[9]!==l){let x;e[11]!==o||e[12]!==r||e[13]!==t||e[14]!==d.cells||e[15]!==n||e[16]!==c||e[17]!==l?(x=(f,h)=>{if(l!==void 0&&h>l)return s.jsx("span",{},f);const p=d.cells.find(b=>b.row===t&&b.col===f),j=p?.values[o.key]??null;if(!p)return s.jsx("span",{className:"flex h-14 items-center justify-center rounded-md bg-muted/40 text-sm text-muted-foreground",children:"—"},f);const v=j===null?0:Math.min(100,o.unit==="%"?j:0),k=L(r,p.drill,t===f?t:`${t} · ${f}`);return s.jsxs("button",{type:"button",onClick:k,disabled:!k,className:D("flex h-14 flex-col items-center justify-center rounded-md transition-opacity focus-ring",k&&"cursor-pointer hover:opacity-80",p.count<ue&&"opacity-50"),style:{backgroundColor:`color-mix(in oklch, ${c} ${Math.round(8+v*.5)}%, var(--muted))`},children:[s.jsx("span",{className:"tnum text-sm font-medium text-foreground",children:M(j,o.unit)}),s.jsx("span",{className:"text-meta",children:p.count===1?n("taskBoard.analytics.drillCountOne"):n("taskBoard.analytics.drillCount",{n:String(p.count)})})]},f)},e[11]=o,e[12]=r,e[13]=t,e[14]=d.cells,e[15]=n,e[16]=c,e[17]=l,e[18]=x):x=e[18],u=d.cols.map(x),e[2]=o,e[3]=r,e[4]=t,e[5]=d.cells,e[6]=d.cols,e[7]=n,e[8]=c,e[9]=l,e[10]=u}else u=e[10];let m;return e[19]!==i||e[20]!==u?(m=s.jsxs(s.Fragment,{children:[i,u]}),e[19]=i,e[20]=u,e[21]=m):m=e[21],m}function mt(){const a=w.c(2),e=B();let t;return a[0]!==e?(t=d=>Object.hasOwn(Oe,d)?ne(d,e).label:d,a[0]=e,a[1]=t):t=a[1],t}function ft(a){const e=w.c(21),{section:t,onDrill:d}=a,o=B(),c=mt(),r=t.unit??void 0,l=t.layout==="stacked";let n;if(e[0]!==c||e[1]!==d||e[2]!==t.baseline||e[3]!==t.categories||e[4]!==t.keys||e[5]!==t.title||e[6]!==l||e[7]!==o||e[8]!==r){let i;e[10]!==t.baseline?(i=g=>g!==t.baseline,e[10]=t.baseline,e[11]=i):i=e[11];const u=t.keys.filter(i),m=g=>g===t.baseline?"var(--border)":E[u.indexOf(g)%E.length]??"",x=Object.fromEntries(t.keys.map(g=>[g,{label:c(g),color:m(g)}]));let f;e[12]!==t.categories?(f=t.categories.map(pt),e[12]=t.categories,e[13]=f):f=e[13];const h=f;let p;e[14]!==d||e[15]!==t.categories?(p=g=>{const C=t.categories[g];C&&L(d,C.drill,C.label)?.()},e[14]=d,e[15]=t.categories,e[16]=p):p=e[16];const j=p,v=t.categories.some(xt)&&!!d,k=l?Math.max(120,t.categories.length*44+32):220;let b;e[17]===Symbol.for("react.memo_cache_sentinel")?(b={fill:"var(--muted)",opacity:.4},e[17]=b):b=e[17];let $;e[18]!==c||e[19]!==r?($=s.jsx(J,{cursor:b,content:g=>{const{active:C,payload:O}=g;return s.jsx(oe,{active:C,payload:O,unit:r,nameOf:c})}}),e[18]=c,e[19]=r,e[20]=$):$=e[20];const S=$;n=s.jsx(_,{title:t.title,aside:s.jsx("ul",{className:"flex flex-wrap justify-end gap-x-3 gap-y-1",children:t.keys.map(g=>s.jsxs("li",{className:"text-meta flex items-center gap-1.5",children:[s.jsx("span",{className:"size-2 rounded-full",style:{backgroundColor:m(g)}}),c(g)]},g))}),children:h.length===0?s.jsx(R,{children:o("taskBoard.analytics.noDataInRange")}):s.jsx(q,{role:"img","aria-label":t.title,className:"w-full",style:{height:k},config:x,children:l?s.jsxs(G,{data:h,layout:"vertical",margin:{left:0,right:8,top:0},children:[s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,horizontal:!1}),s.jsx(P,{type:"number",axisLine:!1,tickLine:!1,tick:A,tickFormatter:g=>X(g,r)}),s.jsx(V,{type:"category",dataKey:"label",axisLine:!1,tickLine:!1,tick:A,width:72}),S,t.keys.map((g,C)=>s.jsx(U,{dataKey:g,stackId:"all",fill:m(g),maxBarSize:22,radius:C===t.keys.length-1?[0,4,4,0]:0,animationDuration:300},g))]}):s.jsxs(G,{data:h,margin:{left:0,right:0,top:8},barGap:4,barCategoryGap:"28%",children:[s.jsx(H,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),s.jsx(P,{dataKey:"label",axisLine:!1,tickLine:!1,tick:A,tickMargin:8}),s.jsx(V,{orientation:"right",axisLine:!1,tickLine:!1,tick:A,allowDecimals:r!==void 0,tickFormatter:g=>X(g,r),width:48}),S,t.keys.map(g=>s.jsx(U,{dataKey:g,fill:m(g),maxBarSize:32,radius:[4,4,0,0],animationDuration:300,className:D(v&&"cursor-pointer"),onClick:(C,O)=>j(O)},g))]})})}),e[0]=c,e[1]=d,e[2]=t.baseline,e[3]=t.categories,e[4]=t.keys,e[5]=t.title,e[6]=l,e[7]=o,e[8]=r,e[9]=n}else n=e[9];return n}function xt(a){return a.drill}function pt(a){return{label:a.label,...a.values}}function It(a){return a.kind==="funnel"||a.kind==="bars"?"half":"full"}function Bt(a){const e=w.c(27),{section:t,threadLinks:d,showOrg:o,taskHref:c,range:r,onDrill:l}=a;switch(t.kind){case"stat":{let n;return e[0]!==l||e[1]!==t?(n=s.jsx(Ae,{section:t,onDrill:l}),e[0]=l,e[1]=t,e[2]=n):n=e[2],n}case"series":{let n;return e[3]!==r||e[4]!==t?(n=s.jsx(ze,{section:t,range:r}),e[3]=r,e[4]=t,e[5]=n):n=e[5],n}case"funnel":{let n;return e[6]!==l||e[7]!==t?(n=s.jsx(Ue,{section:t,onDrill:l}),e[6]=l,e[7]=t,e[8]=n):n=e[8],n}case"bars":{let n;return e[9]!==l||e[10]!==t?(n=s.jsx(He,{section:t,onDrill:l}),e[9]=l,e[10]=t,e[11]=n):n=e[11],n}case"breakdown":{let n;return e[12]!==l||e[13]!==t?(n=s.jsx(at,{section:t,onDrill:l}),e[12]=l,e[13]=t,e[14]=n):n=e[14],n}case"matrix":{let n;return e[15]!==l||e[16]!==t?(n=s.jsx(ot,{section:t,onDrill:l}),e[15]=l,e[16]=t,e[17]=n):n=e[17],n}case"categories":{let n;return e[18]!==l||e[19]!==t?(n=s.jsx(ft,{section:t,onDrill:l}),e[18]=l,e[19]=t,e[20]=n):n=e[20],n}case"table":{let n;return e[21]!==l||e[22]!==t||e[23]!==o||e[24]!==c||e[25]!==d?(n=s.jsx(Ze,{section:t,threadLinks:d,showOrg:o,taskHref:c,onDrill:l}),e[21]=l,e[22]=t,e[23]=o,e[24]=c,e[25]=d,e[26]=n):n=e[26],n}default:return t}}export{Ot as D,Bt as S,It as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as o,j as r}from"./index-CaH7O3hJ.js";import{O as e}from"./api-keys-Xjw7lgqR.js";import{R as m}from"./require-capability-D4hkdMxt.js";import"./AlertCircle-Ctbquk5a.js";import"./Copy01-DC8f0fwU.js";import"./Key01-u4HXXUPa.js";import"./Plus-BDveVGJf.js";import"./Trash01-D92WhXf2.js";import"./empty-state-Cu20Qj3-.js";import"./alert-dialog-CKDHmJ-l.js";import"./label-Cnc4HQwP.js";import"./use-mcp-client-MRThuZpK.js";import"./auth-hgpoCSIS.js";import"./access-gate-BjUA5Gw_.js";import"./capability-load-error-DdN4o47w.js";function h(){const t=o.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(m,{capability:"api-keys:manage",area:"api-keys",children:r.jsx(e,{})}),t[0]=i):i=t[0],i}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,a2 as Q,J as R,K as Y,m as ce,o as Z,e as U,j as i,g3 as de,b as z,r as O,er as me,eZ as J,B as w,t as q,es as ue,v as V,aM as W,s as X,I as ee,w as te,q as se,D as ie}from"./index-BpE9ALKU.js";import{i as fe}from"./AlertCircle-BKEHXsE7.js";import{a as ge}from"./Copy01-LCHR9m-G.js";import{i as ne}from"./Key01-S4YXCnrO.js";import{s as le}from"./Plus-DEIwMEqz.js";import{s as pe}from"./Trash01-CIzl9L8e.js";import{E as ye}from"./empty-state-DjiRKbHi.js";import{f as xe,e as he,b as je,A as Ke,a as Ce,d as Ae,c as De,g as be}from"./alert-dialog-DGPL6Sul.js";import{L as Se}from"./label-Byb6HWZH.js";import{u as M}from"./use-mcp-client-J1ndEcf9.js";function H(t,e){if(t?.isError)throw new Error(t.content?.[0]?.text??e);if(!t.structuredContent)throw new Error(e);return t.structuredContent}function we(t){const e=b.c(11),{org:a}=Q();let r;e[0]!==a.id||e[1]!==a.slug?(r={connectionId:R,orgId:a.id,orgSlug:a.slug},e[0]=a.id,e[1]=a.slug,e[2]=r):r=e[2];const l=M(r);let s;e[3]!==a.id?(s=Y.apiKeysList(a.id),e[3]=a.id,e[4]=s):s=e[4];let n;e[5]!==l?(n=async()=>{const d=await l.callTool({name:"API_KEY_LIST",arguments:{}});return H(d,"Failed to list API keys").items},e[5]=l,e[6]=n):n=e[6];const c=t?.enabled??!0;let o;return e[7]!==s||e[8]!==n||e[9]!==c?(o={queryKey:s,queryFn:n,staleTime:3e4,enabled:c},e[7]=s,e[8]=n,e[9]=c,e[10]=o):o=e[10],ce(o)}function _e(){const t=b.c(11),{org:e}=Q();let a;t[0]!==e.id||t[1]!==e.slug?(a={connectionId:R,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=a):a=t[2];const r=M(a),l=Z();let s;t[3]!==r?(s=async o=>{const d=await r.callTool({name:"API_KEY_CREATE",arguments:{name:o.name,permissions:o.permissions??{"*":["*"]}}});return H(d,"Failed to create API key")},t[3]=r,t[4]=s):s=t[4];let n;t[5]!==e.id||t[6]!==l?(n=()=>{l.invalidateQueries({queryKey:Y.apiKeysList(e.id)})},t[5]=e.id,t[6]=l,t[7]=n):n=t[7];let c;return t[8]!==s||t[9]!==n?(c={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=c):c=t[10],U(c)}function ve(){const t=b.c(11),{org:e}=Q();let a;t[0]!==e.id||t[1]!==e.slug?(a={connectionId:R,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=a):a=t[2];const r=M(a),l=Z();let s;t[3]!==r?(s=async o=>{const d=await r.callTool({name:"API_KEY_DELETE",arguments:{keyId:o}});return H(d,"Failed to delete API key")},t[3]=r,t[4]=s):s=t[4];let n;t[5]!==e.id||t[6]!==l?(n=()=>{l.invalidateQueries({queryKey:Y.apiKeysList(e.id)})},t[5]=e.id,t[6]=l,t[7]=n):n=t[7];let c;return t[8]!==s||t[9]!==n?(c={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=c):c=t[10],U(c)}function ae(t){const e=b.c(6),{error:a}=t,r=z();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(fe,{size:16}),e[0]=l):l=e[0];let s;e[1]!==a.message||e[2]!==r?(s=r("settings.apiKeys.failedToLoadError",{error:a.message}),e[1]=a.message,e[2]=r,e[3]=s):s=e[3];let n;return e[4]!==s?(n=i.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[l,i.jsx("span",{className:"text-sm font-medium",children:s})]}),e[4]=s,e[5]=n):n=e[5],n}function Ee(t){const e=b.c(20),{apiKey:a,onDelete:r}=t,l=z();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:i.jsx(ne,{size:16,className:"text-muted-foreground"})}),e[0]=s):s=e[0];let n;e[1]!==a.name?(n=i.jsx("span",{className:"font-medium text-sm truncate block",children:a.name}),e[1]=a.name,e[2]=n):n=e[2];let c;e[3]!==a.createdAt||e[4]!==l?(c=l("settings.apiKeys.createdAt",{date:new Date(a.createdAt).toLocaleDateString()}),e[3]=a.createdAt,e[4]=l,e[5]=c):c=e[5];let o;e[6]!==c?(o=i.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:c}),e[6]=c,e[7]=o):o=e[7];let d;e[8]!==n||e[9]!==o?(d=i.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s,i.jsxs("div",{className:"min-w-0",children:[n,o]})]}),e[8]=n,e[9]=o,e[10]=d):d=e[10];let m;e[11]!==l?(m=l("settings.apiKeys.deleteKey"),e[11]=l,e[12]=m):m=e[12];let f;e[13]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(pe,{size:14}),e[13]=f):f=e[13];let g;e[14]!==r||e[15]!==m?(g=i.jsx(w,{variant:"ghost-destructive",size:"icon",className:"shrink-0",onClick:r,"aria-label":m,children:f}),e[14]=r,e[15]=m,e[16]=g):g=e[16];let u;return e[17]!==d||e[18]!==g?(u=i.jsxs("li",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[d,g]}),e[17]=d,e[18]=g,e[19]=u):u=e[19],u}function Pe(t){const e=b.c(15),{onCreate:a}=t,r=z();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(ne,{}),e[0]=l):l=e[0];let s;e[1]!==r?(s=r("settings.apiKeys.emptyTitle"),e[1]=r,e[2]=s):s=e[2];let n;e[3]!==r?(n=r("settings.apiKeys.emptyDescription"),e[3]=r,e[4]=n):n=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(le,{size:14}),e[5]=c):c=e[5];let o;e[6]!==r?(o=r("settings.apiKeys.newKey"),e[6]=r,e[7]=o):o=e[7];let d;e[8]!==a||e[9]!==o?(d=i.jsxs(w,{onClick:a,size:"sm",children:[c,o]}),e[8]=a,e[9]=o,e[10]=d):d=e[10];let m;return e[11]!==s||e[12]!==n||e[13]!==d?(m=i.jsx(ue,{children:i.jsx(ye,{size:"inline",icon:l,title:s,description:n,children:d})}),e[11]=s,e[12]=n,e[13]=d,e[14]=m):m=e[14],m}function Ne(t){const e=b.c(40),{createdKey:a,onClose:r}=t,l=z(),s=a!==null;let n;e[0]!==r?(n=S=>!S&&r(),e[0]=r,e[1]=n):n=e[1];let c;e[2]!==l?(c=l("settings.apiKeys.createdTitle"),e[2]=l,e[3]=c):c=e[3];let o;e[4]!==c?(o=i.jsx(V,{children:c}),e[4]=c,e[5]=o):o=e[5];let d;e[6]!==l?(d=l("settings.apiKeys.createdDescription"),e[6]=l,e[7]=d):d=e[7];let m;e[8]!==d?(m=i.jsx(W,{children:d}),e[8]=d,e[9]=m):m=e[9];let f;e[10]!==o||e[11]!==m?(f=i.jsxs(X,{children:[o,m]}),e[10]=o,e[11]=m,e[12]=f):f=e[12];const g=a?.key??"";let u;e[13]!==g?(u=i.jsx(ee,{readOnly:!0,value:g,className:"font-mono text-xs"}),e[13]=g,e[14]=u):u=e[14];let p;e[15]!==a||e[16]!==l?(p=()=>{a&&(navigator.clipboard?.writeText(a.key),q.success(l("settings.apiKeys.copied")))},e[15]=a,e[16]=l,e[17]=p):p=e[17];let y;e[18]!==l?(y=l("settings.apiKeys.copyKey"),e[18]=l,e[19]=y):y=e[19];let C;e[20]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx(ge,{size:14}),e[20]=C):C=e[20];let x;e[21]!==p||e[22]!==y?(x=i.jsx(w,{type:"button",variant:"outline",size:"icon",onClick:p,"aria-label":y,children:C}),e[21]=p,e[22]=y,e[23]=x):x=e[23];let h;e[24]!==x||e[25]!==u?(h=i.jsxs("div",{className:"flex items-center gap-2",children:[u,x]}),e[24]=x,e[25]=u,e[26]=h):h=e[26];let j;e[27]!==l?(j=l("settings.apiKeys.done"),e[27]=l,e[28]=j):j=e[28];let K;e[29]!==r||e[30]!==j?(K=i.jsx(te,{children:i.jsx(w,{onClick:r,children:j})}),e[29]=r,e[30]=j,e[31]=K):K=e[31];let A;e[32]!==h||e[33]!==K||e[34]!==f?(A=i.jsxs(se,{className:"sm:max-w-lg",children:[f,h,K]}),e[32]=h,e[33]=K,e[34]=f,e[35]=A):A=e[35];let D;return e[36]!==s||e[37]!==A||e[38]!==n?(D=i.jsx(ie,{open:s,onOpenChange:n,children:A}),e[36]=s,e[37]=A,e[38]=n,e[39]=D):D=e[39],D}function Te(t){const e=b.c(64),{open:a,onOpenChange:r,onCreated:l}=t,s=z(),[n,c]=O.useState(""),o=_e();let d;e[0]!==r?(d=function(){c(""),r(!1)},e[0]=r,e[1]=d):d=e[1];const m=d;let f;e[2]!==o||e[3]!==m||e[4]!==n||e[5]!==l||e[6]!==s?(f=async function(oe){if(oe.preventDefault(),!!n.trim())try{const B=await o.mutateAsync({name:n.trim()});m(),l(B)}catch(B){const G=B;q.error(G instanceof Error?G.message:s("settings.apiKeys.failedToCreateKey"))}},e[2]=o,e[3]=m,e[4]=n,e[5]=l,e[6]=s,e[7]=f):f=e[7];const g=f;let u;e[8]!==m||e[9]!==r?(u=F=>{F?r(F):m()},e[8]=m,e[9]=r,e[10]=u):u=e[10];let p;e[11]!==s?(p=s("settings.apiKeys.newKeyTitle"),e[11]=s,e[12]=p):p=e[12];let y;e[13]!==p?(y=i.jsx(V,{children:p}),e[13]=p,e[14]=y):y=e[14];let C;e[15]!==s?(C=s("settings.apiKeys.newKeyDescription"),e[15]=s,e[16]=C):C=e[16];let x;e[17]!==C?(x=i.jsx(W,{children:C}),e[17]=C,e[18]=x):x=e[18];let h;e[19]!==y||e[20]!==x?(h=i.jsxs(X,{children:[y,x]}),e[19]=y,e[20]=x,e[21]=h):h=e[21];let j;e[22]!==s?(j=s("settings.apiKeys.nameLabel"),e[22]=s,e[23]=j):j=e[23];let K;e[24]!==j?(K=i.jsx(Se,{htmlFor:"api-key-name",children:j}),e[24]=j,e[25]=K):K=e[25];let A;e[26]===Symbol.for("react.memo_cache_sentinel")?(A=F=>c(F.target.value),e[26]=A):A=e[26];let D;e[27]!==s?(D=s("settings.apiKeys.namePlaceholder"),e[27]=s,e[28]=D):D=e[28];let S;e[29]!==n||e[30]!==D?(S=i.jsx(ee,{id:"api-key-name",value:n,onChange:A,placeholder:D,autoComplete:"off",required:!0}),e[29]=n,e[30]=D,e[31]=S):S=e[31];let _;e[32]!==K||e[33]!==S?(_=i.jsxs("div",{className:"space-y-1.5",children:[K,S]}),e[32]=K,e[33]=S,e[34]=_):_=e[34];const re=o.isPending;let v;e[35]!==s?(v=s("settings.apiKeys.cancelButton"),e[35]=s,e[36]=v):v=e[36];let E;e[37]!==o.isPending||e[38]!==m||e[39]!==v?(E=i.jsx(w,{type:"button",variant:"outline",onClick:m,disabled:re,children:v}),e[37]=o.isPending,e[38]=m,e[39]=v,e[40]=E):E=e[40];let P;e[41]!==o.isPending||e[42]!==n?(P=o.isPending||!n.trim(),e[41]=o.isPending,e[42]=n,e[43]=P):P=e[43];let N;e[44]!==o.isPending||e[45]!==s?(N=o.isPending?s("settings.apiKeys.creatingButton"):s("settings.apiKeys.createButton"),e[44]=o.isPending,e[45]=s,e[46]=N):N=e[46];let T;e[47]!==P||e[48]!==N?(T=i.jsx(w,{type:"submit",disabled:P,children:N}),e[47]=P,e[48]=N,e[49]=T):T=e[49];let k;e[50]!==E||e[51]!==T?(k=i.jsxs(te,{children:[E,T]}),e[50]=E,e[51]=T,e[52]=k):k=e[52];let I;e[53]!==g||e[54]!==_||e[55]!==k?(I=i.jsxs("form",{onSubmit:g,className:"space-y-4",children:[_,k]}),e[53]=g,e[54]=_,e[55]=k,e[56]=I):I=e[56];let L;e[57]!==I||e[58]!==h?(L=i.jsxs(se,{className:"sm:max-w-lg",children:[h,I]}),e[57]=I,e[58]=h,e[59]=L):L=e[59];let $;return e[60]!==a||e[61]!==L||e[62]!==u?($=i.jsx(ie,{open:a,onOpenChange:u,children:L}),e[60]=a,e[61]=L,e[62]=u,e[63]=$):$=e[63],$}function ke(){const t=z(),{data:e,isLoading:a,error:r}=we(),l=ve(),[s,n]=O.useState(!1),[c,o]=O.useState(null),[d,m]=O.useState(null),f=e??[];async function g(){if(d)try{await l.mutateAsync(d.id),q.success(t("settings.apiKeys.keyDeleted",{name:d.name}))}catch(u){q.error(u instanceof Error?u.message:t("settings.apiKeys.failedToDeleteKey"))}finally{m(null)}}return i.jsxs(me,{title:t("settings.apiKeys.sectionTitle"),description:t("settings.apiKeys.sectionDescription"),actions:f.length>0?i.jsxs(w,{onClick:()=>n(!0),size:"sm",children:[i.jsx(le,{size:14}),t("settings.apiKeys.newKey")]}):void 0,children:[a?i.jsx(J,{className:"gap-0 overflow-hidden p-0",children:i.jsx("p",{className:"px-4 py-3 text-xs text-muted-foreground",children:t("settings.apiKeys.loading")})}):r&&f.length===0?i.jsx(ae,{error:r}):f.length===0?i.jsx(Pe,{onCreate:()=>n(!0)}):i.jsx(J,{className:"gap-0 overflow-hidden p-0",children:i.jsx("ul",{className:"divide-y divide-border",children:f.map(u=>i.jsx(Ee,{apiKey:u,onDelete:()=>m(u)},u.id))})}),i.jsx(Te,{open:s,onOpenChange:n,onCreated:o}),i.jsx(Ne,{createdKey:c,onClose:()=>o(null)}),i.jsx(xe,{open:d!==null,onOpenChange:u=>{u||m(null)},children:i.jsxs(he,{children:[i.jsxs(je,{children:[i.jsx(Ke,{children:t("settings.apiKeys.deleteTitle",{name:d?.name??""})}),i.jsx(Ce,{children:t("settings.apiKeys.deleteDescription")})]}),i.jsxs(Ae,{children:[i.jsx(De,{children:t("settings.apiKeys.cancelButton")}),i.jsx(be,{onClick:g,children:t("settings.apiKeys.deleteKey")})]})]})})]})}function Me(){const t=b.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(de,{group:"connect",errorFallback:Ie,children:i.jsx(ke,{})}),t[0]=e):e=t[0],e}function Ie(t){const{error:e}=t;return i.jsx(ae,{error:e??new Error("Failed to load API keys")})}export{ke as A,Me as O,we as a,_e as u};
|
|
1
|
+
import{c as b,a2 as Q,J as R,K as Y,m as ce,o as Z,e as U,j as i,g3 as de,b as z,r as O,er as me,eZ as J,B as w,t as q,es as ue,v as V,aM as W,s as X,I as ee,w as te,q as se,D as ie}from"./index-CaH7O3hJ.js";import{i as fe}from"./AlertCircle-Ctbquk5a.js";import{a as ge}from"./Copy01-DC8f0fwU.js";import{i as ne}from"./Key01-u4HXXUPa.js";import{s as le}from"./Plus-BDveVGJf.js";import{s as pe}from"./Trash01-D92WhXf2.js";import{E as ye}from"./empty-state-Cu20Qj3-.js";import{f as xe,e as he,b as je,A as Ke,a as Ce,d as Ae,c as De,g as be}from"./alert-dialog-CKDHmJ-l.js";import{L as Se}from"./label-Cnc4HQwP.js";import{u as M}from"./use-mcp-client-MRThuZpK.js";function H(t,e){if(t?.isError)throw new Error(t.content?.[0]?.text??e);if(!t.structuredContent)throw new Error(e);return t.structuredContent}function we(t){const e=b.c(11),{org:a}=Q();let r;e[0]!==a.id||e[1]!==a.slug?(r={connectionId:R,orgId:a.id,orgSlug:a.slug},e[0]=a.id,e[1]=a.slug,e[2]=r):r=e[2];const l=M(r);let s;e[3]!==a.id?(s=Y.apiKeysList(a.id),e[3]=a.id,e[4]=s):s=e[4];let n;e[5]!==l?(n=async()=>{const d=await l.callTool({name:"API_KEY_LIST",arguments:{}});return H(d,"Failed to list API keys").items},e[5]=l,e[6]=n):n=e[6];const c=t?.enabled??!0;let o;return e[7]!==s||e[8]!==n||e[9]!==c?(o={queryKey:s,queryFn:n,staleTime:3e4,enabled:c},e[7]=s,e[8]=n,e[9]=c,e[10]=o):o=e[10],ce(o)}function _e(){const t=b.c(11),{org:e}=Q();let a;t[0]!==e.id||t[1]!==e.slug?(a={connectionId:R,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=a):a=t[2];const r=M(a),l=Z();let s;t[3]!==r?(s=async o=>{const d=await r.callTool({name:"API_KEY_CREATE",arguments:{name:o.name,permissions:o.permissions??{"*":["*"]}}});return H(d,"Failed to create API key")},t[3]=r,t[4]=s):s=t[4];let n;t[5]!==e.id||t[6]!==l?(n=()=>{l.invalidateQueries({queryKey:Y.apiKeysList(e.id)})},t[5]=e.id,t[6]=l,t[7]=n):n=t[7];let c;return t[8]!==s||t[9]!==n?(c={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=c):c=t[10],U(c)}function ve(){const t=b.c(11),{org:e}=Q();let a;t[0]!==e.id||t[1]!==e.slug?(a={connectionId:R,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=a):a=t[2];const r=M(a),l=Z();let s;t[3]!==r?(s=async o=>{const d=await r.callTool({name:"API_KEY_DELETE",arguments:{keyId:o}});return H(d,"Failed to delete API key")},t[3]=r,t[4]=s):s=t[4];let n;t[5]!==e.id||t[6]!==l?(n=()=>{l.invalidateQueries({queryKey:Y.apiKeysList(e.id)})},t[5]=e.id,t[6]=l,t[7]=n):n=t[7];let c;return t[8]!==s||t[9]!==n?(c={mutationFn:s,onSuccess:n},t[8]=s,t[9]=n,t[10]=c):c=t[10],U(c)}function ae(t){const e=b.c(6),{error:a}=t,r=z();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(fe,{size:16}),e[0]=l):l=e[0];let s;e[1]!==a.message||e[2]!==r?(s=r("settings.apiKeys.failedToLoadError",{error:a.message}),e[1]=a.message,e[2]=r,e[3]=s):s=e[3];let n;return e[4]!==s?(n=i.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[l,i.jsx("span",{className:"text-sm font-medium",children:s})]}),e[4]=s,e[5]=n):n=e[5],n}function Ee(t){const e=b.c(20),{apiKey:a,onDelete:r}=t,l=z();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:i.jsx(ne,{size:16,className:"text-muted-foreground"})}),e[0]=s):s=e[0];let n;e[1]!==a.name?(n=i.jsx("span",{className:"font-medium text-sm truncate block",children:a.name}),e[1]=a.name,e[2]=n):n=e[2];let c;e[3]!==a.createdAt||e[4]!==l?(c=l("settings.apiKeys.createdAt",{date:new Date(a.createdAt).toLocaleDateString()}),e[3]=a.createdAt,e[4]=l,e[5]=c):c=e[5];let o;e[6]!==c?(o=i.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:c}),e[6]=c,e[7]=o):o=e[7];let d;e[8]!==n||e[9]!==o?(d=i.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s,i.jsxs("div",{className:"min-w-0",children:[n,o]})]}),e[8]=n,e[9]=o,e[10]=d):d=e[10];let m;e[11]!==l?(m=l("settings.apiKeys.deleteKey"),e[11]=l,e[12]=m):m=e[12];let f;e[13]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(pe,{size:14}),e[13]=f):f=e[13];let g;e[14]!==r||e[15]!==m?(g=i.jsx(w,{variant:"ghost-destructive",size:"icon",className:"shrink-0",onClick:r,"aria-label":m,children:f}),e[14]=r,e[15]=m,e[16]=g):g=e[16];let u;return e[17]!==d||e[18]!==g?(u=i.jsxs("li",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[d,g]}),e[17]=d,e[18]=g,e[19]=u):u=e[19],u}function Pe(t){const e=b.c(15),{onCreate:a}=t,r=z();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(ne,{}),e[0]=l):l=e[0];let s;e[1]!==r?(s=r("settings.apiKeys.emptyTitle"),e[1]=r,e[2]=s):s=e[2];let n;e[3]!==r?(n=r("settings.apiKeys.emptyDescription"),e[3]=r,e[4]=n):n=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(le,{size:14}),e[5]=c):c=e[5];let o;e[6]!==r?(o=r("settings.apiKeys.newKey"),e[6]=r,e[7]=o):o=e[7];let d;e[8]!==a||e[9]!==o?(d=i.jsxs(w,{onClick:a,size:"sm",children:[c,o]}),e[8]=a,e[9]=o,e[10]=d):d=e[10];let m;return e[11]!==s||e[12]!==n||e[13]!==d?(m=i.jsx(ue,{children:i.jsx(ye,{size:"inline",icon:l,title:s,description:n,children:d})}),e[11]=s,e[12]=n,e[13]=d,e[14]=m):m=e[14],m}function Ne(t){const e=b.c(40),{createdKey:a,onClose:r}=t,l=z(),s=a!==null;let n;e[0]!==r?(n=S=>!S&&r(),e[0]=r,e[1]=n):n=e[1];let c;e[2]!==l?(c=l("settings.apiKeys.createdTitle"),e[2]=l,e[3]=c):c=e[3];let o;e[4]!==c?(o=i.jsx(V,{children:c}),e[4]=c,e[5]=o):o=e[5];let d;e[6]!==l?(d=l("settings.apiKeys.createdDescription"),e[6]=l,e[7]=d):d=e[7];let m;e[8]!==d?(m=i.jsx(W,{children:d}),e[8]=d,e[9]=m):m=e[9];let f;e[10]!==o||e[11]!==m?(f=i.jsxs(X,{children:[o,m]}),e[10]=o,e[11]=m,e[12]=f):f=e[12];const g=a?.key??"";let u;e[13]!==g?(u=i.jsx(ee,{readOnly:!0,value:g,className:"font-mono text-xs"}),e[13]=g,e[14]=u):u=e[14];let p;e[15]!==a||e[16]!==l?(p=()=>{a&&(navigator.clipboard?.writeText(a.key),q.success(l("settings.apiKeys.copied")))},e[15]=a,e[16]=l,e[17]=p):p=e[17];let y;e[18]!==l?(y=l("settings.apiKeys.copyKey"),e[18]=l,e[19]=y):y=e[19];let C;e[20]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx(ge,{size:14}),e[20]=C):C=e[20];let x;e[21]!==p||e[22]!==y?(x=i.jsx(w,{type:"button",variant:"outline",size:"icon",onClick:p,"aria-label":y,children:C}),e[21]=p,e[22]=y,e[23]=x):x=e[23];let h;e[24]!==x||e[25]!==u?(h=i.jsxs("div",{className:"flex items-center gap-2",children:[u,x]}),e[24]=x,e[25]=u,e[26]=h):h=e[26];let j;e[27]!==l?(j=l("settings.apiKeys.done"),e[27]=l,e[28]=j):j=e[28];let K;e[29]!==r||e[30]!==j?(K=i.jsx(te,{children:i.jsx(w,{onClick:r,children:j})}),e[29]=r,e[30]=j,e[31]=K):K=e[31];let A;e[32]!==h||e[33]!==K||e[34]!==f?(A=i.jsxs(se,{className:"sm:max-w-lg",children:[f,h,K]}),e[32]=h,e[33]=K,e[34]=f,e[35]=A):A=e[35];let D;return e[36]!==s||e[37]!==A||e[38]!==n?(D=i.jsx(ie,{open:s,onOpenChange:n,children:A}),e[36]=s,e[37]=A,e[38]=n,e[39]=D):D=e[39],D}function Te(t){const e=b.c(64),{open:a,onOpenChange:r,onCreated:l}=t,s=z(),[n,c]=O.useState(""),o=_e();let d;e[0]!==r?(d=function(){c(""),r(!1)},e[0]=r,e[1]=d):d=e[1];const m=d;let f;e[2]!==o||e[3]!==m||e[4]!==n||e[5]!==l||e[6]!==s?(f=async function(oe){if(oe.preventDefault(),!!n.trim())try{const B=await o.mutateAsync({name:n.trim()});m(),l(B)}catch(B){const G=B;q.error(G instanceof Error?G.message:s("settings.apiKeys.failedToCreateKey"))}},e[2]=o,e[3]=m,e[4]=n,e[5]=l,e[6]=s,e[7]=f):f=e[7];const g=f;let u;e[8]!==m||e[9]!==r?(u=F=>{F?r(F):m()},e[8]=m,e[9]=r,e[10]=u):u=e[10];let p;e[11]!==s?(p=s("settings.apiKeys.newKeyTitle"),e[11]=s,e[12]=p):p=e[12];let y;e[13]!==p?(y=i.jsx(V,{children:p}),e[13]=p,e[14]=y):y=e[14];let C;e[15]!==s?(C=s("settings.apiKeys.newKeyDescription"),e[15]=s,e[16]=C):C=e[16];let x;e[17]!==C?(x=i.jsx(W,{children:C}),e[17]=C,e[18]=x):x=e[18];let h;e[19]!==y||e[20]!==x?(h=i.jsxs(X,{children:[y,x]}),e[19]=y,e[20]=x,e[21]=h):h=e[21];let j;e[22]!==s?(j=s("settings.apiKeys.nameLabel"),e[22]=s,e[23]=j):j=e[23];let K;e[24]!==j?(K=i.jsx(Se,{htmlFor:"api-key-name",children:j}),e[24]=j,e[25]=K):K=e[25];let A;e[26]===Symbol.for("react.memo_cache_sentinel")?(A=F=>c(F.target.value),e[26]=A):A=e[26];let D;e[27]!==s?(D=s("settings.apiKeys.namePlaceholder"),e[27]=s,e[28]=D):D=e[28];let S;e[29]!==n||e[30]!==D?(S=i.jsx(ee,{id:"api-key-name",value:n,onChange:A,placeholder:D,autoComplete:"off",required:!0}),e[29]=n,e[30]=D,e[31]=S):S=e[31];let _;e[32]!==K||e[33]!==S?(_=i.jsxs("div",{className:"space-y-1.5",children:[K,S]}),e[32]=K,e[33]=S,e[34]=_):_=e[34];const re=o.isPending;let v;e[35]!==s?(v=s("settings.apiKeys.cancelButton"),e[35]=s,e[36]=v):v=e[36];let E;e[37]!==o.isPending||e[38]!==m||e[39]!==v?(E=i.jsx(w,{type:"button",variant:"outline",onClick:m,disabled:re,children:v}),e[37]=o.isPending,e[38]=m,e[39]=v,e[40]=E):E=e[40];let P;e[41]!==o.isPending||e[42]!==n?(P=o.isPending||!n.trim(),e[41]=o.isPending,e[42]=n,e[43]=P):P=e[43];let N;e[44]!==o.isPending||e[45]!==s?(N=o.isPending?s("settings.apiKeys.creatingButton"):s("settings.apiKeys.createButton"),e[44]=o.isPending,e[45]=s,e[46]=N):N=e[46];let T;e[47]!==P||e[48]!==N?(T=i.jsx(w,{type:"submit",disabled:P,children:N}),e[47]=P,e[48]=N,e[49]=T):T=e[49];let k;e[50]!==E||e[51]!==T?(k=i.jsxs(te,{children:[E,T]}),e[50]=E,e[51]=T,e[52]=k):k=e[52];let I;e[53]!==g||e[54]!==_||e[55]!==k?(I=i.jsxs("form",{onSubmit:g,className:"space-y-4",children:[_,k]}),e[53]=g,e[54]=_,e[55]=k,e[56]=I):I=e[56];let L;e[57]!==I||e[58]!==h?(L=i.jsxs(se,{className:"sm:max-w-lg",children:[h,I]}),e[57]=I,e[58]=h,e[59]=L):L=e[59];let $;return e[60]!==a||e[61]!==L||e[62]!==u?($=i.jsx(ie,{open:a,onOpenChange:u,children:L}),e[60]=a,e[61]=L,e[62]=u,e[63]=$):$=e[63],$}function ke(){const t=z(),{data:e,isLoading:a,error:r}=we(),l=ve(),[s,n]=O.useState(!1),[c,o]=O.useState(null),[d,m]=O.useState(null),f=e??[];async function g(){if(d)try{await l.mutateAsync(d.id),q.success(t("settings.apiKeys.keyDeleted",{name:d.name}))}catch(u){q.error(u instanceof Error?u.message:t("settings.apiKeys.failedToDeleteKey"))}finally{m(null)}}return i.jsxs(me,{title:t("settings.apiKeys.sectionTitle"),description:t("settings.apiKeys.sectionDescription"),actions:f.length>0?i.jsxs(w,{onClick:()=>n(!0),size:"sm",children:[i.jsx(le,{size:14}),t("settings.apiKeys.newKey")]}):void 0,children:[a?i.jsx(J,{className:"gap-0 overflow-hidden p-0",children:i.jsx("p",{className:"px-4 py-3 text-xs text-muted-foreground",children:t("settings.apiKeys.loading")})}):r&&f.length===0?i.jsx(ae,{error:r}):f.length===0?i.jsx(Pe,{onCreate:()=>n(!0)}):i.jsx(J,{className:"gap-0 overflow-hidden p-0",children:i.jsx("ul",{className:"divide-y divide-border",children:f.map(u=>i.jsx(Ee,{apiKey:u,onDelete:()=>m(u)},u.id))})}),i.jsx(Te,{open:s,onOpenChange:n,onCreated:o}),i.jsx(Ne,{createdKey:c,onClose:()=>o(null)}),i.jsx(xe,{open:d!==null,onOpenChange:u=>{u||m(null)},children:i.jsxs(he,{children:[i.jsxs(je,{children:[i.jsx(Ke,{children:t("settings.apiKeys.deleteTitle",{name:d?.name??""})}),i.jsx(Ce,{children:t("settings.apiKeys.deleteDescription")})]}),i.jsxs(Ae,{children:[i.jsx(De,{children:t("settings.apiKeys.cancelButton")}),i.jsx(be,{onClick:g,children:t("settings.apiKeys.deleteKey")})]})]})})]})}function Me(){const t=b.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(de,{group:"connect",errorFallback:Ie,children:i.jsx(ke,{})}),t[0]=e):e=t[0],e}function Ie(t){const{error:e}=t;return i.jsx(ae,{error:e??new Error("Failed to load API keys")})}export{ke as A,Me as O,we as a,_e as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Et,b as Nt,r as E,j as o,av as Rt,l as Kt,h as Tt,t as xt}from"./index-BpE9ALKU.js";import{u as Ct}from"./chat-context-DGKtupvP.js";import{S as Ft}from"./scroll-area-D2nZWmkP.js";import{u as Pt,A as Ot}from"./use-section-preview-base-C5Y0tyB9.js";import{A as Ut,ay as $t}from"./secret-ciphertext-DFEUxQ2Q.js";import{j as It,u as zt,A as Lt,J as Vt,D as qt,a as Dt,K as Mt}from"./blocks-tab-states-DKkBL3yJ.js";import{n as Zt,r as Gt}from"./content-tab-tOKm2eMX.js";import"./use-panel-navigate-xzho_IdK.js";import"./thread-route-Cqps-enJ.js";import"./use-project-scope-BL_T_B-0.js";import"./repository-binding-3oH3TnyD.js";import"./use-mcp-client-J1ndEcf9.js";import"./auth-dECedNaO.js";import"./autosend-CUbKy0s-.js";import"./thread-intent-BZm-EFCO.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-D4CyjfYE.js";import"./task-board-BllghPg4.js";import"./schema-Cdnttv65.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-7DVNLqw5.js";import"./use-ai-providers-CwDx9RGv.js";import"./location-V0VwTJTt.js";import"./use-organization-settings-CvNS5uqj.js";import"./index-BdQq_4o_.js";import"./UserSquare-BX_UIOch.js";import"./agent-icon-rZeVl9Rl.js";import"./AlertCircle-BKEHXsE7.js";import"./Tool01-BjWCTgWh.js";import"./ArrowUp-DfLaoCfv.js";import"./ArrowLeft-D81aL8fM.js";import"./LinkBroken01-CjyqnNbo.js";import"./ShoppingBag01-BvYm46M_.js";import"./ZoomOut-BaK1kO8c.js";import"./Building02-CfaCzC7T.js";import"./CheckCircle-pswqe0yQ.js";import"./ChevronUp-DtK5u9ST.js";import"./ChevronSelectorVertical-yLR6uZzh.js";import"./Copy01-LCHR9m-G.js";import"./CreditCard01-DDybX_8i.js";import"./DotsVertical-Dl2HDAjP.js";import"./Image01-t87ZE04W.js";import"./Globe04-C3qOiXr7.js";import"./SwitchHorizontal01-BUQctc0G.js";import"./Key01-S4YXCnrO.js";import"./Link01-nrYS0m93.js";import"./Minus-Q9-Po73D.js";import"./Monitor01-BmtAT73A.js";import"./Sun-rxG-ROZD.js";import"./Play-B5do76Ow.js";import"./Plus-DEIwMEqz.js";import"./SearchMd-UGgqPivi.js";import"./Trash01-CIzl9L8e.js";import"./Upload01-BZdlKO8o.js";import"./User01-C-yKb_Na.js";import"./Users01-BAB4CQHt.js";import"./XClose-BW8V9Mau.js";import"./section-preview-url-7zfngvgW.js";import"./input-Hbd41rUw.js";import"./usage-stats-RC7HVDz7.js";import"./tool-namespace-Cg8zLvjP.js";import"./form-6kVfawT3.js";import"./label-Byb6HWZH.js";import"./utils-CVEq3hMx.js";import"./markdown-Dej9RATS.js";import"./use-copy-CHLOIJ7B.js";import"./use-mobile-Tr1QHP7F.js";import"./tooltip-BVI2BtDO.js";import"./index-OmMe1wxV.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-B0NXCYZw.js";import"./file-type-icon-Fh4lxmRD.js";import"./shell-layout-o5EDGsgV.js";import"./avatar-Bwp-Xc5s.js";import"./use-clock-tick-CcmqI1TT.js";import"./command-YtmkYLwE.js";import"./index-BnQcNfAh.js";import"./integration-icon-Ilfqyxys.js";import"./project-icon-xn6KKGaE.js";import"./new-project-dialog-Doo7kyhT.js";import"./repository-import-picker-C-BHOdIZ.js";import"./use-navigate-to-agent-DF_GAhPU.js";import"./repository-picker-D2zUBg0A.js";import"./useInfiniteQuery-B6hNZdP6.js";import"./infiniteQueryObserver-CUzkqvrD.js";import"./collection-search-JLOqgXSU.js";import"./use-debounced-value-DRcqPkU3.js";import"./required-auth-layout-D4q3UHWX.js";import"./use-org-sso-D6QGk2qX.js";import"./chat-draft-CR7qKiZW.js";import"./select-DbboDM2Y.js";import"./tabs-z8w4lUhq.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-kpB_ljAl.js";import"./toggle-group-DwqOZ4MY.js";import"./use-open-billing-url-CRea1MGx.js";import"./index-DKt3w3pV.js";import"./checkbox-CSo6M-6b.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-c8imB8ZN.js";import"./drawer-COuxoIPq.js";import"./input-DSXv99TZ.js";import"./suggestion-16V23GET.js";import"./use-mcp-prompts-DNJWm8dw.js";import"./use-org-fs-NBkzIlLN.js";import"./question-004-sINsf4GQ.js";import"./use-members-B24eH4jf.js";import"./use-org-auth-client-BvXF9uek.js";import"./feature-paywall-BaUYa8qG.js";import"./plan-ladder-Bo1QCqxw.js";import"./add-connection-dialog-bYFWev7Q.js";import"./extract-connection-data-DCoskE6n.js";import"./metadata-D72DunRR.js";import"./connection-CU2PwZyg.js";import"./url-slug-BxAIS32w.js";import"./connection-card-Bf6UkDd9.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-DIB5tw4r.js";import"./use-connection-C5PJp5ki.js";import"./schema-CrOnn79s.js";import"./connection-form-helpers-B_xUWFll.js";import"./authenticate-and-persist-oauth-BI5fpBCJ.js";import"./mcp-oauth-oGpWuhVi.js";import"./mcp-oauth-BG-oWBlL.js";import"./collection-tabs-ClvmGOqD.js";import"./badge-dosB_-4a.js";import"./use-infinite-scroll-RN9jGFYf.js";import"./useSuspenseInfiniteQuery-BLScoOeo.js";import"./use-task-board-events-Bi71rM-b.js";import"./use-chat-layout-state-Bp6y46wP.js";import"./site-editor-toast-CMmEyjwn.js";import"./use-main-schema-v8-B2SCuhcn.js";import"./sandbox-url-D3mC8qhT.js";import"./utils-DZ5cUVcx.js";import"./index-BDYGqdZJ.js";import"./pair-nOzQH_7U.js";import"./collapsible-82CZUSRZ.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CQ1qp5-9.js";import"./types-DGEWLhFA.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-IZSv9mMV.js";import"./use-thread-outputs-BRyva6jJ.js";import"./sandbox-git-api-CRxdlhrN.js";import"./alert-Ge1PvRkU.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./switch-B3SL4byd.js";import"./monaco-editor-CdL13Ko4.js";import"./editor-CT6aDT4h.js";import"./calendar-CS0FMW9V.js";import"./editor-classes-C5mmUd_p.js";import"./core.esm-DeTgmZgN.js";import"./sortable.esm-DygwBK0K.js";import"./combobox-TZ4RmWfI.js";import"./alert-dialog-DGPL6Sul.js";import"./search-input-CRQ84Rcs.js";import"./use-file-configs-D_kctJ5n.js";import"./asset-utils-BfDmoNac.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./empty-state-BJ_BjmBA.js";import"./mustache-HR1Haumz.js";import"./use-content-sync-CT_R89DD.js";import"./sandbox-lifecycle-context-BxTbwuaV.js";import"./empty-state-DjiRKbHi.js";function Ht(c,t){const m=(c.title||c.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),s=/^[A-Za-z]/.test(m)&&m.length>0?m:"Section",r=Zt(t,s);return{blockKey:r,data:{__resolveType:c.resolveType,name:r}}}function oi(c){const t=Et.c(88),{orgSlug:m,virtualMcpId:s,branch:r,blockKey:a,block:h,meta:n,decofile:d,title:kt,excludeFields:G,schemaPending:ht,previewBaseUrl:bt,notice:H,saveGuard:J,persistDefaults:Q}=c,W=ht===void 0?!1:ht,X=bt===void 0?null:bt,Y=Ct()?.taskId??null,p=Nt();let R;t[0]!==r||t[1]!==X||t[2]!==s?(R={virtualMcpId:s,branch:r,sandboxUrl:X},t[0]=r,t[1]=X,t[2]=s,t[3]=R):R=t[3];const b=Pt(R),u=typeof h?.__resolveType=="string"?h.__resolveType:"";let K;t[4]!==G||t[5]!==n||t[6]!==u?(K=Gt(u,n,G),t[4]=G,t[5]=n,t[6]=u,t[7]=K):K=t[7];const v=K;let T;t[8]!==v?(T=!!v&&Object.keys(v.properties??{}).length>0,t[8]=v,t[9]=T):T=t[9];const tt=T,vt=kt??(h?Ut(a,h,n):a);let C;t[10]!==r||t[11]!==m||t[12]!==s?(C={orgSlug:m,virtualMcpId:s,branch:r},t[10]=r,t[11]=m,t[12]=s,t[13]=C):C=t[13];let F;t[14]!==J?(F={guard:J},t[14]=J,t[15]=F):F=t[15];const{save:et,flush:ot,isPending:rt}=It(C,F);let P;t[16]!==r||t[17]!==m||t[18]!==s?(P={orgSlug:m,virtualMcpId:s,branch:r},t[16]=r,t[17]=m,t[18]=s,t[19]=P):P=t[19];const g=zt(P);let O;t[20]!==g||t[21]!==p?(O=Dt((e,i)=>g.mutate({blockKey:e,data:i},{onError:l=>xt.error(p("sectionsEditor.sectionsEditor.saveFailed",{error:l.message}))})),t[20]=g,t[21]=p,t[22]=O):O=t[22];const it=O,[jt,Bt]=E.useState(a),[st,gt]=E.useState(null),[mt,St]=E.useState(0);let U;t[23]===Symbol.for("react.memo_cache_sentinel")?(U=[],t[23]=U):U=t[23];const[S,yt]=E.useState(U),[pt,f]=E.useState(!1),$=E.useRef(null);jt!==a&&(Bt(a),gt(null),St(Qt),yt([]));let I;t[24]!==h?(I=h??{},t[24]=h,t[25]=I):I=t[25];const at=I;let y;t[26]!==st?(y=st??{},t[26]=st,t[27]=y):y=t[27];let z;t[28]!==at||t[29]!==y?(z={...at,...y},t[28]=at,t[29]=y,t[30]=z):z=t[30];const nt=z;let L;t[31]!==a||t[32]!==u||t[33]!==et?(L=e=>{const i=e;gt(i),et(a,{...i,__resolveType:u})},t[31]=a,t[32]=u,t[33]=et,t[34]=L):L=t[34];const lt=L;let V;t[35]===Symbol.for("react.memo_cache_sentinel")?(V=e=>{yt(e)},t[35]=V):V=t[35];const N=V;let q;t[36]!==d||t[37]!==ot||t[38]!==g||t[39]!==p?(q=async(e,i)=>{try{const{blockKey:l,data:x}=Ht(e,d);await g.mutateAsync({blockKey:l,data:x}),xt.success(p("sandbox.appEditor.createdSection",{name:l})),i({__resolveType:l}),ot()}catch(l){const x=l,At=x instanceof Error?x.message:p("sandbox.appEditor.failedAddSection");throw xt.error(At),x}},t[36]=d,t[37]=ot,t[38]=g,t[39]=p,t[40]=q):q=t[40];const k=q;let D;t[41]!==f?(D=e=>{$.current=e.append,f(!0)},t[41]=f,t[42]=D):D=t[42];const ct=D;let M;t[43]!==k||t[44]!==f?(M=async e=>{const i=$.current;if(i)try{await k(e,l=>{i(l),f(!1),$.current=null})}catch{}},t[43]=k,t[44]=f,t[45]=M):M=t[45];const dt=M,ut=S.length>0?[vt,...S]:[],_t="flex h-full flex-col",wt="flex h-12 shrink-0 items-center justify-between border-b px-6",ft=ut.length>0?o.jsx("nav",{"aria-label":p("sandbox.appEditor.editingBreadcrumb"),className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:ut.map((e,i)=>{const l=i===ut.length-1,x=Lt(e);return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[i>0&&o.jsx(Rt,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>{N(i===0?[]:Vt(S,i)),St(Jt)},title:x,className:Kt("min-w-0 truncate rounded-lg px-1 py-0.5 text-left transition-colors",l?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:x})]},`${x}-${i}`)})}):o.jsx("span",{className:"text-sm font-medium",children:vt});let j;t[46]!==rt?(j=o.jsx(Mt,{isPending:rt,isError:!1}),t[46]=rt,t[47]=j):j=t[47];let B;t[48]!==ft||t[49]!==j?(B=o.jsxs("div",{className:wt,children:[ft,j]}),t[48]=ft,t[49]=j,t[50]=B):B=t[50];let _;t[51]!==a||t[52]!==r||t[53]!==S||t[54]!==d||t[55]!==nt||t[56]!==mt||t[57]!==k||t[58]!==N||t[59]!==lt||t[60]!==ct||t[61]!==tt||t[62]!==n||t[63]!==m||t[64]!==Q||t[65]!==u||t[66]!==it||t[67]!==v||t[68]!==W||t[69]!==b||t[70]!==p||t[71]!==Y||t[72]!==s?(_=tt?o.jsx(qt,{schema:v,value:nt,onChange:lt,persistDefaults:Q,basePath:"",breadcrumbPath:S,onBreadcrumbChange:N,decofile:d,meta:n,onSaveReferencedBlock:it,previewBaseUrl:b,onAddSectionItem:k,onRequestAddSection:ct,sandbox:{orgSlug:m,virtualMcpId:s,branch:r,threadId:Y}},`${a}:${mt}`):W?o.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[o.jsx(Tt,{className:"size-4"}),p("sandbox.appEditor.loadingSchema")]}):o.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:p($t(n,u)?"sandbox.appEditor.noEditableSchema":"sandbox.appEditor.schemaAwaitsBuild")}),t[51]=a,t[52]=r,t[53]=S,t[54]=d,t[55]=nt,t[56]=mt,t[57]=k,t[58]=N,t[59]=lt,t[60]=ct,t[61]=tt,t[62]=n,t[63]=m,t[64]=Q,t[65]=u,t[66]=it,t[67]=v,t[68]=W,t[69]=b,t[70]=p,t[71]=Y,t[72]=s,t[73]=_):_=t[73];let w;t[74]!==H||t[75]!==_?(w=o.jsx(Ft,{className:"min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-6 py-6",children:o.jsxs("div",{className:"mx-auto max-w-xl",children:[H,_]})})}),t[74]=H,t[75]=_,t[76]=w):w=t[76];let A;t[77]!==pt||t[78]!==d||t[79]!==dt||t[80]!==n||t[81]!==b||t[82]!==f?(A=b&&o.jsx(Ot,{open:pt,onOpenChange:e=>{f(e),e||($.current=null)},meta:n,decofile:d,previewBaseUrl:b,onSelect:e=>{dt(e)}}),t[77]=pt,t[78]=d,t[79]=dt,t[80]=n,t[81]=b,t[82]=f,t[83]=A):A=t[83];let Z;return t[84]!==B||t[85]!==w||t[86]!==A?(Z=o.jsxs("div",{className:_t,children:[B,w,A]}),t[84]=B,t[85]=w,t[86]=A,t[87]=Z):Z=t[87],Z}function Jt(c){return c+1}function Qt(c){return c+1}export{oi as AppEditor};
|
|
1
|
+
import{c as Et,b as Nt,r as E,j as o,av as Rt,l as Kt,h as Tt,t as xt}from"./index-CaH7O3hJ.js";import{u as Ct}from"./chat-context-_d3c57p1.js";import{S as Ft}from"./scroll-area-Bnrys5oj.js";import{u as Pt,A as Ot}from"./use-section-preview-base-Ca45yoz9.js";import{A as Ut,ay as $t}from"./secret-ciphertext-DZr2qcb4.js";import{j as It,u as zt,A as Lt,J as Vt,D as qt,a as Dt,K as Mt}from"./blocks-tab-states-jGeS9iVz.js";import{n as Zt,r as Gt}from"./content-tab-YH7YYY48.js";import"./use-panel-navigate-DoD4Atgz.js";import"./thread-route-CQ0phZyI.js";import"./use-project-scope-Cq4vb2Sy.js";import"./repository-binding-BLgLcT4o.js";import"./use-mcp-client-MRThuZpK.js";import"./auth-hgpoCSIS.js";import"./autosend-BZOm698U.js";import"./thread-intent-DKuqiaG7.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DwBbAQ97.js";import"./task-board-DRNr9Dsj.js";import"./schema-BdFq22Hl.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-AlKmmETJ.js";import"./use-ai-providers-D1TJRnIR.js";import"./location-V0VwTJTt.js";import"./use-organization-settings-DhvN44pQ.js";import"./index-BdQq_4o_.js";import"./UserSquare-Drp4z0v0.js";import"./agent-icon-U4gZaLOQ.js";import"./AlertCircle-Ctbquk5a.js";import"./Tool01-BM29_KWq.js";import"./ArrowUp-bYg1aEOe.js";import"./ArrowLeft-DZ0mAFgb.js";import"./LinkBroken01-BJx0R97x.js";import"./ShoppingBag01-BMRnsG58.js";import"./ZoomOut-BfQx-fBr.js";import"./Building02-BHIVlbfK.js";import"./CheckCircle-C2ndOEUO.js";import"./ChevronUp-C8mqlnDX.js";import"./ChevronSelectorVertical-DaUdbCWk.js";import"./Copy01-DC8f0fwU.js";import"./CreditCard01-P7j8oDkg.js";import"./DotsVertical-BvwGTDkC.js";import"./Image01-D7F4wuKx.js";import"./Globe04-D6C-ihBU.js";import"./SwitchHorizontal01-CshMTQzi.js";import"./Key01-u4HXXUPa.js";import"./Link01-BoUupQbW.js";import"./Minus-C1PMcNV0.js";import"./Monitor01-D3VwU2ni.js";import"./Sun-sKGpeIhM.js";import"./Play-DxsFk4r2.js";import"./Plus-BDveVGJf.js";import"./SearchMd-Cuf45jFP.js";import"./Trash01-D92WhXf2.js";import"./Upload01-BSDy4f7m.js";import"./User01-Cn3JqTjv.js";import"./Users01-Cxbx87gg.js";import"./XClose-dOW_RI9u.js";import"./section-preview-url-7zfngvgW.js";import"./input-D2sd1bar.js";import"./usage-stats-BkcKNXzu.js";import"./tool-namespace-DTl3so75.js";import"./form-Dpwt-9St.js";import"./label-Cnc4HQwP.js";import"./utils-CVEq3hMx.js";import"./markdown-CA3yd3L6.js";import"./use-copy-d7X6hrKI.js";import"./use-mobile-DCpa1RnA.js";import"./tooltip-B5RmO6BW.js";import"./index-C9OgV5Vt.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-CwrVRVUS.js";import"./file-type-icon-DPqHd815.js";import"./shell-layout-vQvYndIW.js";import"./avatar-RpIBVCkY.js";import"./use-clock-tick-D3FoyBXt.js";import"./command-C7n5qLsN.js";import"./index-DK4LlU65.js";import"./integration-icon-DCiBepJw.js";import"./project-icon-njec1yh1.js";import"./new-project-dialog-DpHJ0D5s.js";import"./repository-import-picker-lphgZTGu.js";import"./use-navigate-to-agent-Bt0oZ-ou.js";import"./repository-picker-Dadd-3sc.js";import"./useInfiniteQuery-ZoWXsJcj.js";import"./infiniteQueryObserver-u-Zd7Oxq.js";import"./collection-search-gW4FCqmq.js";import"./use-debounced-value-DJkh4QSx.js";import"./required-auth-layout-e3_y0Tns.js";import"./use-org-sso-LC63-uuA.js";import"./chat-draft-CKcHhXuF.js";import"./select-CSQbGY9x.js";import"./tabs-2NCCfhSA.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-Dx8wT8P5.js";import"./toggle-group-CtdhsZGp.js";import"./use-open-billing-url-B2NuYLXS.js";import"./index-BpRXpcv4.js";import"./checkbox-CUzk21sc.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-DSRFfUdL.js";import"./drawer-ZlYTI3Z6.js";import"./input-DN6U5jAj.js";import"./suggestion-Wgq7DDQo.js";import"./use-mcp-prompts-DHm-ZTib.js";import"./use-org-fs-D_4Q985K.js";import"./question-004-sINsf4GQ.js";import"./use-members-h3MYd8gX.js";import"./use-org-auth-client-CL0a2tPL.js";import"./feature-paywall-D-GfxA1X.js";import"./plan-ladder-BydnH1hR.js";import"./add-connection-dialog-B0vtW1sl.js";import"./extract-connection-data-CNLani4P.js";import"./metadata-D72DunRR.js";import"./connection-Dik4epzq.js";import"./url-slug-B41xLFy_.js";import"./connection-card-DCnmTKpJ.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-CxhXyMKI.js";import"./use-connection-BwU_KLSF.js";import"./schema-Cx9ZLa-H.js";import"./connection-form-helpers-ta2yIvIb.js";import"./authenticate-and-persist-oauth-jn1R1qId.js";import"./mcp-oauth-3Gakbc_U.js";import"./mcp-oauth-CxgfM8zh.js";import"./collection-tabs-DIFXv7hR.js";import"./badge-Cnnepvq1.js";import"./use-infinite-scroll-BO0n6TVn.js";import"./useSuspenseInfiniteQuery-D2W70ffp.js";import"./use-task-board-events-CSRq29Tm.js";import"./use-chat-layout-state-BNudmQ0u.js";import"./site-editor-toast-BtFL0E4q.js";import"./use-main-schema-v8-CZLsOlEV.js";import"./sandbox-url-D3mC8qhT.js";import"./utils-DzhKsxx8.js";import"./index-CJu3ft8V.js";import"./pair-5gOZrfkD.js";import"./collapsible-CeBZpglT.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Xaw0krD3.js";import"./types-Bt5yyj-z.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-C-yunzji.js";import"./use-thread-outputs-jyAHyZHI.js";import"./sandbox-git-api-CRxdlhrN.js";import"./alert-B29bfkXd.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./switch-DYA2xfHU.js";import"./monaco-editor-C7rmyhBT.js";import"./editor-BFHySd1K.js";import"./calendar-DqVFnL9A.js";import"./editor-classes-DPi5BWR5.js";import"./core.esm-DNra8pgf.js";import"./sortable.esm-C1zl1f3P.js";import"./combobox-DlpsfK7m.js";import"./alert-dialog-CKDHmJ-l.js";import"./search-input-CXQLMhKZ.js";import"./use-file-configs-tsH4be9V.js";import"./asset-utils-DrTFUoo_.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./empty-state-Bok1L2hc.js";import"./mustache-BxPGtFxk.js";import"./use-content-sync-BgOMBs5q.js";import"./sandbox-lifecycle-context-v9W7lV1M.js";import"./empty-state-Cu20Qj3-.js";function Ht(c,t){const m=(c.title||c.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),s=/^[A-Za-z]/.test(m)&&m.length>0?m:"Section",r=Zt(t,s);return{blockKey:r,data:{__resolveType:c.resolveType,name:r}}}function oi(c){const t=Et.c(88),{orgSlug:m,virtualMcpId:s,branch:r,blockKey:a,block:h,meta:n,decofile:d,title:kt,excludeFields:G,schemaPending:ht,previewBaseUrl:bt,notice:H,saveGuard:J,persistDefaults:Q}=c,W=ht===void 0?!1:ht,X=bt===void 0?null:bt,Y=Ct()?.taskId??null,p=Nt();let R;t[0]!==r||t[1]!==X||t[2]!==s?(R={virtualMcpId:s,branch:r,sandboxUrl:X},t[0]=r,t[1]=X,t[2]=s,t[3]=R):R=t[3];const b=Pt(R),u=typeof h?.__resolveType=="string"?h.__resolveType:"";let K;t[4]!==G||t[5]!==n||t[6]!==u?(K=Gt(u,n,G),t[4]=G,t[5]=n,t[6]=u,t[7]=K):K=t[7];const v=K;let T;t[8]!==v?(T=!!v&&Object.keys(v.properties??{}).length>0,t[8]=v,t[9]=T):T=t[9];const tt=T,vt=kt??(h?Ut(a,h,n):a);let C;t[10]!==r||t[11]!==m||t[12]!==s?(C={orgSlug:m,virtualMcpId:s,branch:r},t[10]=r,t[11]=m,t[12]=s,t[13]=C):C=t[13];let F;t[14]!==J?(F={guard:J},t[14]=J,t[15]=F):F=t[15];const{save:et,flush:ot,isPending:rt}=It(C,F);let P;t[16]!==r||t[17]!==m||t[18]!==s?(P={orgSlug:m,virtualMcpId:s,branch:r},t[16]=r,t[17]=m,t[18]=s,t[19]=P):P=t[19];const g=zt(P);let O;t[20]!==g||t[21]!==p?(O=Dt((e,i)=>g.mutate({blockKey:e,data:i},{onError:l=>xt.error(p("sectionsEditor.sectionsEditor.saveFailed",{error:l.message}))})),t[20]=g,t[21]=p,t[22]=O):O=t[22];const it=O,[jt,Bt]=E.useState(a),[st,gt]=E.useState(null),[mt,St]=E.useState(0);let U;t[23]===Symbol.for("react.memo_cache_sentinel")?(U=[],t[23]=U):U=t[23];const[S,yt]=E.useState(U),[pt,f]=E.useState(!1),$=E.useRef(null);jt!==a&&(Bt(a),gt(null),St(Qt),yt([]));let I;t[24]!==h?(I=h??{},t[24]=h,t[25]=I):I=t[25];const at=I;let y;t[26]!==st?(y=st??{},t[26]=st,t[27]=y):y=t[27];let z;t[28]!==at||t[29]!==y?(z={...at,...y},t[28]=at,t[29]=y,t[30]=z):z=t[30];const nt=z;let L;t[31]!==a||t[32]!==u||t[33]!==et?(L=e=>{const i=e;gt(i),et(a,{...i,__resolveType:u})},t[31]=a,t[32]=u,t[33]=et,t[34]=L):L=t[34];const lt=L;let V;t[35]===Symbol.for("react.memo_cache_sentinel")?(V=e=>{yt(e)},t[35]=V):V=t[35];const N=V;let q;t[36]!==d||t[37]!==ot||t[38]!==g||t[39]!==p?(q=async(e,i)=>{try{const{blockKey:l,data:x}=Ht(e,d);await g.mutateAsync({blockKey:l,data:x}),xt.success(p("sandbox.appEditor.createdSection",{name:l})),i({__resolveType:l}),ot()}catch(l){const x=l,At=x instanceof Error?x.message:p("sandbox.appEditor.failedAddSection");throw xt.error(At),x}},t[36]=d,t[37]=ot,t[38]=g,t[39]=p,t[40]=q):q=t[40];const k=q;let D;t[41]!==f?(D=e=>{$.current=e.append,f(!0)},t[41]=f,t[42]=D):D=t[42];const ct=D;let M;t[43]!==k||t[44]!==f?(M=async e=>{const i=$.current;if(i)try{await k(e,l=>{i(l),f(!1),$.current=null})}catch{}},t[43]=k,t[44]=f,t[45]=M):M=t[45];const dt=M,ut=S.length>0?[vt,...S]:[],_t="flex h-full flex-col",wt="flex h-12 shrink-0 items-center justify-between border-b px-6",ft=ut.length>0?o.jsx("nav",{"aria-label":p("sandbox.appEditor.editingBreadcrumb"),className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:ut.map((e,i)=>{const l=i===ut.length-1,x=Lt(e);return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[i>0&&o.jsx(Rt,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>{N(i===0?[]:Vt(S,i)),St(Jt)},title:x,className:Kt("min-w-0 truncate rounded-lg px-1 py-0.5 text-left transition-colors",l?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:x})]},`${x}-${i}`)})}):o.jsx("span",{className:"text-sm font-medium",children:vt});let j;t[46]!==rt?(j=o.jsx(Mt,{isPending:rt,isError:!1}),t[46]=rt,t[47]=j):j=t[47];let B;t[48]!==ft||t[49]!==j?(B=o.jsxs("div",{className:wt,children:[ft,j]}),t[48]=ft,t[49]=j,t[50]=B):B=t[50];let _;t[51]!==a||t[52]!==r||t[53]!==S||t[54]!==d||t[55]!==nt||t[56]!==mt||t[57]!==k||t[58]!==N||t[59]!==lt||t[60]!==ct||t[61]!==tt||t[62]!==n||t[63]!==m||t[64]!==Q||t[65]!==u||t[66]!==it||t[67]!==v||t[68]!==W||t[69]!==b||t[70]!==p||t[71]!==Y||t[72]!==s?(_=tt?o.jsx(qt,{schema:v,value:nt,onChange:lt,persistDefaults:Q,basePath:"",breadcrumbPath:S,onBreadcrumbChange:N,decofile:d,meta:n,onSaveReferencedBlock:it,previewBaseUrl:b,onAddSectionItem:k,onRequestAddSection:ct,sandbox:{orgSlug:m,virtualMcpId:s,branch:r,threadId:Y}},`${a}:${mt}`):W?o.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[o.jsx(Tt,{className:"size-4"}),p("sandbox.appEditor.loadingSchema")]}):o.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:p($t(n,u)?"sandbox.appEditor.noEditableSchema":"sandbox.appEditor.schemaAwaitsBuild")}),t[51]=a,t[52]=r,t[53]=S,t[54]=d,t[55]=nt,t[56]=mt,t[57]=k,t[58]=N,t[59]=lt,t[60]=ct,t[61]=tt,t[62]=n,t[63]=m,t[64]=Q,t[65]=u,t[66]=it,t[67]=v,t[68]=W,t[69]=b,t[70]=p,t[71]=Y,t[72]=s,t[73]=_):_=t[73];let w;t[74]!==H||t[75]!==_?(w=o.jsx(Ft,{className:"min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-6 py-6",children:o.jsxs("div",{className:"mx-auto max-w-xl",children:[H,_]})})}),t[74]=H,t[75]=_,t[76]=w):w=t[76];let A;t[77]!==pt||t[78]!==d||t[79]!==dt||t[80]!==n||t[81]!==b||t[82]!==f?(A=b&&o.jsx(Ot,{open:pt,onOpenChange:e=>{f(e),e||($.current=null)},meta:n,decofile:d,previewBaseUrl:b,onSelect:e=>{dt(e)}}),t[77]=pt,t[78]=d,t[79]=dt,t[80]=n,t[81]=b,t[82]=f,t[83]=A):A=t[83];let Z;return t[84]!==B||t[85]!==w||t[86]!==A?(Z=o.jsxs("div",{className:_t,children:[B,w,A]}),t[84]=B,t[85]=w,t[86]=A,t[87]=Z):Z=t[87],Z}function Jt(c){return c+1}function Qt(c){return c+1}export{oi as AppEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,a2 as d,e as g,an as m,K as I,o as O}from"./index-
|
|
1
|
+
import{c as u,a2 as d,e as g,an as m,K as I,o as O}from"./index-CaH7O3hJ.js";import{u as $}from"./useInfiniteQuery-ZoWXsJcj.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{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-CaH7O3hJ.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{a as $,a1 as Ne,r as b,e as ae,y as W,j as t,l as x,B as X,I as G,c as Ie,b as Ce,h as Ue}from"./index-BpE9ALKU.js";import{e as qe}from"./backoff-CrEUbyZT.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=qe(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(Ue,{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 Xe(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,Xe as a};
|
|
1
|
+
import{a as $,a1 as Ne,r as b,e as ae,y as W,j as t,l as x,B as X,I as G,c as Ie,b as Ce,h as Ue}from"./index-CaH7O3hJ.js";import{e as qe}from"./backoff-CrEUbyZT.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=qe(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(Ue,{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 Xe(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,Xe as a};
|